@tuongaz/seeflow 0.1.110 → 0.1.111

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.
Files changed (58) hide show
  1. package/dist/web/assets/{architectureDiagram-3BPJPVTR-CyC7OltI.js → architectureDiagram-3BPJPVTR-C-2fCGRP.js} +1 -1
  2. package/dist/web/assets/{blockDiagram-GPEHLZMM-Bzp66cSV.js → blockDiagram-GPEHLZMM-Br3qZBhv.js} +1 -1
  3. package/dist/web/assets/{c4Diagram-AAUBKEIU-DG8Iponw.js → c4Diagram-AAUBKEIU-C4uX4ZH4.js} +1 -1
  4. package/dist/web/assets/channel-qhQeh_4Q.js +1 -0
  5. package/dist/web/assets/{chart-DYrOhreJ.js → chart-9kjHxc0V.js} +1 -1
  6. package/dist/web/assets/{chunk-2J33WTMH-DAqVVWtt.js → chunk-2J33WTMH-2Fn5NN7i.js} +1 -1
  7. package/dist/web/assets/{chunk-4BX2VUAB-BLSkydjn.js → chunk-4BX2VUAB-Df_7ccfg.js} +1 -1
  8. package/dist/web/assets/{chunk-55IACEB6-DQPfPbiJ.js → chunk-55IACEB6-DdU4dw35.js} +1 -1
  9. package/dist/web/assets/{chunk-727SXJPM-BTf0cYfp.js → chunk-727SXJPM-1at9fA5f.js} +1 -1
  10. package/dist/web/assets/{chunk-AQP2D5EJ-3Vhv9mu3.js → chunk-AQP2D5EJ-CPe9M1hv.js} +1 -1
  11. package/dist/web/assets/{chunk-FMBD7UC4-DFLLVi48.js → chunk-FMBD7UC4-DCUEmPvJ.js} +1 -1
  12. package/dist/web/assets/{chunk-ND2GUHAM-CxNVSIAI.js → chunk-ND2GUHAM-tE2Ii-jJ.js} +1 -1
  13. package/dist/web/assets/{chunk-QZHKN3VN-CgQH2fWj.js → chunk-QZHKN3VN-Db5o8Kzv.js} +1 -1
  14. package/dist/web/assets/classDiagram-4FO5ZUOK-BCHg-KrI.js +1 -0
  15. package/dist/web/assets/classDiagram-v2-Q7XG4LA2-BCHg-KrI.js +1 -0
  16. package/dist/web/assets/{code-block-DbJK70Ez.js → code-block-CTINSk3z.js} +1 -1
  17. package/dist/web/assets/{cose-bilkent-S5V4N54A-Byq3k4cK.js → cose-bilkent-S5V4N54A-D7tNx5-t.js} +1 -1
  18. package/dist/web/assets/{dagre-BM42HDAG-BsD1H1iU.js → dagre-BM42HDAG-Cdb53Asb.js} +1 -1
  19. package/dist/web/assets/{diagram-2AECGRRQ-CtzAGbyS.js → diagram-2AECGRRQ-HS6pnGrL.js} +1 -1
  20. package/dist/web/assets/{diagram-5GNKFQAL-D0UfPbiW.js → diagram-5GNKFQAL-c9k4swAt.js} +1 -1
  21. package/dist/web/assets/{diagram-KO2AKTUF-9h1XRmj3.js → diagram-KO2AKTUF-CB3k4xVS.js} +1 -1
  22. package/dist/web/assets/{diagram-LMA3HP47-BrI6e364.js → diagram-LMA3HP47-XKAfR3DB.js} +1 -1
  23. package/dist/web/assets/{diagram-OG6HWLK6-BFGFDRp3.js → diagram-OG6HWLK6-18dGr0GC.js} +1 -1
  24. package/dist/web/assets/{erDiagram-TEJ5UH35-ybC8Itku.js → erDiagram-TEJ5UH35-9DnFE7wo.js} +1 -1
  25. package/dist/web/assets/{flowDiagram-I6XJVG4X-Dhol-kR8.js → flowDiagram-I6XJVG4X-CglLanUO.js} +1 -1
  26. package/dist/web/assets/{ganttDiagram-6RSMTGT7-Y0-j3xBh.js → ganttDiagram-6RSMTGT7-_zKCXbXg.js} +1 -1
  27. package/dist/web/assets/{gitGraphDiagram-PVQCEYII-CkmdZb3E.js → gitGraphDiagram-PVQCEYII-D6axSpL3.js} +1 -1
  28. package/dist/web/assets/{iconify-C6Z3PVFi.js → iconify-CF3Xx8Oq.js} +1 -1
  29. package/dist/web/assets/{index-D3ZH7sGq.js → index-BTL8cVgF.js} +6 -6
  30. package/dist/web/assets/{index.es-D2LpuCoX.js → index.es-DyQqI4EJ.js} +1 -1
  31. package/dist/web/assets/{infoDiagram-5YYISTIA-C349fRyb.js → infoDiagram-5YYISTIA-BfnEVJMR.js} +1 -1
  32. package/dist/web/assets/{ishikawaDiagram-YF4QCWOH-CdAxgdA0.js → ishikawaDiagram-YF4QCWOH-C-CbbOkc.js} +1 -1
  33. package/dist/web/assets/{journeyDiagram-JHISSGLW-Gdj93qhh.js → journeyDiagram-JHISSGLW-CxcYZYhO.js} +1 -1
  34. package/dist/web/assets/{jspdf.es.min-BaNs7eNe.js → jspdf.es.min-BoDPBXoT.js} +3 -3
  35. package/dist/web/assets/{kanban-definition-UN3LZRKU-utWOpj47.js → kanban-definition-UN3LZRKU-Dw9dGj5D.js} +1 -1
  36. package/dist/web/assets/{linear-ysH3nWHa.js → linear-DJLoiaYn.js} +1 -1
  37. package/dist/web/assets/{markdown-DKlQMpx8.js → markdown-BXIhHJY7.js} +1 -1
  38. package/dist/web/assets/{mermaid.core-eyZWidoa.js → mermaid.core-CTeg8SMj.js} +4 -4
  39. package/dist/web/assets/{mindmap-definition-RKZ34NQL-Dhprs5tv.js → mindmap-definition-RKZ34NQL-DG4pYeYK.js} +1 -1
  40. package/dist/web/assets/{pieDiagram-4H26LBE5-z_3vPWNO.js → pieDiagram-4H26LBE5-qPHgJ6_d.js} +1 -1
  41. package/dist/web/assets/{quadrantDiagram-W4KKPZXB-BOBDCRWb.js → quadrantDiagram-W4KKPZXB-C-yiyax0.js} +1 -1
  42. package/dist/web/assets/{requirementDiagram-4Y6WPE33-qn0up2ND.js → requirementDiagram-4Y6WPE33-vBgnScGl.js} +1 -1
  43. package/dist/web/assets/{sankeyDiagram-5OEKKPKP-CrcTPUVx.js → sankeyDiagram-5OEKKPKP-H-Yoexss.js} +1 -1
  44. package/dist/web/assets/{sequenceDiagram-3UESZ5HK-r24r7OqC.js → sequenceDiagram-3UESZ5HK-B0PUqbDC.js} +1 -1
  45. package/dist/web/assets/{stateDiagram-AJRCARHV-2EJNhDf-.js → stateDiagram-AJRCARHV-LHZJU6NT.js} +1 -1
  46. package/dist/web/assets/stateDiagram-v2-BHNVJYJU-Jjcvv867.js +1 -0
  47. package/dist/web/assets/{time-CheTsYvu.js → time-CytNQj8l.js} +1 -1
  48. package/dist/web/assets/{timeline-definition-PNZ67QCA-BNj38YIy.js → timeline-definition-PNZ67QCA-CNYtzzkX.js} +1 -1
  49. package/dist/web/assets/{vennDiagram-CIIHVFJN-C6ktujmS.js → vennDiagram-CIIHVFJN-CR3j3MfQ.js} +1 -1
  50. package/dist/web/assets/{wardley-L42UT6IY-Bl_M5GRw.js → wardley-L42UT6IY-DsRtYkk3.js} +1 -1
  51. package/dist/web/assets/{wardleyDiagram-YWT4CUSO-B0CVz9vg.js → wardleyDiagram-YWT4CUSO-Bkiae0No.js} +1 -1
  52. package/dist/web/assets/{xychartDiagram-2RQKCTM6-ljSwqYiu.js → xychartDiagram-2RQKCTM6-DFoBCrdz.js} +1 -1
  53. package/dist/web/index.html +1 -1
  54. package/package.json +1 -1
  55. package/dist/web/assets/channel-ByV7mN6x.js +0 -1
  56. package/dist/web/assets/classDiagram-4FO5ZUOK-CftRaxtv.js +0 -1
  57. package/dist/web/assets/classDiagram-v2-Q7XG4LA2-CftRaxtv.js +0 -1
  58. package/dist/web/assets/stateDiagram-v2-BHNVJYJU-YVpQlkEY.js +0 -1
@@ -1,4 +1,4 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/chart-DYrOhreJ.js","assets/step-CWvwoXpJ.js","assets/band-BEGRCkg7.js","assets/init-BFKUnIhM.js","assets/ordinal-BQ3KlzSu.js","assets/linear-ysH3nWHa.js","assets/defaultLocale-CrowFXzY.js","assets/time-CheTsYvu.js","assets/mermaid.core-eyZWidoa.js","assets/purify.es-CLGrRn1w.js"])))=>i.map(i=>d[i]);
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/chart-9kjHxc0V.js","assets/step-CWvwoXpJ.js","assets/band-BEGRCkg7.js","assets/init-BFKUnIhM.js","assets/ordinal-BQ3KlzSu.js","assets/linear-DJLoiaYn.js","assets/defaultLocale-CrowFXzY.js","assets/time-CytNQj8l.js","assets/mermaid.core-CTeg8SMj.js","assets/purify.es-CLGrRn1w.js"])))=>i.map(i=>d[i]);
2
2
  function Lae(e,t){for(var n=0;n<t.length;n++){const o=t[n];if(typeof o!="string"&&!Array.isArray(o)){for(const r in o)if(r!=="default"&&!(r in e)){const i=Object.getOwnPropertyDescriptor(o,r);i&&Object.defineProperty(e,r,i.get?i:{enumerable:!0,get:()=>o[r]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))o(r);new MutationObserver(r=>{for(const i of r)if(i.type==="childList")for(const a of i.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&o(a)}).observe(document,{childList:!0,subtree:!0});function n(r){const i={};return r.integrity&&(i.integrity=r.integrity),r.referrerPolicy&&(i.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?i.credentials="include":r.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function o(r){if(r.ep)return;r.ep=!0;const i=n(r);fetch(r.href,i)}})();var kP=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function kf(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var yX={exports:{}},Ez={},mX={exports:{}},Ze={};/**
3
3
  * @license React
4
4
  * react.production.min.js
@@ -8443,7 +8443,7 @@ Error generating stack: `+i.message+`
8443
8443
  *
8444
8444
  * This source code is licensed under the ISC license.
8445
8445
  * See the LICENSE file in the root directory of this source tree.
8446
- */const BAe=Object.freeze(Object.defineProperty({__proto__:null,AArrowDown:uy,AArrowDownIcon:uy,AArrowUp:hy,AArrowUpIcon:hy,ALargeSmall:fy,ALargeSmallIcon:fy,Accessibility:py,AccessibilityIcon:py,Activity:yy,ActivityIcon:yy,ActivitySquare:t1,ActivitySquareIcon:t1,AirVent:my,AirVentIcon:my,Airplay:gy,AirplayIcon:gy,AlarmCheck:xs,AlarmCheckIcon:xs,AlarmClock:vy,AlarmClockCheck:xs,AlarmClockCheckIcon:xs,AlarmClockIcon:vy,AlarmClockMinus:ws,AlarmClockMinusIcon:ws,AlarmClockOff:ky,AlarmClockOffIcon:ky,AlarmClockPlus:Ms,AlarmClockPlusIcon:Ms,AlarmMinus:ws,AlarmMinusIcon:ws,AlarmPlus:Ms,AlarmPlusIcon:Ms,AlarmSmoke:xy,AlarmSmokeIcon:xy,Album:wy,AlbumIcon:wy,AlertCircle:ha,AlertCircleIcon:ha,AlertOctagon:Al,AlertOctagonIcon:Al,AlertTriangle:jr,AlertTriangleIcon:jr,AlignCenter:ya,AlignCenterHorizontal:by,AlignCenterHorizontalIcon:by,AlignCenterIcon:ya,AlignCenterVertical:My,AlignCenterVerticalIcon:My,AlignEndHorizontal:_y,AlignEndHorizontalIcon:_y,AlignEndVertical:Cy,AlignEndVerticalIcon:Cy,AlignHorizontalDistributeCenter:Sy,AlignHorizontalDistributeCenterIcon:Sy,AlignHorizontalDistributeEnd:Ly,AlignHorizontalDistributeEndIcon:Ly,AlignHorizontalDistributeStart:Ny,AlignHorizontalDistributeStartIcon:Ny,AlignHorizontalJustifyCenter:Iy,AlignHorizontalJustifyCenterIcon:Iy,AlignHorizontalJustifyEnd:Ey,AlignHorizontalJustifyEndIcon:Ey,AlignHorizontalJustifyStart:Ay,AlignHorizontalJustifyStartIcon:Ay,AlignHorizontalSpaceAround:jy,AlignHorizontalSpaceAroundIcon:jy,AlignHorizontalSpaceBetween:$y,AlignHorizontalSpaceBetweenIcon:$y,AlignJustify:ed,AlignJustifyIcon:ed,AlignLeft:Vo,AlignLeftIcon:Vo,AlignRight:ma,AlignRightIcon:ma,AlignStartHorizontal:Py,AlignStartHorizontalIcon:Py,AlignStartVertical:zy,AlignStartVerticalIcon:zy,AlignVerticalDistributeCenter:Ry,AlignVerticalDistributeCenterIcon:Ry,AlignVerticalDistributeEnd:Ty,AlignVerticalDistributeEndIcon:Ty,AlignVerticalDistributeStart:Dy,AlignVerticalDistributeStartIcon:Dy,AlignVerticalJustifyCenter:Hy,AlignVerticalJustifyCenterIcon:Hy,AlignVerticalJustifyEnd:Oy,AlignVerticalJustifyEndIcon:Oy,AlignVerticalJustifyStart:Fy,AlignVerticalJustifyStartIcon:Fy,AlignVerticalSpaceAround:qy,AlignVerticalSpaceAroundIcon:qy,AlignVerticalSpaceBetween:Vy,AlignVerticalSpaceBetweenIcon:Vy,Ambulance:By,AmbulanceIcon:By,Ampersand:Uy,AmpersandIcon:Uy,Ampersands:Wy,AmpersandsIcon:Wy,Amphora:Gy,AmphoraIcon:Gy,Anchor:Ky,AnchorIcon:Ky,Angry:Xy,AngryIcon:Xy,Annoyed:Zy,AnnoyedIcon:Zy,Antenna:Yy,AntennaIcon:Yy,Anvil:Qy,AnvilIcon:Qy,Aperture:Jy,ApertureIcon:Jy,AppWindow:tm,AppWindowIcon:tm,AppWindowMac:em,AppWindowMacIcon:em,Apple:nm,AppleIcon:nm,Archive:im,ArchiveIcon:im,ArchiveRestore:om,ArchiveRestoreIcon:om,ArchiveX:rm,ArchiveXIcon:rm,AreaChart:Ts,AreaChartIcon:Ts,Armchair:am,ArmchairIcon:am,ArrowBigDown:cm,ArrowBigDownDash:sm,ArrowBigDownDashIcon:sm,ArrowBigDownIcon:cm,ArrowBigLeft:dm,ArrowBigLeftDash:lm,ArrowBigLeftDashIcon:lm,ArrowBigLeftIcon:dm,ArrowBigRight:hm,ArrowBigRightDash:um,ArrowBigRightDashIcon:um,ArrowBigRightIcon:hm,ArrowBigUp:pm,ArrowBigUpDash:fm,ArrowBigUpDashIcon:fm,ArrowBigUpIcon:pm,ArrowDown:_m,ArrowDown01:ym,ArrowDown01Icon:ym,ArrowDown10:mm,ArrowDown10Icon:mm,ArrowDownAZ:bs,ArrowDownAZIcon:bs,ArrowDownAz:bs,ArrowDownAzIcon:bs,ArrowDownCircle:Ys,ArrowDownCircleIcon:Ys,ArrowDownFromLine:gm,ArrowDownFromLineIcon:gm,ArrowDownIcon:_m,ArrowDownLeft:vm,ArrowDownLeftFromCircle:Qs,ArrowDownLeftFromCircleIcon:Qs,ArrowDownLeftFromSquare:a1,ArrowDownLeftFromSquareIcon:a1,ArrowDownLeftIcon:vm,ArrowDownLeftSquare:n1,ArrowDownLeftSquareIcon:n1,ArrowDownNarrowWide:km,ArrowDownNarrowWideIcon:km,ArrowDownRight:wm,ArrowDownRightFromCircle:ec,ArrowDownRightFromCircleIcon:ec,ArrowDownRightFromSquare:s1,ArrowDownRightFromSquareIcon:s1,ArrowDownRightIcon:wm,ArrowDownRightSquare:o1,ArrowDownRightSquareIcon:o1,ArrowDownSquare:r1,ArrowDownSquareIcon:r1,ArrowDownToDot:xm,ArrowDownToDotIcon:xm,ArrowDownToLine:Mm,ArrowDownToLineIcon:Mm,ArrowDownUp:bm,ArrowDownUpIcon:bm,ArrowDownWideNarrow:_s,ArrowDownWideNarrowIcon:_s,ArrowDownZA:Cs,ArrowDownZAIcon:Cs,ArrowDownZa:Cs,ArrowDownZaIcon:Cs,ArrowLeft:Lm,ArrowLeftCircle:Js,ArrowLeftCircleIcon:Js,ArrowLeftFromLine:Cm,ArrowLeftFromLineIcon:Cm,ArrowLeftIcon:Lm,ArrowLeftRight:J2,ArrowLeftRightIcon:J2,ArrowLeftSquare:i1,ArrowLeftSquareIcon:i1,ArrowLeftToLine:Sm,ArrowLeftToLineIcon:Sm,ArrowRight:i0,ArrowRightCircle:oc,ArrowRightCircleIcon:oc,ArrowRightFromLine:Nm,ArrowRightFromLineIcon:Nm,ArrowRightIcon:i0,ArrowRightLeft:Im,ArrowRightLeftIcon:Im,ArrowRightSquare:d1,ArrowRightSquareIcon:d1,ArrowRightToLine:Am,ArrowRightToLineIcon:Am,ArrowUp:Om,ArrowUp01:Em,ArrowUp01Icon:Em,ArrowUp10:jm,ArrowUp10Icon:jm,ArrowUpAZ:Ss,ArrowUpAZIcon:Ss,ArrowUpAz:Ss,ArrowUpAzIcon:Ss,ArrowUpCircle:rc,ArrowUpCircleIcon:rc,ArrowUpDown:$m,ArrowUpDownIcon:$m,ArrowUpFromDot:Pm,ArrowUpFromDotIcon:Pm,ArrowUpFromLine:zm,ArrowUpFromLineIcon:zm,ArrowUpIcon:Om,ArrowUpLeft:Rm,ArrowUpLeftFromCircle:tc,ArrowUpLeftFromCircleIcon:tc,ArrowUpLeftFromSquare:c1,ArrowUpLeftFromSquareIcon:c1,ArrowUpLeftIcon:Rm,ArrowUpLeftSquare:u1,ArrowUpLeftSquareIcon:u1,ArrowUpNarrowWide:Ls,ArrowUpNarrowWideIcon:Ls,ArrowUpRight:Dm,ArrowUpRightFromCircle:nc,ArrowUpRightFromCircleIcon:nc,ArrowUpRightFromSquare:l1,ArrowUpRightFromSquareIcon:l1,ArrowUpRightIcon:Dm,ArrowUpRightSquare:p1,ArrowUpRightSquareIcon:p1,ArrowUpSquare:h1,ArrowUpSquareIcon:h1,ArrowUpToLine:Tm,ArrowUpToLineIcon:Tm,ArrowUpWideNarrow:Hm,ArrowUpWideNarrowIcon:Hm,ArrowUpZA:Ns,ArrowUpZAIcon:Ns,ArrowUpZa:Ns,ArrowUpZaIcon:Ns,ArrowsUpFromLine:Fm,ArrowsUpFromLineIcon:Fm,Asterisk:qm,AsteriskIcon:qm,AsteriskSquare:f1,AsteriskSquareIcon:f1,AtSign:Vm,AtSignIcon:Vm,Atom:Bm,AtomIcon:Bm,AudioLines:Um,AudioLinesIcon:Um,AudioWaveform:Gm,AudioWaveformIcon:Gm,Award:Wm,AwardIcon:Wm,Axe:Km,AxeIcon:Km,Axis3D:Is,Axis3DIcon:Is,Axis3d:Is,Axis3dIcon:Is,Baby:Xm,BabyIcon:Xm,Backpack:Zm,BackpackIcon:Zm,Badge:hg,BadgeAlert:Qm,BadgeAlertIcon:Qm,BadgeCent:Ym,BadgeCentIcon:Ym,BadgeCheck:As,BadgeCheckIcon:As,BadgeDollarSign:Jm,BadgeDollarSignIcon:Jm,BadgeEuro:tg,BadgeEuroIcon:tg,BadgeHelp:Es,BadgeHelpIcon:Es,BadgeIcon:hg,BadgeIndianRupee:eg,BadgeIndianRupeeIcon:eg,BadgeInfo:ng,BadgeInfoIcon:ng,BadgeJapaneseYen:og,BadgeJapaneseYenIcon:og,BadgeMinus:rg,BadgeMinusIcon:rg,BadgePercent:ig,BadgePercentIcon:ig,BadgePlus:ag,BadgePlusIcon:ag,BadgePoundSterling:sg,BadgePoundSterlingIcon:sg,BadgeQuestionMark:Es,BadgeQuestionMarkIcon:Es,BadgeRussianRuble:cg,BadgeRussianRubleIcon:cg,BadgeSwissFranc:lg,BadgeSwissFrancIcon:lg,BadgeTurkishLira:dg,BadgeTurkishLiraIcon:dg,BadgeX:ug,BadgeXIcon:ug,BaggageClaim:fg,BaggageClaimIcon:fg,Balloon:pg,BalloonIcon:pg,Ban:eh,BanIcon:eh,Banana:yg,BananaIcon:yg,Bandage:mg,BandageIcon:mg,Banknote:xg,BanknoteArrowDown:gg,BanknoteArrowDownIcon:gg,BanknoteArrowUp:kg,BanknoteArrowUpIcon:kg,BanknoteIcon:xg,BanknoteX:vg,BanknoteXIcon:vg,BarChart:Us,BarChart2:Ws,BarChart2Icon:Ws,BarChart3:Vs,BarChart3Icon:Vs,BarChart4:qs,BarChart4Icon:qs,BarChartBig:Fs,BarChartBigIcon:Fs,BarChartHorizontal:Hs,BarChartHorizontalBig:Ds,BarChartHorizontalBigIcon:Ds,BarChartHorizontalIcon:Hs,BarChartIcon:Us,Barcode:wg,BarcodeIcon:wg,Barrel:Mg,BarrelIcon:Mg,Baseline:bg,BaselineIcon:bg,Bath:_g,BathIcon:_g,Battery:Eg,BatteryCharging:Cg,BatteryChargingIcon:Cg,BatteryFull:Sg,BatteryFullIcon:Sg,BatteryIcon:Eg,BatteryLow:Lg,BatteryLowIcon:Lg,BatteryMedium:Ng,BatteryMediumIcon:Ng,BatteryPlus:Ig,BatteryPlusIcon:Ig,BatteryWarning:Ag,BatteryWarningIcon:Ag,Beaker:jg,BeakerIcon:jg,Bean:Pg,BeanIcon:Pg,BeanOff:$g,BeanOffIcon:$g,Bed:Tg,BedDouble:zg,BedDoubleIcon:zg,BedIcon:Tg,BedSingle:Rg,BedSingleIcon:Rg,Beef:Dg,BeefIcon:Dg,Beer:Og,BeerIcon:Og,BeerOff:Hg,BeerOffIcon:Hg,Bell:Gg,BellDot:Fg,BellDotIcon:Fg,BellElectric:qg,BellElectricIcon:qg,BellIcon:Gg,BellMinus:Vg,BellMinusIcon:Vg,BellOff:Bg,BellOffIcon:Bg,BellPlus:Ug,BellPlusIcon:Ug,BellRing:Wg,BellRingIcon:Wg,BetweenHorizonalEnd:js,BetweenHorizonalEndIcon:js,BetweenHorizonalStart:$s,BetweenHorizonalStartIcon:$s,BetweenHorizontalEnd:js,BetweenHorizontalEndIcon:js,BetweenHorizontalStart:$s,BetweenHorizontalStartIcon:$s,BetweenVerticalEnd:Kg,BetweenVerticalEndIcon:Kg,BetweenVerticalStart:Xg,BetweenVerticalStartIcon:Xg,BicepsFlexed:Zg,BicepsFlexedIcon:Zg,Bike:Yg,BikeIcon:Yg,Binary:Qg,BinaryIcon:Qg,Binoculars:Jg,BinocularsIcon:Jg,Biohazard:ek,BiohazardIcon:ek,Bird:tk,BirdIcon:tk,Birdhouse:nk,BirdhouseIcon:nk,Bitcoin:ok,BitcoinIcon:ok,Blend:rk,BlendIcon:rk,Blinds:ik,BlindsIcon:ik,Blocks:ak,BlocksIcon:ak,Bluetooth:dk,BluetoothConnected:sk,BluetoothConnectedIcon:sk,BluetoothIcon:dk,BluetoothOff:ck,BluetoothOffIcon:ck,BluetoothSearching:lk,BluetoothSearchingIcon:lk,Bold:uk,BoldIcon:uk,Bolt:hk,BoltIcon:hk,Bomb:fk,BombIcon:fk,Bone:pk,BoneIcon:pk,Book:Hk,BookA:yk,BookAIcon:yk,BookAlert:mk,BookAlertIcon:mk,BookAudio:gk,BookAudioIcon:gk,BookCheck:kk,BookCheckIcon:kk,BookCopy:vk,BookCopyIcon:vk,BookDashed:Ps,BookDashedIcon:Ps,BookDown:xk,BookDownIcon:xk,BookHeadphones:wk,BookHeadphonesIcon:wk,BookHeart:Mk,BookHeartIcon:Mk,BookIcon:Hk,BookImage:bk,BookImageIcon:bk,BookKey:_k,BookKeyIcon:_k,BookLock:Ck,BookLockIcon:Ck,BookMarked:Sk,BookMarkedIcon:Sk,BookMinus:Lk,BookMinusIcon:Lk,BookOpen:Ak,BookOpenCheck:Nk,BookOpenCheckIcon:Nk,BookOpenIcon:Ak,BookOpenText:Ik,BookOpenTextIcon:Ik,BookPlus:Ek,BookPlusIcon:Ek,BookSearch:jk,BookSearchIcon:jk,BookTemplate:Ps,BookTemplateIcon:Ps,BookText:$k,BookTextIcon:$k,BookType:Pk,BookTypeIcon:Pk,BookUp:Rk,BookUp2:zk,BookUp2Icon:zk,BookUpIcon:Rk,BookUser:Tk,BookUserIcon:Tk,BookX:Dk,BookXIcon:Dk,Bookmark:Bk,BookmarkCheck:Ok,BookmarkCheckIcon:Ok,BookmarkIcon:Bk,BookmarkMinus:Fk,BookmarkMinusIcon:Fk,BookmarkPlus:qk,BookmarkPlusIcon:qk,BookmarkX:Vk,BookmarkXIcon:Vk,BoomBox:Uk,BoomBoxIcon:Uk,Bot:Gk,BotIcon:Gk,BotMessageSquare:Wk,BotMessageSquareIcon:Wk,BotOff:Kk,BotOffIcon:Kk,BottleWine:Xk,BottleWineIcon:Xk,BowArrow:Zk,BowArrowIcon:Zk,Box:Yk,BoxIcon:Yk,BoxSelect:C1,BoxSelectIcon:C1,Boxes:Qk,BoxesIcon:Qk,Braces:zs,BracesIcon:zs,Brackets:Jk,BracketsIcon:Jk,Brain:n4,BrainCircuit:e4,BrainCircuitIcon:e4,BrainCog:t4,BrainCogIcon:t4,BrainIcon:n4,BrickWall:i4,BrickWallFire:o4,BrickWallFireIcon:o4,BrickWallIcon:i4,BrickWallShield:r4,BrickWallShieldIcon:r4,Briefcase:l4,BriefcaseBusiness:a4,BriefcaseBusinessIcon:a4,BriefcaseConveyorBelt:s4,BriefcaseConveyorBeltIcon:s4,BriefcaseIcon:l4,BriefcaseMedical:c4,BriefcaseMedicalIcon:c4,BringToFront:d4,BringToFrontIcon:d4,Brush:f4,BrushCleaning:u4,BrushCleaningIcon:u4,BrushIcon:f4,Bubbles:h4,BubblesIcon:h4,Bug:m4,BugIcon:m4,BugOff:p4,BugOffIcon:p4,BugPlay:y4,BugPlayIcon:y4,Building:g4,Building2:k4,Building2Icon:k4,BuildingIcon:g4,Bus:x4,BusFront:v4,BusFrontIcon:v4,BusIcon:x4,Cable:M4,CableCar:w4,CableCarIcon:w4,CableIcon:M4,Cake:_4,CakeIcon:_4,CakeSlice:b4,CakeSliceIcon:b4,Calculator:C4,CalculatorIcon:C4,Calendar:W4,Calendar1:S4,Calendar1Icon:S4,CalendarArrowDown:L4,CalendarArrowDownIcon:L4,CalendarArrowUp:N4,CalendarArrowUpIcon:N4,CalendarCheck:A4,CalendarCheck2:I4,CalendarCheck2Icon:I4,CalendarCheckIcon:A4,CalendarClock:E4,CalendarClockIcon:E4,CalendarCog:j4,CalendarCogIcon:j4,CalendarDays:$4,CalendarDaysIcon:$4,CalendarFold:P4,CalendarFoldIcon:P4,CalendarHeart:z4,CalendarHeartIcon:z4,CalendarIcon:W4,CalendarMinus:T4,CalendarMinus2:R4,CalendarMinus2Icon:R4,CalendarMinusIcon:T4,CalendarOff:D4,CalendarOffIcon:D4,CalendarPlus:F4,CalendarPlus2:H4,CalendarPlus2Icon:H4,CalendarPlusIcon:F4,CalendarRange:O4,CalendarRangeIcon:O4,CalendarSearch:q4,CalendarSearchIcon:q4,CalendarSync:V4,CalendarSyncIcon:V4,CalendarX:U4,CalendarX2:B4,CalendarX2Icon:B4,CalendarXIcon:U4,Calendars:G4,CalendarsIcon:G4,Camera:X4,CameraIcon:X4,CameraOff:K4,CameraOffIcon:K4,CandlestickChart:Os,CandlestickChartIcon:Os,Candy:Q4,CandyCane:Z4,CandyCaneIcon:Z4,CandyIcon:Q4,CandyOff:Y4,CandyOffIcon:Y4,Cannabis:e5,CannabisIcon:e5,CannabisOff:J4,CannabisOffIcon:J4,Captions:Rs,CaptionsIcon:Rs,CaptionsOff:t5,CaptionsOffIcon:t5,Car:r5,CarFront:n5,CarFrontIcon:n5,CarIcon:r5,CarTaxiFront:o5,CarTaxiFrontIcon:o5,Caravan:i5,CaravanIcon:i5,CardSim:a5,CardSimIcon:a5,Carrot:s5,CarrotIcon:s5,CaseLower:c5,CaseLowerIcon:c5,CaseSensitive:l5,CaseSensitiveIcon:l5,CaseUpper:d5,CaseUpperIcon:d5,CassetteTape:u5,CassetteTapeIcon:u5,Cast:h5,CastIcon:h5,Castle:f5,CastleIcon:f5,Cat:p5,CatIcon:p5,Cctv:y5,CctvIcon:y5,ChartArea:Ts,ChartAreaIcon:Ts,ChartBar:Hs,ChartBarBig:Ds,ChartBarBigIcon:Ds,ChartBarDecreasing:m5,ChartBarDecreasingIcon:m5,ChartBarIcon:Hs,ChartBarIncreasing:g5,ChartBarIncreasingIcon:g5,ChartBarStacked:k5,ChartBarStackedIcon:k5,ChartCandlestick:Os,ChartCandlestickIcon:Os,ChartColumn:Vs,ChartColumnBig:Fs,ChartColumnBigIcon:Fs,ChartColumnDecreasing:v5,ChartColumnDecreasingIcon:v5,ChartColumnIcon:Vs,ChartColumnIncreasing:qs,ChartColumnIncreasingIcon:qs,ChartColumnStacked:x5,ChartColumnStackedIcon:x5,ChartGantt:w5,ChartGanttIcon:w5,ChartLine:Bs,ChartLineIcon:Bs,ChartNetwork:M5,ChartNetworkIcon:M5,ChartNoAxesColumn:Ws,ChartNoAxesColumnDecreasing:b5,ChartNoAxesColumnDecreasingIcon:b5,ChartNoAxesColumnIcon:Ws,ChartNoAxesColumnIncreasing:Us,ChartNoAxesColumnIncreasingIcon:Us,ChartNoAxesCombined:_5,ChartNoAxesCombinedIcon:_5,ChartNoAxesGantt:Gs,ChartNoAxesGanttIcon:Gs,ChartPie:Ks,ChartPieIcon:Ks,ChartScatter:Xs,ChartScatterIcon:Xs,ChartSpline:C5,ChartSplineIcon:C5,Check:ja,CheckCheck:S5,CheckCheckIcon:S5,CheckCircle:ic,CheckCircle2:fa,CheckCircle2Icon:fa,CheckCircleIcon:ic,CheckIcon:ja,CheckLine:L5,CheckLineIcon:L5,CheckSquare:m1,CheckSquare2:g1,CheckSquare2Icon:g1,CheckSquareIcon:m1,ChefHat:N5,ChefHatIcon:N5,Cherry:I5,CherryIcon:I5,ChessBishop:A5,ChessBishopIcon:A5,ChessKing:E5,ChessKingIcon:E5,ChessKnight:j5,ChessKnightIcon:j5,ChessPawn:$5,ChessPawnIcon:$5,ChessQueen:P5,ChessQueenIcon:P5,ChessRook:R5,ChessRookIcon:R5,ChevronDown:z5,ChevronDownCircle:ac,ChevronDownCircleIcon:ac,ChevronDownIcon:z5,ChevronDownSquare:k1,ChevronDownSquareIcon:k1,ChevronFirst:T5,ChevronFirstIcon:T5,ChevronLast:D5,ChevronLastIcon:D5,ChevronLeft:H5,ChevronLeftCircle:sc,ChevronLeftCircleIcon:sc,ChevronLeftIcon:H5,ChevronLeftSquare:v1,ChevronLeftSquareIcon:v1,ChevronRight:O5,ChevronRightCircle:cc,ChevronRightCircleIcon:cc,ChevronRightIcon:O5,ChevronRightSquare:w1,ChevronRightSquareIcon:w1,ChevronUp:F5,ChevronUpCircle:lc,ChevronUpCircleIcon:lc,ChevronUpIcon:F5,ChevronUpSquare:x1,ChevronUpSquareIcon:x1,ChevronsDown:V5,ChevronsDownIcon:V5,ChevronsDownUp:q5,ChevronsDownUpIcon:q5,ChevronsLeft:W5,ChevronsLeftIcon:W5,ChevronsLeftRight:U5,ChevronsLeftRightEllipsis:B5,ChevronsLeftRightEllipsisIcon:B5,ChevronsLeftRightIcon:U5,ChevronsRight:K5,ChevronsRightIcon:K5,ChevronsRightLeft:G5,ChevronsRightLeftIcon:G5,ChevronsUp:Z5,ChevronsUpDown:X5,ChevronsUpDownIcon:X5,ChevronsUpIcon:Z5,Chrome:Zs,ChromeIcon:Zs,Chromium:Zs,ChromiumIcon:Zs,Church:Y5,ChurchIcon:Y5,Cigarette:J5,CigaretteIcon:J5,CigaretteOff:Q5,CigaretteOffIcon:Q5,Circle:th,CircleAlert:ha,CircleAlertIcon:ha,CircleArrowDown:Ys,CircleArrowDownIcon:Ys,CircleArrowLeft:Js,CircleArrowLeftIcon:Js,CircleArrowOutDownLeft:Qs,CircleArrowOutDownLeftIcon:Qs,CircleArrowOutDownRight:ec,CircleArrowOutDownRightIcon:ec,CircleArrowOutUpLeft:tc,CircleArrowOutUpLeftIcon:tc,CircleArrowOutUpRight:nc,CircleArrowOutUpRightIcon:nc,CircleArrowRight:oc,CircleArrowRightIcon:oc,CircleArrowUp:rc,CircleArrowUpIcon:rc,CircleCheck:fa,CircleCheckBig:ic,CircleCheckBigIcon:ic,CircleCheckIcon:fa,CircleChevronDown:ac,CircleChevronDownIcon:ac,CircleChevronLeft:sc,CircleChevronLeftIcon:sc,CircleChevronRight:cc,CircleChevronRightIcon:cc,CircleChevronUp:lc,CircleChevronUpIcon:lc,CircleDashed:ev,CircleDashedIcon:ev,CircleDivide:dc,CircleDivideIcon:dc,CircleDollarSign:tv,CircleDollarSignIcon:tv,CircleDot:ov,CircleDotDashed:nv,CircleDotDashedIcon:nv,CircleDotIcon:ov,CircleEllipsis:rv,CircleEllipsisIcon:rv,CircleEqual:iv,CircleEqualIcon:iv,CircleFadingArrowUp:av,CircleFadingArrowUpIcon:av,CircleFadingPlus:sv,CircleFadingPlusIcon:sv,CircleGauge:uc,CircleGaugeIcon:uc,CircleHelp:qo,CircleHelpIcon:qo,CircleIcon:th,CircleMinus:hc,CircleMinusIcon:hc,CircleOff:cv,CircleOffIcon:cv,CircleParking:pc,CircleParkingIcon:pc,CircleParkingOff:fc,CircleParkingOffIcon:fc,CirclePause:yc,CirclePauseIcon:yc,CirclePercent:mc,CirclePercentIcon:mc,CirclePile:lv,CirclePileIcon:lv,CirclePlay:gc,CirclePlayIcon:gc,CirclePlus:kc,CirclePlusIcon:kc,CirclePoundSterling:dv,CirclePoundSterlingIcon:dv,CirclePower:vc,CirclePowerIcon:vc,CircleQuestionMark:qo,CircleQuestionMarkIcon:qo,CircleSlash:uv,CircleSlash2:xc,CircleSlash2Icon:xc,CircleSlashIcon:uv,CircleSlashed:xc,CircleSlashedIcon:xc,CircleSmall:hv,CircleSmallIcon:hv,CircleStar:fv,CircleStarIcon:fv,CircleStop:Mc,CircleStopIcon:Mc,CircleUser:bc,CircleUserIcon:bc,CircleUserRound:wc,CircleUserRoundIcon:wc,CircleX:_c,CircleXIcon:_c,CircuitBoard:pv,CircuitBoardIcon:pv,Citrus:yv,CitrusIcon:yv,Clapperboard:mv,ClapperboardIcon:mv,Clipboard:Sv,ClipboardCheck:gv,ClipboardCheckIcon:gv,ClipboardClock:kv,ClipboardClockIcon:kv,ClipboardCopy:vv,ClipboardCopyIcon:vv,ClipboardEdit:Sc,ClipboardEditIcon:Sc,ClipboardIcon:Sv,ClipboardList:xv,ClipboardListIcon:xv,ClipboardMinus:wv,ClipboardMinusIcon:wv,ClipboardPaste:Mv,ClipboardPasteIcon:Mv,ClipboardPen:Sc,ClipboardPenIcon:Sc,ClipboardPenLine:Cc,ClipboardPenLineIcon:Cc,ClipboardPlus:bv,ClipboardPlusIcon:bv,ClipboardSignature:Cc,ClipboardSignatureIcon:Cc,ClipboardType:_v,ClipboardTypeIcon:_v,ClipboardX:Cv,ClipboardXIcon:Cv,Clock:Uv,Clock1:Lv,Clock10:Nv,Clock10Icon:Nv,Clock11:Iv,Clock11Icon:Iv,Clock12:Av,Clock12Icon:Av,Clock1Icon:Lv,Clock2:Ev,Clock2Icon:Ev,Clock3:jv,Clock3Icon:jv,Clock4:$v,Clock4Icon:$v,Clock5:Pv,Clock5Icon:Pv,Clock6:zv,Clock6Icon:zv,Clock7:Rv,Clock7Icon:Rv,Clock8:Tv,Clock8Icon:Tv,Clock9:Dv,Clock9Icon:Dv,ClockAlert:Hv,ClockAlertIcon:Hv,ClockArrowDown:Ov,ClockArrowDownIcon:Ov,ClockArrowUp:Vv,ClockArrowUpIcon:Vv,ClockCheck:Fv,ClockCheckIcon:Fv,ClockFading:qv,ClockFadingIcon:qv,ClockIcon:Uv,ClockPlus:Bv,ClockPlusIcon:Bv,ClosedCaption:Wv,ClosedCaptionIcon:Wv,Cloud:nh,CloudAlert:Gv,CloudAlertIcon:Gv,CloudBackup:Kv,CloudBackupIcon:Kv,CloudCheck:Xv,CloudCheckIcon:Xv,CloudCog:Zv,CloudCogIcon:Zv,CloudDownload:Lc,CloudDownloadIcon:Lc,CloudDrizzle:Yv,CloudDrizzleIcon:Yv,CloudFog:Qv,CloudFogIcon:Qv,CloudHail:Jv,CloudHailIcon:Jv,CloudIcon:nh,CloudLightning:ex,CloudLightningIcon:ex,CloudMoon:nx,CloudMoonIcon:nx,CloudMoonRain:tx,CloudMoonRainIcon:tx,CloudOff:ox,CloudOffIcon:ox,CloudRain:ix,CloudRainIcon:ix,CloudRainWind:rx,CloudRainWindIcon:rx,CloudSnow:ax,CloudSnowIcon:ax,CloudSun:cx,CloudSunIcon:cx,CloudSunRain:sx,CloudSunRainIcon:sx,CloudSync:lx,CloudSyncIcon:lx,CloudUpload:Nc,CloudUploadIcon:Nc,Cloudy:dx,CloudyIcon:dx,Clover:ux,CloverIcon:ux,Club:hx,ClubIcon:hx,Code:fx,Code2:Ic,Code2Icon:Ic,CodeIcon:fx,CodeSquare:M1,CodeSquareIcon:M1,CodeXml:Ic,CodeXmlIcon:Ic,Codepen:px,CodepenIcon:px,Codesandbox:yx,CodesandboxIcon:yx,Coffee:mx,CoffeeIcon:mx,Cog:gx,CogIcon:gx,Coins:kx,CoinsIcon:kx,Columns:Ac,Columns2:Ac,Columns2Icon:Ac,Columns3:pa,Columns3Cog:Mr,Columns3CogIcon:Mr,Columns3Icon:pa,Columns4:vx,Columns4Icon:vx,ColumnsIcon:Ac,ColumnsSettings:Mr,ColumnsSettingsIcon:Mr,Combine:xx,CombineIcon:xx,Command:wx,CommandIcon:wx,Compass:Mx,CompassIcon:Mx,Component:bx,ComponentIcon:bx,Computer:_x,ComputerIcon:_x,ConciergeBell:Cx,ConciergeBellIcon:Cx,Cone:Sx,ConeIcon:Sx,Construction:Lx,ConstructionIcon:Lx,Contact:Nx,Contact2:Ec,Contact2Icon:Ec,ContactIcon:Nx,ContactRound:Ec,ContactRoundIcon:Ec,Container:Ix,ContainerIcon:Ix,Contrast:Ax,ContrastIcon:Ax,Cookie:Ex,CookieIcon:Ex,CookingPot:jx,CookingPotIcon:jx,Copy:Dx,CopyCheck:$x,CopyCheckIcon:$x,CopyIcon:Dx,CopyMinus:Px,CopyMinusIcon:Px,CopyPlus:zx,CopyPlusIcon:zx,CopySlash:Rx,CopySlashIcon:Rx,CopyX:Tx,CopyXIcon:Tx,Copyleft:Ox,CopyleftIcon:Ox,Copyright:Hx,CopyrightIcon:Hx,CornerDownLeft:Fx,CornerDownLeftIcon:Fx,CornerDownRight:qx,CornerDownRightIcon:qx,CornerLeftDown:Vx,CornerLeftDownIcon:Vx,CornerLeftUp:Bx,CornerLeftUpIcon:Bx,CornerRightDown:Wx,CornerRightDownIcon:Wx,CornerRightUp:Ux,CornerRightUpIcon:Ux,CornerUpLeft:Kx,CornerUpLeftIcon:Kx,CornerUpRight:Gx,CornerUpRightIcon:Gx,Cpu:Xx,CpuIcon:Xx,CreativeCommons:Zx,CreativeCommonsIcon:Zx,CreditCard:Yx,CreditCardIcon:Yx,Croissant:Qx,CroissantIcon:Qx,Crop:Jx,CropIcon:Jx,Cross:e3,CrossIcon:e3,Crosshair:t3,CrosshairIcon:t3,Crown:n3,CrownIcon:n3,Cuboid:o3,CuboidIcon:o3,CupSoda:r3,CupSodaIcon:r3,CurlyBraces:zs,CurlyBracesIcon:zs,Currency:i3,CurrencyIcon:i3,Cylinder:a3,CylinderIcon:a3,Dam:s3,DamIcon:s3,Database:oh,DatabaseBackup:c3,DatabaseBackupIcon:c3,DatabaseIcon:oh,DatabaseSearch:l3,DatabaseSearchIcon:l3,DatabaseZap:d3,DatabaseZapIcon:d3,DecimalsArrowLeft:u3,DecimalsArrowLeftIcon:u3,DecimalsArrowRight:h3,DecimalsArrowRightIcon:h3,Delete:f3,DeleteIcon:f3,Dessert:p3,DessertIcon:p3,Diameter:y3,DiameterIcon:y3,Diamond:rh,DiamondIcon:rh,DiamondMinus:m3,DiamondMinusIcon:m3,DiamondPercent:jc,DiamondPercentIcon:jc,DiamondPlus:g3,DiamondPlusIcon:g3,Dice1:k3,Dice1Icon:k3,Dice2:x3,Dice2Icon:x3,Dice3:v3,Dice3Icon:v3,Dice4:w3,Dice4Icon:w3,Dice5:M3,Dice5Icon:M3,Dice6:b3,Dice6Icon:b3,Dices:_3,DicesIcon:_3,Diff:C3,DiffIcon:C3,Disc:I3,Disc2:S3,Disc2Icon:S3,Disc3:N3,Disc3Icon:N3,DiscAlbum:L3,DiscAlbumIcon:L3,DiscIcon:I3,Divide:A3,DivideCircle:dc,DivideCircleIcon:dc,DivideIcon:A3,DivideSquare:S1,DivideSquareIcon:S1,Dna:j3,DnaIcon:j3,DnaOff:E3,DnaOffIcon:E3,Dock:$3,DockIcon:$3,Dog:P3,DogIcon:P3,DollarSign:z3,DollarSignIcon:z3,Donut:R3,DonutIcon:R3,DoorClosed:D3,DoorClosedIcon:D3,DoorClosedLocked:T3,DoorClosedLockedIcon:T3,DoorOpen:H3,DoorOpenIcon:H3,Dot:O3,DotIcon:O3,DotSquare:L1,DotSquareIcon:L1,Download:a0,DownloadCloud:Lc,DownloadCloudIcon:Lc,DownloadIcon:a0,DraftingCompass:F3,DraftingCompassIcon:F3,Drama:q3,DramaIcon:q3,Dribbble:V3,DribbbleIcon:V3,Drill:B3,DrillIcon:B3,Drone:U3,DroneIcon:U3,Droplet:G3,DropletIcon:G3,DropletOff:W3,DropletOffIcon:W3,Droplets:K3,DropletsIcon:K3,Drum:X3,DrumIcon:X3,Drumstick:Z3,DrumstickIcon:Z3,Dumbbell:Y3,DumbbellIcon:Y3,Ear:Q3,EarIcon:Q3,EarOff:J3,EarOffIcon:J3,Earth:$c,EarthIcon:$c,EarthLock:e8,EarthLockIcon:e8,Eclipse:t8,EclipseIcon:t8,Edit:no,Edit2:Vl,Edit2Icon:Vl,Edit3:ql,Edit3Icon:ql,EditIcon:no,Egg:r8,EggFried:n8,EggFriedIcon:n8,EggIcon:r8,EggOff:o8,EggOffIcon:o8,Ellipsis:zc,EllipsisIcon:zc,EllipsisVertical:Pc,EllipsisVerticalIcon:Pc,Equal:s8,EqualApproximately:i8,EqualApproximatelyIcon:i8,EqualIcon:s8,EqualNot:a8,EqualNotIcon:a8,EqualSquare:N1,EqualSquareIcon:N1,Eraser:c8,EraserIcon:c8,EthernetPort:l8,EthernetPortIcon:l8,Euro:d8,EuroIcon:d8,EvCharger:u8,EvChargerIcon:u8,Expand:h8,ExpandIcon:h8,ExternalLink:ih,ExternalLinkIcon:ih,Eye:y8,EyeClosed:f8,EyeClosedIcon:f8,EyeIcon:y8,EyeOff:p8,EyeOffIcon:p8,Facebook:m8,FacebookIcon:m8,Factory:g8,FactoryIcon:g8,Fan:v8,FanIcon:v8,FastForward:k8,FastForwardIcon:k8,Feather:x8,FeatherIcon:x8,Fence:w8,FenceIcon:w8,FerrisWheel:M8,FerrisWheelIcon:M8,Figma:b8,FigmaIcon:b8,File:Y8,FileArchive:_8,FileArchiveIcon:_8,FileAudio:br,FileAudio2:br,FileAudio2Icon:br,FileAudioIcon:br,FileAxis3D:Rc,FileAxis3DIcon:Rc,FileAxis3d:Rc,FileAxis3dIcon:Rc,FileBadge:Tc,FileBadge2:Tc,FileBadge2Icon:Tc,FileBadgeIcon:Tc,FileBarChart:Oc,FileBarChart2:Fc,FileBarChart2Icon:Fc,FileBarChartIcon:Oc,FileBox:C8,FileBoxIcon:C8,FileBraces:Hc,FileBracesCorner:Dc,FileBracesCornerIcon:Dc,FileBracesIcon:Hc,FileChartColumn:Fc,FileChartColumnIcon:Fc,FileChartColumnIncreasing:Oc,FileChartColumnIncreasingIcon:Oc,FileChartLine:qc,FileChartLineIcon:qc,FileChartPie:Vc,FileChartPieIcon:Vc,FileCheck:S8,FileCheck2:Bc,FileCheck2Icon:Bc,FileCheckCorner:Bc,FileCheckCornerIcon:Bc,FileCheckIcon:S8,FileClock:N8,FileClockIcon:N8,FileCode:L8,FileCode2:Uc,FileCode2Icon:Uc,FileCodeCorner:Uc,FileCodeCornerIcon:Uc,FileCodeIcon:L8,FileCog:Wc,FileCog2:Wc,FileCog2Icon:Wc,FileCogIcon:Wc,FileDiff:I8,FileDiffIcon:I8,FileDigit:A8,FileDigitIcon:A8,FileDown:ah,FileDownIcon:ah,FileEdit:Qc,FileEditIcon:Qc,FileExclamationPoint:Gc,FileExclamationPointIcon:Gc,FileHeadphone:br,FileHeadphoneIcon:br,FileHeart:E8,FileHeartIcon:E8,FileIcon:Y8,FileImage:j8,FileImageIcon:j8,FileInput:$8,FileInputIcon:$8,FileJson:Hc,FileJson2:Dc,FileJson2Icon:Dc,FileJsonIcon:Hc,FileKey:Kc,FileKey2:Kc,FileKey2Icon:Kc,FileKeyIcon:Kc,FileLineChart:qc,FileLineChartIcon:qc,FileLock:Xc,FileLock2:Xc,FileLock2Icon:Xc,FileLockIcon:Xc,FileMinus:P8,FileMinus2:Zc,FileMinus2Icon:Zc,FileMinusCorner:Zc,FileMinusCornerIcon:Zc,FileMinusIcon:P8,FileMusic:R8,FileMusicIcon:R8,FileOutput:z8,FileOutputIcon:z8,FilePen:Qc,FilePenIcon:Qc,FilePenLine:Yc,FilePenLineIcon:Yc,FilePieChart:Vc,FilePieChartIcon:Vc,FilePlay:Jc,FilePlayIcon:Jc,FilePlus:T8,FilePlus2:el,FilePlus2Icon:el,FilePlusCorner:el,FilePlusCornerIcon:el,FilePlusIcon:T8,FileQuestion:tl,FileQuestionIcon:tl,FileQuestionMark:tl,FileQuestionMarkIcon:tl,FileScan:D8,FileScanIcon:D8,FileSearch:H8,FileSearch2:nl,FileSearch2Icon:nl,FileSearchCorner:nl,FileSearchCornerIcon:nl,FileSearchIcon:H8,FileSignal:ol,FileSignalIcon:ol,FileSignature:Yc,FileSignatureIcon:Yc,FileSliders:O8,FileSlidersIcon:O8,FileSpreadsheet:F8,FileSpreadsheetIcon:F8,FileStack:q8,FileStackIcon:q8,FileSymlink:V8,FileSymlinkIcon:V8,FileTerminal:B8,FileTerminalIcon:B8,FileText:U8,FileTextIcon:U8,FileType:W8,FileType2:rl,FileType2Icon:rl,FileTypeCorner:rl,FileTypeCornerIcon:rl,FileTypeIcon:W8,FileUp:G8,FileUpIcon:G8,FileUser:K8,FileUserIcon:K8,FileVideo:Jc,FileVideo2:il,FileVideo2Icon:il,FileVideoCamera:il,FileVideoCameraIcon:il,FileVideoIcon:Jc,FileVolume:X8,FileVolume2:ol,FileVolume2Icon:ol,FileVolumeIcon:X8,FileWarning:Gc,FileWarningIcon:Gc,FileX:Z8,FileX2:al,FileX2Icon:al,FileXCorner:al,FileXCornerIcon:al,FileXIcon:Z8,Files:Q8,FilesIcon:Q8,Film:J8,FilmIcon:J8,Filter:ul,FilterIcon:ul,FilterX:dl,FilterXIcon:dl,Fingerprint:sl,FingerprintIcon:sl,FingerprintPattern:sl,FingerprintPatternIcon:sl,FireExtinguisher:e6,FireExtinguisherIcon:e6,Fish:o6,FishIcon:o6,FishOff:t6,FishOffIcon:t6,FishSymbol:n6,FishSymbolIcon:n6,FishingHook:r6,FishingHookIcon:r6,Flag:c6,FlagIcon:c6,FlagOff:i6,FlagOffIcon:i6,FlagTriangleLeft:a6,FlagTriangleLeftIcon:a6,FlagTriangleRight:s6,FlagTriangleRightIcon:s6,Flame:d6,FlameIcon:d6,FlameKindling:l6,FlameKindlingIcon:l6,Flashlight:h6,FlashlightIcon:h6,FlashlightOff:u6,FlashlightOffIcon:u6,FlaskConical:y6,FlaskConicalIcon:y6,FlaskConicalOff:f6,FlaskConicalOffIcon:f6,FlaskRound:p6,FlaskRoundIcon:p6,FlipHorizontal:g6,FlipHorizontal2:m6,FlipHorizontal2Icon:m6,FlipHorizontalIcon:g6,FlipVertical:v6,FlipVertical2:k6,FlipVertical2Icon:k6,FlipVerticalIcon:v6,Flower:w6,Flower2:x6,Flower2Icon:x6,FlowerIcon:w6,Focus:M6,FocusIcon:M6,FoldHorizontal:b6,FoldHorizontalIcon:b6,FoldVertical:_6,FoldVerticalIcon:_6,Folder:Y6,FolderArchive:C6,FolderArchiveIcon:C6,FolderCheck:S6,FolderCheckIcon:S6,FolderClock:L6,FolderClockIcon:L6,FolderClosed:I6,FolderClosedIcon:I6,FolderCode:N6,FolderCodeIcon:N6,FolderCog:cl,FolderCog2:cl,FolderCog2Icon:cl,FolderCogIcon:cl,FolderDot:A6,FolderDotIcon:A6,FolderDown:E6,FolderDownIcon:E6,FolderEdit:ll,FolderEditIcon:ll,FolderGit:$6,FolderGit2:j6,FolderGit2Icon:j6,FolderGitIcon:$6,FolderHeart:P6,FolderHeartIcon:P6,FolderIcon:Y6,FolderInput:z6,FolderInputIcon:z6,FolderKanban:R6,FolderKanbanIcon:R6,FolderKey:T6,FolderKeyIcon:T6,FolderLock:D6,FolderLockIcon:D6,FolderMinus:H6,FolderMinusIcon:H6,FolderOpen:sh,FolderOpenDot:O6,FolderOpenDotIcon:O6,FolderOpenIcon:sh,FolderOutput:F6,FolderOutputIcon:F6,FolderPen:ll,FolderPenIcon:ll,FolderPlus:q6,FolderPlusIcon:q6,FolderRoot:V6,FolderRootIcon:V6,FolderSearch:U6,FolderSearch2:B6,FolderSearch2Icon:B6,FolderSearchIcon:U6,FolderSymlink:W6,FolderSymlinkIcon:W6,FolderSync:G6,FolderSyncIcon:G6,FolderTree:K6,FolderTreeIcon:K6,FolderUp:X6,FolderUpIcon:X6,FolderX:Z6,FolderXIcon:Z6,Folders:Q6,FoldersIcon:Q6,Footprints:J6,FootprintsIcon:J6,ForkKnife:md,ForkKnifeCrossed:yd,ForkKnifeCrossedIcon:yd,ForkKnifeIcon:md,Forklift:nw,ForkliftIcon:nw,Form:ew,FormIcon:ew,FormInput:Ul,FormInputIcon:Ul,Forward:tw,ForwardIcon:tw,Frame:ow,FrameIcon:ow,Framer:aw,FramerIcon:aw,Frown:rw,FrownIcon:rw,Fuel:iw,FuelIcon:iw,Fullscreen:sw,FullscreenIcon:sw,FunctionSquare:I1,FunctionSquareIcon:I1,Funnel:ul,FunnelIcon:ul,FunnelPlus:cw,FunnelPlusIcon:cw,FunnelX:dl,FunnelXIcon:dl,GalleryHorizontal:dw,GalleryHorizontalEnd:lw,GalleryHorizontalEndIcon:lw,GalleryHorizontalIcon:dw,GalleryThumbnails:uw,GalleryThumbnailsIcon:uw,GalleryVertical:fw,GalleryVerticalEnd:hw,GalleryVerticalEndIcon:hw,GalleryVerticalIcon:fw,Gamepad:gw,Gamepad2:pw,Gamepad2Icon:pw,GamepadDirectional:yw,GamepadDirectionalIcon:yw,GamepadIcon:gw,GanttChart:Gs,GanttChartIcon:Gs,GanttChartSquare:Lr,GanttChartSquareIcon:Lr,Gauge:mw,GaugeCircle:uc,GaugeCircleIcon:uc,GaugeIcon:mw,Gavel:kw,GavelIcon:kw,Gem:vw,GemIcon:vw,GeorgianLari:xw,GeorgianLariIcon:xw,Ghost:Mw,GhostIcon:Mw,Gift:ww,GiftIcon:ww,GitBranch:Cw,GitBranchIcon:Cw,GitBranchMinus:bw,GitBranchMinusIcon:bw,GitBranchPlus:_w,GitBranchPlusIcon:_w,GitCommit:hl,GitCommitHorizontal:hl,GitCommitHorizontalIcon:hl,GitCommitIcon:hl,GitCommitVertical:Sw,GitCommitVerticalIcon:Sw,GitCompare:Nw,GitCompareArrows:Lw,GitCompareArrowsIcon:Lw,GitCompareIcon:Nw,GitFork:Iw,GitForkIcon:Iw,GitGraph:Aw,GitGraphIcon:Aw,GitMerge:Ew,GitMergeIcon:Ew,GitPullRequest:Tw,GitPullRequestArrow:jw,GitPullRequestArrowIcon:jw,GitPullRequestClosed:$w,GitPullRequestClosedIcon:$w,GitPullRequestCreate:zw,GitPullRequestCreateArrow:Pw,GitPullRequestCreateArrowIcon:Pw,GitPullRequestCreateIcon:zw,GitPullRequestDraft:Rw,GitPullRequestDraftIcon:Rw,GitPullRequestIcon:Tw,Github:Dw,GithubIcon:Dw,Gitlab:Hw,GitlabIcon:Hw,GlassWater:Ow,GlassWaterIcon:Ow,Glasses:Fw,GlassesIcon:Fw,Globe:Bw,Globe2:$c,Globe2Icon:$c,GlobeIcon:Bw,GlobeLock:qw,GlobeLockIcon:qw,GlobeX:Vw,GlobeXIcon:Vw,Goal:Uw,GoalIcon:Uw,Gpu:Ww,GpuIcon:Ww,Grab:gl,GrabIcon:gl,GraduationCap:Gw,GraduationCapIcon:Gw,Grape:Kw,GrapeIcon:Kw,Grid:_r,Grid2X2:ml,Grid2X2Check:fl,Grid2X2CheckIcon:fl,Grid2X2Icon:ml,Grid2X2Plus:pl,Grid2X2PlusIcon:pl,Grid2X2X:yl,Grid2X2XIcon:yl,Grid2x2:ml,Grid2x2Check:fl,Grid2x2CheckIcon:fl,Grid2x2Icon:ml,Grid2x2Plus:pl,Grid2x2PlusIcon:pl,Grid2x2X:yl,Grid2x2XIcon:yl,Grid3X3:_r,Grid3X3Icon:_r,Grid3x2:Xw,Grid3x2Icon:Xw,Grid3x3:_r,Grid3x3Icon:_r,GridIcon:_r,Grip:Yw,GripHorizontal:Zw,GripHorizontalIcon:Zw,GripIcon:Yw,GripVertical:Qw,GripVerticalIcon:Qw,Group:Jw,GroupIcon:Jw,Guitar:e7,GuitarIcon:e7,Ham:t7,HamIcon:t7,Hamburger:n7,HamburgerIcon:n7,Hammer:o7,HammerIcon:o7,Hand:ch,HandCoins:r7,HandCoinsIcon:r7,HandFist:i7,HandFistIcon:i7,HandGrab:gl,HandGrabIcon:gl,HandHeart:a7,HandHeartIcon:a7,HandHelping:kl,HandHelpingIcon:kl,HandIcon:ch,HandMetal:s7,HandMetalIcon:s7,HandPlatter:c7,HandPlatterIcon:c7,Handbag:l7,HandbagIcon:l7,Handshake:d7,HandshakeIcon:d7,HardDrive:f7,HardDriveDownload:u7,HardDriveDownloadIcon:u7,HardDriveIcon:f7,HardDriveUpload:h7,HardDriveUploadIcon:h7,HardHat:p7,HardHatIcon:p7,Hash:y7,HashIcon:y7,HatGlasses:m7,HatGlassesIcon:m7,Haze:g7,HazeIcon:g7,Hd:k7,HdIcon:k7,HdmiPort:v7,HdmiPortIcon:v7,Heading:S7,Heading1:x7,Heading1Icon:x7,Heading2:w7,Heading2Icon:w7,Heading3:M7,Heading3Icon:M7,Heading4:b7,Heading4Icon:b7,Heading5:_7,Heading5Icon:_7,Heading6:C7,Heading6Icon:C7,HeadingIcon:S7,HeadphoneOff:L7,HeadphoneOffIcon:L7,Headphones:N7,HeadphonesIcon:N7,Headset:I7,HeadsetIcon:I7,Heart:R7,HeartCrack:A7,HeartCrackIcon:A7,HeartHandshake:j7,HeartHandshakeIcon:j7,HeartIcon:R7,HeartMinus:E7,HeartMinusIcon:E7,HeartOff:$7,HeartOffIcon:$7,HeartPlus:P7,HeartPlusIcon:P7,HeartPulse:z7,HeartPulseIcon:z7,Heater:T7,HeaterIcon:T7,Helicopter:D7,HelicopterIcon:D7,HelpCircle:qo,HelpCircleIcon:qo,HelpingHand:kl,HelpingHandIcon:kl,Hexagon:lh,HexagonIcon:lh,Highlighter:H7,HighlighterIcon:H7,History:O7,HistoryIcon:O7,Home:vl,HomeIcon:vl,Hop:F7,HopIcon:F7,HopOff:q7,HopOffIcon:q7,Hospital:V7,HospitalIcon:V7,Hotel:B7,HotelIcon:B7,Hourglass:U7,HourglassIcon:U7,House:vl,HouseHeart:W7,HouseHeartIcon:W7,HouseIcon:vl,HousePlug:G7,HousePlugIcon:G7,HousePlus:K7,HousePlusIcon:K7,HouseWifi:X7,HouseWifiIcon:X7,IceCream:wl,IceCream2:xl,IceCream2Icon:xl,IceCreamBowl:xl,IceCreamBowlIcon:xl,IceCreamCone:wl,IceCreamConeIcon:wl,IceCreamIcon:wl,Icon:qY,IdCard:Y7,IdCardIcon:Y7,IdCardLanyard:Z7,IdCardLanyardIcon:Z7,Image:uh,ImageDown:Q7,ImageDownIcon:Q7,ImageIcon:uh,ImageMinus:eM,ImageMinusIcon:eM,ImageOff:J7,ImageOffIcon:J7,ImagePlay:tM,ImagePlayIcon:tM,ImagePlus:dh,ImagePlusIcon:dh,ImageUp:nM,ImageUpIcon:nM,ImageUpscale:oM,ImageUpscaleIcon:oM,Images:rM,ImagesIcon:rM,Import:iM,ImportIcon:iM,Inbox:aM,InboxIcon:aM,Indent:Sr,IndentDecrease:Cr,IndentDecreaseIcon:Cr,IndentIcon:Sr,IndentIncrease:Sr,IndentIncreaseIcon:Sr,IndianRupee:sM,IndianRupeeIcon:sM,Infinity:lM,InfinityIcon:lM,Info:cM,InfoIcon:cM,Inspect:z1,InspectIcon:z1,InspectionPanel:dM,InspectionPanelIcon:dM,Instagram:uM,InstagramIcon:uM,Italic:hM,ItalicIcon:hM,IterationCcw:fM,IterationCcwIcon:fM,IterationCw:pM,IterationCwIcon:pM,JapaneseYen:yM,JapaneseYenIcon:yM,Joystick:mM,JoystickIcon:mM,Kanban:gM,KanbanIcon:gM,KanbanSquare:A1,KanbanSquareDashed:b1,KanbanSquareDashedIcon:b1,KanbanSquareIcon:A1,Kayak:kM,KayakIcon:kM,Key:wM,KeyIcon:wM,KeyRound:vM,KeyRoundIcon:vM,KeySquare:xM,KeySquareIcon:xM,Keyboard:_M,KeyboardIcon:_M,KeyboardMusic:MM,KeyboardMusicIcon:MM,KeyboardOff:bM,KeyboardOffIcon:bM,Lamp:AM,LampCeiling:CM,LampCeilingIcon:CM,LampDesk:SM,LampDeskIcon:SM,LampFloor:LM,LampFloorIcon:LM,LampIcon:AM,LampWallDown:NM,LampWallDownIcon:NM,LampWallUp:IM,LampWallUpIcon:IM,LandPlot:EM,LandPlotIcon:EM,Landmark:jM,LandmarkIcon:jM,Languages:$M,LanguagesIcon:$M,Laptop:RM,Laptop2:Ml,Laptop2Icon:Ml,LaptopIcon:RM,LaptopMinimal:Ml,LaptopMinimalCheck:PM,LaptopMinimalCheckIcon:PM,LaptopMinimalIcon:Ml,Lasso:TM,LassoIcon:TM,LassoSelect:zM,LassoSelectIcon:zM,Laugh:DM,LaughIcon:DM,Layers:Ci,Layers2:HM,Layers2Icon:HM,Layers3:Ci,Layers3Icon:Ci,LayersIcon:Ci,LayersPlus:OM,LayersPlusIcon:OM,Layout:Fl,LayoutDashboard:hh,LayoutDashboardIcon:hh,LayoutGrid:FM,LayoutGridIcon:FM,LayoutIcon:Fl,LayoutList:qM,LayoutListIcon:qM,LayoutPanelLeft:VM,LayoutPanelLeftIcon:VM,LayoutPanelTop:UM,LayoutPanelTopIcon:UM,LayoutTemplate:BM,LayoutTemplateIcon:BM,Leaf:WM,LeafIcon:WM,LeafyGreen:GM,LeafyGreenIcon:GM,Lectern:KM,LecternIcon:KM,LetterText:td,LetterTextIcon:td,Library:ZM,LibraryBig:XM,LibraryBigIcon:XM,LibraryIcon:ZM,LibrarySquare:E1,LibrarySquareIcon:E1,LifeBuoy:YM,LifeBuoyIcon:YM,Ligature:QM,LigatureIcon:QM,Lightbulb:eb,LightbulbIcon:eb,LightbulbOff:JM,LightbulbOffIcon:JM,LineChart:Bs,LineChartIcon:Bs,LineSquiggle:tb,LineSquiggleIcon:tb,Link:ob,Link2:$a,Link2Icon:$a,Link2Off:nb,Link2OffIcon:nb,LinkIcon:ob,Linkedin:rb,LinkedinIcon:rb,List:bb,ListCheck:ib,ListCheckIcon:ib,ListChecks:ab,ListChecksIcon:ab,ListChevronsDownUp:sb,ListChevronsDownUpIcon:sb,ListChevronsUpDown:lb,ListChevronsUpDownIcon:lb,ListCollapse:cb,ListCollapseIcon:cb,ListEnd:db,ListEndIcon:db,ListFilter:hb,ListFilterIcon:hb,ListFilterPlus:ub,ListFilterPlusIcon:ub,ListIcon:bb,ListIndentDecrease:Cr,ListIndentDecreaseIcon:Cr,ListIndentIncrease:Sr,ListIndentIncreaseIcon:Sr,ListMinus:fb,ListMinusIcon:fb,ListMusic:pb,ListMusicIcon:pb,ListOrdered:yb,ListOrderedIcon:yb,ListPlus:mb,ListPlusIcon:mb,ListRestart:gb,ListRestartIcon:gb,ListStart:kb,ListStartIcon:kb,ListTodo:vb,ListTodoIcon:vb,ListTree:xb,ListTreeIcon:xb,ListVideo:wb,ListVideoIcon:wb,ListX:Mb,ListXIcon:Mb,Loader:Cb,Loader2:qn,Loader2Icon:qn,LoaderCircle:qn,LoaderCircleIcon:qn,LoaderIcon:Cb,LoaderPinwheel:_b,LoaderPinwheelIcon:_b,Locate:Nb,LocateFixed:Sb,LocateFixedIcon:Sb,LocateIcon:Nb,LocateOff:Lb,LocateOffIcon:Lb,LocationEdit:Sl,LocationEditIcon:Sl,Lock:Ab,LockIcon:Ab,LockKeyhole:Ib,LockKeyholeIcon:Ib,LockKeyholeOpen:bl,LockKeyholeOpenIcon:bl,LockOpen:_l,LockOpenIcon:_l,LogIn:Eb,LogInIcon:Eb,LogOut:jb,LogOutIcon:jb,Logs:$b,LogsIcon:$b,Lollipop:Pb,LollipopIcon:Pb,LucideAArrowDown:uy,LucideAArrowUp:hy,LucideALargeSmall:fy,LucideAccessibility:py,LucideActivity:yy,LucideActivitySquare:t1,LucideAirVent:my,LucideAirplay:gy,LucideAlarmCheck:xs,LucideAlarmClock:vy,LucideAlarmClockCheck:xs,LucideAlarmClockMinus:ws,LucideAlarmClockOff:ky,LucideAlarmClockPlus:Ms,LucideAlarmMinus:ws,LucideAlarmPlus:Ms,LucideAlarmSmoke:xy,LucideAlbum:wy,LucideAlertCircle:ha,LucideAlertOctagon:Al,LucideAlertTriangle:jr,LucideAlignCenter:ya,LucideAlignCenterHorizontal:by,LucideAlignCenterVertical:My,LucideAlignEndHorizontal:_y,LucideAlignEndVertical:Cy,LucideAlignHorizontalDistributeCenter:Sy,LucideAlignHorizontalDistributeEnd:Ly,LucideAlignHorizontalDistributeStart:Ny,LucideAlignHorizontalJustifyCenter:Iy,LucideAlignHorizontalJustifyEnd:Ey,LucideAlignHorizontalJustifyStart:Ay,LucideAlignHorizontalSpaceAround:jy,LucideAlignHorizontalSpaceBetween:$y,LucideAlignJustify:ed,LucideAlignLeft:Vo,LucideAlignRight:ma,LucideAlignStartHorizontal:Py,LucideAlignStartVertical:zy,LucideAlignVerticalDistributeCenter:Ry,LucideAlignVerticalDistributeEnd:Ty,LucideAlignVerticalDistributeStart:Dy,LucideAlignVerticalJustifyCenter:Hy,LucideAlignVerticalJustifyEnd:Oy,LucideAlignVerticalJustifyStart:Fy,LucideAlignVerticalSpaceAround:qy,LucideAlignVerticalSpaceBetween:Vy,LucideAmbulance:By,LucideAmpersand:Uy,LucideAmpersands:Wy,LucideAmphora:Gy,LucideAnchor:Ky,LucideAngry:Xy,LucideAnnoyed:Zy,LucideAntenna:Yy,LucideAnvil:Qy,LucideAperture:Jy,LucideAppWindow:tm,LucideAppWindowMac:em,LucideApple:nm,LucideArchive:im,LucideArchiveRestore:om,LucideArchiveX:rm,LucideAreaChart:Ts,LucideArmchair:am,LucideArrowBigDown:cm,LucideArrowBigDownDash:sm,LucideArrowBigLeft:dm,LucideArrowBigLeftDash:lm,LucideArrowBigRight:hm,LucideArrowBigRightDash:um,LucideArrowBigUp:pm,LucideArrowBigUpDash:fm,LucideArrowDown:_m,LucideArrowDown01:ym,LucideArrowDown10:mm,LucideArrowDownAZ:bs,LucideArrowDownAz:bs,LucideArrowDownCircle:Ys,LucideArrowDownFromLine:gm,LucideArrowDownLeft:vm,LucideArrowDownLeftFromCircle:Qs,LucideArrowDownLeftFromSquare:a1,LucideArrowDownLeftSquare:n1,LucideArrowDownNarrowWide:km,LucideArrowDownRight:wm,LucideArrowDownRightFromCircle:ec,LucideArrowDownRightFromSquare:s1,LucideArrowDownRightSquare:o1,LucideArrowDownSquare:r1,LucideArrowDownToDot:xm,LucideArrowDownToLine:Mm,LucideArrowDownUp:bm,LucideArrowDownWideNarrow:_s,LucideArrowDownZA:Cs,LucideArrowDownZa:Cs,LucideArrowLeft:Lm,LucideArrowLeftCircle:Js,LucideArrowLeftFromLine:Cm,LucideArrowLeftRight:J2,LucideArrowLeftSquare:i1,LucideArrowLeftToLine:Sm,LucideArrowRight:i0,LucideArrowRightCircle:oc,LucideArrowRightFromLine:Nm,LucideArrowRightLeft:Im,LucideArrowRightSquare:d1,LucideArrowRightToLine:Am,LucideArrowUp:Om,LucideArrowUp01:Em,LucideArrowUp10:jm,LucideArrowUpAZ:Ss,LucideArrowUpAz:Ss,LucideArrowUpCircle:rc,LucideArrowUpDown:$m,LucideArrowUpFromDot:Pm,LucideArrowUpFromLine:zm,LucideArrowUpLeft:Rm,LucideArrowUpLeftFromCircle:tc,LucideArrowUpLeftFromSquare:c1,LucideArrowUpLeftSquare:u1,LucideArrowUpNarrowWide:Ls,LucideArrowUpRight:Dm,LucideArrowUpRightFromCircle:nc,LucideArrowUpRightFromSquare:l1,LucideArrowUpRightSquare:p1,LucideArrowUpSquare:h1,LucideArrowUpToLine:Tm,LucideArrowUpWideNarrow:Hm,LucideArrowUpZA:Ns,LucideArrowUpZa:Ns,LucideArrowsUpFromLine:Fm,LucideAsterisk:qm,LucideAsteriskSquare:f1,LucideAtSign:Vm,LucideAtom:Bm,LucideAudioLines:Um,LucideAudioWaveform:Gm,LucideAward:Wm,LucideAxe:Km,LucideAxis3D:Is,LucideAxis3d:Is,LucideBaby:Xm,LucideBackpack:Zm,LucideBadge:hg,LucideBadgeAlert:Qm,LucideBadgeCent:Ym,LucideBadgeCheck:As,LucideBadgeDollarSign:Jm,LucideBadgeEuro:tg,LucideBadgeHelp:Es,LucideBadgeIndianRupee:eg,LucideBadgeInfo:ng,LucideBadgeJapaneseYen:og,LucideBadgeMinus:rg,LucideBadgePercent:ig,LucideBadgePlus:ag,LucideBadgePoundSterling:sg,LucideBadgeQuestionMark:Es,LucideBadgeRussianRuble:cg,LucideBadgeSwissFranc:lg,LucideBadgeTurkishLira:dg,LucideBadgeX:ug,LucideBaggageClaim:fg,LucideBalloon:pg,LucideBan:eh,LucideBanana:yg,LucideBandage:mg,LucideBanknote:xg,LucideBanknoteArrowDown:gg,LucideBanknoteArrowUp:kg,LucideBanknoteX:vg,LucideBarChart:Us,LucideBarChart2:Ws,LucideBarChart3:Vs,LucideBarChart4:qs,LucideBarChartBig:Fs,LucideBarChartHorizontal:Hs,LucideBarChartHorizontalBig:Ds,LucideBarcode:wg,LucideBarrel:Mg,LucideBaseline:bg,LucideBath:_g,LucideBattery:Eg,LucideBatteryCharging:Cg,LucideBatteryFull:Sg,LucideBatteryLow:Lg,LucideBatteryMedium:Ng,LucideBatteryPlus:Ig,LucideBatteryWarning:Ag,LucideBeaker:jg,LucideBean:Pg,LucideBeanOff:$g,LucideBed:Tg,LucideBedDouble:zg,LucideBedSingle:Rg,LucideBeef:Dg,LucideBeer:Og,LucideBeerOff:Hg,LucideBell:Gg,LucideBellDot:Fg,LucideBellElectric:qg,LucideBellMinus:Vg,LucideBellOff:Bg,LucideBellPlus:Ug,LucideBellRing:Wg,LucideBetweenHorizonalEnd:js,LucideBetweenHorizonalStart:$s,LucideBetweenHorizontalEnd:js,LucideBetweenHorizontalStart:$s,LucideBetweenVerticalEnd:Kg,LucideBetweenVerticalStart:Xg,LucideBicepsFlexed:Zg,LucideBike:Yg,LucideBinary:Qg,LucideBinoculars:Jg,LucideBiohazard:ek,LucideBird:tk,LucideBirdhouse:nk,LucideBitcoin:ok,LucideBlend:rk,LucideBlinds:ik,LucideBlocks:ak,LucideBluetooth:dk,LucideBluetoothConnected:sk,LucideBluetoothOff:ck,LucideBluetoothSearching:lk,LucideBold:uk,LucideBolt:hk,LucideBomb:fk,LucideBone:pk,LucideBook:Hk,LucideBookA:yk,LucideBookAlert:mk,LucideBookAudio:gk,LucideBookCheck:kk,LucideBookCopy:vk,LucideBookDashed:Ps,LucideBookDown:xk,LucideBookHeadphones:wk,LucideBookHeart:Mk,LucideBookImage:bk,LucideBookKey:_k,LucideBookLock:Ck,LucideBookMarked:Sk,LucideBookMinus:Lk,LucideBookOpen:Ak,LucideBookOpenCheck:Nk,LucideBookOpenText:Ik,LucideBookPlus:Ek,LucideBookSearch:jk,LucideBookTemplate:Ps,LucideBookText:$k,LucideBookType:Pk,LucideBookUp:Rk,LucideBookUp2:zk,LucideBookUser:Tk,LucideBookX:Dk,LucideBookmark:Bk,LucideBookmarkCheck:Ok,LucideBookmarkMinus:Fk,LucideBookmarkPlus:qk,LucideBookmarkX:Vk,LucideBoomBox:Uk,LucideBot:Gk,LucideBotMessageSquare:Wk,LucideBotOff:Kk,LucideBottleWine:Xk,LucideBowArrow:Zk,LucideBox:Yk,LucideBoxSelect:C1,LucideBoxes:Qk,LucideBraces:zs,LucideBrackets:Jk,LucideBrain:n4,LucideBrainCircuit:e4,LucideBrainCog:t4,LucideBrickWall:i4,LucideBrickWallFire:o4,LucideBrickWallShield:r4,LucideBriefcase:l4,LucideBriefcaseBusiness:a4,LucideBriefcaseConveyorBelt:s4,LucideBriefcaseMedical:c4,LucideBringToFront:d4,LucideBrush:f4,LucideBrushCleaning:u4,LucideBubbles:h4,LucideBug:m4,LucideBugOff:p4,LucideBugPlay:y4,LucideBuilding:g4,LucideBuilding2:k4,LucideBus:x4,LucideBusFront:v4,LucideCable:M4,LucideCableCar:w4,LucideCake:_4,LucideCakeSlice:b4,LucideCalculator:C4,LucideCalendar:W4,LucideCalendar1:S4,LucideCalendarArrowDown:L4,LucideCalendarArrowUp:N4,LucideCalendarCheck:A4,LucideCalendarCheck2:I4,LucideCalendarClock:E4,LucideCalendarCog:j4,LucideCalendarDays:$4,LucideCalendarFold:P4,LucideCalendarHeart:z4,LucideCalendarMinus:T4,LucideCalendarMinus2:R4,LucideCalendarOff:D4,LucideCalendarPlus:F4,LucideCalendarPlus2:H4,LucideCalendarRange:O4,LucideCalendarSearch:q4,LucideCalendarSync:V4,LucideCalendarX:U4,LucideCalendarX2:B4,LucideCalendars:G4,LucideCamera:X4,LucideCameraOff:K4,LucideCandlestickChart:Os,LucideCandy:Q4,LucideCandyCane:Z4,LucideCandyOff:Y4,LucideCannabis:e5,LucideCannabisOff:J4,LucideCaptions:Rs,LucideCaptionsOff:t5,LucideCar:r5,LucideCarFront:n5,LucideCarTaxiFront:o5,LucideCaravan:i5,LucideCardSim:a5,LucideCarrot:s5,LucideCaseLower:c5,LucideCaseSensitive:l5,LucideCaseUpper:d5,LucideCassetteTape:u5,LucideCast:h5,LucideCastle:f5,LucideCat:p5,LucideCctv:y5,LucideChartArea:Ts,LucideChartBar:Hs,LucideChartBarBig:Ds,LucideChartBarDecreasing:m5,LucideChartBarIncreasing:g5,LucideChartBarStacked:k5,LucideChartCandlestick:Os,LucideChartColumn:Vs,LucideChartColumnBig:Fs,LucideChartColumnDecreasing:v5,LucideChartColumnIncreasing:qs,LucideChartColumnStacked:x5,LucideChartGantt:w5,LucideChartLine:Bs,LucideChartNetwork:M5,LucideChartNoAxesColumn:Ws,LucideChartNoAxesColumnDecreasing:b5,LucideChartNoAxesColumnIncreasing:Us,LucideChartNoAxesCombined:_5,LucideChartNoAxesGantt:Gs,LucideChartPie:Ks,LucideChartScatter:Xs,LucideChartSpline:C5,LucideCheck:ja,LucideCheckCheck:S5,LucideCheckCircle:ic,LucideCheckCircle2:fa,LucideCheckLine:L5,LucideCheckSquare:m1,LucideCheckSquare2:g1,LucideChefHat:N5,LucideCherry:I5,LucideChessBishop:A5,LucideChessKing:E5,LucideChessKnight:j5,LucideChessPawn:$5,LucideChessQueen:P5,LucideChessRook:R5,LucideChevronDown:z5,LucideChevronDownCircle:ac,LucideChevronDownSquare:k1,LucideChevronFirst:T5,LucideChevronLast:D5,LucideChevronLeft:H5,LucideChevronLeftCircle:sc,LucideChevronLeftSquare:v1,LucideChevronRight:O5,LucideChevronRightCircle:cc,LucideChevronRightSquare:w1,LucideChevronUp:F5,LucideChevronUpCircle:lc,LucideChevronUpSquare:x1,LucideChevronsDown:V5,LucideChevronsDownUp:q5,LucideChevronsLeft:W5,LucideChevronsLeftRight:U5,LucideChevronsLeftRightEllipsis:B5,LucideChevronsRight:K5,LucideChevronsRightLeft:G5,LucideChevronsUp:Z5,LucideChevronsUpDown:X5,LucideChrome:Zs,LucideChromium:Zs,LucideChurch:Y5,LucideCigarette:J5,LucideCigaretteOff:Q5,LucideCircle:th,LucideCircleAlert:ha,LucideCircleArrowDown:Ys,LucideCircleArrowLeft:Js,LucideCircleArrowOutDownLeft:Qs,LucideCircleArrowOutDownRight:ec,LucideCircleArrowOutUpLeft:tc,LucideCircleArrowOutUpRight:nc,LucideCircleArrowRight:oc,LucideCircleArrowUp:rc,LucideCircleCheck:fa,LucideCircleCheckBig:ic,LucideCircleChevronDown:ac,LucideCircleChevronLeft:sc,LucideCircleChevronRight:cc,LucideCircleChevronUp:lc,LucideCircleDashed:ev,LucideCircleDivide:dc,LucideCircleDollarSign:tv,LucideCircleDot:ov,LucideCircleDotDashed:nv,LucideCircleEllipsis:rv,LucideCircleEqual:iv,LucideCircleFadingArrowUp:av,LucideCircleFadingPlus:sv,LucideCircleGauge:uc,LucideCircleHelp:qo,LucideCircleMinus:hc,LucideCircleOff:cv,LucideCircleParking:pc,LucideCircleParkingOff:fc,LucideCirclePause:yc,LucideCirclePercent:mc,LucideCirclePile:lv,LucideCirclePlay:gc,LucideCirclePlus:kc,LucideCirclePoundSterling:dv,LucideCirclePower:vc,LucideCircleQuestionMark:qo,LucideCircleSlash:uv,LucideCircleSlash2:xc,LucideCircleSlashed:xc,LucideCircleSmall:hv,LucideCircleStar:fv,LucideCircleStop:Mc,LucideCircleUser:bc,LucideCircleUserRound:wc,LucideCircleX:_c,LucideCircuitBoard:pv,LucideCitrus:yv,LucideClapperboard:mv,LucideClipboard:Sv,LucideClipboardCheck:gv,LucideClipboardClock:kv,LucideClipboardCopy:vv,LucideClipboardEdit:Sc,LucideClipboardList:xv,LucideClipboardMinus:wv,LucideClipboardPaste:Mv,LucideClipboardPen:Sc,LucideClipboardPenLine:Cc,LucideClipboardPlus:bv,LucideClipboardSignature:Cc,LucideClipboardType:_v,LucideClipboardX:Cv,LucideClock:Uv,LucideClock1:Lv,LucideClock10:Nv,LucideClock11:Iv,LucideClock12:Av,LucideClock2:Ev,LucideClock3:jv,LucideClock4:$v,LucideClock5:Pv,LucideClock6:zv,LucideClock7:Rv,LucideClock8:Tv,LucideClock9:Dv,LucideClockAlert:Hv,LucideClockArrowDown:Ov,LucideClockArrowUp:Vv,LucideClockCheck:Fv,LucideClockFading:qv,LucideClockPlus:Bv,LucideClosedCaption:Wv,LucideCloud:nh,LucideCloudAlert:Gv,LucideCloudBackup:Kv,LucideCloudCheck:Xv,LucideCloudCog:Zv,LucideCloudDownload:Lc,LucideCloudDrizzle:Yv,LucideCloudFog:Qv,LucideCloudHail:Jv,LucideCloudLightning:ex,LucideCloudMoon:nx,LucideCloudMoonRain:tx,LucideCloudOff:ox,LucideCloudRain:ix,LucideCloudRainWind:rx,LucideCloudSnow:ax,LucideCloudSun:cx,LucideCloudSunRain:sx,LucideCloudSync:lx,LucideCloudUpload:Nc,LucideCloudy:dx,LucideClover:ux,LucideClub:hx,LucideCode:fx,LucideCode2:Ic,LucideCodeSquare:M1,LucideCodeXml:Ic,LucideCodepen:px,LucideCodesandbox:yx,LucideCoffee:mx,LucideCog:gx,LucideCoins:kx,LucideColumns:Ac,LucideColumns2:Ac,LucideColumns3:pa,LucideColumns3Cog:Mr,LucideColumns4:vx,LucideColumnsSettings:Mr,LucideCombine:xx,LucideCommand:wx,LucideCompass:Mx,LucideComponent:bx,LucideComputer:_x,LucideConciergeBell:Cx,LucideCone:Sx,LucideConstruction:Lx,LucideContact:Nx,LucideContact2:Ec,LucideContactRound:Ec,LucideContainer:Ix,LucideContrast:Ax,LucideCookie:Ex,LucideCookingPot:jx,LucideCopy:Dx,LucideCopyCheck:$x,LucideCopyMinus:Px,LucideCopyPlus:zx,LucideCopySlash:Rx,LucideCopyX:Tx,LucideCopyleft:Ox,LucideCopyright:Hx,LucideCornerDownLeft:Fx,LucideCornerDownRight:qx,LucideCornerLeftDown:Vx,LucideCornerLeftUp:Bx,LucideCornerRightDown:Wx,LucideCornerRightUp:Ux,LucideCornerUpLeft:Kx,LucideCornerUpRight:Gx,LucideCpu:Xx,LucideCreativeCommons:Zx,LucideCreditCard:Yx,LucideCroissant:Qx,LucideCrop:Jx,LucideCross:e3,LucideCrosshair:t3,LucideCrown:n3,LucideCuboid:o3,LucideCupSoda:r3,LucideCurlyBraces:zs,LucideCurrency:i3,LucideCylinder:a3,LucideDam:s3,LucideDatabase:oh,LucideDatabaseBackup:c3,LucideDatabaseSearch:l3,LucideDatabaseZap:d3,LucideDecimalsArrowLeft:u3,LucideDecimalsArrowRight:h3,LucideDelete:f3,LucideDessert:p3,LucideDiameter:y3,LucideDiamond:rh,LucideDiamondMinus:m3,LucideDiamondPercent:jc,LucideDiamondPlus:g3,LucideDice1:k3,LucideDice2:x3,LucideDice3:v3,LucideDice4:w3,LucideDice5:M3,LucideDice6:b3,LucideDices:_3,LucideDiff:C3,LucideDisc:I3,LucideDisc2:S3,LucideDisc3:N3,LucideDiscAlbum:L3,LucideDivide:A3,LucideDivideCircle:dc,LucideDivideSquare:S1,LucideDna:j3,LucideDnaOff:E3,LucideDock:$3,LucideDog:P3,LucideDollarSign:z3,LucideDonut:R3,LucideDoorClosed:D3,LucideDoorClosedLocked:T3,LucideDoorOpen:H3,LucideDot:O3,LucideDotSquare:L1,LucideDownload:a0,LucideDownloadCloud:Lc,LucideDraftingCompass:F3,LucideDrama:q3,LucideDribbble:V3,LucideDrill:B3,LucideDrone:U3,LucideDroplet:G3,LucideDropletOff:W3,LucideDroplets:K3,LucideDrum:X3,LucideDrumstick:Z3,LucideDumbbell:Y3,LucideEar:Q3,LucideEarOff:J3,LucideEarth:$c,LucideEarthLock:e8,LucideEclipse:t8,LucideEdit:no,LucideEdit2:Vl,LucideEdit3:ql,LucideEgg:r8,LucideEggFried:n8,LucideEggOff:o8,LucideEllipsis:zc,LucideEllipsisVertical:Pc,LucideEqual:s8,LucideEqualApproximately:i8,LucideEqualNot:a8,LucideEqualSquare:N1,LucideEraser:c8,LucideEthernetPort:l8,LucideEuro:d8,LucideEvCharger:u8,LucideExpand:h8,LucideExternalLink:ih,LucideEye:y8,LucideEyeClosed:f8,LucideEyeOff:p8,LucideFacebook:m8,LucideFactory:g8,LucideFan:v8,LucideFastForward:k8,LucideFeather:x8,LucideFence:w8,LucideFerrisWheel:M8,LucideFigma:b8,LucideFile:Y8,LucideFileArchive:_8,LucideFileAudio:br,LucideFileAudio2:br,LucideFileAxis3D:Rc,LucideFileAxis3d:Rc,LucideFileBadge:Tc,LucideFileBadge2:Tc,LucideFileBarChart:Oc,LucideFileBarChart2:Fc,LucideFileBox:C8,LucideFileBraces:Hc,LucideFileBracesCorner:Dc,LucideFileChartColumn:Fc,LucideFileChartColumnIncreasing:Oc,LucideFileChartLine:qc,LucideFileChartPie:Vc,LucideFileCheck:S8,LucideFileCheck2:Bc,LucideFileCheckCorner:Bc,LucideFileClock:N8,LucideFileCode:L8,LucideFileCode2:Uc,LucideFileCodeCorner:Uc,LucideFileCog:Wc,LucideFileCog2:Wc,LucideFileDiff:I8,LucideFileDigit:A8,LucideFileDown:ah,LucideFileEdit:Qc,LucideFileExclamationPoint:Gc,LucideFileHeadphone:br,LucideFileHeart:E8,LucideFileImage:j8,LucideFileInput:$8,LucideFileJson:Hc,LucideFileJson2:Dc,LucideFileKey:Kc,LucideFileKey2:Kc,LucideFileLineChart:qc,LucideFileLock:Xc,LucideFileLock2:Xc,LucideFileMinus:P8,LucideFileMinus2:Zc,LucideFileMinusCorner:Zc,LucideFileMusic:R8,LucideFileOutput:z8,LucideFilePen:Qc,LucideFilePenLine:Yc,LucideFilePieChart:Vc,LucideFilePlay:Jc,LucideFilePlus:T8,LucideFilePlus2:el,LucideFilePlusCorner:el,LucideFileQuestion:tl,LucideFileQuestionMark:tl,LucideFileScan:D8,LucideFileSearch:H8,LucideFileSearch2:nl,LucideFileSearchCorner:nl,LucideFileSignal:ol,LucideFileSignature:Yc,LucideFileSliders:O8,LucideFileSpreadsheet:F8,LucideFileStack:q8,LucideFileSymlink:V8,LucideFileTerminal:B8,LucideFileText:U8,LucideFileType:W8,LucideFileType2:rl,LucideFileTypeCorner:rl,LucideFileUp:G8,LucideFileUser:K8,LucideFileVideo:Jc,LucideFileVideo2:il,LucideFileVideoCamera:il,LucideFileVolume:X8,LucideFileVolume2:ol,LucideFileWarning:Gc,LucideFileX:Z8,LucideFileX2:al,LucideFileXCorner:al,LucideFiles:Q8,LucideFilm:J8,LucideFilter:ul,LucideFilterX:dl,LucideFingerprint:sl,LucideFingerprintPattern:sl,LucideFireExtinguisher:e6,LucideFish:o6,LucideFishOff:t6,LucideFishSymbol:n6,LucideFishingHook:r6,LucideFlag:c6,LucideFlagOff:i6,LucideFlagTriangleLeft:a6,LucideFlagTriangleRight:s6,LucideFlame:d6,LucideFlameKindling:l6,LucideFlashlight:h6,LucideFlashlightOff:u6,LucideFlaskConical:y6,LucideFlaskConicalOff:f6,LucideFlaskRound:p6,LucideFlipHorizontal:g6,LucideFlipHorizontal2:m6,LucideFlipVertical:v6,LucideFlipVertical2:k6,LucideFlower:w6,LucideFlower2:x6,LucideFocus:M6,LucideFoldHorizontal:b6,LucideFoldVertical:_6,LucideFolder:Y6,LucideFolderArchive:C6,LucideFolderCheck:S6,LucideFolderClock:L6,LucideFolderClosed:I6,LucideFolderCode:N6,LucideFolderCog:cl,LucideFolderCog2:cl,LucideFolderDot:A6,LucideFolderDown:E6,LucideFolderEdit:ll,LucideFolderGit:$6,LucideFolderGit2:j6,LucideFolderHeart:P6,LucideFolderInput:z6,LucideFolderKanban:R6,LucideFolderKey:T6,LucideFolderLock:D6,LucideFolderMinus:H6,LucideFolderOpen:sh,LucideFolderOpenDot:O6,LucideFolderOutput:F6,LucideFolderPen:ll,LucideFolderPlus:q6,LucideFolderRoot:V6,LucideFolderSearch:U6,LucideFolderSearch2:B6,LucideFolderSymlink:W6,LucideFolderSync:G6,LucideFolderTree:K6,LucideFolderUp:X6,LucideFolderX:Z6,LucideFolders:Q6,LucideFootprints:J6,LucideForkKnife:md,LucideForkKnifeCrossed:yd,LucideForklift:nw,LucideForm:ew,LucideFormInput:Ul,LucideForward:tw,LucideFrame:ow,LucideFramer:aw,LucideFrown:rw,LucideFuel:iw,LucideFullscreen:sw,LucideFunctionSquare:I1,LucideFunnel:ul,LucideFunnelPlus:cw,LucideFunnelX:dl,LucideGalleryHorizontal:dw,LucideGalleryHorizontalEnd:lw,LucideGalleryThumbnails:uw,LucideGalleryVertical:fw,LucideGalleryVerticalEnd:hw,LucideGamepad:gw,LucideGamepad2:pw,LucideGamepadDirectional:yw,LucideGanttChart:Gs,LucideGanttChartSquare:Lr,LucideGauge:mw,LucideGaugeCircle:uc,LucideGavel:kw,LucideGem:vw,LucideGeorgianLari:xw,LucideGhost:Mw,LucideGift:ww,LucideGitBranch:Cw,LucideGitBranchMinus:bw,LucideGitBranchPlus:_w,LucideGitCommit:hl,LucideGitCommitHorizontal:hl,LucideGitCommitVertical:Sw,LucideGitCompare:Nw,LucideGitCompareArrows:Lw,LucideGitFork:Iw,LucideGitGraph:Aw,LucideGitMerge:Ew,LucideGitPullRequest:Tw,LucideGitPullRequestArrow:jw,LucideGitPullRequestClosed:$w,LucideGitPullRequestCreate:zw,LucideGitPullRequestCreateArrow:Pw,LucideGitPullRequestDraft:Rw,LucideGithub:Dw,LucideGitlab:Hw,LucideGlassWater:Ow,LucideGlasses:Fw,LucideGlobe:Bw,LucideGlobe2:$c,LucideGlobeLock:qw,LucideGlobeX:Vw,LucideGoal:Uw,LucideGpu:Ww,LucideGrab:gl,LucideGraduationCap:Gw,LucideGrape:Kw,LucideGrid:_r,LucideGrid2X2:ml,LucideGrid2X2Check:fl,LucideGrid2X2Plus:pl,LucideGrid2X2X:yl,LucideGrid2x2:ml,LucideGrid2x2Check:fl,LucideGrid2x2Plus:pl,LucideGrid2x2X:yl,LucideGrid3X3:_r,LucideGrid3x2:Xw,LucideGrid3x3:_r,LucideGrip:Yw,LucideGripHorizontal:Zw,LucideGripVertical:Qw,LucideGroup:Jw,LucideGuitar:e7,LucideHam:t7,LucideHamburger:n7,LucideHammer:o7,LucideHand:ch,LucideHandCoins:r7,LucideHandFist:i7,LucideHandGrab:gl,LucideHandHeart:a7,LucideHandHelping:kl,LucideHandMetal:s7,LucideHandPlatter:c7,LucideHandbag:l7,LucideHandshake:d7,LucideHardDrive:f7,LucideHardDriveDownload:u7,LucideHardDriveUpload:h7,LucideHardHat:p7,LucideHash:y7,LucideHatGlasses:m7,LucideHaze:g7,LucideHd:k7,LucideHdmiPort:v7,LucideHeading:S7,LucideHeading1:x7,LucideHeading2:w7,LucideHeading3:M7,LucideHeading4:b7,LucideHeading5:_7,LucideHeading6:C7,LucideHeadphoneOff:L7,LucideHeadphones:N7,LucideHeadset:I7,LucideHeart:R7,LucideHeartCrack:A7,LucideHeartHandshake:j7,LucideHeartMinus:E7,LucideHeartOff:$7,LucideHeartPlus:P7,LucideHeartPulse:z7,LucideHeater:T7,LucideHelicopter:D7,LucideHelpCircle:qo,LucideHelpingHand:kl,LucideHexagon:lh,LucideHighlighter:H7,LucideHistory:O7,LucideHome:vl,LucideHop:F7,LucideHopOff:q7,LucideHospital:V7,LucideHotel:B7,LucideHourglass:U7,LucideHouse:vl,LucideHouseHeart:W7,LucideHousePlug:G7,LucideHousePlus:K7,LucideHouseWifi:X7,LucideIceCream:wl,LucideIceCream2:xl,LucideIceCreamBowl:xl,LucideIceCreamCone:wl,LucideIdCard:Y7,LucideIdCardLanyard:Z7,LucideImage:uh,LucideImageDown:Q7,LucideImageMinus:eM,LucideImageOff:J7,LucideImagePlay:tM,LucideImagePlus:dh,LucideImageUp:nM,LucideImageUpscale:oM,LucideImages:rM,LucideImport:iM,LucideInbox:aM,LucideIndent:Sr,LucideIndentDecrease:Cr,LucideIndentIncrease:Sr,LucideIndianRupee:sM,LucideInfinity:lM,LucideInfo:cM,LucideInspect:z1,LucideInspectionPanel:dM,LucideInstagram:uM,LucideItalic:hM,LucideIterationCcw:fM,LucideIterationCw:pM,LucideJapaneseYen:yM,LucideJoystick:mM,LucideKanban:gM,LucideKanbanSquare:A1,LucideKanbanSquareDashed:b1,LucideKayak:kM,LucideKey:wM,LucideKeyRound:vM,LucideKeySquare:xM,LucideKeyboard:_M,LucideKeyboardMusic:MM,LucideKeyboardOff:bM,LucideLamp:AM,LucideLampCeiling:CM,LucideLampDesk:SM,LucideLampFloor:LM,LucideLampWallDown:NM,LucideLampWallUp:IM,LucideLandPlot:EM,LucideLandmark:jM,LucideLanguages:$M,LucideLaptop:RM,LucideLaptop2:Ml,LucideLaptopMinimal:Ml,LucideLaptopMinimalCheck:PM,LucideLasso:TM,LucideLassoSelect:zM,LucideLaugh:DM,LucideLayers:Ci,LucideLayers2:HM,LucideLayers3:Ci,LucideLayersPlus:OM,LucideLayout:Fl,LucideLayoutDashboard:hh,LucideLayoutGrid:FM,LucideLayoutList:qM,LucideLayoutPanelLeft:VM,LucideLayoutPanelTop:UM,LucideLayoutTemplate:BM,LucideLeaf:WM,LucideLeafyGreen:GM,LucideLectern:KM,LucideLetterText:td,LucideLibrary:ZM,LucideLibraryBig:XM,LucideLibrarySquare:E1,LucideLifeBuoy:YM,LucideLigature:QM,LucideLightbulb:eb,LucideLightbulbOff:JM,LucideLineChart:Bs,LucideLineSquiggle:tb,LucideLink:ob,LucideLink2:$a,LucideLink2Off:nb,LucideLinkedin:rb,LucideList:bb,LucideListCheck:ib,LucideListChecks:ab,LucideListChevronsDownUp:sb,LucideListChevronsUpDown:lb,LucideListCollapse:cb,LucideListEnd:db,LucideListFilter:hb,LucideListFilterPlus:ub,LucideListIndentDecrease:Cr,LucideListIndentIncrease:Sr,LucideListMinus:fb,LucideListMusic:pb,LucideListOrdered:yb,LucideListPlus:mb,LucideListRestart:gb,LucideListStart:kb,LucideListTodo:vb,LucideListTree:xb,LucideListVideo:wb,LucideListX:Mb,LucideLoader:Cb,LucideLoader2:qn,LucideLoaderCircle:qn,LucideLoaderPinwheel:_b,LucideLocate:Nb,LucideLocateFixed:Sb,LucideLocateOff:Lb,LucideLocationEdit:Sl,LucideLock:Ab,LucideLockKeyhole:Ib,LucideLockKeyholeOpen:bl,LucideLockOpen:_l,LucideLogIn:Eb,LucideLogOut:jb,LucideLogs:$b,LucideLollipop:Pb,LucideLuggage:zb,LucideMSquare:j1,LucideMagnet:Rb,LucideMail:Bb,LucideMailCheck:Tb,LucideMailMinus:Db,LucideMailOpen:Hb,LucideMailPlus:Ob,LucideMailQuestion:Cl,LucideMailQuestionMark:Cl,LucideMailSearch:Fb,LucideMailWarning:qb,LucideMailX:Vb,LucideMailbox:Wb,LucideMails:Ub,LucideMap:s9,LucideMapMinus:Gb,LucideMapPin:r9,LucideMapPinCheck:Xb,LucideMapPinCheckInside:Kb,LucideMapPinHouse:Zb,LucideMapPinMinus:Qb,LucideMapPinMinusInside:Yb,LucideMapPinOff:Jb,LucideMapPinPen:Sl,LucideMapPinPlus:t9,LucideMapPinPlusInside:e9,LucideMapPinX:n9,LucideMapPinXInside:o9,LucideMapPinned:i9,LucideMapPlus:a9,LucideMars:l9,LucideMarsStroke:c9,LucideMartini:d9,LucideMaximize:u9,LucideMaximize2:Ld,LucideMedal:h9,LucideMegaphone:p9,LucideMegaphoneOff:f9,LucideMeh:y9,LucideMemoryStick:m9,LucideMenu:k9,LucideMenuSquare:$1,LucideMerge:g9,LucideMessageCircle:N9,LucideMessageCircleCode:v9,LucideMessageCircleDashed:x9,LucideMessageCircleHeart:w9,LucideMessageCircleMore:M9,LucideMessageCircleOff:b9,LucideMessageCirclePlus:_9,LucideMessageCircleQuestion:Ll,LucideMessageCircleQuestionMark:Ll,LucideMessageCircleReply:C9,LucideMessageCircleWarning:S9,LucideMessageCircleX:L9,LucideMessageSquare:B9,LucideMessageSquareCode:I9,LucideMessageSquareDashed:A9,LucideMessageSquareDiff:E9,LucideMessageSquareDot:j9,LucideMessageSquareHeart:$9,LucideMessageSquareLock:P9,LucideMessageSquareMore:z9,LucideMessageSquareOff:R9,LucideMessageSquarePlus:T9,LucideMessageSquareQuote:D9,LucideMessageSquareReply:H9,LucideMessageSquareShare:O9,LucideMessageSquareText:F9,LucideMessageSquareWarning:q9,LucideMessageSquareX:V9,LucideMessagesSquare:U9,LucideMic:G9,LucideMic2:Nl,LucideMicOff:W9,LucideMicVocal:Nl,LucideMicrochip:K9,LucideMicroscope:X9,LucideMicrowave:Z9,LucideMilestone:Y9,LucideMilk:J9,LucideMilkOff:Q9,LucideMinimize:t_,LucideMinimize2:e_,LucideMinus:fh,LucideMinusCircle:hc,LucideMinusSquare:P1,LucideMonitor:y_,LucideMonitorCheck:n_,LucideMonitorCloud:o_,LucideMonitorCog:r_,LucideMonitorDot:i_,LucideMonitorDown:a_,LucideMonitorOff:s_,LucideMonitorPause:c_,LucideMonitorPlay:l_,LucideMonitorSmartphone:d_,LucideMonitorSpeaker:u_,LucideMonitorStop:h_,LucideMonitorUp:f_,LucideMonitorX:p_,LucideMoon:g_,LucideMoonStar:m_,LucideMoreHorizontal:zc,LucideMoreVertical:Pc,LucideMotorbike:k_,LucideMountain:x_,LucideMountainSnow:v_,LucideMouse:S_,LucideMouseOff:w_,LucideMousePointer:C_,LucideMousePointer2:ph,LucideMousePointer2Off:M_,LucideMousePointerBan:b_,LucideMousePointerClick:__,LucideMousePointerSquareDashed:_1,LucideMove:D_,LucideMove3D:Il,LucideMove3d:Il,LucideMoveDiagonal:N_,LucideMoveDiagonal2:L_,LucideMoveDown:E_,LucideMoveDownLeft:I_,LucideMoveDownRight:A_,LucideMoveHorizontal:j_,LucideMoveLeft:yh,LucideMoveRight:$_,LucideMoveUp:R_,LucideMoveUpLeft:P_,LucideMoveUpRight:z_,LucideMoveVertical:T_,LucideMusic:q_,LucideMusic2:H_,LucideMusic3:O_,LucideMusic4:F_,LucideNavigation:W_,LucideNavigation2:B_,LucideNavigation2Off:V_,LucideNavigationOff:U_,LucideNetwork:G_,LucideNewspaper:K_,LucideNfc:X_,LucideNonBinary:Z_,LucideNotebook:eC,LucideNotebookPen:Y_,LucideNotebookTabs:Q_,LucideNotebookText:J_,LucideNotepadText:nC,LucideNotepadTextDashed:tC,LucideNut:oC,LucideNutOff:rC,LucideOctagon:aC,LucideOctagonAlert:Al,LucideOctagonMinus:iC,LucideOctagonPause:El,LucideOctagonX:jl,LucideOmega:sC,LucideOption:lC,LucideOrbit:cC,LucideOrigami:dC,LucideOutdent:Cr,LucidePackage:kC,LucidePackage2:uC,LucidePackageCheck:hC,LucidePackageMinus:fC,LucidePackageOpen:pC,LucidePackagePlus:yC,LucidePackageSearch:mC,LucidePackageX:gC,LucidePaintBucket:vC,LucidePaintRoller:xC,LucidePaintbrush:wC,LucidePaintbrush2:$l,LucidePaintbrushVertical:$l,LucidePalette:MC,LucidePalmtree:id,LucidePanda:bC,LucidePanelBottom:CC,LucidePanelBottomClose:_C,LucidePanelBottomDashed:Pl,LucidePanelBottomInactive:Pl,LucidePanelBottomOpen:SC,LucidePanelLeft:Dl,LucidePanelLeftClose:zl,LucidePanelLeftDashed:Rl,LucidePanelLeftInactive:Rl,LucidePanelLeftOpen:Tl,LucidePanelLeftRightDashed:LC,LucidePanelRight:NC,LucidePanelRightClose:s0,LucidePanelRightDashed:Hl,LucidePanelRightInactive:Hl,LucidePanelRightOpen:mh,LucidePanelTop:jC,LucidePanelTopBottomDashed:IC,LucidePanelTopClose:AC,LucidePanelTopDashed:Ol,LucidePanelTopInactive:Ol,LucidePanelTopOpen:EC,LucidePanelsLeftBottom:$C,LucidePanelsLeftRight:pa,LucidePanelsRightBottom:PC,LucidePanelsTopBottom:Kl,LucidePanelsTopLeft:Fl,LucidePaperclip:zC,LucideParentheses:TC,LucideParkingCircle:pc,LucideParkingCircleOff:fc,LucideParkingMeter:RC,LucideParkingSquare:T1,LucideParkingSquareOff:R1,LucidePartyPopper:DC,LucidePause:HC,LucidePauseCircle:yc,LucidePauseOctagon:El,LucidePawPrint:OC,LucidePcCase:FC,LucidePen:Vl,LucidePenBox:no,LucidePenLine:ql,LucidePenOff:qC,LucidePenSquare:no,LucidePenTool:VC,LucidePencil:kh,LucidePencilLine:gh,LucidePencilOff:BC,LucidePencilRuler:UC,LucidePentagon:WC,LucidePercent:GC,LucidePercentCircle:mc,LucidePercentDiamond:jc,LucidePercentSquare:D1,LucidePersonStanding:XC,LucidePhilippinePeso:KC,LucidePhone:nS,LucidePhoneCall:ZC,LucidePhoneForwarded:YC,LucidePhoneIncoming:QC,LucidePhoneMissed:JC,LucidePhoneOff:eS,LucidePhoneOutgoing:tS,LucidePi:oS,LucidePiSquare:F1,LucidePiano:rS,LucidePickaxe:iS,LucidePictureInPicture:sS,LucidePictureInPicture2:aS,LucidePieChart:Ks,LucidePiggyBank:cS,LucidePilcrow:uS,LucidePilcrowLeft:lS,LucidePilcrowRight:dS,LucidePilcrowSquare:H1,LucidePill:fS,LucidePillBottle:hS,LucidePin:yS,LucidePinOff:pS,LucidePipette:mS,LucidePizza:gS,LucidePlane:xS,LucidePlaneLanding:kS,LucidePlaneTakeoff:vS,LucidePlay:Nd,LucidePlayCircle:gc,LucidePlaySquare:O1,LucidePlug:MS,LucidePlug2:wS,LucidePlugZap:Bl,LucidePlugZap2:Bl,LucidePlus:vh,LucidePlusCircle:kc,LucidePlusSquare:q1,LucidePocket:_S,LucidePocketKnife:bS,LucidePodcast:SS,LucidePointer:LS,LucidePointerOff:CS,LucidePopcorn:NS,LucidePopsicle:IS,LucidePoundSterling:AS,LucidePower:jS,LucidePowerCircle:vc,LucidePowerOff:ES,LucidePowerSquare:V1,LucidePresentation:$S,LucidePrinter:RS,LucidePrinterCheck:PS,LucidePrinterX:zS,LucideProjector:DS,LucideProportions:TS,LucidePuzzle:HS,LucidePyramid:OS,LucideQrCode:FS,LucideQuote:qS,LucideRabbit:VS,LucideRadar:BS,LucideRadiation:US,LucideRadical:WS,LucideRadio:XS,LucideRadioReceiver:GS,LucideRadioTower:KS,LucideRadius:ZS,LucideRailSymbol:YS,LucideRainbow:QS,LucideRat:JS,LucideRatio:eL,LucideReceipt:dL,LucideReceiptCent:tL,LucideReceiptEuro:nL,LucideReceiptIndianRupee:oL,LucideReceiptJapaneseYen:rL,LucideReceiptPoundSterling:iL,LucideReceiptRussianRuble:aL,LucideReceiptSwissFranc:sL,LucideReceiptText:cL,LucideReceiptTurkishLira:lL,LucideRectangleCircle:uL,LucideRectangleEllipsis:Ul,LucideRectangleGoggles:hL,LucideRectangleHorizontal:fL,LucideRectangleVertical:pL,LucideRecycle:yL,LucideRedo:kL,LucideRedo2:mL,LucideRedoDot:gL,LucideRefreshCcw:wL,LucideRefreshCcwDot:vL,LucideRefreshCw:ML,LucideRefreshCwOff:xL,LucideRefrigerator:bL,LucideRegex:_L,LucideRemoveFormatting:CL,LucideRepeat:NL,LucideRepeat1:LL,LucideRepeat2:SL,LucideReplace:AL,LucideReplaceAll:IL,LucideReply:jL,LucideReplyAll:EL,LucideRewind:$L,LucideRibbon:zL,LucideRocket:PL,LucideRockingChair:RL,LucideRollerCoaster:TL,LucideRose:DL,LucideRotate3D:Wl,LucideRotate3d:Wl,LucideRotateCcw:FL,LucideRotateCcwKey:HL,LucideRotateCcwSquare:OL,LucideRotateCw:VL,LucideRotateCwSquare:qL,LucideRoute:UL,LucideRouteOff:BL,LucideRouter:WL,LucideRows:Gl,LucideRows2:Gl,LucideRows3:Kl,LucideRows4:GL,LucideRss:KL,LucideRuler:ZL,LucideRulerDimensionLine:XL,LucideRussianRuble:YL,LucideSailboat:QL,LucideSalad:JL,LucideSandwich:eN,LucideSatellite:nN,LucideSatelliteDish:tN,LucideSaudiRiyal:oN,LucideSave:aN,LucideSaveAll:rN,LucideSaveOff:iN,LucideScale:sN,LucideScale3D:Xl,LucideScale3d:Xl,LucideScaling:cN,LucideScan:gN,LucideScanBarcode:lN,LucideScanEye:dN,LucideScanFace:uN,LucideScanHeart:hN,LucideScanLine:fN,LucideScanQrCode:pN,LucideScanSearch:yN,LucideScanText:mN,LucideScatterChart:Xs,LucideSchool:kN,LucideSchool2:sd,LucideScissors:wN,LucideScissorsLineDashed:vN,LucideScissorsSquare:B1,LucideScissorsSquareDashedBottom:y1,LucideScooter:xN,LucideScreenShare:bN,LucideScreenShareOff:MN,LucideScroll:CN,LucideScrollText:_N,LucideSearch:xh,LucideSearchAlert:SN,LucideSearchCheck:LN,LucideSearchCode:NN,LucideSearchSlash:IN,LucideSearchX:AN,LucideSection:EN,LucideSend:$N,LucideSendHorizonal:Zl,LucideSendHorizontal:Zl,LucideSendToBack:jN,LucideSeparatorHorizontal:zN,LucideSeparatorVertical:PN,LucideServer:wh,LucideServerCog:RN,LucideServerCrash:TN,LucideServerOff:DN,LucideSettings:ON,LucideSettings2:HN,LucideShapes:Mh,LucideShare:FN,LucideShare2:bh,LucideSheet:qN,LucideShell:VN,LucideShield:JN,LucideShieldAlert:BN,LucideShieldBan:UN,LucideShieldCheck:WN,LucideShieldClose:Ql,LucideShieldEllipsis:GN,LucideShieldHalf:KN,LucideShieldMinus:XN,LucideShieldOff:ZN,LucideShieldPlus:YN,LucideShieldQuestion:Yl,LucideShieldQuestionMark:Yl,LucideShieldUser:QN,LucideShieldX:Ql,LucideShip:nI,LucideShipWheel:eI,LucideShirt:tI,LucideShoppingBag:rI,LucideShoppingBasket:oI,LucideShoppingCart:iI,LucideShovel:aI,LucideShowerHead:sI,LucideShredder:cI,LucideShrimp:lI,LucideShrink:dI,LucideShrub:uI,LucideShuffle:hI,LucideSidebar:Dl,LucideSidebarClose:zl,LucideSidebarOpen:Tl,LucideSigma:fI,LucideSigmaSquare:U1,LucideSignal:kI,LucideSignalHigh:pI,LucideSignalLow:yI,LucideSignalMedium:mI,LucideSignalZero:gI,LucideSignature:vI,LucideSignpost:wI,LucideSignpostBig:xI,LucideSiren:MI,LucideSkipBack:bI,LucideSkipForward:_I,LucideSkull:CI,LucideSlack:SI,LucideSlash:LI,LucideSlashSquare:W1,LucideSlice:NI,LucideSliders:Jl,LucideSlidersHorizontal:II,LucideSlidersVertical:Jl,LucideSmartphone:jI,LucideSmartphoneCharging:AI,LucideSmartphoneNfc:EI,LucideSmile:PI,LucideSmilePlus:$I,LucideSnail:zI,LucideSnowflake:RI,LucideSoapDispenserDroplet:TI,LucideSofa:DI,LucideSolarPanel:HI,LucideSortAsc:Ls,LucideSortDesc:_s,LucideSoup:OI,LucideSpace:FI,LucideSpade:qI,LucideSparkle:VI,LucideSparkles:e1,LucideSpeaker:BI,LucideSpeech:UI,LucideSpellCheck:GI,LucideSpellCheck2:WI,LucideSpline:KI,LucideSplinePointer:XI,LucideSplit:ZI,LucideSplitSquareHorizontal:G1,LucideSplitSquareVertical:K1,LucideSpool:YI,LucideSpotlight:QI,LucideSprayCan:JI,LucideSprout:eA,LucideSquare:c0,LucideSquareActivity:t1,LucideSquareArrowDown:r1,LucideSquareArrowDownLeft:n1,LucideSquareArrowDownRight:o1,LucideSquareArrowLeft:i1,LucideSquareArrowOutDownLeft:a1,LucideSquareArrowOutDownRight:s1,LucideSquareArrowOutUpLeft:c1,LucideSquareArrowOutUpRight:l1,LucideSquareArrowRight:d1,LucideSquareArrowUp:h1,LucideSquareArrowUpLeft:u1,LucideSquareArrowUpRight:p1,LucideSquareAsterisk:f1,LucideSquareBottomDashedScissors:y1,LucideSquareChartGantt:Lr,LucideSquareCheck:g1,LucideSquareCheckBig:m1,LucideSquareChevronDown:k1,LucideSquareChevronLeft:v1,LucideSquareChevronRight:w1,LucideSquareChevronUp:x1,LucideSquareCode:M1,LucideSquareDashed:C1,LucideSquareDashedBottom:nA,LucideSquareDashedBottomCode:tA,LucideSquareDashedKanban:b1,LucideSquareDashedMousePointer:_1,LucideSquareDashedTopSolid:oA,LucideSquareDivide:S1,LucideSquareDot:L1,LucideSquareEqual:N1,LucideSquareFunction:I1,LucideSquareGanttChart:Lr,LucideSquareKanban:A1,LucideSquareLibrary:E1,LucideSquareM:j1,LucideSquareMenu:$1,LucideSquareMinus:P1,LucideSquareMousePointer:z1,LucideSquareParking:T1,LucideSquareParkingOff:R1,LucideSquarePause:rA,LucideSquarePen:no,LucideSquarePercent:D1,LucideSquarePi:F1,LucideSquarePilcrow:H1,LucideSquarePlay:O1,LucideSquarePlus:q1,LucideSquarePower:V1,LucideSquareRadical:iA,LucideSquareRoundCorner:aA,LucideSquareScissors:B1,LucideSquareSigma:U1,LucideSquareSlash:W1,LucideSquareSplitHorizontal:G1,LucideSquareSplitVertical:K1,LucideSquareSquare:cA,LucideSquareStack:sA,LucideSquareStar:dA,LucideSquareStop:lA,LucideSquareTerminal:X1,LucideSquareUser:Y1,LucideSquareUserRound:Z1,LucideSquareX:Q1,LucideSquaresExclude:uA,LucideSquaresIntersect:hA,LucideSquaresSubtract:fA,LucideSquaresUnite:pA,LucideSquircle:l0,LucideSquircleDashed:yA,LucideSquirrel:mA,LucideStamp:gA,LucideStar:xA,LucideStarHalf:kA,LucideStarOff:vA,LucideStars:e1,LucideStepBack:wA,LucideStepForward:MA,LucideStethoscope:bA,LucideSticker:d0,LucideStickyNote:_h,LucideStone:_A,LucideStopCircle:Mc,LucideStore:CA,LucideStretchHorizontal:LA,LucideStretchVertical:SA,LucideStrikethrough:NA,LucideSubscript:IA,LucideSubtitles:Rs,LucideSun:PA,LucideSunDim:AA,LucideSunMedium:EA,LucideSunMoon:jA,LucideSunSnow:$A,LucideSunrise:zA,LucideSunset:RA,LucideSuperscript:TA,LucideSwatchBook:DA,LucideSwissFranc:HA,LucideSwitchCamera:OA,LucideSword:FA,LucideSwords:qA,LucideSyringe:VA,LucideTable:YA,LucideTable2:BA,LucideTableCellsMerge:UA,LucideTableCellsSplit:WA,LucideTableColumnsSplit:GA,LucideTableConfig:Mr,LucideTableOfContents:KA,LucideTableProperties:XA,LucideTableRowsSplit:ZA,LucideTablet:JA,LucideTabletSmartphone:QA,LucideTablets:eE,LucideTag:tE,LucideTags:nE,LucideTally1:oE,LucideTally2:rE,LucideTally3:iE,LucideTally4:aE,LucideTally5:sE,LucideTangent:cE,LucideTarget:lE,LucideTelescope:dE,LucideTent:hE,LucideTentTree:uE,LucideTerminal:fE,LucideTerminalSquare:X1,LucideTestTube:pE,LucideTestTube2:J1,LucideTestTubeDiagonal:J1,LucideTestTubes:yE,LucideText:Vo,LucideTextAlignCenter:ya,LucideTextAlignEnd:ma,LucideTextAlignJustify:ed,LucideTextAlignStart:Vo,LucideTextCursor:gE,LucideTextCursorInput:mE,LucideTextInitial:td,LucideTextQuote:kE,LucideTextSearch:vE,LucideTextSelect:nd,LucideTextSelection:nd,LucideTextWrap:od,LucideTheater:xE,LucideThermometer:bE,LucideThermometerSnowflake:wE,LucideThermometerSun:ME,LucideThumbsDown:_E,LucideThumbsUp:CE,LucideTicket:jE,LucideTicketCheck:SE,LucideTicketMinus:LE,LucideTicketPercent:NE,LucideTicketPlus:IE,LucideTicketSlash:AE,LucideTicketX:EE,LucideTickets:PE,LucideTicketsPlane:$E,LucideTimer:TE,LucideTimerOff:zE,LucideTimerReset:RE,LucideToggleLeft:DE,LucideToggleRight:HE,LucideToilet:OE,LucideToolCase:qE,LucideToolbox:FE,LucideTornado:VE,LucideTorus:BE,LucideTouchpad:WE,LucideTouchpadOff:UE,LucideTowerControl:GE,LucideToyBrick:KE,LucideTractor:XE,LucideTrafficCone:ZE,LucideTrain:rd,LucideTrainFront:QE,LucideTrainFrontTunnel:YE,LucideTrainTrack:JE,LucideTramFront:rd,LucideTransgender:ej,LucideTrash:tj,LucideTrash2:Ch,LucideTreeDeciduous:nj,LucideTreePalm:id,LucideTreePine:oj,LucideTrees:rj,LucideTrello:ij,LucideTrendingDown:aj,LucideTrendingUp:cj,LucideTrendingUpDown:sj,LucideTriangle:uj,LucideTriangleAlert:jr,LucideTriangleDashed:lj,LucideTriangleRight:dj,LucideTrophy:hj,LucideTruck:pj,LucideTruckElectric:fj,LucideTurkishLira:yj,LucideTurntable:mj,LucideTurtle:gj,LucideTv:vj,LucideTv2:ad,LucideTvMinimal:ad,LucideTvMinimalPlay:kj,LucideTwitch:xj,LucideTwitter:wj,LucideType:u0,LucideTypeOutline:Mj,LucideUmbrella:_j,LucideUmbrellaOff:bj,LucideUnderline:Cj,LucideUndo:Nj,LucideUndo2:Sj,LucideUndoDot:Lj,LucideUnfoldHorizontal:Ij,LucideUnfoldVertical:Aj,LucideUngroup:Ej,LucideUniversity:sd,LucideUnlink:$j,LucideUnlink2:jj,LucideUnlock:_l,LucideUnlockKeyhole:bl,LucideUnplug:Pj,LucideUpload:Sh,LucideUploadCloud:Nc,LucideUsb:zj,LucideUser:Lh,LucideUser2:fd,LucideUserCheck:Rj,LucideUserCheck2:cd,LucideUserCircle:bc,LucideUserCircle2:wc,LucideUserCog:Tj,LucideUserCog2:ld,LucideUserKey:Dj,LucideUserLock:Hj,LucideUserMinus:Oj,LucideUserMinus2:dd,LucideUserPen:Fj,LucideUserPlus:qj,LucideUserPlus2:ud,LucideUserRound:fd,LucideUserRoundCheck:cd,LucideUserRoundCog:ld,LucideUserRoundKey:Vj,LucideUserRoundMinus:dd,LucideUserRoundPen:Bj,LucideUserRoundPlus:ud,LucideUserRoundSearch:Uj,LucideUserRoundX:hd,LucideUserSearch:Wj,LucideUserSquare:Y1,LucideUserSquare2:Z1,LucideUserStar:Gj,LucideUserX:Kj,LucideUserX2:hd,LucideUsers:Xj,LucideUsers2:pd,LucideUsersRound:pd,LucideUtensils:md,LucideUtensilsCrossed:yd,LucideUtilityPole:Zj,LucideVan:Yj,LucideVariable:Qj,LucideVault:Jj,LucideVectorSquare:e$,LucideVegan:t$,LucideVenetianMask:n$,LucideVenus:r$,LucideVenusAndMars:o$,LucideVerified:As,LucideVibrate:a$,LucideVibrateOff:i$,LucideVideo:c$,LucideVideoOff:s$,LucideVideotape:l$,LucideView:d$,LucideVoicemail:u$,LucideVolleyball:h$,LucideVolume:g$,LucideVolume1:f$,LucideVolume2:p$,LucideVolumeOff:y$,LucideVolumeX:m$,LucideVote:k$,LucideWallet:x$,LucideWallet2:gd,LucideWalletCards:v$,LucideWalletMinimal:gd,LucideWallpaper:w$,LucideWand:M$,LucideWand2:kd,LucideWandSparkles:kd,LucideWarehouse:b$,LucideWashingMachine:_$,LucideWatch:C$,LucideWaves:I$,LucideWavesArrowDown:S$,LucideWavesArrowUp:L$,LucideWavesLadder:N$,LucideWaypoints:A$,LucideWebcam:E$,LucideWebhook:$$,LucideWebhookOff:j$,LucideWeight:z$,LucideWeightTilde:P$,LucideWheat:D$,LucideWheatOff:R$,LucideWholeWord:T$,LucideWifi:W$,LucideWifiCog:H$,LucideWifiHigh:O$,LucideWifiLow:F$,LucideWifiOff:q$,LucideWifiPen:V$,LucideWifiSync:B$,LucideWifiZero:U$,LucideWind:K$,LucideWindArrowDown:G$,LucideWine:Z$,LucideWineOff:X$,LucideWorkflow:Y$,LucideWorm:Q$,LucideWrapText:od,LucideWrench:J$,LucideX:Id,LucideXCircle:_c,LucideXOctagon:jl,LucideXSquare:Q1,LucideYoutube:eP,LucideZap:nP,LucideZapOff:tP,LucideZoomIn:oP,LucideZoomOut:rP,Luggage:zb,LuggageIcon:zb,MSquare:j1,MSquareIcon:j1,Magnet:Rb,MagnetIcon:Rb,Mail:Bb,MailCheck:Tb,MailCheckIcon:Tb,MailIcon:Bb,MailMinus:Db,MailMinusIcon:Db,MailOpen:Hb,MailOpenIcon:Hb,MailPlus:Ob,MailPlusIcon:Ob,MailQuestion:Cl,MailQuestionIcon:Cl,MailQuestionMark:Cl,MailQuestionMarkIcon:Cl,MailSearch:Fb,MailSearchIcon:Fb,MailWarning:qb,MailWarningIcon:qb,MailX:Vb,MailXIcon:Vb,Mailbox:Wb,MailboxIcon:Wb,Mails:Ub,MailsIcon:Ub,Map:s9,MapIcon:s9,MapMinus:Gb,MapMinusIcon:Gb,MapPin:r9,MapPinCheck:Xb,MapPinCheckIcon:Xb,MapPinCheckInside:Kb,MapPinCheckInsideIcon:Kb,MapPinHouse:Zb,MapPinHouseIcon:Zb,MapPinIcon:r9,MapPinMinus:Qb,MapPinMinusIcon:Qb,MapPinMinusInside:Yb,MapPinMinusInsideIcon:Yb,MapPinOff:Jb,MapPinOffIcon:Jb,MapPinPen:Sl,MapPinPenIcon:Sl,MapPinPlus:t9,MapPinPlusIcon:t9,MapPinPlusInside:e9,MapPinPlusInsideIcon:e9,MapPinX:n9,MapPinXIcon:n9,MapPinXInside:o9,MapPinXInsideIcon:o9,MapPinned:i9,MapPinnedIcon:i9,MapPlus:a9,MapPlusIcon:a9,Mars:l9,MarsIcon:l9,MarsStroke:c9,MarsStrokeIcon:c9,Martini:d9,MartiniIcon:d9,Maximize:u9,Maximize2:Ld,Maximize2Icon:Ld,MaximizeIcon:u9,Medal:h9,MedalIcon:h9,Megaphone:p9,MegaphoneIcon:p9,MegaphoneOff:f9,MegaphoneOffIcon:f9,Meh:y9,MehIcon:y9,MemoryStick:m9,MemoryStickIcon:m9,Menu:k9,MenuIcon:k9,MenuSquare:$1,MenuSquareIcon:$1,Merge:g9,MergeIcon:g9,MessageCircle:N9,MessageCircleCode:v9,MessageCircleCodeIcon:v9,MessageCircleDashed:x9,MessageCircleDashedIcon:x9,MessageCircleHeart:w9,MessageCircleHeartIcon:w9,MessageCircleIcon:N9,MessageCircleMore:M9,MessageCircleMoreIcon:M9,MessageCircleOff:b9,MessageCircleOffIcon:b9,MessageCirclePlus:_9,MessageCirclePlusIcon:_9,MessageCircleQuestion:Ll,MessageCircleQuestionIcon:Ll,MessageCircleQuestionMark:Ll,MessageCircleQuestionMarkIcon:Ll,MessageCircleReply:C9,MessageCircleReplyIcon:C9,MessageCircleWarning:S9,MessageCircleWarningIcon:S9,MessageCircleX:L9,MessageCircleXIcon:L9,MessageSquare:B9,MessageSquareCode:I9,MessageSquareCodeIcon:I9,MessageSquareDashed:A9,MessageSquareDashedIcon:A9,MessageSquareDiff:E9,MessageSquareDiffIcon:E9,MessageSquareDot:j9,MessageSquareDotIcon:j9,MessageSquareHeart:$9,MessageSquareHeartIcon:$9,MessageSquareIcon:B9,MessageSquareLock:P9,MessageSquareLockIcon:P9,MessageSquareMore:z9,MessageSquareMoreIcon:z9,MessageSquareOff:R9,MessageSquareOffIcon:R9,MessageSquarePlus:T9,MessageSquarePlusIcon:T9,MessageSquareQuote:D9,MessageSquareQuoteIcon:D9,MessageSquareReply:H9,MessageSquareReplyIcon:H9,MessageSquareShare:O9,MessageSquareShareIcon:O9,MessageSquareText:F9,MessageSquareTextIcon:F9,MessageSquareWarning:q9,MessageSquareWarningIcon:q9,MessageSquareX:V9,MessageSquareXIcon:V9,MessagesSquare:U9,MessagesSquareIcon:U9,Mic:G9,Mic2:Nl,Mic2Icon:Nl,MicIcon:G9,MicOff:W9,MicOffIcon:W9,MicVocal:Nl,MicVocalIcon:Nl,Microchip:K9,MicrochipIcon:K9,Microscope:X9,MicroscopeIcon:X9,Microwave:Z9,MicrowaveIcon:Z9,Milestone:Y9,MilestoneIcon:Y9,Milk:J9,MilkIcon:J9,MilkOff:Q9,MilkOffIcon:Q9,Minimize:t_,Minimize2:e_,Minimize2Icon:e_,MinimizeIcon:t_,Minus:fh,MinusCircle:hc,MinusCircleIcon:hc,MinusIcon:fh,MinusSquare:P1,MinusSquareIcon:P1,Monitor:y_,MonitorCheck:n_,MonitorCheckIcon:n_,MonitorCloud:o_,MonitorCloudIcon:o_,MonitorCog:r_,MonitorCogIcon:r_,MonitorDot:i_,MonitorDotIcon:i_,MonitorDown:a_,MonitorDownIcon:a_,MonitorIcon:y_,MonitorOff:s_,MonitorOffIcon:s_,MonitorPause:c_,MonitorPauseIcon:c_,MonitorPlay:l_,MonitorPlayIcon:l_,MonitorSmartphone:d_,MonitorSmartphoneIcon:d_,MonitorSpeaker:u_,MonitorSpeakerIcon:u_,MonitorStop:h_,MonitorStopIcon:h_,MonitorUp:f_,MonitorUpIcon:f_,MonitorX:p_,MonitorXIcon:p_,Moon:g_,MoonIcon:g_,MoonStar:m_,MoonStarIcon:m_,MoreHorizontal:zc,MoreHorizontalIcon:zc,MoreVertical:Pc,MoreVerticalIcon:Pc,Motorbike:k_,MotorbikeIcon:k_,Mountain:x_,MountainIcon:x_,MountainSnow:v_,MountainSnowIcon:v_,Mouse:S_,MouseIcon:S_,MouseOff:w_,MouseOffIcon:w_,MousePointer:C_,MousePointer2:ph,MousePointer2Icon:ph,MousePointer2Off:M_,MousePointer2OffIcon:M_,MousePointerBan:b_,MousePointerBanIcon:b_,MousePointerClick:__,MousePointerClickIcon:__,MousePointerIcon:C_,MousePointerSquareDashed:_1,MousePointerSquareDashedIcon:_1,Move:D_,Move3D:Il,Move3DIcon:Il,Move3d:Il,Move3dIcon:Il,MoveDiagonal:N_,MoveDiagonal2:L_,MoveDiagonal2Icon:L_,MoveDiagonalIcon:N_,MoveDown:E_,MoveDownIcon:E_,MoveDownLeft:I_,MoveDownLeftIcon:I_,MoveDownRight:A_,MoveDownRightIcon:A_,MoveHorizontal:j_,MoveHorizontalIcon:j_,MoveIcon:D_,MoveLeft:yh,MoveLeftIcon:yh,MoveRight:$_,MoveRightIcon:$_,MoveUp:R_,MoveUpIcon:R_,MoveUpLeft:P_,MoveUpLeftIcon:P_,MoveUpRight:z_,MoveUpRightIcon:z_,MoveVertical:T_,MoveVerticalIcon:T_,Music:q_,Music2:H_,Music2Icon:H_,Music3:O_,Music3Icon:O_,Music4:F_,Music4Icon:F_,MusicIcon:q_,Navigation:W_,Navigation2:B_,Navigation2Icon:B_,Navigation2Off:V_,Navigation2OffIcon:V_,NavigationIcon:W_,NavigationOff:U_,NavigationOffIcon:U_,Network:G_,NetworkIcon:G_,Newspaper:K_,NewspaperIcon:K_,Nfc:X_,NfcIcon:X_,NonBinary:Z_,NonBinaryIcon:Z_,Notebook:eC,NotebookIcon:eC,NotebookPen:Y_,NotebookPenIcon:Y_,NotebookTabs:Q_,NotebookTabsIcon:Q_,NotebookText:J_,NotebookTextIcon:J_,NotepadText:nC,NotepadTextDashed:tC,NotepadTextDashedIcon:tC,NotepadTextIcon:nC,Nut:oC,NutIcon:oC,NutOff:rC,NutOffIcon:rC,Octagon:aC,OctagonAlert:Al,OctagonAlertIcon:Al,OctagonIcon:aC,OctagonMinus:iC,OctagonMinusIcon:iC,OctagonPause:El,OctagonPauseIcon:El,OctagonX:jl,OctagonXIcon:jl,Omega:sC,OmegaIcon:sC,Option:lC,OptionIcon:lC,Orbit:cC,OrbitIcon:cC,Origami:dC,OrigamiIcon:dC,Outdent:Cr,OutdentIcon:Cr,Package:kC,Package2:uC,Package2Icon:uC,PackageCheck:hC,PackageCheckIcon:hC,PackageIcon:kC,PackageMinus:fC,PackageMinusIcon:fC,PackageOpen:pC,PackageOpenIcon:pC,PackagePlus:yC,PackagePlusIcon:yC,PackageSearch:mC,PackageSearchIcon:mC,PackageX:gC,PackageXIcon:gC,PaintBucket:vC,PaintBucketIcon:vC,PaintRoller:xC,PaintRollerIcon:xC,Paintbrush:wC,Paintbrush2:$l,Paintbrush2Icon:$l,PaintbrushIcon:wC,PaintbrushVertical:$l,PaintbrushVerticalIcon:$l,Palette:MC,PaletteIcon:MC,Palmtree:id,PalmtreeIcon:id,Panda:bC,PandaIcon:bC,PanelBottom:CC,PanelBottomClose:_C,PanelBottomCloseIcon:_C,PanelBottomDashed:Pl,PanelBottomDashedIcon:Pl,PanelBottomIcon:CC,PanelBottomInactive:Pl,PanelBottomInactiveIcon:Pl,PanelBottomOpen:SC,PanelBottomOpenIcon:SC,PanelLeft:Dl,PanelLeftClose:zl,PanelLeftCloseIcon:zl,PanelLeftDashed:Rl,PanelLeftDashedIcon:Rl,PanelLeftIcon:Dl,PanelLeftInactive:Rl,PanelLeftInactiveIcon:Rl,PanelLeftOpen:Tl,PanelLeftOpenIcon:Tl,PanelLeftRightDashed:LC,PanelLeftRightDashedIcon:LC,PanelRight:NC,PanelRightClose:s0,PanelRightCloseIcon:s0,PanelRightDashed:Hl,PanelRightDashedIcon:Hl,PanelRightIcon:NC,PanelRightInactive:Hl,PanelRightInactiveIcon:Hl,PanelRightOpen:mh,PanelRightOpenIcon:mh,PanelTop:jC,PanelTopBottomDashed:IC,PanelTopBottomDashedIcon:IC,PanelTopClose:AC,PanelTopCloseIcon:AC,PanelTopDashed:Ol,PanelTopDashedIcon:Ol,PanelTopIcon:jC,PanelTopInactive:Ol,PanelTopInactiveIcon:Ol,PanelTopOpen:EC,PanelTopOpenIcon:EC,PanelsLeftBottom:$C,PanelsLeftBottomIcon:$C,PanelsLeftRight:pa,PanelsLeftRightIcon:pa,PanelsRightBottom:PC,PanelsRightBottomIcon:PC,PanelsTopBottom:Kl,PanelsTopBottomIcon:Kl,PanelsTopLeft:Fl,PanelsTopLeftIcon:Fl,Paperclip:zC,PaperclipIcon:zC,Parentheses:TC,ParenthesesIcon:TC,ParkingCircle:pc,ParkingCircleIcon:pc,ParkingCircleOff:fc,ParkingCircleOffIcon:fc,ParkingMeter:RC,ParkingMeterIcon:RC,ParkingSquare:T1,ParkingSquareIcon:T1,ParkingSquareOff:R1,ParkingSquareOffIcon:R1,PartyPopper:DC,PartyPopperIcon:DC,Pause:HC,PauseCircle:yc,PauseCircleIcon:yc,PauseIcon:HC,PauseOctagon:El,PauseOctagonIcon:El,PawPrint:OC,PawPrintIcon:OC,PcCase:FC,PcCaseIcon:FC,Pen:Vl,PenBox:no,PenBoxIcon:no,PenIcon:Vl,PenLine:ql,PenLineIcon:ql,PenOff:qC,PenOffIcon:qC,PenSquare:no,PenSquareIcon:no,PenTool:VC,PenToolIcon:VC,Pencil:kh,PencilIcon:kh,PencilLine:gh,PencilLineIcon:gh,PencilOff:BC,PencilOffIcon:BC,PencilRuler:UC,PencilRulerIcon:UC,Pentagon:WC,PentagonIcon:WC,Percent:GC,PercentCircle:mc,PercentCircleIcon:mc,PercentDiamond:jc,PercentDiamondIcon:jc,PercentIcon:GC,PercentSquare:D1,PercentSquareIcon:D1,PersonStanding:XC,PersonStandingIcon:XC,PhilippinePeso:KC,PhilippinePesoIcon:KC,Phone:nS,PhoneCall:ZC,PhoneCallIcon:ZC,PhoneForwarded:YC,PhoneForwardedIcon:YC,PhoneIcon:nS,PhoneIncoming:QC,PhoneIncomingIcon:QC,PhoneMissed:JC,PhoneMissedIcon:JC,PhoneOff:eS,PhoneOffIcon:eS,PhoneOutgoing:tS,PhoneOutgoingIcon:tS,Pi:oS,PiIcon:oS,PiSquare:F1,PiSquareIcon:F1,Piano:rS,PianoIcon:rS,Pickaxe:iS,PickaxeIcon:iS,PictureInPicture:sS,PictureInPicture2:aS,PictureInPicture2Icon:aS,PictureInPictureIcon:sS,PieChart:Ks,PieChartIcon:Ks,PiggyBank:cS,PiggyBankIcon:cS,Pilcrow:uS,PilcrowIcon:uS,PilcrowLeft:lS,PilcrowLeftIcon:lS,PilcrowRight:dS,PilcrowRightIcon:dS,PilcrowSquare:H1,PilcrowSquareIcon:H1,Pill:fS,PillBottle:hS,PillBottleIcon:hS,PillIcon:fS,Pin:yS,PinIcon:yS,PinOff:pS,PinOffIcon:pS,Pipette:mS,PipetteIcon:mS,Pizza:gS,PizzaIcon:gS,Plane:xS,PlaneIcon:xS,PlaneLanding:kS,PlaneLandingIcon:kS,PlaneTakeoff:vS,PlaneTakeoffIcon:vS,Play:Nd,PlayCircle:gc,PlayCircleIcon:gc,PlayIcon:Nd,PlaySquare:O1,PlaySquareIcon:O1,Plug:MS,Plug2:wS,Plug2Icon:wS,PlugIcon:MS,PlugZap:Bl,PlugZap2:Bl,PlugZap2Icon:Bl,PlugZapIcon:Bl,Plus:vh,PlusCircle:kc,PlusCircleIcon:kc,PlusIcon:vh,PlusSquare:q1,PlusSquareIcon:q1,Pocket:_S,PocketIcon:_S,PocketKnife:bS,PocketKnifeIcon:bS,Podcast:SS,PodcastIcon:SS,Pointer:LS,PointerIcon:LS,PointerOff:CS,PointerOffIcon:CS,Popcorn:NS,PopcornIcon:NS,Popsicle:IS,PopsicleIcon:IS,PoundSterling:AS,PoundSterlingIcon:AS,Power:jS,PowerCircle:vc,PowerCircleIcon:vc,PowerIcon:jS,PowerOff:ES,PowerOffIcon:ES,PowerSquare:V1,PowerSquareIcon:V1,Presentation:$S,PresentationIcon:$S,Printer:RS,PrinterCheck:PS,PrinterCheckIcon:PS,PrinterIcon:RS,PrinterX:zS,PrinterXIcon:zS,Projector:DS,ProjectorIcon:DS,Proportions:TS,ProportionsIcon:TS,Puzzle:HS,PuzzleIcon:HS,Pyramid:OS,PyramidIcon:OS,QrCode:FS,QrCodeIcon:FS,Quote:qS,QuoteIcon:qS,Rabbit:VS,RabbitIcon:VS,Radar:BS,RadarIcon:BS,Radiation:US,RadiationIcon:US,Radical:WS,RadicalIcon:WS,Radio:XS,RadioIcon:XS,RadioReceiver:GS,RadioReceiverIcon:GS,RadioTower:KS,RadioTowerIcon:KS,Radius:ZS,RadiusIcon:ZS,RailSymbol:YS,RailSymbolIcon:YS,Rainbow:QS,RainbowIcon:QS,Rat:JS,RatIcon:JS,Ratio:eL,RatioIcon:eL,Receipt:dL,ReceiptCent:tL,ReceiptCentIcon:tL,ReceiptEuro:nL,ReceiptEuroIcon:nL,ReceiptIcon:dL,ReceiptIndianRupee:oL,ReceiptIndianRupeeIcon:oL,ReceiptJapaneseYen:rL,ReceiptJapaneseYenIcon:rL,ReceiptPoundSterling:iL,ReceiptPoundSterlingIcon:iL,ReceiptRussianRuble:aL,ReceiptRussianRubleIcon:aL,ReceiptSwissFranc:sL,ReceiptSwissFrancIcon:sL,ReceiptText:cL,ReceiptTextIcon:cL,ReceiptTurkishLira:lL,ReceiptTurkishLiraIcon:lL,RectangleCircle:uL,RectangleCircleIcon:uL,RectangleEllipsis:Ul,RectangleEllipsisIcon:Ul,RectangleGoggles:hL,RectangleGogglesIcon:hL,RectangleHorizontal:fL,RectangleHorizontalIcon:fL,RectangleVertical:pL,RectangleVerticalIcon:pL,Recycle:yL,RecycleIcon:yL,Redo:kL,Redo2:mL,Redo2Icon:mL,RedoDot:gL,RedoDotIcon:gL,RedoIcon:kL,RefreshCcw:wL,RefreshCcwDot:vL,RefreshCcwDotIcon:vL,RefreshCcwIcon:wL,RefreshCw:ML,RefreshCwIcon:ML,RefreshCwOff:xL,RefreshCwOffIcon:xL,Refrigerator:bL,RefrigeratorIcon:bL,Regex:_L,RegexIcon:_L,RemoveFormatting:CL,RemoveFormattingIcon:CL,Repeat:NL,Repeat1:LL,Repeat1Icon:LL,Repeat2:SL,Repeat2Icon:SL,RepeatIcon:NL,Replace:AL,ReplaceAll:IL,ReplaceAllIcon:IL,ReplaceIcon:AL,Reply:jL,ReplyAll:EL,ReplyAllIcon:EL,ReplyIcon:jL,Rewind:$L,RewindIcon:$L,Ribbon:zL,RibbonIcon:zL,Rocket:PL,RocketIcon:PL,RockingChair:RL,RockingChairIcon:RL,RollerCoaster:TL,RollerCoasterIcon:TL,Rose:DL,RoseIcon:DL,Rotate3D:Wl,Rotate3DIcon:Wl,Rotate3d:Wl,Rotate3dIcon:Wl,RotateCcw:FL,RotateCcwIcon:FL,RotateCcwKey:HL,RotateCcwKeyIcon:HL,RotateCcwSquare:OL,RotateCcwSquareIcon:OL,RotateCw:VL,RotateCwIcon:VL,RotateCwSquare:qL,RotateCwSquareIcon:qL,Route:UL,RouteIcon:UL,RouteOff:BL,RouteOffIcon:BL,Router:WL,RouterIcon:WL,Rows:Gl,Rows2:Gl,Rows2Icon:Gl,Rows3:Kl,Rows3Icon:Kl,Rows4:GL,Rows4Icon:GL,RowsIcon:Gl,Rss:KL,RssIcon:KL,Ruler:ZL,RulerDimensionLine:XL,RulerDimensionLineIcon:XL,RulerIcon:ZL,RussianRuble:YL,RussianRubleIcon:YL,Sailboat:QL,SailboatIcon:QL,Salad:JL,SaladIcon:JL,Sandwich:eN,SandwichIcon:eN,Satellite:nN,SatelliteDish:tN,SatelliteDishIcon:tN,SatelliteIcon:nN,SaudiRiyal:oN,SaudiRiyalIcon:oN,Save:aN,SaveAll:rN,SaveAllIcon:rN,SaveIcon:aN,SaveOff:iN,SaveOffIcon:iN,Scale:sN,Scale3D:Xl,Scale3DIcon:Xl,Scale3d:Xl,Scale3dIcon:Xl,ScaleIcon:sN,Scaling:cN,ScalingIcon:cN,Scan:gN,ScanBarcode:lN,ScanBarcodeIcon:lN,ScanEye:dN,ScanEyeIcon:dN,ScanFace:uN,ScanFaceIcon:uN,ScanHeart:hN,ScanHeartIcon:hN,ScanIcon:gN,ScanLine:fN,ScanLineIcon:fN,ScanQrCode:pN,ScanQrCodeIcon:pN,ScanSearch:yN,ScanSearchIcon:yN,ScanText:mN,ScanTextIcon:mN,ScatterChart:Xs,ScatterChartIcon:Xs,School:kN,School2:sd,School2Icon:sd,SchoolIcon:kN,Scissors:wN,ScissorsIcon:wN,ScissorsLineDashed:vN,ScissorsLineDashedIcon:vN,ScissorsSquare:B1,ScissorsSquareDashedBottom:y1,ScissorsSquareDashedBottomIcon:y1,ScissorsSquareIcon:B1,Scooter:xN,ScooterIcon:xN,ScreenShare:bN,ScreenShareIcon:bN,ScreenShareOff:MN,ScreenShareOffIcon:MN,Scroll:CN,ScrollIcon:CN,ScrollText:_N,ScrollTextIcon:_N,Search:xh,SearchAlert:SN,SearchAlertIcon:SN,SearchCheck:LN,SearchCheckIcon:LN,SearchCode:NN,SearchCodeIcon:NN,SearchIcon:xh,SearchSlash:IN,SearchSlashIcon:IN,SearchX:AN,SearchXIcon:AN,Section:EN,SectionIcon:EN,Send:$N,SendHorizonal:Zl,SendHorizonalIcon:Zl,SendHorizontal:Zl,SendHorizontalIcon:Zl,SendIcon:$N,SendToBack:jN,SendToBackIcon:jN,SeparatorHorizontal:zN,SeparatorHorizontalIcon:zN,SeparatorVertical:PN,SeparatorVerticalIcon:PN,Server:wh,ServerCog:RN,ServerCogIcon:RN,ServerCrash:TN,ServerCrashIcon:TN,ServerIcon:wh,ServerOff:DN,ServerOffIcon:DN,Settings:ON,Settings2:HN,Settings2Icon:HN,SettingsIcon:ON,Shapes:Mh,ShapesIcon:Mh,Share:FN,Share2:bh,Share2Icon:bh,ShareIcon:FN,Sheet:qN,SheetIcon:qN,Shell:VN,ShellIcon:VN,Shield:JN,ShieldAlert:BN,ShieldAlertIcon:BN,ShieldBan:UN,ShieldBanIcon:UN,ShieldCheck:WN,ShieldCheckIcon:WN,ShieldClose:Ql,ShieldCloseIcon:Ql,ShieldEllipsis:GN,ShieldEllipsisIcon:GN,ShieldHalf:KN,ShieldHalfIcon:KN,ShieldIcon:JN,ShieldMinus:XN,ShieldMinusIcon:XN,ShieldOff:ZN,ShieldOffIcon:ZN,ShieldPlus:YN,ShieldPlusIcon:YN,ShieldQuestion:Yl,ShieldQuestionIcon:Yl,ShieldQuestionMark:Yl,ShieldQuestionMarkIcon:Yl,ShieldUser:QN,ShieldUserIcon:QN,ShieldX:Ql,ShieldXIcon:Ql,Ship:nI,ShipIcon:nI,ShipWheel:eI,ShipWheelIcon:eI,Shirt:tI,ShirtIcon:tI,ShoppingBag:rI,ShoppingBagIcon:rI,ShoppingBasket:oI,ShoppingBasketIcon:oI,ShoppingCart:iI,ShoppingCartIcon:iI,Shovel:aI,ShovelIcon:aI,ShowerHead:sI,ShowerHeadIcon:sI,Shredder:cI,ShredderIcon:cI,Shrimp:lI,ShrimpIcon:lI,Shrink:dI,ShrinkIcon:dI,Shrub:uI,ShrubIcon:uI,Shuffle:hI,ShuffleIcon:hI,Sidebar:Dl,SidebarClose:zl,SidebarCloseIcon:zl,SidebarIcon:Dl,SidebarOpen:Tl,SidebarOpenIcon:Tl,Sigma:fI,SigmaIcon:fI,SigmaSquare:U1,SigmaSquareIcon:U1,Signal:kI,SignalHigh:pI,SignalHighIcon:pI,SignalIcon:kI,SignalLow:yI,SignalLowIcon:yI,SignalMedium:mI,SignalMediumIcon:mI,SignalZero:gI,SignalZeroIcon:gI,Signature:vI,SignatureIcon:vI,Signpost:wI,SignpostBig:xI,SignpostBigIcon:xI,SignpostIcon:wI,Siren:MI,SirenIcon:MI,SkipBack:bI,SkipBackIcon:bI,SkipForward:_I,SkipForwardIcon:_I,Skull:CI,SkullIcon:CI,Slack:SI,SlackIcon:SI,Slash:LI,SlashIcon:LI,SlashSquare:W1,SlashSquareIcon:W1,Slice:NI,SliceIcon:NI,Sliders:Jl,SlidersHorizontal:II,SlidersHorizontalIcon:II,SlidersIcon:Jl,SlidersVertical:Jl,SlidersVerticalIcon:Jl,Smartphone:jI,SmartphoneCharging:AI,SmartphoneChargingIcon:AI,SmartphoneIcon:jI,SmartphoneNfc:EI,SmartphoneNfcIcon:EI,Smile:PI,SmileIcon:PI,SmilePlus:$I,SmilePlusIcon:$I,Snail:zI,SnailIcon:zI,Snowflake:RI,SnowflakeIcon:RI,SoapDispenserDroplet:TI,SoapDispenserDropletIcon:TI,Sofa:DI,SofaIcon:DI,SolarPanel:HI,SolarPanelIcon:HI,SortAsc:Ls,SortAscIcon:Ls,SortDesc:_s,SortDescIcon:_s,Soup:OI,SoupIcon:OI,Space:FI,SpaceIcon:FI,Spade:qI,SpadeIcon:qI,Sparkle:VI,SparkleIcon:VI,Sparkles:e1,SparklesIcon:e1,Speaker:BI,SpeakerIcon:BI,Speech:UI,SpeechIcon:UI,SpellCheck:GI,SpellCheck2:WI,SpellCheck2Icon:WI,SpellCheckIcon:GI,Spline:KI,SplineIcon:KI,SplinePointer:XI,SplinePointerIcon:XI,Split:ZI,SplitIcon:ZI,SplitSquareHorizontal:G1,SplitSquareHorizontalIcon:G1,SplitSquareVertical:K1,SplitSquareVerticalIcon:K1,Spool:YI,SpoolIcon:YI,Spotlight:QI,SpotlightIcon:QI,SprayCan:JI,SprayCanIcon:JI,Sprout:eA,SproutIcon:eA,Square:c0,SquareActivity:t1,SquareActivityIcon:t1,SquareArrowDown:r1,SquareArrowDownIcon:r1,SquareArrowDownLeft:n1,SquareArrowDownLeftIcon:n1,SquareArrowDownRight:o1,SquareArrowDownRightIcon:o1,SquareArrowLeft:i1,SquareArrowLeftIcon:i1,SquareArrowOutDownLeft:a1,SquareArrowOutDownLeftIcon:a1,SquareArrowOutDownRight:s1,SquareArrowOutDownRightIcon:s1,SquareArrowOutUpLeft:c1,SquareArrowOutUpLeftIcon:c1,SquareArrowOutUpRight:l1,SquareArrowOutUpRightIcon:l1,SquareArrowRight:d1,SquareArrowRightIcon:d1,SquareArrowUp:h1,SquareArrowUpIcon:h1,SquareArrowUpLeft:u1,SquareArrowUpLeftIcon:u1,SquareArrowUpRight:p1,SquareArrowUpRightIcon:p1,SquareAsterisk:f1,SquareAsteriskIcon:f1,SquareBottomDashedScissors:y1,SquareBottomDashedScissorsIcon:y1,SquareChartGantt:Lr,SquareChartGanttIcon:Lr,SquareCheck:g1,SquareCheckBig:m1,SquareCheckBigIcon:m1,SquareCheckIcon:g1,SquareChevronDown:k1,SquareChevronDownIcon:k1,SquareChevronLeft:v1,SquareChevronLeftIcon:v1,SquareChevronRight:w1,SquareChevronRightIcon:w1,SquareChevronUp:x1,SquareChevronUpIcon:x1,SquareCode:M1,SquareCodeIcon:M1,SquareDashed:C1,SquareDashedBottom:nA,SquareDashedBottomCode:tA,SquareDashedBottomCodeIcon:tA,SquareDashedBottomIcon:nA,SquareDashedIcon:C1,SquareDashedKanban:b1,SquareDashedKanbanIcon:b1,SquareDashedMousePointer:_1,SquareDashedMousePointerIcon:_1,SquareDashedTopSolid:oA,SquareDashedTopSolidIcon:oA,SquareDivide:S1,SquareDivideIcon:S1,SquareDot:L1,SquareDotIcon:L1,SquareEqual:N1,SquareEqualIcon:N1,SquareFunction:I1,SquareFunctionIcon:I1,SquareGanttChart:Lr,SquareGanttChartIcon:Lr,SquareIcon:c0,SquareKanban:A1,SquareKanbanIcon:A1,SquareLibrary:E1,SquareLibraryIcon:E1,SquareM:j1,SquareMIcon:j1,SquareMenu:$1,SquareMenuIcon:$1,SquareMinus:P1,SquareMinusIcon:P1,SquareMousePointer:z1,SquareMousePointerIcon:z1,SquareParking:T1,SquareParkingIcon:T1,SquareParkingOff:R1,SquareParkingOffIcon:R1,SquarePause:rA,SquarePauseIcon:rA,SquarePen:no,SquarePenIcon:no,SquarePercent:D1,SquarePercentIcon:D1,SquarePi:F1,SquarePiIcon:F1,SquarePilcrow:H1,SquarePilcrowIcon:H1,SquarePlay:O1,SquarePlayIcon:O1,SquarePlus:q1,SquarePlusIcon:q1,SquarePower:V1,SquarePowerIcon:V1,SquareRadical:iA,SquareRadicalIcon:iA,SquareRoundCorner:aA,SquareRoundCornerIcon:aA,SquareScissors:B1,SquareScissorsIcon:B1,SquareSigma:U1,SquareSigmaIcon:U1,SquareSlash:W1,SquareSlashIcon:W1,SquareSplitHorizontal:G1,SquareSplitHorizontalIcon:G1,SquareSplitVertical:K1,SquareSplitVerticalIcon:K1,SquareSquare:cA,SquareSquareIcon:cA,SquareStack:sA,SquareStackIcon:sA,SquareStar:dA,SquareStarIcon:dA,SquareStop:lA,SquareStopIcon:lA,SquareTerminal:X1,SquareTerminalIcon:X1,SquareUser:Y1,SquareUserIcon:Y1,SquareUserRound:Z1,SquareUserRoundIcon:Z1,SquareX:Q1,SquareXIcon:Q1,SquaresExclude:uA,SquaresExcludeIcon:uA,SquaresIntersect:hA,SquaresIntersectIcon:hA,SquaresSubtract:fA,SquaresSubtractIcon:fA,SquaresUnite:pA,SquaresUniteIcon:pA,Squircle:l0,SquircleDashed:yA,SquircleDashedIcon:yA,SquircleIcon:l0,Squirrel:mA,SquirrelIcon:mA,Stamp:gA,StampIcon:gA,Star:xA,StarHalf:kA,StarHalfIcon:kA,StarIcon:xA,StarOff:vA,StarOffIcon:vA,Stars:e1,StarsIcon:e1,StepBack:wA,StepBackIcon:wA,StepForward:MA,StepForwardIcon:MA,Stethoscope:bA,StethoscopeIcon:bA,Sticker:d0,StickerIcon:d0,StickyNote:_h,StickyNoteIcon:_h,Stone:_A,StoneIcon:_A,StopCircle:Mc,StopCircleIcon:Mc,Store:CA,StoreIcon:CA,StretchHorizontal:LA,StretchHorizontalIcon:LA,StretchVertical:SA,StretchVerticalIcon:SA,Strikethrough:NA,StrikethroughIcon:NA,Subscript:IA,SubscriptIcon:IA,Subtitles:Rs,SubtitlesIcon:Rs,Sun:PA,SunDim:AA,SunDimIcon:AA,SunIcon:PA,SunMedium:EA,SunMediumIcon:EA,SunMoon:jA,SunMoonIcon:jA,SunSnow:$A,SunSnowIcon:$A,Sunrise:zA,SunriseIcon:zA,Sunset:RA,SunsetIcon:RA,Superscript:TA,SuperscriptIcon:TA,SwatchBook:DA,SwatchBookIcon:DA,SwissFranc:HA,SwissFrancIcon:HA,SwitchCamera:OA,SwitchCameraIcon:OA,Sword:FA,SwordIcon:FA,Swords:qA,SwordsIcon:qA,Syringe:VA,SyringeIcon:VA,Table:YA,Table2:BA,Table2Icon:BA,TableCellsMerge:UA,TableCellsMergeIcon:UA,TableCellsSplit:WA,TableCellsSplitIcon:WA,TableColumnsSplit:GA,TableColumnsSplitIcon:GA,TableConfig:Mr,TableConfigIcon:Mr,TableIcon:YA,TableOfContents:KA,TableOfContentsIcon:KA,TableProperties:XA,TablePropertiesIcon:XA,TableRowsSplit:ZA,TableRowsSplitIcon:ZA,Tablet:JA,TabletIcon:JA,TabletSmartphone:QA,TabletSmartphoneIcon:QA,Tablets:eE,TabletsIcon:eE,Tag:tE,TagIcon:tE,Tags:nE,TagsIcon:nE,Tally1:oE,Tally1Icon:oE,Tally2:rE,Tally2Icon:rE,Tally3:iE,Tally3Icon:iE,Tally4:aE,Tally4Icon:aE,Tally5:sE,Tally5Icon:sE,Tangent:cE,TangentIcon:cE,Target:lE,TargetIcon:lE,Telescope:dE,TelescopeIcon:dE,Tent:hE,TentIcon:hE,TentTree:uE,TentTreeIcon:uE,Terminal:fE,TerminalIcon:fE,TerminalSquare:X1,TerminalSquareIcon:X1,TestTube:pE,TestTube2:J1,TestTube2Icon:J1,TestTubeDiagonal:J1,TestTubeDiagonalIcon:J1,TestTubeIcon:pE,TestTubes:yE,TestTubesIcon:yE,Text:Vo,TextAlignCenter:ya,TextAlignCenterIcon:ya,TextAlignEnd:ma,TextAlignEndIcon:ma,TextAlignJustify:ed,TextAlignJustifyIcon:ed,TextAlignStart:Vo,TextAlignStartIcon:Vo,TextCursor:gE,TextCursorIcon:gE,TextCursorInput:mE,TextCursorInputIcon:mE,TextIcon:Vo,TextInitial:td,TextInitialIcon:td,TextQuote:kE,TextQuoteIcon:kE,TextSearch:vE,TextSearchIcon:vE,TextSelect:nd,TextSelectIcon:nd,TextSelection:nd,TextSelectionIcon:nd,TextWrap:od,TextWrapIcon:od,Theater:xE,TheaterIcon:xE,Thermometer:bE,ThermometerIcon:bE,ThermometerSnowflake:wE,ThermometerSnowflakeIcon:wE,ThermometerSun:ME,ThermometerSunIcon:ME,ThumbsDown:_E,ThumbsDownIcon:_E,ThumbsUp:CE,ThumbsUpIcon:CE,Ticket:jE,TicketCheck:SE,TicketCheckIcon:SE,TicketIcon:jE,TicketMinus:LE,TicketMinusIcon:LE,TicketPercent:NE,TicketPercentIcon:NE,TicketPlus:IE,TicketPlusIcon:IE,TicketSlash:AE,TicketSlashIcon:AE,TicketX:EE,TicketXIcon:EE,Tickets:PE,TicketsIcon:PE,TicketsPlane:$E,TicketsPlaneIcon:$E,Timer:TE,TimerIcon:TE,TimerOff:zE,TimerOffIcon:zE,TimerReset:RE,TimerResetIcon:RE,ToggleLeft:DE,ToggleLeftIcon:DE,ToggleRight:HE,ToggleRightIcon:HE,Toilet:OE,ToiletIcon:OE,ToolCase:qE,ToolCaseIcon:qE,Toolbox:FE,ToolboxIcon:FE,Tornado:VE,TornadoIcon:VE,Torus:BE,TorusIcon:BE,Touchpad:WE,TouchpadIcon:WE,TouchpadOff:UE,TouchpadOffIcon:UE,TowerControl:GE,TowerControlIcon:GE,ToyBrick:KE,ToyBrickIcon:KE,Tractor:XE,TractorIcon:XE,TrafficCone:ZE,TrafficConeIcon:ZE,Train:rd,TrainFront:QE,TrainFrontIcon:QE,TrainFrontTunnel:YE,TrainFrontTunnelIcon:YE,TrainIcon:rd,TrainTrack:JE,TrainTrackIcon:JE,TramFront:rd,TramFrontIcon:rd,Transgender:ej,TransgenderIcon:ej,Trash:tj,Trash2:Ch,Trash2Icon:Ch,TrashIcon:tj,TreeDeciduous:nj,TreeDeciduousIcon:nj,TreePalm:id,TreePalmIcon:id,TreePine:oj,TreePineIcon:oj,Trees:rj,TreesIcon:rj,Trello:ij,TrelloIcon:ij,TrendingDown:aj,TrendingDownIcon:aj,TrendingUp:cj,TrendingUpDown:sj,TrendingUpDownIcon:sj,TrendingUpIcon:cj,Triangle:uj,TriangleAlert:jr,TriangleAlertIcon:jr,TriangleDashed:lj,TriangleDashedIcon:lj,TriangleIcon:uj,TriangleRight:dj,TriangleRightIcon:dj,Trophy:hj,TrophyIcon:hj,Truck:pj,TruckElectric:fj,TruckElectricIcon:fj,TruckIcon:pj,TurkishLira:yj,TurkishLiraIcon:yj,Turntable:mj,TurntableIcon:mj,Turtle:gj,TurtleIcon:gj,Tv:vj,Tv2:ad,Tv2Icon:ad,TvIcon:vj,TvMinimal:ad,TvMinimalIcon:ad,TvMinimalPlay:kj,TvMinimalPlayIcon:kj,Twitch:xj,TwitchIcon:xj,Twitter:wj,TwitterIcon:wj,Type:u0,TypeIcon:u0,TypeOutline:Mj,TypeOutlineIcon:Mj,Umbrella:_j,UmbrellaIcon:_j,UmbrellaOff:bj,UmbrellaOffIcon:bj,Underline:Cj,UnderlineIcon:Cj,Undo:Nj,Undo2:Sj,Undo2Icon:Sj,UndoDot:Lj,UndoDotIcon:Lj,UndoIcon:Nj,UnfoldHorizontal:Ij,UnfoldHorizontalIcon:Ij,UnfoldVertical:Aj,UnfoldVerticalIcon:Aj,Ungroup:Ej,UngroupIcon:Ej,University:sd,UniversityIcon:sd,Unlink:$j,Unlink2:jj,Unlink2Icon:jj,UnlinkIcon:$j,Unlock:_l,UnlockIcon:_l,UnlockKeyhole:bl,UnlockKeyholeIcon:bl,Unplug:Pj,UnplugIcon:Pj,Upload:Sh,UploadCloud:Nc,UploadCloudIcon:Nc,UploadIcon:Sh,Usb:zj,UsbIcon:zj,User:Lh,User2:fd,User2Icon:fd,UserCheck:Rj,UserCheck2:cd,UserCheck2Icon:cd,UserCheckIcon:Rj,UserCircle:bc,UserCircle2:wc,UserCircle2Icon:wc,UserCircleIcon:bc,UserCog:Tj,UserCog2:ld,UserCog2Icon:ld,UserCogIcon:Tj,UserIcon:Lh,UserKey:Dj,UserKeyIcon:Dj,UserLock:Hj,UserLockIcon:Hj,UserMinus:Oj,UserMinus2:dd,UserMinus2Icon:dd,UserMinusIcon:Oj,UserPen:Fj,UserPenIcon:Fj,UserPlus:qj,UserPlus2:ud,UserPlus2Icon:ud,UserPlusIcon:qj,UserRound:fd,UserRoundCheck:cd,UserRoundCheckIcon:cd,UserRoundCog:ld,UserRoundCogIcon:ld,UserRoundIcon:fd,UserRoundKey:Vj,UserRoundKeyIcon:Vj,UserRoundMinus:dd,UserRoundMinusIcon:dd,UserRoundPen:Bj,UserRoundPenIcon:Bj,UserRoundPlus:ud,UserRoundPlusIcon:ud,UserRoundSearch:Uj,UserRoundSearchIcon:Uj,UserRoundX:hd,UserRoundXIcon:hd,UserSearch:Wj,UserSearchIcon:Wj,UserSquare:Y1,UserSquare2:Z1,UserSquare2Icon:Z1,UserSquareIcon:Y1,UserStar:Gj,UserStarIcon:Gj,UserX:Kj,UserX2:hd,UserX2Icon:hd,UserXIcon:Kj,Users:Xj,Users2:pd,Users2Icon:pd,UsersIcon:Xj,UsersRound:pd,UsersRoundIcon:pd,Utensils:md,UtensilsCrossed:yd,UtensilsCrossedIcon:yd,UtensilsIcon:md,UtilityPole:Zj,UtilityPoleIcon:Zj,Van:Yj,VanIcon:Yj,Variable:Qj,VariableIcon:Qj,Vault:Jj,VaultIcon:Jj,VectorSquare:e$,VectorSquareIcon:e$,Vegan:t$,VeganIcon:t$,VenetianMask:n$,VenetianMaskIcon:n$,Venus:r$,VenusAndMars:o$,VenusAndMarsIcon:o$,VenusIcon:r$,Verified:As,VerifiedIcon:As,Vibrate:a$,VibrateIcon:a$,VibrateOff:i$,VibrateOffIcon:i$,Video:c$,VideoIcon:c$,VideoOff:s$,VideoOffIcon:s$,Videotape:l$,VideotapeIcon:l$,View:d$,ViewIcon:d$,Voicemail:u$,VoicemailIcon:u$,Volleyball:h$,VolleyballIcon:h$,Volume:g$,Volume1:f$,Volume1Icon:f$,Volume2:p$,Volume2Icon:p$,VolumeIcon:g$,VolumeOff:y$,VolumeOffIcon:y$,VolumeX:m$,VolumeXIcon:m$,Vote:k$,VoteIcon:k$,Wallet:x$,Wallet2:gd,Wallet2Icon:gd,WalletCards:v$,WalletCardsIcon:v$,WalletIcon:x$,WalletMinimal:gd,WalletMinimalIcon:gd,Wallpaper:w$,WallpaperIcon:w$,Wand:M$,Wand2:kd,Wand2Icon:kd,WandIcon:M$,WandSparkles:kd,WandSparklesIcon:kd,Warehouse:b$,WarehouseIcon:b$,WashingMachine:_$,WashingMachineIcon:_$,Watch:C$,WatchIcon:C$,Waves:I$,WavesArrowDown:S$,WavesArrowDownIcon:S$,WavesArrowUp:L$,WavesArrowUpIcon:L$,WavesIcon:I$,WavesLadder:N$,WavesLadderIcon:N$,Waypoints:A$,WaypointsIcon:A$,Webcam:E$,WebcamIcon:E$,Webhook:$$,WebhookIcon:$$,WebhookOff:j$,WebhookOffIcon:j$,Weight:z$,WeightIcon:z$,WeightTilde:P$,WeightTildeIcon:P$,Wheat:D$,WheatIcon:D$,WheatOff:R$,WheatOffIcon:R$,WholeWord:T$,WholeWordIcon:T$,Wifi:W$,WifiCog:H$,WifiCogIcon:H$,WifiHigh:O$,WifiHighIcon:O$,WifiIcon:W$,WifiLow:F$,WifiLowIcon:F$,WifiOff:q$,WifiOffIcon:q$,WifiPen:V$,WifiPenIcon:V$,WifiSync:B$,WifiSyncIcon:B$,WifiZero:U$,WifiZeroIcon:U$,Wind:K$,WindArrowDown:G$,WindArrowDownIcon:G$,WindIcon:K$,Wine:Z$,WineIcon:Z$,WineOff:X$,WineOffIcon:X$,Workflow:Y$,WorkflowIcon:Y$,Worm:Q$,WormIcon:Q$,WrapText:od,WrapTextIcon:od,Wrench:J$,WrenchIcon:J$,X:Id,XCircle:_c,XCircleIcon:_c,XIcon:Id,XOctagon:jl,XOctagonIcon:jl,XSquare:Q1,XSquareIcon:Q1,Youtube:eP,YoutubeIcon:eP,Zap:nP,ZapIcon:nP,ZapOff:tP,ZapOffIcon:tP,ZoomIn:oP,ZoomInIcon:oP,ZoomOut:rP,ZoomOutIcon:rP,createLucideIcon:d,icons:VAe},Symbol.toStringTag,{value:"Module"})),UAe=new Set(["createLucideIcon","Icon","icons","default"]),WAe=Symbol.for("react.forward_ref");function GAe(e){return typeof e=="function"?!0:e!==null&&typeof e=="object"?e.$$typeof===WAe:!1}function KAe(e){return e.replace(/[A-Z]/g,(t,n)=>n===0?t.toLowerCase():`-${t.toLowerCase()}`)}function XAe(){const e={};for(const[t,n]of Object.entries(BAe))UAe.has(t)||GAe(n)&&(e[KAe(t)]=n);return e}const Qh=XAe(),ZAe="help-circle",YAe=Object.keys(Qh).sort(),QAe=["logos:aws","logos:google-cloud","logos:microsoft-azure"],BP={lucide:YAe,aws:[],gcp:[],azure:[],iconify:[...QAe]};function NH(e){for(const t of e)t.installed?BP[t.vendor]=[...t.iconNames]:BP[t.vendor]=[]}const JAe=["aws","gcp","azure","iconify"];function VY(e){if(typeof e!="string")return null;const t=e.trim();if(t.length===0)return null;const n=t.indexOf(":");if(n===-1)return{vendor:"lucide",name:t};const o=t.slice(0,n),r=t.slice(n+1);return r.length===0?null:o==="lucide"?{vendor:"lucide",name:r}:JAe.includes(o)?{vendor:o,name:r}:null}function eEe(e){return e.vendor==="lucide"?e.name:`${e.vendor}:${e.name}`}function tEe(e,t){const n=VY(e);if(!n)return null;if(n.vendor==="lucide"){const o=Qh[n.name];return o?{kind:"lucide",component:o}:null}return n.vendor==="iconify"?{kind:"iconify",identifier:n.name}:{kind:"svg-url",url:`${t.studioBaseUrl}/api/icons/${n.vendor}/${n.name}.svg`}}const nEe="modulepreload",oEe=function(e){return"/"+e},ZB={},Z0=function(t,n,o){let r=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const a=document.querySelector("meta[property=csp-nonce]"),s=(a==null?void 0:a.nonce)||(a==null?void 0:a.getAttribute("nonce"));r=Promise.allSettled(n.map(c=>{if(c=oEe(c),c in ZB)return;ZB[c]=!0;const l=c.endsWith(".css"),h=l?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${c}"]${h}`))return;const u=document.createElement("link");if(u.rel=l?"stylesheet":nEe,l||(u.as="script"),u.crossOrigin="",u.href=c,s&&u.setAttribute("nonce",s),document.head.appendChild(u),l)return new Promise((p,y)=>{u.addEventListener("load",p),u.addEventListener("error",()=>y(new Error(`Unable to preload CSS for ${c}`)))})}))}function i(a){const s=new Event("vite:preloadError",{cancelable:!0});if(s.payload=a,window.dispatchEvent(s),!s.defaultPrevented)throw a}return r.then(a=>{for(const s of a||[])s.status==="rejected"&&i(s.reason);return t().catch(i)})};let vp=null;function rEe(){return vp||(vp=Z0(()=>import("./iconify-C6Z3PVFi.js"),[]).then(e=>e,()=>null),vp)}function BY(e,t){return f.jsx(qo,{className:e,"aria-label":t,"aria-hidden":t===void 0?!0:void 0,"data-testid":"icon-renderer-placeholder"})}function iEe({identifier:e,className:t,ariaLabel:n,color:o}){const[r,i]=m.useState(null);if(m.useEffect(()=>{let s=!0;return rEe().then(c=>{s&&i(c)}),()=>{s=!1}},[]),!r)return BY(t,n);const a=r.Icon;return f.jsx(a,{icon:e,className:t,color:o,"aria-label":n,"aria-hidden":n===void 0?!0:void 0})}function UY({iconId:e,studioBaseUrl:t,className:n,ariaLabel:o,color:r,strokeWidth:i,absoluteStrokeWidth:a}){const s=tEe(e,{studioBaseUrl:t});if(!s)return BY(n,o);if(s.kind==="lucide"){const c=s.component;return f.jsx(c,{className:n,color:r,strokeWidth:i,absoluteStrokeWidth:a,"aria-label":o,"aria-hidden":o===void 0?!0:void 0})}return s.kind==="svg-url"?f.jsx("img",{src:s.url,loading:"lazy",draggable:!1,className:n,alt:o??"","aria-hidden":o===void 0?!0:void 0}):f.jsx(iEe,{identifier:s.identifier,className:n,ariaLabel:o,color:r})}const aEe={studioBaseUrl:""},zF=m.createContext(aEe);function sEe({value:e,children:t}){return f.jsx(zF.Provider,{value:e,children:t})}const cEe=[".png",".jpg",".jpeg",".gif",".webp",".svg"],lEe=400,IH={width:200,height:200},dEe=e=>{const t=e.lastIndexOf(".");return t>=0?e.slice(t).toLowerCase():""},uEe=e=>{if(e.type.startsWith("image/")){const t=e.type.slice(6).toLowerCase();if(t==="png"||t==="jpeg"||t==="jpg"||t==="gif"||t==="webp"||t==="svg+xml")return!0}return cEe.includes(dEe(e.name))},hEe=e=>{if(!e)return[];const t=e.files;if(!t||t.length===0)return[];const n=[];for(let o=0;o<t.length;o++){const r=t.item(o);r&&uEe(r)&&n.push(r)}return n},fEe=(e,t=lEe)=>{if(e.width<=0||e.height<=0)return{...IH};const n=Math.max(e.width,e.height);if(n<=t)return{width:Math.round(e.width),height:Math.round(e.height)};const o=t/n;return{width:Math.round(e.width*o),height:Math.round(e.height*o)}},pEe=24,yEe=4,mEe=(e,t,n=pEe,o=yEe)=>{if(e.length===0)return[];const r=Math.min(e.length,Math.max(1,o)),i=Math.ceil(e.length/r),a=new Array(r).fill(0),s=new Array(i).fill(0);e.forEach((g,k)=>{const x=k%r,v=Math.floor(k/r);a[x]=Math.max(a[x],g.width),s[v]=Math.max(s[v],g.height)});const c=new Array(r).fill(0);for(let g=1;g<r;g++)c[g]=c[g-1]+a[g-1]+n;const l=new Array(i).fill(0);for(let g=1;g<i;g++)l[g]=l[g-1]+s[g-1]+n;const h=a.reduce((g,k)=>g+k,0)+n*(r-1),u=s.reduce((g,k)=>g+k,0)+n*(i-1),p=t.x-h/2,y=t.y-u/2;return e.map((g,k)=>{const x=k%r,v=Math.floor(k/r);return{x:p+c[x],y:y+l[v]}})},gEe=async e=>{const t=hEe(e.dataTransfer);if(t.length===0||!e.rfInstance)return!1;const n=e.rfInstance.screenToFlowPosition(e.clientPos),o=await Promise.all(t.map(i=>e.computeDims(i))),r=mEe(o,n);return t.forEach((i,a)=>{e.dispatch({file:i,position:r[a],dims:o[a],originalFilename:i.name})}),!0},kEe=e=>new Promise(t=>{let n=null;const o=i=>{n&&URL.revokeObjectURL(n),t(i)};try{n=URL.createObjectURL(e)}catch{t({...IH});return}const r=new Image;r.onload=()=>{o(fEe({width:r.naturalWidth,height:r.naturalHeight}))},r.onerror=()=>{o({...IH})},r.src=n}),vEe=2048,xEe=e=>{const t=e.type.toLowerCase();return t==="image/png"||t==="image/jpeg"||t==="image/webp"},wEe=async(e,t=vEe)=>{if(!xEe(e))return e;try{const n=await createImageBitmap(e),o=Math.max(n.width,n.height);if(o<=t)return n.close(),e;const r=t/o,i=Math.round(n.width*r),a=Math.round(n.height*r),s=document.createElement("canvas");s.width=i,s.height=a;const c=s.getContext("2d");if(!c)return n.close(),e;c.drawImage(n,0,0,i,a),n.close();const l=await new Promise(h=>{s.toBlob(u=>h(u),e.type)});return l?new File([l],e.name,{type:e.type,lastModified:e.lastModified}):e}catch{return e}};function WY(e){var t,n,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e)){var r=e.length;for(t=0;t<r;t++)e[t]&&(n=WY(e[t]))&&(o&&(o+=" "),o+=n)}else for(n in e)e[n]&&(o&&(o+=" "),o+=n);return o}function GY(){for(var e,t,n=0,o="",r=arguments.length;n<r;n++)(e=arguments[n])&&(t=WY(e))&&(o&&(o+=" "),o+=t);return o}const RF="-",MEe=e=>{const t=_Ee(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:a=>{const s=a.split(RF);return s[0]===""&&s.length!==1&&s.shift(),KY(s,t)||bEe(a)},getConflictingClassGroupIds:(a,s)=>{const c=n[a]||[];return s&&o[a]?[...c,...o[a]]:c}}},KY=(e,t)=>{var a;if(e.length===0)return t.classGroupId;const n=e[0],o=t.nextPart.get(n),r=o?KY(e.slice(1),o):void 0;if(r)return r;if(t.validators.length===0)return;const i=e.join(RF);return(a=t.validators.find(({validator:s})=>s(i)))==null?void 0:a.classGroupId},YB=/^\[(.+)\]$/,bEe=e=>{if(YB.test(e)){const t=YB.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},_Ee=e=>{const{theme:t,prefix:n}=e,o={nextPart:new Map,validators:[]};return SEe(Object.entries(e.classGroups),n).forEach(([i,a])=>{AH(a,o,i,t)}),o},AH=(e,t,n,o)=>{e.forEach(r=>{if(typeof r=="string"){const i=r===""?t:QB(t,r);i.classGroupId=n;return}if(typeof r=="function"){if(CEe(r)){AH(r(o),t,n,o);return}t.validators.push({validator:r,classGroupId:n});return}Object.entries(r).forEach(([i,a])=>{AH(a,QB(t,i),n,o)})})},QB=(e,t)=>{let n=e;return t.split(RF).forEach(o=>{n.nextPart.has(o)||n.nextPart.set(o,{nextPart:new Map,validators:[]}),n=n.nextPart.get(o)}),n},CEe=e=>e.isThemeGetter,SEe=(e,t)=>t?e.map(([n,o])=>{const r=o.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([a,s])=>[t+a,s])):i);return[n,r]}):e,LEe=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,o=new Map;const r=(i,a)=>{n.set(i,a),t++,t>e&&(t=0,o=n,n=new Map)};return{get(i){let a=n.get(i);if(a!==void 0)return a;if((a=o.get(i))!==void 0)return r(i,a),a},set(i,a){n.has(i)?n.set(i,a):r(i,a)}}},XY="!",NEe=e=>{const{separator:t,experimentalParseClassName:n}=e,o=t.length===1,r=t[0],i=t.length,a=s=>{const c=[];let l=0,h=0,u;for(let x=0;x<s.length;x++){let v=s[x];if(l===0){if(v===r&&(o||s.slice(x,x+i)===t)){c.push(s.slice(h,x)),h=x+i;continue}if(v==="/"){u=x;continue}}v==="["?l++:v==="]"&&l--}const p=c.length===0?s:s.substring(h),y=p.startsWith(XY),g=y?p.substring(1):p,k=u&&u>h?u-h:void 0;return{modifiers:c,hasImportantModifier:y,baseClassName:g,maybePostfixModifierPosition:k}};return n?s=>n({className:s,parseClassName:a}):a},IEe=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(o=>{o[0]==="["?(t.push(...n.sort(),o),n=[]):n.push(o)}),t.push(...n.sort()),t},AEe=e=>({cache:LEe(e.cacheSize),parseClassName:NEe(e),...MEe(e)}),EEe=/\s+/,jEe=(e,t)=>{const{parseClassName:n,getClassGroupId:o,getConflictingClassGroupIds:r}=t,i=[],a=e.trim().split(EEe);let s="";for(let c=a.length-1;c>=0;c-=1){const l=a[c],{modifiers:h,hasImportantModifier:u,baseClassName:p,maybePostfixModifierPosition:y}=n(l);let g=!!y,k=o(g?p.substring(0,y):p);if(!k){if(!g){s=l+(s.length>0?" "+s:s);continue}if(k=o(p),!k){s=l+(s.length>0?" "+s:s);continue}g=!1}const x=IEe(h).join(":"),v=u?x+XY:x,M=v+k;if(i.includes(M))continue;i.push(M);const w=r(k,g);for(let b=0;b<w.length;++b){const C=w[b];i.push(v+C)}s=l+(s.length>0?" "+s:s)}return s};function $Ee(){let e=0,t,n,o="";for(;e<arguments.length;)(t=arguments[e++])&&(n=ZY(t))&&(o&&(o+=" "),o+=n);return o}const ZY=e=>{if(typeof e=="string")return e;let t,n="";for(let o=0;o<e.length;o++)e[o]&&(t=ZY(e[o]))&&(n&&(n+=" "),n+=t);return n};function PEe(e,...t){let n,o,r,i=a;function a(c){const l=t.reduce((h,u)=>u(h),e());return n=AEe(l),o=n.cache.get,r=n.cache.set,i=s,s(c)}function s(c){const l=o(c);if(l)return l;const h=jEe(c,n);return r(c,h),h}return function(){return i($Ee.apply(null,arguments))}}const Mt=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},YY=/^\[(?:([a-z-]+):)?(.+)\]$/i,zEe=/^\d+\/\d+$/,REe=new Set(["px","full","screen"]),TEe=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,DEe=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,HEe=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,OEe=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,FEe=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ki=e=>h0(e)||REe.has(e)||zEe.test(e),na=e=>Y0(e,"length",XEe),h0=e=>!!e&&!Number.isNaN(Number(e)),jT=e=>Y0(e,"number",h0),C2=e=>!!e&&Number.isInteger(Number(e)),qEe=e=>e.endsWith("%")&&h0(e.slice(0,-1)),Ue=e=>YY.test(e),oa=e=>TEe.test(e),VEe=new Set(["length","size","percentage"]),BEe=e=>Y0(e,VEe,QY),UEe=e=>Y0(e,"position",QY),WEe=new Set(["image","url"]),GEe=e=>Y0(e,WEe,YEe),KEe=e=>Y0(e,"",ZEe),S2=()=>!0,Y0=(e,t,n)=>{const o=YY.exec(e);return o?o[1]?typeof t=="string"?o[1]===t:t.has(o[1]):n(o[2]):!1},XEe=e=>DEe.test(e)&&!HEe.test(e),QY=()=>!1,ZEe=e=>OEe.test(e),YEe=e=>FEe.test(e),QEe=()=>{const e=Mt("colors"),t=Mt("spacing"),n=Mt("blur"),o=Mt("brightness"),r=Mt("borderColor"),i=Mt("borderRadius"),a=Mt("borderSpacing"),s=Mt("borderWidth"),c=Mt("contrast"),l=Mt("grayscale"),h=Mt("hueRotate"),u=Mt("invert"),p=Mt("gap"),y=Mt("gradientColorStops"),g=Mt("gradientColorStopPositions"),k=Mt("inset"),x=Mt("margin"),v=Mt("opacity"),M=Mt("padding"),w=Mt("saturate"),b=Mt("scale"),C=Mt("sepia"),_=Mt("skew"),S=Mt("space"),N=Mt("translate"),P=()=>["auto","contain","none"],A=()=>["auto","hidden","clip","visible","scroll"],E=()=>["auto",Ue,t],z=()=>[Ue,t],U=()=>["",ki,na],$=()=>["auto",h0,Ue],T=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],D=()=>["solid","dashed","dotted","double","none"],O=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],I=()=>["start","end","center","between","around","evenly","stretch"],R=()=>["","0",Ue],L=()=>["auto","avoid","all","avoid-page","page","left","right","column"],V=()=>[h0,Ue];return{cacheSize:500,separator:":",theme:{colors:[S2],spacing:[ki,na],blur:["none","",oa,Ue],brightness:V(),borderColor:[e],borderRadius:["none","","full",oa,Ue],borderSpacing:z(),borderWidth:U(),contrast:V(),grayscale:R(),hueRotate:V(),invert:R(),gap:z(),gradientColorStops:[e],gradientColorStopPositions:[qEe,na],inset:E(),margin:E(),opacity:V(),padding:z(),saturate:V(),scale:V(),sepia:R(),skew:V(),space:z(),translate:z()},classGroups:{aspect:[{aspect:["auto","square","video",Ue]}],container:["container"],columns:[{columns:[oa]}],"break-after":[{"break-after":L()}],"break-before":[{"break-before":L()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...T(),Ue]}],overflow:[{overflow:A()}],"overflow-x":[{"overflow-x":A()}],"overflow-y":[{"overflow-y":A()}],overscroll:[{overscroll:P()}],"overscroll-x":[{"overscroll-x":P()}],"overscroll-y":[{"overscroll-y":P()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[k]}],"inset-x":[{"inset-x":[k]}],"inset-y":[{"inset-y":[k]}],start:[{start:[k]}],end:[{end:[k]}],top:[{top:[k]}],right:[{right:[k]}],bottom:[{bottom:[k]}],left:[{left:[k]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",C2,Ue]}],basis:[{basis:E()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Ue]}],grow:[{grow:R()}],shrink:[{shrink:R()}],order:[{order:["first","last","none",C2,Ue]}],"grid-cols":[{"grid-cols":[S2]}],"col-start-end":[{col:["auto",{span:["full",C2,Ue]},Ue]}],"col-start":[{"col-start":$()}],"col-end":[{"col-end":$()}],"grid-rows":[{"grid-rows":[S2]}],"row-start-end":[{row:["auto",{span:[C2,Ue]},Ue]}],"row-start":[{"row-start":$()}],"row-end":[{"row-end":$()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Ue]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Ue]}],gap:[{gap:[p]}],"gap-x":[{"gap-x":[p]}],"gap-y":[{"gap-y":[p]}],"justify-content":[{justify:["normal",...I()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...I(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...I(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[M]}],px:[{px:[M]}],py:[{py:[M]}],ps:[{ps:[M]}],pe:[{pe:[M]}],pt:[{pt:[M]}],pr:[{pr:[M]}],pb:[{pb:[M]}],pl:[{pl:[M]}],m:[{m:[x]}],mx:[{mx:[x]}],my:[{my:[x]}],ms:[{ms:[x]}],me:[{me:[x]}],mt:[{mt:[x]}],mr:[{mr:[x]}],mb:[{mb:[x]}],ml:[{ml:[x]}],"space-x":[{"space-x":[S]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[S]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Ue,t]}],"min-w":[{"min-w":[Ue,t,"min","max","fit"]}],"max-w":[{"max-w":[Ue,t,"none","full","min","max","fit","prose",{screen:[oa]},oa]}],h:[{h:[Ue,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Ue,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Ue,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Ue,t,"auto","min","max","fit"]}],"font-size":[{text:["base",oa,na]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",jT]}],"font-family":[{font:[S2]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Ue]}],"line-clamp":[{"line-clamp":["none",h0,jT]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",ki,Ue]}],"list-image":[{"list-image":["none",Ue]}],"list-style-type":[{list:["none","disc","decimal",Ue]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[v]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[v]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...D(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",ki,na]}],"underline-offset":[{"underline-offset":["auto",ki,Ue]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:z()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ue]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Ue]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[v]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...T(),UEe]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",BEe]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},GEe]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[g]}],"gradient-via-pos":[{via:[g]}],"gradient-to-pos":[{to:[g]}],"gradient-from":[{from:[y]}],"gradient-via":[{via:[y]}],"gradient-to":[{to:[y]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[v]}],"border-style":[{border:[...D(),"hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[v]}],"divide-style":[{divide:D()}],"border-color":[{border:[r]}],"border-color-x":[{"border-x":[r]}],"border-color-y":[{"border-y":[r]}],"border-color-s":[{"border-s":[r]}],"border-color-e":[{"border-e":[r]}],"border-color-t":[{"border-t":[r]}],"border-color-r":[{"border-r":[r]}],"border-color-b":[{"border-b":[r]}],"border-color-l":[{"border-l":[r]}],"divide-color":[{divide:[r]}],"outline-style":[{outline:["",...D()]}],"outline-offset":[{"outline-offset":[ki,Ue]}],"outline-w":[{outline:[ki,na]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:U()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[v]}],"ring-offset-w":[{"ring-offset":[ki,na]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",oa,KEe]}],"shadow-color":[{shadow:[S2]}],opacity:[{opacity:[v]}],"mix-blend":[{"mix-blend":[...O(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":O()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[o]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",oa,Ue]}],grayscale:[{grayscale:[l]}],"hue-rotate":[{"hue-rotate":[h]}],invert:[{invert:[u]}],saturate:[{saturate:[w]}],sepia:[{sepia:[C]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[l]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[h]}],"backdrop-invert":[{"backdrop-invert":[u]}],"backdrop-opacity":[{"backdrop-opacity":[v]}],"backdrop-saturate":[{"backdrop-saturate":[w]}],"backdrop-sepia":[{"backdrop-sepia":[C]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[a]}],"border-spacing-x":[{"border-spacing-x":[a]}],"border-spacing-y":[{"border-spacing-y":[a]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Ue]}],duration:[{duration:V()}],ease:[{ease:["linear","in","out","in-out",Ue]}],delay:[{delay:V()}],animate:[{animate:["none","spin","ping","pulse","bounce",Ue]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[b]}],"scale-x":[{"scale-x":[b]}],"scale-y":[{"scale-y":[b]}],rotate:[{rotate:[C2,Ue]}],"translate-x":[{"translate-x":[N]}],"translate-y":[{"translate-y":[N]}],"skew-x":[{"skew-x":[_]}],"skew-y":[{"skew-y":[_]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Ue]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Ue]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":z()}],"scroll-mx":[{"scroll-mx":z()}],"scroll-my":[{"scroll-my":z()}],"scroll-ms":[{"scroll-ms":z()}],"scroll-me":[{"scroll-me":z()}],"scroll-mt":[{"scroll-mt":z()}],"scroll-mr":[{"scroll-mr":z()}],"scroll-mb":[{"scroll-mb":z()}],"scroll-ml":[{"scroll-ml":z()}],"scroll-p":[{"scroll-p":z()}],"scroll-px":[{"scroll-px":z()}],"scroll-py":[{"scroll-py":z()}],"scroll-ps":[{"scroll-ps":z()}],"scroll-pe":[{"scroll-pe":z()}],"scroll-pt":[{"scroll-pt":z()}],"scroll-pr":[{"scroll-pr":z()}],"scroll-pb":[{"scroll-pb":z()}],"scroll-pl":[{"scroll-pl":z()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Ue]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[ki,na,jT]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},JEe=PEe(QEe);function te(...e){return JEe(GY(e))}function Kt(e){if(typeof e=="string"||typeof e=="number")return""+e;let t="";if(Array.isArray(e))for(let n=0,o;n<e.length;n++)(o=Kt(e[n]))!==""&&(t+=(t&&" ")+o);else for(let n in e)e[n]&&(t+=(t&&" ")+n);return t}var eje={value:()=>{}};function Yz(){for(var e=0,t=arguments.length,n={},o;e<t;++e){if(!(o=arguments[e]+"")||o in n||/[\s.]/.test(o))throw new Error("illegal type: "+o);n[o]=[]}return new iP(n)}function iP(e){this._=e}function tje(e,t){return e.trim().split(/^|\s+/).map(function(n){var o="",r=n.indexOf(".");if(r>=0&&(o=n.slice(r+1),n=n.slice(0,r)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:o}})}iP.prototype=Yz.prototype={constructor:iP,on:function(e,t){var n=this._,o=tje(e+"",n),r,i=-1,a=o.length;if(arguments.length<2){for(;++i<a;)if((r=(e=o[i]).type)&&(r=nje(n[r],e.name)))return r;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++i<a;)if(r=(e=o[i]).type)n[r]=JB(n[r],e.name,t);else if(t==null)for(r in n)n[r]=JB(n[r],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new iP(e)},call:function(e,t){if((r=arguments.length-2)>0)for(var n=new Array(r),o=0,r,i;o<r;++o)n[o]=arguments[o+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(i=this._[e],o=0,r=i.length;o<r;++o)i[o].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var o=this._[e],r=0,i=o.length;r<i;++r)o[r].value.apply(t,n)}};function nje(e,t){for(var n=0,o=e.length,r;n<o;++n)if((r=e[n]).name===t)return r.value}function JB(e,t,n){for(var o=0,r=e.length;o<r;++o)if(e[o].name===t){e[o]=eje,e=e.slice(0,o).concat(e.slice(o+1));break}return n!=null&&e.push({name:t,value:n}),e}var EH="http://www.w3.org/1999/xhtml";const eU={svg:"http://www.w3.org/2000/svg",xhtml:EH,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Qz(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),eU.hasOwnProperty(t)?{space:eU[t],local:e}:e}function oje(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===EH&&t.documentElement.namespaceURI===EH?t.createElement(e):t.createElementNS(n,e)}}function rje(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function JY(e){var t=Qz(e);return(t.local?rje:oje)(t)}function ije(){}function TF(e){return e==null?ije:function(){return this.querySelector(e)}}function aje(e){typeof e!="function"&&(e=TF(e));for(var t=this._groups,n=t.length,o=new Array(n),r=0;r<n;++r)for(var i=t[r],a=i.length,s=o[r]=new Array(a),c,l,h=0;h<a;++h)(c=i[h])&&(l=e.call(c,c.__data__,h,i))&&("__data__"in c&&(l.__data__=c.__data__),s[h]=l);return new po(o,this._parents)}function sje(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function cje(){return[]}function eQ(e){return e==null?cje:function(){return this.querySelectorAll(e)}}function lje(e){return function(){return sje(e.apply(this,arguments))}}function dje(e){typeof e=="function"?e=lje(e):e=eQ(e);for(var t=this._groups,n=t.length,o=[],r=[],i=0;i<n;++i)for(var a=t[i],s=a.length,c,l=0;l<s;++l)(c=a[l])&&(o.push(e.call(c,c.__data__,l,a)),r.push(c));return new po(o,r)}function tQ(e){return function(){return this.matches(e)}}function nQ(e){return function(t){return t.matches(e)}}var uje=Array.prototype.find;function hje(e){return function(){return uje.call(this.children,e)}}function fje(){return this.firstElementChild}function pje(e){return this.select(e==null?fje:hje(typeof e=="function"?e:nQ(e)))}var yje=Array.prototype.filter;function mje(){return Array.from(this.children)}function gje(e){return function(){return yje.call(this.children,e)}}function kje(e){return this.selectAll(e==null?mje:gje(typeof e=="function"?e:nQ(e)))}function vje(e){typeof e!="function"&&(e=tQ(e));for(var t=this._groups,n=t.length,o=new Array(n),r=0;r<n;++r)for(var i=t[r],a=i.length,s=o[r]=[],c,l=0;l<a;++l)(c=i[l])&&e.call(c,c.__data__,l,i)&&s.push(c);return new po(o,this._parents)}function oQ(e){return new Array(e.length)}function xje(){return new po(this._enter||this._groups.map(oQ),this._parents)}function UP(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}UP.prototype={constructor:UP,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function wje(e){return function(){return e}}function Mje(e,t,n,o,r,i){for(var a=0,s,c=t.length,l=i.length;a<l;++a)(s=t[a])?(s.__data__=i[a],o[a]=s):n[a]=new UP(e,i[a]);for(;a<c;++a)(s=t[a])&&(r[a]=s)}function bje(e,t,n,o,r,i,a){var s,c,l=new Map,h=t.length,u=i.length,p=new Array(h),y;for(s=0;s<h;++s)(c=t[s])&&(p[s]=y=a.call(c,c.__data__,s,t)+"",l.has(y)?r[s]=c:l.set(y,c));for(s=0;s<u;++s)y=a.call(e,i[s],s,i)+"",(c=l.get(y))?(o[s]=c,c.__data__=i[s],l.delete(y)):n[s]=new UP(e,i[s]);for(s=0;s<h;++s)(c=t[s])&&l.get(p[s])===c&&(r[s]=c)}function _je(e){return e.__data__}function Cje(e,t){if(!arguments.length)return Array.from(this,_je);var n=t?bje:Mje,o=this._parents,r=this._groups;typeof e!="function"&&(e=wje(e));for(var i=r.length,a=new Array(i),s=new Array(i),c=new Array(i),l=0;l<i;++l){var h=o[l],u=r[l],p=u.length,y=Sje(e.call(h,h&&h.__data__,l,o)),g=y.length,k=s[l]=new Array(g),x=a[l]=new Array(g),v=c[l]=new Array(p);n(h,u,k,x,v,y,t);for(var M=0,w=0,b,C;M<g;++M)if(b=k[M]){for(M>=w&&(w=M+1);!(C=x[w])&&++w<g;);b._next=C||null}}return a=new po(a,o),a._enter=s,a._exit=c,a}function Sje(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Lje(){return new po(this._exit||this._groups.map(oQ),this._parents)}function Nje(e,t,n){var o=this.enter(),r=this,i=this.exit();return typeof e=="function"?(o=e(o),o&&(o=o.selection())):o=o.append(e+""),t!=null&&(r=t(r),r&&(r=r.selection())),n==null?i.remove():n(i),o&&r?o.merge(r).order():r}function Ije(e){for(var t=e.selection?e.selection():e,n=this._groups,o=t._groups,r=n.length,i=o.length,a=Math.min(r,i),s=new Array(r),c=0;c<a;++c)for(var l=n[c],h=o[c],u=l.length,p=s[c]=new Array(u),y,g=0;g<u;++g)(y=l[g]||h[g])&&(p[g]=y);for(;c<r;++c)s[c]=n[c];return new po(s,this._parents)}function Aje(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var o=e[t],r=o.length-1,i=o[r],a;--r>=0;)(a=o[r])&&(i&&a.compareDocumentPosition(i)^4&&i.parentNode.insertBefore(a,i),i=a);return this}function Eje(e){e||(e=jje);function t(u,p){return u&&p?e(u.__data__,p.__data__):!u-!p}for(var n=this._groups,o=n.length,r=new Array(o),i=0;i<o;++i){for(var a=n[i],s=a.length,c=r[i]=new Array(s),l,h=0;h<s;++h)(l=a[h])&&(c[h]=l);c.sort(t)}return new po(r,this._parents).order()}function jje(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function $je(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function Pje(){return Array.from(this)}function zje(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var o=e[t],r=0,i=o.length;r<i;++r){var a=o[r];if(a)return a}return null}function Rje(){let e=0;for(const t of this)++e;return e}function Tje(){return!this.node()}function Dje(e){for(var t=this._groups,n=0,o=t.length;n<o;++n)for(var r=t[n],i=0,a=r.length,s;i<a;++i)(s=r[i])&&e.call(s,s.__data__,i,r);return this}function Hje(e){return function(){this.removeAttribute(e)}}function Oje(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Fje(e,t){return function(){this.setAttribute(e,t)}}function qje(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function Vje(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function Bje(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function Uje(e,t){var n=Qz(e);if(arguments.length<2){var o=this.node();return n.local?o.getAttributeNS(n.space,n.local):o.getAttribute(n)}return this.each((t==null?n.local?Oje:Hje:typeof t=="function"?n.local?Bje:Vje:n.local?qje:Fje)(n,t))}function rQ(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function Wje(e){return function(){this.style.removeProperty(e)}}function Gje(e,t,n){return function(){this.style.setProperty(e,t,n)}}function Kje(e,t,n){return function(){var o=t.apply(this,arguments);o==null?this.style.removeProperty(e):this.style.setProperty(e,o,n)}}function Xje(e,t,n){return arguments.length>1?this.each((t==null?Wje:typeof t=="function"?Kje:Gje)(e,t,n??"")):S0(this.node(),e)}function S0(e,t){return e.style.getPropertyValue(t)||rQ(e).getComputedStyle(e,null).getPropertyValue(t)}function Zje(e){return function(){delete this[e]}}function Yje(e,t){return function(){this[e]=t}}function Qje(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function Jje(e,t){return arguments.length>1?this.each((t==null?Zje:typeof t=="function"?Qje:Yje)(e,t)):this.node()[e]}function iQ(e){return e.trim().split(/^|\s+/)}function DF(e){return e.classList||new aQ(e)}function aQ(e){this._node=e,this._names=iQ(e.getAttribute("class")||"")}aQ.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function sQ(e,t){for(var n=DF(e),o=-1,r=t.length;++o<r;)n.add(t[o])}function cQ(e,t){for(var n=DF(e),o=-1,r=t.length;++o<r;)n.remove(t[o])}function e$e(e){return function(){sQ(this,e)}}function t$e(e){return function(){cQ(this,e)}}function n$e(e,t){return function(){(t.apply(this,arguments)?sQ:cQ)(this,e)}}function o$e(e,t){var n=iQ(e+"");if(arguments.length<2){for(var o=DF(this.node()),r=-1,i=n.length;++r<i;)if(!o.contains(n[r]))return!1;return!0}return this.each((typeof t=="function"?n$e:t?e$e:t$e)(n,t))}function r$e(){this.textContent=""}function i$e(e){return function(){this.textContent=e}}function a$e(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function s$e(e){return arguments.length?this.each(e==null?r$e:(typeof e=="function"?a$e:i$e)(e)):this.node().textContent}function c$e(){this.innerHTML=""}function l$e(e){return function(){this.innerHTML=e}}function d$e(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function u$e(e){return arguments.length?this.each(e==null?c$e:(typeof e=="function"?d$e:l$e)(e)):this.node().innerHTML}function h$e(){this.nextSibling&&this.parentNode.appendChild(this)}function f$e(){return this.each(h$e)}function p$e(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function y$e(){return this.each(p$e)}function m$e(e){var t=typeof e=="function"?e:JY(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function g$e(){return null}function k$e(e,t){var n=typeof e=="function"?e:JY(e),o=t==null?g$e:typeof t=="function"?t:TF(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),o.apply(this,arguments)||null)})}function v$e(){var e=this.parentNode;e&&e.removeChild(this)}function x$e(){return this.each(v$e)}function w$e(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function M$e(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function b$e(e){return this.select(e?M$e:w$e)}function _$e(e){return arguments.length?this.property("__data__",e):this.node().__data__}function C$e(e){return function(t){e.call(this,t,this.__data__)}}function S$e(e){return e.trim().split(/^|\s+/).map(function(t){var n="",o=t.indexOf(".");return o>=0&&(n=t.slice(o+1),t=t.slice(0,o)),{type:t,name:n}})}function L$e(e){return function(){var t=this.__on;if(t){for(var n=0,o=-1,r=t.length,i;n<r;++n)i=t[n],(!e.type||i.type===e.type)&&i.name===e.name?this.removeEventListener(i.type,i.listener,i.options):t[++o]=i;++o?t.length=o:delete this.__on}}}function N$e(e,t,n){return function(){var o=this.__on,r,i=C$e(t);if(o){for(var a=0,s=o.length;a<s;++a)if((r=o[a]).type===e.type&&r.name===e.name){this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=i,r.options=n),r.value=t;return}}this.addEventListener(e.type,i,n),r={type:e.type,name:e.name,value:t,listener:i,options:n},o?o.push(r):this.__on=[r]}}function I$e(e,t,n){var o=S$e(e+""),r,i=o.length,a;if(arguments.length<2){var s=this.node().__on;if(s){for(var c=0,l=s.length,h;c<l;++c)for(r=0,h=s[c];r<i;++r)if((a=o[r]).type===h.type&&a.name===h.name)return h.value}return}for(s=t?N$e:L$e,r=0;r<i;++r)this.each(s(o[r],t,n));return this}function lQ(e,t,n){var o=rQ(e),r=o.CustomEvent;typeof r=="function"?r=new r(t,n):(r=o.document.createEvent("Event"),n?(r.initEvent(t,n.bubbles,n.cancelable),r.detail=n.detail):r.initEvent(t,!1,!1)),e.dispatchEvent(r)}function A$e(e,t){return function(){return lQ(this,e,t)}}function E$e(e,t){return function(){return lQ(this,e,t.apply(this,arguments))}}function j$e(e,t){return this.each((typeof t=="function"?E$e:A$e)(e,t))}function*$$e(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var o=e[t],r=0,i=o.length,a;r<i;++r)(a=o[r])&&(yield a)}var dQ=[null];function po(e,t){this._groups=e,this._parents=t}function Cf(){return new po([[document.documentElement]],dQ)}function P$e(){return this}po.prototype=Cf.prototype={constructor:po,select:aje,selectAll:dje,selectChild:pje,selectChildren:kje,filter:vje,data:Cje,enter:xje,exit:Lje,join:Nje,merge:Ije,selection:P$e,order:Aje,sort:Eje,call:$je,nodes:Pje,node:zje,size:Rje,empty:Tje,each:Dje,attr:Uje,style:Xje,property:Jje,classed:o$e,text:s$e,html:u$e,raise:f$e,lower:y$e,append:m$e,insert:k$e,remove:x$e,clone:b$e,datum:_$e,on:I$e,dispatch:j$e,[Symbol.iterator]:$$e};function ao(e){return typeof e=="string"?new po([[document.querySelector(e)]],[document.documentElement]):new po([[e]],dQ)}function z$e(e){let t;for(;t=e.sourceEvent;)e=t;return e}function Go(e,t){if(e=z$e(e),t===void 0&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var o=n.createSVGPoint();return o.x=e.clientX,o.y=e.clientY,o=o.matrixTransform(t.getScreenCTM().inverse()),[o.x,o.y]}if(t.getBoundingClientRect){var r=t.getBoundingClientRect();return[e.clientX-r.left-t.clientLeft,e.clientY-r.top-t.clientTop]}}return[e.pageX,e.pageY]}const R$e={passive:!1},Jh={capture:!0,passive:!1};function $T(e){e.stopImmediatePropagation()}function f0(e){e.preventDefault(),e.stopImmediatePropagation()}function uQ(e){var t=e.document.documentElement,n=ao(e).on("dragstart.drag",f0,Jh);"onselectstart"in t?n.on("selectstart.drag",f0,Jh):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function hQ(e,t){var n=e.document.documentElement,o=ao(e).on("dragstart.drag",null);t&&(o.on("click.drag",f0,Jh),setTimeout(function(){o.on("click.drag",null)},0)),"onselectstart"in n?o.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}const xp=e=>()=>e;function jH(e,{sourceEvent:t,subject:n,target:o,identifier:r,active:i,x:a,y:s,dx:c,dy:l,dispatch:h}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:o,enumerable:!0,configurable:!0},identifier:{value:r,enumerable:!0,configurable:!0},active:{value:i,enumerable:!0,configurable:!0},x:{value:a,enumerable:!0,configurable:!0},y:{value:s,enumerable:!0,configurable:!0},dx:{value:c,enumerable:!0,configurable:!0},dy:{value:l,enumerable:!0,configurable:!0},_:{value:h}})}jH.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function T$e(e){return!e.ctrlKey&&!e.button}function D$e(){return this.parentNode}function H$e(e,t){return t??{x:e.x,y:e.y}}function O$e(){return navigator.maxTouchPoints||"ontouchstart"in this}function fQ(){var e=T$e,t=D$e,n=H$e,o=O$e,r={},i=Yz("start","drag","end"),a=0,s,c,l,h,u=0;function p(b){b.on("mousedown.drag",y).filter(o).on("touchstart.drag",x).on("touchmove.drag",v,R$e).on("touchend.drag touchcancel.drag",M).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function y(b,C){if(!(h||!e.call(this,b,C))){var _=w(this,t.call(this,b,C),b,C,"mouse");_&&(ao(b.view).on("mousemove.drag",g,Jh).on("mouseup.drag",k,Jh),uQ(b.view),$T(b),l=!1,s=b.clientX,c=b.clientY,_("start",b))}}function g(b){if(f0(b),!l){var C=b.clientX-s,_=b.clientY-c;l=C*C+_*_>u}r.mouse("drag",b)}function k(b){ao(b.view).on("mousemove.drag mouseup.drag",null),hQ(b.view,l),f0(b),r.mouse("end",b)}function x(b,C){if(e.call(this,b,C)){var _=b.changedTouches,S=t.call(this,b,C),N=_.length,P,A;for(P=0;P<N;++P)(A=w(this,S,b,C,_[P].identifier,_[P]))&&($T(b),A("start",b,_[P]))}}function v(b){var C=b.changedTouches,_=C.length,S,N;for(S=0;S<_;++S)(N=r[C[S].identifier])&&(f0(b),N("drag",b,C[S]))}function M(b){var C=b.changedTouches,_=C.length,S,N;for(h&&clearTimeout(h),h=setTimeout(function(){h=null},500),S=0;S<_;++S)(N=r[C[S].identifier])&&($T(b),N("end",b,C[S]))}function w(b,C,_,S,N,P){var A=i.copy(),E=Go(P||_,C),z,U,$;if(($=n.call(b,new jH("beforestart",{sourceEvent:_,target:p,identifier:N,active:a,x:E[0],y:E[1],dx:0,dy:0,dispatch:A}),S))!=null)return z=$.x-E[0]||0,U=$.y-E[1]||0,function T(D,O,I){var R=E,L;switch(D){case"start":r[N]=T,L=a++;break;case"end":delete r[N],--a;case"drag":E=Go(I||O,C),L=a;break}A.call(D,b,new jH(D,{sourceEvent:O,subject:$,target:p,identifier:N,active:L,x:E[0]+z,y:E[1]+U,dx:E[0]-R[0],dy:E[1]-R[1],dispatch:A}),S)}}return p.filter=function(b){return arguments.length?(e=typeof b=="function"?b:xp(!!b),p):e},p.container=function(b){return arguments.length?(t=typeof b=="function"?b:xp(b),p):t},p.subject=function(b){return arguments.length?(n=typeof b=="function"?b:xp(b),p):n},p.touchable=function(b){return arguments.length?(o=typeof b=="function"?b:xp(!!b),p):o},p.on=function(){var b=i.on.apply(i,arguments);return b===i?p:b},p.clickDistance=function(b){return arguments.length?(u=(b=+b)*b,p):Math.sqrt(u)},p}function HF(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function pQ(e,t){var n=Object.create(e.prototype);for(var o in t)n[o]=t[o];return n}function Sf(){}var ef=.7,WP=1/ef,p0="\\s*([+-]?\\d+)\\s*",tf="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",qr="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",F$e=/^#([0-9a-f]{3,8})$/,q$e=new RegExp(`^rgb\\(${p0},${p0},${p0}\\)$`),V$e=new RegExp(`^rgb\\(${qr},${qr},${qr}\\)$`),B$e=new RegExp(`^rgba\\(${p0},${p0},${p0},${tf}\\)$`),U$e=new RegExp(`^rgba\\(${qr},${qr},${qr},${tf}\\)$`),W$e=new RegExp(`^hsl\\(${tf},${qr},${qr}\\)$`),G$e=new RegExp(`^hsla\\(${tf},${qr},${qr},${tf}\\)$`),tU={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};HF(Sf,Td,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:nU,formatHex:nU,formatHex8:K$e,formatHsl:X$e,formatRgb:oU,toString:oU});function nU(){return this.rgb().formatHex()}function K$e(){return this.rgb().formatHex8()}function X$e(){return yQ(this).formatHsl()}function oU(){return this.rgb().formatRgb()}function Td(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=F$e.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?rU(t):n===3?new Bn(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?wp(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?wp(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=q$e.exec(e))?new Bn(t[1],t[2],t[3],1):(t=V$e.exec(e))?new Bn(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=B$e.exec(e))?wp(t[1],t[2],t[3],t[4]):(t=U$e.exec(e))?wp(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=W$e.exec(e))?sU(t[1],t[2]/100,t[3]/100,1):(t=G$e.exec(e))?sU(t[1],t[2]/100,t[3]/100,t[4]):tU.hasOwnProperty(e)?rU(tU[e]):e==="transparent"?new Bn(NaN,NaN,NaN,0):null}function rU(e){return new Bn(e>>16&255,e>>8&255,e&255,1)}function wp(e,t,n,o){return o<=0&&(e=t=n=NaN),new Bn(e,t,n,o)}function Z$e(e){return e instanceof Sf||(e=Td(e)),e?(e=e.rgb(),new Bn(e.r,e.g,e.b,e.opacity)):new Bn}function $H(e,t,n,o){return arguments.length===1?Z$e(e):new Bn(e,t,n,o??1)}function Bn(e,t,n,o){this.r=+e,this.g=+t,this.b=+n,this.opacity=+o}HF(Bn,$H,pQ(Sf,{brighter(e){return e=e==null?WP:Math.pow(WP,e),new Bn(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?ef:Math.pow(ef,e),new Bn(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Bn(Ad(this.r),Ad(this.g),Ad(this.b),GP(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:iU,formatHex:iU,formatHex8:Y$e,formatRgb:aU,toString:aU}));function iU(){return`#${_d(this.r)}${_d(this.g)}${_d(this.b)}`}function Y$e(){return`#${_d(this.r)}${_d(this.g)}${_d(this.b)}${_d((isNaN(this.opacity)?1:this.opacity)*255)}`}function aU(){const e=GP(this.opacity);return`${e===1?"rgb(":"rgba("}${Ad(this.r)}, ${Ad(this.g)}, ${Ad(this.b)}${e===1?")":`, ${e})`}`}function GP(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Ad(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function _d(e){return e=Ad(e),(e<16?"0":"")+e.toString(16)}function sU(e,t,n,o){return o<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Zo(e,t,n,o)}function yQ(e){if(e instanceof Zo)return new Zo(e.h,e.s,e.l,e.opacity);if(e instanceof Sf||(e=Td(e)),!e)return new Zo;if(e instanceof Zo)return e;e=e.rgb();var t=e.r/255,n=e.g/255,o=e.b/255,r=Math.min(t,n,o),i=Math.max(t,n,o),a=NaN,s=i-r,c=(i+r)/2;return s?(t===i?a=(n-o)/s+(n<o)*6:n===i?a=(o-t)/s+2:a=(t-n)/s+4,s/=c<.5?i+r:2-i-r,a*=60):s=c>0&&c<1?0:a,new Zo(a,s,c,e.opacity)}function Q$e(e,t,n,o){return arguments.length===1?yQ(e):new Zo(e,t,n,o??1)}function Zo(e,t,n,o){this.h=+e,this.s=+t,this.l=+n,this.opacity=+o}HF(Zo,Q$e,pQ(Sf,{brighter(e){return e=e==null?WP:Math.pow(WP,e),new Zo(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?ef:Math.pow(ef,e),new Zo(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,o=n+(n<.5?n:1-n)*t,r=2*n-o;return new Bn(PT(e>=240?e-240:e+120,r,o),PT(e,r,o),PT(e<120?e+240:e-120,r,o),this.opacity)},clamp(){return new Zo(cU(this.h),Mp(this.s),Mp(this.l),GP(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=GP(this.opacity);return`${e===1?"hsl(":"hsla("}${cU(this.h)}, ${Mp(this.s)*100}%, ${Mp(this.l)*100}%${e===1?")":`, ${e})`}`}}));function cU(e){return e=(e||0)%360,e<0?e+360:e}function Mp(e){return Math.max(0,Math.min(1,e||0))}function PT(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const Jz=e=>()=>e;function mQ(e,t){return function(n){return e+n*t}}function J$e(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(o){return Math.pow(e+o*t,n)}}function jat(e,t){var n=t-e;return n?mQ(e,n>180||n<-180?n-360*Math.round(n/360):n):Jz(isNaN(e)?t:e)}function ePe(e){return(e=+e)==1?gQ:function(t,n){return n-t?J$e(t,n,e):Jz(isNaN(t)?n:t)}}function gQ(e,t){var n=t-e;return n?mQ(e,n):Jz(isNaN(e)?t:e)}const KP=function e(t){var n=ePe(t);function o(r,i){var a=n((r=$H(r)).r,(i=$H(i)).r),s=n(r.g,i.g),c=n(r.b,i.b),l=gQ(r.opacity,i.opacity);return function(h){return r.r=a(h),r.g=s(h),r.b=c(h),r.opacity=l(h),r+""}}return o.gamma=e,o}(1);function tPe(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,o=t.slice(),r;return function(i){for(r=0;r<n;++r)o[r]=e[r]*(1-i)+t[r]*i;return o}}function nPe(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function oPe(e,t){var n=t?t.length:0,o=e?Math.min(n,e.length):0,r=new Array(o),i=new Array(n),a;for(a=0;a<o;++a)r[a]=Nh(e[a],t[a]);for(;a<n;++a)i[a]=t[a];return function(s){for(a=0;a<o;++a)i[a]=r[a](s);return i}}function rPe(e,t){var n=new Date;return e=+e,t=+t,function(o){return n.setTime(e*(1-o)+t*o),n}}function $r(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function iPe(e,t){var n={},o={},r;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(r in t)r in e?n[r]=Nh(e[r],t[r]):o[r]=t[r];return function(i){for(r in n)o[r]=n[r](i);return o}}var PH=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,zT=new RegExp(PH.source,"g");function aPe(e){return function(){return e}}function sPe(e){return function(t){return e(t)+""}}function kQ(e,t){var n=PH.lastIndex=zT.lastIndex=0,o,r,i,a=-1,s=[],c=[];for(e=e+"",t=t+"";(o=PH.exec(e))&&(r=zT.exec(t));)(i=r.index)>n&&(i=t.slice(n,i),s[a]?s[a]+=i:s[++a]=i),(o=o[0])===(r=r[0])?s[a]?s[a]+=r:s[++a]=r:(s[++a]=null,c.push({i:a,x:$r(o,r)})),n=zT.lastIndex;return n<t.length&&(i=t.slice(n),s[a]?s[a]+=i:s[++a]=i),s.length<2?c[0]?sPe(c[0].x):aPe(t):(t=c.length,function(l){for(var h=0,u;h<t;++h)s[(u=c[h]).i]=u.x(l);return s.join("")})}function Nh(e,t){var n=typeof t,o;return t==null||n==="boolean"?Jz(t):(n==="number"?$r:n==="string"?(o=Td(t))?(t=o,KP):kQ:t instanceof Td?KP:t instanceof Date?rPe:nPe(t)?tPe:Array.isArray(t)?oPe:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?iPe:$r)(e,t)}var lU=180/Math.PI,zH={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function vQ(e,t,n,o,r,i){var a,s,c;return(a=Math.sqrt(e*e+t*t))&&(e/=a,t/=a),(c=e*n+t*o)&&(n-=e*c,o-=t*c),(s=Math.sqrt(n*n+o*o))&&(n/=s,o/=s,c/=s),e*o<t*n&&(e=-e,t=-t,c=-c,a=-a),{translateX:r,translateY:i,rotate:Math.atan2(t,e)*lU,skewX:Math.atan(c)*lU,scaleX:a,scaleY:s}}var bp;function cPe(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?zH:vQ(t.a,t.b,t.c,t.d,t.e,t.f)}function lPe(e){return e==null||(bp||(bp=document.createElementNS("http://www.w3.org/2000/svg","g")),bp.setAttribute("transform",e),!(e=bp.transform.baseVal.consolidate()))?zH:(e=e.matrix,vQ(e.a,e.b,e.c,e.d,e.e,e.f))}function xQ(e,t,n,o){function r(l){return l.length?l.pop()+" ":""}function i(l,h,u,p,y,g){if(l!==u||h!==p){var k=y.push("translate(",null,t,null,n);g.push({i:k-4,x:$r(l,u)},{i:k-2,x:$r(h,p)})}else(u||p)&&y.push("translate("+u+t+p+n)}function a(l,h,u,p){l!==h?(l-h>180?h+=360:h-l>180&&(l+=360),p.push({i:u.push(r(u)+"rotate(",null,o)-2,x:$r(l,h)})):h&&u.push(r(u)+"rotate("+h+o)}function s(l,h,u,p){l!==h?p.push({i:u.push(r(u)+"skewX(",null,o)-2,x:$r(l,h)}):h&&u.push(r(u)+"skewX("+h+o)}function c(l,h,u,p,y,g){if(l!==u||h!==p){var k=y.push(r(y)+"scale(",null,",",null,")");g.push({i:k-4,x:$r(l,u)},{i:k-2,x:$r(h,p)})}else(u!==1||p!==1)&&y.push(r(y)+"scale("+u+","+p+")")}return function(l,h){var u=[],p=[];return l=e(l),h=e(h),i(l.translateX,l.translateY,h.translateX,h.translateY,u,p),a(l.rotate,h.rotate,u,p),s(l.skewX,h.skewX,u,p),c(l.scaleX,l.scaleY,h.scaleX,h.scaleY,u,p),l=h=null,function(y){for(var g=-1,k=p.length,x;++g<k;)u[(x=p[g]).i]=x.x(y);return u.join("")}}}var dPe=xQ(cPe,"px, ","px)","deg)"),uPe=xQ(lPe,", ",")",")"),hPe=1e-12;function dU(e){return((e=Math.exp(e))+1/e)/2}function fPe(e){return((e=Math.exp(e))-1/e)/2}function pPe(e){return((e=Math.exp(2*e))-1)/(e+1)}const aP=function e(t,n,o){function r(i,a){var s=i[0],c=i[1],l=i[2],h=a[0],u=a[1],p=a[2],y=h-s,g=u-c,k=y*y+g*g,x,v;if(k<hPe)v=Math.log(p/l)/t,x=function(S){return[s+S*y,c+S*g,l*Math.exp(t*S*v)]};else{var M=Math.sqrt(k),w=(p*p-l*l+o*k)/(2*l*n*M),b=(p*p-l*l-o*k)/(2*p*n*M),C=Math.log(Math.sqrt(w*w+1)-w),_=Math.log(Math.sqrt(b*b+1)-b);v=(_-C)/t,x=function(S){var N=S*v,P=dU(C),A=l/(n*M)*(P*pPe(t*N+C)-fPe(C));return[s+A*y,c+A*g,l*P/dU(t*N+C)]}}return x.duration=v*1e3*t/Math.SQRT2,x}return r.rho=function(i){var a=Math.max(.001,+i),s=a*a,c=s*s;return e(a,s,c)},r}(Math.SQRT2,2,4);var L0=0,D2=0,L2=0,wQ=1e3,XP,H2,ZP=0,Dd=0,eR=0,nf=typeof performance=="object"&&performance.now?performance:Date,MQ=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function OF(){return Dd||(MQ(yPe),Dd=nf.now()+eR)}function yPe(){Dd=0}function YP(){this._call=this._time=this._next=null}YP.prototype=bQ.prototype={constructor:YP,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?OF():+n)+(t==null?0:+t),!this._next&&H2!==this&&(H2?H2._next=this:XP=this,H2=this),this._call=e,this._time=n,RH()},stop:function(){this._call&&(this._call=null,this._time=1/0,RH())}};function bQ(e,t,n){var o=new YP;return o.restart(e,t,n),o}function mPe(){OF(),++L0;for(var e=XP,t;e;)(t=Dd-e._time)>=0&&e._call.call(void 0,t),e=e._next;--L0}function uU(){Dd=(ZP=nf.now())+eR,L0=D2=0;try{mPe()}finally{L0=0,kPe(),Dd=0}}function gPe(){var e=nf.now(),t=e-ZP;t>wQ&&(eR-=t,ZP=e)}function kPe(){for(var e,t=XP,n,o=1/0;t;)t._call?(o>t._time&&(o=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:XP=n);H2=e,RH(o)}function RH(e){if(!L0){D2&&(D2=clearTimeout(D2));var t=e-Dd;t>24?(e<1/0&&(D2=setTimeout(uU,e-nf.now()-eR)),L2&&(L2=clearInterval(L2))):(L2||(ZP=nf.now(),L2=setInterval(gPe,wQ)),L0=1,MQ(uU))}}function hU(e,t,n){var o=new YP;return t=t==null?0:+t,o.restart(r=>{o.stop(),e(r+t)},t,n),o}var vPe=Yz("start","end","cancel","interrupt"),xPe=[],_Q=0,fU=1,TH=2,sP=3,pU=4,DH=5,cP=6;function tR(e,t,n,o,r,i){var a=e.__transition;if(!a)e.__transition={};else if(n in a)return;wPe(e,n,{name:t,index:o,group:r,on:vPe,tween:xPe,time:i.time,delay:i.delay,duration:i.duration,ease:i.ease,timer:null,state:_Q})}function FF(e,t){var n=sr(e,t);if(n.state>_Q)throw new Error("too late; already scheduled");return n}function Xr(e,t){var n=sr(e,t);if(n.state>sP)throw new Error("too late; already running");return n}function sr(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function wPe(e,t,n){var o=e.__transition,r;o[t]=n,n.timer=bQ(i,0,n.time);function i(l){n.state=fU,n.timer.restart(a,n.delay,n.time),n.delay<=l&&a(l-n.delay)}function a(l){var h,u,p,y;if(n.state!==fU)return c();for(h in o)if(y=o[h],y.name===n.name){if(y.state===sP)return hU(a);y.state===pU?(y.state=cP,y.timer.stop(),y.on.call("interrupt",e,e.__data__,y.index,y.group),delete o[h]):+h<t&&(y.state=cP,y.timer.stop(),y.on.call("cancel",e,e.__data__,y.index,y.group),delete o[h])}if(hU(function(){n.state===sP&&(n.state=pU,n.timer.restart(s,n.delay,n.time),s(l))}),n.state=TH,n.on.call("start",e,e.__data__,n.index,n.group),n.state===TH){for(n.state=sP,r=new Array(p=n.tween.length),h=0,u=-1;h<p;++h)(y=n.tween[h].value.call(e,e.__data__,n.index,n.group))&&(r[++u]=y);r.length=u+1}}function s(l){for(var h=l<n.duration?n.ease.call(null,l/n.duration):(n.timer.restart(c),n.state=DH,1),u=-1,p=r.length;++u<p;)r[u].call(e,h);n.state===DH&&(n.on.call("end",e,e.__data__,n.index,n.group),c())}function c(){n.state=cP,n.timer.stop(),delete o[t];for(var l in o)return;delete e.__transition}}function lP(e,t){var n=e.__transition,o,r,i=!0,a;if(n){t=t==null?null:t+"";for(a in n){if((o=n[a]).name!==t){i=!1;continue}r=o.state>TH&&o.state<DH,o.state=cP,o.timer.stop(),o.on.call(r?"interrupt":"cancel",e,e.__data__,o.index,o.group),delete n[a]}i&&delete e.__transition}}function MPe(e){return this.each(function(){lP(this,e)})}function bPe(e,t){var n,o;return function(){var r=Xr(this,e),i=r.tween;if(i!==n){o=n=i;for(var a=0,s=o.length;a<s;++a)if(o[a].name===t){o=o.slice(),o.splice(a,1);break}}r.tween=o}}function _Pe(e,t,n){var o,r;if(typeof n!="function")throw new Error;return function(){var i=Xr(this,e),a=i.tween;if(a!==o){r=(o=a).slice();for(var s={name:t,value:n},c=0,l=r.length;c<l;++c)if(r[c].name===t){r[c]=s;break}c===l&&r.push(s)}i.tween=r}}function CPe(e,t){var n=this._id;if(e+="",arguments.length<2){for(var o=sr(this.node(),n).tween,r=0,i=o.length,a;r<i;++r)if((a=o[r]).name===e)return a.value;return null}return this.each((t==null?bPe:_Pe)(n,e,t))}function qF(e,t,n){var o=e._id;return e.each(function(){var r=Xr(this,o);(r.value||(r.value={}))[t]=n.apply(this,arguments)}),function(r){return sr(r,o).value[t]}}function CQ(e,t){var n;return(typeof t=="number"?$r:t instanceof Td?KP:(n=Td(t))?(t=n,KP):kQ)(e,t)}function SPe(e){return function(){this.removeAttribute(e)}}function LPe(e){return function(){this.removeAttributeNS(e.space,e.local)}}function NPe(e,t,n){var o,r=n+"",i;return function(){var a=this.getAttribute(e);return a===r?null:a===o?i:i=t(o=a,n)}}function IPe(e,t,n){var o,r=n+"",i;return function(){var a=this.getAttributeNS(e.space,e.local);return a===r?null:a===o?i:i=t(o=a,n)}}function APe(e,t,n){var o,r,i;return function(){var a,s=n(this),c;return s==null?void this.removeAttribute(e):(a=this.getAttribute(e),c=s+"",a===c?null:a===o&&c===r?i:(r=c,i=t(o=a,s)))}}function EPe(e,t,n){var o,r,i;return function(){var a,s=n(this),c;return s==null?void this.removeAttributeNS(e.space,e.local):(a=this.getAttributeNS(e.space,e.local),c=s+"",a===c?null:a===o&&c===r?i:(r=c,i=t(o=a,s)))}}function jPe(e,t){var n=Qz(e),o=n==="transform"?uPe:CQ;return this.attrTween(e,typeof t=="function"?(n.local?EPe:APe)(n,o,qF(this,"attr."+e,t)):t==null?(n.local?LPe:SPe)(n):(n.local?IPe:NPe)(n,o,t))}function $Pe(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function PPe(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function zPe(e,t){var n,o;function r(){var i=t.apply(this,arguments);return i!==o&&(n=(o=i)&&PPe(e,i)),n}return r._value=t,r}function RPe(e,t){var n,o;function r(){var i=t.apply(this,arguments);return i!==o&&(n=(o=i)&&$Pe(e,i)),n}return r._value=t,r}function TPe(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;var o=Qz(e);return this.tween(n,(o.local?zPe:RPe)(o,t))}function DPe(e,t){return function(){FF(this,e).delay=+t.apply(this,arguments)}}function HPe(e,t){return t=+t,function(){FF(this,e).delay=t}}function OPe(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?DPe:HPe)(t,e)):sr(this.node(),t).delay}function FPe(e,t){return function(){Xr(this,e).duration=+t.apply(this,arguments)}}function qPe(e,t){return t=+t,function(){Xr(this,e).duration=t}}function VPe(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?FPe:qPe)(t,e)):sr(this.node(),t).duration}function BPe(e,t){if(typeof t!="function")throw new Error;return function(){Xr(this,e).ease=t}}function UPe(e){var t=this._id;return arguments.length?this.each(BPe(t,e)):sr(this.node(),t).ease}function WPe(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;Xr(this,e).ease=n}}function GPe(e){if(typeof e!="function")throw new Error;return this.each(WPe(this._id,e))}function KPe(e){typeof e!="function"&&(e=tQ(e));for(var t=this._groups,n=t.length,o=new Array(n),r=0;r<n;++r)for(var i=t[r],a=i.length,s=o[r]=[],c,l=0;l<a;++l)(c=i[l])&&e.call(c,c.__data__,l,i)&&s.push(c);return new zi(o,this._parents,this._name,this._id)}function XPe(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,o=t.length,r=n.length,i=Math.min(o,r),a=new Array(o),s=0;s<i;++s)for(var c=t[s],l=n[s],h=c.length,u=a[s]=new Array(h),p,y=0;y<h;++y)(p=c[y]||l[y])&&(u[y]=p);for(;s<o;++s)a[s]=t[s];return new zi(a,this._parents,this._name,this._id)}function ZPe(e){return(e+"").trim().split(/^|\s+/).every(function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||t==="start"})}function YPe(e,t,n){var o,r,i=ZPe(t)?FF:Xr;return function(){var a=i(this,e),s=a.on;s!==o&&(r=(o=s).copy()).on(t,n),a.on=r}}function QPe(e,t){var n=this._id;return arguments.length<2?sr(this.node(),n).on.on(e):this.each(YPe(n,e,t))}function JPe(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function eze(){return this.on("end.remove",JPe(this._id))}function tze(e){var t=this._name,n=this._id;typeof e!="function"&&(e=TF(e));for(var o=this._groups,r=o.length,i=new Array(r),a=0;a<r;++a)for(var s=o[a],c=s.length,l=i[a]=new Array(c),h,u,p=0;p<c;++p)(h=s[p])&&(u=e.call(h,h.__data__,p,s))&&("__data__"in h&&(u.__data__=h.__data__),l[p]=u,tR(l[p],t,n,p,l,sr(h,n)));return new zi(i,this._parents,t,n)}function nze(e){var t=this._name,n=this._id;typeof e!="function"&&(e=eQ(e));for(var o=this._groups,r=o.length,i=[],a=[],s=0;s<r;++s)for(var c=o[s],l=c.length,h,u=0;u<l;++u)if(h=c[u]){for(var p=e.call(h,h.__data__,u,c),y,g=sr(h,n),k=0,x=p.length;k<x;++k)(y=p[k])&&tR(y,t,n,k,p,g);i.push(p),a.push(h)}return new zi(i,a,t,n)}var oze=Cf.prototype.constructor;function rze(){return new oze(this._groups,this._parents)}function ize(e,t){var n,o,r;return function(){var i=S0(this,e),a=(this.style.removeProperty(e),S0(this,e));return i===a?null:i===n&&a===o?r:r=t(n=i,o=a)}}function SQ(e){return function(){this.style.removeProperty(e)}}function aze(e,t,n){var o,r=n+"",i;return function(){var a=S0(this,e);return a===r?null:a===o?i:i=t(o=a,n)}}function sze(e,t,n){var o,r,i;return function(){var a=S0(this,e),s=n(this),c=s+"";return s==null&&(c=s=(this.style.removeProperty(e),S0(this,e))),a===c?null:a===o&&c===r?i:(r=c,i=t(o=a,s))}}function cze(e,t){var n,o,r,i="style."+t,a="end."+i,s;return function(){var c=Xr(this,e),l=c.on,h=c.value[i]==null?s||(s=SQ(t)):void 0;(l!==n||r!==h)&&(o=(n=l).copy()).on(a,r=h),c.on=o}}function lze(e,t,n){var o=(e+="")=="transform"?dPe:CQ;return t==null?this.styleTween(e,ize(e,o)).on("end.style."+e,SQ(e)):typeof t=="function"?this.styleTween(e,sze(e,o,qF(this,"style."+e,t))).each(cze(this._id,e)):this.styleTween(e,aze(e,o,t),n).on("end.style."+e,null)}function dze(e,t,n){return function(o){this.style.setProperty(e,t.call(this,o),n)}}function uze(e,t,n){var o,r;function i(){var a=t.apply(this,arguments);return a!==r&&(o=(r=a)&&dze(e,a,n)),o}return i._value=t,i}function hze(e,t,n){var o="style."+(e+="");if(arguments.length<2)return(o=this.tween(o))&&o._value;if(t==null)return this.tween(o,null);if(typeof t!="function")throw new Error;return this.tween(o,uze(e,t,n??""))}function fze(e){return function(){this.textContent=e}}function pze(e){return function(){var t=e(this);this.textContent=t??""}}function yze(e){return this.tween("text",typeof e=="function"?pze(qF(this,"text",e)):fze(e==null?"":e+""))}function mze(e){return function(t){this.textContent=e.call(this,t)}}function gze(e){var t,n;function o(){var r=e.apply(this,arguments);return r!==n&&(t=(n=r)&&mze(r)),t}return o._value=e,o}function kze(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,gze(e))}function vze(){for(var e=this._name,t=this._id,n=LQ(),o=this._groups,r=o.length,i=0;i<r;++i)for(var a=o[i],s=a.length,c,l=0;l<s;++l)if(c=a[l]){var h=sr(c,t);tR(c,e,n,l,a,{time:h.time+h.delay+h.duration,delay:0,duration:h.duration,ease:h.ease})}return new zi(o,this._parents,e,n)}function xze(){var e,t,n=this,o=n._id,r=n.size();return new Promise(function(i,a){var s={value:a},c={value:function(){--r===0&&i()}};n.each(function(){var l=Xr(this,o),h=l.on;h!==e&&(t=(e=h).copy(),t._.cancel.push(s),t._.interrupt.push(s),t._.end.push(c)),l.on=t}),r===0&&i()})}var wze=0;function zi(e,t,n,o){this._groups=e,this._parents=t,this._name=n,this._id=o}function LQ(){return++wze}var vi=Cf.prototype;zi.prototype={constructor:zi,select:tze,selectAll:nze,selectChild:vi.selectChild,selectChildren:vi.selectChildren,filter:KPe,merge:XPe,selection:rze,transition:vze,call:vi.call,nodes:vi.nodes,node:vi.node,size:vi.size,empty:vi.empty,each:vi.each,on:QPe,attr:jPe,attrTween:TPe,style:lze,styleTween:hze,text:yze,textTween:kze,remove:eze,tween:CPe,delay:OPe,duration:VPe,ease:UPe,easeVarying:GPe,end:xze,[Symbol.iterator]:vi[Symbol.iterator]};function Mze(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var bze={time:null,delay:0,duration:250,ease:Mze};function _ze(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}function Cze(e){var t,n;e instanceof zi?(t=e._id,e=e._name):(t=LQ(),(n=bze).time=OF(),e=e==null?null:e+"");for(var o=this._groups,r=o.length,i=0;i<r;++i)for(var a=o[i],s=a.length,c,l=0;l<s;++l)(c=a[l])&&tR(c,e,t,l,a,n||_ze(c,t));return new zi(o,this._parents,e,t)}Cf.prototype.interrupt=MPe;Cf.prototype.transition=Cze;const _p=e=>()=>e;function Sze(e,{sourceEvent:t,target:n,transform:o,dispatch:r}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:o,enumerable:!0,configurable:!0},_:{value:r}})}function Ni(e,t,n){this.k=e,this.x=t,this.y=n}Ni.prototype={constructor:Ni,scale:function(e){return e===1?this:new Ni(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new Ni(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var nR=new Ni(1,0,0);NQ.prototype=Ni.prototype;function NQ(e){for(;!e.__zoom;)if(!(e=e.parentNode))return nR;return e.__zoom}function RT(e){e.stopImmediatePropagation()}function N2(e){e.preventDefault(),e.stopImmediatePropagation()}function Lze(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function Nze(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function yU(){return this.__zoom||nR}function Ize(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function Aze(){return navigator.maxTouchPoints||"ontouchstart"in this}function Eze(e,t,n){var o=e.invertX(t[0][0])-n[0][0],r=e.invertX(t[1][0])-n[1][0],i=e.invertY(t[0][1])-n[0][1],a=e.invertY(t[1][1])-n[1][1];return e.translate(r>o?(o+r)/2:Math.min(0,o)||Math.max(0,r),a>i?(i+a)/2:Math.min(0,i)||Math.max(0,a))}function IQ(){var e=Lze,t=Nze,n=Eze,o=Ize,r=Aze,i=[0,1/0],a=[[-1/0,-1/0],[1/0,1/0]],s=250,c=aP,l=Yz("start","zoom","end"),h,u,p,y=500,g=150,k=0,x=10;function v($){$.property("__zoom",yU).on("wheel.zoom",N,{passive:!1}).on("mousedown.zoom",P).on("dblclick.zoom",A).filter(r).on("touchstart.zoom",E).on("touchmove.zoom",z).on("touchend.zoom touchcancel.zoom",U).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}v.transform=function($,T,D,O){var I=$.selection?$.selection():$;I.property("__zoom",yU),$!==I?C($,T,D,O):I.interrupt().each(function(){_(this,arguments).event(O).start().zoom(null,typeof T=="function"?T.apply(this,arguments):T).end()})},v.scaleBy=function($,T,D,O){v.scaleTo($,function(){var I=this.__zoom.k,R=typeof T=="function"?T.apply(this,arguments):T;return I*R},D,O)},v.scaleTo=function($,T,D,O){v.transform($,function(){var I=t.apply(this,arguments),R=this.__zoom,L=D==null?b(I):typeof D=="function"?D.apply(this,arguments):D,V=R.invert(L),H=typeof T=="function"?T.apply(this,arguments):T;return n(w(M(R,H),L,V),I,a)},D,O)},v.translateBy=function($,T,D,O){v.transform($,function(){return n(this.__zoom.translate(typeof T=="function"?T.apply(this,arguments):T,typeof D=="function"?D.apply(this,arguments):D),t.apply(this,arguments),a)},null,O)},v.translateTo=function($,T,D,O,I){v.transform($,function(){var R=t.apply(this,arguments),L=this.__zoom,V=O==null?b(R):typeof O=="function"?O.apply(this,arguments):O;return n(nR.translate(V[0],V[1]).scale(L.k).translate(typeof T=="function"?-T.apply(this,arguments):-T,typeof D=="function"?-D.apply(this,arguments):-D),R,a)},O,I)};function M($,T){return T=Math.max(i[0],Math.min(i[1],T)),T===$.k?$:new Ni(T,$.x,$.y)}function w($,T,D){var O=T[0]-D[0]*$.k,I=T[1]-D[1]*$.k;return O===$.x&&I===$.y?$:new Ni($.k,O,I)}function b($){return[(+$[0][0]+ +$[1][0])/2,(+$[0][1]+ +$[1][1])/2]}function C($,T,D,O){$.on("start.zoom",function(){_(this,arguments).event(O).start()}).on("interrupt.zoom end.zoom",function(){_(this,arguments).event(O).end()}).tween("zoom",function(){var I=this,R=arguments,L=_(I,R).event(O),V=t.apply(I,R),H=D==null?b(V):typeof D=="function"?D.apply(I,R):D,j=Math.max(V[1][0]-V[0][0],V[1][1]-V[0][1]),X=I.__zoom,Z=typeof T=="function"?T.apply(I,R):T,J=c(X.invert(H).concat(j/X.k),Z.invert(H).concat(j/Z.k));return function(re){if(re===1)re=Z;else{var oe=J(re),ne=j/oe[2];re=new Ni(ne,H[0]-oe[0]*ne,H[1]-oe[1]*ne)}L.zoom(null,re)}})}function _($,T,D){return!D&&$.__zooming||new S($,T)}function S($,T){this.that=$,this.args=T,this.active=0,this.sourceEvent=null,this.extent=t.apply($,T),this.taps=0}S.prototype={event:function($){return $&&(this.sourceEvent=$),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function($,T){return this.mouse&&$!=="mouse"&&(this.mouse[1]=T.invert(this.mouse[0])),this.touch0&&$!=="touch"&&(this.touch0[1]=T.invert(this.touch0[0])),this.touch1&&$!=="touch"&&(this.touch1[1]=T.invert(this.touch1[0])),this.that.__zoom=T,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function($){var T=ao(this.that).datum();l.call($,this.that,new Sze($,{sourceEvent:this.sourceEvent,target:v,transform:this.that.__zoom,dispatch:l}),T)}};function N($,...T){if(!e.apply(this,arguments))return;var D=_(this,T).event($),O=this.__zoom,I=Math.max(i[0],Math.min(i[1],O.k*Math.pow(2,o.apply(this,arguments)))),R=Go($);if(D.wheel)(D.mouse[0][0]!==R[0]||D.mouse[0][1]!==R[1])&&(D.mouse[1]=O.invert(D.mouse[0]=R)),clearTimeout(D.wheel);else{if(O.k===I)return;D.mouse=[R,O.invert(R)],lP(this),D.start()}N2($),D.wheel=setTimeout(L,g),D.zoom("mouse",n(w(M(O,I),D.mouse[0],D.mouse[1]),D.extent,a));function L(){D.wheel=null,D.end()}}function P($,...T){if(p||!e.apply(this,arguments))return;var D=$.currentTarget,O=_(this,T,!0).event($),I=ao($.view).on("mousemove.zoom",H,!0).on("mouseup.zoom",j,!0),R=Go($,D),L=$.clientX,V=$.clientY;uQ($.view),RT($),O.mouse=[R,this.__zoom.invert(R)],lP(this),O.start();function H(X){if(N2(X),!O.moved){var Z=X.clientX-L,J=X.clientY-V;O.moved=Z*Z+J*J>k}O.event(X).zoom("mouse",n(w(O.that.__zoom,O.mouse[0]=Go(X,D),O.mouse[1]),O.extent,a))}function j(X){I.on("mousemove.zoom mouseup.zoom",null),hQ(X.view,O.moved),N2(X),O.event(X).end()}}function A($,...T){if(e.apply(this,arguments)){var D=this.__zoom,O=Go($.changedTouches?$.changedTouches[0]:$,this),I=D.invert(O),R=D.k*($.shiftKey?.5:2),L=n(w(M(D,R),O,I),t.apply(this,T),a);N2($),s>0?ao(this).transition().duration(s).call(C,L,O,$):ao(this).call(v.transform,L,O,$)}}function E($,...T){if(e.apply(this,arguments)){var D=$.touches,O=D.length,I=_(this,T,$.changedTouches.length===O).event($),R,L,V,H;for(RT($),L=0;L<O;++L)V=D[L],H=Go(V,this),H=[H,this.__zoom.invert(H),V.identifier],I.touch0?!I.touch1&&I.touch0[2]!==H[2]&&(I.touch1=H,I.taps=0):(I.touch0=H,R=!0,I.taps=1+!!h);h&&(h=clearTimeout(h)),R&&(I.taps<2&&(u=H[0],h=setTimeout(function(){h=null},y)),lP(this),I.start())}}function z($,...T){if(this.__zooming){var D=_(this,T).event($),O=$.changedTouches,I=O.length,R,L,V,H;for(N2($),R=0;R<I;++R)L=O[R],V=Go(L,this),D.touch0&&D.touch0[2]===L.identifier?D.touch0[0]=V:D.touch1&&D.touch1[2]===L.identifier&&(D.touch1[0]=V);if(L=D.that.__zoom,D.touch1){var j=D.touch0[0],X=D.touch0[1],Z=D.touch1[0],J=D.touch1[1],re=(re=Z[0]-j[0])*re+(re=Z[1]-j[1])*re,oe=(oe=J[0]-X[0])*oe+(oe=J[1]-X[1])*oe;L=M(L,Math.sqrt(re/oe)),V=[(j[0]+Z[0])/2,(j[1]+Z[1])/2],H=[(X[0]+J[0])/2,(X[1]+J[1])/2]}else if(D.touch0)V=D.touch0[0],H=D.touch0[1];else return;D.zoom("touch",n(w(L,V,H),D.extent,a))}}function U($,...T){if(this.__zooming){var D=_(this,T).event($),O=$.changedTouches,I=O.length,R,L;for(RT($),p&&clearTimeout(p),p=setTimeout(function(){p=null},y),R=0;R<I;++R)L=O[R],D.touch0&&D.touch0[2]===L.identifier?delete D.touch0:D.touch1&&D.touch1[2]===L.identifier&&delete D.touch1;if(D.touch1&&!D.touch0&&(D.touch0=D.touch1,delete D.touch1),D.touch0)D.touch0[1]=this.__zoom.invert(D.touch0[0]);else if(D.end(),D.taps===2&&(L=Go(L,this),Math.hypot(u[0]-L[0],u[1]-L[1])<x)){var V=ao(this).on("dblclick.zoom");V&&V.apply(this,arguments)}}}return v.wheelDelta=function($){return arguments.length?(o=typeof $=="function"?$:_p(+$),v):o},v.filter=function($){return arguments.length?(e=typeof $=="function"?$:_p(!!$),v):e},v.touchable=function($){return arguments.length?(r=typeof $=="function"?$:_p(!!$),v):r},v.extent=function($){return arguments.length?(t=typeof $=="function"?$:_p([[+$[0][0],+$[0][1]],[+$[1][0],+$[1][1]]]),v):t},v.scaleExtent=function($){return arguments.length?(i[0]=+$[0],i[1]=+$[1],v):[i[0],i[1]]},v.translateExtent=function($){return arguments.length?(a[0][0]=+$[0][0],a[1][0]=+$[1][0],a[0][1]=+$[0][1],a[1][1]=+$[1][1],v):[[a[0][0],a[0][1]],[a[1][0],a[1][1]]]},v.constrain=function($){return arguments.length?(n=$,v):n},v.duration=function($){return arguments.length?(s=+$,v):s},v.interpolate=function($){return arguments.length?(c=$,v):c},v.on=function(){var $=l.on.apply(l,arguments);return $===l?v:$},v.clickDistance=function($){return arguments.length?(k=($=+$)*$,v):Math.sqrt(k)},v.tapDistance=function($){return arguments.length?(x=+$,v):x},v}const Ur={error001:()=>"[React Flow]: Seems like you have not used zustand provider as an ancestor. Help: https://reactflow.dev/error#001",error002:()=>"It looks like you've created a new nodeTypes or edgeTypes object. If this wasn't on purpose please define the nodeTypes/edgeTypes outside of the component or memoize them.",error003:e=>`Node type "${e}" not found. Using fallback type "default".`,error004:()=>"The React Flow parent container needs a width and a height to render the graph.",error005:()=>"Only child nodes can use a parent extent.",error006:()=>"Can't create edge. An edge needs a source and a target.",error007:e=>`The old edge with id=${e} does not exist.`,error009:e=>`Marker type "${e}" doesn't exist.`,error008:(e,{id:t,sourceHandle:n,targetHandle:o})=>`Couldn't create edge for ${e} handle id: "${e==="source"?n:o}", edge id: ${t}.`,error010:()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",error011:e=>`Edge type "${e}" not found. Using fallback type "default".`,error012:e=>`Node with id "${e}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`,error013:(e="react")=>`It seems that you haven't loaded the styles. Please import '@xyflow/${e}/dist/style.css' or base.css to make sure everything is working properly.`,error014:()=>"useNodeConnections: No node ID found. Call useNodeConnections inside a custom Node or provide a node ID.",error015:()=>"It seems that you are trying to drag a node that is not initialized. Please use onNodesChange as explained in the docs."},of=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],AQ=["Enter"," ","Escape"],EQ={"node.a11yDescription.default":"Press enter or space to select a node. Press delete to remove it and escape to cancel.","node.a11yDescription.keyboardDisabled":"Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.","node.a11yDescription.ariaLiveMessage":({direction:e,x:t,y:n})=>`Moved selected node ${e}. New position, x: ${t}, y: ${n}`,"edge.a11yDescription.default":"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.","controls.ariaLabel":"Control Panel","controls.zoomIn.ariaLabel":"Zoom In","controls.zoomOut.ariaLabel":"Zoom Out","controls.fitView.ariaLabel":"Fit View","controls.interactive.ariaLabel":"Toggle Interactivity","minimap.ariaLabel":"Mini Map","handle.ariaLabel":"Handle"};var N0;(function(e){e.Strict="strict",e.Loose="loose"})(N0||(N0={}));var Ed;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(Ed||(Ed={}));var I0;(function(e){e.Partial="partial",e.Full="full"})(I0||(I0={}));const jQ={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null};var xa;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(xa||(xa={}));var rf;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(rf||(rf={}));var fe;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(fe||(fe={}));const mU={[fe.Left]:fe.Right,[fe.Right]:fe.Left,[fe.Top]:fe.Bottom,[fe.Bottom]:fe.Top};function $Q(e){return e===null?null:e?"valid":"invalid"}const PQ=e=>"id"in e&&"source"in e&&"target"in e,jze=e=>"id"in e&&"position"in e&&!("source"in e)&&!("target"in e),VF=e=>"id"in e&&"internals"in e&&!("source"in e)&&!("target"in e),Lf=(e,t=[0,0])=>{const{width:n,height:o}=Oi(e),r=e.origin??t,i=n*r[0],a=o*r[1];return{x:e.position.x-i,y:e.position.y-a}},$ze=(e,t={nodeOrigin:[0,0]})=>{if(e.length===0)return{x:0,y:0,width:0,height:0};const n=e.reduce((o,r)=>{const i=typeof r=="string";let a=!t.nodeLookup&&!i?r:void 0;t.nodeLookup&&(a=i?t.nodeLookup.get(r):VF(r)?r:t.nodeLookup.get(r.id));const s=a?QP(a,t.nodeOrigin):{x:0,y:0,x2:0,y2:0};return oR(o,s)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return rR(n)},Nf=(e,t={})=>{let n={x:1/0,y:1/0,x2:-1/0,y2:-1/0},o=!1;return e.forEach(r=>{(t.filter===void 0||t.filter(r))&&(n=oR(n,QP(r)),o=!0)}),o?rR(n):{x:0,y:0,width:0,height:0}},BF=(e,t,[n,o,r]=[0,0,1],i=!1,a=!1)=>{const s={...Af(t,[n,o,r]),width:t.width/r,height:t.height/r},c=[];for(const l of e.values()){const{measured:h,selectable:u=!0,hidden:p=!1}=l;if(a&&!u||p)continue;const y=h.width??l.width??l.initialWidth??null,g=h.height??l.height??l.initialHeight??null,k=af(s,E0(l)),x=(y??0)*(g??0),v=i&&k>0;(!l.internals.handleBounds||v||k>=x||l.dragging)&&c.push(l)}return c},Pze=(e,t)=>{const n=new Set;return e.forEach(o=>{n.add(o.id)}),t.filter(o=>n.has(o.source)||n.has(o.target))};function zze(e,t){const n=new Map,o=t!=null&&t.nodes?new Set(t.nodes.map(r=>r.id)):null;return e.forEach(r=>{r.measured.width&&r.measured.height&&((t==null?void 0:t.includeHiddenNodes)||!r.hidden)&&(!o||o.has(r.id))&&n.set(r.id,r)}),n}async function Rze({nodes:e,width:t,height:n,panZoom:o,minZoom:r,maxZoom:i},a){if(e.size===0)return Promise.resolve(!0);const s=zze(e,a),c=Nf(s),l=UF(c,t,n,(a==null?void 0:a.minZoom)??r,(a==null?void 0:a.maxZoom)??i,(a==null?void 0:a.padding)??.1);return await o.setViewport(l,{duration:a==null?void 0:a.duration,ease:a==null?void 0:a.ease,interpolate:a==null?void 0:a.interpolate}),Promise.resolve(!0)}function zQ({nodeId:e,nextPosition:t,nodeLookup:n,nodeOrigin:o=[0,0],nodeExtent:r,onError:i}){const a=n.get(e),s=a.parentId?n.get(a.parentId):void 0,{x:c,y:l}=s?s.internals.positionAbsolute:{x:0,y:0},h=a.origin??o;let u=a.extent||r;if(a.extent==="parent"&&!a.expandParent)if(!s)i==null||i("005",Ur.error005());else{const y=s.measured.width,g=s.measured.height;y&&g&&(u=[[c,l],[c+y,l+g]])}else s&&j0(a.extent)&&(u=[[a.extent[0][0]+c,a.extent[0][1]+l],[a.extent[1][0]+c,a.extent[1][1]+l]]);const p=j0(u)?Hd(t,u,a.measured):t;return(a.measured.width===void 0||a.measured.height===void 0)&&(i==null||i("015",Ur.error015())),{position:{x:p.x-c+(a.measured.width??0)*h[0],y:p.y-l+(a.measured.height??0)*h[1]},positionAbsolute:p}}async function Tze({nodesToRemove:e=[],edgesToRemove:t=[],nodes:n,edges:o,onBeforeDelete:r}){const i=new Set(e.map(p=>p.id)),a=[];for(const p of n){if(p.deletable===!1)continue;const y=i.has(p.id),g=!y&&p.parentId&&a.find(k=>k.id===p.parentId);(y||g)&&a.push(p)}const s=new Set(t.map(p=>p.id)),c=o.filter(p=>p.deletable!==!1),h=Pze(a,c);for(const p of c)s.has(p.id)&&!h.find(g=>g.id===p.id)&&h.push(p);if(!r)return{edges:h,nodes:a};const u=await r({nodes:a,edges:h});return typeof u=="boolean"?u?{edges:h,nodes:a}:{edges:[],nodes:[]}:u}const A0=(e,t=0,n=1)=>Math.min(Math.max(e,t),n),Hd=(e={x:0,y:0},t,n)=>({x:A0(e.x,t[0][0],t[1][0]-((n==null?void 0:n.width)??0)),y:A0(e.y,t[0][1],t[1][1]-((n==null?void 0:n.height)??0))});function RQ(e,t,n){const{width:o,height:r}=Oi(n),{x:i,y:a}=n.internals.positionAbsolute;return Hd(e,[[i,a],[i+o,a+r]],t)}const gU=(e,t,n)=>e<t?A0(Math.abs(e-t),1,t)/t:e>n?-A0(Math.abs(e-n),1,t)/t:0,TQ=(e,t,n=15,o=40)=>{const r=gU(e.x,o,t.width-o)*n,i=gU(e.y,o,t.height-o)*n;return[r,i]},oR=(e,t)=>({x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x2,t.x2),y2:Math.max(e.y2,t.y2)}),HH=({x:e,y:t,width:n,height:o})=>({x:e,y:t,x2:e+n,y2:t+o}),rR=({x:e,y:t,x2:n,y2:o})=>({x:e,y:t,width:n-e,height:o-t}),E0=(e,t=[0,0])=>{var r,i;const{x:n,y:o}=VF(e)?e.internals.positionAbsolute:Lf(e,t);return{x:n,y:o,width:((r=e.measured)==null?void 0:r.width)??e.width??e.initialWidth??0,height:((i=e.measured)==null?void 0:i.height)??e.height??e.initialHeight??0}},QP=(e,t=[0,0])=>{var r,i;const{x:n,y:o}=VF(e)?e.internals.positionAbsolute:Lf(e,t);return{x:n,y:o,x2:n+(((r=e.measured)==null?void 0:r.width)??e.width??e.initialWidth??0),y2:o+(((i=e.measured)==null?void 0:i.height)??e.height??e.initialHeight??0)}},DQ=(e,t)=>rR(oR(HH(e),HH(t))),af=(e,t)=>{const n=Math.max(0,Math.min(e.x+e.width,t.x+t.width)-Math.max(e.x,t.x)),o=Math.max(0,Math.min(e.y+e.height,t.y+t.height)-Math.max(e.y,t.y));return Math.ceil(n*o)},kU=e=>Yo(e.width)&&Yo(e.height)&&Yo(e.x)&&Yo(e.y),Yo=e=>!isNaN(e)&&isFinite(e),Dze=(e,t)=>{},If=(e,t=[1,1])=>({x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}),Af=({x:e,y:t},[n,o,r],i=!1,a=[1,1])=>{const s={x:(e-n)/r,y:(t-o)/r};return i?If(s,a):s},JP=({x:e,y:t},[n,o,r])=>({x:e*r+n,y:t*r+o});function bu(e,t){if(typeof e=="number")return Math.floor((t-t/(1+e))*.5);if(typeof e=="string"&&e.endsWith("px")){const n=parseFloat(e);if(!Number.isNaN(n))return Math.floor(n)}if(typeof e=="string"&&e.endsWith("%")){const n=parseFloat(e);if(!Number.isNaN(n))return Math.floor(t*n*.01)}return console.error(`[React Flow] The padding value "${e}" is invalid. Please provide a number or a string with a valid unit (px or %).`),0}function Hze(e,t,n){if(typeof e=="string"||typeof e=="number"){const o=bu(e,n),r=bu(e,t);return{top:o,right:r,bottom:o,left:r,x:r*2,y:o*2}}if(typeof e=="object"){const o=bu(e.top??e.y??0,n),r=bu(e.bottom??e.y??0,n),i=bu(e.left??e.x??0,t),a=bu(e.right??e.x??0,t);return{top:o,right:a,bottom:r,left:i,x:i+a,y:o+r}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function Oze(e,t,n,o,r,i){const{x:a,y:s}=JP(e,[t,n,o]),{x:c,y:l}=JP({x:e.x+e.width,y:e.y+e.height},[t,n,o]),h=r-c,u=i-l;return{left:Math.floor(a),top:Math.floor(s),right:Math.floor(h),bottom:Math.floor(u)}}const UF=(e,t,n,o,r,i)=>{const a=Hze(i,t,n),s=(t-a.x)/e.width,c=(n-a.y)/e.height,l=Math.min(s,c),h=A0(l,o,r),u=e.x+e.width/2,p=e.y+e.height/2,y=t/2-u*h,g=n/2-p*h,k=Oze(e,y,g,h,t,n),x={left:Math.min(k.left-a.left,0),top:Math.min(k.top-a.top,0),right:Math.min(k.right-a.right,0),bottom:Math.min(k.bottom-a.bottom,0)};return{x:y-x.left+x.right,y:g-x.top+x.bottom,zoom:h}},sf=()=>{var e;return typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)==null?void 0:e.indexOf("Mac"))>=0};function j0(e){return e!=null&&e!=="parent"}function Oi(e){var t,n;return{width:((t=e.measured)==null?void 0:t.width)??e.width??e.initialWidth??0,height:((n=e.measured)==null?void 0:n.height)??e.height??e.initialHeight??0}}function HQ(e){var t,n;return(((t=e.measured)==null?void 0:t.width)??e.width??e.initialWidth)!==void 0&&(((n=e.measured)==null?void 0:n.height)??e.height??e.initialHeight)!==void 0}function OQ(e,t={width:0,height:0},n,o,r){const i={...e},a=o.get(n);if(a){const s=a.origin||r;i.x+=a.internals.positionAbsolute.x-(t.width??0)*s[0],i.y+=a.internals.positionAbsolute.y-(t.height??0)*s[1]}return i}function vU(e,t){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}function Fze(){let e,t;return{promise:new Promise((o,r)=>{e=o,t=r}),resolve:e,reject:t}}function qze(e){return{...EQ,...e||{}}}function Ih(e,{snapGrid:t=[0,0],snapToGrid:n=!1,transform:o,containerBounds:r}){const{x:i,y:a}=Qo(e),s=Af({x:i-((r==null?void 0:r.left)??0),y:a-((r==null?void 0:r.top)??0)},o),{x:c,y:l}=n?If(s,t):s;return{xSnapped:c,ySnapped:l,...s}}const WF=e=>({width:e.offsetWidth,height:e.offsetHeight}),FQ=e=>{var t;return((t=e==null?void 0:e.getRootNode)==null?void 0:t.call(e))||(window==null?void 0:window.document)},Vze=["INPUT","SELECT","TEXTAREA"];function qQ(e){var o,r;const t=((r=(o=e.composedPath)==null?void 0:o.call(e))==null?void 0:r[0])||e.target;return(t==null?void 0:t.nodeType)!==1?!1:Vze.includes(t.nodeName)||t.hasAttribute("contenteditable")||!!t.closest(".nokey")}const VQ=e=>"clientX"in e,Qo=(e,t)=>{var i,a;const n=VQ(e),o=n?e.clientX:(i=e.touches)==null?void 0:i[0].clientX,r=n?e.clientY:(a=e.touches)==null?void 0:a[0].clientY;return{x:o-((t==null?void 0:t.left)??0),y:r-((t==null?void 0:t.top)??0)}},xU=(e,t,n,o,r)=>{const i=t.querySelectorAll(`.${e}`);return!i||!i.length?null:Array.from(i).map(a=>{const s=a.getBoundingClientRect();return{id:a.getAttribute("data-handleid"),type:e,nodeId:r,position:a.getAttribute("data-handlepos"),x:(s.left-n.left)/o,y:(s.top-n.top)/o,...WF(a)}})};function BQ({sourceX:e,sourceY:t,targetX:n,targetY:o,sourceControlX:r,sourceControlY:i,targetControlX:a,targetControlY:s}){const c=e*.125+r*.375+a*.375+n*.125,l=t*.125+i*.375+s*.375+o*.125,h=Math.abs(c-e),u=Math.abs(l-t);return[c,l,h,u]}function Cp(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function wU({pos:e,x1:t,y1:n,x2:o,y2:r,c:i}){switch(e){case fe.Left:return[t-Cp(t-o,i),n];case fe.Right:return[t+Cp(o-t,i),n];case fe.Top:return[t,n-Cp(n-r,i)];case fe.Bottom:return[t,n+Cp(r-n,i)]}}function iR({sourceX:e,sourceY:t,sourcePosition:n=fe.Bottom,targetX:o,targetY:r,targetPosition:i=fe.Top,curvature:a=.25}){const[s,c]=wU({pos:n,x1:e,y1:t,x2:o,y2:r,c:a}),[l,h]=wU({pos:i,x1:o,y1:r,x2:e,y2:t,c:a}),[u,p,y,g]=BQ({sourceX:e,sourceY:t,targetX:o,targetY:r,sourceControlX:s,sourceControlY:c,targetControlX:l,targetControlY:h});return[`M${e},${t} C${s},${c} ${l},${h} ${o},${r}`,u,p,y,g]}function UQ({sourceX:e,sourceY:t,targetX:n,targetY:o}){const r=Math.abs(n-e)/2,i=n<e?n+r:n-r,a=Math.abs(o-t)/2,s=o<t?o+a:o-a;return[i,s,r,a]}function Bze({sourceNode:e,targetNode:t,selected:n=!1,zIndex:o=0,elevateOnSelect:r=!1,zIndexMode:i="basic"}){if(i==="manual")return o;const a=r&&n?o+1e3:o,s=Math.max(e.parentId||r&&e.selected?e.internals.z:0,t.parentId||r&&t.selected?t.internals.z:0);return a+s}function Uze({sourceNode:e,targetNode:t,width:n,height:o,transform:r}){const i=oR(QP(e),QP(t));i.x===i.x2&&(i.x2+=1),i.y===i.y2&&(i.y2+=1);const a={x:-r[0]/r[2],y:-r[1]/r[2],width:n/r[2],height:o/r[2]};return af(a,rR(i))>0}const Wze=({source:e,sourceHandle:t,target:n,targetHandle:o})=>`xy-edge__${e}${t||""}-${n}${o||""}`,Gze=(e,t)=>t.some(n=>n.source===e.source&&n.target===e.target&&(n.sourceHandle===e.sourceHandle||!n.sourceHandle&&!e.sourceHandle)&&(n.targetHandle===e.targetHandle||!n.targetHandle&&!e.targetHandle)),Kze=(e,t,n={})=>{if(!e.source||!e.target)return t;const o=n.getEdgeId||Wze;let r;return PQ(e)?r={...e}:r={...e,id:o(e)},Gze(r,t)?t:(r.sourceHandle===null&&delete r.sourceHandle,r.targetHandle===null&&delete r.targetHandle,t.concat(r))};function WQ({sourceX:e,sourceY:t,targetX:n,targetY:o}){const[r,i,a,s]=UQ({sourceX:e,sourceY:t,targetX:n,targetY:o});return[`M ${e},${t}L ${n},${o}`,r,i,a,s]}const MU={[fe.Left]:{x:-1,y:0},[fe.Right]:{x:1,y:0},[fe.Top]:{x:0,y:-1},[fe.Bottom]:{x:0,y:1}},Xze=({source:e,sourcePosition:t=fe.Bottom,target:n})=>t===fe.Left||t===fe.Right?e.x<n.x?{x:1,y:0}:{x:-1,y:0}:e.y<n.y?{x:0,y:1}:{x:0,y:-1},bU=(e,t)=>Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2));function Zze({source:e,sourcePosition:t=fe.Bottom,target:n,targetPosition:o=fe.Top,center:r,offset:i,stepPosition:a}){const s=MU[t],c=MU[o],l={x:e.x+s.x*i,y:e.y+s.y*i},h={x:n.x+c.x*i,y:n.y+c.y*i},u=Xze({source:l,sourcePosition:t,target:h}),p=u.x!==0?"x":"y",y=u[p];let g=[],k,x;const v={x:0,y:0},M={x:0,y:0},[,,w,b]=UQ({sourceX:e.x,sourceY:e.y,targetX:n.x,targetY:n.y});if(s[p]*c[p]===-1){p==="x"?(k=r.x??l.x+(h.x-l.x)*a,x=r.y??(l.y+h.y)/2):(k=r.x??(l.x+h.x)/2,x=r.y??l.y+(h.y-l.y)*a);const N=[{x:k,y:l.y},{x:k,y:h.y}],P=[{x:l.x,y:x},{x:h.x,y:x}];s[p]===y?g=p==="x"?N:P:g=p==="x"?P:N}else{const N=[{x:l.x,y:h.y}],P=[{x:h.x,y:l.y}];if(p==="x"?g=s.x===y?P:N:g=s.y===y?N:P,t===o){const $=Math.abs(e[p]-n[p]);if($<=i){const T=Math.min(i-1,i-$);s[p]===y?v[p]=(l[p]>e[p]?-1:1)*T:M[p]=(h[p]>n[p]?-1:1)*T}}if(t!==o){const $=p==="x"?"y":"x",T=s[p]===c[$],D=l[$]>h[$],O=l[$]<h[$];(s[p]===1&&(!T&&D||T&&O)||s[p]!==1&&(!T&&O||T&&D))&&(g=p==="x"?N:P)}const A={x:l.x+v.x,y:l.y+v.y},E={x:h.x+M.x,y:h.y+M.y},z=Math.max(Math.abs(A.x-g[0].x),Math.abs(E.x-g[0].x)),U=Math.max(Math.abs(A.y-g[0].y),Math.abs(E.y-g[0].y));z>=U?(k=(A.x+E.x)/2,x=g[0].y):(k=g[0].x,x=(A.y+E.y)/2)}const C={x:l.x+v.x,y:l.y+v.y},_={x:h.x+M.x,y:h.y+M.y};return[[e,...C.x!==g[0].x||C.y!==g[0].y?[C]:[],...g,..._.x!==g[g.length-1].x||_.y!==g[g.length-1].y?[_]:[],n],k,x,w,b]}function Yze(e,t,n,o){const r=Math.min(bU(e,t)/2,bU(t,n)/2,o),{x:i,y:a}=t;if(e.x===i&&i===n.x||e.y===a&&a===n.y)return`L${i} ${a}`;if(e.y===a){const l=e.x<n.x?-1:1,h=e.y<n.y?1:-1;return`L ${i+r*l},${a}Q ${i},${a} ${i},${a+r*h}`}const s=e.x<n.x?1:-1,c=e.y<n.y?-1:1;return`L ${i},${a+r*c}Q ${i},${a} ${i+r*s},${a}`}function cf({sourceX:e,sourceY:t,sourcePosition:n=fe.Bottom,targetX:o,targetY:r,targetPosition:i=fe.Top,borderRadius:a=5,centerX:s,centerY:c,offset:l=20,stepPosition:h=.5}){const[u,p,y,g,k]=Zze({source:{x:e,y:t},sourcePosition:n,target:{x:o,y:r},targetPosition:i,center:{x:s,y:c},offset:l,stepPosition:h});let x=`M${u[0].x} ${u[0].y}`;for(let v=1;v<u.length-1;v++)x+=Yze(u[v-1],u[v],u[v+1],a);return x+=`L${u[u.length-1].x} ${u[u.length-1].y}`,[x,p,y,g,k]}function _U(e){var t;return e&&!!(e.internals.handleBounds||(t=e.handles)!=null&&t.length)&&!!(e.measured.width||e.width||e.initialWidth)}function Qze(e){var u;const{sourceNode:t,targetNode:n}=e;if(!_U(t)||!_U(n))return null;const o=t.internals.handleBounds||CU(t.handles),r=n.internals.handleBounds||CU(n.handles),i=SU((o==null?void 0:o.source)??[],e.sourceHandle),a=SU(e.connectionMode===N0.Strict?(r==null?void 0:r.target)??[]:((r==null?void 0:r.target)??[]).concat((r==null?void 0:r.source)??[]),e.targetHandle);if(!i||!a)return(u=e.onError)==null||u.call(e,"008",Ur.error008(i?"target":"source",{id:e.id,sourceHandle:e.sourceHandle,targetHandle:e.targetHandle})),null;const s=(i==null?void 0:i.position)||fe.Bottom,c=(a==null?void 0:a.position)||fe.Top,l=Od(t,i,s),h=Od(n,a,c);return{sourceX:l.x,sourceY:l.y,targetX:h.x,targetY:h.y,sourcePosition:s,targetPosition:c}}function CU(e){if(!e)return null;const t=[],n=[];for(const o of e)o.width=o.width??1,o.height=o.height??1,o.type==="source"?t.push(o):o.type==="target"&&n.push(o);return{source:t,target:n}}function Od(e,t,n=fe.Left,o=!1){const r=((t==null?void 0:t.x)??0)+e.internals.positionAbsolute.x,i=((t==null?void 0:t.y)??0)+e.internals.positionAbsolute.y,{width:a,height:s}=t??Oi(e);if(o)return{x:r+a/2,y:i+s/2};switch((t==null?void 0:t.position)??n){case fe.Top:return{x:r+a/2,y:i};case fe.Right:return{x:r+a,y:i+s/2};case fe.Bottom:return{x:r+a/2,y:i+s};case fe.Left:return{x:r,y:i+s/2}}}function SU(e,t){return e&&(t?e.find(n=>n.id===t):e[0])||null}function OH(e,t){return e?typeof e=="string"?e:`${t?`${t}__`:""}${Object.keys(e).sort().map(o=>`${o}=${e[o]}`).join("&")}`:""}function Jze(e,{id:t,defaultColor:n,defaultMarkerStart:o,defaultMarkerEnd:r}){const i=new Set;return e.reduce((a,s)=>([s.markerStart||o,s.markerEnd||r].forEach(c=>{if(c&&typeof c=="object"){const l=OH(c,t);i.has(l)||(a.push({id:l,color:c.color||n,...c}),i.add(l))}}),a),[]).sort((a,s)=>a.id.localeCompare(s.id))}const GQ=1e3,eRe=10,GF={nodeOrigin:[0,0],nodeExtent:of,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},tRe={...GF,checkEquality:!0};function KF(e,t){const n={...e};for(const o in t)t[o]!==void 0&&(n[o]=t[o]);return n}function nRe(e,t,n){const o=KF(GF,n);for(const r of e.values())if(r.parentId)ZF(r,e,t,o);else{const i=Lf(r,o.nodeOrigin),a=j0(r.extent)?r.extent:o.nodeExtent,s=Hd(i,a,Oi(r));r.internals.positionAbsolute=s}}function oRe(e,t){if(!e.handles)return e.measured?t==null?void 0:t.internals.handleBounds:void 0;const n=[],o=[];for(const r of e.handles){const i={id:r.id,width:r.width??1,height:r.height??1,nodeId:e.id,x:r.x,y:r.y,position:r.position,type:r.type};r.type==="source"?n.push(i):r.type==="target"&&o.push(i)}return{source:n,target:o}}function XF(e){return e==="manual"}function FH(e,t,n,o={}){var h,u;const r=KF(tRe,o),i={i:0},a=new Map(t),s=r!=null&&r.elevateNodesOnSelect&&!XF(r.zIndexMode)?GQ:0;let c=e.length>0,l=!1;t.clear(),n.clear();for(const p of e){let y=a.get(p.id);if(r.checkEquality&&p===(y==null?void 0:y.internals.userNode))t.set(p.id,y);else{const g=Lf(p,r.nodeOrigin),k=j0(p.extent)?p.extent:r.nodeExtent,x=Hd(g,k,Oi(p));y={...r.defaults,...p,measured:{width:(h=p.measured)==null?void 0:h.width,height:(u=p.measured)==null?void 0:u.height},internals:{positionAbsolute:x,handleBounds:oRe(p,y),z:KQ(p,s,r.zIndexMode),userNode:p}},t.set(p.id,y)}(y.measured===void 0||y.measured.width===void 0||y.measured.height===void 0)&&!y.hidden&&(c=!1),p.parentId&&ZF(y,t,n,o,i),l||(l=p.selected??!1)}return{nodesInitialized:c,hasSelectedNodes:l}}function rRe(e,t){if(!e.parentId)return;const n=t.get(e.parentId);n?n.set(e.id,e):t.set(e.parentId,new Map([[e.id,e]]))}function ZF(e,t,n,o,r){const{elevateNodesOnSelect:i,nodeOrigin:a,nodeExtent:s,zIndexMode:c}=KF(GF,o),l=e.parentId,h=t.get(l);if(!h){console.warn(`Parent node ${l} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);return}rRe(e,n),r&&!h.parentId&&h.internals.rootParentIndex===void 0&&c==="auto"&&(h.internals.rootParentIndex=++r.i,h.internals.z=h.internals.z+r.i*eRe),r&&h.internals.rootParentIndex!==void 0&&(r.i=h.internals.rootParentIndex);const u=i&&!XF(c)?GQ:0,{x:p,y,z:g}=iRe(e,h,a,s,u,c),{positionAbsolute:k}=e.internals,x=p!==k.x||y!==k.y;(x||g!==e.internals.z)&&t.set(e.id,{...e,internals:{...e.internals,positionAbsolute:x?{x:p,y}:k,z:g}})}function KQ(e,t,n){const o=Yo(e.zIndex)?e.zIndex:0;return XF(n)?o:o+(e.selected?t:0)}function iRe(e,t,n,o,r,i){const{x:a,y:s}=t.internals.positionAbsolute,c=Oi(e),l=Lf(e,n),h=j0(e.extent)?Hd(l,e.extent,c):l;let u=Hd({x:a+h.x,y:s+h.y},o,c);e.extent==="parent"&&(u=RQ(u,c,t));const p=KQ(e,r,i),y=t.internals.z??0;return{x:u.x,y:u.y,z:y>=p?y+1:p}}function YF(e,t,n,o=[0,0]){var a;const r=[],i=new Map;for(const s of e){const c=t.get(s.parentId);if(!c)continue;const l=((a=i.get(s.parentId))==null?void 0:a.expandedRect)??E0(c),h=DQ(l,s.rect);i.set(s.parentId,{expandedRect:h,parent:c})}return i.size>0&&i.forEach(({expandedRect:s,parent:c},l)=>{var w;const h=c.internals.positionAbsolute,u=Oi(c),p=c.origin??o,y=s.x<h.x?Math.round(Math.abs(h.x-s.x)):0,g=s.y<h.y?Math.round(Math.abs(h.y-s.y)):0,k=Math.max(u.width,Math.round(s.width)),x=Math.max(u.height,Math.round(s.height)),v=(k-u.width)*p[0],M=(x-u.height)*p[1];(y>0||g>0||v||M)&&(r.push({id:l,type:"position",position:{x:c.position.x-y+v,y:c.position.y-g+M}}),(w=n.get(l))==null||w.forEach(b=>{e.some(C=>C.id===b.id)||r.push({id:b.id,type:"position",position:{x:b.position.x+y,y:b.position.y+g}})})),(u.width<s.width||u.height<s.height||y||g)&&r.push({id:l,type:"dimensions",setAttributes:!0,dimensions:{width:k+(y?p[0]*y-v:0),height:x+(g?p[1]*g-M:0)}})}),r}function aRe(e,t,n,o,r,i,a){const s=o==null?void 0:o.querySelector(".xyflow__viewport");let c=!1;if(!s)return{changes:[],updatedInternals:c};const l=[],h=window.getComputedStyle(s),{m22:u}=new window.DOMMatrixReadOnly(h.transform),p=[];for(const y of e.values()){const g=t.get(y.id);if(!g)continue;if(g.hidden){t.set(g.id,{...g,internals:{...g.internals,handleBounds:void 0}}),c=!0;continue}const k=WF(y.nodeElement),x=g.measured.width!==k.width||g.measured.height!==k.height;if(!!(k.width&&k.height&&(x||!g.internals.handleBounds||y.force))){const M=y.nodeElement.getBoundingClientRect(),w=j0(g.extent)?g.extent:i;let{positionAbsolute:b}=g.internals;g.parentId&&g.extent==="parent"?b=RQ(b,k,t.get(g.parentId)):w&&(b=Hd(b,w,k));const C={...g,measured:k,internals:{...g.internals,positionAbsolute:b,handleBounds:{source:xU("source",y.nodeElement,M,u,g.id),target:xU("target",y.nodeElement,M,u,g.id)}}};t.set(g.id,C),g.parentId&&ZF(C,t,n,{nodeOrigin:r,zIndexMode:a}),c=!0,x&&(l.push({id:g.id,type:"dimensions",dimensions:k}),g.expandParent&&g.parentId&&p.push({id:g.id,parentId:g.parentId,rect:E0(C,r)}))}}if(p.length>0){const y=YF(p,t,n,r);l.push(...y)}return{changes:l,updatedInternals:c}}async function sRe({delta:e,panZoom:t,transform:n,translateExtent:o,width:r,height:i}){if(!t||!e.x&&!e.y)return Promise.resolve(!1);const a=await t.setViewportConstrained({x:n[0]+e.x,y:n[1]+e.y,zoom:n[2]},[[0,0],[r,i]],o),s=!!a&&(a.x!==n[0]||a.y!==n[1]||a.k!==n[2]);return Promise.resolve(s)}function LU(e,t,n,o,r,i){let a=r;const s=o.get(a)||new Map;o.set(a,s.set(n,t)),a=`${r}-${e}`;const c=o.get(a)||new Map;if(o.set(a,c.set(n,t)),i){a=`${r}-${e}-${i}`;const l=o.get(a)||new Map;o.set(a,l.set(n,t))}}function XQ(e,t,n){e.clear(),t.clear();for(const o of n){const{source:r,target:i,sourceHandle:a=null,targetHandle:s=null}=o,c={edgeId:o.id,source:r,target:i,sourceHandle:a,targetHandle:s},l=`${r}-${a}--${i}-${s}`,h=`${i}-${s}--${r}-${a}`;LU("source",c,h,e,r,a),LU("target",c,l,e,i,s),t.set(o.id,o)}}function ZQ(e,t){if(!e.parentId)return!1;const n=t.get(e.parentId);return n?n.selected?!0:ZQ(n,t):!1}function NU(e,t,n){var r;let o=e;do{if((r=o==null?void 0:o.matches)!=null&&r.call(o,t))return!0;if(o===n)return!1;o=o==null?void 0:o.parentElement}while(o);return!1}function cRe(e,t,n,o){const r=new Map;for(const[i,a]of e)if((a.selected||a.id===o)&&(!a.parentId||!ZQ(a,e))&&(a.draggable||t&&typeof a.draggable>"u")){const s=e.get(i);s&&r.set(i,{id:i,position:s.position||{x:0,y:0},distance:{x:n.x-s.internals.positionAbsolute.x,y:n.y-s.internals.positionAbsolute.y},extent:s.extent,parentId:s.parentId,origin:s.origin,expandParent:s.expandParent,internals:{positionAbsolute:s.internals.positionAbsolute||{x:0,y:0}},measured:{width:s.measured.width??0,height:s.measured.height??0}})}return r}function TT({nodeId:e,dragItems:t,nodeLookup:n,dragging:o=!0}){var a,s,c;const r=[];for(const[l,h]of t){const u=(a=n.get(l))==null?void 0:a.internals.userNode;u&&r.push({...u,position:h.position,dragging:o})}if(!e)return[r[0],r];const i=(s=n.get(e))==null?void 0:s.internals.userNode;return[i?{...i,position:((c=t.get(e))==null?void 0:c.position)||i.position,dragging:o}:r[0],r]}function lRe({dragItems:e,snapGrid:t,x:n,y:o}){const r=e.values().next().value;if(!r)return null;const i={x:n-r.distance.x,y:o-r.distance.y},a=If(i,t);return{x:a.x-i.x,y:a.y-i.y}}function dRe({onNodeMouseDown:e,getStoreItems:t,onDragStart:n,onDrag:o,onDragStop:r}){let i={x:null,y:null},a=0,s=new Map,c=!1,l={x:0,y:0},h=null,u=!1,p=null,y=!1,g=!1,k=null;function x({noDragClassName:M,handleSelector:w,domNode:b,isSelectable:C,nodeId:_,nodeClickDistance:S=0}){p=ao(b);function N({x:z,y:U}){const{nodeLookup:$,nodeExtent:T,snapGrid:D,snapToGrid:O,nodeOrigin:I,onNodeDrag:R,onSelectionDrag:L,onError:V,updateNodePositions:H}=t();i={x:z,y:U};let j=!1;const X=s.size>1,Z=X&&T?HH(Nf(s)):null,J=X&&O?lRe({dragItems:s,snapGrid:D,x:z,y:U}):null;for(const[re,oe]of s){if(!$.has(re))continue;let ne={x:z-oe.distance.x,y:U-oe.distance.y};O&&(ne=J?{x:Math.round(ne.x+J.x),y:Math.round(ne.y+J.y)}:If(ne,D));let le=null;if(X&&T&&!oe.extent&&Z){const{positionAbsolute:xe}=oe.internals,Te=xe.x-Z.x+T[0][0],Ye=xe.x+oe.measured.width-Z.x2+T[1][0],ue=xe.y-Z.y+T[0][1],Ie=xe.y+oe.measured.height-Z.y2+T[1][1];le=[[Te,ue],[Ye,Ie]]}const{position:ve,positionAbsolute:ge}=zQ({nodeId:re,nextPosition:ne,nodeLookup:$,nodeExtent:le||T,nodeOrigin:I,onError:V});j=j||oe.position.x!==ve.x||oe.position.y!==ve.y,oe.position=ve,oe.internals.positionAbsolute=ge}if(g=g||j,!!j&&(H(s,!0),k&&(o||R||!_&&L))){const[re,oe]=TT({nodeId:_,dragItems:s,nodeLookup:$});o==null||o(k,s,re,oe),R==null||R(k,re,oe),_||L==null||L(k,oe)}}async function P(){if(!h)return;const{transform:z,panBy:U,autoPanSpeed:$,autoPanOnNodeDrag:T}=t();if(!T){c=!1,cancelAnimationFrame(a);return}const[D,O]=TQ(l,h,$);(D!==0||O!==0)&&(i.x=(i.x??0)-D/z[2],i.y=(i.y??0)-O/z[2],await U({x:D,y:O})&&N(i)),a=requestAnimationFrame(P)}function A(z){var X;const{nodeLookup:U,multiSelectionActive:$,nodesDraggable:T,transform:D,snapGrid:O,snapToGrid:I,selectNodesOnDrag:R,onNodeDragStart:L,onSelectionDragStart:V,unselectNodesAndEdges:H}=t();u=!0,(!R||!C)&&!$&&_&&((X=U.get(_))!=null&&X.selected||H()),C&&R&&_&&(e==null||e(_));const j=Ih(z.sourceEvent,{transform:D,snapGrid:O,snapToGrid:I,containerBounds:h});if(i=j,s=cRe(U,T,j,_),s.size>0&&(n||L||!_&&V)){const[Z,J]=TT({nodeId:_,dragItems:s,nodeLookup:U});n==null||n(z.sourceEvent,s,Z,J),L==null||L(z.sourceEvent,Z,J),_||V==null||V(z.sourceEvent,J)}}const E=fQ().clickDistance(S).on("start",z=>{const{domNode:U,nodeDragThreshold:$,transform:T,snapGrid:D,snapToGrid:O}=t();h=(U==null?void 0:U.getBoundingClientRect())||null,y=!1,g=!1,k=z.sourceEvent,$===0&&A(z),i=Ih(z.sourceEvent,{transform:T,snapGrid:D,snapToGrid:O,containerBounds:h}),l=Qo(z.sourceEvent,h)}).on("drag",z=>{const{autoPanOnNodeDrag:U,transform:$,snapGrid:T,snapToGrid:D,nodeDragThreshold:O,nodeLookup:I}=t(),R=Ih(z.sourceEvent,{transform:$,snapGrid:T,snapToGrid:D,containerBounds:h});if(k=z.sourceEvent,(z.sourceEvent.type==="touchmove"&&z.sourceEvent.touches.length>1||_&&!I.has(_))&&(y=!0),!y){if(!c&&U&&u&&(c=!0,P()),!u){const L=Qo(z.sourceEvent,h),V=L.x-l.x,H=L.y-l.y;Math.sqrt(V*V+H*H)>O&&A(z)}(i.x!==R.xSnapped||i.y!==R.ySnapped)&&s&&u&&(l=Qo(z.sourceEvent,h),N(R))}}).on("end",z=>{if(!(!u||y)&&(c=!1,u=!1,cancelAnimationFrame(a),s.size>0)){const{nodeLookup:U,updateNodePositions:$,onNodeDragStop:T,onSelectionDragStop:D}=t();if(g&&($(s,!1),g=!1),r||T||!_&&D){const[O,I]=TT({nodeId:_,dragItems:s,nodeLookup:U,dragging:!1});r==null||r(z.sourceEvent,s,O,I),T==null||T(z.sourceEvent,O,I),_||D==null||D(z.sourceEvent,I)}}}).filter(z=>{const U=z.target;return!z.button&&(!M||!NU(U,`.${M}`,b))&&(!w||NU(U,w,b))});p.call(E)}function v(){p==null||p.on(".drag",null)}return{update:x,destroy:v}}function uRe(e,t,n){const o=[],r={x:e.x-n,y:e.y-n,width:n*2,height:n*2};for(const i of t.values())af(r,E0(i))>0&&o.push(i);return o}const hRe=250;function fRe(e,t,n,o){var s,c;let r=[],i=1/0;const a=uRe(e,n,t+hRe);for(const l of a){const h=[...((s=l.internals.handleBounds)==null?void 0:s.source)??[],...((c=l.internals.handleBounds)==null?void 0:c.target)??[]];for(const u of h){if(o.nodeId===u.nodeId&&o.type===u.type&&o.id===u.id)continue;const{x:p,y}=Od(l,u,u.position,!0),g=Math.sqrt(Math.pow(p-e.x,2)+Math.pow(y-e.y,2));g>t||(g<i?(r=[{...u,x:p,y}],i=g):g===i&&r.push({...u,x:p,y}))}}if(!r.length)return null;if(r.length>1){const l=o.type==="source"?"target":"source";return r.find(h=>h.type===l)??r[0]}return r[0]}function YQ(e,t,n,o,r,i=!1){var l,h,u;const a=o.get(e);if(!a)return null;const s=r==="strict"?(l=a.internals.handleBounds)==null?void 0:l[t]:[...((h=a.internals.handleBounds)==null?void 0:h.source)??[],...((u=a.internals.handleBounds)==null?void 0:u.target)??[]],c=(n?s==null?void 0:s.find(p=>p.id===n):s==null?void 0:s[0])??null;return c&&i?{...c,...Od(a,c,c.position,!0)}:c}function QQ(e,t){return e||(t!=null&&t.classList.contains("target")?"target":t!=null&&t.classList.contains("source")?"source":null)}function pRe(e,t){let n=null;return t?n=!0:e&&!t&&(n=!1),n}const JQ=()=>!0;function yRe(e,{connectionMode:t,connectionRadius:n,handleId:o,nodeId:r,edgeUpdaterType:i,isTarget:a,domNode:s,nodeLookup:c,lib:l,autoPanOnConnect:h,flowId:u,panBy:p,cancelConnection:y,onConnectStart:g,onConnect:k,onConnectEnd:x,isValidConnection:v=JQ,onReconnectEnd:M,updateConnection:w,getTransform:b,getFromHandle:C,autoPanSpeed:_,dragThreshold:S=1,handleDomNode:N}){const P=FQ(e.target);let A=0,E;const{x:z,y:U}=Qo(e),$=QQ(i,N),T=s==null?void 0:s.getBoundingClientRect();let D=!1;if(!T||!$)return;const O=YQ(r,$,o,c,t);if(!O)return;let I=Qo(e,T),R=!1,L=null,V=!1,H=null;function j(){if(!h||!T)return;const[ve,ge]=TQ(I,T,_);p({x:ve,y:ge}),A=requestAnimationFrame(j)}const X={...O,nodeId:r,type:$,position:O.position},Z=c.get(r);let re={inProgress:!0,isValid:null,from:Od(Z,X,fe.Left,!0),fromHandle:X,fromPosition:X.position,fromNode:Z,to:I,toHandle:null,toPosition:mU[X.position],toNode:null,pointer:I};function oe(){D=!0,w(re),g==null||g(e,{nodeId:r,handleId:o,handleType:$})}S===0&&oe();function ne(ve){if(!D){const{x:Ie,y:Pt}=Qo(ve),wt=Ie-z,en=Pt-U;if(!(wt*wt+en*en>S*S))return;oe()}if(!C()||!X){le(ve);return}const ge=b();I=Qo(ve,T),E=fRe(Af(I,ge,!1,[1,1]),n,c,X),R||(j(),R=!0);const xe=eJ(ve,{handle:E,connectionMode:t,fromNodeId:r,fromHandleId:o,fromType:a?"target":"source",isValidConnection:v,doc:P,lib:l,flowId:u,nodeLookup:c});H=xe.handleDomNode,L=xe.connection,V=pRe(!!E,xe.isValid);const Te=c.get(r),Ye=Te?Od(Te,X,fe.Left,!0):re.from,ue={...re,from:Ye,isValid:V,to:xe.toHandle&&V?JP({x:xe.toHandle.x,y:xe.toHandle.y},ge):I,toHandle:xe.toHandle,toPosition:V&&xe.toHandle?xe.toHandle.position:mU[X.position],toNode:xe.toHandle?c.get(xe.toHandle.nodeId):null,pointer:I};w(ue),re=ue}function le(ve){if(!("touches"in ve&&ve.touches.length>0)){if(D){(E||H)&&L&&V&&(k==null||k(L));const{inProgress:ge,...xe}=re,Te={...xe,toPosition:re.toHandle?re.toPosition:null};x==null||x(ve,Te),i&&(M==null||M(ve,Te))}y(),cancelAnimationFrame(A),R=!1,V=!1,L=null,H=null,P.removeEventListener("mousemove",ne),P.removeEventListener("mouseup",le),P.removeEventListener("touchmove",ne),P.removeEventListener("touchend",le)}}P.addEventListener("mousemove",ne),P.addEventListener("mouseup",le),P.addEventListener("touchmove",ne),P.addEventListener("touchend",le)}function eJ(e,{handle:t,connectionMode:n,fromNodeId:o,fromHandleId:r,fromType:i,doc:a,lib:s,flowId:c,isValidConnection:l=JQ,nodeLookup:h}){const u=i==="target",p=t?a.querySelector(`.${s}-flow__handle[data-id="${c}-${t==null?void 0:t.nodeId}-${t==null?void 0:t.id}-${t==null?void 0:t.type}"]`):null,{x:y,y:g}=Qo(e),k=a.elementFromPoint(y,g),x=k!=null&&k.classList.contains(`${s}-flow__handle`)?k:p,v={handleDomNode:x,isValid:!1,connection:null,toHandle:null};if(x){const M=QQ(void 0,x),w=x.getAttribute("data-nodeid"),b=x.getAttribute("data-handleid"),C=x.classList.contains("connectable"),_=x.classList.contains("connectableend");if(!w||!M)return v;const S={source:u?w:o,sourceHandle:u?b:r,target:u?o:w,targetHandle:u?r:b};v.connection=S;const P=C&&_&&(n===N0.Strict?u&&M==="source"||!u&&M==="target":w!==o||b!==r);v.isValid=P&&l(S),v.toHandle=YQ(w,M,b,h,n,!0)}return v}const qH={onPointerDown:yRe,isValid:eJ};function mRe({domNode:e,panZoom:t,getTransform:n,getViewScale:o}){const r=ao(e);function i({translateExtent:s,width:c,height:l,zoomStep:h=1,pannable:u=!0,zoomable:p=!0,inversePan:y=!1}){const g=w=>{if(w.sourceEvent.type!=="wheel"||!t)return;const b=n(),C=w.sourceEvent.ctrlKey&&sf()?10:1,_=-w.sourceEvent.deltaY*(w.sourceEvent.deltaMode===1?.05:w.sourceEvent.deltaMode?1:.002)*h,S=b[2]*Math.pow(2,_*C);t.scaleTo(S)};let k=[0,0];const x=w=>{(w.sourceEvent.type==="mousedown"||w.sourceEvent.type==="touchstart")&&(k=[w.sourceEvent.clientX??w.sourceEvent.touches[0].clientX,w.sourceEvent.clientY??w.sourceEvent.touches[0].clientY])},v=w=>{const b=n();if(w.sourceEvent.type!=="mousemove"&&w.sourceEvent.type!=="touchmove"||!t)return;const C=[w.sourceEvent.clientX??w.sourceEvent.touches[0].clientX,w.sourceEvent.clientY??w.sourceEvent.touches[0].clientY],_=[C[0]-k[0],C[1]-k[1]];k=C;const S=o()*Math.max(b[2],Math.log(b[2]))*(y?-1:1),N={x:b[0]-_[0]*S,y:b[1]-_[1]*S},P=[[0,0],[c,l]];t.setViewportConstrained({x:N.x,y:N.y,zoom:b[2]},P,s)},M=IQ().on("start",x).on("zoom",u?v:null).on("zoom.wheel",p?g:null);r.call(M,{})}function a(){r.on("zoom",null)}return{update:i,destroy:a,pointer:Go}}const aR=e=>({x:e.x,y:e.y,zoom:e.k}),DT=({x:e,y:t,zoom:n})=>nR.translate(e,t).scale(n),Zu=(e,t)=>e.target.closest(`.${t}`),tJ=(e,t)=>t===2&&Array.isArray(e)&&e.includes(2),gRe=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2,HT=(e,t=0,n=gRe,o=()=>{})=>{const r=typeof t=="number"&&t>0;return r||o(),r?e.transition().duration(t).ease(n).on("end",o):e},nJ=e=>{const t=e.ctrlKey&&sf()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*t};function kRe({zoomPanValues:e,noWheelClassName:t,d3Selection:n,d3Zoom:o,panOnScrollMode:r,panOnScrollSpeed:i,zoomOnPinch:a,onPanZoomStart:s,onPanZoom:c,onPanZoomEnd:l}){return h=>{if(Zu(h,t))return h.ctrlKey&&h.preventDefault(),!1;h.preventDefault(),h.stopImmediatePropagation();const u=n.property("__zoom").k||1;if(h.ctrlKey&&a){const x=Go(h),v=nJ(h),M=u*Math.pow(2,v);o.scaleTo(n,M,x,h);return}const p=h.deltaMode===1?20:1;let y=r===Ed.Vertical?0:h.deltaX*p,g=r===Ed.Horizontal?0:h.deltaY*p;!sf()&&h.shiftKey&&r!==Ed.Vertical&&(y=h.deltaY*p,g=0),o.translateBy(n,-(y/u)*i,-(g/u)*i,{internal:!0});const k=aR(n.property("__zoom"));clearTimeout(e.panScrollTimeout),e.isPanScrolling?(c==null||c(h,k),e.panScrollTimeout=setTimeout(()=>{l==null||l(h,k),e.isPanScrolling=!1},150)):(e.isPanScrolling=!0,s==null||s(h,k))}}function vRe({noWheelClassName:e,preventScrolling:t,d3ZoomHandler:n}){return function(o,r){const i=o.type==="wheel",a=!t&&i&&!o.ctrlKey,s=Zu(o,e);if(o.ctrlKey&&i&&s&&o.preventDefault(),a||s)return null;o.preventDefault(),n.call(this,o,r)}}function xRe({zoomPanValues:e,onDraggingChange:t,onPanZoomStart:n}){return o=>{var i,a,s;if((i=o.sourceEvent)!=null&&i.internal)return;const r=aR(o.transform);e.mouseButton=((a=o.sourceEvent)==null?void 0:a.button)||0,e.isZoomingOrPanning=!0,e.prevViewport=r,((s=o.sourceEvent)==null?void 0:s.type)==="mousedown"&&t(!0),n&&(n==null||n(o.sourceEvent,r))}}function wRe({zoomPanValues:e,panOnDrag:t,onPaneContextMenu:n,onTransformChange:o,onPanZoom:r}){return i=>{var a,s;e.usedRightMouseButton=!!(n&&tJ(t,e.mouseButton??0)),(a=i.sourceEvent)!=null&&a.sync||o([i.transform.x,i.transform.y,i.transform.k]),r&&!((s=i.sourceEvent)!=null&&s.internal)&&(r==null||r(i.sourceEvent,aR(i.transform)))}}function MRe({zoomPanValues:e,panOnDrag:t,panOnScroll:n,onDraggingChange:o,onPanZoomEnd:r,onPaneContextMenu:i}){return a=>{var s;if(!((s=a.sourceEvent)!=null&&s.internal)&&(e.isZoomingOrPanning=!1,i&&tJ(t,e.mouseButton??0)&&!e.usedRightMouseButton&&a.sourceEvent&&i(a.sourceEvent),e.usedRightMouseButton=!1,o(!1),r)){const c=aR(a.transform);e.prevViewport=c,clearTimeout(e.timerId),e.timerId=setTimeout(()=>{r==null||r(a.sourceEvent,c)},n?150:0)}}}function bRe({zoomActivationKeyPressed:e,zoomOnScroll:t,zoomOnPinch:n,panOnDrag:o,panOnScroll:r,zoomOnDoubleClick:i,userSelectionActive:a,noWheelClassName:s,noPanClassName:c,lib:l,connectionInProgress:h}){return u=>{var x;const p=e||t,y=n&&u.ctrlKey,g=u.type==="wheel";if(u.button===1&&u.type==="mousedown"&&(Zu(u,`${l}-flow__node`)||Zu(u,`${l}-flow__edge`)))return!0;if(!o&&!p&&!r&&!i&&!n||a||h&&!g||Zu(u,s)&&g||Zu(u,c)&&(!g||r&&g&&!e)||!n&&u.ctrlKey&&g)return!1;if(!n&&u.type==="touchstart"&&((x=u.touches)==null?void 0:x.length)>1)return u.preventDefault(),!1;if(!p&&!r&&!y&&g||!o&&(u.type==="mousedown"||u.type==="touchstart")||Array.isArray(o)&&!o.includes(u.button)&&u.type==="mousedown")return!1;const k=Array.isArray(o)&&o.includes(u.button)||!u.button||u.button<=1;return(!u.ctrlKey||g)&&k}}function _Re({domNode:e,minZoom:t,maxZoom:n,translateExtent:o,viewport:r,onPanZoom:i,onPanZoomStart:a,onPanZoomEnd:s,onDraggingChange:c}){const l={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},h=e.getBoundingClientRect(),u=IQ().scaleExtent([t,n]).translateExtent(o),p=ao(e).call(u);M({x:r.x,y:r.y,zoom:A0(r.zoom,t,n)},[[0,0],[h.width,h.height]],o);const y=p.on("wheel.zoom"),g=p.on("dblclick.zoom");u.wheelDelta(nJ);function k(E,z){return p?new Promise(U=>{u==null||u.interpolate((z==null?void 0:z.interpolate)==="linear"?Nh:aP).transform(HT(p,z==null?void 0:z.duration,z==null?void 0:z.ease,()=>U(!0)),E)}):Promise.resolve(!1)}function x({noWheelClassName:E,noPanClassName:z,onPaneContextMenu:U,userSelectionActive:$,panOnScroll:T,panOnDrag:D,panOnScrollMode:O,panOnScrollSpeed:I,preventScrolling:R,zoomOnPinch:L,zoomOnScroll:V,zoomOnDoubleClick:H,zoomActivationKeyPressed:j,lib:X,onTransformChange:Z,connectionInProgress:J,paneClickDistance:re,selectionOnDrag:oe}){$&&!l.isZoomingOrPanning&&v();const ne=T&&!j&&!$;u.clickDistance(oe?1/0:!Yo(re)||re<0?0:re);const le=ne?kRe({zoomPanValues:l,noWheelClassName:E,d3Selection:p,d3Zoom:u,panOnScrollMode:O,panOnScrollSpeed:I,zoomOnPinch:L,onPanZoomStart:a,onPanZoom:i,onPanZoomEnd:s}):vRe({noWheelClassName:E,preventScrolling:R,d3ZoomHandler:y});if(p.on("wheel.zoom",le,{passive:!1}),!$){const ge=xRe({zoomPanValues:l,onDraggingChange:c,onPanZoomStart:a});u.on("start",ge);const xe=wRe({zoomPanValues:l,panOnDrag:D,onPaneContextMenu:!!U,onPanZoom:i,onTransformChange:Z});u.on("zoom",xe);const Te=MRe({zoomPanValues:l,panOnDrag:D,panOnScroll:T,onPaneContextMenu:U,onPanZoomEnd:s,onDraggingChange:c});u.on("end",Te)}const ve=bRe({zoomActivationKeyPressed:j,panOnDrag:D,zoomOnScroll:V,panOnScroll:T,zoomOnDoubleClick:H,zoomOnPinch:L,userSelectionActive:$,noPanClassName:z,noWheelClassName:E,lib:X,connectionInProgress:J});u.filter(ve),H?p.on("dblclick.zoom",g):p.on("dblclick.zoom",null)}function v(){u.on("zoom",null)}async function M(E,z,U){const $=DT(E),T=u==null?void 0:u.constrain()($,z,U);return T&&await k(T),new Promise(D=>D(T))}async function w(E,z){const U=DT(E);return await k(U,z),new Promise($=>$(U))}function b(E){if(p){const z=DT(E),U=p.property("__zoom");(U.k!==E.zoom||U.x!==E.x||U.y!==E.y)&&(u==null||u.transform(p,z,null,{sync:!0}))}}function C(){const E=p?NQ(p.node()):{x:0,y:0,k:1};return{x:E.x,y:E.y,zoom:E.k}}function _(E,z){return p?new Promise(U=>{u==null||u.interpolate((z==null?void 0:z.interpolate)==="linear"?Nh:aP).scaleTo(HT(p,z==null?void 0:z.duration,z==null?void 0:z.ease,()=>U(!0)),E)}):Promise.resolve(!1)}function S(E,z){return p?new Promise(U=>{u==null||u.interpolate((z==null?void 0:z.interpolate)==="linear"?Nh:aP).scaleBy(HT(p,z==null?void 0:z.duration,z==null?void 0:z.ease,()=>U(!0)),E)}):Promise.resolve(!1)}function N(E){u==null||u.scaleExtent(E)}function P(E){u==null||u.translateExtent(E)}function A(E){const z=!Yo(E)||E<0?0:E;u==null||u.clickDistance(z)}return{update:x,destroy:v,setViewport:w,setViewportConstrained:M,getViewport:C,scaleTo:_,scaleBy:S,setScaleExtent:N,setTranslateExtent:P,syncViewport:b,setClickDistance:A}}var Oa;(function(e){e.Line="line",e.Handle="handle"})(Oa||(Oa={}));function CRe({width:e,prevWidth:t,height:n,prevHeight:o,affectsX:r,affectsY:i}){const a=e-t,s=n-o,c=[a>0?1:a<0?-1:0,s>0?1:s<0?-1:0];return a&&r&&(c[0]=c[0]*-1),s&&i&&(c[1]=c[1]*-1),c}function IU(e){const t=e.includes("right")||e.includes("left"),n=e.includes("bottom")||e.includes("top"),o=e.includes("left"),r=e.includes("top");return{isHorizontal:t,isVertical:n,affectsX:o,affectsY:r}}function ra(e,t){return Math.max(0,t-e)}function ia(e,t){return Math.max(0,e-t)}function Sp(e,t,n){return Math.max(0,t-e,e-n)}function AU(e,t){return e?!t:t}function SRe(e,t,n,o,r,i,a,s){let{affectsX:c,affectsY:l}=t;const{isHorizontal:h,isVertical:u}=t,p=h&&u,{xSnapped:y,ySnapped:g}=n,{minWidth:k,maxWidth:x,minHeight:v,maxHeight:M}=o,{x:w,y:b,width:C,height:_,aspectRatio:S}=e;let N=Math.floor(h?y-e.pointerX:0),P=Math.floor(u?g-e.pointerY:0);const A=C+(c?-N:N),E=_+(l?-P:P),z=-i[0]*C,U=-i[1]*_;let $=Sp(A,k,x),T=Sp(E,v,M);if(a){let I=0,R=0;c&&N<0?I=ra(w+N+z,a[0][0]):!c&&N>0&&(I=ia(w+A+z,a[1][0])),l&&P<0?R=ra(b+P+U,a[0][1]):!l&&P>0&&(R=ia(b+E+U,a[1][1])),$=Math.max($,I),T=Math.max(T,R)}if(s){let I=0,R=0;c&&N>0?I=ia(w+N,s[0][0]):!c&&N<0&&(I=ra(w+A,s[1][0])),l&&P>0?R=ia(b+P,s[0][1]):!l&&P<0&&(R=ra(b+E,s[1][1])),$=Math.max($,I),T=Math.max(T,R)}if(r){if(h){const I=Sp(A/S,v,M)*S;if($=Math.max($,I),a){let R=0;!c&&!l||c&&!l&&p?R=ia(b+U+A/S,a[1][1])*S:R=ra(b+U+(c?N:-N)/S,a[0][1])*S,$=Math.max($,R)}if(s){let R=0;!c&&!l||c&&!l&&p?R=ra(b+A/S,s[1][1])*S:R=ia(b+(c?N:-N)/S,s[0][1])*S,$=Math.max($,R)}}if(u){const I=Sp(E*S,k,x)/S;if(T=Math.max(T,I),a){let R=0;!c&&!l||l&&!c&&p?R=ia(w+E*S+z,a[1][0])/S:R=ra(w+(l?P:-P)*S+z,a[0][0])/S,T=Math.max(T,R)}if(s){let R=0;!c&&!l||l&&!c&&p?R=ra(w+E*S,s[1][0])/S:R=ia(w+(l?P:-P)*S,s[0][0])/S,T=Math.max(T,R)}}}P=P+(P<0?T:-T),N=N+(N<0?$:-$),r&&(p?A>E*S?P=(AU(c,l)?-N:N)/S:N=(AU(c,l)?-P:P)*S:h?(P=N/S,l=c):(N=P*S,c=l));const D=c?w+N:w,O=l?b+P:b;return{width:C+(c?-N:N),height:_+(l?-P:P),x:i[0]*N*(c?-1:1)+D,y:i[1]*P*(l?-1:1)+O}}const oJ={width:0,height:0,x:0,y:0},LRe={...oJ,pointerX:0,pointerY:0,aspectRatio:1};function NRe(e){return[[0,0],[e.measured.width,e.measured.height]]}function IRe(e,t,n){const o=t.position.x+e.position.x,r=t.position.y+e.position.y,i=e.measured.width??0,a=e.measured.height??0,s=n[0]*i,c=n[1]*a;return[[o-s,r-c],[o+i-s,r+a-c]]}function ARe({domNode:e,nodeId:t,getStoreItems:n,onChange:o,onEnd:r}){const i=ao(e);let a={controlDirection:IU("bottom-right"),boundaries:{minWidth:0,minHeight:0,maxWidth:Number.MAX_VALUE,maxHeight:Number.MAX_VALUE},resizeDirection:void 0,keepAspectRatio:!1};function s({controlPosition:l,boundaries:h,keepAspectRatio:u,resizeDirection:p,onResizeStart:y,onResize:g,onResizeEnd:k,shouldResize:x}){let v={...oJ},M={...LRe};a={boundaries:h,resizeDirection:p,keepAspectRatio:u,controlDirection:IU(l)};let w,b=null,C=[],_,S,N,P=!1;const A=fQ().on("start",E=>{const{nodeLookup:z,transform:U,snapGrid:$,snapToGrid:T,nodeOrigin:D,paneDomNode:O}=n();if(w=z.get(t),!w)return;b=(O==null?void 0:O.getBoundingClientRect())??null;const{xSnapped:I,ySnapped:R}=Ih(E.sourceEvent,{transform:U,snapGrid:$,snapToGrid:T,containerBounds:b});v={width:w.measured.width??0,height:w.measured.height??0,x:w.position.x??0,y:w.position.y??0},M={...v,pointerX:I,pointerY:R,aspectRatio:v.width/v.height},_=void 0,w.parentId&&(w.extent==="parent"||w.expandParent)&&(_=z.get(w.parentId),S=_&&w.extent==="parent"?NRe(_):void 0),C=[],N=void 0;for(const[L,V]of z)if(V.parentId===t&&(C.push({id:L,position:{...V.position},extent:V.extent}),V.extent==="parent"||V.expandParent)){const H=IRe(V,w,V.origin??D);N?N=[[Math.min(H[0][0],N[0][0]),Math.min(H[0][1],N[0][1])],[Math.max(H[1][0],N[1][0]),Math.max(H[1][1],N[1][1])]]:N=H}y==null||y(E,{...v})}).on("drag",E=>{const{transform:z,snapGrid:U,snapToGrid:$,nodeOrigin:T}=n(),D=Ih(E.sourceEvent,{transform:z,snapGrid:U,snapToGrid:$,containerBounds:b}),O=[];if(!w)return;const{x:I,y:R,width:L,height:V}=v,H={},j=w.origin??T,{width:X,height:Z,x:J,y:re}=SRe(M,a.controlDirection,D,a.boundaries,a.keepAspectRatio,j,S,N),oe=X!==L,ne=Z!==V,le=J!==I&&oe,ve=re!==R&&ne;if(!le&&!ve&&!oe&&!ne)return;if((le||ve||j[0]===1||j[1]===1)&&(H.x=le?J:v.x,H.y=ve?re:v.y,v.x=H.x,v.y=H.y,C.length>0)){const Ye=J-I,ue=re-R;for(const Ie of C)Ie.position={x:Ie.position.x-Ye+j[0]*(X-L),y:Ie.position.y-ue+j[1]*(Z-V)},O.push(Ie)}if((oe||ne)&&(H.width=oe&&(!a.resizeDirection||a.resizeDirection==="horizontal")?X:v.width,H.height=ne&&(!a.resizeDirection||a.resizeDirection==="vertical")?Z:v.height,v.width=H.width,v.height=H.height),_&&w.expandParent){const Ye=j[0]*(H.width??0);H.x&&H.x<Ye&&(v.x=Ye,M.x=M.x-(H.x-Ye));const ue=j[1]*(H.height??0);H.y&&H.y<ue&&(v.y=ue,M.y=M.y-(H.y-ue))}const ge=CRe({width:v.width,prevWidth:L,height:v.height,prevHeight:V,affectsX:a.controlDirection.affectsX,affectsY:a.controlDirection.affectsY}),xe={...v,direction:ge};(x==null?void 0:x(E,xe))!==!1&&(P=!0,g==null||g(E,xe),o(H,O))}).on("end",E=>{P&&(k==null||k(E,{...v}),r==null||r({...v}),P=!1)});i.call(A)}function c(){i.on(".drag",null)}return{update:s,destroy:c}}var rJ={exports:{}},iJ={},aJ={exports:{}},sJ={};/**
8446
+ */const BAe=Object.freeze(Object.defineProperty({__proto__:null,AArrowDown:uy,AArrowDownIcon:uy,AArrowUp:hy,AArrowUpIcon:hy,ALargeSmall:fy,ALargeSmallIcon:fy,Accessibility:py,AccessibilityIcon:py,Activity:yy,ActivityIcon:yy,ActivitySquare:t1,ActivitySquareIcon:t1,AirVent:my,AirVentIcon:my,Airplay:gy,AirplayIcon:gy,AlarmCheck:xs,AlarmCheckIcon:xs,AlarmClock:vy,AlarmClockCheck:xs,AlarmClockCheckIcon:xs,AlarmClockIcon:vy,AlarmClockMinus:ws,AlarmClockMinusIcon:ws,AlarmClockOff:ky,AlarmClockOffIcon:ky,AlarmClockPlus:Ms,AlarmClockPlusIcon:Ms,AlarmMinus:ws,AlarmMinusIcon:ws,AlarmPlus:Ms,AlarmPlusIcon:Ms,AlarmSmoke:xy,AlarmSmokeIcon:xy,Album:wy,AlbumIcon:wy,AlertCircle:ha,AlertCircleIcon:ha,AlertOctagon:Al,AlertOctagonIcon:Al,AlertTriangle:jr,AlertTriangleIcon:jr,AlignCenter:ya,AlignCenterHorizontal:by,AlignCenterHorizontalIcon:by,AlignCenterIcon:ya,AlignCenterVertical:My,AlignCenterVerticalIcon:My,AlignEndHorizontal:_y,AlignEndHorizontalIcon:_y,AlignEndVertical:Cy,AlignEndVerticalIcon:Cy,AlignHorizontalDistributeCenter:Sy,AlignHorizontalDistributeCenterIcon:Sy,AlignHorizontalDistributeEnd:Ly,AlignHorizontalDistributeEndIcon:Ly,AlignHorizontalDistributeStart:Ny,AlignHorizontalDistributeStartIcon:Ny,AlignHorizontalJustifyCenter:Iy,AlignHorizontalJustifyCenterIcon:Iy,AlignHorizontalJustifyEnd:Ey,AlignHorizontalJustifyEndIcon:Ey,AlignHorizontalJustifyStart:Ay,AlignHorizontalJustifyStartIcon:Ay,AlignHorizontalSpaceAround:jy,AlignHorizontalSpaceAroundIcon:jy,AlignHorizontalSpaceBetween:$y,AlignHorizontalSpaceBetweenIcon:$y,AlignJustify:ed,AlignJustifyIcon:ed,AlignLeft:Vo,AlignLeftIcon:Vo,AlignRight:ma,AlignRightIcon:ma,AlignStartHorizontal:Py,AlignStartHorizontalIcon:Py,AlignStartVertical:zy,AlignStartVerticalIcon:zy,AlignVerticalDistributeCenter:Ry,AlignVerticalDistributeCenterIcon:Ry,AlignVerticalDistributeEnd:Ty,AlignVerticalDistributeEndIcon:Ty,AlignVerticalDistributeStart:Dy,AlignVerticalDistributeStartIcon:Dy,AlignVerticalJustifyCenter:Hy,AlignVerticalJustifyCenterIcon:Hy,AlignVerticalJustifyEnd:Oy,AlignVerticalJustifyEndIcon:Oy,AlignVerticalJustifyStart:Fy,AlignVerticalJustifyStartIcon:Fy,AlignVerticalSpaceAround:qy,AlignVerticalSpaceAroundIcon:qy,AlignVerticalSpaceBetween:Vy,AlignVerticalSpaceBetweenIcon:Vy,Ambulance:By,AmbulanceIcon:By,Ampersand:Uy,AmpersandIcon:Uy,Ampersands:Wy,AmpersandsIcon:Wy,Amphora:Gy,AmphoraIcon:Gy,Anchor:Ky,AnchorIcon:Ky,Angry:Xy,AngryIcon:Xy,Annoyed:Zy,AnnoyedIcon:Zy,Antenna:Yy,AntennaIcon:Yy,Anvil:Qy,AnvilIcon:Qy,Aperture:Jy,ApertureIcon:Jy,AppWindow:tm,AppWindowIcon:tm,AppWindowMac:em,AppWindowMacIcon:em,Apple:nm,AppleIcon:nm,Archive:im,ArchiveIcon:im,ArchiveRestore:om,ArchiveRestoreIcon:om,ArchiveX:rm,ArchiveXIcon:rm,AreaChart:Ts,AreaChartIcon:Ts,Armchair:am,ArmchairIcon:am,ArrowBigDown:cm,ArrowBigDownDash:sm,ArrowBigDownDashIcon:sm,ArrowBigDownIcon:cm,ArrowBigLeft:dm,ArrowBigLeftDash:lm,ArrowBigLeftDashIcon:lm,ArrowBigLeftIcon:dm,ArrowBigRight:hm,ArrowBigRightDash:um,ArrowBigRightDashIcon:um,ArrowBigRightIcon:hm,ArrowBigUp:pm,ArrowBigUpDash:fm,ArrowBigUpDashIcon:fm,ArrowBigUpIcon:pm,ArrowDown:_m,ArrowDown01:ym,ArrowDown01Icon:ym,ArrowDown10:mm,ArrowDown10Icon:mm,ArrowDownAZ:bs,ArrowDownAZIcon:bs,ArrowDownAz:bs,ArrowDownAzIcon:bs,ArrowDownCircle:Ys,ArrowDownCircleIcon:Ys,ArrowDownFromLine:gm,ArrowDownFromLineIcon:gm,ArrowDownIcon:_m,ArrowDownLeft:vm,ArrowDownLeftFromCircle:Qs,ArrowDownLeftFromCircleIcon:Qs,ArrowDownLeftFromSquare:a1,ArrowDownLeftFromSquareIcon:a1,ArrowDownLeftIcon:vm,ArrowDownLeftSquare:n1,ArrowDownLeftSquareIcon:n1,ArrowDownNarrowWide:km,ArrowDownNarrowWideIcon:km,ArrowDownRight:wm,ArrowDownRightFromCircle:ec,ArrowDownRightFromCircleIcon:ec,ArrowDownRightFromSquare:s1,ArrowDownRightFromSquareIcon:s1,ArrowDownRightIcon:wm,ArrowDownRightSquare:o1,ArrowDownRightSquareIcon:o1,ArrowDownSquare:r1,ArrowDownSquareIcon:r1,ArrowDownToDot:xm,ArrowDownToDotIcon:xm,ArrowDownToLine:Mm,ArrowDownToLineIcon:Mm,ArrowDownUp:bm,ArrowDownUpIcon:bm,ArrowDownWideNarrow:_s,ArrowDownWideNarrowIcon:_s,ArrowDownZA:Cs,ArrowDownZAIcon:Cs,ArrowDownZa:Cs,ArrowDownZaIcon:Cs,ArrowLeft:Lm,ArrowLeftCircle:Js,ArrowLeftCircleIcon:Js,ArrowLeftFromLine:Cm,ArrowLeftFromLineIcon:Cm,ArrowLeftIcon:Lm,ArrowLeftRight:J2,ArrowLeftRightIcon:J2,ArrowLeftSquare:i1,ArrowLeftSquareIcon:i1,ArrowLeftToLine:Sm,ArrowLeftToLineIcon:Sm,ArrowRight:i0,ArrowRightCircle:oc,ArrowRightCircleIcon:oc,ArrowRightFromLine:Nm,ArrowRightFromLineIcon:Nm,ArrowRightIcon:i0,ArrowRightLeft:Im,ArrowRightLeftIcon:Im,ArrowRightSquare:d1,ArrowRightSquareIcon:d1,ArrowRightToLine:Am,ArrowRightToLineIcon:Am,ArrowUp:Om,ArrowUp01:Em,ArrowUp01Icon:Em,ArrowUp10:jm,ArrowUp10Icon:jm,ArrowUpAZ:Ss,ArrowUpAZIcon:Ss,ArrowUpAz:Ss,ArrowUpAzIcon:Ss,ArrowUpCircle:rc,ArrowUpCircleIcon:rc,ArrowUpDown:$m,ArrowUpDownIcon:$m,ArrowUpFromDot:Pm,ArrowUpFromDotIcon:Pm,ArrowUpFromLine:zm,ArrowUpFromLineIcon:zm,ArrowUpIcon:Om,ArrowUpLeft:Rm,ArrowUpLeftFromCircle:tc,ArrowUpLeftFromCircleIcon:tc,ArrowUpLeftFromSquare:c1,ArrowUpLeftFromSquareIcon:c1,ArrowUpLeftIcon:Rm,ArrowUpLeftSquare:u1,ArrowUpLeftSquareIcon:u1,ArrowUpNarrowWide:Ls,ArrowUpNarrowWideIcon:Ls,ArrowUpRight:Dm,ArrowUpRightFromCircle:nc,ArrowUpRightFromCircleIcon:nc,ArrowUpRightFromSquare:l1,ArrowUpRightFromSquareIcon:l1,ArrowUpRightIcon:Dm,ArrowUpRightSquare:p1,ArrowUpRightSquareIcon:p1,ArrowUpSquare:h1,ArrowUpSquareIcon:h1,ArrowUpToLine:Tm,ArrowUpToLineIcon:Tm,ArrowUpWideNarrow:Hm,ArrowUpWideNarrowIcon:Hm,ArrowUpZA:Ns,ArrowUpZAIcon:Ns,ArrowUpZa:Ns,ArrowUpZaIcon:Ns,ArrowsUpFromLine:Fm,ArrowsUpFromLineIcon:Fm,Asterisk:qm,AsteriskIcon:qm,AsteriskSquare:f1,AsteriskSquareIcon:f1,AtSign:Vm,AtSignIcon:Vm,Atom:Bm,AtomIcon:Bm,AudioLines:Um,AudioLinesIcon:Um,AudioWaveform:Gm,AudioWaveformIcon:Gm,Award:Wm,AwardIcon:Wm,Axe:Km,AxeIcon:Km,Axis3D:Is,Axis3DIcon:Is,Axis3d:Is,Axis3dIcon:Is,Baby:Xm,BabyIcon:Xm,Backpack:Zm,BackpackIcon:Zm,Badge:hg,BadgeAlert:Qm,BadgeAlertIcon:Qm,BadgeCent:Ym,BadgeCentIcon:Ym,BadgeCheck:As,BadgeCheckIcon:As,BadgeDollarSign:Jm,BadgeDollarSignIcon:Jm,BadgeEuro:tg,BadgeEuroIcon:tg,BadgeHelp:Es,BadgeHelpIcon:Es,BadgeIcon:hg,BadgeIndianRupee:eg,BadgeIndianRupeeIcon:eg,BadgeInfo:ng,BadgeInfoIcon:ng,BadgeJapaneseYen:og,BadgeJapaneseYenIcon:og,BadgeMinus:rg,BadgeMinusIcon:rg,BadgePercent:ig,BadgePercentIcon:ig,BadgePlus:ag,BadgePlusIcon:ag,BadgePoundSterling:sg,BadgePoundSterlingIcon:sg,BadgeQuestionMark:Es,BadgeQuestionMarkIcon:Es,BadgeRussianRuble:cg,BadgeRussianRubleIcon:cg,BadgeSwissFranc:lg,BadgeSwissFrancIcon:lg,BadgeTurkishLira:dg,BadgeTurkishLiraIcon:dg,BadgeX:ug,BadgeXIcon:ug,BaggageClaim:fg,BaggageClaimIcon:fg,Balloon:pg,BalloonIcon:pg,Ban:eh,BanIcon:eh,Banana:yg,BananaIcon:yg,Bandage:mg,BandageIcon:mg,Banknote:xg,BanknoteArrowDown:gg,BanknoteArrowDownIcon:gg,BanknoteArrowUp:kg,BanknoteArrowUpIcon:kg,BanknoteIcon:xg,BanknoteX:vg,BanknoteXIcon:vg,BarChart:Us,BarChart2:Ws,BarChart2Icon:Ws,BarChart3:Vs,BarChart3Icon:Vs,BarChart4:qs,BarChart4Icon:qs,BarChartBig:Fs,BarChartBigIcon:Fs,BarChartHorizontal:Hs,BarChartHorizontalBig:Ds,BarChartHorizontalBigIcon:Ds,BarChartHorizontalIcon:Hs,BarChartIcon:Us,Barcode:wg,BarcodeIcon:wg,Barrel:Mg,BarrelIcon:Mg,Baseline:bg,BaselineIcon:bg,Bath:_g,BathIcon:_g,Battery:Eg,BatteryCharging:Cg,BatteryChargingIcon:Cg,BatteryFull:Sg,BatteryFullIcon:Sg,BatteryIcon:Eg,BatteryLow:Lg,BatteryLowIcon:Lg,BatteryMedium:Ng,BatteryMediumIcon:Ng,BatteryPlus:Ig,BatteryPlusIcon:Ig,BatteryWarning:Ag,BatteryWarningIcon:Ag,Beaker:jg,BeakerIcon:jg,Bean:Pg,BeanIcon:Pg,BeanOff:$g,BeanOffIcon:$g,Bed:Tg,BedDouble:zg,BedDoubleIcon:zg,BedIcon:Tg,BedSingle:Rg,BedSingleIcon:Rg,Beef:Dg,BeefIcon:Dg,Beer:Og,BeerIcon:Og,BeerOff:Hg,BeerOffIcon:Hg,Bell:Gg,BellDot:Fg,BellDotIcon:Fg,BellElectric:qg,BellElectricIcon:qg,BellIcon:Gg,BellMinus:Vg,BellMinusIcon:Vg,BellOff:Bg,BellOffIcon:Bg,BellPlus:Ug,BellPlusIcon:Ug,BellRing:Wg,BellRingIcon:Wg,BetweenHorizonalEnd:js,BetweenHorizonalEndIcon:js,BetweenHorizonalStart:$s,BetweenHorizonalStartIcon:$s,BetweenHorizontalEnd:js,BetweenHorizontalEndIcon:js,BetweenHorizontalStart:$s,BetweenHorizontalStartIcon:$s,BetweenVerticalEnd:Kg,BetweenVerticalEndIcon:Kg,BetweenVerticalStart:Xg,BetweenVerticalStartIcon:Xg,BicepsFlexed:Zg,BicepsFlexedIcon:Zg,Bike:Yg,BikeIcon:Yg,Binary:Qg,BinaryIcon:Qg,Binoculars:Jg,BinocularsIcon:Jg,Biohazard:ek,BiohazardIcon:ek,Bird:tk,BirdIcon:tk,Birdhouse:nk,BirdhouseIcon:nk,Bitcoin:ok,BitcoinIcon:ok,Blend:rk,BlendIcon:rk,Blinds:ik,BlindsIcon:ik,Blocks:ak,BlocksIcon:ak,Bluetooth:dk,BluetoothConnected:sk,BluetoothConnectedIcon:sk,BluetoothIcon:dk,BluetoothOff:ck,BluetoothOffIcon:ck,BluetoothSearching:lk,BluetoothSearchingIcon:lk,Bold:uk,BoldIcon:uk,Bolt:hk,BoltIcon:hk,Bomb:fk,BombIcon:fk,Bone:pk,BoneIcon:pk,Book:Hk,BookA:yk,BookAIcon:yk,BookAlert:mk,BookAlertIcon:mk,BookAudio:gk,BookAudioIcon:gk,BookCheck:kk,BookCheckIcon:kk,BookCopy:vk,BookCopyIcon:vk,BookDashed:Ps,BookDashedIcon:Ps,BookDown:xk,BookDownIcon:xk,BookHeadphones:wk,BookHeadphonesIcon:wk,BookHeart:Mk,BookHeartIcon:Mk,BookIcon:Hk,BookImage:bk,BookImageIcon:bk,BookKey:_k,BookKeyIcon:_k,BookLock:Ck,BookLockIcon:Ck,BookMarked:Sk,BookMarkedIcon:Sk,BookMinus:Lk,BookMinusIcon:Lk,BookOpen:Ak,BookOpenCheck:Nk,BookOpenCheckIcon:Nk,BookOpenIcon:Ak,BookOpenText:Ik,BookOpenTextIcon:Ik,BookPlus:Ek,BookPlusIcon:Ek,BookSearch:jk,BookSearchIcon:jk,BookTemplate:Ps,BookTemplateIcon:Ps,BookText:$k,BookTextIcon:$k,BookType:Pk,BookTypeIcon:Pk,BookUp:Rk,BookUp2:zk,BookUp2Icon:zk,BookUpIcon:Rk,BookUser:Tk,BookUserIcon:Tk,BookX:Dk,BookXIcon:Dk,Bookmark:Bk,BookmarkCheck:Ok,BookmarkCheckIcon:Ok,BookmarkIcon:Bk,BookmarkMinus:Fk,BookmarkMinusIcon:Fk,BookmarkPlus:qk,BookmarkPlusIcon:qk,BookmarkX:Vk,BookmarkXIcon:Vk,BoomBox:Uk,BoomBoxIcon:Uk,Bot:Gk,BotIcon:Gk,BotMessageSquare:Wk,BotMessageSquareIcon:Wk,BotOff:Kk,BotOffIcon:Kk,BottleWine:Xk,BottleWineIcon:Xk,BowArrow:Zk,BowArrowIcon:Zk,Box:Yk,BoxIcon:Yk,BoxSelect:C1,BoxSelectIcon:C1,Boxes:Qk,BoxesIcon:Qk,Braces:zs,BracesIcon:zs,Brackets:Jk,BracketsIcon:Jk,Brain:n4,BrainCircuit:e4,BrainCircuitIcon:e4,BrainCog:t4,BrainCogIcon:t4,BrainIcon:n4,BrickWall:i4,BrickWallFire:o4,BrickWallFireIcon:o4,BrickWallIcon:i4,BrickWallShield:r4,BrickWallShieldIcon:r4,Briefcase:l4,BriefcaseBusiness:a4,BriefcaseBusinessIcon:a4,BriefcaseConveyorBelt:s4,BriefcaseConveyorBeltIcon:s4,BriefcaseIcon:l4,BriefcaseMedical:c4,BriefcaseMedicalIcon:c4,BringToFront:d4,BringToFrontIcon:d4,Brush:f4,BrushCleaning:u4,BrushCleaningIcon:u4,BrushIcon:f4,Bubbles:h4,BubblesIcon:h4,Bug:m4,BugIcon:m4,BugOff:p4,BugOffIcon:p4,BugPlay:y4,BugPlayIcon:y4,Building:g4,Building2:k4,Building2Icon:k4,BuildingIcon:g4,Bus:x4,BusFront:v4,BusFrontIcon:v4,BusIcon:x4,Cable:M4,CableCar:w4,CableCarIcon:w4,CableIcon:M4,Cake:_4,CakeIcon:_4,CakeSlice:b4,CakeSliceIcon:b4,Calculator:C4,CalculatorIcon:C4,Calendar:W4,Calendar1:S4,Calendar1Icon:S4,CalendarArrowDown:L4,CalendarArrowDownIcon:L4,CalendarArrowUp:N4,CalendarArrowUpIcon:N4,CalendarCheck:A4,CalendarCheck2:I4,CalendarCheck2Icon:I4,CalendarCheckIcon:A4,CalendarClock:E4,CalendarClockIcon:E4,CalendarCog:j4,CalendarCogIcon:j4,CalendarDays:$4,CalendarDaysIcon:$4,CalendarFold:P4,CalendarFoldIcon:P4,CalendarHeart:z4,CalendarHeartIcon:z4,CalendarIcon:W4,CalendarMinus:T4,CalendarMinus2:R4,CalendarMinus2Icon:R4,CalendarMinusIcon:T4,CalendarOff:D4,CalendarOffIcon:D4,CalendarPlus:F4,CalendarPlus2:H4,CalendarPlus2Icon:H4,CalendarPlusIcon:F4,CalendarRange:O4,CalendarRangeIcon:O4,CalendarSearch:q4,CalendarSearchIcon:q4,CalendarSync:V4,CalendarSyncIcon:V4,CalendarX:U4,CalendarX2:B4,CalendarX2Icon:B4,CalendarXIcon:U4,Calendars:G4,CalendarsIcon:G4,Camera:X4,CameraIcon:X4,CameraOff:K4,CameraOffIcon:K4,CandlestickChart:Os,CandlestickChartIcon:Os,Candy:Q4,CandyCane:Z4,CandyCaneIcon:Z4,CandyIcon:Q4,CandyOff:Y4,CandyOffIcon:Y4,Cannabis:e5,CannabisIcon:e5,CannabisOff:J4,CannabisOffIcon:J4,Captions:Rs,CaptionsIcon:Rs,CaptionsOff:t5,CaptionsOffIcon:t5,Car:r5,CarFront:n5,CarFrontIcon:n5,CarIcon:r5,CarTaxiFront:o5,CarTaxiFrontIcon:o5,Caravan:i5,CaravanIcon:i5,CardSim:a5,CardSimIcon:a5,Carrot:s5,CarrotIcon:s5,CaseLower:c5,CaseLowerIcon:c5,CaseSensitive:l5,CaseSensitiveIcon:l5,CaseUpper:d5,CaseUpperIcon:d5,CassetteTape:u5,CassetteTapeIcon:u5,Cast:h5,CastIcon:h5,Castle:f5,CastleIcon:f5,Cat:p5,CatIcon:p5,Cctv:y5,CctvIcon:y5,ChartArea:Ts,ChartAreaIcon:Ts,ChartBar:Hs,ChartBarBig:Ds,ChartBarBigIcon:Ds,ChartBarDecreasing:m5,ChartBarDecreasingIcon:m5,ChartBarIcon:Hs,ChartBarIncreasing:g5,ChartBarIncreasingIcon:g5,ChartBarStacked:k5,ChartBarStackedIcon:k5,ChartCandlestick:Os,ChartCandlestickIcon:Os,ChartColumn:Vs,ChartColumnBig:Fs,ChartColumnBigIcon:Fs,ChartColumnDecreasing:v5,ChartColumnDecreasingIcon:v5,ChartColumnIcon:Vs,ChartColumnIncreasing:qs,ChartColumnIncreasingIcon:qs,ChartColumnStacked:x5,ChartColumnStackedIcon:x5,ChartGantt:w5,ChartGanttIcon:w5,ChartLine:Bs,ChartLineIcon:Bs,ChartNetwork:M5,ChartNetworkIcon:M5,ChartNoAxesColumn:Ws,ChartNoAxesColumnDecreasing:b5,ChartNoAxesColumnDecreasingIcon:b5,ChartNoAxesColumnIcon:Ws,ChartNoAxesColumnIncreasing:Us,ChartNoAxesColumnIncreasingIcon:Us,ChartNoAxesCombined:_5,ChartNoAxesCombinedIcon:_5,ChartNoAxesGantt:Gs,ChartNoAxesGanttIcon:Gs,ChartPie:Ks,ChartPieIcon:Ks,ChartScatter:Xs,ChartScatterIcon:Xs,ChartSpline:C5,ChartSplineIcon:C5,Check:ja,CheckCheck:S5,CheckCheckIcon:S5,CheckCircle:ic,CheckCircle2:fa,CheckCircle2Icon:fa,CheckCircleIcon:ic,CheckIcon:ja,CheckLine:L5,CheckLineIcon:L5,CheckSquare:m1,CheckSquare2:g1,CheckSquare2Icon:g1,CheckSquareIcon:m1,ChefHat:N5,ChefHatIcon:N5,Cherry:I5,CherryIcon:I5,ChessBishop:A5,ChessBishopIcon:A5,ChessKing:E5,ChessKingIcon:E5,ChessKnight:j5,ChessKnightIcon:j5,ChessPawn:$5,ChessPawnIcon:$5,ChessQueen:P5,ChessQueenIcon:P5,ChessRook:R5,ChessRookIcon:R5,ChevronDown:z5,ChevronDownCircle:ac,ChevronDownCircleIcon:ac,ChevronDownIcon:z5,ChevronDownSquare:k1,ChevronDownSquareIcon:k1,ChevronFirst:T5,ChevronFirstIcon:T5,ChevronLast:D5,ChevronLastIcon:D5,ChevronLeft:H5,ChevronLeftCircle:sc,ChevronLeftCircleIcon:sc,ChevronLeftIcon:H5,ChevronLeftSquare:v1,ChevronLeftSquareIcon:v1,ChevronRight:O5,ChevronRightCircle:cc,ChevronRightCircleIcon:cc,ChevronRightIcon:O5,ChevronRightSquare:w1,ChevronRightSquareIcon:w1,ChevronUp:F5,ChevronUpCircle:lc,ChevronUpCircleIcon:lc,ChevronUpIcon:F5,ChevronUpSquare:x1,ChevronUpSquareIcon:x1,ChevronsDown:V5,ChevronsDownIcon:V5,ChevronsDownUp:q5,ChevronsDownUpIcon:q5,ChevronsLeft:W5,ChevronsLeftIcon:W5,ChevronsLeftRight:U5,ChevronsLeftRightEllipsis:B5,ChevronsLeftRightEllipsisIcon:B5,ChevronsLeftRightIcon:U5,ChevronsRight:K5,ChevronsRightIcon:K5,ChevronsRightLeft:G5,ChevronsRightLeftIcon:G5,ChevronsUp:Z5,ChevronsUpDown:X5,ChevronsUpDownIcon:X5,ChevronsUpIcon:Z5,Chrome:Zs,ChromeIcon:Zs,Chromium:Zs,ChromiumIcon:Zs,Church:Y5,ChurchIcon:Y5,Cigarette:J5,CigaretteIcon:J5,CigaretteOff:Q5,CigaretteOffIcon:Q5,Circle:th,CircleAlert:ha,CircleAlertIcon:ha,CircleArrowDown:Ys,CircleArrowDownIcon:Ys,CircleArrowLeft:Js,CircleArrowLeftIcon:Js,CircleArrowOutDownLeft:Qs,CircleArrowOutDownLeftIcon:Qs,CircleArrowOutDownRight:ec,CircleArrowOutDownRightIcon:ec,CircleArrowOutUpLeft:tc,CircleArrowOutUpLeftIcon:tc,CircleArrowOutUpRight:nc,CircleArrowOutUpRightIcon:nc,CircleArrowRight:oc,CircleArrowRightIcon:oc,CircleArrowUp:rc,CircleArrowUpIcon:rc,CircleCheck:fa,CircleCheckBig:ic,CircleCheckBigIcon:ic,CircleCheckIcon:fa,CircleChevronDown:ac,CircleChevronDownIcon:ac,CircleChevronLeft:sc,CircleChevronLeftIcon:sc,CircleChevronRight:cc,CircleChevronRightIcon:cc,CircleChevronUp:lc,CircleChevronUpIcon:lc,CircleDashed:ev,CircleDashedIcon:ev,CircleDivide:dc,CircleDivideIcon:dc,CircleDollarSign:tv,CircleDollarSignIcon:tv,CircleDot:ov,CircleDotDashed:nv,CircleDotDashedIcon:nv,CircleDotIcon:ov,CircleEllipsis:rv,CircleEllipsisIcon:rv,CircleEqual:iv,CircleEqualIcon:iv,CircleFadingArrowUp:av,CircleFadingArrowUpIcon:av,CircleFadingPlus:sv,CircleFadingPlusIcon:sv,CircleGauge:uc,CircleGaugeIcon:uc,CircleHelp:qo,CircleHelpIcon:qo,CircleIcon:th,CircleMinus:hc,CircleMinusIcon:hc,CircleOff:cv,CircleOffIcon:cv,CircleParking:pc,CircleParkingIcon:pc,CircleParkingOff:fc,CircleParkingOffIcon:fc,CirclePause:yc,CirclePauseIcon:yc,CirclePercent:mc,CirclePercentIcon:mc,CirclePile:lv,CirclePileIcon:lv,CirclePlay:gc,CirclePlayIcon:gc,CirclePlus:kc,CirclePlusIcon:kc,CirclePoundSterling:dv,CirclePoundSterlingIcon:dv,CirclePower:vc,CirclePowerIcon:vc,CircleQuestionMark:qo,CircleQuestionMarkIcon:qo,CircleSlash:uv,CircleSlash2:xc,CircleSlash2Icon:xc,CircleSlashIcon:uv,CircleSlashed:xc,CircleSlashedIcon:xc,CircleSmall:hv,CircleSmallIcon:hv,CircleStar:fv,CircleStarIcon:fv,CircleStop:Mc,CircleStopIcon:Mc,CircleUser:bc,CircleUserIcon:bc,CircleUserRound:wc,CircleUserRoundIcon:wc,CircleX:_c,CircleXIcon:_c,CircuitBoard:pv,CircuitBoardIcon:pv,Citrus:yv,CitrusIcon:yv,Clapperboard:mv,ClapperboardIcon:mv,Clipboard:Sv,ClipboardCheck:gv,ClipboardCheckIcon:gv,ClipboardClock:kv,ClipboardClockIcon:kv,ClipboardCopy:vv,ClipboardCopyIcon:vv,ClipboardEdit:Sc,ClipboardEditIcon:Sc,ClipboardIcon:Sv,ClipboardList:xv,ClipboardListIcon:xv,ClipboardMinus:wv,ClipboardMinusIcon:wv,ClipboardPaste:Mv,ClipboardPasteIcon:Mv,ClipboardPen:Sc,ClipboardPenIcon:Sc,ClipboardPenLine:Cc,ClipboardPenLineIcon:Cc,ClipboardPlus:bv,ClipboardPlusIcon:bv,ClipboardSignature:Cc,ClipboardSignatureIcon:Cc,ClipboardType:_v,ClipboardTypeIcon:_v,ClipboardX:Cv,ClipboardXIcon:Cv,Clock:Uv,Clock1:Lv,Clock10:Nv,Clock10Icon:Nv,Clock11:Iv,Clock11Icon:Iv,Clock12:Av,Clock12Icon:Av,Clock1Icon:Lv,Clock2:Ev,Clock2Icon:Ev,Clock3:jv,Clock3Icon:jv,Clock4:$v,Clock4Icon:$v,Clock5:Pv,Clock5Icon:Pv,Clock6:zv,Clock6Icon:zv,Clock7:Rv,Clock7Icon:Rv,Clock8:Tv,Clock8Icon:Tv,Clock9:Dv,Clock9Icon:Dv,ClockAlert:Hv,ClockAlertIcon:Hv,ClockArrowDown:Ov,ClockArrowDownIcon:Ov,ClockArrowUp:Vv,ClockArrowUpIcon:Vv,ClockCheck:Fv,ClockCheckIcon:Fv,ClockFading:qv,ClockFadingIcon:qv,ClockIcon:Uv,ClockPlus:Bv,ClockPlusIcon:Bv,ClosedCaption:Wv,ClosedCaptionIcon:Wv,Cloud:nh,CloudAlert:Gv,CloudAlertIcon:Gv,CloudBackup:Kv,CloudBackupIcon:Kv,CloudCheck:Xv,CloudCheckIcon:Xv,CloudCog:Zv,CloudCogIcon:Zv,CloudDownload:Lc,CloudDownloadIcon:Lc,CloudDrizzle:Yv,CloudDrizzleIcon:Yv,CloudFog:Qv,CloudFogIcon:Qv,CloudHail:Jv,CloudHailIcon:Jv,CloudIcon:nh,CloudLightning:ex,CloudLightningIcon:ex,CloudMoon:nx,CloudMoonIcon:nx,CloudMoonRain:tx,CloudMoonRainIcon:tx,CloudOff:ox,CloudOffIcon:ox,CloudRain:ix,CloudRainIcon:ix,CloudRainWind:rx,CloudRainWindIcon:rx,CloudSnow:ax,CloudSnowIcon:ax,CloudSun:cx,CloudSunIcon:cx,CloudSunRain:sx,CloudSunRainIcon:sx,CloudSync:lx,CloudSyncIcon:lx,CloudUpload:Nc,CloudUploadIcon:Nc,Cloudy:dx,CloudyIcon:dx,Clover:ux,CloverIcon:ux,Club:hx,ClubIcon:hx,Code:fx,Code2:Ic,Code2Icon:Ic,CodeIcon:fx,CodeSquare:M1,CodeSquareIcon:M1,CodeXml:Ic,CodeXmlIcon:Ic,Codepen:px,CodepenIcon:px,Codesandbox:yx,CodesandboxIcon:yx,Coffee:mx,CoffeeIcon:mx,Cog:gx,CogIcon:gx,Coins:kx,CoinsIcon:kx,Columns:Ac,Columns2:Ac,Columns2Icon:Ac,Columns3:pa,Columns3Cog:Mr,Columns3CogIcon:Mr,Columns3Icon:pa,Columns4:vx,Columns4Icon:vx,ColumnsIcon:Ac,ColumnsSettings:Mr,ColumnsSettingsIcon:Mr,Combine:xx,CombineIcon:xx,Command:wx,CommandIcon:wx,Compass:Mx,CompassIcon:Mx,Component:bx,ComponentIcon:bx,Computer:_x,ComputerIcon:_x,ConciergeBell:Cx,ConciergeBellIcon:Cx,Cone:Sx,ConeIcon:Sx,Construction:Lx,ConstructionIcon:Lx,Contact:Nx,Contact2:Ec,Contact2Icon:Ec,ContactIcon:Nx,ContactRound:Ec,ContactRoundIcon:Ec,Container:Ix,ContainerIcon:Ix,Contrast:Ax,ContrastIcon:Ax,Cookie:Ex,CookieIcon:Ex,CookingPot:jx,CookingPotIcon:jx,Copy:Dx,CopyCheck:$x,CopyCheckIcon:$x,CopyIcon:Dx,CopyMinus:Px,CopyMinusIcon:Px,CopyPlus:zx,CopyPlusIcon:zx,CopySlash:Rx,CopySlashIcon:Rx,CopyX:Tx,CopyXIcon:Tx,Copyleft:Ox,CopyleftIcon:Ox,Copyright:Hx,CopyrightIcon:Hx,CornerDownLeft:Fx,CornerDownLeftIcon:Fx,CornerDownRight:qx,CornerDownRightIcon:qx,CornerLeftDown:Vx,CornerLeftDownIcon:Vx,CornerLeftUp:Bx,CornerLeftUpIcon:Bx,CornerRightDown:Wx,CornerRightDownIcon:Wx,CornerRightUp:Ux,CornerRightUpIcon:Ux,CornerUpLeft:Kx,CornerUpLeftIcon:Kx,CornerUpRight:Gx,CornerUpRightIcon:Gx,Cpu:Xx,CpuIcon:Xx,CreativeCommons:Zx,CreativeCommonsIcon:Zx,CreditCard:Yx,CreditCardIcon:Yx,Croissant:Qx,CroissantIcon:Qx,Crop:Jx,CropIcon:Jx,Cross:e3,CrossIcon:e3,Crosshair:t3,CrosshairIcon:t3,Crown:n3,CrownIcon:n3,Cuboid:o3,CuboidIcon:o3,CupSoda:r3,CupSodaIcon:r3,CurlyBraces:zs,CurlyBracesIcon:zs,Currency:i3,CurrencyIcon:i3,Cylinder:a3,CylinderIcon:a3,Dam:s3,DamIcon:s3,Database:oh,DatabaseBackup:c3,DatabaseBackupIcon:c3,DatabaseIcon:oh,DatabaseSearch:l3,DatabaseSearchIcon:l3,DatabaseZap:d3,DatabaseZapIcon:d3,DecimalsArrowLeft:u3,DecimalsArrowLeftIcon:u3,DecimalsArrowRight:h3,DecimalsArrowRightIcon:h3,Delete:f3,DeleteIcon:f3,Dessert:p3,DessertIcon:p3,Diameter:y3,DiameterIcon:y3,Diamond:rh,DiamondIcon:rh,DiamondMinus:m3,DiamondMinusIcon:m3,DiamondPercent:jc,DiamondPercentIcon:jc,DiamondPlus:g3,DiamondPlusIcon:g3,Dice1:k3,Dice1Icon:k3,Dice2:x3,Dice2Icon:x3,Dice3:v3,Dice3Icon:v3,Dice4:w3,Dice4Icon:w3,Dice5:M3,Dice5Icon:M3,Dice6:b3,Dice6Icon:b3,Dices:_3,DicesIcon:_3,Diff:C3,DiffIcon:C3,Disc:I3,Disc2:S3,Disc2Icon:S3,Disc3:N3,Disc3Icon:N3,DiscAlbum:L3,DiscAlbumIcon:L3,DiscIcon:I3,Divide:A3,DivideCircle:dc,DivideCircleIcon:dc,DivideIcon:A3,DivideSquare:S1,DivideSquareIcon:S1,Dna:j3,DnaIcon:j3,DnaOff:E3,DnaOffIcon:E3,Dock:$3,DockIcon:$3,Dog:P3,DogIcon:P3,DollarSign:z3,DollarSignIcon:z3,Donut:R3,DonutIcon:R3,DoorClosed:D3,DoorClosedIcon:D3,DoorClosedLocked:T3,DoorClosedLockedIcon:T3,DoorOpen:H3,DoorOpenIcon:H3,Dot:O3,DotIcon:O3,DotSquare:L1,DotSquareIcon:L1,Download:a0,DownloadCloud:Lc,DownloadCloudIcon:Lc,DownloadIcon:a0,DraftingCompass:F3,DraftingCompassIcon:F3,Drama:q3,DramaIcon:q3,Dribbble:V3,DribbbleIcon:V3,Drill:B3,DrillIcon:B3,Drone:U3,DroneIcon:U3,Droplet:G3,DropletIcon:G3,DropletOff:W3,DropletOffIcon:W3,Droplets:K3,DropletsIcon:K3,Drum:X3,DrumIcon:X3,Drumstick:Z3,DrumstickIcon:Z3,Dumbbell:Y3,DumbbellIcon:Y3,Ear:Q3,EarIcon:Q3,EarOff:J3,EarOffIcon:J3,Earth:$c,EarthIcon:$c,EarthLock:e8,EarthLockIcon:e8,Eclipse:t8,EclipseIcon:t8,Edit:no,Edit2:Vl,Edit2Icon:Vl,Edit3:ql,Edit3Icon:ql,EditIcon:no,Egg:r8,EggFried:n8,EggFriedIcon:n8,EggIcon:r8,EggOff:o8,EggOffIcon:o8,Ellipsis:zc,EllipsisIcon:zc,EllipsisVertical:Pc,EllipsisVerticalIcon:Pc,Equal:s8,EqualApproximately:i8,EqualApproximatelyIcon:i8,EqualIcon:s8,EqualNot:a8,EqualNotIcon:a8,EqualSquare:N1,EqualSquareIcon:N1,Eraser:c8,EraserIcon:c8,EthernetPort:l8,EthernetPortIcon:l8,Euro:d8,EuroIcon:d8,EvCharger:u8,EvChargerIcon:u8,Expand:h8,ExpandIcon:h8,ExternalLink:ih,ExternalLinkIcon:ih,Eye:y8,EyeClosed:f8,EyeClosedIcon:f8,EyeIcon:y8,EyeOff:p8,EyeOffIcon:p8,Facebook:m8,FacebookIcon:m8,Factory:g8,FactoryIcon:g8,Fan:v8,FanIcon:v8,FastForward:k8,FastForwardIcon:k8,Feather:x8,FeatherIcon:x8,Fence:w8,FenceIcon:w8,FerrisWheel:M8,FerrisWheelIcon:M8,Figma:b8,FigmaIcon:b8,File:Y8,FileArchive:_8,FileArchiveIcon:_8,FileAudio:br,FileAudio2:br,FileAudio2Icon:br,FileAudioIcon:br,FileAxis3D:Rc,FileAxis3DIcon:Rc,FileAxis3d:Rc,FileAxis3dIcon:Rc,FileBadge:Tc,FileBadge2:Tc,FileBadge2Icon:Tc,FileBadgeIcon:Tc,FileBarChart:Oc,FileBarChart2:Fc,FileBarChart2Icon:Fc,FileBarChartIcon:Oc,FileBox:C8,FileBoxIcon:C8,FileBraces:Hc,FileBracesCorner:Dc,FileBracesCornerIcon:Dc,FileBracesIcon:Hc,FileChartColumn:Fc,FileChartColumnIcon:Fc,FileChartColumnIncreasing:Oc,FileChartColumnIncreasingIcon:Oc,FileChartLine:qc,FileChartLineIcon:qc,FileChartPie:Vc,FileChartPieIcon:Vc,FileCheck:S8,FileCheck2:Bc,FileCheck2Icon:Bc,FileCheckCorner:Bc,FileCheckCornerIcon:Bc,FileCheckIcon:S8,FileClock:N8,FileClockIcon:N8,FileCode:L8,FileCode2:Uc,FileCode2Icon:Uc,FileCodeCorner:Uc,FileCodeCornerIcon:Uc,FileCodeIcon:L8,FileCog:Wc,FileCog2:Wc,FileCog2Icon:Wc,FileCogIcon:Wc,FileDiff:I8,FileDiffIcon:I8,FileDigit:A8,FileDigitIcon:A8,FileDown:ah,FileDownIcon:ah,FileEdit:Qc,FileEditIcon:Qc,FileExclamationPoint:Gc,FileExclamationPointIcon:Gc,FileHeadphone:br,FileHeadphoneIcon:br,FileHeart:E8,FileHeartIcon:E8,FileIcon:Y8,FileImage:j8,FileImageIcon:j8,FileInput:$8,FileInputIcon:$8,FileJson:Hc,FileJson2:Dc,FileJson2Icon:Dc,FileJsonIcon:Hc,FileKey:Kc,FileKey2:Kc,FileKey2Icon:Kc,FileKeyIcon:Kc,FileLineChart:qc,FileLineChartIcon:qc,FileLock:Xc,FileLock2:Xc,FileLock2Icon:Xc,FileLockIcon:Xc,FileMinus:P8,FileMinus2:Zc,FileMinus2Icon:Zc,FileMinusCorner:Zc,FileMinusCornerIcon:Zc,FileMinusIcon:P8,FileMusic:R8,FileMusicIcon:R8,FileOutput:z8,FileOutputIcon:z8,FilePen:Qc,FilePenIcon:Qc,FilePenLine:Yc,FilePenLineIcon:Yc,FilePieChart:Vc,FilePieChartIcon:Vc,FilePlay:Jc,FilePlayIcon:Jc,FilePlus:T8,FilePlus2:el,FilePlus2Icon:el,FilePlusCorner:el,FilePlusCornerIcon:el,FilePlusIcon:T8,FileQuestion:tl,FileQuestionIcon:tl,FileQuestionMark:tl,FileQuestionMarkIcon:tl,FileScan:D8,FileScanIcon:D8,FileSearch:H8,FileSearch2:nl,FileSearch2Icon:nl,FileSearchCorner:nl,FileSearchCornerIcon:nl,FileSearchIcon:H8,FileSignal:ol,FileSignalIcon:ol,FileSignature:Yc,FileSignatureIcon:Yc,FileSliders:O8,FileSlidersIcon:O8,FileSpreadsheet:F8,FileSpreadsheetIcon:F8,FileStack:q8,FileStackIcon:q8,FileSymlink:V8,FileSymlinkIcon:V8,FileTerminal:B8,FileTerminalIcon:B8,FileText:U8,FileTextIcon:U8,FileType:W8,FileType2:rl,FileType2Icon:rl,FileTypeCorner:rl,FileTypeCornerIcon:rl,FileTypeIcon:W8,FileUp:G8,FileUpIcon:G8,FileUser:K8,FileUserIcon:K8,FileVideo:Jc,FileVideo2:il,FileVideo2Icon:il,FileVideoCamera:il,FileVideoCameraIcon:il,FileVideoIcon:Jc,FileVolume:X8,FileVolume2:ol,FileVolume2Icon:ol,FileVolumeIcon:X8,FileWarning:Gc,FileWarningIcon:Gc,FileX:Z8,FileX2:al,FileX2Icon:al,FileXCorner:al,FileXCornerIcon:al,FileXIcon:Z8,Files:Q8,FilesIcon:Q8,Film:J8,FilmIcon:J8,Filter:ul,FilterIcon:ul,FilterX:dl,FilterXIcon:dl,Fingerprint:sl,FingerprintIcon:sl,FingerprintPattern:sl,FingerprintPatternIcon:sl,FireExtinguisher:e6,FireExtinguisherIcon:e6,Fish:o6,FishIcon:o6,FishOff:t6,FishOffIcon:t6,FishSymbol:n6,FishSymbolIcon:n6,FishingHook:r6,FishingHookIcon:r6,Flag:c6,FlagIcon:c6,FlagOff:i6,FlagOffIcon:i6,FlagTriangleLeft:a6,FlagTriangleLeftIcon:a6,FlagTriangleRight:s6,FlagTriangleRightIcon:s6,Flame:d6,FlameIcon:d6,FlameKindling:l6,FlameKindlingIcon:l6,Flashlight:h6,FlashlightIcon:h6,FlashlightOff:u6,FlashlightOffIcon:u6,FlaskConical:y6,FlaskConicalIcon:y6,FlaskConicalOff:f6,FlaskConicalOffIcon:f6,FlaskRound:p6,FlaskRoundIcon:p6,FlipHorizontal:g6,FlipHorizontal2:m6,FlipHorizontal2Icon:m6,FlipHorizontalIcon:g6,FlipVertical:v6,FlipVertical2:k6,FlipVertical2Icon:k6,FlipVerticalIcon:v6,Flower:w6,Flower2:x6,Flower2Icon:x6,FlowerIcon:w6,Focus:M6,FocusIcon:M6,FoldHorizontal:b6,FoldHorizontalIcon:b6,FoldVertical:_6,FoldVerticalIcon:_6,Folder:Y6,FolderArchive:C6,FolderArchiveIcon:C6,FolderCheck:S6,FolderCheckIcon:S6,FolderClock:L6,FolderClockIcon:L6,FolderClosed:I6,FolderClosedIcon:I6,FolderCode:N6,FolderCodeIcon:N6,FolderCog:cl,FolderCog2:cl,FolderCog2Icon:cl,FolderCogIcon:cl,FolderDot:A6,FolderDotIcon:A6,FolderDown:E6,FolderDownIcon:E6,FolderEdit:ll,FolderEditIcon:ll,FolderGit:$6,FolderGit2:j6,FolderGit2Icon:j6,FolderGitIcon:$6,FolderHeart:P6,FolderHeartIcon:P6,FolderIcon:Y6,FolderInput:z6,FolderInputIcon:z6,FolderKanban:R6,FolderKanbanIcon:R6,FolderKey:T6,FolderKeyIcon:T6,FolderLock:D6,FolderLockIcon:D6,FolderMinus:H6,FolderMinusIcon:H6,FolderOpen:sh,FolderOpenDot:O6,FolderOpenDotIcon:O6,FolderOpenIcon:sh,FolderOutput:F6,FolderOutputIcon:F6,FolderPen:ll,FolderPenIcon:ll,FolderPlus:q6,FolderPlusIcon:q6,FolderRoot:V6,FolderRootIcon:V6,FolderSearch:U6,FolderSearch2:B6,FolderSearch2Icon:B6,FolderSearchIcon:U6,FolderSymlink:W6,FolderSymlinkIcon:W6,FolderSync:G6,FolderSyncIcon:G6,FolderTree:K6,FolderTreeIcon:K6,FolderUp:X6,FolderUpIcon:X6,FolderX:Z6,FolderXIcon:Z6,Folders:Q6,FoldersIcon:Q6,Footprints:J6,FootprintsIcon:J6,ForkKnife:md,ForkKnifeCrossed:yd,ForkKnifeCrossedIcon:yd,ForkKnifeIcon:md,Forklift:nw,ForkliftIcon:nw,Form:ew,FormIcon:ew,FormInput:Ul,FormInputIcon:Ul,Forward:tw,ForwardIcon:tw,Frame:ow,FrameIcon:ow,Framer:aw,FramerIcon:aw,Frown:rw,FrownIcon:rw,Fuel:iw,FuelIcon:iw,Fullscreen:sw,FullscreenIcon:sw,FunctionSquare:I1,FunctionSquareIcon:I1,Funnel:ul,FunnelIcon:ul,FunnelPlus:cw,FunnelPlusIcon:cw,FunnelX:dl,FunnelXIcon:dl,GalleryHorizontal:dw,GalleryHorizontalEnd:lw,GalleryHorizontalEndIcon:lw,GalleryHorizontalIcon:dw,GalleryThumbnails:uw,GalleryThumbnailsIcon:uw,GalleryVertical:fw,GalleryVerticalEnd:hw,GalleryVerticalEndIcon:hw,GalleryVerticalIcon:fw,Gamepad:gw,Gamepad2:pw,Gamepad2Icon:pw,GamepadDirectional:yw,GamepadDirectionalIcon:yw,GamepadIcon:gw,GanttChart:Gs,GanttChartIcon:Gs,GanttChartSquare:Lr,GanttChartSquareIcon:Lr,Gauge:mw,GaugeCircle:uc,GaugeCircleIcon:uc,GaugeIcon:mw,Gavel:kw,GavelIcon:kw,Gem:vw,GemIcon:vw,GeorgianLari:xw,GeorgianLariIcon:xw,Ghost:Mw,GhostIcon:Mw,Gift:ww,GiftIcon:ww,GitBranch:Cw,GitBranchIcon:Cw,GitBranchMinus:bw,GitBranchMinusIcon:bw,GitBranchPlus:_w,GitBranchPlusIcon:_w,GitCommit:hl,GitCommitHorizontal:hl,GitCommitHorizontalIcon:hl,GitCommitIcon:hl,GitCommitVertical:Sw,GitCommitVerticalIcon:Sw,GitCompare:Nw,GitCompareArrows:Lw,GitCompareArrowsIcon:Lw,GitCompareIcon:Nw,GitFork:Iw,GitForkIcon:Iw,GitGraph:Aw,GitGraphIcon:Aw,GitMerge:Ew,GitMergeIcon:Ew,GitPullRequest:Tw,GitPullRequestArrow:jw,GitPullRequestArrowIcon:jw,GitPullRequestClosed:$w,GitPullRequestClosedIcon:$w,GitPullRequestCreate:zw,GitPullRequestCreateArrow:Pw,GitPullRequestCreateArrowIcon:Pw,GitPullRequestCreateIcon:zw,GitPullRequestDraft:Rw,GitPullRequestDraftIcon:Rw,GitPullRequestIcon:Tw,Github:Dw,GithubIcon:Dw,Gitlab:Hw,GitlabIcon:Hw,GlassWater:Ow,GlassWaterIcon:Ow,Glasses:Fw,GlassesIcon:Fw,Globe:Bw,Globe2:$c,Globe2Icon:$c,GlobeIcon:Bw,GlobeLock:qw,GlobeLockIcon:qw,GlobeX:Vw,GlobeXIcon:Vw,Goal:Uw,GoalIcon:Uw,Gpu:Ww,GpuIcon:Ww,Grab:gl,GrabIcon:gl,GraduationCap:Gw,GraduationCapIcon:Gw,Grape:Kw,GrapeIcon:Kw,Grid:_r,Grid2X2:ml,Grid2X2Check:fl,Grid2X2CheckIcon:fl,Grid2X2Icon:ml,Grid2X2Plus:pl,Grid2X2PlusIcon:pl,Grid2X2X:yl,Grid2X2XIcon:yl,Grid2x2:ml,Grid2x2Check:fl,Grid2x2CheckIcon:fl,Grid2x2Icon:ml,Grid2x2Plus:pl,Grid2x2PlusIcon:pl,Grid2x2X:yl,Grid2x2XIcon:yl,Grid3X3:_r,Grid3X3Icon:_r,Grid3x2:Xw,Grid3x2Icon:Xw,Grid3x3:_r,Grid3x3Icon:_r,GridIcon:_r,Grip:Yw,GripHorizontal:Zw,GripHorizontalIcon:Zw,GripIcon:Yw,GripVertical:Qw,GripVerticalIcon:Qw,Group:Jw,GroupIcon:Jw,Guitar:e7,GuitarIcon:e7,Ham:t7,HamIcon:t7,Hamburger:n7,HamburgerIcon:n7,Hammer:o7,HammerIcon:o7,Hand:ch,HandCoins:r7,HandCoinsIcon:r7,HandFist:i7,HandFistIcon:i7,HandGrab:gl,HandGrabIcon:gl,HandHeart:a7,HandHeartIcon:a7,HandHelping:kl,HandHelpingIcon:kl,HandIcon:ch,HandMetal:s7,HandMetalIcon:s7,HandPlatter:c7,HandPlatterIcon:c7,Handbag:l7,HandbagIcon:l7,Handshake:d7,HandshakeIcon:d7,HardDrive:f7,HardDriveDownload:u7,HardDriveDownloadIcon:u7,HardDriveIcon:f7,HardDriveUpload:h7,HardDriveUploadIcon:h7,HardHat:p7,HardHatIcon:p7,Hash:y7,HashIcon:y7,HatGlasses:m7,HatGlassesIcon:m7,Haze:g7,HazeIcon:g7,Hd:k7,HdIcon:k7,HdmiPort:v7,HdmiPortIcon:v7,Heading:S7,Heading1:x7,Heading1Icon:x7,Heading2:w7,Heading2Icon:w7,Heading3:M7,Heading3Icon:M7,Heading4:b7,Heading4Icon:b7,Heading5:_7,Heading5Icon:_7,Heading6:C7,Heading6Icon:C7,HeadingIcon:S7,HeadphoneOff:L7,HeadphoneOffIcon:L7,Headphones:N7,HeadphonesIcon:N7,Headset:I7,HeadsetIcon:I7,Heart:R7,HeartCrack:A7,HeartCrackIcon:A7,HeartHandshake:j7,HeartHandshakeIcon:j7,HeartIcon:R7,HeartMinus:E7,HeartMinusIcon:E7,HeartOff:$7,HeartOffIcon:$7,HeartPlus:P7,HeartPlusIcon:P7,HeartPulse:z7,HeartPulseIcon:z7,Heater:T7,HeaterIcon:T7,Helicopter:D7,HelicopterIcon:D7,HelpCircle:qo,HelpCircleIcon:qo,HelpingHand:kl,HelpingHandIcon:kl,Hexagon:lh,HexagonIcon:lh,Highlighter:H7,HighlighterIcon:H7,History:O7,HistoryIcon:O7,Home:vl,HomeIcon:vl,Hop:F7,HopIcon:F7,HopOff:q7,HopOffIcon:q7,Hospital:V7,HospitalIcon:V7,Hotel:B7,HotelIcon:B7,Hourglass:U7,HourglassIcon:U7,House:vl,HouseHeart:W7,HouseHeartIcon:W7,HouseIcon:vl,HousePlug:G7,HousePlugIcon:G7,HousePlus:K7,HousePlusIcon:K7,HouseWifi:X7,HouseWifiIcon:X7,IceCream:wl,IceCream2:xl,IceCream2Icon:xl,IceCreamBowl:xl,IceCreamBowlIcon:xl,IceCreamCone:wl,IceCreamConeIcon:wl,IceCreamIcon:wl,Icon:qY,IdCard:Y7,IdCardIcon:Y7,IdCardLanyard:Z7,IdCardLanyardIcon:Z7,Image:uh,ImageDown:Q7,ImageDownIcon:Q7,ImageIcon:uh,ImageMinus:eM,ImageMinusIcon:eM,ImageOff:J7,ImageOffIcon:J7,ImagePlay:tM,ImagePlayIcon:tM,ImagePlus:dh,ImagePlusIcon:dh,ImageUp:nM,ImageUpIcon:nM,ImageUpscale:oM,ImageUpscaleIcon:oM,Images:rM,ImagesIcon:rM,Import:iM,ImportIcon:iM,Inbox:aM,InboxIcon:aM,Indent:Sr,IndentDecrease:Cr,IndentDecreaseIcon:Cr,IndentIcon:Sr,IndentIncrease:Sr,IndentIncreaseIcon:Sr,IndianRupee:sM,IndianRupeeIcon:sM,Infinity:lM,InfinityIcon:lM,Info:cM,InfoIcon:cM,Inspect:z1,InspectIcon:z1,InspectionPanel:dM,InspectionPanelIcon:dM,Instagram:uM,InstagramIcon:uM,Italic:hM,ItalicIcon:hM,IterationCcw:fM,IterationCcwIcon:fM,IterationCw:pM,IterationCwIcon:pM,JapaneseYen:yM,JapaneseYenIcon:yM,Joystick:mM,JoystickIcon:mM,Kanban:gM,KanbanIcon:gM,KanbanSquare:A1,KanbanSquareDashed:b1,KanbanSquareDashedIcon:b1,KanbanSquareIcon:A1,Kayak:kM,KayakIcon:kM,Key:wM,KeyIcon:wM,KeyRound:vM,KeyRoundIcon:vM,KeySquare:xM,KeySquareIcon:xM,Keyboard:_M,KeyboardIcon:_M,KeyboardMusic:MM,KeyboardMusicIcon:MM,KeyboardOff:bM,KeyboardOffIcon:bM,Lamp:AM,LampCeiling:CM,LampCeilingIcon:CM,LampDesk:SM,LampDeskIcon:SM,LampFloor:LM,LampFloorIcon:LM,LampIcon:AM,LampWallDown:NM,LampWallDownIcon:NM,LampWallUp:IM,LampWallUpIcon:IM,LandPlot:EM,LandPlotIcon:EM,Landmark:jM,LandmarkIcon:jM,Languages:$M,LanguagesIcon:$M,Laptop:RM,Laptop2:Ml,Laptop2Icon:Ml,LaptopIcon:RM,LaptopMinimal:Ml,LaptopMinimalCheck:PM,LaptopMinimalCheckIcon:PM,LaptopMinimalIcon:Ml,Lasso:TM,LassoIcon:TM,LassoSelect:zM,LassoSelectIcon:zM,Laugh:DM,LaughIcon:DM,Layers:Ci,Layers2:HM,Layers2Icon:HM,Layers3:Ci,Layers3Icon:Ci,LayersIcon:Ci,LayersPlus:OM,LayersPlusIcon:OM,Layout:Fl,LayoutDashboard:hh,LayoutDashboardIcon:hh,LayoutGrid:FM,LayoutGridIcon:FM,LayoutIcon:Fl,LayoutList:qM,LayoutListIcon:qM,LayoutPanelLeft:VM,LayoutPanelLeftIcon:VM,LayoutPanelTop:UM,LayoutPanelTopIcon:UM,LayoutTemplate:BM,LayoutTemplateIcon:BM,Leaf:WM,LeafIcon:WM,LeafyGreen:GM,LeafyGreenIcon:GM,Lectern:KM,LecternIcon:KM,LetterText:td,LetterTextIcon:td,Library:ZM,LibraryBig:XM,LibraryBigIcon:XM,LibraryIcon:ZM,LibrarySquare:E1,LibrarySquareIcon:E1,LifeBuoy:YM,LifeBuoyIcon:YM,Ligature:QM,LigatureIcon:QM,Lightbulb:eb,LightbulbIcon:eb,LightbulbOff:JM,LightbulbOffIcon:JM,LineChart:Bs,LineChartIcon:Bs,LineSquiggle:tb,LineSquiggleIcon:tb,Link:ob,Link2:$a,Link2Icon:$a,Link2Off:nb,Link2OffIcon:nb,LinkIcon:ob,Linkedin:rb,LinkedinIcon:rb,List:bb,ListCheck:ib,ListCheckIcon:ib,ListChecks:ab,ListChecksIcon:ab,ListChevronsDownUp:sb,ListChevronsDownUpIcon:sb,ListChevronsUpDown:lb,ListChevronsUpDownIcon:lb,ListCollapse:cb,ListCollapseIcon:cb,ListEnd:db,ListEndIcon:db,ListFilter:hb,ListFilterIcon:hb,ListFilterPlus:ub,ListFilterPlusIcon:ub,ListIcon:bb,ListIndentDecrease:Cr,ListIndentDecreaseIcon:Cr,ListIndentIncrease:Sr,ListIndentIncreaseIcon:Sr,ListMinus:fb,ListMinusIcon:fb,ListMusic:pb,ListMusicIcon:pb,ListOrdered:yb,ListOrderedIcon:yb,ListPlus:mb,ListPlusIcon:mb,ListRestart:gb,ListRestartIcon:gb,ListStart:kb,ListStartIcon:kb,ListTodo:vb,ListTodoIcon:vb,ListTree:xb,ListTreeIcon:xb,ListVideo:wb,ListVideoIcon:wb,ListX:Mb,ListXIcon:Mb,Loader:Cb,Loader2:qn,Loader2Icon:qn,LoaderCircle:qn,LoaderCircleIcon:qn,LoaderIcon:Cb,LoaderPinwheel:_b,LoaderPinwheelIcon:_b,Locate:Nb,LocateFixed:Sb,LocateFixedIcon:Sb,LocateIcon:Nb,LocateOff:Lb,LocateOffIcon:Lb,LocationEdit:Sl,LocationEditIcon:Sl,Lock:Ab,LockIcon:Ab,LockKeyhole:Ib,LockKeyholeIcon:Ib,LockKeyholeOpen:bl,LockKeyholeOpenIcon:bl,LockOpen:_l,LockOpenIcon:_l,LogIn:Eb,LogInIcon:Eb,LogOut:jb,LogOutIcon:jb,Logs:$b,LogsIcon:$b,Lollipop:Pb,LollipopIcon:Pb,LucideAArrowDown:uy,LucideAArrowUp:hy,LucideALargeSmall:fy,LucideAccessibility:py,LucideActivity:yy,LucideActivitySquare:t1,LucideAirVent:my,LucideAirplay:gy,LucideAlarmCheck:xs,LucideAlarmClock:vy,LucideAlarmClockCheck:xs,LucideAlarmClockMinus:ws,LucideAlarmClockOff:ky,LucideAlarmClockPlus:Ms,LucideAlarmMinus:ws,LucideAlarmPlus:Ms,LucideAlarmSmoke:xy,LucideAlbum:wy,LucideAlertCircle:ha,LucideAlertOctagon:Al,LucideAlertTriangle:jr,LucideAlignCenter:ya,LucideAlignCenterHorizontal:by,LucideAlignCenterVertical:My,LucideAlignEndHorizontal:_y,LucideAlignEndVertical:Cy,LucideAlignHorizontalDistributeCenter:Sy,LucideAlignHorizontalDistributeEnd:Ly,LucideAlignHorizontalDistributeStart:Ny,LucideAlignHorizontalJustifyCenter:Iy,LucideAlignHorizontalJustifyEnd:Ey,LucideAlignHorizontalJustifyStart:Ay,LucideAlignHorizontalSpaceAround:jy,LucideAlignHorizontalSpaceBetween:$y,LucideAlignJustify:ed,LucideAlignLeft:Vo,LucideAlignRight:ma,LucideAlignStartHorizontal:Py,LucideAlignStartVertical:zy,LucideAlignVerticalDistributeCenter:Ry,LucideAlignVerticalDistributeEnd:Ty,LucideAlignVerticalDistributeStart:Dy,LucideAlignVerticalJustifyCenter:Hy,LucideAlignVerticalJustifyEnd:Oy,LucideAlignVerticalJustifyStart:Fy,LucideAlignVerticalSpaceAround:qy,LucideAlignVerticalSpaceBetween:Vy,LucideAmbulance:By,LucideAmpersand:Uy,LucideAmpersands:Wy,LucideAmphora:Gy,LucideAnchor:Ky,LucideAngry:Xy,LucideAnnoyed:Zy,LucideAntenna:Yy,LucideAnvil:Qy,LucideAperture:Jy,LucideAppWindow:tm,LucideAppWindowMac:em,LucideApple:nm,LucideArchive:im,LucideArchiveRestore:om,LucideArchiveX:rm,LucideAreaChart:Ts,LucideArmchair:am,LucideArrowBigDown:cm,LucideArrowBigDownDash:sm,LucideArrowBigLeft:dm,LucideArrowBigLeftDash:lm,LucideArrowBigRight:hm,LucideArrowBigRightDash:um,LucideArrowBigUp:pm,LucideArrowBigUpDash:fm,LucideArrowDown:_m,LucideArrowDown01:ym,LucideArrowDown10:mm,LucideArrowDownAZ:bs,LucideArrowDownAz:bs,LucideArrowDownCircle:Ys,LucideArrowDownFromLine:gm,LucideArrowDownLeft:vm,LucideArrowDownLeftFromCircle:Qs,LucideArrowDownLeftFromSquare:a1,LucideArrowDownLeftSquare:n1,LucideArrowDownNarrowWide:km,LucideArrowDownRight:wm,LucideArrowDownRightFromCircle:ec,LucideArrowDownRightFromSquare:s1,LucideArrowDownRightSquare:o1,LucideArrowDownSquare:r1,LucideArrowDownToDot:xm,LucideArrowDownToLine:Mm,LucideArrowDownUp:bm,LucideArrowDownWideNarrow:_s,LucideArrowDownZA:Cs,LucideArrowDownZa:Cs,LucideArrowLeft:Lm,LucideArrowLeftCircle:Js,LucideArrowLeftFromLine:Cm,LucideArrowLeftRight:J2,LucideArrowLeftSquare:i1,LucideArrowLeftToLine:Sm,LucideArrowRight:i0,LucideArrowRightCircle:oc,LucideArrowRightFromLine:Nm,LucideArrowRightLeft:Im,LucideArrowRightSquare:d1,LucideArrowRightToLine:Am,LucideArrowUp:Om,LucideArrowUp01:Em,LucideArrowUp10:jm,LucideArrowUpAZ:Ss,LucideArrowUpAz:Ss,LucideArrowUpCircle:rc,LucideArrowUpDown:$m,LucideArrowUpFromDot:Pm,LucideArrowUpFromLine:zm,LucideArrowUpLeft:Rm,LucideArrowUpLeftFromCircle:tc,LucideArrowUpLeftFromSquare:c1,LucideArrowUpLeftSquare:u1,LucideArrowUpNarrowWide:Ls,LucideArrowUpRight:Dm,LucideArrowUpRightFromCircle:nc,LucideArrowUpRightFromSquare:l1,LucideArrowUpRightSquare:p1,LucideArrowUpSquare:h1,LucideArrowUpToLine:Tm,LucideArrowUpWideNarrow:Hm,LucideArrowUpZA:Ns,LucideArrowUpZa:Ns,LucideArrowsUpFromLine:Fm,LucideAsterisk:qm,LucideAsteriskSquare:f1,LucideAtSign:Vm,LucideAtom:Bm,LucideAudioLines:Um,LucideAudioWaveform:Gm,LucideAward:Wm,LucideAxe:Km,LucideAxis3D:Is,LucideAxis3d:Is,LucideBaby:Xm,LucideBackpack:Zm,LucideBadge:hg,LucideBadgeAlert:Qm,LucideBadgeCent:Ym,LucideBadgeCheck:As,LucideBadgeDollarSign:Jm,LucideBadgeEuro:tg,LucideBadgeHelp:Es,LucideBadgeIndianRupee:eg,LucideBadgeInfo:ng,LucideBadgeJapaneseYen:og,LucideBadgeMinus:rg,LucideBadgePercent:ig,LucideBadgePlus:ag,LucideBadgePoundSterling:sg,LucideBadgeQuestionMark:Es,LucideBadgeRussianRuble:cg,LucideBadgeSwissFranc:lg,LucideBadgeTurkishLira:dg,LucideBadgeX:ug,LucideBaggageClaim:fg,LucideBalloon:pg,LucideBan:eh,LucideBanana:yg,LucideBandage:mg,LucideBanknote:xg,LucideBanknoteArrowDown:gg,LucideBanknoteArrowUp:kg,LucideBanknoteX:vg,LucideBarChart:Us,LucideBarChart2:Ws,LucideBarChart3:Vs,LucideBarChart4:qs,LucideBarChartBig:Fs,LucideBarChartHorizontal:Hs,LucideBarChartHorizontalBig:Ds,LucideBarcode:wg,LucideBarrel:Mg,LucideBaseline:bg,LucideBath:_g,LucideBattery:Eg,LucideBatteryCharging:Cg,LucideBatteryFull:Sg,LucideBatteryLow:Lg,LucideBatteryMedium:Ng,LucideBatteryPlus:Ig,LucideBatteryWarning:Ag,LucideBeaker:jg,LucideBean:Pg,LucideBeanOff:$g,LucideBed:Tg,LucideBedDouble:zg,LucideBedSingle:Rg,LucideBeef:Dg,LucideBeer:Og,LucideBeerOff:Hg,LucideBell:Gg,LucideBellDot:Fg,LucideBellElectric:qg,LucideBellMinus:Vg,LucideBellOff:Bg,LucideBellPlus:Ug,LucideBellRing:Wg,LucideBetweenHorizonalEnd:js,LucideBetweenHorizonalStart:$s,LucideBetweenHorizontalEnd:js,LucideBetweenHorizontalStart:$s,LucideBetweenVerticalEnd:Kg,LucideBetweenVerticalStart:Xg,LucideBicepsFlexed:Zg,LucideBike:Yg,LucideBinary:Qg,LucideBinoculars:Jg,LucideBiohazard:ek,LucideBird:tk,LucideBirdhouse:nk,LucideBitcoin:ok,LucideBlend:rk,LucideBlinds:ik,LucideBlocks:ak,LucideBluetooth:dk,LucideBluetoothConnected:sk,LucideBluetoothOff:ck,LucideBluetoothSearching:lk,LucideBold:uk,LucideBolt:hk,LucideBomb:fk,LucideBone:pk,LucideBook:Hk,LucideBookA:yk,LucideBookAlert:mk,LucideBookAudio:gk,LucideBookCheck:kk,LucideBookCopy:vk,LucideBookDashed:Ps,LucideBookDown:xk,LucideBookHeadphones:wk,LucideBookHeart:Mk,LucideBookImage:bk,LucideBookKey:_k,LucideBookLock:Ck,LucideBookMarked:Sk,LucideBookMinus:Lk,LucideBookOpen:Ak,LucideBookOpenCheck:Nk,LucideBookOpenText:Ik,LucideBookPlus:Ek,LucideBookSearch:jk,LucideBookTemplate:Ps,LucideBookText:$k,LucideBookType:Pk,LucideBookUp:Rk,LucideBookUp2:zk,LucideBookUser:Tk,LucideBookX:Dk,LucideBookmark:Bk,LucideBookmarkCheck:Ok,LucideBookmarkMinus:Fk,LucideBookmarkPlus:qk,LucideBookmarkX:Vk,LucideBoomBox:Uk,LucideBot:Gk,LucideBotMessageSquare:Wk,LucideBotOff:Kk,LucideBottleWine:Xk,LucideBowArrow:Zk,LucideBox:Yk,LucideBoxSelect:C1,LucideBoxes:Qk,LucideBraces:zs,LucideBrackets:Jk,LucideBrain:n4,LucideBrainCircuit:e4,LucideBrainCog:t4,LucideBrickWall:i4,LucideBrickWallFire:o4,LucideBrickWallShield:r4,LucideBriefcase:l4,LucideBriefcaseBusiness:a4,LucideBriefcaseConveyorBelt:s4,LucideBriefcaseMedical:c4,LucideBringToFront:d4,LucideBrush:f4,LucideBrushCleaning:u4,LucideBubbles:h4,LucideBug:m4,LucideBugOff:p4,LucideBugPlay:y4,LucideBuilding:g4,LucideBuilding2:k4,LucideBus:x4,LucideBusFront:v4,LucideCable:M4,LucideCableCar:w4,LucideCake:_4,LucideCakeSlice:b4,LucideCalculator:C4,LucideCalendar:W4,LucideCalendar1:S4,LucideCalendarArrowDown:L4,LucideCalendarArrowUp:N4,LucideCalendarCheck:A4,LucideCalendarCheck2:I4,LucideCalendarClock:E4,LucideCalendarCog:j4,LucideCalendarDays:$4,LucideCalendarFold:P4,LucideCalendarHeart:z4,LucideCalendarMinus:T4,LucideCalendarMinus2:R4,LucideCalendarOff:D4,LucideCalendarPlus:F4,LucideCalendarPlus2:H4,LucideCalendarRange:O4,LucideCalendarSearch:q4,LucideCalendarSync:V4,LucideCalendarX:U4,LucideCalendarX2:B4,LucideCalendars:G4,LucideCamera:X4,LucideCameraOff:K4,LucideCandlestickChart:Os,LucideCandy:Q4,LucideCandyCane:Z4,LucideCandyOff:Y4,LucideCannabis:e5,LucideCannabisOff:J4,LucideCaptions:Rs,LucideCaptionsOff:t5,LucideCar:r5,LucideCarFront:n5,LucideCarTaxiFront:o5,LucideCaravan:i5,LucideCardSim:a5,LucideCarrot:s5,LucideCaseLower:c5,LucideCaseSensitive:l5,LucideCaseUpper:d5,LucideCassetteTape:u5,LucideCast:h5,LucideCastle:f5,LucideCat:p5,LucideCctv:y5,LucideChartArea:Ts,LucideChartBar:Hs,LucideChartBarBig:Ds,LucideChartBarDecreasing:m5,LucideChartBarIncreasing:g5,LucideChartBarStacked:k5,LucideChartCandlestick:Os,LucideChartColumn:Vs,LucideChartColumnBig:Fs,LucideChartColumnDecreasing:v5,LucideChartColumnIncreasing:qs,LucideChartColumnStacked:x5,LucideChartGantt:w5,LucideChartLine:Bs,LucideChartNetwork:M5,LucideChartNoAxesColumn:Ws,LucideChartNoAxesColumnDecreasing:b5,LucideChartNoAxesColumnIncreasing:Us,LucideChartNoAxesCombined:_5,LucideChartNoAxesGantt:Gs,LucideChartPie:Ks,LucideChartScatter:Xs,LucideChartSpline:C5,LucideCheck:ja,LucideCheckCheck:S5,LucideCheckCircle:ic,LucideCheckCircle2:fa,LucideCheckLine:L5,LucideCheckSquare:m1,LucideCheckSquare2:g1,LucideChefHat:N5,LucideCherry:I5,LucideChessBishop:A5,LucideChessKing:E5,LucideChessKnight:j5,LucideChessPawn:$5,LucideChessQueen:P5,LucideChessRook:R5,LucideChevronDown:z5,LucideChevronDownCircle:ac,LucideChevronDownSquare:k1,LucideChevronFirst:T5,LucideChevronLast:D5,LucideChevronLeft:H5,LucideChevronLeftCircle:sc,LucideChevronLeftSquare:v1,LucideChevronRight:O5,LucideChevronRightCircle:cc,LucideChevronRightSquare:w1,LucideChevronUp:F5,LucideChevronUpCircle:lc,LucideChevronUpSquare:x1,LucideChevronsDown:V5,LucideChevronsDownUp:q5,LucideChevronsLeft:W5,LucideChevronsLeftRight:U5,LucideChevronsLeftRightEllipsis:B5,LucideChevronsRight:K5,LucideChevronsRightLeft:G5,LucideChevronsUp:Z5,LucideChevronsUpDown:X5,LucideChrome:Zs,LucideChromium:Zs,LucideChurch:Y5,LucideCigarette:J5,LucideCigaretteOff:Q5,LucideCircle:th,LucideCircleAlert:ha,LucideCircleArrowDown:Ys,LucideCircleArrowLeft:Js,LucideCircleArrowOutDownLeft:Qs,LucideCircleArrowOutDownRight:ec,LucideCircleArrowOutUpLeft:tc,LucideCircleArrowOutUpRight:nc,LucideCircleArrowRight:oc,LucideCircleArrowUp:rc,LucideCircleCheck:fa,LucideCircleCheckBig:ic,LucideCircleChevronDown:ac,LucideCircleChevronLeft:sc,LucideCircleChevronRight:cc,LucideCircleChevronUp:lc,LucideCircleDashed:ev,LucideCircleDivide:dc,LucideCircleDollarSign:tv,LucideCircleDot:ov,LucideCircleDotDashed:nv,LucideCircleEllipsis:rv,LucideCircleEqual:iv,LucideCircleFadingArrowUp:av,LucideCircleFadingPlus:sv,LucideCircleGauge:uc,LucideCircleHelp:qo,LucideCircleMinus:hc,LucideCircleOff:cv,LucideCircleParking:pc,LucideCircleParkingOff:fc,LucideCirclePause:yc,LucideCirclePercent:mc,LucideCirclePile:lv,LucideCirclePlay:gc,LucideCirclePlus:kc,LucideCirclePoundSterling:dv,LucideCirclePower:vc,LucideCircleQuestionMark:qo,LucideCircleSlash:uv,LucideCircleSlash2:xc,LucideCircleSlashed:xc,LucideCircleSmall:hv,LucideCircleStar:fv,LucideCircleStop:Mc,LucideCircleUser:bc,LucideCircleUserRound:wc,LucideCircleX:_c,LucideCircuitBoard:pv,LucideCitrus:yv,LucideClapperboard:mv,LucideClipboard:Sv,LucideClipboardCheck:gv,LucideClipboardClock:kv,LucideClipboardCopy:vv,LucideClipboardEdit:Sc,LucideClipboardList:xv,LucideClipboardMinus:wv,LucideClipboardPaste:Mv,LucideClipboardPen:Sc,LucideClipboardPenLine:Cc,LucideClipboardPlus:bv,LucideClipboardSignature:Cc,LucideClipboardType:_v,LucideClipboardX:Cv,LucideClock:Uv,LucideClock1:Lv,LucideClock10:Nv,LucideClock11:Iv,LucideClock12:Av,LucideClock2:Ev,LucideClock3:jv,LucideClock4:$v,LucideClock5:Pv,LucideClock6:zv,LucideClock7:Rv,LucideClock8:Tv,LucideClock9:Dv,LucideClockAlert:Hv,LucideClockArrowDown:Ov,LucideClockArrowUp:Vv,LucideClockCheck:Fv,LucideClockFading:qv,LucideClockPlus:Bv,LucideClosedCaption:Wv,LucideCloud:nh,LucideCloudAlert:Gv,LucideCloudBackup:Kv,LucideCloudCheck:Xv,LucideCloudCog:Zv,LucideCloudDownload:Lc,LucideCloudDrizzle:Yv,LucideCloudFog:Qv,LucideCloudHail:Jv,LucideCloudLightning:ex,LucideCloudMoon:nx,LucideCloudMoonRain:tx,LucideCloudOff:ox,LucideCloudRain:ix,LucideCloudRainWind:rx,LucideCloudSnow:ax,LucideCloudSun:cx,LucideCloudSunRain:sx,LucideCloudSync:lx,LucideCloudUpload:Nc,LucideCloudy:dx,LucideClover:ux,LucideClub:hx,LucideCode:fx,LucideCode2:Ic,LucideCodeSquare:M1,LucideCodeXml:Ic,LucideCodepen:px,LucideCodesandbox:yx,LucideCoffee:mx,LucideCog:gx,LucideCoins:kx,LucideColumns:Ac,LucideColumns2:Ac,LucideColumns3:pa,LucideColumns3Cog:Mr,LucideColumns4:vx,LucideColumnsSettings:Mr,LucideCombine:xx,LucideCommand:wx,LucideCompass:Mx,LucideComponent:bx,LucideComputer:_x,LucideConciergeBell:Cx,LucideCone:Sx,LucideConstruction:Lx,LucideContact:Nx,LucideContact2:Ec,LucideContactRound:Ec,LucideContainer:Ix,LucideContrast:Ax,LucideCookie:Ex,LucideCookingPot:jx,LucideCopy:Dx,LucideCopyCheck:$x,LucideCopyMinus:Px,LucideCopyPlus:zx,LucideCopySlash:Rx,LucideCopyX:Tx,LucideCopyleft:Ox,LucideCopyright:Hx,LucideCornerDownLeft:Fx,LucideCornerDownRight:qx,LucideCornerLeftDown:Vx,LucideCornerLeftUp:Bx,LucideCornerRightDown:Wx,LucideCornerRightUp:Ux,LucideCornerUpLeft:Kx,LucideCornerUpRight:Gx,LucideCpu:Xx,LucideCreativeCommons:Zx,LucideCreditCard:Yx,LucideCroissant:Qx,LucideCrop:Jx,LucideCross:e3,LucideCrosshair:t3,LucideCrown:n3,LucideCuboid:o3,LucideCupSoda:r3,LucideCurlyBraces:zs,LucideCurrency:i3,LucideCylinder:a3,LucideDam:s3,LucideDatabase:oh,LucideDatabaseBackup:c3,LucideDatabaseSearch:l3,LucideDatabaseZap:d3,LucideDecimalsArrowLeft:u3,LucideDecimalsArrowRight:h3,LucideDelete:f3,LucideDessert:p3,LucideDiameter:y3,LucideDiamond:rh,LucideDiamondMinus:m3,LucideDiamondPercent:jc,LucideDiamondPlus:g3,LucideDice1:k3,LucideDice2:x3,LucideDice3:v3,LucideDice4:w3,LucideDice5:M3,LucideDice6:b3,LucideDices:_3,LucideDiff:C3,LucideDisc:I3,LucideDisc2:S3,LucideDisc3:N3,LucideDiscAlbum:L3,LucideDivide:A3,LucideDivideCircle:dc,LucideDivideSquare:S1,LucideDna:j3,LucideDnaOff:E3,LucideDock:$3,LucideDog:P3,LucideDollarSign:z3,LucideDonut:R3,LucideDoorClosed:D3,LucideDoorClosedLocked:T3,LucideDoorOpen:H3,LucideDot:O3,LucideDotSquare:L1,LucideDownload:a0,LucideDownloadCloud:Lc,LucideDraftingCompass:F3,LucideDrama:q3,LucideDribbble:V3,LucideDrill:B3,LucideDrone:U3,LucideDroplet:G3,LucideDropletOff:W3,LucideDroplets:K3,LucideDrum:X3,LucideDrumstick:Z3,LucideDumbbell:Y3,LucideEar:Q3,LucideEarOff:J3,LucideEarth:$c,LucideEarthLock:e8,LucideEclipse:t8,LucideEdit:no,LucideEdit2:Vl,LucideEdit3:ql,LucideEgg:r8,LucideEggFried:n8,LucideEggOff:o8,LucideEllipsis:zc,LucideEllipsisVertical:Pc,LucideEqual:s8,LucideEqualApproximately:i8,LucideEqualNot:a8,LucideEqualSquare:N1,LucideEraser:c8,LucideEthernetPort:l8,LucideEuro:d8,LucideEvCharger:u8,LucideExpand:h8,LucideExternalLink:ih,LucideEye:y8,LucideEyeClosed:f8,LucideEyeOff:p8,LucideFacebook:m8,LucideFactory:g8,LucideFan:v8,LucideFastForward:k8,LucideFeather:x8,LucideFence:w8,LucideFerrisWheel:M8,LucideFigma:b8,LucideFile:Y8,LucideFileArchive:_8,LucideFileAudio:br,LucideFileAudio2:br,LucideFileAxis3D:Rc,LucideFileAxis3d:Rc,LucideFileBadge:Tc,LucideFileBadge2:Tc,LucideFileBarChart:Oc,LucideFileBarChart2:Fc,LucideFileBox:C8,LucideFileBraces:Hc,LucideFileBracesCorner:Dc,LucideFileChartColumn:Fc,LucideFileChartColumnIncreasing:Oc,LucideFileChartLine:qc,LucideFileChartPie:Vc,LucideFileCheck:S8,LucideFileCheck2:Bc,LucideFileCheckCorner:Bc,LucideFileClock:N8,LucideFileCode:L8,LucideFileCode2:Uc,LucideFileCodeCorner:Uc,LucideFileCog:Wc,LucideFileCog2:Wc,LucideFileDiff:I8,LucideFileDigit:A8,LucideFileDown:ah,LucideFileEdit:Qc,LucideFileExclamationPoint:Gc,LucideFileHeadphone:br,LucideFileHeart:E8,LucideFileImage:j8,LucideFileInput:$8,LucideFileJson:Hc,LucideFileJson2:Dc,LucideFileKey:Kc,LucideFileKey2:Kc,LucideFileLineChart:qc,LucideFileLock:Xc,LucideFileLock2:Xc,LucideFileMinus:P8,LucideFileMinus2:Zc,LucideFileMinusCorner:Zc,LucideFileMusic:R8,LucideFileOutput:z8,LucideFilePen:Qc,LucideFilePenLine:Yc,LucideFilePieChart:Vc,LucideFilePlay:Jc,LucideFilePlus:T8,LucideFilePlus2:el,LucideFilePlusCorner:el,LucideFileQuestion:tl,LucideFileQuestionMark:tl,LucideFileScan:D8,LucideFileSearch:H8,LucideFileSearch2:nl,LucideFileSearchCorner:nl,LucideFileSignal:ol,LucideFileSignature:Yc,LucideFileSliders:O8,LucideFileSpreadsheet:F8,LucideFileStack:q8,LucideFileSymlink:V8,LucideFileTerminal:B8,LucideFileText:U8,LucideFileType:W8,LucideFileType2:rl,LucideFileTypeCorner:rl,LucideFileUp:G8,LucideFileUser:K8,LucideFileVideo:Jc,LucideFileVideo2:il,LucideFileVideoCamera:il,LucideFileVolume:X8,LucideFileVolume2:ol,LucideFileWarning:Gc,LucideFileX:Z8,LucideFileX2:al,LucideFileXCorner:al,LucideFiles:Q8,LucideFilm:J8,LucideFilter:ul,LucideFilterX:dl,LucideFingerprint:sl,LucideFingerprintPattern:sl,LucideFireExtinguisher:e6,LucideFish:o6,LucideFishOff:t6,LucideFishSymbol:n6,LucideFishingHook:r6,LucideFlag:c6,LucideFlagOff:i6,LucideFlagTriangleLeft:a6,LucideFlagTriangleRight:s6,LucideFlame:d6,LucideFlameKindling:l6,LucideFlashlight:h6,LucideFlashlightOff:u6,LucideFlaskConical:y6,LucideFlaskConicalOff:f6,LucideFlaskRound:p6,LucideFlipHorizontal:g6,LucideFlipHorizontal2:m6,LucideFlipVertical:v6,LucideFlipVertical2:k6,LucideFlower:w6,LucideFlower2:x6,LucideFocus:M6,LucideFoldHorizontal:b6,LucideFoldVertical:_6,LucideFolder:Y6,LucideFolderArchive:C6,LucideFolderCheck:S6,LucideFolderClock:L6,LucideFolderClosed:I6,LucideFolderCode:N6,LucideFolderCog:cl,LucideFolderCog2:cl,LucideFolderDot:A6,LucideFolderDown:E6,LucideFolderEdit:ll,LucideFolderGit:$6,LucideFolderGit2:j6,LucideFolderHeart:P6,LucideFolderInput:z6,LucideFolderKanban:R6,LucideFolderKey:T6,LucideFolderLock:D6,LucideFolderMinus:H6,LucideFolderOpen:sh,LucideFolderOpenDot:O6,LucideFolderOutput:F6,LucideFolderPen:ll,LucideFolderPlus:q6,LucideFolderRoot:V6,LucideFolderSearch:U6,LucideFolderSearch2:B6,LucideFolderSymlink:W6,LucideFolderSync:G6,LucideFolderTree:K6,LucideFolderUp:X6,LucideFolderX:Z6,LucideFolders:Q6,LucideFootprints:J6,LucideForkKnife:md,LucideForkKnifeCrossed:yd,LucideForklift:nw,LucideForm:ew,LucideFormInput:Ul,LucideForward:tw,LucideFrame:ow,LucideFramer:aw,LucideFrown:rw,LucideFuel:iw,LucideFullscreen:sw,LucideFunctionSquare:I1,LucideFunnel:ul,LucideFunnelPlus:cw,LucideFunnelX:dl,LucideGalleryHorizontal:dw,LucideGalleryHorizontalEnd:lw,LucideGalleryThumbnails:uw,LucideGalleryVertical:fw,LucideGalleryVerticalEnd:hw,LucideGamepad:gw,LucideGamepad2:pw,LucideGamepadDirectional:yw,LucideGanttChart:Gs,LucideGanttChartSquare:Lr,LucideGauge:mw,LucideGaugeCircle:uc,LucideGavel:kw,LucideGem:vw,LucideGeorgianLari:xw,LucideGhost:Mw,LucideGift:ww,LucideGitBranch:Cw,LucideGitBranchMinus:bw,LucideGitBranchPlus:_w,LucideGitCommit:hl,LucideGitCommitHorizontal:hl,LucideGitCommitVertical:Sw,LucideGitCompare:Nw,LucideGitCompareArrows:Lw,LucideGitFork:Iw,LucideGitGraph:Aw,LucideGitMerge:Ew,LucideGitPullRequest:Tw,LucideGitPullRequestArrow:jw,LucideGitPullRequestClosed:$w,LucideGitPullRequestCreate:zw,LucideGitPullRequestCreateArrow:Pw,LucideGitPullRequestDraft:Rw,LucideGithub:Dw,LucideGitlab:Hw,LucideGlassWater:Ow,LucideGlasses:Fw,LucideGlobe:Bw,LucideGlobe2:$c,LucideGlobeLock:qw,LucideGlobeX:Vw,LucideGoal:Uw,LucideGpu:Ww,LucideGrab:gl,LucideGraduationCap:Gw,LucideGrape:Kw,LucideGrid:_r,LucideGrid2X2:ml,LucideGrid2X2Check:fl,LucideGrid2X2Plus:pl,LucideGrid2X2X:yl,LucideGrid2x2:ml,LucideGrid2x2Check:fl,LucideGrid2x2Plus:pl,LucideGrid2x2X:yl,LucideGrid3X3:_r,LucideGrid3x2:Xw,LucideGrid3x3:_r,LucideGrip:Yw,LucideGripHorizontal:Zw,LucideGripVertical:Qw,LucideGroup:Jw,LucideGuitar:e7,LucideHam:t7,LucideHamburger:n7,LucideHammer:o7,LucideHand:ch,LucideHandCoins:r7,LucideHandFist:i7,LucideHandGrab:gl,LucideHandHeart:a7,LucideHandHelping:kl,LucideHandMetal:s7,LucideHandPlatter:c7,LucideHandbag:l7,LucideHandshake:d7,LucideHardDrive:f7,LucideHardDriveDownload:u7,LucideHardDriveUpload:h7,LucideHardHat:p7,LucideHash:y7,LucideHatGlasses:m7,LucideHaze:g7,LucideHd:k7,LucideHdmiPort:v7,LucideHeading:S7,LucideHeading1:x7,LucideHeading2:w7,LucideHeading3:M7,LucideHeading4:b7,LucideHeading5:_7,LucideHeading6:C7,LucideHeadphoneOff:L7,LucideHeadphones:N7,LucideHeadset:I7,LucideHeart:R7,LucideHeartCrack:A7,LucideHeartHandshake:j7,LucideHeartMinus:E7,LucideHeartOff:$7,LucideHeartPlus:P7,LucideHeartPulse:z7,LucideHeater:T7,LucideHelicopter:D7,LucideHelpCircle:qo,LucideHelpingHand:kl,LucideHexagon:lh,LucideHighlighter:H7,LucideHistory:O7,LucideHome:vl,LucideHop:F7,LucideHopOff:q7,LucideHospital:V7,LucideHotel:B7,LucideHourglass:U7,LucideHouse:vl,LucideHouseHeart:W7,LucideHousePlug:G7,LucideHousePlus:K7,LucideHouseWifi:X7,LucideIceCream:wl,LucideIceCream2:xl,LucideIceCreamBowl:xl,LucideIceCreamCone:wl,LucideIdCard:Y7,LucideIdCardLanyard:Z7,LucideImage:uh,LucideImageDown:Q7,LucideImageMinus:eM,LucideImageOff:J7,LucideImagePlay:tM,LucideImagePlus:dh,LucideImageUp:nM,LucideImageUpscale:oM,LucideImages:rM,LucideImport:iM,LucideInbox:aM,LucideIndent:Sr,LucideIndentDecrease:Cr,LucideIndentIncrease:Sr,LucideIndianRupee:sM,LucideInfinity:lM,LucideInfo:cM,LucideInspect:z1,LucideInspectionPanel:dM,LucideInstagram:uM,LucideItalic:hM,LucideIterationCcw:fM,LucideIterationCw:pM,LucideJapaneseYen:yM,LucideJoystick:mM,LucideKanban:gM,LucideKanbanSquare:A1,LucideKanbanSquareDashed:b1,LucideKayak:kM,LucideKey:wM,LucideKeyRound:vM,LucideKeySquare:xM,LucideKeyboard:_M,LucideKeyboardMusic:MM,LucideKeyboardOff:bM,LucideLamp:AM,LucideLampCeiling:CM,LucideLampDesk:SM,LucideLampFloor:LM,LucideLampWallDown:NM,LucideLampWallUp:IM,LucideLandPlot:EM,LucideLandmark:jM,LucideLanguages:$M,LucideLaptop:RM,LucideLaptop2:Ml,LucideLaptopMinimal:Ml,LucideLaptopMinimalCheck:PM,LucideLasso:TM,LucideLassoSelect:zM,LucideLaugh:DM,LucideLayers:Ci,LucideLayers2:HM,LucideLayers3:Ci,LucideLayersPlus:OM,LucideLayout:Fl,LucideLayoutDashboard:hh,LucideLayoutGrid:FM,LucideLayoutList:qM,LucideLayoutPanelLeft:VM,LucideLayoutPanelTop:UM,LucideLayoutTemplate:BM,LucideLeaf:WM,LucideLeafyGreen:GM,LucideLectern:KM,LucideLetterText:td,LucideLibrary:ZM,LucideLibraryBig:XM,LucideLibrarySquare:E1,LucideLifeBuoy:YM,LucideLigature:QM,LucideLightbulb:eb,LucideLightbulbOff:JM,LucideLineChart:Bs,LucideLineSquiggle:tb,LucideLink:ob,LucideLink2:$a,LucideLink2Off:nb,LucideLinkedin:rb,LucideList:bb,LucideListCheck:ib,LucideListChecks:ab,LucideListChevronsDownUp:sb,LucideListChevronsUpDown:lb,LucideListCollapse:cb,LucideListEnd:db,LucideListFilter:hb,LucideListFilterPlus:ub,LucideListIndentDecrease:Cr,LucideListIndentIncrease:Sr,LucideListMinus:fb,LucideListMusic:pb,LucideListOrdered:yb,LucideListPlus:mb,LucideListRestart:gb,LucideListStart:kb,LucideListTodo:vb,LucideListTree:xb,LucideListVideo:wb,LucideListX:Mb,LucideLoader:Cb,LucideLoader2:qn,LucideLoaderCircle:qn,LucideLoaderPinwheel:_b,LucideLocate:Nb,LucideLocateFixed:Sb,LucideLocateOff:Lb,LucideLocationEdit:Sl,LucideLock:Ab,LucideLockKeyhole:Ib,LucideLockKeyholeOpen:bl,LucideLockOpen:_l,LucideLogIn:Eb,LucideLogOut:jb,LucideLogs:$b,LucideLollipop:Pb,LucideLuggage:zb,LucideMSquare:j1,LucideMagnet:Rb,LucideMail:Bb,LucideMailCheck:Tb,LucideMailMinus:Db,LucideMailOpen:Hb,LucideMailPlus:Ob,LucideMailQuestion:Cl,LucideMailQuestionMark:Cl,LucideMailSearch:Fb,LucideMailWarning:qb,LucideMailX:Vb,LucideMailbox:Wb,LucideMails:Ub,LucideMap:s9,LucideMapMinus:Gb,LucideMapPin:r9,LucideMapPinCheck:Xb,LucideMapPinCheckInside:Kb,LucideMapPinHouse:Zb,LucideMapPinMinus:Qb,LucideMapPinMinusInside:Yb,LucideMapPinOff:Jb,LucideMapPinPen:Sl,LucideMapPinPlus:t9,LucideMapPinPlusInside:e9,LucideMapPinX:n9,LucideMapPinXInside:o9,LucideMapPinned:i9,LucideMapPlus:a9,LucideMars:l9,LucideMarsStroke:c9,LucideMartini:d9,LucideMaximize:u9,LucideMaximize2:Ld,LucideMedal:h9,LucideMegaphone:p9,LucideMegaphoneOff:f9,LucideMeh:y9,LucideMemoryStick:m9,LucideMenu:k9,LucideMenuSquare:$1,LucideMerge:g9,LucideMessageCircle:N9,LucideMessageCircleCode:v9,LucideMessageCircleDashed:x9,LucideMessageCircleHeart:w9,LucideMessageCircleMore:M9,LucideMessageCircleOff:b9,LucideMessageCirclePlus:_9,LucideMessageCircleQuestion:Ll,LucideMessageCircleQuestionMark:Ll,LucideMessageCircleReply:C9,LucideMessageCircleWarning:S9,LucideMessageCircleX:L9,LucideMessageSquare:B9,LucideMessageSquareCode:I9,LucideMessageSquareDashed:A9,LucideMessageSquareDiff:E9,LucideMessageSquareDot:j9,LucideMessageSquareHeart:$9,LucideMessageSquareLock:P9,LucideMessageSquareMore:z9,LucideMessageSquareOff:R9,LucideMessageSquarePlus:T9,LucideMessageSquareQuote:D9,LucideMessageSquareReply:H9,LucideMessageSquareShare:O9,LucideMessageSquareText:F9,LucideMessageSquareWarning:q9,LucideMessageSquareX:V9,LucideMessagesSquare:U9,LucideMic:G9,LucideMic2:Nl,LucideMicOff:W9,LucideMicVocal:Nl,LucideMicrochip:K9,LucideMicroscope:X9,LucideMicrowave:Z9,LucideMilestone:Y9,LucideMilk:J9,LucideMilkOff:Q9,LucideMinimize:t_,LucideMinimize2:e_,LucideMinus:fh,LucideMinusCircle:hc,LucideMinusSquare:P1,LucideMonitor:y_,LucideMonitorCheck:n_,LucideMonitorCloud:o_,LucideMonitorCog:r_,LucideMonitorDot:i_,LucideMonitorDown:a_,LucideMonitorOff:s_,LucideMonitorPause:c_,LucideMonitorPlay:l_,LucideMonitorSmartphone:d_,LucideMonitorSpeaker:u_,LucideMonitorStop:h_,LucideMonitorUp:f_,LucideMonitorX:p_,LucideMoon:g_,LucideMoonStar:m_,LucideMoreHorizontal:zc,LucideMoreVertical:Pc,LucideMotorbike:k_,LucideMountain:x_,LucideMountainSnow:v_,LucideMouse:S_,LucideMouseOff:w_,LucideMousePointer:C_,LucideMousePointer2:ph,LucideMousePointer2Off:M_,LucideMousePointerBan:b_,LucideMousePointerClick:__,LucideMousePointerSquareDashed:_1,LucideMove:D_,LucideMove3D:Il,LucideMove3d:Il,LucideMoveDiagonal:N_,LucideMoveDiagonal2:L_,LucideMoveDown:E_,LucideMoveDownLeft:I_,LucideMoveDownRight:A_,LucideMoveHorizontal:j_,LucideMoveLeft:yh,LucideMoveRight:$_,LucideMoveUp:R_,LucideMoveUpLeft:P_,LucideMoveUpRight:z_,LucideMoveVertical:T_,LucideMusic:q_,LucideMusic2:H_,LucideMusic3:O_,LucideMusic4:F_,LucideNavigation:W_,LucideNavigation2:B_,LucideNavigation2Off:V_,LucideNavigationOff:U_,LucideNetwork:G_,LucideNewspaper:K_,LucideNfc:X_,LucideNonBinary:Z_,LucideNotebook:eC,LucideNotebookPen:Y_,LucideNotebookTabs:Q_,LucideNotebookText:J_,LucideNotepadText:nC,LucideNotepadTextDashed:tC,LucideNut:oC,LucideNutOff:rC,LucideOctagon:aC,LucideOctagonAlert:Al,LucideOctagonMinus:iC,LucideOctagonPause:El,LucideOctagonX:jl,LucideOmega:sC,LucideOption:lC,LucideOrbit:cC,LucideOrigami:dC,LucideOutdent:Cr,LucidePackage:kC,LucidePackage2:uC,LucidePackageCheck:hC,LucidePackageMinus:fC,LucidePackageOpen:pC,LucidePackagePlus:yC,LucidePackageSearch:mC,LucidePackageX:gC,LucidePaintBucket:vC,LucidePaintRoller:xC,LucidePaintbrush:wC,LucidePaintbrush2:$l,LucidePaintbrushVertical:$l,LucidePalette:MC,LucidePalmtree:id,LucidePanda:bC,LucidePanelBottom:CC,LucidePanelBottomClose:_C,LucidePanelBottomDashed:Pl,LucidePanelBottomInactive:Pl,LucidePanelBottomOpen:SC,LucidePanelLeft:Dl,LucidePanelLeftClose:zl,LucidePanelLeftDashed:Rl,LucidePanelLeftInactive:Rl,LucidePanelLeftOpen:Tl,LucidePanelLeftRightDashed:LC,LucidePanelRight:NC,LucidePanelRightClose:s0,LucidePanelRightDashed:Hl,LucidePanelRightInactive:Hl,LucidePanelRightOpen:mh,LucidePanelTop:jC,LucidePanelTopBottomDashed:IC,LucidePanelTopClose:AC,LucidePanelTopDashed:Ol,LucidePanelTopInactive:Ol,LucidePanelTopOpen:EC,LucidePanelsLeftBottom:$C,LucidePanelsLeftRight:pa,LucidePanelsRightBottom:PC,LucidePanelsTopBottom:Kl,LucidePanelsTopLeft:Fl,LucidePaperclip:zC,LucideParentheses:TC,LucideParkingCircle:pc,LucideParkingCircleOff:fc,LucideParkingMeter:RC,LucideParkingSquare:T1,LucideParkingSquareOff:R1,LucidePartyPopper:DC,LucidePause:HC,LucidePauseCircle:yc,LucidePauseOctagon:El,LucidePawPrint:OC,LucidePcCase:FC,LucidePen:Vl,LucidePenBox:no,LucidePenLine:ql,LucidePenOff:qC,LucidePenSquare:no,LucidePenTool:VC,LucidePencil:kh,LucidePencilLine:gh,LucidePencilOff:BC,LucidePencilRuler:UC,LucidePentagon:WC,LucidePercent:GC,LucidePercentCircle:mc,LucidePercentDiamond:jc,LucidePercentSquare:D1,LucidePersonStanding:XC,LucidePhilippinePeso:KC,LucidePhone:nS,LucidePhoneCall:ZC,LucidePhoneForwarded:YC,LucidePhoneIncoming:QC,LucidePhoneMissed:JC,LucidePhoneOff:eS,LucidePhoneOutgoing:tS,LucidePi:oS,LucidePiSquare:F1,LucidePiano:rS,LucidePickaxe:iS,LucidePictureInPicture:sS,LucidePictureInPicture2:aS,LucidePieChart:Ks,LucidePiggyBank:cS,LucidePilcrow:uS,LucidePilcrowLeft:lS,LucidePilcrowRight:dS,LucidePilcrowSquare:H1,LucidePill:fS,LucidePillBottle:hS,LucidePin:yS,LucidePinOff:pS,LucidePipette:mS,LucidePizza:gS,LucidePlane:xS,LucidePlaneLanding:kS,LucidePlaneTakeoff:vS,LucidePlay:Nd,LucidePlayCircle:gc,LucidePlaySquare:O1,LucidePlug:MS,LucidePlug2:wS,LucidePlugZap:Bl,LucidePlugZap2:Bl,LucidePlus:vh,LucidePlusCircle:kc,LucidePlusSquare:q1,LucidePocket:_S,LucidePocketKnife:bS,LucidePodcast:SS,LucidePointer:LS,LucidePointerOff:CS,LucidePopcorn:NS,LucidePopsicle:IS,LucidePoundSterling:AS,LucidePower:jS,LucidePowerCircle:vc,LucidePowerOff:ES,LucidePowerSquare:V1,LucidePresentation:$S,LucidePrinter:RS,LucidePrinterCheck:PS,LucidePrinterX:zS,LucideProjector:DS,LucideProportions:TS,LucidePuzzle:HS,LucidePyramid:OS,LucideQrCode:FS,LucideQuote:qS,LucideRabbit:VS,LucideRadar:BS,LucideRadiation:US,LucideRadical:WS,LucideRadio:XS,LucideRadioReceiver:GS,LucideRadioTower:KS,LucideRadius:ZS,LucideRailSymbol:YS,LucideRainbow:QS,LucideRat:JS,LucideRatio:eL,LucideReceipt:dL,LucideReceiptCent:tL,LucideReceiptEuro:nL,LucideReceiptIndianRupee:oL,LucideReceiptJapaneseYen:rL,LucideReceiptPoundSterling:iL,LucideReceiptRussianRuble:aL,LucideReceiptSwissFranc:sL,LucideReceiptText:cL,LucideReceiptTurkishLira:lL,LucideRectangleCircle:uL,LucideRectangleEllipsis:Ul,LucideRectangleGoggles:hL,LucideRectangleHorizontal:fL,LucideRectangleVertical:pL,LucideRecycle:yL,LucideRedo:kL,LucideRedo2:mL,LucideRedoDot:gL,LucideRefreshCcw:wL,LucideRefreshCcwDot:vL,LucideRefreshCw:ML,LucideRefreshCwOff:xL,LucideRefrigerator:bL,LucideRegex:_L,LucideRemoveFormatting:CL,LucideRepeat:NL,LucideRepeat1:LL,LucideRepeat2:SL,LucideReplace:AL,LucideReplaceAll:IL,LucideReply:jL,LucideReplyAll:EL,LucideRewind:$L,LucideRibbon:zL,LucideRocket:PL,LucideRockingChair:RL,LucideRollerCoaster:TL,LucideRose:DL,LucideRotate3D:Wl,LucideRotate3d:Wl,LucideRotateCcw:FL,LucideRotateCcwKey:HL,LucideRotateCcwSquare:OL,LucideRotateCw:VL,LucideRotateCwSquare:qL,LucideRoute:UL,LucideRouteOff:BL,LucideRouter:WL,LucideRows:Gl,LucideRows2:Gl,LucideRows3:Kl,LucideRows4:GL,LucideRss:KL,LucideRuler:ZL,LucideRulerDimensionLine:XL,LucideRussianRuble:YL,LucideSailboat:QL,LucideSalad:JL,LucideSandwich:eN,LucideSatellite:nN,LucideSatelliteDish:tN,LucideSaudiRiyal:oN,LucideSave:aN,LucideSaveAll:rN,LucideSaveOff:iN,LucideScale:sN,LucideScale3D:Xl,LucideScale3d:Xl,LucideScaling:cN,LucideScan:gN,LucideScanBarcode:lN,LucideScanEye:dN,LucideScanFace:uN,LucideScanHeart:hN,LucideScanLine:fN,LucideScanQrCode:pN,LucideScanSearch:yN,LucideScanText:mN,LucideScatterChart:Xs,LucideSchool:kN,LucideSchool2:sd,LucideScissors:wN,LucideScissorsLineDashed:vN,LucideScissorsSquare:B1,LucideScissorsSquareDashedBottom:y1,LucideScooter:xN,LucideScreenShare:bN,LucideScreenShareOff:MN,LucideScroll:CN,LucideScrollText:_N,LucideSearch:xh,LucideSearchAlert:SN,LucideSearchCheck:LN,LucideSearchCode:NN,LucideSearchSlash:IN,LucideSearchX:AN,LucideSection:EN,LucideSend:$N,LucideSendHorizonal:Zl,LucideSendHorizontal:Zl,LucideSendToBack:jN,LucideSeparatorHorizontal:zN,LucideSeparatorVertical:PN,LucideServer:wh,LucideServerCog:RN,LucideServerCrash:TN,LucideServerOff:DN,LucideSettings:ON,LucideSettings2:HN,LucideShapes:Mh,LucideShare:FN,LucideShare2:bh,LucideSheet:qN,LucideShell:VN,LucideShield:JN,LucideShieldAlert:BN,LucideShieldBan:UN,LucideShieldCheck:WN,LucideShieldClose:Ql,LucideShieldEllipsis:GN,LucideShieldHalf:KN,LucideShieldMinus:XN,LucideShieldOff:ZN,LucideShieldPlus:YN,LucideShieldQuestion:Yl,LucideShieldQuestionMark:Yl,LucideShieldUser:QN,LucideShieldX:Ql,LucideShip:nI,LucideShipWheel:eI,LucideShirt:tI,LucideShoppingBag:rI,LucideShoppingBasket:oI,LucideShoppingCart:iI,LucideShovel:aI,LucideShowerHead:sI,LucideShredder:cI,LucideShrimp:lI,LucideShrink:dI,LucideShrub:uI,LucideShuffle:hI,LucideSidebar:Dl,LucideSidebarClose:zl,LucideSidebarOpen:Tl,LucideSigma:fI,LucideSigmaSquare:U1,LucideSignal:kI,LucideSignalHigh:pI,LucideSignalLow:yI,LucideSignalMedium:mI,LucideSignalZero:gI,LucideSignature:vI,LucideSignpost:wI,LucideSignpostBig:xI,LucideSiren:MI,LucideSkipBack:bI,LucideSkipForward:_I,LucideSkull:CI,LucideSlack:SI,LucideSlash:LI,LucideSlashSquare:W1,LucideSlice:NI,LucideSliders:Jl,LucideSlidersHorizontal:II,LucideSlidersVertical:Jl,LucideSmartphone:jI,LucideSmartphoneCharging:AI,LucideSmartphoneNfc:EI,LucideSmile:PI,LucideSmilePlus:$I,LucideSnail:zI,LucideSnowflake:RI,LucideSoapDispenserDroplet:TI,LucideSofa:DI,LucideSolarPanel:HI,LucideSortAsc:Ls,LucideSortDesc:_s,LucideSoup:OI,LucideSpace:FI,LucideSpade:qI,LucideSparkle:VI,LucideSparkles:e1,LucideSpeaker:BI,LucideSpeech:UI,LucideSpellCheck:GI,LucideSpellCheck2:WI,LucideSpline:KI,LucideSplinePointer:XI,LucideSplit:ZI,LucideSplitSquareHorizontal:G1,LucideSplitSquareVertical:K1,LucideSpool:YI,LucideSpotlight:QI,LucideSprayCan:JI,LucideSprout:eA,LucideSquare:c0,LucideSquareActivity:t1,LucideSquareArrowDown:r1,LucideSquareArrowDownLeft:n1,LucideSquareArrowDownRight:o1,LucideSquareArrowLeft:i1,LucideSquareArrowOutDownLeft:a1,LucideSquareArrowOutDownRight:s1,LucideSquareArrowOutUpLeft:c1,LucideSquareArrowOutUpRight:l1,LucideSquareArrowRight:d1,LucideSquareArrowUp:h1,LucideSquareArrowUpLeft:u1,LucideSquareArrowUpRight:p1,LucideSquareAsterisk:f1,LucideSquareBottomDashedScissors:y1,LucideSquareChartGantt:Lr,LucideSquareCheck:g1,LucideSquareCheckBig:m1,LucideSquareChevronDown:k1,LucideSquareChevronLeft:v1,LucideSquareChevronRight:w1,LucideSquareChevronUp:x1,LucideSquareCode:M1,LucideSquareDashed:C1,LucideSquareDashedBottom:nA,LucideSquareDashedBottomCode:tA,LucideSquareDashedKanban:b1,LucideSquareDashedMousePointer:_1,LucideSquareDashedTopSolid:oA,LucideSquareDivide:S1,LucideSquareDot:L1,LucideSquareEqual:N1,LucideSquareFunction:I1,LucideSquareGanttChart:Lr,LucideSquareKanban:A1,LucideSquareLibrary:E1,LucideSquareM:j1,LucideSquareMenu:$1,LucideSquareMinus:P1,LucideSquareMousePointer:z1,LucideSquareParking:T1,LucideSquareParkingOff:R1,LucideSquarePause:rA,LucideSquarePen:no,LucideSquarePercent:D1,LucideSquarePi:F1,LucideSquarePilcrow:H1,LucideSquarePlay:O1,LucideSquarePlus:q1,LucideSquarePower:V1,LucideSquareRadical:iA,LucideSquareRoundCorner:aA,LucideSquareScissors:B1,LucideSquareSigma:U1,LucideSquareSlash:W1,LucideSquareSplitHorizontal:G1,LucideSquareSplitVertical:K1,LucideSquareSquare:cA,LucideSquareStack:sA,LucideSquareStar:dA,LucideSquareStop:lA,LucideSquareTerminal:X1,LucideSquareUser:Y1,LucideSquareUserRound:Z1,LucideSquareX:Q1,LucideSquaresExclude:uA,LucideSquaresIntersect:hA,LucideSquaresSubtract:fA,LucideSquaresUnite:pA,LucideSquircle:l0,LucideSquircleDashed:yA,LucideSquirrel:mA,LucideStamp:gA,LucideStar:xA,LucideStarHalf:kA,LucideStarOff:vA,LucideStars:e1,LucideStepBack:wA,LucideStepForward:MA,LucideStethoscope:bA,LucideSticker:d0,LucideStickyNote:_h,LucideStone:_A,LucideStopCircle:Mc,LucideStore:CA,LucideStretchHorizontal:LA,LucideStretchVertical:SA,LucideStrikethrough:NA,LucideSubscript:IA,LucideSubtitles:Rs,LucideSun:PA,LucideSunDim:AA,LucideSunMedium:EA,LucideSunMoon:jA,LucideSunSnow:$A,LucideSunrise:zA,LucideSunset:RA,LucideSuperscript:TA,LucideSwatchBook:DA,LucideSwissFranc:HA,LucideSwitchCamera:OA,LucideSword:FA,LucideSwords:qA,LucideSyringe:VA,LucideTable:YA,LucideTable2:BA,LucideTableCellsMerge:UA,LucideTableCellsSplit:WA,LucideTableColumnsSplit:GA,LucideTableConfig:Mr,LucideTableOfContents:KA,LucideTableProperties:XA,LucideTableRowsSplit:ZA,LucideTablet:JA,LucideTabletSmartphone:QA,LucideTablets:eE,LucideTag:tE,LucideTags:nE,LucideTally1:oE,LucideTally2:rE,LucideTally3:iE,LucideTally4:aE,LucideTally5:sE,LucideTangent:cE,LucideTarget:lE,LucideTelescope:dE,LucideTent:hE,LucideTentTree:uE,LucideTerminal:fE,LucideTerminalSquare:X1,LucideTestTube:pE,LucideTestTube2:J1,LucideTestTubeDiagonal:J1,LucideTestTubes:yE,LucideText:Vo,LucideTextAlignCenter:ya,LucideTextAlignEnd:ma,LucideTextAlignJustify:ed,LucideTextAlignStart:Vo,LucideTextCursor:gE,LucideTextCursorInput:mE,LucideTextInitial:td,LucideTextQuote:kE,LucideTextSearch:vE,LucideTextSelect:nd,LucideTextSelection:nd,LucideTextWrap:od,LucideTheater:xE,LucideThermometer:bE,LucideThermometerSnowflake:wE,LucideThermometerSun:ME,LucideThumbsDown:_E,LucideThumbsUp:CE,LucideTicket:jE,LucideTicketCheck:SE,LucideTicketMinus:LE,LucideTicketPercent:NE,LucideTicketPlus:IE,LucideTicketSlash:AE,LucideTicketX:EE,LucideTickets:PE,LucideTicketsPlane:$E,LucideTimer:TE,LucideTimerOff:zE,LucideTimerReset:RE,LucideToggleLeft:DE,LucideToggleRight:HE,LucideToilet:OE,LucideToolCase:qE,LucideToolbox:FE,LucideTornado:VE,LucideTorus:BE,LucideTouchpad:WE,LucideTouchpadOff:UE,LucideTowerControl:GE,LucideToyBrick:KE,LucideTractor:XE,LucideTrafficCone:ZE,LucideTrain:rd,LucideTrainFront:QE,LucideTrainFrontTunnel:YE,LucideTrainTrack:JE,LucideTramFront:rd,LucideTransgender:ej,LucideTrash:tj,LucideTrash2:Ch,LucideTreeDeciduous:nj,LucideTreePalm:id,LucideTreePine:oj,LucideTrees:rj,LucideTrello:ij,LucideTrendingDown:aj,LucideTrendingUp:cj,LucideTrendingUpDown:sj,LucideTriangle:uj,LucideTriangleAlert:jr,LucideTriangleDashed:lj,LucideTriangleRight:dj,LucideTrophy:hj,LucideTruck:pj,LucideTruckElectric:fj,LucideTurkishLira:yj,LucideTurntable:mj,LucideTurtle:gj,LucideTv:vj,LucideTv2:ad,LucideTvMinimal:ad,LucideTvMinimalPlay:kj,LucideTwitch:xj,LucideTwitter:wj,LucideType:u0,LucideTypeOutline:Mj,LucideUmbrella:_j,LucideUmbrellaOff:bj,LucideUnderline:Cj,LucideUndo:Nj,LucideUndo2:Sj,LucideUndoDot:Lj,LucideUnfoldHorizontal:Ij,LucideUnfoldVertical:Aj,LucideUngroup:Ej,LucideUniversity:sd,LucideUnlink:$j,LucideUnlink2:jj,LucideUnlock:_l,LucideUnlockKeyhole:bl,LucideUnplug:Pj,LucideUpload:Sh,LucideUploadCloud:Nc,LucideUsb:zj,LucideUser:Lh,LucideUser2:fd,LucideUserCheck:Rj,LucideUserCheck2:cd,LucideUserCircle:bc,LucideUserCircle2:wc,LucideUserCog:Tj,LucideUserCog2:ld,LucideUserKey:Dj,LucideUserLock:Hj,LucideUserMinus:Oj,LucideUserMinus2:dd,LucideUserPen:Fj,LucideUserPlus:qj,LucideUserPlus2:ud,LucideUserRound:fd,LucideUserRoundCheck:cd,LucideUserRoundCog:ld,LucideUserRoundKey:Vj,LucideUserRoundMinus:dd,LucideUserRoundPen:Bj,LucideUserRoundPlus:ud,LucideUserRoundSearch:Uj,LucideUserRoundX:hd,LucideUserSearch:Wj,LucideUserSquare:Y1,LucideUserSquare2:Z1,LucideUserStar:Gj,LucideUserX:Kj,LucideUserX2:hd,LucideUsers:Xj,LucideUsers2:pd,LucideUsersRound:pd,LucideUtensils:md,LucideUtensilsCrossed:yd,LucideUtilityPole:Zj,LucideVan:Yj,LucideVariable:Qj,LucideVault:Jj,LucideVectorSquare:e$,LucideVegan:t$,LucideVenetianMask:n$,LucideVenus:r$,LucideVenusAndMars:o$,LucideVerified:As,LucideVibrate:a$,LucideVibrateOff:i$,LucideVideo:c$,LucideVideoOff:s$,LucideVideotape:l$,LucideView:d$,LucideVoicemail:u$,LucideVolleyball:h$,LucideVolume:g$,LucideVolume1:f$,LucideVolume2:p$,LucideVolumeOff:y$,LucideVolumeX:m$,LucideVote:k$,LucideWallet:x$,LucideWallet2:gd,LucideWalletCards:v$,LucideWalletMinimal:gd,LucideWallpaper:w$,LucideWand:M$,LucideWand2:kd,LucideWandSparkles:kd,LucideWarehouse:b$,LucideWashingMachine:_$,LucideWatch:C$,LucideWaves:I$,LucideWavesArrowDown:S$,LucideWavesArrowUp:L$,LucideWavesLadder:N$,LucideWaypoints:A$,LucideWebcam:E$,LucideWebhook:$$,LucideWebhookOff:j$,LucideWeight:z$,LucideWeightTilde:P$,LucideWheat:D$,LucideWheatOff:R$,LucideWholeWord:T$,LucideWifi:W$,LucideWifiCog:H$,LucideWifiHigh:O$,LucideWifiLow:F$,LucideWifiOff:q$,LucideWifiPen:V$,LucideWifiSync:B$,LucideWifiZero:U$,LucideWind:K$,LucideWindArrowDown:G$,LucideWine:Z$,LucideWineOff:X$,LucideWorkflow:Y$,LucideWorm:Q$,LucideWrapText:od,LucideWrench:J$,LucideX:Id,LucideXCircle:_c,LucideXOctagon:jl,LucideXSquare:Q1,LucideYoutube:eP,LucideZap:nP,LucideZapOff:tP,LucideZoomIn:oP,LucideZoomOut:rP,Luggage:zb,LuggageIcon:zb,MSquare:j1,MSquareIcon:j1,Magnet:Rb,MagnetIcon:Rb,Mail:Bb,MailCheck:Tb,MailCheckIcon:Tb,MailIcon:Bb,MailMinus:Db,MailMinusIcon:Db,MailOpen:Hb,MailOpenIcon:Hb,MailPlus:Ob,MailPlusIcon:Ob,MailQuestion:Cl,MailQuestionIcon:Cl,MailQuestionMark:Cl,MailQuestionMarkIcon:Cl,MailSearch:Fb,MailSearchIcon:Fb,MailWarning:qb,MailWarningIcon:qb,MailX:Vb,MailXIcon:Vb,Mailbox:Wb,MailboxIcon:Wb,Mails:Ub,MailsIcon:Ub,Map:s9,MapIcon:s9,MapMinus:Gb,MapMinusIcon:Gb,MapPin:r9,MapPinCheck:Xb,MapPinCheckIcon:Xb,MapPinCheckInside:Kb,MapPinCheckInsideIcon:Kb,MapPinHouse:Zb,MapPinHouseIcon:Zb,MapPinIcon:r9,MapPinMinus:Qb,MapPinMinusIcon:Qb,MapPinMinusInside:Yb,MapPinMinusInsideIcon:Yb,MapPinOff:Jb,MapPinOffIcon:Jb,MapPinPen:Sl,MapPinPenIcon:Sl,MapPinPlus:t9,MapPinPlusIcon:t9,MapPinPlusInside:e9,MapPinPlusInsideIcon:e9,MapPinX:n9,MapPinXIcon:n9,MapPinXInside:o9,MapPinXInsideIcon:o9,MapPinned:i9,MapPinnedIcon:i9,MapPlus:a9,MapPlusIcon:a9,Mars:l9,MarsIcon:l9,MarsStroke:c9,MarsStrokeIcon:c9,Martini:d9,MartiniIcon:d9,Maximize:u9,Maximize2:Ld,Maximize2Icon:Ld,MaximizeIcon:u9,Medal:h9,MedalIcon:h9,Megaphone:p9,MegaphoneIcon:p9,MegaphoneOff:f9,MegaphoneOffIcon:f9,Meh:y9,MehIcon:y9,MemoryStick:m9,MemoryStickIcon:m9,Menu:k9,MenuIcon:k9,MenuSquare:$1,MenuSquareIcon:$1,Merge:g9,MergeIcon:g9,MessageCircle:N9,MessageCircleCode:v9,MessageCircleCodeIcon:v9,MessageCircleDashed:x9,MessageCircleDashedIcon:x9,MessageCircleHeart:w9,MessageCircleHeartIcon:w9,MessageCircleIcon:N9,MessageCircleMore:M9,MessageCircleMoreIcon:M9,MessageCircleOff:b9,MessageCircleOffIcon:b9,MessageCirclePlus:_9,MessageCirclePlusIcon:_9,MessageCircleQuestion:Ll,MessageCircleQuestionIcon:Ll,MessageCircleQuestionMark:Ll,MessageCircleQuestionMarkIcon:Ll,MessageCircleReply:C9,MessageCircleReplyIcon:C9,MessageCircleWarning:S9,MessageCircleWarningIcon:S9,MessageCircleX:L9,MessageCircleXIcon:L9,MessageSquare:B9,MessageSquareCode:I9,MessageSquareCodeIcon:I9,MessageSquareDashed:A9,MessageSquareDashedIcon:A9,MessageSquareDiff:E9,MessageSquareDiffIcon:E9,MessageSquareDot:j9,MessageSquareDotIcon:j9,MessageSquareHeart:$9,MessageSquareHeartIcon:$9,MessageSquareIcon:B9,MessageSquareLock:P9,MessageSquareLockIcon:P9,MessageSquareMore:z9,MessageSquareMoreIcon:z9,MessageSquareOff:R9,MessageSquareOffIcon:R9,MessageSquarePlus:T9,MessageSquarePlusIcon:T9,MessageSquareQuote:D9,MessageSquareQuoteIcon:D9,MessageSquareReply:H9,MessageSquareReplyIcon:H9,MessageSquareShare:O9,MessageSquareShareIcon:O9,MessageSquareText:F9,MessageSquareTextIcon:F9,MessageSquareWarning:q9,MessageSquareWarningIcon:q9,MessageSquareX:V9,MessageSquareXIcon:V9,MessagesSquare:U9,MessagesSquareIcon:U9,Mic:G9,Mic2:Nl,Mic2Icon:Nl,MicIcon:G9,MicOff:W9,MicOffIcon:W9,MicVocal:Nl,MicVocalIcon:Nl,Microchip:K9,MicrochipIcon:K9,Microscope:X9,MicroscopeIcon:X9,Microwave:Z9,MicrowaveIcon:Z9,Milestone:Y9,MilestoneIcon:Y9,Milk:J9,MilkIcon:J9,MilkOff:Q9,MilkOffIcon:Q9,Minimize:t_,Minimize2:e_,Minimize2Icon:e_,MinimizeIcon:t_,Minus:fh,MinusCircle:hc,MinusCircleIcon:hc,MinusIcon:fh,MinusSquare:P1,MinusSquareIcon:P1,Monitor:y_,MonitorCheck:n_,MonitorCheckIcon:n_,MonitorCloud:o_,MonitorCloudIcon:o_,MonitorCog:r_,MonitorCogIcon:r_,MonitorDot:i_,MonitorDotIcon:i_,MonitorDown:a_,MonitorDownIcon:a_,MonitorIcon:y_,MonitorOff:s_,MonitorOffIcon:s_,MonitorPause:c_,MonitorPauseIcon:c_,MonitorPlay:l_,MonitorPlayIcon:l_,MonitorSmartphone:d_,MonitorSmartphoneIcon:d_,MonitorSpeaker:u_,MonitorSpeakerIcon:u_,MonitorStop:h_,MonitorStopIcon:h_,MonitorUp:f_,MonitorUpIcon:f_,MonitorX:p_,MonitorXIcon:p_,Moon:g_,MoonIcon:g_,MoonStar:m_,MoonStarIcon:m_,MoreHorizontal:zc,MoreHorizontalIcon:zc,MoreVertical:Pc,MoreVerticalIcon:Pc,Motorbike:k_,MotorbikeIcon:k_,Mountain:x_,MountainIcon:x_,MountainSnow:v_,MountainSnowIcon:v_,Mouse:S_,MouseIcon:S_,MouseOff:w_,MouseOffIcon:w_,MousePointer:C_,MousePointer2:ph,MousePointer2Icon:ph,MousePointer2Off:M_,MousePointer2OffIcon:M_,MousePointerBan:b_,MousePointerBanIcon:b_,MousePointerClick:__,MousePointerClickIcon:__,MousePointerIcon:C_,MousePointerSquareDashed:_1,MousePointerSquareDashedIcon:_1,Move:D_,Move3D:Il,Move3DIcon:Il,Move3d:Il,Move3dIcon:Il,MoveDiagonal:N_,MoveDiagonal2:L_,MoveDiagonal2Icon:L_,MoveDiagonalIcon:N_,MoveDown:E_,MoveDownIcon:E_,MoveDownLeft:I_,MoveDownLeftIcon:I_,MoveDownRight:A_,MoveDownRightIcon:A_,MoveHorizontal:j_,MoveHorizontalIcon:j_,MoveIcon:D_,MoveLeft:yh,MoveLeftIcon:yh,MoveRight:$_,MoveRightIcon:$_,MoveUp:R_,MoveUpIcon:R_,MoveUpLeft:P_,MoveUpLeftIcon:P_,MoveUpRight:z_,MoveUpRightIcon:z_,MoveVertical:T_,MoveVerticalIcon:T_,Music:q_,Music2:H_,Music2Icon:H_,Music3:O_,Music3Icon:O_,Music4:F_,Music4Icon:F_,MusicIcon:q_,Navigation:W_,Navigation2:B_,Navigation2Icon:B_,Navigation2Off:V_,Navigation2OffIcon:V_,NavigationIcon:W_,NavigationOff:U_,NavigationOffIcon:U_,Network:G_,NetworkIcon:G_,Newspaper:K_,NewspaperIcon:K_,Nfc:X_,NfcIcon:X_,NonBinary:Z_,NonBinaryIcon:Z_,Notebook:eC,NotebookIcon:eC,NotebookPen:Y_,NotebookPenIcon:Y_,NotebookTabs:Q_,NotebookTabsIcon:Q_,NotebookText:J_,NotebookTextIcon:J_,NotepadText:nC,NotepadTextDashed:tC,NotepadTextDashedIcon:tC,NotepadTextIcon:nC,Nut:oC,NutIcon:oC,NutOff:rC,NutOffIcon:rC,Octagon:aC,OctagonAlert:Al,OctagonAlertIcon:Al,OctagonIcon:aC,OctagonMinus:iC,OctagonMinusIcon:iC,OctagonPause:El,OctagonPauseIcon:El,OctagonX:jl,OctagonXIcon:jl,Omega:sC,OmegaIcon:sC,Option:lC,OptionIcon:lC,Orbit:cC,OrbitIcon:cC,Origami:dC,OrigamiIcon:dC,Outdent:Cr,OutdentIcon:Cr,Package:kC,Package2:uC,Package2Icon:uC,PackageCheck:hC,PackageCheckIcon:hC,PackageIcon:kC,PackageMinus:fC,PackageMinusIcon:fC,PackageOpen:pC,PackageOpenIcon:pC,PackagePlus:yC,PackagePlusIcon:yC,PackageSearch:mC,PackageSearchIcon:mC,PackageX:gC,PackageXIcon:gC,PaintBucket:vC,PaintBucketIcon:vC,PaintRoller:xC,PaintRollerIcon:xC,Paintbrush:wC,Paintbrush2:$l,Paintbrush2Icon:$l,PaintbrushIcon:wC,PaintbrushVertical:$l,PaintbrushVerticalIcon:$l,Palette:MC,PaletteIcon:MC,Palmtree:id,PalmtreeIcon:id,Panda:bC,PandaIcon:bC,PanelBottom:CC,PanelBottomClose:_C,PanelBottomCloseIcon:_C,PanelBottomDashed:Pl,PanelBottomDashedIcon:Pl,PanelBottomIcon:CC,PanelBottomInactive:Pl,PanelBottomInactiveIcon:Pl,PanelBottomOpen:SC,PanelBottomOpenIcon:SC,PanelLeft:Dl,PanelLeftClose:zl,PanelLeftCloseIcon:zl,PanelLeftDashed:Rl,PanelLeftDashedIcon:Rl,PanelLeftIcon:Dl,PanelLeftInactive:Rl,PanelLeftInactiveIcon:Rl,PanelLeftOpen:Tl,PanelLeftOpenIcon:Tl,PanelLeftRightDashed:LC,PanelLeftRightDashedIcon:LC,PanelRight:NC,PanelRightClose:s0,PanelRightCloseIcon:s0,PanelRightDashed:Hl,PanelRightDashedIcon:Hl,PanelRightIcon:NC,PanelRightInactive:Hl,PanelRightInactiveIcon:Hl,PanelRightOpen:mh,PanelRightOpenIcon:mh,PanelTop:jC,PanelTopBottomDashed:IC,PanelTopBottomDashedIcon:IC,PanelTopClose:AC,PanelTopCloseIcon:AC,PanelTopDashed:Ol,PanelTopDashedIcon:Ol,PanelTopIcon:jC,PanelTopInactive:Ol,PanelTopInactiveIcon:Ol,PanelTopOpen:EC,PanelTopOpenIcon:EC,PanelsLeftBottom:$C,PanelsLeftBottomIcon:$C,PanelsLeftRight:pa,PanelsLeftRightIcon:pa,PanelsRightBottom:PC,PanelsRightBottomIcon:PC,PanelsTopBottom:Kl,PanelsTopBottomIcon:Kl,PanelsTopLeft:Fl,PanelsTopLeftIcon:Fl,Paperclip:zC,PaperclipIcon:zC,Parentheses:TC,ParenthesesIcon:TC,ParkingCircle:pc,ParkingCircleIcon:pc,ParkingCircleOff:fc,ParkingCircleOffIcon:fc,ParkingMeter:RC,ParkingMeterIcon:RC,ParkingSquare:T1,ParkingSquareIcon:T1,ParkingSquareOff:R1,ParkingSquareOffIcon:R1,PartyPopper:DC,PartyPopperIcon:DC,Pause:HC,PauseCircle:yc,PauseCircleIcon:yc,PauseIcon:HC,PauseOctagon:El,PauseOctagonIcon:El,PawPrint:OC,PawPrintIcon:OC,PcCase:FC,PcCaseIcon:FC,Pen:Vl,PenBox:no,PenBoxIcon:no,PenIcon:Vl,PenLine:ql,PenLineIcon:ql,PenOff:qC,PenOffIcon:qC,PenSquare:no,PenSquareIcon:no,PenTool:VC,PenToolIcon:VC,Pencil:kh,PencilIcon:kh,PencilLine:gh,PencilLineIcon:gh,PencilOff:BC,PencilOffIcon:BC,PencilRuler:UC,PencilRulerIcon:UC,Pentagon:WC,PentagonIcon:WC,Percent:GC,PercentCircle:mc,PercentCircleIcon:mc,PercentDiamond:jc,PercentDiamondIcon:jc,PercentIcon:GC,PercentSquare:D1,PercentSquareIcon:D1,PersonStanding:XC,PersonStandingIcon:XC,PhilippinePeso:KC,PhilippinePesoIcon:KC,Phone:nS,PhoneCall:ZC,PhoneCallIcon:ZC,PhoneForwarded:YC,PhoneForwardedIcon:YC,PhoneIcon:nS,PhoneIncoming:QC,PhoneIncomingIcon:QC,PhoneMissed:JC,PhoneMissedIcon:JC,PhoneOff:eS,PhoneOffIcon:eS,PhoneOutgoing:tS,PhoneOutgoingIcon:tS,Pi:oS,PiIcon:oS,PiSquare:F1,PiSquareIcon:F1,Piano:rS,PianoIcon:rS,Pickaxe:iS,PickaxeIcon:iS,PictureInPicture:sS,PictureInPicture2:aS,PictureInPicture2Icon:aS,PictureInPictureIcon:sS,PieChart:Ks,PieChartIcon:Ks,PiggyBank:cS,PiggyBankIcon:cS,Pilcrow:uS,PilcrowIcon:uS,PilcrowLeft:lS,PilcrowLeftIcon:lS,PilcrowRight:dS,PilcrowRightIcon:dS,PilcrowSquare:H1,PilcrowSquareIcon:H1,Pill:fS,PillBottle:hS,PillBottleIcon:hS,PillIcon:fS,Pin:yS,PinIcon:yS,PinOff:pS,PinOffIcon:pS,Pipette:mS,PipetteIcon:mS,Pizza:gS,PizzaIcon:gS,Plane:xS,PlaneIcon:xS,PlaneLanding:kS,PlaneLandingIcon:kS,PlaneTakeoff:vS,PlaneTakeoffIcon:vS,Play:Nd,PlayCircle:gc,PlayCircleIcon:gc,PlayIcon:Nd,PlaySquare:O1,PlaySquareIcon:O1,Plug:MS,Plug2:wS,Plug2Icon:wS,PlugIcon:MS,PlugZap:Bl,PlugZap2:Bl,PlugZap2Icon:Bl,PlugZapIcon:Bl,Plus:vh,PlusCircle:kc,PlusCircleIcon:kc,PlusIcon:vh,PlusSquare:q1,PlusSquareIcon:q1,Pocket:_S,PocketIcon:_S,PocketKnife:bS,PocketKnifeIcon:bS,Podcast:SS,PodcastIcon:SS,Pointer:LS,PointerIcon:LS,PointerOff:CS,PointerOffIcon:CS,Popcorn:NS,PopcornIcon:NS,Popsicle:IS,PopsicleIcon:IS,PoundSterling:AS,PoundSterlingIcon:AS,Power:jS,PowerCircle:vc,PowerCircleIcon:vc,PowerIcon:jS,PowerOff:ES,PowerOffIcon:ES,PowerSquare:V1,PowerSquareIcon:V1,Presentation:$S,PresentationIcon:$S,Printer:RS,PrinterCheck:PS,PrinterCheckIcon:PS,PrinterIcon:RS,PrinterX:zS,PrinterXIcon:zS,Projector:DS,ProjectorIcon:DS,Proportions:TS,ProportionsIcon:TS,Puzzle:HS,PuzzleIcon:HS,Pyramid:OS,PyramidIcon:OS,QrCode:FS,QrCodeIcon:FS,Quote:qS,QuoteIcon:qS,Rabbit:VS,RabbitIcon:VS,Radar:BS,RadarIcon:BS,Radiation:US,RadiationIcon:US,Radical:WS,RadicalIcon:WS,Radio:XS,RadioIcon:XS,RadioReceiver:GS,RadioReceiverIcon:GS,RadioTower:KS,RadioTowerIcon:KS,Radius:ZS,RadiusIcon:ZS,RailSymbol:YS,RailSymbolIcon:YS,Rainbow:QS,RainbowIcon:QS,Rat:JS,RatIcon:JS,Ratio:eL,RatioIcon:eL,Receipt:dL,ReceiptCent:tL,ReceiptCentIcon:tL,ReceiptEuro:nL,ReceiptEuroIcon:nL,ReceiptIcon:dL,ReceiptIndianRupee:oL,ReceiptIndianRupeeIcon:oL,ReceiptJapaneseYen:rL,ReceiptJapaneseYenIcon:rL,ReceiptPoundSterling:iL,ReceiptPoundSterlingIcon:iL,ReceiptRussianRuble:aL,ReceiptRussianRubleIcon:aL,ReceiptSwissFranc:sL,ReceiptSwissFrancIcon:sL,ReceiptText:cL,ReceiptTextIcon:cL,ReceiptTurkishLira:lL,ReceiptTurkishLiraIcon:lL,RectangleCircle:uL,RectangleCircleIcon:uL,RectangleEllipsis:Ul,RectangleEllipsisIcon:Ul,RectangleGoggles:hL,RectangleGogglesIcon:hL,RectangleHorizontal:fL,RectangleHorizontalIcon:fL,RectangleVertical:pL,RectangleVerticalIcon:pL,Recycle:yL,RecycleIcon:yL,Redo:kL,Redo2:mL,Redo2Icon:mL,RedoDot:gL,RedoDotIcon:gL,RedoIcon:kL,RefreshCcw:wL,RefreshCcwDot:vL,RefreshCcwDotIcon:vL,RefreshCcwIcon:wL,RefreshCw:ML,RefreshCwIcon:ML,RefreshCwOff:xL,RefreshCwOffIcon:xL,Refrigerator:bL,RefrigeratorIcon:bL,Regex:_L,RegexIcon:_L,RemoveFormatting:CL,RemoveFormattingIcon:CL,Repeat:NL,Repeat1:LL,Repeat1Icon:LL,Repeat2:SL,Repeat2Icon:SL,RepeatIcon:NL,Replace:AL,ReplaceAll:IL,ReplaceAllIcon:IL,ReplaceIcon:AL,Reply:jL,ReplyAll:EL,ReplyAllIcon:EL,ReplyIcon:jL,Rewind:$L,RewindIcon:$L,Ribbon:zL,RibbonIcon:zL,Rocket:PL,RocketIcon:PL,RockingChair:RL,RockingChairIcon:RL,RollerCoaster:TL,RollerCoasterIcon:TL,Rose:DL,RoseIcon:DL,Rotate3D:Wl,Rotate3DIcon:Wl,Rotate3d:Wl,Rotate3dIcon:Wl,RotateCcw:FL,RotateCcwIcon:FL,RotateCcwKey:HL,RotateCcwKeyIcon:HL,RotateCcwSquare:OL,RotateCcwSquareIcon:OL,RotateCw:VL,RotateCwIcon:VL,RotateCwSquare:qL,RotateCwSquareIcon:qL,Route:UL,RouteIcon:UL,RouteOff:BL,RouteOffIcon:BL,Router:WL,RouterIcon:WL,Rows:Gl,Rows2:Gl,Rows2Icon:Gl,Rows3:Kl,Rows3Icon:Kl,Rows4:GL,Rows4Icon:GL,RowsIcon:Gl,Rss:KL,RssIcon:KL,Ruler:ZL,RulerDimensionLine:XL,RulerDimensionLineIcon:XL,RulerIcon:ZL,RussianRuble:YL,RussianRubleIcon:YL,Sailboat:QL,SailboatIcon:QL,Salad:JL,SaladIcon:JL,Sandwich:eN,SandwichIcon:eN,Satellite:nN,SatelliteDish:tN,SatelliteDishIcon:tN,SatelliteIcon:nN,SaudiRiyal:oN,SaudiRiyalIcon:oN,Save:aN,SaveAll:rN,SaveAllIcon:rN,SaveIcon:aN,SaveOff:iN,SaveOffIcon:iN,Scale:sN,Scale3D:Xl,Scale3DIcon:Xl,Scale3d:Xl,Scale3dIcon:Xl,ScaleIcon:sN,Scaling:cN,ScalingIcon:cN,Scan:gN,ScanBarcode:lN,ScanBarcodeIcon:lN,ScanEye:dN,ScanEyeIcon:dN,ScanFace:uN,ScanFaceIcon:uN,ScanHeart:hN,ScanHeartIcon:hN,ScanIcon:gN,ScanLine:fN,ScanLineIcon:fN,ScanQrCode:pN,ScanQrCodeIcon:pN,ScanSearch:yN,ScanSearchIcon:yN,ScanText:mN,ScanTextIcon:mN,ScatterChart:Xs,ScatterChartIcon:Xs,School:kN,School2:sd,School2Icon:sd,SchoolIcon:kN,Scissors:wN,ScissorsIcon:wN,ScissorsLineDashed:vN,ScissorsLineDashedIcon:vN,ScissorsSquare:B1,ScissorsSquareDashedBottom:y1,ScissorsSquareDashedBottomIcon:y1,ScissorsSquareIcon:B1,Scooter:xN,ScooterIcon:xN,ScreenShare:bN,ScreenShareIcon:bN,ScreenShareOff:MN,ScreenShareOffIcon:MN,Scroll:CN,ScrollIcon:CN,ScrollText:_N,ScrollTextIcon:_N,Search:xh,SearchAlert:SN,SearchAlertIcon:SN,SearchCheck:LN,SearchCheckIcon:LN,SearchCode:NN,SearchCodeIcon:NN,SearchIcon:xh,SearchSlash:IN,SearchSlashIcon:IN,SearchX:AN,SearchXIcon:AN,Section:EN,SectionIcon:EN,Send:$N,SendHorizonal:Zl,SendHorizonalIcon:Zl,SendHorizontal:Zl,SendHorizontalIcon:Zl,SendIcon:$N,SendToBack:jN,SendToBackIcon:jN,SeparatorHorizontal:zN,SeparatorHorizontalIcon:zN,SeparatorVertical:PN,SeparatorVerticalIcon:PN,Server:wh,ServerCog:RN,ServerCogIcon:RN,ServerCrash:TN,ServerCrashIcon:TN,ServerIcon:wh,ServerOff:DN,ServerOffIcon:DN,Settings:ON,Settings2:HN,Settings2Icon:HN,SettingsIcon:ON,Shapes:Mh,ShapesIcon:Mh,Share:FN,Share2:bh,Share2Icon:bh,ShareIcon:FN,Sheet:qN,SheetIcon:qN,Shell:VN,ShellIcon:VN,Shield:JN,ShieldAlert:BN,ShieldAlertIcon:BN,ShieldBan:UN,ShieldBanIcon:UN,ShieldCheck:WN,ShieldCheckIcon:WN,ShieldClose:Ql,ShieldCloseIcon:Ql,ShieldEllipsis:GN,ShieldEllipsisIcon:GN,ShieldHalf:KN,ShieldHalfIcon:KN,ShieldIcon:JN,ShieldMinus:XN,ShieldMinusIcon:XN,ShieldOff:ZN,ShieldOffIcon:ZN,ShieldPlus:YN,ShieldPlusIcon:YN,ShieldQuestion:Yl,ShieldQuestionIcon:Yl,ShieldQuestionMark:Yl,ShieldQuestionMarkIcon:Yl,ShieldUser:QN,ShieldUserIcon:QN,ShieldX:Ql,ShieldXIcon:Ql,Ship:nI,ShipIcon:nI,ShipWheel:eI,ShipWheelIcon:eI,Shirt:tI,ShirtIcon:tI,ShoppingBag:rI,ShoppingBagIcon:rI,ShoppingBasket:oI,ShoppingBasketIcon:oI,ShoppingCart:iI,ShoppingCartIcon:iI,Shovel:aI,ShovelIcon:aI,ShowerHead:sI,ShowerHeadIcon:sI,Shredder:cI,ShredderIcon:cI,Shrimp:lI,ShrimpIcon:lI,Shrink:dI,ShrinkIcon:dI,Shrub:uI,ShrubIcon:uI,Shuffle:hI,ShuffleIcon:hI,Sidebar:Dl,SidebarClose:zl,SidebarCloseIcon:zl,SidebarIcon:Dl,SidebarOpen:Tl,SidebarOpenIcon:Tl,Sigma:fI,SigmaIcon:fI,SigmaSquare:U1,SigmaSquareIcon:U1,Signal:kI,SignalHigh:pI,SignalHighIcon:pI,SignalIcon:kI,SignalLow:yI,SignalLowIcon:yI,SignalMedium:mI,SignalMediumIcon:mI,SignalZero:gI,SignalZeroIcon:gI,Signature:vI,SignatureIcon:vI,Signpost:wI,SignpostBig:xI,SignpostBigIcon:xI,SignpostIcon:wI,Siren:MI,SirenIcon:MI,SkipBack:bI,SkipBackIcon:bI,SkipForward:_I,SkipForwardIcon:_I,Skull:CI,SkullIcon:CI,Slack:SI,SlackIcon:SI,Slash:LI,SlashIcon:LI,SlashSquare:W1,SlashSquareIcon:W1,Slice:NI,SliceIcon:NI,Sliders:Jl,SlidersHorizontal:II,SlidersHorizontalIcon:II,SlidersIcon:Jl,SlidersVertical:Jl,SlidersVerticalIcon:Jl,Smartphone:jI,SmartphoneCharging:AI,SmartphoneChargingIcon:AI,SmartphoneIcon:jI,SmartphoneNfc:EI,SmartphoneNfcIcon:EI,Smile:PI,SmileIcon:PI,SmilePlus:$I,SmilePlusIcon:$I,Snail:zI,SnailIcon:zI,Snowflake:RI,SnowflakeIcon:RI,SoapDispenserDroplet:TI,SoapDispenserDropletIcon:TI,Sofa:DI,SofaIcon:DI,SolarPanel:HI,SolarPanelIcon:HI,SortAsc:Ls,SortAscIcon:Ls,SortDesc:_s,SortDescIcon:_s,Soup:OI,SoupIcon:OI,Space:FI,SpaceIcon:FI,Spade:qI,SpadeIcon:qI,Sparkle:VI,SparkleIcon:VI,Sparkles:e1,SparklesIcon:e1,Speaker:BI,SpeakerIcon:BI,Speech:UI,SpeechIcon:UI,SpellCheck:GI,SpellCheck2:WI,SpellCheck2Icon:WI,SpellCheckIcon:GI,Spline:KI,SplineIcon:KI,SplinePointer:XI,SplinePointerIcon:XI,Split:ZI,SplitIcon:ZI,SplitSquareHorizontal:G1,SplitSquareHorizontalIcon:G1,SplitSquareVertical:K1,SplitSquareVerticalIcon:K1,Spool:YI,SpoolIcon:YI,Spotlight:QI,SpotlightIcon:QI,SprayCan:JI,SprayCanIcon:JI,Sprout:eA,SproutIcon:eA,Square:c0,SquareActivity:t1,SquareActivityIcon:t1,SquareArrowDown:r1,SquareArrowDownIcon:r1,SquareArrowDownLeft:n1,SquareArrowDownLeftIcon:n1,SquareArrowDownRight:o1,SquareArrowDownRightIcon:o1,SquareArrowLeft:i1,SquareArrowLeftIcon:i1,SquareArrowOutDownLeft:a1,SquareArrowOutDownLeftIcon:a1,SquareArrowOutDownRight:s1,SquareArrowOutDownRightIcon:s1,SquareArrowOutUpLeft:c1,SquareArrowOutUpLeftIcon:c1,SquareArrowOutUpRight:l1,SquareArrowOutUpRightIcon:l1,SquareArrowRight:d1,SquareArrowRightIcon:d1,SquareArrowUp:h1,SquareArrowUpIcon:h1,SquareArrowUpLeft:u1,SquareArrowUpLeftIcon:u1,SquareArrowUpRight:p1,SquareArrowUpRightIcon:p1,SquareAsterisk:f1,SquareAsteriskIcon:f1,SquareBottomDashedScissors:y1,SquareBottomDashedScissorsIcon:y1,SquareChartGantt:Lr,SquareChartGanttIcon:Lr,SquareCheck:g1,SquareCheckBig:m1,SquareCheckBigIcon:m1,SquareCheckIcon:g1,SquareChevronDown:k1,SquareChevronDownIcon:k1,SquareChevronLeft:v1,SquareChevronLeftIcon:v1,SquareChevronRight:w1,SquareChevronRightIcon:w1,SquareChevronUp:x1,SquareChevronUpIcon:x1,SquareCode:M1,SquareCodeIcon:M1,SquareDashed:C1,SquareDashedBottom:nA,SquareDashedBottomCode:tA,SquareDashedBottomCodeIcon:tA,SquareDashedBottomIcon:nA,SquareDashedIcon:C1,SquareDashedKanban:b1,SquareDashedKanbanIcon:b1,SquareDashedMousePointer:_1,SquareDashedMousePointerIcon:_1,SquareDashedTopSolid:oA,SquareDashedTopSolidIcon:oA,SquareDivide:S1,SquareDivideIcon:S1,SquareDot:L1,SquareDotIcon:L1,SquareEqual:N1,SquareEqualIcon:N1,SquareFunction:I1,SquareFunctionIcon:I1,SquareGanttChart:Lr,SquareGanttChartIcon:Lr,SquareIcon:c0,SquareKanban:A1,SquareKanbanIcon:A1,SquareLibrary:E1,SquareLibraryIcon:E1,SquareM:j1,SquareMIcon:j1,SquareMenu:$1,SquareMenuIcon:$1,SquareMinus:P1,SquareMinusIcon:P1,SquareMousePointer:z1,SquareMousePointerIcon:z1,SquareParking:T1,SquareParkingIcon:T1,SquareParkingOff:R1,SquareParkingOffIcon:R1,SquarePause:rA,SquarePauseIcon:rA,SquarePen:no,SquarePenIcon:no,SquarePercent:D1,SquarePercentIcon:D1,SquarePi:F1,SquarePiIcon:F1,SquarePilcrow:H1,SquarePilcrowIcon:H1,SquarePlay:O1,SquarePlayIcon:O1,SquarePlus:q1,SquarePlusIcon:q1,SquarePower:V1,SquarePowerIcon:V1,SquareRadical:iA,SquareRadicalIcon:iA,SquareRoundCorner:aA,SquareRoundCornerIcon:aA,SquareScissors:B1,SquareScissorsIcon:B1,SquareSigma:U1,SquareSigmaIcon:U1,SquareSlash:W1,SquareSlashIcon:W1,SquareSplitHorizontal:G1,SquareSplitHorizontalIcon:G1,SquareSplitVertical:K1,SquareSplitVerticalIcon:K1,SquareSquare:cA,SquareSquareIcon:cA,SquareStack:sA,SquareStackIcon:sA,SquareStar:dA,SquareStarIcon:dA,SquareStop:lA,SquareStopIcon:lA,SquareTerminal:X1,SquareTerminalIcon:X1,SquareUser:Y1,SquareUserIcon:Y1,SquareUserRound:Z1,SquareUserRoundIcon:Z1,SquareX:Q1,SquareXIcon:Q1,SquaresExclude:uA,SquaresExcludeIcon:uA,SquaresIntersect:hA,SquaresIntersectIcon:hA,SquaresSubtract:fA,SquaresSubtractIcon:fA,SquaresUnite:pA,SquaresUniteIcon:pA,Squircle:l0,SquircleDashed:yA,SquircleDashedIcon:yA,SquircleIcon:l0,Squirrel:mA,SquirrelIcon:mA,Stamp:gA,StampIcon:gA,Star:xA,StarHalf:kA,StarHalfIcon:kA,StarIcon:xA,StarOff:vA,StarOffIcon:vA,Stars:e1,StarsIcon:e1,StepBack:wA,StepBackIcon:wA,StepForward:MA,StepForwardIcon:MA,Stethoscope:bA,StethoscopeIcon:bA,Sticker:d0,StickerIcon:d0,StickyNote:_h,StickyNoteIcon:_h,Stone:_A,StoneIcon:_A,StopCircle:Mc,StopCircleIcon:Mc,Store:CA,StoreIcon:CA,StretchHorizontal:LA,StretchHorizontalIcon:LA,StretchVertical:SA,StretchVerticalIcon:SA,Strikethrough:NA,StrikethroughIcon:NA,Subscript:IA,SubscriptIcon:IA,Subtitles:Rs,SubtitlesIcon:Rs,Sun:PA,SunDim:AA,SunDimIcon:AA,SunIcon:PA,SunMedium:EA,SunMediumIcon:EA,SunMoon:jA,SunMoonIcon:jA,SunSnow:$A,SunSnowIcon:$A,Sunrise:zA,SunriseIcon:zA,Sunset:RA,SunsetIcon:RA,Superscript:TA,SuperscriptIcon:TA,SwatchBook:DA,SwatchBookIcon:DA,SwissFranc:HA,SwissFrancIcon:HA,SwitchCamera:OA,SwitchCameraIcon:OA,Sword:FA,SwordIcon:FA,Swords:qA,SwordsIcon:qA,Syringe:VA,SyringeIcon:VA,Table:YA,Table2:BA,Table2Icon:BA,TableCellsMerge:UA,TableCellsMergeIcon:UA,TableCellsSplit:WA,TableCellsSplitIcon:WA,TableColumnsSplit:GA,TableColumnsSplitIcon:GA,TableConfig:Mr,TableConfigIcon:Mr,TableIcon:YA,TableOfContents:KA,TableOfContentsIcon:KA,TableProperties:XA,TablePropertiesIcon:XA,TableRowsSplit:ZA,TableRowsSplitIcon:ZA,Tablet:JA,TabletIcon:JA,TabletSmartphone:QA,TabletSmartphoneIcon:QA,Tablets:eE,TabletsIcon:eE,Tag:tE,TagIcon:tE,Tags:nE,TagsIcon:nE,Tally1:oE,Tally1Icon:oE,Tally2:rE,Tally2Icon:rE,Tally3:iE,Tally3Icon:iE,Tally4:aE,Tally4Icon:aE,Tally5:sE,Tally5Icon:sE,Tangent:cE,TangentIcon:cE,Target:lE,TargetIcon:lE,Telescope:dE,TelescopeIcon:dE,Tent:hE,TentIcon:hE,TentTree:uE,TentTreeIcon:uE,Terminal:fE,TerminalIcon:fE,TerminalSquare:X1,TerminalSquareIcon:X1,TestTube:pE,TestTube2:J1,TestTube2Icon:J1,TestTubeDiagonal:J1,TestTubeDiagonalIcon:J1,TestTubeIcon:pE,TestTubes:yE,TestTubesIcon:yE,Text:Vo,TextAlignCenter:ya,TextAlignCenterIcon:ya,TextAlignEnd:ma,TextAlignEndIcon:ma,TextAlignJustify:ed,TextAlignJustifyIcon:ed,TextAlignStart:Vo,TextAlignStartIcon:Vo,TextCursor:gE,TextCursorIcon:gE,TextCursorInput:mE,TextCursorInputIcon:mE,TextIcon:Vo,TextInitial:td,TextInitialIcon:td,TextQuote:kE,TextQuoteIcon:kE,TextSearch:vE,TextSearchIcon:vE,TextSelect:nd,TextSelectIcon:nd,TextSelection:nd,TextSelectionIcon:nd,TextWrap:od,TextWrapIcon:od,Theater:xE,TheaterIcon:xE,Thermometer:bE,ThermometerIcon:bE,ThermometerSnowflake:wE,ThermometerSnowflakeIcon:wE,ThermometerSun:ME,ThermometerSunIcon:ME,ThumbsDown:_E,ThumbsDownIcon:_E,ThumbsUp:CE,ThumbsUpIcon:CE,Ticket:jE,TicketCheck:SE,TicketCheckIcon:SE,TicketIcon:jE,TicketMinus:LE,TicketMinusIcon:LE,TicketPercent:NE,TicketPercentIcon:NE,TicketPlus:IE,TicketPlusIcon:IE,TicketSlash:AE,TicketSlashIcon:AE,TicketX:EE,TicketXIcon:EE,Tickets:PE,TicketsIcon:PE,TicketsPlane:$E,TicketsPlaneIcon:$E,Timer:TE,TimerIcon:TE,TimerOff:zE,TimerOffIcon:zE,TimerReset:RE,TimerResetIcon:RE,ToggleLeft:DE,ToggleLeftIcon:DE,ToggleRight:HE,ToggleRightIcon:HE,Toilet:OE,ToiletIcon:OE,ToolCase:qE,ToolCaseIcon:qE,Toolbox:FE,ToolboxIcon:FE,Tornado:VE,TornadoIcon:VE,Torus:BE,TorusIcon:BE,Touchpad:WE,TouchpadIcon:WE,TouchpadOff:UE,TouchpadOffIcon:UE,TowerControl:GE,TowerControlIcon:GE,ToyBrick:KE,ToyBrickIcon:KE,Tractor:XE,TractorIcon:XE,TrafficCone:ZE,TrafficConeIcon:ZE,Train:rd,TrainFront:QE,TrainFrontIcon:QE,TrainFrontTunnel:YE,TrainFrontTunnelIcon:YE,TrainIcon:rd,TrainTrack:JE,TrainTrackIcon:JE,TramFront:rd,TramFrontIcon:rd,Transgender:ej,TransgenderIcon:ej,Trash:tj,Trash2:Ch,Trash2Icon:Ch,TrashIcon:tj,TreeDeciduous:nj,TreeDeciduousIcon:nj,TreePalm:id,TreePalmIcon:id,TreePine:oj,TreePineIcon:oj,Trees:rj,TreesIcon:rj,Trello:ij,TrelloIcon:ij,TrendingDown:aj,TrendingDownIcon:aj,TrendingUp:cj,TrendingUpDown:sj,TrendingUpDownIcon:sj,TrendingUpIcon:cj,Triangle:uj,TriangleAlert:jr,TriangleAlertIcon:jr,TriangleDashed:lj,TriangleDashedIcon:lj,TriangleIcon:uj,TriangleRight:dj,TriangleRightIcon:dj,Trophy:hj,TrophyIcon:hj,Truck:pj,TruckElectric:fj,TruckElectricIcon:fj,TruckIcon:pj,TurkishLira:yj,TurkishLiraIcon:yj,Turntable:mj,TurntableIcon:mj,Turtle:gj,TurtleIcon:gj,Tv:vj,Tv2:ad,Tv2Icon:ad,TvIcon:vj,TvMinimal:ad,TvMinimalIcon:ad,TvMinimalPlay:kj,TvMinimalPlayIcon:kj,Twitch:xj,TwitchIcon:xj,Twitter:wj,TwitterIcon:wj,Type:u0,TypeIcon:u0,TypeOutline:Mj,TypeOutlineIcon:Mj,Umbrella:_j,UmbrellaIcon:_j,UmbrellaOff:bj,UmbrellaOffIcon:bj,Underline:Cj,UnderlineIcon:Cj,Undo:Nj,Undo2:Sj,Undo2Icon:Sj,UndoDot:Lj,UndoDotIcon:Lj,UndoIcon:Nj,UnfoldHorizontal:Ij,UnfoldHorizontalIcon:Ij,UnfoldVertical:Aj,UnfoldVerticalIcon:Aj,Ungroup:Ej,UngroupIcon:Ej,University:sd,UniversityIcon:sd,Unlink:$j,Unlink2:jj,Unlink2Icon:jj,UnlinkIcon:$j,Unlock:_l,UnlockIcon:_l,UnlockKeyhole:bl,UnlockKeyholeIcon:bl,Unplug:Pj,UnplugIcon:Pj,Upload:Sh,UploadCloud:Nc,UploadCloudIcon:Nc,UploadIcon:Sh,Usb:zj,UsbIcon:zj,User:Lh,User2:fd,User2Icon:fd,UserCheck:Rj,UserCheck2:cd,UserCheck2Icon:cd,UserCheckIcon:Rj,UserCircle:bc,UserCircle2:wc,UserCircle2Icon:wc,UserCircleIcon:bc,UserCog:Tj,UserCog2:ld,UserCog2Icon:ld,UserCogIcon:Tj,UserIcon:Lh,UserKey:Dj,UserKeyIcon:Dj,UserLock:Hj,UserLockIcon:Hj,UserMinus:Oj,UserMinus2:dd,UserMinus2Icon:dd,UserMinusIcon:Oj,UserPen:Fj,UserPenIcon:Fj,UserPlus:qj,UserPlus2:ud,UserPlus2Icon:ud,UserPlusIcon:qj,UserRound:fd,UserRoundCheck:cd,UserRoundCheckIcon:cd,UserRoundCog:ld,UserRoundCogIcon:ld,UserRoundIcon:fd,UserRoundKey:Vj,UserRoundKeyIcon:Vj,UserRoundMinus:dd,UserRoundMinusIcon:dd,UserRoundPen:Bj,UserRoundPenIcon:Bj,UserRoundPlus:ud,UserRoundPlusIcon:ud,UserRoundSearch:Uj,UserRoundSearchIcon:Uj,UserRoundX:hd,UserRoundXIcon:hd,UserSearch:Wj,UserSearchIcon:Wj,UserSquare:Y1,UserSquare2:Z1,UserSquare2Icon:Z1,UserSquareIcon:Y1,UserStar:Gj,UserStarIcon:Gj,UserX:Kj,UserX2:hd,UserX2Icon:hd,UserXIcon:Kj,Users:Xj,Users2:pd,Users2Icon:pd,UsersIcon:Xj,UsersRound:pd,UsersRoundIcon:pd,Utensils:md,UtensilsCrossed:yd,UtensilsCrossedIcon:yd,UtensilsIcon:md,UtilityPole:Zj,UtilityPoleIcon:Zj,Van:Yj,VanIcon:Yj,Variable:Qj,VariableIcon:Qj,Vault:Jj,VaultIcon:Jj,VectorSquare:e$,VectorSquareIcon:e$,Vegan:t$,VeganIcon:t$,VenetianMask:n$,VenetianMaskIcon:n$,Venus:r$,VenusAndMars:o$,VenusAndMarsIcon:o$,VenusIcon:r$,Verified:As,VerifiedIcon:As,Vibrate:a$,VibrateIcon:a$,VibrateOff:i$,VibrateOffIcon:i$,Video:c$,VideoIcon:c$,VideoOff:s$,VideoOffIcon:s$,Videotape:l$,VideotapeIcon:l$,View:d$,ViewIcon:d$,Voicemail:u$,VoicemailIcon:u$,Volleyball:h$,VolleyballIcon:h$,Volume:g$,Volume1:f$,Volume1Icon:f$,Volume2:p$,Volume2Icon:p$,VolumeIcon:g$,VolumeOff:y$,VolumeOffIcon:y$,VolumeX:m$,VolumeXIcon:m$,Vote:k$,VoteIcon:k$,Wallet:x$,Wallet2:gd,Wallet2Icon:gd,WalletCards:v$,WalletCardsIcon:v$,WalletIcon:x$,WalletMinimal:gd,WalletMinimalIcon:gd,Wallpaper:w$,WallpaperIcon:w$,Wand:M$,Wand2:kd,Wand2Icon:kd,WandIcon:M$,WandSparkles:kd,WandSparklesIcon:kd,Warehouse:b$,WarehouseIcon:b$,WashingMachine:_$,WashingMachineIcon:_$,Watch:C$,WatchIcon:C$,Waves:I$,WavesArrowDown:S$,WavesArrowDownIcon:S$,WavesArrowUp:L$,WavesArrowUpIcon:L$,WavesIcon:I$,WavesLadder:N$,WavesLadderIcon:N$,Waypoints:A$,WaypointsIcon:A$,Webcam:E$,WebcamIcon:E$,Webhook:$$,WebhookIcon:$$,WebhookOff:j$,WebhookOffIcon:j$,Weight:z$,WeightIcon:z$,WeightTilde:P$,WeightTildeIcon:P$,Wheat:D$,WheatIcon:D$,WheatOff:R$,WheatOffIcon:R$,WholeWord:T$,WholeWordIcon:T$,Wifi:W$,WifiCog:H$,WifiCogIcon:H$,WifiHigh:O$,WifiHighIcon:O$,WifiIcon:W$,WifiLow:F$,WifiLowIcon:F$,WifiOff:q$,WifiOffIcon:q$,WifiPen:V$,WifiPenIcon:V$,WifiSync:B$,WifiSyncIcon:B$,WifiZero:U$,WifiZeroIcon:U$,Wind:K$,WindArrowDown:G$,WindArrowDownIcon:G$,WindIcon:K$,Wine:Z$,WineIcon:Z$,WineOff:X$,WineOffIcon:X$,Workflow:Y$,WorkflowIcon:Y$,Worm:Q$,WormIcon:Q$,WrapText:od,WrapTextIcon:od,Wrench:J$,WrenchIcon:J$,X:Id,XCircle:_c,XCircleIcon:_c,XIcon:Id,XOctagon:jl,XOctagonIcon:jl,XSquare:Q1,XSquareIcon:Q1,Youtube:eP,YoutubeIcon:eP,Zap:nP,ZapIcon:nP,ZapOff:tP,ZapOffIcon:tP,ZoomIn:oP,ZoomInIcon:oP,ZoomOut:rP,ZoomOutIcon:rP,createLucideIcon:d,icons:VAe},Symbol.toStringTag,{value:"Module"})),UAe=new Set(["createLucideIcon","Icon","icons","default"]),WAe=Symbol.for("react.forward_ref");function GAe(e){return typeof e=="function"?!0:e!==null&&typeof e=="object"?e.$$typeof===WAe:!1}function KAe(e){return e.replace(/[A-Z]/g,(t,n)=>n===0?t.toLowerCase():`-${t.toLowerCase()}`)}function XAe(){const e={};for(const[t,n]of Object.entries(BAe))UAe.has(t)||GAe(n)&&(e[KAe(t)]=n);return e}const Qh=XAe(),ZAe="help-circle",YAe=Object.keys(Qh).sort(),QAe=["logos:aws","logos:google-cloud","logos:microsoft-azure"],BP={lucide:YAe,aws:[],gcp:[],azure:[],iconify:[...QAe]};function NH(e){for(const t of e)t.installed?BP[t.vendor]=[...t.iconNames]:BP[t.vendor]=[]}const JAe=["aws","gcp","azure","iconify"];function VY(e){if(typeof e!="string")return null;const t=e.trim();if(t.length===0)return null;const n=t.indexOf(":");if(n===-1)return{vendor:"lucide",name:t};const o=t.slice(0,n),r=t.slice(n+1);return r.length===0?null:o==="lucide"?{vendor:"lucide",name:r}:JAe.includes(o)?{vendor:o,name:r}:null}function eEe(e){return e.vendor==="lucide"?e.name:`${e.vendor}:${e.name}`}function tEe(e,t){const n=VY(e);if(!n)return null;if(n.vendor==="lucide"){const o=Qh[n.name];return o?{kind:"lucide",component:o}:null}return n.vendor==="iconify"?{kind:"iconify",identifier:n.name}:{kind:"svg-url",url:`${t.studioBaseUrl}/api/icons/${n.vendor}/${n.name}.svg`}}const nEe="modulepreload",oEe=function(e){return"/"+e},ZB={},Z0=function(t,n,o){let r=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const a=document.querySelector("meta[property=csp-nonce]"),s=(a==null?void 0:a.nonce)||(a==null?void 0:a.getAttribute("nonce"));r=Promise.allSettled(n.map(c=>{if(c=oEe(c),c in ZB)return;ZB[c]=!0;const l=c.endsWith(".css"),h=l?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${c}"]${h}`))return;const u=document.createElement("link");if(u.rel=l?"stylesheet":nEe,l||(u.as="script"),u.crossOrigin="",u.href=c,s&&u.setAttribute("nonce",s),document.head.appendChild(u),l)return new Promise((p,y)=>{u.addEventListener("load",p),u.addEventListener("error",()=>y(new Error(`Unable to preload CSS for ${c}`)))})}))}function i(a){const s=new Event("vite:preloadError",{cancelable:!0});if(s.payload=a,window.dispatchEvent(s),!s.defaultPrevented)throw a}return r.then(a=>{for(const s of a||[])s.status==="rejected"&&i(s.reason);return t().catch(i)})};let vp=null;function rEe(){return vp||(vp=Z0(()=>import("./iconify-CF3Xx8Oq.js"),[]).then(e=>e,()=>null),vp)}function BY(e,t){return f.jsx(qo,{className:e,"aria-label":t,"aria-hidden":t===void 0?!0:void 0,"data-testid":"icon-renderer-placeholder"})}function iEe({identifier:e,className:t,ariaLabel:n,color:o}){const[r,i]=m.useState(null);if(m.useEffect(()=>{let s=!0;return rEe().then(c=>{s&&i(c)}),()=>{s=!1}},[]),!r)return BY(t,n);const a=r.Icon;return f.jsx(a,{icon:e,className:t,color:o,"aria-label":n,"aria-hidden":n===void 0?!0:void 0})}function UY({iconId:e,studioBaseUrl:t,className:n,ariaLabel:o,color:r,strokeWidth:i,absoluteStrokeWidth:a}){const s=tEe(e,{studioBaseUrl:t});if(!s)return BY(n,o);if(s.kind==="lucide"){const c=s.component;return f.jsx(c,{className:n,color:r,strokeWidth:i,absoluteStrokeWidth:a,"aria-label":o,"aria-hidden":o===void 0?!0:void 0})}return s.kind==="svg-url"?f.jsx("img",{src:s.url,loading:"lazy",draggable:!1,className:n,alt:o??"","aria-hidden":o===void 0?!0:void 0}):f.jsx(iEe,{identifier:s.identifier,className:n,ariaLabel:o,color:r})}const aEe={studioBaseUrl:""},zF=m.createContext(aEe);function sEe({value:e,children:t}){return f.jsx(zF.Provider,{value:e,children:t})}const cEe=[".png",".jpg",".jpeg",".gif",".webp",".svg"],lEe=400,IH={width:200,height:200},dEe=e=>{const t=e.lastIndexOf(".");return t>=0?e.slice(t).toLowerCase():""},uEe=e=>{if(e.type.startsWith("image/")){const t=e.type.slice(6).toLowerCase();if(t==="png"||t==="jpeg"||t==="jpg"||t==="gif"||t==="webp"||t==="svg+xml")return!0}return cEe.includes(dEe(e.name))},hEe=e=>{if(!e)return[];const t=e.files;if(!t||t.length===0)return[];const n=[];for(let o=0;o<t.length;o++){const r=t.item(o);r&&uEe(r)&&n.push(r)}return n},fEe=(e,t=lEe)=>{if(e.width<=0||e.height<=0)return{...IH};const n=Math.max(e.width,e.height);if(n<=t)return{width:Math.round(e.width),height:Math.round(e.height)};const o=t/n;return{width:Math.round(e.width*o),height:Math.round(e.height*o)}},pEe=24,yEe=4,mEe=(e,t,n=pEe,o=yEe)=>{if(e.length===0)return[];const r=Math.min(e.length,Math.max(1,o)),i=Math.ceil(e.length/r),a=new Array(r).fill(0),s=new Array(i).fill(0);e.forEach((g,k)=>{const x=k%r,v=Math.floor(k/r);a[x]=Math.max(a[x],g.width),s[v]=Math.max(s[v],g.height)});const c=new Array(r).fill(0);for(let g=1;g<r;g++)c[g]=c[g-1]+a[g-1]+n;const l=new Array(i).fill(0);for(let g=1;g<i;g++)l[g]=l[g-1]+s[g-1]+n;const h=a.reduce((g,k)=>g+k,0)+n*(r-1),u=s.reduce((g,k)=>g+k,0)+n*(i-1),p=t.x-h/2,y=t.y-u/2;return e.map((g,k)=>{const x=k%r,v=Math.floor(k/r);return{x:p+c[x],y:y+l[v]}})},gEe=async e=>{const t=hEe(e.dataTransfer);if(t.length===0||!e.rfInstance)return!1;const n=e.rfInstance.screenToFlowPosition(e.clientPos),o=await Promise.all(t.map(i=>e.computeDims(i))),r=mEe(o,n);return t.forEach((i,a)=>{e.dispatch({file:i,position:r[a],dims:o[a],originalFilename:i.name})}),!0},kEe=e=>new Promise(t=>{let n=null;const o=i=>{n&&URL.revokeObjectURL(n),t(i)};try{n=URL.createObjectURL(e)}catch{t({...IH});return}const r=new Image;r.onload=()=>{o(fEe({width:r.naturalWidth,height:r.naturalHeight}))},r.onerror=()=>{o({...IH})},r.src=n}),vEe=2048,xEe=e=>{const t=e.type.toLowerCase();return t==="image/png"||t==="image/jpeg"||t==="image/webp"},wEe=async(e,t=vEe)=>{if(!xEe(e))return e;try{const n=await createImageBitmap(e),o=Math.max(n.width,n.height);if(o<=t)return n.close(),e;const r=t/o,i=Math.round(n.width*r),a=Math.round(n.height*r),s=document.createElement("canvas");s.width=i,s.height=a;const c=s.getContext("2d");if(!c)return n.close(),e;c.drawImage(n,0,0,i,a),n.close();const l=await new Promise(h=>{s.toBlob(u=>h(u),e.type)});return l?new File([l],e.name,{type:e.type,lastModified:e.lastModified}):e}catch{return e}};function WY(e){var t,n,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e)){var r=e.length;for(t=0;t<r;t++)e[t]&&(n=WY(e[t]))&&(o&&(o+=" "),o+=n)}else for(n in e)e[n]&&(o&&(o+=" "),o+=n);return o}function GY(){for(var e,t,n=0,o="",r=arguments.length;n<r;n++)(e=arguments[n])&&(t=WY(e))&&(o&&(o+=" "),o+=t);return o}const RF="-",MEe=e=>{const t=_Ee(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:a=>{const s=a.split(RF);return s[0]===""&&s.length!==1&&s.shift(),KY(s,t)||bEe(a)},getConflictingClassGroupIds:(a,s)=>{const c=n[a]||[];return s&&o[a]?[...c,...o[a]]:c}}},KY=(e,t)=>{var a;if(e.length===0)return t.classGroupId;const n=e[0],o=t.nextPart.get(n),r=o?KY(e.slice(1),o):void 0;if(r)return r;if(t.validators.length===0)return;const i=e.join(RF);return(a=t.validators.find(({validator:s})=>s(i)))==null?void 0:a.classGroupId},YB=/^\[(.+)\]$/,bEe=e=>{if(YB.test(e)){const t=YB.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},_Ee=e=>{const{theme:t,prefix:n}=e,o={nextPart:new Map,validators:[]};return SEe(Object.entries(e.classGroups),n).forEach(([i,a])=>{AH(a,o,i,t)}),o},AH=(e,t,n,o)=>{e.forEach(r=>{if(typeof r=="string"){const i=r===""?t:QB(t,r);i.classGroupId=n;return}if(typeof r=="function"){if(CEe(r)){AH(r(o),t,n,o);return}t.validators.push({validator:r,classGroupId:n});return}Object.entries(r).forEach(([i,a])=>{AH(a,QB(t,i),n,o)})})},QB=(e,t)=>{let n=e;return t.split(RF).forEach(o=>{n.nextPart.has(o)||n.nextPart.set(o,{nextPart:new Map,validators:[]}),n=n.nextPart.get(o)}),n},CEe=e=>e.isThemeGetter,SEe=(e,t)=>t?e.map(([n,o])=>{const r=o.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([a,s])=>[t+a,s])):i);return[n,r]}):e,LEe=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,o=new Map;const r=(i,a)=>{n.set(i,a),t++,t>e&&(t=0,o=n,n=new Map)};return{get(i){let a=n.get(i);if(a!==void 0)return a;if((a=o.get(i))!==void 0)return r(i,a),a},set(i,a){n.has(i)?n.set(i,a):r(i,a)}}},XY="!",NEe=e=>{const{separator:t,experimentalParseClassName:n}=e,o=t.length===1,r=t[0],i=t.length,a=s=>{const c=[];let l=0,h=0,u;for(let x=0;x<s.length;x++){let v=s[x];if(l===0){if(v===r&&(o||s.slice(x,x+i)===t)){c.push(s.slice(h,x)),h=x+i;continue}if(v==="/"){u=x;continue}}v==="["?l++:v==="]"&&l--}const p=c.length===0?s:s.substring(h),y=p.startsWith(XY),g=y?p.substring(1):p,k=u&&u>h?u-h:void 0;return{modifiers:c,hasImportantModifier:y,baseClassName:g,maybePostfixModifierPosition:k}};return n?s=>n({className:s,parseClassName:a}):a},IEe=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(o=>{o[0]==="["?(t.push(...n.sort(),o),n=[]):n.push(o)}),t.push(...n.sort()),t},AEe=e=>({cache:LEe(e.cacheSize),parseClassName:NEe(e),...MEe(e)}),EEe=/\s+/,jEe=(e,t)=>{const{parseClassName:n,getClassGroupId:o,getConflictingClassGroupIds:r}=t,i=[],a=e.trim().split(EEe);let s="";for(let c=a.length-1;c>=0;c-=1){const l=a[c],{modifiers:h,hasImportantModifier:u,baseClassName:p,maybePostfixModifierPosition:y}=n(l);let g=!!y,k=o(g?p.substring(0,y):p);if(!k){if(!g){s=l+(s.length>0?" "+s:s);continue}if(k=o(p),!k){s=l+(s.length>0?" "+s:s);continue}g=!1}const x=IEe(h).join(":"),v=u?x+XY:x,M=v+k;if(i.includes(M))continue;i.push(M);const w=r(k,g);for(let b=0;b<w.length;++b){const C=w[b];i.push(v+C)}s=l+(s.length>0?" "+s:s)}return s};function $Ee(){let e=0,t,n,o="";for(;e<arguments.length;)(t=arguments[e++])&&(n=ZY(t))&&(o&&(o+=" "),o+=n);return o}const ZY=e=>{if(typeof e=="string")return e;let t,n="";for(let o=0;o<e.length;o++)e[o]&&(t=ZY(e[o]))&&(n&&(n+=" "),n+=t);return n};function PEe(e,...t){let n,o,r,i=a;function a(c){const l=t.reduce((h,u)=>u(h),e());return n=AEe(l),o=n.cache.get,r=n.cache.set,i=s,s(c)}function s(c){const l=o(c);if(l)return l;const h=jEe(c,n);return r(c,h),h}return function(){return i($Ee.apply(null,arguments))}}const Mt=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},YY=/^\[(?:([a-z-]+):)?(.+)\]$/i,zEe=/^\d+\/\d+$/,REe=new Set(["px","full","screen"]),TEe=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,DEe=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,HEe=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,OEe=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,FEe=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ki=e=>h0(e)||REe.has(e)||zEe.test(e),na=e=>Y0(e,"length",XEe),h0=e=>!!e&&!Number.isNaN(Number(e)),jT=e=>Y0(e,"number",h0),C2=e=>!!e&&Number.isInteger(Number(e)),qEe=e=>e.endsWith("%")&&h0(e.slice(0,-1)),Ue=e=>YY.test(e),oa=e=>TEe.test(e),VEe=new Set(["length","size","percentage"]),BEe=e=>Y0(e,VEe,QY),UEe=e=>Y0(e,"position",QY),WEe=new Set(["image","url"]),GEe=e=>Y0(e,WEe,YEe),KEe=e=>Y0(e,"",ZEe),S2=()=>!0,Y0=(e,t,n)=>{const o=YY.exec(e);return o?o[1]?typeof t=="string"?o[1]===t:t.has(o[1]):n(o[2]):!1},XEe=e=>DEe.test(e)&&!HEe.test(e),QY=()=>!1,ZEe=e=>OEe.test(e),YEe=e=>FEe.test(e),QEe=()=>{const e=Mt("colors"),t=Mt("spacing"),n=Mt("blur"),o=Mt("brightness"),r=Mt("borderColor"),i=Mt("borderRadius"),a=Mt("borderSpacing"),s=Mt("borderWidth"),c=Mt("contrast"),l=Mt("grayscale"),h=Mt("hueRotate"),u=Mt("invert"),p=Mt("gap"),y=Mt("gradientColorStops"),g=Mt("gradientColorStopPositions"),k=Mt("inset"),x=Mt("margin"),v=Mt("opacity"),M=Mt("padding"),w=Mt("saturate"),b=Mt("scale"),C=Mt("sepia"),_=Mt("skew"),S=Mt("space"),N=Mt("translate"),P=()=>["auto","contain","none"],A=()=>["auto","hidden","clip","visible","scroll"],E=()=>["auto",Ue,t],z=()=>[Ue,t],U=()=>["",ki,na],$=()=>["auto",h0,Ue],T=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],D=()=>["solid","dashed","dotted","double","none"],O=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],I=()=>["start","end","center","between","around","evenly","stretch"],R=()=>["","0",Ue],L=()=>["auto","avoid","all","avoid-page","page","left","right","column"],V=()=>[h0,Ue];return{cacheSize:500,separator:":",theme:{colors:[S2],spacing:[ki,na],blur:["none","",oa,Ue],brightness:V(),borderColor:[e],borderRadius:["none","","full",oa,Ue],borderSpacing:z(),borderWidth:U(),contrast:V(),grayscale:R(),hueRotate:V(),invert:R(),gap:z(),gradientColorStops:[e],gradientColorStopPositions:[qEe,na],inset:E(),margin:E(),opacity:V(),padding:z(),saturate:V(),scale:V(),sepia:R(),skew:V(),space:z(),translate:z()},classGroups:{aspect:[{aspect:["auto","square","video",Ue]}],container:["container"],columns:[{columns:[oa]}],"break-after":[{"break-after":L()}],"break-before":[{"break-before":L()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...T(),Ue]}],overflow:[{overflow:A()}],"overflow-x":[{"overflow-x":A()}],"overflow-y":[{"overflow-y":A()}],overscroll:[{overscroll:P()}],"overscroll-x":[{"overscroll-x":P()}],"overscroll-y":[{"overscroll-y":P()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[k]}],"inset-x":[{"inset-x":[k]}],"inset-y":[{"inset-y":[k]}],start:[{start:[k]}],end:[{end:[k]}],top:[{top:[k]}],right:[{right:[k]}],bottom:[{bottom:[k]}],left:[{left:[k]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",C2,Ue]}],basis:[{basis:E()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Ue]}],grow:[{grow:R()}],shrink:[{shrink:R()}],order:[{order:["first","last","none",C2,Ue]}],"grid-cols":[{"grid-cols":[S2]}],"col-start-end":[{col:["auto",{span:["full",C2,Ue]},Ue]}],"col-start":[{"col-start":$()}],"col-end":[{"col-end":$()}],"grid-rows":[{"grid-rows":[S2]}],"row-start-end":[{row:["auto",{span:[C2,Ue]},Ue]}],"row-start":[{"row-start":$()}],"row-end":[{"row-end":$()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Ue]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Ue]}],gap:[{gap:[p]}],"gap-x":[{"gap-x":[p]}],"gap-y":[{"gap-y":[p]}],"justify-content":[{justify:["normal",...I()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...I(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...I(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[M]}],px:[{px:[M]}],py:[{py:[M]}],ps:[{ps:[M]}],pe:[{pe:[M]}],pt:[{pt:[M]}],pr:[{pr:[M]}],pb:[{pb:[M]}],pl:[{pl:[M]}],m:[{m:[x]}],mx:[{mx:[x]}],my:[{my:[x]}],ms:[{ms:[x]}],me:[{me:[x]}],mt:[{mt:[x]}],mr:[{mr:[x]}],mb:[{mb:[x]}],ml:[{ml:[x]}],"space-x":[{"space-x":[S]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[S]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Ue,t]}],"min-w":[{"min-w":[Ue,t,"min","max","fit"]}],"max-w":[{"max-w":[Ue,t,"none","full","min","max","fit","prose",{screen:[oa]},oa]}],h:[{h:[Ue,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Ue,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Ue,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Ue,t,"auto","min","max","fit"]}],"font-size":[{text:["base",oa,na]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",jT]}],"font-family":[{font:[S2]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Ue]}],"line-clamp":[{"line-clamp":["none",h0,jT]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",ki,Ue]}],"list-image":[{"list-image":["none",Ue]}],"list-style-type":[{list:["none","disc","decimal",Ue]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[v]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[v]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...D(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",ki,na]}],"underline-offset":[{"underline-offset":["auto",ki,Ue]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:z()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ue]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Ue]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[v]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...T(),UEe]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",BEe]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},GEe]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[g]}],"gradient-via-pos":[{via:[g]}],"gradient-to-pos":[{to:[g]}],"gradient-from":[{from:[y]}],"gradient-via":[{via:[y]}],"gradient-to":[{to:[y]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[v]}],"border-style":[{border:[...D(),"hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[v]}],"divide-style":[{divide:D()}],"border-color":[{border:[r]}],"border-color-x":[{"border-x":[r]}],"border-color-y":[{"border-y":[r]}],"border-color-s":[{"border-s":[r]}],"border-color-e":[{"border-e":[r]}],"border-color-t":[{"border-t":[r]}],"border-color-r":[{"border-r":[r]}],"border-color-b":[{"border-b":[r]}],"border-color-l":[{"border-l":[r]}],"divide-color":[{divide:[r]}],"outline-style":[{outline:["",...D()]}],"outline-offset":[{"outline-offset":[ki,Ue]}],"outline-w":[{outline:[ki,na]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:U()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[v]}],"ring-offset-w":[{"ring-offset":[ki,na]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",oa,KEe]}],"shadow-color":[{shadow:[S2]}],opacity:[{opacity:[v]}],"mix-blend":[{"mix-blend":[...O(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":O()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[o]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",oa,Ue]}],grayscale:[{grayscale:[l]}],"hue-rotate":[{"hue-rotate":[h]}],invert:[{invert:[u]}],saturate:[{saturate:[w]}],sepia:[{sepia:[C]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[l]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[h]}],"backdrop-invert":[{"backdrop-invert":[u]}],"backdrop-opacity":[{"backdrop-opacity":[v]}],"backdrop-saturate":[{"backdrop-saturate":[w]}],"backdrop-sepia":[{"backdrop-sepia":[C]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[a]}],"border-spacing-x":[{"border-spacing-x":[a]}],"border-spacing-y":[{"border-spacing-y":[a]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Ue]}],duration:[{duration:V()}],ease:[{ease:["linear","in","out","in-out",Ue]}],delay:[{delay:V()}],animate:[{animate:["none","spin","ping","pulse","bounce",Ue]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[b]}],"scale-x":[{"scale-x":[b]}],"scale-y":[{"scale-y":[b]}],rotate:[{rotate:[C2,Ue]}],"translate-x":[{"translate-x":[N]}],"translate-y":[{"translate-y":[N]}],"skew-x":[{"skew-x":[_]}],"skew-y":[{"skew-y":[_]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Ue]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Ue]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":z()}],"scroll-mx":[{"scroll-mx":z()}],"scroll-my":[{"scroll-my":z()}],"scroll-ms":[{"scroll-ms":z()}],"scroll-me":[{"scroll-me":z()}],"scroll-mt":[{"scroll-mt":z()}],"scroll-mr":[{"scroll-mr":z()}],"scroll-mb":[{"scroll-mb":z()}],"scroll-ml":[{"scroll-ml":z()}],"scroll-p":[{"scroll-p":z()}],"scroll-px":[{"scroll-px":z()}],"scroll-py":[{"scroll-py":z()}],"scroll-ps":[{"scroll-ps":z()}],"scroll-pe":[{"scroll-pe":z()}],"scroll-pt":[{"scroll-pt":z()}],"scroll-pr":[{"scroll-pr":z()}],"scroll-pb":[{"scroll-pb":z()}],"scroll-pl":[{"scroll-pl":z()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Ue]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[ki,na,jT]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},JEe=PEe(QEe);function te(...e){return JEe(GY(e))}function Kt(e){if(typeof e=="string"||typeof e=="number")return""+e;let t="";if(Array.isArray(e))for(let n=0,o;n<e.length;n++)(o=Kt(e[n]))!==""&&(t+=(t&&" ")+o);else for(let n in e)e[n]&&(t+=(t&&" ")+n);return t}var eje={value:()=>{}};function Yz(){for(var e=0,t=arguments.length,n={},o;e<t;++e){if(!(o=arguments[e]+"")||o in n||/[\s.]/.test(o))throw new Error("illegal type: "+o);n[o]=[]}return new iP(n)}function iP(e){this._=e}function tje(e,t){return e.trim().split(/^|\s+/).map(function(n){var o="",r=n.indexOf(".");if(r>=0&&(o=n.slice(r+1),n=n.slice(0,r)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:o}})}iP.prototype=Yz.prototype={constructor:iP,on:function(e,t){var n=this._,o=tje(e+"",n),r,i=-1,a=o.length;if(arguments.length<2){for(;++i<a;)if((r=(e=o[i]).type)&&(r=nje(n[r],e.name)))return r;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++i<a;)if(r=(e=o[i]).type)n[r]=JB(n[r],e.name,t);else if(t==null)for(r in n)n[r]=JB(n[r],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new iP(e)},call:function(e,t){if((r=arguments.length-2)>0)for(var n=new Array(r),o=0,r,i;o<r;++o)n[o]=arguments[o+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(i=this._[e],o=0,r=i.length;o<r;++o)i[o].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var o=this._[e],r=0,i=o.length;r<i;++r)o[r].value.apply(t,n)}};function nje(e,t){for(var n=0,o=e.length,r;n<o;++n)if((r=e[n]).name===t)return r.value}function JB(e,t,n){for(var o=0,r=e.length;o<r;++o)if(e[o].name===t){e[o]=eje,e=e.slice(0,o).concat(e.slice(o+1));break}return n!=null&&e.push({name:t,value:n}),e}var EH="http://www.w3.org/1999/xhtml";const eU={svg:"http://www.w3.org/2000/svg",xhtml:EH,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Qz(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),eU.hasOwnProperty(t)?{space:eU[t],local:e}:e}function oje(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===EH&&t.documentElement.namespaceURI===EH?t.createElement(e):t.createElementNS(n,e)}}function rje(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function JY(e){var t=Qz(e);return(t.local?rje:oje)(t)}function ije(){}function TF(e){return e==null?ije:function(){return this.querySelector(e)}}function aje(e){typeof e!="function"&&(e=TF(e));for(var t=this._groups,n=t.length,o=new Array(n),r=0;r<n;++r)for(var i=t[r],a=i.length,s=o[r]=new Array(a),c,l,h=0;h<a;++h)(c=i[h])&&(l=e.call(c,c.__data__,h,i))&&("__data__"in c&&(l.__data__=c.__data__),s[h]=l);return new po(o,this._parents)}function sje(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function cje(){return[]}function eQ(e){return e==null?cje:function(){return this.querySelectorAll(e)}}function lje(e){return function(){return sje(e.apply(this,arguments))}}function dje(e){typeof e=="function"?e=lje(e):e=eQ(e);for(var t=this._groups,n=t.length,o=[],r=[],i=0;i<n;++i)for(var a=t[i],s=a.length,c,l=0;l<s;++l)(c=a[l])&&(o.push(e.call(c,c.__data__,l,a)),r.push(c));return new po(o,r)}function tQ(e){return function(){return this.matches(e)}}function nQ(e){return function(t){return t.matches(e)}}var uje=Array.prototype.find;function hje(e){return function(){return uje.call(this.children,e)}}function fje(){return this.firstElementChild}function pje(e){return this.select(e==null?fje:hje(typeof e=="function"?e:nQ(e)))}var yje=Array.prototype.filter;function mje(){return Array.from(this.children)}function gje(e){return function(){return yje.call(this.children,e)}}function kje(e){return this.selectAll(e==null?mje:gje(typeof e=="function"?e:nQ(e)))}function vje(e){typeof e!="function"&&(e=tQ(e));for(var t=this._groups,n=t.length,o=new Array(n),r=0;r<n;++r)for(var i=t[r],a=i.length,s=o[r]=[],c,l=0;l<a;++l)(c=i[l])&&e.call(c,c.__data__,l,i)&&s.push(c);return new po(o,this._parents)}function oQ(e){return new Array(e.length)}function xje(){return new po(this._enter||this._groups.map(oQ),this._parents)}function UP(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}UP.prototype={constructor:UP,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function wje(e){return function(){return e}}function Mje(e,t,n,o,r,i){for(var a=0,s,c=t.length,l=i.length;a<l;++a)(s=t[a])?(s.__data__=i[a],o[a]=s):n[a]=new UP(e,i[a]);for(;a<c;++a)(s=t[a])&&(r[a]=s)}function bje(e,t,n,o,r,i,a){var s,c,l=new Map,h=t.length,u=i.length,p=new Array(h),y;for(s=0;s<h;++s)(c=t[s])&&(p[s]=y=a.call(c,c.__data__,s,t)+"",l.has(y)?r[s]=c:l.set(y,c));for(s=0;s<u;++s)y=a.call(e,i[s],s,i)+"",(c=l.get(y))?(o[s]=c,c.__data__=i[s],l.delete(y)):n[s]=new UP(e,i[s]);for(s=0;s<h;++s)(c=t[s])&&l.get(p[s])===c&&(r[s]=c)}function _je(e){return e.__data__}function Cje(e,t){if(!arguments.length)return Array.from(this,_je);var n=t?bje:Mje,o=this._parents,r=this._groups;typeof e!="function"&&(e=wje(e));for(var i=r.length,a=new Array(i),s=new Array(i),c=new Array(i),l=0;l<i;++l){var h=o[l],u=r[l],p=u.length,y=Sje(e.call(h,h&&h.__data__,l,o)),g=y.length,k=s[l]=new Array(g),x=a[l]=new Array(g),v=c[l]=new Array(p);n(h,u,k,x,v,y,t);for(var M=0,w=0,b,C;M<g;++M)if(b=k[M]){for(M>=w&&(w=M+1);!(C=x[w])&&++w<g;);b._next=C||null}}return a=new po(a,o),a._enter=s,a._exit=c,a}function Sje(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Lje(){return new po(this._exit||this._groups.map(oQ),this._parents)}function Nje(e,t,n){var o=this.enter(),r=this,i=this.exit();return typeof e=="function"?(o=e(o),o&&(o=o.selection())):o=o.append(e+""),t!=null&&(r=t(r),r&&(r=r.selection())),n==null?i.remove():n(i),o&&r?o.merge(r).order():r}function Ije(e){for(var t=e.selection?e.selection():e,n=this._groups,o=t._groups,r=n.length,i=o.length,a=Math.min(r,i),s=new Array(r),c=0;c<a;++c)for(var l=n[c],h=o[c],u=l.length,p=s[c]=new Array(u),y,g=0;g<u;++g)(y=l[g]||h[g])&&(p[g]=y);for(;c<r;++c)s[c]=n[c];return new po(s,this._parents)}function Aje(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var o=e[t],r=o.length-1,i=o[r],a;--r>=0;)(a=o[r])&&(i&&a.compareDocumentPosition(i)^4&&i.parentNode.insertBefore(a,i),i=a);return this}function Eje(e){e||(e=jje);function t(u,p){return u&&p?e(u.__data__,p.__data__):!u-!p}for(var n=this._groups,o=n.length,r=new Array(o),i=0;i<o;++i){for(var a=n[i],s=a.length,c=r[i]=new Array(s),l,h=0;h<s;++h)(l=a[h])&&(c[h]=l);c.sort(t)}return new po(r,this._parents).order()}function jje(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function $je(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function Pje(){return Array.from(this)}function zje(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var o=e[t],r=0,i=o.length;r<i;++r){var a=o[r];if(a)return a}return null}function Rje(){let e=0;for(const t of this)++e;return e}function Tje(){return!this.node()}function Dje(e){for(var t=this._groups,n=0,o=t.length;n<o;++n)for(var r=t[n],i=0,a=r.length,s;i<a;++i)(s=r[i])&&e.call(s,s.__data__,i,r);return this}function Hje(e){return function(){this.removeAttribute(e)}}function Oje(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Fje(e,t){return function(){this.setAttribute(e,t)}}function qje(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function Vje(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function Bje(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function Uje(e,t){var n=Qz(e);if(arguments.length<2){var o=this.node();return n.local?o.getAttributeNS(n.space,n.local):o.getAttribute(n)}return this.each((t==null?n.local?Oje:Hje:typeof t=="function"?n.local?Bje:Vje:n.local?qje:Fje)(n,t))}function rQ(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function Wje(e){return function(){this.style.removeProperty(e)}}function Gje(e,t,n){return function(){this.style.setProperty(e,t,n)}}function Kje(e,t,n){return function(){var o=t.apply(this,arguments);o==null?this.style.removeProperty(e):this.style.setProperty(e,o,n)}}function Xje(e,t,n){return arguments.length>1?this.each((t==null?Wje:typeof t=="function"?Kje:Gje)(e,t,n??"")):S0(this.node(),e)}function S0(e,t){return e.style.getPropertyValue(t)||rQ(e).getComputedStyle(e,null).getPropertyValue(t)}function Zje(e){return function(){delete this[e]}}function Yje(e,t){return function(){this[e]=t}}function Qje(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function Jje(e,t){return arguments.length>1?this.each((t==null?Zje:typeof t=="function"?Qje:Yje)(e,t)):this.node()[e]}function iQ(e){return e.trim().split(/^|\s+/)}function DF(e){return e.classList||new aQ(e)}function aQ(e){this._node=e,this._names=iQ(e.getAttribute("class")||"")}aQ.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function sQ(e,t){for(var n=DF(e),o=-1,r=t.length;++o<r;)n.add(t[o])}function cQ(e,t){for(var n=DF(e),o=-1,r=t.length;++o<r;)n.remove(t[o])}function e$e(e){return function(){sQ(this,e)}}function t$e(e){return function(){cQ(this,e)}}function n$e(e,t){return function(){(t.apply(this,arguments)?sQ:cQ)(this,e)}}function o$e(e,t){var n=iQ(e+"");if(arguments.length<2){for(var o=DF(this.node()),r=-1,i=n.length;++r<i;)if(!o.contains(n[r]))return!1;return!0}return this.each((typeof t=="function"?n$e:t?e$e:t$e)(n,t))}function r$e(){this.textContent=""}function i$e(e){return function(){this.textContent=e}}function a$e(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function s$e(e){return arguments.length?this.each(e==null?r$e:(typeof e=="function"?a$e:i$e)(e)):this.node().textContent}function c$e(){this.innerHTML=""}function l$e(e){return function(){this.innerHTML=e}}function d$e(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function u$e(e){return arguments.length?this.each(e==null?c$e:(typeof e=="function"?d$e:l$e)(e)):this.node().innerHTML}function h$e(){this.nextSibling&&this.parentNode.appendChild(this)}function f$e(){return this.each(h$e)}function p$e(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function y$e(){return this.each(p$e)}function m$e(e){var t=typeof e=="function"?e:JY(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function g$e(){return null}function k$e(e,t){var n=typeof e=="function"?e:JY(e),o=t==null?g$e:typeof t=="function"?t:TF(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),o.apply(this,arguments)||null)})}function v$e(){var e=this.parentNode;e&&e.removeChild(this)}function x$e(){return this.each(v$e)}function w$e(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function M$e(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function b$e(e){return this.select(e?M$e:w$e)}function _$e(e){return arguments.length?this.property("__data__",e):this.node().__data__}function C$e(e){return function(t){e.call(this,t,this.__data__)}}function S$e(e){return e.trim().split(/^|\s+/).map(function(t){var n="",o=t.indexOf(".");return o>=0&&(n=t.slice(o+1),t=t.slice(0,o)),{type:t,name:n}})}function L$e(e){return function(){var t=this.__on;if(t){for(var n=0,o=-1,r=t.length,i;n<r;++n)i=t[n],(!e.type||i.type===e.type)&&i.name===e.name?this.removeEventListener(i.type,i.listener,i.options):t[++o]=i;++o?t.length=o:delete this.__on}}}function N$e(e,t,n){return function(){var o=this.__on,r,i=C$e(t);if(o){for(var a=0,s=o.length;a<s;++a)if((r=o[a]).type===e.type&&r.name===e.name){this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=i,r.options=n),r.value=t;return}}this.addEventListener(e.type,i,n),r={type:e.type,name:e.name,value:t,listener:i,options:n},o?o.push(r):this.__on=[r]}}function I$e(e,t,n){var o=S$e(e+""),r,i=o.length,a;if(arguments.length<2){var s=this.node().__on;if(s){for(var c=0,l=s.length,h;c<l;++c)for(r=0,h=s[c];r<i;++r)if((a=o[r]).type===h.type&&a.name===h.name)return h.value}return}for(s=t?N$e:L$e,r=0;r<i;++r)this.each(s(o[r],t,n));return this}function lQ(e,t,n){var o=rQ(e),r=o.CustomEvent;typeof r=="function"?r=new r(t,n):(r=o.document.createEvent("Event"),n?(r.initEvent(t,n.bubbles,n.cancelable),r.detail=n.detail):r.initEvent(t,!1,!1)),e.dispatchEvent(r)}function A$e(e,t){return function(){return lQ(this,e,t)}}function E$e(e,t){return function(){return lQ(this,e,t.apply(this,arguments))}}function j$e(e,t){return this.each((typeof t=="function"?E$e:A$e)(e,t))}function*$$e(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var o=e[t],r=0,i=o.length,a;r<i;++r)(a=o[r])&&(yield a)}var dQ=[null];function po(e,t){this._groups=e,this._parents=t}function Cf(){return new po([[document.documentElement]],dQ)}function P$e(){return this}po.prototype=Cf.prototype={constructor:po,select:aje,selectAll:dje,selectChild:pje,selectChildren:kje,filter:vje,data:Cje,enter:xje,exit:Lje,join:Nje,merge:Ije,selection:P$e,order:Aje,sort:Eje,call:$je,nodes:Pje,node:zje,size:Rje,empty:Tje,each:Dje,attr:Uje,style:Xje,property:Jje,classed:o$e,text:s$e,html:u$e,raise:f$e,lower:y$e,append:m$e,insert:k$e,remove:x$e,clone:b$e,datum:_$e,on:I$e,dispatch:j$e,[Symbol.iterator]:$$e};function ao(e){return typeof e=="string"?new po([[document.querySelector(e)]],[document.documentElement]):new po([[e]],dQ)}function z$e(e){let t;for(;t=e.sourceEvent;)e=t;return e}function Go(e,t){if(e=z$e(e),t===void 0&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var o=n.createSVGPoint();return o.x=e.clientX,o.y=e.clientY,o=o.matrixTransform(t.getScreenCTM().inverse()),[o.x,o.y]}if(t.getBoundingClientRect){var r=t.getBoundingClientRect();return[e.clientX-r.left-t.clientLeft,e.clientY-r.top-t.clientTop]}}return[e.pageX,e.pageY]}const R$e={passive:!1},Jh={capture:!0,passive:!1};function $T(e){e.stopImmediatePropagation()}function f0(e){e.preventDefault(),e.stopImmediatePropagation()}function uQ(e){var t=e.document.documentElement,n=ao(e).on("dragstart.drag",f0,Jh);"onselectstart"in t?n.on("selectstart.drag",f0,Jh):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function hQ(e,t){var n=e.document.documentElement,o=ao(e).on("dragstart.drag",null);t&&(o.on("click.drag",f0,Jh),setTimeout(function(){o.on("click.drag",null)},0)),"onselectstart"in n?o.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}const xp=e=>()=>e;function jH(e,{sourceEvent:t,subject:n,target:o,identifier:r,active:i,x:a,y:s,dx:c,dy:l,dispatch:h}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:o,enumerable:!0,configurable:!0},identifier:{value:r,enumerable:!0,configurable:!0},active:{value:i,enumerable:!0,configurable:!0},x:{value:a,enumerable:!0,configurable:!0},y:{value:s,enumerable:!0,configurable:!0},dx:{value:c,enumerable:!0,configurable:!0},dy:{value:l,enumerable:!0,configurable:!0},_:{value:h}})}jH.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function T$e(e){return!e.ctrlKey&&!e.button}function D$e(){return this.parentNode}function H$e(e,t){return t??{x:e.x,y:e.y}}function O$e(){return navigator.maxTouchPoints||"ontouchstart"in this}function fQ(){var e=T$e,t=D$e,n=H$e,o=O$e,r={},i=Yz("start","drag","end"),a=0,s,c,l,h,u=0;function p(b){b.on("mousedown.drag",y).filter(o).on("touchstart.drag",x).on("touchmove.drag",v,R$e).on("touchend.drag touchcancel.drag",M).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function y(b,C){if(!(h||!e.call(this,b,C))){var _=w(this,t.call(this,b,C),b,C,"mouse");_&&(ao(b.view).on("mousemove.drag",g,Jh).on("mouseup.drag",k,Jh),uQ(b.view),$T(b),l=!1,s=b.clientX,c=b.clientY,_("start",b))}}function g(b){if(f0(b),!l){var C=b.clientX-s,_=b.clientY-c;l=C*C+_*_>u}r.mouse("drag",b)}function k(b){ao(b.view).on("mousemove.drag mouseup.drag",null),hQ(b.view,l),f0(b),r.mouse("end",b)}function x(b,C){if(e.call(this,b,C)){var _=b.changedTouches,S=t.call(this,b,C),N=_.length,P,A;for(P=0;P<N;++P)(A=w(this,S,b,C,_[P].identifier,_[P]))&&($T(b),A("start",b,_[P]))}}function v(b){var C=b.changedTouches,_=C.length,S,N;for(S=0;S<_;++S)(N=r[C[S].identifier])&&(f0(b),N("drag",b,C[S]))}function M(b){var C=b.changedTouches,_=C.length,S,N;for(h&&clearTimeout(h),h=setTimeout(function(){h=null},500),S=0;S<_;++S)(N=r[C[S].identifier])&&($T(b),N("end",b,C[S]))}function w(b,C,_,S,N,P){var A=i.copy(),E=Go(P||_,C),z,U,$;if(($=n.call(b,new jH("beforestart",{sourceEvent:_,target:p,identifier:N,active:a,x:E[0],y:E[1],dx:0,dy:0,dispatch:A}),S))!=null)return z=$.x-E[0]||0,U=$.y-E[1]||0,function T(D,O,I){var R=E,L;switch(D){case"start":r[N]=T,L=a++;break;case"end":delete r[N],--a;case"drag":E=Go(I||O,C),L=a;break}A.call(D,b,new jH(D,{sourceEvent:O,subject:$,target:p,identifier:N,active:L,x:E[0]+z,y:E[1]+U,dx:E[0]-R[0],dy:E[1]-R[1],dispatch:A}),S)}}return p.filter=function(b){return arguments.length?(e=typeof b=="function"?b:xp(!!b),p):e},p.container=function(b){return arguments.length?(t=typeof b=="function"?b:xp(b),p):t},p.subject=function(b){return arguments.length?(n=typeof b=="function"?b:xp(b),p):n},p.touchable=function(b){return arguments.length?(o=typeof b=="function"?b:xp(!!b),p):o},p.on=function(){var b=i.on.apply(i,arguments);return b===i?p:b},p.clickDistance=function(b){return arguments.length?(u=(b=+b)*b,p):Math.sqrt(u)},p}function HF(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function pQ(e,t){var n=Object.create(e.prototype);for(var o in t)n[o]=t[o];return n}function Sf(){}var ef=.7,WP=1/ef,p0="\\s*([+-]?\\d+)\\s*",tf="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",qr="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",F$e=/^#([0-9a-f]{3,8})$/,q$e=new RegExp(`^rgb\\(${p0},${p0},${p0}\\)$`),V$e=new RegExp(`^rgb\\(${qr},${qr},${qr}\\)$`),B$e=new RegExp(`^rgba\\(${p0},${p0},${p0},${tf}\\)$`),U$e=new RegExp(`^rgba\\(${qr},${qr},${qr},${tf}\\)$`),W$e=new RegExp(`^hsl\\(${tf},${qr},${qr}\\)$`),G$e=new RegExp(`^hsla\\(${tf},${qr},${qr},${tf}\\)$`),tU={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};HF(Sf,Td,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:nU,formatHex:nU,formatHex8:K$e,formatHsl:X$e,formatRgb:oU,toString:oU});function nU(){return this.rgb().formatHex()}function K$e(){return this.rgb().formatHex8()}function X$e(){return yQ(this).formatHsl()}function oU(){return this.rgb().formatRgb()}function Td(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=F$e.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?rU(t):n===3?new Bn(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?wp(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?wp(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=q$e.exec(e))?new Bn(t[1],t[2],t[3],1):(t=V$e.exec(e))?new Bn(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=B$e.exec(e))?wp(t[1],t[2],t[3],t[4]):(t=U$e.exec(e))?wp(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=W$e.exec(e))?sU(t[1],t[2]/100,t[3]/100,1):(t=G$e.exec(e))?sU(t[1],t[2]/100,t[3]/100,t[4]):tU.hasOwnProperty(e)?rU(tU[e]):e==="transparent"?new Bn(NaN,NaN,NaN,0):null}function rU(e){return new Bn(e>>16&255,e>>8&255,e&255,1)}function wp(e,t,n,o){return o<=0&&(e=t=n=NaN),new Bn(e,t,n,o)}function Z$e(e){return e instanceof Sf||(e=Td(e)),e?(e=e.rgb(),new Bn(e.r,e.g,e.b,e.opacity)):new Bn}function $H(e,t,n,o){return arguments.length===1?Z$e(e):new Bn(e,t,n,o??1)}function Bn(e,t,n,o){this.r=+e,this.g=+t,this.b=+n,this.opacity=+o}HF(Bn,$H,pQ(Sf,{brighter(e){return e=e==null?WP:Math.pow(WP,e),new Bn(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?ef:Math.pow(ef,e),new Bn(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Bn(Ad(this.r),Ad(this.g),Ad(this.b),GP(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:iU,formatHex:iU,formatHex8:Y$e,formatRgb:aU,toString:aU}));function iU(){return`#${_d(this.r)}${_d(this.g)}${_d(this.b)}`}function Y$e(){return`#${_d(this.r)}${_d(this.g)}${_d(this.b)}${_d((isNaN(this.opacity)?1:this.opacity)*255)}`}function aU(){const e=GP(this.opacity);return`${e===1?"rgb(":"rgba("}${Ad(this.r)}, ${Ad(this.g)}, ${Ad(this.b)}${e===1?")":`, ${e})`}`}function GP(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Ad(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function _d(e){return e=Ad(e),(e<16?"0":"")+e.toString(16)}function sU(e,t,n,o){return o<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Zo(e,t,n,o)}function yQ(e){if(e instanceof Zo)return new Zo(e.h,e.s,e.l,e.opacity);if(e instanceof Sf||(e=Td(e)),!e)return new Zo;if(e instanceof Zo)return e;e=e.rgb();var t=e.r/255,n=e.g/255,o=e.b/255,r=Math.min(t,n,o),i=Math.max(t,n,o),a=NaN,s=i-r,c=(i+r)/2;return s?(t===i?a=(n-o)/s+(n<o)*6:n===i?a=(o-t)/s+2:a=(t-n)/s+4,s/=c<.5?i+r:2-i-r,a*=60):s=c>0&&c<1?0:a,new Zo(a,s,c,e.opacity)}function Q$e(e,t,n,o){return arguments.length===1?yQ(e):new Zo(e,t,n,o??1)}function Zo(e,t,n,o){this.h=+e,this.s=+t,this.l=+n,this.opacity=+o}HF(Zo,Q$e,pQ(Sf,{brighter(e){return e=e==null?WP:Math.pow(WP,e),new Zo(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?ef:Math.pow(ef,e),new Zo(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,o=n+(n<.5?n:1-n)*t,r=2*n-o;return new Bn(PT(e>=240?e-240:e+120,r,o),PT(e,r,o),PT(e<120?e+240:e-120,r,o),this.opacity)},clamp(){return new Zo(cU(this.h),Mp(this.s),Mp(this.l),GP(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=GP(this.opacity);return`${e===1?"hsl(":"hsla("}${cU(this.h)}, ${Mp(this.s)*100}%, ${Mp(this.l)*100}%${e===1?")":`, ${e})`}`}}));function cU(e){return e=(e||0)%360,e<0?e+360:e}function Mp(e){return Math.max(0,Math.min(1,e||0))}function PT(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const Jz=e=>()=>e;function mQ(e,t){return function(n){return e+n*t}}function J$e(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(o){return Math.pow(e+o*t,n)}}function jat(e,t){var n=t-e;return n?mQ(e,n>180||n<-180?n-360*Math.round(n/360):n):Jz(isNaN(e)?t:e)}function ePe(e){return(e=+e)==1?gQ:function(t,n){return n-t?J$e(t,n,e):Jz(isNaN(t)?n:t)}}function gQ(e,t){var n=t-e;return n?mQ(e,n):Jz(isNaN(e)?t:e)}const KP=function e(t){var n=ePe(t);function o(r,i){var a=n((r=$H(r)).r,(i=$H(i)).r),s=n(r.g,i.g),c=n(r.b,i.b),l=gQ(r.opacity,i.opacity);return function(h){return r.r=a(h),r.g=s(h),r.b=c(h),r.opacity=l(h),r+""}}return o.gamma=e,o}(1);function tPe(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,o=t.slice(),r;return function(i){for(r=0;r<n;++r)o[r]=e[r]*(1-i)+t[r]*i;return o}}function nPe(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function oPe(e,t){var n=t?t.length:0,o=e?Math.min(n,e.length):0,r=new Array(o),i=new Array(n),a;for(a=0;a<o;++a)r[a]=Nh(e[a],t[a]);for(;a<n;++a)i[a]=t[a];return function(s){for(a=0;a<o;++a)i[a]=r[a](s);return i}}function rPe(e,t){var n=new Date;return e=+e,t=+t,function(o){return n.setTime(e*(1-o)+t*o),n}}function $r(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function iPe(e,t){var n={},o={},r;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(r in t)r in e?n[r]=Nh(e[r],t[r]):o[r]=t[r];return function(i){for(r in n)o[r]=n[r](i);return o}}var PH=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,zT=new RegExp(PH.source,"g");function aPe(e){return function(){return e}}function sPe(e){return function(t){return e(t)+""}}function kQ(e,t){var n=PH.lastIndex=zT.lastIndex=0,o,r,i,a=-1,s=[],c=[];for(e=e+"",t=t+"";(o=PH.exec(e))&&(r=zT.exec(t));)(i=r.index)>n&&(i=t.slice(n,i),s[a]?s[a]+=i:s[++a]=i),(o=o[0])===(r=r[0])?s[a]?s[a]+=r:s[++a]=r:(s[++a]=null,c.push({i:a,x:$r(o,r)})),n=zT.lastIndex;return n<t.length&&(i=t.slice(n),s[a]?s[a]+=i:s[++a]=i),s.length<2?c[0]?sPe(c[0].x):aPe(t):(t=c.length,function(l){for(var h=0,u;h<t;++h)s[(u=c[h]).i]=u.x(l);return s.join("")})}function Nh(e,t){var n=typeof t,o;return t==null||n==="boolean"?Jz(t):(n==="number"?$r:n==="string"?(o=Td(t))?(t=o,KP):kQ:t instanceof Td?KP:t instanceof Date?rPe:nPe(t)?tPe:Array.isArray(t)?oPe:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?iPe:$r)(e,t)}var lU=180/Math.PI,zH={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function vQ(e,t,n,o,r,i){var a,s,c;return(a=Math.sqrt(e*e+t*t))&&(e/=a,t/=a),(c=e*n+t*o)&&(n-=e*c,o-=t*c),(s=Math.sqrt(n*n+o*o))&&(n/=s,o/=s,c/=s),e*o<t*n&&(e=-e,t=-t,c=-c,a=-a),{translateX:r,translateY:i,rotate:Math.atan2(t,e)*lU,skewX:Math.atan(c)*lU,scaleX:a,scaleY:s}}var bp;function cPe(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?zH:vQ(t.a,t.b,t.c,t.d,t.e,t.f)}function lPe(e){return e==null||(bp||(bp=document.createElementNS("http://www.w3.org/2000/svg","g")),bp.setAttribute("transform",e),!(e=bp.transform.baseVal.consolidate()))?zH:(e=e.matrix,vQ(e.a,e.b,e.c,e.d,e.e,e.f))}function xQ(e,t,n,o){function r(l){return l.length?l.pop()+" ":""}function i(l,h,u,p,y,g){if(l!==u||h!==p){var k=y.push("translate(",null,t,null,n);g.push({i:k-4,x:$r(l,u)},{i:k-2,x:$r(h,p)})}else(u||p)&&y.push("translate("+u+t+p+n)}function a(l,h,u,p){l!==h?(l-h>180?h+=360:h-l>180&&(l+=360),p.push({i:u.push(r(u)+"rotate(",null,o)-2,x:$r(l,h)})):h&&u.push(r(u)+"rotate("+h+o)}function s(l,h,u,p){l!==h?p.push({i:u.push(r(u)+"skewX(",null,o)-2,x:$r(l,h)}):h&&u.push(r(u)+"skewX("+h+o)}function c(l,h,u,p,y,g){if(l!==u||h!==p){var k=y.push(r(y)+"scale(",null,",",null,")");g.push({i:k-4,x:$r(l,u)},{i:k-2,x:$r(h,p)})}else(u!==1||p!==1)&&y.push(r(y)+"scale("+u+","+p+")")}return function(l,h){var u=[],p=[];return l=e(l),h=e(h),i(l.translateX,l.translateY,h.translateX,h.translateY,u,p),a(l.rotate,h.rotate,u,p),s(l.skewX,h.skewX,u,p),c(l.scaleX,l.scaleY,h.scaleX,h.scaleY,u,p),l=h=null,function(y){for(var g=-1,k=p.length,x;++g<k;)u[(x=p[g]).i]=x.x(y);return u.join("")}}}var dPe=xQ(cPe,"px, ","px)","deg)"),uPe=xQ(lPe,", ",")",")"),hPe=1e-12;function dU(e){return((e=Math.exp(e))+1/e)/2}function fPe(e){return((e=Math.exp(e))-1/e)/2}function pPe(e){return((e=Math.exp(2*e))-1)/(e+1)}const aP=function e(t,n,o){function r(i,a){var s=i[0],c=i[1],l=i[2],h=a[0],u=a[1],p=a[2],y=h-s,g=u-c,k=y*y+g*g,x,v;if(k<hPe)v=Math.log(p/l)/t,x=function(S){return[s+S*y,c+S*g,l*Math.exp(t*S*v)]};else{var M=Math.sqrt(k),w=(p*p-l*l+o*k)/(2*l*n*M),b=(p*p-l*l-o*k)/(2*p*n*M),C=Math.log(Math.sqrt(w*w+1)-w),_=Math.log(Math.sqrt(b*b+1)-b);v=(_-C)/t,x=function(S){var N=S*v,P=dU(C),A=l/(n*M)*(P*pPe(t*N+C)-fPe(C));return[s+A*y,c+A*g,l*P/dU(t*N+C)]}}return x.duration=v*1e3*t/Math.SQRT2,x}return r.rho=function(i){var a=Math.max(.001,+i),s=a*a,c=s*s;return e(a,s,c)},r}(Math.SQRT2,2,4);var L0=0,D2=0,L2=0,wQ=1e3,XP,H2,ZP=0,Dd=0,eR=0,nf=typeof performance=="object"&&performance.now?performance:Date,MQ=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function OF(){return Dd||(MQ(yPe),Dd=nf.now()+eR)}function yPe(){Dd=0}function YP(){this._call=this._time=this._next=null}YP.prototype=bQ.prototype={constructor:YP,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?OF():+n)+(t==null?0:+t),!this._next&&H2!==this&&(H2?H2._next=this:XP=this,H2=this),this._call=e,this._time=n,RH()},stop:function(){this._call&&(this._call=null,this._time=1/0,RH())}};function bQ(e,t,n){var o=new YP;return o.restart(e,t,n),o}function mPe(){OF(),++L0;for(var e=XP,t;e;)(t=Dd-e._time)>=0&&e._call.call(void 0,t),e=e._next;--L0}function uU(){Dd=(ZP=nf.now())+eR,L0=D2=0;try{mPe()}finally{L0=0,kPe(),Dd=0}}function gPe(){var e=nf.now(),t=e-ZP;t>wQ&&(eR-=t,ZP=e)}function kPe(){for(var e,t=XP,n,o=1/0;t;)t._call?(o>t._time&&(o=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:XP=n);H2=e,RH(o)}function RH(e){if(!L0){D2&&(D2=clearTimeout(D2));var t=e-Dd;t>24?(e<1/0&&(D2=setTimeout(uU,e-nf.now()-eR)),L2&&(L2=clearInterval(L2))):(L2||(ZP=nf.now(),L2=setInterval(gPe,wQ)),L0=1,MQ(uU))}}function hU(e,t,n){var o=new YP;return t=t==null?0:+t,o.restart(r=>{o.stop(),e(r+t)},t,n),o}var vPe=Yz("start","end","cancel","interrupt"),xPe=[],_Q=0,fU=1,TH=2,sP=3,pU=4,DH=5,cP=6;function tR(e,t,n,o,r,i){var a=e.__transition;if(!a)e.__transition={};else if(n in a)return;wPe(e,n,{name:t,index:o,group:r,on:vPe,tween:xPe,time:i.time,delay:i.delay,duration:i.duration,ease:i.ease,timer:null,state:_Q})}function FF(e,t){var n=sr(e,t);if(n.state>_Q)throw new Error("too late; already scheduled");return n}function Xr(e,t){var n=sr(e,t);if(n.state>sP)throw new Error("too late; already running");return n}function sr(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function wPe(e,t,n){var o=e.__transition,r;o[t]=n,n.timer=bQ(i,0,n.time);function i(l){n.state=fU,n.timer.restart(a,n.delay,n.time),n.delay<=l&&a(l-n.delay)}function a(l){var h,u,p,y;if(n.state!==fU)return c();for(h in o)if(y=o[h],y.name===n.name){if(y.state===sP)return hU(a);y.state===pU?(y.state=cP,y.timer.stop(),y.on.call("interrupt",e,e.__data__,y.index,y.group),delete o[h]):+h<t&&(y.state=cP,y.timer.stop(),y.on.call("cancel",e,e.__data__,y.index,y.group),delete o[h])}if(hU(function(){n.state===sP&&(n.state=pU,n.timer.restart(s,n.delay,n.time),s(l))}),n.state=TH,n.on.call("start",e,e.__data__,n.index,n.group),n.state===TH){for(n.state=sP,r=new Array(p=n.tween.length),h=0,u=-1;h<p;++h)(y=n.tween[h].value.call(e,e.__data__,n.index,n.group))&&(r[++u]=y);r.length=u+1}}function s(l){for(var h=l<n.duration?n.ease.call(null,l/n.duration):(n.timer.restart(c),n.state=DH,1),u=-1,p=r.length;++u<p;)r[u].call(e,h);n.state===DH&&(n.on.call("end",e,e.__data__,n.index,n.group),c())}function c(){n.state=cP,n.timer.stop(),delete o[t];for(var l in o)return;delete e.__transition}}function lP(e,t){var n=e.__transition,o,r,i=!0,a;if(n){t=t==null?null:t+"";for(a in n){if((o=n[a]).name!==t){i=!1;continue}r=o.state>TH&&o.state<DH,o.state=cP,o.timer.stop(),o.on.call(r?"interrupt":"cancel",e,e.__data__,o.index,o.group),delete n[a]}i&&delete e.__transition}}function MPe(e){return this.each(function(){lP(this,e)})}function bPe(e,t){var n,o;return function(){var r=Xr(this,e),i=r.tween;if(i!==n){o=n=i;for(var a=0,s=o.length;a<s;++a)if(o[a].name===t){o=o.slice(),o.splice(a,1);break}}r.tween=o}}function _Pe(e,t,n){var o,r;if(typeof n!="function")throw new Error;return function(){var i=Xr(this,e),a=i.tween;if(a!==o){r=(o=a).slice();for(var s={name:t,value:n},c=0,l=r.length;c<l;++c)if(r[c].name===t){r[c]=s;break}c===l&&r.push(s)}i.tween=r}}function CPe(e,t){var n=this._id;if(e+="",arguments.length<2){for(var o=sr(this.node(),n).tween,r=0,i=o.length,a;r<i;++r)if((a=o[r]).name===e)return a.value;return null}return this.each((t==null?bPe:_Pe)(n,e,t))}function qF(e,t,n){var o=e._id;return e.each(function(){var r=Xr(this,o);(r.value||(r.value={}))[t]=n.apply(this,arguments)}),function(r){return sr(r,o).value[t]}}function CQ(e,t){var n;return(typeof t=="number"?$r:t instanceof Td?KP:(n=Td(t))?(t=n,KP):kQ)(e,t)}function SPe(e){return function(){this.removeAttribute(e)}}function LPe(e){return function(){this.removeAttributeNS(e.space,e.local)}}function NPe(e,t,n){var o,r=n+"",i;return function(){var a=this.getAttribute(e);return a===r?null:a===o?i:i=t(o=a,n)}}function IPe(e,t,n){var o,r=n+"",i;return function(){var a=this.getAttributeNS(e.space,e.local);return a===r?null:a===o?i:i=t(o=a,n)}}function APe(e,t,n){var o,r,i;return function(){var a,s=n(this),c;return s==null?void this.removeAttribute(e):(a=this.getAttribute(e),c=s+"",a===c?null:a===o&&c===r?i:(r=c,i=t(o=a,s)))}}function EPe(e,t,n){var o,r,i;return function(){var a,s=n(this),c;return s==null?void this.removeAttributeNS(e.space,e.local):(a=this.getAttributeNS(e.space,e.local),c=s+"",a===c?null:a===o&&c===r?i:(r=c,i=t(o=a,s)))}}function jPe(e,t){var n=Qz(e),o=n==="transform"?uPe:CQ;return this.attrTween(e,typeof t=="function"?(n.local?EPe:APe)(n,o,qF(this,"attr."+e,t)):t==null?(n.local?LPe:SPe)(n):(n.local?IPe:NPe)(n,o,t))}function $Pe(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function PPe(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function zPe(e,t){var n,o;function r(){var i=t.apply(this,arguments);return i!==o&&(n=(o=i)&&PPe(e,i)),n}return r._value=t,r}function RPe(e,t){var n,o;function r(){var i=t.apply(this,arguments);return i!==o&&(n=(o=i)&&$Pe(e,i)),n}return r._value=t,r}function TPe(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;var o=Qz(e);return this.tween(n,(o.local?zPe:RPe)(o,t))}function DPe(e,t){return function(){FF(this,e).delay=+t.apply(this,arguments)}}function HPe(e,t){return t=+t,function(){FF(this,e).delay=t}}function OPe(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?DPe:HPe)(t,e)):sr(this.node(),t).delay}function FPe(e,t){return function(){Xr(this,e).duration=+t.apply(this,arguments)}}function qPe(e,t){return t=+t,function(){Xr(this,e).duration=t}}function VPe(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?FPe:qPe)(t,e)):sr(this.node(),t).duration}function BPe(e,t){if(typeof t!="function")throw new Error;return function(){Xr(this,e).ease=t}}function UPe(e){var t=this._id;return arguments.length?this.each(BPe(t,e)):sr(this.node(),t).ease}function WPe(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;Xr(this,e).ease=n}}function GPe(e){if(typeof e!="function")throw new Error;return this.each(WPe(this._id,e))}function KPe(e){typeof e!="function"&&(e=tQ(e));for(var t=this._groups,n=t.length,o=new Array(n),r=0;r<n;++r)for(var i=t[r],a=i.length,s=o[r]=[],c,l=0;l<a;++l)(c=i[l])&&e.call(c,c.__data__,l,i)&&s.push(c);return new zi(o,this._parents,this._name,this._id)}function XPe(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,o=t.length,r=n.length,i=Math.min(o,r),a=new Array(o),s=0;s<i;++s)for(var c=t[s],l=n[s],h=c.length,u=a[s]=new Array(h),p,y=0;y<h;++y)(p=c[y]||l[y])&&(u[y]=p);for(;s<o;++s)a[s]=t[s];return new zi(a,this._parents,this._name,this._id)}function ZPe(e){return(e+"").trim().split(/^|\s+/).every(function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||t==="start"})}function YPe(e,t,n){var o,r,i=ZPe(t)?FF:Xr;return function(){var a=i(this,e),s=a.on;s!==o&&(r=(o=s).copy()).on(t,n),a.on=r}}function QPe(e,t){var n=this._id;return arguments.length<2?sr(this.node(),n).on.on(e):this.each(YPe(n,e,t))}function JPe(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function eze(){return this.on("end.remove",JPe(this._id))}function tze(e){var t=this._name,n=this._id;typeof e!="function"&&(e=TF(e));for(var o=this._groups,r=o.length,i=new Array(r),a=0;a<r;++a)for(var s=o[a],c=s.length,l=i[a]=new Array(c),h,u,p=0;p<c;++p)(h=s[p])&&(u=e.call(h,h.__data__,p,s))&&("__data__"in h&&(u.__data__=h.__data__),l[p]=u,tR(l[p],t,n,p,l,sr(h,n)));return new zi(i,this._parents,t,n)}function nze(e){var t=this._name,n=this._id;typeof e!="function"&&(e=eQ(e));for(var o=this._groups,r=o.length,i=[],a=[],s=0;s<r;++s)for(var c=o[s],l=c.length,h,u=0;u<l;++u)if(h=c[u]){for(var p=e.call(h,h.__data__,u,c),y,g=sr(h,n),k=0,x=p.length;k<x;++k)(y=p[k])&&tR(y,t,n,k,p,g);i.push(p),a.push(h)}return new zi(i,a,t,n)}var oze=Cf.prototype.constructor;function rze(){return new oze(this._groups,this._parents)}function ize(e,t){var n,o,r;return function(){var i=S0(this,e),a=(this.style.removeProperty(e),S0(this,e));return i===a?null:i===n&&a===o?r:r=t(n=i,o=a)}}function SQ(e){return function(){this.style.removeProperty(e)}}function aze(e,t,n){var o,r=n+"",i;return function(){var a=S0(this,e);return a===r?null:a===o?i:i=t(o=a,n)}}function sze(e,t,n){var o,r,i;return function(){var a=S0(this,e),s=n(this),c=s+"";return s==null&&(c=s=(this.style.removeProperty(e),S0(this,e))),a===c?null:a===o&&c===r?i:(r=c,i=t(o=a,s))}}function cze(e,t){var n,o,r,i="style."+t,a="end."+i,s;return function(){var c=Xr(this,e),l=c.on,h=c.value[i]==null?s||(s=SQ(t)):void 0;(l!==n||r!==h)&&(o=(n=l).copy()).on(a,r=h),c.on=o}}function lze(e,t,n){var o=(e+="")=="transform"?dPe:CQ;return t==null?this.styleTween(e,ize(e,o)).on("end.style."+e,SQ(e)):typeof t=="function"?this.styleTween(e,sze(e,o,qF(this,"style."+e,t))).each(cze(this._id,e)):this.styleTween(e,aze(e,o,t),n).on("end.style."+e,null)}function dze(e,t,n){return function(o){this.style.setProperty(e,t.call(this,o),n)}}function uze(e,t,n){var o,r;function i(){var a=t.apply(this,arguments);return a!==r&&(o=(r=a)&&dze(e,a,n)),o}return i._value=t,i}function hze(e,t,n){var o="style."+(e+="");if(arguments.length<2)return(o=this.tween(o))&&o._value;if(t==null)return this.tween(o,null);if(typeof t!="function")throw new Error;return this.tween(o,uze(e,t,n??""))}function fze(e){return function(){this.textContent=e}}function pze(e){return function(){var t=e(this);this.textContent=t??""}}function yze(e){return this.tween("text",typeof e=="function"?pze(qF(this,"text",e)):fze(e==null?"":e+""))}function mze(e){return function(t){this.textContent=e.call(this,t)}}function gze(e){var t,n;function o(){var r=e.apply(this,arguments);return r!==n&&(t=(n=r)&&mze(r)),t}return o._value=e,o}function kze(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,gze(e))}function vze(){for(var e=this._name,t=this._id,n=LQ(),o=this._groups,r=o.length,i=0;i<r;++i)for(var a=o[i],s=a.length,c,l=0;l<s;++l)if(c=a[l]){var h=sr(c,t);tR(c,e,n,l,a,{time:h.time+h.delay+h.duration,delay:0,duration:h.duration,ease:h.ease})}return new zi(o,this._parents,e,n)}function xze(){var e,t,n=this,o=n._id,r=n.size();return new Promise(function(i,a){var s={value:a},c={value:function(){--r===0&&i()}};n.each(function(){var l=Xr(this,o),h=l.on;h!==e&&(t=(e=h).copy(),t._.cancel.push(s),t._.interrupt.push(s),t._.end.push(c)),l.on=t}),r===0&&i()})}var wze=0;function zi(e,t,n,o){this._groups=e,this._parents=t,this._name=n,this._id=o}function LQ(){return++wze}var vi=Cf.prototype;zi.prototype={constructor:zi,select:tze,selectAll:nze,selectChild:vi.selectChild,selectChildren:vi.selectChildren,filter:KPe,merge:XPe,selection:rze,transition:vze,call:vi.call,nodes:vi.nodes,node:vi.node,size:vi.size,empty:vi.empty,each:vi.each,on:QPe,attr:jPe,attrTween:TPe,style:lze,styleTween:hze,text:yze,textTween:kze,remove:eze,tween:CPe,delay:OPe,duration:VPe,ease:UPe,easeVarying:GPe,end:xze,[Symbol.iterator]:vi[Symbol.iterator]};function Mze(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var bze={time:null,delay:0,duration:250,ease:Mze};function _ze(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}function Cze(e){var t,n;e instanceof zi?(t=e._id,e=e._name):(t=LQ(),(n=bze).time=OF(),e=e==null?null:e+"");for(var o=this._groups,r=o.length,i=0;i<r;++i)for(var a=o[i],s=a.length,c,l=0;l<s;++l)(c=a[l])&&tR(c,e,t,l,a,n||_ze(c,t));return new zi(o,this._parents,e,t)}Cf.prototype.interrupt=MPe;Cf.prototype.transition=Cze;const _p=e=>()=>e;function Sze(e,{sourceEvent:t,target:n,transform:o,dispatch:r}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:o,enumerable:!0,configurable:!0},_:{value:r}})}function Ni(e,t,n){this.k=e,this.x=t,this.y=n}Ni.prototype={constructor:Ni,scale:function(e){return e===1?this:new Ni(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new Ni(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var nR=new Ni(1,0,0);NQ.prototype=Ni.prototype;function NQ(e){for(;!e.__zoom;)if(!(e=e.parentNode))return nR;return e.__zoom}function RT(e){e.stopImmediatePropagation()}function N2(e){e.preventDefault(),e.stopImmediatePropagation()}function Lze(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function Nze(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function yU(){return this.__zoom||nR}function Ize(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function Aze(){return navigator.maxTouchPoints||"ontouchstart"in this}function Eze(e,t,n){var o=e.invertX(t[0][0])-n[0][0],r=e.invertX(t[1][0])-n[1][0],i=e.invertY(t[0][1])-n[0][1],a=e.invertY(t[1][1])-n[1][1];return e.translate(r>o?(o+r)/2:Math.min(0,o)||Math.max(0,r),a>i?(i+a)/2:Math.min(0,i)||Math.max(0,a))}function IQ(){var e=Lze,t=Nze,n=Eze,o=Ize,r=Aze,i=[0,1/0],a=[[-1/0,-1/0],[1/0,1/0]],s=250,c=aP,l=Yz("start","zoom","end"),h,u,p,y=500,g=150,k=0,x=10;function v($){$.property("__zoom",yU).on("wheel.zoom",N,{passive:!1}).on("mousedown.zoom",P).on("dblclick.zoom",A).filter(r).on("touchstart.zoom",E).on("touchmove.zoom",z).on("touchend.zoom touchcancel.zoom",U).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}v.transform=function($,T,D,O){var I=$.selection?$.selection():$;I.property("__zoom",yU),$!==I?C($,T,D,O):I.interrupt().each(function(){_(this,arguments).event(O).start().zoom(null,typeof T=="function"?T.apply(this,arguments):T).end()})},v.scaleBy=function($,T,D,O){v.scaleTo($,function(){var I=this.__zoom.k,R=typeof T=="function"?T.apply(this,arguments):T;return I*R},D,O)},v.scaleTo=function($,T,D,O){v.transform($,function(){var I=t.apply(this,arguments),R=this.__zoom,L=D==null?b(I):typeof D=="function"?D.apply(this,arguments):D,V=R.invert(L),H=typeof T=="function"?T.apply(this,arguments):T;return n(w(M(R,H),L,V),I,a)},D,O)},v.translateBy=function($,T,D,O){v.transform($,function(){return n(this.__zoom.translate(typeof T=="function"?T.apply(this,arguments):T,typeof D=="function"?D.apply(this,arguments):D),t.apply(this,arguments),a)},null,O)},v.translateTo=function($,T,D,O,I){v.transform($,function(){var R=t.apply(this,arguments),L=this.__zoom,V=O==null?b(R):typeof O=="function"?O.apply(this,arguments):O;return n(nR.translate(V[0],V[1]).scale(L.k).translate(typeof T=="function"?-T.apply(this,arguments):-T,typeof D=="function"?-D.apply(this,arguments):-D),R,a)},O,I)};function M($,T){return T=Math.max(i[0],Math.min(i[1],T)),T===$.k?$:new Ni(T,$.x,$.y)}function w($,T,D){var O=T[0]-D[0]*$.k,I=T[1]-D[1]*$.k;return O===$.x&&I===$.y?$:new Ni($.k,O,I)}function b($){return[(+$[0][0]+ +$[1][0])/2,(+$[0][1]+ +$[1][1])/2]}function C($,T,D,O){$.on("start.zoom",function(){_(this,arguments).event(O).start()}).on("interrupt.zoom end.zoom",function(){_(this,arguments).event(O).end()}).tween("zoom",function(){var I=this,R=arguments,L=_(I,R).event(O),V=t.apply(I,R),H=D==null?b(V):typeof D=="function"?D.apply(I,R):D,j=Math.max(V[1][0]-V[0][0],V[1][1]-V[0][1]),X=I.__zoom,Z=typeof T=="function"?T.apply(I,R):T,J=c(X.invert(H).concat(j/X.k),Z.invert(H).concat(j/Z.k));return function(re){if(re===1)re=Z;else{var oe=J(re),ne=j/oe[2];re=new Ni(ne,H[0]-oe[0]*ne,H[1]-oe[1]*ne)}L.zoom(null,re)}})}function _($,T,D){return!D&&$.__zooming||new S($,T)}function S($,T){this.that=$,this.args=T,this.active=0,this.sourceEvent=null,this.extent=t.apply($,T),this.taps=0}S.prototype={event:function($){return $&&(this.sourceEvent=$),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function($,T){return this.mouse&&$!=="mouse"&&(this.mouse[1]=T.invert(this.mouse[0])),this.touch0&&$!=="touch"&&(this.touch0[1]=T.invert(this.touch0[0])),this.touch1&&$!=="touch"&&(this.touch1[1]=T.invert(this.touch1[0])),this.that.__zoom=T,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function($){var T=ao(this.that).datum();l.call($,this.that,new Sze($,{sourceEvent:this.sourceEvent,target:v,transform:this.that.__zoom,dispatch:l}),T)}};function N($,...T){if(!e.apply(this,arguments))return;var D=_(this,T).event($),O=this.__zoom,I=Math.max(i[0],Math.min(i[1],O.k*Math.pow(2,o.apply(this,arguments)))),R=Go($);if(D.wheel)(D.mouse[0][0]!==R[0]||D.mouse[0][1]!==R[1])&&(D.mouse[1]=O.invert(D.mouse[0]=R)),clearTimeout(D.wheel);else{if(O.k===I)return;D.mouse=[R,O.invert(R)],lP(this),D.start()}N2($),D.wheel=setTimeout(L,g),D.zoom("mouse",n(w(M(O,I),D.mouse[0],D.mouse[1]),D.extent,a));function L(){D.wheel=null,D.end()}}function P($,...T){if(p||!e.apply(this,arguments))return;var D=$.currentTarget,O=_(this,T,!0).event($),I=ao($.view).on("mousemove.zoom",H,!0).on("mouseup.zoom",j,!0),R=Go($,D),L=$.clientX,V=$.clientY;uQ($.view),RT($),O.mouse=[R,this.__zoom.invert(R)],lP(this),O.start();function H(X){if(N2(X),!O.moved){var Z=X.clientX-L,J=X.clientY-V;O.moved=Z*Z+J*J>k}O.event(X).zoom("mouse",n(w(O.that.__zoom,O.mouse[0]=Go(X,D),O.mouse[1]),O.extent,a))}function j(X){I.on("mousemove.zoom mouseup.zoom",null),hQ(X.view,O.moved),N2(X),O.event(X).end()}}function A($,...T){if(e.apply(this,arguments)){var D=this.__zoom,O=Go($.changedTouches?$.changedTouches[0]:$,this),I=D.invert(O),R=D.k*($.shiftKey?.5:2),L=n(w(M(D,R),O,I),t.apply(this,T),a);N2($),s>0?ao(this).transition().duration(s).call(C,L,O,$):ao(this).call(v.transform,L,O,$)}}function E($,...T){if(e.apply(this,arguments)){var D=$.touches,O=D.length,I=_(this,T,$.changedTouches.length===O).event($),R,L,V,H;for(RT($),L=0;L<O;++L)V=D[L],H=Go(V,this),H=[H,this.__zoom.invert(H),V.identifier],I.touch0?!I.touch1&&I.touch0[2]!==H[2]&&(I.touch1=H,I.taps=0):(I.touch0=H,R=!0,I.taps=1+!!h);h&&(h=clearTimeout(h)),R&&(I.taps<2&&(u=H[0],h=setTimeout(function(){h=null},y)),lP(this),I.start())}}function z($,...T){if(this.__zooming){var D=_(this,T).event($),O=$.changedTouches,I=O.length,R,L,V,H;for(N2($),R=0;R<I;++R)L=O[R],V=Go(L,this),D.touch0&&D.touch0[2]===L.identifier?D.touch0[0]=V:D.touch1&&D.touch1[2]===L.identifier&&(D.touch1[0]=V);if(L=D.that.__zoom,D.touch1){var j=D.touch0[0],X=D.touch0[1],Z=D.touch1[0],J=D.touch1[1],re=(re=Z[0]-j[0])*re+(re=Z[1]-j[1])*re,oe=(oe=J[0]-X[0])*oe+(oe=J[1]-X[1])*oe;L=M(L,Math.sqrt(re/oe)),V=[(j[0]+Z[0])/2,(j[1]+Z[1])/2],H=[(X[0]+J[0])/2,(X[1]+J[1])/2]}else if(D.touch0)V=D.touch0[0],H=D.touch0[1];else return;D.zoom("touch",n(w(L,V,H),D.extent,a))}}function U($,...T){if(this.__zooming){var D=_(this,T).event($),O=$.changedTouches,I=O.length,R,L;for(RT($),p&&clearTimeout(p),p=setTimeout(function(){p=null},y),R=0;R<I;++R)L=O[R],D.touch0&&D.touch0[2]===L.identifier?delete D.touch0:D.touch1&&D.touch1[2]===L.identifier&&delete D.touch1;if(D.touch1&&!D.touch0&&(D.touch0=D.touch1,delete D.touch1),D.touch0)D.touch0[1]=this.__zoom.invert(D.touch0[0]);else if(D.end(),D.taps===2&&(L=Go(L,this),Math.hypot(u[0]-L[0],u[1]-L[1])<x)){var V=ao(this).on("dblclick.zoom");V&&V.apply(this,arguments)}}}return v.wheelDelta=function($){return arguments.length?(o=typeof $=="function"?$:_p(+$),v):o},v.filter=function($){return arguments.length?(e=typeof $=="function"?$:_p(!!$),v):e},v.touchable=function($){return arguments.length?(r=typeof $=="function"?$:_p(!!$),v):r},v.extent=function($){return arguments.length?(t=typeof $=="function"?$:_p([[+$[0][0],+$[0][1]],[+$[1][0],+$[1][1]]]),v):t},v.scaleExtent=function($){return arguments.length?(i[0]=+$[0],i[1]=+$[1],v):[i[0],i[1]]},v.translateExtent=function($){return arguments.length?(a[0][0]=+$[0][0],a[1][0]=+$[1][0],a[0][1]=+$[0][1],a[1][1]=+$[1][1],v):[[a[0][0],a[0][1]],[a[1][0],a[1][1]]]},v.constrain=function($){return arguments.length?(n=$,v):n},v.duration=function($){return arguments.length?(s=+$,v):s},v.interpolate=function($){return arguments.length?(c=$,v):c},v.on=function(){var $=l.on.apply(l,arguments);return $===l?v:$},v.clickDistance=function($){return arguments.length?(k=($=+$)*$,v):Math.sqrt(k)},v.tapDistance=function($){return arguments.length?(x=+$,v):x},v}const Ur={error001:()=>"[React Flow]: Seems like you have not used zustand provider as an ancestor. Help: https://reactflow.dev/error#001",error002:()=>"It looks like you've created a new nodeTypes or edgeTypes object. If this wasn't on purpose please define the nodeTypes/edgeTypes outside of the component or memoize them.",error003:e=>`Node type "${e}" not found. Using fallback type "default".`,error004:()=>"The React Flow parent container needs a width and a height to render the graph.",error005:()=>"Only child nodes can use a parent extent.",error006:()=>"Can't create edge. An edge needs a source and a target.",error007:e=>`The old edge with id=${e} does not exist.`,error009:e=>`Marker type "${e}" doesn't exist.`,error008:(e,{id:t,sourceHandle:n,targetHandle:o})=>`Couldn't create edge for ${e} handle id: "${e==="source"?n:o}", edge id: ${t}.`,error010:()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",error011:e=>`Edge type "${e}" not found. Using fallback type "default".`,error012:e=>`Node with id "${e}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`,error013:(e="react")=>`It seems that you haven't loaded the styles. Please import '@xyflow/${e}/dist/style.css' or base.css to make sure everything is working properly.`,error014:()=>"useNodeConnections: No node ID found. Call useNodeConnections inside a custom Node or provide a node ID.",error015:()=>"It seems that you are trying to drag a node that is not initialized. Please use onNodesChange as explained in the docs."},of=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],AQ=["Enter"," ","Escape"],EQ={"node.a11yDescription.default":"Press enter or space to select a node. Press delete to remove it and escape to cancel.","node.a11yDescription.keyboardDisabled":"Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.","node.a11yDescription.ariaLiveMessage":({direction:e,x:t,y:n})=>`Moved selected node ${e}. New position, x: ${t}, y: ${n}`,"edge.a11yDescription.default":"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.","controls.ariaLabel":"Control Panel","controls.zoomIn.ariaLabel":"Zoom In","controls.zoomOut.ariaLabel":"Zoom Out","controls.fitView.ariaLabel":"Fit View","controls.interactive.ariaLabel":"Toggle Interactivity","minimap.ariaLabel":"Mini Map","handle.ariaLabel":"Handle"};var N0;(function(e){e.Strict="strict",e.Loose="loose"})(N0||(N0={}));var Ed;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(Ed||(Ed={}));var I0;(function(e){e.Partial="partial",e.Full="full"})(I0||(I0={}));const jQ={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null};var xa;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(xa||(xa={}));var rf;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(rf||(rf={}));var fe;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(fe||(fe={}));const mU={[fe.Left]:fe.Right,[fe.Right]:fe.Left,[fe.Top]:fe.Bottom,[fe.Bottom]:fe.Top};function $Q(e){return e===null?null:e?"valid":"invalid"}const PQ=e=>"id"in e&&"source"in e&&"target"in e,jze=e=>"id"in e&&"position"in e&&!("source"in e)&&!("target"in e),VF=e=>"id"in e&&"internals"in e&&!("source"in e)&&!("target"in e),Lf=(e,t=[0,0])=>{const{width:n,height:o}=Oi(e),r=e.origin??t,i=n*r[0],a=o*r[1];return{x:e.position.x-i,y:e.position.y-a}},$ze=(e,t={nodeOrigin:[0,0]})=>{if(e.length===0)return{x:0,y:0,width:0,height:0};const n=e.reduce((o,r)=>{const i=typeof r=="string";let a=!t.nodeLookup&&!i?r:void 0;t.nodeLookup&&(a=i?t.nodeLookup.get(r):VF(r)?r:t.nodeLookup.get(r.id));const s=a?QP(a,t.nodeOrigin):{x:0,y:0,x2:0,y2:0};return oR(o,s)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return rR(n)},Nf=(e,t={})=>{let n={x:1/0,y:1/0,x2:-1/0,y2:-1/0},o=!1;return e.forEach(r=>{(t.filter===void 0||t.filter(r))&&(n=oR(n,QP(r)),o=!0)}),o?rR(n):{x:0,y:0,width:0,height:0}},BF=(e,t,[n,o,r]=[0,0,1],i=!1,a=!1)=>{const s={...Af(t,[n,o,r]),width:t.width/r,height:t.height/r},c=[];for(const l of e.values()){const{measured:h,selectable:u=!0,hidden:p=!1}=l;if(a&&!u||p)continue;const y=h.width??l.width??l.initialWidth??null,g=h.height??l.height??l.initialHeight??null,k=af(s,E0(l)),x=(y??0)*(g??0),v=i&&k>0;(!l.internals.handleBounds||v||k>=x||l.dragging)&&c.push(l)}return c},Pze=(e,t)=>{const n=new Set;return e.forEach(o=>{n.add(o.id)}),t.filter(o=>n.has(o.source)||n.has(o.target))};function zze(e,t){const n=new Map,o=t!=null&&t.nodes?new Set(t.nodes.map(r=>r.id)):null;return e.forEach(r=>{r.measured.width&&r.measured.height&&((t==null?void 0:t.includeHiddenNodes)||!r.hidden)&&(!o||o.has(r.id))&&n.set(r.id,r)}),n}async function Rze({nodes:e,width:t,height:n,panZoom:o,minZoom:r,maxZoom:i},a){if(e.size===0)return Promise.resolve(!0);const s=zze(e,a),c=Nf(s),l=UF(c,t,n,(a==null?void 0:a.minZoom)??r,(a==null?void 0:a.maxZoom)??i,(a==null?void 0:a.padding)??.1);return await o.setViewport(l,{duration:a==null?void 0:a.duration,ease:a==null?void 0:a.ease,interpolate:a==null?void 0:a.interpolate}),Promise.resolve(!0)}function zQ({nodeId:e,nextPosition:t,nodeLookup:n,nodeOrigin:o=[0,0],nodeExtent:r,onError:i}){const a=n.get(e),s=a.parentId?n.get(a.parentId):void 0,{x:c,y:l}=s?s.internals.positionAbsolute:{x:0,y:0},h=a.origin??o;let u=a.extent||r;if(a.extent==="parent"&&!a.expandParent)if(!s)i==null||i("005",Ur.error005());else{const y=s.measured.width,g=s.measured.height;y&&g&&(u=[[c,l],[c+y,l+g]])}else s&&j0(a.extent)&&(u=[[a.extent[0][0]+c,a.extent[0][1]+l],[a.extent[1][0]+c,a.extent[1][1]+l]]);const p=j0(u)?Hd(t,u,a.measured):t;return(a.measured.width===void 0||a.measured.height===void 0)&&(i==null||i("015",Ur.error015())),{position:{x:p.x-c+(a.measured.width??0)*h[0],y:p.y-l+(a.measured.height??0)*h[1]},positionAbsolute:p}}async function Tze({nodesToRemove:e=[],edgesToRemove:t=[],nodes:n,edges:o,onBeforeDelete:r}){const i=new Set(e.map(p=>p.id)),a=[];for(const p of n){if(p.deletable===!1)continue;const y=i.has(p.id),g=!y&&p.parentId&&a.find(k=>k.id===p.parentId);(y||g)&&a.push(p)}const s=new Set(t.map(p=>p.id)),c=o.filter(p=>p.deletable!==!1),h=Pze(a,c);for(const p of c)s.has(p.id)&&!h.find(g=>g.id===p.id)&&h.push(p);if(!r)return{edges:h,nodes:a};const u=await r({nodes:a,edges:h});return typeof u=="boolean"?u?{edges:h,nodes:a}:{edges:[],nodes:[]}:u}const A0=(e,t=0,n=1)=>Math.min(Math.max(e,t),n),Hd=(e={x:0,y:0},t,n)=>({x:A0(e.x,t[0][0],t[1][0]-((n==null?void 0:n.width)??0)),y:A0(e.y,t[0][1],t[1][1]-((n==null?void 0:n.height)??0))});function RQ(e,t,n){const{width:o,height:r}=Oi(n),{x:i,y:a}=n.internals.positionAbsolute;return Hd(e,[[i,a],[i+o,a+r]],t)}const gU=(e,t,n)=>e<t?A0(Math.abs(e-t),1,t)/t:e>n?-A0(Math.abs(e-n),1,t)/t:0,TQ=(e,t,n=15,o=40)=>{const r=gU(e.x,o,t.width-o)*n,i=gU(e.y,o,t.height-o)*n;return[r,i]},oR=(e,t)=>({x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x2,t.x2),y2:Math.max(e.y2,t.y2)}),HH=({x:e,y:t,width:n,height:o})=>({x:e,y:t,x2:e+n,y2:t+o}),rR=({x:e,y:t,x2:n,y2:o})=>({x:e,y:t,width:n-e,height:o-t}),E0=(e,t=[0,0])=>{var r,i;const{x:n,y:o}=VF(e)?e.internals.positionAbsolute:Lf(e,t);return{x:n,y:o,width:((r=e.measured)==null?void 0:r.width)??e.width??e.initialWidth??0,height:((i=e.measured)==null?void 0:i.height)??e.height??e.initialHeight??0}},QP=(e,t=[0,0])=>{var r,i;const{x:n,y:o}=VF(e)?e.internals.positionAbsolute:Lf(e,t);return{x:n,y:o,x2:n+(((r=e.measured)==null?void 0:r.width)??e.width??e.initialWidth??0),y2:o+(((i=e.measured)==null?void 0:i.height)??e.height??e.initialHeight??0)}},DQ=(e,t)=>rR(oR(HH(e),HH(t))),af=(e,t)=>{const n=Math.max(0,Math.min(e.x+e.width,t.x+t.width)-Math.max(e.x,t.x)),o=Math.max(0,Math.min(e.y+e.height,t.y+t.height)-Math.max(e.y,t.y));return Math.ceil(n*o)},kU=e=>Yo(e.width)&&Yo(e.height)&&Yo(e.x)&&Yo(e.y),Yo=e=>!isNaN(e)&&isFinite(e),Dze=(e,t)=>{},If=(e,t=[1,1])=>({x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}),Af=({x:e,y:t},[n,o,r],i=!1,a=[1,1])=>{const s={x:(e-n)/r,y:(t-o)/r};return i?If(s,a):s},JP=({x:e,y:t},[n,o,r])=>({x:e*r+n,y:t*r+o});function bu(e,t){if(typeof e=="number")return Math.floor((t-t/(1+e))*.5);if(typeof e=="string"&&e.endsWith("px")){const n=parseFloat(e);if(!Number.isNaN(n))return Math.floor(n)}if(typeof e=="string"&&e.endsWith("%")){const n=parseFloat(e);if(!Number.isNaN(n))return Math.floor(t*n*.01)}return console.error(`[React Flow] The padding value "${e}" is invalid. Please provide a number or a string with a valid unit (px or %).`),0}function Hze(e,t,n){if(typeof e=="string"||typeof e=="number"){const o=bu(e,n),r=bu(e,t);return{top:o,right:r,bottom:o,left:r,x:r*2,y:o*2}}if(typeof e=="object"){const o=bu(e.top??e.y??0,n),r=bu(e.bottom??e.y??0,n),i=bu(e.left??e.x??0,t),a=bu(e.right??e.x??0,t);return{top:o,right:a,bottom:r,left:i,x:i+a,y:o+r}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function Oze(e,t,n,o,r,i){const{x:a,y:s}=JP(e,[t,n,o]),{x:c,y:l}=JP({x:e.x+e.width,y:e.y+e.height},[t,n,o]),h=r-c,u=i-l;return{left:Math.floor(a),top:Math.floor(s),right:Math.floor(h),bottom:Math.floor(u)}}const UF=(e,t,n,o,r,i)=>{const a=Hze(i,t,n),s=(t-a.x)/e.width,c=(n-a.y)/e.height,l=Math.min(s,c),h=A0(l,o,r),u=e.x+e.width/2,p=e.y+e.height/2,y=t/2-u*h,g=n/2-p*h,k=Oze(e,y,g,h,t,n),x={left:Math.min(k.left-a.left,0),top:Math.min(k.top-a.top,0),right:Math.min(k.right-a.right,0),bottom:Math.min(k.bottom-a.bottom,0)};return{x:y-x.left+x.right,y:g-x.top+x.bottom,zoom:h}},sf=()=>{var e;return typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)==null?void 0:e.indexOf("Mac"))>=0};function j0(e){return e!=null&&e!=="parent"}function Oi(e){var t,n;return{width:((t=e.measured)==null?void 0:t.width)??e.width??e.initialWidth??0,height:((n=e.measured)==null?void 0:n.height)??e.height??e.initialHeight??0}}function HQ(e){var t,n;return(((t=e.measured)==null?void 0:t.width)??e.width??e.initialWidth)!==void 0&&(((n=e.measured)==null?void 0:n.height)??e.height??e.initialHeight)!==void 0}function OQ(e,t={width:0,height:0},n,o,r){const i={...e},a=o.get(n);if(a){const s=a.origin||r;i.x+=a.internals.positionAbsolute.x-(t.width??0)*s[0],i.y+=a.internals.positionAbsolute.y-(t.height??0)*s[1]}return i}function vU(e,t){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}function Fze(){let e,t;return{promise:new Promise((o,r)=>{e=o,t=r}),resolve:e,reject:t}}function qze(e){return{...EQ,...e||{}}}function Ih(e,{snapGrid:t=[0,0],snapToGrid:n=!1,transform:o,containerBounds:r}){const{x:i,y:a}=Qo(e),s=Af({x:i-((r==null?void 0:r.left)??0),y:a-((r==null?void 0:r.top)??0)},o),{x:c,y:l}=n?If(s,t):s;return{xSnapped:c,ySnapped:l,...s}}const WF=e=>({width:e.offsetWidth,height:e.offsetHeight}),FQ=e=>{var t;return((t=e==null?void 0:e.getRootNode)==null?void 0:t.call(e))||(window==null?void 0:window.document)},Vze=["INPUT","SELECT","TEXTAREA"];function qQ(e){var o,r;const t=((r=(o=e.composedPath)==null?void 0:o.call(e))==null?void 0:r[0])||e.target;return(t==null?void 0:t.nodeType)!==1?!1:Vze.includes(t.nodeName)||t.hasAttribute("contenteditable")||!!t.closest(".nokey")}const VQ=e=>"clientX"in e,Qo=(e,t)=>{var i,a;const n=VQ(e),o=n?e.clientX:(i=e.touches)==null?void 0:i[0].clientX,r=n?e.clientY:(a=e.touches)==null?void 0:a[0].clientY;return{x:o-((t==null?void 0:t.left)??0),y:r-((t==null?void 0:t.top)??0)}},xU=(e,t,n,o,r)=>{const i=t.querySelectorAll(`.${e}`);return!i||!i.length?null:Array.from(i).map(a=>{const s=a.getBoundingClientRect();return{id:a.getAttribute("data-handleid"),type:e,nodeId:r,position:a.getAttribute("data-handlepos"),x:(s.left-n.left)/o,y:(s.top-n.top)/o,...WF(a)}})};function BQ({sourceX:e,sourceY:t,targetX:n,targetY:o,sourceControlX:r,sourceControlY:i,targetControlX:a,targetControlY:s}){const c=e*.125+r*.375+a*.375+n*.125,l=t*.125+i*.375+s*.375+o*.125,h=Math.abs(c-e),u=Math.abs(l-t);return[c,l,h,u]}function Cp(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function wU({pos:e,x1:t,y1:n,x2:o,y2:r,c:i}){switch(e){case fe.Left:return[t-Cp(t-o,i),n];case fe.Right:return[t+Cp(o-t,i),n];case fe.Top:return[t,n-Cp(n-r,i)];case fe.Bottom:return[t,n+Cp(r-n,i)]}}function iR({sourceX:e,sourceY:t,sourcePosition:n=fe.Bottom,targetX:o,targetY:r,targetPosition:i=fe.Top,curvature:a=.25}){const[s,c]=wU({pos:n,x1:e,y1:t,x2:o,y2:r,c:a}),[l,h]=wU({pos:i,x1:o,y1:r,x2:e,y2:t,c:a}),[u,p,y,g]=BQ({sourceX:e,sourceY:t,targetX:o,targetY:r,sourceControlX:s,sourceControlY:c,targetControlX:l,targetControlY:h});return[`M${e},${t} C${s},${c} ${l},${h} ${o},${r}`,u,p,y,g]}function UQ({sourceX:e,sourceY:t,targetX:n,targetY:o}){const r=Math.abs(n-e)/2,i=n<e?n+r:n-r,a=Math.abs(o-t)/2,s=o<t?o+a:o-a;return[i,s,r,a]}function Bze({sourceNode:e,targetNode:t,selected:n=!1,zIndex:o=0,elevateOnSelect:r=!1,zIndexMode:i="basic"}){if(i==="manual")return o;const a=r&&n?o+1e3:o,s=Math.max(e.parentId||r&&e.selected?e.internals.z:0,t.parentId||r&&t.selected?t.internals.z:0);return a+s}function Uze({sourceNode:e,targetNode:t,width:n,height:o,transform:r}){const i=oR(QP(e),QP(t));i.x===i.x2&&(i.x2+=1),i.y===i.y2&&(i.y2+=1);const a={x:-r[0]/r[2],y:-r[1]/r[2],width:n/r[2],height:o/r[2]};return af(a,rR(i))>0}const Wze=({source:e,sourceHandle:t,target:n,targetHandle:o})=>`xy-edge__${e}${t||""}-${n}${o||""}`,Gze=(e,t)=>t.some(n=>n.source===e.source&&n.target===e.target&&(n.sourceHandle===e.sourceHandle||!n.sourceHandle&&!e.sourceHandle)&&(n.targetHandle===e.targetHandle||!n.targetHandle&&!e.targetHandle)),Kze=(e,t,n={})=>{if(!e.source||!e.target)return t;const o=n.getEdgeId||Wze;let r;return PQ(e)?r={...e}:r={...e,id:o(e)},Gze(r,t)?t:(r.sourceHandle===null&&delete r.sourceHandle,r.targetHandle===null&&delete r.targetHandle,t.concat(r))};function WQ({sourceX:e,sourceY:t,targetX:n,targetY:o}){const[r,i,a,s]=UQ({sourceX:e,sourceY:t,targetX:n,targetY:o});return[`M ${e},${t}L ${n},${o}`,r,i,a,s]}const MU={[fe.Left]:{x:-1,y:0},[fe.Right]:{x:1,y:0},[fe.Top]:{x:0,y:-1},[fe.Bottom]:{x:0,y:1}},Xze=({source:e,sourcePosition:t=fe.Bottom,target:n})=>t===fe.Left||t===fe.Right?e.x<n.x?{x:1,y:0}:{x:-1,y:0}:e.y<n.y?{x:0,y:1}:{x:0,y:-1},bU=(e,t)=>Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2));function Zze({source:e,sourcePosition:t=fe.Bottom,target:n,targetPosition:o=fe.Top,center:r,offset:i,stepPosition:a}){const s=MU[t],c=MU[o],l={x:e.x+s.x*i,y:e.y+s.y*i},h={x:n.x+c.x*i,y:n.y+c.y*i},u=Xze({source:l,sourcePosition:t,target:h}),p=u.x!==0?"x":"y",y=u[p];let g=[],k,x;const v={x:0,y:0},M={x:0,y:0},[,,w,b]=UQ({sourceX:e.x,sourceY:e.y,targetX:n.x,targetY:n.y});if(s[p]*c[p]===-1){p==="x"?(k=r.x??l.x+(h.x-l.x)*a,x=r.y??(l.y+h.y)/2):(k=r.x??(l.x+h.x)/2,x=r.y??l.y+(h.y-l.y)*a);const N=[{x:k,y:l.y},{x:k,y:h.y}],P=[{x:l.x,y:x},{x:h.x,y:x}];s[p]===y?g=p==="x"?N:P:g=p==="x"?P:N}else{const N=[{x:l.x,y:h.y}],P=[{x:h.x,y:l.y}];if(p==="x"?g=s.x===y?P:N:g=s.y===y?N:P,t===o){const $=Math.abs(e[p]-n[p]);if($<=i){const T=Math.min(i-1,i-$);s[p]===y?v[p]=(l[p]>e[p]?-1:1)*T:M[p]=(h[p]>n[p]?-1:1)*T}}if(t!==o){const $=p==="x"?"y":"x",T=s[p]===c[$],D=l[$]>h[$],O=l[$]<h[$];(s[p]===1&&(!T&&D||T&&O)||s[p]!==1&&(!T&&O||T&&D))&&(g=p==="x"?N:P)}const A={x:l.x+v.x,y:l.y+v.y},E={x:h.x+M.x,y:h.y+M.y},z=Math.max(Math.abs(A.x-g[0].x),Math.abs(E.x-g[0].x)),U=Math.max(Math.abs(A.y-g[0].y),Math.abs(E.y-g[0].y));z>=U?(k=(A.x+E.x)/2,x=g[0].y):(k=g[0].x,x=(A.y+E.y)/2)}const C={x:l.x+v.x,y:l.y+v.y},_={x:h.x+M.x,y:h.y+M.y};return[[e,...C.x!==g[0].x||C.y!==g[0].y?[C]:[],...g,..._.x!==g[g.length-1].x||_.y!==g[g.length-1].y?[_]:[],n],k,x,w,b]}function Yze(e,t,n,o){const r=Math.min(bU(e,t)/2,bU(t,n)/2,o),{x:i,y:a}=t;if(e.x===i&&i===n.x||e.y===a&&a===n.y)return`L${i} ${a}`;if(e.y===a){const l=e.x<n.x?-1:1,h=e.y<n.y?1:-1;return`L ${i+r*l},${a}Q ${i},${a} ${i},${a+r*h}`}const s=e.x<n.x?1:-1,c=e.y<n.y?-1:1;return`L ${i},${a+r*c}Q ${i},${a} ${i+r*s},${a}`}function cf({sourceX:e,sourceY:t,sourcePosition:n=fe.Bottom,targetX:o,targetY:r,targetPosition:i=fe.Top,borderRadius:a=5,centerX:s,centerY:c,offset:l=20,stepPosition:h=.5}){const[u,p,y,g,k]=Zze({source:{x:e,y:t},sourcePosition:n,target:{x:o,y:r},targetPosition:i,center:{x:s,y:c},offset:l,stepPosition:h});let x=`M${u[0].x} ${u[0].y}`;for(let v=1;v<u.length-1;v++)x+=Yze(u[v-1],u[v],u[v+1],a);return x+=`L${u[u.length-1].x} ${u[u.length-1].y}`,[x,p,y,g,k]}function _U(e){var t;return e&&!!(e.internals.handleBounds||(t=e.handles)!=null&&t.length)&&!!(e.measured.width||e.width||e.initialWidth)}function Qze(e){var u;const{sourceNode:t,targetNode:n}=e;if(!_U(t)||!_U(n))return null;const o=t.internals.handleBounds||CU(t.handles),r=n.internals.handleBounds||CU(n.handles),i=SU((o==null?void 0:o.source)??[],e.sourceHandle),a=SU(e.connectionMode===N0.Strict?(r==null?void 0:r.target)??[]:((r==null?void 0:r.target)??[]).concat((r==null?void 0:r.source)??[]),e.targetHandle);if(!i||!a)return(u=e.onError)==null||u.call(e,"008",Ur.error008(i?"target":"source",{id:e.id,sourceHandle:e.sourceHandle,targetHandle:e.targetHandle})),null;const s=(i==null?void 0:i.position)||fe.Bottom,c=(a==null?void 0:a.position)||fe.Top,l=Od(t,i,s),h=Od(n,a,c);return{sourceX:l.x,sourceY:l.y,targetX:h.x,targetY:h.y,sourcePosition:s,targetPosition:c}}function CU(e){if(!e)return null;const t=[],n=[];for(const o of e)o.width=o.width??1,o.height=o.height??1,o.type==="source"?t.push(o):o.type==="target"&&n.push(o);return{source:t,target:n}}function Od(e,t,n=fe.Left,o=!1){const r=((t==null?void 0:t.x)??0)+e.internals.positionAbsolute.x,i=((t==null?void 0:t.y)??0)+e.internals.positionAbsolute.y,{width:a,height:s}=t??Oi(e);if(o)return{x:r+a/2,y:i+s/2};switch((t==null?void 0:t.position)??n){case fe.Top:return{x:r+a/2,y:i};case fe.Right:return{x:r+a,y:i+s/2};case fe.Bottom:return{x:r+a/2,y:i+s};case fe.Left:return{x:r,y:i+s/2}}}function SU(e,t){return e&&(t?e.find(n=>n.id===t):e[0])||null}function OH(e,t){return e?typeof e=="string"?e:`${t?`${t}__`:""}${Object.keys(e).sort().map(o=>`${o}=${e[o]}`).join("&")}`:""}function Jze(e,{id:t,defaultColor:n,defaultMarkerStart:o,defaultMarkerEnd:r}){const i=new Set;return e.reduce((a,s)=>([s.markerStart||o,s.markerEnd||r].forEach(c=>{if(c&&typeof c=="object"){const l=OH(c,t);i.has(l)||(a.push({id:l,color:c.color||n,...c}),i.add(l))}}),a),[]).sort((a,s)=>a.id.localeCompare(s.id))}const GQ=1e3,eRe=10,GF={nodeOrigin:[0,0],nodeExtent:of,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},tRe={...GF,checkEquality:!0};function KF(e,t){const n={...e};for(const o in t)t[o]!==void 0&&(n[o]=t[o]);return n}function nRe(e,t,n){const o=KF(GF,n);for(const r of e.values())if(r.parentId)ZF(r,e,t,o);else{const i=Lf(r,o.nodeOrigin),a=j0(r.extent)?r.extent:o.nodeExtent,s=Hd(i,a,Oi(r));r.internals.positionAbsolute=s}}function oRe(e,t){if(!e.handles)return e.measured?t==null?void 0:t.internals.handleBounds:void 0;const n=[],o=[];for(const r of e.handles){const i={id:r.id,width:r.width??1,height:r.height??1,nodeId:e.id,x:r.x,y:r.y,position:r.position,type:r.type};r.type==="source"?n.push(i):r.type==="target"&&o.push(i)}return{source:n,target:o}}function XF(e){return e==="manual"}function FH(e,t,n,o={}){var h,u;const r=KF(tRe,o),i={i:0},a=new Map(t),s=r!=null&&r.elevateNodesOnSelect&&!XF(r.zIndexMode)?GQ:0;let c=e.length>0,l=!1;t.clear(),n.clear();for(const p of e){let y=a.get(p.id);if(r.checkEquality&&p===(y==null?void 0:y.internals.userNode))t.set(p.id,y);else{const g=Lf(p,r.nodeOrigin),k=j0(p.extent)?p.extent:r.nodeExtent,x=Hd(g,k,Oi(p));y={...r.defaults,...p,measured:{width:(h=p.measured)==null?void 0:h.width,height:(u=p.measured)==null?void 0:u.height},internals:{positionAbsolute:x,handleBounds:oRe(p,y),z:KQ(p,s,r.zIndexMode),userNode:p}},t.set(p.id,y)}(y.measured===void 0||y.measured.width===void 0||y.measured.height===void 0)&&!y.hidden&&(c=!1),p.parentId&&ZF(y,t,n,o,i),l||(l=p.selected??!1)}return{nodesInitialized:c,hasSelectedNodes:l}}function rRe(e,t){if(!e.parentId)return;const n=t.get(e.parentId);n?n.set(e.id,e):t.set(e.parentId,new Map([[e.id,e]]))}function ZF(e,t,n,o,r){const{elevateNodesOnSelect:i,nodeOrigin:a,nodeExtent:s,zIndexMode:c}=KF(GF,o),l=e.parentId,h=t.get(l);if(!h){console.warn(`Parent node ${l} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);return}rRe(e,n),r&&!h.parentId&&h.internals.rootParentIndex===void 0&&c==="auto"&&(h.internals.rootParentIndex=++r.i,h.internals.z=h.internals.z+r.i*eRe),r&&h.internals.rootParentIndex!==void 0&&(r.i=h.internals.rootParentIndex);const u=i&&!XF(c)?GQ:0,{x:p,y,z:g}=iRe(e,h,a,s,u,c),{positionAbsolute:k}=e.internals,x=p!==k.x||y!==k.y;(x||g!==e.internals.z)&&t.set(e.id,{...e,internals:{...e.internals,positionAbsolute:x?{x:p,y}:k,z:g}})}function KQ(e,t,n){const o=Yo(e.zIndex)?e.zIndex:0;return XF(n)?o:o+(e.selected?t:0)}function iRe(e,t,n,o,r,i){const{x:a,y:s}=t.internals.positionAbsolute,c=Oi(e),l=Lf(e,n),h=j0(e.extent)?Hd(l,e.extent,c):l;let u=Hd({x:a+h.x,y:s+h.y},o,c);e.extent==="parent"&&(u=RQ(u,c,t));const p=KQ(e,r,i),y=t.internals.z??0;return{x:u.x,y:u.y,z:y>=p?y+1:p}}function YF(e,t,n,o=[0,0]){var a;const r=[],i=new Map;for(const s of e){const c=t.get(s.parentId);if(!c)continue;const l=((a=i.get(s.parentId))==null?void 0:a.expandedRect)??E0(c),h=DQ(l,s.rect);i.set(s.parentId,{expandedRect:h,parent:c})}return i.size>0&&i.forEach(({expandedRect:s,parent:c},l)=>{var w;const h=c.internals.positionAbsolute,u=Oi(c),p=c.origin??o,y=s.x<h.x?Math.round(Math.abs(h.x-s.x)):0,g=s.y<h.y?Math.round(Math.abs(h.y-s.y)):0,k=Math.max(u.width,Math.round(s.width)),x=Math.max(u.height,Math.round(s.height)),v=(k-u.width)*p[0],M=(x-u.height)*p[1];(y>0||g>0||v||M)&&(r.push({id:l,type:"position",position:{x:c.position.x-y+v,y:c.position.y-g+M}}),(w=n.get(l))==null||w.forEach(b=>{e.some(C=>C.id===b.id)||r.push({id:b.id,type:"position",position:{x:b.position.x+y,y:b.position.y+g}})})),(u.width<s.width||u.height<s.height||y||g)&&r.push({id:l,type:"dimensions",setAttributes:!0,dimensions:{width:k+(y?p[0]*y-v:0),height:x+(g?p[1]*g-M:0)}})}),r}function aRe(e,t,n,o,r,i,a){const s=o==null?void 0:o.querySelector(".xyflow__viewport");let c=!1;if(!s)return{changes:[],updatedInternals:c};const l=[],h=window.getComputedStyle(s),{m22:u}=new window.DOMMatrixReadOnly(h.transform),p=[];for(const y of e.values()){const g=t.get(y.id);if(!g)continue;if(g.hidden){t.set(g.id,{...g,internals:{...g.internals,handleBounds:void 0}}),c=!0;continue}const k=WF(y.nodeElement),x=g.measured.width!==k.width||g.measured.height!==k.height;if(!!(k.width&&k.height&&(x||!g.internals.handleBounds||y.force))){const M=y.nodeElement.getBoundingClientRect(),w=j0(g.extent)?g.extent:i;let{positionAbsolute:b}=g.internals;g.parentId&&g.extent==="parent"?b=RQ(b,k,t.get(g.parentId)):w&&(b=Hd(b,w,k));const C={...g,measured:k,internals:{...g.internals,positionAbsolute:b,handleBounds:{source:xU("source",y.nodeElement,M,u,g.id),target:xU("target",y.nodeElement,M,u,g.id)}}};t.set(g.id,C),g.parentId&&ZF(C,t,n,{nodeOrigin:r,zIndexMode:a}),c=!0,x&&(l.push({id:g.id,type:"dimensions",dimensions:k}),g.expandParent&&g.parentId&&p.push({id:g.id,parentId:g.parentId,rect:E0(C,r)}))}}if(p.length>0){const y=YF(p,t,n,r);l.push(...y)}return{changes:l,updatedInternals:c}}async function sRe({delta:e,panZoom:t,transform:n,translateExtent:o,width:r,height:i}){if(!t||!e.x&&!e.y)return Promise.resolve(!1);const a=await t.setViewportConstrained({x:n[0]+e.x,y:n[1]+e.y,zoom:n[2]},[[0,0],[r,i]],o),s=!!a&&(a.x!==n[0]||a.y!==n[1]||a.k!==n[2]);return Promise.resolve(s)}function LU(e,t,n,o,r,i){let a=r;const s=o.get(a)||new Map;o.set(a,s.set(n,t)),a=`${r}-${e}`;const c=o.get(a)||new Map;if(o.set(a,c.set(n,t)),i){a=`${r}-${e}-${i}`;const l=o.get(a)||new Map;o.set(a,l.set(n,t))}}function XQ(e,t,n){e.clear(),t.clear();for(const o of n){const{source:r,target:i,sourceHandle:a=null,targetHandle:s=null}=o,c={edgeId:o.id,source:r,target:i,sourceHandle:a,targetHandle:s},l=`${r}-${a}--${i}-${s}`,h=`${i}-${s}--${r}-${a}`;LU("source",c,h,e,r,a),LU("target",c,l,e,i,s),t.set(o.id,o)}}function ZQ(e,t){if(!e.parentId)return!1;const n=t.get(e.parentId);return n?n.selected?!0:ZQ(n,t):!1}function NU(e,t,n){var r;let o=e;do{if((r=o==null?void 0:o.matches)!=null&&r.call(o,t))return!0;if(o===n)return!1;o=o==null?void 0:o.parentElement}while(o);return!1}function cRe(e,t,n,o){const r=new Map;for(const[i,a]of e)if((a.selected||a.id===o)&&(!a.parentId||!ZQ(a,e))&&(a.draggable||t&&typeof a.draggable>"u")){const s=e.get(i);s&&r.set(i,{id:i,position:s.position||{x:0,y:0},distance:{x:n.x-s.internals.positionAbsolute.x,y:n.y-s.internals.positionAbsolute.y},extent:s.extent,parentId:s.parentId,origin:s.origin,expandParent:s.expandParent,internals:{positionAbsolute:s.internals.positionAbsolute||{x:0,y:0}},measured:{width:s.measured.width??0,height:s.measured.height??0}})}return r}function TT({nodeId:e,dragItems:t,nodeLookup:n,dragging:o=!0}){var a,s,c;const r=[];for(const[l,h]of t){const u=(a=n.get(l))==null?void 0:a.internals.userNode;u&&r.push({...u,position:h.position,dragging:o})}if(!e)return[r[0],r];const i=(s=n.get(e))==null?void 0:s.internals.userNode;return[i?{...i,position:((c=t.get(e))==null?void 0:c.position)||i.position,dragging:o}:r[0],r]}function lRe({dragItems:e,snapGrid:t,x:n,y:o}){const r=e.values().next().value;if(!r)return null;const i={x:n-r.distance.x,y:o-r.distance.y},a=If(i,t);return{x:a.x-i.x,y:a.y-i.y}}function dRe({onNodeMouseDown:e,getStoreItems:t,onDragStart:n,onDrag:o,onDragStop:r}){let i={x:null,y:null},a=0,s=new Map,c=!1,l={x:0,y:0},h=null,u=!1,p=null,y=!1,g=!1,k=null;function x({noDragClassName:M,handleSelector:w,domNode:b,isSelectable:C,nodeId:_,nodeClickDistance:S=0}){p=ao(b);function N({x:z,y:U}){const{nodeLookup:$,nodeExtent:T,snapGrid:D,snapToGrid:O,nodeOrigin:I,onNodeDrag:R,onSelectionDrag:L,onError:V,updateNodePositions:H}=t();i={x:z,y:U};let j=!1;const X=s.size>1,Z=X&&T?HH(Nf(s)):null,J=X&&O?lRe({dragItems:s,snapGrid:D,x:z,y:U}):null;for(const[re,oe]of s){if(!$.has(re))continue;let ne={x:z-oe.distance.x,y:U-oe.distance.y};O&&(ne=J?{x:Math.round(ne.x+J.x),y:Math.round(ne.y+J.y)}:If(ne,D));let le=null;if(X&&T&&!oe.extent&&Z){const{positionAbsolute:xe}=oe.internals,Te=xe.x-Z.x+T[0][0],Ye=xe.x+oe.measured.width-Z.x2+T[1][0],ue=xe.y-Z.y+T[0][1],Ie=xe.y+oe.measured.height-Z.y2+T[1][1];le=[[Te,ue],[Ye,Ie]]}const{position:ve,positionAbsolute:ge}=zQ({nodeId:re,nextPosition:ne,nodeLookup:$,nodeExtent:le||T,nodeOrigin:I,onError:V});j=j||oe.position.x!==ve.x||oe.position.y!==ve.y,oe.position=ve,oe.internals.positionAbsolute=ge}if(g=g||j,!!j&&(H(s,!0),k&&(o||R||!_&&L))){const[re,oe]=TT({nodeId:_,dragItems:s,nodeLookup:$});o==null||o(k,s,re,oe),R==null||R(k,re,oe),_||L==null||L(k,oe)}}async function P(){if(!h)return;const{transform:z,panBy:U,autoPanSpeed:$,autoPanOnNodeDrag:T}=t();if(!T){c=!1,cancelAnimationFrame(a);return}const[D,O]=TQ(l,h,$);(D!==0||O!==0)&&(i.x=(i.x??0)-D/z[2],i.y=(i.y??0)-O/z[2],await U({x:D,y:O})&&N(i)),a=requestAnimationFrame(P)}function A(z){var X;const{nodeLookup:U,multiSelectionActive:$,nodesDraggable:T,transform:D,snapGrid:O,snapToGrid:I,selectNodesOnDrag:R,onNodeDragStart:L,onSelectionDragStart:V,unselectNodesAndEdges:H}=t();u=!0,(!R||!C)&&!$&&_&&((X=U.get(_))!=null&&X.selected||H()),C&&R&&_&&(e==null||e(_));const j=Ih(z.sourceEvent,{transform:D,snapGrid:O,snapToGrid:I,containerBounds:h});if(i=j,s=cRe(U,T,j,_),s.size>0&&(n||L||!_&&V)){const[Z,J]=TT({nodeId:_,dragItems:s,nodeLookup:U});n==null||n(z.sourceEvent,s,Z,J),L==null||L(z.sourceEvent,Z,J),_||V==null||V(z.sourceEvent,J)}}const E=fQ().clickDistance(S).on("start",z=>{const{domNode:U,nodeDragThreshold:$,transform:T,snapGrid:D,snapToGrid:O}=t();h=(U==null?void 0:U.getBoundingClientRect())||null,y=!1,g=!1,k=z.sourceEvent,$===0&&A(z),i=Ih(z.sourceEvent,{transform:T,snapGrid:D,snapToGrid:O,containerBounds:h}),l=Qo(z.sourceEvent,h)}).on("drag",z=>{const{autoPanOnNodeDrag:U,transform:$,snapGrid:T,snapToGrid:D,nodeDragThreshold:O,nodeLookup:I}=t(),R=Ih(z.sourceEvent,{transform:$,snapGrid:T,snapToGrid:D,containerBounds:h});if(k=z.sourceEvent,(z.sourceEvent.type==="touchmove"&&z.sourceEvent.touches.length>1||_&&!I.has(_))&&(y=!0),!y){if(!c&&U&&u&&(c=!0,P()),!u){const L=Qo(z.sourceEvent,h),V=L.x-l.x,H=L.y-l.y;Math.sqrt(V*V+H*H)>O&&A(z)}(i.x!==R.xSnapped||i.y!==R.ySnapped)&&s&&u&&(l=Qo(z.sourceEvent,h),N(R))}}).on("end",z=>{if(!(!u||y)&&(c=!1,u=!1,cancelAnimationFrame(a),s.size>0)){const{nodeLookup:U,updateNodePositions:$,onNodeDragStop:T,onSelectionDragStop:D}=t();if(g&&($(s,!1),g=!1),r||T||!_&&D){const[O,I]=TT({nodeId:_,dragItems:s,nodeLookup:U,dragging:!1});r==null||r(z.sourceEvent,s,O,I),T==null||T(z.sourceEvent,O,I),_||D==null||D(z.sourceEvent,I)}}}).filter(z=>{const U=z.target;return!z.button&&(!M||!NU(U,`.${M}`,b))&&(!w||NU(U,w,b))});p.call(E)}function v(){p==null||p.on(".drag",null)}return{update:x,destroy:v}}function uRe(e,t,n){const o=[],r={x:e.x-n,y:e.y-n,width:n*2,height:n*2};for(const i of t.values())af(r,E0(i))>0&&o.push(i);return o}const hRe=250;function fRe(e,t,n,o){var s,c;let r=[],i=1/0;const a=uRe(e,n,t+hRe);for(const l of a){const h=[...((s=l.internals.handleBounds)==null?void 0:s.source)??[],...((c=l.internals.handleBounds)==null?void 0:c.target)??[]];for(const u of h){if(o.nodeId===u.nodeId&&o.type===u.type&&o.id===u.id)continue;const{x:p,y}=Od(l,u,u.position,!0),g=Math.sqrt(Math.pow(p-e.x,2)+Math.pow(y-e.y,2));g>t||(g<i?(r=[{...u,x:p,y}],i=g):g===i&&r.push({...u,x:p,y}))}}if(!r.length)return null;if(r.length>1){const l=o.type==="source"?"target":"source";return r.find(h=>h.type===l)??r[0]}return r[0]}function YQ(e,t,n,o,r,i=!1){var l,h,u;const a=o.get(e);if(!a)return null;const s=r==="strict"?(l=a.internals.handleBounds)==null?void 0:l[t]:[...((h=a.internals.handleBounds)==null?void 0:h.source)??[],...((u=a.internals.handleBounds)==null?void 0:u.target)??[]],c=(n?s==null?void 0:s.find(p=>p.id===n):s==null?void 0:s[0])??null;return c&&i?{...c,...Od(a,c,c.position,!0)}:c}function QQ(e,t){return e||(t!=null&&t.classList.contains("target")?"target":t!=null&&t.classList.contains("source")?"source":null)}function pRe(e,t){let n=null;return t?n=!0:e&&!t&&(n=!1),n}const JQ=()=>!0;function yRe(e,{connectionMode:t,connectionRadius:n,handleId:o,nodeId:r,edgeUpdaterType:i,isTarget:a,domNode:s,nodeLookup:c,lib:l,autoPanOnConnect:h,flowId:u,panBy:p,cancelConnection:y,onConnectStart:g,onConnect:k,onConnectEnd:x,isValidConnection:v=JQ,onReconnectEnd:M,updateConnection:w,getTransform:b,getFromHandle:C,autoPanSpeed:_,dragThreshold:S=1,handleDomNode:N}){const P=FQ(e.target);let A=0,E;const{x:z,y:U}=Qo(e),$=QQ(i,N),T=s==null?void 0:s.getBoundingClientRect();let D=!1;if(!T||!$)return;const O=YQ(r,$,o,c,t);if(!O)return;let I=Qo(e,T),R=!1,L=null,V=!1,H=null;function j(){if(!h||!T)return;const[ve,ge]=TQ(I,T,_);p({x:ve,y:ge}),A=requestAnimationFrame(j)}const X={...O,nodeId:r,type:$,position:O.position},Z=c.get(r);let re={inProgress:!0,isValid:null,from:Od(Z,X,fe.Left,!0),fromHandle:X,fromPosition:X.position,fromNode:Z,to:I,toHandle:null,toPosition:mU[X.position],toNode:null,pointer:I};function oe(){D=!0,w(re),g==null||g(e,{nodeId:r,handleId:o,handleType:$})}S===0&&oe();function ne(ve){if(!D){const{x:Ie,y:Pt}=Qo(ve),wt=Ie-z,en=Pt-U;if(!(wt*wt+en*en>S*S))return;oe()}if(!C()||!X){le(ve);return}const ge=b();I=Qo(ve,T),E=fRe(Af(I,ge,!1,[1,1]),n,c,X),R||(j(),R=!0);const xe=eJ(ve,{handle:E,connectionMode:t,fromNodeId:r,fromHandleId:o,fromType:a?"target":"source",isValidConnection:v,doc:P,lib:l,flowId:u,nodeLookup:c});H=xe.handleDomNode,L=xe.connection,V=pRe(!!E,xe.isValid);const Te=c.get(r),Ye=Te?Od(Te,X,fe.Left,!0):re.from,ue={...re,from:Ye,isValid:V,to:xe.toHandle&&V?JP({x:xe.toHandle.x,y:xe.toHandle.y},ge):I,toHandle:xe.toHandle,toPosition:V&&xe.toHandle?xe.toHandle.position:mU[X.position],toNode:xe.toHandle?c.get(xe.toHandle.nodeId):null,pointer:I};w(ue),re=ue}function le(ve){if(!("touches"in ve&&ve.touches.length>0)){if(D){(E||H)&&L&&V&&(k==null||k(L));const{inProgress:ge,...xe}=re,Te={...xe,toPosition:re.toHandle?re.toPosition:null};x==null||x(ve,Te),i&&(M==null||M(ve,Te))}y(),cancelAnimationFrame(A),R=!1,V=!1,L=null,H=null,P.removeEventListener("mousemove",ne),P.removeEventListener("mouseup",le),P.removeEventListener("touchmove",ne),P.removeEventListener("touchend",le)}}P.addEventListener("mousemove",ne),P.addEventListener("mouseup",le),P.addEventListener("touchmove",ne),P.addEventListener("touchend",le)}function eJ(e,{handle:t,connectionMode:n,fromNodeId:o,fromHandleId:r,fromType:i,doc:a,lib:s,flowId:c,isValidConnection:l=JQ,nodeLookup:h}){const u=i==="target",p=t?a.querySelector(`.${s}-flow__handle[data-id="${c}-${t==null?void 0:t.nodeId}-${t==null?void 0:t.id}-${t==null?void 0:t.type}"]`):null,{x:y,y:g}=Qo(e),k=a.elementFromPoint(y,g),x=k!=null&&k.classList.contains(`${s}-flow__handle`)?k:p,v={handleDomNode:x,isValid:!1,connection:null,toHandle:null};if(x){const M=QQ(void 0,x),w=x.getAttribute("data-nodeid"),b=x.getAttribute("data-handleid"),C=x.classList.contains("connectable"),_=x.classList.contains("connectableend");if(!w||!M)return v;const S={source:u?w:o,sourceHandle:u?b:r,target:u?o:w,targetHandle:u?r:b};v.connection=S;const P=C&&_&&(n===N0.Strict?u&&M==="source"||!u&&M==="target":w!==o||b!==r);v.isValid=P&&l(S),v.toHandle=YQ(w,M,b,h,n,!0)}return v}const qH={onPointerDown:yRe,isValid:eJ};function mRe({domNode:e,panZoom:t,getTransform:n,getViewScale:o}){const r=ao(e);function i({translateExtent:s,width:c,height:l,zoomStep:h=1,pannable:u=!0,zoomable:p=!0,inversePan:y=!1}){const g=w=>{if(w.sourceEvent.type!=="wheel"||!t)return;const b=n(),C=w.sourceEvent.ctrlKey&&sf()?10:1,_=-w.sourceEvent.deltaY*(w.sourceEvent.deltaMode===1?.05:w.sourceEvent.deltaMode?1:.002)*h,S=b[2]*Math.pow(2,_*C);t.scaleTo(S)};let k=[0,0];const x=w=>{(w.sourceEvent.type==="mousedown"||w.sourceEvent.type==="touchstart")&&(k=[w.sourceEvent.clientX??w.sourceEvent.touches[0].clientX,w.sourceEvent.clientY??w.sourceEvent.touches[0].clientY])},v=w=>{const b=n();if(w.sourceEvent.type!=="mousemove"&&w.sourceEvent.type!=="touchmove"||!t)return;const C=[w.sourceEvent.clientX??w.sourceEvent.touches[0].clientX,w.sourceEvent.clientY??w.sourceEvent.touches[0].clientY],_=[C[0]-k[0],C[1]-k[1]];k=C;const S=o()*Math.max(b[2],Math.log(b[2]))*(y?-1:1),N={x:b[0]-_[0]*S,y:b[1]-_[1]*S},P=[[0,0],[c,l]];t.setViewportConstrained({x:N.x,y:N.y,zoom:b[2]},P,s)},M=IQ().on("start",x).on("zoom",u?v:null).on("zoom.wheel",p?g:null);r.call(M,{})}function a(){r.on("zoom",null)}return{update:i,destroy:a,pointer:Go}}const aR=e=>({x:e.x,y:e.y,zoom:e.k}),DT=({x:e,y:t,zoom:n})=>nR.translate(e,t).scale(n),Zu=(e,t)=>e.target.closest(`.${t}`),tJ=(e,t)=>t===2&&Array.isArray(e)&&e.includes(2),gRe=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2,HT=(e,t=0,n=gRe,o=()=>{})=>{const r=typeof t=="number"&&t>0;return r||o(),r?e.transition().duration(t).ease(n).on("end",o):e},nJ=e=>{const t=e.ctrlKey&&sf()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*t};function kRe({zoomPanValues:e,noWheelClassName:t,d3Selection:n,d3Zoom:o,panOnScrollMode:r,panOnScrollSpeed:i,zoomOnPinch:a,onPanZoomStart:s,onPanZoom:c,onPanZoomEnd:l}){return h=>{if(Zu(h,t))return h.ctrlKey&&h.preventDefault(),!1;h.preventDefault(),h.stopImmediatePropagation();const u=n.property("__zoom").k||1;if(h.ctrlKey&&a){const x=Go(h),v=nJ(h),M=u*Math.pow(2,v);o.scaleTo(n,M,x,h);return}const p=h.deltaMode===1?20:1;let y=r===Ed.Vertical?0:h.deltaX*p,g=r===Ed.Horizontal?0:h.deltaY*p;!sf()&&h.shiftKey&&r!==Ed.Vertical&&(y=h.deltaY*p,g=0),o.translateBy(n,-(y/u)*i,-(g/u)*i,{internal:!0});const k=aR(n.property("__zoom"));clearTimeout(e.panScrollTimeout),e.isPanScrolling?(c==null||c(h,k),e.panScrollTimeout=setTimeout(()=>{l==null||l(h,k),e.isPanScrolling=!1},150)):(e.isPanScrolling=!0,s==null||s(h,k))}}function vRe({noWheelClassName:e,preventScrolling:t,d3ZoomHandler:n}){return function(o,r){const i=o.type==="wheel",a=!t&&i&&!o.ctrlKey,s=Zu(o,e);if(o.ctrlKey&&i&&s&&o.preventDefault(),a||s)return null;o.preventDefault(),n.call(this,o,r)}}function xRe({zoomPanValues:e,onDraggingChange:t,onPanZoomStart:n}){return o=>{var i,a,s;if((i=o.sourceEvent)!=null&&i.internal)return;const r=aR(o.transform);e.mouseButton=((a=o.sourceEvent)==null?void 0:a.button)||0,e.isZoomingOrPanning=!0,e.prevViewport=r,((s=o.sourceEvent)==null?void 0:s.type)==="mousedown"&&t(!0),n&&(n==null||n(o.sourceEvent,r))}}function wRe({zoomPanValues:e,panOnDrag:t,onPaneContextMenu:n,onTransformChange:o,onPanZoom:r}){return i=>{var a,s;e.usedRightMouseButton=!!(n&&tJ(t,e.mouseButton??0)),(a=i.sourceEvent)!=null&&a.sync||o([i.transform.x,i.transform.y,i.transform.k]),r&&!((s=i.sourceEvent)!=null&&s.internal)&&(r==null||r(i.sourceEvent,aR(i.transform)))}}function MRe({zoomPanValues:e,panOnDrag:t,panOnScroll:n,onDraggingChange:o,onPanZoomEnd:r,onPaneContextMenu:i}){return a=>{var s;if(!((s=a.sourceEvent)!=null&&s.internal)&&(e.isZoomingOrPanning=!1,i&&tJ(t,e.mouseButton??0)&&!e.usedRightMouseButton&&a.sourceEvent&&i(a.sourceEvent),e.usedRightMouseButton=!1,o(!1),r)){const c=aR(a.transform);e.prevViewport=c,clearTimeout(e.timerId),e.timerId=setTimeout(()=>{r==null||r(a.sourceEvent,c)},n?150:0)}}}function bRe({zoomActivationKeyPressed:e,zoomOnScroll:t,zoomOnPinch:n,panOnDrag:o,panOnScroll:r,zoomOnDoubleClick:i,userSelectionActive:a,noWheelClassName:s,noPanClassName:c,lib:l,connectionInProgress:h}){return u=>{var x;const p=e||t,y=n&&u.ctrlKey,g=u.type==="wheel";if(u.button===1&&u.type==="mousedown"&&(Zu(u,`${l}-flow__node`)||Zu(u,`${l}-flow__edge`)))return!0;if(!o&&!p&&!r&&!i&&!n||a||h&&!g||Zu(u,s)&&g||Zu(u,c)&&(!g||r&&g&&!e)||!n&&u.ctrlKey&&g)return!1;if(!n&&u.type==="touchstart"&&((x=u.touches)==null?void 0:x.length)>1)return u.preventDefault(),!1;if(!p&&!r&&!y&&g||!o&&(u.type==="mousedown"||u.type==="touchstart")||Array.isArray(o)&&!o.includes(u.button)&&u.type==="mousedown")return!1;const k=Array.isArray(o)&&o.includes(u.button)||!u.button||u.button<=1;return(!u.ctrlKey||g)&&k}}function _Re({domNode:e,minZoom:t,maxZoom:n,translateExtent:o,viewport:r,onPanZoom:i,onPanZoomStart:a,onPanZoomEnd:s,onDraggingChange:c}){const l={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},h=e.getBoundingClientRect(),u=IQ().scaleExtent([t,n]).translateExtent(o),p=ao(e).call(u);M({x:r.x,y:r.y,zoom:A0(r.zoom,t,n)},[[0,0],[h.width,h.height]],o);const y=p.on("wheel.zoom"),g=p.on("dblclick.zoom");u.wheelDelta(nJ);function k(E,z){return p?new Promise(U=>{u==null||u.interpolate((z==null?void 0:z.interpolate)==="linear"?Nh:aP).transform(HT(p,z==null?void 0:z.duration,z==null?void 0:z.ease,()=>U(!0)),E)}):Promise.resolve(!1)}function x({noWheelClassName:E,noPanClassName:z,onPaneContextMenu:U,userSelectionActive:$,panOnScroll:T,panOnDrag:D,panOnScrollMode:O,panOnScrollSpeed:I,preventScrolling:R,zoomOnPinch:L,zoomOnScroll:V,zoomOnDoubleClick:H,zoomActivationKeyPressed:j,lib:X,onTransformChange:Z,connectionInProgress:J,paneClickDistance:re,selectionOnDrag:oe}){$&&!l.isZoomingOrPanning&&v();const ne=T&&!j&&!$;u.clickDistance(oe?1/0:!Yo(re)||re<0?0:re);const le=ne?kRe({zoomPanValues:l,noWheelClassName:E,d3Selection:p,d3Zoom:u,panOnScrollMode:O,panOnScrollSpeed:I,zoomOnPinch:L,onPanZoomStart:a,onPanZoom:i,onPanZoomEnd:s}):vRe({noWheelClassName:E,preventScrolling:R,d3ZoomHandler:y});if(p.on("wheel.zoom",le,{passive:!1}),!$){const ge=xRe({zoomPanValues:l,onDraggingChange:c,onPanZoomStart:a});u.on("start",ge);const xe=wRe({zoomPanValues:l,panOnDrag:D,onPaneContextMenu:!!U,onPanZoom:i,onTransformChange:Z});u.on("zoom",xe);const Te=MRe({zoomPanValues:l,panOnDrag:D,panOnScroll:T,onPaneContextMenu:U,onPanZoomEnd:s,onDraggingChange:c});u.on("end",Te)}const ve=bRe({zoomActivationKeyPressed:j,panOnDrag:D,zoomOnScroll:V,panOnScroll:T,zoomOnDoubleClick:H,zoomOnPinch:L,userSelectionActive:$,noPanClassName:z,noWheelClassName:E,lib:X,connectionInProgress:J});u.filter(ve),H?p.on("dblclick.zoom",g):p.on("dblclick.zoom",null)}function v(){u.on("zoom",null)}async function M(E,z,U){const $=DT(E),T=u==null?void 0:u.constrain()($,z,U);return T&&await k(T),new Promise(D=>D(T))}async function w(E,z){const U=DT(E);return await k(U,z),new Promise($=>$(U))}function b(E){if(p){const z=DT(E),U=p.property("__zoom");(U.k!==E.zoom||U.x!==E.x||U.y!==E.y)&&(u==null||u.transform(p,z,null,{sync:!0}))}}function C(){const E=p?NQ(p.node()):{x:0,y:0,k:1};return{x:E.x,y:E.y,zoom:E.k}}function _(E,z){return p?new Promise(U=>{u==null||u.interpolate((z==null?void 0:z.interpolate)==="linear"?Nh:aP).scaleTo(HT(p,z==null?void 0:z.duration,z==null?void 0:z.ease,()=>U(!0)),E)}):Promise.resolve(!1)}function S(E,z){return p?new Promise(U=>{u==null||u.interpolate((z==null?void 0:z.interpolate)==="linear"?Nh:aP).scaleBy(HT(p,z==null?void 0:z.duration,z==null?void 0:z.ease,()=>U(!0)),E)}):Promise.resolve(!1)}function N(E){u==null||u.scaleExtent(E)}function P(E){u==null||u.translateExtent(E)}function A(E){const z=!Yo(E)||E<0?0:E;u==null||u.clickDistance(z)}return{update:x,destroy:v,setViewport:w,setViewportConstrained:M,getViewport:C,scaleTo:_,scaleBy:S,setScaleExtent:N,setTranslateExtent:P,syncViewport:b,setClickDistance:A}}var Oa;(function(e){e.Line="line",e.Handle="handle"})(Oa||(Oa={}));function CRe({width:e,prevWidth:t,height:n,prevHeight:o,affectsX:r,affectsY:i}){const a=e-t,s=n-o,c=[a>0?1:a<0?-1:0,s>0?1:s<0?-1:0];return a&&r&&(c[0]=c[0]*-1),s&&i&&(c[1]=c[1]*-1),c}function IU(e){const t=e.includes("right")||e.includes("left"),n=e.includes("bottom")||e.includes("top"),o=e.includes("left"),r=e.includes("top");return{isHorizontal:t,isVertical:n,affectsX:o,affectsY:r}}function ra(e,t){return Math.max(0,t-e)}function ia(e,t){return Math.max(0,e-t)}function Sp(e,t,n){return Math.max(0,t-e,e-n)}function AU(e,t){return e?!t:t}function SRe(e,t,n,o,r,i,a,s){let{affectsX:c,affectsY:l}=t;const{isHorizontal:h,isVertical:u}=t,p=h&&u,{xSnapped:y,ySnapped:g}=n,{minWidth:k,maxWidth:x,minHeight:v,maxHeight:M}=o,{x:w,y:b,width:C,height:_,aspectRatio:S}=e;let N=Math.floor(h?y-e.pointerX:0),P=Math.floor(u?g-e.pointerY:0);const A=C+(c?-N:N),E=_+(l?-P:P),z=-i[0]*C,U=-i[1]*_;let $=Sp(A,k,x),T=Sp(E,v,M);if(a){let I=0,R=0;c&&N<0?I=ra(w+N+z,a[0][0]):!c&&N>0&&(I=ia(w+A+z,a[1][0])),l&&P<0?R=ra(b+P+U,a[0][1]):!l&&P>0&&(R=ia(b+E+U,a[1][1])),$=Math.max($,I),T=Math.max(T,R)}if(s){let I=0,R=0;c&&N>0?I=ia(w+N,s[0][0]):!c&&N<0&&(I=ra(w+A,s[1][0])),l&&P>0?R=ia(b+P,s[0][1]):!l&&P<0&&(R=ra(b+E,s[1][1])),$=Math.max($,I),T=Math.max(T,R)}if(r){if(h){const I=Sp(A/S,v,M)*S;if($=Math.max($,I),a){let R=0;!c&&!l||c&&!l&&p?R=ia(b+U+A/S,a[1][1])*S:R=ra(b+U+(c?N:-N)/S,a[0][1])*S,$=Math.max($,R)}if(s){let R=0;!c&&!l||c&&!l&&p?R=ra(b+A/S,s[1][1])*S:R=ia(b+(c?N:-N)/S,s[0][1])*S,$=Math.max($,R)}}if(u){const I=Sp(E*S,k,x)/S;if(T=Math.max(T,I),a){let R=0;!c&&!l||l&&!c&&p?R=ia(w+E*S+z,a[1][0])/S:R=ra(w+(l?P:-P)*S+z,a[0][0])/S,T=Math.max(T,R)}if(s){let R=0;!c&&!l||l&&!c&&p?R=ra(w+E*S,s[1][0])/S:R=ia(w+(l?P:-P)*S,s[0][0])/S,T=Math.max(T,R)}}}P=P+(P<0?T:-T),N=N+(N<0?$:-$),r&&(p?A>E*S?P=(AU(c,l)?-N:N)/S:N=(AU(c,l)?-P:P)*S:h?(P=N/S,l=c):(N=P*S,c=l));const D=c?w+N:w,O=l?b+P:b;return{width:C+(c?-N:N),height:_+(l?-P:P),x:i[0]*N*(c?-1:1)+D,y:i[1]*P*(l?-1:1)+O}}const oJ={width:0,height:0,x:0,y:0},LRe={...oJ,pointerX:0,pointerY:0,aspectRatio:1};function NRe(e){return[[0,0],[e.measured.width,e.measured.height]]}function IRe(e,t,n){const o=t.position.x+e.position.x,r=t.position.y+e.position.y,i=e.measured.width??0,a=e.measured.height??0,s=n[0]*i,c=n[1]*a;return[[o-s,r-c],[o+i-s,r+a-c]]}function ARe({domNode:e,nodeId:t,getStoreItems:n,onChange:o,onEnd:r}){const i=ao(e);let a={controlDirection:IU("bottom-right"),boundaries:{minWidth:0,minHeight:0,maxWidth:Number.MAX_VALUE,maxHeight:Number.MAX_VALUE},resizeDirection:void 0,keepAspectRatio:!1};function s({controlPosition:l,boundaries:h,keepAspectRatio:u,resizeDirection:p,onResizeStart:y,onResize:g,onResizeEnd:k,shouldResize:x}){let v={...oJ},M={...LRe};a={boundaries:h,resizeDirection:p,keepAspectRatio:u,controlDirection:IU(l)};let w,b=null,C=[],_,S,N,P=!1;const A=fQ().on("start",E=>{const{nodeLookup:z,transform:U,snapGrid:$,snapToGrid:T,nodeOrigin:D,paneDomNode:O}=n();if(w=z.get(t),!w)return;b=(O==null?void 0:O.getBoundingClientRect())??null;const{xSnapped:I,ySnapped:R}=Ih(E.sourceEvent,{transform:U,snapGrid:$,snapToGrid:T,containerBounds:b});v={width:w.measured.width??0,height:w.measured.height??0,x:w.position.x??0,y:w.position.y??0},M={...v,pointerX:I,pointerY:R,aspectRatio:v.width/v.height},_=void 0,w.parentId&&(w.extent==="parent"||w.expandParent)&&(_=z.get(w.parentId),S=_&&w.extent==="parent"?NRe(_):void 0),C=[],N=void 0;for(const[L,V]of z)if(V.parentId===t&&(C.push({id:L,position:{...V.position},extent:V.extent}),V.extent==="parent"||V.expandParent)){const H=IRe(V,w,V.origin??D);N?N=[[Math.min(H[0][0],N[0][0]),Math.min(H[0][1],N[0][1])],[Math.max(H[1][0],N[1][0]),Math.max(H[1][1],N[1][1])]]:N=H}y==null||y(E,{...v})}).on("drag",E=>{const{transform:z,snapGrid:U,snapToGrid:$,nodeOrigin:T}=n(),D=Ih(E.sourceEvent,{transform:z,snapGrid:U,snapToGrid:$,containerBounds:b}),O=[];if(!w)return;const{x:I,y:R,width:L,height:V}=v,H={},j=w.origin??T,{width:X,height:Z,x:J,y:re}=SRe(M,a.controlDirection,D,a.boundaries,a.keepAspectRatio,j,S,N),oe=X!==L,ne=Z!==V,le=J!==I&&oe,ve=re!==R&&ne;if(!le&&!ve&&!oe&&!ne)return;if((le||ve||j[0]===1||j[1]===1)&&(H.x=le?J:v.x,H.y=ve?re:v.y,v.x=H.x,v.y=H.y,C.length>0)){const Ye=J-I,ue=re-R;for(const Ie of C)Ie.position={x:Ie.position.x-Ye+j[0]*(X-L),y:Ie.position.y-ue+j[1]*(Z-V)},O.push(Ie)}if((oe||ne)&&(H.width=oe&&(!a.resizeDirection||a.resizeDirection==="horizontal")?X:v.width,H.height=ne&&(!a.resizeDirection||a.resizeDirection==="vertical")?Z:v.height,v.width=H.width,v.height=H.height),_&&w.expandParent){const Ye=j[0]*(H.width??0);H.x&&H.x<Ye&&(v.x=Ye,M.x=M.x-(H.x-Ye));const ue=j[1]*(H.height??0);H.y&&H.y<ue&&(v.y=ue,M.y=M.y-(H.y-ue))}const ge=CRe({width:v.width,prevWidth:L,height:v.height,prevHeight:V,affectsX:a.controlDirection.affectsX,affectsY:a.controlDirection.affectsY}),xe={...v,direction:ge};(x==null?void 0:x(E,xe))!==!1&&(P=!0,g==null||g(E,xe),o(H,O))}).on("end",E=>{P&&(k==null||k(E,{...v}),r==null||r({...v}),P=!1)});i.call(A)}function c(){i.on(".drag",null)}return{update:s,destroy:c}}var rJ={exports:{}},iJ={},aJ={exports:{}},sJ={};/**
8447
8447
  * @license React
8448
8448
  * use-sync-external-store-shim.production.js
8449
8449
  *
@@ -8466,7 +8466,7 @@ Error generating stack: `+i.message+`
8466
8466
  +`).split(`
8467
8467
  `)),h=l.reduce((u,p)=>u.concat(...p),[]);return[l,h]}return[[],[]]},[e]);return m.useEffect(()=>{const c=(t==null?void 0:t.target)??TU,l=(t==null?void 0:t.actInsideInputWithModifier)??!0;if(e!==null){const h=y=>{var x,v;if(r.current=y.ctrlKey||y.metaKey||y.shiftKey||y.altKey,(!r.current||r.current&&!l)&&qQ(y))return!1;const k=HU(y.code,s);if(i.current.add(y[k]),DU(a,i.current,!1)){const M=((v=(x=y.composedPath)==null?void 0:x.call(y))==null?void 0:v[0])||y.target,w=(M==null?void 0:M.nodeName)==="BUTTON"||(M==null?void 0:M.nodeName)==="A";t.preventDefault!==!1&&(r.current||!w)&&y.preventDefault(),o(!0)}},u=y=>{const g=HU(y.code,s);DU(a,i.current,!0)?(o(!1),i.current.clear()):i.current.delete(y[g]),y.key==="Meta"&&i.current.clear(),r.current=!1},p=()=>{i.current.clear(),o(!1)};return c==null||c.addEventListener("keydown",h),c==null||c.addEventListener("keyup",u),window.addEventListener("blur",p),window.addEventListener("contextmenu",p),()=>{c==null||c.removeEventListener("keydown",h),c==null||c.removeEventListener("keyup",u),window.removeEventListener("blur",p),window.removeEventListener("contextmenu",p)}}},[e,o]),n}function DU(e,t,n){return e.filter(o=>n||o.length===t.size).some(o=>o.every(r=>t.has(r)))}function HU(e,t){return t.includes(e)?"code":"key"}const wTe=()=>{const e=xt();return m.useMemo(()=>({zoomIn:t=>{const{panZoom:n}=e.getState();return n?n.scaleBy(1.2,t):Promise.resolve(!1)},zoomOut:t=>{const{panZoom:n}=e.getState();return n?n.scaleBy(1/1.2,t):Promise.resolve(!1)},zoomTo:(t,n)=>{const{panZoom:o}=e.getState();return o?o.scaleTo(t,n):Promise.resolve(!1)},getZoom:()=>e.getState().transform[2],setViewport:async(t,n)=>{const{transform:[o,r,i],panZoom:a}=e.getState();return a?(await a.setViewport({x:t.x??o,y:t.y??r,zoom:t.zoom??i},n),Promise.resolve(!0)):Promise.resolve(!1)},getViewport:()=>{const[t,n,o]=e.getState().transform;return{x:t,y:n,zoom:o}},setCenter:async(t,n,o)=>e.getState().setCenter(t,n,o),fitBounds:async(t,n)=>{const{width:o,height:r,minZoom:i,maxZoom:a,panZoom:s}=e.getState(),c=UF(t,o,r,i,a,(n==null?void 0:n.padding)??.1);return s?(await s.setViewport(c,{duration:n==null?void 0:n.duration,ease:n==null?void 0:n.ease,interpolate:n==null?void 0:n.interpolate}),Promise.resolve(!0)):Promise.resolve(!1)},screenToFlowPosition:(t,n={})=>{const{transform:o,snapGrid:r,snapToGrid:i,domNode:a}=e.getState();if(!a)return t;const{x:s,y:c}=a.getBoundingClientRect(),l={x:t.x-s,y:t.y-c},h=n.snapGrid??r,u=n.snapToGrid??i;return Af(l,o,u,h)},flowToScreenPosition:t=>{const{transform:n,domNode:o}=e.getState();if(!o)return t;const{x:r,y:i}=o.getBoundingClientRect(),a=JP(t,n);return{x:a.x+r,y:a.y+i}}}),[])};function fJ(e,t){const n=[],o=new Map,r=[];for(const i of e)if(i.type==="add"){r.push(i);continue}else if(i.type==="remove"||i.type==="replace")o.set(i.id,[i]);else{const a=o.get(i.id);a?a.push(i):o.set(i.id,[i])}for(const i of t){const a=o.get(i.id);if(!a){n.push(i);continue}if(a[0].type==="remove")continue;if(a[0].type==="replace"){n.push({...a[0].item});continue}const s={...i};for(const c of a)MTe(c,s);n.push(s)}return r.length&&r.forEach(i=>{i.index!==void 0?n.splice(i.index,0,{...i.item}):n.push({...i.item})}),n}function MTe(e,t){switch(e.type){case"select":{t.selected=e.selected;break}case"position":{typeof e.position<"u"&&(t.position=e.position),typeof e.dragging<"u"&&(t.dragging=e.dragging);break}case"dimensions":{typeof e.dimensions<"u"&&(t.measured={...e.dimensions},e.setAttributes&&((e.setAttributes===!0||e.setAttributes==="width")&&(t.width=e.dimensions.width),(e.setAttributes===!0||e.setAttributes==="height")&&(t.height=e.dimensions.height))),typeof e.resizing=="boolean"&&(t.resizing=e.resizing);break}}}function pJ(e,t){return fJ(e,t)}function yJ(e,t){return fJ(e,t)}function vd(e,t){return{id:e,type:"select",selected:t}}function Yu(e,t=new Set,n=!1){const o=[];for(const[r,i]of e){const a=t.has(r);!(i.selected===void 0&&!a)&&i.selected!==a&&(n&&(i.selected=a),o.push(vd(i.id,a)))}return o}function OU({items:e=[],lookup:t}){var r;const n=[],o=new Map(e.map(i=>[i.id,i]));for(const[i,a]of e.entries()){const s=t.get(a.id),c=((r=s==null?void 0:s.internals)==null?void 0:r.userNode)??s;c!==void 0&&c!==a&&n.push({id:a.id,item:a,type:"replace"}),c===void 0&&n.push({item:a,type:"add",index:i})}for(const[i]of t)o.get(i)===void 0&&n.push({id:i,type:"remove"});return n}function FU(e){return{id:e.id,type:"remove"}}const qU=e=>jze(e),bTe=e=>PQ(e);function mJ(e){return m.forwardRef(e)}function VU(e){const[t,n]=m.useState(BigInt(0)),[o]=m.useState(()=>_Te(()=>n(r=>r+BigInt(1))));return VH(()=>{const r=o.get();r.length&&(e(r),o.reset())},[t]),o}function _Te(e){let t=[];return{get:()=>t,reset:()=>{t=[]},push:n=>{t.push(n),e()}}}const gJ=m.createContext(null);function CTe({children:e}){const t=xt(),n=m.useCallback(s=>{const{nodes:c=[],setNodes:l,hasDefaultNodes:h,onNodesChange:u,nodeLookup:p,fitViewQueued:y,onNodesChangeMiddlewareMap:g}=t.getState();let k=c;for(const v of s)k=typeof v=="function"?v(k):v;let x=OU({items:k,lookup:p});for(const v of g.values())x=v(x);h&&l(k),x.length>0?u==null||u(x):y&&window.requestAnimationFrame(()=>{const{fitViewQueued:v,nodes:M,setNodes:w}=t.getState();v&&w(M)})},[]),o=VU(n),r=m.useCallback(s=>{const{edges:c=[],setEdges:l,hasDefaultEdges:h,onEdgesChange:u,edgeLookup:p}=t.getState();let y=c;for(const g of s)y=typeof g=="function"?g(y):g;h?l(y):u&&u(OU({items:y,lookup:p}))},[]),i=VU(r),a=m.useMemo(()=>({nodeQueue:o,edgeQueue:i}),[]);return f.jsx(gJ.Provider,{value:a,children:e})}function STe(){const e=m.useContext(gJ);if(!e)throw new Error("useBatchContext must be used within a BatchProvider");return e}const LTe=e=>!!e.panZoom;function lR(){const e=wTe(),t=xt(),n=STe(),o=De(LTe),r=m.useMemo(()=>{const i=u=>t.getState().nodeLookup.get(u),a=u=>{n.nodeQueue.push(u)},s=u=>{n.edgeQueue.push(u)},c=u=>{var v,M;const{nodeLookup:p,nodeOrigin:y}=t.getState(),g=qU(u)?u:p.get(u.id),k=g.parentId?OQ(g.position,g.measured,g.parentId,p,y):g.position,x={...g,position:k,width:((v=g.measured)==null?void 0:v.width)??g.width,height:((M=g.measured)==null?void 0:M.height)??g.height};return E0(x)},l=(u,p,y={replace:!1})=>{a(g=>g.map(k=>{if(k.id===u){const x=typeof p=="function"?p(k):p;return y.replace&&qU(x)?x:{...k,...x}}return k}))},h=(u,p,y={replace:!1})=>{s(g=>g.map(k=>{if(k.id===u){const x=typeof p=="function"?p(k):p;return y.replace&&bTe(x)?x:{...k,...x}}return k}))};return{getNodes:()=>t.getState().nodes.map(u=>({...u})),getNode:u=>{var p;return(p=i(u))==null?void 0:p.internals.userNode},getInternalNode:i,getEdges:()=>{const{edges:u=[]}=t.getState();return u.map(p=>({...p}))},getEdge:u=>t.getState().edgeLookup.get(u),setNodes:a,setEdges:s,addNodes:u=>{const p=Array.isArray(u)?u:[u];n.nodeQueue.push(y=>[...y,...p])},addEdges:u=>{const p=Array.isArray(u)?u:[u];n.edgeQueue.push(y=>[...y,...p])},toObject:()=>{const{nodes:u=[],edges:p=[],transform:y}=t.getState(),[g,k,x]=y;return{nodes:u.map(v=>({...v})),edges:p.map(v=>({...v})),viewport:{x:g,y:k,zoom:x}}},deleteElements:async({nodes:u=[],edges:p=[]})=>{const{nodes:y,edges:g,onNodesDelete:k,onEdgesDelete:x,triggerNodeChanges:v,triggerEdgeChanges:M,onDelete:w,onBeforeDelete:b}=t.getState(),{nodes:C,edges:_}=await Tze({nodesToRemove:u,edgesToRemove:p,nodes:y,edges:g,onBeforeDelete:b}),S=_.length>0,N=C.length>0;if(S){const P=_.map(FU);x==null||x(_),M(P)}if(N){const P=C.map(FU);k==null||k(C),v(P)}return(N||S)&&(w==null||w({nodes:C,edges:_})),{deletedNodes:C,deletedEdges:_}},getIntersectingNodes:(u,p=!0,y)=>{const g=kU(u),k=g?u:c(u),x=y!==void 0;return k?(y||t.getState().nodes).filter(v=>{const M=t.getState().nodeLookup.get(v.id);if(M&&!g&&(v.id===u.id||!M.internals.positionAbsolute))return!1;const w=E0(x?v:M),b=af(w,k);return p&&b>0||b>=w.width*w.height||b>=k.width*k.height}):[]},isNodeIntersecting:(u,p,y=!0)=>{const k=kU(u)?u:c(u);if(!k)return!1;const x=af(k,p);return y&&x>0||x>=p.width*p.height||x>=k.width*k.height},updateNode:l,updateNodeData:(u,p,y={replace:!1})=>{l(u,g=>{const k=typeof p=="function"?p(g):p;return y.replace?{...g,data:k}:{...g,data:{...g.data,...k}}},y)},updateEdge:h,updateEdgeData:(u,p,y={replace:!1})=>{h(u,g=>{const k=typeof p=="function"?p(g):p;return y.replace?{...g,data:k}:{...g,data:{...g.data,...k}}},y)},getNodesBounds:u=>{const{nodeLookup:p,nodeOrigin:y}=t.getState();return $ze(u,{nodeLookup:p,nodeOrigin:y})},getHandleConnections:({type:u,id:p,nodeId:y})=>{var g;return Array.from(((g=t.getState().connectionLookup.get(`${y}-${u}${p?`-${p}`:""}`))==null?void 0:g.values())??[])},getNodeConnections:({type:u,handleId:p,nodeId:y})=>{var g;return Array.from(((g=t.getState().connectionLookup.get(`${y}${u?p?`-${u}-${p}`:`-${u}`:""}`))==null?void 0:g.values())??[])},fitView:async u=>{const p=t.getState().fitViewResolver??Fze();return t.setState({fitViewQueued:!0,fitViewOptions:u,fitViewResolver:p}),n.nodeQueue.push(y=>[...y]),p.promise}}},[]);return m.useMemo(()=>({...r,...e,viewportInitialized:o}),[o])}const BU=e=>e.selected,NTe=typeof window<"u"?window:void 0;function ITe({deleteKeyCode:e,multiSelectionKeyCode:t}){const n=xt(),{deleteElements:o}=lR(),r=lf(e,{actInsideInputWithModifier:!1}),i=lf(t,{target:NTe});m.useEffect(()=>{if(r){const{edges:a,nodes:s}=n.getState();o({nodes:s.filter(BU),edges:a.filter(BU)}),n.setState({nodesSelectionActive:!1})}},[r]),m.useEffect(()=>{n.setState({multiSelectionActive:i})},[i])}function ATe(e){const t=xt();m.useEffect(()=>{const n=()=>{var r,i,a,s;if(!e.current||!(((i=(r=e.current).checkVisibility)==null?void 0:i.call(r))??!0))return!1;const o=WF(e.current);(o.height===0||o.width===0)&&((s=(a=t.getState()).onError)==null||s.call(a,"004",Ur.error004())),t.setState({width:o.width||500,height:o.height||500})};if(e.current){n(),window.addEventListener("resize",n);const o=new ResizeObserver(()=>n());return o.observe(e.current),()=>{window.removeEventListener("resize",n),o&&e.current&&o.unobserve(e.current)}}},[])}const dR={position:"absolute",width:"100%",height:"100%",top:0,left:0},ETe=e=>({userSelectionActive:e.userSelectionActive,lib:e.lib,connectionInProgress:e.connection.inProgress});function jTe({onPaneContextMenu:e,zoomOnScroll:t=!0,zoomOnPinch:n=!0,panOnScroll:o=!1,panOnScrollSpeed:r=.5,panOnScrollMode:i=Ed.Free,zoomOnDoubleClick:a=!0,panOnDrag:s=!0,defaultViewport:c,translateExtent:l,minZoom:h,maxZoom:u,zoomActivationKeyCode:p,preventScrolling:y=!0,children:g,noWheelClassName:k,noPanClassName:x,onViewportChange:v,isControlledViewport:M,paneClickDistance:w,selectionOnDrag:b}){const C=xt(),_=m.useRef(null),{userSelectionActive:S,lib:N,connectionInProgress:P}=De(ETe,Lt),A=lf(p),E=m.useRef();ATe(_);const z=m.useCallback(U=>{v==null||v({x:U[0],y:U[1],zoom:U[2]}),M||C.setState({transform:U})},[v,M]);return m.useEffect(()=>{if(_.current){E.current=_Re({domNode:_.current,minZoom:h,maxZoom:u,translateExtent:l,viewport:c,onDraggingChange:D=>C.setState(O=>O.paneDragging===D?O:{paneDragging:D}),onPanZoomStart:(D,O)=>{const{onViewportChangeStart:I,onMoveStart:R}=C.getState();R==null||R(D,O),I==null||I(O)},onPanZoom:(D,O)=>{const{onViewportChange:I,onMove:R}=C.getState();R==null||R(D,O),I==null||I(O)},onPanZoomEnd:(D,O)=>{const{onViewportChangeEnd:I,onMoveEnd:R}=C.getState();R==null||R(D,O),I==null||I(O)}});const{x:U,y:$,zoom:T}=E.current.getViewport();return C.setState({panZoom:E.current,transform:[U,$,T],domNode:_.current.closest(".react-flow")}),()=>{var D;(D=E.current)==null||D.destroy()}}},[]),m.useEffect(()=>{var U;(U=E.current)==null||U.update({onPaneContextMenu:e,zoomOnScroll:t,zoomOnPinch:n,panOnScroll:o,panOnScrollSpeed:r,panOnScrollMode:i,zoomOnDoubleClick:a,panOnDrag:s,zoomActivationKeyPressed:A,preventScrolling:y,noPanClassName:x,userSelectionActive:S,noWheelClassName:k,lib:N,onTransformChange:z,connectionInProgress:P,selectionOnDrag:b,paneClickDistance:w})},[e,t,n,o,r,i,a,s,A,y,x,S,k,N,z,P,b,w]),f.jsx("div",{className:"react-flow__renderer",ref:_,style:dR,children:g})}const $Te=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function PTe(){const{userSelectionActive:e,userSelectionRect:t}=De($Te,Lt);return e&&t?f.jsx("div",{className:"react-flow__selection react-flow__container",style:{width:t.width,height:t.height,transform:`translate(${t.x}px, ${t.y}px)`}}):null}const FT=(e,t)=>n=>{n.target===t.current&&(e==null||e(n))},zTe=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,connectionInProgress:e.connection.inProgress,dragging:e.paneDragging});function RTe({isSelecting:e,selectionKeyPressed:t,selectionMode:n=I0.Full,panOnDrag:o,paneClickDistance:r,selectionOnDrag:i,onSelectionStart:a,onSelectionEnd:s,onPaneClick:c,onPaneContextMenu:l,onPaneScroll:h,onPaneMouseEnter:u,onPaneMouseMove:p,onPaneMouseLeave:y,children:g}){const k=xt(),{userSelectionActive:x,elementsSelectable:v,dragging:M,connectionInProgress:w}=De(zTe,Lt),b=v&&(e||x),C=m.useRef(null),_=m.useRef(),S=m.useRef(new Set),N=m.useRef(new Set),P=m.useRef(!1),A=I=>{if(P.current||w){P.current=!1;return}c==null||c(I),k.getState().resetSelectedElements(),k.setState({nodesSelectionActive:!1})},E=I=>{if(Array.isArray(o)&&(o!=null&&o.includes(2))){I.preventDefault();return}l==null||l(I)},z=h?I=>h(I):void 0,U=I=>{P.current&&(I.stopPropagation(),P.current=!1)},$=I=>{var Z,J;const{domNode:R}=k.getState();if(_.current=R==null?void 0:R.getBoundingClientRect(),!_.current)return;const L=I.target===C.current;if(!L&&!!I.target.closest(".nokey")||!e||!(i&&L||t)||I.button!==0||!I.isPrimary)return;(J=(Z=I.target)==null?void 0:Z.setPointerCapture)==null||J.call(Z,I.pointerId),P.current=!1;const{x:j,y:X}=Qo(I.nativeEvent,_.current);k.setState({userSelectionRect:{width:0,height:0,startX:j,startY:X,x:j,y:X}}),L||(I.stopPropagation(),I.preventDefault())},T=I=>{const{userSelectionRect:R,transform:L,nodeLookup:V,edgeLookup:H,connectionLookup:j,triggerNodeChanges:X,triggerEdgeChanges:Z,defaultEdgeOptions:J,resetSelectedElements:re}=k.getState();if(!_.current||!R)return;const{x:oe,y:ne}=Qo(I.nativeEvent,_.current),{startX:le,startY:ve}=R;if(!P.current){const ue=t?0:r;if(Math.hypot(oe-le,ne-ve)<=ue)return;re(),a==null||a(I)}P.current=!0;const ge={startX:le,startY:ve,x:oe<le?oe:le,y:ne<ve?ne:ve,width:Math.abs(oe-le),height:Math.abs(ne-ve)},xe=S.current,Te=N.current;S.current=new Set(BF(V,ge,L,n===I0.Partial,!0).map(ue=>ue.id)),N.current=new Set;const Ye=(J==null?void 0:J.selectable)??!0;for(const ue of S.current){const Ie=j.get(ue);if(Ie)for(const{edgeId:Pt}of Ie.values()){const wt=H.get(Pt);wt&&(wt.selectable??Ye)&&N.current.add(Pt)}}if(!vU(xe,S.current)){const ue=Yu(V,S.current,!0);X(ue)}if(!vU(Te,N.current)){const ue=Yu(H,N.current);Z(ue)}k.setState({userSelectionRect:ge,userSelectionActive:!0,nodesSelectionActive:!1})},D=I=>{var R,L;I.button===0&&((L=(R=I.target)==null?void 0:R.releasePointerCapture)==null||L.call(R,I.pointerId),!x&&I.target===C.current&&k.getState().userSelectionRect&&(A==null||A(I)),k.setState({userSelectionActive:!1,userSelectionRect:null}),P.current&&(s==null||s(I),k.setState({nodesSelectionActive:S.current.size>0})))},O=o===!0||Array.isArray(o)&&o.includes(0);return f.jsxs("div",{className:Kt(["react-flow__pane",{draggable:O,dragging:M,selection:e}]),onClick:b?void 0:FT(A,C),onContextMenu:FT(E,C),onWheel:FT(z,C),onPointerEnter:b?void 0:u,onPointerMove:b?T:p,onPointerUp:b?D:void 0,onPointerDownCapture:b?$:void 0,onClickCapture:b?U:void 0,onPointerLeave:y,ref:C,style:dR,children:[g,f.jsx(PTe,{})]})}function BH({id:e,store:t,unselect:n=!1,nodeRef:o}){const{addSelectedNodes:r,unselectNodesAndEdges:i,multiSelectionActive:a,nodeLookup:s,onError:c}=t.getState(),l=s.get(e);if(!l){c==null||c("012",Ur.error012(e));return}t.setState({nodesSelectionActive:!1}),l.selected?(n||l.selected&&a)&&(i({nodes:[l],edges:[]}),requestAnimationFrame(()=>{var h;return(h=o==null?void 0:o.current)==null?void 0:h.blur()})):r([e])}function kJ({nodeRef:e,disabled:t=!1,noDragClassName:n,handleSelector:o,nodeId:r,isSelectable:i,nodeClickDistance:a}){const s=xt(),[c,l]=m.useState(!1),h=m.useRef();return m.useEffect(()=>{h.current=dRe({getStoreItems:()=>s.getState(),onNodeMouseDown:u=>{BH({id:u,store:s,nodeRef:e})},onDragStart:()=>{l(!0)},onDragStop:()=>{l(!1)}})},[]),m.useEffect(()=>{if(!(t||!e.current||!h.current))return h.current.update({noDragClassName:n,handleSelector:o,domNode:e.current,isSelectable:i,nodeId:r,nodeClickDistance:a}),()=>{var u;(u=h.current)==null||u.destroy()}},[n,o,t,i,e,r,a]),c}const TTe=e=>t=>t.selected&&(t.draggable||e&&typeof t.draggable>"u");function vJ(){const e=xt();return m.useCallback(n=>{const{nodeExtent:o,snapToGrid:r,snapGrid:i,nodesDraggable:a,onError:s,updateNodePositions:c,nodeLookup:l,nodeOrigin:h}=e.getState(),u=new Map,p=TTe(a),y=r?i[0]:5,g=r?i[1]:5,k=n.direction.x*y*n.factor,x=n.direction.y*g*n.factor;for(const[,v]of l){if(!p(v))continue;let M={x:v.internals.positionAbsolute.x+k,y:v.internals.positionAbsolute.y+x};r&&(M=If(M,i));const{position:w,positionAbsolute:b}=zQ({nodeId:v.id,nextPosition:M,nodeLookup:l,nodeExtent:o,nodeOrigin:h,onError:s});v.position=w,v.internals.positionAbsolute=b,u.set(v.id,v)}c(u)},[])}const QF=m.createContext(null),DTe=QF.Provider;QF.Consumer;const xJ=()=>m.useContext(QF),HTe=e=>({connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName,rfId:e.rfId}),OTe=(e,t,n)=>o=>{const{connectionClickStartHandle:r,connectionMode:i,connection:a}=o,{fromHandle:s,toHandle:c,isValid:l}=a,h=(c==null?void 0:c.nodeId)===e&&(c==null?void 0:c.id)===t&&(c==null?void 0:c.type)===n;return{connectingFrom:(s==null?void 0:s.nodeId)===e&&(s==null?void 0:s.id)===t&&(s==null?void 0:s.type)===n,connectingTo:h,clickConnecting:(r==null?void 0:r.nodeId)===e&&(r==null?void 0:r.id)===t&&(r==null?void 0:r.type)===n,isPossibleEndHandle:i===N0.Strict?(s==null?void 0:s.type)!==n:e!==(s==null?void 0:s.nodeId)||t!==(s==null?void 0:s.id),connectionInProcess:!!s,clickConnectionInProcess:!!r,valid:h&&l}};function FTe({type:e="source",position:t=fe.Top,isValidConnection:n,isConnectable:o=!0,isConnectableStart:r=!0,isConnectableEnd:i=!0,id:a,onConnect:s,children:c,className:l,onMouseDown:h,onTouchStart:u,...p},y){var T,D;const g=a||null,k=e==="target",x=xt(),v=xJ(),{connectOnClick:M,noPanClassName:w,rfId:b}=De(HTe,Lt),{connectingFrom:C,connectingTo:_,clickConnecting:S,isPossibleEndHandle:N,connectionInProcess:P,clickConnectionInProcess:A,valid:E}=De(OTe(v,g,e),Lt);v||(D=(T=x.getState()).onError)==null||D.call(T,"010",Ur.error010());const z=O=>{const{defaultEdgeOptions:I,onConnect:R,hasDefaultEdges:L}=x.getState(),V={...I,...O};if(L){const{edges:H,setEdges:j}=x.getState();j(Kze(V,H))}R==null||R(V),s==null||s(V)},U=O=>{if(!v)return;const I=VQ(O.nativeEvent);if(r&&(I&&O.button===0||!I)){const R=x.getState();qH.onPointerDown(O.nativeEvent,{handleDomNode:O.currentTarget,autoPanOnConnect:R.autoPanOnConnect,connectionMode:R.connectionMode,connectionRadius:R.connectionRadius,domNode:R.domNode,nodeLookup:R.nodeLookup,lib:R.lib,isTarget:k,handleId:g,nodeId:v,flowId:R.rfId,panBy:R.panBy,cancelConnection:R.cancelConnection,onConnectStart:R.onConnectStart,onConnectEnd:(...L)=>{var V,H;return(H=(V=x.getState()).onConnectEnd)==null?void 0:H.call(V,...L)},updateConnection:R.updateConnection,onConnect:z,isValidConnection:n||((...L)=>{var V,H;return((H=(V=x.getState()).isValidConnection)==null?void 0:H.call(V,...L))??!0}),getTransform:()=>x.getState().transform,getFromHandle:()=>x.getState().connection.fromHandle,autoPanSpeed:R.autoPanSpeed,dragThreshold:R.connectionDragThreshold})}I?h==null||h(O):u==null||u(O)},$=O=>{const{onClickConnectStart:I,onClickConnectEnd:R,connectionClickStartHandle:L,connectionMode:V,isValidConnection:H,lib:j,rfId:X,nodeLookup:Z,connection:J}=x.getState();if(!v||!L&&!r)return;if(!L){I==null||I(O.nativeEvent,{nodeId:v,handleId:g,handleType:e}),x.setState({connectionClickStartHandle:{nodeId:v,type:e,id:g}});return}const re=FQ(O.target),oe=n||H,{connection:ne,isValid:le}=qH.isValid(O.nativeEvent,{handle:{nodeId:v,id:g,type:e},connectionMode:V,fromNodeId:L.nodeId,fromHandleId:L.id||null,fromType:L.type,isValidConnection:oe,flowId:X,doc:re,lib:j,nodeLookup:Z});le&&ne&&z(ne);const ve=structuredClone(J);delete ve.inProgress,ve.toPosition=ve.toHandle?ve.toHandle.position:null,R==null||R(O,ve),x.setState({connectionClickStartHandle:null})};return f.jsx("div",{"data-handleid":g,"data-nodeid":v,"data-handlepos":t,"data-id":`${b}-${v}-${g}-${e}`,className:Kt(["react-flow__handle",`react-flow__handle-${t}`,"nodrag",w,l,{source:!k,target:k,connectable:o,connectablestart:r,connectableend:i,clickconnecting:S,connectingfrom:C,connectingto:_,valid:E,connectionindicator:o&&(!P||N)&&(P||A?i:r)}]),onMouseDown:U,onTouchStart:U,onClick:M?$:void 0,ref:y,...p,children:c})}const ct=m.memo(mJ(FTe));function qTe({data:e,isConnectable:t,sourcePosition:n=fe.Bottom}){return f.jsxs(f.Fragment,{children:[e==null?void 0:e.label,f.jsx(ct,{type:"source",position:n,isConnectable:t})]})}function VTe({data:e,isConnectable:t,targetPosition:n=fe.Top,sourcePosition:o=fe.Bottom}){return f.jsxs(f.Fragment,{children:[f.jsx(ct,{type:"target",position:n,isConnectable:t}),e==null?void 0:e.label,f.jsx(ct,{type:"source",position:o,isConnectable:t})]})}function BTe(){return null}function UTe({data:e,isConnectable:t,targetPosition:n=fe.Top}){return f.jsxs(f.Fragment,{children:[f.jsx(ct,{type:"target",position:n,isConnectable:t}),e==null?void 0:e.label]})}const ez={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},UU={input:qTe,default:VTe,output:UTe,group:BTe};function WTe(e){var t,n,o,r;return e.internals.handleBounds===void 0?{width:e.width??e.initialWidth??((t=e.style)==null?void 0:t.width),height:e.height??e.initialHeight??((n=e.style)==null?void 0:n.height)}:{width:e.width??((o=e.style)==null?void 0:o.width),height:e.height??((r=e.style)==null?void 0:r.height)}}const GTe=e=>{const{width:t,height:n,x:o,y:r}=Nf(e.nodeLookup,{filter:i=>!!i.selected});return{width:Yo(t)?t:null,height:Yo(n)?n:null,userSelectionActive:e.userSelectionActive,transformString:`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]}) translate(${o}px,${r}px)`}};function KTe({onSelectionContextMenu:e,noPanClassName:t,disableKeyboardA11y:n}){const o=xt(),{width:r,height:i,transformString:a,userSelectionActive:s}=De(GTe,Lt),c=vJ(),l=m.useRef(null);m.useEffect(()=>{var y;n||(y=l.current)==null||y.focus({preventScroll:!0})},[n]);const h=!s&&r!==null&&i!==null;if(kJ({nodeRef:l,disabled:!h}),!h)return null;const u=e?y=>{const g=o.getState().nodes.filter(k=>k.selected);e(y,g)}:void 0,p=y=>{Object.prototype.hasOwnProperty.call(ez,y.key)&&(y.preventDefault(),c({direction:ez[y.key],factor:y.shiftKey?4:1}))};return f.jsx("div",{className:Kt(["react-flow__nodesselection","react-flow__container",t]),style:{transform:a},children:f.jsx("div",{ref:l,className:"react-flow__nodesselection-rect",onContextMenu:u,tabIndex:n?void 0:-1,onKeyDown:n?void 0:p,style:{width:r,height:i}})})}const WU=typeof window<"u"?window:void 0,XTe=e=>({nodesSelectionActive:e.nodesSelectionActive,userSelectionActive:e.userSelectionActive});function wJ({children:e,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:o,onPaneMouseLeave:r,onPaneContextMenu:i,onPaneScroll:a,paneClickDistance:s,deleteKeyCode:c,selectionKeyCode:l,selectionOnDrag:h,selectionMode:u,onSelectionStart:p,onSelectionEnd:y,multiSelectionKeyCode:g,panActivationKeyCode:k,zoomActivationKeyCode:x,elementsSelectable:v,zoomOnScroll:M,zoomOnPinch:w,panOnScroll:b,panOnScrollSpeed:C,panOnScrollMode:_,zoomOnDoubleClick:S,panOnDrag:N,defaultViewport:P,translateExtent:A,minZoom:E,maxZoom:z,preventScrolling:U,onSelectionContextMenu:$,noWheelClassName:T,noPanClassName:D,disableKeyboardA11y:O,onViewportChange:I,isControlledViewport:R}){const{nodesSelectionActive:L,userSelectionActive:V}=De(XTe,Lt),H=lf(l,{target:WU}),j=lf(k,{target:WU}),X=j||N,Z=j||b,J=h&&X!==!0,re=H||V||J;return ITe({deleteKeyCode:c,multiSelectionKeyCode:g}),f.jsx(jTe,{onPaneContextMenu:i,elementsSelectable:v,zoomOnScroll:M,zoomOnPinch:w,panOnScroll:Z,panOnScrollSpeed:C,panOnScrollMode:_,zoomOnDoubleClick:S,panOnDrag:!H&&X,defaultViewport:P,translateExtent:A,minZoom:E,maxZoom:z,zoomActivationKeyCode:x,preventScrolling:U,noWheelClassName:T,noPanClassName:D,onViewportChange:I,isControlledViewport:R,paneClickDistance:s,selectionOnDrag:J,children:f.jsxs(RTe,{onSelectionStart:p,onSelectionEnd:y,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:o,onPaneMouseLeave:r,onPaneContextMenu:i,onPaneScroll:a,panOnDrag:X,isSelecting:!!re,selectionMode:u,selectionKeyPressed:H,paneClickDistance:s,selectionOnDrag:J,children:[e,L&&f.jsx(KTe,{onSelectionContextMenu:$,noPanClassName:D,disableKeyboardA11y:O})]})})}wJ.displayName="FlowRenderer";const ZTe=m.memo(wJ),YTe=e=>t=>e?BF(t.nodeLookup,{x:0,y:0,width:t.width,height:t.height},t.transform,!0).map(n=>n.id):Array.from(t.nodeLookup.keys());function QTe(e){return De(m.useCallback(YTe(e),[e]),Lt)}const JTe=e=>e.updateNodeInternals;function eDe(){const e=De(JTe),[t]=m.useState(()=>typeof ResizeObserver>"u"?null:new ResizeObserver(n=>{const o=new Map;n.forEach(r=>{const i=r.target.getAttribute("data-id");o.set(i,{id:i,nodeElement:r.target,force:!0})}),e(o)}));return m.useEffect(()=>()=>{t==null||t.disconnect()},[t]),t}function tDe({node:e,nodeType:t,hasDimensions:n,resizeObserver:o}){const r=xt(),i=m.useRef(null),a=m.useRef(null),s=m.useRef(e.sourcePosition),c=m.useRef(e.targetPosition),l=m.useRef(t),h=n&&!!e.internals.handleBounds;return m.useEffect(()=>{i.current&&!e.hidden&&(!h||a.current!==i.current)&&(a.current&&(o==null||o.unobserve(a.current)),o==null||o.observe(i.current),a.current=i.current)},[h,e.hidden]),m.useEffect(()=>()=>{a.current&&(o==null||o.unobserve(a.current),a.current=null)},[]),m.useEffect(()=>{if(i.current){const u=l.current!==t,p=s.current!==e.sourcePosition,y=c.current!==e.targetPosition;(u||p||y)&&(l.current=t,s.current=e.sourcePosition,c.current=e.targetPosition,r.getState().updateNodeInternals(new Map([[e.id,{id:e.id,nodeElement:i.current,force:!0}]])))}},[e.id,t,e.sourcePosition,e.targetPosition]),i}function nDe({id:e,onClick:t,onMouseEnter:n,onMouseMove:o,onMouseLeave:r,onContextMenu:i,onDoubleClick:a,nodesDraggable:s,elementsSelectable:c,nodesConnectable:l,nodesFocusable:h,resizeObserver:u,noDragClassName:p,noPanClassName:y,disableKeyboardA11y:g,rfId:k,nodeTypes:x,nodeClickDistance:v,onError:M}){const{node:w,internals:b,isParent:C}=De(oe=>{const ne=oe.nodeLookup.get(e),le=oe.parentLookup.has(e);return{node:ne,internals:ne.internals,isParent:le}},Lt);let _=w.type||"default",S=(x==null?void 0:x[_])||UU[_];S===void 0&&(M==null||M("003",Ur.error003(_)),_="default",S=(x==null?void 0:x.default)||UU.default);const N=!!(w.draggable||s&&typeof w.draggable>"u"),P=!!(w.selectable||c&&typeof w.selectable>"u"),A=!!(w.connectable||l&&typeof w.connectable>"u"),E=!!(w.focusable||h&&typeof w.focusable>"u"),z=xt(),U=HQ(w),$=tDe({node:w,nodeType:_,hasDimensions:U,resizeObserver:u}),T=kJ({nodeRef:$,disabled:w.hidden||!N,noDragClassName:p,handleSelector:w.dragHandle,nodeId:e,isSelectable:P,nodeClickDistance:v}),D=vJ();if(w.hidden)return null;const O=Oi(w),I=WTe(w),R=P||N||t||n||o||r,L=n?oe=>n(oe,{...b.userNode}):void 0,V=o?oe=>o(oe,{...b.userNode}):void 0,H=r?oe=>r(oe,{...b.userNode}):void 0,j=i?oe=>i(oe,{...b.userNode}):void 0,X=a?oe=>a(oe,{...b.userNode}):void 0,Z=oe=>{const{selectNodesOnDrag:ne,nodeDragThreshold:le}=z.getState();P&&(!ne||!N||le>0)&&BH({id:e,store:z,nodeRef:$}),t&&t(oe,{...b.userNode})},J=oe=>{if(!(qQ(oe.nativeEvent)||g)){if(AQ.includes(oe.key)&&P){const ne=oe.key==="Escape";BH({id:e,store:z,unselect:ne,nodeRef:$})}else if(N&&w.selected&&Object.prototype.hasOwnProperty.call(ez,oe.key)){oe.preventDefault();const{ariaLabelConfig:ne}=z.getState();z.setState({ariaLiveMessage:ne["node.a11yDescription.ariaLiveMessage"]({direction:oe.key.replace("Arrow","").toLowerCase(),x:~~b.positionAbsolute.x,y:~~b.positionAbsolute.y})}),D({direction:ez[oe.key],factor:oe.shiftKey?4:1})}}},re=()=>{var Te;if(g||!((Te=$.current)!=null&&Te.matches(":focus-visible")))return;const{transform:oe,width:ne,height:le,autoPanOnNodeFocus:ve,setCenter:ge}=z.getState();if(!ve)return;BF(new Map([[e,w]]),{x:0,y:0,width:ne,height:le},oe,!0).length>0||ge(w.position.x+O.width/2,w.position.y+O.height/2,{zoom:oe[2]})};return f.jsx("div",{className:Kt(["react-flow__node",`react-flow__node-${_}`,{[y]:N},w.className,{selected:w.selected,selectable:P,parent:C,draggable:N,dragging:T}]),ref:$,style:{zIndex:b.z,transform:`translate(${b.positionAbsolute.x}px,${b.positionAbsolute.y}px)`,pointerEvents:R?"all":"none",visibility:U?"visible":"hidden",...w.style,...I},"data-id":e,"data-testid":`rf__node-${e}`,onMouseEnter:L,onMouseMove:V,onMouseLeave:H,onContextMenu:j,onClick:Z,onDoubleClick:X,onKeyDown:E?J:void 0,tabIndex:E?0:void 0,onFocus:E?re:void 0,role:w.ariaRole??(E?"group":void 0),"aria-roledescription":"node","aria-describedby":g?void 0:`${dJ}-${k}`,"aria-label":w.ariaLabel,...w.domAttributes,children:f.jsx(DTe,{value:e,children:f.jsx(S,{id:e,data:w.data,type:_,positionAbsoluteX:b.positionAbsolute.x,positionAbsoluteY:b.positionAbsolute.y,selected:w.selected??!1,selectable:P,draggable:N,deletable:w.deletable??!0,isConnectable:A,sourcePosition:w.sourcePosition,targetPosition:w.targetPosition,dragging:T,dragHandle:w.dragHandle,zIndex:b.z,parentId:w.parentId,...O})})})}var oDe=m.memo(nDe);const rDe=e=>({nodesDraggable:e.nodesDraggable,nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,onError:e.onError});function MJ(e){const{nodesDraggable:t,nodesConnectable:n,nodesFocusable:o,elementsSelectable:r,onError:i}=De(rDe,Lt),a=QTe(e.onlyRenderVisibleElements),s=eDe();return f.jsx("div",{className:"react-flow__nodes",style:dR,children:a.map(c=>f.jsx(oDe,{id:c,nodeTypes:e.nodeTypes,nodeExtent:e.nodeExtent,onClick:e.onNodeClick,onMouseEnter:e.onNodeMouseEnter,onMouseMove:e.onNodeMouseMove,onMouseLeave:e.onNodeMouseLeave,onContextMenu:e.onNodeContextMenu,onDoubleClick:e.onNodeDoubleClick,noDragClassName:e.noDragClassName,noPanClassName:e.noPanClassName,rfId:e.rfId,disableKeyboardA11y:e.disableKeyboardA11y,resizeObserver:s,nodesDraggable:t,nodesConnectable:n,nodesFocusable:o,elementsSelectable:r,nodeClickDistance:e.nodeClickDistance,onError:i},c))})}MJ.displayName="NodeRenderer";const iDe=m.memo(MJ);function aDe(e){return De(m.useCallback(n=>{if(!e)return n.edges.map(r=>r.id);const o=[];if(n.width&&n.height)for(const r of n.edges){const i=n.nodeLookup.get(r.source),a=n.nodeLookup.get(r.target);i&&a&&Uze({sourceNode:i,targetNode:a,width:n.width,height:n.height,transform:n.transform})&&o.push(r.id)}return o},[e]),Lt)}const sDe=({color:e="none",strokeWidth:t=1})=>{const n={strokeWidth:t,...e&&{stroke:e}};return f.jsx("polyline",{className:"arrow",style:n,strokeLinecap:"round",fill:"none",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4"})},cDe=({color:e="none",strokeWidth:t=1})=>{const n={strokeWidth:t,...e&&{stroke:e,fill:e}};return f.jsx("polyline",{className:"arrowclosed",style:n,strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"})},GU={[rf.Arrow]:sDe,[rf.ArrowClosed]:cDe};function lDe(e){const t=xt();return m.useMemo(()=>{var r,i;return Object.prototype.hasOwnProperty.call(GU,e)?GU[e]:((i=(r=t.getState()).onError)==null||i.call(r,"009",Ur.error009(e)),null)},[e])}const dDe=({id:e,type:t,color:n,width:o=12.5,height:r=12.5,markerUnits:i="strokeWidth",strokeWidth:a,orient:s="auto-start-reverse"})=>{const c=lDe(t);return c?f.jsx("marker",{className:"react-flow__arrowhead",id:e,markerWidth:`${o}`,markerHeight:`${r}`,viewBox:"-10 -10 20 20",markerUnits:i,orient:s,refX:"0",refY:"0",children:f.jsx(c,{color:n,strokeWidth:a})}):null},bJ=({defaultColor:e,rfId:t})=>{const n=De(i=>i.edges),o=De(i=>i.defaultEdgeOptions),r=m.useMemo(()=>Jze(n,{id:t,defaultColor:e,defaultMarkerStart:o==null?void 0:o.markerStart,defaultMarkerEnd:o==null?void 0:o.markerEnd}),[n,o,t,e]);return r.length?f.jsx("svg",{className:"react-flow__marker","aria-hidden":"true",children:f.jsx("defs",{children:r.map(i=>f.jsx(dDe,{id:i.id,type:i.type,color:i.color,width:i.width,height:i.height,markerUnits:i.markerUnits,strokeWidth:i.strokeWidth,orient:i.orient},i.id))})}):null};bJ.displayName="MarkerDefinitions";var uDe=m.memo(bJ);function _J({x:e,y:t,label:n,labelStyle:o,labelShowBg:r=!0,labelBgStyle:i,labelBgPadding:a=[2,4],labelBgBorderRadius:s=2,children:c,className:l,...h}){const[u,p]=m.useState({x:1,y:0,width:0,height:0}),y=Kt(["react-flow__edge-textwrapper",l]),g=m.useRef(null);return m.useEffect(()=>{if(g.current){const k=g.current.getBBox();p({x:k.x,y:k.y,width:k.width,height:k.height})}},[n]),n?f.jsxs("g",{transform:`translate(${e-u.width/2} ${t-u.height/2})`,className:y,visibility:u.width?"visible":"hidden",...h,children:[r&&f.jsx("rect",{width:u.width+2*a[0],x:-a[0],y:-a[1],height:u.height+2*a[1],className:"react-flow__edge-textbg",style:i,rx:s,ry:s}),f.jsx("text",{className:"react-flow__edge-text",y:u.height/2,dy:"0.3em",ref:g,style:o,children:n}),c]}):null}_J.displayName="EdgeText";const hDe=m.memo(_J);function Ef({path:e,labelX:t,labelY:n,label:o,labelStyle:r,labelShowBg:i,labelBgStyle:a,labelBgPadding:s,labelBgBorderRadius:c,interactionWidth:l=20,...h}){return f.jsxs(f.Fragment,{children:[f.jsx("path",{...h,d:e,fill:"none",className:Kt(["react-flow__edge-path",h.className])}),l?f.jsx("path",{d:e,fill:"none",strokeOpacity:0,strokeWidth:l,className:"react-flow__edge-interaction"}):null,o&&Yo(t)&&Yo(n)?f.jsx(hDe,{x:t,y:n,label:o,labelStyle:r,labelShowBg:i,labelBgStyle:a,labelBgPadding:s,labelBgBorderRadius:c}):null]})}function KU({pos:e,x1:t,y1:n,x2:o,y2:r}){return e===fe.Left||e===fe.Right?[.5*(t+o),n]:[t,.5*(n+r)]}function CJ({sourceX:e,sourceY:t,sourcePosition:n=fe.Bottom,targetX:o,targetY:r,targetPosition:i=fe.Top}){const[a,s]=KU({pos:n,x1:e,y1:t,x2:o,y2:r}),[c,l]=KU({pos:i,x1:o,y1:r,x2:e,y2:t}),[h,u,p,y]=BQ({sourceX:e,sourceY:t,targetX:o,targetY:r,sourceControlX:a,sourceControlY:s,targetControlX:c,targetControlY:l});return[`M${e},${t} C${a},${s} ${c},${l} ${o},${r}`,h,u,p,y]}function SJ(e){return m.memo(({id:t,sourceX:n,sourceY:o,targetX:r,targetY:i,sourcePosition:a,targetPosition:s,label:c,labelStyle:l,labelShowBg:h,labelBgStyle:u,labelBgPadding:p,labelBgBorderRadius:y,style:g,markerEnd:k,markerStart:x,interactionWidth:v})=>{const[M,w,b]=CJ({sourceX:n,sourceY:o,sourcePosition:a,targetX:r,targetY:i,targetPosition:s}),C=e.isInternal?void 0:t;return f.jsx(Ef,{id:C,path:M,labelX:w,labelY:b,label:c,labelStyle:l,labelShowBg:h,labelBgStyle:u,labelBgPadding:p,labelBgBorderRadius:y,style:g,markerEnd:k,markerStart:x,interactionWidth:v})})}const fDe=SJ({isInternal:!1}),LJ=SJ({isInternal:!0});fDe.displayName="SimpleBezierEdge";LJ.displayName="SimpleBezierEdgeInternal";function NJ(e){return m.memo(({id:t,sourceX:n,sourceY:o,targetX:r,targetY:i,label:a,labelStyle:s,labelShowBg:c,labelBgStyle:l,labelBgPadding:h,labelBgBorderRadius:u,style:p,sourcePosition:y=fe.Bottom,targetPosition:g=fe.Top,markerEnd:k,markerStart:x,pathOptions:v,interactionWidth:M})=>{const[w,b,C]=cf({sourceX:n,sourceY:o,sourcePosition:y,targetX:r,targetY:i,targetPosition:g,borderRadius:v==null?void 0:v.borderRadius,offset:v==null?void 0:v.offset,stepPosition:v==null?void 0:v.stepPosition}),_=e.isInternal?void 0:t;return f.jsx(Ef,{id:_,path:w,labelX:b,labelY:C,label:a,labelStyle:s,labelShowBg:c,labelBgStyle:l,labelBgPadding:h,labelBgBorderRadius:u,style:p,markerEnd:k,markerStart:x,interactionWidth:M})})}const IJ=NJ({isInternal:!1}),AJ=NJ({isInternal:!0});IJ.displayName="SmoothStepEdge";AJ.displayName="SmoothStepEdgeInternal";function EJ(e){return m.memo(({id:t,...n})=>{var r;const o=e.isInternal?void 0:t;return f.jsx(IJ,{...n,id:o,pathOptions:m.useMemo(()=>{var i;return{borderRadius:0,offset:(i=n.pathOptions)==null?void 0:i.offset}},[(r=n.pathOptions)==null?void 0:r.offset])})})}const pDe=EJ({isInternal:!1}),jJ=EJ({isInternal:!0});pDe.displayName="StepEdge";jJ.displayName="StepEdgeInternal";function $J(e){return m.memo(({id:t,sourceX:n,sourceY:o,targetX:r,targetY:i,label:a,labelStyle:s,labelShowBg:c,labelBgStyle:l,labelBgPadding:h,labelBgBorderRadius:u,style:p,markerEnd:y,markerStart:g,interactionWidth:k})=>{const[x,v,M]=WQ({sourceX:n,sourceY:o,targetX:r,targetY:i}),w=e.isInternal?void 0:t;return f.jsx(Ef,{id:w,path:x,labelX:v,labelY:M,label:a,labelStyle:s,labelShowBg:c,labelBgStyle:l,labelBgPadding:h,labelBgBorderRadius:u,style:p,markerEnd:y,markerStart:g,interactionWidth:k})})}const yDe=$J({isInternal:!1}),PJ=$J({isInternal:!0});yDe.displayName="StraightEdge";PJ.displayName="StraightEdgeInternal";function zJ(e){return m.memo(({id:t,sourceX:n,sourceY:o,targetX:r,targetY:i,sourcePosition:a=fe.Bottom,targetPosition:s=fe.Top,label:c,labelStyle:l,labelShowBg:h,labelBgStyle:u,labelBgPadding:p,labelBgBorderRadius:y,style:g,markerEnd:k,markerStart:x,pathOptions:v,interactionWidth:M})=>{const[w,b,C]=iR({sourceX:n,sourceY:o,sourcePosition:a,targetX:r,targetY:i,targetPosition:s,curvature:v==null?void 0:v.curvature}),_=e.isInternal?void 0:t;return f.jsx(Ef,{id:_,path:w,labelX:b,labelY:C,label:c,labelStyle:l,labelShowBg:h,labelBgStyle:u,labelBgPadding:p,labelBgBorderRadius:y,style:g,markerEnd:k,markerStart:x,interactionWidth:M})})}const mDe=zJ({isInternal:!1}),RJ=zJ({isInternal:!0});mDe.displayName="BezierEdge";RJ.displayName="BezierEdgeInternal";const XU={default:RJ,straight:PJ,step:jJ,smoothstep:AJ,simplebezier:LJ},ZU={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null},gDe=(e,t,n)=>n===fe.Left?e-t:n===fe.Right?e+t:e,kDe=(e,t,n)=>n===fe.Top?e-t:n===fe.Bottom?e+t:e,YU="react-flow__edgeupdater";function QU({position:e,centerX:t,centerY:n,radius:o=10,onMouseDown:r,onMouseEnter:i,onMouseOut:a,type:s}){return f.jsx("circle",{onMouseDown:r,onMouseEnter:i,onMouseOut:a,className:Kt([YU,`${YU}-${s}`]),cx:gDe(t,o,e),cy:kDe(n,o,e),r:o,stroke:"transparent",fill:"transparent"})}function vDe({isReconnectable:e,reconnectRadius:t,edge:n,sourceX:o,sourceY:r,targetX:i,targetY:a,sourcePosition:s,targetPosition:c,onReconnect:l,onReconnectStart:h,onReconnectEnd:u,setReconnecting:p,setUpdateHover:y}){const g=xt(),k=(b,C)=>{if(b.button!==0)return;const{autoPanOnConnect:_,domNode:S,connectionMode:N,connectionRadius:P,lib:A,onConnectStart:E,cancelConnection:z,nodeLookup:U,rfId:$,panBy:T,updateConnection:D}=g.getState(),O=C.type==="target",I=(V,H)=>{p(!1),u==null||u(V,n,C.type,H)},R=V=>l==null?void 0:l(n,V),L=(V,H)=>{p(!0),h==null||h(b,n,C.type),E==null||E(V,H)};qH.onPointerDown(b.nativeEvent,{autoPanOnConnect:_,connectionMode:N,connectionRadius:P,domNode:S,handleId:C.id,nodeId:C.nodeId,nodeLookup:U,isTarget:O,edgeUpdaterType:C.type,lib:A,flowId:$,cancelConnection:z,panBy:T,isValidConnection:(...V)=>{var H,j;return((j=(H=g.getState()).isValidConnection)==null?void 0:j.call(H,...V))??!0},onConnect:R,onConnectStart:L,onConnectEnd:(...V)=>{var H,j;return(j=(H=g.getState()).onConnectEnd)==null?void 0:j.call(H,...V)},onReconnectEnd:I,updateConnection:D,getTransform:()=>g.getState().transform,getFromHandle:()=>g.getState().connection.fromHandle,dragThreshold:g.getState().connectionDragThreshold,handleDomNode:b.currentTarget})},x=b=>k(b,{nodeId:n.target,id:n.targetHandle??null,type:"target"}),v=b=>k(b,{nodeId:n.source,id:n.sourceHandle??null,type:"source"}),M=()=>y(!0),w=()=>y(!1);return f.jsxs(f.Fragment,{children:[(e===!0||e==="source")&&f.jsx(QU,{position:s,centerX:o,centerY:r,radius:t,onMouseDown:x,onMouseEnter:M,onMouseOut:w,type:"source"}),(e===!0||e==="target")&&f.jsx(QU,{position:c,centerX:i,centerY:a,radius:t,onMouseDown:v,onMouseEnter:M,onMouseOut:w,type:"target"})]})}function xDe({id:e,edgesFocusable:t,edgesReconnectable:n,elementsSelectable:o,onClick:r,onDoubleClick:i,onContextMenu:a,onMouseEnter:s,onMouseMove:c,onMouseLeave:l,reconnectRadius:h,onReconnect:u,onReconnectStart:p,onReconnectEnd:y,rfId:g,edgeTypes:k,noPanClassName:x,onError:v,disableKeyboardA11y:M}){let w=De(ge=>ge.edgeLookup.get(e));const b=De(ge=>ge.defaultEdgeOptions);w=b?{...b,...w}:w;let C=w.type||"default",_=(k==null?void 0:k[C])||XU[C];_===void 0&&(v==null||v("011",Ur.error011(C)),C="default",_=(k==null?void 0:k.default)||XU.default);const S=!!(w.focusable||t&&typeof w.focusable>"u"),N=typeof u<"u"&&(w.reconnectable||n&&typeof w.reconnectable>"u"),P=!!(w.selectable||o&&typeof w.selectable>"u"),A=m.useRef(null),[E,z]=m.useState(!1),[U,$]=m.useState(!1),T=xt(),{zIndex:D,sourceX:O,sourceY:I,targetX:R,targetY:L,sourcePosition:V,targetPosition:H}=De(m.useCallback(ge=>{const xe=ge.nodeLookup.get(w.source),Te=ge.nodeLookup.get(w.target);if(!xe||!Te)return{zIndex:w.zIndex,...ZU};const Ye=Qze({id:e,sourceNode:xe,targetNode:Te,sourceHandle:w.sourceHandle||null,targetHandle:w.targetHandle||null,connectionMode:ge.connectionMode,onError:v});return{zIndex:Bze({selected:w.selected,zIndex:w.zIndex,sourceNode:xe,targetNode:Te,elevateOnSelect:ge.elevateEdgesOnSelect,zIndexMode:ge.zIndexMode}),...Ye||ZU}},[w.source,w.target,w.sourceHandle,w.targetHandle,w.selected,w.zIndex]),Lt),j=m.useMemo(()=>w.markerStart?`url('#${OH(w.markerStart,g)}')`:void 0,[w.markerStart,g]),X=m.useMemo(()=>w.markerEnd?`url('#${OH(w.markerEnd,g)}')`:void 0,[w.markerEnd,g]);if(w.hidden||O===null||I===null||R===null||L===null)return null;const Z=ge=>{var ue;const{addSelectedEdges:xe,unselectNodesAndEdges:Te,multiSelectionActive:Ye}=T.getState();P&&(T.setState({nodesSelectionActive:!1}),w.selected&&Ye?(Te({nodes:[],edges:[w]}),(ue=A.current)==null||ue.blur()):xe([e])),r&&r(ge,w)},J=i?ge=>{i(ge,{...w})}:void 0,re=a?ge=>{a(ge,{...w})}:void 0,oe=s?ge=>{s(ge,{...w})}:void 0,ne=c?ge=>{c(ge,{...w})}:void 0,le=l?ge=>{l(ge,{...w})}:void 0,ve=ge=>{var xe;if(!M&&AQ.includes(ge.key)&&P){const{unselectNodesAndEdges:Te,addSelectedEdges:Ye}=T.getState();ge.key==="Escape"?((xe=A.current)==null||xe.blur(),Te({edges:[w]})):Ye([e])}};return f.jsx("svg",{style:{zIndex:D},children:f.jsxs("g",{className:Kt(["react-flow__edge",`react-flow__edge-${C}`,w.className,x,{selected:w.selected,animated:w.animated,inactive:!P&&!r,updating:E,selectable:P}]),onClick:Z,onDoubleClick:J,onContextMenu:re,onMouseEnter:oe,onMouseMove:ne,onMouseLeave:le,onKeyDown:S?ve:void 0,tabIndex:S?0:void 0,role:w.ariaRole??(S?"group":"img"),"aria-roledescription":"edge","data-id":e,"data-testid":`rf__edge-${e}`,"aria-label":w.ariaLabel===null?void 0:w.ariaLabel||`Edge from ${w.source} to ${w.target}`,"aria-describedby":S?`${uJ}-${g}`:void 0,ref:A,...w.domAttributes,children:[!U&&f.jsx(_,{id:e,source:w.source,target:w.target,type:w.type,selected:w.selected,animated:w.animated,selectable:P,deletable:w.deletable??!0,label:w.label,labelStyle:w.labelStyle,labelShowBg:w.labelShowBg,labelBgStyle:w.labelBgStyle,labelBgPadding:w.labelBgPadding,labelBgBorderRadius:w.labelBgBorderRadius,sourceX:O,sourceY:I,targetX:R,targetY:L,sourcePosition:V,targetPosition:H,data:w.data,style:w.style,sourceHandleId:w.sourceHandle,targetHandleId:w.targetHandle,markerStart:j,markerEnd:X,pathOptions:"pathOptions"in w?w.pathOptions:void 0,interactionWidth:w.interactionWidth}),N&&f.jsx(vDe,{edge:w,isReconnectable:N,reconnectRadius:h,onReconnect:u,onReconnectStart:p,onReconnectEnd:y,sourceX:O,sourceY:I,targetX:R,targetY:L,sourcePosition:V,targetPosition:H,setUpdateHover:z,setReconnecting:$})]})})}var wDe=m.memo(xDe);const MDe=e=>({edgesFocusable:e.edgesFocusable,edgesReconnectable:e.edgesReconnectable,elementsSelectable:e.elementsSelectable,connectionMode:e.connectionMode,onError:e.onError});function TJ({defaultMarkerColor:e,onlyRenderVisibleElements:t,rfId:n,edgeTypes:o,noPanClassName:r,onReconnect:i,onEdgeContextMenu:a,onEdgeMouseEnter:s,onEdgeMouseMove:c,onEdgeMouseLeave:l,onEdgeClick:h,reconnectRadius:u,onEdgeDoubleClick:p,onReconnectStart:y,onReconnectEnd:g,disableKeyboardA11y:k}){const{edgesFocusable:x,edgesReconnectable:v,elementsSelectable:M,onError:w}=De(MDe,Lt),b=aDe(t);return f.jsxs("div",{className:"react-flow__edges",children:[f.jsx(uDe,{defaultColor:e,rfId:n}),b.map(C=>f.jsx(wDe,{id:C,edgesFocusable:x,edgesReconnectable:v,elementsSelectable:M,noPanClassName:r,onReconnect:i,onContextMenu:a,onMouseEnter:s,onMouseMove:c,onMouseLeave:l,onClick:h,reconnectRadius:u,onDoubleClick:p,onReconnectStart:y,onReconnectEnd:g,rfId:n,onError:w,edgeTypes:o,disableKeyboardA11y:k},C))]})}TJ.displayName="EdgeRenderer";const bDe=m.memo(TJ),_De=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function CDe({children:e}){const t=De(_De);return f.jsx("div",{className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:t},children:e})}function SDe(e){const t=lR(),n=m.useRef(!1);m.useEffect(()=>{!n.current&&t.viewportInitialized&&e&&(setTimeout(()=>e(t),1),n.current=!0)},[e,t.viewportInitialized])}const LDe=e=>{var t;return(t=e.panZoom)==null?void 0:t.syncViewport};function NDe(e){const t=De(LDe),n=xt();return m.useEffect(()=>{e&&(t==null||t(e),n.setState({transform:[e.x,e.y,e.zoom]}))},[e,t]),null}function IDe(e){return e.connection.inProgress?{...e.connection,to:Af(e.connection.to,e.transform)}:{...e.connection}}function ADe(e){return IDe}function EDe(e){const t=ADe();return De(t,Lt)}const jDe=e=>({nodesConnectable:e.nodesConnectable,isValid:e.connection.isValid,inProgress:e.connection.inProgress,width:e.width,height:e.height});function $De({containerStyle:e,style:t,type:n,component:o}){const{nodesConnectable:r,width:i,height:a,isValid:s,inProgress:c}=De(jDe,Lt);return!(i&&r&&c)?null:f.jsx("svg",{style:e,width:i,height:a,className:"react-flow__connectionline react-flow__container",children:f.jsx("g",{className:Kt(["react-flow__connection",$Q(s)]),children:f.jsx(DJ,{style:t,type:n,CustomComponent:o,isValid:s})})})}const DJ=({style:e,type:t=xa.Bezier,CustomComponent:n,isValid:o})=>{const{inProgress:r,from:i,fromNode:a,fromHandle:s,fromPosition:c,to:l,toNode:h,toHandle:u,toPosition:p,pointer:y}=EDe();if(!r)return;if(n)return f.jsx(n,{connectionLineType:t,connectionLineStyle:e,fromNode:a,fromHandle:s,fromX:i.x,fromY:i.y,toX:l.x,toY:l.y,fromPosition:c,toPosition:p,connectionStatus:$Q(o),toNode:h,toHandle:u,pointer:y});let g="";const k={sourceX:i.x,sourceY:i.y,sourcePosition:c,targetX:l.x,targetY:l.y,targetPosition:p};switch(t){case xa.Bezier:[g]=iR(k);break;case xa.SimpleBezier:[g]=CJ(k);break;case xa.Step:[g]=cf({...k,borderRadius:0});break;case xa.SmoothStep:[g]=cf(k);break;default:[g]=WQ(k)}return f.jsx("path",{d:g,fill:"none",className:"react-flow__connection-path",style:e})};DJ.displayName="ConnectionLine";const PDe={};function JU(e=PDe){m.useRef(e),xt(),m.useEffect(()=>{},[e])}function zDe(){xt(),m.useRef(!1),m.useEffect(()=>{},[])}function HJ({nodeTypes:e,edgeTypes:t,onInit:n,onNodeClick:o,onEdgeClick:r,onNodeDoubleClick:i,onEdgeDoubleClick:a,onNodeMouseEnter:s,onNodeMouseMove:c,onNodeMouseLeave:l,onNodeContextMenu:h,onSelectionContextMenu:u,onSelectionStart:p,onSelectionEnd:y,connectionLineType:g,connectionLineStyle:k,connectionLineComponent:x,connectionLineContainerStyle:v,selectionKeyCode:M,selectionOnDrag:w,selectionMode:b,multiSelectionKeyCode:C,panActivationKeyCode:_,zoomActivationKeyCode:S,deleteKeyCode:N,onlyRenderVisibleElements:P,elementsSelectable:A,defaultViewport:E,translateExtent:z,minZoom:U,maxZoom:$,preventScrolling:T,defaultMarkerColor:D,zoomOnScroll:O,zoomOnPinch:I,panOnScroll:R,panOnScrollSpeed:L,panOnScrollMode:V,zoomOnDoubleClick:H,panOnDrag:j,onPaneClick:X,onPaneMouseEnter:Z,onPaneMouseMove:J,onPaneMouseLeave:re,onPaneScroll:oe,onPaneContextMenu:ne,paneClickDistance:le,nodeClickDistance:ve,onEdgeContextMenu:ge,onEdgeMouseEnter:xe,onEdgeMouseMove:Te,onEdgeMouseLeave:Ye,reconnectRadius:ue,onReconnect:Ie,onReconnectStart:Pt,onReconnectEnd:wt,noDragClassName:en,noWheelClassName:ce,noPanClassName:Q,disableKeyboardA11y:zt,nodeExtent:yn,rfId:ae,viewport:Y,onViewportChange:he}){return JU(e),JU(t),zDe(),SDe(n),NDe(Y),f.jsx(ZTe,{onPaneClick:X,onPaneMouseEnter:Z,onPaneMouseMove:J,onPaneMouseLeave:re,onPaneContextMenu:ne,onPaneScroll:oe,paneClickDistance:le,deleteKeyCode:N,selectionKeyCode:M,selectionOnDrag:w,selectionMode:b,onSelectionStart:p,onSelectionEnd:y,multiSelectionKeyCode:C,panActivationKeyCode:_,zoomActivationKeyCode:S,elementsSelectable:A,zoomOnScroll:O,zoomOnPinch:I,zoomOnDoubleClick:H,panOnScroll:R,panOnScrollSpeed:L,panOnScrollMode:V,panOnDrag:j,defaultViewport:E,translateExtent:z,minZoom:U,maxZoom:$,onSelectionContextMenu:u,preventScrolling:T,noDragClassName:en,noWheelClassName:ce,noPanClassName:Q,disableKeyboardA11y:zt,onViewportChange:he,isControlledViewport:!!Y,children:f.jsxs(CDe,{children:[f.jsx(bDe,{edgeTypes:t,onEdgeClick:r,onEdgeDoubleClick:a,onReconnect:Ie,onReconnectStart:Pt,onReconnectEnd:wt,onlyRenderVisibleElements:P,onEdgeContextMenu:ge,onEdgeMouseEnter:xe,onEdgeMouseMove:Te,onEdgeMouseLeave:Ye,reconnectRadius:ue,defaultMarkerColor:D,noPanClassName:Q,disableKeyboardA11y:zt,rfId:ae}),f.jsx($De,{style:k,type:g,component:x,containerStyle:v}),f.jsx("div",{className:"react-flow__edgelabel-renderer"}),f.jsx(iDe,{nodeTypes:e,onNodeClick:o,onNodeDoubleClick:i,onNodeMouseEnter:s,onNodeMouseMove:c,onNodeMouseLeave:l,onNodeContextMenu:h,nodeClickDistance:ve,onlyRenderVisibleElements:P,noPanClassName:Q,noDragClassName:en,disableKeyboardA11y:zt,nodeExtent:yn,rfId:ae}),f.jsx("div",{className:"react-flow__viewport-portal"})]})})}HJ.displayName="GraphView";const RDe=m.memo(HJ),eW=({nodes:e,edges:t,defaultNodes:n,defaultEdges:o,width:r,height:i,fitView:a,fitViewOptions:s,minZoom:c=.5,maxZoom:l=2,nodeOrigin:h,nodeExtent:u,zIndexMode:p="basic"}={})=>{const y=new Map,g=new Map,k=new Map,x=new Map,v=o??t??[],M=n??e??[],w=h??[0,0],b=u??of;XQ(k,x,v);const{nodesInitialized:C}=FH(M,y,g,{nodeOrigin:w,nodeExtent:b,zIndexMode:p});let _=[0,0,1];if(a&&r&&i){const S=Nf(y,{filter:E=>!!((E.width||E.initialWidth)&&(E.height||E.initialHeight))}),{x:N,y:P,zoom:A}=UF(S,r,i,c,l,(s==null?void 0:s.padding)??.1);_=[N,P,A]}return{rfId:"1",width:r??0,height:i??0,transform:_,nodes:M,nodesInitialized:C,nodeLookup:y,parentLookup:g,edges:v,edgeLookup:x,connectionLookup:k,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:n!==void 0,hasDefaultEdges:o!==void 0,panZoom:null,minZoom:c,maxZoom:l,translateExtent:of,nodeExtent:b,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:N0.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:w,nodeDragThreshold:1,connectionDragThreshold:1,snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,nodesFocusable:!0,edgesFocusable:!0,edgesReconnectable:!0,elementsSelectable:!0,elevateNodesOnSelect:!0,elevateEdgesOnSelect:!0,selectNodesOnDrag:!0,multiSelectionActive:!1,fitViewQueued:a??!1,fitViewOptions:s,fitViewResolver:null,connection:{...jQ},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:Dze,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1,ariaLabelConfig:EQ,zIndexMode:p,onNodesChangeMiddlewareMap:new Map,onEdgesChangeMiddlewareMap:new Map}},TDe=({nodes:e,edges:t,defaultNodes:n,defaultEdges:o,width:r,height:i,fitView:a,fitViewOptions:s,minZoom:c,maxZoom:l,nodeOrigin:h,nodeExtent:u,zIndexMode:p})=>nTe((y,g)=>{async function k(){const{nodeLookup:x,panZoom:v,fitViewOptions:M,fitViewResolver:w,width:b,height:C,minZoom:_,maxZoom:S}=g();v&&(await Rze({nodes:x,width:b,height:C,panZoom:v,minZoom:_,maxZoom:S},M),w==null||w.resolve(!0),y({fitViewResolver:null}))}return{...eW({nodes:e,edges:t,width:r,height:i,fitView:a,fitViewOptions:s,minZoom:c,maxZoom:l,nodeOrigin:h,nodeExtent:u,defaultNodes:n,defaultEdges:o,zIndexMode:p}),setNodes:x=>{const{nodeLookup:v,parentLookup:M,nodeOrigin:w,elevateNodesOnSelect:b,fitViewQueued:C,zIndexMode:_,nodesSelectionActive:S}=g(),{nodesInitialized:N,hasSelectedNodes:P}=FH(x,v,M,{nodeOrigin:w,nodeExtent:u,elevateNodesOnSelect:b,checkEquality:!0,zIndexMode:_}),A=S&&P;C&&N?(k(),y({nodes:x,nodesInitialized:N,fitViewQueued:!1,fitViewOptions:void 0,nodesSelectionActive:A})):y({nodes:x,nodesInitialized:N,nodesSelectionActive:A})},setEdges:x=>{const{connectionLookup:v,edgeLookup:M}=g();XQ(v,M,x),y({edges:x})},setDefaultNodesAndEdges:(x,v)=>{if(x){const{setNodes:M}=g();M(x),y({hasDefaultNodes:!0})}if(v){const{setEdges:M}=g();M(v),y({hasDefaultEdges:!0})}},updateNodeInternals:x=>{const{triggerNodeChanges:v,nodeLookup:M,parentLookup:w,domNode:b,nodeOrigin:C,nodeExtent:_,debug:S,fitViewQueued:N,zIndexMode:P}=g(),{changes:A,updatedInternals:E}=aRe(x,M,w,b,C,_,P);E&&(nRe(M,w,{nodeOrigin:C,nodeExtent:_,zIndexMode:P}),N?(k(),y({fitViewQueued:!1,fitViewOptions:void 0})):y({}),(A==null?void 0:A.length)>0&&(S&&console.log("React Flow: trigger node changes",A),v==null||v(A)))},updateNodePositions:(x,v=!1)=>{const M=[];let w=[];const{nodeLookup:b,triggerNodeChanges:C,connection:_,updateConnection:S,onNodesChangeMiddlewareMap:N}=g();for(const[P,A]of x){const E=b.get(P),z=!!(E!=null&&E.expandParent&&(E!=null&&E.parentId)&&(A!=null&&A.position)),U={id:P,type:"position",position:z?{x:Math.max(0,A.position.x),y:Math.max(0,A.position.y)}:A.position,dragging:v};if(E&&_.inProgress&&_.fromNode.id===E.id){const $=Od(E,_.fromHandle,fe.Left,!0);S({..._,from:$})}z&&E.parentId&&M.push({id:P,parentId:E.parentId,rect:{...A.internals.positionAbsolute,width:A.measured.width??0,height:A.measured.height??0}}),w.push(U)}if(M.length>0){const{parentLookup:P,nodeOrigin:A}=g(),E=YF(M,b,P,A);w.push(...E)}for(const P of N.values())w=P(w);C(w)},triggerNodeChanges:x=>{const{onNodesChange:v,setNodes:M,nodes:w,hasDefaultNodes:b,debug:C}=g();if(x!=null&&x.length){if(b){const _=pJ(x,w);M(_)}C&&console.log("React Flow: trigger node changes",x),v==null||v(x)}},triggerEdgeChanges:x=>{const{onEdgesChange:v,setEdges:M,edges:w,hasDefaultEdges:b,debug:C}=g();if(x!=null&&x.length){if(b){const _=yJ(x,w);M(_)}C&&console.log("React Flow: trigger edge changes",x),v==null||v(x)}},addSelectedNodes:x=>{const{multiSelectionActive:v,edgeLookup:M,nodeLookup:w,triggerNodeChanges:b,triggerEdgeChanges:C}=g();if(v){const _=x.map(S=>vd(S,!0));b(_);return}b(Yu(w,new Set([...x]),!0)),C(Yu(M))},addSelectedEdges:x=>{const{multiSelectionActive:v,edgeLookup:M,nodeLookup:w,triggerNodeChanges:b,triggerEdgeChanges:C}=g();if(v){const _=x.map(S=>vd(S,!0));C(_);return}C(Yu(M,new Set([...x]))),b(Yu(w,new Set,!0))},unselectNodesAndEdges:({nodes:x,edges:v}={})=>{const{edges:M,nodes:w,nodeLookup:b,triggerNodeChanges:C,triggerEdgeChanges:_}=g(),S=x||w,N=v||M,P=[];for(const E of S){if(!E.selected)continue;const z=b.get(E.id);z&&(z.selected=!1),P.push(vd(E.id,!1))}const A=[];for(const E of N)E.selected&&A.push(vd(E.id,!1));C(P),_(A)},setMinZoom:x=>{const{panZoom:v,maxZoom:M}=g();v==null||v.setScaleExtent([x,M]),y({minZoom:x})},setMaxZoom:x=>{const{panZoom:v,minZoom:M}=g();v==null||v.setScaleExtent([M,x]),y({maxZoom:x})},setTranslateExtent:x=>{var v;(v=g().panZoom)==null||v.setTranslateExtent(x),y({translateExtent:x})},resetSelectedElements:()=>{const{edges:x,nodes:v,triggerNodeChanges:M,triggerEdgeChanges:w,elementsSelectable:b}=g();if(!b)return;const C=v.reduce((S,N)=>N.selected?[...S,vd(N.id,!1)]:S,[]),_=x.reduce((S,N)=>N.selected?[...S,vd(N.id,!1)]:S,[]);M(C),w(_)},setNodeExtent:x=>{const{nodes:v,nodeLookup:M,parentLookup:w,nodeOrigin:b,elevateNodesOnSelect:C,nodeExtent:_,zIndexMode:S}=g();x[0][0]===_[0][0]&&x[0][1]===_[0][1]&&x[1][0]===_[1][0]&&x[1][1]===_[1][1]||(FH(v,M,w,{nodeOrigin:b,nodeExtent:x,elevateNodesOnSelect:C,checkEquality:!1,zIndexMode:S}),y({nodeExtent:x}))},panBy:x=>{const{transform:v,width:M,height:w,panZoom:b,translateExtent:C}=g();return sRe({delta:x,panZoom:b,transform:v,translateExtent:C,width:M,height:w})},setCenter:async(x,v,M)=>{const{width:w,height:b,maxZoom:C,panZoom:_}=g();if(!_)return Promise.resolve(!1);const S=typeof(M==null?void 0:M.zoom)<"u"?M.zoom:C;return await _.setViewport({x:w/2-x*S,y:b/2-v*S,zoom:S},{duration:M==null?void 0:M.duration,ease:M==null?void 0:M.ease,interpolate:M==null?void 0:M.interpolate}),Promise.resolve(!0)},cancelConnection:()=>{y({connection:{...jQ}})},updateConnection:x=>{y({connection:x})},reset:()=>y({...eW()})}},Object.is);function DDe({initialNodes:e,initialEdges:t,defaultNodes:n,defaultEdges:o,initialWidth:r,initialHeight:i,initialMinZoom:a,initialMaxZoom:s,initialFitViewOptions:c,fitView:l,nodeOrigin:h,nodeExtent:u,zIndexMode:p,children:y}){const[g]=m.useState(()=>TDe({nodes:e,edges:t,defaultNodes:n,defaultEdges:o,width:r,height:i,fitView:l,minZoom:a,maxZoom:s,fitViewOptions:c,nodeOrigin:h,nodeExtent:u,zIndexMode:p}));return f.jsx(oTe,{value:g,children:f.jsx(CTe,{children:y})})}function HDe({children:e,nodes:t,edges:n,defaultNodes:o,defaultEdges:r,width:i,height:a,fitView:s,fitViewOptions:c,minZoom:l,maxZoom:h,nodeOrigin:u,nodeExtent:p,zIndexMode:y}){return m.useContext(cR)?f.jsx(f.Fragment,{children:e}):f.jsx(DDe,{initialNodes:t,initialEdges:n,defaultNodes:o,defaultEdges:r,initialWidth:i,initialHeight:a,fitView:s,initialFitViewOptions:c,initialMinZoom:l,initialMaxZoom:h,nodeOrigin:u,nodeExtent:p,zIndexMode:y,children:e})}const ODe={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};function FDe({nodes:e,edges:t,defaultNodes:n,defaultEdges:o,className:r,nodeTypes:i,edgeTypes:a,onNodeClick:s,onEdgeClick:c,onInit:l,onMove:h,onMoveStart:u,onMoveEnd:p,onConnect:y,onConnectStart:g,onConnectEnd:k,onClickConnectStart:x,onClickConnectEnd:v,onNodeMouseEnter:M,onNodeMouseMove:w,onNodeMouseLeave:b,onNodeContextMenu:C,onNodeDoubleClick:_,onNodeDragStart:S,onNodeDrag:N,onNodeDragStop:P,onNodesDelete:A,onEdgesDelete:E,onDelete:z,onSelectionChange:U,onSelectionDragStart:$,onSelectionDrag:T,onSelectionDragStop:D,onSelectionContextMenu:O,onSelectionStart:I,onSelectionEnd:R,onBeforeDelete:L,connectionMode:V,connectionLineType:H=xa.Bezier,connectionLineStyle:j,connectionLineComponent:X,connectionLineContainerStyle:Z,deleteKeyCode:J="Backspace",selectionKeyCode:re="Shift",selectionOnDrag:oe=!1,selectionMode:ne=I0.Full,panActivationKeyCode:le="Space",multiSelectionKeyCode:ve=sf()?"Meta":"Control",zoomActivationKeyCode:ge=sf()?"Meta":"Control",snapToGrid:xe,snapGrid:Te,onlyRenderVisibleElements:Ye=!1,selectNodesOnDrag:ue,nodesDraggable:Ie,autoPanOnNodeFocus:Pt,nodesConnectable:wt,nodesFocusable:en,nodeOrigin:ce=hJ,edgesFocusable:Q,edgesReconnectable:zt,elementsSelectable:yn=!0,defaultViewport:ae=mTe,minZoom:Y=.5,maxZoom:he=2,translateExtent:Ae=of,preventScrolling:He=!0,nodeExtent:Ke,defaultMarkerColor:Bt="#b1b1b7",zoomOnScroll:mn=!0,zoomOnPinch:tn=!0,panOnScroll:ke=!1,panOnScrollSpeed:Se=.5,panOnScrollMode:qt=Ed.Free,zoomOnDoubleClick:Dn=!0,panOnDrag:nn=!0,onPaneClick:l2,onPaneMouseEnter:vo,onPaneMouseMove:Yn,onPaneMouseLeave:Vi,onPaneScroll:Qe,onPaneContextMenu:Xt,paneClickDistance:su=1,nodeClickDistance:cu=0,children:lu,onReconnect:du,onReconnectStart:uu,onReconnectEnd:hu,onEdgeContextMenu:Qa,onEdgeDoubleClick:Ja,onEdgeMouseEnter:es,onEdgeMouseMove:ts,onEdgeMouseLeave:ni,reconnectRadius:oi=10,onNodesChange:fu,onEdgesChange:pu,noDragClassName:zo="nodrag",noWheelClassName:ns="nowheel",noPanClassName:Bi="nopan",fitView:os,fitViewOptions:Re,connectOnClick:Rt,attributionPosition:rs,proOptions:yu,defaultEdgeOptions:dr,elevateNodesOnSelect:ur=!0,elevateEdgesOnSelect:Ro=!1,disableKeyboardA11y:Hn=!1,autoPanOnConnect:To,autoPanOnNodeDrag:on,autoPanSpeed:Zt,connectionRadius:Ui,isValidConnection:xo,onError:is,style:ri,id:ii,nodeDragThreshold:Nt,connectionDragThreshold:hr,viewport:Wi,onViewportChange:mu,width:ai,height:si,colorMode:ci="light",debug:Gi,onScroll:Do,ariaLabelConfig:li,zIndexMode:_n="basic",...Cn},Qn){const wo=ii||"1",Ki=xTe(ci),Xi=m.useCallback(di=>{di.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),Do==null||Do(di)},[Do]);return f.jsx("div",{"data-testid":"rf__wrapper",...Cn,onScroll:Xi,style:{...ri,...ODe},ref:Qn,className:Kt(["react-flow",r,Ki]),id:ii,role:"application",children:f.jsxs(HDe,{nodes:e,edges:t,width:ai,height:si,fitView:os,fitViewOptions:Re,minZoom:Y,maxZoom:he,nodeOrigin:ce,nodeExtent:Ke,zIndexMode:_n,children:[f.jsx(vTe,{nodes:e,edges:t,defaultNodes:n,defaultEdges:o,onConnect:y,onConnectStart:g,onConnectEnd:k,onClickConnectStart:x,onClickConnectEnd:v,nodesDraggable:Ie,autoPanOnNodeFocus:Pt,nodesConnectable:wt,nodesFocusable:en,edgesFocusable:Q,edgesReconnectable:zt,elementsSelectable:yn,elevateNodesOnSelect:ur,elevateEdgesOnSelect:Ro,minZoom:Y,maxZoom:he,nodeExtent:Ke,onNodesChange:fu,onEdgesChange:pu,snapToGrid:xe,snapGrid:Te,connectionMode:V,translateExtent:Ae,connectOnClick:Rt,defaultEdgeOptions:dr,fitView:os,fitViewOptions:Re,onNodesDelete:A,onEdgesDelete:E,onDelete:z,onNodeDragStart:S,onNodeDrag:N,onNodeDragStop:P,onSelectionDrag:T,onSelectionDragStart:$,onSelectionDragStop:D,onMove:h,onMoveStart:u,onMoveEnd:p,noPanClassName:Bi,nodeOrigin:ce,rfId:wo,autoPanOnConnect:To,autoPanOnNodeDrag:on,autoPanSpeed:Zt,onError:is,connectionRadius:Ui,isValidConnection:xo,selectNodesOnDrag:ue,nodeDragThreshold:Nt,connectionDragThreshold:hr,onBeforeDelete:L,debug:Gi,ariaLabelConfig:li,zIndexMode:_n}),f.jsx(RDe,{onInit:l,onNodeClick:s,onEdgeClick:c,onNodeMouseEnter:M,onNodeMouseMove:w,onNodeMouseLeave:b,onNodeContextMenu:C,onNodeDoubleClick:_,nodeTypes:i,edgeTypes:a,connectionLineType:H,connectionLineStyle:j,connectionLineComponent:X,connectionLineContainerStyle:Z,selectionKeyCode:re,selectionOnDrag:oe,selectionMode:ne,deleteKeyCode:J,multiSelectionKeyCode:ve,panActivationKeyCode:le,zoomActivationKeyCode:ge,onlyRenderVisibleElements:Ye,defaultViewport:ae,translateExtent:Ae,minZoom:Y,maxZoom:he,preventScrolling:He,zoomOnScroll:mn,zoomOnPinch:tn,zoomOnDoubleClick:Dn,panOnScroll:ke,panOnScrollSpeed:Se,panOnScrollMode:qt,panOnDrag:nn,onPaneClick:l2,onPaneMouseEnter:vo,onPaneMouseMove:Yn,onPaneMouseLeave:Vi,onPaneScroll:Qe,onPaneContextMenu:Xt,paneClickDistance:su,nodeClickDistance:cu,onSelectionContextMenu:O,onSelectionStart:I,onSelectionEnd:R,onReconnect:du,onReconnectStart:uu,onReconnectEnd:hu,onEdgeContextMenu:Qa,onEdgeDoubleClick:Ja,onEdgeMouseEnter:es,onEdgeMouseMove:ts,onEdgeMouseLeave:ni,reconnectRadius:oi,defaultMarkerColor:Bt,noDragClassName:zo,noWheelClassName:ns,noPanClassName:Bi,rfId:wo,disableKeyboardA11y:Hn,nodeExtent:Ke,viewport:Wi,onViewportChange:mu}),f.jsx(yTe,{onSelectionChange:U}),lu,f.jsx(dTe,{proOptions:yu,position:rs}),f.jsx(lTe,{rfId:wo,disableKeyboardA11y:Hn})]})})}var qDe=mJ(FDe);const VDe=e=>{var t;return(t=e.domNode)==null?void 0:t.querySelector(".react-flow__edgelabel-renderer")};function BDe({children:e}){const t=De(VDe);return t?Kd.createPortal(e,t):null}const UDe=e=>{var t;return(t=e.domNode)==null?void 0:t.querySelector(".react-flow__viewport-portal")};function OJ({children:e}){const t=De(UDe);return t?Kd.createPortal(e,t):null}function FJ(){const e=xt();return m.useCallback(t=>{const{domNode:n,updateNodeInternals:o}=e.getState(),r=Array.isArray(t)?t:[t],i=new Map;r.forEach(a=>{const s=n==null?void 0:n.querySelector(`.react-flow__node[data-id="${a}"]`);s&&i.set(a,{id:a,nodeElement:s,force:!0})}),requestAnimationFrame(()=>o(i,{triggerFitView:!1}))},[])}function tW(e){return De(m.useCallback(n=>n.nodeLookup.get(e),[e]),Lt)}function WDe({dimensions:e,lineWidth:t,variant:n,className:o}){return f.jsx("path",{strokeWidth:t,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`,className:Kt(["react-flow__background-pattern",n,o])})}function GDe({radius:e,className:t}){return f.jsx("circle",{cx:e,cy:e,r:e,className:Kt(["react-flow__background-pattern","dots",t])})}var Pa;(function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"})(Pa||(Pa={}));const KDe={[Pa.Dots]:1,[Pa.Lines]:1,[Pa.Cross]:6},XDe=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function qJ({id:e,variant:t=Pa.Dots,gap:n=20,size:o,lineWidth:r=1,offset:i=0,color:a,bgColor:s,style:c,className:l,patternClassName:h}){const u=m.useRef(null),{transform:p,patternId:y}=De(XDe,Lt),g=o||KDe[t],k=t===Pa.Dots,x=t===Pa.Cross,v=Array.isArray(n)?n:[n,n],M=[v[0]*p[2]||1,v[1]*p[2]||1],w=g*p[2],b=Array.isArray(i)?i:[i,i],C=x?[w,w]:M,_=[b[0]*p[2]||1+C[0]/2,b[1]*p[2]||1+C[1]/2],S=`${y}${e||""}`;return f.jsxs("svg",{className:Kt(["react-flow__background",l]),style:{...c,...dR,"--xy-background-color-props":s,"--xy-background-pattern-color-props":a},ref:u,"data-testid":"rf__background",children:[f.jsx("pattern",{id:S,x:p[0]%M[0],y:p[1]%M[1],width:M[0],height:M[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${_[0]},-${_[1]})`,children:k?f.jsx(GDe,{radius:w/2,className:h}):f.jsx(WDe,{dimensions:C,lineWidth:r,variant:t,className:h})}),f.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${S})`})]})}qJ.displayName="Background";const ZDe=m.memo(qJ);function YDe(){return f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:f.jsx("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function QDe(){return f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:f.jsx("path",{d:"M0 0h32v4.2H0z"})})}function JDe(){return f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:f.jsx("path",{d:"M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0027.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94c-.531 0-.939-.4-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z"})})}function eHe(){return f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:f.jsx("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z"})})}function tHe(){return f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:f.jsx("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047z"})})}function Qu({children:e,className:t,...n}){return f.jsx("button",{type:"button",className:Kt(["react-flow__controls-button",t]),...n,children:e})}const nHe=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom,ariaLabelConfig:e.ariaLabelConfig});function VJ({style:e,showZoom:t=!0,showFitView:n=!0,showInteractive:o=!0,fitViewOptions:r,onZoomIn:i,onZoomOut:a,onFitView:s,onInteractiveChange:c,className:l,children:h,position:u="bottom-left",orientation:p="vertical","aria-label":y}){const g=xt(),{isInteractive:k,minZoomReached:x,maxZoomReached:v,ariaLabelConfig:M}=De(nHe,Lt),{zoomIn:w,zoomOut:b,fitView:C}=lR(),_=()=>{w(),i==null||i()},S=()=>{b(),a==null||a()},N=()=>{C(r),s==null||s()},P=()=>{g.setState({nodesDraggable:!k,nodesConnectable:!k,elementsSelectable:!k}),c==null||c(!k)},A=p==="horizontal"?"horizontal":"vertical";return f.jsxs(P0,{className:Kt(["react-flow__controls",A,l]),position:u,style:e,"data-testid":"rf__controls","aria-label":y??M["controls.ariaLabel"],children:[t&&f.jsxs(f.Fragment,{children:[f.jsx(Qu,{onClick:_,className:"react-flow__controls-zoomin",title:M["controls.zoomIn.ariaLabel"],"aria-label":M["controls.zoomIn.ariaLabel"],disabled:v,children:f.jsx(YDe,{})}),f.jsx(Qu,{onClick:S,className:"react-flow__controls-zoomout",title:M["controls.zoomOut.ariaLabel"],"aria-label":M["controls.zoomOut.ariaLabel"],disabled:x,children:f.jsx(QDe,{})})]}),n&&f.jsx(Qu,{className:"react-flow__controls-fitview",onClick:N,title:M["controls.fitView.ariaLabel"],"aria-label":M["controls.fitView.ariaLabel"],children:f.jsx(JDe,{})}),o&&f.jsx(Qu,{className:"react-flow__controls-interactive",onClick:P,title:M["controls.interactive.ariaLabel"],"aria-label":M["controls.interactive.ariaLabel"],children:k?f.jsx(tHe,{}):f.jsx(eHe,{})}),h]})}VJ.displayName="Controls";const oHe=m.memo(VJ);function rHe({id:e,x:t,y:n,width:o,height:r,style:i,color:a,strokeColor:s,strokeWidth:c,className:l,borderRadius:h,shapeRendering:u,selected:p,onClick:y}){const{background:g,backgroundColor:k}=i||{},x=a||g||k;return f.jsx("rect",{className:Kt(["react-flow__minimap-node",{selected:p},l]),x:t,y:n,rx:h,ry:h,width:o,height:r,style:{fill:x,stroke:s,strokeWidth:c},shapeRendering:u,onClick:y?v=>y(v,e):void 0})}const iHe=m.memo(rHe),aHe=e=>e.nodes.map(t=>t.id),qT=e=>e instanceof Function?e:()=>e;function sHe({nodeStrokeColor:e,nodeColor:t,nodeClassName:n="",nodeBorderRadius:o=5,nodeStrokeWidth:r,nodeComponent:i=iHe,onClick:a}){const s=De(aHe,Lt),c=qT(t),l=qT(e),h=qT(n),u=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return f.jsx(f.Fragment,{children:s.map(p=>f.jsx(lHe,{id:p,nodeColorFunc:c,nodeStrokeColorFunc:l,nodeClassNameFunc:h,nodeBorderRadius:o,nodeStrokeWidth:r,NodeComponent:i,onClick:a,shapeRendering:u},p))})}function cHe({id:e,nodeColorFunc:t,nodeStrokeColorFunc:n,nodeClassNameFunc:o,nodeBorderRadius:r,nodeStrokeWidth:i,shapeRendering:a,NodeComponent:s,onClick:c}){const{node:l,x:h,y:u,width:p,height:y}=De(g=>{const k=g.nodeLookup.get(e);if(!k)return{node:void 0,x:0,y:0,width:0,height:0};const x=k.internals.userNode,{x:v,y:M}=k.internals.positionAbsolute,{width:w,height:b}=Oi(x);return{node:x,x:v,y:M,width:w,height:b}},Lt);return!l||l.hidden||!HQ(l)?null:f.jsx(s,{x:h,y:u,width:p,height:y,style:l.style,selected:!!l.selected,className:o(l),color:t(l),borderRadius:r,strokeColor:n(l),strokeWidth:i,shapeRendering:a,onClick:c,id:l.id})}const lHe=m.memo(cHe);var dHe=m.memo(sHe);const uHe=200,hHe=150,fHe=e=>!e.hidden,pHe=e=>{const t={x:-e.transform[0]/e.transform[2],y:-e.transform[1]/e.transform[2],width:e.width/e.transform[2],height:e.height/e.transform[2]};return{viewBB:t,boundingRect:e.nodeLookup.size>0?DQ(Nf(e.nodeLookup,{filter:fHe}),t):t,rfId:e.rfId,panZoom:e.panZoom,translateExtent:e.translateExtent,flowWidth:e.width,flowHeight:e.height,ariaLabelConfig:e.ariaLabelConfig}},yHe="react-flow__minimap-desc";function BJ({style:e,className:t,nodeStrokeColor:n,nodeColor:o,nodeClassName:r="",nodeBorderRadius:i=5,nodeStrokeWidth:a,nodeComponent:s,bgColor:c,maskColor:l,maskStrokeColor:h,maskStrokeWidth:u,position:p="bottom-right",onClick:y,onNodeClick:g,pannable:k=!1,zoomable:x=!1,ariaLabel:v,inversePan:M,zoomStep:w=1,offsetScale:b=5}){const C=xt(),_=m.useRef(null),{boundingRect:S,viewBB:N,rfId:P,panZoom:A,translateExtent:E,flowWidth:z,flowHeight:U,ariaLabelConfig:$}=De(pHe,Lt),T=(e==null?void 0:e.width)??uHe,D=(e==null?void 0:e.height)??hHe,O=S.width/T,I=S.height/D,R=Math.max(O,I),L=R*T,V=R*D,H=b*R,j=S.x-(L-S.width)/2-H,X=S.y-(V-S.height)/2-H,Z=L+H*2,J=V+H*2,re=`${yHe}-${P}`,oe=m.useRef(0),ne=m.useRef();oe.current=R,m.useEffect(()=>{if(_.current&&A)return ne.current=mRe({domNode:_.current,panZoom:A,getTransform:()=>C.getState().transform,getViewScale:()=>oe.current}),()=>{var xe;(xe=ne.current)==null||xe.destroy()}},[A]),m.useEffect(()=>{var xe;(xe=ne.current)==null||xe.update({translateExtent:E,width:z,height:U,inversePan:M,pannable:k,zoomStep:w,zoomable:x})},[k,x,M,w,E,z,U]);const le=y?xe=>{var ue;const[Te,Ye]=((ue=ne.current)==null?void 0:ue.pointer(xe))||[0,0];y(xe,{x:Te,y:Ye})}:void 0,ve=g?m.useCallback((xe,Te)=>{const Ye=C.getState().nodeLookup.get(Te).internals.userNode;g(xe,Ye)},[]):void 0,ge=v??$["minimap.ariaLabel"];return f.jsx(P0,{position:p,style:{...e,"--xy-minimap-background-color-props":typeof c=="string"?c:void 0,"--xy-minimap-mask-background-color-props":typeof l=="string"?l:void 0,"--xy-minimap-mask-stroke-color-props":typeof h=="string"?h:void 0,"--xy-minimap-mask-stroke-width-props":typeof u=="number"?u*R:void 0,"--xy-minimap-node-background-color-props":typeof o=="string"?o:void 0,"--xy-minimap-node-stroke-color-props":typeof n=="string"?n:void 0,"--xy-minimap-node-stroke-width-props":typeof a=="number"?a:void 0},className:Kt(["react-flow__minimap",t]),"data-testid":"rf__minimap",children:f.jsxs("svg",{width:T,height:D,viewBox:`${j} ${X} ${Z} ${J}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":re,ref:_,onClick:le,children:[ge&&f.jsx("title",{id:re,children:ge}),f.jsx(dHe,{onClick:ve,nodeColor:o,nodeStrokeColor:n,nodeBorderRadius:i,nodeClassName:r,nodeStrokeWidth:a,nodeComponent:s}),f.jsx("path",{className:"react-flow__minimap-mask",d:`M${j-H},${X-H}h${Z+H*2}v${J+H*2}h${-Z-H*2}z
8468
8468
  M${N.x},${N.y}h${N.width}v${N.height}h${-N.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}BJ.displayName="MiniMap";const mHe=m.memo(BJ),gHe=e=>t=>e?`${Math.max(1/t.transform[2],1)}`:void 0,kHe={[Oa.Line]:"right",[Oa.Handle]:"bottom-right"};function vHe({nodeId:e,position:t,variant:n=Oa.Handle,className:o,style:r=void 0,children:i,color:a,minWidth:s=10,minHeight:c=10,maxWidth:l=Number.MAX_VALUE,maxHeight:h=Number.MAX_VALUE,keepAspectRatio:u=!1,resizeDirection:p,autoScale:y=!0,shouldResize:g,onResizeStart:k,onResize:x,onResizeEnd:v}){const M=xJ(),w=typeof e=="string"?e:M,b=xt(),C=m.useRef(null),_=n===Oa.Handle,S=De(m.useCallback(gHe(_&&y),[_,y]),Lt),N=m.useRef(null),P=t??kHe[n];m.useEffect(()=>{if(!(!C.current||!w))return N.current||(N.current=ARe({domNode:C.current,nodeId:w,getStoreItems:()=>{const{nodeLookup:E,transform:z,snapGrid:U,snapToGrid:$,nodeOrigin:T,domNode:D}=b.getState();return{nodeLookup:E,transform:z,snapGrid:U,snapToGrid:$,nodeOrigin:T,paneDomNode:D}},onChange:(E,z)=>{const{triggerNodeChanges:U,nodeLookup:$,parentLookup:T,nodeOrigin:D}=b.getState(),O=[],I={x:E.x,y:E.y},R=$.get(w);if(R&&R.expandParent&&R.parentId){const L=R.origin??D,V=E.width??R.measured.width??0,H=E.height??R.measured.height??0,j={id:R.id,parentId:R.parentId,rect:{width:V,height:H,...OQ({x:E.x??R.position.x,y:E.y??R.position.y},{width:V,height:H},R.parentId,$,L)}},X=YF([j],$,T,D);O.push(...X),I.x=E.x?Math.max(L[0]*V,E.x):void 0,I.y=E.y?Math.max(L[1]*H,E.y):void 0}if(I.x!==void 0&&I.y!==void 0){const L={id:w,type:"position",position:{...I}};O.push(L)}if(E.width!==void 0&&E.height!==void 0){const V={id:w,type:"dimensions",resizing:!0,setAttributes:p?p==="horizontal"?"width":"height":!0,dimensions:{width:E.width,height:E.height}};O.push(V)}for(const L of z){const V={...L,type:"position"};O.push(V)}U(O)},onEnd:({width:E,height:z})=>{const U={id:w,type:"dimensions",resizing:!1,dimensions:{width:E,height:z}};b.getState().triggerNodeChanges([U])}})),N.current.update({controlPosition:P,boundaries:{minWidth:s,minHeight:c,maxWidth:l,maxHeight:h},keepAspectRatio:u,resizeDirection:p,onResizeStart:k,onResize:x,onResizeEnd:v,shouldResize:g}),()=>{var E;(E=N.current)==null||E.destroy()}},[P,s,c,l,h,u,k,x,v,g]);const A=P.split("-");return f.jsx("div",{className:Kt(["react-flow__resize-control","nodrag",...A,n,o]),ref:C,style:{...r,scale:S,...a&&{[_?"backgroundColor":"borderColor"]:a}},children:i})}const nW=m.memo(vHe),xHe=24,wHe=e=>({type:rf.ArrowClosed,width:18,height:18,...e?{color:e}:{}}),MHe={solid:{},dashed:{strokeDasharray:"6 4"},dotted:{strokeDasharray:"2 4"}},bHe=3,oW=new WeakMap,_He=(e,t,n=!1)=>{const o=oW.get(e);if(o&&o.isAdjacentToRunning===t&&o.selected===n)return o.edge;const r=e.style?MHe[e.style]:{},i=St(e.color,"edge"),a=e.borderSize??2,s=n?Math.max(bHe,a):a,l={...r,...i,...n?{strokeWidth:s,opacity:1}:{strokeWidth:s}},h=e.direction??"forward",u=i.stroke,p=wHe(u),y=h==="backward"||h==="both"?p:void 0,g=h==="forward"||h==="both"?p:void 0,k={id:e.id,source:e.source,target:e.target,sourceHandle:e.sourceHandle,targetHandle:e.targetHandle,type:"editableEdge",label:e.label,animated:t,data:{path:e.path,sourceHandleAutoPicked:e.sourceHandleAutoPicked,targetHandleAutoPicked:e.targetHandleAutoPicked,sourcePin:e.sourcePin,targetPin:e.targetPin,fontSize:e.fontSize},style:l,markerStart:y,markerEnd:g,interactionWidth:xHe};return oW.set(e,{isAdjacentToRunning:t,selected:n,edge:k}),k},CHe=(e,t={})=>{const n=t.setTimer??((l,h)=>globalThis.setTimeout(l,h)),o=t.clearTimer??(l=>{globalThis.clearTimeout(l)});let r=null,i=null;return{schedule:l=>{r!==null&&o(r),i=l,r=n(()=>{r=null;const h=i;i=null,h&&h()},e)},flush:()=>{r!==null&&(o(r),r=null);const l=i;i=null,l&&l()},cancel:()=>{r!==null&&(o(r),r=null),i=null},get pending(){return r!==null}}},UJ="seeflow:detail-panel-width",ju=380,UH=320,WH=800;function GH(e){return Number.isFinite(e)?e<UH?UH:e>WH?WH:e:ju}function SHe(){if(typeof window>"u")return ju;try{const e=window.localStorage.getItem(UJ);if(e===null)return ju;const t=Number(e);return!Number.isFinite(t)||t<UH||t>WH?ju:t}catch{return ju}}function LHe(e){if(!(typeof window>"u"))try{const t=GH(e);window.localStorage.setItem(UJ,String(t))}catch{}}function NHe(e,t,n,o){const r=typeof window>"u"?null:window;if(!r)return;let i=GH(e);const a=c=>{i=GH(e+(t-c.clientX)),n.onWidth(i)},s=()=>{r.removeEventListener("pointermove",a),r.removeEventListener("pointerup",s),r.removeEventListener("pointercancel",s),n.onCommit(i)};r.addEventListener("pointermove",a),r.addEventListener("pointerup",s),r.addEventListener("pointercancel",s)}function IHe(e,t,n){return`${n!==void 0?n.replace(/\/+$/,""):"/api/projects"}/${encodeURIComponent(e)}/files/${encodeURI(t)}`}const tz=(e,t)=>{const n=e.w/2,o=e.h/2,r=e.x+n,i=e.y+o,a=t.x-r,s=t.y-i;if(a===0&&s===0)return{x:r,y:i,side:"right"};const c=Math.abs(a),l=Math.abs(s),h=c===0?Number.POSITIVE_INFINITY:n/c,u=l===0?Number.POSITIVE_INFINITY:o/l,p=Math.min(h,u),y=r+a*p,g=i+s*p,k=c*o>=l*n?a>=0?"right":"left":s>=0?"bottom":"top";return{x:y,y:g,side:k}},KH=(e,t)=>{const n=Math.max(0,Math.min(e.w,t.x-e.x)),o=Math.max(0,Math.min(e.h,t.y-e.y)),r=n,i=e.w-n,a=o,s=e.h-o,c=Math.min(r,i,a,s),l=e.h===0?0:o/e.h,h=e.w===0?0:n/e.w;return c===r?{side:"left",t:l}:c===i?{side:"right",t:l}:c===a?{side:"top",t:h}:{side:"bottom",t:h}},nz=(e,t)=>{const n=Math.min(1,Math.max(0,t.t));let o,r;switch(t.side){case"top":o=e.x+n*e.w,r=e.y;break;case"bottom":o=e.x+n*e.w,r=e.y+e.h;break;case"left":o=e.x,r=e.y+n*e.h;break;case"right":o=e.x+e.w,r=e.y+n*e.h;break}return{x:o,y:r,side:t.side}},AHe=(e,t)=>{const n=o=>Math.min(1,Math.max(0,o));switch(t.side){case"top":case"bottom":return{side:t.side,t:e.w===0?0:n((t.x-e.x)/e.w)};case"left":case"right":return{side:t.side,t:e.h===0?0:n((t.y-e.y)/e.h)}}},EHe=(e,t)=>{const n=(e==null?void 0:e.fallback)??{x:0,y:0,side:"right"},o=(t==null?void 0:t.fallback)??{x:0,y:0,side:"left"};if(!e||!t)return{source:n,target:o};const r={x:e.box.x+e.box.w/2,y:e.box.y+e.box.h/2},i={x:t.box.x+t.box.w/2,y:t.box.y+t.box.h/2},a=e.pin?nz(e.box,e.pin):e.autoPicked===!1?e.fallback:tz(e.box,i),s=t.pin?nz(t.box,t.pin):t.autoPicked===!1?t.fallback:tz(t.box,r);return{source:a,target:s}};function ba({initialValue:e,onCommit:t,onExit:n,multiline:o=!1,commitMode:r="enter-commits",required:i=!1,field:a,className:s,style:c,placeholder:l}){const h=o||r==="blur-only",u=m.useRef(null),[p,y]=m.useState(!1),[g,k]=m.useState(e.length===0),x=m.useRef(CHe(400)),v=m.useRef(e),M=m.useRef(!1);m.useEffect(()=>{const E=u.current;if(!E)return;E.textContent=e,E.focus();const z=window.getSelection();if(z){const $=document.createRange();$.selectNodeContents(E),z.removeAllRanges(),z.addRange($)}const U=x.current;return()=>{U.flush()}},[]);const w=()=>{const E=u.current;return E?h?E.innerText:E.textContent??"":""},b=E=>{x.current.cancel(),E!==v.current&&(v.current=E,t(E))},C=()=>{const E=w();if(k(E.length===0),i&&E.trim().length===0){x.current.cancel();return}x.current.schedule(()=>b(E))},_=()=>{x.current.cancel();const E=w();if(i&&E.trim().length===0){const z=u.current;z&&(z.textContent=e),y(!0),setTimeout(()=>y(!1),320),n();return}b(E),n()},S=()=>{x.current.cancel();const E=u.current;E&&(E.textContent=e),n()},N=E=>{if(E.stopPropagation(),E.nativeEvent.stopPropagation(),E.key==="Enter"){if(r==="blur-only"||o&&E.shiftKey){E.preventDefault(),document.execCommand("insertText",!1,`
8469
- `);return}E.preventDefault(),M.current=!0,_();return}E.key==="Escape"&&(E.preventDefault(),M.current=!0,S())},P=E=>{E.preventDefault();const z=E.clipboardData.getData("text/plain");document.execCommand("insertText",!1,z)},A=()=>{if(M.current){M.current=!1;return}_()};return f.jsx("div",{ref:u,"data-testid":"inline-edit-input","data-field":a,"data-placeholder":l,role:"textbox",tabIndex:0,contentEditable:!0,suppressContentEditableWarning:!0,spellCheck:!1,onInput:C,onKeyDown:N,onPaste:P,onBlur:A,onMouseDown:E=>E.stopPropagation(),onClick:E=>E.stopPropagation(),onDoubleClick:E=>E.stopPropagation(),style:c,className:te("nodrag nopan nowheel sf:block sf:w-full sf:bg-transparent sf:p-0 sf:text-inherit sf:outline-none","sf:whitespace-pre-wrap sf:wrap-break-word",g&&l?"inline-edit-empty":"",p?"inline-edit-shake":"",s)})}const WJ=8,rW=12,iW={height:`${WJ}px`,borderColor:"transparent"},aW={width:`${WJ}px`,borderColor:"transparent"},jHe={width:`${rW}px`,height:`${rW}px`,background:"transparent",border:"none"},$He={width:"calc(10px / var(--rf-zoom, 1))",height:"calc(10px / var(--rf-zoom, 1))",background:"hsl(var(--background))",border:"calc(1px / var(--rf-zoom, 1)) solid hsl(var(--primary) / 0.6)",borderRadius:"calc(2px / var(--rf-zoom, 1))",zIndex:1},PHe=[{position:"top",style:iW},{position:"bottom",style:iW},{position:"left",style:aW},{position:"right",style:aW}],zHe=["top-left","top-right","bottom-left","bottom-right"],sW={pointerEvents:"none",cursor:"default"};function Xd({visible:e,minWidth:t=80,minHeight:n=40,onResizeStart:o,onResize:r,onResizeEnd:i,cornerVariant:a="invisible"}){const s=a==="visible"?$He:jHe,c=h=>e?h:{...h,...sW},l=e?s:{...s,opacity:0,...sW};return f.jsxs(f.Fragment,{children:[PHe.map(({position:h,style:u})=>f.jsx(nW,{position:h,variant:Oa.Line,minWidth:t,minHeight:n,style:c(u),onResizeStart:o,onResize:r,onResizeEnd:i,children:f.jsx("span",{"data-testid":"resize-control","data-position":h})},h)),zHe.map(h=>f.jsx(nW,{position:h,variant:Oa.Handle,minWidth:t,minHeight:n,style:l,autoScale:!1,onResizeStart:o,onResize:r,onResizeEnd:i,children:f.jsx("span",{"data-testid":"resize-control","data-position":h})},h))]})}function cW(e){const t=e==null?void 0:e.sourceEvent;return{metaKey:t==null?void 0:t.metaKey,ctrlKey:t==null?void 0:t.ctrlKey}}function RHe(e,t){return{left:t.x!==e.x,right:t.x+t.width!==e.x+e.width,top:t.y!==e.y,bottom:t.y+t.height!==e.y+e.height}}function THe(e){return!!(e.left||e.right||e.top||e.bottom)}function Zd(e){const{onResize:t,onResizeEnd:n,onResizeFinal:o,setResizing:r,nodeId:i,alignment:a}=e,[s,c]=m.useState(!1),l=m.useRef(null),h=m.useRef(!1),u=m.useRef(t),p=m.useRef(n),y=m.useRef(o),g=m.useRef(r),k=m.useRef(a),x=m.useRef(i);m.useEffect(()=>{u.current=t},[t]),m.useEffect(()=>{p.current=n},[n]),m.useEffect(()=>{y.current=o},[o]),m.useEffect(()=>{g.current=r},[r]),m.useEffect(()=>{k.current=a},[a]),m.useEffect(()=>{x.current=i},[i]);const v=m.useCallback((b,C)=>{var _;c(!0),(_=g.current)==null||_.call(g,!0),h.current=!1,l.current=C?{x:C.x,y:C.y,width:C.width,height:C.height}:null},[]),M=m.useCallback((b,C)=>{var A;let _={x:C.x,y:C.y,width:C.width,height:C.height};const S=k.current,N=x.current,P=l.current;if(S&&N&&P){if(!h.current){const E=RHe(P,C);THe(E)&&(S.beginResize(N,E),h.current=!0)}if(h.current){const{snappedRect:E}=S.applyResizeSnap({id:N,x:C.x,y:C.y,w:C.width,h:C.height},cW(b));_={x:E.x,y:E.y,width:E.w,height:E.h}}}(A=u.current)==null||A.call(u,_)},[]),w=m.useCallback((b,C)=>{var E,z,U,$;c(!1),(E=g.current)==null||E.call(g,!1);const _=l.current;l.current=null;const S=h.current;h.current=!1;const N=k.current,P=x.current;if(_&&_.width===C.width&&_.height===C.height){S&&(N==null||N.endResize());return}let A={x:C.x,y:C.y,width:C.width,height:C.height};if(N&&P&&S){const{snappedRect:T}=N.applyResizeSnap({id:P,x:C.x,y:C.y,w:C.width,h:C.height},cW(b));A={x:T.x,y:T.y,width:T.w,height:T.h}}N==null||N.endResize(),(z=u.current)==null||z.call(u,A),(U=p.current)==null||U.call(p,A),_&&(($=y.current)==null||$.call(y,A,_))},[]);return{isResizing:s,onResizeStart:v,onResizeEvent:M,onResizeEnd:w}}const z0={width:48,height:48},DHe=24,HHe=24,Np="sf:opacity-0 sf:transition-opacity";function OHe(e){return St(e,"text").color??"currentColor"}function FHe({id:e,data:t,selected:n,isConnectable:o}){const{onResizeStart:r,onResizeEvent:i,onResizeEnd:a}=Zd({onResize:x=>{var v;return(v=t.onResize)==null?void 0:v.call(t,e,x)},onResizeEnd:x=>{var v;return(v=t.onResizeEnd)==null?void 0:v.call(t,e,x)},setResizing:t.setResizing,nodeId:e,alignment:t.resizeAlignment}),s=t.width!==void 0||t.height!==void 0,c=!!t.onNameChange,[l,h]=m.useState(!1),{studioBaseUrl:u}=m.useContext(zF),p=OHe(t.color),y=t.strokeWidth??2,g={...s?{}:{width:z0.width,height:z0.height}},k=x=>{!c||l||(x.stopPropagation(),h(!0))};return f.jsxs("div",{className:te("sf:group sf:relative",s?"sf:h-full sf:w-full":""),style:g,"data-testid":"icon-node","data-node-type":"icon",onDoubleClick:k,children:[f.jsx(Xd,{visible:!!n&&!!t.onResize&&!l,cornerVariant:"visible",minWidth:DHe,minHeight:HHe,onResizeStart:r,onResize:i,onResizeEnd:a}),f.jsx(ct,{type:"target",position:fe.Top,id:"t",isConnectable:o,className:te(Np,n&&"sf:opacity-100!")}),f.jsx(ct,{type:"target",position:fe.Left,id:"l",isConnectable:o,className:te(Np,n&&"sf:opacity-100!")}),f.jsx(UY,{iconId:t.icon,studioBaseUrl:u,color:p,strokeWidth:y,absoluteStrokeWidth:!0,ariaLabel:t.alt,className:"sf:block sf:h-full sf:w-full sf:pointer-events-none sf:select-none"}),l&&c?f.jsx("div",{className:"sf:absolute sf:left-0 sf:right-0 sf:top-full sf:mt-1 sf:text-center sf:text-xs sf:text-muted-foreground",children:f.jsx(ba,{initialValue:t.name??"",field:"icon-node-label",onCommit:x=>{var v;return(v=t.onNameChange)==null?void 0:v.call(t,e,x)},onExit:()=>h(!1),placeholder:"Label"})}):t.name?f.jsx("span",{"data-testid":"icon-node-label",className:"sf:pointer-events-none sf:absolute sf:left-0 sf:right-0 sf:top-full sf:mt-1 sf:truncate sf:text-center sf:text-xs sf:text-muted-foreground sf:select-none",children:t.name}):null,f.jsx(ct,{type:"source",position:fe.Right,id:"r",isConnectable:o,className:te(Np,n&&"sf:opacity-100!")}),f.jsx(ct,{type:"source",position:fe.Bottom,id:"b",isConnectable:o,className:te(Np,n&&"sf:opacity-100!")})]})}function qHe(e,t){return e.selected===t.selected&&e.data===t.data&&e.width===t.width&&e.height===t.height}const VHe=m.memo(FHe,qHe);function BHe(e,t){const n=e.screenToFlowPosition({x:t.width/2,y:t.height/2});return{x:n.x-z0.width/2,y:n.y-z0.height/2}}const GJ="seeflow:icon-recents",UHe=16;function KJ(){if(typeof window>"u")return[];try{const e=window.localStorage.getItem(GJ);if(e===null)return[];const t=JSON.parse(e);return Array.isArray(t)?t.every(n=>typeof n=="string")?t:[]:[]}catch{return[]}}function WHe(e){if(!(typeof window>"u"))try{const n=KJ().filter(r=>r!==e),o=[e,...n].slice(0,UHe);window.localStorage.setItem(GJ,JSON.stringify(o))}catch{}}const GHe=typeof navigator<"u"&&typeof navigator.platform=="string"&&navigator.platform.toLowerCase().includes("mac"),KHe=e=>e.length===1?e.toUpperCase():e==="Escape"?"Esc":e,Dt=(e,t=GHe)=>{const n=KHe(e.key);if(t){let r="";return e.meta&&(r+="⌘"),e.alt&&(r+="⌥"),e.shift&&(r+="⇧"),`${r}${n}`}const o=[];return e.meta&&o.push("Ctrl"),e.shift&&o.push("Shift"),e.alt&&o.push("Alt"),o.push(n),o.join("+")},JF=[{id:"tool.select",label:"Select tool",description:"Switch to the selection tool",category:"Tools",shortcut:Dt({key:"V"})},{id:"tool.hand",label:"Hand tool",description:"Pan the canvas; node interaction is suspended while armed",category:"Tools",shortcut:Dt({key:"H"})},{id:"tool.rectangle",label:"Rectangle",description:"Draw rectangle nodes",category:"Tools",shortcut:Dt({key:"R"})},{id:"tool.ellipse",label:"Ellipse",description:"Draw ellipse nodes",category:"Tools",shortcut:Dt({key:"O"})},{id:"tool.text",label:"Text",description:"Add a text node",category:"Tools",shortcut:Dt({key:"T"})},{id:"tool.sticky",label:"Sticky note",description:"Add a sticky note",category:"Tools",shortcut:Dt({key:"S"})},{id:"tool.database",label:"Database",description:"Add a database node",category:"Tools",shortcut:Dt({key:"D"})},{id:"tool.server",label:"Server",description:"Add a server node",category:"Tools"},{id:"tool.user",label:"User",description:"Add a user node",category:"Tools"},{id:"tool.queue",label:"Queue",description:"Add a queue node",category:"Tools"},{id:"tool.cloud",label:"Cloud",description:"Add a cloud node",category:"Tools"},{id:"tool.diamond",label:"Diamond",description:"Add a diamond node (decision / gateway)",category:"Tools"},{id:"tool.hexagon",label:"Hexagon",description:"Add a hexagon node (microservice)",category:"Tools"},{id:"tool.linkflow",label:"Link node",description:"Add a link node and pick a target flow",category:"Tools"},{id:"edit.undo",label:"Undo",category:"Edit",shortcut:Dt({meta:!0,key:"Z"}),enabled:e=>e.canUndo},{id:"edit.redo",label:"Redo",category:"Edit",shortcut:Dt({meta:!0,shift:!0,key:"Z"}),enabled:e=>e.canRedo},{id:"edit.copy",label:"Copy",category:"Edit",shortcut:Dt({meta:!0,key:"C"}),enabled:e=>e.hasSelection},{id:"edit.paste",label:"Paste",category:"Edit",shortcut:Dt({meta:!0,key:"V"}),enabled:e=>e.hasClipboard},{id:"edit.duplicate",label:"Duplicate",category:"Edit",shortcut:Dt({meta:!0,key:"D"}),enabled:e=>e.hasSelection},{id:"edit.delete",label:"Delete",category:"Edit",shortcut:Dt({key:"Delete"}),enabled:e=>e.hasSelection},{id:"edit.selectAll",label:"Select all",category:"Edit",shortcut:Dt({meta:!0,key:"A"})},{id:"view.fit",label:"Fit view",description:"Fit everything in the viewport",category:"View",shortcut:Dt({meta:!0,key:"0"})},{id:"view.zoomIn",label:"Zoom in",category:"View",shortcut:Dt({meta:!0,key:"="})},{id:"view.zoomOut",label:"Zoom out",category:"View",shortcut:Dt({meta:!0,key:"-"})},{id:"view.zoom100",label:"Zoom to 100%",category:"View",shortcut:Dt({key:"1"})},{id:"view.zoomToSelection",label:"Zoom to selection",category:"View",shortcut:Dt({key:"F"}),enabled:e=>e.hasSelection},{id:"layout.tidy",label:"Tidy layout",description:"Auto-layout the canvas or current selection",category:"Layout",shortcut:Dt({meta:!0,shift:!0,key:"L"})},{id:"selection.deselect",label:"Deselect",description:"Clear selection and exit draw mode",category:"Selection",shortcut:Dt({key:"Escape"})},{id:"help.commandPalette",label:"Open command palette",category:"Help",shortcut:Dt({meta:!0,key:"P"})},{id:"export.pdf",label:"Export to PDF",description:"Download the current canvas as a PDF",category:"File",enabled:e=>e.canExportDemo},{id:"export.png",label:"Export as image",description:"Download the current canvas as a PNG",category:"File",enabled:e=>e.canExportDemo}],VT=e=>{const t=JF.find(n=>n.id===e);return t?t.shortcut?`${t.label} (${t.shortcut})`:t.label:""},XHe=1,ZHe=10,YHe=e=>{if(e.metaKey||e.ctrlKey||e.altKey)return null;const t=e.shiftKey?ZHe:XHe;switch(e.key){case"ArrowLeft":return{dx:-t,dy:0};case"ArrowRight":return{dx:t,dy:0};case"ArrowUp":return{dx:0,dy:-t};case"ArrowDown":return{dx:0,dy:t};default:return null}},QHe=e=>{if(!(e.metaKey||e.ctrlKey)||e.altKey)return null;switch(e.key){case"0":return"fit";case"=":case"+":return"in";case"-":case"_":return"out";default:return null}},JHe=(e,t,n)=>{if(t.length===0)return[];const o=new Map(n.map(i=>[i.id,i])),r=[];for(const i of t){const a=o.get(i);a&&r.push({id:i,position:{x:a.position.x+e.dx,y:a.position.y+e.dy}})}return r},eOe=({event:e,isEditableActive:t,hasNodes:n,hasConnectors:o,selectedIds:r,hasClipboard:i})=>{if(!(e.metaKey||e.ctrlKey))return{type:"noop"};if(e.shiftKey||e.altKey)return{type:"noop"};const a=e.key.toLowerCase();return a!=="a"&&a!=="c"&&a!=="v"&&a!=="d"?{type:"noop"}:t?{type:"noop"}:a==="a"?!n&&!o?{type:"noop"}:{type:"selectAll"}:a==="c"?r.length===0?{type:"noop"}:{type:"copy",ids:r}:a==="d"?r.length===0?{type:"noop"}:{type:"duplicate",ids:r}:i?{type:"paste"}:{type:"noop"}},tOe=(e,t)=>{if(t.isEditableActive||!(e.metaKey||e.ctrlKey)||e.altKey)return null;const n=e.key.toLowerCase();return n==="z"?e.shiftKey?"redo":"undo":n==="y"&&!e.shiftKey?"redo":null},nOe=e=>{if(e.metaKey||e.ctrlKey||e.shiftKey||e.altKey)return null;switch(e.key.toLowerCase()){case"v":return"select";case"h":return"hand";case"r":return"rectangle";case"o":return"ellipse";case"t":return"text";case"s":return"sticky";case"d":return"database";default:return null}},ca="seeflow",XJ=e=>`${e}:last-used-style:v1`,BT=()=>({node:{},connector:{}}),UT=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),eq=e=>{var t;try{const n=(t=globalThis.localStorage)==null?void 0:t.getItem(XJ(e));if(!n)return BT();const o=JSON.parse(n);if(!UT(o))return BT();const r=UT(o.node)?o.node:{},i=UT(o.connector)?o.connector:{};return{node:r,connector:i}}catch{return BT()}},ZJ=(e,t)=>{var n;try{(n=globalThis.localStorage)==null||n.setItem(XJ(e),JSON.stringify(t))}catch{}},O2=e=>eq(e),lW=(e,t)=>{const{alt:n,...o}=t,r={...o};r.borderSize!==void 0&&r.borderWidth===void 0?r.borderWidth=r.borderSize:r.borderWidth!==void 0&&r.borderSize===void 0&&(r.borderSize=r.borderWidth);const i=eq(e);ZJ(e,{...i,node:{...i.node,...r}})},oOe=(e,t)=>{const n=eq(e);ZJ(e,{...n,connector:{...n.connector,...t}})},tq=1,dW=17,XH=(e,t)=>{if(!e)return{};const n={};for(const o of t)e[o]!==void 0&&(n[o]=e[o]);return n},rOe=["borderColor","backgroundColor","borderSize","borderStyle","fontSize","cornerRadius","shadow"],iOe=["borderColor","backgroundColor","borderSize","borderStyle","fontSize","shadow"],aOe=["fontSize"],sOe=["borderColor","borderWidth","borderStyle","shadow"];function uW(e,t,n){if(e==="text")return{width:t.width,height:t.height,fontSize:dW,...XH(n,aOe)};const o=e==="ellipse"?iOe:rOe;return{width:t.width,height:t.height,borderSize:tq,fontSize:dW,...XH(n,o)}}function cOe(e,t,n){return{path:e,width:t.width,height:t.height,borderWidth:tq,...XH(n,sOe)}}const vn=async(e,t,n,o,r)=>{const i={method:t},a={...o??{}};r!==void 0&&(a["content-type"]="application/json",i.body=JSON.stringify(r)),Object.keys(a).length>0&&(i.headers=a);const s=await e(n,i);if(!s.ok){let c=null;try{c=await s.json()}catch{}throw new Error((c==null?void 0:c.error)??`${t} ${n} → ${s.status}`)}return await s.json()},lOe=e=>{const{baseUrl:t,project:n,flow:o}=e,r=e.fetch??globalThis.fetch.bind(globalThis),i=e.EventSource??globalThis.EventSource,a=e.headers,s=`${t}/api/projects/${encodeURIComponent(n)}`,c=`${s}/flows/${encodeURIComponent(o)}`,l=`${t}/api/icons`;return{async createNode(u){const p=await vn(r,"POST",`${c}/nodes`,a,u);return{id:p.id,node:p.node}},async updateNode(u,p){await vn(r,"PATCH",`${c}/nodes/${u}`,a,p)},async updateNodePosition(u,p){return await vn(r,"PATCH",`${c}/nodes/${u}/position`,a,p)},async deleteNode(u){await vn(r,"DELETE",`${c}/nodes/${u}`,a)},async reorderNode(u,p){await vn(r,"PATCH",`${c}/nodes/${u}/order`,a,p)},async createConnector(u){return{id:(await vn(r,"POST",`${c}/connectors`,a,u)).id}},async updateConnector(u,p){await vn(r,"PATCH",`${c}/connectors/${u}`,a,p)},async deleteConnector(u){await vn(r,"DELETE",`${c}/connectors/${u}`,a)},async uploadImage(u,p,y){const g=new FormData;g.append("file",p),g.append("filename",y);const k=`${c}/nodes/${encodeURIComponent(u)}/files/upload`,x={method:"POST",body:g};a&&(x.headers={...a});const v=await r(k,x);if(!v.ok){let M=null;try{M=await v.json()}catch{}throw new Error((M==null?void 0:M.error)??`POST ${k} → ${v.status}`)}return await v.json()},async playAction(u){return await vn(r,"POST",`${c}/play/${u}`,a,{})},async openFile(u){await vn(r,"POST",`${s}/files/open`,a,{path:u})},async revealFile(u){await vn(r,"POST",`${s}/files/reveal`,a,{path:u})},async computeLayout(u,p){const y=await vn(r,"POST",`${t}/api/layout`,a,{nodes:u,edges:p});return{nodes:y.nodes,connectors:y.connectors}},icons:{async listPacks(){return(await vn(r,"GET",`${l}/packs`,a)).packs},async install(u,p){return{jobId:(await vn(r,"POST",`${l}/install`,a,{vendor:u,acceptTerms:p.acceptTerms??!1})).jobId}},subscribeJob(u,p){const y=`${l}/jobs/${encodeURIComponent(u)}/events`,g=new i(y);return g.onmessage=k=>{try{p(JSON.parse(k.data))}catch(x){console.error("icons.subscribeJob: failed to parse SSE payload",x)}},()=>g.close()},async remove(u){await vn(r,"DELETE",`${l}/packs/${encodeURIComponent(u)}`,a)},async getLicense(u){const p=await vn(r,"GET",`${l}/licenses/${encodeURIComponent(u)}`,a);return{summary:p.summary,url:p.url,requiresAcceptance:p.requiresAcceptance}}}}},dOe=500,uOe=500,hOe=2e3,fOe=(e,t)=>{if(!e&&!t)return;if(!e)return{...t};if(!t)return{...e};const n={...t};for(const[o,r]of Object.entries(e))n[o]=r;return n},hW=(e,t,n)=>{const o=Date.now(),r=dOe,i=uOe,{stack:a,cursor:s}=e;if(t.coalesceKey&&s>0){const h=a[s-1];if(h&&h.coalesceKey===t.coalesceKey&&o-h.capturedAt<=i){const u=a.slice(0,s);return u[s-1]={...h,do:t.do,capturedAt:o,beforeFields:fOe(h.beforeFields,t.beforeFields)},{stack:u,cursor:s}}}const c=a.slice(0,s);c.push({...t,capturedAt:o});let l=s+1;for(;c.length>r;)c.shift(),l-=1;return l<0&&(l=0),{stack:c,cursor:l}},pOe=e=>e.cursor===0?{state:e,entry:void 0}:{state:{...e,cursor:e.cursor-1},entry:e.stack[e.cursor-1]},yOe=e=>e.cursor===e.stack.length?{state:e,entry:void 0}:{state:{...e,cursor:e.cursor+1},entry:e.stack[e.cursor]},YJ=()=>({stack:[],cursor:0}),fW=e=>e.cursor===e.stack.length?e:{stack:e.stack.slice(0,e.cursor),cursor:e.cursor},mOe=(e,t,n=Date.now(),o=hOe)=>n-t>o?YJ():e,gOe=new Set(["borderColor","backgroundColor","borderSize","borderWidth","borderStyle","fontSize","textAlign","cornerRadius","shadow","color","strokeWidth","target"]);function kOe(e,t){let n={stack:[],cursor:0},o=0;const r=new Set;let i=null;const a=()=>({canUndo:n.cursor>0,canRedo:n.cursor<n.stack.length}),s=()=>{const k=a();for(const x of r)x(k)},c=()=>{if(i){o=Date.now();return}const k=fW(n);o=Date.now(),k!==n&&(n=k,s())},l=k=>{if(i){i.ops.push({redo:k.do,undo:k.undo});return}n=hW(n,{...k,capturedAt:Date.now()}),s()},h={createNode:async k=>{c();const x=await e.createNode(k);return l({do:async()=>{await e.createNode({...k,id:x.id})},undo:async()=>{await e.deleteNode(x.id)}}),x},updateNode:async(k,x)=>{c();const{nodes:v}=t(),M=v.find(_=>_.id===k);if(!M){await e.updateNode(k,x);return}const w={},b=M.data??{};for(const _ of Object.keys(x))if(_==="position")w[_]=M.position;else if(_==="type")w[_]=M.type;else{const S=b[_];w[_]=S===void 0&&gOe.has(_)?null:S}await e.updateNode(k,x);const C=Object.keys(x).sort().join(",");l({do:async()=>{await e.updateNode(k,x)},undo:async()=>{await e.updateNode(k,w)},coalesceKey:`update:${k}:${C}`,beforeFields:w})},updateNodePosition:async(k,x)=>{c();const{nodes:v}=t(),M=v.find(C=>C.id===k),w=M==null?void 0:M.position,b=await e.updateNodePosition(k,x);return w&&l({do:async()=>{await e.updateNodePosition(k,x)},undo:async()=>{await e.updateNodePosition(k,w)},coalesceKey:`pos:${k}`}),b},deleteNode:async k=>{c();const{nodes:x,connectors:v}=t(),M=x.find(b=>b.id===k);if(!M){await e.deleteNode(k);return}const w=v.filter(b=>b.source===k||b.target===k);await e.deleteNode(k),l({do:async()=>{await e.deleteNode(k)},undo:async()=>{await e.createNode({id:M.id,type:M.type,position:M.position,data:M.data??{}});for(const b of w)try{await e.createConnector({id:b.id,source:b.source,target:b.target,sourceHandle:b.sourceHandle,targetHandle:b.targetHandle,sourceHandleAutoPicked:b.sourceHandleAutoPicked,targetHandleAutoPicked:b.targetHandleAutoPicked,sourcePin:b.sourcePin,targetPin:b.targetPin,label:b.label,style:b.style,color:b.color,direction:b.direction,eventName:b.eventName,queueName:b.queueName,method:b.method,url:b.url})}catch(C){console.warn(`[seeflow/canvas] failed to restore connector ${b.id} during deleteNode undo:`,C)}}})},reorderNode:async(k,x)=>{c();const{nodes:v}=t(),M=v.findIndex(w=>w.id===k);if(M<0){await e.reorderNode(k,x);return}await e.reorderNode(k,x),l({do:async()=>{await e.reorderNode(k,x)},undo:async()=>{await e.reorderNode(k,{op:"toIndex",index:M})}})},createConnector:async k=>{c();const x=await e.createConnector(k);return l({do:async()=>{await e.createConnector({...k,id:x.id})},undo:async()=>{await e.deleteConnector(x.id)}}),x},updateConnector:async(k,x)=>{c();const{connectors:v}=t(),M=v.find(_=>_.id===k);if(!M){await e.updateConnector(k,x);return}const w={},b=M;for(const _ of Object.keys(x))w[_]=b[_];await e.updateConnector(k,x);const C=Object.keys(x).sort().join(",");l({do:async()=>{await e.updateConnector(k,x)},undo:async()=>{await e.updateConnector(k,w)},coalesceKey:`update:conn:${k}:${C}`,beforeFields:w})},deleteConnector:async k=>{c();const{connectors:x}=t(),v=x.find(M=>M.id===k);if(!v){await e.deleteConnector(k);return}await e.deleteConnector(k),l({do:async()=>{await e.deleteConnector(k)},undo:async()=>{await e.createConnector({id:v.id,source:v.source,target:v.target,sourceHandle:v.sourceHandle,targetHandle:v.targetHandle,sourceHandleAutoPicked:v.sourceHandleAutoPicked,targetHandleAutoPicked:v.targetHandleAutoPicked,sourcePin:v.sourcePin,targetPin:v.targetPin,label:v.label,style:v.style,color:v.color,direction:v.direction,eventName:v.eventName,queueName:v.queueName,method:v.method,url:v.url})}})},uploadImage:(k,x,v)=>e.uploadImage(k,x,v),...e.playAction?{playAction:k=>e.playAction(k)}:{},...e.openFile?{openFile:k=>e.openFile(k)}:{},...e.revealFile?{revealFile:k=>e.revealFile(k)}:{},...e.computeLayout?{computeLayout:(k,x)=>e.computeLayout(k,x)}:{},...e.icons?{icons:e.icons}:{}};let u=Promise.resolve();const p=async()=>{const k=pOe(n);k.entry&&(n=k.state,s(),await k.entry.undo())},y=async()=>{const k=yOe(n);k.entry&&(n=k.state,s(),await k.entry.do())};return{adapter:h,history:{get canUndo(){return n.cursor>0},get canRedo(){return n.cursor<n.stack.length},undo:()=>{o=Date.now();const k=u.then(p);return u=k.then(()=>{},()=>{}),k},redo:()=>{o=Date.now();const k=u.then(y);return u=k.then(()=>{},()=>{}),k},clear:()=>{n=YJ(),s()},markExternalChange:()=>{const k=mOe(n,o);k!==n&&(n=k,s())},batch:async(k,x,v)=>{if(i)return x();const M=fW(n);o=Date.now(),M!==n&&(n=M,s());const w={name:k,ops:[]};i=w;try{const b=await x();if(i=null,w.ops.length>0){const C=w.ops.slice();n=hW(n,{do:async()=>{for(const _ of C)await _.redo()},undo:async()=>{for(let _=C.length-1;_>=0;_--)await C[_].undo()},coalesceKey:v==null?void 0:v.coalesceKey,capturedAt:Date.now()}),s()}return b}catch(b){i=null;for(let C=w.ops.length-1;C>=0;C--)try{await w.ops[C].undo()}catch(_){console.warn(`[seeflow/canvas] batch '${k}' rollback inverse rejected:`,_)}throw b}},subscribe:k=>(r.add(k),k(a()),()=>{r.delete(k)})}}}function QJ(e,t,n){let o=null,r=!1;const i=new ResizeObserver(()=>{r||(o!==null&&clearTimeout(o),o=setTimeout(()=>{o=null,!r&&n()},t))});return i.observe(e),()=>{r||(r=!0,o!==null&&(clearTimeout(o),o=null),i.disconnect())}}var st;(function(e){e.assertEqual=r=>{};function t(r){}e.assertIs=t;function n(r){throw new Error}e.assertNever=n,e.arrayToEnum=r=>{const i={};for(const a of r)i[a]=a;return i},e.getValidEnumValues=r=>{const i=e.objectKeys(r).filter(s=>typeof r[r[s]]!="number"),a={};for(const s of i)a[s]=r[s];return e.objectValues(a)},e.objectValues=r=>e.objectKeys(r).map(function(i){return r[i]}),e.objectKeys=typeof Object.keys=="function"?r=>Object.keys(r):r=>{const i=[];for(const a in r)Object.prototype.hasOwnProperty.call(r,a)&&i.push(a);return i},e.find=(r,i)=>{for(const a of r)if(i(a))return a},e.isInteger=typeof Number.isInteger=="function"?r=>Number.isInteger(r):r=>typeof r=="number"&&Number.isFinite(r)&&Math.floor(r)===r;function o(r,i=" | "){return r.map(a=>typeof a=="string"?`'${a}'`:a).join(i)}e.joinValues=o,e.jsonStringifyReplacer=(r,i)=>typeof i=="bigint"?i.toString():i})(st||(st={}));var pW;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(pW||(pW={}));const _e=st.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),ga=e=>{switch(typeof e){case"undefined":return _e.undefined;case"string":return _e.string;case"number":return Number.isNaN(e)?_e.nan:_e.number;case"boolean":return _e.boolean;case"function":return _e.function;case"bigint":return _e.bigint;case"symbol":return _e.symbol;case"object":return Array.isArray(e)?_e.array:e===null?_e.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?_e.promise:typeof Map<"u"&&e instanceof Map?_e.map:typeof Set<"u"&&e instanceof Set?_e.set:typeof Date<"u"&&e instanceof Date?_e.date:_e.object;default:return _e.unknown}},me=st.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class Ri extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=o=>{this.issues=[...this.issues,o]},this.addIssues=(o=[])=>{this.issues=[...this.issues,...o]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}format(t){const n=t||function(i){return i.message},o={_errors:[]},r=i=>{for(const a of i.issues)if(a.code==="invalid_union")a.unionErrors.map(r);else if(a.code==="invalid_return_type")r(a.returnTypeError);else if(a.code==="invalid_arguments")r(a.argumentsError);else if(a.path.length===0)o._errors.push(n(a));else{let s=o,c=0;for(;c<a.path.length;){const l=a.path[c];c===a.path.length-1?(s[l]=s[l]||{_errors:[]},s[l]._errors.push(n(a))):s[l]=s[l]||{_errors:[]},s=s[l],c++}}};return r(this),o}static assert(t){if(!(t instanceof Ri))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,st.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},o=[];for(const r of this.issues)if(r.path.length>0){const i=r.path[0];n[i]=n[i]||[],n[i].push(t(r))}else o.push(t(r));return{formErrors:o,fieldErrors:n}}get formErrors(){return this.flatten()}}Ri.create=e=>new Ri(e);const ZH=(e,t)=>{let n;switch(e.code){case me.invalid_type:e.received===_e.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case me.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,st.jsonStringifyReplacer)}`;break;case me.unrecognized_keys:n=`Unrecognized key(s) in object: ${st.joinValues(e.keys,", ")}`;break;case me.invalid_union:n="Invalid input";break;case me.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${st.joinValues(e.options)}`;break;case me.invalid_enum_value:n=`Invalid enum value. Expected ${st.joinValues(e.options)}, received '${e.received}'`;break;case me.invalid_arguments:n="Invalid function arguments";break;case me.invalid_return_type:n="Invalid function return type";break;case me.invalid_date:n="Invalid date";break;case me.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:st.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case me.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="bigint"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case me.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case me.custom:n="Invalid input";break;case me.invalid_intersection_types:n="Intersection results could not be merged";break;case me.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case me.not_finite:n="Number must be finite";break;default:n=t.defaultError,st.assertNever(e)}return{message:n}};let vOe=ZH;function xOe(){return vOe}const wOe=e=>{const{data:t,path:n,errorMaps:o,issueData:r}=e,i=[...n,...r.path||[]],a={...r,path:i};if(r.message!==void 0)return{...r,path:i,message:r.message};let s="";const c=o.filter(l=>!!l).slice().reverse();for(const l of c)s=l(a,{data:t,defaultError:s}).message;return{...r,path:i,message:s}};function Me(e,t){const n=xOe(),o=wOe({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===ZH?void 0:ZH].filter(r=>!!r)});e.common.issues.push(o)}class $n{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const o=[];for(const r of n){if(r.status==="aborted")return qe;r.status==="dirty"&&t.dirty(),o.push(r.value)}return{status:t.value,value:o}}static async mergeObjectAsync(t,n){const o=[];for(const r of n){const i=await r.key,a=await r.value;o.push({key:i,value:a})}return $n.mergeObjectSync(t,o)}static mergeObjectSync(t,n){const o={};for(const r of n){const{key:i,value:a}=r;if(i.status==="aborted"||a.status==="aborted")return qe;i.status==="dirty"&&t.dirty(),a.status==="dirty"&&t.dirty(),i.value!=="__proto__"&&(typeof a.value<"u"||r.alwaysSet)&&(o[i.value]=a.value)}return{status:t.value,value:o}}}const qe=Object.freeze({status:"aborted"}),F2=e=>({status:"dirty",value:e}),Po=e=>({status:"valid",value:e}),yW=e=>e.status==="aborted",mW=e=>e.status==="dirty",R0=e=>e.status==="valid",oz=e=>typeof Promise<"u"&&e instanceof Promise;var Le;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(Le||(Le={}));class Wr{constructor(t,n,o,r){this._cachedPath=[],this.parent=t,this.data=n,this._path=o,this._key=r}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const gW=(e,t)=>{if(R0(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new Ri(e.common.issues);return this._error=n,this._error}}};function Ge(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:o,description:r}=e;if(t&&(n||o))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:r}:{errorMap:(a,s)=>{const{message:c}=e;return a.code==="invalid_enum_value"?{message:c??s.defaultError}:typeof s.data>"u"?{message:c??o??s.defaultError}:a.code!=="invalid_type"?{message:s.defaultError}:{message:c??n??s.defaultError}},description:r}}class et{get description(){return this._def.description}_getType(t){return ga(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:ga(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new $n,ctx:{common:t.parent.common,data:t.data,parsedType:ga(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(oz(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const o=this.safeParse(t,n);if(o.success)return o.data;throw o.error}safeParse(t,n){const o={common:{issues:[],async:(n==null?void 0:n.async)??!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:ga(t)},r=this._parseSync({data:t,path:o.path,parent:o});return gW(o,r)}"~validate"(t){var o,r;const n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:ga(t)};if(!this["~standard"].async)try{const i=this._parseSync({data:t,path:[],parent:n});return R0(i)?{value:i.value}:{issues:n.common.issues}}catch(i){(r=(o=i==null?void 0:i.message)==null?void 0:o.toLowerCase())!=null&&r.includes("encountered")&&(this["~standard"].async=!0),n.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:n}).then(i=>R0(i)?{value:i.value}:{issues:n.common.issues})}async parseAsync(t,n){const o=await this.safeParseAsync(t,n);if(o.success)return o.data;throw o.error}async safeParseAsync(t,n){const o={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:ga(t)},r=this._parse({data:t,path:o.path,parent:o}),i=await(oz(r)?r:Promise.resolve(r));return gW(o,i)}refine(t,n){const o=r=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(r):n;return this._refinement((r,i)=>{const a=t(r),s=()=>i.addIssue({code:me.custom,...o(r)});return typeof Promise<"u"&&a instanceof Promise?a.then(c=>c?!0:(s(),!1)):a?!0:(s(),!1)})}refinement(t,n){return this._refinement((o,r)=>t(o)?!0:(r.addIssue(typeof n=="function"?n(o,r):n),!1))}_refinement(t){return new H0({schema:this,typeName:Oe.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return za.create(this,this._def)}nullable(){return O0.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Vr.create(this)}promise(){return cz.create(this,this._def)}or(t){return iz.create([this,t],this._def)}and(t){return az.create(this,t,this._def)}transform(t){return new H0({...Ge(this._def),schema:this,typeName:Oe.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new tO({...Ge(this._def),innerType:this,defaultValue:n,typeName:Oe.ZodDefault})}brand(){return new BOe({typeName:Oe.ZodBranded,type:this,...Ge(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new nO({...Ge(this._def),innerType:this,catchValue:n,typeName:Oe.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return nq.create(this,t)}readonly(){return oO.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const MOe=/^c[^\s-]{8,}$/i,bOe=/^[0-9a-z]+$/,_Oe=/^[0-9A-HJKMNP-TV-Z]{26}$/i,COe=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,SOe=/^[a-z0-9_-]{21}$/i,LOe=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,NOe=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,IOe=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,AOe="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let WT;const EOe=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,jOe=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,$Oe=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,POe=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,zOe=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,ROe=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,JJ="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",TOe=new RegExp(`^${JJ}$`);function eee(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);const n=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${n}`}function DOe(e){return new RegExp(`^${eee(e)}$`)}function HOe(e){let t=`${JJ}T${eee(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function OOe(e,t){return!!((t==="v4"||!t)&&EOe.test(e)||(t==="v6"||!t)&&$Oe.test(e))}function FOe(e,t){if(!LOe.test(e))return!1;try{const[n]=e.split(".");if(!n)return!1;const o=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),r=JSON.parse(atob(o));return!(typeof r!="object"||r===null||"typ"in r&&(r==null?void 0:r.typ)!=="JWT"||!r.alg||t&&r.alg!==t)}catch{return!1}}function qOe(e,t){return!!((t==="v4"||!t)&&jOe.test(e)||(t==="v6"||!t)&&POe.test(e))}class Ii extends et{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==_e.string){const i=this._getOrReturnCtx(t);return Me(i,{code:me.invalid_type,expected:_e.string,received:i.parsedType}),qe}const o=new $n;let r;for(const i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(r=this._getOrReturnCtx(t,r),Me(r,{code:me.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),o.dirty());else if(i.kind==="max")t.data.length>i.value&&(r=this._getOrReturnCtx(t,r),Me(r,{code:me.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),o.dirty());else if(i.kind==="length"){const a=t.data.length>i.value,s=t.data.length<i.value;(a||s)&&(r=this._getOrReturnCtx(t,r),a?Me(r,{code:me.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):s&&Me(r,{code:me.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),o.dirty())}else if(i.kind==="email")IOe.test(t.data)||(r=this._getOrReturnCtx(t,r),Me(r,{validation:"email",code:me.invalid_string,message:i.message}),o.dirty());else if(i.kind==="emoji")WT||(WT=new RegExp(AOe,"u")),WT.test(t.data)||(r=this._getOrReturnCtx(t,r),Me(r,{validation:"emoji",code:me.invalid_string,message:i.message}),o.dirty());else if(i.kind==="uuid")COe.test(t.data)||(r=this._getOrReturnCtx(t,r),Me(r,{validation:"uuid",code:me.invalid_string,message:i.message}),o.dirty());else if(i.kind==="nanoid")SOe.test(t.data)||(r=this._getOrReturnCtx(t,r),Me(r,{validation:"nanoid",code:me.invalid_string,message:i.message}),o.dirty());else if(i.kind==="cuid")MOe.test(t.data)||(r=this._getOrReturnCtx(t,r),Me(r,{validation:"cuid",code:me.invalid_string,message:i.message}),o.dirty());else if(i.kind==="cuid2")bOe.test(t.data)||(r=this._getOrReturnCtx(t,r),Me(r,{validation:"cuid2",code:me.invalid_string,message:i.message}),o.dirty());else if(i.kind==="ulid")_Oe.test(t.data)||(r=this._getOrReturnCtx(t,r),Me(r,{validation:"ulid",code:me.invalid_string,message:i.message}),o.dirty());else if(i.kind==="url")try{new URL(t.data)}catch{r=this._getOrReturnCtx(t,r),Me(r,{validation:"url",code:me.invalid_string,message:i.message}),o.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(t.data)||(r=this._getOrReturnCtx(t,r),Me(r,{validation:"regex",code:me.invalid_string,message:i.message}),o.dirty())):i.kind==="trim"?t.data=t.data.trim():i.kind==="includes"?t.data.includes(i.value,i.position)||(r=this._getOrReturnCtx(t,r),Me(r,{code:me.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),o.dirty()):i.kind==="toLowerCase"?t.data=t.data.toLowerCase():i.kind==="toUpperCase"?t.data=t.data.toUpperCase():i.kind==="startsWith"?t.data.startsWith(i.value)||(r=this._getOrReturnCtx(t,r),Me(r,{code:me.invalid_string,validation:{startsWith:i.value},message:i.message}),o.dirty()):i.kind==="endsWith"?t.data.endsWith(i.value)||(r=this._getOrReturnCtx(t,r),Me(r,{code:me.invalid_string,validation:{endsWith:i.value},message:i.message}),o.dirty()):i.kind==="datetime"?HOe(i).test(t.data)||(r=this._getOrReturnCtx(t,r),Me(r,{code:me.invalid_string,validation:"datetime",message:i.message}),o.dirty()):i.kind==="date"?TOe.test(t.data)||(r=this._getOrReturnCtx(t,r),Me(r,{code:me.invalid_string,validation:"date",message:i.message}),o.dirty()):i.kind==="time"?DOe(i).test(t.data)||(r=this._getOrReturnCtx(t,r),Me(r,{code:me.invalid_string,validation:"time",message:i.message}),o.dirty()):i.kind==="duration"?NOe.test(t.data)||(r=this._getOrReturnCtx(t,r),Me(r,{validation:"duration",code:me.invalid_string,message:i.message}),o.dirty()):i.kind==="ip"?OOe(t.data,i.version)||(r=this._getOrReturnCtx(t,r),Me(r,{validation:"ip",code:me.invalid_string,message:i.message}),o.dirty()):i.kind==="jwt"?FOe(t.data,i.alg)||(r=this._getOrReturnCtx(t,r),Me(r,{validation:"jwt",code:me.invalid_string,message:i.message}),o.dirty()):i.kind==="cidr"?qOe(t.data,i.version)||(r=this._getOrReturnCtx(t,r),Me(r,{validation:"cidr",code:me.invalid_string,message:i.message}),o.dirty()):i.kind==="base64"?zOe.test(t.data)||(r=this._getOrReturnCtx(t,r),Me(r,{validation:"base64",code:me.invalid_string,message:i.message}),o.dirty()):i.kind==="base64url"?ROe.test(t.data)||(r=this._getOrReturnCtx(t,r),Me(r,{validation:"base64url",code:me.invalid_string,message:i.message}),o.dirty()):st.assertNever(i);return{status:o.value,value:t.data}}_regex(t,n,o){return this.refinement(r=>t.test(r),{validation:n,code:me.invalid_string,...Le.errToObj(o)})}_addCheck(t){return new Ii({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...Le.errToObj(t)})}url(t){return this._addCheck({kind:"url",...Le.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...Le.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...Le.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...Le.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...Le.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...Le.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...Le.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...Le.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...Le.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...Le.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...Le.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...Le.errToObj(t)})}datetime(t){return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(t==null?void 0:t.offset)??!1,local:(t==null?void 0:t.local)??!1,...Le.errToObj(t==null?void 0:t.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,...Le.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...Le.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...Le.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...Le.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...Le.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...Le.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...Le.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...Le.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...Le.errToObj(n)})}nonempty(t){return this.min(1,Le.errToObj(t))}trim(){return new Ii({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Ii({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Ii({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}Ii.create=e=>new Ii({checks:[],typeName:Oe.ZodString,coerce:(e==null?void 0:e.coerce)??!1,...Ge(e)});function VOe(e,t){const n=(e.toString().split(".")[1]||"").length,o=(t.toString().split(".")[1]||"").length,r=n>o?n:o,i=Number.parseInt(e.toFixed(r).replace(".","")),a=Number.parseInt(t.toFixed(r).replace(".",""));return i%a/10**r}class T0 extends et{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==_e.number){const i=this._getOrReturnCtx(t);return Me(i,{code:me.invalid_type,expected:_e.number,received:i.parsedType}),qe}let o;const r=new $n;for(const i of this._def.checks)i.kind==="int"?st.isInteger(t.data)||(o=this._getOrReturnCtx(t,o),Me(o,{code:me.invalid_type,expected:"integer",received:"float",message:i.message}),r.dirty()):i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(o=this._getOrReturnCtx(t,o),Me(o,{code:me.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),r.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(o=this._getOrReturnCtx(t,o),Me(o,{code:me.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),r.dirty()):i.kind==="multipleOf"?VOe(t.data,i.value)!==0&&(o=this._getOrReturnCtx(t,o),Me(o,{code:me.not_multiple_of,multipleOf:i.value,message:i.message}),r.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(o=this._getOrReturnCtx(t,o),Me(o,{code:me.not_finite,message:i.message}),r.dirty()):st.assertNever(i);return{status:r.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,Le.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Le.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Le.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Le.toString(n))}setLimit(t,n,o,r){return new T0({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:o,message:Le.toString(r)}]})}_addCheck(t){return new T0({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:Le.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Le.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Le.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Le.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Le.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Le.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:Le.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Le.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Le.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&st.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const o of this._def.checks){if(o.kind==="finite"||o.kind==="int"||o.kind==="multipleOf")return!0;o.kind==="min"?(n===null||o.value>n)&&(n=o.value):o.kind==="max"&&(t===null||o.value<t)&&(t=o.value)}return Number.isFinite(n)&&Number.isFinite(t)}}T0.create=e=>new T0({checks:[],typeName:Oe.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...Ge(e)});class df extends et{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==_e.bigint)return this._getInvalidInput(t);let o;const r=new $n;for(const i of this._def.checks)i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(o=this._getOrReturnCtx(t,o),Me(o,{code:me.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),r.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(o=this._getOrReturnCtx(t,o),Me(o,{code:me.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),r.dirty()):i.kind==="multipleOf"?t.data%i.value!==BigInt(0)&&(o=this._getOrReturnCtx(t,o),Me(o,{code:me.not_multiple_of,multipleOf:i.value,message:i.message}),r.dirty()):st.assertNever(i);return{status:r.value,value:t.data}}_getInvalidInput(t){const n=this._getOrReturnCtx(t);return Me(n,{code:me.invalid_type,expected:_e.bigint,received:n.parsedType}),qe}gte(t,n){return this.setLimit("min",t,!0,Le.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Le.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Le.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Le.toString(n))}setLimit(t,n,o,r){return new df({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:o,message:Le.toString(r)}]})}_addCheck(t){return new df({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Le.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Le.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Le.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Le.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Le.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}df.create=e=>new df({checks:[],typeName:Oe.ZodBigInt,coerce:(e==null?void 0:e.coerce)??!1,...Ge(e)});class YH extends et{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==_e.boolean){const o=this._getOrReturnCtx(t);return Me(o,{code:me.invalid_type,expected:_e.boolean,received:o.parsedType}),qe}return Po(t.data)}}YH.create=e=>new YH({typeName:Oe.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...Ge(e)});class rz extends et{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==_e.date){const i=this._getOrReturnCtx(t);return Me(i,{code:me.invalid_type,expected:_e.date,received:i.parsedType}),qe}if(Number.isNaN(t.data.getTime())){const i=this._getOrReturnCtx(t);return Me(i,{code:me.invalid_date}),qe}const o=new $n;let r;for(const i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(r=this._getOrReturnCtx(t,r),Me(r,{code:me.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),o.dirty()):i.kind==="max"?t.data.getTime()>i.value&&(r=this._getOrReturnCtx(t,r),Me(r,{code:me.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),o.dirty()):st.assertNever(i);return{status:o.value,value:new Date(t.data.getTime())}}_addCheck(t){return new rz({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:Le.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:Le.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}}rz.create=e=>new rz({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:Oe.ZodDate,...Ge(e)});class kW extends et{_parse(t){if(this._getType(t)!==_e.symbol){const o=this._getOrReturnCtx(t);return Me(o,{code:me.invalid_type,expected:_e.symbol,received:o.parsedType}),qe}return Po(t.data)}}kW.create=e=>new kW({typeName:Oe.ZodSymbol,...Ge(e)});class vW extends et{_parse(t){if(this._getType(t)!==_e.undefined){const o=this._getOrReturnCtx(t);return Me(o,{code:me.invalid_type,expected:_e.undefined,received:o.parsedType}),qe}return Po(t.data)}}vW.create=e=>new vW({typeName:Oe.ZodUndefined,...Ge(e)});class xW extends et{_parse(t){if(this._getType(t)!==_e.null){const o=this._getOrReturnCtx(t);return Me(o,{code:me.invalid_type,expected:_e.null,received:o.parsedType}),qe}return Po(t.data)}}xW.create=e=>new xW({typeName:Oe.ZodNull,...Ge(e)});class wW extends et{constructor(){super(...arguments),this._any=!0}_parse(t){return Po(t.data)}}wW.create=e=>new wW({typeName:Oe.ZodAny,...Ge(e)});class QH extends et{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Po(t.data)}}QH.create=e=>new QH({typeName:Oe.ZodUnknown,...Ge(e)});class Fa extends et{_parse(t){const n=this._getOrReturnCtx(t);return Me(n,{code:me.invalid_type,expected:_e.never,received:n.parsedType}),qe}}Fa.create=e=>new Fa({typeName:Oe.ZodNever,...Ge(e)});class MW extends et{_parse(t){if(this._getType(t)!==_e.undefined){const o=this._getOrReturnCtx(t);return Me(o,{code:me.invalid_type,expected:_e.void,received:o.parsedType}),qe}return Po(t.data)}}MW.create=e=>new MW({typeName:Oe.ZodVoid,...Ge(e)});class Vr extends et{_parse(t){const{ctx:n,status:o}=this._processInputParams(t),r=this._def;if(n.parsedType!==_e.array)return Me(n,{code:me.invalid_type,expected:_e.array,received:n.parsedType}),qe;if(r.exactLength!==null){const a=n.data.length>r.exactLength.value,s=n.data.length<r.exactLength.value;(a||s)&&(Me(n,{code:a?me.too_big:me.too_small,minimum:s?r.exactLength.value:void 0,maximum:a?r.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:r.exactLength.message}),o.dirty())}if(r.minLength!==null&&n.data.length<r.minLength.value&&(Me(n,{code:me.too_small,minimum:r.minLength.value,type:"array",inclusive:!0,exact:!1,message:r.minLength.message}),o.dirty()),r.maxLength!==null&&n.data.length>r.maxLength.value&&(Me(n,{code:me.too_big,maximum:r.maxLength.value,type:"array",inclusive:!0,exact:!1,message:r.maxLength.message}),o.dirty()),n.common.async)return Promise.all([...n.data].map((a,s)=>r.type._parseAsync(new Wr(n,a,n.path,s)))).then(a=>$n.mergeArray(o,a));const i=[...n.data].map((a,s)=>r.type._parseSync(new Wr(n,a,n.path,s)));return $n.mergeArray(o,i)}get element(){return this._def.type}min(t,n){return new Vr({...this._def,minLength:{value:t,message:Le.toString(n)}})}max(t,n){return new Vr({...this._def,maxLength:{value:t,message:Le.toString(n)}})}length(t,n){return new Vr({...this._def,exactLength:{value:t,message:Le.toString(n)}})}nonempty(t){return this.min(1,t)}}Vr.create=(e,t)=>new Vr({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Oe.ZodArray,...Ge(t)});function $u(e){if(e instanceof Wt){const t={};for(const n in e.shape){const o=e.shape[n];t[n]=za.create($u(o))}return new Wt({...e._def,shape:()=>t})}else return e instanceof Vr?new Vr({...e._def,type:$u(e.element)}):e instanceof za?za.create($u(e.unwrap())):e instanceof O0?O0.create($u(e.unwrap())):e instanceof Fd?Fd.create(e.items.map(t=>$u(t))):e}class Wt extends et{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=st.objectKeys(t);return this._cached={shape:t,keys:n},this._cached}_parse(t){if(this._getType(t)!==_e.object){const l=this._getOrReturnCtx(t);return Me(l,{code:me.invalid_type,expected:_e.object,received:l.parsedType}),qe}const{status:o,ctx:r}=this._processInputParams(t),{shape:i,keys:a}=this._getCached(),s=[];if(!(this._def.catchall instanceof Fa&&this._def.unknownKeys==="strip"))for(const l in r.data)a.includes(l)||s.push(l);const c=[];for(const l of a){const h=i[l],u=r.data[l];c.push({key:{status:"valid",value:l},value:h._parse(new Wr(r,u,r.path,l)),alwaysSet:l in r.data})}if(this._def.catchall instanceof Fa){const l=this._def.unknownKeys;if(l==="passthrough")for(const h of s)c.push({key:{status:"valid",value:h},value:{status:"valid",value:r.data[h]}});else if(l==="strict")s.length>0&&(Me(r,{code:me.unrecognized_keys,keys:s}),o.dirty());else if(l!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const l=this._def.catchall;for(const h of s){const u=r.data[h];c.push({key:{status:"valid",value:h},value:l._parse(new Wr(r,u,r.path,h)),alwaysSet:h in r.data})}}return r.common.async?Promise.resolve().then(async()=>{const l=[];for(const h of c){const u=await h.key,p=await h.value;l.push({key:u,value:p,alwaysSet:h.alwaysSet})}return l}).then(l=>$n.mergeObjectSync(o,l)):$n.mergeObjectSync(o,c)}get shape(){return this._def.shape()}strict(t){return Le.errToObj,new Wt({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,o)=>{var i,a;const r=((a=(i=this._def).errorMap)==null?void 0:a.call(i,n,o).message)??o.defaultError;return n.code==="unrecognized_keys"?{message:Le.errToObj(t).message??r}:{message:r}}}:{}})}strip(){return new Wt({...this._def,unknownKeys:"strip"})}passthrough(){return new Wt({...this._def,unknownKeys:"passthrough"})}extend(t){return new Wt({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new Wt({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Oe.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new Wt({...this._def,catchall:t})}pick(t){const n={};for(const o of st.objectKeys(t))t[o]&&this.shape[o]&&(n[o]=this.shape[o]);return new Wt({...this._def,shape:()=>n})}omit(t){const n={};for(const o of st.objectKeys(this.shape))t[o]||(n[o]=this.shape[o]);return new Wt({...this._def,shape:()=>n})}deepPartial(){return $u(this)}partial(t){const n={};for(const o of st.objectKeys(this.shape)){const r=this.shape[o];t&&!t[o]?n[o]=r:n[o]=r.optional()}return new Wt({...this._def,shape:()=>n})}required(t){const n={};for(const o of st.objectKeys(this.shape))if(t&&!t[o])n[o]=this.shape[o];else{let i=this.shape[o];for(;i instanceof za;)i=i._def.innerType;n[o]=i}return new Wt({...this._def,shape:()=>n})}keyof(){return tee(st.objectKeys(this.shape))}}Wt.create=(e,t)=>new Wt({shape:()=>e,unknownKeys:"strip",catchall:Fa.create(),typeName:Oe.ZodObject,...Ge(t)});Wt.strictCreate=(e,t)=>new Wt({shape:()=>e,unknownKeys:"strict",catchall:Fa.create(),typeName:Oe.ZodObject,...Ge(t)});Wt.lazycreate=(e,t)=>new Wt({shape:e,unknownKeys:"strip",catchall:Fa.create(),typeName:Oe.ZodObject,...Ge(t)});class iz extends et{_parse(t){const{ctx:n}=this._processInputParams(t),o=this._def.options;function r(i){for(const s of i)if(s.result.status==="valid")return s.result;for(const s of i)if(s.result.status==="dirty")return n.common.issues.push(...s.ctx.common.issues),s.result;const a=i.map(s=>new Ri(s.ctx.common.issues));return Me(n,{code:me.invalid_union,unionErrors:a}),qe}if(n.common.async)return Promise.all(o.map(async i=>{const a={...n,common:{...n.common,issues:[]},parent:null};return{result:await i._parseAsync({data:n.data,path:n.path,parent:a}),ctx:a}})).then(r);{let i;const a=[];for(const c of o){const l={...n,common:{...n.common,issues:[]},parent:null},h=c._parseSync({data:n.data,path:n.path,parent:l});if(h.status==="valid")return h;h.status==="dirty"&&!i&&(i={result:h,ctx:l}),l.common.issues.length&&a.push(l.common.issues)}if(i)return n.common.issues.push(...i.ctx.common.issues),i.result;const s=a.map(c=>new Ri(c));return Me(n,{code:me.invalid_union,unionErrors:s}),qe}}get options(){return this._def.options}}iz.create=(e,t)=>new iz({options:e,typeName:Oe.ZodUnion,...Ge(t)});function JH(e,t){const n=ga(e),o=ga(t);if(e===t)return{valid:!0,data:e};if(n===_e.object&&o===_e.object){const r=st.objectKeys(t),i=st.objectKeys(e).filter(s=>r.indexOf(s)!==-1),a={...e,...t};for(const s of i){const c=JH(e[s],t[s]);if(!c.valid)return{valid:!1};a[s]=c.data}return{valid:!0,data:a}}else if(n===_e.array&&o===_e.array){if(e.length!==t.length)return{valid:!1};const r=[];for(let i=0;i<e.length;i++){const a=e[i],s=t[i],c=JH(a,s);if(!c.valid)return{valid:!1};r.push(c.data)}return{valid:!0,data:r}}else return n===_e.date&&o===_e.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class az extends et{_parse(t){const{status:n,ctx:o}=this._processInputParams(t),r=(i,a)=>{if(yW(i)||yW(a))return qe;const s=JH(i.value,a.value);return s.valid?((mW(i)||mW(a))&&n.dirty(),{status:n.value,value:s.data}):(Me(o,{code:me.invalid_intersection_types}),qe)};return o.common.async?Promise.all([this._def.left._parseAsync({data:o.data,path:o.path,parent:o}),this._def.right._parseAsync({data:o.data,path:o.path,parent:o})]).then(([i,a])=>r(i,a)):r(this._def.left._parseSync({data:o.data,path:o.path,parent:o}),this._def.right._parseSync({data:o.data,path:o.path,parent:o}))}}az.create=(e,t,n)=>new az({left:e,right:t,typeName:Oe.ZodIntersection,...Ge(n)});class Fd extends et{_parse(t){const{status:n,ctx:o}=this._processInputParams(t);if(o.parsedType!==_e.array)return Me(o,{code:me.invalid_type,expected:_e.array,received:o.parsedType}),qe;if(o.data.length<this._def.items.length)return Me(o,{code:me.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),qe;!this._def.rest&&o.data.length>this._def.items.length&&(Me(o,{code:me.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const i=[...o.data].map((a,s)=>{const c=this._def.items[s]||this._def.rest;return c?c._parse(new Wr(o,a,o.path,s)):null}).filter(a=>!!a);return o.common.async?Promise.all(i).then(a=>$n.mergeArray(n,a)):$n.mergeArray(n,i)}get items(){return this._def.items}rest(t){return new Fd({...this._def,rest:t})}}Fd.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Fd({items:e,typeName:Oe.ZodTuple,rest:null,...Ge(t)})};class sz extends et{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:o}=this._processInputParams(t);if(o.parsedType!==_e.object)return Me(o,{code:me.invalid_type,expected:_e.object,received:o.parsedType}),qe;const r=[],i=this._def.keyType,a=this._def.valueType;for(const s in o.data)r.push({key:i._parse(new Wr(o,s,o.path,s)),value:a._parse(new Wr(o,o.data[s],o.path,s)),alwaysSet:s in o.data});return o.common.async?$n.mergeObjectAsync(n,r):$n.mergeObjectSync(n,r)}get element(){return this._def.valueType}static create(t,n,o){return n instanceof et?new sz({keyType:t,valueType:n,typeName:Oe.ZodRecord,...Ge(o)}):new sz({keyType:Ii.create(),valueType:t,typeName:Oe.ZodRecord,...Ge(n)})}}class bW extends et{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:o}=this._processInputParams(t);if(o.parsedType!==_e.map)return Me(o,{code:me.invalid_type,expected:_e.map,received:o.parsedType}),qe;const r=this._def.keyType,i=this._def.valueType,a=[...o.data.entries()].map(([s,c],l)=>({key:r._parse(new Wr(o,s,o.path,[l,"key"])),value:i._parse(new Wr(o,c,o.path,[l,"value"]))}));if(o.common.async){const s=new Map;return Promise.resolve().then(async()=>{for(const c of a){const l=await c.key,h=await c.value;if(l.status==="aborted"||h.status==="aborted")return qe;(l.status==="dirty"||h.status==="dirty")&&n.dirty(),s.set(l.value,h.value)}return{status:n.value,value:s}})}else{const s=new Map;for(const c of a){const l=c.key,h=c.value;if(l.status==="aborted"||h.status==="aborted")return qe;(l.status==="dirty"||h.status==="dirty")&&n.dirty(),s.set(l.value,h.value)}return{status:n.value,value:s}}}}bW.create=(e,t,n)=>new bW({valueType:t,keyType:e,typeName:Oe.ZodMap,...Ge(n)});class uf extends et{_parse(t){const{status:n,ctx:o}=this._processInputParams(t);if(o.parsedType!==_e.set)return Me(o,{code:me.invalid_type,expected:_e.set,received:o.parsedType}),qe;const r=this._def;r.minSize!==null&&o.data.size<r.minSize.value&&(Me(o,{code:me.too_small,minimum:r.minSize.value,type:"set",inclusive:!0,exact:!1,message:r.minSize.message}),n.dirty()),r.maxSize!==null&&o.data.size>r.maxSize.value&&(Me(o,{code:me.too_big,maximum:r.maxSize.value,type:"set",inclusive:!0,exact:!1,message:r.maxSize.message}),n.dirty());const i=this._def.valueType;function a(c){const l=new Set;for(const h of c){if(h.status==="aborted")return qe;h.status==="dirty"&&n.dirty(),l.add(h.value)}return{status:n.value,value:l}}const s=[...o.data.values()].map((c,l)=>i._parse(new Wr(o,c,o.path,l)));return o.common.async?Promise.all(s).then(c=>a(c)):a(s)}min(t,n){return new uf({...this._def,minSize:{value:t,message:Le.toString(n)}})}max(t,n){return new uf({...this._def,maxSize:{value:t,message:Le.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}uf.create=(e,t)=>new uf({valueType:e,minSize:null,maxSize:null,typeName:Oe.ZodSet,...Ge(t)});class _W extends et{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}_W.create=(e,t)=>new _W({getter:e,typeName:Oe.ZodLazy,...Ge(t)});class eO extends et{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return Me(n,{received:n.data,code:me.invalid_literal,expected:this._def.value}),qe}return{status:"valid",value:t.data}}get value(){return this._def.value}}eO.create=(e,t)=>new eO({value:e,typeName:Oe.ZodLiteral,...Ge(t)});function tee(e,t){return new D0({values:e,typeName:Oe.ZodEnum,...Ge(t)})}class D0 extends et{_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),o=this._def.values;return Me(n,{expected:st.joinValues(o),received:n.parsedType,code:me.invalid_type}),qe}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){const n=this._getOrReturnCtx(t),o=this._def.values;return Me(n,{received:n.data,code:me.invalid_enum_value,options:o}),qe}return Po(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return D0.create(t,{...this._def,...n})}exclude(t,n=this._def){return D0.create(this.options.filter(o=>!t.includes(o)),{...this._def,...n})}}D0.create=tee;class CW extends et{_parse(t){const n=st.getValidEnumValues(this._def.values),o=this._getOrReturnCtx(t);if(o.parsedType!==_e.string&&o.parsedType!==_e.number){const r=st.objectValues(n);return Me(o,{expected:st.joinValues(r),received:o.parsedType,code:me.invalid_type}),qe}if(this._cache||(this._cache=new Set(st.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){const r=st.objectValues(n);return Me(o,{received:o.data,code:me.invalid_enum_value,options:r}),qe}return Po(t.data)}get enum(){return this._def.values}}CW.create=(e,t)=>new CW({values:e,typeName:Oe.ZodNativeEnum,...Ge(t)});class cz extends et{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==_e.promise&&n.common.async===!1)return Me(n,{code:me.invalid_type,expected:_e.promise,received:n.parsedType}),qe;const o=n.parsedType===_e.promise?n.data:Promise.resolve(n.data);return Po(o.then(r=>this._def.type.parseAsync(r,{path:n.path,errorMap:n.common.contextualErrorMap})))}}cz.create=(e,t)=>new cz({type:e,typeName:Oe.ZodPromise,...Ge(t)});class H0 extends et{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Oe.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:o}=this._processInputParams(t),r=this._def.effect||null,i={addIssue:a=>{Me(o,a),a.fatal?n.abort():n.dirty()},get path(){return o.path}};if(i.addIssue=i.addIssue.bind(i),r.type==="preprocess"){const a=r.transform(o.data,i);if(o.common.async)return Promise.resolve(a).then(async s=>{if(n.value==="aborted")return qe;const c=await this._def.schema._parseAsync({data:s,path:o.path,parent:o});return c.status==="aborted"?qe:c.status==="dirty"||n.value==="dirty"?F2(c.value):c});{if(n.value==="aborted")return qe;const s=this._def.schema._parseSync({data:a,path:o.path,parent:o});return s.status==="aborted"?qe:s.status==="dirty"||n.value==="dirty"?F2(s.value):s}}if(r.type==="refinement"){const a=s=>{const c=r.refinement(s,i);if(o.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return s};if(o.common.async===!1){const s=this._def.schema._parseSync({data:o.data,path:o.path,parent:o});return s.status==="aborted"?qe:(s.status==="dirty"&&n.dirty(),a(s.value),{status:n.value,value:s.value})}else return this._def.schema._parseAsync({data:o.data,path:o.path,parent:o}).then(s=>s.status==="aborted"?qe:(s.status==="dirty"&&n.dirty(),a(s.value).then(()=>({status:n.value,value:s.value}))))}if(r.type==="transform")if(o.common.async===!1){const a=this._def.schema._parseSync({data:o.data,path:o.path,parent:o});if(!R0(a))return qe;const s=r.transform(a.value,i);if(s instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:s}}else return this._def.schema._parseAsync({data:o.data,path:o.path,parent:o}).then(a=>R0(a)?Promise.resolve(r.transform(a.value,i)).then(s=>({status:n.value,value:s})):qe);st.assertNever(r)}}H0.create=(e,t,n)=>new H0({schema:e,typeName:Oe.ZodEffects,effect:t,...Ge(n)});H0.createWithPreprocess=(e,t,n)=>new H0({schema:t,effect:{type:"preprocess",transform:e},typeName:Oe.ZodEffects,...Ge(n)});class za extends et{_parse(t){return this._getType(t)===_e.undefined?Po(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}za.create=(e,t)=>new za({innerType:e,typeName:Oe.ZodOptional,...Ge(t)});class O0 extends et{_parse(t){return this._getType(t)===_e.null?Po(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}O0.create=(e,t)=>new O0({innerType:e,typeName:Oe.ZodNullable,...Ge(t)});class tO extends et{_parse(t){const{ctx:n}=this._processInputParams(t);let o=n.data;return n.parsedType===_e.undefined&&(o=this._def.defaultValue()),this._def.innerType._parse({data:o,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}tO.create=(e,t)=>new tO({innerType:e,typeName:Oe.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Ge(t)});class nO extends et{_parse(t){const{ctx:n}=this._processInputParams(t),o={...n,common:{...n.common,issues:[]}},r=this._def.innerType._parse({data:o.data,path:o.path,parent:{...o}});return oz(r)?r.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Ri(o.common.issues)},input:o.data})})):{status:"valid",value:r.status==="valid"?r.value:this._def.catchValue({get error(){return new Ri(o.common.issues)},input:o.data})}}removeCatch(){return this._def.innerType}}nO.create=(e,t)=>new nO({innerType:e,typeName:Oe.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Ge(t)});class SW extends et{_parse(t){if(this._getType(t)!==_e.nan){const o=this._getOrReturnCtx(t);return Me(o,{code:me.invalid_type,expected:_e.nan,received:o.parsedType}),qe}return{status:"valid",value:t.data}}}SW.create=e=>new SW({typeName:Oe.ZodNaN,...Ge(e)});class BOe extends et{_parse(t){const{ctx:n}=this._processInputParams(t),o=n.data;return this._def.type._parse({data:o,path:n.path,parent:n})}unwrap(){return this._def.type}}class nq extends et{_parse(t){const{status:n,ctx:o}=this._processInputParams(t);if(o.common.async)return(async()=>{const i=await this._def.in._parseAsync({data:o.data,path:o.path,parent:o});return i.status==="aborted"?qe:i.status==="dirty"?(n.dirty(),F2(i.value)):this._def.out._parseAsync({data:i.value,path:o.path,parent:o})})();{const r=this._def.in._parseSync({data:o.data,path:o.path,parent:o});return r.status==="aborted"?qe:r.status==="dirty"?(n.dirty(),{status:"dirty",value:r.value}):this._def.out._parseSync({data:r.value,path:o.path,parent:o})}}static create(t,n){return new nq({in:t,out:n,typeName:Oe.ZodPipeline})}}class oO extends et{_parse(t){const n=this._def.innerType._parse(t),o=r=>(R0(r)&&(r.value=Object.freeze(r.value)),r);return oz(n)?n.then(r=>o(r)):o(n)}unwrap(){return this._def.innerType}}oO.create=(e,t)=>new oO({innerType:e,typeName:Oe.ZodReadonly,...Ge(t)});var Oe;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(Oe||(Oe={}));const un=Ii.create,nee=T0.create,UOe=YH.create,Ah=QH.create;Fa.create;const ps=Vr.create,at=Wt.create,rO=iz.create;az.create;Fd.create;const LW=sz.create,Ip=eO.create,Ap=D0.create;cz.create;za.create;O0.create;const WOe=at({$state:un().min(1)}),Mi=at({$action:un().min(1)}),GOe=at({$cond:Ah(),$then:Ah(),$else:Ah().optional()}),Uo=e=>rO([e,WOe,Mi,GOe]),Ht=Uo(un()),xi=Uo(nee()),Ep=Uo(UOe()),oee={Card:at({title:Ht.optional()}),Separator:at({orientation:Uo(Ap(["horizontal","vertical"])).optional()}),Tabs:at({value:Ht.optional(),items:ps(at({id:un(),label:un()})),onChange:Mi.optional()}),Accordion:at({items:ps(at({id:un(),title:un(),content:un()}))}),Badge:at({label:Ht,variant:Uo(Ap(["default","secondary","destructive","outline"])).optional()}),Avatar:at({src:Ht.optional(),alt:Ht.optional(),fallback:Ht.optional()}),Progress:at({value:xi}),Skeleton:at({width:xi.optional(),height:xi.optional()}),Label:at({text:Ht}),Heading:at({level:Uo(rO([Ip(1),Ip(2),Ip(3),Ip(4)])).optional(),text:Ht}),Text:at({text:Ht,muted:Ep.optional()}),Icon:at({name:Ht,size:xi.optional()}),Chart:at({kind:Uo(Ap(["bar","line","area","pie"])),data:Uo(ps(LW(un(),Ah()))),xKey:Ht.optional(),series:ps(at({key:un(),label:un().optional()})).optional()}),Table:at({columns:ps(at({key:un(),label:un()})),rows:Uo(ps(LW(un(),Ah())))}),Metric:at({label:Ht,value:Uo(rO([un(),nee()]))}),CodeBlock:at({code:Ht,language:Ht.optional()}),Markdown:at({content:Ht}),Button:at({label:Ht,variant:Uo(Ap(["default","destructive","outline","secondary","ghost","link"])).optional(),onClick:Mi.optional(),disabled:Ep.optional()}),Input:at({value:Ht.optional(),placeholder:Ht.optional(),onChange:Mi.optional()}),Checkbox:at({checked:Ep.optional(),onChange:Mi.optional(),label:Ht.optional()}),Switch:at({checked:Ep.optional(),onChange:Mi.optional()}),Select:at({value:Ht.optional(),items:ps(at({value:un(),label:un()})),onChange:Mi.optional()}),Textarea:at({value:Ht.optional(),placeholder:Ht.optional(),rows:xi.optional(),onChange:Mi.optional()}),Slider:at({value:xi.optional(),min:xi.optional(),max:xi.optional(),step:xi.optional(),onChange:Mi.optional()})},ree=Object.keys(oee);Object.fromEntries(ree.map(e=>[e,{props:oee[e],description:e}]));function NW(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Gr(...e){return t=>{let n=!1;const o=e.map(r=>{const i=NW(r,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let r=0;r<o.length;r++){const i=o[r];typeof i=="function"?i():NW(e[r],null)}}}}function yt(...e){return m.useCallback(Gr(...e),e)}var KOe=Symbol.for("react.lazy"),lz=FO[" use ".trim().toString()];function XOe(e){return typeof e=="object"&&e!==null&&"then"in e}function iee(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===KOe&&"_payload"in e&&XOe(e._payload)}function ZOe(e){const t=QOe(e),n=m.forwardRef((o,r)=>{let{children:i,...a}=o;iee(i)&&typeof lz=="function"&&(i=lz(i._payload));const s=m.Children.toArray(i),c=s.find(eFe);if(c){const l=c.props.children,h=s.map(u=>u===c?m.Children.count(l)>1?m.Children.only(null):m.isValidElement(l)?l.props.children:null:u);return f.jsx(t,{...a,ref:r,children:m.isValidElement(l)?m.cloneElement(l,void 0,h):null})}return f.jsx(t,{...a,ref:r,children:i})});return n.displayName=`${e}.Slot`,n}var YOe=ZOe("Slot");function QOe(e){const t=m.forwardRef((n,o)=>{let{children:r,...i}=n;if(iee(r)&&typeof lz=="function"&&(r=lz(r._payload)),m.isValidElement(r)){const a=nFe(r),s=tFe(i,r.props);return r.type!==m.Fragment&&(s.ref=o?Gr(o,a):a),m.cloneElement(r,s)}return m.Children.count(r)>1?m.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var JOe=Symbol("radix.slottable");function eFe(e){return m.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===JOe}function tFe(e,t){const n={...t};for(const o in t){const r=e[o],i=t[o];/^on[A-Z]/.test(o)?r&&i?n[o]=(...s)=>{const c=i(...s);return r(...s),c}:r&&(n[o]=r):o==="style"?n[o]={...r,...i}:o==="className"&&(n[o]=[r,i].filter(Boolean).join(" "))}return{...e,...n}}function nFe(e){var o,r;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(r=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const IW=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,AW=GY,aee=(e,t)=>n=>{var o;if((t==null?void 0:t.variants)==null)return AW(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:r,defaultVariants:i}=t,a=Object.keys(r).map(l=>{const h=n==null?void 0:n[l],u=i==null?void 0:i[l];if(h===null)return null;const p=IW(h)||IW(u);return r[l][p]}),s=n&&Object.entries(n).reduce((l,h)=>{let[u,p]=h;return p===void 0||(l[u]=p),l},{}),c=t==null||(o=t.compoundVariants)===null||o===void 0?void 0:o.reduce((l,h)=>{let{class:u,className:p,...y}=h;return Object.entries(y).every(g=>{let[k,x]=g;return Array.isArray(x)?x.includes({...i,...s}[k]):{...i,...s}[k]===x})?[...l,u,p]:l},[]);return AW(e,a,c,n==null?void 0:n.class,n==null?void 0:n.className)},oFe=aee("sf:inline-flex sf:items-center sf:justify-center sf:whitespace-nowrap sf:rounded-md sf:text-sm sf:font-medium sf:ring-offset-background sf:transition-colors sf:focus-visible:outline-hidden sf:focus-visible:ring-2 sf:focus-visible:ring-ring sf:focus-visible:ring-offset-2 sf:disabled:pointer-events-none sf:disabled:opacity-50",{variants:{variant:{default:"sf:bg-primary sf:text-primary-foreground sf:font-semibold sf:hover:bg-emerald-400",destructive:"sf:bg-destructive sf:text-destructive-foreground sf:hover:bg-destructive/90",outline:"sf:border sf:border-input sf:bg-background sf:hover:bg-secondary sf:hover:text-foreground",secondary:"sf:bg-secondary sf:text-secondary-foreground sf:hover:bg-secondary/80",ghost:"sf:text-muted-foreground sf:hover:bg-muted sf:hover:text-foreground",link:"sf:text-primary sf:underline-offset-4 sf:hover:underline"},size:{default:"sf:h-9 sf:px-4 sf:py-2",sm:"sf:h-8 sf:rounded-md sf:px-3",lg:"sf:h-11 sf:rounded-md sf:px-8",icon:"sf:h-9 sf:w-9"}},defaultVariants:{variant:"default",size:"default"}}),rt=m.forwardRef(({className:e,variant:t,size:n,asChild:o=!1,...r},i)=>{const a=o?YOe:"button";return f.jsx(a,{className:te(oFe({variant:t,size:n,className:e})),ref:i,...r})});rt.displayName="Button";function see(e,[t,n]){return Math.min(n,Math.max(t,e))}function Ce(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e==null||e(r),n===!1||!r.defaultPrevented)return t==null?void 0:t(r)}}function rFe(e,t){const n=m.createContext(t),o=i=>{const{children:a,...s}=i,c=m.useMemo(()=>s,Object.values(s));return f.jsx(n.Provider,{value:c,children:a})};o.displayName=e+"Provider";function r(i){const a=m.useContext(n);if(a)return a;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return[o,r]}function cr(e,t=[]){let n=[];function o(i,a){const s=m.createContext(a),c=n.length;n=[...n,a];const l=u=>{var v;const{scope:p,children:y,...g}=u,k=((v=p==null?void 0:p[e])==null?void 0:v[c])||s,x=m.useMemo(()=>g,Object.values(g));return f.jsx(k.Provider,{value:x,children:y})};l.displayName=i+"Provider";function h(u,p){var k;const y=((k=p==null?void 0:p[e])==null?void 0:k[c])||s,g=m.useContext(y);if(g)return g;if(a!==void 0)return a;throw new Error(`\`${u}\` must be used within \`${i}\``)}return[l,h]}const r=()=>{const i=n.map(a=>m.createContext(a));return function(s){const c=(s==null?void 0:s[e])||i;return m.useMemo(()=>({[`__scope${e}`]:{...s,[e]:c}}),[s,c])}};return r.scopeName=e,[o,iFe(r,...t)]}function iFe(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const o=e.map(r=>({useScope:r(),scopeName:r.scopeName}));return function(i){const a=o.reduce((s,{useScope:c,scopeName:l})=>{const u=c(i)[`__scope${l}`];return{...s,...u}},{});return m.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}var qa=globalThis!=null&&globalThis.document?m.useLayoutEffect:()=>{},aFe=FO[" useInsertionEffect ".trim().toString()]||qa;function Yd({prop:e,defaultProp:t,onChange:n=()=>{},caller:o}){const[r,i,a]=sFe({defaultProp:t,onChange:n}),s=e!==void 0,c=s?e:r;{const h=m.useRef(e!==void 0);m.useEffect(()=>{const u=h.current;u!==s&&console.warn(`${o} is changing from ${u?"controlled":"uncontrolled"} to ${s?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),h.current=s},[s,o])}const l=m.useCallback(h=>{var u;if(s){const p=cFe(h)?h(e):h;p!==e&&((u=a.current)==null||u.call(a,p))}else i(h)},[s,e,i,a]);return[c,l]}function sFe({defaultProp:e,onChange:t}){const[n,o]=m.useState(e),r=m.useRef(n),i=m.useRef(t);return aFe(()=>{i.current=t},[t]),m.useEffect(()=>{var a;r.current!==n&&((a=i.current)==null||a.call(i,n),r.current=n)},[n,r]),[n,o,i]}function cFe(e){return typeof e=="function"}var lFe=m.createContext(void 0);function uR(e){const t=m.useContext(lFe);return e||t||"ltr"}function dFe(e){const t=m.useRef({value:e,previous:e});return m.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function cee(e){const[t,n]=m.useState(void 0);return qa(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const o=new ResizeObserver(r=>{if(!Array.isArray(r)||!r.length)return;const i=r[0];let a,s;if("borderBoxSize"in i){const c=i.borderBoxSize,l=Array.isArray(c)?c[0]:c;a=l.inlineSize,s=l.blockSize}else a=e.offsetWidth,s=e.offsetHeight;n({width:a,height:s})});return o.observe(e,{box:"border-box"}),()=>o.unobserve(e)}else n(void 0)},[e]),t}function F0(e){const t=uFe(e),n=m.forwardRef((o,r)=>{const{children:i,...a}=o,s=m.Children.toArray(i),c=s.find(fFe);if(c){const l=c.props.children,h=s.map(u=>u===c?m.Children.count(l)>1?m.Children.only(null):m.isValidElement(l)?l.props.children:null:u);return f.jsx(t,{...a,ref:r,children:m.isValidElement(l)?m.cloneElement(l,void 0,h):null})}return f.jsx(t,{...a,ref:r,children:i})});return n.displayName=`${e}.Slot`,n}function uFe(e){const t=m.forwardRef((n,o)=>{const{children:r,...i}=n;if(m.isValidElement(r)){const a=yFe(r),s=pFe(i,r.props);return r.type!==m.Fragment&&(s.ref=o?Gr(o,a):a),m.cloneElement(r,s)}return m.Children.count(r)>1?m.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var lee=Symbol("radix.slottable");function hFe(e){const t=({children:n})=>f.jsx(f.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=lee,t}function fFe(e){return m.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===lee}function pFe(e,t){const n={...t};for(const o in t){const r=e[o],i=t[o];/^on[A-Z]/.test(o)?r&&i?n[o]=(...s)=>{const c=i(...s);return r(...s),c}:r&&(n[o]=r):o==="style"?n[o]={...r,...i}:o==="className"&&(n[o]=[r,i].filter(Boolean).join(" "))}return{...e,...n}}function yFe(e){var o,r;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(r=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var mFe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ve=mFe.reduce((e,t)=>{const n=F0(`Primitive.${t}`),o=m.forwardRef((r,i)=>{const{asChild:a,...s}=r,c=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),f.jsx(c,{...s,ref:i})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{});function dee(e,t){e&&Kd.flushSync(()=>e.dispatchEvent(t))}function oq(e){const t=e+"CollectionProvider",[n,o]=cr(t),[r,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=k=>{const{scope:x,children:v}=k,M=Er.useRef(null),w=Er.useRef(new Map).current;return f.jsx(r,{scope:x,itemMap:w,collectionRef:M,children:v})};a.displayName=t;const s=e+"CollectionSlot",c=F0(s),l=Er.forwardRef((k,x)=>{const{scope:v,children:M}=k,w=i(s,v),b=yt(x,w.collectionRef);return f.jsx(c,{ref:b,children:M})});l.displayName=s;const h=e+"CollectionItemSlot",u="data-radix-collection-item",p=F0(h),y=Er.forwardRef((k,x)=>{const{scope:v,children:M,...w}=k,b=Er.useRef(null),C=yt(x,b),_=i(h,v);return Er.useEffect(()=>(_.itemMap.set(b,{ref:b,...w}),()=>void _.itemMap.delete(b))),f.jsx(p,{[u]:"",ref:C,children:M})});y.displayName=h;function g(k){const x=i(e+"CollectionConsumer",k);return Er.useCallback(()=>{const M=x.collectionRef.current;if(!M)return[];const w=Array.from(M.querySelectorAll(`[${u}]`));return Array.from(x.itemMap.values()).sort((_,S)=>w.indexOf(_.ref.current)-w.indexOf(S.ref.current))},[x.collectionRef,x.itemMap])}return[{Provider:a,Slot:l,ItemSlot:y},g,o]}var uee=["PageUp","PageDown"],hee=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],fee={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},Q0="Slider",[iO,gFe,kFe]=oq(Q0),[pee]=cr(Q0,[kFe]),[vFe,hR]=pee(Q0),yee=m.forwardRef((e,t)=>{const{name:n,min:o=0,max:r=100,step:i=1,orientation:a="horizontal",disabled:s=!1,minStepsBetweenThumbs:c=0,defaultValue:l=[o],value:h,onValueChange:u=()=>{},onValueCommit:p=()=>{},inverted:y=!1,form:g,...k}=e,x=m.useRef(new Set),v=m.useRef(0),w=a==="horizontal"?xFe:wFe,[b=[],C]=Yd({prop:h,defaultProp:l,onChange:E=>{var U;(U=[...x.current][v.current])==null||U.focus(),u(E)}}),_=m.useRef(b);function S(E){const z=SFe(b,E);A(E,z)}function N(E){A(E,v.current)}function P(){const E=_.current[v.current];b[v.current]!==E&&p(b)}function A(E,z,{commit:U}={commit:!1}){const $=AFe(i),T=EFe(Math.round((E-o)/i)*i+o,$),D=see(T,[o,r]);C((O=[])=>{const I=_Fe(O,D,z);if(IFe(I,c*i)){v.current=I.indexOf(D);const R=String(I)!==String(O);return R&&U&&p(I),R?I:O}else return O})}return f.jsx(vFe,{scope:e.__scopeSlider,name:n,disabled:s,min:o,max:r,valueIndexToChangeRef:v,thumbs:x.current,values:b,orientation:a,form:g,children:f.jsx(iO.Provider,{scope:e.__scopeSlider,children:f.jsx(iO.Slot,{scope:e.__scopeSlider,children:f.jsx(w,{"aria-disabled":s,"data-disabled":s?"":void 0,...k,ref:t,onPointerDown:Ce(k.onPointerDown,()=>{s||(_.current=b)}),min:o,max:r,inverted:y,onSlideStart:s?void 0:S,onSlideMove:s?void 0:N,onSlideEnd:s?void 0:P,onHomeKeyDown:()=>!s&&A(o,0,{commit:!0}),onEndKeyDown:()=>!s&&A(r,b.length-1,{commit:!0}),onStepKeyDown:({event:E,direction:z})=>{if(!s){const T=uee.includes(E.key)||E.shiftKey&&hee.includes(E.key)?10:1,D=v.current,O=b[D],I=i*T*z;A(O+I,D,{commit:!0})}}})})})})});yee.displayName=Q0;var[mee,gee]=pee(Q0,{startEdge:"left",endEdge:"right",size:"width",direction:1}),xFe=m.forwardRef((e,t)=>{const{min:n,max:o,dir:r,inverted:i,onSlideStart:a,onSlideMove:s,onSlideEnd:c,onStepKeyDown:l,...h}=e,[u,p]=m.useState(null),y=yt(t,w=>p(w)),g=m.useRef(void 0),k=uR(r),x=k==="ltr",v=x&&!i||!x&&i;function M(w){const b=g.current||u.getBoundingClientRect(),C=[0,b.width],S=rq(C,v?[n,o]:[o,n]);return g.current=b,S(w-b.left)}return f.jsx(mee,{scope:e.__scopeSlider,startEdge:v?"left":"right",endEdge:v?"right":"left",direction:v?1:-1,size:"width",children:f.jsx(kee,{dir:k,"data-orientation":"horizontal",...h,ref:y,style:{...h.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:w=>{const b=M(w.clientX);a==null||a(b)},onSlideMove:w=>{const b=M(w.clientX);s==null||s(b)},onSlideEnd:()=>{g.current=void 0,c==null||c()},onStepKeyDown:w=>{const C=fee[v?"from-left":"from-right"].includes(w.key);l==null||l({event:w,direction:C?-1:1})}})})}),wFe=m.forwardRef((e,t)=>{const{min:n,max:o,inverted:r,onSlideStart:i,onSlideMove:a,onSlideEnd:s,onStepKeyDown:c,...l}=e,h=m.useRef(null),u=yt(t,h),p=m.useRef(void 0),y=!r;function g(k){const x=p.current||h.current.getBoundingClientRect(),v=[0,x.height],w=rq(v,y?[o,n]:[n,o]);return p.current=x,w(k-x.top)}return f.jsx(mee,{scope:e.__scopeSlider,startEdge:y?"bottom":"top",endEdge:y?"top":"bottom",size:"height",direction:y?1:-1,children:f.jsx(kee,{"data-orientation":"vertical",...l,ref:u,style:{...l.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:k=>{const x=g(k.clientY);i==null||i(x)},onSlideMove:k=>{const x=g(k.clientY);a==null||a(x)},onSlideEnd:()=>{p.current=void 0,s==null||s()},onStepKeyDown:k=>{const v=fee[y?"from-bottom":"from-top"].includes(k.key);c==null||c({event:k,direction:v?-1:1})}})})}),kee=m.forwardRef((e,t)=>{const{__scopeSlider:n,onSlideStart:o,onSlideMove:r,onSlideEnd:i,onHomeKeyDown:a,onEndKeyDown:s,onStepKeyDown:c,...l}=e,h=hR(Q0,n);return f.jsx(Ve.span,{...l,ref:t,onKeyDown:Ce(e.onKeyDown,u=>{u.key==="Home"?(a(u),u.preventDefault()):u.key==="End"?(s(u),u.preventDefault()):uee.concat(hee).includes(u.key)&&(c(u),u.preventDefault())}),onPointerDown:Ce(e.onPointerDown,u=>{const p=u.target;p.setPointerCapture(u.pointerId),u.preventDefault(),h.thumbs.has(p)?p.focus():o(u)}),onPointerMove:Ce(e.onPointerMove,u=>{u.target.hasPointerCapture(u.pointerId)&&r(u)}),onPointerUp:Ce(e.onPointerUp,u=>{const p=u.target;p.hasPointerCapture(u.pointerId)&&(p.releasePointerCapture(u.pointerId),i(u))})})}),vee="SliderTrack",xee=m.forwardRef((e,t)=>{const{__scopeSlider:n,...o}=e,r=hR(vee,n);return f.jsx(Ve.span,{"data-disabled":r.disabled?"":void 0,"data-orientation":r.orientation,...o,ref:t})});xee.displayName=vee;var aO="SliderRange",wee=m.forwardRef((e,t)=>{const{__scopeSlider:n,...o}=e,r=hR(aO,n),i=gee(aO,n),a=m.useRef(null),s=yt(t,a),c=r.values.length,l=r.values.map(p=>_ee(p,r.min,r.max)),h=c>1?Math.min(...l):0,u=100-Math.max(...l);return f.jsx(Ve.span,{"data-orientation":r.orientation,"data-disabled":r.disabled?"":void 0,...o,ref:s,style:{...e.style,[i.startEdge]:h+"%",[i.endEdge]:u+"%"}})});wee.displayName=aO;var sO="SliderThumb",Mee=m.forwardRef((e,t)=>{const n=gFe(e.__scopeSlider),[o,r]=m.useState(null),i=yt(t,s=>r(s)),a=m.useMemo(()=>o?n().findIndex(s=>s.ref.current===o):-1,[n,o]);return f.jsx(MFe,{...e,ref:i,index:a})}),MFe=m.forwardRef((e,t)=>{const{__scopeSlider:n,index:o,name:r,...i}=e,a=hR(sO,n),s=gee(sO,n),[c,l]=m.useState(null),h=yt(t,M=>l(M)),u=c?a.form||!!c.closest("form"):!0,p=cee(c),y=a.values[o],g=y===void 0?0:_ee(y,a.min,a.max),k=CFe(o,a.values.length),x=p==null?void 0:p[s.size],v=x?LFe(x,g,s.direction):0;return m.useEffect(()=>{if(c)return a.thumbs.add(c),()=>{a.thumbs.delete(c)}},[c,a.thumbs]),f.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[s.startEdge]:`calc(${g}% + ${v}px)`},children:[f.jsx(iO.ItemSlot,{scope:e.__scopeSlider,children:f.jsx(Ve.span,{role:"slider","aria-label":e["aria-label"]||k,"aria-valuemin":a.min,"aria-valuenow":y,"aria-valuemax":a.max,"aria-orientation":a.orientation,"data-orientation":a.orientation,"data-disabled":a.disabled?"":void 0,tabIndex:a.disabled?void 0:0,...i,ref:h,style:y===void 0?{display:"none"}:e.style,onFocus:Ce(e.onFocus,()=>{a.valueIndexToChangeRef.current=o})})}),u&&f.jsx(bee,{name:r??(a.name?a.name+(a.values.length>1?"[]":""):void 0),form:a.form,value:y},o)]})});Mee.displayName=sO;var bFe="RadioBubbleInput",bee=m.forwardRef(({__scopeSlider:e,value:t,...n},o)=>{const r=m.useRef(null),i=yt(r,o),a=dFe(t);return m.useEffect(()=>{const s=r.current;if(!s)return;const c=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(c,"value").set;if(a!==t&&h){const u=new Event("input",{bubbles:!0});h.call(s,t),s.dispatchEvent(u)}},[a,t]),f.jsx(Ve.input,{style:{display:"none"},...n,ref:i,defaultValue:t})});bee.displayName=bFe;function _Fe(e=[],t,n){const o=[...e];return o[n]=t,o.sort((r,i)=>r-i)}function _ee(e,t,n){const i=100/(n-t)*(e-t);return see(i,[0,100])}function CFe(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function SFe(e,t){if(e.length===1)return 0;const n=e.map(r=>Math.abs(r-t)),o=Math.min(...n);return n.indexOf(o)}function LFe(e,t,n){const o=e/2,i=rq([0,50],[0,o]);return(o-i(t)*n)*n}function NFe(e){return e.slice(0,-1).map((t,n)=>e[n+1]-t)}function IFe(e,t){if(t>0){const n=NFe(e);return Math.min(...n)>=t}return!0}function rq(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const o=(t[1]-t[0])/(e[1]-e[0]);return t[0]+o*(n-e[0])}}function AFe(e){return(String(e).split(".")[1]||"").length}function EFe(e,t){const n=Math.pow(10,t);return Math.round(e*n)/n}var Cee=yee,jFe=xee,$Fe=wee,PFe=Mee;const iq=m.forwardRef(({className:e,...t},n)=>f.jsxs(Cee,{ref:n,className:te("sf:relative sf:flex sf:w-full sf:touch-none sf:select-none sf:items-center",e),...t,children:[f.jsx(jFe,{className:"sf:relative sf:h-1.5 sf:w-full sf:grow sf:overflow-hidden sf:rounded-full sf:bg-secondary",children:f.jsx($Fe,{className:"sf:absolute sf:h-full sf:bg-primary"})}),f.jsx(PFe,{className:"sf:block sf:h-4 sf:w-4 sf:rounded-full sf:border sf:border-primary/60 sf:bg-background sf:shadow-sm sf:transition-colors sf:hover:border-primary sf:focus-visible:outline-hidden sf:focus-visible:ring-2 sf:focus-visible:ring-ring sf:disabled:pointer-events-none sf:disabled:opacity-50"})]}));iq.displayName=Cee.displayName;const zFe={1:"sf:text-2xl sf:font-semibold sf:tracking-tight",2:"sf:text-xl sf:font-semibold sf:tracking-tight",3:"sf:text-lg sf:font-semibold",4:"sf:text-base sf:font-semibold"};function RFe({text:e,level:t=2}){const n=`h${t}`;return f.jsx(n,{className:te(zFe[t]),children:e})}const See=m.createContext({custom:{}});function TFe({value:e,children:t}){return f.jsx(See.Provider,{value:e,children:t})}function DFe(){return m.useContext(See)}function q0({name:e,as:t,size:n=16,fallback:o=ZAe,...r}){const i=DFe(),a=t??(e?i.custom[e]:void 0)??(e?Qh[e]:void 0)??Qh[o];return a?f.jsx(a,{size:n,...r}):null}function HFe({name:e,size:t=16}){return f.jsx(q0,{name:e,size:t,"aria-hidden":!0})}function OFe(e){return e==null?"":typeof e=="string"||typeof e=="number"?e:typeof e=="object"?JSON.stringify(e):String(e)}function FFe({label:e,value:t}){return f.jsxs("div",{className:"sf:flex sf:flex-col sf:gap-1",children:[f.jsx("span",{className:"sf:text-muted-foreground sf:text-xs sf:uppercase sf:tracking-wide",children:e}),f.jsx("span",{className:"sf:font-semibold sf:text-2xl sf:tabular-nums",children:OFe(t)})]})}function qFe(e){return e==null?"":typeof e=="string"||typeof e=="number"?String(e):JSON.stringify(e)}function VFe({columns:e=[],rows:t=[]}){return f.jsx("div",{className:"sf:w-full sf:overflow-x-auto",children:f.jsxs("table",{className:"sf:w-full sf:text-left sf:text-sm",children:[f.jsx("thead",{className:"sf:border-b sf:bg-muted/50",children:f.jsx("tr",{children:e.map(n=>f.jsx("th",{scope:"col",className:"sf:px-3 sf:py-2 sf:font-medium sf:text-muted-foreground",children:n.label},n.key))})}),f.jsx("tbody",{children:t.map((n,o)=>f.jsx("tr",{className:"sf:border-b last:sf:border-0",children:e.map(r=>f.jsx("td",{className:"sf:px-3 sf:py-2",children:qFe(n[r.key])},r.key))},o))})]})})}function BFe({text:e,muted:t}){return f.jsx("p",{className:te("sf:text-sm",t&&"sf:text-muted-foreground"),children:e})}function UFe({title:e,children:t}){return f.jsxs("div",{className:"sf:bg-card sf:p-4 sf:text-card-foreground sf:shadow-sm",children:[e!==void 0?f.jsx("div",{className:"sf:mb-3 sf:font-semibold sf:text-base sf:leading-tight",children:e}):null,f.jsx("div",{className:"sf:flex sf:flex-col sf:gap-3",children:t})]})}function WFe({orientation:e="horizontal"}){return f.jsx("div",{"aria-orientation":e,className:te("sf:bg-border",e==="horizontal"?"sf:h-px sf:w-full":"sf:h-full sf:w-px")})}function GFe({value:e,items:t,onChange:n,children:o}){const r=t??[];return f.jsxs("div",{className:"sf:flex sf:flex-col sf:gap-2",children:[f.jsx("div",{className:"sf:inline-flex sf:h-9 sf:items-center sf:justify-start sf:rounded-md sf:bg-muted sf:p-1 sf:text-muted-foreground",children:r.map(i=>f.jsx("button",{type:"button","data-state":e===i.id?"active":"inactive",onClick:()=>n==null?void 0:n({value:i.id}),className:"sf:inline-flex sf:items-center sf:justify-center sf:whitespace-nowrap sf:rounded-sm sf:px-3 sf:py-1 sf:text-xs sf:font-medium sf:transition-all sf:data-[state=active]:bg-background sf:data-[state=active]:text-foreground sf:data-[state=active]:shadow-sm",children:i.label},i.id))}),o]})}function KFe({items:e}){const t=e??[];return f.jsx("div",{className:"sf:flex sf:flex-col sf:divide-y sf:rounded-md sf:border",children:t.map(n=>f.jsxs("details",{className:"sf:group sf:px-3 sf:py-2",children:[f.jsx("summary",{className:"sf:cursor-pointer sf:py-1 sf:font-medium sf:text-sm",children:n.title}),f.jsx("div",{className:"sf:py-2 sf:text-muted-foreground sf:text-sm",children:n.content})]},n.id))})}const EW={default:"sf:bg-primary sf:text-primary-foreground",secondary:"sf:bg-secondary sf:text-secondary-foreground",destructive:"sf:bg-destructive sf:text-destructive-foreground",outline:"sf:border sf:border-border sf:text-foreground"};function XFe({label:e,variant:t="default"}){return f.jsx("span",{className:te("sf:inline-flex sf:items-center sf:rounded-full sf:px-2.5 sf:py-0.5 sf:font-medium sf:text-xs",EW[t]??EW.default),children:e})}function ZFe({src:e,alt:t,fallback:n}){return e?f.jsx("img",{src:e,alt:t??"",className:"sf:inline-block sf:h-9 sf:w-9 sf:rounded-full sf:object-cover"}):f.jsx("span",{className:"sf:inline-flex sf:h-9 sf:w-9 sf:items-center sf:justify-center sf:rounded-full sf:bg-muted sf:font-medium sf:text-muted-foreground sf:text-sm",children:n??"?"})}function YFe({value:e=0}){const t=Math.max(0,Math.min(100,e));return f.jsx("div",{"aria-valuenow":t,"aria-valuemin":0,"aria-valuemax":100,className:"sf:relative sf:h-2 sf:w-full sf:overflow-hidden sf:rounded-full sf:bg-secondary",children:f.jsx("div",{className:"sf:h-full sf:bg-primary sf:transition-all",style:{width:`${t}%`}})})}function QFe({width:e,height:t}){return f.jsx("div",{className:"sf:animate-pulse sf:rounded-md sf:bg-muted",style:{width:e??"100%",height:t??16}})}function JFe({text:e}){return f.jsx("span",{className:"sf:font-medium sf:text-sm sf:leading-none",children:e})}function eqe({label:e,variant:t="default",onClick:n,disabled:o}){return f.jsx(rt,{variant:t,disabled:o,onClick:()=>n==null?void 0:n(),children:e})}const aq="sf:flex sf:h-9 sf:w-full sf:rounded-md sf:border sf:border-input sf:bg-background sf:px-3 sf:py-1 sf:text-sm sf:shadow-sm sf:transition-colors sf:placeholder:text-muted-foreground sf:focus-visible:outline-hidden sf:focus-visible:ring-1 sf:focus-visible:ring-ring sf:disabled:cursor-not-allowed sf:disabled:opacity-50";function tqe({value:e,placeholder:t,onChange:n}){return f.jsx("input",{type:"text",value:e??"",placeholder:t,onChange:o=>n==null?void 0:n({value:o.target.value}),className:aq})}function nqe({checked:e,onChange:t,label:n}){return f.jsxs("label",{className:"sf:inline-flex sf:items-center sf:gap-2 sf:text-sm",children:[f.jsx("input",{type:"checkbox",checked:e??!1,onChange:o=>t==null?void 0:t({checked:o.target.checked}),className:"sf:h-4 sf:w-4 sf:rounded sf:border sf:border-input sf:accent-primary"}),n]})}function oqe({checked:e,onChange:t}){return f.jsx("button",{type:"button",role:"switch","aria-checked":e??!1,onClick:()=>t==null?void 0:t({checked:!(e??!1)}),className:te("sf:relative sf:inline-flex sf:h-5 sf:w-9 sf:shrink-0 sf:cursor-pointer sf:items-center sf:rounded-full sf:border-2 sf:border-transparent sf:transition-colors",e?"sf:bg-primary":"sf:bg-input"),children:f.jsx("span",{className:te("sf:pointer-events-none sf:block sf:h-4 sf:w-4 sf:rounded-full sf:bg-background sf:shadow-lg sf:ring-0 sf:transition-transform",e?"sf:translate-x-4":"sf:translate-x-0")})})}function rqe({value:e,items:t,onChange:n}){return f.jsx("select",{value:e??"",onChange:o=>n==null?void 0:n({value:o.target.value}),className:aq,children:(t??[]).map(o=>f.jsx("option",{value:o.value,children:o.label},o.value))})}function iqe({value:e,placeholder:t,rows:n,onChange:o}){return f.jsx("textarea",{value:e??"",placeholder:t,rows:n,onChange:r=>o==null?void 0:o({value:r.target.value}),className:te(aq,"sf:min-h-16 sf:py-2")})}function aqe({value:e,min:t=0,max:n=100,step:o=1,onChange:r}){return f.jsx(iq,{value:e===void 0?void 0:[e],min:t,max:n,step:o,onValueChange:i=>{const[a]=i;typeof a=="number"&&(r==null||r({value:a}))}})}const sqe=m.lazy(()=>Z0(()=>import("./chart-DYrOhreJ.js"),__vite__mapDeps([0,1,2,3,4,5,6,7])));function cqe(e){return f.jsx(m.Suspense,{fallback:null,children:f.jsx(sqe,{...e})})}const lqe=m.lazy(()=>Z0(()=>import("./markdown-DKlQMpx8.js"),[]));function dqe(e){return f.jsx(m.Suspense,{fallback:null,children:f.jsx(lqe,{...e})})}const uqe=m.lazy(()=>Z0(()=>import("./code-block-DbJK70Ez.js"),[]));function hqe(e){return f.jsx(m.Suspense,{fallback:null,children:f.jsx(uqe,{...e})})}const Lee={Card:UFe,Separator:WFe,Tabs:GFe,Accordion:KFe,Badge:XFe,Avatar:ZFe,Progress:YFe,Skeleton:QFe,Label:JFe,Heading:RFe,Text:BFe,Icon:HFe,Chart:cqe,Table:VFe,Metric:FFe,CodeBlock:hqe,Markdown:dqe,Button:eqe,Input:tqe,Checkbox:nqe,Switch:oqe,Select:rqe,Textarea:iqe,Slider:aqe},jW=ree.filter(e=>Lee[e]===void 0);if(jW.length>0)throw new Error(`componentRegistry is missing impls for: ${jW.join(", ")}. Every catalog entry in COMPONENT_NAMES must have a matching component impl.`);const fqe={components:Lee};function pqe(e,t){return t.kind==="set"?{...e,[t.path]:t.value}:{...e,...t.partial}}function Nee(e){return e===null||typeof e!="object"?!1:"$state"in e||"$action"in e||"$param"in e||"$cond"in e}function dP(e,t,n,o){if(!Nee(e))return e;if(typeof e.$state=="string")return t[e.$state];if(typeof e.$action=="string"){const r=e.$action;return o.has(r)?i=>n(r,i):void 0}if("$cond"in e){const r=dP(e.$cond,t,n,o);return dP(r?e.$then:e.$else,t,n,o)}return e}function yqe(e,t,n,o){if(!e)return{};const r={};for(const[i,a]of Object.entries(e))r[i]=dP(a,t,n,o);return r}function $W({spec:e,nodeId:t,apiBaseUrl:n="/api",projectSlug:o,flowSlug:r}){const[i,a]=m.useReducer(pqe,e.state??{}),s=new Set(Object.keys(e.actions??{})),c=m.useCallback(async(l,h)=>{var y;const u=(y=e.actions)==null?void 0:y[l];if(!u)return;if(u.kind==="set"){const g=mqe(u.value,h,i);a({kind:"set",path:u.path,value:g});return}if(!o||!r)return;const p=`${n}/projects/${encodeURIComponent(o)}/flows/${encodeURIComponent(r)}/nodes/${encodeURIComponent(t)}/actions/${encodeURIComponent(l)}`;try{const g=await fetch(p,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(h??{})});if(!g.ok){const x=await g.text();a({kind:"set",path:`/__errors/${l}`,value:x});return}const k=await g.json();k!==null&&typeof k=="object"&&a({kind:"merge",partial:k})}catch(g){a({kind:"set",path:`/__errors/${l}`,value:g instanceof Error?g.message:String(g)})}},[e.actions,o,r,n,t,i]);return Iee(e.root,e,i,c,s)}function mqe(e,t,n){return Nee(e)?typeof e.$param=="string"?t!==null&&typeof t=="object"?t[e.$param]:void 0:typeof e.$state=="string"?n[e.$state]:e:e}function Iee(e,t,n,o,r){const i=t.elements[e];if(!i)return null;const a=fqe.components[i.type];if(!a)return null;const s=yqe(i.props,n,o,r),l=(i.children??[]).map(h=>f.jsx(gqe,{children:Iee(h,t,n,o,r)},h));return f.jsx(a,{...s,children:l.length>0?l:void 0})}function gqe({children:e}){return e}function Kr(e){const t=m.useRef(e);return m.useEffect(()=>{t.current=e}),m.useMemo(()=>(...n)=>{var o;return(o=t.current)==null?void 0:o.call(t,...n)},[])}function kqe(e,t=globalThis==null?void 0:globalThis.document){const n=Kr(e);m.useEffect(()=>{const o=r=>{r.key==="Escape"&&n(r)};return t.addEventListener("keydown",o,{capture:!0}),()=>t.removeEventListener("keydown",o,{capture:!0})},[n,t])}var vqe="DismissableLayer",cO="dismissableLayer.update",xqe="dismissableLayer.pointerDownOutside",wqe="dismissableLayer.focusOutside",PW,Aee=m.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),jf=m.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:o,onPointerDownOutside:r,onFocusOutside:i,onInteractOutside:a,onDismiss:s,...c}=e,l=m.useContext(Aee),[h,u]=m.useState(null),p=(h==null?void 0:h.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,y]=m.useState({}),g=yt(t,S=>u(S)),k=Array.from(l.layers),[x]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),v=k.indexOf(x),M=h?k.indexOf(h):-1,w=l.layersWithOutsidePointerEventsDisabled.size>0,b=M>=v,C=_qe(S=>{const N=S.target,P=[...l.branches].some(A=>A.contains(N));!b||P||(r==null||r(S),a==null||a(S),S.defaultPrevented||s==null||s())},p),_=Cqe(S=>{const N=S.target;[...l.branches].some(A=>A.contains(N))||(i==null||i(S),a==null||a(S),S.defaultPrevented||s==null||s())},p);return kqe(S=>{M===l.layers.size-1&&(o==null||o(S),!S.defaultPrevented&&s&&(S.preventDefault(),s()))},p),m.useEffect(()=>{if(h)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(PW=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(h)),l.layers.add(h),zW(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=PW)}},[h,p,n,l]),m.useEffect(()=>()=>{h&&(l.layers.delete(h),l.layersWithOutsidePointerEventsDisabled.delete(h),zW())},[h,l]),m.useEffect(()=>{const S=()=>y({});return document.addEventListener(cO,S),()=>document.removeEventListener(cO,S)},[]),f.jsx(Ve.div,{...c,ref:g,style:{pointerEvents:w?b?"auto":"none":void 0,...e.style},onFocusCapture:Ce(e.onFocusCapture,_.onFocusCapture),onBlurCapture:Ce(e.onBlurCapture,_.onBlurCapture),onPointerDownCapture:Ce(e.onPointerDownCapture,C.onPointerDownCapture)})});jf.displayName=vqe;var Mqe="DismissableLayerBranch",bqe=m.forwardRef((e,t)=>{const n=m.useContext(Aee),o=m.useRef(null),r=yt(t,o);return m.useEffect(()=>{const i=o.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),f.jsx(Ve.div,{...e,ref:r})});bqe.displayName=Mqe;function _qe(e,t=globalThis==null?void 0:globalThis.document){const n=Kr(e),o=m.useRef(!1),r=m.useRef(()=>{});return m.useEffect(()=>{const i=s=>{if(s.target&&!o.current){let c=function(){Eee(xqe,n,l,{discrete:!0})};const l={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",r.current),r.current=c,t.addEventListener("click",r.current,{once:!0})):c()}else t.removeEventListener("click",r.current);o.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",i),t.removeEventListener("click",r.current)}},[t,n]),{onPointerDownCapture:()=>o.current=!0}}function Cqe(e,t=globalThis==null?void 0:globalThis.document){const n=Kr(e),o=m.useRef(!1);return m.useEffect(()=>{const r=i=>{i.target&&!o.current&&Eee(wqe,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",r),()=>t.removeEventListener("focusin",r)},[t,n]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function zW(){const e=new CustomEvent(cO);document.dispatchEvent(e)}function Eee(e,t,n,{discrete:o}){const r=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),o?dee(r,i):r.dispatchEvent(i)}var GT=0;function sq(){m.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??RW()),document.body.insertAdjacentElement("beforeend",e[1]??RW()),GT++,()=>{GT===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),GT--}},[])}function RW(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var KT="focusScope.autoFocusOnMount",XT="focusScope.autoFocusOnUnmount",TW={bubbles:!1,cancelable:!0},Sqe="FocusScope",fR=m.forwardRef((e,t)=>{const{loop:n=!1,trapped:o=!1,onMountAutoFocus:r,onUnmountAutoFocus:i,...a}=e,[s,c]=m.useState(null),l=Kr(r),h=Kr(i),u=m.useRef(null),p=yt(t,k=>c(k)),y=m.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;m.useEffect(()=>{if(o){let k=function(w){if(y.paused||!s)return;const b=w.target;s.contains(b)?u.current=b:la(u.current,{select:!0})},x=function(w){if(y.paused||!s)return;const b=w.relatedTarget;b!==null&&(s.contains(b)||la(u.current,{select:!0}))},v=function(w){if(document.activeElement===document.body)for(const C of w)C.removedNodes.length>0&&la(s)};document.addEventListener("focusin",k),document.addEventListener("focusout",x);const M=new MutationObserver(v);return s&&M.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",k),document.removeEventListener("focusout",x),M.disconnect()}}},[o,s,y.paused]),m.useEffect(()=>{if(s){HW.add(y);const k=document.activeElement;if(!s.contains(k)){const v=new CustomEvent(KT,TW);s.addEventListener(KT,l),s.dispatchEvent(v),v.defaultPrevented||(Lqe(jqe(jee(s)),{select:!0}),document.activeElement===k&&la(s))}return()=>{s.removeEventListener(KT,l),setTimeout(()=>{const v=new CustomEvent(XT,TW);s.addEventListener(XT,h),s.dispatchEvent(v),v.defaultPrevented||la(k??document.body,{select:!0}),s.removeEventListener(XT,h),HW.remove(y)},0)}}},[s,l,h,y]);const g=m.useCallback(k=>{if(!n&&!o||y.paused)return;const x=k.key==="Tab"&&!k.altKey&&!k.ctrlKey&&!k.metaKey,v=document.activeElement;if(x&&v){const M=k.currentTarget,[w,b]=Nqe(M);w&&b?!k.shiftKey&&v===b?(k.preventDefault(),n&&la(w,{select:!0})):k.shiftKey&&v===w&&(k.preventDefault(),n&&la(b,{select:!0})):v===M&&k.preventDefault()}},[n,o,y.paused]);return f.jsx(Ve.div,{tabIndex:-1,...a,ref:p,onKeyDown:g})});fR.displayName=Sqe;function Lqe(e,{select:t=!1}={}){const n=document.activeElement;for(const o of e)if(la(o,{select:t}),document.activeElement!==n)return}function Nqe(e){const t=jee(e),n=DW(t,e),o=DW(t.reverse(),e);return[n,o]}function jee(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const r=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||r?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function DW(e,t){for(const n of e)if(!Iqe(n,{upTo:t}))return n}function Iqe(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Aqe(e){return e instanceof HTMLInputElement&&"select"in e}function la(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Aqe(e)&&t&&e.select()}}var HW=Eqe();function Eqe(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=OW(e,t),e.unshift(t)},remove(t){var n;e=OW(e,t),(n=e[0])==null||n.resume()}}}function OW(e,t){const n=[...e],o=n.indexOf(t);return o!==-1&&n.splice(o,1),n}function jqe(e){return e.filter(t=>t.tagName!=="A")}var $qe=FO[" useId ".trim().toString()]||(()=>{}),Pqe=0;function jn(e){const[t,n]=m.useState($qe());return qa(()=>{n(o=>o??String(Pqe++))},[e]),e||(t?`radix-${t}`:"")}const zqe=["top","right","bottom","left"],Va=Math.min,io=Math.max,dz=Math.round,jp=Math.floor,Br=e=>({x:e,y:e}),Rqe={left:"right",right:"left",bottom:"top",top:"bottom"};function lO(e,t,n){return io(e,Va(t,n))}function Ti(e,t){return typeof e=="function"?e(t):e}function Di(e){return e.split("-")[0]}function J0(e){return e.split("-")[1]}function cq(e){return e==="x"?"y":"x"}function lq(e){return e==="y"?"height":"width"}function Dr(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function dq(e){return cq(Dr(e))}function Tqe(e,t,n){n===void 0&&(n=!1);const o=J0(e),r=dq(e),i=lq(r);let a=r==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=uz(a)),[a,uz(a)]}function Dqe(e){const t=uz(e);return[dO(e),t,dO(t)]}function dO(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const FW=["left","right"],qW=["right","left"],Hqe=["top","bottom"],Oqe=["bottom","top"];function Fqe(e,t,n){switch(e){case"top":case"bottom":return n?t?qW:FW:t?FW:qW;case"left":case"right":return t?Hqe:Oqe;default:return[]}}function qqe(e,t,n,o){const r=J0(e);let i=Fqe(Di(e),n==="start",o);return r&&(i=i.map(a=>a+"-"+r),t&&(i=i.concat(i.map(dO)))),i}function uz(e){const t=Di(e);return Rqe[t]+e.slice(t.length)}function Vqe(e){return{top:0,right:0,bottom:0,left:0,...e}}function $ee(e){return typeof e!="number"?Vqe(e):{top:e,right:e,bottom:e,left:e}}function hz(e){const{x:t,y:n,width:o,height:r}=e;return{width:o,height:r,top:n,left:t,right:t+o,bottom:n+r,x:t,y:n}}function VW(e,t,n){let{reference:o,floating:r}=e;const i=Dr(t),a=dq(t),s=lq(a),c=Di(t),l=i==="y",h=o.x+o.width/2-r.width/2,u=o.y+o.height/2-r.height/2,p=o[s]/2-r[s]/2;let y;switch(c){case"top":y={x:h,y:o.y-r.height};break;case"bottom":y={x:h,y:o.y+o.height};break;case"right":y={x:o.x+o.width,y:u};break;case"left":y={x:o.x-r.width,y:u};break;default:y={x:o.x,y:o.y}}switch(J0(t)){case"start":y[a]-=p*(n&&l?-1:1);break;case"end":y[a]+=p*(n&&l?-1:1);break}return y}async function Bqe(e,t){var n;t===void 0&&(t={});const{x:o,y:r,platform:i,rects:a,elements:s,strategy:c}=e,{boundary:l="clippingAncestors",rootBoundary:h="viewport",elementContext:u="floating",altBoundary:p=!1,padding:y=0}=Ti(t,e),g=$ee(y),x=s[p?u==="floating"?"reference":"floating":u],v=hz(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(x)))==null||n?x:x.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(s.floating)),boundary:l,rootBoundary:h,strategy:c})),M=u==="floating"?{x:o,y:r,width:a.floating.width,height:a.floating.height}:a.reference,w=await(i.getOffsetParent==null?void 0:i.getOffsetParent(s.floating)),b=await(i.isElement==null?void 0:i.isElement(w))?await(i.getScale==null?void 0:i.getScale(w))||{x:1,y:1}:{x:1,y:1},C=hz(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:M,offsetParent:w,strategy:c}):M);return{top:(v.top-C.top+g.top)/b.y,bottom:(C.bottom-v.bottom+g.bottom)/b.y,left:(v.left-C.left+g.left)/b.x,right:(C.right-v.right+g.right)/b.x}}const Uqe=50,Wqe=async(e,t,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:i=[],platform:a}=n,s=a.detectOverflow?a:{...a,detectOverflow:Bqe},c=await(a.isRTL==null?void 0:a.isRTL(t));let l=await a.getElementRects({reference:e,floating:t,strategy:r}),{x:h,y:u}=VW(l,o,c),p=o,y=0;const g={};for(let k=0;k<i.length;k++){const x=i[k];if(!x)continue;const{name:v,fn:M}=x,{x:w,y:b,data:C,reset:_}=await M({x:h,y:u,initialPlacement:o,placement:p,strategy:r,middlewareData:g,rects:l,platform:s,elements:{reference:e,floating:t}});h=w??h,u=b??u,g[v]={...g[v],...C},_&&y<Uqe&&(y++,typeof _=="object"&&(_.placement&&(p=_.placement),_.rects&&(l=_.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:r}):_.rects),{x:h,y:u}=VW(l,p,c)),k=-1)}return{x:h,y:u,placement:p,strategy:r,middlewareData:g}},Gqe=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:o,placement:r,rects:i,platform:a,elements:s,middlewareData:c}=t,{element:l,padding:h=0}=Ti(e,t)||{};if(l==null)return{};const u=$ee(h),p={x:n,y:o},y=dq(r),g=lq(y),k=await a.getDimensions(l),x=y==="y",v=x?"top":"left",M=x?"bottom":"right",w=x?"clientHeight":"clientWidth",b=i.reference[g]+i.reference[y]-p[y]-i.floating[g],C=p[y]-i.reference[y],_=await(a.getOffsetParent==null?void 0:a.getOffsetParent(l));let S=_?_[w]:0;(!S||!await(a.isElement==null?void 0:a.isElement(_)))&&(S=s.floating[w]||i.floating[g]);const N=b/2-C/2,P=S/2-k[g]/2-1,A=Va(u[v],P),E=Va(u[M],P),z=A,U=S-k[g]-E,$=S/2-k[g]/2+N,T=lO(z,$,U),D=!c.arrow&&J0(r)!=null&&$!==T&&i.reference[g]/2-($<z?A:E)-k[g]/2<0,O=D?$<z?$-z:$-U:0;return{[y]:p[y]+O,data:{[y]:T,centerOffset:$-T-O,...D&&{alignmentOffset:O}},reset:D}}}),Kqe=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:r,middlewareData:i,rects:a,initialPlacement:s,platform:c,elements:l}=t,{mainAxis:h=!0,crossAxis:u=!0,fallbackPlacements:p,fallbackStrategy:y="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:k=!0,...x}=Ti(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const v=Di(r),M=Dr(s),w=Di(s)===s,b=await(c.isRTL==null?void 0:c.isRTL(l.floating)),C=p||(w||!k?[uz(s)]:Dqe(s)),_=g!=="none";!p&&_&&C.push(...qqe(s,k,g,b));const S=[s,...C],N=await c.detectOverflow(t,x),P=[];let A=((o=i.flip)==null?void 0:o.overflows)||[];if(h&&P.push(N[v]),u){const $=Tqe(r,a,b);P.push(N[$[0]],N[$[1]])}if(A=[...A,{placement:r,overflows:P}],!P.every($=>$<=0)){var E,z;const $=(((E=i.flip)==null?void 0:E.index)||0)+1,T=S[$];if(T&&(!(u==="alignment"?M!==Dr(T):!1)||A.every(I=>Dr(I.placement)===M?I.overflows[0]>0:!0)))return{data:{index:$,overflows:A},reset:{placement:T}};let D=(z=A.filter(O=>O.overflows[0]<=0).sort((O,I)=>O.overflows[1]-I.overflows[1])[0])==null?void 0:z.placement;if(!D)switch(y){case"bestFit":{var U;const O=(U=A.filter(I=>{if(_){const R=Dr(I.placement);return R===M||R==="y"}return!0}).map(I=>[I.placement,I.overflows.filter(R=>R>0).reduce((R,L)=>R+L,0)]).sort((I,R)=>I[1]-R[1])[0])==null?void 0:U[0];O&&(D=O);break}case"initialPlacement":D=s;break}if(r!==D)return{reset:{placement:D}}}return{}}}};function BW(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function UW(e){return zqe.some(t=>e[t]>=0)}const Xqe=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:o}=t,{strategy:r="referenceHidden",...i}=Ti(e,t);switch(r){case"referenceHidden":{const a=await o.detectOverflow(t,{...i,elementContext:"reference"}),s=BW(a,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:UW(s)}}}case"escaped":{const a=await o.detectOverflow(t,{...i,altBoundary:!0}),s=BW(a,n.floating);return{data:{escapedOffsets:s,escaped:UW(s)}}}default:return{}}}}},Pee=new Set(["left","top"]);async function Zqe(e,t){const{placement:n,platform:o,elements:r}=e,i=await(o.isRTL==null?void 0:o.isRTL(r.floating)),a=Di(n),s=J0(n),c=Dr(n)==="y",l=Pee.has(a)?-1:1,h=i&&c?-1:1,u=Ti(t,e);let{mainAxis:p,crossAxis:y,alignmentAxis:g}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return s&&typeof g=="number"&&(y=s==="end"?g*-1:g),c?{x:y*h,y:p*l}:{x:p*l,y:y*h}}const Yqe=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:r,y:i,placement:a,middlewareData:s}=t,c=await Zqe(t,e);return a===((n=s.offset)==null?void 0:n.placement)&&(o=s.arrow)!=null&&o.alignmentOffset?{}:{x:r+c.x,y:i+c.y,data:{...c,placement:a}}}}},Qqe=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:r,platform:i}=t,{mainAxis:a=!0,crossAxis:s=!1,limiter:c={fn:v=>{let{x:M,y:w}=v;return{x:M,y:w}}},...l}=Ti(e,t),h={x:n,y:o},u=await i.detectOverflow(t,l),p=Dr(Di(r)),y=cq(p);let g=h[y],k=h[p];if(a){const v=y==="y"?"top":"left",M=y==="y"?"bottom":"right",w=g+u[v],b=g-u[M];g=lO(w,g,b)}if(s){const v=p==="y"?"top":"left",M=p==="y"?"bottom":"right",w=k+u[v],b=k-u[M];k=lO(w,k,b)}const x=c.fn({...t,[y]:g,[p]:k});return{...x,data:{x:x.x-n,y:x.y-o,enabled:{[y]:a,[p]:s}}}}}},Jqe=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:o,placement:r,rects:i,middlewareData:a}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=Ti(e,t),h={x:n,y:o},u=Dr(r),p=cq(u);let y=h[p],g=h[u];const k=Ti(s,t),x=typeof k=="number"?{mainAxis:k,crossAxis:0}:{mainAxis:0,crossAxis:0,...k};if(c){const w=p==="y"?"height":"width",b=i.reference[p]-i.floating[w]+x.mainAxis,C=i.reference[p]+i.reference[w]-x.mainAxis;y<b?y=b:y>C&&(y=C)}if(l){var v,M;const w=p==="y"?"width":"height",b=Pee.has(Di(r)),C=i.reference[u]-i.floating[w]+(b&&((v=a.offset)==null?void 0:v[u])||0)+(b?0:x.crossAxis),_=i.reference[u]+i.reference[w]+(b?0:((M=a.offset)==null?void 0:M[u])||0)-(b?x.crossAxis:0);g<C?g=C:g>_&&(g=_)}return{[p]:y,[u]:g}}}},eVe=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,o;const{placement:r,rects:i,platform:a,elements:s}=t,{apply:c=()=>{},...l}=Ti(e,t),h=await a.detectOverflow(t,l),u=Di(r),p=J0(r),y=Dr(r)==="y",{width:g,height:k}=i.floating;let x,v;u==="top"||u==="bottom"?(x=u,v=p===(await(a.isRTL==null?void 0:a.isRTL(s.floating))?"start":"end")?"left":"right"):(v=u,x=p==="end"?"top":"bottom");const M=k-h.top-h.bottom,w=g-h.left-h.right,b=Va(k-h[x],M),C=Va(g-h[v],w),_=!t.middlewareData.shift;let S=b,N=C;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(N=w),(o=t.middlewareData.shift)!=null&&o.enabled.y&&(S=M),_&&!p){const A=io(h.left,0),E=io(h.right,0),z=io(h.top,0),U=io(h.bottom,0);y?N=g-2*(A!==0||E!==0?A+E:io(h.left,h.right)):S=k-2*(z!==0||U!==0?z+U:io(h.top,h.bottom))}await c({...t,availableWidth:N,availableHeight:S});const P=await a.getDimensions(s.floating);return g!==P.width||k!==P.height?{reset:{rects:!0}}:{}}}};function pR(){return typeof window<"u"}function e2(e){return zee(e)?(e.nodeName||"").toLowerCase():"#document"}function uo(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Zr(e){var t;return(t=(zee(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function zee(e){return pR()?e instanceof Node||e instanceof uo(e).Node:!1}function or(e){return pR()?e instanceof Element||e instanceof uo(e).Element:!1}function Fi(e){return pR()?e instanceof HTMLElement||e instanceof uo(e).HTMLElement:!1}function WW(e){return!pR()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof uo(e).ShadowRoot}function $f(e){const{overflow:t,overflowX:n,overflowY:o,display:r}=rr(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&r!=="inline"&&r!=="contents"}function tVe(e){return/^(table|td|th)$/.test(e2(e))}function yR(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const nVe=/transform|translate|scale|rotate|perspective|filter/,oVe=/paint|layout|strict|content/,ys=e=>!!e&&e!=="none";let ZT;function uq(e){const t=or(e)?rr(e):e;return ys(t.transform)||ys(t.translate)||ys(t.scale)||ys(t.rotate)||ys(t.perspective)||!hq()&&(ys(t.backdropFilter)||ys(t.filter))||nVe.test(t.willChange||"")||oVe.test(t.contain||"")}function rVe(e){let t=Ba(e);for(;Fi(t)&&!V0(t);){if(uq(t))return t;if(yR(t))return null;t=Ba(t)}return null}function hq(){return ZT==null&&(ZT=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),ZT}function V0(e){return/^(html|body|#document)$/.test(e2(e))}function rr(e){return uo(e).getComputedStyle(e)}function mR(e){return or(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ba(e){if(e2(e)==="html")return e;const t=e.assignedSlot||e.parentNode||WW(e)&&e.host||Zr(e);return WW(t)?t.host:t}function Ree(e){const t=Ba(e);return V0(t)?e.ownerDocument?e.ownerDocument.body:e.body:Fi(t)&&$f(t)?t:Ree(t)}function hf(e,t,n){var o;t===void 0&&(t=[]),n===void 0&&(n=!0);const r=Ree(e),i=r===((o=e.ownerDocument)==null?void 0:o.body),a=uo(r);if(i){const s=uO(a);return t.concat(a,a.visualViewport||[],$f(r)?r:[],s&&n?hf(s):[])}else return t.concat(r,hf(r,[],n))}function uO(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Tee(e){const t=rr(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const r=Fi(e),i=r?e.offsetWidth:n,a=r?e.offsetHeight:o,s=dz(n)!==i||dz(o)!==a;return s&&(n=i,o=a),{width:n,height:o,$:s}}function fq(e){return or(e)?e:e.contextElement}function y0(e){const t=fq(e);if(!Fi(t))return Br(1);const n=t.getBoundingClientRect(),{width:o,height:r,$:i}=Tee(t);let a=(i?dz(n.width):n.width)/o,s=(i?dz(n.height):n.height)/r;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const iVe=Br(0);function Dee(e){const t=uo(e);return!hq()||!t.visualViewport?iVe:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function aVe(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==uo(e)?!1:t}function qd(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=e.getBoundingClientRect(),i=fq(e);let a=Br(1);t&&(o?or(o)&&(a=y0(o)):a=y0(e));const s=aVe(i,n,o)?Dee(i):Br(0);let c=(r.left+s.x)/a.x,l=(r.top+s.y)/a.y,h=r.width/a.x,u=r.height/a.y;if(i){const p=uo(i),y=o&&or(o)?uo(o):o;let g=p,k=uO(g);for(;k&&o&&y!==g;){const x=y0(k),v=k.getBoundingClientRect(),M=rr(k),w=v.left+(k.clientLeft+parseFloat(M.paddingLeft))*x.x,b=v.top+(k.clientTop+parseFloat(M.paddingTop))*x.y;c*=x.x,l*=x.y,h*=x.x,u*=x.y,c+=w,l+=b,g=uo(k),k=uO(g)}}return hz({width:h,height:u,x:c,y:l})}function gR(e,t){const n=mR(e).scrollLeft;return t?t.left+n:qd(Zr(e)).left+n}function Hee(e,t){const n=e.getBoundingClientRect(),o=n.left+t.scrollLeft-gR(e,n),r=n.top+t.scrollTop;return{x:o,y:r}}function sVe(e){let{elements:t,rect:n,offsetParent:o,strategy:r}=e;const i=r==="fixed",a=Zr(o),s=t?yR(t.floating):!1;if(o===a||s&&i)return n;let c={scrollLeft:0,scrollTop:0},l=Br(1);const h=Br(0),u=Fi(o);if((u||!u&&!i)&&((e2(o)!=="body"||$f(a))&&(c=mR(o)),u)){const y=qd(o);l=y0(o),h.x=y.x+o.clientLeft,h.y=y.y+o.clientTop}const p=a&&!u&&!i?Hee(a,c):Br(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+h.x+p.x,y:n.y*l.y-c.scrollTop*l.y+h.y+p.y}}function cVe(e){return Array.from(e.getClientRects())}function lVe(e){const t=Zr(e),n=mR(e),o=e.ownerDocument.body,r=io(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),i=io(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let a=-n.scrollLeft+gR(e);const s=-n.scrollTop;return rr(o).direction==="rtl"&&(a+=io(t.clientWidth,o.clientWidth)-r),{width:r,height:i,x:a,y:s}}const GW=25;function dVe(e,t){const n=uo(e),o=Zr(e),r=n.visualViewport;let i=o.clientWidth,a=o.clientHeight,s=0,c=0;if(r){i=r.width,a=r.height;const h=hq();(!h||h&&t==="fixed")&&(s=r.offsetLeft,c=r.offsetTop)}const l=gR(o);if(l<=0){const h=o.ownerDocument,u=h.body,p=getComputedStyle(u),y=h.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,g=Math.abs(o.clientWidth-u.clientWidth-y);g<=GW&&(i-=g)}else l<=GW&&(i+=l);return{width:i,height:a,x:s,y:c}}function uVe(e,t){const n=qd(e,!0,t==="fixed"),o=n.top+e.clientTop,r=n.left+e.clientLeft,i=Fi(e)?y0(e):Br(1),a=e.clientWidth*i.x,s=e.clientHeight*i.y,c=r*i.x,l=o*i.y;return{width:a,height:s,x:c,y:l}}function KW(e,t,n){let o;if(t==="viewport")o=dVe(e,n);else if(t==="document")o=lVe(Zr(e));else if(or(t))o=uVe(t,n);else{const r=Dee(e);o={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return hz(o)}function Oee(e,t){const n=Ba(e);return n===t||!or(n)||V0(n)?!1:rr(n).position==="fixed"||Oee(n,t)}function hVe(e,t){const n=t.get(e);if(n)return n;let o=hf(e,[],!1).filter(s=>or(s)&&e2(s)!=="body"),r=null;const i=rr(e).position==="fixed";let a=i?Ba(e):e;for(;or(a)&&!V0(a);){const s=rr(a),c=uq(a);!c&&s.position==="fixed"&&(r=null),(i?!c&&!r:!c&&s.position==="static"&&!!r&&(r.position==="absolute"||r.position==="fixed")||$f(a)&&!c&&Oee(e,a))?o=o.filter(h=>h!==a):r=s,a=Ba(a)}return t.set(e,o),o}function fVe(e){let{element:t,boundary:n,rootBoundary:o,strategy:r}=e;const a=[...n==="clippingAncestors"?yR(t)?[]:hVe(t,this._c):[].concat(n),o],s=KW(t,a[0],r);let c=s.top,l=s.right,h=s.bottom,u=s.left;for(let p=1;p<a.length;p++){const y=KW(t,a[p],r);c=io(y.top,c),l=Va(y.right,l),h=Va(y.bottom,h),u=io(y.left,u)}return{width:l-u,height:h-c,x:u,y:c}}function pVe(e){const{width:t,height:n}=Tee(e);return{width:t,height:n}}function yVe(e,t,n){const o=Fi(t),r=Zr(t),i=n==="fixed",a=qd(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const c=Br(0);function l(){c.x=gR(r)}if(o||!o&&!i)if((e2(t)!=="body"||$f(r))&&(s=mR(t)),o){const y=qd(t,!0,i,t);c.x=y.x+t.clientLeft,c.y=y.y+t.clientTop}else r&&l();i&&!o&&r&&l();const h=r&&!o&&!i?Hee(r,s):Br(0),u=a.left+s.scrollLeft-c.x-h.x,p=a.top+s.scrollTop-c.y-h.y;return{x:u,y:p,width:a.width,height:a.height}}function YT(e){return rr(e).position==="static"}function XW(e,t){if(!Fi(e)||rr(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Zr(e)===n&&(n=n.ownerDocument.body),n}function Fee(e,t){const n=uo(e);if(yR(e))return n;if(!Fi(e)){let r=Ba(e);for(;r&&!V0(r);){if(or(r)&&!YT(r))return r;r=Ba(r)}return n}let o=XW(e,t);for(;o&&tVe(o)&&YT(o);)o=XW(o,t);return o&&V0(o)&&YT(o)&&!uq(o)?n:o||rVe(e)||n}const mVe=async function(e){const t=this.getOffsetParent||Fee,n=this.getDimensions,o=await n(e.floating);return{reference:yVe(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function gVe(e){return rr(e).direction==="rtl"}const kVe={convertOffsetParentRelativeRectToViewportRelativeRect:sVe,getDocumentElement:Zr,getClippingRect:fVe,getOffsetParent:Fee,getElementRects:mVe,getClientRects:cVe,getDimensions:pVe,getScale:y0,isElement:or,isRTL:gVe};function qee(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function vVe(e,t){let n=null,o;const r=Zr(e);function i(){var s;clearTimeout(o),(s=n)==null||s.disconnect(),n=null}function a(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),i();const l=e.getBoundingClientRect(),{left:h,top:u,width:p,height:y}=l;if(s||t(),!p||!y)return;const g=jp(u),k=jp(r.clientWidth-(h+p)),x=jp(r.clientHeight-(u+y)),v=jp(h),w={rootMargin:-g+"px "+-k+"px "+-x+"px "+-v+"px",threshold:io(0,Va(1,c))||1};let b=!0;function C(_){const S=_[0].intersectionRatio;if(S!==c){if(!b)return a();S?a(!1,S):o=setTimeout(()=>{a(!1,1e-7)},1e3)}S===1&&!qee(l,e.getBoundingClientRect())&&a(),b=!1}try{n=new IntersectionObserver(C,{...w,root:r.ownerDocument})}catch{n=new IntersectionObserver(C,w)}n.observe(e)}return a(!0),i}function xVe(e,t,n,o){o===void 0&&(o={});const{ancestorScroll:r=!0,ancestorResize:i=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:c=!1}=o,l=fq(e),h=r||i?[...l?hf(l):[],...t?hf(t):[]]:[];h.forEach(v=>{r&&v.addEventListener("scroll",n,{passive:!0}),i&&v.addEventListener("resize",n)});const u=l&&s?vVe(l,n):null;let p=-1,y=null;a&&(y=new ResizeObserver(v=>{let[M]=v;M&&M.target===l&&y&&t&&(y.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var w;(w=y)==null||w.observe(t)})),n()}),l&&!c&&y.observe(l),t&&y.observe(t));let g,k=c?qd(e):null;c&&x();function x(){const v=qd(e);k&&!qee(k,v)&&n(),k=v,g=requestAnimationFrame(x)}return n(),()=>{var v;h.forEach(M=>{r&&M.removeEventListener("scroll",n),i&&M.removeEventListener("resize",n)}),u==null||u(),(v=y)==null||v.disconnect(),y=null,c&&cancelAnimationFrame(g)}}const wVe=Yqe,MVe=Qqe,bVe=Kqe,_Ve=eVe,CVe=Xqe,ZW=Gqe,SVe=Jqe,LVe=(e,t,n)=>{const o=new Map,r={platform:kVe,...n},i={...r.platform,_c:o};return Wqe(e,t,{...r,platform:i})};var NVe=typeof document<"u",IVe=function(){},uP=NVe?m.useLayoutEffect:IVe;function fz(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,o,r;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(o=n;o--!==0;)if(!fz(e[o],t[o]))return!1;return!0}if(r=Object.keys(e),n=r.length,n!==Object.keys(t).length)return!1;for(o=n;o--!==0;)if(!{}.hasOwnProperty.call(t,r[o]))return!1;for(o=n;o--!==0;){const i=r[o];if(!(i==="_owner"&&e.$$typeof)&&!fz(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function Vee(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function YW(e,t){const n=Vee(e);return Math.round(t*n)/n}function QT(e){const t=m.useRef(e);return uP(()=>{t.current=e}),t}function AVe(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:o=[],platform:r,elements:{reference:i,floating:a}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[h,u]=m.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,y]=m.useState(o);fz(p,o)||y(o);const[g,k]=m.useState(null),[x,v]=m.useState(null),M=m.useCallback(I=>{I!==_.current&&(_.current=I,k(I))},[]),w=m.useCallback(I=>{I!==S.current&&(S.current=I,v(I))},[]),b=i||g,C=a||x,_=m.useRef(null),S=m.useRef(null),N=m.useRef(h),P=c!=null,A=QT(c),E=QT(r),z=QT(l),U=m.useCallback(()=>{if(!_.current||!S.current)return;const I={placement:t,strategy:n,middleware:p};E.current&&(I.platform=E.current),LVe(_.current,S.current,I).then(R=>{const L={...R,isPositioned:z.current!==!1};$.current&&!fz(N.current,L)&&(N.current=L,Kd.flushSync(()=>{u(L)}))})},[p,t,n,E,z]);uP(()=>{l===!1&&N.current.isPositioned&&(N.current.isPositioned=!1,u(I=>({...I,isPositioned:!1})))},[l]);const $=m.useRef(!1);uP(()=>($.current=!0,()=>{$.current=!1}),[]),uP(()=>{if(b&&(_.current=b),C&&(S.current=C),b&&C){if(A.current)return A.current(b,C,U);U()}},[b,C,U,A,P]);const T=m.useMemo(()=>({reference:_,floating:S,setReference:M,setFloating:w}),[M,w]),D=m.useMemo(()=>({reference:b,floating:C}),[b,C]),O=m.useMemo(()=>{const I={position:n,left:0,top:0};if(!D.floating)return I;const R=YW(D.floating,h.x),L=YW(D.floating,h.y);return s?{...I,transform:"translate("+R+"px, "+L+"px)",...Vee(D.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:R,top:L}},[n,s,D.floating,h.x,h.y]);return m.useMemo(()=>({...h,update:U,refs:T,elements:D,floatingStyles:O}),[h,U,T,D,O])}const EVe=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:o,padding:r}=typeof e=="function"?e(n):e;return o&&t(o)?o.current!=null?ZW({element:o.current,padding:r}).fn(n):{}:o?ZW({element:o,padding:r}).fn(n):{}}}},jVe=(e,t)=>{const n=wVe(e);return{name:n.name,fn:n.fn,options:[e,t]}},$Ve=(e,t)=>{const n=MVe(e);return{name:n.name,fn:n.fn,options:[e,t]}},PVe=(e,t)=>({fn:SVe(e).fn,options:[e,t]}),zVe=(e,t)=>{const n=bVe(e);return{name:n.name,fn:n.fn,options:[e,t]}},RVe=(e,t)=>{const n=_Ve(e);return{name:n.name,fn:n.fn,options:[e,t]}},TVe=(e,t)=>{const n=CVe(e);return{name:n.name,fn:n.fn,options:[e,t]}},DVe=(e,t)=>{const n=EVe(e);return{name:n.name,fn:n.fn,options:[e,t]}};var HVe="Arrow",Bee=m.forwardRef((e,t)=>{const{children:n,width:o=10,height:r=5,...i}=e;return f.jsx(Ve.svg,{...i,ref:t,width:o,height:r,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:f.jsx("polygon",{points:"0,0 30,0 15,10"})})});Bee.displayName=HVe;var OVe=Bee,pq="Popper",[Uee,t2]=cr(pq),[FVe,Wee]=Uee(pq),Gee=e=>{const{__scopePopper:t,children:n}=e,[o,r]=m.useState(null);return f.jsx(FVe,{scope:t,anchor:o,onAnchorChange:r,children:n})};Gee.displayName=pq;var Kee="PopperAnchor",Xee=m.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:o,...r}=e,i=Wee(Kee,n),a=m.useRef(null),s=yt(t,a),c=m.useRef(null);return m.useEffect(()=>{const l=c.current;c.current=(o==null?void 0:o.current)||a.current,l!==c.current&&i.onAnchorChange(c.current)}),o?null:f.jsx(Ve.div,{...r,ref:s})});Xee.displayName=Kee;var yq="PopperContent",[qVe,VVe]=Uee(yq),Zee=m.forwardRef((e,t)=>{var re,oe,ne,le,ve,ge;const{__scopePopper:n,side:o="bottom",sideOffset:r=0,align:i="center",alignOffset:a=0,arrowPadding:s=0,avoidCollisions:c=!0,collisionBoundary:l=[],collisionPadding:h=0,sticky:u="partial",hideWhenDetached:p=!1,updatePositionStrategy:y="optimized",onPlaced:g,...k}=e,x=Wee(yq,n),[v,M]=m.useState(null),w=yt(t,xe=>M(xe)),[b,C]=m.useState(null),_=cee(b),S=(_==null?void 0:_.width)??0,N=(_==null?void 0:_.height)??0,P=o+(i!=="center"?"-"+i:""),A=typeof h=="number"?h:{top:0,right:0,bottom:0,left:0,...h},E=Array.isArray(l)?l:[l],z=E.length>0,U={padding:A,boundary:E.filter(UVe),altBoundary:z},{refs:$,floatingStyles:T,placement:D,isPositioned:O,middlewareData:I}=AVe({strategy:"fixed",placement:P,whileElementsMounted:(...xe)=>xVe(...xe,{animationFrame:y==="always"}),elements:{reference:x.anchor},middleware:[jVe({mainAxis:r+N,alignmentAxis:a}),c&&$Ve({mainAxis:!0,crossAxis:!1,limiter:u==="partial"?PVe():void 0,...U}),c&&zVe({...U}),RVe({...U,apply:({elements:xe,rects:Te,availableWidth:Ye,availableHeight:ue})=>{const{width:Ie,height:Pt}=Te.reference,wt=xe.floating.style;wt.setProperty("--radix-popper-available-width",`${Ye}px`),wt.setProperty("--radix-popper-available-height",`${ue}px`),wt.setProperty("--radix-popper-anchor-width",`${Ie}px`),wt.setProperty("--radix-popper-anchor-height",`${Pt}px`)}}),b&&DVe({element:b,padding:s}),WVe({arrowWidth:S,arrowHeight:N}),p&&TVe({strategy:"referenceHidden",...U})]}),[R,L]=Jee(D),V=Kr(g);qa(()=>{O&&(V==null||V())},[O,V]);const H=(re=I.arrow)==null?void 0:re.x,j=(oe=I.arrow)==null?void 0:oe.y,X=((ne=I.arrow)==null?void 0:ne.centerOffset)!==0,[Z,J]=m.useState();return qa(()=>{v&&J(window.getComputedStyle(v).zIndex)},[v]),f.jsx("div",{ref:$.setFloating,"data-radix-popper-content-wrapper":"",style:{...T,transform:O?T.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Z,"--radix-popper-transform-origin":[(le=I.transformOrigin)==null?void 0:le.x,(ve=I.transformOrigin)==null?void 0:ve.y].join(" "),...((ge=I.hide)==null?void 0:ge.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:f.jsx(qVe,{scope:n,placedSide:R,onArrowChange:C,arrowX:H,arrowY:j,shouldHideArrow:X,children:f.jsx(Ve.div,{"data-side":R,"data-align":L,...k,ref:w,style:{...k.style,animation:O?void 0:"none"}})})})});Zee.displayName=yq;var Yee="PopperArrow",BVe={top:"bottom",right:"left",bottom:"top",left:"right"},Qee=m.forwardRef(function(t,n){const{__scopePopper:o,...r}=t,i=VVe(Yee,o),a=BVe[i.placedSide];return f.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:f.jsx(OVe,{...r,ref:n,style:{...r.style,display:"block"}})})});Qee.displayName=Yee;function UVe(e){return e!==null}var WVe=e=>({name:"transformOrigin",options:e,fn(t){var x,v,M;const{placement:n,rects:o,middlewareData:r}=t,a=((x=r.arrow)==null?void 0:x.centerOffset)!==0,s=a?0:e.arrowWidth,c=a?0:e.arrowHeight,[l,h]=Jee(n),u={start:"0%",center:"50%",end:"100%"}[h],p=(((v=r.arrow)==null?void 0:v.x)??0)+s/2,y=(((M=r.arrow)==null?void 0:M.y)??0)+c/2;let g="",k="";return l==="bottom"?(g=a?u:`${p}px`,k=`${-c}px`):l==="top"?(g=a?u:`${p}px`,k=`${o.floating.height+c}px`):l==="right"?(g=`${-c}px`,k=a?u:`${y}px`):l==="left"&&(g=`${o.floating.width+c}px`,k=a?u:`${y}px`),{data:{x:g,y:k}}}});function Jee(e){const[t,n="center"]=e.split("-");return[t,n]}var mq=Gee,kR=Xee,gq=Zee,kq=Qee,GVe="Portal",Pf=m.forwardRef((e,t)=>{var s;const{container:n,...o}=e,[r,i]=m.useState(!1);qa(()=>i(!0),[]);const a=n||r&&((s=globalThis==null?void 0:globalThis.document)==null?void 0:s.body);return a?Jce.createPortal(f.jsx(Ve.div,{...o,ref:t}),a):null});Pf.displayName=GVe;function KVe(e,t){return m.useReducer((n,o)=>t[n][o]??n,e)}var go=e=>{const{present:t,children:n}=e,o=XVe(t),r=typeof n=="function"?n({present:o.isPresent}):m.Children.only(n),i=yt(o.ref,ZVe(r));return typeof n=="function"||o.isPresent?m.cloneElement(r,{ref:i}):null};go.displayName="Presence";function XVe(e){const[t,n]=m.useState(),o=m.useRef(null),r=m.useRef(e),i=m.useRef("none"),a=e?"mounted":"unmounted",[s,c]=KVe(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return m.useEffect(()=>{const l=$p(o.current);i.current=s==="mounted"?l:"none"},[s]),qa(()=>{const l=o.current,h=r.current;if(h!==e){const p=i.current,y=$p(l);e?c("MOUNT"):y==="none"||(l==null?void 0:l.display)==="none"?c("UNMOUNT"):c(h&&p!==y?"ANIMATION_OUT":"UNMOUNT"),r.current=e}},[e,c]),qa(()=>{if(t){let l;const h=t.ownerDocument.defaultView??window,u=y=>{const k=$p(o.current).includes(CSS.escape(y.animationName));if(y.target===t&&k&&(c("ANIMATION_END"),!r.current)){const x=t.style.animationFillMode;t.style.animationFillMode="forwards",l=h.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=x)})}},p=y=>{y.target===t&&(i.current=$p(o.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{h.clearTimeout(l),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:m.useCallback(l=>{o.current=l?getComputedStyle(l):null,n(l)},[])}}function $p(e){return(e==null?void 0:e.animationName)||"none"}function ZVe(e){var o,r;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(r=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var YVe=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},_u=new WeakMap,Pp=new WeakMap,zp={},JT=0,ete=function(e){return e&&(e.host||ete(e.parentNode))},QVe=function(e,t){return t.map(function(n){if(e.contains(n))return n;var o=ete(n);return o&&e.contains(o)?o:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},JVe=function(e,t,n,o){var r=QVe(t,Array.isArray(e)?e:[e]);zp[n]||(zp[n]=new WeakMap);var i=zp[n],a=[],s=new Set,c=new Set(r),l=function(u){!u||s.has(u)||(s.add(u),l(u.parentNode))};r.forEach(l);var h=function(u){!u||c.has(u)||Array.prototype.forEach.call(u.children,function(p){if(s.has(p))h(p);else try{var y=p.getAttribute(o),g=y!==null&&y!=="false",k=(_u.get(p)||0)+1,x=(i.get(p)||0)+1;_u.set(p,k),i.set(p,x),a.push(p),k===1&&g&&Pp.set(p,!0),x===1&&p.setAttribute(n,"true"),g||p.setAttribute(o,"true")}catch(v){console.error("aria-hidden: cannot operate on ",p,v)}})};return h(t),s.clear(),JT++,function(){a.forEach(function(u){var p=_u.get(u)-1,y=i.get(u)-1;_u.set(u,p),i.set(u,y),p||(Pp.has(u)||u.removeAttribute(o),Pp.delete(u)),y||u.removeAttribute(n)}),JT--,JT||(_u=new WeakMap,_u=new WeakMap,Pp=new WeakMap,zp={})}},vq=function(e,t,n){n===void 0&&(n="data-aria-hidden");var o=Array.from(Array.isArray(e)?e:[e]),r=YVe(e);return r?(o.push.apply(o,Array.from(r.querySelectorAll("[aria-live], script"))),JVe(o,r,n,"aria-hidden")):function(){return null}},Rr=function(){return Rr=Object.assign||function(t){for(var n,o=1,r=arguments.length;o<r;o++){n=arguments[o];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},Rr.apply(this,arguments)};function tte(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]]);return n}function eBe(e,t,n){if(n||arguments.length===2)for(var o=0,r=t.length,i;o<r;o++)(i||!(o in t))&&(i||(i=Array.prototype.slice.call(t,0,o)),i[o]=t[o]);return e.concat(i||Array.prototype.slice.call(t))}var hP="right-scroll-bar-position",fP="width-before-scroll-bar",tBe="with-scroll-bars-hidden",nBe="--removed-body-scroll-bar-size";function eD(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function oBe(e,t){var n=m.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(o){var r=n.value;r!==o&&(n.value=o,n.callback(o,r))}}}})[0];return n.callback=t,n.facade}var rBe=typeof window<"u"?m.useLayoutEffect:m.useEffect,QW=new WeakMap;function iBe(e,t){var n=oBe(null,function(o){return e.forEach(function(r){return eD(r,o)})});return rBe(function(){var o=QW.get(n);if(o){var r=new Set(o),i=new Set(e),a=n.current;r.forEach(function(s){i.has(s)||eD(s,null)}),i.forEach(function(s){r.has(s)||eD(s,a)})}QW.set(n,e)},[e]),n}function aBe(e){return e}function sBe(e,t){t===void 0&&(t=aBe);var n=[],o=!1,r={read:function(){if(o)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(i){var a=t(i,o);return n.push(a),function(){n=n.filter(function(s){return s!==a})}},assignSyncMedium:function(i){for(o=!0;n.length;){var a=n;n=[],a.forEach(i)}n={push:function(s){return i(s)},filter:function(){return n}}},assignMedium:function(i){o=!0;var a=[];if(n.length){var s=n;n=[],s.forEach(i),a=n}var c=function(){var h=a;a=[],h.forEach(i)},l=function(){return Promise.resolve().then(c)};l(),n={push:function(h){a.push(h),l()},filter:function(h){return a=a.filter(h),n}}}};return r}function cBe(e){e===void 0&&(e={});var t=sBe(null);return t.options=Rr({async:!0,ssr:!1},e),t}var nte=function(e){var t=e.sideCar,n=tte(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=t.read();if(!o)throw new Error("Sidecar medium not found");return m.createElement(o,Rr({},n))};nte.isSideCarExport=!0;function lBe(e,t){return e.useMedium(t),nte}var ote=cBe(),tD=function(){},vR=m.forwardRef(function(e,t){var n=m.useRef(null),o=m.useState({onScrollCapture:tD,onWheelCapture:tD,onTouchMoveCapture:tD}),r=o[0],i=o[1],a=e.forwardProps,s=e.children,c=e.className,l=e.removeScrollBar,h=e.enabled,u=e.shards,p=e.sideCar,y=e.noRelative,g=e.noIsolation,k=e.inert,x=e.allowPinchZoom,v=e.as,M=v===void 0?"div":v,w=e.gapMode,b=tte(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=p,_=iBe([n,t]),S=Rr(Rr({},b),r);return m.createElement(m.Fragment,null,h&&m.createElement(C,{sideCar:ote,removeScrollBar:l,shards:u,noRelative:y,noIsolation:g,inert:k,setCallbacks:i,allowPinchZoom:!!x,lockRef:n,gapMode:w}),a?m.cloneElement(m.Children.only(s),Rr(Rr({},S),{ref:_})):m.createElement(M,Rr({},S,{className:c,ref:_}),s))});vR.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};vR.classNames={fullWidth:fP,zeroRight:hP};var dBe=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function uBe(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=dBe();return t&&e.setAttribute("nonce",t),e}function hBe(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function fBe(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var pBe=function(){var e=0,t=null;return{add:function(n){e==0&&(t=uBe())&&(hBe(t,n),fBe(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},yBe=function(){var e=pBe();return function(t,n){m.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},rte=function(){var e=yBe(),t=function(n){var o=n.styles,r=n.dynamic;return e(o,r),null};return t},mBe={left:0,top:0,right:0,gap:0},nD=function(e){return parseInt(e||"",10)||0},gBe=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],o=t[e==="padding"?"paddingTop":"marginTop"],r=t[e==="padding"?"paddingRight":"marginRight"];return[nD(n),nD(o),nD(r)]},kBe=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return mBe;var t=gBe(e),n=document.documentElement.clientWidth,o=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,o-n+t[2]-t[0])}},vBe=rte(),m0="data-scroll-locked",xBe=function(e,t,n,o){var r=e.left,i=e.top,a=e.right,s=e.gap;return n===void 0&&(n="margin"),`
8469
+ `);return}E.preventDefault(),M.current=!0,_();return}E.key==="Escape"&&(E.preventDefault(),M.current=!0,S())},P=E=>{E.preventDefault();const z=E.clipboardData.getData("text/plain");document.execCommand("insertText",!1,z)},A=()=>{if(M.current){M.current=!1;return}_()};return f.jsx("div",{ref:u,"data-testid":"inline-edit-input","data-field":a,"data-placeholder":l,role:"textbox",tabIndex:0,contentEditable:!0,suppressContentEditableWarning:!0,spellCheck:!1,onInput:C,onKeyDown:N,onPaste:P,onBlur:A,onMouseDown:E=>E.stopPropagation(),onClick:E=>E.stopPropagation(),onDoubleClick:E=>E.stopPropagation(),style:c,className:te("nodrag nopan nowheel sf:block sf:w-full sf:bg-transparent sf:p-0 sf:text-inherit sf:outline-none","sf:whitespace-pre-wrap sf:wrap-break-word",g&&l?"inline-edit-empty":"",p?"inline-edit-shake":"",s)})}const WJ=8,rW=12,iW={height:`${WJ}px`,borderColor:"transparent"},aW={width:`${WJ}px`,borderColor:"transparent"},jHe={width:`${rW}px`,height:`${rW}px`,background:"transparent",border:"none"},$He={width:"calc(10px / var(--rf-zoom, 1))",height:"calc(10px / var(--rf-zoom, 1))",background:"hsl(var(--background))",border:"calc(1px / var(--rf-zoom, 1)) solid hsl(var(--primary) / 0.6)",borderRadius:"calc(2px / var(--rf-zoom, 1))",zIndex:1},PHe=[{position:"top",style:iW},{position:"bottom",style:iW},{position:"left",style:aW},{position:"right",style:aW}],zHe=["top-left","top-right","bottom-left","bottom-right"],sW={pointerEvents:"none",cursor:"default"};function Xd({visible:e,minWidth:t=80,minHeight:n=40,onResizeStart:o,onResize:r,onResizeEnd:i,cornerVariant:a="invisible"}){const s=a==="visible"?$He:jHe,c=h=>e?h:{...h,...sW},l=e?s:{...s,opacity:0,...sW};return f.jsxs(f.Fragment,{children:[PHe.map(({position:h,style:u})=>f.jsx(nW,{position:h,variant:Oa.Line,minWidth:t,minHeight:n,style:c(u),onResizeStart:o,onResize:r,onResizeEnd:i,children:f.jsx("span",{"data-testid":"resize-control","data-position":h})},h)),zHe.map(h=>f.jsx(nW,{position:h,variant:Oa.Handle,minWidth:t,minHeight:n,style:l,autoScale:!1,onResizeStart:o,onResize:r,onResizeEnd:i,children:f.jsx("span",{"data-testid":"resize-control","data-position":h})},h))]})}function cW(e){const t=e==null?void 0:e.sourceEvent;return{metaKey:t==null?void 0:t.metaKey,ctrlKey:t==null?void 0:t.ctrlKey}}function RHe(e,t){return{left:t.x!==e.x,right:t.x+t.width!==e.x+e.width,top:t.y!==e.y,bottom:t.y+t.height!==e.y+e.height}}function THe(e){return!!(e.left||e.right||e.top||e.bottom)}function Zd(e){const{onResize:t,onResizeEnd:n,onResizeFinal:o,setResizing:r,nodeId:i,alignment:a}=e,[s,c]=m.useState(!1),l=m.useRef(null),h=m.useRef(!1),u=m.useRef(t),p=m.useRef(n),y=m.useRef(o),g=m.useRef(r),k=m.useRef(a),x=m.useRef(i);m.useEffect(()=>{u.current=t},[t]),m.useEffect(()=>{p.current=n},[n]),m.useEffect(()=>{y.current=o},[o]),m.useEffect(()=>{g.current=r},[r]),m.useEffect(()=>{k.current=a},[a]),m.useEffect(()=>{x.current=i},[i]);const v=m.useCallback((b,C)=>{var _;c(!0),(_=g.current)==null||_.call(g,!0),h.current=!1,l.current=C?{x:C.x,y:C.y,width:C.width,height:C.height}:null},[]),M=m.useCallback((b,C)=>{var A;let _={x:C.x,y:C.y,width:C.width,height:C.height};const S=k.current,N=x.current,P=l.current;if(S&&N&&P){if(!h.current){const E=RHe(P,C);THe(E)&&(S.beginResize(N,E),h.current=!0)}if(h.current){const{snappedRect:E}=S.applyResizeSnap({id:N,x:C.x,y:C.y,w:C.width,h:C.height},cW(b));_={x:E.x,y:E.y,width:E.w,height:E.h}}}(A=u.current)==null||A.call(u,_)},[]),w=m.useCallback((b,C)=>{var E,z,U,$;c(!1),(E=g.current)==null||E.call(g,!1);const _=l.current;l.current=null;const S=h.current;h.current=!1;const N=k.current,P=x.current;if(_&&_.width===C.width&&_.height===C.height){S&&(N==null||N.endResize());return}let A={x:C.x,y:C.y,width:C.width,height:C.height};if(N&&P&&S){const{snappedRect:T}=N.applyResizeSnap({id:P,x:C.x,y:C.y,w:C.width,h:C.height},cW(b));A={x:T.x,y:T.y,width:T.w,height:T.h}}N==null||N.endResize(),(z=u.current)==null||z.call(u,A),(U=p.current)==null||U.call(p,A),_&&(($=y.current)==null||$.call(y,A,_))},[]);return{isResizing:s,onResizeStart:v,onResizeEvent:M,onResizeEnd:w}}const z0={width:48,height:48},DHe=24,HHe=24,Np="sf:opacity-0 sf:transition-opacity";function OHe(e){return St(e,"text").color??"currentColor"}function FHe({id:e,data:t,selected:n,isConnectable:o}){const{onResizeStart:r,onResizeEvent:i,onResizeEnd:a}=Zd({onResize:x=>{var v;return(v=t.onResize)==null?void 0:v.call(t,e,x)},onResizeEnd:x=>{var v;return(v=t.onResizeEnd)==null?void 0:v.call(t,e,x)},setResizing:t.setResizing,nodeId:e,alignment:t.resizeAlignment}),s=t.width!==void 0||t.height!==void 0,c=!!t.onNameChange,[l,h]=m.useState(!1),{studioBaseUrl:u}=m.useContext(zF),p=OHe(t.color),y=t.strokeWidth??2,g={...s?{}:{width:z0.width,height:z0.height}},k=x=>{!c||l||(x.stopPropagation(),h(!0))};return f.jsxs("div",{className:te("sf:group sf:relative",s?"sf:h-full sf:w-full":""),style:g,"data-testid":"icon-node","data-node-type":"icon",onDoubleClick:k,children:[f.jsx(Xd,{visible:!!n&&!!t.onResize&&!l,cornerVariant:"visible",minWidth:DHe,minHeight:HHe,onResizeStart:r,onResize:i,onResizeEnd:a}),f.jsx(ct,{type:"target",position:fe.Top,id:"t",isConnectable:o,className:te(Np,n&&"sf:opacity-100!")}),f.jsx(ct,{type:"target",position:fe.Left,id:"l",isConnectable:o,className:te(Np,n&&"sf:opacity-100!")}),f.jsx(UY,{iconId:t.icon,studioBaseUrl:u,color:p,strokeWidth:y,absoluteStrokeWidth:!0,ariaLabel:t.alt,className:"sf:block sf:h-full sf:w-full sf:pointer-events-none sf:select-none"}),l&&c?f.jsx("div",{className:"sf:absolute sf:left-0 sf:right-0 sf:top-full sf:mt-1 sf:text-center sf:text-xs sf:text-muted-foreground",children:f.jsx(ba,{initialValue:t.name??"",field:"icon-node-label",onCommit:x=>{var v;return(v=t.onNameChange)==null?void 0:v.call(t,e,x)},onExit:()=>h(!1),placeholder:"Label"})}):t.name?f.jsx("span",{"data-testid":"icon-node-label",className:"sf:pointer-events-none sf:absolute sf:left-0 sf:right-0 sf:top-full sf:mt-1 sf:truncate sf:text-center sf:text-xs sf:text-muted-foreground sf:select-none",children:t.name}):null,f.jsx(ct,{type:"source",position:fe.Right,id:"r",isConnectable:o,className:te(Np,n&&"sf:opacity-100!")}),f.jsx(ct,{type:"source",position:fe.Bottom,id:"b",isConnectable:o,className:te(Np,n&&"sf:opacity-100!")})]})}function qHe(e,t){return e.selected===t.selected&&e.data===t.data&&e.width===t.width&&e.height===t.height}const VHe=m.memo(FHe,qHe);function BHe(e,t){const n=e.screenToFlowPosition({x:t.width/2,y:t.height/2});return{x:n.x-z0.width/2,y:n.y-z0.height/2}}const GJ="seeflow:icon-recents",UHe=16;function KJ(){if(typeof window>"u")return[];try{const e=window.localStorage.getItem(GJ);if(e===null)return[];const t=JSON.parse(e);return Array.isArray(t)?t.every(n=>typeof n=="string")?t:[]:[]}catch{return[]}}function WHe(e){if(!(typeof window>"u"))try{const n=KJ().filter(r=>r!==e),o=[e,...n].slice(0,UHe);window.localStorage.setItem(GJ,JSON.stringify(o))}catch{}}const GHe=typeof navigator<"u"&&typeof navigator.platform=="string"&&navigator.platform.toLowerCase().includes("mac"),KHe=e=>e.length===1?e.toUpperCase():e==="Escape"?"Esc":e,Dt=(e,t=GHe)=>{const n=KHe(e.key);if(t){let r="";return e.meta&&(r+="⌘"),e.alt&&(r+="⌥"),e.shift&&(r+="⇧"),`${r}${n}`}const o=[];return e.meta&&o.push("Ctrl"),e.shift&&o.push("Shift"),e.alt&&o.push("Alt"),o.push(n),o.join("+")},JF=[{id:"tool.select",label:"Select tool",description:"Switch to the selection tool",category:"Tools",shortcut:Dt({key:"V"})},{id:"tool.hand",label:"Hand tool",description:"Pan the canvas; node interaction is suspended while armed",category:"Tools",shortcut:Dt({key:"H"})},{id:"tool.rectangle",label:"Rectangle",description:"Draw rectangle nodes",category:"Tools",shortcut:Dt({key:"R"})},{id:"tool.ellipse",label:"Ellipse",description:"Draw ellipse nodes",category:"Tools",shortcut:Dt({key:"O"})},{id:"tool.text",label:"Text",description:"Add a text node",category:"Tools",shortcut:Dt({key:"T"})},{id:"tool.sticky",label:"Sticky note",description:"Add a sticky note",category:"Tools",shortcut:Dt({key:"S"})},{id:"tool.database",label:"Database",description:"Add a database node",category:"Tools",shortcut:Dt({key:"D"})},{id:"tool.server",label:"Server",description:"Add a server node",category:"Tools"},{id:"tool.user",label:"User",description:"Add a user node",category:"Tools"},{id:"tool.queue",label:"Queue",description:"Add a queue node",category:"Tools"},{id:"tool.cloud",label:"Cloud",description:"Add a cloud node",category:"Tools"},{id:"tool.diamond",label:"Diamond",description:"Add a diamond node (decision / gateway)",category:"Tools"},{id:"tool.hexagon",label:"Hexagon",description:"Add a hexagon node (microservice)",category:"Tools"},{id:"tool.linkflow",label:"Link node",description:"Add a link node and pick a target flow",category:"Tools"},{id:"edit.undo",label:"Undo",category:"Edit",shortcut:Dt({meta:!0,key:"Z"}),enabled:e=>e.canUndo},{id:"edit.redo",label:"Redo",category:"Edit",shortcut:Dt({meta:!0,shift:!0,key:"Z"}),enabled:e=>e.canRedo},{id:"edit.copy",label:"Copy",category:"Edit",shortcut:Dt({meta:!0,key:"C"}),enabled:e=>e.hasSelection},{id:"edit.paste",label:"Paste",category:"Edit",shortcut:Dt({meta:!0,key:"V"}),enabled:e=>e.hasClipboard},{id:"edit.duplicate",label:"Duplicate",category:"Edit",shortcut:Dt({meta:!0,key:"D"}),enabled:e=>e.hasSelection},{id:"edit.delete",label:"Delete",category:"Edit",shortcut:Dt({key:"Delete"}),enabled:e=>e.hasSelection},{id:"edit.selectAll",label:"Select all",category:"Edit",shortcut:Dt({meta:!0,key:"A"})},{id:"view.fit",label:"Fit view",description:"Fit everything in the viewport",category:"View",shortcut:Dt({meta:!0,key:"0"})},{id:"view.zoomIn",label:"Zoom in",category:"View",shortcut:Dt({meta:!0,key:"="})},{id:"view.zoomOut",label:"Zoom out",category:"View",shortcut:Dt({meta:!0,key:"-"})},{id:"view.zoom100",label:"Zoom to 100%",category:"View",shortcut:Dt({key:"1"})},{id:"view.zoomToSelection",label:"Zoom to selection",category:"View",shortcut:Dt({key:"F"}),enabled:e=>e.hasSelection},{id:"layout.tidy",label:"Tidy layout",description:"Auto-layout the canvas or current selection",category:"Layout",shortcut:Dt({meta:!0,shift:!0,key:"L"})},{id:"selection.deselect",label:"Deselect",description:"Clear selection and exit draw mode",category:"Selection",shortcut:Dt({key:"Escape"})},{id:"help.commandPalette",label:"Open command palette",category:"Help",shortcut:Dt({meta:!0,key:"P"})},{id:"export.pdf",label:"Export to PDF",description:"Download the current canvas as a PDF",category:"File",enabled:e=>e.canExportDemo},{id:"export.png",label:"Export as image",description:"Download the current canvas as a PNG",category:"File",enabled:e=>e.canExportDemo}],VT=e=>{const t=JF.find(n=>n.id===e);return t?t.shortcut?`${t.label} (${t.shortcut})`:t.label:""},XHe=1,ZHe=10,YHe=e=>{if(e.metaKey||e.ctrlKey||e.altKey)return null;const t=e.shiftKey?ZHe:XHe;switch(e.key){case"ArrowLeft":return{dx:-t,dy:0};case"ArrowRight":return{dx:t,dy:0};case"ArrowUp":return{dx:0,dy:-t};case"ArrowDown":return{dx:0,dy:t};default:return null}},QHe=e=>{if(!(e.metaKey||e.ctrlKey)||e.altKey)return null;switch(e.key){case"0":return"fit";case"=":case"+":return"in";case"-":case"_":return"out";default:return null}},JHe=(e,t,n)=>{if(t.length===0)return[];const o=new Map(n.map(i=>[i.id,i])),r=[];for(const i of t){const a=o.get(i);a&&r.push({id:i,position:{x:a.position.x+e.dx,y:a.position.y+e.dy}})}return r},eOe=({event:e,isEditableActive:t,hasNodes:n,hasConnectors:o,selectedIds:r,hasClipboard:i})=>{if(!(e.metaKey||e.ctrlKey))return{type:"noop"};if(e.shiftKey||e.altKey)return{type:"noop"};const a=e.key.toLowerCase();return a!=="a"&&a!=="c"&&a!=="v"&&a!=="d"?{type:"noop"}:t?{type:"noop"}:a==="a"?!n&&!o?{type:"noop"}:{type:"selectAll"}:a==="c"?r.length===0?{type:"noop"}:{type:"copy",ids:r}:a==="d"?r.length===0?{type:"noop"}:{type:"duplicate",ids:r}:i?{type:"paste"}:{type:"noop"}},tOe=(e,t)=>{if(t.isEditableActive||!(e.metaKey||e.ctrlKey)||e.altKey)return null;const n=e.key.toLowerCase();return n==="z"?e.shiftKey?"redo":"undo":n==="y"&&!e.shiftKey?"redo":null},nOe=e=>{if(e.metaKey||e.ctrlKey||e.shiftKey||e.altKey)return null;switch(e.key.toLowerCase()){case"v":return"select";case"h":return"hand";case"r":return"rectangle";case"o":return"ellipse";case"t":return"text";case"s":return"sticky";case"d":return"database";default:return null}},ca="seeflow",XJ=e=>`${e}:last-used-style:v1`,BT=()=>({node:{},connector:{}}),UT=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),eq=e=>{var t;try{const n=(t=globalThis.localStorage)==null?void 0:t.getItem(XJ(e));if(!n)return BT();const o=JSON.parse(n);if(!UT(o))return BT();const r=UT(o.node)?o.node:{},i=UT(o.connector)?o.connector:{};return{node:r,connector:i}}catch{return BT()}},ZJ=(e,t)=>{var n;try{(n=globalThis.localStorage)==null||n.setItem(XJ(e),JSON.stringify(t))}catch{}},O2=e=>eq(e),lW=(e,t)=>{const{alt:n,...o}=t,r={...o};r.borderSize!==void 0&&r.borderWidth===void 0?r.borderWidth=r.borderSize:r.borderWidth!==void 0&&r.borderSize===void 0&&(r.borderSize=r.borderWidth);const i=eq(e);ZJ(e,{...i,node:{...i.node,...r}})},oOe=(e,t)=>{const n=eq(e);ZJ(e,{...n,connector:{...n.connector,...t}})},tq=1,dW=17,XH=(e,t)=>{if(!e)return{};const n={};for(const o of t)e[o]!==void 0&&(n[o]=e[o]);return n},rOe=["borderColor","backgroundColor","borderSize","borderStyle","fontSize","cornerRadius","shadow"],iOe=["borderColor","backgroundColor","borderSize","borderStyle","fontSize","shadow"],aOe=["fontSize"],sOe=["borderColor","borderWidth","borderStyle","shadow"];function uW(e,t,n){if(e==="text")return{width:t.width,height:t.height,fontSize:dW,...XH(n,aOe)};const o=e==="ellipse"?iOe:rOe;return{width:t.width,height:t.height,borderSize:tq,fontSize:dW,...XH(n,o)}}function cOe(e,t,n){return{path:e,width:t.width,height:t.height,borderWidth:tq,...XH(n,sOe)}}const vn=async(e,t,n,o,r)=>{const i={method:t},a={...o??{}};r!==void 0&&(a["content-type"]="application/json",i.body=JSON.stringify(r)),Object.keys(a).length>0&&(i.headers=a);const s=await e(n,i);if(!s.ok){let c=null;try{c=await s.json()}catch{}throw new Error((c==null?void 0:c.error)??`${t} ${n} → ${s.status}`)}return await s.json()},lOe=e=>{const{baseUrl:t,project:n,flow:o}=e,r=e.fetch??globalThis.fetch.bind(globalThis),i=e.EventSource??globalThis.EventSource,a=e.headers,s=`${t}/api/projects/${encodeURIComponent(n)}`,c=`${s}/flows/${encodeURIComponent(o)}`,l=`${t}/api/icons`;return{async createNode(u){const p=await vn(r,"POST",`${c}/nodes`,a,u);return{id:p.id,node:p.node}},async updateNode(u,p){await vn(r,"PATCH",`${c}/nodes/${u}`,a,p)},async updateNodePosition(u,p){return await vn(r,"PATCH",`${c}/nodes/${u}/position`,a,p)},async deleteNode(u){await vn(r,"DELETE",`${c}/nodes/${u}`,a)},async reorderNode(u,p){await vn(r,"PATCH",`${c}/nodes/${u}/order`,a,p)},async createConnector(u){return{id:(await vn(r,"POST",`${c}/connectors`,a,u)).id}},async updateConnector(u,p){await vn(r,"PATCH",`${c}/connectors/${u}`,a,p)},async deleteConnector(u){await vn(r,"DELETE",`${c}/connectors/${u}`,a)},async uploadImage(u,p,y){const g=new FormData;g.append("file",p),g.append("filename",y);const k=`${c}/nodes/${encodeURIComponent(u)}/files/upload`,x={method:"POST",body:g};a&&(x.headers={...a});const v=await r(k,x);if(!v.ok){let M=null;try{M=await v.json()}catch{}throw new Error((M==null?void 0:M.error)??`POST ${k} → ${v.status}`)}return await v.json()},async playAction(u){return await vn(r,"POST",`${c}/play/${u}`,a,{})},async openFile(u){await vn(r,"POST",`${s}/files/open`,a,{path:u})},async revealFile(u){await vn(r,"POST",`${s}/files/reveal`,a,{path:u})},async computeLayout(u,p){const y=await vn(r,"POST",`${t}/api/layout`,a,{nodes:u,edges:p});return{nodes:y.nodes,connectors:y.connectors}},icons:{async listPacks(){return(await vn(r,"GET",`${l}/packs`,a)).packs},async install(u,p){return{jobId:(await vn(r,"POST",`${l}/install`,a,{vendor:u,acceptTerms:p.acceptTerms??!1})).jobId}},subscribeJob(u,p){const y=`${l}/jobs/${encodeURIComponent(u)}/events`,g=new i(y);return g.onmessage=k=>{try{p(JSON.parse(k.data))}catch(x){console.error("icons.subscribeJob: failed to parse SSE payload",x)}},()=>g.close()},async remove(u){await vn(r,"DELETE",`${l}/packs/${encodeURIComponent(u)}`,a)},async getLicense(u){const p=await vn(r,"GET",`${l}/licenses/${encodeURIComponent(u)}`,a);return{summary:p.summary,url:p.url,requiresAcceptance:p.requiresAcceptance}}}}},dOe=500,uOe=500,hOe=2e3,fOe=(e,t)=>{if(!e&&!t)return;if(!e)return{...t};if(!t)return{...e};const n={...t};for(const[o,r]of Object.entries(e))n[o]=r;return n},hW=(e,t,n)=>{const o=Date.now(),r=dOe,i=uOe,{stack:a,cursor:s}=e;if(t.coalesceKey&&s>0){const h=a[s-1];if(h&&h.coalesceKey===t.coalesceKey&&o-h.capturedAt<=i){const u=a.slice(0,s);return u[s-1]={...h,do:t.do,capturedAt:o,beforeFields:fOe(h.beforeFields,t.beforeFields)},{stack:u,cursor:s}}}const c=a.slice(0,s);c.push({...t,capturedAt:o});let l=s+1;for(;c.length>r;)c.shift(),l-=1;return l<0&&(l=0),{stack:c,cursor:l}},pOe=e=>e.cursor===0?{state:e,entry:void 0}:{state:{...e,cursor:e.cursor-1},entry:e.stack[e.cursor-1]},yOe=e=>e.cursor===e.stack.length?{state:e,entry:void 0}:{state:{...e,cursor:e.cursor+1},entry:e.stack[e.cursor]},YJ=()=>({stack:[],cursor:0}),fW=e=>e.cursor===e.stack.length?e:{stack:e.stack.slice(0,e.cursor),cursor:e.cursor},mOe=(e,t,n=Date.now(),o=hOe)=>n-t>o?YJ():e,gOe=new Set(["borderColor","backgroundColor","borderSize","borderWidth","borderStyle","fontSize","textAlign","cornerRadius","shadow","color","strokeWidth","target"]);function kOe(e,t){let n={stack:[],cursor:0},o=0;const r=new Set;let i=null;const a=()=>({canUndo:n.cursor>0,canRedo:n.cursor<n.stack.length}),s=()=>{const k=a();for(const x of r)x(k)},c=()=>{if(i){o=Date.now();return}const k=fW(n);o=Date.now(),k!==n&&(n=k,s())},l=k=>{if(i){i.ops.push({redo:k.do,undo:k.undo});return}n=hW(n,{...k,capturedAt:Date.now()}),s()},h={createNode:async k=>{c();const x=await e.createNode(k);return l({do:async()=>{await e.createNode({...k,id:x.id})},undo:async()=>{await e.deleteNode(x.id)}}),x},updateNode:async(k,x)=>{c();const{nodes:v}=t(),M=v.find(_=>_.id===k);if(!M){await e.updateNode(k,x);return}const w={},b=M.data??{};for(const _ of Object.keys(x))if(_==="position")w[_]=M.position;else if(_==="type")w[_]=M.type;else{const S=b[_];w[_]=S===void 0&&gOe.has(_)?null:S}await e.updateNode(k,x);const C=Object.keys(x).sort().join(",");l({do:async()=>{await e.updateNode(k,x)},undo:async()=>{await e.updateNode(k,w)},coalesceKey:`update:${k}:${C}`,beforeFields:w})},updateNodePosition:async(k,x)=>{c();const{nodes:v}=t(),M=v.find(C=>C.id===k),w=M==null?void 0:M.position,b=await e.updateNodePosition(k,x);return w&&l({do:async()=>{await e.updateNodePosition(k,x)},undo:async()=>{await e.updateNodePosition(k,w)},coalesceKey:`pos:${k}`}),b},deleteNode:async k=>{c();const{nodes:x,connectors:v}=t(),M=x.find(b=>b.id===k);if(!M){await e.deleteNode(k);return}const w=v.filter(b=>b.source===k||b.target===k);await e.deleteNode(k),l({do:async()=>{await e.deleteNode(k)},undo:async()=>{await e.createNode({id:M.id,type:M.type,position:M.position,data:M.data??{}});for(const b of w)try{await e.createConnector({id:b.id,source:b.source,target:b.target,sourceHandle:b.sourceHandle,targetHandle:b.targetHandle,sourceHandleAutoPicked:b.sourceHandleAutoPicked,targetHandleAutoPicked:b.targetHandleAutoPicked,sourcePin:b.sourcePin,targetPin:b.targetPin,label:b.label,style:b.style,color:b.color,direction:b.direction,eventName:b.eventName,queueName:b.queueName,method:b.method,url:b.url})}catch(C){console.warn(`[seeflow/canvas] failed to restore connector ${b.id} during deleteNode undo:`,C)}}})},reorderNode:async(k,x)=>{c();const{nodes:v}=t(),M=v.findIndex(w=>w.id===k);if(M<0){await e.reorderNode(k,x);return}await e.reorderNode(k,x),l({do:async()=>{await e.reorderNode(k,x)},undo:async()=>{await e.reorderNode(k,{op:"toIndex",index:M})}})},createConnector:async k=>{c();const x=await e.createConnector(k);return l({do:async()=>{await e.createConnector({...k,id:x.id})},undo:async()=>{await e.deleteConnector(x.id)}}),x},updateConnector:async(k,x)=>{c();const{connectors:v}=t(),M=v.find(_=>_.id===k);if(!M){await e.updateConnector(k,x);return}const w={},b=M;for(const _ of Object.keys(x))w[_]=b[_];await e.updateConnector(k,x);const C=Object.keys(x).sort().join(",");l({do:async()=>{await e.updateConnector(k,x)},undo:async()=>{await e.updateConnector(k,w)},coalesceKey:`update:conn:${k}:${C}`,beforeFields:w})},deleteConnector:async k=>{c();const{connectors:x}=t(),v=x.find(M=>M.id===k);if(!v){await e.deleteConnector(k);return}await e.deleteConnector(k),l({do:async()=>{await e.deleteConnector(k)},undo:async()=>{await e.createConnector({id:v.id,source:v.source,target:v.target,sourceHandle:v.sourceHandle,targetHandle:v.targetHandle,sourceHandleAutoPicked:v.sourceHandleAutoPicked,targetHandleAutoPicked:v.targetHandleAutoPicked,sourcePin:v.sourcePin,targetPin:v.targetPin,label:v.label,style:v.style,color:v.color,direction:v.direction,eventName:v.eventName,queueName:v.queueName,method:v.method,url:v.url})}})},uploadImage:(k,x,v)=>e.uploadImage(k,x,v),...e.playAction?{playAction:k=>e.playAction(k)}:{},...e.openFile?{openFile:k=>e.openFile(k)}:{},...e.revealFile?{revealFile:k=>e.revealFile(k)}:{},...e.computeLayout?{computeLayout:(k,x)=>e.computeLayout(k,x)}:{},...e.icons?{icons:e.icons}:{}};let u=Promise.resolve();const p=async()=>{const k=pOe(n);k.entry&&(n=k.state,s(),await k.entry.undo())},y=async()=>{const k=yOe(n);k.entry&&(n=k.state,s(),await k.entry.do())};return{adapter:h,history:{get canUndo(){return n.cursor>0},get canRedo(){return n.cursor<n.stack.length},undo:()=>{o=Date.now();const k=u.then(p);return u=k.then(()=>{},()=>{}),k},redo:()=>{o=Date.now();const k=u.then(y);return u=k.then(()=>{},()=>{}),k},clear:()=>{n=YJ(),s()},markExternalChange:()=>{const k=mOe(n,o);k!==n&&(n=k,s())},batch:async(k,x,v)=>{if(i)return x();const M=fW(n);o=Date.now(),M!==n&&(n=M,s());const w={name:k,ops:[]};i=w;try{const b=await x();if(i=null,w.ops.length>0){const C=w.ops.slice();n=hW(n,{do:async()=>{for(const _ of C)await _.redo()},undo:async()=>{for(let _=C.length-1;_>=0;_--)await C[_].undo()},coalesceKey:v==null?void 0:v.coalesceKey,capturedAt:Date.now()}),s()}return b}catch(b){i=null;for(let C=w.ops.length-1;C>=0;C--)try{await w.ops[C].undo()}catch(_){console.warn(`[seeflow/canvas] batch '${k}' rollback inverse rejected:`,_)}throw b}},subscribe:k=>(r.add(k),k(a()),()=>{r.delete(k)})}}}function QJ(e,t,n){let o=null,r=!1;const i=new ResizeObserver(()=>{r||(o!==null&&clearTimeout(o),o=setTimeout(()=>{o=null,!r&&n()},t))});return i.observe(e),()=>{r||(r=!0,o!==null&&(clearTimeout(o),o=null),i.disconnect())}}var st;(function(e){e.assertEqual=r=>{};function t(r){}e.assertIs=t;function n(r){throw new Error}e.assertNever=n,e.arrayToEnum=r=>{const i={};for(const a of r)i[a]=a;return i},e.getValidEnumValues=r=>{const i=e.objectKeys(r).filter(s=>typeof r[r[s]]!="number"),a={};for(const s of i)a[s]=r[s];return e.objectValues(a)},e.objectValues=r=>e.objectKeys(r).map(function(i){return r[i]}),e.objectKeys=typeof Object.keys=="function"?r=>Object.keys(r):r=>{const i=[];for(const a in r)Object.prototype.hasOwnProperty.call(r,a)&&i.push(a);return i},e.find=(r,i)=>{for(const a of r)if(i(a))return a},e.isInteger=typeof Number.isInteger=="function"?r=>Number.isInteger(r):r=>typeof r=="number"&&Number.isFinite(r)&&Math.floor(r)===r;function o(r,i=" | "){return r.map(a=>typeof a=="string"?`'${a}'`:a).join(i)}e.joinValues=o,e.jsonStringifyReplacer=(r,i)=>typeof i=="bigint"?i.toString():i})(st||(st={}));var pW;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(pW||(pW={}));const _e=st.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),ga=e=>{switch(typeof e){case"undefined":return _e.undefined;case"string":return _e.string;case"number":return Number.isNaN(e)?_e.nan:_e.number;case"boolean":return _e.boolean;case"function":return _e.function;case"bigint":return _e.bigint;case"symbol":return _e.symbol;case"object":return Array.isArray(e)?_e.array:e===null?_e.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?_e.promise:typeof Map<"u"&&e instanceof Map?_e.map:typeof Set<"u"&&e instanceof Set?_e.set:typeof Date<"u"&&e instanceof Date?_e.date:_e.object;default:return _e.unknown}},me=st.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class Ri extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=o=>{this.issues=[...this.issues,o]},this.addIssues=(o=[])=>{this.issues=[...this.issues,...o]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}format(t){const n=t||function(i){return i.message},o={_errors:[]},r=i=>{for(const a of i.issues)if(a.code==="invalid_union")a.unionErrors.map(r);else if(a.code==="invalid_return_type")r(a.returnTypeError);else if(a.code==="invalid_arguments")r(a.argumentsError);else if(a.path.length===0)o._errors.push(n(a));else{let s=o,c=0;for(;c<a.path.length;){const l=a.path[c];c===a.path.length-1?(s[l]=s[l]||{_errors:[]},s[l]._errors.push(n(a))):s[l]=s[l]||{_errors:[]},s=s[l],c++}}};return r(this),o}static assert(t){if(!(t instanceof Ri))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,st.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},o=[];for(const r of this.issues)if(r.path.length>0){const i=r.path[0];n[i]=n[i]||[],n[i].push(t(r))}else o.push(t(r));return{formErrors:o,fieldErrors:n}}get formErrors(){return this.flatten()}}Ri.create=e=>new Ri(e);const ZH=(e,t)=>{let n;switch(e.code){case me.invalid_type:e.received===_e.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case me.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,st.jsonStringifyReplacer)}`;break;case me.unrecognized_keys:n=`Unrecognized key(s) in object: ${st.joinValues(e.keys,", ")}`;break;case me.invalid_union:n="Invalid input";break;case me.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${st.joinValues(e.options)}`;break;case me.invalid_enum_value:n=`Invalid enum value. Expected ${st.joinValues(e.options)}, received '${e.received}'`;break;case me.invalid_arguments:n="Invalid function arguments";break;case me.invalid_return_type:n="Invalid function return type";break;case me.invalid_date:n="Invalid date";break;case me.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:st.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case me.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="bigint"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case me.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case me.custom:n="Invalid input";break;case me.invalid_intersection_types:n="Intersection results could not be merged";break;case me.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case me.not_finite:n="Number must be finite";break;default:n=t.defaultError,st.assertNever(e)}return{message:n}};let vOe=ZH;function xOe(){return vOe}const wOe=e=>{const{data:t,path:n,errorMaps:o,issueData:r}=e,i=[...n,...r.path||[]],a={...r,path:i};if(r.message!==void 0)return{...r,path:i,message:r.message};let s="";const c=o.filter(l=>!!l).slice().reverse();for(const l of c)s=l(a,{data:t,defaultError:s}).message;return{...r,path:i,message:s}};function Me(e,t){const n=xOe(),o=wOe({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===ZH?void 0:ZH].filter(r=>!!r)});e.common.issues.push(o)}class $n{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const o=[];for(const r of n){if(r.status==="aborted")return qe;r.status==="dirty"&&t.dirty(),o.push(r.value)}return{status:t.value,value:o}}static async mergeObjectAsync(t,n){const o=[];for(const r of n){const i=await r.key,a=await r.value;o.push({key:i,value:a})}return $n.mergeObjectSync(t,o)}static mergeObjectSync(t,n){const o={};for(const r of n){const{key:i,value:a}=r;if(i.status==="aborted"||a.status==="aborted")return qe;i.status==="dirty"&&t.dirty(),a.status==="dirty"&&t.dirty(),i.value!=="__proto__"&&(typeof a.value<"u"||r.alwaysSet)&&(o[i.value]=a.value)}return{status:t.value,value:o}}}const qe=Object.freeze({status:"aborted"}),F2=e=>({status:"dirty",value:e}),Po=e=>({status:"valid",value:e}),yW=e=>e.status==="aborted",mW=e=>e.status==="dirty",R0=e=>e.status==="valid",oz=e=>typeof Promise<"u"&&e instanceof Promise;var Le;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(Le||(Le={}));class Wr{constructor(t,n,o,r){this._cachedPath=[],this.parent=t,this.data=n,this._path=o,this._key=r}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const gW=(e,t)=>{if(R0(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new Ri(e.common.issues);return this._error=n,this._error}}};function Ge(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:o,description:r}=e;if(t&&(n||o))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:r}:{errorMap:(a,s)=>{const{message:c}=e;return a.code==="invalid_enum_value"?{message:c??s.defaultError}:typeof s.data>"u"?{message:c??o??s.defaultError}:a.code!=="invalid_type"?{message:s.defaultError}:{message:c??n??s.defaultError}},description:r}}class et{get description(){return this._def.description}_getType(t){return ga(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:ga(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new $n,ctx:{common:t.parent.common,data:t.data,parsedType:ga(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(oz(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const o=this.safeParse(t,n);if(o.success)return o.data;throw o.error}safeParse(t,n){const o={common:{issues:[],async:(n==null?void 0:n.async)??!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:ga(t)},r=this._parseSync({data:t,path:o.path,parent:o});return gW(o,r)}"~validate"(t){var o,r;const n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:ga(t)};if(!this["~standard"].async)try{const i=this._parseSync({data:t,path:[],parent:n});return R0(i)?{value:i.value}:{issues:n.common.issues}}catch(i){(r=(o=i==null?void 0:i.message)==null?void 0:o.toLowerCase())!=null&&r.includes("encountered")&&(this["~standard"].async=!0),n.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:n}).then(i=>R0(i)?{value:i.value}:{issues:n.common.issues})}async parseAsync(t,n){const o=await this.safeParseAsync(t,n);if(o.success)return o.data;throw o.error}async safeParseAsync(t,n){const o={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:ga(t)},r=this._parse({data:t,path:o.path,parent:o}),i=await(oz(r)?r:Promise.resolve(r));return gW(o,i)}refine(t,n){const o=r=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(r):n;return this._refinement((r,i)=>{const a=t(r),s=()=>i.addIssue({code:me.custom,...o(r)});return typeof Promise<"u"&&a instanceof Promise?a.then(c=>c?!0:(s(),!1)):a?!0:(s(),!1)})}refinement(t,n){return this._refinement((o,r)=>t(o)?!0:(r.addIssue(typeof n=="function"?n(o,r):n),!1))}_refinement(t){return new H0({schema:this,typeName:Oe.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return za.create(this,this._def)}nullable(){return O0.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Vr.create(this)}promise(){return cz.create(this,this._def)}or(t){return iz.create([this,t],this._def)}and(t){return az.create(this,t,this._def)}transform(t){return new H0({...Ge(this._def),schema:this,typeName:Oe.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new tO({...Ge(this._def),innerType:this,defaultValue:n,typeName:Oe.ZodDefault})}brand(){return new BOe({typeName:Oe.ZodBranded,type:this,...Ge(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new nO({...Ge(this._def),innerType:this,catchValue:n,typeName:Oe.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return nq.create(this,t)}readonly(){return oO.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const MOe=/^c[^\s-]{8,}$/i,bOe=/^[0-9a-z]+$/,_Oe=/^[0-9A-HJKMNP-TV-Z]{26}$/i,COe=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,SOe=/^[a-z0-9_-]{21}$/i,LOe=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,NOe=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,IOe=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,AOe="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let WT;const EOe=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,jOe=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,$Oe=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,POe=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,zOe=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,ROe=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,JJ="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",TOe=new RegExp(`^${JJ}$`);function eee(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);const n=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${n}`}function DOe(e){return new RegExp(`^${eee(e)}$`)}function HOe(e){let t=`${JJ}T${eee(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function OOe(e,t){return!!((t==="v4"||!t)&&EOe.test(e)||(t==="v6"||!t)&&$Oe.test(e))}function FOe(e,t){if(!LOe.test(e))return!1;try{const[n]=e.split(".");if(!n)return!1;const o=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),r=JSON.parse(atob(o));return!(typeof r!="object"||r===null||"typ"in r&&(r==null?void 0:r.typ)!=="JWT"||!r.alg||t&&r.alg!==t)}catch{return!1}}function qOe(e,t){return!!((t==="v4"||!t)&&jOe.test(e)||(t==="v6"||!t)&&POe.test(e))}class Ii extends et{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==_e.string){const i=this._getOrReturnCtx(t);return Me(i,{code:me.invalid_type,expected:_e.string,received:i.parsedType}),qe}const o=new $n;let r;for(const i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(r=this._getOrReturnCtx(t,r),Me(r,{code:me.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),o.dirty());else if(i.kind==="max")t.data.length>i.value&&(r=this._getOrReturnCtx(t,r),Me(r,{code:me.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),o.dirty());else if(i.kind==="length"){const a=t.data.length>i.value,s=t.data.length<i.value;(a||s)&&(r=this._getOrReturnCtx(t,r),a?Me(r,{code:me.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):s&&Me(r,{code:me.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),o.dirty())}else if(i.kind==="email")IOe.test(t.data)||(r=this._getOrReturnCtx(t,r),Me(r,{validation:"email",code:me.invalid_string,message:i.message}),o.dirty());else if(i.kind==="emoji")WT||(WT=new RegExp(AOe,"u")),WT.test(t.data)||(r=this._getOrReturnCtx(t,r),Me(r,{validation:"emoji",code:me.invalid_string,message:i.message}),o.dirty());else if(i.kind==="uuid")COe.test(t.data)||(r=this._getOrReturnCtx(t,r),Me(r,{validation:"uuid",code:me.invalid_string,message:i.message}),o.dirty());else if(i.kind==="nanoid")SOe.test(t.data)||(r=this._getOrReturnCtx(t,r),Me(r,{validation:"nanoid",code:me.invalid_string,message:i.message}),o.dirty());else if(i.kind==="cuid")MOe.test(t.data)||(r=this._getOrReturnCtx(t,r),Me(r,{validation:"cuid",code:me.invalid_string,message:i.message}),o.dirty());else if(i.kind==="cuid2")bOe.test(t.data)||(r=this._getOrReturnCtx(t,r),Me(r,{validation:"cuid2",code:me.invalid_string,message:i.message}),o.dirty());else if(i.kind==="ulid")_Oe.test(t.data)||(r=this._getOrReturnCtx(t,r),Me(r,{validation:"ulid",code:me.invalid_string,message:i.message}),o.dirty());else if(i.kind==="url")try{new URL(t.data)}catch{r=this._getOrReturnCtx(t,r),Me(r,{validation:"url",code:me.invalid_string,message:i.message}),o.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(t.data)||(r=this._getOrReturnCtx(t,r),Me(r,{validation:"regex",code:me.invalid_string,message:i.message}),o.dirty())):i.kind==="trim"?t.data=t.data.trim():i.kind==="includes"?t.data.includes(i.value,i.position)||(r=this._getOrReturnCtx(t,r),Me(r,{code:me.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),o.dirty()):i.kind==="toLowerCase"?t.data=t.data.toLowerCase():i.kind==="toUpperCase"?t.data=t.data.toUpperCase():i.kind==="startsWith"?t.data.startsWith(i.value)||(r=this._getOrReturnCtx(t,r),Me(r,{code:me.invalid_string,validation:{startsWith:i.value},message:i.message}),o.dirty()):i.kind==="endsWith"?t.data.endsWith(i.value)||(r=this._getOrReturnCtx(t,r),Me(r,{code:me.invalid_string,validation:{endsWith:i.value},message:i.message}),o.dirty()):i.kind==="datetime"?HOe(i).test(t.data)||(r=this._getOrReturnCtx(t,r),Me(r,{code:me.invalid_string,validation:"datetime",message:i.message}),o.dirty()):i.kind==="date"?TOe.test(t.data)||(r=this._getOrReturnCtx(t,r),Me(r,{code:me.invalid_string,validation:"date",message:i.message}),o.dirty()):i.kind==="time"?DOe(i).test(t.data)||(r=this._getOrReturnCtx(t,r),Me(r,{code:me.invalid_string,validation:"time",message:i.message}),o.dirty()):i.kind==="duration"?NOe.test(t.data)||(r=this._getOrReturnCtx(t,r),Me(r,{validation:"duration",code:me.invalid_string,message:i.message}),o.dirty()):i.kind==="ip"?OOe(t.data,i.version)||(r=this._getOrReturnCtx(t,r),Me(r,{validation:"ip",code:me.invalid_string,message:i.message}),o.dirty()):i.kind==="jwt"?FOe(t.data,i.alg)||(r=this._getOrReturnCtx(t,r),Me(r,{validation:"jwt",code:me.invalid_string,message:i.message}),o.dirty()):i.kind==="cidr"?qOe(t.data,i.version)||(r=this._getOrReturnCtx(t,r),Me(r,{validation:"cidr",code:me.invalid_string,message:i.message}),o.dirty()):i.kind==="base64"?zOe.test(t.data)||(r=this._getOrReturnCtx(t,r),Me(r,{validation:"base64",code:me.invalid_string,message:i.message}),o.dirty()):i.kind==="base64url"?ROe.test(t.data)||(r=this._getOrReturnCtx(t,r),Me(r,{validation:"base64url",code:me.invalid_string,message:i.message}),o.dirty()):st.assertNever(i);return{status:o.value,value:t.data}}_regex(t,n,o){return this.refinement(r=>t.test(r),{validation:n,code:me.invalid_string,...Le.errToObj(o)})}_addCheck(t){return new Ii({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...Le.errToObj(t)})}url(t){return this._addCheck({kind:"url",...Le.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...Le.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...Le.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...Le.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...Le.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...Le.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...Le.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...Le.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...Le.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...Le.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...Le.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...Le.errToObj(t)})}datetime(t){return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(t==null?void 0:t.offset)??!1,local:(t==null?void 0:t.local)??!1,...Le.errToObj(t==null?void 0:t.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,...Le.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...Le.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...Le.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...Le.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...Le.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...Le.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...Le.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...Le.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...Le.errToObj(n)})}nonempty(t){return this.min(1,Le.errToObj(t))}trim(){return new Ii({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Ii({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Ii({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}Ii.create=e=>new Ii({checks:[],typeName:Oe.ZodString,coerce:(e==null?void 0:e.coerce)??!1,...Ge(e)});function VOe(e,t){const n=(e.toString().split(".")[1]||"").length,o=(t.toString().split(".")[1]||"").length,r=n>o?n:o,i=Number.parseInt(e.toFixed(r).replace(".","")),a=Number.parseInt(t.toFixed(r).replace(".",""));return i%a/10**r}class T0 extends et{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==_e.number){const i=this._getOrReturnCtx(t);return Me(i,{code:me.invalid_type,expected:_e.number,received:i.parsedType}),qe}let o;const r=new $n;for(const i of this._def.checks)i.kind==="int"?st.isInteger(t.data)||(o=this._getOrReturnCtx(t,o),Me(o,{code:me.invalid_type,expected:"integer",received:"float",message:i.message}),r.dirty()):i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(o=this._getOrReturnCtx(t,o),Me(o,{code:me.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),r.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(o=this._getOrReturnCtx(t,o),Me(o,{code:me.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),r.dirty()):i.kind==="multipleOf"?VOe(t.data,i.value)!==0&&(o=this._getOrReturnCtx(t,o),Me(o,{code:me.not_multiple_of,multipleOf:i.value,message:i.message}),r.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(o=this._getOrReturnCtx(t,o),Me(o,{code:me.not_finite,message:i.message}),r.dirty()):st.assertNever(i);return{status:r.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,Le.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Le.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Le.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Le.toString(n))}setLimit(t,n,o,r){return new T0({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:o,message:Le.toString(r)}]})}_addCheck(t){return new T0({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:Le.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Le.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Le.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Le.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Le.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Le.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:Le.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Le.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Le.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&st.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const o of this._def.checks){if(o.kind==="finite"||o.kind==="int"||o.kind==="multipleOf")return!0;o.kind==="min"?(n===null||o.value>n)&&(n=o.value):o.kind==="max"&&(t===null||o.value<t)&&(t=o.value)}return Number.isFinite(n)&&Number.isFinite(t)}}T0.create=e=>new T0({checks:[],typeName:Oe.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...Ge(e)});class df extends et{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==_e.bigint)return this._getInvalidInput(t);let o;const r=new $n;for(const i of this._def.checks)i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(o=this._getOrReturnCtx(t,o),Me(o,{code:me.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),r.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(o=this._getOrReturnCtx(t,o),Me(o,{code:me.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),r.dirty()):i.kind==="multipleOf"?t.data%i.value!==BigInt(0)&&(o=this._getOrReturnCtx(t,o),Me(o,{code:me.not_multiple_of,multipleOf:i.value,message:i.message}),r.dirty()):st.assertNever(i);return{status:r.value,value:t.data}}_getInvalidInput(t){const n=this._getOrReturnCtx(t);return Me(n,{code:me.invalid_type,expected:_e.bigint,received:n.parsedType}),qe}gte(t,n){return this.setLimit("min",t,!0,Le.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Le.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Le.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Le.toString(n))}setLimit(t,n,o,r){return new df({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:o,message:Le.toString(r)}]})}_addCheck(t){return new df({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Le.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Le.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Le.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Le.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Le.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}df.create=e=>new df({checks:[],typeName:Oe.ZodBigInt,coerce:(e==null?void 0:e.coerce)??!1,...Ge(e)});class YH extends et{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==_e.boolean){const o=this._getOrReturnCtx(t);return Me(o,{code:me.invalid_type,expected:_e.boolean,received:o.parsedType}),qe}return Po(t.data)}}YH.create=e=>new YH({typeName:Oe.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...Ge(e)});class rz extends et{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==_e.date){const i=this._getOrReturnCtx(t);return Me(i,{code:me.invalid_type,expected:_e.date,received:i.parsedType}),qe}if(Number.isNaN(t.data.getTime())){const i=this._getOrReturnCtx(t);return Me(i,{code:me.invalid_date}),qe}const o=new $n;let r;for(const i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(r=this._getOrReturnCtx(t,r),Me(r,{code:me.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),o.dirty()):i.kind==="max"?t.data.getTime()>i.value&&(r=this._getOrReturnCtx(t,r),Me(r,{code:me.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),o.dirty()):st.assertNever(i);return{status:o.value,value:new Date(t.data.getTime())}}_addCheck(t){return new rz({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:Le.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:Le.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}}rz.create=e=>new rz({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:Oe.ZodDate,...Ge(e)});class kW extends et{_parse(t){if(this._getType(t)!==_e.symbol){const o=this._getOrReturnCtx(t);return Me(o,{code:me.invalid_type,expected:_e.symbol,received:o.parsedType}),qe}return Po(t.data)}}kW.create=e=>new kW({typeName:Oe.ZodSymbol,...Ge(e)});class vW extends et{_parse(t){if(this._getType(t)!==_e.undefined){const o=this._getOrReturnCtx(t);return Me(o,{code:me.invalid_type,expected:_e.undefined,received:o.parsedType}),qe}return Po(t.data)}}vW.create=e=>new vW({typeName:Oe.ZodUndefined,...Ge(e)});class xW extends et{_parse(t){if(this._getType(t)!==_e.null){const o=this._getOrReturnCtx(t);return Me(o,{code:me.invalid_type,expected:_e.null,received:o.parsedType}),qe}return Po(t.data)}}xW.create=e=>new xW({typeName:Oe.ZodNull,...Ge(e)});class wW extends et{constructor(){super(...arguments),this._any=!0}_parse(t){return Po(t.data)}}wW.create=e=>new wW({typeName:Oe.ZodAny,...Ge(e)});class QH extends et{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Po(t.data)}}QH.create=e=>new QH({typeName:Oe.ZodUnknown,...Ge(e)});class Fa extends et{_parse(t){const n=this._getOrReturnCtx(t);return Me(n,{code:me.invalid_type,expected:_e.never,received:n.parsedType}),qe}}Fa.create=e=>new Fa({typeName:Oe.ZodNever,...Ge(e)});class MW extends et{_parse(t){if(this._getType(t)!==_e.undefined){const o=this._getOrReturnCtx(t);return Me(o,{code:me.invalid_type,expected:_e.void,received:o.parsedType}),qe}return Po(t.data)}}MW.create=e=>new MW({typeName:Oe.ZodVoid,...Ge(e)});class Vr extends et{_parse(t){const{ctx:n,status:o}=this._processInputParams(t),r=this._def;if(n.parsedType!==_e.array)return Me(n,{code:me.invalid_type,expected:_e.array,received:n.parsedType}),qe;if(r.exactLength!==null){const a=n.data.length>r.exactLength.value,s=n.data.length<r.exactLength.value;(a||s)&&(Me(n,{code:a?me.too_big:me.too_small,minimum:s?r.exactLength.value:void 0,maximum:a?r.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:r.exactLength.message}),o.dirty())}if(r.minLength!==null&&n.data.length<r.minLength.value&&(Me(n,{code:me.too_small,minimum:r.minLength.value,type:"array",inclusive:!0,exact:!1,message:r.minLength.message}),o.dirty()),r.maxLength!==null&&n.data.length>r.maxLength.value&&(Me(n,{code:me.too_big,maximum:r.maxLength.value,type:"array",inclusive:!0,exact:!1,message:r.maxLength.message}),o.dirty()),n.common.async)return Promise.all([...n.data].map((a,s)=>r.type._parseAsync(new Wr(n,a,n.path,s)))).then(a=>$n.mergeArray(o,a));const i=[...n.data].map((a,s)=>r.type._parseSync(new Wr(n,a,n.path,s)));return $n.mergeArray(o,i)}get element(){return this._def.type}min(t,n){return new Vr({...this._def,minLength:{value:t,message:Le.toString(n)}})}max(t,n){return new Vr({...this._def,maxLength:{value:t,message:Le.toString(n)}})}length(t,n){return new Vr({...this._def,exactLength:{value:t,message:Le.toString(n)}})}nonempty(t){return this.min(1,t)}}Vr.create=(e,t)=>new Vr({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Oe.ZodArray,...Ge(t)});function $u(e){if(e instanceof Wt){const t={};for(const n in e.shape){const o=e.shape[n];t[n]=za.create($u(o))}return new Wt({...e._def,shape:()=>t})}else return e instanceof Vr?new Vr({...e._def,type:$u(e.element)}):e instanceof za?za.create($u(e.unwrap())):e instanceof O0?O0.create($u(e.unwrap())):e instanceof Fd?Fd.create(e.items.map(t=>$u(t))):e}class Wt extends et{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=st.objectKeys(t);return this._cached={shape:t,keys:n},this._cached}_parse(t){if(this._getType(t)!==_e.object){const l=this._getOrReturnCtx(t);return Me(l,{code:me.invalid_type,expected:_e.object,received:l.parsedType}),qe}const{status:o,ctx:r}=this._processInputParams(t),{shape:i,keys:a}=this._getCached(),s=[];if(!(this._def.catchall instanceof Fa&&this._def.unknownKeys==="strip"))for(const l in r.data)a.includes(l)||s.push(l);const c=[];for(const l of a){const h=i[l],u=r.data[l];c.push({key:{status:"valid",value:l},value:h._parse(new Wr(r,u,r.path,l)),alwaysSet:l in r.data})}if(this._def.catchall instanceof Fa){const l=this._def.unknownKeys;if(l==="passthrough")for(const h of s)c.push({key:{status:"valid",value:h},value:{status:"valid",value:r.data[h]}});else if(l==="strict")s.length>0&&(Me(r,{code:me.unrecognized_keys,keys:s}),o.dirty());else if(l!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const l=this._def.catchall;for(const h of s){const u=r.data[h];c.push({key:{status:"valid",value:h},value:l._parse(new Wr(r,u,r.path,h)),alwaysSet:h in r.data})}}return r.common.async?Promise.resolve().then(async()=>{const l=[];for(const h of c){const u=await h.key,p=await h.value;l.push({key:u,value:p,alwaysSet:h.alwaysSet})}return l}).then(l=>$n.mergeObjectSync(o,l)):$n.mergeObjectSync(o,c)}get shape(){return this._def.shape()}strict(t){return Le.errToObj,new Wt({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,o)=>{var i,a;const r=((a=(i=this._def).errorMap)==null?void 0:a.call(i,n,o).message)??o.defaultError;return n.code==="unrecognized_keys"?{message:Le.errToObj(t).message??r}:{message:r}}}:{}})}strip(){return new Wt({...this._def,unknownKeys:"strip"})}passthrough(){return new Wt({...this._def,unknownKeys:"passthrough"})}extend(t){return new Wt({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new Wt({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Oe.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new Wt({...this._def,catchall:t})}pick(t){const n={};for(const o of st.objectKeys(t))t[o]&&this.shape[o]&&(n[o]=this.shape[o]);return new Wt({...this._def,shape:()=>n})}omit(t){const n={};for(const o of st.objectKeys(this.shape))t[o]||(n[o]=this.shape[o]);return new Wt({...this._def,shape:()=>n})}deepPartial(){return $u(this)}partial(t){const n={};for(const o of st.objectKeys(this.shape)){const r=this.shape[o];t&&!t[o]?n[o]=r:n[o]=r.optional()}return new Wt({...this._def,shape:()=>n})}required(t){const n={};for(const o of st.objectKeys(this.shape))if(t&&!t[o])n[o]=this.shape[o];else{let i=this.shape[o];for(;i instanceof za;)i=i._def.innerType;n[o]=i}return new Wt({...this._def,shape:()=>n})}keyof(){return tee(st.objectKeys(this.shape))}}Wt.create=(e,t)=>new Wt({shape:()=>e,unknownKeys:"strip",catchall:Fa.create(),typeName:Oe.ZodObject,...Ge(t)});Wt.strictCreate=(e,t)=>new Wt({shape:()=>e,unknownKeys:"strict",catchall:Fa.create(),typeName:Oe.ZodObject,...Ge(t)});Wt.lazycreate=(e,t)=>new Wt({shape:e,unknownKeys:"strip",catchall:Fa.create(),typeName:Oe.ZodObject,...Ge(t)});class iz extends et{_parse(t){const{ctx:n}=this._processInputParams(t),o=this._def.options;function r(i){for(const s of i)if(s.result.status==="valid")return s.result;for(const s of i)if(s.result.status==="dirty")return n.common.issues.push(...s.ctx.common.issues),s.result;const a=i.map(s=>new Ri(s.ctx.common.issues));return Me(n,{code:me.invalid_union,unionErrors:a}),qe}if(n.common.async)return Promise.all(o.map(async i=>{const a={...n,common:{...n.common,issues:[]},parent:null};return{result:await i._parseAsync({data:n.data,path:n.path,parent:a}),ctx:a}})).then(r);{let i;const a=[];for(const c of o){const l={...n,common:{...n.common,issues:[]},parent:null},h=c._parseSync({data:n.data,path:n.path,parent:l});if(h.status==="valid")return h;h.status==="dirty"&&!i&&(i={result:h,ctx:l}),l.common.issues.length&&a.push(l.common.issues)}if(i)return n.common.issues.push(...i.ctx.common.issues),i.result;const s=a.map(c=>new Ri(c));return Me(n,{code:me.invalid_union,unionErrors:s}),qe}}get options(){return this._def.options}}iz.create=(e,t)=>new iz({options:e,typeName:Oe.ZodUnion,...Ge(t)});function JH(e,t){const n=ga(e),o=ga(t);if(e===t)return{valid:!0,data:e};if(n===_e.object&&o===_e.object){const r=st.objectKeys(t),i=st.objectKeys(e).filter(s=>r.indexOf(s)!==-1),a={...e,...t};for(const s of i){const c=JH(e[s],t[s]);if(!c.valid)return{valid:!1};a[s]=c.data}return{valid:!0,data:a}}else if(n===_e.array&&o===_e.array){if(e.length!==t.length)return{valid:!1};const r=[];for(let i=0;i<e.length;i++){const a=e[i],s=t[i],c=JH(a,s);if(!c.valid)return{valid:!1};r.push(c.data)}return{valid:!0,data:r}}else return n===_e.date&&o===_e.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class az extends et{_parse(t){const{status:n,ctx:o}=this._processInputParams(t),r=(i,a)=>{if(yW(i)||yW(a))return qe;const s=JH(i.value,a.value);return s.valid?((mW(i)||mW(a))&&n.dirty(),{status:n.value,value:s.data}):(Me(o,{code:me.invalid_intersection_types}),qe)};return o.common.async?Promise.all([this._def.left._parseAsync({data:o.data,path:o.path,parent:o}),this._def.right._parseAsync({data:o.data,path:o.path,parent:o})]).then(([i,a])=>r(i,a)):r(this._def.left._parseSync({data:o.data,path:o.path,parent:o}),this._def.right._parseSync({data:o.data,path:o.path,parent:o}))}}az.create=(e,t,n)=>new az({left:e,right:t,typeName:Oe.ZodIntersection,...Ge(n)});class Fd extends et{_parse(t){const{status:n,ctx:o}=this._processInputParams(t);if(o.parsedType!==_e.array)return Me(o,{code:me.invalid_type,expected:_e.array,received:o.parsedType}),qe;if(o.data.length<this._def.items.length)return Me(o,{code:me.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),qe;!this._def.rest&&o.data.length>this._def.items.length&&(Me(o,{code:me.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const i=[...o.data].map((a,s)=>{const c=this._def.items[s]||this._def.rest;return c?c._parse(new Wr(o,a,o.path,s)):null}).filter(a=>!!a);return o.common.async?Promise.all(i).then(a=>$n.mergeArray(n,a)):$n.mergeArray(n,i)}get items(){return this._def.items}rest(t){return new Fd({...this._def,rest:t})}}Fd.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Fd({items:e,typeName:Oe.ZodTuple,rest:null,...Ge(t)})};class sz extends et{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:o}=this._processInputParams(t);if(o.parsedType!==_e.object)return Me(o,{code:me.invalid_type,expected:_e.object,received:o.parsedType}),qe;const r=[],i=this._def.keyType,a=this._def.valueType;for(const s in o.data)r.push({key:i._parse(new Wr(o,s,o.path,s)),value:a._parse(new Wr(o,o.data[s],o.path,s)),alwaysSet:s in o.data});return o.common.async?$n.mergeObjectAsync(n,r):$n.mergeObjectSync(n,r)}get element(){return this._def.valueType}static create(t,n,o){return n instanceof et?new sz({keyType:t,valueType:n,typeName:Oe.ZodRecord,...Ge(o)}):new sz({keyType:Ii.create(),valueType:t,typeName:Oe.ZodRecord,...Ge(n)})}}class bW extends et{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:o}=this._processInputParams(t);if(o.parsedType!==_e.map)return Me(o,{code:me.invalid_type,expected:_e.map,received:o.parsedType}),qe;const r=this._def.keyType,i=this._def.valueType,a=[...o.data.entries()].map(([s,c],l)=>({key:r._parse(new Wr(o,s,o.path,[l,"key"])),value:i._parse(new Wr(o,c,o.path,[l,"value"]))}));if(o.common.async){const s=new Map;return Promise.resolve().then(async()=>{for(const c of a){const l=await c.key,h=await c.value;if(l.status==="aborted"||h.status==="aborted")return qe;(l.status==="dirty"||h.status==="dirty")&&n.dirty(),s.set(l.value,h.value)}return{status:n.value,value:s}})}else{const s=new Map;for(const c of a){const l=c.key,h=c.value;if(l.status==="aborted"||h.status==="aborted")return qe;(l.status==="dirty"||h.status==="dirty")&&n.dirty(),s.set(l.value,h.value)}return{status:n.value,value:s}}}}bW.create=(e,t,n)=>new bW({valueType:t,keyType:e,typeName:Oe.ZodMap,...Ge(n)});class uf extends et{_parse(t){const{status:n,ctx:o}=this._processInputParams(t);if(o.parsedType!==_e.set)return Me(o,{code:me.invalid_type,expected:_e.set,received:o.parsedType}),qe;const r=this._def;r.minSize!==null&&o.data.size<r.minSize.value&&(Me(o,{code:me.too_small,minimum:r.minSize.value,type:"set",inclusive:!0,exact:!1,message:r.minSize.message}),n.dirty()),r.maxSize!==null&&o.data.size>r.maxSize.value&&(Me(o,{code:me.too_big,maximum:r.maxSize.value,type:"set",inclusive:!0,exact:!1,message:r.maxSize.message}),n.dirty());const i=this._def.valueType;function a(c){const l=new Set;for(const h of c){if(h.status==="aborted")return qe;h.status==="dirty"&&n.dirty(),l.add(h.value)}return{status:n.value,value:l}}const s=[...o.data.values()].map((c,l)=>i._parse(new Wr(o,c,o.path,l)));return o.common.async?Promise.all(s).then(c=>a(c)):a(s)}min(t,n){return new uf({...this._def,minSize:{value:t,message:Le.toString(n)}})}max(t,n){return new uf({...this._def,maxSize:{value:t,message:Le.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}uf.create=(e,t)=>new uf({valueType:e,minSize:null,maxSize:null,typeName:Oe.ZodSet,...Ge(t)});class _W extends et{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}_W.create=(e,t)=>new _W({getter:e,typeName:Oe.ZodLazy,...Ge(t)});class eO extends et{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return Me(n,{received:n.data,code:me.invalid_literal,expected:this._def.value}),qe}return{status:"valid",value:t.data}}get value(){return this._def.value}}eO.create=(e,t)=>new eO({value:e,typeName:Oe.ZodLiteral,...Ge(t)});function tee(e,t){return new D0({values:e,typeName:Oe.ZodEnum,...Ge(t)})}class D0 extends et{_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),o=this._def.values;return Me(n,{expected:st.joinValues(o),received:n.parsedType,code:me.invalid_type}),qe}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){const n=this._getOrReturnCtx(t),o=this._def.values;return Me(n,{received:n.data,code:me.invalid_enum_value,options:o}),qe}return Po(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return D0.create(t,{...this._def,...n})}exclude(t,n=this._def){return D0.create(this.options.filter(o=>!t.includes(o)),{...this._def,...n})}}D0.create=tee;class CW extends et{_parse(t){const n=st.getValidEnumValues(this._def.values),o=this._getOrReturnCtx(t);if(o.parsedType!==_e.string&&o.parsedType!==_e.number){const r=st.objectValues(n);return Me(o,{expected:st.joinValues(r),received:o.parsedType,code:me.invalid_type}),qe}if(this._cache||(this._cache=new Set(st.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){const r=st.objectValues(n);return Me(o,{received:o.data,code:me.invalid_enum_value,options:r}),qe}return Po(t.data)}get enum(){return this._def.values}}CW.create=(e,t)=>new CW({values:e,typeName:Oe.ZodNativeEnum,...Ge(t)});class cz extends et{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==_e.promise&&n.common.async===!1)return Me(n,{code:me.invalid_type,expected:_e.promise,received:n.parsedType}),qe;const o=n.parsedType===_e.promise?n.data:Promise.resolve(n.data);return Po(o.then(r=>this._def.type.parseAsync(r,{path:n.path,errorMap:n.common.contextualErrorMap})))}}cz.create=(e,t)=>new cz({type:e,typeName:Oe.ZodPromise,...Ge(t)});class H0 extends et{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Oe.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:o}=this._processInputParams(t),r=this._def.effect||null,i={addIssue:a=>{Me(o,a),a.fatal?n.abort():n.dirty()},get path(){return o.path}};if(i.addIssue=i.addIssue.bind(i),r.type==="preprocess"){const a=r.transform(o.data,i);if(o.common.async)return Promise.resolve(a).then(async s=>{if(n.value==="aborted")return qe;const c=await this._def.schema._parseAsync({data:s,path:o.path,parent:o});return c.status==="aborted"?qe:c.status==="dirty"||n.value==="dirty"?F2(c.value):c});{if(n.value==="aborted")return qe;const s=this._def.schema._parseSync({data:a,path:o.path,parent:o});return s.status==="aborted"?qe:s.status==="dirty"||n.value==="dirty"?F2(s.value):s}}if(r.type==="refinement"){const a=s=>{const c=r.refinement(s,i);if(o.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return s};if(o.common.async===!1){const s=this._def.schema._parseSync({data:o.data,path:o.path,parent:o});return s.status==="aborted"?qe:(s.status==="dirty"&&n.dirty(),a(s.value),{status:n.value,value:s.value})}else return this._def.schema._parseAsync({data:o.data,path:o.path,parent:o}).then(s=>s.status==="aborted"?qe:(s.status==="dirty"&&n.dirty(),a(s.value).then(()=>({status:n.value,value:s.value}))))}if(r.type==="transform")if(o.common.async===!1){const a=this._def.schema._parseSync({data:o.data,path:o.path,parent:o});if(!R0(a))return qe;const s=r.transform(a.value,i);if(s instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:s}}else return this._def.schema._parseAsync({data:o.data,path:o.path,parent:o}).then(a=>R0(a)?Promise.resolve(r.transform(a.value,i)).then(s=>({status:n.value,value:s})):qe);st.assertNever(r)}}H0.create=(e,t,n)=>new H0({schema:e,typeName:Oe.ZodEffects,effect:t,...Ge(n)});H0.createWithPreprocess=(e,t,n)=>new H0({schema:t,effect:{type:"preprocess",transform:e},typeName:Oe.ZodEffects,...Ge(n)});class za extends et{_parse(t){return this._getType(t)===_e.undefined?Po(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}za.create=(e,t)=>new za({innerType:e,typeName:Oe.ZodOptional,...Ge(t)});class O0 extends et{_parse(t){return this._getType(t)===_e.null?Po(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}O0.create=(e,t)=>new O0({innerType:e,typeName:Oe.ZodNullable,...Ge(t)});class tO extends et{_parse(t){const{ctx:n}=this._processInputParams(t);let o=n.data;return n.parsedType===_e.undefined&&(o=this._def.defaultValue()),this._def.innerType._parse({data:o,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}tO.create=(e,t)=>new tO({innerType:e,typeName:Oe.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Ge(t)});class nO extends et{_parse(t){const{ctx:n}=this._processInputParams(t),o={...n,common:{...n.common,issues:[]}},r=this._def.innerType._parse({data:o.data,path:o.path,parent:{...o}});return oz(r)?r.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Ri(o.common.issues)},input:o.data})})):{status:"valid",value:r.status==="valid"?r.value:this._def.catchValue({get error(){return new Ri(o.common.issues)},input:o.data})}}removeCatch(){return this._def.innerType}}nO.create=(e,t)=>new nO({innerType:e,typeName:Oe.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Ge(t)});class SW extends et{_parse(t){if(this._getType(t)!==_e.nan){const o=this._getOrReturnCtx(t);return Me(o,{code:me.invalid_type,expected:_e.nan,received:o.parsedType}),qe}return{status:"valid",value:t.data}}}SW.create=e=>new SW({typeName:Oe.ZodNaN,...Ge(e)});class BOe extends et{_parse(t){const{ctx:n}=this._processInputParams(t),o=n.data;return this._def.type._parse({data:o,path:n.path,parent:n})}unwrap(){return this._def.type}}class nq extends et{_parse(t){const{status:n,ctx:o}=this._processInputParams(t);if(o.common.async)return(async()=>{const i=await this._def.in._parseAsync({data:o.data,path:o.path,parent:o});return i.status==="aborted"?qe:i.status==="dirty"?(n.dirty(),F2(i.value)):this._def.out._parseAsync({data:i.value,path:o.path,parent:o})})();{const r=this._def.in._parseSync({data:o.data,path:o.path,parent:o});return r.status==="aborted"?qe:r.status==="dirty"?(n.dirty(),{status:"dirty",value:r.value}):this._def.out._parseSync({data:r.value,path:o.path,parent:o})}}static create(t,n){return new nq({in:t,out:n,typeName:Oe.ZodPipeline})}}class oO extends et{_parse(t){const n=this._def.innerType._parse(t),o=r=>(R0(r)&&(r.value=Object.freeze(r.value)),r);return oz(n)?n.then(r=>o(r)):o(n)}unwrap(){return this._def.innerType}}oO.create=(e,t)=>new oO({innerType:e,typeName:Oe.ZodReadonly,...Ge(t)});var Oe;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(Oe||(Oe={}));const un=Ii.create,nee=T0.create,UOe=YH.create,Ah=QH.create;Fa.create;const ps=Vr.create,at=Wt.create,rO=iz.create;az.create;Fd.create;const LW=sz.create,Ip=eO.create,Ap=D0.create;cz.create;za.create;O0.create;const WOe=at({$state:un().min(1)}),Mi=at({$action:un().min(1)}),GOe=at({$cond:Ah(),$then:Ah(),$else:Ah().optional()}),Uo=e=>rO([e,WOe,Mi,GOe]),Ht=Uo(un()),xi=Uo(nee()),Ep=Uo(UOe()),oee={Card:at({title:Ht.optional()}),Separator:at({orientation:Uo(Ap(["horizontal","vertical"])).optional()}),Tabs:at({value:Ht.optional(),items:ps(at({id:un(),label:un()})),onChange:Mi.optional()}),Accordion:at({items:ps(at({id:un(),title:un(),content:un()}))}),Badge:at({label:Ht,variant:Uo(Ap(["default","secondary","destructive","outline"])).optional()}),Avatar:at({src:Ht.optional(),alt:Ht.optional(),fallback:Ht.optional()}),Progress:at({value:xi}),Skeleton:at({width:xi.optional(),height:xi.optional()}),Label:at({text:Ht}),Heading:at({level:Uo(rO([Ip(1),Ip(2),Ip(3),Ip(4)])).optional(),text:Ht}),Text:at({text:Ht,muted:Ep.optional()}),Icon:at({name:Ht,size:xi.optional()}),Chart:at({kind:Uo(Ap(["bar","line","area","pie"])),data:Uo(ps(LW(un(),Ah()))),xKey:Ht.optional(),series:ps(at({key:un(),label:un().optional()})).optional()}),Table:at({columns:ps(at({key:un(),label:un()})),rows:Uo(ps(LW(un(),Ah())))}),Metric:at({label:Ht,value:Uo(rO([un(),nee()]))}),CodeBlock:at({code:Ht,language:Ht.optional()}),Markdown:at({content:Ht}),Button:at({label:Ht,variant:Uo(Ap(["default","destructive","outline","secondary","ghost","link"])).optional(),onClick:Mi.optional(),disabled:Ep.optional()}),Input:at({value:Ht.optional(),placeholder:Ht.optional(),onChange:Mi.optional()}),Checkbox:at({checked:Ep.optional(),onChange:Mi.optional(),label:Ht.optional()}),Switch:at({checked:Ep.optional(),onChange:Mi.optional()}),Select:at({value:Ht.optional(),items:ps(at({value:un(),label:un()})),onChange:Mi.optional()}),Textarea:at({value:Ht.optional(),placeholder:Ht.optional(),rows:xi.optional(),onChange:Mi.optional()}),Slider:at({value:xi.optional(),min:xi.optional(),max:xi.optional(),step:xi.optional(),onChange:Mi.optional()})},ree=Object.keys(oee);Object.fromEntries(ree.map(e=>[e,{props:oee[e],description:e}]));function NW(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Gr(...e){return t=>{let n=!1;const o=e.map(r=>{const i=NW(r,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let r=0;r<o.length;r++){const i=o[r];typeof i=="function"?i():NW(e[r],null)}}}}function yt(...e){return m.useCallback(Gr(...e),e)}var KOe=Symbol.for("react.lazy"),lz=FO[" use ".trim().toString()];function XOe(e){return typeof e=="object"&&e!==null&&"then"in e}function iee(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===KOe&&"_payload"in e&&XOe(e._payload)}function ZOe(e){const t=QOe(e),n=m.forwardRef((o,r)=>{let{children:i,...a}=o;iee(i)&&typeof lz=="function"&&(i=lz(i._payload));const s=m.Children.toArray(i),c=s.find(eFe);if(c){const l=c.props.children,h=s.map(u=>u===c?m.Children.count(l)>1?m.Children.only(null):m.isValidElement(l)?l.props.children:null:u);return f.jsx(t,{...a,ref:r,children:m.isValidElement(l)?m.cloneElement(l,void 0,h):null})}return f.jsx(t,{...a,ref:r,children:i})});return n.displayName=`${e}.Slot`,n}var YOe=ZOe("Slot");function QOe(e){const t=m.forwardRef((n,o)=>{let{children:r,...i}=n;if(iee(r)&&typeof lz=="function"&&(r=lz(r._payload)),m.isValidElement(r)){const a=nFe(r),s=tFe(i,r.props);return r.type!==m.Fragment&&(s.ref=o?Gr(o,a):a),m.cloneElement(r,s)}return m.Children.count(r)>1?m.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var JOe=Symbol("radix.slottable");function eFe(e){return m.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===JOe}function tFe(e,t){const n={...t};for(const o in t){const r=e[o],i=t[o];/^on[A-Z]/.test(o)?r&&i?n[o]=(...s)=>{const c=i(...s);return r(...s),c}:r&&(n[o]=r):o==="style"?n[o]={...r,...i}:o==="className"&&(n[o]=[r,i].filter(Boolean).join(" "))}return{...e,...n}}function nFe(e){var o,r;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(r=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const IW=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,AW=GY,aee=(e,t)=>n=>{var o;if((t==null?void 0:t.variants)==null)return AW(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:r,defaultVariants:i}=t,a=Object.keys(r).map(l=>{const h=n==null?void 0:n[l],u=i==null?void 0:i[l];if(h===null)return null;const p=IW(h)||IW(u);return r[l][p]}),s=n&&Object.entries(n).reduce((l,h)=>{let[u,p]=h;return p===void 0||(l[u]=p),l},{}),c=t==null||(o=t.compoundVariants)===null||o===void 0?void 0:o.reduce((l,h)=>{let{class:u,className:p,...y}=h;return Object.entries(y).every(g=>{let[k,x]=g;return Array.isArray(x)?x.includes({...i,...s}[k]):{...i,...s}[k]===x})?[...l,u,p]:l},[]);return AW(e,a,c,n==null?void 0:n.class,n==null?void 0:n.className)},oFe=aee("sf:inline-flex sf:items-center sf:justify-center sf:whitespace-nowrap sf:rounded-md sf:text-sm sf:font-medium sf:ring-offset-background sf:transition-colors sf:focus-visible:outline-hidden sf:focus-visible:ring-2 sf:focus-visible:ring-ring sf:focus-visible:ring-offset-2 sf:disabled:pointer-events-none sf:disabled:opacity-50",{variants:{variant:{default:"sf:bg-primary sf:text-primary-foreground sf:font-semibold sf:hover:bg-emerald-400",destructive:"sf:bg-destructive sf:text-destructive-foreground sf:hover:bg-destructive/90",outline:"sf:border sf:border-input sf:bg-background sf:hover:bg-secondary sf:hover:text-foreground",secondary:"sf:bg-secondary sf:text-secondary-foreground sf:hover:bg-secondary/80",ghost:"sf:text-muted-foreground sf:hover:bg-muted sf:hover:text-foreground",link:"sf:text-primary sf:underline-offset-4 sf:hover:underline"},size:{default:"sf:h-9 sf:px-4 sf:py-2",sm:"sf:h-8 sf:rounded-md sf:px-3",lg:"sf:h-11 sf:rounded-md sf:px-8",icon:"sf:h-9 sf:w-9"}},defaultVariants:{variant:"default",size:"default"}}),rt=m.forwardRef(({className:e,variant:t,size:n,asChild:o=!1,...r},i)=>{const a=o?YOe:"button";return f.jsx(a,{className:te(oFe({variant:t,size:n,className:e})),ref:i,...r})});rt.displayName="Button";function see(e,[t,n]){return Math.min(n,Math.max(t,e))}function Ce(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e==null||e(r),n===!1||!r.defaultPrevented)return t==null?void 0:t(r)}}function rFe(e,t){const n=m.createContext(t),o=i=>{const{children:a,...s}=i,c=m.useMemo(()=>s,Object.values(s));return f.jsx(n.Provider,{value:c,children:a})};o.displayName=e+"Provider";function r(i){const a=m.useContext(n);if(a)return a;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return[o,r]}function cr(e,t=[]){let n=[];function o(i,a){const s=m.createContext(a),c=n.length;n=[...n,a];const l=u=>{var v;const{scope:p,children:y,...g}=u,k=((v=p==null?void 0:p[e])==null?void 0:v[c])||s,x=m.useMemo(()=>g,Object.values(g));return f.jsx(k.Provider,{value:x,children:y})};l.displayName=i+"Provider";function h(u,p){var k;const y=((k=p==null?void 0:p[e])==null?void 0:k[c])||s,g=m.useContext(y);if(g)return g;if(a!==void 0)return a;throw new Error(`\`${u}\` must be used within \`${i}\``)}return[l,h]}const r=()=>{const i=n.map(a=>m.createContext(a));return function(s){const c=(s==null?void 0:s[e])||i;return m.useMemo(()=>({[`__scope${e}`]:{...s,[e]:c}}),[s,c])}};return r.scopeName=e,[o,iFe(r,...t)]}function iFe(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const o=e.map(r=>({useScope:r(),scopeName:r.scopeName}));return function(i){const a=o.reduce((s,{useScope:c,scopeName:l})=>{const u=c(i)[`__scope${l}`];return{...s,...u}},{});return m.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}var qa=globalThis!=null&&globalThis.document?m.useLayoutEffect:()=>{},aFe=FO[" useInsertionEffect ".trim().toString()]||qa;function Yd({prop:e,defaultProp:t,onChange:n=()=>{},caller:o}){const[r,i,a]=sFe({defaultProp:t,onChange:n}),s=e!==void 0,c=s?e:r;{const h=m.useRef(e!==void 0);m.useEffect(()=>{const u=h.current;u!==s&&console.warn(`${o} is changing from ${u?"controlled":"uncontrolled"} to ${s?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),h.current=s},[s,o])}const l=m.useCallback(h=>{var u;if(s){const p=cFe(h)?h(e):h;p!==e&&((u=a.current)==null||u.call(a,p))}else i(h)},[s,e,i,a]);return[c,l]}function sFe({defaultProp:e,onChange:t}){const[n,o]=m.useState(e),r=m.useRef(n),i=m.useRef(t);return aFe(()=>{i.current=t},[t]),m.useEffect(()=>{var a;r.current!==n&&((a=i.current)==null||a.call(i,n),r.current=n)},[n,r]),[n,o,i]}function cFe(e){return typeof e=="function"}var lFe=m.createContext(void 0);function uR(e){const t=m.useContext(lFe);return e||t||"ltr"}function dFe(e){const t=m.useRef({value:e,previous:e});return m.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function cee(e){const[t,n]=m.useState(void 0);return qa(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const o=new ResizeObserver(r=>{if(!Array.isArray(r)||!r.length)return;const i=r[0];let a,s;if("borderBoxSize"in i){const c=i.borderBoxSize,l=Array.isArray(c)?c[0]:c;a=l.inlineSize,s=l.blockSize}else a=e.offsetWidth,s=e.offsetHeight;n({width:a,height:s})});return o.observe(e,{box:"border-box"}),()=>o.unobserve(e)}else n(void 0)},[e]),t}function F0(e){const t=uFe(e),n=m.forwardRef((o,r)=>{const{children:i,...a}=o,s=m.Children.toArray(i),c=s.find(fFe);if(c){const l=c.props.children,h=s.map(u=>u===c?m.Children.count(l)>1?m.Children.only(null):m.isValidElement(l)?l.props.children:null:u);return f.jsx(t,{...a,ref:r,children:m.isValidElement(l)?m.cloneElement(l,void 0,h):null})}return f.jsx(t,{...a,ref:r,children:i})});return n.displayName=`${e}.Slot`,n}function uFe(e){const t=m.forwardRef((n,o)=>{const{children:r,...i}=n;if(m.isValidElement(r)){const a=yFe(r),s=pFe(i,r.props);return r.type!==m.Fragment&&(s.ref=o?Gr(o,a):a),m.cloneElement(r,s)}return m.Children.count(r)>1?m.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var lee=Symbol("radix.slottable");function hFe(e){const t=({children:n})=>f.jsx(f.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=lee,t}function fFe(e){return m.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===lee}function pFe(e,t){const n={...t};for(const o in t){const r=e[o],i=t[o];/^on[A-Z]/.test(o)?r&&i?n[o]=(...s)=>{const c=i(...s);return r(...s),c}:r&&(n[o]=r):o==="style"?n[o]={...r,...i}:o==="className"&&(n[o]=[r,i].filter(Boolean).join(" "))}return{...e,...n}}function yFe(e){var o,r;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(r=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var mFe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ve=mFe.reduce((e,t)=>{const n=F0(`Primitive.${t}`),o=m.forwardRef((r,i)=>{const{asChild:a,...s}=r,c=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),f.jsx(c,{...s,ref:i})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{});function dee(e,t){e&&Kd.flushSync(()=>e.dispatchEvent(t))}function oq(e){const t=e+"CollectionProvider",[n,o]=cr(t),[r,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=k=>{const{scope:x,children:v}=k,M=Er.useRef(null),w=Er.useRef(new Map).current;return f.jsx(r,{scope:x,itemMap:w,collectionRef:M,children:v})};a.displayName=t;const s=e+"CollectionSlot",c=F0(s),l=Er.forwardRef((k,x)=>{const{scope:v,children:M}=k,w=i(s,v),b=yt(x,w.collectionRef);return f.jsx(c,{ref:b,children:M})});l.displayName=s;const h=e+"CollectionItemSlot",u="data-radix-collection-item",p=F0(h),y=Er.forwardRef((k,x)=>{const{scope:v,children:M,...w}=k,b=Er.useRef(null),C=yt(x,b),_=i(h,v);return Er.useEffect(()=>(_.itemMap.set(b,{ref:b,...w}),()=>void _.itemMap.delete(b))),f.jsx(p,{[u]:"",ref:C,children:M})});y.displayName=h;function g(k){const x=i(e+"CollectionConsumer",k);return Er.useCallback(()=>{const M=x.collectionRef.current;if(!M)return[];const w=Array.from(M.querySelectorAll(`[${u}]`));return Array.from(x.itemMap.values()).sort((_,S)=>w.indexOf(_.ref.current)-w.indexOf(S.ref.current))},[x.collectionRef,x.itemMap])}return[{Provider:a,Slot:l,ItemSlot:y},g,o]}var uee=["PageUp","PageDown"],hee=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],fee={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},Q0="Slider",[iO,gFe,kFe]=oq(Q0),[pee]=cr(Q0,[kFe]),[vFe,hR]=pee(Q0),yee=m.forwardRef((e,t)=>{const{name:n,min:o=0,max:r=100,step:i=1,orientation:a="horizontal",disabled:s=!1,minStepsBetweenThumbs:c=0,defaultValue:l=[o],value:h,onValueChange:u=()=>{},onValueCommit:p=()=>{},inverted:y=!1,form:g,...k}=e,x=m.useRef(new Set),v=m.useRef(0),w=a==="horizontal"?xFe:wFe,[b=[],C]=Yd({prop:h,defaultProp:l,onChange:E=>{var U;(U=[...x.current][v.current])==null||U.focus(),u(E)}}),_=m.useRef(b);function S(E){const z=SFe(b,E);A(E,z)}function N(E){A(E,v.current)}function P(){const E=_.current[v.current];b[v.current]!==E&&p(b)}function A(E,z,{commit:U}={commit:!1}){const $=AFe(i),T=EFe(Math.round((E-o)/i)*i+o,$),D=see(T,[o,r]);C((O=[])=>{const I=_Fe(O,D,z);if(IFe(I,c*i)){v.current=I.indexOf(D);const R=String(I)!==String(O);return R&&U&&p(I),R?I:O}else return O})}return f.jsx(vFe,{scope:e.__scopeSlider,name:n,disabled:s,min:o,max:r,valueIndexToChangeRef:v,thumbs:x.current,values:b,orientation:a,form:g,children:f.jsx(iO.Provider,{scope:e.__scopeSlider,children:f.jsx(iO.Slot,{scope:e.__scopeSlider,children:f.jsx(w,{"aria-disabled":s,"data-disabled":s?"":void 0,...k,ref:t,onPointerDown:Ce(k.onPointerDown,()=>{s||(_.current=b)}),min:o,max:r,inverted:y,onSlideStart:s?void 0:S,onSlideMove:s?void 0:N,onSlideEnd:s?void 0:P,onHomeKeyDown:()=>!s&&A(o,0,{commit:!0}),onEndKeyDown:()=>!s&&A(r,b.length-1,{commit:!0}),onStepKeyDown:({event:E,direction:z})=>{if(!s){const T=uee.includes(E.key)||E.shiftKey&&hee.includes(E.key)?10:1,D=v.current,O=b[D],I=i*T*z;A(O+I,D,{commit:!0})}}})})})})});yee.displayName=Q0;var[mee,gee]=pee(Q0,{startEdge:"left",endEdge:"right",size:"width",direction:1}),xFe=m.forwardRef((e,t)=>{const{min:n,max:o,dir:r,inverted:i,onSlideStart:a,onSlideMove:s,onSlideEnd:c,onStepKeyDown:l,...h}=e,[u,p]=m.useState(null),y=yt(t,w=>p(w)),g=m.useRef(void 0),k=uR(r),x=k==="ltr",v=x&&!i||!x&&i;function M(w){const b=g.current||u.getBoundingClientRect(),C=[0,b.width],S=rq(C,v?[n,o]:[o,n]);return g.current=b,S(w-b.left)}return f.jsx(mee,{scope:e.__scopeSlider,startEdge:v?"left":"right",endEdge:v?"right":"left",direction:v?1:-1,size:"width",children:f.jsx(kee,{dir:k,"data-orientation":"horizontal",...h,ref:y,style:{...h.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:w=>{const b=M(w.clientX);a==null||a(b)},onSlideMove:w=>{const b=M(w.clientX);s==null||s(b)},onSlideEnd:()=>{g.current=void 0,c==null||c()},onStepKeyDown:w=>{const C=fee[v?"from-left":"from-right"].includes(w.key);l==null||l({event:w,direction:C?-1:1})}})})}),wFe=m.forwardRef((e,t)=>{const{min:n,max:o,inverted:r,onSlideStart:i,onSlideMove:a,onSlideEnd:s,onStepKeyDown:c,...l}=e,h=m.useRef(null),u=yt(t,h),p=m.useRef(void 0),y=!r;function g(k){const x=p.current||h.current.getBoundingClientRect(),v=[0,x.height],w=rq(v,y?[o,n]:[n,o]);return p.current=x,w(k-x.top)}return f.jsx(mee,{scope:e.__scopeSlider,startEdge:y?"bottom":"top",endEdge:y?"top":"bottom",size:"height",direction:y?1:-1,children:f.jsx(kee,{"data-orientation":"vertical",...l,ref:u,style:{...l.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:k=>{const x=g(k.clientY);i==null||i(x)},onSlideMove:k=>{const x=g(k.clientY);a==null||a(x)},onSlideEnd:()=>{p.current=void 0,s==null||s()},onStepKeyDown:k=>{const v=fee[y?"from-bottom":"from-top"].includes(k.key);c==null||c({event:k,direction:v?-1:1})}})})}),kee=m.forwardRef((e,t)=>{const{__scopeSlider:n,onSlideStart:o,onSlideMove:r,onSlideEnd:i,onHomeKeyDown:a,onEndKeyDown:s,onStepKeyDown:c,...l}=e,h=hR(Q0,n);return f.jsx(Ve.span,{...l,ref:t,onKeyDown:Ce(e.onKeyDown,u=>{u.key==="Home"?(a(u),u.preventDefault()):u.key==="End"?(s(u),u.preventDefault()):uee.concat(hee).includes(u.key)&&(c(u),u.preventDefault())}),onPointerDown:Ce(e.onPointerDown,u=>{const p=u.target;p.setPointerCapture(u.pointerId),u.preventDefault(),h.thumbs.has(p)?p.focus():o(u)}),onPointerMove:Ce(e.onPointerMove,u=>{u.target.hasPointerCapture(u.pointerId)&&r(u)}),onPointerUp:Ce(e.onPointerUp,u=>{const p=u.target;p.hasPointerCapture(u.pointerId)&&(p.releasePointerCapture(u.pointerId),i(u))})})}),vee="SliderTrack",xee=m.forwardRef((e,t)=>{const{__scopeSlider:n,...o}=e,r=hR(vee,n);return f.jsx(Ve.span,{"data-disabled":r.disabled?"":void 0,"data-orientation":r.orientation,...o,ref:t})});xee.displayName=vee;var aO="SliderRange",wee=m.forwardRef((e,t)=>{const{__scopeSlider:n,...o}=e,r=hR(aO,n),i=gee(aO,n),a=m.useRef(null),s=yt(t,a),c=r.values.length,l=r.values.map(p=>_ee(p,r.min,r.max)),h=c>1?Math.min(...l):0,u=100-Math.max(...l);return f.jsx(Ve.span,{"data-orientation":r.orientation,"data-disabled":r.disabled?"":void 0,...o,ref:s,style:{...e.style,[i.startEdge]:h+"%",[i.endEdge]:u+"%"}})});wee.displayName=aO;var sO="SliderThumb",Mee=m.forwardRef((e,t)=>{const n=gFe(e.__scopeSlider),[o,r]=m.useState(null),i=yt(t,s=>r(s)),a=m.useMemo(()=>o?n().findIndex(s=>s.ref.current===o):-1,[n,o]);return f.jsx(MFe,{...e,ref:i,index:a})}),MFe=m.forwardRef((e,t)=>{const{__scopeSlider:n,index:o,name:r,...i}=e,a=hR(sO,n),s=gee(sO,n),[c,l]=m.useState(null),h=yt(t,M=>l(M)),u=c?a.form||!!c.closest("form"):!0,p=cee(c),y=a.values[o],g=y===void 0?0:_ee(y,a.min,a.max),k=CFe(o,a.values.length),x=p==null?void 0:p[s.size],v=x?LFe(x,g,s.direction):0;return m.useEffect(()=>{if(c)return a.thumbs.add(c),()=>{a.thumbs.delete(c)}},[c,a.thumbs]),f.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[s.startEdge]:`calc(${g}% + ${v}px)`},children:[f.jsx(iO.ItemSlot,{scope:e.__scopeSlider,children:f.jsx(Ve.span,{role:"slider","aria-label":e["aria-label"]||k,"aria-valuemin":a.min,"aria-valuenow":y,"aria-valuemax":a.max,"aria-orientation":a.orientation,"data-orientation":a.orientation,"data-disabled":a.disabled?"":void 0,tabIndex:a.disabled?void 0:0,...i,ref:h,style:y===void 0?{display:"none"}:e.style,onFocus:Ce(e.onFocus,()=>{a.valueIndexToChangeRef.current=o})})}),u&&f.jsx(bee,{name:r??(a.name?a.name+(a.values.length>1?"[]":""):void 0),form:a.form,value:y},o)]})});Mee.displayName=sO;var bFe="RadioBubbleInput",bee=m.forwardRef(({__scopeSlider:e,value:t,...n},o)=>{const r=m.useRef(null),i=yt(r,o),a=dFe(t);return m.useEffect(()=>{const s=r.current;if(!s)return;const c=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(c,"value").set;if(a!==t&&h){const u=new Event("input",{bubbles:!0});h.call(s,t),s.dispatchEvent(u)}},[a,t]),f.jsx(Ve.input,{style:{display:"none"},...n,ref:i,defaultValue:t})});bee.displayName=bFe;function _Fe(e=[],t,n){const o=[...e];return o[n]=t,o.sort((r,i)=>r-i)}function _ee(e,t,n){const i=100/(n-t)*(e-t);return see(i,[0,100])}function CFe(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function SFe(e,t){if(e.length===1)return 0;const n=e.map(r=>Math.abs(r-t)),o=Math.min(...n);return n.indexOf(o)}function LFe(e,t,n){const o=e/2,i=rq([0,50],[0,o]);return(o-i(t)*n)*n}function NFe(e){return e.slice(0,-1).map((t,n)=>e[n+1]-t)}function IFe(e,t){if(t>0){const n=NFe(e);return Math.min(...n)>=t}return!0}function rq(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const o=(t[1]-t[0])/(e[1]-e[0]);return t[0]+o*(n-e[0])}}function AFe(e){return(String(e).split(".")[1]||"").length}function EFe(e,t){const n=Math.pow(10,t);return Math.round(e*n)/n}var Cee=yee,jFe=xee,$Fe=wee,PFe=Mee;const iq=m.forwardRef(({className:e,...t},n)=>f.jsxs(Cee,{ref:n,className:te("sf:relative sf:flex sf:w-full sf:touch-none sf:select-none sf:items-center",e),...t,children:[f.jsx(jFe,{className:"sf:relative sf:h-1.5 sf:w-full sf:grow sf:overflow-hidden sf:rounded-full sf:bg-secondary",children:f.jsx($Fe,{className:"sf:absolute sf:h-full sf:bg-primary"})}),f.jsx(PFe,{className:"sf:block sf:h-4 sf:w-4 sf:rounded-full sf:border sf:border-primary/60 sf:bg-background sf:shadow-sm sf:transition-colors sf:hover:border-primary sf:focus-visible:outline-hidden sf:focus-visible:ring-2 sf:focus-visible:ring-ring sf:disabled:pointer-events-none sf:disabled:opacity-50"})]}));iq.displayName=Cee.displayName;const zFe={1:"sf:text-2xl sf:font-semibold sf:tracking-tight",2:"sf:text-xl sf:font-semibold sf:tracking-tight",3:"sf:text-lg sf:font-semibold",4:"sf:text-base sf:font-semibold"};function RFe({text:e,level:t=2}){const n=`h${t}`;return f.jsx(n,{className:te(zFe[t]),children:e})}const See=m.createContext({custom:{}});function TFe({value:e,children:t}){return f.jsx(See.Provider,{value:e,children:t})}function DFe(){return m.useContext(See)}function q0({name:e,as:t,size:n=16,fallback:o=ZAe,...r}){const i=DFe(),a=t??(e?i.custom[e]:void 0)??(e?Qh[e]:void 0)??Qh[o];return a?f.jsx(a,{size:n,...r}):null}function HFe({name:e,size:t=16}){return f.jsx(q0,{name:e,size:t,"aria-hidden":!0})}function OFe(e){return e==null?"":typeof e=="string"||typeof e=="number"?e:typeof e=="object"?JSON.stringify(e):String(e)}function FFe({label:e,value:t}){return f.jsxs("div",{className:"sf:flex sf:flex-col sf:gap-1",children:[f.jsx("span",{className:"sf:text-muted-foreground sf:text-xs sf:uppercase sf:tracking-wide",children:e}),f.jsx("span",{className:"sf:font-semibold sf:text-2xl sf:tabular-nums",children:OFe(t)})]})}function qFe(e){return e==null?"":typeof e=="string"||typeof e=="number"?String(e):JSON.stringify(e)}function VFe({columns:e=[],rows:t=[]}){return f.jsx("div",{className:"sf:w-full sf:overflow-x-auto",children:f.jsxs("table",{className:"sf:w-full sf:text-left sf:text-sm",children:[f.jsx("thead",{className:"sf:border-b sf:bg-muted/50",children:f.jsx("tr",{children:e.map(n=>f.jsx("th",{scope:"col",className:"sf:px-3 sf:py-2 sf:font-medium sf:text-muted-foreground",children:n.label},n.key))})}),f.jsx("tbody",{children:t.map((n,o)=>f.jsx("tr",{className:"sf:border-b last:sf:border-0",children:e.map(r=>f.jsx("td",{className:"sf:px-3 sf:py-2",children:qFe(n[r.key])},r.key))},o))})]})})}function BFe({text:e,muted:t}){return f.jsx("p",{className:te("sf:text-sm",t&&"sf:text-muted-foreground"),children:e})}function UFe({title:e,children:t}){return f.jsxs("div",{className:"sf:bg-card sf:p-4 sf:text-card-foreground sf:shadow-sm",children:[e!==void 0?f.jsx("div",{className:"sf:mb-3 sf:font-semibold sf:text-base sf:leading-tight",children:e}):null,f.jsx("div",{className:"sf:flex sf:flex-col sf:gap-3",children:t})]})}function WFe({orientation:e="horizontal"}){return f.jsx("div",{"aria-orientation":e,className:te("sf:bg-border",e==="horizontal"?"sf:h-px sf:w-full":"sf:h-full sf:w-px")})}function GFe({value:e,items:t,onChange:n,children:o}){const r=t??[];return f.jsxs("div",{className:"sf:flex sf:flex-col sf:gap-2",children:[f.jsx("div",{className:"sf:inline-flex sf:h-9 sf:items-center sf:justify-start sf:rounded-md sf:bg-muted sf:p-1 sf:text-muted-foreground",children:r.map(i=>f.jsx("button",{type:"button","data-state":e===i.id?"active":"inactive",onClick:()=>n==null?void 0:n({value:i.id}),className:"sf:inline-flex sf:items-center sf:justify-center sf:whitespace-nowrap sf:rounded-sm sf:px-3 sf:py-1 sf:text-xs sf:font-medium sf:transition-all sf:data-[state=active]:bg-background sf:data-[state=active]:text-foreground sf:data-[state=active]:shadow-sm",children:i.label},i.id))}),o]})}function KFe({items:e}){const t=e??[];return f.jsx("div",{className:"sf:flex sf:flex-col sf:divide-y sf:rounded-md sf:border",children:t.map(n=>f.jsxs("details",{className:"sf:group sf:px-3 sf:py-2",children:[f.jsx("summary",{className:"sf:cursor-pointer sf:py-1 sf:font-medium sf:text-sm",children:n.title}),f.jsx("div",{className:"sf:py-2 sf:text-muted-foreground sf:text-sm",children:n.content})]},n.id))})}const EW={default:"sf:bg-primary sf:text-primary-foreground",secondary:"sf:bg-secondary sf:text-secondary-foreground",destructive:"sf:bg-destructive sf:text-destructive-foreground",outline:"sf:border sf:border-border sf:text-foreground"};function XFe({label:e,variant:t="default"}){return f.jsx("span",{className:te("sf:inline-flex sf:items-center sf:rounded-full sf:px-2.5 sf:py-0.5 sf:font-medium sf:text-xs",EW[t]??EW.default),children:e})}function ZFe({src:e,alt:t,fallback:n}){return e?f.jsx("img",{src:e,alt:t??"",className:"sf:inline-block sf:h-9 sf:w-9 sf:rounded-full sf:object-cover"}):f.jsx("span",{className:"sf:inline-flex sf:h-9 sf:w-9 sf:items-center sf:justify-center sf:rounded-full sf:bg-muted sf:font-medium sf:text-muted-foreground sf:text-sm",children:n??"?"})}function YFe({value:e=0}){const t=Math.max(0,Math.min(100,e));return f.jsx("div",{"aria-valuenow":t,"aria-valuemin":0,"aria-valuemax":100,className:"sf:relative sf:h-2 sf:w-full sf:overflow-hidden sf:rounded-full sf:bg-secondary",children:f.jsx("div",{className:"sf:h-full sf:bg-primary sf:transition-all",style:{width:`${t}%`}})})}function QFe({width:e,height:t}){return f.jsx("div",{className:"sf:animate-pulse sf:rounded-md sf:bg-muted",style:{width:e??"100%",height:t??16}})}function JFe({text:e}){return f.jsx("span",{className:"sf:font-medium sf:text-sm sf:leading-none",children:e})}function eqe({label:e,variant:t="default",onClick:n,disabled:o}){return f.jsx(rt,{variant:t,disabled:o,onClick:()=>n==null?void 0:n(),children:e})}const aq="sf:flex sf:h-9 sf:w-full sf:rounded-md sf:border sf:border-input sf:bg-background sf:px-3 sf:py-1 sf:text-sm sf:shadow-sm sf:transition-colors sf:placeholder:text-muted-foreground sf:focus-visible:outline-hidden sf:focus-visible:ring-1 sf:focus-visible:ring-ring sf:disabled:cursor-not-allowed sf:disabled:opacity-50";function tqe({value:e,placeholder:t,onChange:n}){return f.jsx("input",{type:"text",value:e??"",placeholder:t,onChange:o=>n==null?void 0:n({value:o.target.value}),className:aq})}function nqe({checked:e,onChange:t,label:n}){return f.jsxs("label",{className:"sf:inline-flex sf:items-center sf:gap-2 sf:text-sm",children:[f.jsx("input",{type:"checkbox",checked:e??!1,onChange:o=>t==null?void 0:t({checked:o.target.checked}),className:"sf:h-4 sf:w-4 sf:rounded sf:border sf:border-input sf:accent-primary"}),n]})}function oqe({checked:e,onChange:t}){return f.jsx("button",{type:"button",role:"switch","aria-checked":e??!1,onClick:()=>t==null?void 0:t({checked:!(e??!1)}),className:te("sf:relative sf:inline-flex sf:h-5 sf:w-9 sf:shrink-0 sf:cursor-pointer sf:items-center sf:rounded-full sf:border-2 sf:border-transparent sf:transition-colors",e?"sf:bg-primary":"sf:bg-input"),children:f.jsx("span",{className:te("sf:pointer-events-none sf:block sf:h-4 sf:w-4 sf:rounded-full sf:bg-background sf:shadow-lg sf:ring-0 sf:transition-transform",e?"sf:translate-x-4":"sf:translate-x-0")})})}function rqe({value:e,items:t,onChange:n}){return f.jsx("select",{value:e??"",onChange:o=>n==null?void 0:n({value:o.target.value}),className:aq,children:(t??[]).map(o=>f.jsx("option",{value:o.value,children:o.label},o.value))})}function iqe({value:e,placeholder:t,rows:n,onChange:o}){return f.jsx("textarea",{value:e??"",placeholder:t,rows:n,onChange:r=>o==null?void 0:o({value:r.target.value}),className:te(aq,"sf:min-h-16 sf:py-2")})}function aqe({value:e,min:t=0,max:n=100,step:o=1,onChange:r}){return f.jsx(iq,{value:e===void 0?void 0:[e],min:t,max:n,step:o,onValueChange:i=>{const[a]=i;typeof a=="number"&&(r==null||r({value:a}))}})}const sqe=m.lazy(()=>Z0(()=>import("./chart-9kjHxc0V.js"),__vite__mapDeps([0,1,2,3,4,5,6,7])));function cqe(e){return f.jsx(m.Suspense,{fallback:null,children:f.jsx(sqe,{...e})})}const lqe=m.lazy(()=>Z0(()=>import("./markdown-BXIhHJY7.js"),[]));function dqe(e){return f.jsx(m.Suspense,{fallback:null,children:f.jsx(lqe,{...e})})}const uqe=m.lazy(()=>Z0(()=>import("./code-block-CTINSk3z.js"),[]));function hqe(e){return f.jsx(m.Suspense,{fallback:null,children:f.jsx(uqe,{...e})})}const Lee={Card:UFe,Separator:WFe,Tabs:GFe,Accordion:KFe,Badge:XFe,Avatar:ZFe,Progress:YFe,Skeleton:QFe,Label:JFe,Heading:RFe,Text:BFe,Icon:HFe,Chart:cqe,Table:VFe,Metric:FFe,CodeBlock:hqe,Markdown:dqe,Button:eqe,Input:tqe,Checkbox:nqe,Switch:oqe,Select:rqe,Textarea:iqe,Slider:aqe},jW=ree.filter(e=>Lee[e]===void 0);if(jW.length>0)throw new Error(`componentRegistry is missing impls for: ${jW.join(", ")}. Every catalog entry in COMPONENT_NAMES must have a matching component impl.`);const fqe={components:Lee};function pqe(e,t){return t.kind==="set"?{...e,[t.path]:t.value}:{...e,...t.partial}}function Nee(e){return e===null||typeof e!="object"?!1:"$state"in e||"$action"in e||"$param"in e||"$cond"in e}function dP(e,t,n,o){if(!Nee(e))return e;if(typeof e.$state=="string")return t[e.$state];if(typeof e.$action=="string"){const r=e.$action;return o.has(r)?i=>n(r,i):void 0}if("$cond"in e){const r=dP(e.$cond,t,n,o);return dP(r?e.$then:e.$else,t,n,o)}return e}function yqe(e,t,n,o){if(!e)return{};const r={};for(const[i,a]of Object.entries(e))r[i]=dP(a,t,n,o);return r}function $W({spec:e,nodeId:t,apiBaseUrl:n="/api",projectSlug:o,flowSlug:r}){const[i,a]=m.useReducer(pqe,e.state??{}),s=new Set(Object.keys(e.actions??{})),c=m.useCallback(async(l,h)=>{var y;const u=(y=e.actions)==null?void 0:y[l];if(!u)return;if(u.kind==="set"){const g=mqe(u.value,h,i);a({kind:"set",path:u.path,value:g});return}if(!o||!r)return;const p=`${n}/projects/${encodeURIComponent(o)}/flows/${encodeURIComponent(r)}/nodes/${encodeURIComponent(t)}/actions/${encodeURIComponent(l)}`;try{const g=await fetch(p,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(h??{})});if(!g.ok){const x=await g.text();a({kind:"set",path:`/__errors/${l}`,value:x});return}const k=await g.json();k!==null&&typeof k=="object"&&a({kind:"merge",partial:k})}catch(g){a({kind:"set",path:`/__errors/${l}`,value:g instanceof Error?g.message:String(g)})}},[e.actions,o,r,n,t,i]);return Iee(e.root,e,i,c,s)}function mqe(e,t,n){return Nee(e)?typeof e.$param=="string"?t!==null&&typeof t=="object"?t[e.$param]:void 0:typeof e.$state=="string"?n[e.$state]:e:e}function Iee(e,t,n,o,r){const i=t.elements[e];if(!i)return null;const a=fqe.components[i.type];if(!a)return null;const s=yqe(i.props,n,o,r),l=(i.children??[]).map(h=>f.jsx(gqe,{children:Iee(h,t,n,o,r)},h));return f.jsx(a,{...s,children:l.length>0?l:void 0})}function gqe({children:e}){return e}function Kr(e){const t=m.useRef(e);return m.useEffect(()=>{t.current=e}),m.useMemo(()=>(...n)=>{var o;return(o=t.current)==null?void 0:o.call(t,...n)},[])}function kqe(e,t=globalThis==null?void 0:globalThis.document){const n=Kr(e);m.useEffect(()=>{const o=r=>{r.key==="Escape"&&n(r)};return t.addEventListener("keydown",o,{capture:!0}),()=>t.removeEventListener("keydown",o,{capture:!0})},[n,t])}var vqe="DismissableLayer",cO="dismissableLayer.update",xqe="dismissableLayer.pointerDownOutside",wqe="dismissableLayer.focusOutside",PW,Aee=m.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),jf=m.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:o,onPointerDownOutside:r,onFocusOutside:i,onInteractOutside:a,onDismiss:s,...c}=e,l=m.useContext(Aee),[h,u]=m.useState(null),p=(h==null?void 0:h.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,y]=m.useState({}),g=yt(t,S=>u(S)),k=Array.from(l.layers),[x]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),v=k.indexOf(x),M=h?k.indexOf(h):-1,w=l.layersWithOutsidePointerEventsDisabled.size>0,b=M>=v,C=_qe(S=>{const N=S.target,P=[...l.branches].some(A=>A.contains(N));!b||P||(r==null||r(S),a==null||a(S),S.defaultPrevented||s==null||s())},p),_=Cqe(S=>{const N=S.target;[...l.branches].some(A=>A.contains(N))||(i==null||i(S),a==null||a(S),S.defaultPrevented||s==null||s())},p);return kqe(S=>{M===l.layers.size-1&&(o==null||o(S),!S.defaultPrevented&&s&&(S.preventDefault(),s()))},p),m.useEffect(()=>{if(h)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(PW=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(h)),l.layers.add(h),zW(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=PW)}},[h,p,n,l]),m.useEffect(()=>()=>{h&&(l.layers.delete(h),l.layersWithOutsidePointerEventsDisabled.delete(h),zW())},[h,l]),m.useEffect(()=>{const S=()=>y({});return document.addEventListener(cO,S),()=>document.removeEventListener(cO,S)},[]),f.jsx(Ve.div,{...c,ref:g,style:{pointerEvents:w?b?"auto":"none":void 0,...e.style},onFocusCapture:Ce(e.onFocusCapture,_.onFocusCapture),onBlurCapture:Ce(e.onBlurCapture,_.onBlurCapture),onPointerDownCapture:Ce(e.onPointerDownCapture,C.onPointerDownCapture)})});jf.displayName=vqe;var Mqe="DismissableLayerBranch",bqe=m.forwardRef((e,t)=>{const n=m.useContext(Aee),o=m.useRef(null),r=yt(t,o);return m.useEffect(()=>{const i=o.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),f.jsx(Ve.div,{...e,ref:r})});bqe.displayName=Mqe;function _qe(e,t=globalThis==null?void 0:globalThis.document){const n=Kr(e),o=m.useRef(!1),r=m.useRef(()=>{});return m.useEffect(()=>{const i=s=>{if(s.target&&!o.current){let c=function(){Eee(xqe,n,l,{discrete:!0})};const l={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",r.current),r.current=c,t.addEventListener("click",r.current,{once:!0})):c()}else t.removeEventListener("click",r.current);o.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",i),t.removeEventListener("click",r.current)}},[t,n]),{onPointerDownCapture:()=>o.current=!0}}function Cqe(e,t=globalThis==null?void 0:globalThis.document){const n=Kr(e),o=m.useRef(!1);return m.useEffect(()=>{const r=i=>{i.target&&!o.current&&Eee(wqe,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",r),()=>t.removeEventListener("focusin",r)},[t,n]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function zW(){const e=new CustomEvent(cO);document.dispatchEvent(e)}function Eee(e,t,n,{discrete:o}){const r=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),o?dee(r,i):r.dispatchEvent(i)}var GT=0;function sq(){m.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??RW()),document.body.insertAdjacentElement("beforeend",e[1]??RW()),GT++,()=>{GT===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),GT--}},[])}function RW(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var KT="focusScope.autoFocusOnMount",XT="focusScope.autoFocusOnUnmount",TW={bubbles:!1,cancelable:!0},Sqe="FocusScope",fR=m.forwardRef((e,t)=>{const{loop:n=!1,trapped:o=!1,onMountAutoFocus:r,onUnmountAutoFocus:i,...a}=e,[s,c]=m.useState(null),l=Kr(r),h=Kr(i),u=m.useRef(null),p=yt(t,k=>c(k)),y=m.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;m.useEffect(()=>{if(o){let k=function(w){if(y.paused||!s)return;const b=w.target;s.contains(b)?u.current=b:la(u.current,{select:!0})},x=function(w){if(y.paused||!s)return;const b=w.relatedTarget;b!==null&&(s.contains(b)||la(u.current,{select:!0}))},v=function(w){if(document.activeElement===document.body)for(const C of w)C.removedNodes.length>0&&la(s)};document.addEventListener("focusin",k),document.addEventListener("focusout",x);const M=new MutationObserver(v);return s&&M.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",k),document.removeEventListener("focusout",x),M.disconnect()}}},[o,s,y.paused]),m.useEffect(()=>{if(s){HW.add(y);const k=document.activeElement;if(!s.contains(k)){const v=new CustomEvent(KT,TW);s.addEventListener(KT,l),s.dispatchEvent(v),v.defaultPrevented||(Lqe(jqe(jee(s)),{select:!0}),document.activeElement===k&&la(s))}return()=>{s.removeEventListener(KT,l),setTimeout(()=>{const v=new CustomEvent(XT,TW);s.addEventListener(XT,h),s.dispatchEvent(v),v.defaultPrevented||la(k??document.body,{select:!0}),s.removeEventListener(XT,h),HW.remove(y)},0)}}},[s,l,h,y]);const g=m.useCallback(k=>{if(!n&&!o||y.paused)return;const x=k.key==="Tab"&&!k.altKey&&!k.ctrlKey&&!k.metaKey,v=document.activeElement;if(x&&v){const M=k.currentTarget,[w,b]=Nqe(M);w&&b?!k.shiftKey&&v===b?(k.preventDefault(),n&&la(w,{select:!0})):k.shiftKey&&v===w&&(k.preventDefault(),n&&la(b,{select:!0})):v===M&&k.preventDefault()}},[n,o,y.paused]);return f.jsx(Ve.div,{tabIndex:-1,...a,ref:p,onKeyDown:g})});fR.displayName=Sqe;function Lqe(e,{select:t=!1}={}){const n=document.activeElement;for(const o of e)if(la(o,{select:t}),document.activeElement!==n)return}function Nqe(e){const t=jee(e),n=DW(t,e),o=DW(t.reverse(),e);return[n,o]}function jee(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const r=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||r?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function DW(e,t){for(const n of e)if(!Iqe(n,{upTo:t}))return n}function Iqe(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Aqe(e){return e instanceof HTMLInputElement&&"select"in e}function la(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Aqe(e)&&t&&e.select()}}var HW=Eqe();function Eqe(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=OW(e,t),e.unshift(t)},remove(t){var n;e=OW(e,t),(n=e[0])==null||n.resume()}}}function OW(e,t){const n=[...e],o=n.indexOf(t);return o!==-1&&n.splice(o,1),n}function jqe(e){return e.filter(t=>t.tagName!=="A")}var $qe=FO[" useId ".trim().toString()]||(()=>{}),Pqe=0;function jn(e){const[t,n]=m.useState($qe());return qa(()=>{n(o=>o??String(Pqe++))},[e]),e||(t?`radix-${t}`:"")}const zqe=["top","right","bottom","left"],Va=Math.min,io=Math.max,dz=Math.round,jp=Math.floor,Br=e=>({x:e,y:e}),Rqe={left:"right",right:"left",bottom:"top",top:"bottom"};function lO(e,t,n){return io(e,Va(t,n))}function Ti(e,t){return typeof e=="function"?e(t):e}function Di(e){return e.split("-")[0]}function J0(e){return e.split("-")[1]}function cq(e){return e==="x"?"y":"x"}function lq(e){return e==="y"?"height":"width"}function Dr(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function dq(e){return cq(Dr(e))}function Tqe(e,t,n){n===void 0&&(n=!1);const o=J0(e),r=dq(e),i=lq(r);let a=r==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=uz(a)),[a,uz(a)]}function Dqe(e){const t=uz(e);return[dO(e),t,dO(t)]}function dO(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const FW=["left","right"],qW=["right","left"],Hqe=["top","bottom"],Oqe=["bottom","top"];function Fqe(e,t,n){switch(e){case"top":case"bottom":return n?t?qW:FW:t?FW:qW;case"left":case"right":return t?Hqe:Oqe;default:return[]}}function qqe(e,t,n,o){const r=J0(e);let i=Fqe(Di(e),n==="start",o);return r&&(i=i.map(a=>a+"-"+r),t&&(i=i.concat(i.map(dO)))),i}function uz(e){const t=Di(e);return Rqe[t]+e.slice(t.length)}function Vqe(e){return{top:0,right:0,bottom:0,left:0,...e}}function $ee(e){return typeof e!="number"?Vqe(e):{top:e,right:e,bottom:e,left:e}}function hz(e){const{x:t,y:n,width:o,height:r}=e;return{width:o,height:r,top:n,left:t,right:t+o,bottom:n+r,x:t,y:n}}function VW(e,t,n){let{reference:o,floating:r}=e;const i=Dr(t),a=dq(t),s=lq(a),c=Di(t),l=i==="y",h=o.x+o.width/2-r.width/2,u=o.y+o.height/2-r.height/2,p=o[s]/2-r[s]/2;let y;switch(c){case"top":y={x:h,y:o.y-r.height};break;case"bottom":y={x:h,y:o.y+o.height};break;case"right":y={x:o.x+o.width,y:u};break;case"left":y={x:o.x-r.width,y:u};break;default:y={x:o.x,y:o.y}}switch(J0(t)){case"start":y[a]-=p*(n&&l?-1:1);break;case"end":y[a]+=p*(n&&l?-1:1);break}return y}async function Bqe(e,t){var n;t===void 0&&(t={});const{x:o,y:r,platform:i,rects:a,elements:s,strategy:c}=e,{boundary:l="clippingAncestors",rootBoundary:h="viewport",elementContext:u="floating",altBoundary:p=!1,padding:y=0}=Ti(t,e),g=$ee(y),x=s[p?u==="floating"?"reference":"floating":u],v=hz(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(x)))==null||n?x:x.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(s.floating)),boundary:l,rootBoundary:h,strategy:c})),M=u==="floating"?{x:o,y:r,width:a.floating.width,height:a.floating.height}:a.reference,w=await(i.getOffsetParent==null?void 0:i.getOffsetParent(s.floating)),b=await(i.isElement==null?void 0:i.isElement(w))?await(i.getScale==null?void 0:i.getScale(w))||{x:1,y:1}:{x:1,y:1},C=hz(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:M,offsetParent:w,strategy:c}):M);return{top:(v.top-C.top+g.top)/b.y,bottom:(C.bottom-v.bottom+g.bottom)/b.y,left:(v.left-C.left+g.left)/b.x,right:(C.right-v.right+g.right)/b.x}}const Uqe=50,Wqe=async(e,t,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:i=[],platform:a}=n,s=a.detectOverflow?a:{...a,detectOverflow:Bqe},c=await(a.isRTL==null?void 0:a.isRTL(t));let l=await a.getElementRects({reference:e,floating:t,strategy:r}),{x:h,y:u}=VW(l,o,c),p=o,y=0;const g={};for(let k=0;k<i.length;k++){const x=i[k];if(!x)continue;const{name:v,fn:M}=x,{x:w,y:b,data:C,reset:_}=await M({x:h,y:u,initialPlacement:o,placement:p,strategy:r,middlewareData:g,rects:l,platform:s,elements:{reference:e,floating:t}});h=w??h,u=b??u,g[v]={...g[v],...C},_&&y<Uqe&&(y++,typeof _=="object"&&(_.placement&&(p=_.placement),_.rects&&(l=_.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:r}):_.rects),{x:h,y:u}=VW(l,p,c)),k=-1)}return{x:h,y:u,placement:p,strategy:r,middlewareData:g}},Gqe=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:o,placement:r,rects:i,platform:a,elements:s,middlewareData:c}=t,{element:l,padding:h=0}=Ti(e,t)||{};if(l==null)return{};const u=$ee(h),p={x:n,y:o},y=dq(r),g=lq(y),k=await a.getDimensions(l),x=y==="y",v=x?"top":"left",M=x?"bottom":"right",w=x?"clientHeight":"clientWidth",b=i.reference[g]+i.reference[y]-p[y]-i.floating[g],C=p[y]-i.reference[y],_=await(a.getOffsetParent==null?void 0:a.getOffsetParent(l));let S=_?_[w]:0;(!S||!await(a.isElement==null?void 0:a.isElement(_)))&&(S=s.floating[w]||i.floating[g]);const N=b/2-C/2,P=S/2-k[g]/2-1,A=Va(u[v],P),E=Va(u[M],P),z=A,U=S-k[g]-E,$=S/2-k[g]/2+N,T=lO(z,$,U),D=!c.arrow&&J0(r)!=null&&$!==T&&i.reference[g]/2-($<z?A:E)-k[g]/2<0,O=D?$<z?$-z:$-U:0;return{[y]:p[y]+O,data:{[y]:T,centerOffset:$-T-O,...D&&{alignmentOffset:O}},reset:D}}}),Kqe=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:r,middlewareData:i,rects:a,initialPlacement:s,platform:c,elements:l}=t,{mainAxis:h=!0,crossAxis:u=!0,fallbackPlacements:p,fallbackStrategy:y="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:k=!0,...x}=Ti(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const v=Di(r),M=Dr(s),w=Di(s)===s,b=await(c.isRTL==null?void 0:c.isRTL(l.floating)),C=p||(w||!k?[uz(s)]:Dqe(s)),_=g!=="none";!p&&_&&C.push(...qqe(s,k,g,b));const S=[s,...C],N=await c.detectOverflow(t,x),P=[];let A=((o=i.flip)==null?void 0:o.overflows)||[];if(h&&P.push(N[v]),u){const $=Tqe(r,a,b);P.push(N[$[0]],N[$[1]])}if(A=[...A,{placement:r,overflows:P}],!P.every($=>$<=0)){var E,z;const $=(((E=i.flip)==null?void 0:E.index)||0)+1,T=S[$];if(T&&(!(u==="alignment"?M!==Dr(T):!1)||A.every(I=>Dr(I.placement)===M?I.overflows[0]>0:!0)))return{data:{index:$,overflows:A},reset:{placement:T}};let D=(z=A.filter(O=>O.overflows[0]<=0).sort((O,I)=>O.overflows[1]-I.overflows[1])[0])==null?void 0:z.placement;if(!D)switch(y){case"bestFit":{var U;const O=(U=A.filter(I=>{if(_){const R=Dr(I.placement);return R===M||R==="y"}return!0}).map(I=>[I.placement,I.overflows.filter(R=>R>0).reduce((R,L)=>R+L,0)]).sort((I,R)=>I[1]-R[1])[0])==null?void 0:U[0];O&&(D=O);break}case"initialPlacement":D=s;break}if(r!==D)return{reset:{placement:D}}}return{}}}};function BW(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function UW(e){return zqe.some(t=>e[t]>=0)}const Xqe=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:o}=t,{strategy:r="referenceHidden",...i}=Ti(e,t);switch(r){case"referenceHidden":{const a=await o.detectOverflow(t,{...i,elementContext:"reference"}),s=BW(a,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:UW(s)}}}case"escaped":{const a=await o.detectOverflow(t,{...i,altBoundary:!0}),s=BW(a,n.floating);return{data:{escapedOffsets:s,escaped:UW(s)}}}default:return{}}}}},Pee=new Set(["left","top"]);async function Zqe(e,t){const{placement:n,platform:o,elements:r}=e,i=await(o.isRTL==null?void 0:o.isRTL(r.floating)),a=Di(n),s=J0(n),c=Dr(n)==="y",l=Pee.has(a)?-1:1,h=i&&c?-1:1,u=Ti(t,e);let{mainAxis:p,crossAxis:y,alignmentAxis:g}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return s&&typeof g=="number"&&(y=s==="end"?g*-1:g),c?{x:y*h,y:p*l}:{x:p*l,y:y*h}}const Yqe=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:r,y:i,placement:a,middlewareData:s}=t,c=await Zqe(t,e);return a===((n=s.offset)==null?void 0:n.placement)&&(o=s.arrow)!=null&&o.alignmentOffset?{}:{x:r+c.x,y:i+c.y,data:{...c,placement:a}}}}},Qqe=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:r,platform:i}=t,{mainAxis:a=!0,crossAxis:s=!1,limiter:c={fn:v=>{let{x:M,y:w}=v;return{x:M,y:w}}},...l}=Ti(e,t),h={x:n,y:o},u=await i.detectOverflow(t,l),p=Dr(Di(r)),y=cq(p);let g=h[y],k=h[p];if(a){const v=y==="y"?"top":"left",M=y==="y"?"bottom":"right",w=g+u[v],b=g-u[M];g=lO(w,g,b)}if(s){const v=p==="y"?"top":"left",M=p==="y"?"bottom":"right",w=k+u[v],b=k-u[M];k=lO(w,k,b)}const x=c.fn({...t,[y]:g,[p]:k});return{...x,data:{x:x.x-n,y:x.y-o,enabled:{[y]:a,[p]:s}}}}}},Jqe=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:o,placement:r,rects:i,middlewareData:a}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=Ti(e,t),h={x:n,y:o},u=Dr(r),p=cq(u);let y=h[p],g=h[u];const k=Ti(s,t),x=typeof k=="number"?{mainAxis:k,crossAxis:0}:{mainAxis:0,crossAxis:0,...k};if(c){const w=p==="y"?"height":"width",b=i.reference[p]-i.floating[w]+x.mainAxis,C=i.reference[p]+i.reference[w]-x.mainAxis;y<b?y=b:y>C&&(y=C)}if(l){var v,M;const w=p==="y"?"width":"height",b=Pee.has(Di(r)),C=i.reference[u]-i.floating[w]+(b&&((v=a.offset)==null?void 0:v[u])||0)+(b?0:x.crossAxis),_=i.reference[u]+i.reference[w]+(b?0:((M=a.offset)==null?void 0:M[u])||0)-(b?x.crossAxis:0);g<C?g=C:g>_&&(g=_)}return{[p]:y,[u]:g}}}},eVe=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,o;const{placement:r,rects:i,platform:a,elements:s}=t,{apply:c=()=>{},...l}=Ti(e,t),h=await a.detectOverflow(t,l),u=Di(r),p=J0(r),y=Dr(r)==="y",{width:g,height:k}=i.floating;let x,v;u==="top"||u==="bottom"?(x=u,v=p===(await(a.isRTL==null?void 0:a.isRTL(s.floating))?"start":"end")?"left":"right"):(v=u,x=p==="end"?"top":"bottom");const M=k-h.top-h.bottom,w=g-h.left-h.right,b=Va(k-h[x],M),C=Va(g-h[v],w),_=!t.middlewareData.shift;let S=b,N=C;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(N=w),(o=t.middlewareData.shift)!=null&&o.enabled.y&&(S=M),_&&!p){const A=io(h.left,0),E=io(h.right,0),z=io(h.top,0),U=io(h.bottom,0);y?N=g-2*(A!==0||E!==0?A+E:io(h.left,h.right)):S=k-2*(z!==0||U!==0?z+U:io(h.top,h.bottom))}await c({...t,availableWidth:N,availableHeight:S});const P=await a.getDimensions(s.floating);return g!==P.width||k!==P.height?{reset:{rects:!0}}:{}}}};function pR(){return typeof window<"u"}function e2(e){return zee(e)?(e.nodeName||"").toLowerCase():"#document"}function uo(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Zr(e){var t;return(t=(zee(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function zee(e){return pR()?e instanceof Node||e instanceof uo(e).Node:!1}function or(e){return pR()?e instanceof Element||e instanceof uo(e).Element:!1}function Fi(e){return pR()?e instanceof HTMLElement||e instanceof uo(e).HTMLElement:!1}function WW(e){return!pR()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof uo(e).ShadowRoot}function $f(e){const{overflow:t,overflowX:n,overflowY:o,display:r}=rr(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&r!=="inline"&&r!=="contents"}function tVe(e){return/^(table|td|th)$/.test(e2(e))}function yR(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const nVe=/transform|translate|scale|rotate|perspective|filter/,oVe=/paint|layout|strict|content/,ys=e=>!!e&&e!=="none";let ZT;function uq(e){const t=or(e)?rr(e):e;return ys(t.transform)||ys(t.translate)||ys(t.scale)||ys(t.rotate)||ys(t.perspective)||!hq()&&(ys(t.backdropFilter)||ys(t.filter))||nVe.test(t.willChange||"")||oVe.test(t.contain||"")}function rVe(e){let t=Ba(e);for(;Fi(t)&&!V0(t);){if(uq(t))return t;if(yR(t))return null;t=Ba(t)}return null}function hq(){return ZT==null&&(ZT=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),ZT}function V0(e){return/^(html|body|#document)$/.test(e2(e))}function rr(e){return uo(e).getComputedStyle(e)}function mR(e){return or(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ba(e){if(e2(e)==="html")return e;const t=e.assignedSlot||e.parentNode||WW(e)&&e.host||Zr(e);return WW(t)?t.host:t}function Ree(e){const t=Ba(e);return V0(t)?e.ownerDocument?e.ownerDocument.body:e.body:Fi(t)&&$f(t)?t:Ree(t)}function hf(e,t,n){var o;t===void 0&&(t=[]),n===void 0&&(n=!0);const r=Ree(e),i=r===((o=e.ownerDocument)==null?void 0:o.body),a=uo(r);if(i){const s=uO(a);return t.concat(a,a.visualViewport||[],$f(r)?r:[],s&&n?hf(s):[])}else return t.concat(r,hf(r,[],n))}function uO(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Tee(e){const t=rr(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const r=Fi(e),i=r?e.offsetWidth:n,a=r?e.offsetHeight:o,s=dz(n)!==i||dz(o)!==a;return s&&(n=i,o=a),{width:n,height:o,$:s}}function fq(e){return or(e)?e:e.contextElement}function y0(e){const t=fq(e);if(!Fi(t))return Br(1);const n=t.getBoundingClientRect(),{width:o,height:r,$:i}=Tee(t);let a=(i?dz(n.width):n.width)/o,s=(i?dz(n.height):n.height)/r;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const iVe=Br(0);function Dee(e){const t=uo(e);return!hq()||!t.visualViewport?iVe:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function aVe(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==uo(e)?!1:t}function qd(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=e.getBoundingClientRect(),i=fq(e);let a=Br(1);t&&(o?or(o)&&(a=y0(o)):a=y0(e));const s=aVe(i,n,o)?Dee(i):Br(0);let c=(r.left+s.x)/a.x,l=(r.top+s.y)/a.y,h=r.width/a.x,u=r.height/a.y;if(i){const p=uo(i),y=o&&or(o)?uo(o):o;let g=p,k=uO(g);for(;k&&o&&y!==g;){const x=y0(k),v=k.getBoundingClientRect(),M=rr(k),w=v.left+(k.clientLeft+parseFloat(M.paddingLeft))*x.x,b=v.top+(k.clientTop+parseFloat(M.paddingTop))*x.y;c*=x.x,l*=x.y,h*=x.x,u*=x.y,c+=w,l+=b,g=uo(k),k=uO(g)}}return hz({width:h,height:u,x:c,y:l})}function gR(e,t){const n=mR(e).scrollLeft;return t?t.left+n:qd(Zr(e)).left+n}function Hee(e,t){const n=e.getBoundingClientRect(),o=n.left+t.scrollLeft-gR(e,n),r=n.top+t.scrollTop;return{x:o,y:r}}function sVe(e){let{elements:t,rect:n,offsetParent:o,strategy:r}=e;const i=r==="fixed",a=Zr(o),s=t?yR(t.floating):!1;if(o===a||s&&i)return n;let c={scrollLeft:0,scrollTop:0},l=Br(1);const h=Br(0),u=Fi(o);if((u||!u&&!i)&&((e2(o)!=="body"||$f(a))&&(c=mR(o)),u)){const y=qd(o);l=y0(o),h.x=y.x+o.clientLeft,h.y=y.y+o.clientTop}const p=a&&!u&&!i?Hee(a,c):Br(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+h.x+p.x,y:n.y*l.y-c.scrollTop*l.y+h.y+p.y}}function cVe(e){return Array.from(e.getClientRects())}function lVe(e){const t=Zr(e),n=mR(e),o=e.ownerDocument.body,r=io(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),i=io(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let a=-n.scrollLeft+gR(e);const s=-n.scrollTop;return rr(o).direction==="rtl"&&(a+=io(t.clientWidth,o.clientWidth)-r),{width:r,height:i,x:a,y:s}}const GW=25;function dVe(e,t){const n=uo(e),o=Zr(e),r=n.visualViewport;let i=o.clientWidth,a=o.clientHeight,s=0,c=0;if(r){i=r.width,a=r.height;const h=hq();(!h||h&&t==="fixed")&&(s=r.offsetLeft,c=r.offsetTop)}const l=gR(o);if(l<=0){const h=o.ownerDocument,u=h.body,p=getComputedStyle(u),y=h.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,g=Math.abs(o.clientWidth-u.clientWidth-y);g<=GW&&(i-=g)}else l<=GW&&(i+=l);return{width:i,height:a,x:s,y:c}}function uVe(e,t){const n=qd(e,!0,t==="fixed"),o=n.top+e.clientTop,r=n.left+e.clientLeft,i=Fi(e)?y0(e):Br(1),a=e.clientWidth*i.x,s=e.clientHeight*i.y,c=r*i.x,l=o*i.y;return{width:a,height:s,x:c,y:l}}function KW(e,t,n){let o;if(t==="viewport")o=dVe(e,n);else if(t==="document")o=lVe(Zr(e));else if(or(t))o=uVe(t,n);else{const r=Dee(e);o={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return hz(o)}function Oee(e,t){const n=Ba(e);return n===t||!or(n)||V0(n)?!1:rr(n).position==="fixed"||Oee(n,t)}function hVe(e,t){const n=t.get(e);if(n)return n;let o=hf(e,[],!1).filter(s=>or(s)&&e2(s)!=="body"),r=null;const i=rr(e).position==="fixed";let a=i?Ba(e):e;for(;or(a)&&!V0(a);){const s=rr(a),c=uq(a);!c&&s.position==="fixed"&&(r=null),(i?!c&&!r:!c&&s.position==="static"&&!!r&&(r.position==="absolute"||r.position==="fixed")||$f(a)&&!c&&Oee(e,a))?o=o.filter(h=>h!==a):r=s,a=Ba(a)}return t.set(e,o),o}function fVe(e){let{element:t,boundary:n,rootBoundary:o,strategy:r}=e;const a=[...n==="clippingAncestors"?yR(t)?[]:hVe(t,this._c):[].concat(n),o],s=KW(t,a[0],r);let c=s.top,l=s.right,h=s.bottom,u=s.left;for(let p=1;p<a.length;p++){const y=KW(t,a[p],r);c=io(y.top,c),l=Va(y.right,l),h=Va(y.bottom,h),u=io(y.left,u)}return{width:l-u,height:h-c,x:u,y:c}}function pVe(e){const{width:t,height:n}=Tee(e);return{width:t,height:n}}function yVe(e,t,n){const o=Fi(t),r=Zr(t),i=n==="fixed",a=qd(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const c=Br(0);function l(){c.x=gR(r)}if(o||!o&&!i)if((e2(t)!=="body"||$f(r))&&(s=mR(t)),o){const y=qd(t,!0,i,t);c.x=y.x+t.clientLeft,c.y=y.y+t.clientTop}else r&&l();i&&!o&&r&&l();const h=r&&!o&&!i?Hee(r,s):Br(0),u=a.left+s.scrollLeft-c.x-h.x,p=a.top+s.scrollTop-c.y-h.y;return{x:u,y:p,width:a.width,height:a.height}}function YT(e){return rr(e).position==="static"}function XW(e,t){if(!Fi(e)||rr(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Zr(e)===n&&(n=n.ownerDocument.body),n}function Fee(e,t){const n=uo(e);if(yR(e))return n;if(!Fi(e)){let r=Ba(e);for(;r&&!V0(r);){if(or(r)&&!YT(r))return r;r=Ba(r)}return n}let o=XW(e,t);for(;o&&tVe(o)&&YT(o);)o=XW(o,t);return o&&V0(o)&&YT(o)&&!uq(o)?n:o||rVe(e)||n}const mVe=async function(e){const t=this.getOffsetParent||Fee,n=this.getDimensions,o=await n(e.floating);return{reference:yVe(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function gVe(e){return rr(e).direction==="rtl"}const kVe={convertOffsetParentRelativeRectToViewportRelativeRect:sVe,getDocumentElement:Zr,getClippingRect:fVe,getOffsetParent:Fee,getElementRects:mVe,getClientRects:cVe,getDimensions:pVe,getScale:y0,isElement:or,isRTL:gVe};function qee(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function vVe(e,t){let n=null,o;const r=Zr(e);function i(){var s;clearTimeout(o),(s=n)==null||s.disconnect(),n=null}function a(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),i();const l=e.getBoundingClientRect(),{left:h,top:u,width:p,height:y}=l;if(s||t(),!p||!y)return;const g=jp(u),k=jp(r.clientWidth-(h+p)),x=jp(r.clientHeight-(u+y)),v=jp(h),w={rootMargin:-g+"px "+-k+"px "+-x+"px "+-v+"px",threshold:io(0,Va(1,c))||1};let b=!0;function C(_){const S=_[0].intersectionRatio;if(S!==c){if(!b)return a();S?a(!1,S):o=setTimeout(()=>{a(!1,1e-7)},1e3)}S===1&&!qee(l,e.getBoundingClientRect())&&a(),b=!1}try{n=new IntersectionObserver(C,{...w,root:r.ownerDocument})}catch{n=new IntersectionObserver(C,w)}n.observe(e)}return a(!0),i}function xVe(e,t,n,o){o===void 0&&(o={});const{ancestorScroll:r=!0,ancestorResize:i=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:c=!1}=o,l=fq(e),h=r||i?[...l?hf(l):[],...t?hf(t):[]]:[];h.forEach(v=>{r&&v.addEventListener("scroll",n,{passive:!0}),i&&v.addEventListener("resize",n)});const u=l&&s?vVe(l,n):null;let p=-1,y=null;a&&(y=new ResizeObserver(v=>{let[M]=v;M&&M.target===l&&y&&t&&(y.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var w;(w=y)==null||w.observe(t)})),n()}),l&&!c&&y.observe(l),t&&y.observe(t));let g,k=c?qd(e):null;c&&x();function x(){const v=qd(e);k&&!qee(k,v)&&n(),k=v,g=requestAnimationFrame(x)}return n(),()=>{var v;h.forEach(M=>{r&&M.removeEventListener("scroll",n),i&&M.removeEventListener("resize",n)}),u==null||u(),(v=y)==null||v.disconnect(),y=null,c&&cancelAnimationFrame(g)}}const wVe=Yqe,MVe=Qqe,bVe=Kqe,_Ve=eVe,CVe=Xqe,ZW=Gqe,SVe=Jqe,LVe=(e,t,n)=>{const o=new Map,r={platform:kVe,...n},i={...r.platform,_c:o};return Wqe(e,t,{...r,platform:i})};var NVe=typeof document<"u",IVe=function(){},uP=NVe?m.useLayoutEffect:IVe;function fz(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,o,r;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(o=n;o--!==0;)if(!fz(e[o],t[o]))return!1;return!0}if(r=Object.keys(e),n=r.length,n!==Object.keys(t).length)return!1;for(o=n;o--!==0;)if(!{}.hasOwnProperty.call(t,r[o]))return!1;for(o=n;o--!==0;){const i=r[o];if(!(i==="_owner"&&e.$$typeof)&&!fz(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function Vee(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function YW(e,t){const n=Vee(e);return Math.round(t*n)/n}function QT(e){const t=m.useRef(e);return uP(()=>{t.current=e}),t}function AVe(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:o=[],platform:r,elements:{reference:i,floating:a}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[h,u]=m.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,y]=m.useState(o);fz(p,o)||y(o);const[g,k]=m.useState(null),[x,v]=m.useState(null),M=m.useCallback(I=>{I!==_.current&&(_.current=I,k(I))},[]),w=m.useCallback(I=>{I!==S.current&&(S.current=I,v(I))},[]),b=i||g,C=a||x,_=m.useRef(null),S=m.useRef(null),N=m.useRef(h),P=c!=null,A=QT(c),E=QT(r),z=QT(l),U=m.useCallback(()=>{if(!_.current||!S.current)return;const I={placement:t,strategy:n,middleware:p};E.current&&(I.platform=E.current),LVe(_.current,S.current,I).then(R=>{const L={...R,isPositioned:z.current!==!1};$.current&&!fz(N.current,L)&&(N.current=L,Kd.flushSync(()=>{u(L)}))})},[p,t,n,E,z]);uP(()=>{l===!1&&N.current.isPositioned&&(N.current.isPositioned=!1,u(I=>({...I,isPositioned:!1})))},[l]);const $=m.useRef(!1);uP(()=>($.current=!0,()=>{$.current=!1}),[]),uP(()=>{if(b&&(_.current=b),C&&(S.current=C),b&&C){if(A.current)return A.current(b,C,U);U()}},[b,C,U,A,P]);const T=m.useMemo(()=>({reference:_,floating:S,setReference:M,setFloating:w}),[M,w]),D=m.useMemo(()=>({reference:b,floating:C}),[b,C]),O=m.useMemo(()=>{const I={position:n,left:0,top:0};if(!D.floating)return I;const R=YW(D.floating,h.x),L=YW(D.floating,h.y);return s?{...I,transform:"translate("+R+"px, "+L+"px)",...Vee(D.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:R,top:L}},[n,s,D.floating,h.x,h.y]);return m.useMemo(()=>({...h,update:U,refs:T,elements:D,floatingStyles:O}),[h,U,T,D,O])}const EVe=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:o,padding:r}=typeof e=="function"?e(n):e;return o&&t(o)?o.current!=null?ZW({element:o.current,padding:r}).fn(n):{}:o?ZW({element:o,padding:r}).fn(n):{}}}},jVe=(e,t)=>{const n=wVe(e);return{name:n.name,fn:n.fn,options:[e,t]}},$Ve=(e,t)=>{const n=MVe(e);return{name:n.name,fn:n.fn,options:[e,t]}},PVe=(e,t)=>({fn:SVe(e).fn,options:[e,t]}),zVe=(e,t)=>{const n=bVe(e);return{name:n.name,fn:n.fn,options:[e,t]}},RVe=(e,t)=>{const n=_Ve(e);return{name:n.name,fn:n.fn,options:[e,t]}},TVe=(e,t)=>{const n=CVe(e);return{name:n.name,fn:n.fn,options:[e,t]}},DVe=(e,t)=>{const n=EVe(e);return{name:n.name,fn:n.fn,options:[e,t]}};var HVe="Arrow",Bee=m.forwardRef((e,t)=>{const{children:n,width:o=10,height:r=5,...i}=e;return f.jsx(Ve.svg,{...i,ref:t,width:o,height:r,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:f.jsx("polygon",{points:"0,0 30,0 15,10"})})});Bee.displayName=HVe;var OVe=Bee,pq="Popper",[Uee,t2]=cr(pq),[FVe,Wee]=Uee(pq),Gee=e=>{const{__scopePopper:t,children:n}=e,[o,r]=m.useState(null);return f.jsx(FVe,{scope:t,anchor:o,onAnchorChange:r,children:n})};Gee.displayName=pq;var Kee="PopperAnchor",Xee=m.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:o,...r}=e,i=Wee(Kee,n),a=m.useRef(null),s=yt(t,a),c=m.useRef(null);return m.useEffect(()=>{const l=c.current;c.current=(o==null?void 0:o.current)||a.current,l!==c.current&&i.onAnchorChange(c.current)}),o?null:f.jsx(Ve.div,{...r,ref:s})});Xee.displayName=Kee;var yq="PopperContent",[qVe,VVe]=Uee(yq),Zee=m.forwardRef((e,t)=>{var re,oe,ne,le,ve,ge;const{__scopePopper:n,side:o="bottom",sideOffset:r=0,align:i="center",alignOffset:a=0,arrowPadding:s=0,avoidCollisions:c=!0,collisionBoundary:l=[],collisionPadding:h=0,sticky:u="partial",hideWhenDetached:p=!1,updatePositionStrategy:y="optimized",onPlaced:g,...k}=e,x=Wee(yq,n),[v,M]=m.useState(null),w=yt(t,xe=>M(xe)),[b,C]=m.useState(null),_=cee(b),S=(_==null?void 0:_.width)??0,N=(_==null?void 0:_.height)??0,P=o+(i!=="center"?"-"+i:""),A=typeof h=="number"?h:{top:0,right:0,bottom:0,left:0,...h},E=Array.isArray(l)?l:[l],z=E.length>0,U={padding:A,boundary:E.filter(UVe),altBoundary:z},{refs:$,floatingStyles:T,placement:D,isPositioned:O,middlewareData:I}=AVe({strategy:"fixed",placement:P,whileElementsMounted:(...xe)=>xVe(...xe,{animationFrame:y==="always"}),elements:{reference:x.anchor},middleware:[jVe({mainAxis:r+N,alignmentAxis:a}),c&&$Ve({mainAxis:!0,crossAxis:!1,limiter:u==="partial"?PVe():void 0,...U}),c&&zVe({...U}),RVe({...U,apply:({elements:xe,rects:Te,availableWidth:Ye,availableHeight:ue})=>{const{width:Ie,height:Pt}=Te.reference,wt=xe.floating.style;wt.setProperty("--radix-popper-available-width",`${Ye}px`),wt.setProperty("--radix-popper-available-height",`${ue}px`),wt.setProperty("--radix-popper-anchor-width",`${Ie}px`),wt.setProperty("--radix-popper-anchor-height",`${Pt}px`)}}),b&&DVe({element:b,padding:s}),WVe({arrowWidth:S,arrowHeight:N}),p&&TVe({strategy:"referenceHidden",...U})]}),[R,L]=Jee(D),V=Kr(g);qa(()=>{O&&(V==null||V())},[O,V]);const H=(re=I.arrow)==null?void 0:re.x,j=(oe=I.arrow)==null?void 0:oe.y,X=((ne=I.arrow)==null?void 0:ne.centerOffset)!==0,[Z,J]=m.useState();return qa(()=>{v&&J(window.getComputedStyle(v).zIndex)},[v]),f.jsx("div",{ref:$.setFloating,"data-radix-popper-content-wrapper":"",style:{...T,transform:O?T.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Z,"--radix-popper-transform-origin":[(le=I.transformOrigin)==null?void 0:le.x,(ve=I.transformOrigin)==null?void 0:ve.y].join(" "),...((ge=I.hide)==null?void 0:ge.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:f.jsx(qVe,{scope:n,placedSide:R,onArrowChange:C,arrowX:H,arrowY:j,shouldHideArrow:X,children:f.jsx(Ve.div,{"data-side":R,"data-align":L,...k,ref:w,style:{...k.style,animation:O?void 0:"none"}})})})});Zee.displayName=yq;var Yee="PopperArrow",BVe={top:"bottom",right:"left",bottom:"top",left:"right"},Qee=m.forwardRef(function(t,n){const{__scopePopper:o,...r}=t,i=VVe(Yee,o),a=BVe[i.placedSide];return f.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:f.jsx(OVe,{...r,ref:n,style:{...r.style,display:"block"}})})});Qee.displayName=Yee;function UVe(e){return e!==null}var WVe=e=>({name:"transformOrigin",options:e,fn(t){var x,v,M;const{placement:n,rects:o,middlewareData:r}=t,a=((x=r.arrow)==null?void 0:x.centerOffset)!==0,s=a?0:e.arrowWidth,c=a?0:e.arrowHeight,[l,h]=Jee(n),u={start:"0%",center:"50%",end:"100%"}[h],p=(((v=r.arrow)==null?void 0:v.x)??0)+s/2,y=(((M=r.arrow)==null?void 0:M.y)??0)+c/2;let g="",k="";return l==="bottom"?(g=a?u:`${p}px`,k=`${-c}px`):l==="top"?(g=a?u:`${p}px`,k=`${o.floating.height+c}px`):l==="right"?(g=`${-c}px`,k=a?u:`${y}px`):l==="left"&&(g=`${o.floating.width+c}px`,k=a?u:`${y}px`),{data:{x:g,y:k}}}});function Jee(e){const[t,n="center"]=e.split("-");return[t,n]}var mq=Gee,kR=Xee,gq=Zee,kq=Qee,GVe="Portal",Pf=m.forwardRef((e,t)=>{var s;const{container:n,...o}=e,[r,i]=m.useState(!1);qa(()=>i(!0),[]);const a=n||r&&((s=globalThis==null?void 0:globalThis.document)==null?void 0:s.body);return a?Jce.createPortal(f.jsx(Ve.div,{...o,ref:t}),a):null});Pf.displayName=GVe;function KVe(e,t){return m.useReducer((n,o)=>t[n][o]??n,e)}var go=e=>{const{present:t,children:n}=e,o=XVe(t),r=typeof n=="function"?n({present:o.isPresent}):m.Children.only(n),i=yt(o.ref,ZVe(r));return typeof n=="function"||o.isPresent?m.cloneElement(r,{ref:i}):null};go.displayName="Presence";function XVe(e){const[t,n]=m.useState(),o=m.useRef(null),r=m.useRef(e),i=m.useRef("none"),a=e?"mounted":"unmounted",[s,c]=KVe(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return m.useEffect(()=>{const l=$p(o.current);i.current=s==="mounted"?l:"none"},[s]),qa(()=>{const l=o.current,h=r.current;if(h!==e){const p=i.current,y=$p(l);e?c("MOUNT"):y==="none"||(l==null?void 0:l.display)==="none"?c("UNMOUNT"):c(h&&p!==y?"ANIMATION_OUT":"UNMOUNT"),r.current=e}},[e,c]),qa(()=>{if(t){let l;const h=t.ownerDocument.defaultView??window,u=y=>{const k=$p(o.current).includes(CSS.escape(y.animationName));if(y.target===t&&k&&(c("ANIMATION_END"),!r.current)){const x=t.style.animationFillMode;t.style.animationFillMode="forwards",l=h.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=x)})}},p=y=>{y.target===t&&(i.current=$p(o.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{h.clearTimeout(l),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:m.useCallback(l=>{o.current=l?getComputedStyle(l):null,n(l)},[])}}function $p(e){return(e==null?void 0:e.animationName)||"none"}function ZVe(e){var o,r;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(r=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var YVe=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},_u=new WeakMap,Pp=new WeakMap,zp={},JT=0,ete=function(e){return e&&(e.host||ete(e.parentNode))},QVe=function(e,t){return t.map(function(n){if(e.contains(n))return n;var o=ete(n);return o&&e.contains(o)?o:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},JVe=function(e,t,n,o){var r=QVe(t,Array.isArray(e)?e:[e]);zp[n]||(zp[n]=new WeakMap);var i=zp[n],a=[],s=new Set,c=new Set(r),l=function(u){!u||s.has(u)||(s.add(u),l(u.parentNode))};r.forEach(l);var h=function(u){!u||c.has(u)||Array.prototype.forEach.call(u.children,function(p){if(s.has(p))h(p);else try{var y=p.getAttribute(o),g=y!==null&&y!=="false",k=(_u.get(p)||0)+1,x=(i.get(p)||0)+1;_u.set(p,k),i.set(p,x),a.push(p),k===1&&g&&Pp.set(p,!0),x===1&&p.setAttribute(n,"true"),g||p.setAttribute(o,"true")}catch(v){console.error("aria-hidden: cannot operate on ",p,v)}})};return h(t),s.clear(),JT++,function(){a.forEach(function(u){var p=_u.get(u)-1,y=i.get(u)-1;_u.set(u,p),i.set(u,y),p||(Pp.has(u)||u.removeAttribute(o),Pp.delete(u)),y||u.removeAttribute(n)}),JT--,JT||(_u=new WeakMap,_u=new WeakMap,Pp=new WeakMap,zp={})}},vq=function(e,t,n){n===void 0&&(n="data-aria-hidden");var o=Array.from(Array.isArray(e)?e:[e]),r=YVe(e);return r?(o.push.apply(o,Array.from(r.querySelectorAll("[aria-live], script"))),JVe(o,r,n,"aria-hidden")):function(){return null}},Rr=function(){return Rr=Object.assign||function(t){for(var n,o=1,r=arguments.length;o<r;o++){n=arguments[o];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},Rr.apply(this,arguments)};function tte(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]]);return n}function eBe(e,t,n){if(n||arguments.length===2)for(var o=0,r=t.length,i;o<r;o++)(i||!(o in t))&&(i||(i=Array.prototype.slice.call(t,0,o)),i[o]=t[o]);return e.concat(i||Array.prototype.slice.call(t))}var hP="right-scroll-bar-position",fP="width-before-scroll-bar",tBe="with-scroll-bars-hidden",nBe="--removed-body-scroll-bar-size";function eD(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function oBe(e,t){var n=m.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(o){var r=n.value;r!==o&&(n.value=o,n.callback(o,r))}}}})[0];return n.callback=t,n.facade}var rBe=typeof window<"u"?m.useLayoutEffect:m.useEffect,QW=new WeakMap;function iBe(e,t){var n=oBe(null,function(o){return e.forEach(function(r){return eD(r,o)})});return rBe(function(){var o=QW.get(n);if(o){var r=new Set(o),i=new Set(e),a=n.current;r.forEach(function(s){i.has(s)||eD(s,null)}),i.forEach(function(s){r.has(s)||eD(s,a)})}QW.set(n,e)},[e]),n}function aBe(e){return e}function sBe(e,t){t===void 0&&(t=aBe);var n=[],o=!1,r={read:function(){if(o)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(i){var a=t(i,o);return n.push(a),function(){n=n.filter(function(s){return s!==a})}},assignSyncMedium:function(i){for(o=!0;n.length;){var a=n;n=[],a.forEach(i)}n={push:function(s){return i(s)},filter:function(){return n}}},assignMedium:function(i){o=!0;var a=[];if(n.length){var s=n;n=[],s.forEach(i),a=n}var c=function(){var h=a;a=[],h.forEach(i)},l=function(){return Promise.resolve().then(c)};l(),n={push:function(h){a.push(h),l()},filter:function(h){return a=a.filter(h),n}}}};return r}function cBe(e){e===void 0&&(e={});var t=sBe(null);return t.options=Rr({async:!0,ssr:!1},e),t}var nte=function(e){var t=e.sideCar,n=tte(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=t.read();if(!o)throw new Error("Sidecar medium not found");return m.createElement(o,Rr({},n))};nte.isSideCarExport=!0;function lBe(e,t){return e.useMedium(t),nte}var ote=cBe(),tD=function(){},vR=m.forwardRef(function(e,t){var n=m.useRef(null),o=m.useState({onScrollCapture:tD,onWheelCapture:tD,onTouchMoveCapture:tD}),r=o[0],i=o[1],a=e.forwardProps,s=e.children,c=e.className,l=e.removeScrollBar,h=e.enabled,u=e.shards,p=e.sideCar,y=e.noRelative,g=e.noIsolation,k=e.inert,x=e.allowPinchZoom,v=e.as,M=v===void 0?"div":v,w=e.gapMode,b=tte(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=p,_=iBe([n,t]),S=Rr(Rr({},b),r);return m.createElement(m.Fragment,null,h&&m.createElement(C,{sideCar:ote,removeScrollBar:l,shards:u,noRelative:y,noIsolation:g,inert:k,setCallbacks:i,allowPinchZoom:!!x,lockRef:n,gapMode:w}),a?m.cloneElement(m.Children.only(s),Rr(Rr({},S),{ref:_})):m.createElement(M,Rr({},S,{className:c,ref:_}),s))});vR.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};vR.classNames={fullWidth:fP,zeroRight:hP};var dBe=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function uBe(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=dBe();return t&&e.setAttribute("nonce",t),e}function hBe(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function fBe(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var pBe=function(){var e=0,t=null;return{add:function(n){e==0&&(t=uBe())&&(hBe(t,n),fBe(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},yBe=function(){var e=pBe();return function(t,n){m.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},rte=function(){var e=yBe(),t=function(n){var o=n.styles,r=n.dynamic;return e(o,r),null};return t},mBe={left:0,top:0,right:0,gap:0},nD=function(e){return parseInt(e||"",10)||0},gBe=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],o=t[e==="padding"?"paddingTop":"marginTop"],r=t[e==="padding"?"paddingRight":"marginRight"];return[nD(n),nD(o),nD(r)]},kBe=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return mBe;var t=gBe(e),n=document.documentElement.clientWidth,o=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,o-n+t[2]-t[0])}},vBe=rte(),m0="data-scroll-locked",xBe=function(e,t,n,o){var r=e.left,i=e.top,a=e.right,s=e.gap;return n===void 0&&(n="margin"),`
8470
8470
  .`.concat(tBe,` {
8471
8471
  overflow: hidden `).concat(o,`;
8472
8472
  padding-right: `).concat(s,"px ").concat(o,`;
@@ -8538,10 +8538,10 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
8538
8538
  `))+1))}const a="#".repeat(r),s=n.enter("headingAtx"),c=n.enter("phrasing");i.move(a+" ");let l=n.containerPhrasing(e,{before:"# ",after:`
8539
8539
  `,...i.current()});return/^[\t ]/.test(l)&&(l=gf(l.charCodeAt(0))+l.slice(1)),l=l?a+" "+l:a,n.options.closeAtx&&(l+=" "+a),c(),s(),l}Fre.peek=ntt;function Fre(e){return e.value||""}function ntt(){return"<"}qre.peek=ott;function qre(e,t,n,o){const r=sV(n),i=r==='"'?"Quote":"Apostrophe",a=n.enter("image");let s=n.enter("label");const c=n.createTracker(o);let l=c.move("![");return l+=c.move(n.safe(e.alt,{before:l,after:"]",...c.current()})),l+=c.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),l+=c.move("<"),l+=c.move(n.safe(e.url,{before:l,after:">",...c.current()})),l+=c.move(">")):(s=n.enter("destinationRaw"),l+=c.move(n.safe(e.url,{before:l,after:e.title?" ":")",...c.current()}))),s(),e.title&&(s=n.enter(`title${i}`),l+=c.move(" "+r),l+=c.move(n.safe(e.title,{before:l,after:r,...c.current()})),l+=c.move(r),s()),l+=c.move(")"),a(),l}function ott(){return"!"}Vre.peek=rtt;function Vre(e,t,n,o){const r=e.referenceType,i=n.enter("imageReference");let a=n.enter("label");const s=n.createTracker(o);let c=s.move("![");const l=n.safe(e.alt,{before:c,after:"]",...s.current()});c+=s.move(l+"]["),a();const h=n.stack;n.stack=[],a=n.enter("reference");const u=n.safe(n.associationId(e),{before:c,after:"]",...s.current()});return a(),n.stack=h,i(),r==="full"||!l||l!==u?c+=s.move(u+"]"):r==="shortcut"?c=c.slice(0,-1):c+=s.move("]"),c}function rtt(){return"!"}Bre.peek=itt;function Bre(e,t,n){let o=e.value||"",r="`",i=-1;for(;new RegExp("(^|[^`])"+r+"([^`]|$)").test(o);)r+="`";for(/[^ \r\n]/.test(o)&&(/^[ \r\n]/.test(o)&&/[ \r\n]$/.test(o)||/^`|`$/.test(o))&&(o=" "+o+" ");++i<n.unsafe.length;){const a=n.unsafe[i],s=n.compilePattern(a);let c;if(a.atBreak)for(;c=s.exec(o);){let l=c.index;o.charCodeAt(l)===10&&o.charCodeAt(l-1)===13&&l--,o=o.slice(0,l)+" "+o.slice(c.index+1)}}return r+o+r}function itt(){return"`"}function Ure(e,t){const n=Qq(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}Wre.peek=att;function Wre(e,t,n,o){const r=sV(n),i=r==='"'?"Quote":"Apostrophe",a=n.createTracker(o);let s,c;if(Ure(e,n)){const h=n.stack;n.stack=[],s=n.enter("autolink");let u=a.move("<");return u+=a.move(n.containerPhrasing(e,{before:u,after:">",...a.current()})),u+=a.move(">"),s(),n.stack=h,u}s=n.enter("link"),c=n.enter("label");let l=a.move("[");return l+=a.move(n.containerPhrasing(e,{before:l,after:"](",...a.current()})),l+=a.move("]("),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),l+=a.move("<"),l+=a.move(n.safe(e.url,{before:l,after:">",...a.current()})),l+=a.move(">")):(c=n.enter("destinationRaw"),l+=a.move(n.safe(e.url,{before:l,after:e.title?" ":")",...a.current()}))),c(),e.title&&(c=n.enter(`title${i}`),l+=a.move(" "+r),l+=a.move(n.safe(e.title,{before:l,after:r,...a.current()})),l+=a.move(r),c()),l+=a.move(")"),s(),l}function att(e,t,n){return Ure(e,n)?"<":"["}Gre.peek=stt;function Gre(e,t,n,o){const r=e.referenceType,i=n.enter("linkReference");let a=n.enter("label");const s=n.createTracker(o);let c=s.move("[");const l=n.containerPhrasing(e,{before:c,after:"]",...s.current()});c+=s.move(l+"]["),a();const h=n.stack;n.stack=[],a=n.enter("reference");const u=n.safe(n.associationId(e),{before:c,after:"]",...s.current()});return a(),n.stack=h,i(),r==="full"||!l||l!==u?c+=s.move(u+"]"):r==="shortcut"?c=c.slice(0,-1):c+=s.move("]"),c}function stt(){return"["}function cV(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function ctt(e){const t=cV(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function ltt(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function Kre(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function dtt(e,t,n,o){const r=n.enter("list"),i=n.bulletCurrent;let a=e.ordered?ltt(n):cV(n);const s=e.ordered?a==="."?")":".":ctt(n);let c=t&&n.bulletLastUsed?a===n.bulletLastUsed:!1;if(!e.ordered){const h=e.children?e.children[0]:void 0;if((a==="*"||a==="-")&&h&&(!h.children||!h.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(c=!0),Kre(n)===a&&h){let u=-1;for(;++u<e.children.length;){const p=e.children[u];if(p&&p.type==="listItem"&&p.children&&p.children[0]&&p.children[0].type==="thematicBreak"){c=!0;break}}}}c&&(a=s),n.bulletCurrent=a;const l=n.containerFlow(e,o);return n.bulletLastUsed=a,n.bulletCurrent=i,r(),l}function utt(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function htt(e,t,n,o){const r=utt(n);let i=n.bulletCurrent||cV(n);t&&t.type==="list"&&t.ordered&&(i=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+i);let a=i.length+1;(r==="tab"||r==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(a=Math.ceil(a/4)*4);const s=n.createTracker(o);s.move(i+" ".repeat(a-i.length)),s.shift(a);const c=n.enter("listItem"),l=n.indentLines(n.containerFlow(e,s.current()),h);return c(),l;function h(u,p,y){return p?(y?"":" ".repeat(a))+u:(y?i:i+" ".repeat(a-i.length))+u}}function ftt(e,t,n,o){const r=n.enter("paragraph"),i=n.enter("phrasing"),a=n.containerPhrasing(e,o);return i(),r(),a}const ptt=HR(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function ytt(e,t,n,o){return(e.children.some(function(a){return ptt(a)})?n.containerPhrasing:n.containerFlow).call(n,e,o)}function mtt(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}Xre.peek=gtt;function Xre(e,t,n,o){const r=mtt(n),i=n.enter("strong"),a=n.createTracker(o),s=a.move(r+r);let c=a.move(n.containerPhrasing(e,{after:r,before:s,...a.current()}));const l=c.charCodeAt(0),h=Sz(o.before.charCodeAt(o.before.length-1),l,r);h.inside&&(c=gf(l)+c.slice(1));const u=c.charCodeAt(c.length-1),p=Sz(o.after.charCodeAt(0),u,r);p.inside&&(c=c.slice(0,-1)+gf(u));const y=a.move(r+r);return i(),n.attentionEncodeSurroundingInfo={after:p.outside,before:h.outside},s+c+y}function gtt(e,t,n){return n.options.strong||"*"}function ktt(e,t,n,o){return n.safe(e.value,o)}function vtt(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function xtt(e,t,n){const o=(Kre(n)+(n.options.ruleSpaces?" ":"")).repeat(vtt(n));return n.options.ruleSpaces?o.slice(0,-1):o}const Zre={blockquote:Vet,break:hK,code:Xet,definition:Yet,emphasis:Ore,hardBreak:hK,heading:ttt,html:Fre,image:qre,imageReference:Vre,inlineCode:Bre,link:Wre,linkReference:Gre,list:dtt,listItem:htt,paragraph:ftt,root:ytt,strong:Xre,text:ktt,thematicBreak:xtt};function wtt(){return{enter:{table:Mtt,tableData:fK,tableHeader:fK,tableRow:_tt},exit:{codeText:Ctt,table:btt,tableData:MD,tableHeader:MD,tableRow:MD}}}function Mtt(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function btt(e){this.exit(e),this.data.inTable=void 0}function _tt(e){this.enter({type:"tableRow",children:[]},e)}function MD(e){this.exit(e)}function fK(e){this.enter({type:"tableCell",children:[]},e)}function Ctt(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,Stt));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function Stt(e,t){return t==="|"?t:e}function Ltt(e){const t=e||{},n=t.tableCellPadding,o=t.tablePipeAlign,r=t.stringLength,i=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
8540
8540
  `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:p,table:a,tableCell:c,tableRow:s}};function a(y,g,k,x){return l(h(y,k,x),y.align)}function s(y,g,k,x){const v=u(y,k,x),M=l([v]);return M.slice(0,M.indexOf(`
8541
- `))}function c(y,g,k,x){const v=k.enter("tableCell"),M=k.enter("phrasing"),w=k.containerPhrasing(y,{...x,before:i,after:i});return M(),v(),w}function l(y,g){return Fet(y,{align:g,alignDelimiters:o,padding:n,stringLength:r})}function h(y,g,k){const x=y.children;let v=-1;const M=[],w=g.enter("table");for(;++v<x.length;)M[v]=u(x[v],g,k);return w(),M}function u(y,g,k){const x=y.children;let v=-1;const M=[],w=g.enter("tableRow");for(;++v<x.length;)M[v]=c(x[v],y,g,k);return w(),M}function p(y,g,k){let x=Zre.inlineCode(y,g,k);return k.stack.includes("tableCell")&&(x=x.replace(/\|/g,"\\$&")),x}}function Ntt(){return{exit:{taskListCheckValueChecked:pK,taskListCheckValueUnchecked:pK,paragraph:Att}}}function Itt(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Ett}}}function pK(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function Att(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const o=n.children[0];if(o&&o.type==="text"){const r=t.children;let i=-1,a;for(;++i<r.length;){const s=r[i];if(s.type==="paragraph"){a=s;break}}a===n&&(o.value=o.value.slice(1),o.value.length===0?n.children.shift():n.position&&o.position&&typeof o.position.start.offset=="number"&&(o.position.start.column++,o.position.start.offset++,n.position.start=Object.assign({},o.position.start)))}}this.exit(e)}function Ett(e,t,n,o){const r=e.children[0],i=typeof e.checked=="boolean"&&r&&r.type==="paragraph",a="["+(e.checked?"x":" ")+"] ",s=n.createTracker(o);i&&s.move(a);let c=Zre.listItem(e,t,n,{...o,...s.current()});return i&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),c;function l(h){return h+a}}function jtt(){return[cet(),Eet(),zet(),wtt(),Ntt()]}function $tt(e){return{extensions:[det(),jet(e),Ret(),Ltt(e),Itt()]}}const Ptt={tokenize:Ott,partial:!0},Yre={tokenize:Ftt,partial:!0},Qre={tokenize:qtt,partial:!0},Jre={tokenize:Vtt,partial:!0},ztt={tokenize:Btt,partial:!0},eie={name:"wwwAutolink",tokenize:Dtt,previous:nie},tie={name:"protocolAutolink",tokenize:Htt,previous:oie},qi={name:"emailAutolink",tokenize:Ttt,previous:rie},ti={};function Rtt(){return{text:ti}}let ms=48;for(;ms<123;)ti[ms]=qi,ms++,ms===58?ms=65:ms===91&&(ms=97);ti[43]=qi;ti[45]=qi;ti[46]=qi;ti[95]=qi;ti[72]=[qi,tie];ti[104]=[qi,tie];ti[87]=[qi,eie];ti[119]=[qi,eie];function Ttt(e,t,n){const o=this;let r,i;return a;function a(u){return!jO(u)||!rie.call(o,o.previous)||lV(o.events)?n(u):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),s(u))}function s(u){return jO(u)?(e.consume(u),s):u===64?(e.consume(u),c):n(u)}function c(u){return u===46?e.check(ztt,h,l)(u):u===45||u===95||wn(u)?(i=!0,e.consume(u),c):h(u)}function l(u){return e.consume(u),r=!0,c}function h(u){return i&&r&&An(o.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(u)):n(u)}}function Dtt(e,t,n){const o=this;return r;function r(a){return a!==87&&a!==119||!nie.call(o,o.previous)||lV(o.events)?n(a):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(Ptt,e.attempt(Yre,e.attempt(Qre,i),n),n)(a))}function i(a){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(a)}}function Htt(e,t,n){const o=this;let r="",i=!1;return a;function a(u){return(u===72||u===104)&&oie.call(o,o.previous)&&!lV(o.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),r+=String.fromCodePoint(u),e.consume(u),s):n(u)}function s(u){if(An(u)&&r.length<5)return r+=String.fromCodePoint(u),e.consume(u),s;if(u===58){const p=r.toLowerCase();if(p==="http"||p==="https")return e.consume(u),c}return n(u)}function c(u){return u===47?(e.consume(u),i?l:(i=!0,c)):n(u)}function l(u){return u===null||bz(u)||pt(u)||Ud(u)||RR(u)?n(u):e.attempt(Yre,e.attempt(Qre,h),n)(u)}function h(u){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(u)}}function Ott(e,t,n){let o=0;return r;function r(a){return(a===87||a===119)&&o<3?(o++,e.consume(a),r):a===46&&o===3?(e.consume(a),i):n(a)}function i(a){return a===null?n(a):t(a)}}function Ftt(e,t,n){let o,r,i;return a;function a(l){return l===46||l===95?e.check(Jre,c,s)(l):l===null||pt(l)||Ud(l)||l!==45&&RR(l)?c(l):(i=!0,e.consume(l),a)}function s(l){return l===95?o=!0:(r=o,o=void 0),e.consume(l),a}function c(l){return r||o||!i?n(l):t(l)}}function qtt(e,t){let n=0,o=0;return r;function r(a){return a===40?(n++,e.consume(a),r):a===41&&o<n?i(a):a===33||a===34||a===38||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===60||a===63||a===93||a===95||a===126?e.check(Jre,t,i)(a):a===null||pt(a)||Ud(a)?t(a):(e.consume(a),r)}function i(a){return a===41&&o++,e.consume(a),r}}function Vtt(e,t,n){return o;function o(s){return s===33||s===34||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===63||s===95||s===126?(e.consume(s),o):s===38?(e.consume(s),i):s===93?(e.consume(s),r):s===60||s===null||pt(s)||Ud(s)?t(s):n(s)}function r(s){return s===null||s===40||s===91||pt(s)||Ud(s)?t(s):o(s)}function i(s){return An(s)?a(s):n(s)}function a(s){return s===59?(e.consume(s),o):An(s)?(e.consume(s),a):n(s)}}function Btt(e,t,n){return o;function o(i){return e.consume(i),r}function r(i){return wn(i)?n(i):t(i)}}function nie(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||pt(e)}function oie(e){return!An(e)}function rie(e){return!(e===47||jO(e))}function jO(e){return e===43||e===45||e===46||e===95||wn(e)}function lV(e){let t=e.length,n=!1;for(;t--;){const o=e[t][1];if((o.type==="labelLink"||o.type==="labelImage")&&!o._balanced){n=!0;break}if(o._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const Utt={tokenize:Jtt,partial:!0};function Wtt(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:Ztt,continuation:{tokenize:Ytt},exit:Qtt}},text:{91:{name:"gfmFootnoteCall",tokenize:Xtt},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:Gtt,resolveTo:Ktt}}}}function Gtt(e,t,n){const o=this;let r=o.events.length;const i=o.parser.gfmFootnotes||(o.parser.gfmFootnotes=[]);let a;for(;r--;){const c=o.events[r][1];if(c.type==="labelImage"){a=c;break}if(c.type==="gfmFootnoteCall"||c.type==="labelLink"||c.type==="label"||c.type==="image"||c.type==="link")break}return s;function s(c){if(!a||!a._balanced)return n(c);const l=tr(o.sliceSerialize({start:a.end,end:o.now()}));return l.codePointAt(0)!==94||!i.includes(l.slice(1))?n(c):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),t(c))}}function Ktt(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const o={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},r={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};r.end.column++,r.end.offset++,r.end._bufferIndex++;const i={type:"gfmFootnoteCallString",start:Object.assign({},r.end),end:Object.assign({},e[e.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},i.start),end:Object.assign({},i.end)},s=[e[n+1],e[n+2],["enter",o,t],e[n+3],e[n+4],["enter",r,t],["exit",r,t],["enter",i,t],["enter",a,t],["exit",a,t],["exit",i,t],e[e.length-2],e[e.length-1],["exit",o,t]];return e.splice(n,e.length-n+1,...s),e}function Xtt(e,t,n){const o=this,r=o.parser.gfmFootnotes||(o.parser.gfmFootnotes=[]);let i=0,a;return s;function s(u){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(u),e.exit("gfmFootnoteCallLabelMarker"),c}function c(u){return u!==94?n(u):(e.enter("gfmFootnoteCallMarker"),e.consume(u),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",l)}function l(u){if(i>999||u===93&&!a||u===null||u===91||pt(u))return n(u);if(u===93){e.exit("chunkString");const p=e.exit("gfmFootnoteCallString");return r.includes(tr(o.sliceSerialize(p)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(u),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(u)}return pt(u)||(a=!0),i++,e.consume(u),u===92?h:l}function h(u){return u===91||u===92||u===93?(e.consume(u),i++,l):l(u)}}function Ztt(e,t,n){const o=this,r=o.parser.gfmFootnotes||(o.parser.gfmFootnotes=[]);let i,a=0,s;return c;function c(g){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionLabelMarker"),l}function l(g){return g===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",h):n(g)}function h(g){if(a>999||g===93&&!s||g===null||g===91||pt(g))return n(g);if(g===93){e.exit("chunkString");const k=e.exit("gfmFootnoteDefinitionLabelString");return i=tr(o.sliceSerialize(k)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p}return pt(g)||(s=!0),a++,e.consume(g),g===92?u:h}function u(g){return g===91||g===92||g===93?(e.consume(g),a++,h):h(g)}function p(g){return g===58?(e.enter("definitionMarker"),e.consume(g),e.exit("definitionMarker"),r.includes(i)||r.push(i),ot(e,y,"gfmFootnoteDefinitionWhitespace")):n(g)}function y(g){return t(g)}}function Ytt(e,t,n){return e.check(Bf,t,e.attempt(Utt,t,n))}function Qtt(e){e.exit("gfmFootnoteDefinition")}function Jtt(e,t,n){const o=this;return ot(e,r,"gfmFootnoteDefinitionIndent",5);function r(i){const a=o.events[o.events.length-1];return a&&a[1].type==="gfmFootnoteDefinitionIndent"&&a[2].sliceSerialize(a[1],!0).length===4?t(i):n(i)}}function ent(e){let n=(e||{}).singleTilde;const o={name:"strikethrough",tokenize:i,resolveAll:r};return n==null&&(n=!0),{text:{126:o},insideSpan:{null:[o]},attentionMarkers:{null:[126]}};function r(a,s){let c=-1;for(;++c<a.length;)if(a[c][0]==="enter"&&a[c][1].type==="strikethroughSequenceTemporary"&&a[c][1]._close){let l=c;for(;l--;)if(a[l][0]==="exit"&&a[l][1].type==="strikethroughSequenceTemporary"&&a[l][1]._open&&a[c][1].end.offset-a[c][1].start.offset===a[l][1].end.offset-a[l][1].start.offset){a[c][1].type="strikethroughSequence",a[l][1].type="strikethroughSequence";const h={type:"strikethrough",start:Object.assign({},a[l][1].start),end:Object.assign({},a[c][1].end)},u={type:"strikethroughText",start:Object.assign({},a[l][1].end),end:Object.assign({},a[c][1].start)},p=[["enter",h,s],["enter",a[l][1],s],["exit",a[l][1],s],["enter",u,s]],y=s.parser.constructs.insideSpan.null;y&&ho(p,p.length,0,TR(y,a.slice(l+1,c),s)),ho(p,p.length,0,[["exit",u,s],["enter",a[c][1],s],["exit",a[c][1],s],["exit",h,s]]),ho(a,l-1,c-l+3,p),c=l+p.length-2;break}}for(c=-1;++c<a.length;)a[c][1].type==="strikethroughSequenceTemporary"&&(a[c][1].type="data");return a}function i(a,s,c){const l=this.previous,h=this.events;let u=0;return p;function p(g){return l===126&&h[h.length-1][1].type!=="characterEscape"?c(g):(a.enter("strikethroughSequenceTemporary"),y(g))}function y(g){const k=W0(l);if(g===126)return u>1?c(g):(a.consume(g),u++,y);if(u<2&&!n)return c(g);const x=a.exit("strikethroughSequenceTemporary"),v=W0(g);return x._open=!v||v===2&&!!k,x._close=!k||k===2&&!!v,s(g)}}}class tnt{constructor(){this.map=[]}add(t,n,o){nnt(this,t,n,o)}consume(t){if(this.map.sort(function(i,a){return i[0]-a[0]}),this.map.length===0)return;let n=this.map.length;const o=[];for(;n>0;)n-=1,o.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];o.push(t.slice()),t.length=0;let r=o.pop();for(;r;){for(const i of r)t.push(i);r=o.pop()}this.map.length=0}}function nnt(e,t,n,o){let r=0;if(!(n===0&&o.length===0)){for(;r<e.map.length;){if(e.map[r][0]===t){e.map[r][1]+=n,e.map[r][2].push(...o);return}r+=1}e.map.push([t,n,o])}}function ont(e,t){let n=!1;const o=[];for(;t<e.length;){const r=e[t];if(n){if(r[0]==="enter")r[1].type==="tableContent"&&o.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(r[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const i=o.length-1;o[i]=o[i]==="left"?"center":"right"}}else if(r[1].type==="tableDelimiterRow")break}else r[0]==="enter"&&r[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return o}function rnt(){return{flow:{null:{name:"table",tokenize:int,resolveAll:ant}}}}function int(e,t,n){const o=this;let r=0,i=0,a;return s;function s(A){let E=o.events.length-1;for(;E>-1;){const $=o.events[E][1].type;if($==="lineEnding"||$==="linePrefix")E--;else break}const z=E>-1?o.events[E][1].type:null,U=z==="tableHead"||z==="tableRow"?_:c;return U===_&&o.parser.lazy[o.now().line]?n(A):U(A)}function c(A){return e.enter("tableHead"),e.enter("tableRow"),l(A)}function l(A){return A===124||(a=!0,i+=1),h(A)}function h(A){return A===null?n(A):Pe(A)?i>1?(i=0,o.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(A),e.exit("lineEnding"),y):n(A):Xe(A)?ot(e,h,"whitespace")(A):(i+=1,a&&(a=!1,r+=1),A===124?(e.enter("tableCellDivider"),e.consume(A),e.exit("tableCellDivider"),a=!0,h):(e.enter("data"),u(A)))}function u(A){return A===null||A===124||pt(A)?(e.exit("data"),h(A)):(e.consume(A),A===92?p:u)}function p(A){return A===92||A===124?(e.consume(A),u):u(A)}function y(A){return o.interrupt=!1,o.parser.lazy[o.now().line]?n(A):(e.enter("tableDelimiterRow"),a=!1,Xe(A)?ot(e,g,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(A):g(A))}function g(A){return A===45||A===58?x(A):A===124?(a=!0,e.enter("tableCellDivider"),e.consume(A),e.exit("tableCellDivider"),k):C(A)}function k(A){return Xe(A)?ot(e,x,"whitespace")(A):x(A)}function x(A){return A===58?(i+=1,a=!0,e.enter("tableDelimiterMarker"),e.consume(A),e.exit("tableDelimiterMarker"),v):A===45?(i+=1,v(A)):A===null||Pe(A)?b(A):C(A)}function v(A){return A===45?(e.enter("tableDelimiterFiller"),M(A)):C(A)}function M(A){return A===45?(e.consume(A),M):A===58?(a=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(A),e.exit("tableDelimiterMarker"),w):(e.exit("tableDelimiterFiller"),w(A))}function w(A){return Xe(A)?ot(e,b,"whitespace")(A):b(A)}function b(A){return A===124?g(A):A===null||Pe(A)?!a||r!==i?C(A):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(A)):C(A)}function C(A){return n(A)}function _(A){return e.enter("tableRow"),S(A)}function S(A){return A===124?(e.enter("tableCellDivider"),e.consume(A),e.exit("tableCellDivider"),S):A===null||Pe(A)?(e.exit("tableRow"),t(A)):Xe(A)?ot(e,S,"whitespace")(A):(e.enter("data"),N(A))}function N(A){return A===null||A===124||pt(A)?(e.exit("data"),S(A)):(e.consume(A),A===92?P:N)}function P(A){return A===92||A===124?(e.consume(A),N):N(A)}}function ant(e,t){let n=-1,o=!0,r=0,i=[0,0,0,0],a=[0,0,0,0],s=!1,c=0,l,h,u;const p=new tnt;for(;++n<e.length;){const y=e[n],g=y[1];y[0]==="enter"?g.type==="tableHead"?(s=!1,c!==0&&(yK(p,t,c,l,h),h=void 0,c=0),l={type:"table",start:Object.assign({},g.start),end:Object.assign({},g.end)},p.add(n,0,[["enter",l,t]])):g.type==="tableRow"||g.type==="tableDelimiterRow"?(o=!0,u=void 0,i=[0,0,0,0],a=[0,n+1,0,0],s&&(s=!1,h={type:"tableBody",start:Object.assign({},g.start),end:Object.assign({},g.end)},p.add(n,0,[["enter",h,t]])),r=g.type==="tableDelimiterRow"?2:h?3:1):r&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")?(o=!1,a[2]===0&&(i[1]!==0&&(a[0]=a[1],u=Xp(p,t,i,r,void 0,u),i=[0,0,0,0]),a[2]=n)):g.type==="tableCellDivider"&&(o?o=!1:(i[1]!==0&&(a[0]=a[1],u=Xp(p,t,i,r,void 0,u)),i=a,a=[i[1],n,0,0])):g.type==="tableHead"?(s=!0,c=n):g.type==="tableRow"||g.type==="tableDelimiterRow"?(c=n,i[1]!==0?(a[0]=a[1],u=Xp(p,t,i,r,n,u)):a[1]!==0&&(u=Xp(p,t,a,r,n,u)),r=0):r&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")&&(a[3]=n)}for(c!==0&&yK(p,t,c,l,h),p.consume(t.events),n=-1;++n<t.events.length;){const y=t.events[n];y[0]==="enter"&&y[1].type==="table"&&(y[1]._align=ont(t.events,n))}return e}function Xp(e,t,n,o,r,i){const a=o===1?"tableHeader":o===2?"tableDelimiter":"tableData",s="tableContent";n[0]!==0&&(i.end=Object.assign({},Ru(t.events,n[0])),e.add(n[0],0,[["exit",i,t]]));const c=Ru(t.events,n[1]);if(i={type:a,start:Object.assign({},c),end:Object.assign({},c)},e.add(n[1],0,[["enter",i,t]]),n[2]!==0){const l=Ru(t.events,n[2]),h=Ru(t.events,n[3]),u={type:s,start:Object.assign({},l),end:Object.assign({},h)};if(e.add(n[2],0,[["enter",u,t]]),o!==2){const p=t.events[n[2]],y=t.events[n[3]];if(p[1].end=Object.assign({},y[1].end),p[1].type="chunkText",p[1].contentType="text",n[3]>n[2]+1){const g=n[2]+1,k=n[3]-n[2]-1;e.add(g,k,[])}}e.add(n[3]+1,0,[["exit",u,t]])}return r!==void 0&&(i.end=Object.assign({},Ru(t.events,r)),e.add(r,0,[["exit",i,t]]),i=void 0),i}function yK(e,t,n,o,r){const i=[],a=Ru(t.events,n);r&&(r.end=Object.assign({},a),i.push(["exit",r,t])),o.end=Object.assign({},a),i.push(["exit",o,t]),e.add(n+1,0,i)}function Ru(e,t){const n=e[t],o=n[0]==="enter"?"start":"end";return n[1][o]}const snt={name:"tasklistCheck",tokenize:lnt};function cnt(){return{text:{91:snt}}}function lnt(e,t,n){const o=this;return r;function r(c){return o.previous!==null||!o._gfmTasklistFirstContentOfListItem?n(c):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),i)}function i(c){return pt(c)?(e.enter("taskListCheckValueUnchecked"),e.consume(c),e.exit("taskListCheckValueUnchecked"),a):c===88||c===120?(e.enter("taskListCheckValueChecked"),e.consume(c),e.exit("taskListCheckValueChecked"),a):n(c)}function a(c){return c===93?(e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),s):n(c)}function s(c){return Pe(c)?t(c):Xe(c)?e.check({tokenize:dnt},t,n)(c):n(c)}}function dnt(e,t,n){return ot(e,o,"whitespace");function o(r){return r===null?n(r):t(r)}}function unt(e){return pre([Rtt(),Wtt(),ent(e),rnt(),cnt()])}const hnt={};function fnt(e){const t=this,n=e||hnt,o=t.data(),r=o.micromarkExtensions||(o.micromarkExtensions=[]),i=o.fromMarkdownExtensions||(o.fromMarkdownExtensions=[]),a=o.toMarkdownExtensions||(o.toMarkdownExtensions=[]);r.push(unt(n)),i.push(jtt()),a.push($tt(n))}let Zp=null,pnt=0;function ynt(){return Zp||(Zp=Z0(()=>import("./mermaid.core-eyZWidoa.js").then(e=>e.ak),__vite__mapDeps([8,9,1])).then(e=>{const t=e;return t.default??t}),Zp)}function mK(){var e;return typeof document>"u"?!1:document.documentElement.classList.contains("dark")||(e=document.body)!=null&&e.classList.contains("dark")?!0:!!document.querySelector(".dark")}function gK({code:e,className:t}){const n=m.useRef(null),o=m.useRef(`seeflow-mermaid-${++pnt}`),[r,i]=m.useState(null),[a,s]=m.useState(()=>mK());return m.useEffect(()=>{if(typeof document>"u")return;const c=()=>s(mK()),l=new MutationObserver(c);return l.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]}),document.body&&l.observe(document.body,{attributes:!0,attributeFilter:["class"]}),()=>l.disconnect()},[]),m.useEffect(()=>{let c=!1;return i(null),ynt().then(async l=>{l.initialize({startOnLoad:!1,theme:a?"dark":"default",securityLevel:"strict",fontFamily:'"Inter", ui-sans-serif, system-ui, sans-serif'});const h=`${o.current}-${a?"d":"l"}`,u=await l.render(h,e);if(c)return;const p=n.current;p&&(p.innerHTML=u.svg)}).catch(l=>{c||i(l instanceof Error?l.message:String(l))}),()=>{c=!0}},[e,a]),r?f.jsx("pre",{"data-testid":"detail-panel-mermaid-fallback","data-mermaid-error":"true",title:r,className:te("sf:mb-2 sf:overflow-x-auto sf:rounded sf:bg-muted/60 sf:px-2 sf:py-1 sf:font-mono sf:text-xs sf:text-foreground sf:last:mb-0",t),children:f.jsx("code",{children:e})}):f.jsx("div",{ref:n,"data-testid":"detail-panel-mermaid","data-mermaid-theme":a?"dark":"light",role:"img","aria-label":"Mermaid diagram",className:te("sf:mb-2 sf:overflow-x-auto sf:rounded sf:bg-muted/30 sf:px-3 sf:py-2 sf:text-foreground sf:last:mb-0",t)})}function mnt({flowId:e,node:t,connector:n,adapter:o,onNameChange:r,onDescriptionChange:i,onDetailChange:a,onIconChange:s,statusReport:c,open:l=!0,onClose:h}){const u=(t==null?void 0:t.type)==="text",p=(t==null?void 0:t.type)==="ellipse"||(t==null?void 0:t.type)==="sticky",y=u?null:t,g=y&&"name"in y.data?y.data.name??"":"",k=(y==null?void 0:y.data.description)??"",x=(y==null?void 0:y.data.detail)??"",v=y!==null&&!p,M=y!==null&&(y.type==="rectangle"||y.type==="component"),w=M&&typeof s=="function",b=M&&y&&"icon"in y.data?y.data.icon??null:null,[C,_]=m.useState(()=>SHe()),S=A=>{A.preventDefault(),NHe(C,A.clientX,{onWidth:_,onCommit:LHe})};m.useEffect(()=>{const A=E=>{var U;if(E.key!=="Escape")return;const z=document.activeElement;(U=z==null?void 0:z.getAttribute("data-testid"))!=null&&U.endsWith("-editor")||h()};return window.addEventListener("keydown",A),()=>window.removeEventListener("keydown",A)},[h]);const N={width:l?C:0,borderLeftWidth:l?"var(--detail-panel-border-left)":0,transition:"width 220ms ease-out, border-left-width 220ms ease-out"},P={width:C,boxShadow:"var(--detail-panel-shadow)"};return f.jsx("aside",{"aria-label":"Inspector","data-testid":"detail-panel","data-state":l?"open":"closed",style:N,className:"sf:relative sf:flex sf:h-full sf:flex-shrink-0 sf:flex-col sf:overflow-hidden sf:border-border",children:f.jsxs("div",{style:P,className:"sf:relative sf:flex sf:h-full sf:flex-shrink-0 sf:flex-col sf:overflow-y-auto sf:bg-card/94 sf:p-6 sf:backdrop-blur-[14px]",children:[f.jsx("div",{"aria-label":"Resize detail panel",onPointerDown:S,"data-testid":"detail-panel-resize-handle",className:"sf:absolute sf:inset-y-0 sf:left-0 sf:z-10 sf:hidden sf:w-1.5 sf:cursor-col-resize sf:bg-transparent sf:transition-colors sf:hover:bg-border sf:sm:block"}),f.jsxs("button",{type:"button",onClick:h,"aria-label":"Close inspector","data-testid":"detail-panel-close",className:"sf:absolute sf:right-4 sf:top-4 sf:z-10 sf:inline-flex sf:h-7 sf:w-7 sf:items-center sf:justify-center sf:rounded-sm sf:text-foreground/70 sf:opacity-70 sf:transition-opacity sf:hover:opacity-100 sf:focus:outline-hidden sf:focus:ring-2 sf:focus:ring-ring sf:focus:ring-offset-2",children:[f.jsx(s0,{className:"sf:h-4 sf:w-4"}),f.jsx("span",{className:"sf:sr-only",children:"Close"})]}),y?f.jsxs("div",{className:"sf:flex sf:flex-col sf:gap-4",children:[f.jsxs("div",{className:"sf:-mx-6 sf:-mt-6 sf:flex sf:flex-col sf:border-b sf:border-border/60 sf:bg-card/60 sf:px-6 sf:pb-2.5 sf:pt-3 sf:pr-12",children:[v?f.jsx("h2",{"data-testid":"detail-panel-title",className:"sf:text-lg sf:font-semibold sf:text-foreground",children:f.jsxs("div",{className:"sf:flex sf:items-center sf:gap-2",children:[w&&s?f.jsx(gnt,{nodeId:y.id,icon:b,onChange:s}):M&&b?f.jsx("span",{"data-testid":"detail-panel-icon-readonly","aria-hidden":!0,className:"sf:inline-flex sf:h-7 sf:w-7 sf:shrink-0 sf:items-center sf:justify-center sf:text-foreground/90",children:f.jsx(q0,{name:b,size:16})}):null,f.jsx("div",{className:"sf:min-w-0 sf:flex-1",children:f.jsx(bD,{nodeId:y.id,value:g,placeholder:"Name",multiline:!1,ariaLabel:"Name",testIdBase:"detail-panel-name",onSave:r,textClassName:"sf:text-lg sf:font-semibold sf:tracking-tight sf:text-foreground/95"})})]})}):f.jsx("h2",{"data-testid":"detail-panel-title",className:"sf:sr-only",children:y.id}),f.jsxs("p",{className:"sf:sr-only",children:[y.id," · ",y.type]})]}),f.jsxs("div",{className:"sf:mt-0 sf:flex sf:flex-col sf:gap-3",children:[c?f.jsx(wnt,{report:c}):null,f.jsx(bD,{nodeId:y.id,value:k,placeholder:"Short description shown on the node body",multiline:!0,ariaLabel:"Description",testIdBase:"detail-panel-description",onSave:i,textClassName:"sf:text-[13px] sf:leading-relaxed sf:text-muted-foreground sf:dark:text-zinc-400"}),f.jsx(bD,{nodeId:y.id,value:x,placeholder:"Long-form notes, context, anything…",multiline:!0,ariaLabel:"Detail",testIdBase:"detail-panel-detail",onSave:a,markdown:!0,textClassName:"sf:text-sm sf:leading-relaxed sf:text-foreground"}),y.type==="html"&&e?f.jsx(knt,{adapter:o,nodeId:y.id,htmlPath:"view.html"}):null]})]}):n?f.jsxs("div",{className:"sf:flex sf:flex-col sf:gap-4",children:[f.jsxs("div",{className:"sf:-mx-6 sf:-mt-6 sf:flex sf:flex-col sf:border-b sf:border-border/60 sf:bg-card/60 sf:px-6 sf:pb-2.5 sf:pt-3 sf:pr-12",children:[f.jsx("h2",{"data-testid":"detail-panel-title",className:"sf:text-lg sf:font-semibold sf:tracking-tight sf:text-foreground/95",children:n.label??"Connector"}),f.jsx("p",{className:"sf:sr-only",children:n.id})]}),f.jsx("div",{className:"sf:mt-0 sf:flex sf:flex-col sf:gap-3",children:f.jsx(bnt,{connector:n})})]}):f.jsx("div",{"data-testid":"detail-panel-empty",className:"sf:text-muted-foreground sf:text-sm",children:"Select a node to inspect."})]})})}function bD({nodeId:e,value:t,placeholder:n,multiline:o,ariaLabel:r,testIdBase:i,onSave:a,textClassName:s,markdown:c=!1}){const[l,h]=m.useState(!1),u=m.useRef(null),p=m.useRef(!1);m.useEffect(()=>{if(!l)return;const C=u.current;if(!C)return;C.textContent=t,C.focus();const _=window.getSelection();if(_){const S=document.createRange();S.selectNodeContents(C),S.collapse(!1),_.removeAllRanges(),_.addRange(S)}},[l,t]);const y=t==="";if(!a)return f.jsx("div",{"data-testid":i,"aria-label":r,className:te("sf:w-full sf:rounded-md sf:px-2 sf:py-1.5 sf:text-sm",y?"sf:italic sf:text-muted-foreground/50":"text-foreground",!c&&"sf:whitespace-pre-wrap sf:wrap-break-word",s),children:y?n:c?f.jsx(kK,{value:t}):t});const g=()=>{const C=u.current,_=C?o?C.innerText:C.textContent??"":t;a(e,_),h(!1)},k=()=>{h(!1)},x=C=>{if(C.stopPropagation(),C.nativeEvent.stopPropagation(),C.key==="Escape"){C.preventDefault(),p.current=!0,k();return}if(C.key==="Enter"){if(C.preventDefault(),C.shiftKey||!o){g();return}document.execCommand("insertText",!1,`
8541
+ `))}function c(y,g,k,x){const v=k.enter("tableCell"),M=k.enter("phrasing"),w=k.containerPhrasing(y,{...x,before:i,after:i});return M(),v(),w}function l(y,g){return Fet(y,{align:g,alignDelimiters:o,padding:n,stringLength:r})}function h(y,g,k){const x=y.children;let v=-1;const M=[],w=g.enter("table");for(;++v<x.length;)M[v]=u(x[v],g,k);return w(),M}function u(y,g,k){const x=y.children;let v=-1;const M=[],w=g.enter("tableRow");for(;++v<x.length;)M[v]=c(x[v],y,g,k);return w(),M}function p(y,g,k){let x=Zre.inlineCode(y,g,k);return k.stack.includes("tableCell")&&(x=x.replace(/\|/g,"\\$&")),x}}function Ntt(){return{exit:{taskListCheckValueChecked:pK,taskListCheckValueUnchecked:pK,paragraph:Att}}}function Itt(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Ett}}}function pK(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function Att(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const o=n.children[0];if(o&&o.type==="text"){const r=t.children;let i=-1,a;for(;++i<r.length;){const s=r[i];if(s.type==="paragraph"){a=s;break}}a===n&&(o.value=o.value.slice(1),o.value.length===0?n.children.shift():n.position&&o.position&&typeof o.position.start.offset=="number"&&(o.position.start.column++,o.position.start.offset++,n.position.start=Object.assign({},o.position.start)))}}this.exit(e)}function Ett(e,t,n,o){const r=e.children[0],i=typeof e.checked=="boolean"&&r&&r.type==="paragraph",a="["+(e.checked?"x":" ")+"] ",s=n.createTracker(o);i&&s.move(a);let c=Zre.listItem(e,t,n,{...o,...s.current()});return i&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),c;function l(h){return h+a}}function jtt(){return[cet(),Eet(),zet(),wtt(),Ntt()]}function $tt(e){return{extensions:[det(),jet(e),Ret(),Ltt(e),Itt()]}}const Ptt={tokenize:Ott,partial:!0},Yre={tokenize:Ftt,partial:!0},Qre={tokenize:qtt,partial:!0},Jre={tokenize:Vtt,partial:!0},ztt={tokenize:Btt,partial:!0},eie={name:"wwwAutolink",tokenize:Dtt,previous:nie},tie={name:"protocolAutolink",tokenize:Htt,previous:oie},qi={name:"emailAutolink",tokenize:Ttt,previous:rie},ti={};function Rtt(){return{text:ti}}let ms=48;for(;ms<123;)ti[ms]=qi,ms++,ms===58?ms=65:ms===91&&(ms=97);ti[43]=qi;ti[45]=qi;ti[46]=qi;ti[95]=qi;ti[72]=[qi,tie];ti[104]=[qi,tie];ti[87]=[qi,eie];ti[119]=[qi,eie];function Ttt(e,t,n){const o=this;let r,i;return a;function a(u){return!jO(u)||!rie.call(o,o.previous)||lV(o.events)?n(u):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),s(u))}function s(u){return jO(u)?(e.consume(u),s):u===64?(e.consume(u),c):n(u)}function c(u){return u===46?e.check(ztt,h,l)(u):u===45||u===95||wn(u)?(i=!0,e.consume(u),c):h(u)}function l(u){return e.consume(u),r=!0,c}function h(u){return i&&r&&An(o.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(u)):n(u)}}function Dtt(e,t,n){const o=this;return r;function r(a){return a!==87&&a!==119||!nie.call(o,o.previous)||lV(o.events)?n(a):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(Ptt,e.attempt(Yre,e.attempt(Qre,i),n),n)(a))}function i(a){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(a)}}function Htt(e,t,n){const o=this;let r="",i=!1;return a;function a(u){return(u===72||u===104)&&oie.call(o,o.previous)&&!lV(o.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),r+=String.fromCodePoint(u),e.consume(u),s):n(u)}function s(u){if(An(u)&&r.length<5)return r+=String.fromCodePoint(u),e.consume(u),s;if(u===58){const p=r.toLowerCase();if(p==="http"||p==="https")return e.consume(u),c}return n(u)}function c(u){return u===47?(e.consume(u),i?l:(i=!0,c)):n(u)}function l(u){return u===null||bz(u)||pt(u)||Ud(u)||RR(u)?n(u):e.attempt(Yre,e.attempt(Qre,h),n)(u)}function h(u){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(u)}}function Ott(e,t,n){let o=0;return r;function r(a){return(a===87||a===119)&&o<3?(o++,e.consume(a),r):a===46&&o===3?(e.consume(a),i):n(a)}function i(a){return a===null?n(a):t(a)}}function Ftt(e,t,n){let o,r,i;return a;function a(l){return l===46||l===95?e.check(Jre,c,s)(l):l===null||pt(l)||Ud(l)||l!==45&&RR(l)?c(l):(i=!0,e.consume(l),a)}function s(l){return l===95?o=!0:(r=o,o=void 0),e.consume(l),a}function c(l){return r||o||!i?n(l):t(l)}}function qtt(e,t){let n=0,o=0;return r;function r(a){return a===40?(n++,e.consume(a),r):a===41&&o<n?i(a):a===33||a===34||a===38||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===60||a===63||a===93||a===95||a===126?e.check(Jre,t,i)(a):a===null||pt(a)||Ud(a)?t(a):(e.consume(a),r)}function i(a){return a===41&&o++,e.consume(a),r}}function Vtt(e,t,n){return o;function o(s){return s===33||s===34||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===63||s===95||s===126?(e.consume(s),o):s===38?(e.consume(s),i):s===93?(e.consume(s),r):s===60||s===null||pt(s)||Ud(s)?t(s):n(s)}function r(s){return s===null||s===40||s===91||pt(s)||Ud(s)?t(s):o(s)}function i(s){return An(s)?a(s):n(s)}function a(s){return s===59?(e.consume(s),o):An(s)?(e.consume(s),a):n(s)}}function Btt(e,t,n){return o;function o(i){return e.consume(i),r}function r(i){return wn(i)?n(i):t(i)}}function nie(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||pt(e)}function oie(e){return!An(e)}function rie(e){return!(e===47||jO(e))}function jO(e){return e===43||e===45||e===46||e===95||wn(e)}function lV(e){let t=e.length,n=!1;for(;t--;){const o=e[t][1];if((o.type==="labelLink"||o.type==="labelImage")&&!o._balanced){n=!0;break}if(o._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const Utt={tokenize:Jtt,partial:!0};function Wtt(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:Ztt,continuation:{tokenize:Ytt},exit:Qtt}},text:{91:{name:"gfmFootnoteCall",tokenize:Xtt},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:Gtt,resolveTo:Ktt}}}}function Gtt(e,t,n){const o=this;let r=o.events.length;const i=o.parser.gfmFootnotes||(o.parser.gfmFootnotes=[]);let a;for(;r--;){const c=o.events[r][1];if(c.type==="labelImage"){a=c;break}if(c.type==="gfmFootnoteCall"||c.type==="labelLink"||c.type==="label"||c.type==="image"||c.type==="link")break}return s;function s(c){if(!a||!a._balanced)return n(c);const l=tr(o.sliceSerialize({start:a.end,end:o.now()}));return l.codePointAt(0)!==94||!i.includes(l.slice(1))?n(c):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),t(c))}}function Ktt(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const o={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},r={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};r.end.column++,r.end.offset++,r.end._bufferIndex++;const i={type:"gfmFootnoteCallString",start:Object.assign({},r.end),end:Object.assign({},e[e.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},i.start),end:Object.assign({},i.end)},s=[e[n+1],e[n+2],["enter",o,t],e[n+3],e[n+4],["enter",r,t],["exit",r,t],["enter",i,t],["enter",a,t],["exit",a,t],["exit",i,t],e[e.length-2],e[e.length-1],["exit",o,t]];return e.splice(n,e.length-n+1,...s),e}function Xtt(e,t,n){const o=this,r=o.parser.gfmFootnotes||(o.parser.gfmFootnotes=[]);let i=0,a;return s;function s(u){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(u),e.exit("gfmFootnoteCallLabelMarker"),c}function c(u){return u!==94?n(u):(e.enter("gfmFootnoteCallMarker"),e.consume(u),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",l)}function l(u){if(i>999||u===93&&!a||u===null||u===91||pt(u))return n(u);if(u===93){e.exit("chunkString");const p=e.exit("gfmFootnoteCallString");return r.includes(tr(o.sliceSerialize(p)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(u),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(u)}return pt(u)||(a=!0),i++,e.consume(u),u===92?h:l}function h(u){return u===91||u===92||u===93?(e.consume(u),i++,l):l(u)}}function Ztt(e,t,n){const o=this,r=o.parser.gfmFootnotes||(o.parser.gfmFootnotes=[]);let i,a=0,s;return c;function c(g){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionLabelMarker"),l}function l(g){return g===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",h):n(g)}function h(g){if(a>999||g===93&&!s||g===null||g===91||pt(g))return n(g);if(g===93){e.exit("chunkString");const k=e.exit("gfmFootnoteDefinitionLabelString");return i=tr(o.sliceSerialize(k)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p}return pt(g)||(s=!0),a++,e.consume(g),g===92?u:h}function u(g){return g===91||g===92||g===93?(e.consume(g),a++,h):h(g)}function p(g){return g===58?(e.enter("definitionMarker"),e.consume(g),e.exit("definitionMarker"),r.includes(i)||r.push(i),ot(e,y,"gfmFootnoteDefinitionWhitespace")):n(g)}function y(g){return t(g)}}function Ytt(e,t,n){return e.check(Bf,t,e.attempt(Utt,t,n))}function Qtt(e){e.exit("gfmFootnoteDefinition")}function Jtt(e,t,n){const o=this;return ot(e,r,"gfmFootnoteDefinitionIndent",5);function r(i){const a=o.events[o.events.length-1];return a&&a[1].type==="gfmFootnoteDefinitionIndent"&&a[2].sliceSerialize(a[1],!0).length===4?t(i):n(i)}}function ent(e){let n=(e||{}).singleTilde;const o={name:"strikethrough",tokenize:i,resolveAll:r};return n==null&&(n=!0),{text:{126:o},insideSpan:{null:[o]},attentionMarkers:{null:[126]}};function r(a,s){let c=-1;for(;++c<a.length;)if(a[c][0]==="enter"&&a[c][1].type==="strikethroughSequenceTemporary"&&a[c][1]._close){let l=c;for(;l--;)if(a[l][0]==="exit"&&a[l][1].type==="strikethroughSequenceTemporary"&&a[l][1]._open&&a[c][1].end.offset-a[c][1].start.offset===a[l][1].end.offset-a[l][1].start.offset){a[c][1].type="strikethroughSequence",a[l][1].type="strikethroughSequence";const h={type:"strikethrough",start:Object.assign({},a[l][1].start),end:Object.assign({},a[c][1].end)},u={type:"strikethroughText",start:Object.assign({},a[l][1].end),end:Object.assign({},a[c][1].start)},p=[["enter",h,s],["enter",a[l][1],s],["exit",a[l][1],s],["enter",u,s]],y=s.parser.constructs.insideSpan.null;y&&ho(p,p.length,0,TR(y,a.slice(l+1,c),s)),ho(p,p.length,0,[["exit",u,s],["enter",a[c][1],s],["exit",a[c][1],s],["exit",h,s]]),ho(a,l-1,c-l+3,p),c=l+p.length-2;break}}for(c=-1;++c<a.length;)a[c][1].type==="strikethroughSequenceTemporary"&&(a[c][1].type="data");return a}function i(a,s,c){const l=this.previous,h=this.events;let u=0;return p;function p(g){return l===126&&h[h.length-1][1].type!=="characterEscape"?c(g):(a.enter("strikethroughSequenceTemporary"),y(g))}function y(g){const k=W0(l);if(g===126)return u>1?c(g):(a.consume(g),u++,y);if(u<2&&!n)return c(g);const x=a.exit("strikethroughSequenceTemporary"),v=W0(g);return x._open=!v||v===2&&!!k,x._close=!k||k===2&&!!v,s(g)}}}class tnt{constructor(){this.map=[]}add(t,n,o){nnt(this,t,n,o)}consume(t){if(this.map.sort(function(i,a){return i[0]-a[0]}),this.map.length===0)return;let n=this.map.length;const o=[];for(;n>0;)n-=1,o.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];o.push(t.slice()),t.length=0;let r=o.pop();for(;r;){for(const i of r)t.push(i);r=o.pop()}this.map.length=0}}function nnt(e,t,n,o){let r=0;if(!(n===0&&o.length===0)){for(;r<e.map.length;){if(e.map[r][0]===t){e.map[r][1]+=n,e.map[r][2].push(...o);return}r+=1}e.map.push([t,n,o])}}function ont(e,t){let n=!1;const o=[];for(;t<e.length;){const r=e[t];if(n){if(r[0]==="enter")r[1].type==="tableContent"&&o.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(r[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const i=o.length-1;o[i]=o[i]==="left"?"center":"right"}}else if(r[1].type==="tableDelimiterRow")break}else r[0]==="enter"&&r[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return o}function rnt(){return{flow:{null:{name:"table",tokenize:int,resolveAll:ant}}}}function int(e,t,n){const o=this;let r=0,i=0,a;return s;function s(A){let E=o.events.length-1;for(;E>-1;){const $=o.events[E][1].type;if($==="lineEnding"||$==="linePrefix")E--;else break}const z=E>-1?o.events[E][1].type:null,U=z==="tableHead"||z==="tableRow"?_:c;return U===_&&o.parser.lazy[o.now().line]?n(A):U(A)}function c(A){return e.enter("tableHead"),e.enter("tableRow"),l(A)}function l(A){return A===124||(a=!0,i+=1),h(A)}function h(A){return A===null?n(A):Pe(A)?i>1?(i=0,o.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(A),e.exit("lineEnding"),y):n(A):Xe(A)?ot(e,h,"whitespace")(A):(i+=1,a&&(a=!1,r+=1),A===124?(e.enter("tableCellDivider"),e.consume(A),e.exit("tableCellDivider"),a=!0,h):(e.enter("data"),u(A)))}function u(A){return A===null||A===124||pt(A)?(e.exit("data"),h(A)):(e.consume(A),A===92?p:u)}function p(A){return A===92||A===124?(e.consume(A),u):u(A)}function y(A){return o.interrupt=!1,o.parser.lazy[o.now().line]?n(A):(e.enter("tableDelimiterRow"),a=!1,Xe(A)?ot(e,g,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(A):g(A))}function g(A){return A===45||A===58?x(A):A===124?(a=!0,e.enter("tableCellDivider"),e.consume(A),e.exit("tableCellDivider"),k):C(A)}function k(A){return Xe(A)?ot(e,x,"whitespace")(A):x(A)}function x(A){return A===58?(i+=1,a=!0,e.enter("tableDelimiterMarker"),e.consume(A),e.exit("tableDelimiterMarker"),v):A===45?(i+=1,v(A)):A===null||Pe(A)?b(A):C(A)}function v(A){return A===45?(e.enter("tableDelimiterFiller"),M(A)):C(A)}function M(A){return A===45?(e.consume(A),M):A===58?(a=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(A),e.exit("tableDelimiterMarker"),w):(e.exit("tableDelimiterFiller"),w(A))}function w(A){return Xe(A)?ot(e,b,"whitespace")(A):b(A)}function b(A){return A===124?g(A):A===null||Pe(A)?!a||r!==i?C(A):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(A)):C(A)}function C(A){return n(A)}function _(A){return e.enter("tableRow"),S(A)}function S(A){return A===124?(e.enter("tableCellDivider"),e.consume(A),e.exit("tableCellDivider"),S):A===null||Pe(A)?(e.exit("tableRow"),t(A)):Xe(A)?ot(e,S,"whitespace")(A):(e.enter("data"),N(A))}function N(A){return A===null||A===124||pt(A)?(e.exit("data"),S(A)):(e.consume(A),A===92?P:N)}function P(A){return A===92||A===124?(e.consume(A),N):N(A)}}function ant(e,t){let n=-1,o=!0,r=0,i=[0,0,0,0],a=[0,0,0,0],s=!1,c=0,l,h,u;const p=new tnt;for(;++n<e.length;){const y=e[n],g=y[1];y[0]==="enter"?g.type==="tableHead"?(s=!1,c!==0&&(yK(p,t,c,l,h),h=void 0,c=0),l={type:"table",start:Object.assign({},g.start),end:Object.assign({},g.end)},p.add(n,0,[["enter",l,t]])):g.type==="tableRow"||g.type==="tableDelimiterRow"?(o=!0,u=void 0,i=[0,0,0,0],a=[0,n+1,0,0],s&&(s=!1,h={type:"tableBody",start:Object.assign({},g.start),end:Object.assign({},g.end)},p.add(n,0,[["enter",h,t]])),r=g.type==="tableDelimiterRow"?2:h?3:1):r&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")?(o=!1,a[2]===0&&(i[1]!==0&&(a[0]=a[1],u=Xp(p,t,i,r,void 0,u),i=[0,0,0,0]),a[2]=n)):g.type==="tableCellDivider"&&(o?o=!1:(i[1]!==0&&(a[0]=a[1],u=Xp(p,t,i,r,void 0,u)),i=a,a=[i[1],n,0,0])):g.type==="tableHead"?(s=!0,c=n):g.type==="tableRow"||g.type==="tableDelimiterRow"?(c=n,i[1]!==0?(a[0]=a[1],u=Xp(p,t,i,r,n,u)):a[1]!==0&&(u=Xp(p,t,a,r,n,u)),r=0):r&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")&&(a[3]=n)}for(c!==0&&yK(p,t,c,l,h),p.consume(t.events),n=-1;++n<t.events.length;){const y=t.events[n];y[0]==="enter"&&y[1].type==="table"&&(y[1]._align=ont(t.events,n))}return e}function Xp(e,t,n,o,r,i){const a=o===1?"tableHeader":o===2?"tableDelimiter":"tableData",s="tableContent";n[0]!==0&&(i.end=Object.assign({},Ru(t.events,n[0])),e.add(n[0],0,[["exit",i,t]]));const c=Ru(t.events,n[1]);if(i={type:a,start:Object.assign({},c),end:Object.assign({},c)},e.add(n[1],0,[["enter",i,t]]),n[2]!==0){const l=Ru(t.events,n[2]),h=Ru(t.events,n[3]),u={type:s,start:Object.assign({},l),end:Object.assign({},h)};if(e.add(n[2],0,[["enter",u,t]]),o!==2){const p=t.events[n[2]],y=t.events[n[3]];if(p[1].end=Object.assign({},y[1].end),p[1].type="chunkText",p[1].contentType="text",n[3]>n[2]+1){const g=n[2]+1,k=n[3]-n[2]-1;e.add(g,k,[])}}e.add(n[3]+1,0,[["exit",u,t]])}return r!==void 0&&(i.end=Object.assign({},Ru(t.events,r)),e.add(r,0,[["exit",i,t]]),i=void 0),i}function yK(e,t,n,o,r){const i=[],a=Ru(t.events,n);r&&(r.end=Object.assign({},a),i.push(["exit",r,t])),o.end=Object.assign({},a),i.push(["exit",o,t]),e.add(n+1,0,i)}function Ru(e,t){const n=e[t],o=n[0]==="enter"?"start":"end";return n[1][o]}const snt={name:"tasklistCheck",tokenize:lnt};function cnt(){return{text:{91:snt}}}function lnt(e,t,n){const o=this;return r;function r(c){return o.previous!==null||!o._gfmTasklistFirstContentOfListItem?n(c):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),i)}function i(c){return pt(c)?(e.enter("taskListCheckValueUnchecked"),e.consume(c),e.exit("taskListCheckValueUnchecked"),a):c===88||c===120?(e.enter("taskListCheckValueChecked"),e.consume(c),e.exit("taskListCheckValueChecked"),a):n(c)}function a(c){return c===93?(e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),s):n(c)}function s(c){return Pe(c)?t(c):Xe(c)?e.check({tokenize:dnt},t,n)(c):n(c)}}function dnt(e,t,n){return ot(e,o,"whitespace");function o(r){return r===null?n(r):t(r)}}function unt(e){return pre([Rtt(),Wtt(),ent(e),rnt(),cnt()])}const hnt={};function fnt(e){const t=this,n=e||hnt,o=t.data(),r=o.micromarkExtensions||(o.micromarkExtensions=[]),i=o.fromMarkdownExtensions||(o.fromMarkdownExtensions=[]),a=o.toMarkdownExtensions||(o.toMarkdownExtensions=[]);r.push(unt(n)),i.push(jtt()),a.push($tt(n))}let Zp=null,pnt=0;function ynt(){return Zp||(Zp=Z0(()=>import("./mermaid.core-CTeg8SMj.js").then(e=>e.ak),__vite__mapDeps([8,9,1])).then(e=>{const t=e;return t.default??t}),Zp)}function mK(){var e;return typeof document>"u"?!1:document.documentElement.classList.contains("dark")||(e=document.body)!=null&&e.classList.contains("dark")?!0:!!document.querySelector(".dark")}function gK({code:e,className:t}){const n=m.useRef(null),o=m.useRef(`seeflow-mermaid-${++pnt}`),[r,i]=m.useState(null),[a,s]=m.useState(()=>mK());return m.useEffect(()=>{if(typeof document>"u")return;const c=()=>s(mK()),l=new MutationObserver(c);return l.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]}),document.body&&l.observe(document.body,{attributes:!0,attributeFilter:["class"]}),()=>l.disconnect()},[]),m.useEffect(()=>{let c=!1;return i(null),ynt().then(async l=>{l.initialize({startOnLoad:!1,theme:a?"dark":"default",securityLevel:"strict",fontFamily:'"Inter", ui-sans-serif, system-ui, sans-serif'});const h=`${o.current}-${a?"d":"l"}`,u=await l.render(h,e);if(c)return;const p=n.current;p&&(p.innerHTML=u.svg)}).catch(l=>{c||i(l instanceof Error?l.message:String(l))}),()=>{c=!0}},[e,a]),r?f.jsx("pre",{"data-testid":"detail-panel-mermaid-fallback","data-mermaid-error":"true",title:r,className:te("sf:mb-2 sf:overflow-x-auto sf:rounded sf:bg-muted/60 sf:px-2 sf:py-1 sf:font-mono sf:text-xs sf:text-foreground sf:last:mb-0",t),children:f.jsx("code",{children:e})}):f.jsx("div",{ref:n,"data-testid":"detail-panel-mermaid","data-mermaid-theme":a?"dark":"light",role:"img","aria-label":"Mermaid diagram",className:te("sf:mb-2 sf:overflow-x-auto sf:rounded sf:bg-muted/30 sf:px-3 sf:py-2 sf:text-foreground sf:last:mb-0",t)})}function mnt({flowId:e,node:t,connector:n,adapter:o,onNameChange:r,onDescriptionChange:i,onDetailChange:a,onIconChange:s,statusReport:c,open:l=!0,onClose:h}){const u=(t==null?void 0:t.type)==="text",p=(t==null?void 0:t.type)==="ellipse"||(t==null?void 0:t.type)==="sticky",y=u?null:t,g=y&&"name"in y.data?y.data.name??"":"",k=(y==null?void 0:y.data.description)??"",x=(y==null?void 0:y.data.detail)??"",v=y!==null&&!p,M=y!==null&&(y.type==="rectangle"||y.type==="component"),w=M&&typeof s=="function",b=M&&y&&"icon"in y.data?y.data.icon??null:null,[C,_]=m.useState(()=>SHe()),S=A=>{A.preventDefault(),NHe(C,A.clientX,{onWidth:_,onCommit:LHe})};m.useEffect(()=>{const A=E=>{var U;if(E.key!=="Escape")return;const z=document.activeElement;(U=z==null?void 0:z.getAttribute("data-testid"))!=null&&U.endsWith("-editor")||h()};return window.addEventListener("keydown",A),()=>window.removeEventListener("keydown",A)},[h]);const N={width:l?C:0,borderLeftWidth:l?"var(--detail-panel-border-left)":0,transition:"width 220ms ease-out, border-left-width 220ms ease-out"},P={width:C,boxShadow:"var(--detail-panel-shadow)"};return f.jsx("aside",{"aria-label":"Inspector","data-testid":"detail-panel","data-state":l?"open":"closed",style:N,className:"sf:relative sf:flex sf:h-full sf:flex-shrink-0 sf:flex-col sf:overflow-hidden sf:border-border",children:f.jsxs("div",{style:P,className:"sf:relative sf:flex sf:h-full sf:flex-shrink-0 sf:flex-col sf:overflow-y-auto sf:bg-card/94 sf:p-6 sf:backdrop-blur-[14px]",children:[f.jsx("div",{"aria-label":"Resize detail panel",onPointerDown:S,"data-testid":"detail-panel-resize-handle",className:"sf:absolute sf:inset-y-0 sf:left-0 sf:z-10 sf:hidden sf:w-1.5 sf:cursor-col-resize sf:bg-transparent sf:transition-colors sf:hover:bg-border sf:sm:block"}),f.jsxs("button",{type:"button",onClick:h,"aria-label":"Close inspector","data-testid":"detail-panel-close",className:"sf:absolute sf:right-4 sf:top-4 sf:z-10 sf:inline-flex sf:h-7 sf:w-7 sf:items-center sf:justify-center sf:rounded-sm sf:text-foreground/70 sf:opacity-70 sf:transition-opacity sf:hover:opacity-100 sf:focus:outline-hidden sf:focus:ring-2 sf:focus:ring-ring sf:focus:ring-offset-2",children:[f.jsx(s0,{className:"sf:h-4 sf:w-4"}),f.jsx("span",{className:"sf:sr-only",children:"Close"})]}),y?f.jsxs("div",{className:"sf:flex sf:flex-col sf:gap-4",children:[f.jsxs("div",{className:"sf:-mx-6 sf:-mt-6 sf:flex sf:flex-col sf:border-b sf:border-border/60 sf:bg-card/60 sf:px-6 sf:pb-2.5 sf:pt-3 sf:pr-12",children:[v?f.jsx("h2",{"data-testid":"detail-panel-title",className:"sf:text-lg sf:font-semibold sf:text-foreground",children:f.jsxs("div",{className:"sf:flex sf:items-center sf:gap-2",children:[w&&s?f.jsx(gnt,{nodeId:y.id,icon:b,onChange:s}):M&&b?f.jsx("span",{"data-testid":"detail-panel-icon-readonly","aria-hidden":!0,className:"sf:inline-flex sf:h-7 sf:w-7 sf:shrink-0 sf:items-center sf:justify-center sf:text-foreground/90",children:f.jsx(q0,{name:b,size:16})}):null,f.jsx("div",{className:"sf:min-w-0 sf:flex-1",children:f.jsx(bD,{nodeId:y.id,value:g,placeholder:"Name",multiline:!1,ariaLabel:"Name",testIdBase:"detail-panel-name",onSave:r,textClassName:"sf:text-lg sf:font-semibold sf:tracking-tight sf:text-foreground/95"})})]})}):f.jsx("h2",{"data-testid":"detail-panel-title",className:"sf:sr-only",children:y.id}),f.jsxs("p",{className:"sf:sr-only",children:[y.id," · ",y.type]})]}),f.jsxs("div",{className:"sf:mt-0 sf:flex sf:flex-col sf:gap-3",children:[c?f.jsx(wnt,{report:c}):null,f.jsx(bD,{nodeId:y.id,value:k,placeholder:"Short description shown on the node body",multiline:!0,ariaLabel:"Description",testIdBase:"detail-panel-description",onSave:i,textClassName:"sf:text-[13px] sf:leading-relaxed sf:text-muted-foreground sf:dark:text-zinc-400"}),f.jsx(bD,{nodeId:y.id,value:x,placeholder:"Long-form notes, context, anything…",multiline:!0,ariaLabel:"Detail",testIdBase:"detail-panel-detail",onSave:a,markdown:!0,textClassName:"sf:text-sm sf:leading-relaxed sf:text-foreground"}),y.type==="html"&&e?f.jsx(knt,{adapter:o,nodeId:y.id,htmlPath:"view.html"}):null]})]}):n?f.jsxs("div",{className:"sf:flex sf:flex-col sf:gap-4",children:[f.jsxs("div",{className:"sf:-mx-6 sf:-mt-6 sf:flex sf:flex-col sf:border-b sf:border-border/60 sf:bg-card/60 sf:px-6 sf:pb-2.5 sf:pt-3 sf:pr-12",children:[f.jsx("h2",{"data-testid":"detail-panel-title",className:"sf:text-lg sf:font-semibold sf:tracking-tight sf:text-foreground/95",children:n.label??"Connector"}),f.jsx("p",{className:"sf:sr-only",children:n.id})]}),f.jsx("div",{className:"sf:mt-0 sf:flex sf:flex-col sf:gap-3",children:f.jsx(bnt,{connector:n})})]}):f.jsx("div",{"data-testid":"detail-panel-empty",className:"sf:text-muted-foreground sf:text-sm",children:"Select a node to inspect."})]})})}function bD({nodeId:e,value:t,placeholder:n,multiline:o,ariaLabel:r,testIdBase:i,onSave:a,textClassName:s,markdown:c=!1}){const[l,h]=m.useState(!1),u=m.useRef(null),p=m.useRef(!1);m.useEffect(()=>{if(!l)return;const C=u.current;if(!C)return;C.textContent=t,C.focus();const _=window.getSelection();if(_){const S=document.createRange();S.selectNodeContents(C),S.collapse(!1),_.removeAllRanges(),_.addRange(S)}},[l,t]);const y=t==="";if(!a)return f.jsx("div",{"data-testid":i,"aria-label":r,className:te("sf:w-full sf:rounded-md sf:px-2 sf:py-1.5 sf:text-sm",y?"sf:italic sf:text-muted-foreground/50":"text-foreground",!c&&"sf:whitespace-pre-wrap sf:wrap-break-word",s),children:y?n:c?f.jsx(kK,{value:t}):t});const g=()=>{const C=u.current,_=C?o?C.innerText:C.textContent??"":t;a(e,_),h(!1)},k=()=>{h(!1)},x=C=>{if(C.stopPropagation(),C.nativeEvent.stopPropagation(),C.key==="Escape"){C.preventDefault(),p.current=!0,k();return}if(C.key==="Enter"){if(C.preventDefault(),C.shiftKey||!o){g();return}document.execCommand("insertText",!1,`
8542
8542
  `)}},v=C=>{C.preventDefault();const _=C.clipboardData.getData("text/plain");document.execCommand("insertText",!1,_)},M=C=>{},w=()=>{if(p.current){p.current=!1;return}g()},b=()=>{l||h(!0)};return f.jsx("div",{className:"relative","data-testid":i,"data-editing":l?"true":"false",children:l?f.jsx("div",{ref:u,contentEditable:"plaintext-only",suppressContentEditableWarning:!0,spellCheck:!1,tabIndex:0,onKeyDown:x,onPaste:v,onInput:M,onBlur:w,"data-testid":`${i}-editor`,className:te("sf:block sf:w-full sf:whitespace-pre-wrap sf:wrap-break-word sf:rounded-md sf:px-2 sf:py-1.5 sf:text-sm sf:outline-hidden",s),role:"textbox","aria-multiline":o?"true":"false","aria-label":r}):f.jsx("button",{type:"button",onClick:b,"aria-label":`Edit ${r.toLowerCase()}`,className:te("sf:block sf:w-full sf:cursor-text sf:rounded-md sf:px-2 sf:py-1.5 sf:text-left sf:text-sm sf:transition-colors sf:hover:bg-muted/50",y?"sf:italic sf:text-muted-foreground/50":"text-foreground",!c&&"sf:whitespace-pre-wrap sf:wrap-break-word",s),children:y?n:c?f.jsx(kK,{value:t}):t})})}function gnt({nodeId:e,icon:t,onChange:n}){const[o,r]=m.useState(!1);return f.jsx(Cq,{open:o,onOpenChange:r,onPick:i=>{n(e,i),r(!1)},anchor:f.jsx("button",{type:"button","data-testid":"detail-panel-icon-trigger","aria-label":t?"Change icon":"Add icon","aria-pressed":o,className:te("sf:inline-flex sf:h-7 sf:w-7 sf:shrink-0 sf:items-center sf:justify-center sf:rounded-md sf:text-foreground sf:transition-colors",t?"sf:hover:bg-muted":"sf:border sf:border-dashed sf:border-muted-foreground/40 sf:text-muted-foreground/60 sf:hover:border-muted-foreground sf:hover:text-foreground","sf:focus-visible:outline-hidden sf:focus-visible:ring-2 sf:focus-visible:ring-ring sf:focus-visible:ring-offset-1"),children:t?f.jsx(q0,{name:t,size:16,"aria-hidden":!0}):f.jsx(dh,{className:"sf:h-4 sf:w-4","aria-hidden":!0})})})}function knt({adapter:e,nodeId:t,htmlPath:n}){const[o,r]=m.useState({kind:"idle"}),i=typeof(e==null?void 0:e.openFile)=="function",a=typeof(e==null?void 0:e.revealFile)=="function",s=`nodes/${t}/${n}`,c=async l=>{var h,u;r({kind:"pending"});try{l==="open"?await((h=e==null?void 0:e.openFile)==null?void 0:h.call(e,s)):await((u=e==null?void 0:e.revealFile)==null?void 0:u.call(e,s)),r({kind:"idle"})}catch(p){r({kind:"error",message:p instanceof Error?p.message:String(p)})}};return f.jsxs("div",{className:"sf:flex sf:flex-col sf:gap-2 sf:rounded-md sf:border sf:bg-card sf:px-3 sf:py-2 sf:text-xs","data-testid":"detail-panel-html-node",children:[f.jsxs("div",{className:"sf:flex sf:flex-col sf:gap-1",children:[f.jsx("span",{className:"sf:font-mono sf:text-[11px] sf:text-muted-foreground sf:uppercase sf:tracking-widest",children:"Path"}),f.jsx("code",{"data-testid":"detail-panel-html-path",className:"sf:block sf:break-all sf:rounded sf:bg-muted/40 sf:px-2 sf:py-1 sf:font-mono sf:text-[11px]",children:n})]}),i||a?f.jsxs("div",{className:"sf:flex sf:flex-wrap sf:items-center sf:gap-2",children:[i?f.jsxs(rt,{type:"button",size:"sm",variant:"outline",className:"sf:h-7 sf:gap-1.5 sf:px-2",onClick:()=>{c("open")},disabled:o.kind==="pending","data-testid":"detail-panel-html-open","aria-label":"Open in editor",children:[f.jsx(gh,{className:"sf:h-3.5 sf:w-3.5"}),"Open in editor"]}):null,a?f.jsxs(rt,{type:"button",size:"sm",variant:"outline",className:"sf:h-7 sf:gap-1.5 sf:px-2",onClick:()=>{c("reveal")},disabled:o.kind==="pending","data-testid":"detail-panel-html-reveal","aria-label":"Reveal in Finder/Explorer",children:[f.jsx(sh,{className:"sf:h-3.5 sf:w-3.5"}),"Reveal"]}):null]}):null,o.kind==="error"?f.jsx("div",{"data-testid":"detail-panel-html-status","data-status":o.kind,className:te("sf:text-[11px] sf:text-destructive"),children:o.message??""}):null]})}function vnt(e,t){const n=Math.max(0,t-e);if(n<1e3)return"just now";const o=Math.floor(n/1e3);if(o<60)return`${o}s ago`;const r=Math.floor(o/60);if(r<60)return`${r}m ago`;const i=Math.floor(r/60);return i<24?`${i}h ago`:`${Math.floor(i/24)}d ago`}function xnt(e){if(e===null)return"null";if(e===void 0)return"undefined";if(typeof e=="string")return e;try{return JSON.stringify(e)}catch{return String(e)}}function wnt({report:e,now:t=Date.now()}){const n=e.data?Object.entries(e.data):[];return f.jsxs("section",{className:"sf:flex sf:flex-col sf:gap-2 sf:rounded-md sf:border sf:bg-card sf:px-3 sf:py-2 sf:text-xs","data-testid":"detail-panel-status","data-state":e.state,children:[f.jsxs("div",{className:"sf:flex sf:items-center sf:justify-between sf:gap-2",children:[f.jsx(Nq,{state:e.state,summary:e.summary,"data-testid":"detail-panel-status-badge"}),f.jsx("span",{className:"sf:shrink-0 sf:text-[10px] sf:text-muted-foreground","data-testid":"detail-panel-status-relative-time",children:`Last updated: ${vnt(e.ts,t)}`})]}),e.detail?f.jsx("div",{"data-testid":"detail-panel-status-detail",className:"sf:whitespace-pre-wrap sf:wrap-break-word sf:rounded sf:bg-muted/40 sf:px-2 sf:py-1 sf:text-[11px] sf:text-foreground",children:e.detail}):null,n.length>0?f.jsx("dl",{"data-testid":"detail-panel-status-data",className:"sf:grid sf:grid-cols-[auto_1fr] sf:gap-x-3 sf:gap-y-1 sf:text-[11px]",children:n.map(([o,r])=>f.jsxs("div",{className:"contents","data-testid":"detail-panel-status-data-row",children:[f.jsx("dt",{className:"sf:truncate sf:font-medium sf:text-muted-foreground",children:o}),f.jsx("dd",{className:"sf:break-all sf:font-mono sf:text-foreground",children:xnt(r)})]},o))}):null]})}function iie(e){return typeof e=="string"?e.replace(/\n$/,""):Array.isArray(e)?e.map(t=>typeof t=="string"?t:"").join("").replace(/\n$/,""):String(e??"").replace(/\n$/,"")}function Mnt(e){if(!m.isValidElement(e))return null;const t=e.props;return!t||typeof t.className!="string"||!t.className.includes("language-mermaid")?null:iie(t.children)}function kK({value:e}){return f.jsx(QJe,{remarkPlugins:[fnt],components:{h1:({children:t})=>f.jsx("h1",{className:"sf:mb-1 sf:text-base sf:font-bold sf:leading-snug",children:t}),h2:({children:t})=>f.jsx("h2",{className:"sf:mb-1 sf:text-sm sf:font-semibold sf:leading-snug",children:t}),h3:({children:t})=>f.jsx("h3",{className:"sf:mb-0.5 sf:text-sm sf:font-medium sf:leading-snug",children:t}),p:({children:t})=>f.jsx("p",{className:"sf:mb-2 sf:last:mb-0 sf:leading-relaxed",children:t}),ul:({children:t})=>f.jsx("ul",{className:"sf:mb-2 sf:list-disc sf:pl-4 sf:last:mb-0",children:t}),ol:({children:t})=>f.jsx("ol",{className:"sf:mb-2 sf:list-decimal sf:pl-4 sf:last:mb-0",children:t}),li:({children:t})=>f.jsx("li",{className:"mb-0.5",children:t}),code:({children:t,className:n})=>typeof n=="string"&&n.includes("language-mermaid")?f.jsx(gK,{code:iie(t)}):(n==null?void 0:n.includes("language-"))?f.jsx("code",{className:"sf:block sf:overflow-x-auto sf:rounded sf:bg-muted/60 sf:px-2 sf:py-1 sf:font-mono sf:text-xs",children:t}):f.jsx("code",{className:"sf:rounded sf:bg-muted/60 sf:px-1 sf:py-0.5 sf:font-mono sf:text-xs",children:t}),pre:({children:t})=>{const n=Mnt(t);return n!==null?f.jsx(gK,{code:n}):f.jsx("pre",{className:"sf:mb-2 sf:last:mb-0",children:t})},blockquote:({children:t})=>f.jsx("blockquote",{className:"sf:mb-2 sf:border-l-2 sf:border-muted-foreground/30 sf:pl-3 sf:italic sf:text-muted-foreground sf:last:mb-0",children:t}),a:({href:t,children:n})=>f.jsx("a",{href:t,target:"_blank",rel:"noreferrer",className:"sf:text-primary sf:underline sf:underline-offset-2",children:n}),strong:({children:t})=>f.jsx("strong",{className:"font-semibold",children:t}),em:({children:t})=>f.jsx("em",{className:"italic",children:t}),hr:()=>f.jsx("hr",{className:"sf:my-2 sf:border-border"}),table:({children:t})=>f.jsx("div",{className:"sf:mb-2 sf:overflow-x-auto sf:last:mb-0",children:f.jsx("table",{className:"sf:w-full sf:border-collapse sf:text-xs",children:t})}),th:({children:t})=>f.jsx("th",{className:"sf:border sf:border-border sf:bg-muted/40 sf:px-2 sf:py-1 sf:text-left sf:font-medium",children:t}),td:({children:t})=>f.jsx("td",{className:"sf:border sf:border-border sf:px-2 sf:py-1",children:t})},children:e})}function bnt({connector:e}){return f.jsx("div",{className:"sf:rounded-md sf:border sf:bg-card sf:px-3 sf:py-2 sf:text-xs",children:f.jsxs("dl",{className:"divide-y",children:[f.jsx(wi,{label:"Source",value:e.source}),f.jsx(wi,{label:"Target",value:e.target}),e.label?f.jsx(wi,{label:"Label",value:e.label}):null,e.style?f.jsx(wi,{label:"Style",value:e.style}):null,e.color?f.jsx(wi,{label:"Color",value:e.color}):null,e.direction?f.jsx(wi,{label:"Direction",value:e.direction}):null,e.url?f.jsx(wi,{label:"URL",value:`${e.method??"GET"} ${e.url}`}):null,e.eventName?f.jsx(wi,{label:"Event",value:e.eventName}):null,e.queueName?f.jsx(wi,{label:"Queue",value:e.queueName}):null]})})}function wi({label:e,value:t}){return f.jsxs("div",{className:"sf:flex sf:items-start sf:gap-3 sf:py-2 sf:first:pt-0 sf:last:pb-0",children:[f.jsx("dt",{className:"sf:w-20 sf:shrink-0 sf:font-medium sf:text-muted-foreground",children:e}),f.jsx("dd",{className:"sf:flex-1 sf:break-all sf:font-mono",children:t})]})}const _nt="https://seeflow.dev/embed",Cnt=(e,t)=>{const n=`${_nt}/${encodeURIComponent(e)}`;return t?`${n}?theme=${t}`:n},Snt=e=>{var t,n;return(n=(t=e==null?void 0:e.documentElement)==null?void 0:t.classList)!=null&&n.contains("dark")?"dark":"light"},Lnt=e=>e.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/</g,"&lt;"),Nnt=e=>[`<iframe src="${Lnt(e)}"`,' width="100%"',' height="600"',' style="border:0"',' allow="fullscreen"',' loading="lazy"></iframe>'].join(`
8543
8543
  `),Int="Embed this canvas",Ant="Paste this iframe into any page to embed the canvas.",Ent="Copy snippet",jnt="Copied!",$nt="Press ⌘C to copy",Pnt="Close",znt="Theme",Rnt=1500,Tnt=[{value:"match",label:"Match my theme"},{value:"light",label:"Light"},{value:"dark",label:"Dark"}],Dnt=e=>e==="light"?"light":e==="dark"?"dark":Snt(typeof document<"u"?document:null);function Hnt({open:e,onOpenChange:t,projectId:n}){const[o,r]=m.useState("idle"),[i,a]=m.useState("match"),s=m.useRef(null),c=m.useMemo(()=>Nnt(Cnt(n,Dnt(i))),[n,i]),l=m.useCallback(async()=>{try{await navigator.clipboard.writeText(c),r("copied"),setTimeout(()=>r("idle"),Rnt)}catch{r("fallback");const h=s.current;h&&(h.focus(),h.select())}},[c]);return f.jsx(ir,{open:e,onOpenChange:t,children:f.jsxs(Yr,{"data-testid":"embed-dialog-content",children:[f.jsxs(Qr,{children:[f.jsx(Jr,{children:Int}),f.jsx(ei,{children:Ant})]}),f.jsxs("fieldset",{className:"sf:flex sf:flex-col sf:gap-2 sf:border-0 sf:p-0",children:[f.jsx("legend",{id:"embed-dialog-theme-label",className:"sf:mb-2 sf:text-xs sf:font-medium sf:text-foreground",children:znt}),f.jsx("div",{"data-testid":"embed-dialog-theme-group",className:"sf:inline-flex sf:self-start sf:rounded-md sf:border sf:border-input sf:bg-background sf:p-0.5",children:Tnt.map(h=>{const u=i===h.value;return f.jsx("button",{type:"button","aria-pressed":u,"aria-label":h.label,"data-testid":`embed-dialog-theme-${h.value}`,"data-active":u,onClick:()=>a(h.value),className:te("sf:rounded sf:px-3 sf:py-1 sf:text-xs sf:transition-colors sf:focus-visible:outline-hidden sf:focus-visible:ring-1 sf:focus-visible:ring-ring",u?"sf:bg-secondary sf:text-secondary-foreground sf:shadow-sm":"sf:text-muted-foreground sf:hover:bg-accent sf:hover:text-accent-foreground"),children:h.label},h.value)})})]}),f.jsx("textarea",{ref:s,"data-testid":"embed-dialog-snippet",readOnly:!0,rows:7,value:c,spellCheck:!1,onFocus:h=>h.currentTarget.select(),className:"sf:w-full sf:resize-none sf:rounded-md sf:border sf:border-border sf:bg-background sf:p-3 sf:font-mono sf:text-xs sf:leading-relaxed sf:text-foreground sf:focus:outline-hidden sf:focus:ring-2 sf:focus:ring-ring"}),o==="fallback"?f.jsx("p",{"data-testid":"embed-dialog-fallback-hint",className:"sf:text-xs sf:text-muted-foreground",children:$nt}):null,f.jsxs(ar,{children:[f.jsx(rt,{variant:"outline","data-testid":"embed-dialog-close",onClick:()=>t(!1),children:Pnt}),f.jsx(rt,{"data-testid":"embed-dialog-copy",onClick:l,children:o==="copied"?jnt:Ent})]})]})})}const vK="Share / download",Ont="Download PDF",Fnt="Download PNG",qnt="Embed",Vnt="Export to seeflow.dev";function aie({mode:e,projectId:t,enableEmbed:n,onDownloadPdf:o,onDownloadPng:r,onExportToCloud:i,embedOpen:a,onEmbedOpenChange:s}){const[c,l]=m.useState(!1),[h,u]=m.useState(!1),[p,y]=m.useState(!1),g=a!==void 0,k=g?a:p,x=m.useCallback(S=>{g||y(S),s==null||s(S)},[g,s]),v=m.useCallback(()=>{!o||c||(l(!0),Promise.resolve(o()).finally(()=>l(!1)))},[o,c]),M=m.useCallback(()=>{!r||h||(u(!0),Promise.resolve(r()).finally(()=>u(!1)))},[r,h]),w=!!o,b=!!r,C=n&&typeof t=="string"&&t.length>0,_=e==="edit"&&!!i;return!w&&!b&&!C&&!_?null:f.jsxs(f.Fragment,{children:[f.jsxs(Moe,{children:[f.jsx(boe,{asChild:!0,children:f.jsx("button",{type:"button","data-testid":"share-menu-trigger","aria-label":vK,title:vK,className:te("sf:inline-flex sf:h-8 sf:w-8 sf:items-center sf:justify-center sf:rounded-md sf:border sf:border-border sf:bg-background/95 sf:text-muted-foreground sf:shadow-md sf:backdrop-blur-sm sf:transition-colors","sf:hover:bg-accent sf:hover:text-accent-foreground","sf:focus-visible:outline-hidden sf:focus-visible:ring-2 sf:focus-visible:ring-ring"),children:f.jsx(bh,{className:"sf:h-4 sf:w-4","aria-hidden":"true"})})}),f.jsxs(Fq,{align:"end","data-testid":"share-menu-content",onCloseAutoFocus:S=>{S.preventDefault()},children:[w?f.jsxs(V2,{"data-testid":"share-menu-pdf",disabled:c,onSelect:S=>{S.preventDefault(),v()},children:[c?f.jsx(qn,{className:"sf:h-4 sf:w-4 sf:animate-spin","aria-hidden":"true"}):f.jsx(ah,{className:"sf:h-4 sf:w-4","aria-hidden":"true"}),f.jsx("span",{children:Ont})]}):null,b?f.jsxs(V2,{"data-testid":"share-menu-png",disabled:h,onSelect:S=>{S.preventDefault(),M()},children:[h?f.jsx(qn,{className:"sf:h-4 sf:w-4 sf:animate-spin","aria-hidden":"true"}):f.jsx(uh,{className:"sf:h-4 sf:w-4","aria-hidden":"true"}),f.jsx("span",{children:Fnt})]}):null,C?f.jsxs(V2,{"data-testid":"share-menu-embed",onSelect:S=>{S.preventDefault(),x(!0)},children:[f.jsx(c0,{className:"sf:h-4 sf:w-4","aria-hidden":"true"}),f.jsx("span",{children:qnt})]}):null,_?f.jsxs(V2,{"data-testid":"share-menu-export-cloud",onSelect:()=>{i==null||i()},children:[f.jsx(Sh,{className:"sf:h-4 sf:w-4","aria-hidden":"true"}),f.jsx("span",{children:Vnt})]}):null]})]}),C&&t?f.jsx(Hnt,{open:k,onOpenChange:x,projectId:t}):null]})}const Bnt=8;function Unt(e){let t=Number.POSITIVE_INFINITY,n=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY,r=Number.NEGATIVE_INFINITY,i=!1;for(const a of e){const s=a.data.width,c=a.data.height;s===void 0||c===void 0||(i=!0,a.position.x<t&&(t=a.position.x),a.position.y<n&&(n=a.position.y),a.position.x+s>o&&(o=a.position.x+s),a.position.y+c>r&&(r=a.position.y+c))}return i?{x:t,y:n,width:o-t,height:r-n}:null}function Wnt(e){return e.length>=2}function Gnt({selectedNodes:e,onMultiResize:t,paddingPx:n=Bnt}){lR();const[o,r]=m.useState(null),[i,a]=m.useState(null);if(m.useRef(!1),m.useRef(null),!Wnt(e))return null;const s=Unt(e);if(!s)return null;const c=i??s;return c.x-n,c.y-n,c.width+n*2,c.height+n*2,null}const xK=22,wK=11,MK=3,bK=2,_D=8,CD=1,_K=["none","white","slate","gray","red","orange","amber","yellow","lime","green","teal","cyan","sky","blue","indigo","violet","fuchsia","pink"],Yp=[{value:"solid",icon:Mz,label:"Solid",testId:"style-tab-border-style-solid"},{value:"dashed",icon:Roe,label:"Dashed",testId:"style-tab-border-style-dashed"},{value:"dotted",icon:Toe,label:"Dotted",testId:"style-tab-border-style-dotted"}],CK=[{value:"solid",icon:Mz,label:"Solid",testId:"style-tab-edge-style-solid"},{value:"dashed",icon:Roe,label:"Dashed",testId:"style-tab-edge-style-dashed"},{value:"dotted",icon:Toe,label:"Dotted",testId:"style-tab-edge-style-dotted"}],SK=[{value:"curve",icon:Doe,label:"Curve",testId:"style-tab-edge-path-curve"},{value:"step",icon:iXe,label:"Zigzag",testId:"style-tab-edge-path-step"}],Knt="center",Xnt=[{value:"left",icon:Vo,label:"Left",testId:"style-tab-text-align-left"},{value:"center",icon:ya,label:"Center",testId:"style-tab-text-align-center"},{value:"right",icon:ma,label:"Right",testId:"style-tab-text-align-right"}],LK=[{value:"none",icon:fh,label:"None",testId:"style-tab-direction-none"},{value:"backward",icon:yh,label:"Backward",testId:"style-tab-direction-backward"},{value:"forward",icon:i0,label:"Forward",testId:"style-tab-direction-forward"},{value:"both",icon:J2,label:"Both",testId:"style-tab-direction-both"}];function Znt({nodes:e,connectors:t,onStyleNode:n,onStyleNodePreview:o,onStyleNodes:r,onStyleNodesPreview:i,onStyleConnector:a,onStyleConnectorPreview:s,onRequestIconReplace:c}){const l=e.length>0,h=t.length>0;if(!l&&!h)return null;const u=l&&!h,p=!l&&h,y=e[0],g=t[0],k=e.filter(ce=>ce.type!=="icon"),x=k[0],v=u&&e.every(ce=>ce.type==="icon"),M=v?e.find(ce=>ce.type==="icon"):void 0,w=u&&e.every(ce=>ce.type==="image"),b=u&&(y==null?void 0:y.type)==="text",C=(p?g==null?void 0:g.color:b?x==null?void 0:x.data.borderColor:x==null?void 0:x.data.backgroundColor)??"default",_=(x==null?void 0:x.data.borderStyle)??"solid",S=(g==null?void 0:g.style)??"solid",N=(g==null?void 0:g.direction)??"forward",P=(g==null?void 0:g.path)??"curve",A=ce=>{if(e.length>1&&r)r(e.map(Q=>Q.id),{borderColor:ce,backgroundColor:ce});else for(const Q of e)n(Q.id,{borderColor:ce,backgroundColor:ce});for(const Q of t)a(Q.id,{color:ce})},E=ce=>{for(const Q of e)n(Q.id,{borderStyle:ce});for(const Q of t)a(Q.id,{style:ce})},z=ce=>{for(const Q of e)n(Q.id,{borderSize:ce});for(const Q of t)a(Q.id,{borderSize:ce})},U=ce=>{for(const Q of e)o==null||o(Q.id,{borderSize:ce});for(const Q of t)s==null||s(Q.id,{borderSize:ce})},$=ce=>{if(e.length>1&&r)r(e.map(Q=>Q.id),{fontSize:ce});else for(const Q of e)n(Q.id,{fontSize:ce})},T=ce=>{if(e.length>1&&i)i(e.map(Q=>Q.id),{fontSize:ce});else for(const Q of e)o==null||o(Q.id,{fontSize:ce})},D=k.length>1&&new Set(k.map(ce=>ce.data.fontSize??xK)).size>1,O=ce=>{if(e.length>1&&r)r(e.map(Q=>Q.id),{textAlign:ce});else for(const Q of e)n(Q.id,{textAlign:ce})},I=(x==null?void 0:x.data.textAlign)??Knt,R=ce=>{for(const Q of t)a(Q.id,{fontSize:ce})},L=ce=>{for(const Q of t)s==null||s(Q.id,{fontSize:ce})},V=t.length>1&&new Set(t.map(ce=>ce.fontSize??wK)).size>1,H=ce=>{for(const Q of e)n(Q.id,{cornerRadius:ce})},j=ce=>{for(const Q of e)o==null||o(Q.id,{cornerRadius:ce})},X=k.length>1&&new Set(k.map(ce=>ce.data.cornerRadius??_D)).size>1,Z=ce=>{for(const Q of e)n(Q.id,{shadow:ce})},J=ce=>{for(const Q of e)o==null||o(Q.id,{shadow:ce})},re=k.length>1&&new Set(k.map(ce=>ce.data.shadow??CD)).size>1,oe=ce=>{for(const Q of t)a(Q.id,{path:ce})},ne=ce=>{for(const Q of t)a(Q.id,{direction:ce})},le=ce=>{for(const Q of e)n(Q.id,{color:ce})},ve=(M==null?void 0:M.data.color)??"default",ge=p?(g==null?void 0:g.borderSize)??bK:(x==null?void 0:x.data.borderSize)??MK,xe=p?bK:MK,Te=p?"edge":"border",Ye=p?"Connector color":"Color",ue=p?"connector color":"color",Ie="style-tab-color-trigger",Pt="style-tab-color";if(v){const ce=!!c&&e.length===1&&!!M,Q=()=>{M&&c&&c(M.id)};return f.jsx(g0,{delayDuration:300,children:f.jsxs("div",{"data-testid":"canvas-style-strip",className:"sf:pointer-events-auto sf:flex sf:flex-col sf:items-center sf:gap-1 sf:rounded-lg sf:border sf:border-border sf:bg-background/95 sf:p-1 sf:shadow-md sf:backdrop-blur",children:[f.jsx(Qnt,{testId:"style-strip-icon-color",tooltip:"Icon color",ariaLabel:"icon color",activeToken:ve,previewKind:"edge",tokenTestIdPrefix:"style-tab-icon-color",innerTestId:"style-tab-icon-color-trigger",allowNone:!1,onSelect:le}),ce?f.jsxs(i2,{children:[f.jsx(a2,{asChild:!0,children:f.jsx("button",{type:"button","data-testid":"style-strip-change-icon","aria-label":"change icon",title:"Change icon",onClick:Q,className:te("sf:inline-flex sf:h-8 sf:w-8 sf:items-center sf:justify-center sf:rounded-md sf:text-muted-foreground sf:transition-colors sf:hover:bg-accent sf:hover:text-accent-foreground","sf:focus-visible:outline-hidden sf:focus-visible:ring-2 sf:focus-visible:ring-ring sf:focus-visible:ring-offset-1"),children:f.jsx(d0,{className:"sf:h-4 sf:w-4"})})}),f.jsx(iu,{side:"right",className:"sf:px-2 sf:py-1 sf:text-xs",children:"Change icon"})]}):null]})})}if(w){const ce=e[0],Q=(ce==null?void 0:ce.data.borderColor)??"default",zt=(ce==null?void 0:ce.data.borderStyle)??"solid",yn=(ce==null?void 0:ce.data.borderWidth)??1,ae=ke=>{for(const Se of e)n(Se.id,{borderColor:ke})},Y=ke=>{for(const Se of e)n(Se.id,{borderStyle:ke})},he=ke=>{for(const Se of e)n(Se.id,{borderWidth:ke})},Ae=ke=>{for(const Se of e)o==null||o(Se.id,{borderWidth:ke})},He=ke=>{for(const Se of e)n(Se.id,{cornerRadius:ke})},Ke=ke=>{for(const Se of e)o==null||o(Se.id,{cornerRadius:ke})},Bt=ke=>{for(const Se of e)n(Se.id,{shadow:ke})},mn=ke=>{for(const Se of e)o==null||o(Se.id,{shadow:ke})},tn=()=>{const ke=Q==="none";return f.jsx("span",{className:te("sf:relative sf:h-5 sf:w-5 sf:rounded-full",ke&&"sf:bg-card"),style:ke?void 0:Lz(Q),children:ke?f.jsx(Nz,{}):null})};return f.jsx(g0,{delayDuration:300,children:f.jsxs("div",{"data-testid":"canvas-style-strip",className:"sf:pointer-events-auto sf:flex sf:flex-col sf:items-center sf:gap-1 sf:rounded-lg sf:border sf:border-border sf:bg-background/95 sf:p-1 sf:shadow-md sf:backdrop-blur",children:[f.jsx(_o,{testId:"style-strip-image-border-color-button",tooltip:"Border color",ariaLabel:"image border color",renderIcon:tn,children:f.jsx($O,{testId:"style-strip-image-border-color",activeToken:Q,previewKind:"border",tokenTestIdPrefix:"style-tab-image-border-color",innerTestId:"style-tab-image-border-color-trigger",ariaLabel:"image border color",onSelect:ae})}),f.jsx(_o,{testId:"style-strip-image-corner-radius-button",tooltip:"Corners",ariaLabel:"image corners",renderIcon:()=>f.jsx(l0,{className:"sf:h-4 sf:w-4"}),children:f.jsx("div",{"data-testid":"style-strip-image-corner-radius",children:f.jsx(gs,{value:ce==null?void 0:ce.data.cornerRadius,defaultValue:_D,min:0,max:32,suffix:"px",onPreview:Ke,onCommit:He,testId:"style-tab-image-corner-radius-slider"})})}),f.jsx(_o,{testId:"style-strip-image-shadow-button",tooltip:"Shadow",ariaLabel:"image shadow",renderIcon:()=>f.jsx(Ci,{className:"sf:h-4 sf:w-4"}),children:f.jsx("div",{"data-testid":"style-strip-image-shadow",children:f.jsx(gs,{value:ce==null?void 0:ce.data.shadow,defaultValue:CD,min:0,max:5,onPreview:mn,onCommit:Bt,testId:"style-tab-image-shadow-slider"})})}),f.jsx(_o,{testId:"style-strip-image-border-style",tooltip:"Border style",ariaLabel:"image border style",renderIcon:()=>{var Se;const ke=((Se=Yp.find(qt=>qt.value===zt))==null?void 0:Se.icon)??Mz;return f.jsx(ke,{className:"sf:h-4 sf:w-4"})},children:f.jsx(Nu,{ariaLabel:"Border style",value:zt,onChange:Y,options:Yp})}),f.jsx(_o,{testId:"style-strip-image-border-width",tooltip:"Border width",ariaLabel:"image border width",renderIcon:()=>f.jsx("span",{className:"sf:font-mono sf:text-[10px] sf:tabular-nums",children:yn}),children:f.jsx(gs,{value:ce==null?void 0:ce.data.borderWidth,defaultValue:1,min:0,max:8,suffix:"px",onPreview:Ae,onCommit:he,testId:"style-tab-image-border-width-slider"})})]})})}const wt=!b,en=()=>{const ce=C==="none";return f.jsx("span",{className:te("sf:relative sf:h-5 sf:w-5 sf:rounded-full",ce&&"sf:bg-card"),style:ce?void 0:Lz(C),children:ce?f.jsx(Nz,{}):null})};return f.jsx(g0,{delayDuration:300,children:f.jsxs("div",{"data-testid":"canvas-style-strip",className:"sf:pointer-events-auto sf:flex sf:flex-col sf:items-center sf:gap-1 sf:rounded-lg sf:border sf:border-border sf:bg-background/95 sf:p-1 sf:shadow-md sf:backdrop-blur",children:[f.jsx(_o,{testId:"style-strip-color-button",tooltip:Ye,ariaLabel:ue,renderIcon:en,children:f.jsx($O,{testId:"style-strip-color",activeToken:C,previewKind:Te,tokenTestIdPrefix:Pt,innerTestId:Ie,ariaLabel:ue,allowNone:!p,onSelect:A})}),l?f.jsx(_o,{testId:"style-strip-corner-radius-button",tooltip:"Corners",ariaLabel:"corners",renderIcon:()=>f.jsx(l0,{className:"sf:h-4 sf:w-4"}),children:f.jsx("div",{"data-testid":"style-strip-corner-radius",children:f.jsx(gs,{value:x==null?void 0:x.data.cornerRadius,defaultValue:_D,min:0,max:32,suffix:"px",indeterminate:X,onPreview:j,onCommit:H,testId:"style-tab-corner-radius-slider"})})}):null,l?f.jsx(_o,{testId:"style-strip-shadow-button",tooltip:"Shadow",ariaLabel:"shadow",renderIcon:()=>f.jsx(Ci,{className:"sf:h-4 sf:w-4"}),children:f.jsx("div",{"data-testid":"style-strip-shadow",children:f.jsx(gs,{value:x==null?void 0:x.data.shadow,defaultValue:CD,min:0,max:5,indeterminate:re,onPreview:J,onCommit:Z,testId:"style-tab-shadow-slider"})})}):null,wt?f.jsx(_o,{testId:"style-strip-border",tooltip:p?"Connector":"Border",ariaLabel:p?"connector":"border",renderIcon:()=>{var Q,zt;const ce=(p?(Q=CK.find(yn=>yn.value===S))==null?void 0:Q.icon:(zt=Yp.find(yn=>yn.value===_))==null?void 0:zt.icon)??Mz;return f.jsx(ce,{className:"sf:h-4 sf:w-4"})},children:f.jsxs("div",{className:"sf:flex sf:w-56 sf:flex-col sf:gap-3",children:[f.jsx(Qp,{label:"Style",testId:"style-strip-border-style",children:p?f.jsx(Nu,{ariaLabel:"Connector style",value:S,onChange:ce=>E(ce),options:CK}):f.jsx(Nu,{ariaLabel:"Border style",value:_,onChange:ce=>E(ce),options:Yp})}),f.jsx(Qp,{label:"Width",testId:"style-strip-border-size",children:f.jsx(gs,{value:ge,defaultValue:xe,min:0,max:8,suffix:"px",onPreview:U,onCommit:z,testId:p?"style-tab-stroke-width-slider":"style-tab-border-size-slider"})})]})}):null,l||p?f.jsx(_o,{testId:"style-strip-text",tooltip:"Text",ariaLabel:"text",renderIcon:()=>f.jsx(u0,{className:"sf:h-4 sf:w-4"}),children:f.jsxs("div",{className:"sf:flex sf:w-56 sf:flex-col sf:gap-3",children:[f.jsx(Qp,{label:"Size",testId:p?"style-strip-connector-font-size":"style-strip-font-size",children:f.jsx(gs,{value:p?g==null?void 0:g.fontSize:x==null?void 0:x.data.fontSize,defaultValue:p?wK:xK,min:p?8:10,max:32,suffix:"px",indeterminate:p?V:D,onPreview:p?L:T,onCommit:p?R:$,testId:p?"style-tab-connector-font-size-slider":"style-tab-font-size-slider"})}),l?f.jsx(Qp,{label:"Align",testId:"style-strip-text-align",children:f.jsx(Nu,{ariaLabel:"Text alignment",value:I,onChange:O,options:Xnt})}):null]})}):null,p?f.jsx(_o,{testId:"style-strip-path",tooltip:"Connector path",ariaLabel:"connector path",renderIcon:()=>{var Q;const ce=((Q=SK.find(zt=>zt.value===P))==null?void 0:Q.icon)??Doe;return f.jsx(ce,{className:"sf:h-4 sf:w-4"})},children:f.jsx(Nu,{ariaLabel:"Connector path",value:P,onChange:oe,options:SK})}):null,p?f.jsx(_o,{testId:"style-strip-direction",tooltip:"Direction",ariaLabel:"direction",renderIcon:()=>{var Q;const ce=((Q=LK.find(zt=>zt.value===N))==null?void 0:Q.icon)??i0;return f.jsx(ce,{className:"sf:h-4 sf:w-4"})},children:f.jsx(Nu,{ariaLabel:"Connector direction",value:N,onChange:ne,options:LK})}):null]})})}function Lz(e){return e==="default"?{backgroundColor:"hsl(var(--card))"}:{backgroundColor:Hle[e].edge}}function Nz(){return f.jsx("span",{"aria-hidden":"true",className:"sf:pointer-events-none sf:absolute sf:inset-0 sf:rounded-full",style:{backgroundImage:"linear-gradient(45deg, transparent 45%, hsl(0, 75%, 55%) 45%, hsl(0, 75%, 55%) 55%, transparent 55%)"}})}function Ynt({token:e,isActive:t,onClick:n,testId:o,ariaLabel:r}){const i=e==="none",a=e==="white";return f.jsxs("button",{type:"button",onClick:n,"data-testid":o,"data-active":t,"aria-label":r,"aria-pressed":t,title:e,className:te("sf:relative sf:flex sf:h-5 sf:w-5 sf:items-center sf:justify-center sf:rounded-full sf:transition-all",i&&"sf:border sf:border-border sf:bg-card",a&&"sf:border sf:border-border",t?"sf:ring-2 sf:ring-ring sf:ring-offset-1 sf:ring-offset-popover":"sf:hover:scale-110"),style:i?void 0:Lz(e),children:[i?f.jsx(Nz,{}):null,t&&!i?f.jsx(ja,{className:"sf:h-2.5 sf:w-2.5 sf:drop-shadow-sm",style:{color:a?"hsl(0, 0%, 30%)":"hsl(var(--foreground))"}}):null]})}function Qnt({testId:e,tooltip:t,ariaLabel:n,activeToken:o,previewKind:r,tokenTestIdPrefix:i,innerTestId:a,allowNone:s,onSelect:c}){const[l,h]=m.useState(!1),u=o==="none";return f.jsxs(Qd,{open:l,onOpenChange:h,children:[f.jsxs(i2,{children:[f.jsx(a2,{asChild:!0,children:f.jsx(o2,{asChild:!0,children:f.jsx("button",{type:"button","data-testid":e,"data-active-token":o,"aria-label":`${n}: ${o}`,title:t,className:te("sf:group sf:relative sf:inline-flex sf:h-8 sf:w-8 sf:items-center sf:justify-center sf:rounded-md sf:text-muted-foreground sf:transition-colors sf:hover:bg-accent sf:hover:text-accent-foreground","sf:focus-visible:outline-hidden sf:focus-visible:ring-2 sf:focus-visible:ring-ring sf:focus-visible:ring-offset-1"),children:f.jsx("span",{"data-testid":a,className:te("sf:relative sf:h-5 sf:w-5 sf:rounded-full",u&&"sf:bg-card"),style:u?void 0:Lz(o),children:u?f.jsx(Nz,{}):null})})})}),f.jsx(iu,{side:"right",className:"sf:px-2 sf:py-1 sf:text-xs",children:t})]}),f.jsx(Za,{side:"right",align:"start",className:"sf:w-auto sf:p-1.5","data-testid":`${a}-popover`,children:f.jsx($O,{testId:`${i}-grid`,activeToken:o,previewKind:r,tokenTestIdPrefix:i,innerTestId:a,ariaLabel:n,allowNone:s,onSelect:p=>{c(p),h(!1)}})})]})}function $O({testId:e,activeToken:t,previewKind:n,tokenTestIdPrefix:o,innerTestId:r,ariaLabel:i,allowNone:a,onSelect:s}){const c=a===!1?_K.filter(l=>l!=="none"):_K;return f.jsx("div",{"data-testid":e,"data-active-token":t,"data-inner-testid":r,className:"sf:grid sf:grid-cols-6 sf:gap-2 sf:p-1",children:c.map(l=>f.jsx(Ynt,{token:l,isActive:t===l,onClick:()=>s(l),testId:`${o}-${l}`,ariaLabel:`${i} ${l}`},l))})}function Qp({label:e,testId:t,children:n}){return f.jsxs("div",{className:"sf:flex sf:flex-col sf:gap-1.5","data-testid":t,children:[f.jsx("div",{className:"sf:text-[11px] sf:font-medium sf:uppercase sf:tracking-wide sf:text-muted-foreground",children:e}),n]})}function _o({testId:e,tooltip:t,ariaLabel:n,renderIcon:o,children:r}){const[i,a]=m.useState(!1);return f.jsxs(Qd,{open:i,onOpenChange:a,children:[f.jsxs(i2,{children:[f.jsx(a2,{asChild:!0,children:f.jsx(o2,{asChild:!0,children:f.jsx("button",{type:"button","data-testid":e,"aria-label":n,title:t,className:te("sf:inline-flex sf:h-8 sf:w-8 sf:items-center sf:justify-center sf:rounded-md sf:text-muted-foreground sf:transition-colors sf:hover:bg-accent sf:hover:text-accent-foreground","sf:focus-visible:outline-hidden sf:focus-visible:ring-2 sf:focus-visible:ring-ring sf:focus-visible:ring-offset-1"),children:o()})})}),f.jsx(iu,{side:"right",className:"sf:px-2 sf:py-1 sf:text-xs",children:t})]}),f.jsx(Za,{side:"right",align:"start",className:"sf:w-auto sf:p-3",children:r})]})}function gs({value:e,defaultValue:t,min:n,max:o,suffix:r,indeterminate:i,onPreview:a,onCommit:s,testId:c}){const l=e??t,[h,u]=m.useState(l),[p,y]=m.useState(!1);m.useEffect(()=>{u(l),y(!1)},[l]);const g=i&&!p;return f.jsxs("div",{className:"sf:flex sf:w-48 sf:items-center sf:gap-3",children:[f.jsx(iq,{min:n,max:o,step:1,value:[h],onValueChange:([k])=>{const x=k??n;u(x),y(!0),a==null||a(x)},onValueCommit:([k])=>s(k??n),"data-testid":c,"data-indeterminate":g?"true":void 0,className:te("sf:flex-1",g&&"sf:opacity-60")}),f.jsx("span",{"data-testid":`${c}-value`,className:"sf:w-12 sf:shrink-0 sf:text-right sf:text-xs sf:tabular-nums sf:text-muted-foreground",children:g?"Mixed":f.jsxs(f.Fragment,{children:[h,r]})})]})}const Jnt="var(--sf-accent)",j2="var(--sf-alignment-spacing)",sa=5,NK=44,IK=18,eot={position:"absolute",top:0,left:0,width:1,height:1,overflow:"visible",pointerEvents:"none"};function Tu(e,t,n,o,r,i){return f.jsx("line",{x1:e,y1:t,x2:n,y2:o,stroke:r,strokeWidth:1,opacity:.9,"vector-effect":"non-scaling-stroke"},i)}function tot(e,t){const[n,o,r,i]=e.kind==="v"?[e.x,e.y1,e.x,e.y2]:[e.x1,e.y,e.x2,e.y];return Tu(n,o,r,i,Jnt,t)}function not(e,t){const n=e.kind==="spacing-v",o=e.kind==="spacing-v"?e.x1:e.x,r=e.kind==="spacing-v"?e.y:e.y1,i=e.kind==="spacing-v"?e.x2:e.x,a=e.kind==="spacing-v"?e.y:e.y2,s=(o+i)/2,c=(r+a)/2,l=n?[Tu(o,r-sa,o,r+sa,j2,"cap-a"),Tu(i,a-sa,i,a+sa,j2,"cap-b")]:[Tu(o-sa,r,o+sa,r,j2,"cap-a"),Tu(i-sa,a,i+sa,a,j2,"cap-b")];return f.jsxs("g",{children:[Tu(o,r,i,a,j2,"main"),l,f.jsx("foreignObject",{x:s-NK/2,y:c-IK/2,width:NK,height:IK,children:f.jsx("span",{className:"sf:flex sf:h-full sf:w-full sf:items-center sf:justify-center sf:rounded sf:bg-[var(--sf-alignment-spacing)] sf:px-1 sf:text-[10px] sf:font-medium sf:leading-none sf:text-white",children:`${Math.round(e.gap)}px`})})]},t)}function oot({guides:e}){return e.length===0?null:f.jsx("svg",{"aria-hidden":"true",style:eot,children:e.map((t,n)=>{const o=`${t.kind}-${n}`;return t.kind==="v"||t.kind==="h"?tot(t,o):not(t,o)})})}const nt=1e-6,sie=(e,t)=>Math.abs(e-t)<=nt;function rot(e,t){if(t){const n=[];return t.left&&n.push({value:e.x,isCenter:!1}),t.right&&n.push({value:e.x+e.w,isCenter:!1}),n}return[{value:e.x,isCenter:!1},{value:e.x+e.w/2,isCenter:!0},{value:e.x+e.w,isCenter:!1}]}function iot(e,t){if(t){const n=[];return t.top&&n.push({value:e.y,isCenter:!1}),t.bottom&&n.push({value:e.y+e.h,isCenter:!1}),n}return[{value:e.y,isCenter:!1},{value:e.y+e.h/2,isCenter:!0},{value:e.y+e.h,isCenter:!1}]}function cie(e){return[e.x,e.x+e.w/2,e.x+e.w]}function lie(e){return[e.y,e.y+e.h/2,e.y+e.h]}function aot(e,t,n){const o=e.x<t.x+t.w-nt&&t.x<e.x+e.w-nt,r=e.y<t.y+t.h-nt&&t.y<e.y+e.h-nt;if(o&&r)return!0;if(o){const i=t.y+t.h<=e.y+nt;for(const a of n){if(a.id===e.id||a.id===t.id)continue;const s=a.x<e.x+e.w-nt&&e.x<a.x+a.w-nt,c=a.x<t.x+t.w-nt&&t.x<a.x+a.w-nt;if(!s||!c)continue;if(i?a.y+a.h>t.y+nt&&a.y<e.y-nt:a.y+a.h>e.y+e.h+nt&&a.y<t.y-nt)return!1}return!0}if(r){const i=t.x>=e.x+e.w-nt;for(const a of n){if(a.id===e.id||a.id===t.id)continue;const s=a.y<e.y+e.h-nt&&e.y<a.y+a.h-nt,c=a.y<t.y+t.h-nt&&t.y<a.y+a.h-nt;if(!s||!c)continue;if(i?a.x+a.w>e.x+e.w+nt&&a.x<t.x-nt:a.x+a.w>t.x+t.w+nt&&a.x<e.x-nt)return!1}return!0}return!0}function sot(e,t){return t.filter(n=>aot(e,n,t))}function AK(e,t,n,o){let r=null;for(const i of e)for(const a of t)for(const s of n(a)){const c=s-i.value,l=Math.abs(c);if(l>o+nt)continue;(r===null||l<r.abs-nt||Math.abs(l-r.abs)<=nt&&i.isCenter&&!r.isCenter)&&(r={delta:c,abs:l,isCenter:i.isCenter,line:s})}return r?{delta:r.delta,line:r.line}:null}function cot(e,t,n){const o=n.filter(a=>cie(a).some(s=>sie(s,e)));let r=t.y,i=t.y+t.h;for(const a of o)r=Math.min(r,a.y),i=Math.max(i,a.y+a.h);return{kind:"v",x:e,y1:r,y2:i,refIds:o.map(a=>a.id)}}function lot(e,t,n){const o=n.filter(a=>lie(a).some(s=>sie(s,e)));let r=t.x,i=t.x+t.w;for(const a of o)r=Math.min(r,a.x),i=Math.max(i,a.x+a.w);return{kind:"h",y:e,x1:r,x2:i,refIds:o.map(a=>a.id)}}function EK(e,t,n,o){if(n.length<2)return null;const r=[...n].sort((s,c)=>s.lo-c.lo),i=[];for(let s=0;s<r.length-1;s++){const c=r[s],l=r[s+1];if(!c||!l)continue;const h=l.lo-c.hi;if(h>=t-nt){const p=(h-t)/2,y=c.hi+p;i.push({targetLo:y,segments:[{from:c.hi,to:y,gap:p},{from:y+t,to:l.lo,gap:p}]})}const u=l.lo-c.hi;if(u>=-nt){const p=l.hi+u;i.push({targetLo:p,segments:[{from:c.hi,to:l.lo,gap:u},{from:l.hi,to:p,gap:u}]});const y=c.lo-u-t;i.push({targetLo:y,segments:[{from:y+t,to:c.lo,gap:u},{from:c.hi,to:l.lo,gap:u}]})}}let a=null;for(const s of i){const c=s.targetLo-e,l=Math.abs(c);l>o+nt||(a===null||l<a.abs-nt)&&(a={delta:c,abs:l,segments:s.segments})}return a?{delta:a.delta,segments:a.segments}:null}function jK(e,t,n,o={}){const{resizeMode:r=!1,activeEdges:i}=o,a=[],s=sot(e,t),c=AK(rot(e,i),s,cie,n),l=AK(iot(e,i),s,lie,n);let h=e.x+((c==null?void 0:c.delta)??0),u=e.y+((l==null?void 0:l.delta)??0);const p={...e,x:h,y:u};if(c&&a.push(cot(c.line,p,s)),l&&a.push(lot(l.line,p,s)),c||l){if(!c){const y=s.filter(k=>p.y<k.y+k.h-nt&&k.y<p.y+p.h-nt),g=EK(p.x,e.w,y.map(k=>({lo:k.x,hi:k.x+k.w})),n);if(g){r||(h+=g.delta);const k=p.y+p.h/2;for(const x of g.segments)a.push({kind:"spacing-v",x1:x.from,x2:x.to,y:k,gap:x.gap})}}if(!l){const y=s.filter(k=>p.x<k.x+k.w-nt&&k.x<p.x+p.w-nt),g=EK(p.y,e.h,y.map(k=>({lo:k.y,hi:k.y+k.h})),n);if(g){r||(u+=g.delta);const k=p.x+p.w/2;for(const x of g.segments)a.push({kind:"spacing-h",y1:x.from,y2:x.to,x:k,gap:x.gap})}}}return{snappedX:h,snappedY:u,guides:a}}function die(e){var t,n;return e?{w:((t=e.measured)==null?void 0:t.width)??e.width??0,h:((n=e.measured)==null?void 0:n.height)??e.height??0}:{w:0,h:0}}function $K(e){const{w:t,h:n}=die(e);return{id:e.id,x:e.position.x,y:e.position.y,w:t,h:n}}function dot(e){switch(e.kind){case"v":return`v|${e.x}|${e.refIds.join(",")}`;case"h":return`h|${e.y}|${e.refIds.join(",")}`;case"spacing-v":return`spacing-v|${e.x1},${e.x2},${e.y}|${e.gap}`;case"spacing-h":return`spacing-h|${e.y1},${e.y2},${e.x}|${e.gap}`}}function uot(e){return e.map(dot).join(";")}function hot(e){const{enabled:t,thresholdPx:n,viewport:o,rfNodesRef:r}=e,[i,a]=m.useState([]),s=m.useRef(null),c=m.useRef(null),l=m.useRef(null),h=m.useRef(null),u=m.useRef(null),p=m.useRef(""),y=n/(o.zoom||1),g=m.useCallback(_=>{h.current=_,u.current===null&&(u.current=globalThis.requestAnimationFrame(()=>{u.current=null;const S=h.current??[];h.current=null;const N=uot(S);N!==p.current&&(p.current=N,a(S))}))},[]),k=m.useCallback(()=>{u.current!==null&&(globalThis.cancelAnimationFrame(u.current),u.current=null),h.current=null,p.current!==""&&(p.current="",a([]))},[]),x=m.useCallback(_=>{const S=new Set(_);s.current=r.current.filter(N=>!S.has(N.id)).map($K)},[r]),v=m.useCallback((_,S)=>{if(!t)return _;if(S.metaKey||S.ctrlKey)return g([]),_;const N=s.current;if(!N)return _;let P=Number.POSITIVE_INFINITY,A=Number.POSITIVE_INFINITY,E=Number.NEGATIVE_INFINITY,z=Number.NEGATIVE_INFINITY,U=0;for(const I of _){if(I.type!=="position"||I.dragging!==!0||!I.position||!I.id)continue;const R=r.current.find(H=>H.id===I.id),{w:L,h:V}=die(R);P=Math.min(P,I.position.x),A=Math.min(A,I.position.y),E=Math.max(E,I.position.x+L),z=Math.max(z,I.position.y+V),U++}if(U===0)return _;const $={id:"__sf_selection__",x:P,y:A,w:E-P,h:z-A},T=jK($,N,y);g(T.guides);const D=T.snappedX-$.x,O=T.snappedY-$.y;return D===0&&O===0?_:_.map(I=>I.type==="position"&&I.dragging===!0&&I.position?{...I,position:{x:I.position.x+D,y:I.position.y+O}}:I)},[t,y,r,g]),M=m.useCallback(()=>{s.current=null,k()},[k]),w=m.useCallback((_,S)=>{c.current=_,l.current=S,s.current=r.current.filter(N=>N.id!==_).map($K)},[r]),b=m.useCallback((_,S)=>{if(!t)return{snappedRect:_,guides:[]};if(S.metaKey||S.ctrlKey)return g([]),{snappedRect:_,guides:[]};const N=s.current,P=l.current;if(!N||!P)return{snappedRect:_,guides:[]};const A={..._,id:c.current??_.id},E=jK(A,N,y,{resizeMode:!0,activeEdges:P});g(E.guides);const z=E.snappedX-A.x,U=E.snappedY-A.y;let{x:$,y:T,w:D,h:O}=_;return P.left?($=_.x+z,D=_.w-z):P.right&&(D=_.w+z),P.top?(T=_.y+U,O=_.h-U):P.bottom&&(O=_.h+U),{snappedRect:{id:_.id,x:$,y:T,w:D,h:O},guides:E.guides}},[t,y,g]),C=m.useCallback(()=>{c.current=null,l.current=null,s.current=null,k()},[k]);return{guides:i,beginGesture:x,interceptChanges:v,endGesture:M,beginResize:w,applyResizeSnap:b,endResize:C}}function fot(e,t){if(e.match(/^[a-z]+:\/\//i))return e;if(e.match(/^\/\//))return window.location.protocol+e;if(e.match(/^[a-z]+:/i))return e;const n=document.implementation.createHTMLDocument(),o=n.createElement("base"),r=n.createElement("a");return n.head.appendChild(o),n.body.appendChild(r),t&&(o.href=t),r.href=e,r.href}const pot=(()=>{let e=0;const t=()=>`0000${(Math.random()*36**4<<0).toString(36)}`.slice(-4);return()=>(e+=1,`u${t()}${e}`)})();function Ra(e){const t=[];for(let n=0,o=e.length;n<o;n++)t.push(e[n]);return t}let Au=null;function uie(e={}){return Au||(e.includeStyleProperties?(Au=e.includeStyleProperties,Au):(Au=Ra(window.getComputedStyle(document.documentElement)),Au))}function Iz(e,t){const o=(e.ownerDocument.defaultView||window).getComputedStyle(e).getPropertyValue(t);return o?parseFloat(o.replace("px","")):0}function yot(e){const t=Iz(e,"border-left-width"),n=Iz(e,"border-right-width");return e.clientWidth+t+n}function mot(e){const t=Iz(e,"border-top-width"),n=Iz(e,"border-bottom-width");return e.clientHeight+t+n}function hie(e,t={}){const n=t.width||yot(e),o=t.height||mot(e);return{width:n,height:o}}function got(){let e,t;try{t=process}catch{}const n=t&&t.env?t.env.devicePixelRatio:null;return n&&(e=parseInt(n,10),Number.isNaN(e)&&(e=1)),e||window.devicePixelRatio||1}const to=16384;function kot(e){(e.width>to||e.height>to)&&(e.width>to&&e.height>to?e.width>e.height?(e.height*=to/e.width,e.width=to):(e.width*=to/e.height,e.height=to):e.width>to?(e.height*=to/e.width,e.width=to):(e.width*=to/e.height,e.height=to))}function Az(e){return new Promise((t,n)=>{const o=new Image;o.onload=()=>{o.decode().then(()=>{requestAnimationFrame(()=>t(o))})},o.onerror=n,o.crossOrigin="anonymous",o.decoding="async",o.src=e})}async function vot(e){return Promise.resolve().then(()=>new XMLSerializer().serializeToString(e)).then(encodeURIComponent).then(t=>`data:image/svg+xml;charset=utf-8,${t}`)}async function xot(e,t,n){const o="http://www.w3.org/2000/svg",r=document.createElementNS(o,"svg"),i=document.createElementNS(o,"foreignObject");return r.setAttribute("width",`${t}`),r.setAttribute("height",`${n}`),r.setAttribute("viewBox",`0 0 ${t} ${n}`),i.setAttribute("width","100%"),i.setAttribute("height","100%"),i.setAttribute("x","0"),i.setAttribute("y","0"),i.setAttribute("externalResourcesRequired","true"),r.appendChild(i),i.appendChild(e),vot(r)}const Kn=(e,t)=>{if(e instanceof t)return!0;const n=Object.getPrototypeOf(e);return n===null?!1:n.constructor.name===t.name||Kn(n,t)};function wot(e){const t=e.getPropertyValue("content");return`${e.cssText} content: '${t.replace(/'|"/g,"")}';`}function Mot(e,t){return uie(t).map(n=>{const o=e.getPropertyValue(n),r=e.getPropertyPriority(n);return`${n}: ${o}${r?" !important":""};`}).join(" ")}function bot(e,t,n,o){const r=`.${e}:${t}`,i=n.cssText?wot(n):Mot(n,o);return document.createTextNode(`${r}{${i}}`)}function PK(e,t,n,o){const r=window.getComputedStyle(e,n),i=r.getPropertyValue("content");if(i===""||i==="none")return;const a=pot();try{t.className=`${t.className} ${a}`}catch{return}const s=document.createElement("style");s.appendChild(bot(a,n,r,o)),t.appendChild(s)}function _ot(e,t,n){PK(e,t,":before",n),PK(e,t,":after",n)}const zK="application/font-woff",RK="image/jpeg",Cot={woff:zK,woff2:zK,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:RK,jpeg:RK,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml",webp:"image/webp"};function Sot(e){const t=/\.([^./]*?)$/g.exec(e);return t?t[1]:""}function dV(e){const t=Sot(e).toLowerCase();return Cot[t]||""}function Lot(e){return e.split(/,/)[1]}function PO(e){return e.search(/^(data:)/)!==-1}function Not(e,t){return`data:${t};base64,${e}`}async function fie(e,t,n){const o=await fetch(e,t);if(o.status===404)throw new Error(`Resource "${o.url}" not found`);const r=await o.blob();return new Promise((i,a)=>{const s=new FileReader;s.onerror=a,s.onloadend=()=>{try{i(n({res:o,result:s.result}))}catch(c){a(c)}},s.readAsDataURL(r)})}const SD={};function Iot(e,t,n){let o=e.replace(/\?.*/,"");return n&&(o=e),/ttf|otf|eot|woff2?/i.test(o)&&(o=o.replace(/.*\//,"")),t?`[${t}]${o}`:o}async function uV(e,t,n){const o=Iot(e,t,n.includeQueryParams);if(SD[o]!=null)return SD[o];n.cacheBust&&(e+=(/\?/.test(e)?"&":"?")+new Date().getTime());let r;try{const i=await fie(e,n.fetchRequestInit,({res:a,result:s})=>(t||(t=a.headers.get("Content-Type")||""),Lot(s)));r=Not(i,t)}catch(i){r=n.imagePlaceholder||"";let a=`Failed to fetch resource: ${e}`;i&&(a=typeof i=="string"?i:i.message),a&&console.warn(a)}return SD[o]=r,r}async function Aot(e){const t=e.toDataURL();return t==="data:,"?e.cloneNode(!1):Az(t)}async function Eot(e,t){if(e.currentSrc){const i=document.createElement("canvas"),a=i.getContext("2d");i.width=e.clientWidth,i.height=e.clientHeight,a==null||a.drawImage(e,0,0,i.width,i.height);const s=i.toDataURL();return Az(s)}const n=e.poster,o=dV(n),r=await uV(n,o,t);return Az(r)}async function jot(e,t){var n;try{if(!((n=e==null?void 0:e.contentDocument)===null||n===void 0)&&n.body)return await FR(e.contentDocument.body,t,!0)}catch{}return e.cloneNode(!1)}async function $ot(e,t){return Kn(e,HTMLCanvasElement)?Aot(e):Kn(e,HTMLVideoElement)?Eot(e,t):Kn(e,HTMLIFrameElement)?jot(e,t):e.cloneNode(pie(e))}const Pot=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SLOT",pie=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SVG";async function zot(e,t,n){var o,r;if(pie(t))return t;let i=[];return Pot(e)&&e.assignedNodes?i=Ra(e.assignedNodes()):Kn(e,HTMLIFrameElement)&&(!((o=e.contentDocument)===null||o===void 0)&&o.body)?i=Ra(e.contentDocument.body.childNodes):i=Ra(((r=e.shadowRoot)!==null&&r!==void 0?r:e).childNodes),i.length===0||Kn(e,HTMLVideoElement)||await i.reduce((a,s)=>a.then(()=>FR(s,n)).then(c=>{c&&t.appendChild(c)}),Promise.resolve()),t}function Rot(e,t,n){const o=t.style;if(!o)return;const r=window.getComputedStyle(e);r.cssText?(o.cssText=r.cssText,o.transformOrigin=r.transformOrigin):uie(n).forEach(i=>{let a=r.getPropertyValue(i);i==="font-size"&&a.endsWith("px")&&(a=`${Math.floor(parseFloat(a.substring(0,a.length-2)))-.1}px`),Kn(e,HTMLIFrameElement)&&i==="display"&&a==="inline"&&(a="block"),i==="d"&&t.getAttribute("d")&&(a=`path(${t.getAttribute("d")})`),o.setProperty(i,a,r.getPropertyPriority(i))})}function Tot(e,t){Kn(e,HTMLTextAreaElement)&&(t.innerHTML=e.value),Kn(e,HTMLInputElement)&&t.setAttribute("value",e.value)}function Dot(e,t){if(Kn(e,HTMLSelectElement)){const n=t,o=Array.from(n.children).find(r=>e.value===r.getAttribute("value"));o&&o.setAttribute("selected","")}}function Hot(e,t,n){return Kn(t,Element)&&(Rot(e,t,n),_ot(e,t,n),Tot(e,t),Dot(e,t)),t}async function Oot(e,t){const n=e.querySelectorAll?e.querySelectorAll("use"):[];if(n.length===0)return e;const o={};for(let i=0;i<n.length;i++){const s=n[i].getAttribute("xlink:href");if(s){const c=e.querySelector(s),l=document.querySelector(s);!c&&l&&!o[s]&&(o[s]=await FR(l,t,!0))}}const r=Object.values(o);if(r.length){const i="http://www.w3.org/1999/xhtml",a=document.createElementNS(i,"svg");a.setAttribute("xmlns",i),a.style.position="absolute",a.style.width="0",a.style.height="0",a.style.overflow="hidden",a.style.display="none";const s=document.createElementNS(i,"defs");a.appendChild(s);for(let c=0;c<r.length;c++)s.appendChild(r[c]);e.appendChild(a)}return e}async function FR(e,t,n){return!n&&t.filter&&!t.filter(e)?null:Promise.resolve(e).then(o=>$ot(o,t)).then(o=>zot(e,o,t)).then(o=>Hot(e,o,t)).then(o=>Oot(o,t))}const yie=/url\((['"]?)([^'"]+?)\1\)/g,Fot=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,qot=/src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;function Vot(e){const t=e.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1");return new RegExp(`(url\\(['"]?)(${t})(['"]?\\))`,"g")}function Bot(e){const t=[];return e.replace(yie,(n,o,r)=>(t.push(r),n)),t.filter(n=>!PO(n))}async function Uot(e,t,n,o,r){try{const i=n?fot(t,n):t,a=dV(t);let s;return r||(s=await uV(i,a,o)),e.replace(Vot(t),`$1${s}$3`)}catch{}return e}function Wot(e,{preferredFontFormat:t}){return t?e.replace(qot,n=>{for(;;){const[o,,r]=Fot.exec(n)||[];if(!r)return"";if(r===t)return`src: ${o};`}}):e}function mie(e){return e.search(yie)!==-1}async function gie(e,t,n){if(!mie(e))return e;const o=Wot(e,n);return Bot(o).reduce((i,a)=>i.then(s=>Uot(s,a,t,n)),Promise.resolve(o))}async function Eu(e,t,n){var o;const r=(o=t.style)===null||o===void 0?void 0:o.getPropertyValue(e);if(r){const i=await gie(r,null,n);return t.style.setProperty(e,i,t.style.getPropertyPriority(e)),!0}return!1}async function Got(e,t){await Eu("background",e,t)||await Eu("background-image",e,t),await Eu("mask",e,t)||await Eu("-webkit-mask",e,t)||await Eu("mask-image",e,t)||await Eu("-webkit-mask-image",e,t)}async function Kot(e,t){const n=Kn(e,HTMLImageElement);if(!(n&&!PO(e.src))&&!(Kn(e,SVGImageElement)&&!PO(e.href.baseVal)))return;const o=n?e.src:e.href.baseVal,r=await uV(o,dV(o),t);await new Promise((i,a)=>{e.onload=i,e.onerror=t.onImageErrorHandler?(...c)=>{try{i(t.onImageErrorHandler(...c))}catch(l){a(l)}}:a;const s=e;s.decode&&(s.decode=i),s.loading==="lazy"&&(s.loading="eager"),n?(e.srcset="",e.src=r):e.href.baseVal=r})}async function Xot(e,t){const o=Ra(e.childNodes).map(r=>kie(r,t));await Promise.all(o).then(()=>e)}async function kie(e,t){Kn(e,Element)&&(await Got(e,t),await Kot(e,t),await Xot(e,t))}function Zot(e,t){const{style:n}=e;t.backgroundColor&&(n.backgroundColor=t.backgroundColor),t.width&&(n.width=`${t.width}px`),t.height&&(n.height=`${t.height}px`);const o=t.style;return o!=null&&Object.keys(o).forEach(r=>{n[r]=o[r]}),e}const TK={};async function DK(e){let t=TK[e];if(t!=null)return t;const o=await(await fetch(e)).text();return t={url:e,cssText:o},TK[e]=t,t}async function HK(e,t){let n=e.cssText;const o=/url\(["']?([^"')]+)["']?\)/g,i=(n.match(/url\([^)]+\)/g)||[]).map(async a=>{let s=a.replace(o,"$1");return s.startsWith("https://")||(s=new URL(s,e.url).href),fie(s,t.fetchRequestInit,({result:c})=>(n=n.replace(a,`url(${c})`),[a,c]))});return Promise.all(i).then(()=>n)}function OK(e){if(e==null)return[];const t=[],n=/(\/\*[\s\S]*?\*\/)/gi;let o=e.replace(n,"");const r=new RegExp("((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})","gi");for(;;){const c=r.exec(o);if(c===null)break;t.push(c[0])}o=o.replace(r,"");const i=/@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi,a="((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})",s=new RegExp(a,"gi");for(;;){let c=i.exec(o);if(c===null){if(c=s.exec(o),c===null)break;i.lastIndex=s.lastIndex}else s.lastIndex=i.lastIndex;t.push(c[0])}return t}async function Yot(e,t){const n=[],o=[];return e.forEach(r=>{if("cssRules"in r)try{Ra(r.cssRules||[]).forEach((i,a)=>{if(i.type===CSSRule.IMPORT_RULE){let s=a+1;const c=i.href,l=DK(c).then(h=>HK(h,t)).then(h=>OK(h).forEach(u=>{try{r.insertRule(u,u.startsWith("@import")?s+=1:r.cssRules.length)}catch(p){console.error("Error inserting rule from remote css",{rule:u,error:p})}})).catch(h=>{console.error("Error loading remote css",h.toString())});o.push(l)}})}catch(i){const a=e.find(s=>s.href==null)||document.styleSheets[0];r.href!=null&&o.push(DK(r.href).then(s=>HK(s,t)).then(s=>OK(s).forEach(c=>{a.insertRule(c,a.cssRules.length)})).catch(s=>{console.error("Error loading remote stylesheet",s)})),console.error("Error inlining remote css file",i)}}),Promise.all(o).then(()=>(e.forEach(r=>{if("cssRules"in r)try{Ra(r.cssRules||[]).forEach(i=>{n.push(i)})}catch(i){console.error(`Error while reading CSS rules from ${r.href}`,i)}}),n))}function Qot(e){return e.filter(t=>t.type===CSSRule.FONT_FACE_RULE).filter(t=>mie(t.style.getPropertyValue("src")))}async function Jot(e,t){if(e.ownerDocument==null)throw new Error("Provided element is not within a Document");const n=Ra(e.ownerDocument.styleSheets),o=await Yot(n,t);return Qot(o)}function vie(e){return e.trim().replace(/["']/g,"")}function ert(e){const t=new Set;function n(o){(o.style.fontFamily||getComputedStyle(o).fontFamily).split(",").forEach(i=>{t.add(vie(i))}),Array.from(o.children).forEach(i=>{i instanceof HTMLElement&&n(i)})}return n(e),t}async function trt(e,t){const n=await Jot(e,t),o=ert(e);return(await Promise.all(n.filter(i=>o.has(vie(i.style.fontFamily))).map(i=>{const a=i.parentStyleSheet?i.parentStyleSheet.href:null;return gie(i.cssText,a,t)}))).join(`
8544
- `)}async function nrt(e,t){const n=t.fontEmbedCSS!=null?t.fontEmbedCSS:t.skipFonts?null:await trt(e,t);if(n){const o=document.createElement("style"),r=document.createTextNode(n);o.appendChild(r),e.firstChild?e.insertBefore(o,e.firstChild):e.appendChild(o)}}async function ort(e,t={}){const{width:n,height:o}=hie(e,t),r=await FR(e,t,!0);return await nrt(r,t),await kie(r,t),Zot(r,t),await xot(r,n,o)}async function rrt(e,t={}){const{width:n,height:o}=hie(e,t),r=await ort(e,t),i=await Az(r),a=document.createElement("canvas"),s=a.getContext("2d"),c=t.pixelRatio||got(),l=t.canvasWidth||n,h=t.canvasHeight||o;return a.width=l*c,a.height=h*c,t.skipAutoScale||kot(a),a.style.width=`${l}`,a.style.height=`${h}`,t.backgroundColor&&(s.fillStyle=t.backgroundColor,s.fillRect(0,0,a.width,a.height)),s.drawImage(i,0,0,a.width,a.height),a}async function irt(e,t={}){return(await rrt(e,t)).toDataURL()}const art=e=>e instanceof Element?!(e.classList.contains("react-flow__minimap")||e.classList.contains("react-flow__controls")||e.classList.contains("react-flow__panel")):!0,srt=e=>{var o;let t=e;for(;t&&!t.classList.contains("seeflow-canvas-root");)t=t.parentElement;if(t){const r=getComputedStyle(t).getPropertyValue("--bg-canvas").trim();if(r.length>0)return r}const n=(o=e.ownerDocument)==null?void 0:o.documentElement;return n!=null&&n.classList.contains("dark")?"#0a0a0c":"#fafafa"},crt=async e=>{const t=await irt(e,{cacheBust:!0,filter:art,backgroundColor:srt(e)}),n=await new Promise((o,r)=>{const i=new Image;i.onload=()=>o({width:i.naturalWidth,height:i.naturalHeight}),i.onerror=()=>r(new Error("Failed to decode captured image")),i.src=t});return{dataUrl:t,...n}},lrt=(e,t)=>{const n=document.createElement("a");n.href=e,n.download=t,n.rel="noopener",document.body.appendChild(n),n.click(),n.remove()},drt=e=>{const t=e.replace(/[^A-Za-z0-9_-]+/g,"-").replace(/^-+|-+$/g,"");return t.length>0?t.slice(0,80):"canvas"},FK=(e,t)=>`${drt(e??"canvas")}.${t}`,urt=({projectId:e,getReactFlow:t})=>{const[n,o]=m.useState(null),r=m.useCallback(()=>o(null),[]),i=m.useCallback(async()=>{const l=t();if(!l)return null;const h=document.querySelector(".react-flow__viewport");if(!h)return null;const u=l.getViewport();try{return await l.fitView({duration:0,padding:.1}),await new Promise(p=>requestAnimationFrame(()=>p())),await crt(h)}finally{l.setViewport(u,{duration:0})}},[t]),a=m.useCallback(async()=>{o(null);try{const l=await i();if(!l)return;lrt(l.dataUrl,FK(e,"png"))}catch(l){o(l instanceof Error?l.message:String(l))}},[i,e]),s=m.useCallback(async()=>{o(null);try{const l=await i();if(!l)return;const{jsPDF:h}=await Z0(async()=>{const{jsPDF:y}=await import("./jspdf.es.min-BaNs7eNe.js").then(g=>g.j);return{jsPDF:y}},[]),u=l.width>l.height?"landscape":"portrait",p=new h({orientation:u,unit:"px",format:[l.width,l.height],hotfixes:["px_scaling"]});p.addImage(l.dataUrl,"PNG",0,0,l.width,l.height),p.save(FK(e,"pdf"))}catch(l){o(l instanceof Error?l.message:String(l))}},[i,e]),c=m.useCallback(async()=>{const l=await i();return l==null?void 0:l.dataUrl},[i]);return{exportPdf:s,exportPng:a,capturePreview:c,lastError:n,clearError:r}},hrt=12,frt=1200;function prt(e,t={}){const n=t.idleMs??frt;let o,r=null,i=null;const a=typeof requestAnimationFrame<"u",s=()=>{o!==void 0&&(clearTimeout(o),o=void 0)},c=()=>{i!==null&&typeof cancelAnimationFrame<"u"&&cancelAnimationFrame(i),i=null},l=()=>{if(i=null,!r)return;const{clientX:y,clientY:g}=r;r=null;const k=e.getBoundingClientRect();e.style.setProperty("--mx",`${y-k.left}px`),e.style.setProperty("--my",`${g-k.top}px`),e.dataset.active="true",s(),o=setTimeout(()=>{e.dataset.active="false",o=void 0},n)};return{onMove:y=>{if(r={clientX:y.clientX,clientY:y.clientY},!a){l();return}i===null&&(i=requestAnimationFrame(l))},onLeave:()=>{c(),r=null,s(),e.dataset.active="false"},dispose:()=>{c(),r=null,s()}}}function yrt(){const e=m.useRef(null),t=De(a=>a.transform,(a,s)=>a[0]===s[0]&&a[1]===s[1]&&a[2]===s[2]),[n,o,r]=t,i=hrt*r;return m.useEffect(()=>{var u;const a=e.current;if(!a)return;const s=(u=a.parentElement)==null?void 0:u.querySelector(".react-flow__pane");if(!s)return;const{onMove:c,onLeave:l,dispose:h}=prt(a);return s.addEventListener("mousemove",c,{passive:!0}),s.addEventListener("mouseleave",l,{passive:!0}),()=>{s.removeEventListener("mousemove",c),s.removeEventListener("mouseleave",l),h()}},[]),f.jsx("div",{ref:e,className:"glow-overlay","data-active":"false","data-testid":"canvas-glow-overlay",style:{backgroundPosition:`${n}px ${o}px`,backgroundSize:`${i}px ${i}px`}})}const mrt="Hide inspector",grt="Open inspector";function krt({open:e,onToggle:t}){const n=e?s0:mh,o=e?mrt:grt;return f.jsx(g0,{delayDuration:300,children:f.jsxs(i2,{children:[f.jsx(a2,{asChild:!0,children:f.jsx(rt,{type:"button",variant:"ghost",size:"icon","data-testid":"inspector-toggle","aria-pressed":e,"aria-label":o,onClick:t,className:"sf:h-8 sf:w-8",children:f.jsx(n,{className:"sf:h-4 sf:w-4","aria-hidden":"true"})})}),f.jsx(iu,{children:o})]})})}const vrt={showToolbar:!0,showStyleStrip:!0,showDetailPanel:!0,showStatusBadges:!0,showResizeHandles:!0,showControls:!0,showShareMenu:!0,showMiniMap:!0,enableKeyboard:!0,enableContextMenu:!0,enableDragDrop:!0,enableImageDrop:!0,enableZoom:!0,enablePan:!0,enableSelection:!0,enableNodeMove:!0,enableEmbed:!1,enableAlignmentGuides:!0},xrt={showToolbar:!0,showStyleStrip:!1,showDetailPanel:!1,showStatusBadges:!0,showResizeHandles:!1,showControls:!0,showShareMenu:!0,showMiniMap:!0,enableKeyboard:!1,enableContextMenu:!1,enableDragDrop:!1,enableImageDrop:!1,enableZoom:!0,enablePan:!0,enableSelection:!0,enableNodeMove:!0,enableEmbed:!1,enableAlignmentGuides:!1},wrt={showToolbar:!1,showStyleStrip:!1,showDetailPanel:!1,showStatusBadges:!1,showResizeHandles:!1,showControls:!1,showShareMenu:!1,showMiniMap:!1,enableKeyboard:!1,enableContextMenu:!1,enableDragDrop:!1,enableImageDrop:!1,enableZoom:!1,enablePan:!1,enableSelection:!1,enableNodeMove:!1,enableEmbed:!1,enableAlignmentGuides:!1};function Mrt(e){const t=e.mode==="edit"?vrt:e.mode==="mini"?wrt:xrt;return{showToolbar:e.showToolbar??t.showToolbar,showStyleStrip:e.showStyleStrip??t.showStyleStrip,showDetailPanel:e.showDetailPanel??t.showDetailPanel,showStatusBadges:e.showStatusBadges??t.showStatusBadges,showResizeHandles:e.showResizeHandles??t.showResizeHandles,showControls:e.showControls??t.showControls,showShareMenu:e.showShareMenu??t.showShareMenu,showMiniMap:e.showMiniMap??t.showMiniMap,enableKeyboard:e.enableKeyboard??t.enableKeyboard,enableContextMenu:e.enableContextMenu??t.enableContextMenu,enableDragDrop:e.enableDragDrop??t.enableDragDrop,enableImageDrop:e.enableImageDrop??t.enableImageDrop,enableZoom:e.enableZoom??t.enableZoom,enablePan:e.enablePan??t.enablePan,enableSelection:e.enableSelection??t.enableSelection,enableNodeMove:e.enableNodeMove??t.enableNodeMove,enableEmbed:e.enableEmbed??t.enableEmbed,enableAlignmentGuides:e.enableAlignmentGuides??t.enableAlignmentGuides,alignmentSnapThreshold:e.alignmentSnapThreshold}}const qK=40,VK=4,$2={padding:.15,duration:300,includeHiddenNodes:!1};function brt(e){return e===void 0||e===!1?{onMount:!1,onExternalNodeChange:!1}:e===!0?{onMount:!0,onExternalNodeChange:!0}:{onMount:e.onMount??!0,onExternalNodeChange:e.onExternalNodeChange??!0}}const BK=e=>{if("clientX"in e)return{clientX:e.clientX,clientY:e.clientY};const t=e.changedTouches[0]??e.touches[0];return t?{clientX:t.clientX,clientY:t.clientY}:null},_rt=(e,t)=>{var o;const n=document.elementsFromPoint(e,t);for(const r of n){const i=(o=r.closest)==null?void 0:o.call(r,".react-flow__node");if(i)return i}return null},xie=15,LD=(e,t,n)=>{const o=_rt(t,n);if(o)return o;if(!e)return null;let r=null,i=xie;const a=e.querySelectorAll(".react-flow__node");for(const s of a){const c=s.getBoundingClientRect();if(c.width===0||c.height===0)continue;const l=Math.max(c.left-t,0,t-c.right),h=Math.max(c.top-n,0,n-c.bottom),u=Math.hypot(l,h);u<=i&&(r=s,i=u)}return r};function UK(e,t,n,o,r){if(e==="source"?(o==null?void 0:o.targetPin)!==void 0||(o==null?void 0:o.targetHandleAutoPicked)===!1:(o==null?void 0:o.sourcePin)!==void 0||(o==null?void 0:o.sourceHandleAutoPicked)===!1)return;const a=e==="source"?n:t,s=e==="source"?t:n,c=r(a),l=r(s);if(!c||!l)return;const h=c.measured.width??c.width??0,u=c.measured.height??c.height??0,p=l.measured.width??l.width??0,y=l.measured.height??l.height??0;if(h===0||u===0||p===0||y===0)return;const g={x:c.internals.positionAbsolute.x,y:c.internals.positionAbsolute.y,w:h,h:u},k={x:l.internals.positionAbsolute.x+p/2,y:l.internals.positionAbsolute.y+y/2};return AHe(g,tz(g,k))}function Crt(e,t,n,o){if(o===null)return"no-op";const r=e==="source"?t:n;return o===(e==="source"?n:t)?"self-loop":o===r?"pin-own":"reconnect-and-pin"}const Srt=(e,t)=>{if(!t)return e;const n=t.data?{...e.data,...t.data}:e.data;return{...e,...t,data:n}},Lrt=(e,t)=>t?{...e,...t}:e,Nrt={rectangle:_We,ellipse:vr,sticky:vr,text:vr,database:vr,server:vr,user:vr,queue:vr,cloud:vr,diamond:vr,hexagon:vr,image:pWe,icon:VHe,html:lWe,component:EUe,linkflow:kWe},Irt={editableEdge:LWe},Art={zIndex:0},Ert={hideAttribution:!0},jrt=8,WK=(e,t)=>e?typeof e=="string"?`url('#${e}')`:`url('#${`${t?`${t}__`:""}${Object.keys(e).sort().map(r=>`${r}=${e[r]}`).join("&")}`}')`:void 0,$rt=e=>function({fromX:n,fromY:o,toX:r,toY:i,fromPosition:a,toPosition:s,connectionLineStyle:c}){const l=De(V=>e.current?V.edges.find(H=>H.reconnectable===!0)??null:null),h=l==null?void 0:l.data,u=De(V=>{var j;const H=V.connection;return((j=H==null?void 0:H.fromHandle)==null?void 0:j.nodeId)??null}),p=De(V=>l!=null&&l.source?V.nodeLookup.get(l.source)??null:null),y=De(V=>l!=null&&l.target?V.nodeLookup.get(l.target)??null:null),g=De(V=>u?V.nodeLookup.get(u)??null:null),k=(l==null?void 0:l.source)===u,x=l?k?p:y:g,v=k?y:p,M=k?h==null?void 0:h.sourcePin:h==null?void 0:h.targetPin,w=k?h==null?void 0:h.sourceHandleAutoPicked:h==null?void 0:h.targetHandleAutoPicked;let b=n,C=o,_=a;if(x){const V=x.measured.width??x.width??0,H=x.measured.height??x.height??0;if(V>0&&H>0){const j={x:x.internals.positionAbsolute.x,y:x.internals.positionAbsolute.y,w:V,h:H};let X=null;if(M)X=nz(j,M);else if(w!==!1&&v){const Z=v.measured.width??v.width??0,J=v.measured.height??v.height??0;if(Z>0&&J>0){const re={x:v.internals.positionAbsolute.x+Z/2,y:v.internals.positionAbsolute.y+J/2};X=tz(j,re)}}X&&(b=X.x,C=X.y,_=GK[X.side])}}const S=De(V=>V.transform[2]),N=De(V=>V.nodeLookup),P=De(V=>{var H;return((H=V.connection.toHandle)==null?void 0:H.nodeId)??null});let A=r,E=i,z=s;if(S>0){const V=xie/S,H=l?k?l.target:l.source:null;let j=null;if(P&&P!==H){const X=N.get(P)??null;X&&(j=X)}if(!j){let X=V;for(const Z of N.values()){if(H&&Z.id===H||x&&Z.id===x.id)continue;const J=Z.measured.width??Z.width??0,re=Z.measured.height??Z.height??0;if(J===0||re===0)continue;const oe=Z.internals.positionAbsolute.x,ne=Z.internals.positionAbsolute.y,le=Math.max(oe-r,0,r-(oe+J)),ve=Math.max(ne-i,0,i-(ne+re)),ge=Math.hypot(le,ve);ge<=X&&(X=ge,j=Z)}}if(!j&&l&&x){const X=x.measured.width??x.width??0,Z=x.measured.height??x.height??0;if(X>0&&Z>0){const J=x.internals.positionAbsolute.x,re=x.internals.positionAbsolute.y,oe=Math.max(J-r,0,r-(J+X)),ne=Math.max(re-i,0,i-(re+Z));Math.hypot(oe,ne)<=V&&(j=x)}}if(j){const X=j.measured.width??j.width??0,Z=j.measured.height??j.height??0;if(X>0&&Z>0){const J=KH({x:j.internals.positionAbsolute.x,y:j.internals.positionAbsolute.y,w:X,h:Z},{x:r,y:i}),re=nz({x:j.internals.positionAbsolute.x,y:j.internals.positionAbsolute.y,w:X,h:Z},J);A=re.x,E=re.y,z=GK[re.side]}}}const U=(h==null?void 0:h.path)==="step",[$]=U?cf({sourceX:b,sourceY:C,sourcePosition:_,targetX:A,targetY:E,targetPosition:z,borderRadius:jrt}):iR({sourceX:b,sourceY:C,sourcePosition:_,targetX:A,targetY:E,targetPosition:z}),T=(l==null?void 0:l.style)??c??void 0,D=De(V=>V.rfId),O=k?l==null?void 0:l.markerStart:l==null?void 0:l.markerEnd,I=k?l==null?void 0:l.markerEnd:l==null?void 0:l.markerStart,R=WK(O,D),L=WK(I,D);return f.jsx("path",{d:$,fill:"none",className:"react-flow__connection-path",style:T,markerStart:R,markerEnd:L})},GK={top:fe.Top,right:fe.Right,bottom:fe.Bottom,left:fe.Left};function Prt({storeApiRef:e}){const t=xt();return m.useEffect(()=>(e.current=t,()=>{e.current===t&&(e.current=null)}),[t,e]),null}function zrt({wrapperRef:e}){const t=De(o=>o.transform[2]),n=e.current;return n&&n.style.setProperty("--rf-zoom",String(t)),null}const Rrt=new Set(["INPUT","TEXTAREA","SELECT"]),zO=e=>e?Rrt.has(e.tagName)?!0:e instanceof HTMLElement&&e.isContentEditable:!1;function Trt(e){const{event:t,selectedNodeIds:n,hasClipboard:o,activeElement:r,onCopySelection:i,onPasteSelection:a}=e;if(!(t.metaKey||t.ctrlKey)||t.shiftKey||t.altKey)return!1;const s=t.key.toLowerCase();return s!=="c"&&s!=="v"||zO(r)?!1:s==="c"?n.length===0||!i?!1:(t.preventDefault(),i([...n]),!0):!o||!a?!1:(t.preventDefault(),a(),!0)}const KK=(e,t)=>{var n;return((n=e==null?void 0:e[t])==null?void 0:n.status)??"idle"},Drt=(e,t)=>{var n;return(n=e==null?void 0:e[t])==null?void 0:n.status},Hrt=(e,t)=>{var n,o;return((n=e==null?void 0:e[t])==null?void 0:n.status)==="error"?(o=e[t])==null?void 0:o.error:void 0};function Ort(e,t){var AV,EV,jV;const{mode:n,adapter:o,topLeftSlot:r,topRightSlot:i,projectId:a,flowSlug:s,fileBaseUrl:c,apiBaseUrl:l="/api",studioBaseUrl:h="",nodes:u,connectors:p,selectedNodeIds:y,selectedConnectorIds:g,onSelectionChange:k,runtime:x,onPlayNode:v,onNodePositionChange:M,onNodePositionsChange:w,onNodeResize:b,onNodeResizeEnd:C,onHtmlNodeFitToContent:_,onComponentNodeFitToContent:S,onMultiResize:N,onNodeNameChange:P,onNodeDescriptionChange:A,onConnectorLabelChange:E,onCreateShapeNode:z,onCreateLinkflowNode:U,onCreateImageFromFile:$,onRetryImageUpload:T,onCreateHtmlNode:D,onCreateConnector:O,onReconnectConnector:I,onReorderNode:R,onDeleteNode:L,onCopyNode:V,onPasteAt:H,hasClipboard:j,onCopySelection:X,onPasteSelection:Z,selectedNodes:J,selectedConnectors:re,onStyleNode:oe,onStyleNodePreview:ne,onStyleNodes:le,onStyleNodesPreview:ve,onStyleConnector:ge,onStyleConnectorPreview:xe,onRfInit:Te,onTidy:Ye,onNodeClick:ue,onConnectorClick:Ie,onPaneClick:Pt,onCreateAndConnectFromPane:wt,pendingEditNodeId:en,iconPickerOpen:ce,onOpenIconPicker:Q,onCloseIconPicker:zt,onPickIcon:yn,onRequestIconReplace:ae,onPinEndpoint:Y,onUnpinEndpoint:he,canvasMode:Ae,onCanvasModeChange:He,disableSidebar:Ke,statusReport:Bt,onNameChange:mn,onDescriptionChange:tn,onDetailChange:ke,onIconChange:Se,autoFitView:qt,autoFitViewSignal:Dn,customIcons:nn,onExportToCloud:l2,onNodeDragStart:vo,onNodeDragStop:Yn,onViewportChange:Vi,history:Qe,showToolbar:Xt,showStyleStrip:su,showDetailPanel:cu,showStatusBadges:lu,showResizeHandles:du,showControls:uu,showShareMenu:hu,showMiniMap:Qa,enableKeyboard:Ja,enableContextMenu:es,enableDragDrop:ts,enableImageDrop:ni,enableZoom:oi,enablePan:fu,enableSelection:pu,enableNodeMove:zo,enableEmbed:ns,enableAlignmentGuides:Bi,alignmentSnapThreshold:os}=e,Re=m.useMemo(()=>Mrt({mode:n,showToolbar:Xt,showStyleStrip:su,showDetailPanel:cu,showStatusBadges:lu,showResizeHandles:du,showControls:uu,showShareMenu:hu,showMiniMap:Qa,enableKeyboard:Ja,enableContextMenu:es,enableDragDrop:ts,enableImageDrop:ni,enableZoom:oi,enablePan:fu,enableSelection:pu,enableNodeMove:zo,enableEmbed:ns,enableAlignmentGuides:Bi,alignmentSnapThreshold:os}),[n,Xt,su,cu,lu,du,uu,hu,Qa,Ja,es,ts,ni,oi,fu,pu,zo,ns,Bi,os]),Rt=n==="edit",rs=m.useRef(Re);m.useEffect(()=>{rs.current=Re},[Re]);const yu=qt??(n==="mini"?!0:void 0),dr=m.useMemo(()=>brt(yu),[yu]),ur=x==null?void 0:x.runs,Ro=x==null?void 0:x.statuses,Hn=(AV=x==null?void 0:x.pendingOverrides)==null?void 0:AV.nodes,To=(EV=x==null?void 0:x.pendingOverrides)==null?void 0:EV.connectors,on=m.useRef(null),Zt=m.useRef(null),Ui=m.useRef(!1),xo=m.useRef(!1),is=m.useRef(!1),ri=m.useRef(dr);ri.current=dr,m.useEffect(()=>{if(Ui.current||!dr.onMount||u.length===0)return;const F=Zt.current;F&&(F.fitView($2),Ui.current=!0)},[u,dr.onMount]);const ii=m.useRef(null),Nt=Ae.kind==="draw"?Ae.shape:null,hr=Ae.kind==="hand",Wi=m.useRef(new Map),mu=m.useCallback((F,K)=>(Wi.current.set(F,K),()=>{Wi.current.get(F)===K&&Wi.current.delete(F)}),[]),[ai,si]=m.useState(!1),ci=m.useRef(!1);m.useEffect(()=>{ci.current=ai},[ai]);const Gi=m.useRef(!1),Do=m.useRef(!1),li=m.useRef(!1),[_n,Cn]=m.useState(null),Qn=m.useRef(null);m.useEffect(()=>{Qn.current=_n},[_n]),m.useCallback(()=>{Cn(null)},[]);const wo=m.useMemo(()=>$rt(li),[]),Ki=m.useRef(null),Xi=m.useRef(null),di=m.useCallback(F=>{const K=on.current;if(!K){Ki.current=F;return}const ie=Ki.current;if(ie&&ie!==F){const se=K.querySelector(`.react-flow__node[data-id="${CSS.escape(ie)}"]`);se==null||se.removeAttribute("data-connect-source")}if(F){const se=K.querySelector(`.react-flow__node[data-id="${CSS.escape(F)}"]`);se==null||se.setAttribute("data-connect-source","true")}Ki.current=F},[]),Zi=m.useCallback(F=>{const K=on.current,ie=Xi.current;if(ie!==F){if(K&&ie){const se=K.querySelector(`.react-flow__node[data-id="${CSS.escape(ie)}"]`);se==null||se.removeAttribute("data-connect-target")}if(K&&F){const se=K.querySelector(`.react-flow__node[data-id="${CSS.escape(F)}"]`);se==null||se.setAttribute("data-connect-target","true")}Xi.current=F}},[]),gu=m.useCallback(()=>{di(null),Zi(null)},[di,Zi]);m.useEffect(()=>{if(!ai){Zi(null);return}let F=null,K=null;const ie=()=>{F=null;const de=K;if(K=null,!de)return;const Ee=LD(on.current,de.clientX,de.clientY),we=(Ee==null?void 0:Ee.getAttribute("data-id"))??null;if(we&&we===Ki.current){Zi(null);return}Zi(we)},se=de=>{K={clientX:de.clientX,clientY:de.clientY},F===null&&(F=requestAnimationFrame(ie))};return document.addEventListener("pointermove",se,{passive:!0}),()=>{document.removeEventListener("pointermove",se),F!==null&&cancelAnimationFrame(F)}},[ai,Zi]);const[ut,as]=m.useState(null),[fr,Mo]=m.useState(null),pr=m.useRef(null),ku=m.useRef(null),ss=m.useRef(null),ui=m.useRef(!1);m.useEffect(()=>{pr.current=Nt},[Nt]);const hi=m.useCallback(()=>{He({kind:"select"}),as(null),Mo(null),pr.current=null,ku.current=null,ss.current=null,ui.current=!1},[He]);m.useEffect(()=>{if(!Re.enableKeyboard)return;const F=K=>{var de,Ee;if(K.key!=="Escape"||zO(document.activeElement))return;if(pr.current){K.preventDefault(),hi();return}if(ci.current){K.preventDefault(),Gi.current=!0,Do.current=!0;try{(de=ii.current)==null||de.getState().cancelConnection()}catch{}document.dispatchEvent(new MouseEvent("mouseup",{bubbles:!0,cancelable:!0,button:0})),si(!1);return}if(Qn.current){K.preventDefault(),Cn(null);return}const ie=Ho.current.size>0,se=mi.current.size>0;(ie||se)&&(K.preventDefault(),(Ee=mr.current)==null||Ee.call(mr,[],[]))};return window.addEventListener("keydown",F),()=>window.removeEventListener("keydown",F)},[hi,Re.enableKeyboard]),m.useEffect(()=>{if(!Re.enableKeyboard)return;const F=K=>{const ie=tOe(K,{isEditableActive:zO(document.activeElement)});ie&&Qe&&(K.preventDefault(),K.stopPropagation(),ie==="undo"?Qe.undo():Qe.redo())};return window.addEventListener("keydown",F),()=>window.removeEventListener("keydown",F)},[Qe,Re.enableKeyboard]),m.useEffect(()=>{if(!Re.enableKeyboard)return;const F=K=>{Trt({event:K,selectedNodeIds:y,hasClipboard:!!j,activeElement:document.activeElement,onCopySelection:X,onPasteSelection:Z})};return window.addEventListener("keydown",F),()=>window.removeEventListener("keydown",F)},[y,j,X,Z,Re.enableKeyboard]);const qR=m.useCallback(F=>{var se,de;if(!pr.current)return;const K=F.target;if(!(K!=null&&K.classList.contains("react-flow__pane")))return;const ie={x:F.clientX,y:F.clientY};ui.current=!0,ku.current=ie,ss.current=ie,as(ie),Mo(ie);try{(de=(se=F.currentTarget).setPointerCapture)==null||de.call(se,F.pointerId)}catch{}F.preventDefault(),F.stopPropagation()},[]),Wf=m.useCallback(F=>{if(!ui.current)return;const K={x:F.clientX,y:F.clientY};ss.current=K,Mo(K)},[]),VR=m.useCallback(F=>{var gr,p2;if(!ui.current)return;ui.current=!1;try{(p2=(gr=F.currentTarget).releasePointerCapture)==null||p2.call(gr,F.pointerId)}catch{}const K=ku.current,ie=ss.current,se=pr.current,de=Zt.current;if(hi(),!K||!ie||!se||!de)return;const Ee=Math.min(K.x,ie.x),we=Math.min(K.y,ie.y),Ne=Math.max(K.x,ie.x),tt=Math.max(K.y,ie.y),dt=Ne-Ee,ft=tt-we,ze=de.screenToFlowPosition({x:Ee,y:we}),an=de.screenToFlowPosition({x:Ne,y:tt}),eo=an.x-ze.x,mt=an.y-ze.y;if(se==="linkflow"){const $V=dt<VK&&ft<VK,Cae=$V?mz.width:Math.max(eo,gz.width),Sae=$V?mz.height:Math.max(mt,gz.height);U==null||U(ze,{width:Cae,height:Sae});return}const gt=dt<qK||ft<qK,Tt=gt?yz[se].width:eo,Fe=gt?yz[se].height:mt;z==null||z(se,ze,{width:Tt,height:Fe})},[hi,z,U]),fi=m.useRef(!1),cs=m.useRef(!1),bo=m.useRef(null),ls=m.useRef({}),d2=m.useRef(new Map),pi=m.useCallback(()=>{var F;xo.current&&(cs.current||fi.current||(xo.current=!1,(F=Zt.current)==null||F.fitView($2)))},[]),B=m.useCallback(F=>{cs.current=F,F||pi()},[pi]),q=m.useMemo(()=>({beginResize:(F,K)=>{var ie;return(ie=bo.current)==null?void 0:ie.beginResize(F,K)},applyResizeSnap:(F,K)=>{var ie;return((ie=bo.current)==null?void 0:ie.applyResizeSnap(F,K))??{snappedRect:F,guides:[]}},endResize:()=>{var F;return(F=bo.current)==null?void 0:F.endResize()}}),[]);m.useEffect(()=>{var F;if(!is.current){is.current=!0;return}if(ri.current.onExternalNodeChange){if(cs.current||fi.current){xo.current=!0;return}(F=Zt.current)==null||F.fitView($2)}},[Dn]);const W=!!R||!!L||!!V||!!H||!!he,[G,ee]=m.useState(null),[$e,lt]=m.useState(!1),[Je,At]=m.useState(null),[Sn,yr]=m.useState(null),je=m.useRef(null),ln=m.useRef(null);m.useEffect(()=>{if(!G)return;const F=ln.current;if(!F)return;const K=new MouseEvent("contextmenu",{clientX:G.x,clientY:G.y,bubbles:!0,cancelable:!0,button:2,buttons:2});F.dispatchEvent(K)},[G]);const yi=m.useCallback(F=>{const K=je.current;!K||!R||R(K,F)},[R]),vu=m.useCallback(()=>{const F=je.current;!F||!L||L(F)},[L]),xu=m.useCallback(()=>{const F=je.current;!F||!V||V(F)},[V]),BR=m.useCallback(()=>{const F=je.current;!F||!ae||ae(F)},[ae]);m.useCallback((F,K,ie,se,de)=>{rs.current.enableContextMenu&&(je.current=null,lt(!1),At(null),yr({connectorId:F,kind:K,pinned:ie}),ee({x:se,y:de}))},[]);const UR=m.useCallback(()=>{const F=Sn;!F||!he||he(F.connectorId,F.kind)},[Sn,he]),ds=m.useCallback(()=>{if(!H)return;const F=G,K=Zt.current;if(!F||!K)return;const ie=K.screenToFlowPosition({x:F.x,y:F.y});H(ie)},[G,H]),Be=typeof navigator<"u"&&/Mac|iPhone|iPad|iPod/.test(navigator.platform||navigator.userAgent||""),rn=Be?"⌘C":"Ctrl+C",Ln=Be?"⌘V":"Ctrl+V",dn=m.useMemo(()=>new Set(y),[y]),Jn=m.useMemo(()=>new Set(g),[g]),u2=m.useMemo(()=>{if(y.length<2)return[];const F=Hn,K=[];for(const ie of y){const se=u.find(Ne=>Ne.id===ie);if(!se)continue;const de=F==null?void 0:F[ie],Ee=(de==null?void 0:de.data)??{},we=se.data;K.push({id:ie,position:(de==null?void 0:de.position)??se.position,data:{width:Ee.width??we.width,height:Ee.height??we.height}})}return K},[u,Hn,y]),WR=J??[],us=m.useMemo(()=>{const F=de=>{const Ee=Rt?void 0:d2.current.get(de.id),we={id:de.id,type:de.type,position:Ee??de.position,data:{...de.data,projectId:a,fileBaseUrl:c,projectSlug:de.type==="component"?a:void 0,flowSlug:de.type==="component"?s:void 0,apiBaseUrl:de.type==="component"?l:void 0,onRetryUpload:T,status:Drt(ur,de.id),errorMessage:Hrt(ur,de.id),statusReport:Ro==null?void 0:Ro[de.id],onPlay:v,onResize:b,onResizeEnd:C,setResizing:B,resizeAlignment:Re.enableAlignmentGuides?q:void 0,onFitToContent:de.type==="html"?_:de.type==="component"?S:void 0,onNameChange:(()=>{if(Rt&&de.type!=="ellipse")return P})(),onDescriptionChange:(()=>{if(Rt&&(de.type==="rectangle"||de.type==="ellipse"||de.type==="sticky"))return A})(),onIconChange:(()=>{if(Rt&&!(de.type!=="rectangle"&&de.type!=="component"))return Se})(),autoEditOnMount:en===de.id?!0:void 0},selected:dn.has(de.id)};return(!(de.data.autoSize===!0)||cs.current)&&(de.data.width!==void 0&&(we.width=de.data.width),de.data.height!==void 0&&(we.height=de.data.height)),dn.has(de.id)||(we.connectable=!1),we},K=u.map(de=>F(Srt(de,Hn==null?void 0:Hn[de.id]))),ie=new Set(u.map(de=>de.id)),se=[];if(Hn)for(const[de,Ee]of Object.entries(Hn)){if(ie.has(de))continue;const we=Ee;typeof we.type!="string"||!we.position||!we.data||se.push(F({...we,id:de}))}return[...K,...se]},[a,s,c,l,u,dn,ur,Ro,v,b,C,_,S,B,q,Re.enableAlignmentGuides,Hn,P,A,Se,T,en,Rt]),[GR,KR]=m.useState(us);m.useEffect(()=>{fi.current||cs.current||KR(us)},[us]),m.useEffect(()=>{wu.current=GR},[GR]);const Ho=m.useRef(dn);m.useEffect(()=>{Ho.current=dn},[dn]);const mr=m.useRef(k);m.useEffect(()=>{mr.current=k},[k]);const mi=m.useRef(Jn);m.useEffect(()=>{mi.current=Jn},[Jn]);const wu=m.useRef(us),hs=m.useRef(!1),Gf=m.useRef(new Set),Kf=m.useRef(new Set),XR=m.useRef(new Set),ZR=m.useRef(new Set),Yi=m.useRef(null),Fie=m.useCallback(F=>{var Tt;const K=bo.current,ie=K?K.interceptChanges(F,ls.current):F,se=hs.current?XR.current:(Tt=Yi.current)!=null&&Tt.shift?Yi.current.nodeIds:null,de=se&&se.size>0?ie.filter(Fe=>Fe.type!=="select"?!0:!(Fe.selected===!1&&se.has(Fe.id))):ie,Ee=new Set;for(const Fe of de)Fe.type==="select"&&Ee.add(Fe.id);const we=pJ(de,wu.current),Ne=new Set;if(cs.current)for(const Fe of de)Fe.type==="dimensions"&&Ne.add(Fe.id);const tt=Ne.size===0?we:we.map(Fe=>!Ne.has(Fe.id)||Fe.width===void 0&&Fe.height===void 0?Fe:{...Fe,data:{...Fe.data,...Fe.width!==void 0?{width:Fe.width}:{},...Fe.height!==void 0?{height:Fe.height}:{}}}),dt=Ho.current,ft=hs.current||dt.size===0?tt:tt.map(Fe=>dt.has(Fe.id)&&!Ee.has(Fe.id)&&!Fe.selected?{...Fe,selected:!0}:Fe);if(wu.current=ft,KR(ft),Ee.size===0)return;if(hs.current){for(const Fe of de)Fe.type==="select"&&(Fe.selected?Gf.current.add(Fe.id):Gf.current.delete(Fe.id));return}const ze=mr.current;if(!ze)return;const an=ft.filter(Fe=>Fe.selected).map(Fe=>Fe.id),eo=Ho.current;eo.size===an.length&&an.every(Fe=>eo.has(Fe))||(Ho.current=new Set(an),ze(an,[...mi.current]))},[]),Xf=m.useRef([]),qie=m.useCallback(F=>{var ft;const K=hs.current?ZR.current:(ft=Yi.current)!=null&&ft.shift?Yi.current.edgeIds:null,ie=K&&K.size>0?F.filter(ze=>ze.type!=="select"?!0:!(ze.selected===!1&&K.has(ze.id))):F,se=new Set;for(const ze of ie)ze.type==="select"&&se.add(ze.id);if(se.size===0)return;if(hs.current){for(const ze of ie)ze.type==="select"&&(ze.selected?Kf.current.add(ze.id):Kf.current.delete(ze.id));return}const de=mr.current;if(!de)return;const we=yJ(ie,Xf.current).filter(ze=>ze.selected).map(ze=>ze.id),Ne=mi.current;Ne.size===we.length&&we.every(ze=>Ne.has(ze))||(mi.current=new Set(we),de([...Ho.current],we))},[]),Vie=m.useCallback(F=>{hs.current=!0;const K=Yi.current,ie=(K==null?void 0:K.shift)??(F.shiftKey||F.metaKey||F.ctrlKey);XR.current=ie?new Set((K==null?void 0:K.nodeIds)??Ho.current):new Set,ZR.current=ie?new Set((K==null?void 0:K.edgeIds)??mi.current):new Set,Gf.current=new Set(XR.current),Kf.current=new Set(ZR.current)},[]),Bie=m.useCallback(()=>{hs.current=!1,Yi.current=null;const F=mr.current;if(!F)return;const K=[...Gf.current],ie=new Set(K),se=new Set(Kf.current);for(const tt of Xf.current)ie.has(tt.source)&&ie.has(tt.target)&&se.add(tt.id);const de=Ho.current,Ee=mi.current,we=de.size===ie.size&&K.every(tt=>de.has(tt)),Ne=Ee.size===se.size&&[...se].every(tt=>Ee.has(tt));we&&Ne||(Ho.current=new Set(K),mi.current=new Set(se),F(K,[...se]))},[]),Uie=m.useCallback(F=>{if(Yi.current=null,pr.current||F.button!==0)return;const K=F.target;K!=null&&K.classList.contains("react-flow__pane")&&(Yi.current={shift:F.shiftKey||F.metaKey||F.ctrlKey,nodeIds:new Set(Ho.current),edgeIds:new Set(mi.current)})},[]),Wie=m.useCallback(F=>{if(!rs.current.enableContextMenu||Ho.current.size<2)return;const ie=F.target;ie!==ln.current&&(ie!=null&&ie.closest(".seeflow-connector-endpoint-dot")||(F.preventDefault(),F.stopPropagation(),je.current=null,lt(!0),At(null),yr(null),ee({x:F.clientX,y:F.clientY})))},[]),Gie=m.useCallback(F=>{const K=F.dataTransfer;if(!K)return;const ie=K.types?Array.from(K.types):[],se=ie.includes("Files"),de=ie.includes(kG),Ee=se&&!!$&&Re.enableImageDrop,we=de&&!!D&&Re.enableDragDrop;if(!(!Ee&&!we)){F.preventDefault();try{K.dropEffect="copy"}catch{}}},[$,D,Re.enableImageDrop,Re.enableDragDrop]),Kie=m.useCallback(F=>{const K=F.dataTransfer;if((K!=null&&K.types?Array.from(K.types):[]).includes(kG)&&D&&Re.enableDragDrop){F.preventDefault();const Ee=Zt.current;if(!Ee)return;const we=Ee.screenToFlowPosition({x:F.clientX,y:F.clientY});D({position:we});return}if(!$||!Re.enableImageDrop)return;const de={x:F.clientX,y:F.clientY};F.preventDefault(),gEe({dataTransfer:K,clientPos:de,rfInstance:Zt.current,computeDims:kEe,dispatch:$})},[$,D,Re.enableImageDrop,Re.enableDragDrop]),pV=!!I,yV=Jn.size===1?[...Jn][0]:null,YR=m.useMemo(()=>{const F=Ne=>{const tt=KK(ur,Ne.source)==="running"||KK(ur,Ne.target)==="running",dt=Jn.has(Ne.id),ft=_He(Ne,tt,dt);dt&&(ft.selected=!0);const ze=pV&&Ne.id===yV,an=ze?{...ft,reconnectable:!0}:ft;return{...an,data:{...an.data,onLabelChange:Rt?E:void 0,reconnectable:ze,registerEditHandle:mu}}},K=new Set(p.map(Ne=>Ne.id)),ie=p.map(Ne=>F(Lrt(Ne,To==null?void 0:To[Ne.id]))),se=[];if(To)for(const[Ne,tt]of Object.entries(To)){if(K.has(Ne))continue;const dt=tt;typeof dt.source!="string"||typeof dt.target!="string"||se.push(F({...dt,id:Ne}))}const de=[...ie,...se],Ee=[],we=[];for(const Ne of de)Jn.has(Ne.id)?we.push(Ne):Ee.push(Ne);return[...Ee,...we]},[p,ur,Jn,yV,To,E,pV,mu,Rt]);m.useEffect(()=>{Xf.current=YR},[YR]);const h2=o??null,Xie=m.useMemo(()=>{if(h2!=null&&h2.computeLayout)return async()=>{const F=Zt.current,K=wu.current;if(K.length<2)return;const ie=K.map(mt=>{var p2;const gt=(p2=F==null?void 0:F.getInternalNode(mt.id))==null?void 0:p2.measured,Tt=mt.data,Fe=(gt==null?void 0:gt.width)??Tt.width??200,gr=(gt==null?void 0:gt.height)??Tt.height??120;return{id:mt.id,type:mt.type,width:Fe,height:gr}}),se=new Map;for(const mt of K)se.set(mt.id,mt.position);const de=Xf.current.map(mt=>({id:mt.id,source:mt.source,target:mt.target})),Ee=h2.computeLayout;if(!Ee)return;const we=await Ee(ie,de),Ne=new Map;for(const[mt,gt]of Object.entries(we.nodes))Ne.set(mt,gt.position);let tt=Number.POSITIVE_INFINITY,dt=Number.POSITIVE_INFINITY,ft=Number.POSITIVE_INFINITY,ze=Number.POSITIVE_INFINITY;for(const mt of ie){const gt=se.get(mt.id);if(!gt)continue;gt.x<tt&&(tt=gt.x),gt.y<dt&&(dt=gt.y);const Tt=Ne.get(mt.id);Tt&&(Tt.x<ft&&(ft=Tt.x),Tt.y<ze&&(ze=Tt.y))}const an=Number.isFinite(tt)&&Number.isFinite(ft)?tt-ft:0,eo=Number.isFinite(dt)&&Number.isFinite(ze)?dt-ze:0;KR(mt=>mt.map(gt=>{const Tt=Ne.get(gt.id);return Tt?{...gt,position:{x:Tt.x+an,y:Tt.y+eo}}:gt}))}},[h2]),Zf=Ye??(Rt?void 0:Xie),Yf=m.useRef(!1),mV=m.useRef(null),Zie=m.useCallback(F=>{var Ne;if(!Rt||!O)return;const{source:K,target:ie}=F;if(!K||!ie||K===ie)return;Yf.current=!0;const se=((Ne=mV.current)==null?void 0:Ne.nodeId)??null,de=se!==null&&se===ie&&se!==K;O(de?ie:K,de?K:ie)},[O,Rt]),QR=m.useCallback(F=>{const K=ie=>{if(!ie)return!1;const se=wu.current.find(de=>de.id===ie);return se?se.type==="text":!1};return!K(F.source)&&!K(F.target)},[]),Yie=m.useCallback((F,K)=>{var ft;si(!1),gu();const ie=Yf.current;if(Yf.current=!1,ie||li.current)return;if(Gi.current){Gi.current=!1;return}if(!O)return;const se=(ft=K.fromNode)==null?void 0:ft.id,de=K.fromHandle;if(!se||!de)return;const Ee=BK(F);if(!Ee)return;const we=LD(on.current,Ee.clientX,Ee.clientY);if(!we)return;const Ne=we.getAttribute("data-id");if(!Ne||Ne===se||!QR({source:se,target:Ne,sourceHandle:null,targetHandle:null}))return;let tt;const dt=Zt.current;if(dt){const ze=dt.getInternalNode(Ne);if(ze){const an=ze.measured.width??ze.width??0,eo=ze.measured.height??ze.height??0;if(an>0&&eo>0){const mt=dt.screenToFlowPosition({x:Ee.clientX,y:Ee.clientY});tt=KH({x:ze.internals.positionAbsolute.x,y:ze.internals.positionAbsolute.y,w:an,h:eo},mt)}}}O(se,Ne,tt?{targetPin:tt}:void 0)},[O,gu,QR]),Qf=m.useRef(!1),Qie=m.useCallback((F,K)=>{if(!I)return;const{source:ie,target:se,sourceHandle:de,targetHandle:Ee}=K;if(!ie||!se||ie===se)return;const we={};if(ie!==F.source&&(we.source=ie),se!==F.target&&(we.target=se),typeof de=="string"&&de!==F.sourceHandle&&(we.sourceHandle=de),typeof Ee=="string"&&Ee!==F.targetHandle&&(we.targetHandle=Ee),we.source===void 0&&we.target===void 0&&we.sourceHandle===void 0&&we.targetHandle===void 0)return;(we.source!==void 0||we.sourceHandle!==void 0)&&(we.sourceHandleAutoPicked=!1),(we.target!==void 0||we.targetHandle!==void 0)&&(we.targetHandleAutoPicked=!1);const Ne=Zt.current;if(!(we.source===void 0&&we.target===void 0)&&Ne){const dt=we.source!==void 0?"source":"target",ft=UK(dt,F.source,F.target,F.data,ze=>Ne.getInternalNode(ze)??null);ft&&(dt==="source"?we.targetPin=ft:we.sourcePin=ft)}Qf.current=!0,I(F.id,we)},[I]),Jie=m.useCallback((F,K,ie,se)=>{var Fe;si(!1),gu(),li.current=!1;const de=Qf.current;if(Qf.current=!1,de)return;if(Do.current){Do.current=!1;return}if(!I)return;const Ee=BK(F);let we=((Fe=se.toNode)==null?void 0:Fe.id)??null;if(!we&&Ee){const gr=LD(on.current,Ee.clientX,Ee.clientY);we=(gr==null?void 0:gr.getAttribute("data-id"))??null}const Ne=ie==="source"?"target":"source",tt=Crt(Ne,K.source,K.target,we);if(tt==="no-op"||tt==="self-loop"||!Ee)return;const dt=Zt.current;if(!dt)return;const ft=tt==="pin-own"?Ne==="source"?K.source:K.target:we,ze=dt.getInternalNode(ft);if(!ze)return;const an=ze.measured.width??ze.width??0,eo=ze.measured.height??ze.height??0;if(an===0||eo===0)return;const mt=dt.screenToFlowPosition({x:Ee.clientX,y:Ee.clientY}),gt=KH({x:ze.internals.positionAbsolute.x,y:ze.internals.positionAbsolute.y,w:an,h:eo},mt);if(tt==="pin-own"){if(!Y)return;Y(K.id,Ne,gt);return}const Tt=UK(Ne,K.source,K.target,K.data,gr=>dt.getInternalNode(gr)??null);Ne==="source"?I(K.id,{source:we,sourceHandle:null,sourceHandleAutoPicked:!1,sourcePin:gt,...Tt?{targetPin:Tt}:{}}):I(K.id,{target:we,targetHandle:null,targetHandleAutoPicked:!1,targetPin:gt,...Tt?{sourcePin:Tt}:{}})},[I,gu,Y]),fs=m.useMemo(()=>{var Ne;if(!ut||!fr)return null;const F=(Ne=on.current)==null?void 0:Ne.getBoundingClientRect(),K=(F==null?void 0:F.left)??0,ie=(F==null?void 0:F.top)??0,se=Math.min(ut.x,fr.x),de=Math.min(ut.y,fr.y),Ee=Math.abs(fr.x-ut.x),we=Math.abs(fr.y-ut.y);return{left:se-K,top:de-ie,width:Ee,height:we}},[ut,fr]),Qi=Nt?O2(ca).node:void 0,f2=Nt==="linkflow",eae=Nt&&!f2?Fte(Nt):"",tae=Nt&&!f2?qte(Nt,Qi):void 0,nae=Nt==="text",[gV,kV]=m.useState(!1),[oae,Jf]=m.useState(!1),[rae,vV]=m.useState(!1),[xV,iae]=m.useState(()=>({canUndo:(Qe==null?void 0:Qe.canUndo)??!1,canRedo:(Qe==null?void 0:Qe.canRedo)??!1}));m.useEffect(()=>Qe?Qe.subscribe(iae):void 0,[Qe]);const[JR,wV]=m.useState(!1),aae=((jV=Zt.current)==null?void 0:jV.getViewport())??{x:0,y:0,zoom:1},MV=hot({enabled:Re.enableAlignmentGuides,thresholdPx:Re.alignmentSnapThreshold??6,viewport:aae,rfNodesRef:wu});bo.current=MV;const sae=Qe?xV.canUndo:!1,cae=Qe?xV.canRedo:!1,Ji=urt({projectId:a,getReactFlow:()=>Zt.current});m.useImperativeHandle(t,()=>({exportPdf:Ji.exportPdf,exportPng:Ji.exportPng,openEmbedDialog:()=>vV(!0),capturePreview:Ji.capturePreview}),[Ji.exportPdf,Ji.exportPng,Ji.capturePreview]),m.useEffect(()=>{if(!Re.enableKeyboard)return;const F=se=>{if(!se)return!1;const de=se.tagName;return de==="INPUT"||de==="TEXTAREA"||de==="SELECT"?!0:se instanceof HTMLElement&&se.isContentEditable},K=se=>{se.code==="Space"&&(F(document.activeElement)||(se.preventDefault(),kV(!0)))},ie=se=>{se.code==="Space"&&(kV(!1),Jf(!1))};return window.addEventListener("keydown",K),window.addEventListener("keyup",ie),()=>{window.removeEventListener("keydown",K),window.removeEventListener("keyup",ie)}},[Re.enableKeyboard]);const ep=m.useCallback(F=>{if(F.length!==0){if(!Rt){const K=d2.current;for(const ie of F)K.set(ie.id,{x:ie.position.x,y:ie.position.y});return}if(F.length===1){const K=F[0];K&&M&&M(K.id,{x:K.position.x,y:K.position.y});return}if(w){w(F.map(K=>({id:K.id,position:{x:K.position.x,y:K.position.y}})));return}if(M)for(const K of F)M(K.id,{x:K.position.x,y:K.position.y})}},[M,w,Rt]),bV=m.useCallback((F,K,ie)=>{fi.current=!1,ep(ie),pi()},[ep,pi]),_V=m.useCallback(()=>{fi.current=!0},[]),CV=m.useCallback((F,K)=>{fi.current=!1,ep(K),pi()},[ep,pi]),lae=m.useCallback((F,K)=>{Qn.current&&Cn(null);const ie=on.current;ie&&ie.style.setProperty("--rf-zoom",String(K.zoom)),Vi==null||Vi(K)},[Vi]),dae=m.useCallback((F,K,ie)=>{var se;fi.current=!0,ls.current={metaKey:F==null?void 0:F.metaKey,ctrlKey:F==null?void 0:F.ctrlKey},(se=bo.current)==null||se.beginGesture((ie??[]).map(de=>de.id)),vo==null||vo()},[vo]),uae=m.useCallback(F=>{ls.current={metaKey:F.metaKey,ctrlKey:F.ctrlKey}},[]),hae=m.useCallback((F,K,ie)=>{var se;bV(F,K,ie),(se=bo.current)==null||se.endGesture(),Yn==null||Yn()},[bV,Yn]),fae=m.useCallback((F,K)=>{var ie;_V(),ls.current={metaKey:F==null?void 0:F.metaKey,ctrlKey:F==null?void 0:F.ctrlKey},(ie=bo.current)==null||ie.beginGesture((K??[]).map(se=>se.id)),vo==null||vo()},[_V,vo]),pae=m.useCallback(F=>{ls.current={metaKey:F.metaKey,ctrlKey:F.ctrlKey}},[]),yae=m.useCallback((F,K)=>{var ie;CV(F,K),(ie=bo.current)==null||ie.endGesture(),Yn==null||Yn()},[CV,Yn]),mae=m.useCallback((F,K)=>{var ie;(ie=Wi.current.get(K.id))==null||ie()},[]),gae=m.useCallback((F,K)=>{ue==null||ue(K.id)},[ue]),kae=m.useCallback(F=>{Pt==null||Pt()},[Pt]),vae=m.useCallback((F,K)=>{Ie==null||Ie(K.id)},[Ie]),SV=Nt?"crosshair":hr||gV?oae?"grabbing":"grab":void 0,LV=y.length+g.length===1,NV=LV?y[0]:void 0,IV=LV?g[0]:void 0,xae=NV?u.find(F=>F.id===NV)??null:null;IV&&p.find(F=>F.id===IV);const wae=a??null,eT=Re.showDetailPanel&&!Ke,Mae=eT,bae=m.useMemo(()=>({custom:nn??{}}),[nn]),_ae=m.useMemo(()=>({studioBaseUrl:h}),[h]),tp=o==null?void 0:o.icons;return m.useEffect(()=>{if(!tp)return;let F=!1;return(async()=>{try{const K=await tp.listPacks();if(F)return;NH(K)}catch{}})(),()=>{F=!0}},[tp]),f.jsx(TFe,{value:bae,children:f.jsx(sEe,{value:_ae,children:f.jsx("div",{"data-testid":"seeflow-canvas","data-mode":n,"data-canvas-mode":Ae.kind,"data-can-undo":sae?"true":"false","data-can-redo":cae?"true":"false",ref:on,className:"seeflow-canvas-root sf:relative sf:flex sf:h-full sf:w-full",style:SV?{cursor:SV}:void 0,onPointerDownCapture:Uie,onPointerDown:F=>{gV&&Jf(!0),qR(F)},onPointerMove:Wf,onPointerUp:F=>{Jf(!1),VR(F)},onPointerCancel:()=>{ui.current=!1,ku.current=null,ss.current=null,as(null),Mo(null),Jf(!1)},onContextMenuCapture:Wie,onDragOver:Gie,onDrop:Kie,children:f.jsxs(XBe,{containerRef:on,children:[f.jsxs("div",{className:"sf:relative sf:flex-1 sf:min-w-0 sf:h-full",children:[f.jsxs(qDe,{nodes:GR,edges:YR,onNodesChange:Fie,nodeTypes:Nrt,edgeTypes:Irt,proOptions:Ert,fitView:!0,minZoom:n==="mini"?.05:.5,nodesDraggable:(Rt?!!M:!0)&&!Nt&&!hr&&Re.enableNodeMove,nodesConnectable:Rt&&!!O&&!Nt&&!hr,deleteKeyCode:Rt?["Backspace","Delete"]:null,zoomOnScroll:Re.enableZoom,zoomOnPinch:Re.enableZoom,className:ai?"seeflow-connecting":void 0,onConnect:Rt?Zie:void 0,isValidConnection:QR,onConnectStart:(F,K)=>{si(!0),Yf.current=!1,mV.current={nodeId:K.nodeId??null,handleType:K.handleType??null},di(K.nodeId??null)},onConnectEnd:Yie,onReconnect:Rt&&I?Qie:void 0,onReconnectStart:(F,K,ie)=>{si(!0),Qf.current=!1,li.current=!0;const se=ie==="source"?K.source:K.target;di(se)},onReconnectEnd:Jie,connectionLineComponent:wo,connectionLineStyle:{strokeWidth:2},connectionRadius:32,reconnectRadius:10,edgesReconnectable:!1,elevateNodesOnSelect:!1,elementsSelectable:!Nt&&!hr&&Re.enableSelection,selectNodesOnDrag:!1,nodeClickDistance:5,selectionOnDrag:!Nt&&!hr&&Re.enableSelection,panOnDrag:Nt?!1:hr?[0,1,2]:Re.enablePan?[1,2]:!1,selectionMode:I0.Partial,selectionKeyCode:null,multiSelectionKeyCode:Nt?null:["Meta","Shift"],panActivationKeyCode:Nt?null:"Space",onSelectionStart:Vie,onSelectionEnd:Bie,defaultEdgeOptions:Art,zoomOnDoubleClick:!1,onInit:F=>{Zt.current=F;const K=on.current;K&&K.style.setProperty("--rf-zoom",String(F.getZoom())),K&&K.setAttribute("data-canvas-ready","true"),!Ui.current&&dr.onMount&&u.length>0&&(F.fitView($2),Ui.current=!0),Te==null||Te(F)},onMove:lae,onEdgesChange:qie,onNodeDragStart:dae,onNodeDrag:uae,onNodeDragStop:hae,onSelectionDragStart:fae,onSelectionDrag:pae,onSelectionDragStop:yae,onNodeClick:gae,onEdgeClick:vae,onEdgeDoubleClick:mae,onPaneClick:kae,onNodeContextMenu:Re.enableContextMenu&&W?(F,K)=>{F.preventDefault(),je.current=K.id,lt(!0),At(K.type??null),yr(null),ee({x:F.clientX,y:F.clientY})}:void 0,onPaneContextMenu:Re.enableContextMenu&&H?F=>{F.preventDefault(),je.current=null,lt(!1),At(null),yr(null),ee({x:F.clientX,y:F.clientY})}:void 0,children:[f.jsx(Prt,{storeApiRef:ii}),f.jsx(zrt,{wrapperRef:on}),f.jsx(ZDe,{gap:12,size:.6}),Re.enableAlignmentGuides?f.jsx(OJ,{children:f.jsx(oot,{guides:MV.guides})}):null,n!=="mini"&&f.jsx(yrt,{}),Re.showControls?f.jsxs(oHe,{showInteractive:!1,showFitView:!1,children:[f.jsx(Qu,{"data-testid":"controls-fit-view","aria-label":"Fit view",title:"Fit view",disabled:u.length===0,onClick:()=>{var F;(F=Zt.current)==null||F.fitView($2)},children:f.jsx(Ld,{className:"sf:h-3 sf:w-3","aria-hidden":"true"})}),f.jsx(Qu,{"data-testid":"controls-tidy","aria-label":"Tidy layout (⌘⇧L)",title:"Tidy layout (⌘⇧L)",disabled:!Zf,onClick:()=>Zf==null?void 0:Zf(),children:f.jsx(hh,{className:"sf:h-3 sf:w-3","aria-hidden":"true"})})]}):null,Re.showMiniMap?f.jsx(mHe,{className:"sf-canvas-minimap"}):null,Re.showResizeHandles?f.jsx(Gnt,{selectedNodes:u2,onMultiResize:N}):null,r||Re.showToolbar||Re.showStyleStrip&&oe&&ge?f.jsx(P0,{position:"top-left",children:f.jsxs("div",{className:"sf:flex sf:flex-col sf:items-start sf:gap-2",children:[r,Re.showToolbar?f.jsx(vXe,{mode:Ae,onModeChange:He,iconPickerOpen:ce??!1,onOpenIconPicker:Q,onCloseIconPicker:zt,onPickIcon:yn,showShapeTools:Rt&&!!z,iconsAdapter:tp}):null,Re.showStyleStrip&&oe&&ge?f.jsx(Znt,{nodes:WR,connectors:re??[],onStyleNode:oe,onStyleNodePreview:ne,onStyleNodes:le,onStyleNodesPreview:ve,onStyleConnector:ge,onStyleConnectorPreview:xe,onRequestIconReplace:ae}):null]})}):null,Re.showShareMenu||i||eT?f.jsx(P0,{position:"top-right",children:f.jsxs("div",{className:"sf:flex sf:items-center sf:gap-1",children:[i,eT&&!JR?f.jsx(krt,{open:JR,onToggle:()=>wV(F=>!F)}):null,Re.showShareMenu?f.jsx(aie,{mode:n==="mini"?"view":n,projectId:a,enableEmbed:Re.enableEmbed,onDownloadPdf:Ji.exportPdf,onDownloadPng:Ji.exportPng,onExportToCloud:l2,embedOpen:rae,onEmbedOpenChange:vV}):null]})}):null]}),fs?f.jsxs("div",{"data-testid":"canvas-draw-ghost","data-ghost-shape":Nt??void 0,"aria-hidden":!0,className:te("sf:pointer-events-none sf:absolute sf:z-10",eae,nae?"sf:rounded-sm sf:border sf:border-dashed sf:border-muted-foreground/40":"",f2?"sf:flex sf:items-center sf:justify-center sf:rounded-md sf:border sf:border-dashed sf:border-border sf:bg-muted/40 sf:text-muted-foreground sf:text-sm":""),style:{...tae,left:fs.left,top:fs.top,width:fs.width,height:fs.height},children:[f2?f.jsxs("span",{className:"sf:inline-flex sf:items-center sf:gap-2",children:[f.jsx($a,{size:14,"aria-hidden":!0}),f.jsx("span",{children:"Link to a flow"})]}):null,(()=>{if(f2)return null;const F=Nt?Lq[Nt]:void 0;if(!F)return null;const K=Vte(Qi);return f.jsx(F,{width:fs.width,height:fs.height,borderColor:K.borderColor,backgroundColor:K.backgroundColor,borderSize:(Qi==null?void 0:Qi.borderSize)??tq,borderStyle:Qi==null?void 0:Qi.borderStyle})})()]}):null,Re.enableContextMenu&&W?f.jsxs(cKe,{onOpenChange:F=>{F||(ee(null),je.current=null,At(null),yr(null))},children:[f.jsx(lKe,{asChild:!0,children:f.jsx("div",{ref:ln,"data-testid":"node-context-menu-trigger","aria-hidden":!0,className:"sf:pointer-events-none sf:fixed",style:{left:(G==null?void 0:G.x)??0,top:(G==null?void 0:G.y)??0,width:0,height:0}})}),f.jsxs(ooe,{"data-testid":"node-context-menu",children:[Sn!=null&&Sn.pinned&&he?f.jsx(Nr,{"data-testid":"connector-endpoint-context-menu-unpin",onSelect:UR,children:"Unpin"}):null,$e&&V?f.jsxs(Nr,{"data-testid":"node-context-menu-copy",onSelect:xu,children:["Copy",f.jsx(gO,{children:rn})]}):null,H?f.jsxs(Nr,{"data-testid":"node-context-menu-paste",disabled:!j,onSelect:ds,children:["Paste",f.jsx(gO,{children:Ln})]}):null,$e&&(V||H)&&(Je==="icon"&&ae||R||L)?f.jsx(yP,{}):null,$e&&Je==="icon"&&ae?f.jsx(Nr,{"data-testid":"node-context-menu-change-icon",onSelect:BR,children:"Change icon"}):null,$e&&Je==="icon"&&ae&&(R||L)?f.jsx(yP,{}):null,$e&&R?f.jsxs(f.Fragment,{children:[f.jsx(Nr,{"data-testid":"node-context-menu-to-front",onSelect:()=>yi({op:"toFront"}),children:"Bring to front"}),f.jsx(Nr,{"data-testid":"node-context-menu-forward",onSelect:()=>yi({op:"forward"}),children:"Bring forward"}),f.jsx(Nr,{"data-testid":"node-context-menu-backward",onSelect:()=>yi({op:"backward"}),children:"Send backward"}),f.jsx(Nr,{"data-testid":"node-context-menu-to-back",onSelect:()=>yi({op:"toBack"}),children:"Send to back"})]}):null,$e&&R&&L?f.jsx(yP,{}):null,$e&&L?f.jsx(Nr,{"data-testid":"node-context-menu-delete",onSelect:vu,children:"Delete"}):null]})]}):null,wt?f.jsxs(Qd,{open:!!_n,onOpenChange:F=>{F||Cn(null)},children:[f.jsx(ZBe,{asChild:!0,children:f.jsx("div",{"data-testid":"drop-popover-anchor","aria-hidden":!0,className:"sf:pointer-events-none sf:fixed",style:{left:(_n==null?void 0:_n.clientX)??0,top:(_n==null?void 0:_n.clientY)??0,width:0,height:0}})}),f.jsx(Za,{"data-testid":"drop-popover",align:"start",side:"bottom",sideOffset:4,className:"sf:w-auto sf:p-1",onOpenAutoFocus:F=>{F.preventDefault()},children:f.jsx("div",{role:"menu","aria-label":"Create connected node",className:"sf:flex sf:flex-col sf:gap-0.5",children:kXe.map(({shape:F,label:K,Icon:ie})=>F==="linkflow"?null:f.jsxs("button",{type:"button",role:"menuitem","data-testid":`drop-popover-shape-${F}`,onClick:()=>{const se=_n;se&&(wt({sourceNodeId:se.sourceNodeId,position:{x:se.flowX,y:se.flowY},shape:F}),Cn(null))},className:te("sf:flex sf:items-center sf:gap-2 sf:rounded-sm sf:px-2 sf:py-1.5 sf:text-left sf:text-sm","sf:hover:bg-accent sf:hover:text-accent-foreground","sf:focus:bg-accent sf:focus:text-accent-foreground sf:focus:outline-hidden"),children:[f.jsx(ie,{className:"sf:h-4 sf:w-4 sf:text-muted-foreground","aria-hidden":"true"}),f.jsx("span",{children:K})]},F))})})]}):null]}),Mae?f.jsx(mnt,{flowId:wae,node:xae,connector:null,adapter:o??null,statusReport:Bt,onNameChange:mn,onDescriptionChange:tn,onDetailChange:ke,onIconChange:Se,open:JR,onClose:()=>{var F;wV(!1),(F=mr.current)==null||F.call(mr,[],[])}}):null]})})})})}const Frt=m.forwardRef(Ort);/**
8544
+ `)}async function nrt(e,t){const n=t.fontEmbedCSS!=null?t.fontEmbedCSS:t.skipFonts?null:await trt(e,t);if(n){const o=document.createElement("style"),r=document.createTextNode(n);o.appendChild(r),e.firstChild?e.insertBefore(o,e.firstChild):e.appendChild(o)}}async function ort(e,t={}){const{width:n,height:o}=hie(e,t),r=await FR(e,t,!0);return await nrt(r,t),await kie(r,t),Zot(r,t),await xot(r,n,o)}async function rrt(e,t={}){const{width:n,height:o}=hie(e,t),r=await ort(e,t),i=await Az(r),a=document.createElement("canvas"),s=a.getContext("2d"),c=t.pixelRatio||got(),l=t.canvasWidth||n,h=t.canvasHeight||o;return a.width=l*c,a.height=h*c,t.skipAutoScale||kot(a),a.style.width=`${l}`,a.style.height=`${h}`,t.backgroundColor&&(s.fillStyle=t.backgroundColor,s.fillRect(0,0,a.width,a.height)),s.drawImage(i,0,0,a.width,a.height),a}async function irt(e,t={}){return(await rrt(e,t)).toDataURL()}const art=e=>e instanceof Element?!(e.classList.contains("react-flow__minimap")||e.classList.contains("react-flow__controls")||e.classList.contains("react-flow__panel")):!0,srt=e=>{var o;let t=e;for(;t&&!t.classList.contains("seeflow-canvas-root");)t=t.parentElement;if(t){const r=getComputedStyle(t).getPropertyValue("--bg-canvas").trim();if(r.length>0)return r}const n=(o=e.ownerDocument)==null?void 0:o.documentElement;return n!=null&&n.classList.contains("dark")?"#0a0a0c":"#fafafa"},crt=async e=>{const t=await irt(e,{cacheBust:!0,filter:art,backgroundColor:srt(e)}),n=await new Promise((o,r)=>{const i=new Image;i.onload=()=>o({width:i.naturalWidth,height:i.naturalHeight}),i.onerror=()=>r(new Error("Failed to decode captured image")),i.src=t});return{dataUrl:t,...n}},lrt=(e,t)=>{const n=document.createElement("a");n.href=e,n.download=t,n.rel="noopener",document.body.appendChild(n),n.click(),n.remove()},drt=e=>{const t=e.replace(/[^A-Za-z0-9_-]+/g,"-").replace(/^-+|-+$/g,"");return t.length>0?t.slice(0,80):"canvas"},FK=(e,t)=>`${drt(e??"canvas")}.${t}`,urt=({projectId:e,getReactFlow:t})=>{const[n,o]=m.useState(null),r=m.useCallback(()=>o(null),[]),i=m.useCallback(async()=>{const l=t();if(!l)return null;const h=document.querySelector(".react-flow__viewport");if(!h)return null;const u=l.getViewport();try{return await l.fitView({duration:0,padding:.1}),await new Promise(p=>requestAnimationFrame(()=>p())),await crt(h)}finally{l.setViewport(u,{duration:0})}},[t]),a=m.useCallback(async()=>{o(null);try{const l=await i();if(!l)return;lrt(l.dataUrl,FK(e,"png"))}catch(l){o(l instanceof Error?l.message:String(l))}},[i,e]),s=m.useCallback(async()=>{o(null);try{const l=await i();if(!l)return;const{jsPDF:h}=await Z0(async()=>{const{jsPDF:y}=await import("./jspdf.es.min-BoDPBXoT.js").then(g=>g.j);return{jsPDF:y}},[]),u=l.width>l.height?"landscape":"portrait",p=new h({orientation:u,unit:"px",format:[l.width,l.height],hotfixes:["px_scaling"]});p.addImage(l.dataUrl,"PNG",0,0,l.width,l.height),p.save(FK(e,"pdf"))}catch(l){o(l instanceof Error?l.message:String(l))}},[i,e]),c=m.useCallback(async()=>{const l=await i();return l==null?void 0:l.dataUrl},[i]);return{exportPdf:s,exportPng:a,capturePreview:c,lastError:n,clearError:r}},hrt=12,frt=1200;function prt(e,t={}){const n=t.idleMs??frt;let o,r=null,i=null;const a=typeof requestAnimationFrame<"u",s=()=>{o!==void 0&&(clearTimeout(o),o=void 0)},c=()=>{i!==null&&typeof cancelAnimationFrame<"u"&&cancelAnimationFrame(i),i=null},l=()=>{if(i=null,!r)return;const{clientX:y,clientY:g}=r;r=null;const k=e.getBoundingClientRect();e.style.setProperty("--mx",`${y-k.left}px`),e.style.setProperty("--my",`${g-k.top}px`),e.dataset.active="true",s(),o=setTimeout(()=>{e.dataset.active="false",o=void 0},n)};return{onMove:y=>{if(r={clientX:y.clientX,clientY:y.clientY},!a){l();return}i===null&&(i=requestAnimationFrame(l))},onLeave:()=>{c(),r=null,s(),e.dataset.active="false"},dispose:()=>{c(),r=null,s()}}}function yrt(){const e=m.useRef(null),t=De(a=>a.transform,(a,s)=>a[0]===s[0]&&a[1]===s[1]&&a[2]===s[2]),[n,o,r]=t,i=hrt*r;return m.useEffect(()=>{var u;const a=e.current;if(!a)return;const s=(u=a.parentElement)==null?void 0:u.querySelector(".react-flow__pane");if(!s)return;const{onMove:c,onLeave:l,dispose:h}=prt(a);return s.addEventListener("mousemove",c,{passive:!0}),s.addEventListener("mouseleave",l,{passive:!0}),()=>{s.removeEventListener("mousemove",c),s.removeEventListener("mouseleave",l),h()}},[]),f.jsx("div",{ref:e,className:"glow-overlay","data-active":"false","data-testid":"canvas-glow-overlay",style:{backgroundPosition:`${n}px ${o}px`,backgroundSize:`${i}px ${i}px`}})}const mrt="Hide inspector",grt="Open inspector";function krt({open:e,onToggle:t}){const n=e?s0:mh,o=e?mrt:grt;return f.jsx(g0,{delayDuration:300,children:f.jsxs(i2,{children:[f.jsx(a2,{asChild:!0,children:f.jsx(rt,{type:"button",variant:"ghost",size:"icon","data-testid":"inspector-toggle","aria-pressed":e,"aria-label":o,onClick:t,className:"sf:h-8 sf:w-8",children:f.jsx(n,{className:"sf:h-4 sf:w-4","aria-hidden":"true"})})}),f.jsx(iu,{children:o})]})})}const vrt={showToolbar:!0,showStyleStrip:!0,showDetailPanel:!0,showStatusBadges:!0,showResizeHandles:!0,showControls:!0,showShareMenu:!0,showMiniMap:!0,enableKeyboard:!0,enableContextMenu:!0,enableDragDrop:!0,enableImageDrop:!0,enableZoom:!0,enablePan:!0,enableSelection:!0,enableNodeMove:!0,enableEmbed:!1,enableAlignmentGuides:!0},xrt={showToolbar:!0,showStyleStrip:!1,showDetailPanel:!1,showStatusBadges:!0,showResizeHandles:!1,showControls:!0,showShareMenu:!0,showMiniMap:!0,enableKeyboard:!1,enableContextMenu:!1,enableDragDrop:!1,enableImageDrop:!1,enableZoom:!0,enablePan:!0,enableSelection:!0,enableNodeMove:!0,enableEmbed:!1,enableAlignmentGuides:!1},wrt={showToolbar:!1,showStyleStrip:!1,showDetailPanel:!1,showStatusBadges:!1,showResizeHandles:!1,showControls:!1,showShareMenu:!1,showMiniMap:!1,enableKeyboard:!1,enableContextMenu:!1,enableDragDrop:!1,enableImageDrop:!1,enableZoom:!1,enablePan:!1,enableSelection:!1,enableNodeMove:!1,enableEmbed:!1,enableAlignmentGuides:!1};function Mrt(e){const t=e.mode==="edit"?vrt:e.mode==="mini"?wrt:xrt;return{showToolbar:e.showToolbar??t.showToolbar,showStyleStrip:e.showStyleStrip??t.showStyleStrip,showDetailPanel:e.showDetailPanel??t.showDetailPanel,showStatusBadges:e.showStatusBadges??t.showStatusBadges,showResizeHandles:e.showResizeHandles??t.showResizeHandles,showControls:e.showControls??t.showControls,showShareMenu:e.showShareMenu??t.showShareMenu,showMiniMap:e.showMiniMap??t.showMiniMap,enableKeyboard:e.enableKeyboard??t.enableKeyboard,enableContextMenu:e.enableContextMenu??t.enableContextMenu,enableDragDrop:e.enableDragDrop??t.enableDragDrop,enableImageDrop:e.enableImageDrop??t.enableImageDrop,enableZoom:e.enableZoom??t.enableZoom,enablePan:e.enablePan??t.enablePan,enableSelection:e.enableSelection??t.enableSelection,enableNodeMove:e.enableNodeMove??t.enableNodeMove,enableEmbed:e.enableEmbed??t.enableEmbed,enableAlignmentGuides:e.enableAlignmentGuides??t.enableAlignmentGuides,alignmentSnapThreshold:e.alignmentSnapThreshold}}const qK=40,VK=4,$2={padding:.15,duration:300,includeHiddenNodes:!1};function brt(e){return e===void 0||e===!1?{onMount:!1,onExternalNodeChange:!1}:e===!0?{onMount:!0,onExternalNodeChange:!0}:{onMount:e.onMount??!0,onExternalNodeChange:e.onExternalNodeChange??!0}}const BK=e=>{if("clientX"in e)return{clientX:e.clientX,clientY:e.clientY};const t=e.changedTouches[0]??e.touches[0];return t?{clientX:t.clientX,clientY:t.clientY}:null},_rt=(e,t)=>{var o;const n=document.elementsFromPoint(e,t);for(const r of n){const i=(o=r.closest)==null?void 0:o.call(r,".react-flow__node");if(i)return i}return null},xie=15,LD=(e,t,n)=>{const o=_rt(t,n);if(o)return o;if(!e)return null;let r=null,i=xie;const a=e.querySelectorAll(".react-flow__node");for(const s of a){const c=s.getBoundingClientRect();if(c.width===0||c.height===0)continue;const l=Math.max(c.left-t,0,t-c.right),h=Math.max(c.top-n,0,n-c.bottom),u=Math.hypot(l,h);u<=i&&(r=s,i=u)}return r};function UK(e,t,n,o,r){if(e==="source"?(o==null?void 0:o.targetPin)!==void 0||(o==null?void 0:o.targetHandleAutoPicked)===!1:(o==null?void 0:o.sourcePin)!==void 0||(o==null?void 0:o.sourceHandleAutoPicked)===!1)return;const a=e==="source"?n:t,s=e==="source"?t:n,c=r(a),l=r(s);if(!c||!l)return;const h=c.measured.width??c.width??0,u=c.measured.height??c.height??0,p=l.measured.width??l.width??0,y=l.measured.height??l.height??0;if(h===0||u===0||p===0||y===0)return;const g={x:c.internals.positionAbsolute.x,y:c.internals.positionAbsolute.y,w:h,h:u},k={x:l.internals.positionAbsolute.x+p/2,y:l.internals.positionAbsolute.y+y/2};return AHe(g,tz(g,k))}function Crt(e,t,n,o){if(o===null)return"no-op";const r=e==="source"?t:n;return o===(e==="source"?n:t)?"self-loop":o===r?"pin-own":"reconnect-and-pin"}const Srt=(e,t)=>{if(!t)return e;const n=t.data?{...e.data,...t.data}:e.data;return{...e,...t,data:n}},Lrt=(e,t)=>t?{...e,...t}:e,Nrt={rectangle:_We,ellipse:vr,sticky:vr,text:vr,database:vr,server:vr,user:vr,queue:vr,cloud:vr,diamond:vr,hexagon:vr,image:pWe,icon:VHe,html:lWe,component:EUe,linkflow:kWe},Irt={editableEdge:LWe},Art={zIndex:0},Ert={hideAttribution:!0},jrt=8,WK=(e,t)=>e?typeof e=="string"?`url('#${e}')`:`url('#${`${t?`${t}__`:""}${Object.keys(e).sort().map(r=>`${r}=${e[r]}`).join("&")}`}')`:void 0,$rt=e=>function({fromX:n,fromY:o,toX:r,toY:i,fromPosition:a,toPosition:s,connectionLineStyle:c}){const l=De(V=>e.current?V.edges.find(H=>H.reconnectable===!0)??null:null),h=l==null?void 0:l.data,u=De(V=>{var j;const H=V.connection;return((j=H==null?void 0:H.fromHandle)==null?void 0:j.nodeId)??null}),p=De(V=>l!=null&&l.source?V.nodeLookup.get(l.source)??null:null),y=De(V=>l!=null&&l.target?V.nodeLookup.get(l.target)??null:null),g=De(V=>u?V.nodeLookup.get(u)??null:null),k=(l==null?void 0:l.source)===u,x=l?k?p:y:g,v=k?y:p,M=k?h==null?void 0:h.sourcePin:h==null?void 0:h.targetPin,w=k?h==null?void 0:h.sourceHandleAutoPicked:h==null?void 0:h.targetHandleAutoPicked;let b=n,C=o,_=a;if(x){const V=x.measured.width??x.width??0,H=x.measured.height??x.height??0;if(V>0&&H>0){const j={x:x.internals.positionAbsolute.x,y:x.internals.positionAbsolute.y,w:V,h:H};let X=null;if(M)X=nz(j,M);else if(w!==!1&&v){const Z=v.measured.width??v.width??0,J=v.measured.height??v.height??0;if(Z>0&&J>0){const re={x:v.internals.positionAbsolute.x+Z/2,y:v.internals.positionAbsolute.y+J/2};X=tz(j,re)}}X&&(b=X.x,C=X.y,_=GK[X.side])}}const S=De(V=>V.transform[2]),N=De(V=>V.nodeLookup),P=De(V=>{var H;return((H=V.connection.toHandle)==null?void 0:H.nodeId)??null});let A=r,E=i,z=s;if(S>0){const V=xie/S,H=l?k?l.target:l.source:null;let j=null;if(P&&P!==H){const X=N.get(P)??null;X&&(j=X)}if(!j){let X=V;for(const Z of N.values()){if(H&&Z.id===H||x&&Z.id===x.id)continue;const J=Z.measured.width??Z.width??0,re=Z.measured.height??Z.height??0;if(J===0||re===0)continue;const oe=Z.internals.positionAbsolute.x,ne=Z.internals.positionAbsolute.y,le=Math.max(oe-r,0,r-(oe+J)),ve=Math.max(ne-i,0,i-(ne+re)),ge=Math.hypot(le,ve);ge<=X&&(X=ge,j=Z)}}if(!j&&l&&x){const X=x.measured.width??x.width??0,Z=x.measured.height??x.height??0;if(X>0&&Z>0){const J=x.internals.positionAbsolute.x,re=x.internals.positionAbsolute.y,oe=Math.max(J-r,0,r-(J+X)),ne=Math.max(re-i,0,i-(re+Z));Math.hypot(oe,ne)<=V&&(j=x)}}if(j){const X=j.measured.width??j.width??0,Z=j.measured.height??j.height??0;if(X>0&&Z>0){const J=KH({x:j.internals.positionAbsolute.x,y:j.internals.positionAbsolute.y,w:X,h:Z},{x:r,y:i}),re=nz({x:j.internals.positionAbsolute.x,y:j.internals.positionAbsolute.y,w:X,h:Z},J);A=re.x,E=re.y,z=GK[re.side]}}}const U=(h==null?void 0:h.path)==="step",[$]=U?cf({sourceX:b,sourceY:C,sourcePosition:_,targetX:A,targetY:E,targetPosition:z,borderRadius:jrt}):iR({sourceX:b,sourceY:C,sourcePosition:_,targetX:A,targetY:E,targetPosition:z}),T=(l==null?void 0:l.style)??c??void 0,D=De(V=>V.rfId),O=k?l==null?void 0:l.markerStart:l==null?void 0:l.markerEnd,I=k?l==null?void 0:l.markerEnd:l==null?void 0:l.markerStart,R=WK(O,D),L=WK(I,D);return f.jsx("path",{d:$,fill:"none",className:"react-flow__connection-path",style:T,markerStart:R,markerEnd:L})},GK={top:fe.Top,right:fe.Right,bottom:fe.Bottom,left:fe.Left};function Prt({storeApiRef:e}){const t=xt();return m.useEffect(()=>(e.current=t,()=>{e.current===t&&(e.current=null)}),[t,e]),null}function zrt({wrapperRef:e}){const t=De(o=>o.transform[2]),n=e.current;return n&&n.style.setProperty("--rf-zoom",String(t)),null}const Rrt=new Set(["INPUT","TEXTAREA","SELECT"]),zO=e=>e?Rrt.has(e.tagName)?!0:e instanceof HTMLElement&&e.isContentEditable:!1;function Trt(e){const{event:t,selectedNodeIds:n,hasClipboard:o,activeElement:r,onCopySelection:i,onPasteSelection:a}=e;if(!(t.metaKey||t.ctrlKey)||t.shiftKey||t.altKey)return!1;const s=t.key.toLowerCase();return s!=="c"&&s!=="v"||zO(r)?!1:s==="c"?n.length===0||!i?!1:(t.preventDefault(),i([...n]),!0):!o||!a?!1:(t.preventDefault(),a(),!0)}const KK=(e,t)=>{var n;return((n=e==null?void 0:e[t])==null?void 0:n.status)??"idle"},Drt=(e,t)=>{var n;return(n=e==null?void 0:e[t])==null?void 0:n.status},Hrt=(e,t)=>{var n,o;return((n=e==null?void 0:e[t])==null?void 0:n.status)==="error"?(o=e[t])==null?void 0:o.error:void 0};function Ort(e,t){var AV,EV,jV;const{mode:n,adapter:o,topLeftSlot:r,topRightSlot:i,projectId:a,flowSlug:s,fileBaseUrl:c,apiBaseUrl:l="/api",studioBaseUrl:h="",nodes:u,connectors:p,selectedNodeIds:y,selectedConnectorIds:g,onSelectionChange:k,runtime:x,onPlayNode:v,onNodePositionChange:M,onNodePositionsChange:w,onNodeResize:b,onNodeResizeEnd:C,onHtmlNodeFitToContent:_,onComponentNodeFitToContent:S,onMultiResize:N,onNodeNameChange:P,onNodeDescriptionChange:A,onConnectorLabelChange:E,onCreateShapeNode:z,onCreateLinkflowNode:U,onCreateImageFromFile:$,onRetryImageUpload:T,onCreateHtmlNode:D,onCreateConnector:O,onReconnectConnector:I,onReorderNode:R,onDeleteNode:L,onCopyNode:V,onPasteAt:H,hasClipboard:j,onCopySelection:X,onPasteSelection:Z,selectedNodes:J,selectedConnectors:re,onStyleNode:oe,onStyleNodePreview:ne,onStyleNodes:le,onStyleNodesPreview:ve,onStyleConnector:ge,onStyleConnectorPreview:xe,onRfInit:Te,onTidy:Ye,onNodeClick:ue,onConnectorClick:Ie,onPaneClick:Pt,onCreateAndConnectFromPane:wt,pendingEditNodeId:en,iconPickerOpen:ce,onOpenIconPicker:Q,onCloseIconPicker:zt,onPickIcon:yn,onRequestIconReplace:ae,onPinEndpoint:Y,onUnpinEndpoint:he,canvasMode:Ae,onCanvasModeChange:He,disableSidebar:Ke,statusReport:Bt,onNameChange:mn,onDescriptionChange:tn,onDetailChange:ke,onIconChange:Se,autoFitView:qt,autoFitViewSignal:Dn,customIcons:nn,onExportToCloud:l2,onNodeDragStart:vo,onNodeDragStop:Yn,onViewportChange:Vi,history:Qe,showToolbar:Xt,showStyleStrip:su,showDetailPanel:cu,showStatusBadges:lu,showResizeHandles:du,showControls:uu,showShareMenu:hu,showMiniMap:Qa,enableKeyboard:Ja,enableContextMenu:es,enableDragDrop:ts,enableImageDrop:ni,enableZoom:oi,enablePan:fu,enableSelection:pu,enableNodeMove:zo,enableEmbed:ns,enableAlignmentGuides:Bi,alignmentSnapThreshold:os}=e,Re=m.useMemo(()=>Mrt({mode:n,showToolbar:Xt,showStyleStrip:su,showDetailPanel:cu,showStatusBadges:lu,showResizeHandles:du,showControls:uu,showShareMenu:hu,showMiniMap:Qa,enableKeyboard:Ja,enableContextMenu:es,enableDragDrop:ts,enableImageDrop:ni,enableZoom:oi,enablePan:fu,enableSelection:pu,enableNodeMove:zo,enableEmbed:ns,enableAlignmentGuides:Bi,alignmentSnapThreshold:os}),[n,Xt,su,cu,lu,du,uu,hu,Qa,Ja,es,ts,ni,oi,fu,pu,zo,ns,Bi,os]),Rt=n==="edit",rs=m.useRef(Re);m.useEffect(()=>{rs.current=Re},[Re]);const yu=qt??(n==="mini"?!0:void 0),dr=m.useMemo(()=>brt(yu),[yu]),ur=x==null?void 0:x.runs,Ro=x==null?void 0:x.statuses,Hn=(AV=x==null?void 0:x.pendingOverrides)==null?void 0:AV.nodes,To=(EV=x==null?void 0:x.pendingOverrides)==null?void 0:EV.connectors,on=m.useRef(null),Zt=m.useRef(null),Ui=m.useRef(!1),xo=m.useRef(!1),is=m.useRef(!1),ri=m.useRef(dr);ri.current=dr,m.useEffect(()=>{if(Ui.current||!dr.onMount||u.length===0)return;const F=Zt.current;F&&(F.fitView($2),Ui.current=!0)},[u,dr.onMount]);const ii=m.useRef(null),Nt=Ae.kind==="draw"?Ae.shape:null,hr=Ae.kind==="hand",Wi=m.useRef(new Map),mu=m.useCallback((F,K)=>(Wi.current.set(F,K),()=>{Wi.current.get(F)===K&&Wi.current.delete(F)}),[]),[ai,si]=m.useState(!1),ci=m.useRef(!1);m.useEffect(()=>{ci.current=ai},[ai]);const Gi=m.useRef(!1),Do=m.useRef(!1),li=m.useRef(!1),[_n,Cn]=m.useState(null),Qn=m.useRef(null);m.useEffect(()=>{Qn.current=_n},[_n]),m.useCallback(()=>{Cn(null)},[]);const wo=m.useMemo(()=>$rt(li),[]),Ki=m.useRef(null),Xi=m.useRef(null),di=m.useCallback(F=>{const K=on.current;if(!K){Ki.current=F;return}const ie=Ki.current;if(ie&&ie!==F){const se=K.querySelector(`.react-flow__node[data-id="${CSS.escape(ie)}"]`);se==null||se.removeAttribute("data-connect-source")}if(F){const se=K.querySelector(`.react-flow__node[data-id="${CSS.escape(F)}"]`);se==null||se.setAttribute("data-connect-source","true")}Ki.current=F},[]),Zi=m.useCallback(F=>{const K=on.current,ie=Xi.current;if(ie!==F){if(K&&ie){const se=K.querySelector(`.react-flow__node[data-id="${CSS.escape(ie)}"]`);se==null||se.removeAttribute("data-connect-target")}if(K&&F){const se=K.querySelector(`.react-flow__node[data-id="${CSS.escape(F)}"]`);se==null||se.setAttribute("data-connect-target","true")}Xi.current=F}},[]),gu=m.useCallback(()=>{di(null),Zi(null)},[di,Zi]);m.useEffect(()=>{if(!ai){Zi(null);return}let F=null,K=null;const ie=()=>{F=null;const de=K;if(K=null,!de)return;const Ee=LD(on.current,de.clientX,de.clientY),we=(Ee==null?void 0:Ee.getAttribute("data-id"))??null;if(we&&we===Ki.current){Zi(null);return}Zi(we)},se=de=>{K={clientX:de.clientX,clientY:de.clientY},F===null&&(F=requestAnimationFrame(ie))};return document.addEventListener("pointermove",se,{passive:!0}),()=>{document.removeEventListener("pointermove",se),F!==null&&cancelAnimationFrame(F)}},[ai,Zi]);const[ut,as]=m.useState(null),[fr,Mo]=m.useState(null),pr=m.useRef(null),ku=m.useRef(null),ss=m.useRef(null),ui=m.useRef(!1);m.useEffect(()=>{pr.current=Nt},[Nt]);const hi=m.useCallback(()=>{He({kind:"select"}),as(null),Mo(null),pr.current=null,ku.current=null,ss.current=null,ui.current=!1},[He]);m.useEffect(()=>{if(!Re.enableKeyboard)return;const F=K=>{var de,Ee;if(K.key!=="Escape"||zO(document.activeElement))return;if(pr.current){K.preventDefault(),hi();return}if(ci.current){K.preventDefault(),Gi.current=!0,Do.current=!0;try{(de=ii.current)==null||de.getState().cancelConnection()}catch{}document.dispatchEvent(new MouseEvent("mouseup",{bubbles:!0,cancelable:!0,button:0})),si(!1);return}if(Qn.current){K.preventDefault(),Cn(null);return}const ie=Ho.current.size>0,se=mi.current.size>0;(ie||se)&&(K.preventDefault(),(Ee=mr.current)==null||Ee.call(mr,[],[]))};return window.addEventListener("keydown",F),()=>window.removeEventListener("keydown",F)},[hi,Re.enableKeyboard]),m.useEffect(()=>{if(!Re.enableKeyboard)return;const F=K=>{const ie=tOe(K,{isEditableActive:zO(document.activeElement)});ie&&Qe&&(K.preventDefault(),K.stopPropagation(),ie==="undo"?Qe.undo():Qe.redo())};return window.addEventListener("keydown",F),()=>window.removeEventListener("keydown",F)},[Qe,Re.enableKeyboard]),m.useEffect(()=>{if(!Re.enableKeyboard)return;const F=K=>{Trt({event:K,selectedNodeIds:y,hasClipboard:!!j,activeElement:document.activeElement,onCopySelection:X,onPasteSelection:Z})};return window.addEventListener("keydown",F),()=>window.removeEventListener("keydown",F)},[y,j,X,Z,Re.enableKeyboard]);const qR=m.useCallback(F=>{var se,de;if(!pr.current)return;const K=F.target;if(!(K!=null&&K.classList.contains("react-flow__pane")))return;const ie={x:F.clientX,y:F.clientY};ui.current=!0,ku.current=ie,ss.current=ie,as(ie),Mo(ie);try{(de=(se=F.currentTarget).setPointerCapture)==null||de.call(se,F.pointerId)}catch{}F.preventDefault(),F.stopPropagation()},[]),Wf=m.useCallback(F=>{if(!ui.current)return;const K={x:F.clientX,y:F.clientY};ss.current=K,Mo(K)},[]),VR=m.useCallback(F=>{var gr,p2;if(!ui.current)return;ui.current=!1;try{(p2=(gr=F.currentTarget).releasePointerCapture)==null||p2.call(gr,F.pointerId)}catch{}const K=ku.current,ie=ss.current,se=pr.current,de=Zt.current;if(hi(),!K||!ie||!se||!de)return;const Ee=Math.min(K.x,ie.x),we=Math.min(K.y,ie.y),Ne=Math.max(K.x,ie.x),tt=Math.max(K.y,ie.y),dt=Ne-Ee,ft=tt-we,ze=de.screenToFlowPosition({x:Ee,y:we}),an=de.screenToFlowPosition({x:Ne,y:tt}),eo=an.x-ze.x,mt=an.y-ze.y;if(se==="linkflow"){const $V=dt<VK&&ft<VK,Cae=$V?mz.width:Math.max(eo,gz.width),Sae=$V?mz.height:Math.max(mt,gz.height);U==null||U(ze,{width:Cae,height:Sae});return}const gt=dt<qK||ft<qK,Tt=gt?yz[se].width:eo,Fe=gt?yz[se].height:mt;z==null||z(se,ze,{width:Tt,height:Fe})},[hi,z,U]),fi=m.useRef(!1),cs=m.useRef(!1),bo=m.useRef(null),ls=m.useRef({}),d2=m.useRef(new Map),pi=m.useCallback(()=>{var F;xo.current&&(cs.current||fi.current||(xo.current=!1,(F=Zt.current)==null||F.fitView($2)))},[]),B=m.useCallback(F=>{cs.current=F,F||pi()},[pi]),q=m.useMemo(()=>({beginResize:(F,K)=>{var ie;return(ie=bo.current)==null?void 0:ie.beginResize(F,K)},applyResizeSnap:(F,K)=>{var ie;return((ie=bo.current)==null?void 0:ie.applyResizeSnap(F,K))??{snappedRect:F,guides:[]}},endResize:()=>{var F;return(F=bo.current)==null?void 0:F.endResize()}}),[]);m.useEffect(()=>{var F;if(!is.current){is.current=!0;return}if(ri.current.onExternalNodeChange){if(cs.current||fi.current){xo.current=!0;return}(F=Zt.current)==null||F.fitView($2)}},[Dn]);const W=!!R||!!L||!!V||!!H||!!he,[G,ee]=m.useState(null),[$e,lt]=m.useState(!1),[Je,At]=m.useState(null),[Sn,yr]=m.useState(null),je=m.useRef(null),ln=m.useRef(null);m.useEffect(()=>{if(!G)return;const F=ln.current;if(!F)return;const K=new MouseEvent("contextmenu",{clientX:G.x,clientY:G.y,bubbles:!0,cancelable:!0,button:2,buttons:2});F.dispatchEvent(K)},[G]);const yi=m.useCallback(F=>{const K=je.current;!K||!R||R(K,F)},[R]),vu=m.useCallback(()=>{const F=je.current;!F||!L||L(F)},[L]),xu=m.useCallback(()=>{const F=je.current;!F||!V||V(F)},[V]),BR=m.useCallback(()=>{const F=je.current;!F||!ae||ae(F)},[ae]);m.useCallback((F,K,ie,se,de)=>{rs.current.enableContextMenu&&(je.current=null,lt(!1),At(null),yr({connectorId:F,kind:K,pinned:ie}),ee({x:se,y:de}))},[]);const UR=m.useCallback(()=>{const F=Sn;!F||!he||he(F.connectorId,F.kind)},[Sn,he]),ds=m.useCallback(()=>{if(!H)return;const F=G,K=Zt.current;if(!F||!K)return;const ie=K.screenToFlowPosition({x:F.x,y:F.y});H(ie)},[G,H]),Be=typeof navigator<"u"&&/Mac|iPhone|iPad|iPod/.test(navigator.platform||navigator.userAgent||""),rn=Be?"⌘C":"Ctrl+C",Ln=Be?"⌘V":"Ctrl+V",dn=m.useMemo(()=>new Set(y),[y]),Jn=m.useMemo(()=>new Set(g),[g]),u2=m.useMemo(()=>{if(y.length<2)return[];const F=Hn,K=[];for(const ie of y){const se=u.find(Ne=>Ne.id===ie);if(!se)continue;const de=F==null?void 0:F[ie],Ee=(de==null?void 0:de.data)??{},we=se.data;K.push({id:ie,position:(de==null?void 0:de.position)??se.position,data:{width:Ee.width??we.width,height:Ee.height??we.height}})}return K},[u,Hn,y]),WR=J??[],us=m.useMemo(()=>{const F=de=>{const Ee=Rt?void 0:d2.current.get(de.id),we={id:de.id,type:de.type,position:Ee??de.position,data:{...de.data,projectId:a,fileBaseUrl:c,projectSlug:de.type==="component"?a:void 0,flowSlug:de.type==="component"?s:void 0,apiBaseUrl:de.type==="component"?l:void 0,onRetryUpload:T,status:Drt(ur,de.id),errorMessage:Hrt(ur,de.id),statusReport:Ro==null?void 0:Ro[de.id],onPlay:v,onResize:b,onResizeEnd:C,setResizing:B,resizeAlignment:Re.enableAlignmentGuides?q:void 0,onFitToContent:de.type==="html"?_:de.type==="component"?S:void 0,onNameChange:(()=>{if(Rt&&de.type!=="ellipse")return P})(),onDescriptionChange:(()=>{if(Rt&&(de.type==="rectangle"||de.type==="ellipse"||de.type==="sticky"))return A})(),onIconChange:(()=>{if(Rt&&!(de.type!=="rectangle"&&de.type!=="component"))return Se})(),autoEditOnMount:en===de.id?!0:void 0},selected:dn.has(de.id)};return(!(de.data.autoSize===!0)||cs.current)&&(de.data.width!==void 0&&(we.width=de.data.width),de.data.height!==void 0&&(we.height=de.data.height)),dn.has(de.id)||(we.connectable=!1),we},K=u.map(de=>F(Srt(de,Hn==null?void 0:Hn[de.id]))),ie=new Set(u.map(de=>de.id)),se=[];if(Hn)for(const[de,Ee]of Object.entries(Hn)){if(ie.has(de))continue;const we=Ee;typeof we.type!="string"||!we.position||!we.data||se.push(F({...we,id:de}))}return[...K,...se]},[a,s,c,l,u,dn,ur,Ro,v,b,C,_,S,B,q,Re.enableAlignmentGuides,Hn,P,A,Se,T,en,Rt]),[GR,KR]=m.useState(us);m.useEffect(()=>{fi.current||cs.current||KR(us)},[us]),m.useEffect(()=>{wu.current=GR},[GR]);const Ho=m.useRef(dn);m.useEffect(()=>{Ho.current=dn},[dn]);const mr=m.useRef(k);m.useEffect(()=>{mr.current=k},[k]);const mi=m.useRef(Jn);m.useEffect(()=>{mi.current=Jn},[Jn]);const wu=m.useRef(us),hs=m.useRef(!1),Gf=m.useRef(new Set),Kf=m.useRef(new Set),XR=m.useRef(new Set),ZR=m.useRef(new Set),Yi=m.useRef(null),Fie=m.useCallback(F=>{var Tt;const K=bo.current,ie=K?K.interceptChanges(F,ls.current):F,se=hs.current?XR.current:(Tt=Yi.current)!=null&&Tt.shift?Yi.current.nodeIds:null,de=se&&se.size>0?ie.filter(Fe=>Fe.type!=="select"?!0:!(Fe.selected===!1&&se.has(Fe.id))):ie,Ee=new Set;for(const Fe of de)Fe.type==="select"&&Ee.add(Fe.id);const we=pJ(de,wu.current),Ne=new Set;if(cs.current)for(const Fe of de)Fe.type==="dimensions"&&Ne.add(Fe.id);const tt=Ne.size===0?we:we.map(Fe=>!Ne.has(Fe.id)||Fe.width===void 0&&Fe.height===void 0?Fe:{...Fe,data:{...Fe.data,...Fe.width!==void 0?{width:Fe.width}:{},...Fe.height!==void 0?{height:Fe.height}:{}}}),dt=Ho.current,ft=hs.current||dt.size===0?tt:tt.map(Fe=>dt.has(Fe.id)&&!Ee.has(Fe.id)&&!Fe.selected?{...Fe,selected:!0}:Fe);if(wu.current=ft,KR(ft),Ee.size===0)return;if(hs.current){for(const Fe of de)Fe.type==="select"&&(Fe.selected?Gf.current.add(Fe.id):Gf.current.delete(Fe.id));return}const ze=mr.current;if(!ze)return;const an=ft.filter(Fe=>Fe.selected).map(Fe=>Fe.id),eo=Ho.current;eo.size===an.length&&an.every(Fe=>eo.has(Fe))||(Ho.current=new Set(an),ze(an,[...mi.current]))},[]),Xf=m.useRef([]),qie=m.useCallback(F=>{var ft;const K=hs.current?ZR.current:(ft=Yi.current)!=null&&ft.shift?Yi.current.edgeIds:null,ie=K&&K.size>0?F.filter(ze=>ze.type!=="select"?!0:!(ze.selected===!1&&K.has(ze.id))):F,se=new Set;for(const ze of ie)ze.type==="select"&&se.add(ze.id);if(se.size===0)return;if(hs.current){for(const ze of ie)ze.type==="select"&&(ze.selected?Kf.current.add(ze.id):Kf.current.delete(ze.id));return}const de=mr.current;if(!de)return;const we=yJ(ie,Xf.current).filter(ze=>ze.selected).map(ze=>ze.id),Ne=mi.current;Ne.size===we.length&&we.every(ze=>Ne.has(ze))||(mi.current=new Set(we),de([...Ho.current],we))},[]),Vie=m.useCallback(F=>{hs.current=!0;const K=Yi.current,ie=(K==null?void 0:K.shift)??(F.shiftKey||F.metaKey||F.ctrlKey);XR.current=ie?new Set((K==null?void 0:K.nodeIds)??Ho.current):new Set,ZR.current=ie?new Set((K==null?void 0:K.edgeIds)??mi.current):new Set,Gf.current=new Set(XR.current),Kf.current=new Set(ZR.current)},[]),Bie=m.useCallback(()=>{hs.current=!1,Yi.current=null;const F=mr.current;if(!F)return;const K=[...Gf.current],ie=new Set(K),se=new Set(Kf.current);for(const tt of Xf.current)ie.has(tt.source)&&ie.has(tt.target)&&se.add(tt.id);const de=Ho.current,Ee=mi.current,we=de.size===ie.size&&K.every(tt=>de.has(tt)),Ne=Ee.size===se.size&&[...se].every(tt=>Ee.has(tt));we&&Ne||(Ho.current=new Set(K),mi.current=new Set(se),F(K,[...se]))},[]),Uie=m.useCallback(F=>{if(Yi.current=null,pr.current||F.button!==0)return;const K=F.target;K!=null&&K.classList.contains("react-flow__pane")&&(Yi.current={shift:F.shiftKey||F.metaKey||F.ctrlKey,nodeIds:new Set(Ho.current),edgeIds:new Set(mi.current)})},[]),Wie=m.useCallback(F=>{if(!rs.current.enableContextMenu||Ho.current.size<2)return;const ie=F.target;ie!==ln.current&&(ie!=null&&ie.closest(".seeflow-connector-endpoint-dot")||(F.preventDefault(),F.stopPropagation(),je.current=null,lt(!0),At(null),yr(null),ee({x:F.clientX,y:F.clientY})))},[]),Gie=m.useCallback(F=>{const K=F.dataTransfer;if(!K)return;const ie=K.types?Array.from(K.types):[],se=ie.includes("Files"),de=ie.includes(kG),Ee=se&&!!$&&Re.enableImageDrop,we=de&&!!D&&Re.enableDragDrop;if(!(!Ee&&!we)){F.preventDefault();try{K.dropEffect="copy"}catch{}}},[$,D,Re.enableImageDrop,Re.enableDragDrop]),Kie=m.useCallback(F=>{const K=F.dataTransfer;if((K!=null&&K.types?Array.from(K.types):[]).includes(kG)&&D&&Re.enableDragDrop){F.preventDefault();const Ee=Zt.current;if(!Ee)return;const we=Ee.screenToFlowPosition({x:F.clientX,y:F.clientY});D({position:we});return}if(!$||!Re.enableImageDrop)return;const de={x:F.clientX,y:F.clientY};F.preventDefault(),gEe({dataTransfer:K,clientPos:de,rfInstance:Zt.current,computeDims:kEe,dispatch:$})},[$,D,Re.enableImageDrop,Re.enableDragDrop]),pV=!!I,yV=Jn.size===1?[...Jn][0]:null,YR=m.useMemo(()=>{const F=Ne=>{const tt=KK(ur,Ne.source)==="running"||KK(ur,Ne.target)==="running",dt=Jn.has(Ne.id),ft=_He(Ne,tt,dt);dt&&(ft.selected=!0);const ze=pV&&Ne.id===yV,an=ze?{...ft,reconnectable:!0}:ft;return{...an,data:{...an.data,onLabelChange:Rt?E:void 0,reconnectable:ze,registerEditHandle:mu}}},K=new Set(p.map(Ne=>Ne.id)),ie=p.map(Ne=>F(Lrt(Ne,To==null?void 0:To[Ne.id]))),se=[];if(To)for(const[Ne,tt]of Object.entries(To)){if(K.has(Ne))continue;const dt=tt;typeof dt.source!="string"||typeof dt.target!="string"||se.push(F({...dt,id:Ne}))}const de=[...ie,...se],Ee=[],we=[];for(const Ne of de)Jn.has(Ne.id)?we.push(Ne):Ee.push(Ne);return[...Ee,...we]},[p,ur,Jn,yV,To,E,pV,mu,Rt]);m.useEffect(()=>{Xf.current=YR},[YR]);const h2=o??null,Xie=m.useMemo(()=>{if(h2!=null&&h2.computeLayout)return async()=>{const F=Zt.current,K=wu.current;if(K.length<2)return;const ie=K.map(mt=>{var p2;const gt=(p2=F==null?void 0:F.getInternalNode(mt.id))==null?void 0:p2.measured,Tt=mt.data,Fe=(gt==null?void 0:gt.width)??Tt.width??200,gr=(gt==null?void 0:gt.height)??Tt.height??120;return{id:mt.id,type:mt.type,width:Fe,height:gr}}),se=new Map;for(const mt of K)se.set(mt.id,mt.position);const de=Xf.current.map(mt=>({id:mt.id,source:mt.source,target:mt.target})),Ee=h2.computeLayout;if(!Ee)return;const we=await Ee(ie,de),Ne=new Map;for(const[mt,gt]of Object.entries(we.nodes))Ne.set(mt,gt.position);let tt=Number.POSITIVE_INFINITY,dt=Number.POSITIVE_INFINITY,ft=Number.POSITIVE_INFINITY,ze=Number.POSITIVE_INFINITY;for(const mt of ie){const gt=se.get(mt.id);if(!gt)continue;gt.x<tt&&(tt=gt.x),gt.y<dt&&(dt=gt.y);const Tt=Ne.get(mt.id);Tt&&(Tt.x<ft&&(ft=Tt.x),Tt.y<ze&&(ze=Tt.y))}const an=Number.isFinite(tt)&&Number.isFinite(ft)?tt-ft:0,eo=Number.isFinite(dt)&&Number.isFinite(ze)?dt-ze:0;KR(mt=>mt.map(gt=>{const Tt=Ne.get(gt.id);return Tt?{...gt,position:{x:Tt.x+an,y:Tt.y+eo}}:gt}))}},[h2]),Zf=Ye??(Rt?void 0:Xie),Yf=m.useRef(!1),mV=m.useRef(null),Zie=m.useCallback(F=>{var Ne;if(!Rt||!O)return;const{source:K,target:ie}=F;if(!K||!ie||K===ie)return;Yf.current=!0;const se=((Ne=mV.current)==null?void 0:Ne.nodeId)??null,de=se!==null&&se===ie&&se!==K;O(de?ie:K,de?K:ie)},[O,Rt]),QR=m.useCallback(F=>{const K=ie=>{if(!ie)return!1;const se=wu.current.find(de=>de.id===ie);return se?se.type==="text":!1};return!K(F.source)&&!K(F.target)},[]),Yie=m.useCallback((F,K)=>{var ft;si(!1),gu();const ie=Yf.current;if(Yf.current=!1,ie||li.current)return;if(Gi.current){Gi.current=!1;return}if(!O)return;const se=(ft=K.fromNode)==null?void 0:ft.id,de=K.fromHandle;if(!se||!de)return;const Ee=BK(F);if(!Ee)return;const we=LD(on.current,Ee.clientX,Ee.clientY);if(!we)return;const Ne=we.getAttribute("data-id");if(!Ne||Ne===se||!QR({source:se,target:Ne,sourceHandle:null,targetHandle:null}))return;let tt;const dt=Zt.current;if(dt){const ze=dt.getInternalNode(Ne);if(ze){const an=ze.measured.width??ze.width??0,eo=ze.measured.height??ze.height??0;if(an>0&&eo>0){const mt=dt.screenToFlowPosition({x:Ee.clientX,y:Ee.clientY});tt=KH({x:ze.internals.positionAbsolute.x,y:ze.internals.positionAbsolute.y,w:an,h:eo},mt)}}}O(se,Ne,tt?{targetPin:tt}:void 0)},[O,gu,QR]),Qf=m.useRef(!1),Qie=m.useCallback((F,K)=>{if(!I)return;const{source:ie,target:se,sourceHandle:de,targetHandle:Ee}=K;if(!ie||!se||ie===se)return;const we={};if(ie!==F.source&&(we.source=ie),se!==F.target&&(we.target=se),typeof de=="string"&&de!==F.sourceHandle&&(we.sourceHandle=de),typeof Ee=="string"&&Ee!==F.targetHandle&&(we.targetHandle=Ee),we.source===void 0&&we.target===void 0&&we.sourceHandle===void 0&&we.targetHandle===void 0)return;(we.source!==void 0||we.sourceHandle!==void 0)&&(we.sourceHandleAutoPicked=!1),(we.target!==void 0||we.targetHandle!==void 0)&&(we.targetHandleAutoPicked=!1);const Ne=Zt.current;if(!(we.source===void 0&&we.target===void 0)&&Ne){const dt=we.source!==void 0?"source":"target",ft=UK(dt,F.source,F.target,F.data,ze=>Ne.getInternalNode(ze)??null);ft&&(dt==="source"?we.targetPin=ft:we.sourcePin=ft)}Qf.current=!0,I(F.id,we)},[I]),Jie=m.useCallback((F,K,ie,se)=>{var Fe;si(!1),gu(),li.current=!1;const de=Qf.current;if(Qf.current=!1,de)return;if(Do.current){Do.current=!1;return}if(!I)return;const Ee=BK(F);let we=((Fe=se.toNode)==null?void 0:Fe.id)??null;if(!we&&Ee){const gr=LD(on.current,Ee.clientX,Ee.clientY);we=(gr==null?void 0:gr.getAttribute("data-id"))??null}const Ne=ie==="source"?"target":"source",tt=Crt(Ne,K.source,K.target,we);if(tt==="no-op"||tt==="self-loop"||!Ee)return;const dt=Zt.current;if(!dt)return;const ft=tt==="pin-own"?Ne==="source"?K.source:K.target:we,ze=dt.getInternalNode(ft);if(!ze)return;const an=ze.measured.width??ze.width??0,eo=ze.measured.height??ze.height??0;if(an===0||eo===0)return;const mt=dt.screenToFlowPosition({x:Ee.clientX,y:Ee.clientY}),gt=KH({x:ze.internals.positionAbsolute.x,y:ze.internals.positionAbsolute.y,w:an,h:eo},mt);if(tt==="pin-own"){if(!Y)return;Y(K.id,Ne,gt);return}const Tt=UK(Ne,K.source,K.target,K.data,gr=>dt.getInternalNode(gr)??null);Ne==="source"?I(K.id,{source:we,sourceHandle:null,sourceHandleAutoPicked:!1,sourcePin:gt,...Tt?{targetPin:Tt}:{}}):I(K.id,{target:we,targetHandle:null,targetHandleAutoPicked:!1,targetPin:gt,...Tt?{sourcePin:Tt}:{}})},[I,gu,Y]),fs=m.useMemo(()=>{var Ne;if(!ut||!fr)return null;const F=(Ne=on.current)==null?void 0:Ne.getBoundingClientRect(),K=(F==null?void 0:F.left)??0,ie=(F==null?void 0:F.top)??0,se=Math.min(ut.x,fr.x),de=Math.min(ut.y,fr.y),Ee=Math.abs(fr.x-ut.x),we=Math.abs(fr.y-ut.y);return{left:se-K,top:de-ie,width:Ee,height:we}},[ut,fr]),Qi=Nt?O2(ca).node:void 0,f2=Nt==="linkflow",eae=Nt&&!f2?Fte(Nt):"",tae=Nt&&!f2?qte(Nt,Qi):void 0,nae=Nt==="text",[gV,kV]=m.useState(!1),[oae,Jf]=m.useState(!1),[rae,vV]=m.useState(!1),[xV,iae]=m.useState(()=>({canUndo:(Qe==null?void 0:Qe.canUndo)??!1,canRedo:(Qe==null?void 0:Qe.canRedo)??!1}));m.useEffect(()=>Qe?Qe.subscribe(iae):void 0,[Qe]);const[JR,wV]=m.useState(!1),aae=((jV=Zt.current)==null?void 0:jV.getViewport())??{x:0,y:0,zoom:1},MV=hot({enabled:Re.enableAlignmentGuides,thresholdPx:Re.alignmentSnapThreshold??6,viewport:aae,rfNodesRef:wu});bo.current=MV;const sae=Qe?xV.canUndo:!1,cae=Qe?xV.canRedo:!1,Ji=urt({projectId:a,getReactFlow:()=>Zt.current});m.useImperativeHandle(t,()=>({exportPdf:Ji.exportPdf,exportPng:Ji.exportPng,openEmbedDialog:()=>vV(!0),capturePreview:Ji.capturePreview}),[Ji.exportPdf,Ji.exportPng,Ji.capturePreview]),m.useEffect(()=>{if(!Re.enableKeyboard)return;const F=se=>{if(!se)return!1;const de=se.tagName;return de==="INPUT"||de==="TEXTAREA"||de==="SELECT"?!0:se instanceof HTMLElement&&se.isContentEditable},K=se=>{se.code==="Space"&&(F(document.activeElement)||(se.preventDefault(),kV(!0)))},ie=se=>{se.code==="Space"&&(kV(!1),Jf(!1))};return window.addEventListener("keydown",K),window.addEventListener("keyup",ie),()=>{window.removeEventListener("keydown",K),window.removeEventListener("keyup",ie)}},[Re.enableKeyboard]);const ep=m.useCallback(F=>{if(F.length!==0){if(!Rt){const K=d2.current;for(const ie of F)K.set(ie.id,{x:ie.position.x,y:ie.position.y});return}if(F.length===1){const K=F[0];K&&M&&M(K.id,{x:K.position.x,y:K.position.y});return}if(w){w(F.map(K=>({id:K.id,position:{x:K.position.x,y:K.position.y}})));return}if(M)for(const K of F)M(K.id,{x:K.position.x,y:K.position.y})}},[M,w,Rt]),bV=m.useCallback((F,K,ie)=>{fi.current=!1,ep(ie),pi()},[ep,pi]),_V=m.useCallback(()=>{fi.current=!0},[]),CV=m.useCallback((F,K)=>{fi.current=!1,ep(K),pi()},[ep,pi]),lae=m.useCallback((F,K)=>{Qn.current&&Cn(null);const ie=on.current;ie&&ie.style.setProperty("--rf-zoom",String(K.zoom)),Vi==null||Vi(K)},[Vi]),dae=m.useCallback((F,K,ie)=>{var se;fi.current=!0,ls.current={metaKey:F==null?void 0:F.metaKey,ctrlKey:F==null?void 0:F.ctrlKey},(se=bo.current)==null||se.beginGesture((ie??[]).map(de=>de.id)),vo==null||vo()},[vo]),uae=m.useCallback(F=>{ls.current={metaKey:F.metaKey,ctrlKey:F.ctrlKey}},[]),hae=m.useCallback((F,K,ie)=>{var se;bV(F,K,ie),(se=bo.current)==null||se.endGesture(),Yn==null||Yn()},[bV,Yn]),fae=m.useCallback((F,K)=>{var ie;_V(),ls.current={metaKey:F==null?void 0:F.metaKey,ctrlKey:F==null?void 0:F.ctrlKey},(ie=bo.current)==null||ie.beginGesture((K??[]).map(se=>se.id)),vo==null||vo()},[_V,vo]),pae=m.useCallback(F=>{ls.current={metaKey:F.metaKey,ctrlKey:F.ctrlKey}},[]),yae=m.useCallback((F,K)=>{var ie;CV(F,K),(ie=bo.current)==null||ie.endGesture(),Yn==null||Yn()},[CV,Yn]),mae=m.useCallback((F,K)=>{var ie;(ie=Wi.current.get(K.id))==null||ie()},[]),gae=m.useCallback((F,K)=>{ue==null||ue(K.id)},[ue]),kae=m.useCallback(F=>{Pt==null||Pt()},[Pt]),vae=m.useCallback((F,K)=>{Ie==null||Ie(K.id)},[Ie]),SV=Nt?"crosshair":hr||gV?oae?"grabbing":"grab":void 0,LV=y.length+g.length===1,NV=LV?y[0]:void 0,IV=LV?g[0]:void 0,xae=NV?u.find(F=>F.id===NV)??null:null;IV&&p.find(F=>F.id===IV);const wae=a??null,eT=Re.showDetailPanel&&!Ke,Mae=eT,bae=m.useMemo(()=>({custom:nn??{}}),[nn]),_ae=m.useMemo(()=>({studioBaseUrl:h}),[h]),tp=o==null?void 0:o.icons;return m.useEffect(()=>{if(!tp)return;let F=!1;return(async()=>{try{const K=await tp.listPacks();if(F)return;NH(K)}catch{}})(),()=>{F=!0}},[tp]),f.jsx(TFe,{value:bae,children:f.jsx(sEe,{value:_ae,children:f.jsx("div",{"data-testid":"seeflow-canvas","data-mode":n,"data-canvas-mode":Ae.kind,"data-can-undo":sae?"true":"false","data-can-redo":cae?"true":"false",ref:on,className:"seeflow-canvas-root sf:relative sf:flex sf:h-full sf:w-full",style:SV?{cursor:SV}:void 0,onPointerDownCapture:Uie,onPointerDown:F=>{gV&&Jf(!0),qR(F)},onPointerMove:Wf,onPointerUp:F=>{Jf(!1),VR(F)},onPointerCancel:()=>{ui.current=!1,ku.current=null,ss.current=null,as(null),Mo(null),Jf(!1)},onContextMenuCapture:Wie,onDragOver:Gie,onDrop:Kie,children:f.jsxs(XBe,{containerRef:on,children:[f.jsxs("div",{className:"sf:relative sf:flex-1 sf:min-w-0 sf:h-full",children:[f.jsxs(qDe,{nodes:GR,edges:YR,onNodesChange:Fie,nodeTypes:Nrt,edgeTypes:Irt,proOptions:Ert,fitView:!0,minZoom:n==="mini"?.05:.5,nodesDraggable:(Rt?!!M:!0)&&!Nt&&!hr&&Re.enableNodeMove,nodesConnectable:Rt&&!!O&&!Nt&&!hr,deleteKeyCode:Rt?["Backspace","Delete"]:null,zoomOnScroll:Re.enableZoom,zoomOnPinch:Re.enableZoom,className:ai?"seeflow-connecting":void 0,onConnect:Rt?Zie:void 0,isValidConnection:QR,onConnectStart:(F,K)=>{si(!0),Yf.current=!1,mV.current={nodeId:K.nodeId??null,handleType:K.handleType??null},di(K.nodeId??null)},onConnectEnd:Yie,onReconnect:Rt&&I?Qie:void 0,onReconnectStart:(F,K,ie)=>{si(!0),Qf.current=!1,li.current=!0;const se=ie==="source"?K.source:K.target;di(se)},onReconnectEnd:Jie,connectionLineComponent:wo,connectionLineStyle:{strokeWidth:2},connectionRadius:32,reconnectRadius:10,edgesReconnectable:!1,elevateNodesOnSelect:!1,elementsSelectable:!Nt&&!hr&&Re.enableSelection,selectNodesOnDrag:!1,nodeClickDistance:5,selectionOnDrag:!Nt&&!hr&&Re.enableSelection,panOnDrag:Nt?!1:hr?[0,1,2]:Re.enablePan?[1,2]:!1,selectionMode:I0.Partial,selectionKeyCode:null,multiSelectionKeyCode:Nt?null:["Meta","Shift"],panActivationKeyCode:Nt?null:"Space",onSelectionStart:Vie,onSelectionEnd:Bie,defaultEdgeOptions:Art,zoomOnDoubleClick:!1,onInit:F=>{Zt.current=F;const K=on.current;K&&K.style.setProperty("--rf-zoom",String(F.getZoom())),K&&K.setAttribute("data-canvas-ready","true"),!Ui.current&&dr.onMount&&u.length>0&&(F.fitView($2),Ui.current=!0),Te==null||Te(F)},onMove:lae,onEdgesChange:qie,onNodeDragStart:dae,onNodeDrag:uae,onNodeDragStop:hae,onSelectionDragStart:fae,onSelectionDrag:pae,onSelectionDragStop:yae,onNodeClick:gae,onEdgeClick:vae,onEdgeDoubleClick:mae,onPaneClick:kae,onNodeContextMenu:Re.enableContextMenu&&W?(F,K)=>{F.preventDefault(),je.current=K.id,lt(!0),At(K.type??null),yr(null),ee({x:F.clientX,y:F.clientY})}:void 0,onPaneContextMenu:Re.enableContextMenu&&H?F=>{F.preventDefault(),je.current=null,lt(!1),At(null),yr(null),ee({x:F.clientX,y:F.clientY})}:void 0,children:[f.jsx(Prt,{storeApiRef:ii}),f.jsx(zrt,{wrapperRef:on}),f.jsx(ZDe,{gap:12,size:.6}),Re.enableAlignmentGuides?f.jsx(OJ,{children:f.jsx(oot,{guides:MV.guides})}):null,n!=="mini"&&f.jsx(yrt,{}),Re.showControls?f.jsxs(oHe,{showInteractive:!1,showFitView:!1,children:[f.jsx(Qu,{"data-testid":"controls-fit-view","aria-label":"Fit view",title:"Fit view",disabled:u.length===0,onClick:()=>{var F;(F=Zt.current)==null||F.fitView($2)},children:f.jsx(Ld,{className:"sf:h-3 sf:w-3","aria-hidden":"true"})}),f.jsx(Qu,{"data-testid":"controls-tidy","aria-label":"Tidy layout (⌘⇧L)",title:"Tidy layout (⌘⇧L)",disabled:!Zf,onClick:()=>Zf==null?void 0:Zf(),children:f.jsx(hh,{className:"sf:h-3 sf:w-3","aria-hidden":"true"})})]}):null,Re.showMiniMap?f.jsx(mHe,{className:"sf-canvas-minimap"}):null,Re.showResizeHandles?f.jsx(Gnt,{selectedNodes:u2,onMultiResize:N}):null,r||Re.showToolbar||Re.showStyleStrip&&oe&&ge?f.jsx(P0,{position:"top-left",children:f.jsxs("div",{className:"sf:flex sf:flex-col sf:items-start sf:gap-2",children:[r,Re.showToolbar?f.jsx(vXe,{mode:Ae,onModeChange:He,iconPickerOpen:ce??!1,onOpenIconPicker:Q,onCloseIconPicker:zt,onPickIcon:yn,showShapeTools:Rt&&!!z,iconsAdapter:tp}):null,Re.showStyleStrip&&oe&&ge?f.jsx(Znt,{nodes:WR,connectors:re??[],onStyleNode:oe,onStyleNodePreview:ne,onStyleNodes:le,onStyleNodesPreview:ve,onStyleConnector:ge,onStyleConnectorPreview:xe,onRequestIconReplace:ae}):null]})}):null,Re.showShareMenu||i||eT?f.jsx(P0,{position:"top-right",children:f.jsxs("div",{className:"sf:flex sf:items-center sf:gap-1",children:[i,eT&&!JR?f.jsx(krt,{open:JR,onToggle:()=>wV(F=>!F)}):null,Re.showShareMenu?f.jsx(aie,{mode:n==="mini"?"view":n,projectId:a,enableEmbed:Re.enableEmbed,onDownloadPdf:Ji.exportPdf,onDownloadPng:Ji.exportPng,onExportToCloud:l2,embedOpen:rae,onEmbedOpenChange:vV}):null]})}):null]}),fs?f.jsxs("div",{"data-testid":"canvas-draw-ghost","data-ghost-shape":Nt??void 0,"aria-hidden":!0,className:te("sf:pointer-events-none sf:absolute sf:z-10",eae,nae?"sf:rounded-sm sf:border sf:border-dashed sf:border-muted-foreground/40":"",f2?"sf:flex sf:items-center sf:justify-center sf:rounded-md sf:border sf:border-dashed sf:border-border sf:bg-muted/40 sf:text-muted-foreground sf:text-sm":""),style:{...tae,left:fs.left,top:fs.top,width:fs.width,height:fs.height},children:[f2?f.jsxs("span",{className:"sf:inline-flex sf:items-center sf:gap-2",children:[f.jsx($a,{size:14,"aria-hidden":!0}),f.jsx("span",{children:"Link to a flow"})]}):null,(()=>{if(f2)return null;const F=Nt?Lq[Nt]:void 0;if(!F)return null;const K=Vte(Qi);return f.jsx(F,{width:fs.width,height:fs.height,borderColor:K.borderColor,backgroundColor:K.backgroundColor,borderSize:(Qi==null?void 0:Qi.borderSize)??tq,borderStyle:Qi==null?void 0:Qi.borderStyle})})()]}):null,Re.enableContextMenu&&W?f.jsxs(cKe,{onOpenChange:F=>{F||(ee(null),je.current=null,At(null),yr(null))},children:[f.jsx(lKe,{asChild:!0,children:f.jsx("div",{ref:ln,"data-testid":"node-context-menu-trigger","aria-hidden":!0,className:"sf:pointer-events-none sf:fixed",style:{left:(G==null?void 0:G.x)??0,top:(G==null?void 0:G.y)??0,width:0,height:0}})}),f.jsxs(ooe,{"data-testid":"node-context-menu",children:[Sn!=null&&Sn.pinned&&he?f.jsx(Nr,{"data-testid":"connector-endpoint-context-menu-unpin",onSelect:UR,children:"Unpin"}):null,$e&&V?f.jsxs(Nr,{"data-testid":"node-context-menu-copy",onSelect:xu,children:["Copy",f.jsx(gO,{children:rn})]}):null,H?f.jsxs(Nr,{"data-testid":"node-context-menu-paste",disabled:!j,onSelect:ds,children:["Paste",f.jsx(gO,{children:Ln})]}):null,$e&&(V||H)&&(Je==="icon"&&ae||R||L)?f.jsx(yP,{}):null,$e&&Je==="icon"&&ae?f.jsx(Nr,{"data-testid":"node-context-menu-change-icon",onSelect:BR,children:"Change icon"}):null,$e&&Je==="icon"&&ae&&(R||L)?f.jsx(yP,{}):null,$e&&R?f.jsxs(f.Fragment,{children:[f.jsx(Nr,{"data-testid":"node-context-menu-to-front",onSelect:()=>yi({op:"toFront"}),children:"Bring to front"}),f.jsx(Nr,{"data-testid":"node-context-menu-forward",onSelect:()=>yi({op:"forward"}),children:"Bring forward"}),f.jsx(Nr,{"data-testid":"node-context-menu-backward",onSelect:()=>yi({op:"backward"}),children:"Send backward"}),f.jsx(Nr,{"data-testid":"node-context-menu-to-back",onSelect:()=>yi({op:"toBack"}),children:"Send to back"})]}):null,$e&&R&&L?f.jsx(yP,{}):null,$e&&L?f.jsx(Nr,{"data-testid":"node-context-menu-delete",onSelect:vu,children:"Delete"}):null]})]}):null,wt?f.jsxs(Qd,{open:!!_n,onOpenChange:F=>{F||Cn(null)},children:[f.jsx(ZBe,{asChild:!0,children:f.jsx("div",{"data-testid":"drop-popover-anchor","aria-hidden":!0,className:"sf:pointer-events-none sf:fixed",style:{left:(_n==null?void 0:_n.clientX)??0,top:(_n==null?void 0:_n.clientY)??0,width:0,height:0}})}),f.jsx(Za,{"data-testid":"drop-popover",align:"start",side:"bottom",sideOffset:4,className:"sf:w-auto sf:p-1",onOpenAutoFocus:F=>{F.preventDefault()},children:f.jsx("div",{role:"menu","aria-label":"Create connected node",className:"sf:flex sf:flex-col sf:gap-0.5",children:kXe.map(({shape:F,label:K,Icon:ie})=>F==="linkflow"?null:f.jsxs("button",{type:"button",role:"menuitem","data-testid":`drop-popover-shape-${F}`,onClick:()=>{const se=_n;se&&(wt({sourceNodeId:se.sourceNodeId,position:{x:se.flowX,y:se.flowY},shape:F}),Cn(null))},className:te("sf:flex sf:items-center sf:gap-2 sf:rounded-sm sf:px-2 sf:py-1.5 sf:text-left sf:text-sm","sf:hover:bg-accent sf:hover:text-accent-foreground","sf:focus:bg-accent sf:focus:text-accent-foreground sf:focus:outline-hidden"),children:[f.jsx(ie,{className:"sf:h-4 sf:w-4 sf:text-muted-foreground","aria-hidden":"true"}),f.jsx("span",{children:K})]},F))})})]}):null]}),Mae?f.jsx(mnt,{flowId:wae,node:xae,connector:null,adapter:o??null,statusReport:Bt,onNameChange:mn,onDescriptionChange:tn,onDetailChange:ke,onIconChange:Se,open:JR,onClose:()=>{var F;wV(!1),(F=mr.current)==null||F.call(mr,[],[])}}):null]})})})})}const Frt=m.forwardRef(Ort);/**
8545
8545
  * @license lucide-react v0.453.0 - ISC
8546
8546
  *
8547
8547
  * This source code is licensed under the ISC license.
@@ -8626,4 +8626,4 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
8626
8626
  *
8627
8627
  * This source code is licensed under the ISC license.
8628
8628
  * See the LICENSE file in the root directory of this source tree.
8629
- */const Yrt=ko("Workflow",[["rect",{width:"8",height:"8",x:"3",y:"3",rx:"2",key:"by2w9f"}],["path",{d:"M7 11v4a2 2 0 0 0 2 2h4",key:"xkn7yn"}],["rect",{width:"8",height:"8",x:"13",y:"13",rx:"2",key:"1cgmvn"}]]),ZK="seeflow.export.email",YK="seeflow.export.name",QK="seeflow.export.visibility";function Qrt({open:e,onOpenChange:t,project:n,flowName:o,onCapturePreview:r}){const[i,a]=m.useState(""),[s,c]=m.useState(""),[l,h]=m.useState("public"),[u,p]=m.useState({kind:"idle"}),[y,g]=m.useState(!1),[k,x]=m.useState(new Set),v=Lle(n),M=PF(e?n:null),w=M.flows;m.useEffect(()=>{e&&(a(localStorage.getItem(ZK)??""),c(o??localStorage.getItem(YK)??""),h(localStorage.getItem(QK)??"public"),p({kind:"idle"}),g(!1))},[e,o]),m.useEffect(()=>{e&&w&&x(new Set(w.map($=>$.flowSlug)))},[e,w]);const b=m.useCallback(async()=>{p({kind:"loading"});try{const $=await(r==null?void 0:r()),{shareUrl:T}=await v(i.trim(),s.trim(),l,$,Array.from(k));localStorage.setItem(ZK,i.trim()),localStorage.setItem(YK,s.trim()),localStorage.setItem(QK,l),p({kind:"done",shareUrl:T})}catch($){p({kind:"error",message:$ instanceof Error?$.message:String($)})}},[v,i,s,l,r,k]),C=m.useCallback($=>{x(T=>{const D=new Set(T);return D.has($)?D.delete($):D.add($),D})},[]),_=m.useCallback(()=>{w&&x($=>$.size===w.length?new Set:new Set(w.map(T=>T.flowSlug)))},[w]),S=m.useCallback(async()=>{if(u.kind==="done")try{await navigator.clipboard.writeText(u.shareUrl),g(!0),setTimeout(()=>g(!1),2e3)}catch($){console.error("Failed to copy to clipboard:",$)}},[u]),N=u.kind==="loading",P=i.trim().length>0&&s.trim().length>0&&w!==null&&M.error===null&&k.size>0,A=((w==null?void 0:w.length)??0)>=2,E=M.loading,z=M.error!==null,U=w!==null&&k.size===w.length;return f.jsx(ir,{open:e,onOpenChange:t,children:f.jsxs(Yr,{className:"sm:max-w-md","data-testid":"export-dialog",onOpenAutoFocus:$=>{$.preventDefault();const T=document.querySelector('[data-testid="export-email-input"]');T==null||T.focus()},children:[f.jsxs(Qr,{children:[f.jsx(Jr,{children:"Export project to seeflow.dev"}),f.jsx(ei,{children:"Upload this project to the cloud and get a shareable link."})]}),u.kind!=="done"?f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:"flex flex-col gap-4",children:[f.jsxs("label",{className:"flex flex-col gap-1.5 text-sm",children:[f.jsx("span",{className:"font-medium",children:"Email"}),f.jsx("input",{type:"email",required:!0,autoComplete:"email",value:i,onChange:$=>a($.target.value),disabled:N,"data-testid":"export-email-input",className:"rounded-md border bg-background px-3 py-2 text-sm outline-hidden ring-offset-background focus:border-ring focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50"}),f.jsx("span",{className:"text-xs text-muted-foreground",children:"We'll use this to let you manage your flows in the future."})]}),f.jsxs("label",{className:"flex flex-col gap-1.5 text-sm",children:[f.jsx("span",{className:"font-medium",children:"Flow Name"}),f.jsx("input",{type:"text",required:!0,value:s,onChange:$=>c($.target.value),disabled:N,"data-testid":"export-name-input",className:"rounded-md border bg-background px-3 py-2 text-sm outline-hidden ring-offset-background focus:border-ring focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50"})]}),f.jsxs("label",{className:"flex flex-col gap-1.5 text-sm",children:[f.jsx("span",{className:"font-medium",children:"Visibility"}),f.jsxs("select",{value:l,onChange:$=>h($.target.value),disabled:N,"data-testid":"export-visibility-select",className:"rounded-md border bg-background px-3 py-2 text-sm outline-hidden ring-offset-background focus:border-ring focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",children:[f.jsx("option",{value:"public",children:"Public — anyone can discover it"}),f.jsx("option",{value:"link",children:"Anyone with the link"})]})]}),E?f.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground","data-testid":"export-flows-loading",children:[f.jsx(XK,{className:"h-4 w-4 animate-spin","aria-hidden":"true"}),f.jsx("span",{children:"Loading flows…"})]}):null,z?f.jsxs("div",{role:"alert","data-testid":"export-flows-error",className:"flex items-center justify-between gap-3 rounded-md border border-destructive/30 bg-destructive/10 px-3 py-2 text-sm text-destructive",children:[f.jsx("span",{children:"Couldn't load flows."}),f.jsx("button",{type:"button",onClick:()=>M.refresh(),disabled:N,"data-testid":"export-flows-retry",className:"shrink-0 font-medium underline-offset-2 hover:underline disabled:cursor-not-allowed disabled:opacity-50",children:"Retry"})]}):null,A&&w?f.jsxs("div",{className:"flex flex-col gap-1.5 text-sm","data-testid":"export-flows-section",children:[f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsx("span",{className:"font-medium",children:"Flows"}),f.jsx("button",{type:"button",onClick:_,disabled:N,"data-testid":"export-flows-toggle-all",className:"text-xs text-muted-foreground underline-offset-2 hover:text-foreground hover:underline disabled:cursor-not-allowed disabled:opacity-50",children:U?"Clear":"Select all"})]}),f.jsx("ul",{className:"flex max-h-48 flex-col gap-1 overflow-y-auto rounded-md border bg-background p-2",children:w.map($=>f.jsx("li",{children:f.jsxs("label",{className:"flex items-center gap-2 rounded px-2 py-1 hover:bg-muted",children:[f.jsx("input",{type:"checkbox",checked:k.has($.flowSlug),onChange:()=>C($.flowSlug),disabled:N,"data-testid":`export-flow-checkbox-${$.flowSlug}`}),f.jsx("span",{className:"flex-1 truncate",children:$.name}),$.isDefault?f.jsx(Xrt,{className:"h-3.5 w-3.5 text-muted-foreground","aria-label":"default flow","data-testid":`export-flow-default-${$.flowSlug}`}):null]})},$.flowSlug))})]}):null,u.kind==="error"?f.jsx("div",{role:"alert","data-testid":"export-error",className:"rounded-md border border-destructive/30 bg-destructive/10 px-3 py-2 text-sm text-destructive",children:u.message}):null]}),f.jsx(ar,{children:u.kind==="error"?f.jsxs(f.Fragment,{children:[f.jsx(rt,{type:"button",variant:"ghost",onClick:()=>t(!1),"data-testid":"export-cancel",children:"Cancel"}),f.jsx(rt,{type:"button",onClick:()=>p({kind:"idle"}),"data-testid":"export-retry",children:"Try again"})]}):f.jsxs(f.Fragment,{children:[f.jsx(rt,{type:"button",variant:"ghost",onClick:()=>t(!1),disabled:N,"data-testid":"export-cancel",children:"Cancel"}),f.jsx(rt,{type:"button",onClick:b,disabled:N||!P,"data-testid":"export-submit",children:N?f.jsxs(f.Fragment,{children:[f.jsx(XK,{className:"h-4 w-4 animate-spin","aria-hidden":"true"}),f.jsx("span",{children:"Uploading…"})]}):"Export"})]})})]}):f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:"flex flex-col gap-3",children:[f.jsx("p",{className:"text-sm text-muted-foreground",children:"Your diagram is live. Share this link:"}),f.jsxs("div",{className:"flex gap-2",children:[f.jsx("input",{type:"text",readOnly:!0,value:u.shareUrl,"data-testid":"export-share-url",className:"min-w-0 flex-1 rounded-md border bg-muted px-3 py-2 text-sm outline-hidden"}),f.jsx(rt,{type:"button",variant:"outline",size:"icon",onClick:S,"aria-label":"Copy link","data-testid":"export-copy",children:y?f.jsx(Mie,{className:"h-4 w-4","aria-hidden":"true"}):f.jsx(_ie,{className:"h-4 w-4","aria-hidden":"true"})}),f.jsx(rt,{type:"button",variant:"outline",size:"icon",onClick:()=>window.open(u.shareUrl,"_blank"),"aria-label":"View in new tab","data-testid":"export-view",children:f.jsx(Wrt,{className:"h-4 w-4","aria-hidden":"true"})})]})]}),f.jsx(ar,{children:f.jsx(rt,{type:"button",onClick:()=>t(!1),"data-testid":"export-done",children:"Done"})})]})]})})}function Jrt({open:e,onOpenChange:t,onCreated:n}){const[o,r]=m.useState(""),[i,a]=m.useState(""),[s,c]=m.useState(""),[l,h]=m.useState(null),[u,p]=m.useState(!1);m.useEffect(()=>{e&&(r(""),a(""),c(""),h(null),p(!1))},[e]);const y=o.trim(),g=i.trim(),k=s.trim(),x=g.length>0&&!u,v=async M=>{if(M.preventDefault(),!!x){p(!0),h(null);try{const w=await Rle({name:g,...y.length>0?{path:y}:{},...k.length>0?{description:k}:{}});n(w),t(!1)}catch(w){h(w instanceof Error?w.message:String(w)),p(!1)}}};return f.jsx(ir,{open:e,onOpenChange:t,children:f.jsxs(Yr,{className:"sm:max-w-md","data-testid":"create-project-dialog",onOpenAutoFocus:M=>{M.preventDefault();const w=document.querySelector('[data-testid="create-project-name-input"]');w==null||w.focus()},children:[f.jsxs(Qr,{children:[f.jsx(Jr,{children:"Create new project"}),f.jsx(ei,{children:"Scaffold a new SeeFlow project. It's created in ~/.seeflow/projects/ unless you give a path."})]}),f.jsxs("form",{onSubmit:v,className:"flex flex-col gap-4",children:[f.jsxs("label",{className:"flex flex-col gap-1.5 text-sm",children:[f.jsx("span",{className:"font-medium",children:"Project name"}),f.jsx("input",{type:"text",required:!0,autoComplete:"off",spellCheck:!1,value:i,onChange:M=>a(M.target.value),"data-testid":"create-project-name-input",className:"rounded-md border bg-background px-3 py-2 text-sm outline-hidden ring-offset-background focus:border-ring focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2"})]}),f.jsxs("label",{className:"flex flex-col gap-1.5 text-sm",children:[f.jsxs("span",{className:"font-medium",children:["Project path ",f.jsx("span",{className:"text-muted-foreground",children:"(optional)"})]}),f.jsx("input",{type:"text",autoComplete:"off",spellCheck:!1,placeholder:"/absolute/path/to/my-project",value:o,onChange:M=>r(M.target.value),"data-testid":"create-project-path-input",className:"rounded-md border bg-background px-3 py-2 text-sm outline-hidden ring-offset-background focus:border-ring focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2"}),f.jsx("span",{className:"text-xs text-muted-foreground",children:"Leave blank to create it in ~/.seeflow/projects/"})]}),f.jsxs("label",{className:"flex flex-col gap-1.5 text-sm",children:[f.jsxs("span",{className:"font-medium",children:["Description ",f.jsx("span",{className:"text-muted-foreground",children:"(optional)"})]}),f.jsx("textarea",{rows:3,autoComplete:"off",spellCheck:!1,value:s,onChange:M=>c(M.target.value),"data-testid":"create-project-description-input",className:"rounded-md border bg-background px-3 py-2 text-sm outline-hidden ring-offset-background focus:border-ring focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2"})]}),l?f.jsx("div",{role:"alert","data-testid":"create-project-error",className:"rounded-md border border-destructive/30 bg-destructive/10 px-3 py-2 text-sm text-destructive",children:l}):null,f.jsxs(ar,{children:[f.jsx(rt,{type:"button",variant:"ghost",onClick:()=>t(!1),disabled:u,children:"Cancel"}),f.jsx(rt,{type:"submit",disabled:!x,"data-testid":"create-project-submit",children:u?"Creating…":"Create project"})]})]})]})})}const JK="seeflow:navigate",eit=e=>(window.addEventListener("popstate",e),window.addEventListener(JK,e),()=>{window.removeEventListener("popstate",e),window.removeEventListener(JK,e)}),eX=()=>window.location.pathname,tit=()=>m.useSyncExternalStore(eit,eX,eX),Lie=(e,t)=>`/projects/${encodeURIComponent(e)}/flows/${encodeURIComponent(t)}`,Nie=e=>{const t=e.split("/").filter(Boolean);if(t.length!==4||t[0]!=="projects"||t[2]!=="flows")return null;const n=decodeURIComponent(t[1]??""),o=decodeURIComponent(t[3]??"");return!n||!o?null:{project:n,flow:o}},Iie=e=>{const t=e.indexOf("/");return t<=0||t===e.length-1?null:{project:e.slice(0,t),flow:e.slice(t+1)}},nit=e=>{const t=e.split("/").filter(Boolean);if(t.length!==2||t[0]!=="projects")return null;const n=decodeURIComponent(t[1]??"");return n?{project:n}:null},oit="seeflow:navigate",RO="seeflow:flow-stack",hV=e=>({project:e.project,flow:e.flow,slug:`${e.project}/${e.flow}`}),rit=e=>{const t=Nie(e);return t?[hV(t)]:[]},iit=(e,t)=>[...e,hV(t)],ait=e=>e?[hV(e)]:[],sit=(e,t,n)=>{if(typeof t=="number"&&t>=0&&t<=e.length){const o=e.slice(0,t),r=o.at(-1);if(n){if(r&&r.project===n.project&&r.flow===n.flow)return o}else if(o.length===0)return o}return null};let Tr=[],tX=!1;const fV=()=>{typeof window>"u"||window.dispatchEvent(new Event(RO))},cit=e=>(window.addEventListener(RO,e),()=>window.removeEventListener(RO,e)),nX=()=>Tr,Aie=()=>m.useSyncExternalStore(cit,nX,nX),Eie=(e,t)=>{window.history.pushState({stackDepth:e},"",t),window.dispatchEvent(new Event(oit))},lit=(e,t)=>{const n=window.history.state??null;window.history.replaceState({...n??{},stackDepth:e},"",t)},dit=e=>{const t=iit(Tr,e);Eie(t.length,Lie(e.project,e.flow)),Tr=t,fV()},uit=()=>{window.history.back()},Io=e=>{const t=ait(e),n=e?Lie(e.project,e.flow):"/";window.location.pathname===n?lit(t.length,n):Eie(t.length,n),Tr!==t&&(Tr=t,fV())},hit=()=>{if(tX)return;Tr=rit(window.location.pathname);const e=window.history.state??null;typeof(e==null?void 0:e.stackDepth)!="number"&&window.history.replaceState({...e??{},stackDepth:Tr.length},"",window.location.pathname+window.location.search+window.location.hash),window.addEventListener("popstate",()=>{const t=window.history.state??null,n=Nie(window.location.pathname),o=sit(Tr,t==null?void 0:t.stackDepth,n);if(o!==null){Tr!==o&&(Tr=o,fV());return}Io(n)}),tX=!0},fit="seeflow:last-flow:",jie=e=>`${fit}${e}`,$ie=e=>{if(typeof window>"u")return null;try{return window.localStorage.getItem(jie(e))}catch{return null}},pit=(e,t)=>{if(!(typeof window>"u"))try{window.localStorage.setItem(jie(e),t)}catch{}},yit=(e,t)=>{var o;if(e.length===0)return null;if(t){const r=e.find(i=>i.flowSlug===t);if(r)return r.flowSlug}const n=e.find(r=>r.isDefault);return n?n.flowSlug:((o=e[0])==null?void 0:o.flowSlug)??null};function mit({projects:e,currentProjectSlug:t,onProjectCreated:n,onUnregisterProject:o}){const[r,i]=m.useState(!1),[a,s]=m.useState(!1),[c,l]=m.useState(null),[h,u]=m.useState(!1),[p,y]=m.useState(null),[g,k]=m.useState(!1);m.useEffect(()=>{const S=N=>{N.key==="k"&&(N.metaKey||N.ctrlKey)&&(N.preventDefault(),i(P=>!P))};return document.addEventListener("keydown",S),()=>document.removeEventListener("keydown",S)},[]);const x=e.find(S=>S.projectSlug===t),v=S=>{const P=$ie(S.projectSlug)??S.defaultFlow;Io({project:S.projectSlug,flow:P})},M=S=>{n==null||n(S)},w=S=>{l(S),y(null),k(!1)},b=()=>{h||(l(null),y(null),k(!1))},C=async()=>{if(c){u(!0),y(null);try{await(o==null?void 0:o(c.projectSlug,{deleteSource:g})),l(null),k(!1)}catch(S){y(S instanceof Error?S.message:String(S))}finally{u(!1)}}},_=(c==null?void 0:c.flowCount)??0;return f.jsxs(f.Fragment,{children:[f.jsxs(Qd,{open:r,onOpenChange:i,children:[f.jsx(o2,{asChild:!0,children:f.jsxs(rt,{type:"button",variant:"outline",size:"sm","aria-label":"Switch project","aria-expanded":r,className:"gap-2","data-testid":"project-switcher-trigger",children:[f.jsx("span",{className:"max-w-[180px] truncate text-sm",children:(x==null?void 0:x.name)??"Select project"}),f.jsx(ene,{children:"⌘K"}),f.jsx(bie,{className:"h-3.5 w-3.5 opacity-60"})]})}),f.jsxs(Za,{align:"end",sideOffset:6,className:"relative w-[320px] p-0","data-testid":"project-switcher-popover",children:[f.jsxs(Aq,{children:[f.jsx(Qte,{placeholder:"Search projects..."}),f.jsxs(Eq,{className:"pb-12",children:[f.jsx(jq,{children:"No projects."}),e.length>0?f.jsx(kz,{heading:"Projects",children:e.map(S=>f.jsxs(vz,{value:`${S.name} ${S.projectSlug}`,onSelect:()=>{i(!1),v(S)},"data-testid":`project-switcher-row-${S.projectSlug}`,className:"group flex items-center justify-between gap-2",children:[f.jsxs("div",{className:"flex min-w-0 flex-col items-start gap-0.5",children:[f.jsx("span",{className:"font-medium",children:S.name}),S.repoPath?f.jsx("span",{className:"w-full truncate text-xs text-muted-foreground",children:S.repoPath}):null]}),f.jsx("button",{type:"button","aria-label":`Unregister ${S.name}`,"data-testid":`project-switcher-unregister-${S.projectSlug}`,className:"shrink-0 rounded p-0.5 opacity-0 transition-opacity hover:text-destructive group-hover:opacity-100 focus-visible:opacity-100 focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring",onClick:N=>{N.stopPropagation(),i(!1),w(S)},children:f.jsx(Sie,{className:"h-3.5 w-3.5"})})]},S.projectSlug))}):null]})]}),f.jsx("button",{type:"button","aria-label":"Create new project",title:"Create new project","data-testid":"project-switcher-create",onClick:()=>{i(!1),s(!0)},className:"absolute right-2 bottom-2 inline-flex h-8 w-8 items-center justify-center rounded-full bg-primary text-primary-foreground shadow-md transition-colors hover:bg-emerald-400 focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",children:f.jsx(Cie,{className:"h-4 w-4"})})]})]}),f.jsx(Jrt,{open:a,onOpenChange:s,onCreated:M}),f.jsx(ir,{open:c!==null,onOpenChange:S=>{S||b()},children:f.jsxs(Yr,{className:"sm:max-w-md","data-testid":"unregister-project-dialog",children:[f.jsxs(Qr,{children:[f.jsx(Jr,{children:g?"Delete project?":"Unregister project?"}),f.jsxs(ei,{children:["This removes ",f.jsx("strong",{children:c==null?void 0:c.name})," from SeeFlow."," ",f.jsxs("strong",{children:["All ",_," ",_===1?"flow":"flows"]})," ","under this project will be unregistered."]})]}),c!=null&&c.repoPath?f.jsxs("label",{className:"flex items-start gap-2 rounded-md border border-border px-3 py-2 text-sm",children:[f.jsx("input",{type:"checkbox",checked:g,onChange:S=>k(S.target.checked),disabled:h,"data-testid":"unregister-project-delete-source",className:"mt-0.5 h-4 w-4 cursor-pointer accent-destructive"}),f.jsxs("span",{className:"flex-1",children:[f.jsx("span",{className:"font-medium",children:"Also delete files from disk"}),f.jsxs("span",{className:"mt-1 block text-xs text-muted-foreground",children:["Permanently removes"," ",f.jsx("code",{className:"break-all text-xs",children:c.repoPath})," and everything inside it. This cannot be undone."]})]})]}):null,p?f.jsx("div",{role:"alert","data-testid":"unregister-project-error",className:"rounded-md border border-destructive/30 bg-destructive/10 px-3 py-2 text-sm text-destructive",children:p}):null,f.jsxs(ar,{children:[f.jsx(rt,{type:"button",variant:"ghost",onClick:b,disabled:h,children:"Cancel"}),f.jsx(rt,{type:"button",variant:"destructive",onClick:C,disabled:h,"data-testid":"unregister-project-confirm",children:h?g?"Deleting…":"Unregistering…":g?"Delete project":"Unregister"})]})]})})]})}const Pie="seeflow:theme",oX="(prefers-color-scheme: dark)";function git(e){return e==="light"||e==="dark"||e==="system"}function kit(e){try{const t=e.getItem(Pie);return git(t)?t:"system"}catch{return"system"}}function vit(e){try{const t=new URLSearchParams(e);if(!t.has("theme"))return null;const n=t.get("theme");return n==="light"||n==="dark"?n:"light"}catch{return null}}function xit(e,t){try{e.setItem(Pie,t)}catch{}}function wit(e,t){return e==="system"?t?"dark":"light":e}function Mit(e,t){t==="dark"?(e.classList.add("dark"),e.classList.remove("light")):(e.classList.add("light"),e.classList.remove("dark"))}function bit(e,t){var o;const n=r=>t(r.matches);return e.addEventListener?(e.addEventListener("change",n),()=>{var r;return(r=e.removeEventListener)==null?void 0:r.call(e,"change",n)}):((o=e.addListener)==null||o.call(e,n),()=>{var r;return(r=e.removeListener)==null?void 0:r.call(e,n)})}function _it(){const[e,t]=m.useState(()=>{if(typeof window>"u")return"system";const a=vit(window.location.search);return a||kit(window.localStorage)}),[n,o]=m.useState(()=>typeof window>"u"?!1:window.matchMedia(oX).matches);m.useEffect(()=>{if(typeof window>"u")return;const a=window.matchMedia(oX);return bit(a,o)},[]);const r=wit(e,n);m.useEffect(()=>{typeof document>"u"||Mit(document.documentElement,r)},[r]);const i=m.useCallback(a=>{typeof window<"u"&&xit(window.localStorage,a),t(a)},[]);return{theme:e,setTheme:i,resolvedTheme:r}}const Cit=[{value:"light",label:"Light"},{value:"dark",label:"Dark"},{value:"system",label:"System"}];function Sit({projects:e,currentProjectSlug:t,onProjectCreated:n,onUnregisterProject:o,share:r,onBack:i,previousFlowName:a}){const{theme:s,setTheme:c}=_it(),l=a!==void 0;return f.jsxs("header",{className:"relative flex h-14 shrink-0 items-center justify-between bg-background/85 px-5 backdrop-blur-md shadow-[0_1px_3px_-1px_rgba(15,23,42,0.06),0_2px_8px_-4px_rgba(15,23,42,0.05)] dark:shadow-[0_4px_12px_-6px_rgba(0,0,0,0.6)]",children:[f.jsxs("div",{className:"flex items-center gap-2",children:[l?f.jsxs(i2,{children:[f.jsx(a2,{asChild:!0,children:f.jsx("button",{type:"button",onClick:i,"aria-label":"Back to previous flow","data-testid":"flow-back-button",className:"flex h-8 w-8 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-muted/60 hover:text-foreground",children:f.jsx(Urt,{size:16,strokeWidth:2.25})})}),f.jsxs(iu,{side:"bottom",children:["Back to ",a]})]}):null,f.jsxs("button",{type:"button",onClick:()=>Io(null),className:"-ml-1.5 flex items-center gap-2 rounded-md px-1.5 py-1 text-base font-bold tracking-tight transition-colors hover:bg-muted/60",children:[f.jsx(Yrt,{size:18,strokeWidth:2.25,className:"text-emerald-400"}),"SeeFlow",f.jsxs("span",{className:"ml-1 text-[10px] font-normal tracking-normal text-muted-foreground/70",children:["v","0.1.110"]})]})]}),f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsx(mit,{projects:e,currentProjectSlug:t,onProjectCreated:n,onUnregisterProject:o}),r?f.jsx(aie,{mode:"edit",enableEmbed:!1,onDownloadPdf:r.onDownloadPdf,onDownloadPng:r.onDownloadPng,onExportToCloud:r.onExportToCloud}):null,f.jsxs(Moe,{children:[f.jsx(boe,{asChild:!0,children:f.jsx(rt,{type:"button",variant:"outline",size:"icon","aria-label":"Settings","data-testid":"settings-trigger",children:f.jsx(Krt,{className:"h-4 w-4"})})}),f.jsxs(Fq,{align:"end",sideOffset:6,className:"w-44","data-testid":"settings-menu",children:[f.jsx(_oe,{children:"Theme"}),f.jsx(PKe,{value:s,onValueChange:h=>c(h),children:Cit.map(h=>f.jsx(Coe,{value:h.value,"data-testid":`theme-${h.value}`,children:h.label},h.value))})]})]})]})]})}const Lit=()=>{const[e,t]=m.useState(null),[n,o]=m.useState(null),r=m.useCallback(()=>Nle().then(i=>{t(i),o(null)}).catch(i=>{console.error("[useDemos] failed",i),t([]),o(String(i))}),[]);return m.useEffect(()=>{r()},[r]),{demos:e,error:n,refresh:r}},Nit=()=>{const[e,t]=m.useState(null),[n,o]=m.useState(!0),[r,i]=m.useState(null),a=m.useCallback(()=>(o(!0),Ile().then(c=>{t(c),i(null)}).catch(c=>{console.error("[useProjects] failed",c),t([]),i(String(c))}).finally(()=>o(!1))),[]);m.useEffect(()=>{a()},[a]);const s=m.useCallback(async(c,l)=>{await $le(c,l),await a()},[a]);return{projects:e,loading:n,error:r,refresh:a,unregisterProject:s}},Iit=(e={})=>{const[t,n]=m.useState(!1),{onRegistryReload:o,onHello:r}=e,i=m.useRef(o),a=m.useRef(r);return m.useEffect(()=>{i.current=o,a.current=r},[o,r]),m.useEffect(()=>{const s=new EventSource("/api/registry/events");return s.addEventListener("open",()=>n(!0)),s.addEventListener("error",()=>n(!1)),s.addEventListener("hello",()=>{var c;(c=a.current)==null||c.call(a)}),s.addEventListener("registry:reload",()=>{var c;(c=i.current)==null||c.call(i)}),()=>{s.close()}},[]),{connected:t}},zie="seeflow:last-project",Ait=()=>{if(typeof window>"u")return null;try{return window.localStorage.getItem(zie)}catch{return null}},rX=e=>{if(!(typeof window>"u"))try{window.localStorage.setItem(zie,e)}catch{}},Eit=(e,t)=>{if(e.length===0)return null;if(e.length===1)return e[0]??null;if(t){const n=e.find(o=>o.id===t);if(n)return n}return null},jit=(e,t)=>{const n=e!==null&&t!==null,[o,r]=m.useState(null),[i,a]=m.useState(n),[s,c]=m.useState(null),l=m.useCallback(()=>{!e||!t||(a(!0),Ele(e,t).then(u=>{r(u),c(null)}).catch(u=>{console.error("[useDemoData] failed",u),c(String(u))}).finally(()=>a(!1)))},[e,t]),h=m.useCallback(u=>{r(u),c(null)},[]);return m.useEffect(()=>{if(!e||!t){r(null),a(!1);return}l()},[e,t,l]),{detail:o,loading:i,error:s,refresh:l,applyDetail:h}},$it=5,Pit={"node:running":"running","node:done":"done","node:error":"error"},zit=(e,t)=>{if(t.type==="reset")return{};const n=e[t.nodeId]??[],o=[t.entry,...n].slice(0,$it);return{...e,[t.nodeId]:o}},Rit=e=>{const[t,n]=m.useReducer(zit,{}),o=m.useRef(n);o.current=n,m.useEffect(()=>{o.current({type:"reset"})},[e]);const r=m.useCallback(a=>{const s=Pit[a.type];if(!s)return;const c=typeof a.nodeId=="string"?a.nodeId:null;if(!c)return;const l=typeof a.runId=="string"?a.runId:void 0,h=typeof a.ts=="number"?a.ts:Date.now();o.current({type:"append",nodeId:c,entry:{status:s,ts:h,runId:l}})},[]),i=m.useCallback(()=>{o.current({type:"reset"})},[]);return{events:t,apply:r,reset:i}},Tit=(e,t)=>{var n,o;switch(t.type){case"reset":return{};case"running":return{...e,[t.nodeId]:{status:"running",runId:t.runId,ts:t.ts??Date.now()}};case"done":return{...e,[t.nodeId]:{...e[t.nodeId],status:"done",runId:t.runId??((n=e[t.nodeId])==null?void 0:n.runId),responseStatus:t.responseStatus,body:t.body,ts:t.ts??Date.now()}};case"error":return{...e,[t.nodeId]:{...e[t.nodeId],status:"error",runId:t.runId??((o=e[t.nodeId])==null?void 0:o.runId),error:t.message,ts:t.ts??Date.now()}}}},Dit=e=>{const[t,n]=m.useReducer(Tit,{}),o=m.useRef(n);o.current=n,m.useEffect(()=>{o.current({type:"reset"})},[e]);const r=m.useCallback(a=>{const s=typeof a.nodeId=="string"?a.nodeId:null;if(!s)return;const c=typeof a.runId=="string"?a.runId:void 0;if(a.type==="node:running"){o.current({type:"running",nodeId:s,runId:c,ts:a.ts});return}if(a.type==="node:done"){const l=typeof a.status=="number"?a.status:void 0;o.current({type:"done",nodeId:s,runId:c,responseStatus:l,body:a.body,ts:a.ts});return}if(a.type==="node:error"){const l=typeof a.message=="string"?a.message:void 0;o.current({type:"error",nodeId:s,runId:c,message:l,ts:a.ts})}},[]),i=m.useCallback(()=>{o.current({type:"reset"})},[]);return{runs:t,apply:r,reset:i}},Hit=new Set(["ok","warn","error","pending"]),Oit=(e,t)=>{if(t.type!=="node:status")return e;const n=typeof t.nodeId=="string"?t.nodeId:null;if(!n||typeof t.state!="string"||!Hit.has(t.state))return e;const o=typeof t.summary=="string"?t.summary:void 0,r=typeof t.detail=="string"?t.detail:void 0,i=t.data&&typeof t.data=="object"&&!Array.isArray(t.data)?t.data:void 0,a=typeof t.ts=="number"?t.ts:Date.now();return{...e,[n]:{state:t.state,summary:o,detail:r,data:i,ts:a}}},Fit=(e,t)=>{switch(t.type){case"reset":return{};case"event":return Oit(e,t.event)}},qit=e=>{const[t,n]=m.useReducer(Fit,{}),o=m.useRef(n);o.current=n,m.useEffect(()=>{o.current({type:"reset"})},[e]);const r=m.useCallback(a=>{o.current({type:"event",event:a})},[]),i=m.useCallback(()=>{o.current({type:"reset"})},[]);return{statusByNode:t,apply:r,reset:i}},Vit=(e,t={})=>{const[n,o]=m.useState(!1),{onHello:r,onFlowReload:i,onEvent:a}=t,s=m.useRef(r),c=m.useRef(i),l=m.useRef(a);return m.useEffect(()=>{s.current=r,c.current=i,l.current=a},[r,i,a]),m.useEffect(()=>{if(!e){o(!1);return}const h=`/api/events?flowId=${encodeURIComponent(e)}`,u=new EventSource(h);u.addEventListener("open",()=>o(!0)),u.addEventListener("error",()=>o(!1)),u.addEventListener("hello",()=>{var p;(p=s.current)==null||p.call(s)}),u.addEventListener("flow:reload",p=>{var k,x;const y=iX(p,"flow:reload");(k=l.current)==null||k.call(l,y);const g=Bit(y);g&&((x=c.current)==null||x.call(c,g))});for(const p of["node:running","node:done","node:error","node:status"])u.addEventListener(p,y=>{var g;(g=l.current)==null||g.call(l,iX(y,p))});return()=>{u.close()}},[e]),{connected:n}},iX=(e,t)=>{try{const n=JSON.parse(e.data);return{type:t,ts:Date.now(),...n}}catch{return{type:t,ts:Date.now()}}},Bit=e=>e.valid===!0&&e.flow&&typeof e.flow=="object"?{valid:!0,flow:e.flow}:e.valid===!1&&typeof e.error=="string"?{valid:!1,error:e.error}:null,aX=["File","Edit","View","Tools","Layout","Selection","Help"],Rie="seeflow:command-palette:recent",Tie=5,Die=new Map(JF.map(e=>[e.id,e])),Uit=e=>typeof e=="string"&&Die.has(e),sX=()=>{if(typeof window>"u")return[];try{const e=window.localStorage.getItem(Rie);if(!e)return[];const t=JSON.parse(e);return Array.isArray(t)?t.filter(Uit).slice(0,Tie):[]}catch{return[]}},Wit=e=>{if(!(typeof window>"u"))try{window.localStorage.setItem(Rie,JSON.stringify(e))}catch{}},cX=(e,t)=>e.enabled?e.enabled(t):!0,Git=(e,t)=>t.length===0?!0:`${e.label} ${e.description??""}`.toLowerCase().includes(t);function Kit({open:e,onOpenChange:t,runCommand:n,ctx:o}){const[r,i]=m.useState(""),[a,s]=m.useState(0),[c,l]=m.useState(()=>sX()),h=m.useRef(null),u=m.useRef(null);m.useEffect(()=>{e&&(i(""),s(0),l(sX()))},[e]);const{groups:p,flat:y}=m.useMemo(()=>{const b=r.trim().toLowerCase();if(b.length===0){if(c.length===0)return{groups:[],flat:[]};const P=[];for(const E of c){const z=Die.get(E);z&&P.push({cmd:z,enabled:cX(z,o)})}return{groups:[{category:"Recent",rows:P}],flat:P}}const C=new Map;for(const P of JF){if(!Git(P,b))continue;const A={cmd:P,enabled:cX(P,o)},E=C.get(P.category);E?E.push(A):C.set(P.category,[A])}const S=[...aX.filter(P=>C.has(P)),...Array.from(C.keys()).filter(P=>!aX.includes(P))].map(P=>({category:P,rows:C.get(P)??[]})),N=S.flatMap(P=>P.rows);return{groups:S,flat:N}},[r,o,c]);m.useEffect(()=>{if(y.length===0){s(0);return}s(b=>{var _;let C=b;if(C>=y.length&&(C=0),!((_=y[C])!=null&&_.enabled)){const S=y.findIndex(N=>N.enabled);S!==-1&&(C=S)}return C})},[y]);const g=m.useCallback(b=>{y.length!==0&&s(C=>{var S;let _=C;for(let N=0;N<y.length;N++)if(_=(_+b+y.length)%y.length,(S=y[_])!=null&&S.enabled)return _;return C})},[y]),k=m.useCallback(b=>{l(C=>{const _=[b,...C.filter(S=>S!==b)].slice(0,Tie);return Wit(_),_})},[]),x=m.useCallback(b=>{const C=y[b];!C||!C.enabled||(k(C.cmd.id),n(C.cmd.id),t(!1))},[y,t,k,n]),v=m.useCallback(b=>{if(b.key==="ArrowDown"){b.preventDefault(),g(1);return}if(b.key==="ArrowUp"){b.preventDefault(),g(-1);return}b.key==="Enter"&&(b.preventDefault(),x(a))},[x,a,g]);m.useEffect(()=>{if(!e)return;const b=u.current;if(!b)return;const C=b.querySelector(`[data-command-row-index="${a}"]`);C&&typeof C.scrollIntoView=="function"&&C.scrollIntoView({block:"nearest"})},[a,e]);const w=r.trim().length>0;return f.jsx(_q,{open:e,onOpenChange:t,children:f.jsx(bR,{children:f.jsxs(r2,{className:te("fixed left-0 right-0 top-[20%] z-50 mx-auto w-[480px] max-w-[90vw] border border-border bg-card shadow-lg duration-200","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","sm:rounded-lg"),"data-testid":"command-palette",onOpenAutoFocus:b=>{var C;b.preventDefault(),(C=h.current)==null||C.focus()},children:[f.jsx("div",{className:te("border-b",y.length===0&&!w&&"border-b-0"),children:f.jsx("input",{ref:h,type:"text",value:r,onChange:b=>i(b.target.value),onKeyDown:v,placeholder:"Type a command…","data-testid":"command-palette-input","aria-label":"Search commands",autoComplete:"off",spellCheck:!1,className:"w-full bg-transparent px-4 py-3 text-sm outline-hidden placeholder:text-muted-foreground"})}),f.jsx("div",{ref:u,"data-testid":"command-palette-list","data-empty":y.length===0?"true":"false",className:te("max-h-[50vh] overflow-y-auto",y.length>0?"py-1":"","seeflow-no-scrollbar"),children:y.length===0?w?f.jsxs("div",{"data-testid":"command-palette-empty",className:"px-4 py-6 text-center text-sm text-muted-foreground",children:['No commands match "',r,'"']}):null:(()=>{let b=-1;return p.map(C=>f.jsxs("div",{className:"py-1",children:[f.jsx("div",{className:"px-3 pb-1 pt-2 text-xs font-medium uppercase tracking-wide text-muted-foreground",children:C.category}),C.rows.map(_=>{b+=1;const S=b,N=S===a;return f.jsxs("button",{type:"button","data-testid":`command-palette-row-${_.cmd.id}`,"data-command-row-index":S,"data-highlighted":N?"true":"false","aria-disabled":_.enabled?void 0:!0,disabled:!_.enabled,onMouseEnter:()=>{_.enabled&&s(S)},onClick:()=>x(S),className:te("flex w-full items-center justify-between gap-3 px-3 py-2 text-left text-sm outline-hidden",_.enabled?"cursor-pointer text-foreground hover:bg-muted":"cursor-not-allowed text-muted-foreground/50",N&&_.enabled?"bg-muted":""),children:[f.jsxs("div",{className:"flex min-w-0 flex-col",children:[f.jsx("span",{className:"truncate font-medium",children:_.cmd.label}),_.cmd.description?f.jsx("span",{className:"truncate text-xs text-muted-foreground",children:_.cmd.description}):null]}),_.cmd.shortcut?f.jsx("kbd",{"data-testid":`command-palette-shortcut-${_.cmd.id}`,className:"shrink-0 rounded border bg-muted px-1.5 py-0.5 font-mono text-[11px] text-muted-foreground",children:_.cmd.shortcut}):null]},_.cmd.id)})]},C.category))})()})]})})})}function Xit(e){return e.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")}const Zit=/^[a-z0-9][a-z0-9-]*$/,Yit={"--tw-enter-translate-x":"-50%","--tw-enter-translate-y":"-50%","--tw-exit-translate-x":"-50%","--tw-exit-translate-y":"-50%","--tw-enter-scale":"1","--tw-exit-scale":"1"};function Qit({open:e,onOpenChange:t,onCreate:n,onCreated:o}){const[r,i]=m.useState(""),[a,s]=m.useState(""),[c,l]=m.useState(!1),[h,u]=m.useState(null),[p,y]=m.useState(!1);m.useEffect(()=>{e&&(i(""),s(""),l(!1),u(null),y(!1))},[e]);const g=C=>{i(C),c||s(Xit(C))},k=C=>{s(C),c||l(!0)},x=a.trim(),v=r.trim(),M=x.length>0&&Zit.test(x),w=M&&v.length>0&&!p,b=async C=>{if(C.preventDefault(),!w){!M&&x.length>0&&u("Flow id must match /^[a-z0-9][a-z0-9-]*$/");return}y(!0),u(null);try{const S=await n({id:x,name:v});o==null||o(S),t(!1)}catch(_){u(_ instanceof Error?_.message:String(_)),y(!1)}};return f.jsx(ir,{open:e,onOpenChange:t,children:f.jsxs(Yr,{className:"sm:max-w-md",style:Yit,"data-testid":"flow-create-dialog",onOpenAutoFocus:C=>{C.preventDefault();const _=document.querySelector('[data-testid="flow-create-name-input"]');_==null||_.focus()},children:[f.jsxs(Qr,{children:[f.jsx(Jr,{children:"Create new flow"}),f.jsx(ei,{children:"A new flow folder is scaffolded under flows/<id>/ in your project."})]}),f.jsxs("form",{onSubmit:b,className:"flex flex-col gap-4",children:[f.jsxs("label",{className:"flex flex-col gap-1.5 text-sm",children:[f.jsx("span",{className:"font-medium",children:"Display name"}),f.jsx("input",{type:"text",required:!0,autoComplete:"off",spellCheck:!1,value:r,onChange:C=>g(C.target.value),"data-testid":"flow-create-name-input",className:"rounded-md border bg-background px-3 py-2 text-sm outline-hidden ring-offset-background focus:border-ring focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2"})]}),f.jsxs("label",{className:"flex flex-col gap-1.5 text-sm",children:[f.jsx("span",{className:"font-medium",children:"Flow id"}),f.jsx("input",{type:"text",required:!0,autoComplete:"off",spellCheck:!1,placeholder:"my-retry-flow",value:a,onChange:C=>k(C.target.value),"data-testid":"flow-create-id-input",className:"rounded-md border bg-background px-3 py-2 font-mono text-sm outline-hidden ring-offset-background focus:border-ring focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2"}),f.jsx("span",{className:"text-xs text-muted-foreground",children:"Auto-filled from the display name. Lowercase letters, digits, and dashes; must start with a letter or digit."})]}),h?f.jsx("div",{role:"alert","data-testid":"flow-create-error",className:"rounded-md border border-destructive/30 bg-destructive/10 px-3 py-2 text-sm text-destructive",children:h}):null,f.jsxs(ar,{children:[f.jsx(rt,{type:"button",variant:"ghost",onClick:()=>t(!1),disabled:p,children:"Cancel"}),f.jsx(rt,{type:"submit",disabled:!w,"data-testid":"flow-create-submit",children:p?"Creating…":"Create flow"})]})]})]})})}function Jit({open:e,onOpenChange:t,flow:n,flows:o,onDelete:r,onDeleted:i}){var M;const a=m.useMemo(()=>o.filter(w=>w.flowSlug!==(n==null?void 0:n.flowSlug)),[o,n==null?void 0:n.flowSlug]),s=((M=a[0])==null?void 0:M.flowSlug)??"",[c,l]=m.useState(s),[h,u]=m.useState(null),[p,y]=m.useState(!1);if(m.useEffect(()=>{e&&(l(s),u(null),y(!1))},[e,s]),!n)return f.jsx(ir,{open:!1,onOpenChange:t});const g=n.isDefault,k=c.length>0,x=(!g||k)&&!p,v=async w=>{if(w.preventDefault(),!!x){y(!0),u(null);try{const b=g?{newDefault:c}:void 0;await r(n.flowSlug,b),i==null||i(n.flowSlug,b==null?void 0:b.newDefault),t(!1)}catch(b){u(b instanceof Error?b.message:String(b)),y(!1)}}};return f.jsx(ir,{open:e,onOpenChange:t,children:f.jsxs(Yr,{className:"sm:max-w-md","data-testid":"flow-delete-dialog",children:[f.jsxs(Qr,{children:[f.jsx(Jr,{children:"Delete flow"}),f.jsxs(ei,{children:["This removes flows/",n.flowSlug,"/ from disk and updates seeflow.json. The action cannot be undone."]})]}),f.jsxs("form",{onSubmit:v,className:"flex flex-col gap-4",children:[f.jsxs("p",{className:"text-sm",children:["Delete ",f.jsx("span",{className:"font-medium",children:n.name})," ",f.jsxs("span",{className:"font-mono text-muted-foreground",children:["(",n.flowSlug,")"]}),"?"]}),g?f.jsxs("label",{className:"flex flex-col gap-1.5 text-sm",children:[f.jsx("span",{className:"font-medium",children:"New default flow"}),f.jsx("select",{value:c,onChange:w=>l(w.target.value),"data-testid":"flow-delete-new-default-select",className:"rounded-md border bg-background px-3 py-2 text-sm outline-hidden ring-offset-background focus:border-ring focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",children:a.map(w=>f.jsxs("option",{value:w.flowSlug,children:[w.name," (",w.flowSlug,")"]},w.flowSlug))}),f.jsxs("span",{className:"text-xs text-muted-foreground",children:[n.name," is the project default — pick a replacement before deleting."]})]}):null,h?f.jsx("div",{role:"alert","data-testid":"flow-delete-error",className:"rounded-md border border-destructive/30 bg-destructive/10 px-3 py-2 text-sm text-destructive",children:h}):null,f.jsxs(ar,{children:[f.jsx(rt,{type:"button",variant:"ghost",onClick:()=>t(!1),disabled:p,children:"Cancel"}),f.jsx(rt,{type:"submit",variant:"destructive",disabled:!x,"data-testid":"flow-delete-submit",children:p?"Deleting…":"Delete"})]})]})]})})}function eat({open:e,onOpenChange:t,flow:n,onRename:o,onRenamed:r}){const[i,a]=m.useState(""),[s,c]=m.useState(null),[l,h]=m.useState(!1);if(m.useEffect(()=>{e&&n&&(a(n.name),c(null),h(!1))},[e,n]),!n)return f.jsx(ir,{open:!1,onOpenChange:t});const u=i.trim(),p=u!==n.name,y=u.length>0&&p&&!l,g=async k=>{if(k.preventDefault(),!!y){h(!0),c(null);try{const x={name:u},v=await o(n.flowSlug,x);r==null||r(v,n.flowSlug),t(!1)}catch(x){c(x instanceof Error?x.message:String(x)),h(!1)}}};return f.jsx(ir,{open:e,onOpenChange:t,children:f.jsxs(Yr,{className:"sm:max-w-md","data-testid":"flow-rename-dialog",onOpenAutoFocus:k=>{k.preventDefault();const x=document.querySelector('[data-testid="flow-rename-name-input"]');x==null||x.focus(),x==null||x.select()},children:[f.jsxs(Qr,{children:[f.jsx(Jr,{children:"Rename flow"}),f.jsx(ei,{children:"Update the display name. The flow id is fixed once created."})]}),f.jsxs("form",{onSubmit:g,className:"flex flex-col gap-4",children:[f.jsxs("label",{className:"flex flex-col gap-1.5 text-sm",children:[f.jsx("span",{className:"font-medium",children:"Flow id"}),f.jsx("input",{type:"text",readOnly:!0,disabled:!0,autoComplete:"off",spellCheck:!1,value:n.flowSlug,"data-testid":"flow-rename-id-input",className:"cursor-not-allowed rounded-md border bg-muted px-3 py-2 font-mono text-sm text-muted-foreground"})]}),f.jsxs("label",{className:"flex flex-col gap-1.5 text-sm",children:[f.jsx("span",{className:"font-medium",children:"Display name"}),f.jsx("input",{type:"text",required:!0,autoComplete:"off",spellCheck:!1,value:i,onChange:k=>a(k.target.value),"data-testid":"flow-rename-name-input",className:"rounded-md border bg-background px-3 py-2 text-sm outline-hidden ring-offset-background focus:border-ring focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2"})]}),s?f.jsx("div",{role:"alert","data-testid":"flow-rename-error",className:"rounded-md border border-destructive/30 bg-destructive/10 px-3 py-2 text-sm text-destructive",children:s}):null,f.jsxs(ar,{children:[f.jsx(rt,{type:"button",variant:"ghost",onClick:()=>t(!1),disabled:l,children:"Cancel"}),f.jsx(rt,{type:"submit",disabled:!y,"data-testid":"flow-rename-submit",children:l?"Saving…":"Save"})]})]})]})})}function tat({project:e,activeFlow:t,flows:n,onSelect:o,onCreate:r,onRename:i,onDelete:a}){const[s,c]=m.useState(!1),l=n.find(h=>h.flowSlug===t);return f.jsxs(Qd,{open:s,onOpenChange:c,children:[f.jsx(o2,{asChild:!0,children:f.jsxs(rt,{type:"button",variant:"outline",size:"sm","aria-label":`Switch flow for ${e}`,"aria-expanded":s,className:"gap-2","data-testid":"flow-switcher-trigger",children:[f.jsx("span",{className:"max-w-[180px] truncate text-sm",children:(l==null?void 0:l.name)??t}),f.jsx(bie,{className:"h-3.5 w-3.5 opacity-60"})]})}),f.jsx(Za,{align:"start",sideOffset:6,className:"w-[260px] p-0","data-testid":"flow-switcher-popover",children:f.jsx(Aq,{children:f.jsxs(Eq,{children:[f.jsx(jq,{children:"No flows."}),n.length>0?f.jsx(kz,{heading:"Flows",children:n.map(h=>{const u=h.flowSlug===t;return f.jsxs(vz,{value:`${h.name} ${h.flowSlug}`,"aria-current":u?"true":void 0,"data-testid":`flow-switcher-row-${h.flowSlug}`,"data-active":u?"true":void 0,onSelect:()=>{c(!1),o==null||o(h.flowSlug)},className:te("group flex items-center justify-between gap-2",u&&"bg-accent text-accent-foreground"),children:[f.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[h.icon?f.jsx("span",{"aria-hidden":"true",className:"text-xs opacity-70",children:h.icon}):null,f.jsx("span",{className:"truncate font-medium",children:h.name}),h.isDefault?f.jsx("span",{className:"shrink-0 rounded bg-muted px-1.5 py-0.5 text-[10px] uppercase tracking-wide text-muted-foreground",children:"default"}):null]}),f.jsxs("div",{className:"flex shrink-0 items-center gap-0.5 opacity-0 transition-opacity group-hover:opacity-100 focus-within:opacity-100",children:[f.jsx("button",{type:"button","aria-label":`Rename ${h.name}`,"data-testid":`flow-switcher-rename-${h.flowSlug}`,className:"rounded p-0.5 hover:text-foreground focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring",onClick:p=>{p.stopPropagation(),c(!1),i==null||i(h.flowSlug)},children:f.jsx(Grt,{className:"h-3.5 w-3.5"})}),f.jsx("button",{type:"button","aria-label":`Delete ${h.name}`,"data-testid":`flow-switcher-delete-${h.flowSlug}`,className:"rounded p-0.5 hover:text-destructive focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring",onClick:p=>{p.stopPropagation(),c(!1),a==null||a(h.flowSlug)},children:f.jsx(Sie,{className:"h-3.5 w-3.5"})})]})]},h.flowSlug)})}):null,n.length>0?f.jsx(Jte,{}):null,f.jsx(kz,{children:f.jsxs(vz,{value:"+ new flow","data-testid":"flow-switcher-create",onSelect:()=>{c(!1),r==null||r()},className:"flex items-center gap-2 text-sm",children:[f.jsx(Cie,{className:"h-4 w-4 opacity-70"}),f.jsx("span",{className:"font-medium",children:"New flow"})]})})]})})})]})}const nat={"--tw-enter-translate-x":"-50%","--tw-enter-translate-y":"-50%","--tw-exit-translate-x":"-50%","--tw-exit-translate-y":"-50%","--tw-enter-scale":"1","--tw-exit-scale":"1"},lX=e=>e?`${e.project}/${e.flow}`:null,oat=e=>{const t=e.indexOf("/");return t<1||t===e.length-1?null:{project:e.slice(0,t),flow:e.slice(t+1)}},dX=e=>`linkflow-picker-row-${e.replace(/\//g,"__")}`;function rat({open:e,onOpenChange:t,mode:n,demos:o,currentSlug:r,initialTarget:i,onCommit:a}){const[s,c]=m.useState(""),[l,h]=m.useState(()=>n==="edit"?lX(i):null);m.useEffect(()=>{e&&(c(""),h(n==="edit"?lX(i):null))},[e,n,i]);const u=m.useMemo(()=>{const w=s.trim().toLowerCase();return w.length===0?o.slice():o.filter(b=>(b.slug.split("/")[0]??"").toLowerCase().includes(w)||b.name.toLowerCase().includes(w))},[o,s]),p=m.useMemo(()=>l?u.findIndex(w=>w.slug===l):-1,[u,l]),y=m.useCallback(w=>{if(u.length===0)return;const b=u.length,C=p<0?w===1?0:b-1:(p+w+b)%b,_=u[C];_&&h(_.slug)},[u,p]),g=m.useCallback(()=>{if(p<0||!l)return;const w=oat(l);w&&(a(w),t(!1))},[l,p,a,t]),k=m.useCallback(w=>{w.key==="ArrowDown"?(w.preventDefault(),y(1)):w.key==="ArrowUp"?(w.preventDefault(),y(-1)):w.key==="Enter"?(w.preventDefault(),g()):w.key==="Escape"&&(w.preventDefault(),t(!1))},[y,g,t]),x=n==="edit"?"Change linked flow":"Link to a flow",v=l&&p>=0?dX(l):void 0,M=p>=0;return f.jsx(ir,{open:e,onOpenChange:t,children:f.jsxs(Yr,{className:"sm:max-w-md",style:nat,"data-testid":"linkflow-picker-dialog",onOpenAutoFocus:w=>{w.preventDefault();const b=document.querySelector('[data-testid="linkflow-picker-search"]');b==null||b.focus()},children:[f.jsxs(Qr,{children:[f.jsx(Jr,{"data-testid":"linkflow-picker-title",children:x}),f.jsx(ei,{children:"Pick a flow to navigate to from this node."})]}),f.jsxs("div",{className:"flex flex-col gap-3",children:[f.jsx("input",{type:"text",value:s,onChange:w=>c(w.target.value),onKeyDown:k,placeholder:"Search flows…","data-testid":"linkflow-picker-search","aria-label":"Search flows","aria-activedescendant":v,autoComplete:"off",spellCheck:!1,className:"rounded-md border bg-background px-3 py-2 text-sm outline-hidden ring-offset-background focus:border-ring focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2"}),f.jsx("div",{"aria-label":"Flows","data-testid":"linkflow-picker-list",style:{maxHeight:"304px"},className:"overflow-y-auto rounded-md border seeflow-no-scrollbar",children:u.length===0?f.jsx("div",{"data-testid":"linkflow-picker-empty",className:"px-3 py-6 text-center text-sm text-muted-foreground",children:s.trim().length===0?"No flows registered.":`No flows match "${s}"`}):u.map(w=>{const b=w.slug.split("/")[0]??"",C=w.slug===l,_=w.slug===r;return f.jsxs("button",{type:"button",id:dX(w.slug),"data-testid":`linkflow-picker-row-${w.slug}`,"data-selected":C?"true":"false",onMouseDown:S=>{S.preventDefault()},onClick:()=>h(w.slug),className:te("flex w-full items-center justify-between gap-3 px-3 py-2 text-left text-sm outline-hidden",C?"bg-muted text-foreground":"text-foreground hover:bg-muted/60"),children:[f.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[f.jsx("span",{className:"truncate text-xs text-muted-foreground",children:b}),f.jsx("span",{"aria-hidden":"true",className:"shrink-0 text-muted-foreground/60",children:"·"}),f.jsx("span",{className:"truncate font-medium",children:w.name})]}),_?f.jsx("span",{"data-testid":`linkflow-picker-current-badge-${w.slug}`,className:"shrink-0 rounded bg-muted px-1.5 py-0.5 text-[10px] uppercase tracking-wide text-muted-foreground",children:"Currently viewing"}):null]},w.slug)})})]}),f.jsxs(ar,{children:[f.jsx(rt,{type:"button",variant:"ghost",onClick:()=>t(!1),"data-testid":"linkflow-picker-cancel",children:"Cancel"}),f.jsx(rt,{type:"button",onClick:g,disabled:!M,"data-testid":"linkflow-picker-commit",children:"Link"})]})]})})}const iat=(e,t)=>{if(e.has(t))return e;const n=new Set(e);return n.add(t),n},aat=(e,t)=>{if(t.length===0)return e;let n=!1;const o=new Set(e);for(const r of t)o.has(r)||(o.add(r),n=!0);return n?o:e},sat=(e,t)=>{if(!e.has(t))return e;const n=new Set(e);return n.delete(t),n},cat=(e,t)=>{if(t.length===0)return e;let n=!1;const o=new Set(e);for(const r of t)o.has(r)&&(o.delete(r),n=!0);return n?o:e},lat=(e,t)=>{if(e.size===0)return e;const n=new Set(t.map(i=>i.id));let o=!1;const r=new Set(e);for(const i of r)n.has(i)||(r.delete(i),o=!0);return o?r:e},uX=()=>{const[e,t]=m.useState(()=>new Set),n=m.useCallback(c=>{t(l=>iat(l,c))},[]),o=m.useCallback(c=>{t(l=>aat(l,c))},[]),r=m.useCallback(c=>{t(l=>sat(l,c))},[]),i=m.useCallback(c=>{t(l=>cat(l,c))},[]),a=m.useCallback(c=>{t(l=>lat(l,c))},[]),s=m.useCallback(()=>t(new Set),[]);return{ids:e,mark:n,markMany:o,unmark:r,unmarkMany:i,pruneAgainst:a,reset:s}},ND=(e,t)=>e===t?!0:e==null||t==null||typeof e!=typeof t||typeof e!="object"?!1:JSON.stringify(e)===JSON.stringify(t),dat=(e,t,n)=>({...e,[t]:{...e[t],...n}}),uat=(e,t)=>{if(!(t in e))return e;const n={...e};return delete n[t],n},hX=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),hat=(e,t)=>{const n=Object.entries(e);if(n.length===0)return e;const o=new Map(t.map(a=>[a.id,a]));let r=!1;const i={...e};for(const[a,s]of n){const c=o.get(a);if(!c)continue;const l={},h=l;let u=!1;for(const p of Object.keys(s)){const y=s[p],g=c[p];if(p==="data"&&hX(y)&&hX(g)){const k={};let x=!1;for(const v of Object.keys(y))ND(y[v],g[v])||(k[v]=y[v],x=!0);x&&(h[p]=k,u=!0)}else ND(y,g)||(h[p]=y,u=!0)}u?ND(l,s)||(i[a]=l,r=!0):(delete i[a],r=!0)}return r?i:e},fX=()=>{const[e,t]=m.useState({}),n=m.useCallback((a,s)=>{t(c=>dat(c,a,s))},[]),o=m.useCallback(a=>{t(s=>uat(s,a))},[]),r=m.useCallback(a=>{t(s=>hat(s,a))},[]),i=m.useCallback(()=>t({}),[]);return{overrides:e,setOverride:n,dropOverride:o,pruneAgainst:r,reset:i}};function fat({nodes:e,connectors:t,flowPos:n,nodeIdGen:o,connectorIdGen:r,defaultOffset:i={x:24,y:24}}){const a=new Map;for(const y of e)a.set(y.id,o(y.id));let s=Number.POSITIVE_INFINITY,c=Number.POSITIVE_INFINITY;for(const y of e)y.position.x<s&&(s=y.position.x),y.position.y<c&&(c=y.position.y);Number.isFinite(s)||(s=0),Number.isFinite(c)||(c=0);const l=n?n.x-s:i.x,h=n?n.y-c:i.y,u=e.map(y=>{const g=a.get(y.id);if(g===void 0)throw new Error(`paste id missing for ${y.id}`);return{...y,id:g,position:{x:y.position.x+l,y:y.position.y+h}}}),p=t.map(y=>{const g=r(y.id);return{...y,id:g,source:a.get(y.source)??y.source,target:a.get(y.target)??y.target}});return{newNodes:u,newConnectors:p,idMap:a}}const pat=e=>({type:"image",position:e.position,data:{path:"",alt:e.originalFilename,width:e.dims.width,height:e.dims.height,_uploading:!0}}),yat=e=>({type:"image",data:Hie(e)}),mat=e=>({type:"image",position:e.position,data:{path:"",alt:e.originalFilename,width:e.dims.width,height:e.dims.height,_uploadError:e.message}}),Hie=e=>({...cOe(e.path,e.dims,e.lastUsed),alt:e.originalFilename}),gat=async(e,t)=>{const{nodeId:n,flowId:o,file:r,originalFilename:i,position:a,dims:s,lastUsed:c}=e;t.rememberRetry(n,{file:r,originalFilename:i,position:a,dims:s}),t.setOverride(n,pat({position:a,dims:s,originalFilename:i}));const l=async()=>{let h;try{h=(await t.upload(o,n,r,i)).path}catch(y){const g=y instanceof Error?y.message:String(y);throw t.setOverride(n,mat({position:a,dims:s,originalFilename:i,message:g})),y}t.setOverride(n,yat({path:h,dims:s,originalFilename:i,lastUsed:c}));const u=Hie({path:h,dims:s,originalFilename:i,lastUsed:c}),p={id:n,type:"image",position:a,data:u};await t.createNode(o,p),t.forgetRetry(n)};if(t.history){await t.history.batch("insert-image",l);return}await l()};function kat(e,t){if(!e)return null;const n=`${e.project}/${e.flow}`,o=t.find(r=>r.slug===n);return o?{projectName:e.project,flowName:o.name}:null}const vat="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",xat=248;function xr(e=10){let t="";const n=new Uint8Array(e*2);for(;t.length<e;){crypto.getRandomValues(n);for(let o=0;o<n.length&&t.length<e;o++){const r=n[o];r<xat&&(t+=vat[r%62])}}return t}const wat=new Set(["INPUT","TEXTAREA","SELECT"]),wr=e=>e?wat.has(e.tagName)?!0:e instanceof HTMLElement&&e.isContentEditable:!1,Mat=(e,t,n)=>{const o=e.indexOf(t);if(o<0)return null;const r=e.length,i=[...e];switch(n.op){case"forward":{if(o>=r-1)return null;const a=i[o],s=i[o+1];return a===void 0||s===void 0?null:(i[o]=s,i[o+1]=a,i)}case"backward":{if(o<=0)return null;const a=i[o],s=i[o-1];return a===void 0||s===void 0?null:(i[o]=s,i[o-1]=a,i)}case"toFront":{if(o===r-1)return null;const[a]=i.splice(o,1);return a===void 0?null:(i.push(a),i)}case"toBack":{if(o===0)return null;const[a]=i.splice(o,1);return a===void 0?null:(i.unshift(a),i)}case"toIndex":{const a=Math.min(Math.max(n.index,0),r-1);if(a===o)return null;const[s]=i.splice(o,1);return s===void 0?null:(i.splice(a,0,s),i)}}};function bat({project:e,flow:t,slug:n,demos:o,detail:r,loading:i,runs:a,nodeEvents:s,statusByNode:c,externalReloadSignal:l,onPlayNode:h,refreshFlows:u,canvasRef:p}){var d2,pi;const y=o.find(B=>B.slug===n),{flows:g,createFlow:k,renameFlow:x,deleteFlow:v}=PF(e),[M,w]=m.useState([]),[b,C]=m.useState([]),[_,S]=m.useState(null),N=m.useRef(M),P=m.useRef(b);m.useEffect(()=>{N.current=M},[M]),m.useEffect(()=>{P.current=b},[b]);const A=m.useRef(null),E=fX(),z=fX(),U=uX(),$=uX(),[T,D]=m.useState(null),[O,I]=m.useState(null),[R,L]=m.useState({kind:"select"}),V=m.useRef({kind:"select"});m.useEffect(()=>{V.current=R},[R]);const[H,j]=m.useState(!1),[X,Z]=m.useState(null),J=m.useRef(new Set),re=`${e}/${t}`,oe=!J.current.has(re);m.useEffect(()=>{J.current.add(re)},[re]);const ne=m.useRef(null),le=m.useCallback(B=>{ne.current=B},[]),{reset:ve}=E,{reset:ge}=z,{reset:xe}=U,{reset:Te}=$;m.useEffect(()=>{w([]),C([]),S(null),ve(),ge(),xe(),Te(),D(null),I(null),ci.current=null,Do(!1),Ro.current.clear()},[r==null?void 0:r.id]);const Ye=m.useCallback((B,q)=>{w(B),C(q)},[]),ue=(d2=r==null?void 0:r.flow)==null?void 0:d2.nodes,Ie=(pi=r==null?void 0:r.flow)==null?void 0:pi.connectors,{pruneAgainst:Pt}=E,{pruneAgainst:wt}=z,{pruneAgainst:en}=U,{pruneAgainst:ce}=$;m.useEffect(()=>{if(!(!ue||!T)&&ue.length===T.length){for(let B=0;B<ue.length;B++){const q=ue[B],W=T[B];if(!q||q.id!==W)return}D(null)}},[ue,T]);const Q=(r==null?void 0:r.id)??null,zt=m.useMemo(()=>lOe({baseUrl:"",project:e,flow:t}),[e,t]),yn=m.useRef({nodes:[],connectors:[]});m.useEffect(()=>{yn.current={nodes:ue??[],connectors:Ie??[]}},[ue,Ie]);const{adapter:ae,history:Y}=m.useMemo(()=>kOe(zt,()=>yn.current),[zt,Q]);m.useEffect(()=>{ue&&(Pt(ue),en(ue))},[ue,Pt,en]),m.useEffect(()=>{Ie&&(wt(Ie),ce(Ie))},[Ie,wt,ce]);const he=m.useRef(!1);m.useEffect(()=>{if(!he.current){he.current=!0;return}Y.markExternalChange()},[l,Y]);const[Ae,He]=m.useState(!1),[Ke,Bt]=m.useState(null),[mn,tn]=m.useState(null),{setOverride:ke,dropOverride:Se}=E,qt=m.useRef(E.overrides);m.useEffect(()=>{qt.current=E.overrides},[E.overrides]);const Dn=m.useCallback((B,q)=>{!Q||!ae||(ke(B,{position:q}),I(null),ae.updateNodePosition(B,q).catch(W=>{Se(B),I(W instanceof Error?W.message:String(W)),console.error("updateNodePosition failed",W)}))},[Q,ae,ke,Se]),nn=m.useCallback(B=>{if(!Q||!ae||B.length===0)return;const q=B.map(W=>(ue==null?void 0:ue.find(ee=>ee.id===W.id))?{id:W.id,next:W.position}:null).filter(W=>W!==null);if(q.length!==0){for(const W of q)ke(W.id,{position:W.next});I(null),Y.batch("move-nodes",async()=>{for(const W of q)await ae.updateNodePosition(W.id,W.next)}).catch(W=>{for(const G of q)Se(G.id);I(W instanceof Error?W.message:String(W)),console.error("updateNodePosition batch failed",W)})}},[Q,ae,Y,ue,ke,Se]),l2=m.useCallback((B,q)=>{ke(B,{position:{x:q.x,y:q.y},data:{width:q.width,height:q.height}})},[ke]),vo=m.useCallback((B,q)=>{if(!Q||!ae)return;const W={width:q.width,height:q.height,position:{x:q.x,y:q.y}};ke(B,{position:W.position,data:{width:W.width,height:W.height}}),I(null),ae.updateNode(B,W).catch(G=>{Se(B),I(G instanceof Error?G.message:String(G)),console.error("updateNode resize failed",G)})},[Q,ae,ke,Se]),Yn=m.useCallback(B=>{if(!Q||!ae)return;const q={autoSize:!0};ke(B,{data:{autoSize:!0,width:void 0,height:void 0}}),I(null),ae.updateNode(B,q).catch(W=>{Se(B),I(W instanceof Error?W.message:String(W)),console.error("updateNode (fit-to-content) failed",W)})},[Q,ae,ke,Se]),Vi=m.useCallback(B=>{if(!Q||!ae||B.length===0)return;const q=[];for(const G of B){if(!(ue==null?void 0:ue.find(lt=>lt.id===G.id)))continue;const $e={position:G.position};G.width!==void 0&&($e.width=G.width),G.height!==void 0&&($e.height=G.height),q.push({id:G.id,next:$e})}if(q.length===0)return;for(const G of q){const ee={};G.next.width!==void 0&&(ee.width=G.next.width),G.next.height!==void 0&&(ee.height=G.next.height),ke(G.id,{position:G.next.position,...Object.keys(ee).length>0?{data:ee}:{}})}I(null);const W=q.map(G=>G.id).slice().sort().join(",");Y.batch("multi-resize",async()=>{for(const G of q)await ae.updateNode(G.id,G.next)},{coalesceKey:`multi:resize:${W}`}).catch(G=>{for(const ee of q)Se(ee.id);I(G instanceof Error?G.message:String(G)),console.error("updateNode multi-resize batch failed",G)})},[Q,ae,Y,ue,ke,Se]),{setOverride:Qe,dropOverride:Xt}=z,su=m.useCallback((B,q)=>{ke(B,{data:q})},[ke]),cu=m.useCallback((B,q)=>{for(const W of B)ke(W,{data:q})},[ke]),lu=m.useCallback((B,q)=>{Qe(B,q)},[Qe]),du=m.useCallback((B,q)=>{!Q||!ae||(lW(ca,q),ke(B,{data:q}),I(null),ae.updateNode(B,q).catch(W=>{Se(B),I(W instanceof Error?W.message:String(W)),console.error("updateNode style failed",W)}))},[Q,ae,ke,Se]),uu=m.useCallback((B,q)=>{if(!Q||!ae||B.length===0)return;lW(ca,q);const W=B.filter(G=>ue==null?void 0:ue.some(ee=>ee.id===G));if(W.length!==0){for(const G of W)ke(G,{data:q});I(null),Y.batch("style-nodes",async()=>{for(const G of W)await ae.updateNode(G,q)}).catch(G=>{for(const ee of W)Se(ee);I(G instanceof Error?G.message:String(G)),console.error("updateNode style-nodes batch failed",G)})}},[Q,ae,Y,ue,ke,Se]),hu=m.useCallback((B,q)=>{!Q||!ae||(oOe(ca,q),Qe(B,q),I(null),ae.updateConnector(B,q).catch(W=>{Xt(B),I(W instanceof Error?W.message:String(W)),console.error("updateConnector failed",W)}))},[Q,ae,Qe,Xt]),{mark:Qa,markMany:Ja,unmark:es,unmarkMany:ts}=U,{markMany:ni,unmarkMany:oi}=$,fu=m.useCallback(B=>{if(!Q||!ae||!(ue==null?void 0:ue.find(ee=>ee.id===B)))return;const W=(Ie??[]).filter(ee=>ee.source===B||ee.target===B).map(ee=>ee.id),G=new Set(W);I(null),Qa(B),W.length>0&&ni(W),w(ee=>ee.filter($e=>$e!==B)),C(ee=>ee.filter($e=>!G.has($e))),ae.deleteNode(B).catch(ee=>{es(B),W.length>0&&oi(W),I(ee instanceof Error?ee.message:String(ee)),console.error("deleteNode failed",ee)})},[Q,ae,ue,Ie,Qa,ni,es,oi]),pu=m.useCallback((B,q)=>{if(!Q||!ae||!ue)return;const W=T??ue.map(ee=>ee.id),G=Mat(W,B,q);G&&(D(G),I(null),ae.reorderNode(B,q).catch(ee=>{D(null),I(ee instanceof Error?ee.message:String(ee)),console.error("reorderNode failed",ee)}))},[Q,ae,ue,T]),zo=m.useCallback((B,q)=>{if(!Q||!ae||B.length===0&&q.length===0)return;const W=new Set(B),G=B.map(je=>ue==null?void 0:ue.find(ln=>ln.id===je)).filter(je=>!!je),ee=(Ie??[]).filter(je=>W.has(je.source)||W.has(je.target)),$e=new Set(ee.map(je=>je.id)),lt=q.map(je=>Ie==null?void 0:Ie.find(ln=>ln.id===je)).filter(je=>!!je).filter(je=>!$e.has(je.id));if(G.length===0&&ee.length===0&&lt.length===0)return;I(null);const Je=G.map(je=>je.id),At=[...ee.map(je=>je.id),...lt.map(je=>je.id)];Je.length>0&&Ja(Je),At.length>0&&ni(At);const Sn=G;w(je=>je.filter(ln=>!W.has(ln)));const yr=new Set(lt.map(je=>je.id));C(je=>je.filter(ln=>!yr.has(ln)&&!$e.has(ln))),Y.batch("delete-selection",async()=>{for(const je of Sn)await ae.deleteNode(je.id);await Promise.all(lt.map(je=>ae.deleteConnector(je.id)))}).catch(je=>{Je.length>0&&ts(Je),At.length>0&&oi(At),I(je instanceof Error?je.message:String(je)),console.error("deleteSelection batch failed",je)})},[Q,ae,Y,ue,Ie,Ja,ni,ts,oi]);m.useEffect(()=>{A.current=zo},[zo]),m.useEffect(()=>{const B=q=>{if(q.key!=="Delete"&&q.key!=="Backspace"||wr(document.activeElement)||document.querySelector('[data-testid="inline-edit-input"]'))return;const W=N.current,G=P.current;W.length===0&&G.length===0||(q.preventDefault(),zo(W,G))};return window.addEventListener("keydown",B),()=>window.removeEventListener("keydown",B)},[zo]);const ns=m.useCallback((B,q)=>{!Q||!ae||(ke(B,{data:{name:q}}),I(null),ae.updateNode(B,{name:q}).catch(W=>{I(W instanceof Error?W.message:String(W)),console.error("updateNode name failed",W)}))},[Q,ae,ke]),Bi=m.useCallback((B,q)=>{!Q||!ae||(ke(B,{data:{description:q}}),I(null),ae.updateNode(B,{description:q}).catch(W=>{I(W instanceof Error?W.message:String(W)),console.error("updateNode description failed",W)}))},[Q,ae,ke]),os=m.useCallback((B,q)=>{!Q||!ae||(ke(B,{data:{detail:q}}),I(null),ae.updateNode(B,{detail:q}).catch(W=>{I(W instanceof Error?W.message:String(W)),console.error("updateNode detail failed",W)}))},[Q,ae,ke]),Re=m.useCallback((B,q)=>{!Q||!ae||(ke(B,{data:{icon:q??void 0}}),I(null),ae.updateNode(B,{icon:q}).catch(W=>{I(W instanceof Error?W.message:String(W)),console.error("updateNode icon failed",W)}))},[Q,ae,ke]),Rt=m.useCallback((B,q)=>{!Q||!ae||(ke(B,{data:{target:q}}),I(null),ae.updateNode(B,{target:q}).catch(W=>{Se(B),I(W instanceof Error?W.message:String(W)),console.error("updateNode target failed",W)}))},[Q,ae,ke,Se]),rs=m.useCallback((B,q,W)=>{if(!Q||!ae)return;I(null);const G=`node-${xr()}`,ee=uW(B,W,O2(ca).node),$e={id:G,type:B,position:q,data:ee};ke(G,{id:G,type:B,position:q,data:ee}),ae.createNode($e).catch(Je=>{Se(G),I(Je instanceof Error?Je.message:String(Je)),console.error("createNode failed",Je)})},[Q,ae,ke,Se]),yu=m.useCallback((B,q)=>{if(!Q||!ae)return;I(null);const W=`node-${xr()}`,G={width:q.width,height:q.height},ee={id:W,type:"linkflow",position:B,data:G},$e={...G,_autoOpenPickerOnMount:!0};ke(W,{id:W,type:"linkflow",position:B,data:$e}),ae.createNode(ee).catch(Je=>{Se(W),I(Je instanceof Error?Je.message:String(Je)),console.error("createNode (linkflow) failed",Je)})},[Q,ae,ke,Se]),dr=m.useCallback((B,q)=>{if(!Q||!ae)return;I(null);const W=`node-${xr()}`,G={icon:B,width:z0.width,height:z0.height},ee={id:W,type:"icon",position:q,data:G};ke(W,{id:W,type:"icon",position:q,data:G}),w([W]),ae.createNode(ee).catch(lt=>{Se(W),I(lt instanceof Error?lt.message:String(lt)),console.error("createNode (icon) failed",lt)})},[Q,ae,ke,Se]),ur=m.useCallback(B=>{if(!Q||!ae)return;I(null);const q=`node-${xr()}`,W={id:q,type:"html",position:B.position,data:{}},G={id:q,type:"html",position:B.position,data:{}};ke(q,G),w([q]),ae.createNode(W).catch(ee=>{Se(q),I(ee instanceof Error?ee.message:String(ee)),console.error("createNode (type:'html') failed",ee)})},[Q,ae,ke,Se]),Ro=m.useRef(new Map),Hn=m.useCallback((B,q)=>{Ro.current.set(B,q)},[]),To=m.useCallback(B=>{Ro.current.delete(B)},[]),on=m.useCallback(B=>{!Q||!ae||(I(null),gat({...B,flowId:Q,lastUsed:O2(ca).node},{upload:async(q,W,G,ee)=>ae.uploadImage(W,await wEe(G),ee),createNode:async(q,W)=>{const{id:G}=await ae.createNode(W);return{id:G}},setOverride:ke,history:Y,rememberRetry:Hn,forgetRetry:To}).catch(q=>{console.error("image-upload-flow failed",q)}))},[Q,ae,Y,ke,Hn,To]),Zt=m.useCallback(B=>{if(!Q||!ae)return;const q=`node-${xr()}`;on({nodeId:q,...B})},[Q,ae,on]),Ui=m.useCallback(B=>{const q=Ro.current.get(B);q&&on({nodeId:B,...q})},[on]),[xo,is]=m.useState({open:!1,mode:"insert"}),ri=m.useCallback((B,q)=>{is({open:!0,mode:B,nodeId:q})},[]),ii=m.useCallback(()=>{is(B=>({...B,open:!1}))},[]),Nt=m.useCallback(()=>{ri("insert")},[ri]),hr=m.useCallback(B=>ri("replace",B),[ri]),Wi=m.useCallback(B=>{if(WHe(B),xo.mode==="replace"&&xo.nodeId){if(Q&&ae){const q=xo.nodeId;ke(q,{data:{icon:B}}),I(null),ae.updateNode(q,{icon:B}).catch(W=>{Se(q),I(W instanceof Error?W.message:String(W)),console.error("updateNode (icon replace) failed",W)})}}else{const q=ne.current;if(q&&Q){const W=BHe(q,{width:window.innerWidth,height:window.innerHeight});dr(B,W)}}ii()},[xo.mode,xo.nodeId,Q,ae,ke,Se,dr,ii]),mu=m.useCallback((B,q)=>{!Q||!ae||(Qe(B,{label:q}),I(null),ae.updateConnector(B,{label:q}).catch(W=>{I(W instanceof Error?W.message:String(W)),console.error("updateConnector label failed",W)}))},[Q,ae,Qe]),ai=m.useCallback((B,q,W)=>{if(!Q||!ae)return;const G=`conn-${xr()}`,ee=W==null?void 0:W.targetPin,$e=O2(ca).connector,lt={id:G,source:B,target:q,sourceHandleAutoPicked:!0,targetHandleAutoPicked:!0,...ee?{targetPin:ee}:{},...$e},Je={id:G,source:B,target:q,sourceHandleAutoPicked:!0,targetHandleAutoPicked:!0,...ee?{targetPin:ee}:{},...$e};Qe(G,lt),I(null),ae.createConnector(Je).catch(At=>{Xt(G),I(At instanceof Error?At.message:String(At)),console.error("createConnector failed",At)})},[Q,ae,Qe,Xt]),si=m.useCallback(({sourceNodeId:B,position:q,shape:W})=>{if(!Q||!ae)return;I(null);const G=`node-${xr()}`,ee=`conn-${xr()}`,$e=yz[W],lt=O2(ca),Je=uW(W,$e,lt.node),At={id:G,type:W,position:q,data:Je},Sn={id:ee,source:B,target:G,sourceHandleAutoPicked:!0,targetHandleAutoPicked:!0,...lt.connector};ke(G,{id:G,type:W,position:q,data:Je}),Qe(ee,Sn),S(G),Y.batch("create-and-connect",async()=>{await ae.createNode(At),await ae.createConnector(Sn)}).catch(je=>{Se(G),Xt(ee),I(je instanceof Error?je.message:String(je)),console.error("createAndConnectFromPane failed",je)})},[Q,ae,Y,ke,Se,Qe,Xt]),ci=m.useRef(null),[Gi,Do]=m.useState(!1),[li,_n]=m.useState(()=>({canUndo:Y.canUndo,canRedo:Y.canRedo}));m.useEffect(()=>Y.subscribe(_n),[Y]);const Cn=m.useCallback(B=>{if(!ue)return;const q=new Set(B),W=ue.filter(ee=>q.has(ee.id));if(W.length===0)return;const G=(Ie??[]).filter(ee=>q.has(ee.source)&&q.has(ee.target));ci.current=JSON.parse(JSON.stringify({nodes:W,connectors:G})),Do(!0)},[ue,Ie]),Qn=m.useCallback(B=>{if(!Q||!ae)return;const q=ci.current;if(!q||q.nodes.length===0)return;const{newNodes:W,newConnectors:G}=fat({nodes:q.nodes,connectors:q.connectors,flowPos:B,nodeIdGen:()=>`node-${xr()}`,connectorIdGen:()=>`conn-${xr()}`});for(const ee of W)ke(ee.id,ee);for(const ee of G)Qe(ee.id,ee);w(W.map(ee=>ee.id)),C(G.map(ee=>ee.id)),I(null),Y.batch("paste",async()=>{for(const ee of W)await ae.createNode({id:ee.id,type:ee.type,position:ee.position,data:ee.data});for(const ee of G)await ae.createConnector(ee)}).catch(ee=>{for(const $e of W)Se($e.id);for(const $e of G)Xt($e.id);I(ee instanceof Error?ee.message:String(ee)),console.error("paste failed",ee)})},[Q,ae,Y,ke,Se,Qe,Xt]);m.useEffect(()=>{const B=q=>{const W=eOe({event:q,isEditableActive:wr(document.activeElement),hasNodes:!!ue&&ue.length>0,hasConnectors:!!Ie&&Ie.length>0,selectedIds:N.current,hasClipboard:!!ci.current});if(W.type!=="noop"&&!(W.type==="copy"||W.type==="paste")){if(q.preventDefault(),W.type==="selectAll"){w((ue??[]).map(G=>G.id)),C((Ie??[]).map(G=>G.id));return}Cn([...W.ids]),Qn(null)}};return window.addEventListener("keydown",B),()=>window.removeEventListener("keydown",B)},[ue,Ie,Cn,Qn]),m.useEffect(()=>{const B=q=>{const W=YHe(q);if(!W||wr(document.activeElement))return;const G=N.current;if(G.length===0)return;const ee=E.overrides,$e=(ue??[]).map(Je=>{var Sn;const At=((Sn=ee[Je.id])==null?void 0:Sn.position)??Je.position;return{id:Je.id,position:At}}),lt=JHe(W,G,$e);if(lt.length!==0)if(q.preventDefault(),lt.length===1){const Je=lt[0];Je&&Dn(Je.id,Je.position)}else nn(lt)};return window.addEventListener("keydown",B),()=>window.removeEventListener("keydown",B)},[ue,E.overrides,Dn,nn]),m.useEffect(()=>{const B=q=>{const W=QHe(q);if(!W||wr(document.activeElement))return;q.preventDefault();const G=ne.current;G&&(W==="fit"?G.fitView({padding:.2,duration:200}):W==="in"?G.zoomIn({duration:150}):G.zoomOut({duration:150}))};return window.addEventListener("keydown",B),()=>window.removeEventListener("keydown",B)},[]);const wo=m.useCallback(async B=>{if(!Q||!ae||!ue||!ae.computeLayout)return;const q=E.overrides,W=ne.current,G=B==="selection"?new Set(N.current):null,ee=G?ue.filter(Be=>G.has(Be.id)):ue;if(ee.length<2)return;const $e=new Set(ee.map(Be=>Be.id)),lt=(Ie??[]).filter(Be=>$e.has(Be.source)&&$e.has(Be.target)),Je=new Map,At=ee.map(Be=>{var us;const rn=((us=q[Be.id])==null?void 0:us.position)??Be.position;Je.set(Be.id,rn);const Ln=W==null?void 0:W.getInternalNode(Be.id),dn=Ln==null?void 0:Ln.measured,Jn=Be.data,u2=(dn==null?void 0:dn.width)??Jn.width??200,WR=(dn==null?void 0:dn.height)??Jn.height??120;return{id:Be.id,type:Be.type,width:u2,height:WR}}),Sn=lt.map(Be=>({id:Be.id,source:Be.source,target:Be.target})),yr=await ae.computeLayout(At,Sn),je=new Map;for(const[Be,rn]of Object.entries(yr.nodes))je.set(Be,rn.position);let ln=Number.POSITIVE_INFINITY,yi=Number.POSITIVE_INFINITY,vu=Number.POSITIVE_INFINITY,xu=Number.POSITIVE_INFINITY;for(const Be of At){const rn=Je.get(Be.id);if(!rn)continue;rn.x<ln&&(ln=rn.x),rn.y<yi&&(yi=rn.y);const Ln=je.get(Be.id);Ln&&(Ln.x<vu&&(vu=Ln.x),Ln.y<xu&&(xu=Ln.y))}const BR=Number.isFinite(ln)&&Number.isFinite(vu)?ln-vu:0,UR=Number.isFinite(yi)&&Number.isFinite(xu)?yi-xu:0,ds=[];for(const Be of At){const rn=Je.get(Be.id),Ln=je.get(Be.id);if(!rn||!Ln)continue;const dn={x:Ln.x+BR,y:Ln.y+UR},Jn=dn.x-rn.x,u2=dn.y-rn.y;Math.abs(Jn)<1&&Math.abs(u2)<1||ds.push({id:Be.id,prev:rn,next:dn})}if(ds.length!==0){I(null);for(const Be of ds)ke(Be.id,{position:Be.next});Y.batch("tidy",async()=>{for(const Be of ds)await ae.updateNodePosition(Be.id,Be.next)}).catch(Be=>{for(const rn of ds)Se(rn.id);I(Be instanceof Error?Be.message:String(Be)),console.error("Tidy batch failed",Be)})}},[Q,ae,Y,ue,Ie,E.overrides,ke,Se]);m.useEffect(()=>{const B=q=>{if(!(q.metaKey||q.ctrlKey)||!q.shiftKey||q.altKey||q.key.toLowerCase()!=="l"||wr(document.activeElement))return;q.preventDefault();const W=N.current.length>0?"selection":"all";wo(W)};return window.addEventListener("keydown",B),()=>window.removeEventListener("keydown",B)},[wo]);const Ki=m.useCallback(()=>{const B=N.current.length>0?"selection":"all";wo(B)},[wo]);m.useEffect(()=>{const B=q=>{if(wr(document.activeElement)||document.querySelector('[data-testid="inline-edit-input"]'))return;const W=nOe(q);if(W===null)return;const G=V.current;if(W==="select"){G.kind!=="select"&&L({kind:"select"});return}if(W==="hand"){L(G.kind==="hand"?{kind:"select"}:{kind:"hand"});return}if(G.kind==="draw"&&G.shape===W){L({kind:"select"});return}L({kind:"draw",shape:W})};return window.addEventListener("keydown",B),()=>window.removeEventListener("keydown",B)},[]),m.useEffect(()=>{const B=q=>{if(q.key!=="Escape"||wr(document.activeElement)||document.querySelector('[data-testid="inline-edit-input"]'))return;if(V.current.kind!=="select"){L({kind:"select"});return}N.current.length>0&&w([]),P.current.length>0&&C([])};return window.addEventListener("keydown",B),()=>window.removeEventListener("keydown",B)},[]),m.useEffect(()=>{const B=q=>{if(q.key.toLowerCase()!=="f"||q.metaKey||q.ctrlKey||q.shiftKey||q.altKey||wr(document.activeElement)||document.querySelector('[data-testid="inline-edit-input"]'))return;const W=N.current;if(W.length===0)return;const G=ne.current;G&&G.fitView({nodes:W.map(ee=>({id:ee})),padding:.2,duration:200})};return window.addEventListener("keydown",B),()=>window.removeEventListener("keydown",B)},[]),m.useEffect(()=>{const B=q=>{if(q.key!=="1"||q.metaKey||q.ctrlKey||q.shiftKey||q.altKey||wr(document.activeElement)||document.querySelector('[data-testid="inline-edit-input"]'))return;const W=ne.current;if(!W)return;const{x:G,y:ee}=W.getViewport();W.setViewport({x:G,y:ee,zoom:1},{duration:150})};return window.addEventListener("keydown",B),()=>window.removeEventListener("keydown",B)},[]);const Xi=m.useCallback(B=>{var q,W;switch(B){case"tool.select":L({kind:"select"});return;case"tool.hand":L({kind:"hand"});return;case"tool.rectangle":L({kind:"draw",shape:"rectangle"});return;case"tool.ellipse":L({kind:"draw",shape:"ellipse"});return;case"tool.text":L({kind:"draw",shape:"text"});return;case"tool.sticky":L({kind:"draw",shape:"sticky"});return;case"tool.database":L({kind:"draw",shape:"database"});return;case"edit.undo":{if(!Y.canUndo)return;Y.undo().catch(G=>{I(G instanceof Error?G.message:String(G)),console.error("undo failed",G)});return}case"edit.redo":{if(!Y.canRedo)return;Y.redo().catch(G=>{I(G instanceof Error?G.message:String(G)),console.error("redo failed",G)});return}case"edit.copy":{const G=N.current;if(G.length===0)return;Cn([...G]);return}case"edit.paste":Qn(null);return;case"edit.duplicate":{const G=N.current;if(G.length===0)return;Cn([...G]),Qn(null);return}case"edit.delete":{const G=N.current,ee=P.current;if(G.length===0&&ee.length===0)return;zo([...G],[...ee]);return}case"edit.selectAll":w((ue??[]).map(G=>G.id)),C((Ie??[]).map(G=>G.id));return;case"view.fit":{const G=ne.current;if(!G)return;G.fitView({padding:.2,duration:200});return}case"view.zoomIn":{const G=ne.current;if(!G)return;G.zoomIn({duration:150});return}case"view.zoomOut":{const G=ne.current;if(!G)return;G.zoomOut({duration:150});return}case"view.zoom100":{const G=ne.current;if(!G)return;const{x:ee,y:$e}=G.getViewport();G.setViewport({x:ee,y:$e,zoom:1},{duration:150});return}case"view.zoomToSelection":{const G=N.current;if(G.length===0)return;const ee=ne.current;if(!ee)return;ee.fitView({nodes:G.map($e=>({id:$e})),padding:.2,duration:200});return}case"layout.tidy":{const G=N.current.length>0?"selection":"all";wo(G);return}case"selection.deselect":N.current.length>0&&w([]),P.current.length>0&&C([]),V.current.kind!=="select"&&L({kind:"select"});return;case"help.commandPalette":j(!0);return;case"export.pdf":{(q=p.current)==null||q.exportPdf();return}case"export.png":{(W=p.current)==null||W.exportPng();return}}},[Y,Cn,Qn,zo,ue,Ie,wo,p]);m.useEffect(()=>{const B=q=>{(q.metaKey||q.ctrlKey)&&(q.shiftKey||q.altKey||q.key.toLowerCase()==="p"&&(q.preventDefault(),!wr(document.activeElement)&&Xi("help.commandPalette")))};return window.addEventListener("keydown",B),()=>window.removeEventListener("keydown",B)},[Xi]);const di=m.useCallback((B,q)=>{if(!Q||!ae)return;const W={...q.source!==void 0?{source:q.source}:{},...q.target!==void 0?{target:q.target}:{},...q.sourceHandle!==void 0?{sourceHandle:q.sourceHandle===null?void 0:q.sourceHandle}:{},...q.targetHandle!==void 0?{targetHandle:q.targetHandle===null?void 0:q.targetHandle}:{},...q.sourceHandleAutoPicked!==void 0?{sourceHandleAutoPicked:q.sourceHandleAutoPicked}:{},...q.targetHandleAutoPicked!==void 0?{targetHandleAutoPicked:q.targetHandleAutoPicked}:{},...q.sourcePin!==void 0?{sourcePin:q.sourcePin===null?void 0:q.sourcePin}:{},...q.targetPin!==void 0?{targetPin:q.targetPin===null?void 0:q.targetPin}:{}};Qe(B,W),I(null),ae.updateConnector(B,q).catch(G=>{Xt(B),I(G instanceof Error?G.message:String(G)),console.error("updateConnector reconnect failed",G)})},[Q,ae,Qe,Xt]),Zi=m.useCallback((B,q,W)=>{if(!Q||!ae)return;const G=q==="source"?"sourcePin":"targetPin";Qe(B,{[G]:W}),I(null),ae.updateConnector(B,{[G]:W}).catch(ee=>{Xt(B),I(ee instanceof Error?ee.message:String(ee)),console.error("updateConnector pin failed",ee)})},[Q,ae,Qe,Xt]),gu=m.useCallback((B,q)=>{if(!Q||!ae)return;const W=Ie==null?void 0:Ie.find($e=>$e.id===B);if(!(W?q==="source"?W.sourcePin:W.targetPin:void 0))return;const ee=q==="source"?"sourcePin":"targetPin";Qe(B,{[ee]:void 0}),I(null),ae.updateConnector(B,{[ee]:null}).catch($e=>{Xt(B),I($e instanceof Error?$e.message:String($e)),console.error("updateConnector unpin failed",$e)})},[Q,ae,Ie,Qe,Xt]),ut=r==null?void 0:r.flow,as=E.overrides,fr=z.overrides,Mo=U.ids,pr=$.ids,ku=m.useMemo(()=>{if(!ut||M.length===0)return[];const B=new Map(ut.nodes.map(W=>[W.id,W])),q=[];for(const W of M){const G=B.get(W);if(!G)continue;const ee=as[W];if(!ee){q.push(G);continue}const $e=ee.data?{...G.data,...ee.data}:G.data;q.push({...G,...ee,data:$e})}return q},[ut,M,as]),ss=m.useMemo(()=>{if(!ut||b.length===0)return[];const B=new Map(ut.connectors.map(W=>[W.id,W])),q=[];for(const W of b){const G=B.get(W);if(!G)continue;const ee=fr[W];q.push(ee?{...G,...ee}:G)}return q},[ut,b,fr]),ui=m.useMemo(()=>{if(!ut)return null;if(!T)return ut.nodes;const B=new Map(ut.nodes.map(G=>[G.id,G])),q=[],W=new Set;for(const G of T){const ee=B.get(G);ee&&(q.push(ee),W.add(G))}for(const G of ut.nodes)W.has(G.id)||q.push(G);return q},[ut,T]),hi=m.useMemo(()=>{const B=ui??(ut==null?void 0:ut.nodes)??null;return B?Mo.size===0?B:B.filter(q=>!Mo.has(q.id)):null},[ui,ut,Mo]),qR=m.useMemo(()=>{const B=(ut==null?void 0:ut.connectors)??null;return B?pr.size===0&&Mo.size===0?B:B.filter(q=>!pr.has(q.id)&&!Mo.has(q.source)&&!Mo.has(q.target)):null},[ut,pr,Mo]),Wf=m.useCallback((B,q)=>{Z({nodeId:B,mode:q})},[]),VR=m.useMemo(()=>{if(!hi)return null;let B=!1;const q=hi.map(W=>{if(W.type!=="linkflow")return W;B=!0;const G=W.data.target,ee=G?()=>dit({project:G.project,flow:G.flow}):void 0,$e=G?kat(G,o):void 0;return{...W,data:{...W.data,onOpenPicker:Wf.bind(null,W.id),onFollow:ee,_resolvedTarget:$e}}});return B?q:hi},[hi,Wf,o]),fi=(g==null?void 0:g.some(B=>B.flowSlug===t))??!1;if(!y&&!fi&&!(g===null))return f.jsxs("div",{className:"flex h-full w-full flex-col items-center justify-center gap-2 bg-background p-6 text-center",children:[f.jsxs("p",{className:"text-sm font-medium",children:["Unknown demo: ",n]}),f.jsx("p",{className:"text-xs text-muted-foreground",children:"The slug may have been removed. Re-register from the project repo to bring it back."})]});if(!y||i&&!r)return f.jsx("div",{className:"flex h-full w-full items-center justify-center text-sm text-muted-foreground",children:"Loading demo…"});const bo=M[0],ls=bo?c[bo]:void 0;return f.jsxs("div",{className:"relative h-full w-full",children:[r&&!r.valid?f.jsxs("div",{"data-testid":"demo-error-banner",className:"absolute inset-x-0 top-0 z-10 border-b border-rose-500/40 bg-rose-50 px-4 py-2 text-xs text-rose-900 shadow-xs dark:bg-rose-950/40 dark:text-rose-100",children:[f.jsx("span",{className:"font-medium uppercase tracking-wide",children:"Invalid demo: "}),f.jsx("span",{className:"font-mono",children:r.error})]}):null,f.jsx(Qit,{open:Ae,onOpenChange:He,onCreate:k,onCreated:async B=>{await u(),J.current.add(`${e}/${B.flowSlug}`),Io({project:e,flow:B.flowSlug})}}),f.jsx(eat,{open:Ke!==null,onOpenChange:B=>{B||Bt(null)},flow:Ke,onRename:x,onRenamed:async(B,q)=>{await u(),B.flowSlug!==q&&(J.current.add(`${e}/${B.flowSlug}`),Io({project:e,flow:B.flowSlug}))}}),f.jsx(Jit,{open:mn!==null,onOpenChange:B=>{B||tn(null)},flow:mn,flows:g??[],onDelete:v,onDeleted:async(B,q)=>{var G;if(await u(),B!==t)return;const W=q??((G=g==null?void 0:g.find(ee=>ee.isDefault&&ee.flowSlug!==B))==null?void 0:G.flowSlug);W&&Io({project:e,flow:W})}}),ut&&ae?f.jsx(Frt,{ref:p,mode:"edit",adapter:ae,history:Y,topRightSlot:f.jsx(tat,{project:e,activeFlow:t,flows:g??[],onSelect:B=>{B!==t&&Io({project:e,flow:B})},onCreate:()=>He(!0),onRename:B=>{const q=g==null?void 0:g.find(W=>W.flowSlug===B);q&&Bt({flowSlug:q.flowSlug,name:q.name,icon:q.icon})},onDelete:B=>{const q=g==null?void 0:g.find(W=>W.flowSlug===B);q&&tn({flowSlug:q.flowSlug,name:q.name,isDefault:q.isDefault})}}),projectId:e,flowSlug:t,enableEmbed:!1,showShareMenu:!1,nodes:VR??ut.nodes,connectors:qR??ut.connectors,selectedNodeIds:M,selectedConnectorIds:b,onSelectionChange:Ye,runtime:{runs:a,statuses:c,pendingOverrides:{nodes:as,connectors:fr}},onPlayNode:h,onNodePositionChange:Dn,onNodePositionsChange:nn,onNodeResize:l2,onNodeResizeEnd:vo,onHtmlNodeFitToContent:Yn,onComponentNodeFitToContent:Yn,onMultiResize:Vi,onNodeNameChange:ns,onNodeDescriptionChange:Bi,onConnectorLabelChange:mu,onCreateShapeNode:rs,onCreateLinkflowNode:Q?yu:void 0,onCreateImageFromFile:Q?Zt:void 0,onRetryImageUpload:Q?Ui:void 0,onCreateHtmlNode:Q?ur:void 0,iconPickerOpen:xo.open,onOpenIconPicker:Q?Nt:void 0,onCloseIconPicker:Q?ii:void 0,onPickIcon:Q?Wi:void 0,onRequestIconReplace:Q?hr:void 0,onCreateConnector:ai,onReconnectConnector:di,onPinEndpoint:Q?Zi:void 0,onUnpinEndpoint:Q?gu:void 0,onReorderNode:pu,onDeleteNode:fu,onCopyNode:B=>Cn([B]),onPasteAt:Qn,onCopySelection:Q?Cn:void 0,onPasteSelection:Q?()=>Qn(null):void 0,hasClipboard:Gi,selectedNodes:ku,selectedConnectors:ss,onStyleNode:du,onStyleNodePreview:su,onStyleNodes:uu,onStyleNodesPreview:cu,onStyleConnector:hu,onStyleConnectorPreview:lu,onRfInit:le,onTidy:ue?Ki:void 0,onCreateAndConnectFromPane:si,pendingEditNodeId:_,canvasMode:R,onCanvasModeChange:L,statusReport:ls,onNameChange:ns,onDescriptionChange:Bi,onDetailChange:os,onIconChange:Re,autoFitView:oe},`${e}/${t}`):f.jsx("div",{className:"flex h-full w-full items-center justify-center text-sm text-muted-foreground",children:"No demo data yet."}),O?f.jsxs("div",{"data-testid":"edit-error-banner",className:"absolute inset-x-0 bottom-4 z-20 mx-auto w-fit max-w-[80%] rounded-md border border-rose-500/50 bg-rose-50 px-3 py-2 text-xs text-rose-900 shadow-md dark:bg-rose-950/60 dark:text-rose-100",children:[f.jsx("span",{className:"font-medium",children:"Couldn't save change: "}),f.jsx("span",{className:"font-mono",children:O}),f.jsx("button",{type:"button",className:"ml-3 underline underline-offset-2",onClick:()=>I(null),children:"Dismiss"})]}):null,f.jsx(Kit,{open:H,onOpenChange:j,runCommand:Xi,ctx:{hasSelection:M.length>0||b.length>0,canUndo:li.canUndo,canRedo:li.canRedo,hasClipboard:Gi,canExportDemo:!!Q}}),f.jsx(rat,{open:X!==null,onOpenChange:B=>{B||Z(null)},mode:(X==null?void 0:X.mode)??"link",demos:o,currentSlug:n,initialTarget:(X==null?void 0:X.mode)==="edit"?(()=>{const B=ue==null?void 0:ue.find(W=>W.id===X.nodeId);return!B||B.type!=="linkflow"?null:B.data.target??null})():null,onCommit:B=>{X&&Rt(X.nodeId,B)}})]})}const _at=e=>({display:e?"block":"none",height:"100%"});function Cat({stack:e,renderEntry:t}){return f.jsx(f.Fragment,{children:e.map((n,o)=>{const r=o===e.length-1;return f.jsx("div",{"data-flow-stack-entry":n.slug,"data-flow-stack-top":r?"true":"false",style:_at(r),children:t(n,r)},n.slug)})})}function Sat({demos:e,refreshFlows:t,canvasRef:n}){const o=Aie();return f.jsx(Cat,{stack:o,renderEntry:(r,i)=>f.jsx(Lat,{entry:r,demos:e,refreshFlows:t,canvasRef:i?n:void 0})})}function Lat({entry:e,demos:t,refreshFlows:n,canvasRef:o}){const{project:r,flow:i,slug:a}=e,s=t.find(z=>z.slug===a),c=(s==null?void 0:s.id)??null,l=m.useRef(null),h=o??l,{detail:u,loading:p,refresh:y,applyDetail:g}=jit(r,i),[k,x]=m.useState(0),{runs:v,apply:M}=Dit(c),{events:w,apply:b}=Rit(c),{statusByNode:C,apply:_,reset:S}=qit(c),N=m.useCallback(()=>{S(),y(),n()},[y,n,S]),P=m.useCallback(z=>{if(!c||!s)return;const U={id:c,slug:s.slug,filePath:""},$=z.valid?{...U,name:z.flow.name??s.name,flow:z.flow,valid:!0,error:null}:{...U,name:s.name,flow:null,valid:!1,error:z.error};g($),x(T=>T+1)},[c,s,g]),A=m.useCallback(z=>{M(z),b(z),_(z)},[M,b,_]);Vit(c,{onHello:N,onFlowReload:P,onEvent:A});const E=m.useCallback(z=>{Tle(r,i,z).catch(U=>{M({type:"node:error",nodeId:z,message:U instanceof Error?U.message:String(U),ts:Date.now()})})},[r,i,M]);return f.jsx(bat,{project:r,flow:i,slug:a,demos:t,detail:u,loading:p,runs:v,nodeEvents:w,statusByNode:C,externalReloadSignal:k,onPlayNode:E,refreshFlows:n,canvasRef:h})}const pX="npx seeflow register --path .";function Nat(){const[e,t]=m.useState(!1),n=async()=>{try{await navigator.clipboard.writeText(pX),t(!0),setTimeout(()=>t(!1),1200)}catch(o){console.error("[empty-state] copy failed",o)}};return f.jsx("div",{"data-testid":"seeflow-empty-state",className:"flex h-full w-full items-center justify-center bg-background p-6",children:f.jsxs("div",{className:"flex max-w-lg flex-col items-center gap-6 text-center",children:[f.jsx("div",{className:"flex h-12 w-12 items-center justify-center rounded-full bg-muted",children:f.jsx(Zrt,{className:"h-6 w-6 text-muted-foreground"})}),f.jsxs("div",{className:"space-y-2",children:[f.jsx("h1",{className:"text-2xl font-semibold tracking-tight text-foreground",children:"No demos registered yet"}),f.jsxs("p",{className:"text-sm text-muted-foreground",children:["Point SeeFlow at any folder containing a"," ",f.jsx("code",{className:"rounded bg-muted px-1.5 py-0.5 text-xs",children:"flow.json"})," file and it'll appear here."]})]}),f.jsxs("div",{className:"flex w-full items-center gap-2 rounded-md border border-border bg-card px-3 py-2 font-mono text-sm",children:[f.jsx("span",{className:"text-muted-foreground select-none",children:"$"}),f.jsx("code",{className:"flex-1 truncate text-left",children:pX}),f.jsx(rt,{type:"button",variant:"ghost",size:"sm",onClick:n,"aria-label":"Copy register command",children:e?f.jsx(Mie,{className:"h-4 w-4"}):f.jsx(_ie,{className:"h-4 w-4"})})]})]})})}function Iat({demos:e}){return e.length===0?f.jsx(Nat,{}):f.jsx("div",{className:"flex h-full w-full items-start justify-center overflow-y-auto bg-background p-8",children:f.jsxs("div",{"data-testid":"studio-home-picker",className:"flex w-full max-w-2xl flex-col gap-6 pt-8",children:[f.jsxs("div",{className:"space-y-1",children:[f.jsx("h1",{className:"text-2xl font-semibold tracking-tight",children:"Open a demo"}),f.jsxs("p",{className:"text-sm text-muted-foreground",children:[e.length," demos registered — pick one to load its canvas."]})]}),f.jsx("ul",{className:"flex flex-col gap-2",children:e.map(t=>f.jsx("li",{children:f.jsxs("button",{type:"button",onClick:()=>{const n=Iie(t.slug);n&&Io(n)},"data-testid":`studio-home-demo-${t.slug}`,className:"flex w-full flex-col items-start gap-0.5 rounded-lg border border-border bg-card px-4 py-3 text-left transition-colors hover:border-input",style:{boxShadow:"var(--shadow-card)"},children:[f.jsx("span",{className:"text-sm font-medium",children:t.name}),f.jsx("span",{className:"truncate text-xs text-muted-foreground",children:t.repoPath})]})},t.id))})]})})}typeof window<"u"&&hit();function Aat(){var S;const e=tit(),{demos:t,refresh:n}=Lit(),{projects:o,refresh:r,unregisterProject:i}=Nit(),a=Aie(),s=a.at(-1)??null,c=(s==null?void 0:s.project)??null,l=(s==null?void 0:s.slug)??null,h=a.length>1?a.at(-2)??null:null,u=nit(e),p=(u==null?void 0:u.project)??null,{flows:y}=PF(p);Iit({onRegistryReload:()=>{n(),r()}});const g=l?(t??[]).find(N=>N.slug===l):void 0;m.useEffect(()=>{l&&t!==null&&(g||n())},[l,t,g,n]);const k=m.useCallback(N=>{rX(N.id),n(),r(),Io({project:N.slug,flow:"main"})},[n,r]),x=m.useCallback(async(N,P)=>{await i(N,P),await n(),c===N&&Io(null)},[i,n,c]);m.useEffect(()=>{if(e!=="/"||t===null)return;const N=Eit(t,Ait());if(N){const P=Iie(N.slug);P&&Io(P)}},[e,t]),m.useEffect(()=>{g&&rX(g.id)},[g]),m.useEffect(()=>{s&&pit(s.project,s.flow)},[s]),m.useEffect(()=>{if(!p||!y)return;const N=yit(y,$ie(p));N&&Io({project:p,flow:N})},[p,y]);const v=m.useRef(null),[M,w]=m.useState(!1),b=(g==null?void 0:g.id)??null,C=m.useMemo(()=>{if(b)return{onDownloadPdf:()=>{var N;return(N=v.current)==null?void 0:N.exportPdf()},onDownloadPng:()=>{var N;return(N=v.current)==null?void 0:N.exportPng()},onExportToCloud:()=>w(!0)}},[b]);if(t===null)return f.jsx("div",{className:"flex h-full w-full items-center justify-center bg-background text-sm text-muted-foreground",children:"Loading…"});const _=h?((S=t.find(N=>N.slug===h.slug))==null?void 0:S.name)??h.flow:void 0;return f.jsx(g0,{delayDuration:150,children:f.jsxs("div",{className:"flex h-full w-full flex-col bg-background text-foreground",children:[f.jsx(Sit,{projects:o??[],currentProjectSlug:c??void 0,onProjectCreated:k,onUnregisterProject:x,share:C,onBack:_?uit:void 0,previousFlowName:_}),f.jsx("main",{className:"min-h-0 flex-1",children:a.length>0?f.jsx(Sat,{demos:t,refreshFlows:n,canvasRef:v}):f.jsx(Iat,{demos:t})}),b&&c?f.jsx(Qrt,{open:M,onOpenChange:w,project:c,flowName:g==null?void 0:g.name,onCapturePreview:()=>{var N;return((N=v.current)==null?void 0:N.capturePreview())??Promise.resolve(void 0)}}):null]})})}const Oie=document.getElementById("root");if(!Oie)throw new Error("Root element #root not found");ID.createRoot(Oie).render(f.jsx(Er.StrictMode,{children:f.jsx(Aat,{})}));export{Sf as C,QJe as M,Er as R,Z0 as _,Bn as a,GY as b,lK as c,kP as d,HF as e,pQ as f,jXe as g,kf as h,zXe as i,jat as j,Nh as k,$r as l,f as m,gQ as n,fnt as o,Z$e as p,xXe as q,m as r,ao as s,RXe as t,Wq as u,CXe as w,Eat as z};
8629
+ */const Yrt=ko("Workflow",[["rect",{width:"8",height:"8",x:"3",y:"3",rx:"2",key:"by2w9f"}],["path",{d:"M7 11v4a2 2 0 0 0 2 2h4",key:"xkn7yn"}],["rect",{width:"8",height:"8",x:"13",y:"13",rx:"2",key:"1cgmvn"}]]),ZK="seeflow.export.email",YK="seeflow.export.name",QK="seeflow.export.visibility";function Qrt({open:e,onOpenChange:t,project:n,flowName:o,onCapturePreview:r}){const[i,a]=m.useState(""),[s,c]=m.useState(""),[l,h]=m.useState("public"),[u,p]=m.useState({kind:"idle"}),[y,g]=m.useState(!1),[k,x]=m.useState(new Set),v=Lle(n),M=PF(e?n:null),w=M.flows;m.useEffect(()=>{e&&(a(localStorage.getItem(ZK)??""),c(o??localStorage.getItem(YK)??""),h(localStorage.getItem(QK)??"public"),p({kind:"idle"}),g(!1))},[e,o]),m.useEffect(()=>{e&&w&&x(new Set(w.map($=>$.flowSlug)))},[e,w]);const b=m.useCallback(async()=>{p({kind:"loading"});try{const $=await(r==null?void 0:r()),{shareUrl:T}=await v(i.trim(),s.trim(),l,$,Array.from(k));localStorage.setItem(ZK,i.trim()),localStorage.setItem(YK,s.trim()),localStorage.setItem(QK,l),p({kind:"done",shareUrl:T})}catch($){p({kind:"error",message:$ instanceof Error?$.message:String($)})}},[v,i,s,l,r,k]),C=m.useCallback($=>{x(T=>{const D=new Set(T);return D.has($)?D.delete($):D.add($),D})},[]),_=m.useCallback(()=>{w&&x($=>$.size===w.length?new Set:new Set(w.map(T=>T.flowSlug)))},[w]),S=m.useCallback(async()=>{if(u.kind==="done")try{await navigator.clipboard.writeText(u.shareUrl),g(!0),setTimeout(()=>g(!1),2e3)}catch($){console.error("Failed to copy to clipboard:",$)}},[u]),N=u.kind==="loading",P=i.trim().length>0&&s.trim().length>0&&w!==null&&M.error===null&&k.size>0,A=((w==null?void 0:w.length)??0)>=2,E=M.loading,z=M.error!==null,U=w!==null&&k.size===w.length;return f.jsx(ir,{open:e,onOpenChange:t,children:f.jsxs(Yr,{className:"sm:max-w-md","data-testid":"export-dialog",onOpenAutoFocus:$=>{$.preventDefault();const T=document.querySelector('[data-testid="export-email-input"]');T==null||T.focus()},children:[f.jsxs(Qr,{children:[f.jsx(Jr,{children:"Export project to seeflow.dev"}),f.jsx(ei,{children:"Upload this project to the cloud and get a shareable link."})]}),u.kind!=="done"?f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:"flex flex-col gap-4",children:[f.jsxs("label",{className:"flex flex-col gap-1.5 text-sm",children:[f.jsx("span",{className:"font-medium",children:"Email"}),f.jsx("input",{type:"email",required:!0,autoComplete:"email",value:i,onChange:$=>a($.target.value),disabled:N,"data-testid":"export-email-input",className:"rounded-md border bg-background px-3 py-2 text-sm outline-hidden ring-offset-background focus:border-ring focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50"}),f.jsx("span",{className:"text-xs text-muted-foreground",children:"We'll use this to let you manage your flows in the future."})]}),f.jsxs("label",{className:"flex flex-col gap-1.5 text-sm",children:[f.jsx("span",{className:"font-medium",children:"Flow Name"}),f.jsx("input",{type:"text",required:!0,value:s,onChange:$=>c($.target.value),disabled:N,"data-testid":"export-name-input",className:"rounded-md border bg-background px-3 py-2 text-sm outline-hidden ring-offset-background focus:border-ring focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50"})]}),f.jsxs("label",{className:"flex flex-col gap-1.5 text-sm",children:[f.jsx("span",{className:"font-medium",children:"Visibility"}),f.jsxs("select",{value:l,onChange:$=>h($.target.value),disabled:N,"data-testid":"export-visibility-select",className:"rounded-md border bg-background px-3 py-2 text-sm outline-hidden ring-offset-background focus:border-ring focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",children:[f.jsx("option",{value:"public",children:"Public — anyone can discover it"}),f.jsx("option",{value:"link",children:"Anyone with the link"})]})]}),E?f.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground","data-testid":"export-flows-loading",children:[f.jsx(XK,{className:"h-4 w-4 animate-spin","aria-hidden":"true"}),f.jsx("span",{children:"Loading flows…"})]}):null,z?f.jsxs("div",{role:"alert","data-testid":"export-flows-error",className:"flex items-center justify-between gap-3 rounded-md border border-destructive/30 bg-destructive/10 px-3 py-2 text-sm text-destructive",children:[f.jsx("span",{children:"Couldn't load flows."}),f.jsx("button",{type:"button",onClick:()=>M.refresh(),disabled:N,"data-testid":"export-flows-retry",className:"shrink-0 font-medium underline-offset-2 hover:underline disabled:cursor-not-allowed disabled:opacity-50",children:"Retry"})]}):null,A&&w?f.jsxs("div",{className:"flex flex-col gap-1.5 text-sm","data-testid":"export-flows-section",children:[f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsx("span",{className:"font-medium",children:"Flows"}),f.jsx("button",{type:"button",onClick:_,disabled:N,"data-testid":"export-flows-toggle-all",className:"text-xs text-muted-foreground underline-offset-2 hover:text-foreground hover:underline disabled:cursor-not-allowed disabled:opacity-50",children:U?"Clear":"Select all"})]}),f.jsx("ul",{className:"flex max-h-48 flex-col gap-1 overflow-y-auto rounded-md border bg-background p-2",children:w.map($=>f.jsx("li",{children:f.jsxs("label",{className:"flex items-center gap-2 rounded px-2 py-1 hover:bg-muted",children:[f.jsx("input",{type:"checkbox",checked:k.has($.flowSlug),onChange:()=>C($.flowSlug),disabled:N,"data-testid":`export-flow-checkbox-${$.flowSlug}`}),f.jsx("span",{className:"flex-1 truncate",children:$.name}),$.isDefault?f.jsx(Xrt,{className:"h-3.5 w-3.5 text-muted-foreground","aria-label":"default flow","data-testid":`export-flow-default-${$.flowSlug}`}):null]})},$.flowSlug))})]}):null,u.kind==="error"?f.jsx("div",{role:"alert","data-testid":"export-error",className:"rounded-md border border-destructive/30 bg-destructive/10 px-3 py-2 text-sm text-destructive",children:u.message}):null]}),f.jsx(ar,{children:u.kind==="error"?f.jsxs(f.Fragment,{children:[f.jsx(rt,{type:"button",variant:"ghost",onClick:()=>t(!1),"data-testid":"export-cancel",children:"Cancel"}),f.jsx(rt,{type:"button",onClick:()=>p({kind:"idle"}),"data-testid":"export-retry",children:"Try again"})]}):f.jsxs(f.Fragment,{children:[f.jsx(rt,{type:"button",variant:"ghost",onClick:()=>t(!1),disabled:N,"data-testid":"export-cancel",children:"Cancel"}),f.jsx(rt,{type:"button",onClick:b,disabled:N||!P,"data-testid":"export-submit",children:N?f.jsxs(f.Fragment,{children:[f.jsx(XK,{className:"h-4 w-4 animate-spin","aria-hidden":"true"}),f.jsx("span",{children:"Uploading…"})]}):"Export"})]})})]}):f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:"flex flex-col gap-3",children:[f.jsx("p",{className:"text-sm text-muted-foreground",children:"Your diagram is live. Share this link:"}),f.jsxs("div",{className:"flex gap-2",children:[f.jsx("input",{type:"text",readOnly:!0,value:u.shareUrl,"data-testid":"export-share-url",className:"min-w-0 flex-1 rounded-md border bg-muted px-3 py-2 text-sm outline-hidden"}),f.jsx(rt,{type:"button",variant:"outline",size:"icon",onClick:S,"aria-label":"Copy link","data-testid":"export-copy",children:y?f.jsx(Mie,{className:"h-4 w-4","aria-hidden":"true"}):f.jsx(_ie,{className:"h-4 w-4","aria-hidden":"true"})}),f.jsx(rt,{type:"button",variant:"outline",size:"icon",onClick:()=>window.open(u.shareUrl,"_blank"),"aria-label":"View in new tab","data-testid":"export-view",children:f.jsx(Wrt,{className:"h-4 w-4","aria-hidden":"true"})})]})]}),f.jsx(ar,{children:f.jsx(rt,{type:"button",onClick:()=>t(!1),"data-testid":"export-done",children:"Done"})})]})]})})}function Jrt({open:e,onOpenChange:t,onCreated:n}){const[o,r]=m.useState(""),[i,a]=m.useState(""),[s,c]=m.useState(""),[l,h]=m.useState(null),[u,p]=m.useState(!1);m.useEffect(()=>{e&&(r(""),a(""),c(""),h(null),p(!1))},[e]);const y=o.trim(),g=i.trim(),k=s.trim(),x=g.length>0&&!u,v=async M=>{if(M.preventDefault(),!!x){p(!0),h(null);try{const w=await Rle({name:g,...y.length>0?{path:y}:{},...k.length>0?{description:k}:{}});n(w),t(!1)}catch(w){h(w instanceof Error?w.message:String(w)),p(!1)}}};return f.jsx(ir,{open:e,onOpenChange:t,children:f.jsxs(Yr,{className:"sm:max-w-md","data-testid":"create-project-dialog",onOpenAutoFocus:M=>{M.preventDefault();const w=document.querySelector('[data-testid="create-project-name-input"]');w==null||w.focus()},children:[f.jsxs(Qr,{children:[f.jsx(Jr,{children:"Create new project"}),f.jsx(ei,{children:"Scaffold a new SeeFlow project. It's created in ~/.seeflow/projects/ unless you give a path."})]}),f.jsxs("form",{onSubmit:v,className:"flex flex-col gap-4",children:[f.jsxs("label",{className:"flex flex-col gap-1.5 text-sm",children:[f.jsx("span",{className:"font-medium",children:"Project name"}),f.jsx("input",{type:"text",required:!0,autoComplete:"off",spellCheck:!1,value:i,onChange:M=>a(M.target.value),"data-testid":"create-project-name-input",className:"rounded-md border bg-background px-3 py-2 text-sm outline-hidden ring-offset-background focus:border-ring focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2"})]}),f.jsxs("label",{className:"flex flex-col gap-1.5 text-sm",children:[f.jsxs("span",{className:"font-medium",children:["Project path ",f.jsx("span",{className:"text-muted-foreground",children:"(optional)"})]}),f.jsx("input",{type:"text",autoComplete:"off",spellCheck:!1,placeholder:"/absolute/path/to/my-project",value:o,onChange:M=>r(M.target.value),"data-testid":"create-project-path-input",className:"rounded-md border bg-background px-3 py-2 text-sm outline-hidden ring-offset-background focus:border-ring focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2"}),f.jsx("span",{className:"text-xs text-muted-foreground",children:"Leave blank to create it in ~/.seeflow/projects/"})]}),f.jsxs("label",{className:"flex flex-col gap-1.5 text-sm",children:[f.jsxs("span",{className:"font-medium",children:["Description ",f.jsx("span",{className:"text-muted-foreground",children:"(optional)"})]}),f.jsx("textarea",{rows:3,autoComplete:"off",spellCheck:!1,value:s,onChange:M=>c(M.target.value),"data-testid":"create-project-description-input",className:"rounded-md border bg-background px-3 py-2 text-sm outline-hidden ring-offset-background focus:border-ring focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2"})]}),l?f.jsx("div",{role:"alert","data-testid":"create-project-error",className:"rounded-md border border-destructive/30 bg-destructive/10 px-3 py-2 text-sm text-destructive",children:l}):null,f.jsxs(ar,{children:[f.jsx(rt,{type:"button",variant:"ghost",onClick:()=>t(!1),disabled:u,children:"Cancel"}),f.jsx(rt,{type:"submit",disabled:!x,"data-testid":"create-project-submit",children:u?"Creating…":"Create project"})]})]})]})})}const JK="seeflow:navigate",eit=e=>(window.addEventListener("popstate",e),window.addEventListener(JK,e),()=>{window.removeEventListener("popstate",e),window.removeEventListener(JK,e)}),eX=()=>window.location.pathname,tit=()=>m.useSyncExternalStore(eit,eX,eX),Lie=(e,t)=>`/projects/${encodeURIComponent(e)}/flows/${encodeURIComponent(t)}`,Nie=e=>{const t=e.split("/").filter(Boolean);if(t.length!==4||t[0]!=="projects"||t[2]!=="flows")return null;const n=decodeURIComponent(t[1]??""),o=decodeURIComponent(t[3]??"");return!n||!o?null:{project:n,flow:o}},Iie=e=>{const t=e.indexOf("/");return t<=0||t===e.length-1?null:{project:e.slice(0,t),flow:e.slice(t+1)}},nit=e=>{const t=e.split("/").filter(Boolean);if(t.length!==2||t[0]!=="projects")return null;const n=decodeURIComponent(t[1]??"");return n?{project:n}:null},oit="seeflow:navigate",RO="seeflow:flow-stack",hV=e=>({project:e.project,flow:e.flow,slug:`${e.project}/${e.flow}`}),rit=e=>{const t=Nie(e);return t?[hV(t)]:[]},iit=(e,t)=>[...e,hV(t)],ait=e=>e?[hV(e)]:[],sit=(e,t,n)=>{if(typeof t=="number"&&t>=0&&t<=e.length){const o=e.slice(0,t),r=o.at(-1);if(n){if(r&&r.project===n.project&&r.flow===n.flow)return o}else if(o.length===0)return o}return null};let Tr=[],tX=!1;const fV=()=>{typeof window>"u"||window.dispatchEvent(new Event(RO))},cit=e=>(window.addEventListener(RO,e),()=>window.removeEventListener(RO,e)),nX=()=>Tr,Aie=()=>m.useSyncExternalStore(cit,nX,nX),Eie=(e,t)=>{window.history.pushState({stackDepth:e},"",t),window.dispatchEvent(new Event(oit))},lit=(e,t)=>{const n=window.history.state??null;window.history.replaceState({...n??{},stackDepth:e},"",t)},dit=e=>{const t=iit(Tr,e);Eie(t.length,Lie(e.project,e.flow)),Tr=t,fV()},uit=()=>{window.history.back()},Io=e=>{const t=ait(e),n=e?Lie(e.project,e.flow):"/";window.location.pathname===n?lit(t.length,n):Eie(t.length,n),Tr!==t&&(Tr=t,fV())},hit=()=>{if(tX)return;Tr=rit(window.location.pathname);const e=window.history.state??null;typeof(e==null?void 0:e.stackDepth)!="number"&&window.history.replaceState({...e??{},stackDepth:Tr.length},"",window.location.pathname+window.location.search+window.location.hash),window.addEventListener("popstate",()=>{const t=window.history.state??null,n=Nie(window.location.pathname),o=sit(Tr,t==null?void 0:t.stackDepth,n);if(o!==null){Tr!==o&&(Tr=o,fV());return}Io(n)}),tX=!0},fit="seeflow:last-flow:",jie=e=>`${fit}${e}`,$ie=e=>{if(typeof window>"u")return null;try{return window.localStorage.getItem(jie(e))}catch{return null}},pit=(e,t)=>{if(!(typeof window>"u"))try{window.localStorage.setItem(jie(e),t)}catch{}},yit=(e,t)=>{var o;if(e.length===0)return null;if(t){const r=e.find(i=>i.flowSlug===t);if(r)return r.flowSlug}const n=e.find(r=>r.isDefault);return n?n.flowSlug:((o=e[0])==null?void 0:o.flowSlug)??null};function mit({projects:e,currentProjectSlug:t,onProjectCreated:n,onUnregisterProject:o}){const[r,i]=m.useState(!1),[a,s]=m.useState(!1),[c,l]=m.useState(null),[h,u]=m.useState(!1),[p,y]=m.useState(null),[g,k]=m.useState(!1);m.useEffect(()=>{const S=N=>{N.key==="k"&&(N.metaKey||N.ctrlKey)&&(N.preventDefault(),i(P=>!P))};return document.addEventListener("keydown",S),()=>document.removeEventListener("keydown",S)},[]);const x=e.find(S=>S.projectSlug===t),v=S=>{const P=$ie(S.projectSlug)??S.defaultFlow;Io({project:S.projectSlug,flow:P})},M=S=>{n==null||n(S)},w=S=>{l(S),y(null),k(!1)},b=()=>{h||(l(null),y(null),k(!1))},C=async()=>{if(c){u(!0),y(null);try{await(o==null?void 0:o(c.projectSlug,{deleteSource:g})),l(null),k(!1)}catch(S){y(S instanceof Error?S.message:String(S))}finally{u(!1)}}},_=(c==null?void 0:c.flowCount)??0;return f.jsxs(f.Fragment,{children:[f.jsxs(Qd,{open:r,onOpenChange:i,children:[f.jsx(o2,{asChild:!0,children:f.jsxs(rt,{type:"button",variant:"outline",size:"sm","aria-label":"Switch project","aria-expanded":r,className:"gap-2","data-testid":"project-switcher-trigger",children:[f.jsx("span",{className:"max-w-[180px] truncate text-sm",children:(x==null?void 0:x.name)??"Select project"}),f.jsx(ene,{children:"⌘K"}),f.jsx(bie,{className:"h-3.5 w-3.5 opacity-60"})]})}),f.jsxs(Za,{align:"end",sideOffset:6,className:"relative w-[320px] p-0","data-testid":"project-switcher-popover",children:[f.jsxs(Aq,{children:[f.jsx(Qte,{placeholder:"Search projects..."}),f.jsxs(Eq,{className:"pb-12",children:[f.jsx(jq,{children:"No projects."}),e.length>0?f.jsx(kz,{heading:"Projects",children:e.map(S=>f.jsxs(vz,{value:`${S.name} ${S.projectSlug}`,onSelect:()=>{i(!1),v(S)},"data-testid":`project-switcher-row-${S.projectSlug}`,className:"group flex items-center justify-between gap-2",children:[f.jsxs("div",{className:"flex min-w-0 flex-col items-start gap-0.5",children:[f.jsx("span",{className:"font-medium",children:S.name}),S.repoPath?f.jsx("span",{className:"w-full truncate text-xs text-muted-foreground",children:S.repoPath}):null]}),f.jsx("button",{type:"button","aria-label":`Unregister ${S.name}`,"data-testid":`project-switcher-unregister-${S.projectSlug}`,className:"shrink-0 rounded p-0.5 opacity-0 transition-opacity hover:text-destructive group-hover:opacity-100 focus-visible:opacity-100 focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring",onClick:N=>{N.stopPropagation(),i(!1),w(S)},children:f.jsx(Sie,{className:"h-3.5 w-3.5"})})]},S.projectSlug))}):null]})]}),f.jsx("button",{type:"button","aria-label":"Create new project",title:"Create new project","data-testid":"project-switcher-create",onClick:()=>{i(!1),s(!0)},className:"absolute right-2 bottom-2 inline-flex h-8 w-8 items-center justify-center rounded-full bg-primary text-primary-foreground shadow-md transition-colors hover:bg-emerald-400 focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",children:f.jsx(Cie,{className:"h-4 w-4"})})]})]}),f.jsx(Jrt,{open:a,onOpenChange:s,onCreated:M}),f.jsx(ir,{open:c!==null,onOpenChange:S=>{S||b()},children:f.jsxs(Yr,{className:"sm:max-w-md","data-testid":"unregister-project-dialog",children:[f.jsxs(Qr,{children:[f.jsx(Jr,{children:g?"Delete project?":"Unregister project?"}),f.jsxs(ei,{children:["This removes ",f.jsx("strong",{children:c==null?void 0:c.name})," from SeeFlow."," ",f.jsxs("strong",{children:["All ",_," ",_===1?"flow":"flows"]})," ","under this project will be unregistered."]})]}),c!=null&&c.repoPath?f.jsxs("label",{className:"flex items-start gap-2 rounded-md border border-border px-3 py-2 text-sm",children:[f.jsx("input",{type:"checkbox",checked:g,onChange:S=>k(S.target.checked),disabled:h,"data-testid":"unregister-project-delete-source",className:"mt-0.5 h-4 w-4 cursor-pointer accent-destructive"}),f.jsxs("span",{className:"flex-1",children:[f.jsx("span",{className:"font-medium",children:"Also delete files from disk"}),f.jsxs("span",{className:"mt-1 block text-xs text-muted-foreground",children:["Permanently removes"," ",f.jsx("code",{className:"break-all text-xs",children:c.repoPath})," and everything inside it. This cannot be undone."]})]})]}):null,p?f.jsx("div",{role:"alert","data-testid":"unregister-project-error",className:"rounded-md border border-destructive/30 bg-destructive/10 px-3 py-2 text-sm text-destructive",children:p}):null,f.jsxs(ar,{children:[f.jsx(rt,{type:"button",variant:"ghost",onClick:b,disabled:h,children:"Cancel"}),f.jsx(rt,{type:"button",variant:"destructive",onClick:C,disabled:h,"data-testid":"unregister-project-confirm",children:h?g?"Deleting…":"Unregistering…":g?"Delete project":"Unregister"})]})]})})]})}const Pie="seeflow:theme",oX="(prefers-color-scheme: dark)";function git(e){return e==="light"||e==="dark"||e==="system"}function kit(e){try{const t=e.getItem(Pie);return git(t)?t:"system"}catch{return"system"}}function vit(e){try{const t=new URLSearchParams(e);if(!t.has("theme"))return null;const n=t.get("theme");return n==="light"||n==="dark"?n:"light"}catch{return null}}function xit(e,t){try{e.setItem(Pie,t)}catch{}}function wit(e,t){return e==="system"?t?"dark":"light":e}function Mit(e,t){t==="dark"?(e.classList.add("dark"),e.classList.remove("light")):(e.classList.add("light"),e.classList.remove("dark"))}function bit(e,t){var o;const n=r=>t(r.matches);return e.addEventListener?(e.addEventListener("change",n),()=>{var r;return(r=e.removeEventListener)==null?void 0:r.call(e,"change",n)}):((o=e.addListener)==null||o.call(e,n),()=>{var r;return(r=e.removeListener)==null?void 0:r.call(e,n)})}function _it(){const[e,t]=m.useState(()=>{if(typeof window>"u")return"system";const a=vit(window.location.search);return a||kit(window.localStorage)}),[n,o]=m.useState(()=>typeof window>"u"?!1:window.matchMedia(oX).matches);m.useEffect(()=>{if(typeof window>"u")return;const a=window.matchMedia(oX);return bit(a,o)},[]);const r=wit(e,n);m.useEffect(()=>{typeof document>"u"||Mit(document.documentElement,r)},[r]);const i=m.useCallback(a=>{typeof window<"u"&&xit(window.localStorage,a),t(a)},[]);return{theme:e,setTheme:i,resolvedTheme:r}}const Cit=[{value:"light",label:"Light"},{value:"dark",label:"Dark"},{value:"system",label:"System"}];function Sit({projects:e,currentProjectSlug:t,onProjectCreated:n,onUnregisterProject:o,share:r,onBack:i,previousFlowName:a}){const{theme:s,setTheme:c}=_it(),l=a!==void 0;return f.jsxs("header",{className:"relative flex h-14 shrink-0 items-center justify-between bg-background/85 px-5 backdrop-blur-md shadow-[0_1px_3px_-1px_rgba(15,23,42,0.06),0_2px_8px_-4px_rgba(15,23,42,0.05)] dark:shadow-[0_4px_12px_-6px_rgba(0,0,0,0.6)]",children:[f.jsxs("div",{className:"flex items-center gap-2",children:[l?f.jsxs(i2,{children:[f.jsx(a2,{asChild:!0,children:f.jsx("button",{type:"button",onClick:i,"aria-label":"Back to previous flow","data-testid":"flow-back-button",className:"flex h-8 w-8 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-muted/60 hover:text-foreground",children:f.jsx(Urt,{size:16,strokeWidth:2.25})})}),f.jsxs(iu,{side:"bottom",children:["Back to ",a]})]}):null,f.jsxs("button",{type:"button",onClick:()=>Io(null),className:"-ml-1.5 flex items-center gap-2 rounded-md px-1.5 py-1 text-base font-bold tracking-tight transition-colors hover:bg-muted/60",children:[f.jsx(Yrt,{size:18,strokeWidth:2.25,className:"text-emerald-400"}),"SeeFlow",f.jsxs("span",{className:"ml-1 text-[10px] font-normal tracking-normal text-muted-foreground/70",children:["v","0.1.111"]})]})]}),f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsx(mit,{projects:e,currentProjectSlug:t,onProjectCreated:n,onUnregisterProject:o}),r?f.jsx(aie,{mode:"edit",enableEmbed:!1,onDownloadPdf:r.onDownloadPdf,onDownloadPng:r.onDownloadPng,onExportToCloud:r.onExportToCloud}):null,f.jsxs(Moe,{children:[f.jsx(boe,{asChild:!0,children:f.jsx(rt,{type:"button",variant:"outline",size:"icon","aria-label":"Settings","data-testid":"settings-trigger",children:f.jsx(Krt,{className:"h-4 w-4"})})}),f.jsxs(Fq,{align:"end",sideOffset:6,className:"w-44","data-testid":"settings-menu",children:[f.jsx(_oe,{children:"Theme"}),f.jsx(PKe,{value:s,onValueChange:h=>c(h),children:Cit.map(h=>f.jsx(Coe,{value:h.value,"data-testid":`theme-${h.value}`,children:h.label},h.value))})]})]})]})]})}const Lit=()=>{const[e,t]=m.useState(null),[n,o]=m.useState(null),r=m.useCallback(()=>Nle().then(i=>{t(i),o(null)}).catch(i=>{console.error("[useDemos] failed",i),t([]),o(String(i))}),[]);return m.useEffect(()=>{r()},[r]),{demos:e,error:n,refresh:r}},Nit=()=>{const[e,t]=m.useState(null),[n,o]=m.useState(!0),[r,i]=m.useState(null),a=m.useCallback(()=>(o(!0),Ile().then(c=>{t(c),i(null)}).catch(c=>{console.error("[useProjects] failed",c),t([]),i(String(c))}).finally(()=>o(!1))),[]);m.useEffect(()=>{a()},[a]);const s=m.useCallback(async(c,l)=>{await $le(c,l),await a()},[a]);return{projects:e,loading:n,error:r,refresh:a,unregisterProject:s}},Iit=(e={})=>{const[t,n]=m.useState(!1),{onRegistryReload:o,onHello:r}=e,i=m.useRef(o),a=m.useRef(r);return m.useEffect(()=>{i.current=o,a.current=r},[o,r]),m.useEffect(()=>{const s=new EventSource("/api/registry/events");return s.addEventListener("open",()=>n(!0)),s.addEventListener("error",()=>n(!1)),s.addEventListener("hello",()=>{var c;(c=a.current)==null||c.call(a)}),s.addEventListener("registry:reload",()=>{var c;(c=i.current)==null||c.call(i)}),()=>{s.close()}},[]),{connected:t}},zie="seeflow:last-project",Ait=()=>{if(typeof window>"u")return null;try{return window.localStorage.getItem(zie)}catch{return null}},rX=e=>{if(!(typeof window>"u"))try{window.localStorage.setItem(zie,e)}catch{}},Eit=(e,t)=>{if(e.length===0)return null;if(e.length===1)return e[0]??null;if(t){const n=e.find(o=>o.id===t);if(n)return n}return null},jit=(e,t)=>{const n=e!==null&&t!==null,[o,r]=m.useState(null),[i,a]=m.useState(n),[s,c]=m.useState(null),l=m.useCallback(()=>{!e||!t||(a(!0),Ele(e,t).then(u=>{r(u),c(null)}).catch(u=>{console.error("[useDemoData] failed",u),c(String(u))}).finally(()=>a(!1)))},[e,t]),h=m.useCallback(u=>{r(u),c(null)},[]);return m.useEffect(()=>{if(!e||!t){r(null),a(!1);return}l()},[e,t,l]),{detail:o,loading:i,error:s,refresh:l,applyDetail:h}},$it=5,Pit={"node:running":"running","node:done":"done","node:error":"error"},zit=(e,t)=>{if(t.type==="reset")return{};const n=e[t.nodeId]??[],o=[t.entry,...n].slice(0,$it);return{...e,[t.nodeId]:o}},Rit=e=>{const[t,n]=m.useReducer(zit,{}),o=m.useRef(n);o.current=n,m.useEffect(()=>{o.current({type:"reset"})},[e]);const r=m.useCallback(a=>{const s=Pit[a.type];if(!s)return;const c=typeof a.nodeId=="string"?a.nodeId:null;if(!c)return;const l=typeof a.runId=="string"?a.runId:void 0,h=typeof a.ts=="number"?a.ts:Date.now();o.current({type:"append",nodeId:c,entry:{status:s,ts:h,runId:l}})},[]),i=m.useCallback(()=>{o.current({type:"reset"})},[]);return{events:t,apply:r,reset:i}},Tit=(e,t)=>{var n,o;switch(t.type){case"reset":return{};case"running":return{...e,[t.nodeId]:{status:"running",runId:t.runId,ts:t.ts??Date.now()}};case"done":return{...e,[t.nodeId]:{...e[t.nodeId],status:"done",runId:t.runId??((n=e[t.nodeId])==null?void 0:n.runId),responseStatus:t.responseStatus,body:t.body,ts:t.ts??Date.now()}};case"error":return{...e,[t.nodeId]:{...e[t.nodeId],status:"error",runId:t.runId??((o=e[t.nodeId])==null?void 0:o.runId),error:t.message,ts:t.ts??Date.now()}}}},Dit=e=>{const[t,n]=m.useReducer(Tit,{}),o=m.useRef(n);o.current=n,m.useEffect(()=>{o.current({type:"reset"})},[e]);const r=m.useCallback(a=>{const s=typeof a.nodeId=="string"?a.nodeId:null;if(!s)return;const c=typeof a.runId=="string"?a.runId:void 0;if(a.type==="node:running"){o.current({type:"running",nodeId:s,runId:c,ts:a.ts});return}if(a.type==="node:done"){const l=typeof a.status=="number"?a.status:void 0;o.current({type:"done",nodeId:s,runId:c,responseStatus:l,body:a.body,ts:a.ts});return}if(a.type==="node:error"){const l=typeof a.message=="string"?a.message:void 0;o.current({type:"error",nodeId:s,runId:c,message:l,ts:a.ts})}},[]),i=m.useCallback(()=>{o.current({type:"reset"})},[]);return{runs:t,apply:r,reset:i}},Hit=new Set(["ok","warn","error","pending"]),Oit=(e,t)=>{if(t.type!=="node:status")return e;const n=typeof t.nodeId=="string"?t.nodeId:null;if(!n||typeof t.state!="string"||!Hit.has(t.state))return e;const o=typeof t.summary=="string"?t.summary:void 0,r=typeof t.detail=="string"?t.detail:void 0,i=t.data&&typeof t.data=="object"&&!Array.isArray(t.data)?t.data:void 0,a=typeof t.ts=="number"?t.ts:Date.now();return{...e,[n]:{state:t.state,summary:o,detail:r,data:i,ts:a}}},Fit=(e,t)=>{switch(t.type){case"reset":return{};case"event":return Oit(e,t.event)}},qit=e=>{const[t,n]=m.useReducer(Fit,{}),o=m.useRef(n);o.current=n,m.useEffect(()=>{o.current({type:"reset"})},[e]);const r=m.useCallback(a=>{o.current({type:"event",event:a})},[]),i=m.useCallback(()=>{o.current({type:"reset"})},[]);return{statusByNode:t,apply:r,reset:i}},Vit=(e,t={})=>{const[n,o]=m.useState(!1),{onHello:r,onFlowReload:i,onEvent:a}=t,s=m.useRef(r),c=m.useRef(i),l=m.useRef(a);return m.useEffect(()=>{s.current=r,c.current=i,l.current=a},[r,i,a]),m.useEffect(()=>{if(!e){o(!1);return}const h=`/api/events?flowId=${encodeURIComponent(e)}`,u=new EventSource(h);u.addEventListener("open",()=>o(!0)),u.addEventListener("error",()=>o(!1)),u.addEventListener("hello",()=>{var p;(p=s.current)==null||p.call(s)}),u.addEventListener("flow:reload",p=>{var k,x;const y=iX(p,"flow:reload");(k=l.current)==null||k.call(l,y);const g=Bit(y);g&&((x=c.current)==null||x.call(c,g))});for(const p of["node:running","node:done","node:error","node:status"])u.addEventListener(p,y=>{var g;(g=l.current)==null||g.call(l,iX(y,p))});return()=>{u.close()}},[e]),{connected:n}},iX=(e,t)=>{try{const n=JSON.parse(e.data);return{type:t,ts:Date.now(),...n}}catch{return{type:t,ts:Date.now()}}},Bit=e=>e.valid===!0&&e.flow&&typeof e.flow=="object"?{valid:!0,flow:e.flow}:e.valid===!1&&typeof e.error=="string"?{valid:!1,error:e.error}:null,aX=["File","Edit","View","Tools","Layout","Selection","Help"],Rie="seeflow:command-palette:recent",Tie=5,Die=new Map(JF.map(e=>[e.id,e])),Uit=e=>typeof e=="string"&&Die.has(e),sX=()=>{if(typeof window>"u")return[];try{const e=window.localStorage.getItem(Rie);if(!e)return[];const t=JSON.parse(e);return Array.isArray(t)?t.filter(Uit).slice(0,Tie):[]}catch{return[]}},Wit=e=>{if(!(typeof window>"u"))try{window.localStorage.setItem(Rie,JSON.stringify(e))}catch{}},cX=(e,t)=>e.enabled?e.enabled(t):!0,Git=(e,t)=>t.length===0?!0:`${e.label} ${e.description??""}`.toLowerCase().includes(t);function Kit({open:e,onOpenChange:t,runCommand:n,ctx:o}){const[r,i]=m.useState(""),[a,s]=m.useState(0),[c,l]=m.useState(()=>sX()),h=m.useRef(null),u=m.useRef(null);m.useEffect(()=>{e&&(i(""),s(0),l(sX()))},[e]);const{groups:p,flat:y}=m.useMemo(()=>{const b=r.trim().toLowerCase();if(b.length===0){if(c.length===0)return{groups:[],flat:[]};const P=[];for(const E of c){const z=Die.get(E);z&&P.push({cmd:z,enabled:cX(z,o)})}return{groups:[{category:"Recent",rows:P}],flat:P}}const C=new Map;for(const P of JF){if(!Git(P,b))continue;const A={cmd:P,enabled:cX(P,o)},E=C.get(P.category);E?E.push(A):C.set(P.category,[A])}const S=[...aX.filter(P=>C.has(P)),...Array.from(C.keys()).filter(P=>!aX.includes(P))].map(P=>({category:P,rows:C.get(P)??[]})),N=S.flatMap(P=>P.rows);return{groups:S,flat:N}},[r,o,c]);m.useEffect(()=>{if(y.length===0){s(0);return}s(b=>{var _;let C=b;if(C>=y.length&&(C=0),!((_=y[C])!=null&&_.enabled)){const S=y.findIndex(N=>N.enabled);S!==-1&&(C=S)}return C})},[y]);const g=m.useCallback(b=>{y.length!==0&&s(C=>{var S;let _=C;for(let N=0;N<y.length;N++)if(_=(_+b+y.length)%y.length,(S=y[_])!=null&&S.enabled)return _;return C})},[y]),k=m.useCallback(b=>{l(C=>{const _=[b,...C.filter(S=>S!==b)].slice(0,Tie);return Wit(_),_})},[]),x=m.useCallback(b=>{const C=y[b];!C||!C.enabled||(k(C.cmd.id),n(C.cmd.id),t(!1))},[y,t,k,n]),v=m.useCallback(b=>{if(b.key==="ArrowDown"){b.preventDefault(),g(1);return}if(b.key==="ArrowUp"){b.preventDefault(),g(-1);return}b.key==="Enter"&&(b.preventDefault(),x(a))},[x,a,g]);m.useEffect(()=>{if(!e)return;const b=u.current;if(!b)return;const C=b.querySelector(`[data-command-row-index="${a}"]`);C&&typeof C.scrollIntoView=="function"&&C.scrollIntoView({block:"nearest"})},[a,e]);const w=r.trim().length>0;return f.jsx(_q,{open:e,onOpenChange:t,children:f.jsx(bR,{children:f.jsxs(r2,{className:te("fixed left-0 right-0 top-[20%] z-50 mx-auto w-[480px] max-w-[90vw] border border-border bg-card shadow-lg duration-200","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","sm:rounded-lg"),"data-testid":"command-palette",onOpenAutoFocus:b=>{var C;b.preventDefault(),(C=h.current)==null||C.focus()},children:[f.jsx("div",{className:te("border-b",y.length===0&&!w&&"border-b-0"),children:f.jsx("input",{ref:h,type:"text",value:r,onChange:b=>i(b.target.value),onKeyDown:v,placeholder:"Type a command…","data-testid":"command-palette-input","aria-label":"Search commands",autoComplete:"off",spellCheck:!1,className:"w-full bg-transparent px-4 py-3 text-sm outline-hidden placeholder:text-muted-foreground"})}),f.jsx("div",{ref:u,"data-testid":"command-palette-list","data-empty":y.length===0?"true":"false",className:te("max-h-[50vh] overflow-y-auto",y.length>0?"py-1":"","seeflow-no-scrollbar"),children:y.length===0?w?f.jsxs("div",{"data-testid":"command-palette-empty",className:"px-4 py-6 text-center text-sm text-muted-foreground",children:['No commands match "',r,'"']}):null:(()=>{let b=-1;return p.map(C=>f.jsxs("div",{className:"py-1",children:[f.jsx("div",{className:"px-3 pb-1 pt-2 text-xs font-medium uppercase tracking-wide text-muted-foreground",children:C.category}),C.rows.map(_=>{b+=1;const S=b,N=S===a;return f.jsxs("button",{type:"button","data-testid":`command-palette-row-${_.cmd.id}`,"data-command-row-index":S,"data-highlighted":N?"true":"false","aria-disabled":_.enabled?void 0:!0,disabled:!_.enabled,onMouseEnter:()=>{_.enabled&&s(S)},onClick:()=>x(S),className:te("flex w-full items-center justify-between gap-3 px-3 py-2 text-left text-sm outline-hidden",_.enabled?"cursor-pointer text-foreground hover:bg-muted":"cursor-not-allowed text-muted-foreground/50",N&&_.enabled?"bg-muted":""),children:[f.jsxs("div",{className:"flex min-w-0 flex-col",children:[f.jsx("span",{className:"truncate font-medium",children:_.cmd.label}),_.cmd.description?f.jsx("span",{className:"truncate text-xs text-muted-foreground",children:_.cmd.description}):null]}),_.cmd.shortcut?f.jsx("kbd",{"data-testid":`command-palette-shortcut-${_.cmd.id}`,className:"shrink-0 rounded border bg-muted px-1.5 py-0.5 font-mono text-[11px] text-muted-foreground",children:_.cmd.shortcut}):null]},_.cmd.id)})]},C.category))})()})]})})})}function Xit(e){return e.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")}const Zit=/^[a-z0-9][a-z0-9-]*$/,Yit={"--tw-enter-translate-x":"-50%","--tw-enter-translate-y":"-50%","--tw-exit-translate-x":"-50%","--tw-exit-translate-y":"-50%","--tw-enter-scale":"1","--tw-exit-scale":"1"};function Qit({open:e,onOpenChange:t,onCreate:n,onCreated:o}){const[r,i]=m.useState(""),[a,s]=m.useState(""),[c,l]=m.useState(!1),[h,u]=m.useState(null),[p,y]=m.useState(!1);m.useEffect(()=>{e&&(i(""),s(""),l(!1),u(null),y(!1))},[e]);const g=C=>{i(C),c||s(Xit(C))},k=C=>{s(C),c||l(!0)},x=a.trim(),v=r.trim(),M=x.length>0&&Zit.test(x),w=M&&v.length>0&&!p,b=async C=>{if(C.preventDefault(),!w){!M&&x.length>0&&u("Flow id must match /^[a-z0-9][a-z0-9-]*$/");return}y(!0),u(null);try{const S=await n({id:x,name:v});o==null||o(S),t(!1)}catch(_){u(_ instanceof Error?_.message:String(_)),y(!1)}};return f.jsx(ir,{open:e,onOpenChange:t,children:f.jsxs(Yr,{className:"sm:max-w-md",style:Yit,"data-testid":"flow-create-dialog",onOpenAutoFocus:C=>{C.preventDefault();const _=document.querySelector('[data-testid="flow-create-name-input"]');_==null||_.focus()},children:[f.jsxs(Qr,{children:[f.jsx(Jr,{children:"Create new flow"}),f.jsx(ei,{children:"A new flow folder is scaffolded under flows/<id>/ in your project."})]}),f.jsxs("form",{onSubmit:b,className:"flex flex-col gap-4",children:[f.jsxs("label",{className:"flex flex-col gap-1.5 text-sm",children:[f.jsx("span",{className:"font-medium",children:"Display name"}),f.jsx("input",{type:"text",required:!0,autoComplete:"off",spellCheck:!1,value:r,onChange:C=>g(C.target.value),"data-testid":"flow-create-name-input",className:"rounded-md border bg-background px-3 py-2 text-sm outline-hidden ring-offset-background focus:border-ring focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2"})]}),f.jsxs("label",{className:"flex flex-col gap-1.5 text-sm",children:[f.jsx("span",{className:"font-medium",children:"Flow id"}),f.jsx("input",{type:"text",required:!0,autoComplete:"off",spellCheck:!1,placeholder:"my-retry-flow",value:a,onChange:C=>k(C.target.value),"data-testid":"flow-create-id-input",className:"rounded-md border bg-background px-3 py-2 font-mono text-sm outline-hidden ring-offset-background focus:border-ring focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2"}),f.jsx("span",{className:"text-xs text-muted-foreground",children:"Auto-filled from the display name. Lowercase letters, digits, and dashes; must start with a letter or digit."})]}),h?f.jsx("div",{role:"alert","data-testid":"flow-create-error",className:"rounded-md border border-destructive/30 bg-destructive/10 px-3 py-2 text-sm text-destructive",children:h}):null,f.jsxs(ar,{children:[f.jsx(rt,{type:"button",variant:"ghost",onClick:()=>t(!1),disabled:p,children:"Cancel"}),f.jsx(rt,{type:"submit",disabled:!w,"data-testid":"flow-create-submit",children:p?"Creating…":"Create flow"})]})]})]})})}function Jit({open:e,onOpenChange:t,flow:n,flows:o,onDelete:r,onDeleted:i}){var M;const a=m.useMemo(()=>o.filter(w=>w.flowSlug!==(n==null?void 0:n.flowSlug)),[o,n==null?void 0:n.flowSlug]),s=((M=a[0])==null?void 0:M.flowSlug)??"",[c,l]=m.useState(s),[h,u]=m.useState(null),[p,y]=m.useState(!1);if(m.useEffect(()=>{e&&(l(s),u(null),y(!1))},[e,s]),!n)return f.jsx(ir,{open:!1,onOpenChange:t});const g=n.isDefault,k=c.length>0,x=(!g||k)&&!p,v=async w=>{if(w.preventDefault(),!!x){y(!0),u(null);try{const b=g?{newDefault:c}:void 0;await r(n.flowSlug,b),i==null||i(n.flowSlug,b==null?void 0:b.newDefault),t(!1)}catch(b){u(b instanceof Error?b.message:String(b)),y(!1)}}};return f.jsx(ir,{open:e,onOpenChange:t,children:f.jsxs(Yr,{className:"sm:max-w-md","data-testid":"flow-delete-dialog",children:[f.jsxs(Qr,{children:[f.jsx(Jr,{children:"Delete flow"}),f.jsxs(ei,{children:["This removes flows/",n.flowSlug,"/ from disk and updates seeflow.json. The action cannot be undone."]})]}),f.jsxs("form",{onSubmit:v,className:"flex flex-col gap-4",children:[f.jsxs("p",{className:"text-sm",children:["Delete ",f.jsx("span",{className:"font-medium",children:n.name})," ",f.jsxs("span",{className:"font-mono text-muted-foreground",children:["(",n.flowSlug,")"]}),"?"]}),g?f.jsxs("label",{className:"flex flex-col gap-1.5 text-sm",children:[f.jsx("span",{className:"font-medium",children:"New default flow"}),f.jsx("select",{value:c,onChange:w=>l(w.target.value),"data-testid":"flow-delete-new-default-select",className:"rounded-md border bg-background px-3 py-2 text-sm outline-hidden ring-offset-background focus:border-ring focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",children:a.map(w=>f.jsxs("option",{value:w.flowSlug,children:[w.name," (",w.flowSlug,")"]},w.flowSlug))}),f.jsxs("span",{className:"text-xs text-muted-foreground",children:[n.name," is the project default — pick a replacement before deleting."]})]}):null,h?f.jsx("div",{role:"alert","data-testid":"flow-delete-error",className:"rounded-md border border-destructive/30 bg-destructive/10 px-3 py-2 text-sm text-destructive",children:h}):null,f.jsxs(ar,{children:[f.jsx(rt,{type:"button",variant:"ghost",onClick:()=>t(!1),disabled:p,children:"Cancel"}),f.jsx(rt,{type:"submit",variant:"destructive",disabled:!x,"data-testid":"flow-delete-submit",children:p?"Deleting…":"Delete"})]})]})]})})}function eat({open:e,onOpenChange:t,flow:n,onRename:o,onRenamed:r}){const[i,a]=m.useState(""),[s,c]=m.useState(null),[l,h]=m.useState(!1);if(m.useEffect(()=>{e&&n&&(a(n.name),c(null),h(!1))},[e,n]),!n)return f.jsx(ir,{open:!1,onOpenChange:t});const u=i.trim(),p=u!==n.name,y=u.length>0&&p&&!l,g=async k=>{if(k.preventDefault(),!!y){h(!0),c(null);try{const x={name:u},v=await o(n.flowSlug,x);r==null||r(v,n.flowSlug),t(!1)}catch(x){c(x instanceof Error?x.message:String(x)),h(!1)}}};return f.jsx(ir,{open:e,onOpenChange:t,children:f.jsxs(Yr,{className:"sm:max-w-md","data-testid":"flow-rename-dialog",onOpenAutoFocus:k=>{k.preventDefault();const x=document.querySelector('[data-testid="flow-rename-name-input"]');x==null||x.focus(),x==null||x.select()},children:[f.jsxs(Qr,{children:[f.jsx(Jr,{children:"Rename flow"}),f.jsx(ei,{children:"Update the display name. The flow id is fixed once created."})]}),f.jsxs("form",{onSubmit:g,className:"flex flex-col gap-4",children:[f.jsxs("label",{className:"flex flex-col gap-1.5 text-sm",children:[f.jsx("span",{className:"font-medium",children:"Flow id"}),f.jsx("input",{type:"text",readOnly:!0,disabled:!0,autoComplete:"off",spellCheck:!1,value:n.flowSlug,"data-testid":"flow-rename-id-input",className:"cursor-not-allowed rounded-md border bg-muted px-3 py-2 font-mono text-sm text-muted-foreground"})]}),f.jsxs("label",{className:"flex flex-col gap-1.5 text-sm",children:[f.jsx("span",{className:"font-medium",children:"Display name"}),f.jsx("input",{type:"text",required:!0,autoComplete:"off",spellCheck:!1,value:i,onChange:k=>a(k.target.value),"data-testid":"flow-rename-name-input",className:"rounded-md border bg-background px-3 py-2 text-sm outline-hidden ring-offset-background focus:border-ring focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2"})]}),s?f.jsx("div",{role:"alert","data-testid":"flow-rename-error",className:"rounded-md border border-destructive/30 bg-destructive/10 px-3 py-2 text-sm text-destructive",children:s}):null,f.jsxs(ar,{children:[f.jsx(rt,{type:"button",variant:"ghost",onClick:()=>t(!1),disabled:l,children:"Cancel"}),f.jsx(rt,{type:"submit",disabled:!y,"data-testid":"flow-rename-submit",children:l?"Saving…":"Save"})]})]})]})})}function tat({project:e,activeFlow:t,flows:n,onSelect:o,onCreate:r,onRename:i,onDelete:a}){const[s,c]=m.useState(!1),l=n.find(h=>h.flowSlug===t);return f.jsxs(Qd,{open:s,onOpenChange:c,children:[f.jsx(o2,{asChild:!0,children:f.jsxs(rt,{type:"button",variant:"outline",size:"sm","aria-label":`Switch flow for ${e}`,"aria-expanded":s,className:"gap-2","data-testid":"flow-switcher-trigger",children:[f.jsx("span",{className:"max-w-[180px] truncate text-sm",children:(l==null?void 0:l.name)??t}),f.jsx(bie,{className:"h-3.5 w-3.5 opacity-60"})]})}),f.jsx(Za,{align:"start",sideOffset:6,className:"w-[260px] p-0","data-testid":"flow-switcher-popover",children:f.jsx(Aq,{children:f.jsxs(Eq,{children:[f.jsx(jq,{children:"No flows."}),n.length>0?f.jsx(kz,{heading:"Flows",children:n.map(h=>{const u=h.flowSlug===t;return f.jsxs(vz,{value:`${h.name} ${h.flowSlug}`,"aria-current":u?"true":void 0,"data-testid":`flow-switcher-row-${h.flowSlug}`,"data-active":u?"true":void 0,onSelect:()=>{c(!1),o==null||o(h.flowSlug)},className:te("group flex items-center justify-between gap-2",u&&"bg-accent text-accent-foreground"),children:[f.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[h.icon?f.jsx("span",{"aria-hidden":"true",className:"text-xs opacity-70",children:h.icon}):null,f.jsx("span",{className:"truncate font-medium",children:h.name}),h.isDefault?f.jsx("span",{className:"shrink-0 rounded bg-muted px-1.5 py-0.5 text-[10px] uppercase tracking-wide text-muted-foreground",children:"default"}):null]}),f.jsxs("div",{className:"flex shrink-0 items-center gap-0.5 opacity-0 transition-opacity group-hover:opacity-100 focus-within:opacity-100",children:[f.jsx("button",{type:"button","aria-label":`Rename ${h.name}`,"data-testid":`flow-switcher-rename-${h.flowSlug}`,className:"rounded p-0.5 hover:text-foreground focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring",onClick:p=>{p.stopPropagation(),c(!1),i==null||i(h.flowSlug)},children:f.jsx(Grt,{className:"h-3.5 w-3.5"})}),f.jsx("button",{type:"button","aria-label":`Delete ${h.name}`,"data-testid":`flow-switcher-delete-${h.flowSlug}`,className:"rounded p-0.5 hover:text-destructive focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring",onClick:p=>{p.stopPropagation(),c(!1),a==null||a(h.flowSlug)},children:f.jsx(Sie,{className:"h-3.5 w-3.5"})})]})]},h.flowSlug)})}):null,n.length>0?f.jsx(Jte,{}):null,f.jsx(kz,{children:f.jsxs(vz,{value:"+ new flow","data-testid":"flow-switcher-create",onSelect:()=>{c(!1),r==null||r()},className:"flex items-center gap-2 text-sm",children:[f.jsx(Cie,{className:"h-4 w-4 opacity-70"}),f.jsx("span",{className:"font-medium",children:"New flow"})]})})]})})})]})}const nat={"--tw-enter-translate-x":"-50%","--tw-enter-translate-y":"-50%","--tw-exit-translate-x":"-50%","--tw-exit-translate-y":"-50%","--tw-enter-scale":"1","--tw-exit-scale":"1"},lX=e=>e?`${e.project}/${e.flow}`:null,oat=e=>{const t=e.indexOf("/");return t<1||t===e.length-1?null:{project:e.slice(0,t),flow:e.slice(t+1)}},dX=e=>`linkflow-picker-row-${e.replace(/\//g,"__")}`;function rat({open:e,onOpenChange:t,mode:n,demos:o,currentSlug:r,initialTarget:i,onCommit:a}){const[s,c]=m.useState(""),[l,h]=m.useState(()=>n==="edit"?lX(i):null);m.useEffect(()=>{e&&(c(""),h(n==="edit"?lX(i):null))},[e,n,i]);const u=m.useMemo(()=>{const w=s.trim().toLowerCase();return w.length===0?o.slice():o.filter(b=>(b.slug.split("/")[0]??"").toLowerCase().includes(w)||b.name.toLowerCase().includes(w))},[o,s]),p=m.useMemo(()=>l?u.findIndex(w=>w.slug===l):-1,[u,l]),y=m.useCallback(w=>{if(u.length===0)return;const b=u.length,C=p<0?w===1?0:b-1:(p+w+b)%b,_=u[C];_&&h(_.slug)},[u,p]),g=m.useCallback(()=>{if(p<0||!l)return;const w=oat(l);w&&(a(w),t(!1))},[l,p,a,t]),k=m.useCallback(w=>{w.key==="ArrowDown"?(w.preventDefault(),y(1)):w.key==="ArrowUp"?(w.preventDefault(),y(-1)):w.key==="Enter"?(w.preventDefault(),g()):w.key==="Escape"&&(w.preventDefault(),t(!1))},[y,g,t]),x=n==="edit"?"Change linked flow":"Link to a flow",v=l&&p>=0?dX(l):void 0,M=p>=0;return f.jsx(ir,{open:e,onOpenChange:t,children:f.jsxs(Yr,{className:"sm:max-w-md",style:nat,"data-testid":"linkflow-picker-dialog",onOpenAutoFocus:w=>{w.preventDefault();const b=document.querySelector('[data-testid="linkflow-picker-search"]');b==null||b.focus()},children:[f.jsxs(Qr,{children:[f.jsx(Jr,{"data-testid":"linkflow-picker-title",children:x}),f.jsx(ei,{children:"Pick a flow to navigate to from this node."})]}),f.jsxs("div",{className:"flex flex-col gap-3",children:[f.jsx("input",{type:"text",value:s,onChange:w=>c(w.target.value),onKeyDown:k,placeholder:"Search flows…","data-testid":"linkflow-picker-search","aria-label":"Search flows","aria-activedescendant":v,autoComplete:"off",spellCheck:!1,className:"rounded-md border bg-background px-3 py-2 text-sm outline-hidden ring-offset-background focus:border-ring focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2"}),f.jsx("div",{"aria-label":"Flows","data-testid":"linkflow-picker-list",style:{maxHeight:"304px"},className:"overflow-y-auto rounded-md border seeflow-no-scrollbar",children:u.length===0?f.jsx("div",{"data-testid":"linkflow-picker-empty",className:"px-3 py-6 text-center text-sm text-muted-foreground",children:s.trim().length===0?"No flows registered.":`No flows match "${s}"`}):u.map(w=>{const b=w.slug.split("/")[0]??"",C=w.slug===l,_=w.slug===r;return f.jsxs("button",{type:"button",id:dX(w.slug),"data-testid":`linkflow-picker-row-${w.slug}`,"data-selected":C?"true":"false",onMouseDown:S=>{S.preventDefault()},onClick:()=>h(w.slug),className:te("flex w-full items-center justify-between gap-3 px-3 py-2 text-left text-sm outline-hidden",C?"bg-muted text-foreground":"text-foreground hover:bg-muted/60"),children:[f.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[f.jsx("span",{className:"truncate text-xs text-muted-foreground",children:b}),f.jsx("span",{"aria-hidden":"true",className:"shrink-0 text-muted-foreground/60",children:"·"}),f.jsx("span",{className:"truncate font-medium",children:w.name})]}),_?f.jsx("span",{"data-testid":`linkflow-picker-current-badge-${w.slug}`,className:"shrink-0 rounded bg-muted px-1.5 py-0.5 text-[10px] uppercase tracking-wide text-muted-foreground",children:"Currently viewing"}):null]},w.slug)})})]}),f.jsxs(ar,{children:[f.jsx(rt,{type:"button",variant:"ghost",onClick:()=>t(!1),"data-testid":"linkflow-picker-cancel",children:"Cancel"}),f.jsx(rt,{type:"button",onClick:g,disabled:!M,"data-testid":"linkflow-picker-commit",children:"Link"})]})]})})}const iat=(e,t)=>{if(e.has(t))return e;const n=new Set(e);return n.add(t),n},aat=(e,t)=>{if(t.length===0)return e;let n=!1;const o=new Set(e);for(const r of t)o.has(r)||(o.add(r),n=!0);return n?o:e},sat=(e,t)=>{if(!e.has(t))return e;const n=new Set(e);return n.delete(t),n},cat=(e,t)=>{if(t.length===0)return e;let n=!1;const o=new Set(e);for(const r of t)o.has(r)&&(o.delete(r),n=!0);return n?o:e},lat=(e,t)=>{if(e.size===0)return e;const n=new Set(t.map(i=>i.id));let o=!1;const r=new Set(e);for(const i of r)n.has(i)||(r.delete(i),o=!0);return o?r:e},uX=()=>{const[e,t]=m.useState(()=>new Set),n=m.useCallback(c=>{t(l=>iat(l,c))},[]),o=m.useCallback(c=>{t(l=>aat(l,c))},[]),r=m.useCallback(c=>{t(l=>sat(l,c))},[]),i=m.useCallback(c=>{t(l=>cat(l,c))},[]),a=m.useCallback(c=>{t(l=>lat(l,c))},[]),s=m.useCallback(()=>t(new Set),[]);return{ids:e,mark:n,markMany:o,unmark:r,unmarkMany:i,pruneAgainst:a,reset:s}},ND=(e,t)=>e===t?!0:e==null||t==null||typeof e!=typeof t||typeof e!="object"?!1:JSON.stringify(e)===JSON.stringify(t),dat=(e,t,n)=>({...e,[t]:{...e[t],...n}}),uat=(e,t)=>{if(!(t in e))return e;const n={...e};return delete n[t],n},hX=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),hat=(e,t)=>{const n=Object.entries(e);if(n.length===0)return e;const o=new Map(t.map(a=>[a.id,a]));let r=!1;const i={...e};for(const[a,s]of n){const c=o.get(a);if(!c)continue;const l={},h=l;let u=!1;for(const p of Object.keys(s)){const y=s[p],g=c[p];if(p==="data"&&hX(y)&&hX(g)){const k={};let x=!1;for(const v of Object.keys(y))ND(y[v],g[v])||(k[v]=y[v],x=!0);x&&(h[p]=k,u=!0)}else ND(y,g)||(h[p]=y,u=!0)}u?ND(l,s)||(i[a]=l,r=!0):(delete i[a],r=!0)}return r?i:e},fX=()=>{const[e,t]=m.useState({}),n=m.useCallback((a,s)=>{t(c=>dat(c,a,s))},[]),o=m.useCallback(a=>{t(s=>uat(s,a))},[]),r=m.useCallback(a=>{t(s=>hat(s,a))},[]),i=m.useCallback(()=>t({}),[]);return{overrides:e,setOverride:n,dropOverride:o,pruneAgainst:r,reset:i}};function fat({nodes:e,connectors:t,flowPos:n,nodeIdGen:o,connectorIdGen:r,defaultOffset:i={x:24,y:24}}){const a=new Map;for(const y of e)a.set(y.id,o(y.id));let s=Number.POSITIVE_INFINITY,c=Number.POSITIVE_INFINITY;for(const y of e)y.position.x<s&&(s=y.position.x),y.position.y<c&&(c=y.position.y);Number.isFinite(s)||(s=0),Number.isFinite(c)||(c=0);const l=n?n.x-s:i.x,h=n?n.y-c:i.y,u=e.map(y=>{const g=a.get(y.id);if(g===void 0)throw new Error(`paste id missing for ${y.id}`);return{...y,id:g,position:{x:y.position.x+l,y:y.position.y+h}}}),p=t.map(y=>{const g=r(y.id);return{...y,id:g,source:a.get(y.source)??y.source,target:a.get(y.target)??y.target}});return{newNodes:u,newConnectors:p,idMap:a}}const pat=e=>({type:"image",position:e.position,data:{path:"",alt:e.originalFilename,width:e.dims.width,height:e.dims.height,_uploading:!0}}),yat=e=>({type:"image",data:Hie(e)}),mat=e=>({type:"image",position:e.position,data:{path:"",alt:e.originalFilename,width:e.dims.width,height:e.dims.height,_uploadError:e.message}}),Hie=e=>({...cOe(e.path,e.dims,e.lastUsed),alt:e.originalFilename}),gat=async(e,t)=>{const{nodeId:n,flowId:o,file:r,originalFilename:i,position:a,dims:s,lastUsed:c}=e;t.rememberRetry(n,{file:r,originalFilename:i,position:a,dims:s}),t.setOverride(n,pat({position:a,dims:s,originalFilename:i}));const l=async()=>{let h;try{h=(await t.upload(o,n,r,i)).path}catch(y){const g=y instanceof Error?y.message:String(y);throw t.setOverride(n,mat({position:a,dims:s,originalFilename:i,message:g})),y}t.setOverride(n,yat({path:h,dims:s,originalFilename:i,lastUsed:c}));const u=Hie({path:h,dims:s,originalFilename:i,lastUsed:c}),p={id:n,type:"image",position:a,data:u};await t.createNode(o,p),t.forgetRetry(n)};if(t.history){await t.history.batch("insert-image",l);return}await l()};function kat(e,t){if(!e)return null;const n=`${e.project}/${e.flow}`,o=t.find(r=>r.slug===n);return o?{projectName:e.project,flowName:o.name}:null}const vat="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",xat=248;function xr(e=10){let t="";const n=new Uint8Array(e*2);for(;t.length<e;){crypto.getRandomValues(n);for(let o=0;o<n.length&&t.length<e;o++){const r=n[o];r<xat&&(t+=vat[r%62])}}return t}const wat=new Set(["INPUT","TEXTAREA","SELECT"]),wr=e=>e?wat.has(e.tagName)?!0:e instanceof HTMLElement&&e.isContentEditable:!1,Mat=(e,t,n)=>{const o=e.indexOf(t);if(o<0)return null;const r=e.length,i=[...e];switch(n.op){case"forward":{if(o>=r-1)return null;const a=i[o],s=i[o+1];return a===void 0||s===void 0?null:(i[o]=s,i[o+1]=a,i)}case"backward":{if(o<=0)return null;const a=i[o],s=i[o-1];return a===void 0||s===void 0?null:(i[o]=s,i[o-1]=a,i)}case"toFront":{if(o===r-1)return null;const[a]=i.splice(o,1);return a===void 0?null:(i.push(a),i)}case"toBack":{if(o===0)return null;const[a]=i.splice(o,1);return a===void 0?null:(i.unshift(a),i)}case"toIndex":{const a=Math.min(Math.max(n.index,0),r-1);if(a===o)return null;const[s]=i.splice(o,1);return s===void 0?null:(i.splice(a,0,s),i)}}};function bat({project:e,flow:t,slug:n,demos:o,detail:r,loading:i,runs:a,nodeEvents:s,statusByNode:c,externalReloadSignal:l,onPlayNode:h,refreshFlows:u,canvasRef:p}){var d2,pi;const y=o.find(B=>B.slug===n),{flows:g,createFlow:k,renameFlow:x,deleteFlow:v}=PF(e),[M,w]=m.useState([]),[b,C]=m.useState([]),[_,S]=m.useState(null),N=m.useRef(M),P=m.useRef(b);m.useEffect(()=>{N.current=M},[M]),m.useEffect(()=>{P.current=b},[b]);const A=m.useRef(null),E=fX(),z=fX(),U=uX(),$=uX(),[T,D]=m.useState(null),[O,I]=m.useState(null),[R,L]=m.useState({kind:"select"}),V=m.useRef({kind:"select"});m.useEffect(()=>{V.current=R},[R]);const[H,j]=m.useState(!1),[X,Z]=m.useState(null),J=m.useRef(new Set),re=`${e}/${t}`,oe=!J.current.has(re);m.useEffect(()=>{J.current.add(re)},[re]);const ne=m.useRef(null),le=m.useCallback(B=>{ne.current=B},[]),{reset:ve}=E,{reset:ge}=z,{reset:xe}=U,{reset:Te}=$;m.useEffect(()=>{w([]),C([]),S(null),ve(),ge(),xe(),Te(),D(null),I(null),ci.current=null,Do(!1),Ro.current.clear()},[r==null?void 0:r.id]);const Ye=m.useCallback((B,q)=>{w(B),C(q)},[]),ue=(d2=r==null?void 0:r.flow)==null?void 0:d2.nodes,Ie=(pi=r==null?void 0:r.flow)==null?void 0:pi.connectors,{pruneAgainst:Pt}=E,{pruneAgainst:wt}=z,{pruneAgainst:en}=U,{pruneAgainst:ce}=$;m.useEffect(()=>{if(!(!ue||!T)&&ue.length===T.length){for(let B=0;B<ue.length;B++){const q=ue[B],W=T[B];if(!q||q.id!==W)return}D(null)}},[ue,T]);const Q=(r==null?void 0:r.id)??null,zt=m.useMemo(()=>lOe({baseUrl:"",project:e,flow:t}),[e,t]),yn=m.useRef({nodes:[],connectors:[]});m.useEffect(()=>{yn.current={nodes:ue??[],connectors:Ie??[]}},[ue,Ie]);const{adapter:ae,history:Y}=m.useMemo(()=>kOe(zt,()=>yn.current),[zt,Q]);m.useEffect(()=>{ue&&(Pt(ue),en(ue))},[ue,Pt,en]),m.useEffect(()=>{Ie&&(wt(Ie),ce(Ie))},[Ie,wt,ce]);const he=m.useRef(!1);m.useEffect(()=>{if(!he.current){he.current=!0;return}Y.markExternalChange()},[l,Y]);const[Ae,He]=m.useState(!1),[Ke,Bt]=m.useState(null),[mn,tn]=m.useState(null),{setOverride:ke,dropOverride:Se}=E,qt=m.useRef(E.overrides);m.useEffect(()=>{qt.current=E.overrides},[E.overrides]);const Dn=m.useCallback((B,q)=>{!Q||!ae||(ke(B,{position:q}),I(null),ae.updateNodePosition(B,q).catch(W=>{Se(B),I(W instanceof Error?W.message:String(W)),console.error("updateNodePosition failed",W)}))},[Q,ae,ke,Se]),nn=m.useCallback(B=>{if(!Q||!ae||B.length===0)return;const q=B.map(W=>(ue==null?void 0:ue.find(ee=>ee.id===W.id))?{id:W.id,next:W.position}:null).filter(W=>W!==null);if(q.length!==0){for(const W of q)ke(W.id,{position:W.next});I(null),Y.batch("move-nodes",async()=>{for(const W of q)await ae.updateNodePosition(W.id,W.next)}).catch(W=>{for(const G of q)Se(G.id);I(W instanceof Error?W.message:String(W)),console.error("updateNodePosition batch failed",W)})}},[Q,ae,Y,ue,ke,Se]),l2=m.useCallback((B,q)=>{ke(B,{position:{x:q.x,y:q.y},data:{width:q.width,height:q.height}})},[ke]),vo=m.useCallback((B,q)=>{if(!Q||!ae)return;const W={width:q.width,height:q.height,position:{x:q.x,y:q.y}};ke(B,{position:W.position,data:{width:W.width,height:W.height}}),I(null),ae.updateNode(B,W).catch(G=>{Se(B),I(G instanceof Error?G.message:String(G)),console.error("updateNode resize failed",G)})},[Q,ae,ke,Se]),Yn=m.useCallback(B=>{if(!Q||!ae)return;const q={autoSize:!0};ke(B,{data:{autoSize:!0,width:void 0,height:void 0}}),I(null),ae.updateNode(B,q).catch(W=>{Se(B),I(W instanceof Error?W.message:String(W)),console.error("updateNode (fit-to-content) failed",W)})},[Q,ae,ke,Se]),Vi=m.useCallback(B=>{if(!Q||!ae||B.length===0)return;const q=[];for(const G of B){if(!(ue==null?void 0:ue.find(lt=>lt.id===G.id)))continue;const $e={position:G.position};G.width!==void 0&&($e.width=G.width),G.height!==void 0&&($e.height=G.height),q.push({id:G.id,next:$e})}if(q.length===0)return;for(const G of q){const ee={};G.next.width!==void 0&&(ee.width=G.next.width),G.next.height!==void 0&&(ee.height=G.next.height),ke(G.id,{position:G.next.position,...Object.keys(ee).length>0?{data:ee}:{}})}I(null);const W=q.map(G=>G.id).slice().sort().join(",");Y.batch("multi-resize",async()=>{for(const G of q)await ae.updateNode(G.id,G.next)},{coalesceKey:`multi:resize:${W}`}).catch(G=>{for(const ee of q)Se(ee.id);I(G instanceof Error?G.message:String(G)),console.error("updateNode multi-resize batch failed",G)})},[Q,ae,Y,ue,ke,Se]),{setOverride:Qe,dropOverride:Xt}=z,su=m.useCallback((B,q)=>{ke(B,{data:q})},[ke]),cu=m.useCallback((B,q)=>{for(const W of B)ke(W,{data:q})},[ke]),lu=m.useCallback((B,q)=>{Qe(B,q)},[Qe]),du=m.useCallback((B,q)=>{!Q||!ae||(lW(ca,q),ke(B,{data:q}),I(null),ae.updateNode(B,q).catch(W=>{Se(B),I(W instanceof Error?W.message:String(W)),console.error("updateNode style failed",W)}))},[Q,ae,ke,Se]),uu=m.useCallback((B,q)=>{if(!Q||!ae||B.length===0)return;lW(ca,q);const W=B.filter(G=>ue==null?void 0:ue.some(ee=>ee.id===G));if(W.length!==0){for(const G of W)ke(G,{data:q});I(null),Y.batch("style-nodes",async()=>{for(const G of W)await ae.updateNode(G,q)}).catch(G=>{for(const ee of W)Se(ee);I(G instanceof Error?G.message:String(G)),console.error("updateNode style-nodes batch failed",G)})}},[Q,ae,Y,ue,ke,Se]),hu=m.useCallback((B,q)=>{!Q||!ae||(oOe(ca,q),Qe(B,q),I(null),ae.updateConnector(B,q).catch(W=>{Xt(B),I(W instanceof Error?W.message:String(W)),console.error("updateConnector failed",W)}))},[Q,ae,Qe,Xt]),{mark:Qa,markMany:Ja,unmark:es,unmarkMany:ts}=U,{markMany:ni,unmarkMany:oi}=$,fu=m.useCallback(B=>{if(!Q||!ae||!(ue==null?void 0:ue.find(ee=>ee.id===B)))return;const W=(Ie??[]).filter(ee=>ee.source===B||ee.target===B).map(ee=>ee.id),G=new Set(W);I(null),Qa(B),W.length>0&&ni(W),w(ee=>ee.filter($e=>$e!==B)),C(ee=>ee.filter($e=>!G.has($e))),ae.deleteNode(B).catch(ee=>{es(B),W.length>0&&oi(W),I(ee instanceof Error?ee.message:String(ee)),console.error("deleteNode failed",ee)})},[Q,ae,ue,Ie,Qa,ni,es,oi]),pu=m.useCallback((B,q)=>{if(!Q||!ae||!ue)return;const W=T??ue.map(ee=>ee.id),G=Mat(W,B,q);G&&(D(G),I(null),ae.reorderNode(B,q).catch(ee=>{D(null),I(ee instanceof Error?ee.message:String(ee)),console.error("reorderNode failed",ee)}))},[Q,ae,ue,T]),zo=m.useCallback((B,q)=>{if(!Q||!ae||B.length===0&&q.length===0)return;const W=new Set(B),G=B.map(je=>ue==null?void 0:ue.find(ln=>ln.id===je)).filter(je=>!!je),ee=(Ie??[]).filter(je=>W.has(je.source)||W.has(je.target)),$e=new Set(ee.map(je=>je.id)),lt=q.map(je=>Ie==null?void 0:Ie.find(ln=>ln.id===je)).filter(je=>!!je).filter(je=>!$e.has(je.id));if(G.length===0&&ee.length===0&&lt.length===0)return;I(null);const Je=G.map(je=>je.id),At=[...ee.map(je=>je.id),...lt.map(je=>je.id)];Je.length>0&&Ja(Je),At.length>0&&ni(At);const Sn=G;w(je=>je.filter(ln=>!W.has(ln)));const yr=new Set(lt.map(je=>je.id));C(je=>je.filter(ln=>!yr.has(ln)&&!$e.has(ln))),Y.batch("delete-selection",async()=>{for(const je of Sn)await ae.deleteNode(je.id);await Promise.all(lt.map(je=>ae.deleteConnector(je.id)))}).catch(je=>{Je.length>0&&ts(Je),At.length>0&&oi(At),I(je instanceof Error?je.message:String(je)),console.error("deleteSelection batch failed",je)})},[Q,ae,Y,ue,Ie,Ja,ni,ts,oi]);m.useEffect(()=>{A.current=zo},[zo]),m.useEffect(()=>{const B=q=>{if(q.key!=="Delete"&&q.key!=="Backspace"||wr(document.activeElement)||document.querySelector('[data-testid="inline-edit-input"]'))return;const W=N.current,G=P.current;W.length===0&&G.length===0||(q.preventDefault(),zo(W,G))};return window.addEventListener("keydown",B),()=>window.removeEventListener("keydown",B)},[zo]);const ns=m.useCallback((B,q)=>{!Q||!ae||(ke(B,{data:{name:q}}),I(null),ae.updateNode(B,{name:q}).catch(W=>{I(W instanceof Error?W.message:String(W)),console.error("updateNode name failed",W)}))},[Q,ae,ke]),Bi=m.useCallback((B,q)=>{!Q||!ae||(ke(B,{data:{description:q}}),I(null),ae.updateNode(B,{description:q}).catch(W=>{I(W instanceof Error?W.message:String(W)),console.error("updateNode description failed",W)}))},[Q,ae,ke]),os=m.useCallback((B,q)=>{!Q||!ae||(ke(B,{data:{detail:q}}),I(null),ae.updateNode(B,{detail:q}).catch(W=>{I(W instanceof Error?W.message:String(W)),console.error("updateNode detail failed",W)}))},[Q,ae,ke]),Re=m.useCallback((B,q)=>{!Q||!ae||(ke(B,{data:{icon:q??void 0}}),I(null),ae.updateNode(B,{icon:q}).catch(W=>{I(W instanceof Error?W.message:String(W)),console.error("updateNode icon failed",W)}))},[Q,ae,ke]),Rt=m.useCallback((B,q)=>{!Q||!ae||(ke(B,{data:{target:q}}),I(null),ae.updateNode(B,{target:q}).catch(W=>{Se(B),I(W instanceof Error?W.message:String(W)),console.error("updateNode target failed",W)}))},[Q,ae,ke,Se]),rs=m.useCallback((B,q,W)=>{if(!Q||!ae)return;I(null);const G=`node-${xr()}`,ee=uW(B,W,O2(ca).node),$e={id:G,type:B,position:q,data:ee};ke(G,{id:G,type:B,position:q,data:ee}),ae.createNode($e).catch(Je=>{Se(G),I(Je instanceof Error?Je.message:String(Je)),console.error("createNode failed",Je)})},[Q,ae,ke,Se]),yu=m.useCallback((B,q)=>{if(!Q||!ae)return;I(null);const W=`node-${xr()}`,G={width:q.width,height:q.height},ee={id:W,type:"linkflow",position:B,data:G},$e={...G,_autoOpenPickerOnMount:!0};ke(W,{id:W,type:"linkflow",position:B,data:$e}),ae.createNode(ee).catch(Je=>{Se(W),I(Je instanceof Error?Je.message:String(Je)),console.error("createNode (linkflow) failed",Je)})},[Q,ae,ke,Se]),dr=m.useCallback((B,q)=>{if(!Q||!ae)return;I(null);const W=`node-${xr()}`,G={icon:B,width:z0.width,height:z0.height},ee={id:W,type:"icon",position:q,data:G};ke(W,{id:W,type:"icon",position:q,data:G}),w([W]),ae.createNode(ee).catch(lt=>{Se(W),I(lt instanceof Error?lt.message:String(lt)),console.error("createNode (icon) failed",lt)})},[Q,ae,ke,Se]),ur=m.useCallback(B=>{if(!Q||!ae)return;I(null);const q=`node-${xr()}`,W={id:q,type:"html",position:B.position,data:{}},G={id:q,type:"html",position:B.position,data:{}};ke(q,G),w([q]),ae.createNode(W).catch(ee=>{Se(q),I(ee instanceof Error?ee.message:String(ee)),console.error("createNode (type:'html') failed",ee)})},[Q,ae,ke,Se]),Ro=m.useRef(new Map),Hn=m.useCallback((B,q)=>{Ro.current.set(B,q)},[]),To=m.useCallback(B=>{Ro.current.delete(B)},[]),on=m.useCallback(B=>{!Q||!ae||(I(null),gat({...B,flowId:Q,lastUsed:O2(ca).node},{upload:async(q,W,G,ee)=>ae.uploadImage(W,await wEe(G),ee),createNode:async(q,W)=>{const{id:G}=await ae.createNode(W);return{id:G}},setOverride:ke,history:Y,rememberRetry:Hn,forgetRetry:To}).catch(q=>{console.error("image-upload-flow failed",q)}))},[Q,ae,Y,ke,Hn,To]),Zt=m.useCallback(B=>{if(!Q||!ae)return;const q=`node-${xr()}`;on({nodeId:q,...B})},[Q,ae,on]),Ui=m.useCallback(B=>{const q=Ro.current.get(B);q&&on({nodeId:B,...q})},[on]),[xo,is]=m.useState({open:!1,mode:"insert"}),ri=m.useCallback((B,q)=>{is({open:!0,mode:B,nodeId:q})},[]),ii=m.useCallback(()=>{is(B=>({...B,open:!1}))},[]),Nt=m.useCallback(()=>{ri("insert")},[ri]),hr=m.useCallback(B=>ri("replace",B),[ri]),Wi=m.useCallback(B=>{if(WHe(B),xo.mode==="replace"&&xo.nodeId){if(Q&&ae){const q=xo.nodeId;ke(q,{data:{icon:B}}),I(null),ae.updateNode(q,{icon:B}).catch(W=>{Se(q),I(W instanceof Error?W.message:String(W)),console.error("updateNode (icon replace) failed",W)})}}else{const q=ne.current;if(q&&Q){const W=BHe(q,{width:window.innerWidth,height:window.innerHeight});dr(B,W)}}ii()},[xo.mode,xo.nodeId,Q,ae,ke,Se,dr,ii]),mu=m.useCallback((B,q)=>{!Q||!ae||(Qe(B,{label:q}),I(null),ae.updateConnector(B,{label:q}).catch(W=>{I(W instanceof Error?W.message:String(W)),console.error("updateConnector label failed",W)}))},[Q,ae,Qe]),ai=m.useCallback((B,q,W)=>{if(!Q||!ae)return;const G=`conn-${xr()}`,ee=W==null?void 0:W.targetPin,$e=O2(ca).connector,lt={id:G,source:B,target:q,sourceHandleAutoPicked:!0,targetHandleAutoPicked:!0,...ee?{targetPin:ee}:{},...$e},Je={id:G,source:B,target:q,sourceHandleAutoPicked:!0,targetHandleAutoPicked:!0,...ee?{targetPin:ee}:{},...$e};Qe(G,lt),I(null),ae.createConnector(Je).catch(At=>{Xt(G),I(At instanceof Error?At.message:String(At)),console.error("createConnector failed",At)})},[Q,ae,Qe,Xt]),si=m.useCallback(({sourceNodeId:B,position:q,shape:W})=>{if(!Q||!ae)return;I(null);const G=`node-${xr()}`,ee=`conn-${xr()}`,$e=yz[W],lt=O2(ca),Je=uW(W,$e,lt.node),At={id:G,type:W,position:q,data:Je},Sn={id:ee,source:B,target:G,sourceHandleAutoPicked:!0,targetHandleAutoPicked:!0,...lt.connector};ke(G,{id:G,type:W,position:q,data:Je}),Qe(ee,Sn),S(G),Y.batch("create-and-connect",async()=>{await ae.createNode(At),await ae.createConnector(Sn)}).catch(je=>{Se(G),Xt(ee),I(je instanceof Error?je.message:String(je)),console.error("createAndConnectFromPane failed",je)})},[Q,ae,Y,ke,Se,Qe,Xt]),ci=m.useRef(null),[Gi,Do]=m.useState(!1),[li,_n]=m.useState(()=>({canUndo:Y.canUndo,canRedo:Y.canRedo}));m.useEffect(()=>Y.subscribe(_n),[Y]);const Cn=m.useCallback(B=>{if(!ue)return;const q=new Set(B),W=ue.filter(ee=>q.has(ee.id));if(W.length===0)return;const G=(Ie??[]).filter(ee=>q.has(ee.source)&&q.has(ee.target));ci.current=JSON.parse(JSON.stringify({nodes:W,connectors:G})),Do(!0)},[ue,Ie]),Qn=m.useCallback(B=>{if(!Q||!ae)return;const q=ci.current;if(!q||q.nodes.length===0)return;const{newNodes:W,newConnectors:G}=fat({nodes:q.nodes,connectors:q.connectors,flowPos:B,nodeIdGen:()=>`node-${xr()}`,connectorIdGen:()=>`conn-${xr()}`});for(const ee of W)ke(ee.id,ee);for(const ee of G)Qe(ee.id,ee);w(W.map(ee=>ee.id)),C(G.map(ee=>ee.id)),I(null),Y.batch("paste",async()=>{for(const ee of W)await ae.createNode({id:ee.id,type:ee.type,position:ee.position,data:ee.data});for(const ee of G)await ae.createConnector(ee)}).catch(ee=>{for(const $e of W)Se($e.id);for(const $e of G)Xt($e.id);I(ee instanceof Error?ee.message:String(ee)),console.error("paste failed",ee)})},[Q,ae,Y,ke,Se,Qe,Xt]);m.useEffect(()=>{const B=q=>{const W=eOe({event:q,isEditableActive:wr(document.activeElement),hasNodes:!!ue&&ue.length>0,hasConnectors:!!Ie&&Ie.length>0,selectedIds:N.current,hasClipboard:!!ci.current});if(W.type!=="noop"&&!(W.type==="copy"||W.type==="paste")){if(q.preventDefault(),W.type==="selectAll"){w((ue??[]).map(G=>G.id)),C((Ie??[]).map(G=>G.id));return}Cn([...W.ids]),Qn(null)}};return window.addEventListener("keydown",B),()=>window.removeEventListener("keydown",B)},[ue,Ie,Cn,Qn]),m.useEffect(()=>{const B=q=>{const W=YHe(q);if(!W||wr(document.activeElement))return;const G=N.current;if(G.length===0)return;const ee=E.overrides,$e=(ue??[]).map(Je=>{var Sn;const At=((Sn=ee[Je.id])==null?void 0:Sn.position)??Je.position;return{id:Je.id,position:At}}),lt=JHe(W,G,$e);if(lt.length!==0)if(q.preventDefault(),lt.length===1){const Je=lt[0];Je&&Dn(Je.id,Je.position)}else nn(lt)};return window.addEventListener("keydown",B),()=>window.removeEventListener("keydown",B)},[ue,E.overrides,Dn,nn]),m.useEffect(()=>{const B=q=>{const W=QHe(q);if(!W||wr(document.activeElement))return;q.preventDefault();const G=ne.current;G&&(W==="fit"?G.fitView({padding:.2,duration:200}):W==="in"?G.zoomIn({duration:150}):G.zoomOut({duration:150}))};return window.addEventListener("keydown",B),()=>window.removeEventListener("keydown",B)},[]);const wo=m.useCallback(async B=>{if(!Q||!ae||!ue||!ae.computeLayout)return;const q=E.overrides,W=ne.current,G=B==="selection"?new Set(N.current):null,ee=G?ue.filter(Be=>G.has(Be.id)):ue;if(ee.length<2)return;const $e=new Set(ee.map(Be=>Be.id)),lt=(Ie??[]).filter(Be=>$e.has(Be.source)&&$e.has(Be.target)),Je=new Map,At=ee.map(Be=>{var us;const rn=((us=q[Be.id])==null?void 0:us.position)??Be.position;Je.set(Be.id,rn);const Ln=W==null?void 0:W.getInternalNode(Be.id),dn=Ln==null?void 0:Ln.measured,Jn=Be.data,u2=(dn==null?void 0:dn.width)??Jn.width??200,WR=(dn==null?void 0:dn.height)??Jn.height??120;return{id:Be.id,type:Be.type,width:u2,height:WR}}),Sn=lt.map(Be=>({id:Be.id,source:Be.source,target:Be.target})),yr=await ae.computeLayout(At,Sn),je=new Map;for(const[Be,rn]of Object.entries(yr.nodes))je.set(Be,rn.position);let ln=Number.POSITIVE_INFINITY,yi=Number.POSITIVE_INFINITY,vu=Number.POSITIVE_INFINITY,xu=Number.POSITIVE_INFINITY;for(const Be of At){const rn=Je.get(Be.id);if(!rn)continue;rn.x<ln&&(ln=rn.x),rn.y<yi&&(yi=rn.y);const Ln=je.get(Be.id);Ln&&(Ln.x<vu&&(vu=Ln.x),Ln.y<xu&&(xu=Ln.y))}const BR=Number.isFinite(ln)&&Number.isFinite(vu)?ln-vu:0,UR=Number.isFinite(yi)&&Number.isFinite(xu)?yi-xu:0,ds=[];for(const Be of At){const rn=Je.get(Be.id),Ln=je.get(Be.id);if(!rn||!Ln)continue;const dn={x:Ln.x+BR,y:Ln.y+UR},Jn=dn.x-rn.x,u2=dn.y-rn.y;Math.abs(Jn)<1&&Math.abs(u2)<1||ds.push({id:Be.id,prev:rn,next:dn})}if(ds.length!==0){I(null);for(const Be of ds)ke(Be.id,{position:Be.next});Y.batch("tidy",async()=>{for(const Be of ds)await ae.updateNodePosition(Be.id,Be.next)}).catch(Be=>{for(const rn of ds)Se(rn.id);I(Be instanceof Error?Be.message:String(Be)),console.error("Tidy batch failed",Be)})}},[Q,ae,Y,ue,Ie,E.overrides,ke,Se]);m.useEffect(()=>{const B=q=>{if(!(q.metaKey||q.ctrlKey)||!q.shiftKey||q.altKey||q.key.toLowerCase()!=="l"||wr(document.activeElement))return;q.preventDefault();const W=N.current.length>0?"selection":"all";wo(W)};return window.addEventListener("keydown",B),()=>window.removeEventListener("keydown",B)},[wo]);const Ki=m.useCallback(()=>{const B=N.current.length>0?"selection":"all";wo(B)},[wo]);m.useEffect(()=>{const B=q=>{if(wr(document.activeElement)||document.querySelector('[data-testid="inline-edit-input"]'))return;const W=nOe(q);if(W===null)return;const G=V.current;if(W==="select"){G.kind!=="select"&&L({kind:"select"});return}if(W==="hand"){L(G.kind==="hand"?{kind:"select"}:{kind:"hand"});return}if(G.kind==="draw"&&G.shape===W){L({kind:"select"});return}L({kind:"draw",shape:W})};return window.addEventListener("keydown",B),()=>window.removeEventListener("keydown",B)},[]),m.useEffect(()=>{const B=q=>{if(q.key!=="Escape"||wr(document.activeElement)||document.querySelector('[data-testid="inline-edit-input"]'))return;if(V.current.kind!=="select"){L({kind:"select"});return}N.current.length>0&&w([]),P.current.length>0&&C([])};return window.addEventListener("keydown",B),()=>window.removeEventListener("keydown",B)},[]),m.useEffect(()=>{const B=q=>{if(q.key.toLowerCase()!=="f"||q.metaKey||q.ctrlKey||q.shiftKey||q.altKey||wr(document.activeElement)||document.querySelector('[data-testid="inline-edit-input"]'))return;const W=N.current;if(W.length===0)return;const G=ne.current;G&&G.fitView({nodes:W.map(ee=>({id:ee})),padding:.2,duration:200})};return window.addEventListener("keydown",B),()=>window.removeEventListener("keydown",B)},[]),m.useEffect(()=>{const B=q=>{if(q.key!=="1"||q.metaKey||q.ctrlKey||q.shiftKey||q.altKey||wr(document.activeElement)||document.querySelector('[data-testid="inline-edit-input"]'))return;const W=ne.current;if(!W)return;const{x:G,y:ee}=W.getViewport();W.setViewport({x:G,y:ee,zoom:1},{duration:150})};return window.addEventListener("keydown",B),()=>window.removeEventListener("keydown",B)},[]);const Xi=m.useCallback(B=>{var q,W;switch(B){case"tool.select":L({kind:"select"});return;case"tool.hand":L({kind:"hand"});return;case"tool.rectangle":L({kind:"draw",shape:"rectangle"});return;case"tool.ellipse":L({kind:"draw",shape:"ellipse"});return;case"tool.text":L({kind:"draw",shape:"text"});return;case"tool.sticky":L({kind:"draw",shape:"sticky"});return;case"tool.database":L({kind:"draw",shape:"database"});return;case"edit.undo":{if(!Y.canUndo)return;Y.undo().catch(G=>{I(G instanceof Error?G.message:String(G)),console.error("undo failed",G)});return}case"edit.redo":{if(!Y.canRedo)return;Y.redo().catch(G=>{I(G instanceof Error?G.message:String(G)),console.error("redo failed",G)});return}case"edit.copy":{const G=N.current;if(G.length===0)return;Cn([...G]);return}case"edit.paste":Qn(null);return;case"edit.duplicate":{const G=N.current;if(G.length===0)return;Cn([...G]),Qn(null);return}case"edit.delete":{const G=N.current,ee=P.current;if(G.length===0&&ee.length===0)return;zo([...G],[...ee]);return}case"edit.selectAll":w((ue??[]).map(G=>G.id)),C((Ie??[]).map(G=>G.id));return;case"view.fit":{const G=ne.current;if(!G)return;G.fitView({padding:.2,duration:200});return}case"view.zoomIn":{const G=ne.current;if(!G)return;G.zoomIn({duration:150});return}case"view.zoomOut":{const G=ne.current;if(!G)return;G.zoomOut({duration:150});return}case"view.zoom100":{const G=ne.current;if(!G)return;const{x:ee,y:$e}=G.getViewport();G.setViewport({x:ee,y:$e,zoom:1},{duration:150});return}case"view.zoomToSelection":{const G=N.current;if(G.length===0)return;const ee=ne.current;if(!ee)return;ee.fitView({nodes:G.map($e=>({id:$e})),padding:.2,duration:200});return}case"layout.tidy":{const G=N.current.length>0?"selection":"all";wo(G);return}case"selection.deselect":N.current.length>0&&w([]),P.current.length>0&&C([]),V.current.kind!=="select"&&L({kind:"select"});return;case"help.commandPalette":j(!0);return;case"export.pdf":{(q=p.current)==null||q.exportPdf();return}case"export.png":{(W=p.current)==null||W.exportPng();return}}},[Y,Cn,Qn,zo,ue,Ie,wo,p]);m.useEffect(()=>{const B=q=>{(q.metaKey||q.ctrlKey)&&(q.shiftKey||q.altKey||q.key.toLowerCase()==="p"&&(q.preventDefault(),!wr(document.activeElement)&&Xi("help.commandPalette")))};return window.addEventListener("keydown",B),()=>window.removeEventListener("keydown",B)},[Xi]);const di=m.useCallback((B,q)=>{if(!Q||!ae)return;const W={...q.source!==void 0?{source:q.source}:{},...q.target!==void 0?{target:q.target}:{},...q.sourceHandle!==void 0?{sourceHandle:q.sourceHandle===null?void 0:q.sourceHandle}:{},...q.targetHandle!==void 0?{targetHandle:q.targetHandle===null?void 0:q.targetHandle}:{},...q.sourceHandleAutoPicked!==void 0?{sourceHandleAutoPicked:q.sourceHandleAutoPicked}:{},...q.targetHandleAutoPicked!==void 0?{targetHandleAutoPicked:q.targetHandleAutoPicked}:{},...q.sourcePin!==void 0?{sourcePin:q.sourcePin===null?void 0:q.sourcePin}:{},...q.targetPin!==void 0?{targetPin:q.targetPin===null?void 0:q.targetPin}:{}};Qe(B,W),I(null),ae.updateConnector(B,q).catch(G=>{Xt(B),I(G instanceof Error?G.message:String(G)),console.error("updateConnector reconnect failed",G)})},[Q,ae,Qe,Xt]),Zi=m.useCallback((B,q,W)=>{if(!Q||!ae)return;const G=q==="source"?"sourcePin":"targetPin";Qe(B,{[G]:W}),I(null),ae.updateConnector(B,{[G]:W}).catch(ee=>{Xt(B),I(ee instanceof Error?ee.message:String(ee)),console.error("updateConnector pin failed",ee)})},[Q,ae,Qe,Xt]),gu=m.useCallback((B,q)=>{if(!Q||!ae)return;const W=Ie==null?void 0:Ie.find($e=>$e.id===B);if(!(W?q==="source"?W.sourcePin:W.targetPin:void 0))return;const ee=q==="source"?"sourcePin":"targetPin";Qe(B,{[ee]:void 0}),I(null),ae.updateConnector(B,{[ee]:null}).catch($e=>{Xt(B),I($e instanceof Error?$e.message:String($e)),console.error("updateConnector unpin failed",$e)})},[Q,ae,Ie,Qe,Xt]),ut=r==null?void 0:r.flow,as=E.overrides,fr=z.overrides,Mo=U.ids,pr=$.ids,ku=m.useMemo(()=>{if(!ut||M.length===0)return[];const B=new Map(ut.nodes.map(W=>[W.id,W])),q=[];for(const W of M){const G=B.get(W);if(!G)continue;const ee=as[W];if(!ee){q.push(G);continue}const $e=ee.data?{...G.data,...ee.data}:G.data;q.push({...G,...ee,data:$e})}return q},[ut,M,as]),ss=m.useMemo(()=>{if(!ut||b.length===0)return[];const B=new Map(ut.connectors.map(W=>[W.id,W])),q=[];for(const W of b){const G=B.get(W);if(!G)continue;const ee=fr[W];q.push(ee?{...G,...ee}:G)}return q},[ut,b,fr]),ui=m.useMemo(()=>{if(!ut)return null;if(!T)return ut.nodes;const B=new Map(ut.nodes.map(G=>[G.id,G])),q=[],W=new Set;for(const G of T){const ee=B.get(G);ee&&(q.push(ee),W.add(G))}for(const G of ut.nodes)W.has(G.id)||q.push(G);return q},[ut,T]),hi=m.useMemo(()=>{const B=ui??(ut==null?void 0:ut.nodes)??null;return B?Mo.size===0?B:B.filter(q=>!Mo.has(q.id)):null},[ui,ut,Mo]),qR=m.useMemo(()=>{const B=(ut==null?void 0:ut.connectors)??null;return B?pr.size===0&&Mo.size===0?B:B.filter(q=>!pr.has(q.id)&&!Mo.has(q.source)&&!Mo.has(q.target)):null},[ut,pr,Mo]),Wf=m.useCallback((B,q)=>{Z({nodeId:B,mode:q})},[]),VR=m.useMemo(()=>{if(!hi)return null;let B=!1;const q=hi.map(W=>{if(W.type!=="linkflow")return W;B=!0;const G=W.data.target,ee=G?()=>dit({project:G.project,flow:G.flow}):void 0,$e=G?kat(G,o):void 0;return{...W,data:{...W.data,onOpenPicker:Wf.bind(null,W.id),onFollow:ee,_resolvedTarget:$e}}});return B?q:hi},[hi,Wf,o]),fi=(g==null?void 0:g.some(B=>B.flowSlug===t))??!1;if(!y&&!fi&&!(g===null))return f.jsxs("div",{className:"flex h-full w-full flex-col items-center justify-center gap-2 bg-background p-6 text-center",children:[f.jsxs("p",{className:"text-sm font-medium",children:["Unknown demo: ",n]}),f.jsx("p",{className:"text-xs text-muted-foreground",children:"The slug may have been removed. Re-register from the project repo to bring it back."})]});if(!y||i&&!r)return f.jsx("div",{className:"flex h-full w-full items-center justify-center text-sm text-muted-foreground",children:"Loading demo…"});const bo=M[0],ls=bo?c[bo]:void 0;return f.jsxs("div",{className:"relative h-full w-full",children:[r&&!r.valid?f.jsxs("div",{"data-testid":"demo-error-banner",className:"absolute inset-x-0 top-0 z-10 border-b border-rose-500/40 bg-rose-50 px-4 py-2 text-xs text-rose-900 shadow-xs dark:bg-rose-950/40 dark:text-rose-100",children:[f.jsx("span",{className:"font-medium uppercase tracking-wide",children:"Invalid demo: "}),f.jsx("span",{className:"font-mono",children:r.error})]}):null,f.jsx(Qit,{open:Ae,onOpenChange:He,onCreate:k,onCreated:async B=>{await u(),J.current.add(`${e}/${B.flowSlug}`),Io({project:e,flow:B.flowSlug})}}),f.jsx(eat,{open:Ke!==null,onOpenChange:B=>{B||Bt(null)},flow:Ke,onRename:x,onRenamed:async(B,q)=>{await u(),B.flowSlug!==q&&(J.current.add(`${e}/${B.flowSlug}`),Io({project:e,flow:B.flowSlug}))}}),f.jsx(Jit,{open:mn!==null,onOpenChange:B=>{B||tn(null)},flow:mn,flows:g??[],onDelete:v,onDeleted:async(B,q)=>{var G;if(await u(),B!==t)return;const W=q??((G=g==null?void 0:g.find(ee=>ee.isDefault&&ee.flowSlug!==B))==null?void 0:G.flowSlug);W&&Io({project:e,flow:W})}}),ut&&ae?f.jsx(Frt,{ref:p,mode:"edit",adapter:ae,history:Y,topRightSlot:f.jsx(tat,{project:e,activeFlow:t,flows:g??[],onSelect:B=>{B!==t&&Io({project:e,flow:B})},onCreate:()=>He(!0),onRename:B=>{const q=g==null?void 0:g.find(W=>W.flowSlug===B);q&&Bt({flowSlug:q.flowSlug,name:q.name,icon:q.icon})},onDelete:B=>{const q=g==null?void 0:g.find(W=>W.flowSlug===B);q&&tn({flowSlug:q.flowSlug,name:q.name,isDefault:q.isDefault})}}),projectId:e,flowSlug:t,enableEmbed:!1,showShareMenu:!1,nodes:VR??ut.nodes,connectors:qR??ut.connectors,selectedNodeIds:M,selectedConnectorIds:b,onSelectionChange:Ye,runtime:{runs:a,statuses:c,pendingOverrides:{nodes:as,connectors:fr}},onPlayNode:h,onNodePositionChange:Dn,onNodePositionsChange:nn,onNodeResize:l2,onNodeResizeEnd:vo,onHtmlNodeFitToContent:Yn,onComponentNodeFitToContent:Yn,onMultiResize:Vi,onNodeNameChange:ns,onNodeDescriptionChange:Bi,onConnectorLabelChange:mu,onCreateShapeNode:rs,onCreateLinkflowNode:Q?yu:void 0,onCreateImageFromFile:Q?Zt:void 0,onRetryImageUpload:Q?Ui:void 0,onCreateHtmlNode:Q?ur:void 0,iconPickerOpen:xo.open,onOpenIconPicker:Q?Nt:void 0,onCloseIconPicker:Q?ii:void 0,onPickIcon:Q?Wi:void 0,onRequestIconReplace:Q?hr:void 0,onCreateConnector:ai,onReconnectConnector:di,onPinEndpoint:Q?Zi:void 0,onUnpinEndpoint:Q?gu:void 0,onReorderNode:pu,onDeleteNode:fu,onCopyNode:B=>Cn([B]),onPasteAt:Qn,onCopySelection:Q?Cn:void 0,onPasteSelection:Q?()=>Qn(null):void 0,hasClipboard:Gi,selectedNodes:ku,selectedConnectors:ss,onStyleNode:du,onStyleNodePreview:su,onStyleNodes:uu,onStyleNodesPreview:cu,onStyleConnector:hu,onStyleConnectorPreview:lu,onRfInit:le,onTidy:ue?Ki:void 0,onCreateAndConnectFromPane:si,pendingEditNodeId:_,canvasMode:R,onCanvasModeChange:L,statusReport:ls,onNameChange:ns,onDescriptionChange:Bi,onDetailChange:os,onIconChange:Re,autoFitView:oe},`${e}/${t}`):f.jsx("div",{className:"flex h-full w-full items-center justify-center text-sm text-muted-foreground",children:"No demo data yet."}),O?f.jsxs("div",{"data-testid":"edit-error-banner",className:"absolute inset-x-0 bottom-4 z-20 mx-auto w-fit max-w-[80%] rounded-md border border-rose-500/50 bg-rose-50 px-3 py-2 text-xs text-rose-900 shadow-md dark:bg-rose-950/60 dark:text-rose-100",children:[f.jsx("span",{className:"font-medium",children:"Couldn't save change: "}),f.jsx("span",{className:"font-mono",children:O}),f.jsx("button",{type:"button",className:"ml-3 underline underline-offset-2",onClick:()=>I(null),children:"Dismiss"})]}):null,f.jsx(Kit,{open:H,onOpenChange:j,runCommand:Xi,ctx:{hasSelection:M.length>0||b.length>0,canUndo:li.canUndo,canRedo:li.canRedo,hasClipboard:Gi,canExportDemo:!!Q}}),f.jsx(rat,{open:X!==null,onOpenChange:B=>{B||Z(null)},mode:(X==null?void 0:X.mode)??"link",demos:o,currentSlug:n,initialTarget:(X==null?void 0:X.mode)==="edit"?(()=>{const B=ue==null?void 0:ue.find(W=>W.id===X.nodeId);return!B||B.type!=="linkflow"?null:B.data.target??null})():null,onCommit:B=>{X&&Rt(X.nodeId,B)}})]})}const _at=e=>({display:e?"block":"none",height:"100%"});function Cat({stack:e,renderEntry:t}){return f.jsx(f.Fragment,{children:e.map((n,o)=>{const r=o===e.length-1;return f.jsx("div",{"data-flow-stack-entry":n.slug,"data-flow-stack-top":r?"true":"false",style:_at(r),children:t(n,r)},n.slug)})})}function Sat({demos:e,refreshFlows:t,canvasRef:n}){const o=Aie();return f.jsx(Cat,{stack:o,renderEntry:(r,i)=>f.jsx(Lat,{entry:r,demos:e,refreshFlows:t,canvasRef:i?n:void 0})})}function Lat({entry:e,demos:t,refreshFlows:n,canvasRef:o}){const{project:r,flow:i,slug:a}=e,s=t.find(z=>z.slug===a),c=(s==null?void 0:s.id)??null,l=m.useRef(null),h=o??l,{detail:u,loading:p,refresh:y,applyDetail:g}=jit(r,i),[k,x]=m.useState(0),{runs:v,apply:M}=Dit(c),{events:w,apply:b}=Rit(c),{statusByNode:C,apply:_,reset:S}=qit(c),N=m.useCallback(()=>{S(),y(),n()},[y,n,S]),P=m.useCallback(z=>{if(!c||!s)return;const U={id:c,slug:s.slug,filePath:""},$=z.valid?{...U,name:z.flow.name??s.name,flow:z.flow,valid:!0,error:null}:{...U,name:s.name,flow:null,valid:!1,error:z.error};g($),x(T=>T+1)},[c,s,g]),A=m.useCallback(z=>{M(z),b(z),_(z)},[M,b,_]);Vit(c,{onHello:N,onFlowReload:P,onEvent:A});const E=m.useCallback(z=>{Tle(r,i,z).catch(U=>{M({type:"node:error",nodeId:z,message:U instanceof Error?U.message:String(U),ts:Date.now()})})},[r,i,M]);return f.jsx(bat,{project:r,flow:i,slug:a,demos:t,detail:u,loading:p,runs:v,nodeEvents:w,statusByNode:C,externalReloadSignal:k,onPlayNode:E,refreshFlows:n,canvasRef:h})}const pX="npx seeflow register --path .";function Nat(){const[e,t]=m.useState(!1),n=async()=>{try{await navigator.clipboard.writeText(pX),t(!0),setTimeout(()=>t(!1),1200)}catch(o){console.error("[empty-state] copy failed",o)}};return f.jsx("div",{"data-testid":"seeflow-empty-state",className:"flex h-full w-full items-center justify-center bg-background p-6",children:f.jsxs("div",{className:"flex max-w-lg flex-col items-center gap-6 text-center",children:[f.jsx("div",{className:"flex h-12 w-12 items-center justify-center rounded-full bg-muted",children:f.jsx(Zrt,{className:"h-6 w-6 text-muted-foreground"})}),f.jsxs("div",{className:"space-y-2",children:[f.jsx("h1",{className:"text-2xl font-semibold tracking-tight text-foreground",children:"No demos registered yet"}),f.jsxs("p",{className:"text-sm text-muted-foreground",children:["Point SeeFlow at any folder containing a"," ",f.jsx("code",{className:"rounded bg-muted px-1.5 py-0.5 text-xs",children:"flow.json"})," file and it'll appear here."]})]}),f.jsxs("div",{className:"flex w-full items-center gap-2 rounded-md border border-border bg-card px-3 py-2 font-mono text-sm",children:[f.jsx("span",{className:"text-muted-foreground select-none",children:"$"}),f.jsx("code",{className:"flex-1 truncate text-left",children:pX}),f.jsx(rt,{type:"button",variant:"ghost",size:"sm",onClick:n,"aria-label":"Copy register command",children:e?f.jsx(Mie,{className:"h-4 w-4"}):f.jsx(_ie,{className:"h-4 w-4"})})]})]})})}function Iat({demos:e}){return e.length===0?f.jsx(Nat,{}):f.jsx("div",{className:"flex h-full w-full items-start justify-center overflow-y-auto bg-background p-8",children:f.jsxs("div",{"data-testid":"studio-home-picker",className:"flex w-full max-w-2xl flex-col gap-6 pt-8",children:[f.jsxs("div",{className:"space-y-1",children:[f.jsx("h1",{className:"text-2xl font-semibold tracking-tight",children:"Open a demo"}),f.jsxs("p",{className:"text-sm text-muted-foreground",children:[e.length," demos registered — pick one to load its canvas."]})]}),f.jsx("ul",{className:"flex flex-col gap-2",children:e.map(t=>f.jsx("li",{children:f.jsxs("button",{type:"button",onClick:()=>{const n=Iie(t.slug);n&&Io(n)},"data-testid":`studio-home-demo-${t.slug}`,className:"flex w-full flex-col items-start gap-0.5 rounded-lg border border-border bg-card px-4 py-3 text-left transition-colors hover:border-input",style:{boxShadow:"var(--shadow-card)"},children:[f.jsx("span",{className:"text-sm font-medium",children:t.name}),f.jsx("span",{className:"truncate text-xs text-muted-foreground",children:t.repoPath})]})},t.id))})]})})}typeof window<"u"&&hit();function Aat(){var S;const e=tit(),{demos:t,refresh:n}=Lit(),{projects:o,refresh:r,unregisterProject:i}=Nit(),a=Aie(),s=a.at(-1)??null,c=(s==null?void 0:s.project)??null,l=(s==null?void 0:s.slug)??null,h=a.length>1?a.at(-2)??null:null,u=nit(e),p=(u==null?void 0:u.project)??null,{flows:y}=PF(p);Iit({onRegistryReload:()=>{n(),r()}});const g=l?(t??[]).find(N=>N.slug===l):void 0;m.useEffect(()=>{l&&t!==null&&(g||n())},[l,t,g,n]);const k=m.useCallback(N=>{rX(N.id),n(),r(),Io({project:N.slug,flow:"main"})},[n,r]),x=m.useCallback(async(N,P)=>{await i(N,P),await n(),c===N&&Io(null)},[i,n,c]);m.useEffect(()=>{if(e!=="/"||t===null)return;const N=Eit(t,Ait());if(N){const P=Iie(N.slug);P&&Io(P)}},[e,t]),m.useEffect(()=>{g&&rX(g.id)},[g]),m.useEffect(()=>{s&&pit(s.project,s.flow)},[s]),m.useEffect(()=>{if(!p||!y)return;const N=yit(y,$ie(p));N&&Io({project:p,flow:N})},[p,y]);const v=m.useRef(null),[M,w]=m.useState(!1),b=(g==null?void 0:g.id)??null,C=m.useMemo(()=>{if(b)return{onDownloadPdf:()=>{var N;return(N=v.current)==null?void 0:N.exportPdf()},onDownloadPng:()=>{var N;return(N=v.current)==null?void 0:N.exportPng()},onExportToCloud:()=>w(!0)}},[b]);if(t===null)return f.jsx("div",{className:"flex h-full w-full items-center justify-center bg-background text-sm text-muted-foreground",children:"Loading…"});const _=h?((S=t.find(N=>N.slug===h.slug))==null?void 0:S.name)??h.flow:void 0;return f.jsx(g0,{delayDuration:150,children:f.jsxs("div",{className:"flex h-full w-full flex-col bg-background text-foreground",children:[f.jsx(Sit,{projects:o??[],currentProjectSlug:c??void 0,onProjectCreated:k,onUnregisterProject:x,share:C,onBack:_?uit:void 0,previousFlowName:_}),f.jsx("main",{className:"min-h-0 flex-1",children:a.length>0?f.jsx(Sat,{demos:t,refreshFlows:n,canvasRef:v}):f.jsx(Iat,{demos:t})}),b&&c?f.jsx(Qrt,{open:M,onOpenChange:w,project:c,flowName:g==null?void 0:g.name,onCapturePreview:()=>{var N;return((N=v.current)==null?void 0:N.capturePreview())??Promise.resolve(void 0)}}):null]})})}const Oie=document.getElementById("root");if(!Oie)throw new Error("Root element #root not found");ID.createRoot(Oie).render(f.jsx(Er.StrictMode,{children:f.jsx(Aat,{})}));export{Sf as C,QJe as M,Er as R,Z0 as _,Bn as a,GY as b,lK as c,kP as d,HF as e,pQ as f,jXe as g,kf as h,zXe as i,jat as j,Nh as k,$r as l,f as m,gQ as n,fnt as o,Z$e as p,xXe as q,m as r,ao as s,RXe as t,Wq as u,CXe as w,Eat as z};