@tuongaz/seeflow 0.1.101 → 0.1.102
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/web/assets/{architectureDiagram-3BPJPVTR-CHxyYMbj.js → architectureDiagram-3BPJPVTR-Cy5G99GE.js} +1 -1
- package/dist/web/assets/{blockDiagram-GPEHLZMM-BEFRoCwf.js → blockDiagram-GPEHLZMM-B1gN1ugF.js} +1 -1
- package/dist/web/assets/{c4Diagram-AAUBKEIU-Br8d90eB.js → c4Diagram-AAUBKEIU-CYuuPtx8.js} +1 -1
- package/dist/web/assets/channel-VQJmKMDU.js +1 -0
- package/dist/web/assets/{chart-BIsuELng.js → chart-YfoAGRGq.js} +1 -1
- package/dist/web/assets/{chunk-2J33WTMH-kp1HzlkG.js → chunk-2J33WTMH-B4sFED7K.js} +1 -1
- package/dist/web/assets/{chunk-4BX2VUAB-BO5lRpcJ.js → chunk-4BX2VUAB-D2Pr1i6l.js} +1 -1
- package/dist/web/assets/{chunk-55IACEB6-Brh-Cxxv.js → chunk-55IACEB6-B0QJVegf.js} +1 -1
- package/dist/web/assets/{chunk-727SXJPM-Rng9Q1Qi.js → chunk-727SXJPM-Dc2HoDqb.js} +1 -1
- package/dist/web/assets/{chunk-AQP2D5EJ-64NIU-6E.js → chunk-AQP2D5EJ-D30cXxxk.js} +1 -1
- package/dist/web/assets/{chunk-FMBD7UC4-oWQHD8HT.js → chunk-FMBD7UC4-DsgHMGgF.js} +1 -1
- package/dist/web/assets/{chunk-ND2GUHAM-CZuU1Pvz.js → chunk-ND2GUHAM-n6Sr5izJ.js} +1 -1
- package/dist/web/assets/{chunk-QZHKN3VN-Dtxpr6Lp.js → chunk-QZHKN3VN-BA1s2pgD.js} +1 -1
- package/dist/web/assets/classDiagram-4FO5ZUOK-Biiw_jnD.js +1 -0
- package/dist/web/assets/classDiagram-v2-Q7XG4LA2-Biiw_jnD.js +1 -0
- package/dist/web/assets/{code-block-CXyix7T4.js → code-block-CeM4DS5T.js} +1 -1
- package/dist/web/assets/{cose-bilkent-S5V4N54A-Dy3n6Pzg.js → cose-bilkent-S5V4N54A-gJFCrqp6.js} +1 -1
- package/dist/web/assets/{dagre-BM42HDAG--dGIcj7p.js → dagre-BM42HDAG-DJgtzuMT.js} +1 -1
- package/dist/web/assets/{diagram-2AECGRRQ-Dt21gwWu.js → diagram-2AECGRRQ-DfqMYNjs.js} +1 -1
- package/dist/web/assets/{diagram-5GNKFQAL-Dopd3jNv.js → diagram-5GNKFQAL-Bqivakd0.js} +1 -1
- package/dist/web/assets/{diagram-KO2AKTUF-CJEAQsDF.js → diagram-KO2AKTUF-Cm0eKgu4.js} +1 -1
- package/dist/web/assets/{diagram-LMA3HP47-CfKPAvzE.js → diagram-LMA3HP47-DCzPDQwE.js} +1 -1
- package/dist/web/assets/{diagram-OG6HWLK6-C9HTQiVv.js → diagram-OG6HWLK6-L5YX65FQ.js} +1 -1
- package/dist/web/assets/{erDiagram-TEJ5UH35-w6pYFBfQ.js → erDiagram-TEJ5UH35-Ds6LiAGH.js} +1 -1
- package/dist/web/assets/{flowDiagram-I6XJVG4X-Cfb85Fie.js → flowDiagram-I6XJVG4X-D50Ubn70.js} +1 -1
- package/dist/web/assets/{ganttDiagram-6RSMTGT7-Dyps7xvy.js → ganttDiagram-6RSMTGT7-Dkaswtst.js} +1 -1
- package/dist/web/assets/{gitGraphDiagram-PVQCEYII-f4JBeh_-.js → gitGraphDiagram-PVQCEYII-OaI-_pfD.js} +1 -1
- package/dist/web/assets/{iconify-DP0e3Q9S.js → iconify-MlxYu4AY.js} +1 -1
- package/dist/web/assets/{index-DZK24AXs.js → index-B6U4bGj0.js} +6 -6
- package/dist/web/assets/{index.es-DFitEGBR.js → index.es-BNr31JLP.js} +1 -1
- package/dist/web/assets/{infoDiagram-5YYISTIA-DjJb_lcW.js → infoDiagram-5YYISTIA-dIvLrSFw.js} +1 -1
- package/dist/web/assets/{ishikawaDiagram-YF4QCWOH-D-E7Iit6.js → ishikawaDiagram-YF4QCWOH-LveMmZUw.js} +1 -1
- package/dist/web/assets/{journeyDiagram-JHISSGLW-CtwLAgCl.js → journeyDiagram-JHISSGLW-B0NT14UG.js} +1 -1
- package/dist/web/assets/{jspdf.es.min-CP3g_qxA.js → jspdf.es.min-DIDY-jNM.js} +3 -3
- package/dist/web/assets/{kanban-definition-UN3LZRKU-bx6zf7oK.js → kanban-definition-UN3LZRKU-6Ze2WLaL.js} +1 -1
- package/dist/web/assets/{linear-BotE_b7Y.js → linear-lr2_gH5v.js} +1 -1
- package/dist/web/assets/{markdown-Dw6v_KEB.js → markdown-71DgXg9K.js} +1 -1
- package/dist/web/assets/{mermaid.core-DWCabHOC.js → mermaid.core-CSskwtFd.js} +4 -4
- package/dist/web/assets/{mindmap-definition-RKZ34NQL-HStLvyzJ.js → mindmap-definition-RKZ34NQL-55BhA-Da.js} +1 -1
- package/dist/web/assets/{pieDiagram-4H26LBE5-BulJN0Sj.js → pieDiagram-4H26LBE5-CMysRCVC.js} +1 -1
- package/dist/web/assets/{quadrantDiagram-W4KKPZXB-Bb4MvZWK.js → quadrantDiagram-W4KKPZXB-BDfPYcaj.js} +1 -1
- package/dist/web/assets/{requirementDiagram-4Y6WPE33-CQYEBtzI.js → requirementDiagram-4Y6WPE33-CNfdldEP.js} +1 -1
- package/dist/web/assets/{sankeyDiagram-5OEKKPKP-D8YtIq7m.js → sankeyDiagram-5OEKKPKP-C_wMGAZ1.js} +1 -1
- package/dist/web/assets/{sequenceDiagram-3UESZ5HK-KrSL_EE_.js → sequenceDiagram-3UESZ5HK-CbGM_Yv-.js} +1 -1
- package/dist/web/assets/{stateDiagram-AJRCARHV-kYBSHT6F.js → stateDiagram-AJRCARHV-BCSHXjtA.js} +1 -1
- package/dist/web/assets/stateDiagram-v2-BHNVJYJU-Bbabof8W.js +1 -0
- package/dist/web/assets/{time-DmpATWGU.js → time-Dm45mmVJ.js} +1 -1
- package/dist/web/assets/{timeline-definition-PNZ67QCA-BAMgt9mr.js → timeline-definition-PNZ67QCA-Cv6Hh2hS.js} +1 -1
- package/dist/web/assets/{vennDiagram-CIIHVFJN-QVTz6kMx.js → vennDiagram-CIIHVFJN-CNaR42oY.js} +1 -1
- package/dist/web/assets/{wardley-L42UT6IY-CVpJdoa4.js → wardley-L42UT6IY-BDpknWMg.js} +1 -1
- package/dist/web/assets/{wardleyDiagram-YWT4CUSO-DThuC68t.js → wardleyDiagram-YWT4CUSO-BxIDc-nV.js} +1 -1
- package/dist/web/assets/{xychartDiagram-2RQKCTM6-CURdkufb.js → xychartDiagram-2RQKCTM6-8Ir0d3kF.js} +1 -1
- package/dist/web/index.html +1 -1
- package/package.json +1 -1
- package/dist/web/assets/channel-Brt3AMYa.js +0 -1
- package/dist/web/assets/classDiagram-4FO5ZUOK-DzRSPB2q.js +0 -1
- package/dist/web/assets/classDiagram-v2-Q7XG4LA2-DzRSPB2q.js +0 -1
- package/dist/web/assets/stateDiagram-v2-BHNVJYJU-CdRvxYCb.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/chart-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/chart-YfoAGRGq.js","assets/step-CWvwoXpJ.js","assets/band-BEGRCkg7.js","assets/init-BFKUnIhM.js","assets/ordinal-BQ3KlzSu.js","assets/linear-lr2_gH5v.js","assets/defaultLocale-CrowFXzY.js","assets/time-Dm45mmVJ.js","assets/mermaid.core-CSskwtFd.js","assets/purify.es-CLGrRn1w.js"])))=>i.map(i=>d[i]);
|
|
2
2
|
function tie(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 a=Object.getOwnPropertyDescriptor(o,r);a&&Object.defineProperty(e,r,a.get?a:{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 a of r)if(a.type==="childList")for(const i of a.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&o(i)}).observe(document,{childList:!0,subtree:!0});function n(r){const a={};return r.integrity&&(a.integrity=r.integrity),r.referrerPolicy&&(a.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?a.credentials="include":r.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function o(r){if(r.ep)return;r.ep=!0;const a=n(r);fetch(r.href,a)}})();var pP=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function hf(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var YK={exports:{}},Lz={},QK={exports:{}},Xe={};/**
|
|
3
3
|
* @license React
|
|
4
4
|
* react.production.min.js
|
|
@@ -8443,7 +8443,7 @@ Error generating stack: `+a.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 kAe=Object.freeze(Object.defineProperty({__proto__:null,AArrowDown:sy,AArrowDownIcon:sy,AArrowUp:cy,AArrowUpIcon:cy,ALargeSmall:ly,ALargeSmallIcon:ly,Accessibility:dy,AccessibilityIcon:dy,Activity:uy,ActivityIcon:uy,ActivitySquare:Kl,ActivitySquareIcon:Kl,AirVent:hy,AirVentIcon:hy,Airplay:fy,AirplayIcon:fy,AlarmCheck:fs,AlarmCheckIcon:fs,AlarmClock:yy,AlarmClockCheck:fs,AlarmClockCheckIcon:fs,AlarmClockIcon:yy,AlarmClockMinus:ps,AlarmClockMinusIcon:ps,AlarmClockOff:py,AlarmClockOffIcon:py,AlarmClockPlus:ys,AlarmClockPlusIcon:ys,AlarmMinus:ps,AlarmMinusIcon:ps,AlarmPlus:ys,AlarmPlusIcon:ys,AlarmSmoke:my,AlarmSmokeIcon:my,Album:gy,AlbumIcon:gy,AlertCircle:ci,AlertCircleIcon:ci,AlertOctagon:bl,AlertOctagonIcon:bl,AlertTriangle:Er,AlertTriangleIcon:Er,AlignCenter:ui,AlignCenterHorizontal:vy,AlignCenterHorizontalIcon:vy,AlignCenterIcon:ui,AlignCenterVertical:ky,AlignCenterVerticalIcon:ky,AlignEndHorizontal:xy,AlignEndHorizontalIcon:xy,AlignEndVertical:wy,AlignEndVerticalIcon:wy,AlignHorizontalDistributeCenter:My,AlignHorizontalDistributeCenterIcon:My,AlignHorizontalDistributeEnd:by,AlignHorizontalDistributeEndIcon:by,AlignHorizontalDistributeStart:_y,AlignHorizontalDistributeStartIcon:_y,AlignHorizontalJustifyCenter:Cy,AlignHorizontalJustifyCenterIcon:Cy,AlignHorizontalJustifyEnd:Ly,AlignHorizontalJustifyEndIcon:Ly,AlignHorizontalJustifyStart:Sy,AlignHorizontalJustifyStartIcon:Sy,AlignHorizontalSpaceAround:Ny,AlignHorizontalSpaceAroundIcon:Ny,AlignHorizontalSpaceBetween:Iy,AlignHorizontalSpaceBetweenIcon:Iy,AlignJustify:G1,AlignJustifyIcon:G1,AlignLeft:Bo,AlignLeftIcon:Bo,AlignRight:hi,AlignRightIcon:hi,AlignStartHorizontal:Ay,AlignStartHorizontalIcon:Ay,AlignStartVertical:Ey,AlignStartVerticalIcon:Ey,AlignVerticalDistributeCenter:jy,AlignVerticalDistributeCenterIcon:jy,AlignVerticalDistributeEnd:$y,AlignVerticalDistributeEndIcon:$y,AlignVerticalDistributeStart:Py,AlignVerticalDistributeStartIcon:Py,AlignVerticalJustifyCenter:zy,AlignVerticalJustifyCenterIcon:zy,AlignVerticalJustifyEnd:Ry,AlignVerticalJustifyEndIcon:Ry,AlignVerticalJustifyStart:Ty,AlignVerticalJustifyStartIcon:Ty,AlignVerticalSpaceAround:Dy,AlignVerticalSpaceAroundIcon:Dy,AlignVerticalSpaceBetween:Hy,AlignVerticalSpaceBetweenIcon:Hy,Ambulance:Oy,AmbulanceIcon:Oy,Ampersand:Fy,AmpersandIcon:Fy,Ampersands:qy,AmpersandsIcon:qy,Amphora:Vy,AmphoraIcon:Vy,Anchor:By,AnchorIcon:By,Angry:Uy,AngryIcon:Uy,Annoyed:Wy,AnnoyedIcon:Wy,Antenna:Gy,AntennaIcon:Gy,Anvil:Ky,AnvilIcon:Ky,Aperture:Zy,ApertureIcon:Zy,AppWindow:Yy,AppWindowIcon:Yy,AppWindowMac:Xy,AppWindowMacIcon:Xy,Apple:Qy,AppleIcon:Qy,Archive:tm,ArchiveIcon:tm,ArchiveRestore:Jy,ArchiveRestoreIcon:Jy,ArchiveX:em,ArchiveXIcon:em,AreaChart:As,AreaChartIcon:As,Armchair:nm,ArmchairIcon:nm,ArrowBigDown:rm,ArrowBigDownDash:om,ArrowBigDownDashIcon:om,ArrowBigDownIcon:rm,ArrowBigLeft:im,ArrowBigLeftDash:am,ArrowBigLeftDashIcon:am,ArrowBigLeftIcon:im,ArrowBigRight:cm,ArrowBigRightDash:sm,ArrowBigRightDashIcon:sm,ArrowBigRightIcon:cm,ArrowBigUp:dm,ArrowBigUpDash:lm,ArrowBigUpDashIcon:lm,ArrowBigUpIcon:dm,ArrowDown:xm,ArrowDown01:um,ArrowDown01Icon:um,ArrowDown10:hm,ArrowDown10Icon:hm,ArrowDownAZ:ms,ArrowDownAZIcon:ms,ArrowDownAz:ms,ArrowDownAzIcon:ms,ArrowDownCircle:Bs,ArrowDownCircleIcon:Bs,ArrowDownFromLine:fm,ArrowDownFromLineIcon:fm,ArrowDownIcon:xm,ArrowDownLeft:ym,ArrowDownLeftFromCircle:Us,ArrowDownLeftFromCircleIcon:Us,ArrowDownLeftFromSquare:Jl,ArrowDownLeftFromSquareIcon:Jl,ArrowDownLeftIcon:ym,ArrowDownLeftSquare:Zl,ArrowDownLeftSquareIcon:Zl,ArrowDownNarrowWide:pm,ArrowDownNarrowWideIcon:pm,ArrowDownRight:gm,ArrowDownRightFromCircle:Gs,ArrowDownRightFromCircleIcon:Gs,ArrowDownRightFromSquare:e1,ArrowDownRightFromSquareIcon:e1,ArrowDownRightIcon:gm,ArrowDownRightSquare:Xl,ArrowDownRightSquareIcon:Xl,ArrowDownSquare:Yl,ArrowDownSquareIcon:Yl,ArrowDownToDot:mm,ArrowDownToDotIcon:mm,ArrowDownToLine:km,ArrowDownToLineIcon:km,ArrowDownUp:vm,ArrowDownUpIcon:vm,ArrowDownWideNarrow:gs,ArrowDownWideNarrowIcon:gs,ArrowDownZA:ks,ArrowDownZAIcon:ks,ArrowDownZa:ks,ArrowDownZaIcon:ks,ArrowLeft:bm,ArrowLeftCircle:Ws,ArrowLeftCircleIcon:Ws,ArrowLeftFromLine:wm,ArrowLeftFromLineIcon:wm,ArrowLeftIcon:bm,ArrowLeftRight:W2,ArrowLeftRightIcon:W2,ArrowLeftSquare:Ql,ArrowLeftSquareIcon:Ql,ArrowLeftToLine:Mm,ArrowLeftToLineIcon:Mm,ArrowRight:Ju,ArrowRightCircle:Xs,ArrowRightCircleIcon:Xs,ArrowRightFromLine:_m,ArrowRightFromLineIcon:_m,ArrowRightIcon:Ju,ArrowRightLeft:Cm,ArrowRightLeftIcon:Cm,ArrowRightSquare:o1,ArrowRightSquareIcon:o1,ArrowRightToLine:Sm,ArrowRightToLineIcon:Sm,ArrowUp:Rm,ArrowUp01:Lm,ArrowUp01Icon:Lm,ArrowUp10:Nm,ArrowUp10Icon:Nm,ArrowUpAZ:vs,ArrowUpAZIcon:vs,ArrowUpAz:vs,ArrowUpAzIcon:vs,ArrowUpCircle:Ys,ArrowUpCircleIcon:Ys,ArrowUpDown:Im,ArrowUpDownIcon:Im,ArrowUpFromDot:Am,ArrowUpFromDotIcon:Am,ArrowUpFromLine:Em,ArrowUpFromLineIcon:Em,ArrowUpIcon:Rm,ArrowUpLeft:jm,ArrowUpLeftFromCircle:Ks,ArrowUpLeftFromCircleIcon:Ks,ArrowUpLeftFromSquare:t1,ArrowUpLeftFromSquareIcon:t1,ArrowUpLeftIcon:jm,ArrowUpLeftSquare:r1,ArrowUpLeftSquareIcon:r1,ArrowUpNarrowWide:xs,ArrowUpNarrowWideIcon:xs,ArrowUpRight:Pm,ArrowUpRightFromCircle:Zs,ArrowUpRightFromCircleIcon:Zs,ArrowUpRightFromSquare:n1,ArrowUpRightFromSquareIcon:n1,ArrowUpRightIcon:Pm,ArrowUpRightSquare:s1,ArrowUpRightSquareIcon:s1,ArrowUpSquare:a1,ArrowUpSquareIcon:a1,ArrowUpToLine:$m,ArrowUpToLineIcon:$m,ArrowUpWideNarrow:zm,ArrowUpWideNarrowIcon:zm,ArrowUpZA:ws,ArrowUpZAIcon:ws,ArrowUpZa:ws,ArrowUpZaIcon:ws,ArrowsUpFromLine:Tm,ArrowsUpFromLineIcon:Tm,Asterisk:Dm,AsteriskIcon:Dm,AsteriskSquare:i1,AsteriskSquareIcon:i1,AtSign:Hm,AtSignIcon:Hm,Atom:Om,AtomIcon:Om,AudioLines:Fm,AudioLinesIcon:Fm,AudioWaveform:Vm,AudioWaveformIcon:Vm,Award:qm,AwardIcon:qm,Axe:Bm,AxeIcon:Bm,Axis3D:Ms,Axis3DIcon:Ms,Axis3d:Ms,Axis3dIcon:Ms,Baby:Um,BabyIcon:Um,Backpack:Wm,BackpackIcon:Wm,Badge:cg,BadgeAlert:Km,BadgeAlertIcon:Km,BadgeCent:Gm,BadgeCentIcon:Gm,BadgeCheck:bs,BadgeCheckIcon:bs,BadgeDollarSign:Zm,BadgeDollarSignIcon:Zm,BadgeEuro:Ym,BadgeEuroIcon:Ym,BadgeHelp:_s,BadgeHelpIcon:_s,BadgeIcon:cg,BadgeIndianRupee:Xm,BadgeIndianRupeeIcon:Xm,BadgeInfo:Qm,BadgeInfoIcon:Qm,BadgeJapaneseYen:Jm,BadgeJapaneseYenIcon:Jm,BadgeMinus:eg,BadgeMinusIcon:eg,BadgePercent:tg,BadgePercentIcon:tg,BadgePlus:ng,BadgePlusIcon:ng,BadgePoundSterling:og,BadgePoundSterlingIcon:og,BadgeQuestionMark:_s,BadgeQuestionMarkIcon:_s,BadgeRussianRuble:rg,BadgeRussianRubleIcon:rg,BadgeSwissFranc:ag,BadgeSwissFrancIcon:ag,BadgeTurkishLira:ig,BadgeTurkishLiraIcon:ig,BadgeX:sg,BadgeXIcon:sg,BaggageClaim:lg,BaggageClaimIcon:lg,Balloon:dg,BalloonIcon:dg,Ban:G2,BanIcon:G2,Banana:ug,BananaIcon:ug,Bandage:hg,BandageIcon:hg,Banknote:mg,BanknoteArrowDown:fg,BanknoteArrowDownIcon:fg,BanknoteArrowUp:pg,BanknoteArrowUpIcon:pg,BanknoteIcon:mg,BanknoteX:yg,BanknoteXIcon:yg,BarChart:Ds,BarChart2:Hs,BarChart2Icon:Hs,BarChart3:Rs,BarChart3Icon:Rs,BarChart4:zs,BarChart4Icon:zs,BarChartBig:Ps,BarChartBigIcon:Ps,BarChartHorizontal:js,BarChartHorizontalBig:Es,BarChartHorizontalBigIcon:Es,BarChartHorizontalIcon:js,BarChartIcon:Ds,Barcode:gg,BarcodeIcon:gg,Barrel:kg,BarrelIcon:kg,Baseline:vg,BaselineIcon:vg,Bath:xg,BathIcon:xg,Battery:Lg,BatteryCharging:wg,BatteryChargingIcon:wg,BatteryFull:Mg,BatteryFullIcon:Mg,BatteryIcon:Lg,BatteryLow:bg,BatteryLowIcon:bg,BatteryMedium:_g,BatteryMediumIcon:_g,BatteryPlus:Cg,BatteryPlusIcon:Cg,BatteryWarning:Sg,BatteryWarningIcon:Sg,Beaker:Ng,BeakerIcon:Ng,Bean:Ag,BeanIcon:Ag,BeanOff:Ig,BeanOffIcon:Ig,Bed:$g,BedDouble:Eg,BedDoubleIcon:Eg,BedIcon:$g,BedSingle:jg,BedSingleIcon:jg,Beef:Pg,BeefIcon:Pg,Beer:Rg,BeerIcon:Rg,BeerOff:zg,BeerOffIcon:zg,Bell:Vg,BellDot:Tg,BellDotIcon:Tg,BellElectric:Dg,BellElectricIcon:Dg,BellIcon:Vg,BellMinus:Hg,BellMinusIcon:Hg,BellOff:Og,BellOffIcon:Og,BellPlus:Fg,BellPlusIcon:Fg,BellRing:qg,BellRingIcon:qg,BetweenHorizonalEnd:Cs,BetweenHorizonalEndIcon:Cs,BetweenHorizonalStart:Ss,BetweenHorizonalStartIcon:Ss,BetweenHorizontalEnd:Cs,BetweenHorizontalEndIcon:Cs,BetweenHorizontalStart:Ss,BetweenHorizontalStartIcon:Ss,BetweenVerticalEnd:Bg,BetweenVerticalEndIcon:Bg,BetweenVerticalStart:Ug,BetweenVerticalStartIcon:Ug,BicepsFlexed:Wg,BicepsFlexedIcon:Wg,Bike:Gg,BikeIcon:Gg,Binary:Kg,BinaryIcon:Kg,Binoculars:Zg,BinocularsIcon:Zg,Biohazard:Xg,BiohazardIcon:Xg,Bird:Yg,BirdIcon:Yg,Birdhouse:Qg,BirdhouseIcon:Qg,Bitcoin:Jg,BitcoinIcon:Jg,Blend:ek,BlendIcon:ek,Blinds:tk,BlindsIcon:tk,Blocks:nk,BlocksIcon:nk,Bluetooth:ik,BluetoothConnected:ok,BluetoothConnectedIcon:ok,BluetoothIcon:ik,BluetoothOff:rk,BluetoothOffIcon:rk,BluetoothSearching:ak,BluetoothSearchingIcon:ak,Bold:sk,BoldIcon:sk,Bolt:ck,BoltIcon:ck,Bomb:lk,BombIcon:lk,Bone:dk,BoneIcon:dk,Book:zk,BookA:uk,BookAIcon:uk,BookAlert:hk,BookAlertIcon:hk,BookAudio:fk,BookAudioIcon:fk,BookCheck:pk,BookCheckIcon:pk,BookCopy:yk,BookCopyIcon:yk,BookDashed:Ls,BookDashedIcon:Ls,BookDown:mk,BookDownIcon:mk,BookHeadphones:gk,BookHeadphonesIcon:gk,BookHeart:kk,BookHeartIcon:kk,BookIcon:zk,BookImage:vk,BookImageIcon:vk,BookKey:xk,BookKeyIcon:xk,BookLock:wk,BookLockIcon:wk,BookMarked:Mk,BookMarkedIcon:Mk,BookMinus:bk,BookMinusIcon:bk,BookOpen:Sk,BookOpenCheck:_k,BookOpenCheckIcon:_k,BookOpenIcon:Sk,BookOpenText:Ck,BookOpenTextIcon:Ck,BookPlus:Lk,BookPlusIcon:Lk,BookSearch:Nk,BookSearchIcon:Nk,BookTemplate:Ls,BookTemplateIcon:Ls,BookText:Ik,BookTextIcon:Ik,BookType:Ak,BookTypeIcon:Ak,BookUp:jk,BookUp2:Ek,BookUp2Icon:Ek,BookUpIcon:jk,BookUser:$k,BookUserIcon:$k,BookX:Pk,BookXIcon:Pk,Bookmark:Ok,BookmarkCheck:Rk,BookmarkCheckIcon:Rk,BookmarkIcon:Ok,BookmarkMinus:Tk,BookmarkMinusIcon:Tk,BookmarkPlus:Dk,BookmarkPlusIcon:Dk,BookmarkX:Hk,BookmarkXIcon:Hk,BoomBox:Fk,BoomBoxIcon:Fk,Bot:Vk,BotIcon:Vk,BotMessageSquare:qk,BotMessageSquareIcon:qk,BotOff:Bk,BotOffIcon:Bk,BottleWine:Uk,BottleWineIcon:Uk,BowArrow:Wk,BowArrowIcon:Wk,Box:Gk,BoxIcon:Gk,BoxSelect:k1,BoxSelectIcon:k1,Boxes:Kk,BoxesIcon:Kk,Braces:Ns,BracesIcon:Ns,Brackets:Zk,BracketsIcon:Zk,Brain:Qk,BrainCircuit:Xk,BrainCircuitIcon:Xk,BrainCog:Yk,BrainCogIcon:Yk,BrainIcon:Qk,BrickWall:t4,BrickWallFire:Jk,BrickWallFireIcon:Jk,BrickWallIcon:t4,BrickWallShield:e4,BrickWallShieldIcon:e4,Briefcase:a4,BriefcaseBusiness:n4,BriefcaseBusinessIcon:n4,BriefcaseConveyorBelt:o4,BriefcaseConveyorBeltIcon:o4,BriefcaseIcon:a4,BriefcaseMedical:r4,BriefcaseMedicalIcon:r4,BringToFront:i4,BringToFrontIcon:i4,Brush:l4,BrushCleaning:s4,BrushCleaningIcon:s4,BrushIcon:l4,Bubbles:c4,BubblesIcon:c4,Bug:h4,BugIcon:h4,BugOff:d4,BugOffIcon:d4,BugPlay:u4,BugPlayIcon:u4,Building:f4,Building2:p4,Building2Icon:p4,BuildingIcon:f4,Bus:m4,BusFront:y4,BusFrontIcon:y4,BusIcon:m4,Cable:k4,CableCar:g4,CableCarIcon:g4,CableIcon:k4,Cake:x4,CakeIcon:x4,CakeSlice:v4,CakeSliceIcon:v4,Calculator:w4,CalculatorIcon:w4,Calendar:q4,Calendar1:M4,Calendar1Icon:M4,CalendarArrowDown:b4,CalendarArrowDownIcon:b4,CalendarArrowUp:_4,CalendarArrowUpIcon:_4,CalendarCheck:S4,CalendarCheck2:C4,CalendarCheck2Icon:C4,CalendarCheckIcon:S4,CalendarClock:L4,CalendarClockIcon:L4,CalendarCog:N4,CalendarCogIcon:N4,CalendarDays:I4,CalendarDaysIcon:I4,CalendarFold:A4,CalendarFoldIcon:A4,CalendarHeart:E4,CalendarHeartIcon:E4,CalendarIcon:q4,CalendarMinus:$4,CalendarMinus2:j4,CalendarMinus2Icon:j4,CalendarMinusIcon:$4,CalendarOff:P4,CalendarOffIcon:P4,CalendarPlus:T4,CalendarPlus2:z4,CalendarPlus2Icon:z4,CalendarPlusIcon:T4,CalendarRange:R4,CalendarRangeIcon:R4,CalendarSearch:D4,CalendarSearchIcon:D4,CalendarSync:H4,CalendarSyncIcon:H4,CalendarX:F4,CalendarX2:O4,CalendarX2Icon:O4,CalendarXIcon:F4,Calendars:V4,CalendarsIcon:V4,Camera:U4,CameraIcon:U4,CameraOff:B4,CameraOffIcon:B4,CandlestickChart:$s,CandlestickChartIcon:$s,Candy:K4,CandyCane:W4,CandyCaneIcon:W4,CandyIcon:K4,CandyOff:G4,CandyOffIcon:G4,Cannabis:X4,CannabisIcon:X4,CannabisOff:Z4,CannabisOffIcon:Z4,Captions:Is,CaptionsIcon:Is,CaptionsOff:Y4,CaptionsOffIcon:Y4,Car:e5,CarFront:Q4,CarFrontIcon:Q4,CarIcon:e5,CarTaxiFront:J4,CarTaxiFrontIcon:J4,Caravan:t5,CaravanIcon:t5,CardSim:n5,CardSimIcon:n5,Carrot:o5,CarrotIcon:o5,CaseLower:r5,CaseLowerIcon:r5,CaseSensitive:a5,CaseSensitiveIcon:a5,CaseUpper:i5,CaseUpperIcon:i5,CassetteTape:s5,CassetteTapeIcon:s5,Cast:c5,CastIcon:c5,Castle:l5,CastleIcon:l5,Cat:d5,CatIcon:d5,Cctv:u5,CctvIcon:u5,ChartArea:As,ChartAreaIcon:As,ChartBar:js,ChartBarBig:Es,ChartBarBigIcon:Es,ChartBarDecreasing:h5,ChartBarDecreasingIcon:h5,ChartBarIcon:js,ChartBarIncreasing:f5,ChartBarIncreasingIcon:f5,ChartBarStacked:p5,ChartBarStackedIcon:p5,ChartCandlestick:$s,ChartCandlestickIcon:$s,ChartColumn:Rs,ChartColumnBig:Ps,ChartColumnBigIcon:Ps,ChartColumnDecreasing:y5,ChartColumnDecreasingIcon:y5,ChartColumnIcon:Rs,ChartColumnIncreasing:zs,ChartColumnIncreasingIcon:zs,ChartColumnStacked:m5,ChartColumnStackedIcon:m5,ChartGantt:g5,ChartGanttIcon:g5,ChartLine:Ts,ChartLineIcon:Ts,ChartNetwork:k5,ChartNetworkIcon:k5,ChartNoAxesColumn:Hs,ChartNoAxesColumnDecreasing:v5,ChartNoAxesColumnDecreasingIcon:v5,ChartNoAxesColumnIcon:Hs,ChartNoAxesColumnIncreasing:Ds,ChartNoAxesColumnIncreasingIcon:Ds,ChartNoAxesCombined:x5,ChartNoAxesCombinedIcon:x5,ChartNoAxesGantt:Os,ChartNoAxesGanttIcon:Os,ChartPie:Fs,ChartPieIcon:Fs,ChartScatter:qs,ChartScatterIcon:qs,ChartSpline:w5,ChartSplineIcon:w5,Check:Ni,CheckCheck:M5,CheckCheckIcon:M5,CheckCircle:Qs,CheckCircle2:li,CheckCircle2Icon:li,CheckCircleIcon:Qs,CheckIcon:Ni,CheckLine:b5,CheckLineIcon:b5,CheckSquare:l1,CheckSquare2:d1,CheckSquare2Icon:d1,CheckSquareIcon:l1,ChefHat:_5,ChefHatIcon:_5,Cherry:C5,CherryIcon:C5,ChessBishop:S5,ChessBishopIcon:S5,ChessKing:L5,ChessKingIcon:L5,ChessKnight:N5,ChessKnightIcon:N5,ChessPawn:I5,ChessPawnIcon:I5,ChessQueen:A5,ChessQueenIcon:A5,ChessRook:j5,ChessRookIcon:j5,ChevronDown:E5,ChevronDownCircle:Js,ChevronDownCircleIcon:Js,ChevronDownIcon:E5,ChevronDownSquare:u1,ChevronDownSquareIcon:u1,ChevronFirst:$5,ChevronFirstIcon:$5,ChevronLast:P5,ChevronLastIcon:P5,ChevronLeft:z5,ChevronLeftCircle:ec,ChevronLeftCircleIcon:ec,ChevronLeftIcon:z5,ChevronLeftSquare:h1,ChevronLeftSquareIcon:h1,ChevronRight:R5,ChevronRightCircle:tc,ChevronRightCircleIcon:tc,ChevronRightIcon:R5,ChevronRightSquare:p1,ChevronRightSquareIcon:p1,ChevronUp:T5,ChevronUpCircle:nc,ChevronUpCircleIcon:nc,ChevronUpIcon:T5,ChevronUpSquare:f1,ChevronUpSquareIcon:f1,ChevronsDown:H5,ChevronsDownIcon:H5,ChevronsDownUp:D5,ChevronsDownUpIcon:D5,ChevronsLeft:q5,ChevronsLeftIcon:q5,ChevronsLeftRight:F5,ChevronsLeftRightEllipsis:O5,ChevronsLeftRightEllipsisIcon:O5,ChevronsLeftRightIcon:F5,ChevronsRight:B5,ChevronsRightIcon:B5,ChevronsRightLeft:V5,ChevronsRightLeftIcon:V5,ChevronsUp:W5,ChevronsUpDown:U5,ChevronsUpDownIcon:U5,ChevronsUpIcon:W5,Chrome:Vs,ChromeIcon:Vs,Chromium:Vs,ChromiumIcon:Vs,Church:G5,ChurchIcon:G5,Cigarette:Z5,CigaretteIcon:Z5,CigaretteOff:K5,CigaretteOffIcon:K5,Circle:K2,CircleAlert:ci,CircleAlertIcon:ci,CircleArrowDown:Bs,CircleArrowDownIcon:Bs,CircleArrowLeft:Ws,CircleArrowLeftIcon:Ws,CircleArrowOutDownLeft:Us,CircleArrowOutDownLeftIcon:Us,CircleArrowOutDownRight:Gs,CircleArrowOutDownRightIcon:Gs,CircleArrowOutUpLeft:Ks,CircleArrowOutUpLeftIcon:Ks,CircleArrowOutUpRight:Zs,CircleArrowOutUpRightIcon:Zs,CircleArrowRight:Xs,CircleArrowRightIcon:Xs,CircleArrowUp:Ys,CircleArrowUpIcon:Ys,CircleCheck:li,CircleCheckBig:Qs,CircleCheckBigIcon:Qs,CircleCheckIcon:li,CircleChevronDown:Js,CircleChevronDownIcon:Js,CircleChevronLeft:ec,CircleChevronLeftIcon:ec,CircleChevronRight:tc,CircleChevronRightIcon:tc,CircleChevronUp:nc,CircleChevronUpIcon:nc,CircleDashed:X5,CircleDashedIcon:X5,CircleDivide:oc,CircleDivideIcon:oc,CircleDollarSign:Y5,CircleDollarSignIcon:Y5,CircleDot:J5,CircleDotDashed:Q5,CircleDotDashedIcon:Q5,CircleDotIcon:J5,CircleEllipsis:ev,CircleEllipsisIcon:ev,CircleEqual:tv,CircleEqualIcon:tv,CircleFadingArrowUp:nv,CircleFadingArrowUpIcon:nv,CircleFadingPlus:ov,CircleFadingPlusIcon:ov,CircleGauge:rc,CircleGaugeIcon:rc,CircleHelp:Vo,CircleHelpIcon:Vo,CircleIcon:K2,CircleMinus:ac,CircleMinusIcon:ac,CircleOff:rv,CircleOffIcon:rv,CircleParking:sc,CircleParkingIcon:sc,CircleParkingOff:ic,CircleParkingOffIcon:ic,CirclePause:cc,CirclePauseIcon:cc,CirclePercent:lc,CirclePercentIcon:lc,CirclePile:av,CirclePileIcon:av,CirclePlay:dc,CirclePlayIcon:dc,CirclePlus:uc,CirclePlusIcon:uc,CirclePoundSterling:iv,CirclePoundSterlingIcon:iv,CirclePower:hc,CirclePowerIcon:hc,CircleQuestionMark:Vo,CircleQuestionMarkIcon:Vo,CircleSlash:sv,CircleSlash2:fc,CircleSlash2Icon:fc,CircleSlashIcon:sv,CircleSlashed:fc,CircleSlashedIcon:fc,CircleSmall:cv,CircleSmallIcon:cv,CircleStar:lv,CircleStarIcon:lv,CircleStop:yc,CircleStopIcon:yc,CircleUser:mc,CircleUserIcon:mc,CircleUserRound:pc,CircleUserRoundIcon:pc,CircleX:gc,CircleXIcon:gc,CircuitBoard:dv,CircuitBoardIcon:dv,Citrus:uv,CitrusIcon:uv,Clapperboard:hv,ClapperboardIcon:hv,Clipboard:Mv,ClipboardCheck:fv,ClipboardCheckIcon:fv,ClipboardClock:pv,ClipboardClockIcon:pv,ClipboardCopy:yv,ClipboardCopyIcon:yv,ClipboardEdit:vc,ClipboardEditIcon:vc,ClipboardIcon:Mv,ClipboardList:mv,ClipboardListIcon:mv,ClipboardMinus:gv,ClipboardMinusIcon:gv,ClipboardPaste:kv,ClipboardPasteIcon:kv,ClipboardPen:vc,ClipboardPenIcon:vc,ClipboardPenLine:kc,ClipboardPenLineIcon:kc,ClipboardPlus:vv,ClipboardPlusIcon:vv,ClipboardSignature:kc,ClipboardSignatureIcon:kc,ClipboardType:xv,ClipboardTypeIcon:xv,ClipboardX:wv,ClipboardXIcon:wv,Clock:Fv,Clock1:bv,Clock10:_v,Clock10Icon:_v,Clock11:Cv,Clock11Icon:Cv,Clock12:Sv,Clock12Icon:Sv,Clock1Icon:bv,Clock2:Lv,Clock2Icon:Lv,Clock3:Nv,Clock3Icon:Nv,Clock4:Iv,Clock4Icon:Iv,Clock5:Av,Clock5Icon:Av,Clock6:Ev,Clock6Icon:Ev,Clock7:jv,Clock7Icon:jv,Clock8:$v,Clock8Icon:$v,Clock9:Pv,Clock9Icon:Pv,ClockAlert:zv,ClockAlertIcon:zv,ClockArrowDown:Rv,ClockArrowDownIcon:Rv,ClockArrowUp:Hv,ClockArrowUpIcon:Hv,ClockCheck:Tv,ClockCheckIcon:Tv,ClockFading:Dv,ClockFadingIcon:Dv,ClockIcon:Fv,ClockPlus:Ov,ClockPlusIcon:Ov,ClosedCaption:qv,ClosedCaptionIcon:qv,Cloud:Z2,CloudAlert:Vv,CloudAlertIcon:Vv,CloudBackup:Bv,CloudBackupIcon:Bv,CloudCheck:Uv,CloudCheckIcon:Uv,CloudCog:Wv,CloudCogIcon:Wv,CloudDownload:xc,CloudDownloadIcon:xc,CloudDrizzle:Gv,CloudDrizzleIcon:Gv,CloudFog:Kv,CloudFogIcon:Kv,CloudHail:Zv,CloudHailIcon:Zv,CloudIcon:Z2,CloudLightning:Xv,CloudLightningIcon:Xv,CloudMoon:Qv,CloudMoonIcon:Qv,CloudMoonRain:Yv,CloudMoonRainIcon:Yv,CloudOff:Jv,CloudOffIcon:Jv,CloudRain:t3,CloudRainIcon:t3,CloudRainWind:e3,CloudRainWindIcon:e3,CloudSnow:n3,CloudSnowIcon:n3,CloudSun:r3,CloudSunIcon:r3,CloudSunRain:o3,CloudSunRainIcon:o3,CloudSync:a3,CloudSyncIcon:a3,CloudUpload:wc,CloudUploadIcon:wc,Cloudy:i3,CloudyIcon:i3,Clover:s3,CloverIcon:s3,Club:c3,ClubIcon:c3,Code:l3,Code2:Mc,Code2Icon:Mc,CodeIcon:l3,CodeSquare:y1,CodeSquareIcon:y1,CodeXml:Mc,CodeXmlIcon:Mc,Codepen:d3,CodepenIcon:d3,Codesandbox:u3,CodesandboxIcon:u3,Coffee:h3,CoffeeIcon:h3,Cog:f3,CogIcon:f3,Coins:p3,CoinsIcon:p3,Columns:bc,Columns2:bc,Columns2Icon:bc,Columns3:di,Columns3Cog:wr,Columns3CogIcon:wr,Columns3Icon:di,Columns4:y3,Columns4Icon:y3,ColumnsIcon:bc,ColumnsSettings:wr,ColumnsSettingsIcon:wr,Combine:m3,CombineIcon:m3,Command:g3,CommandIcon:g3,Compass:k3,CompassIcon:k3,Component:v3,ComponentIcon:v3,Computer:x3,ComputerIcon:x3,ConciergeBell:w3,ConciergeBellIcon:w3,Cone:M3,ConeIcon:M3,Construction:b3,ConstructionIcon:b3,Contact:_3,Contact2:_c,Contact2Icon:_c,ContactIcon:_3,ContactRound:_c,ContactRoundIcon:_c,Container:C3,ContainerIcon:C3,Contrast:S3,ContrastIcon:S3,Cookie:L3,CookieIcon:L3,CookingPot:N3,CookingPotIcon:N3,Copy:P3,CopyCheck:I3,CopyCheckIcon:I3,CopyIcon:P3,CopyMinus:A3,CopyMinusIcon:A3,CopyPlus:E3,CopyPlusIcon:E3,CopySlash:j3,CopySlashIcon:j3,CopyX:$3,CopyXIcon:$3,Copyleft:R3,CopyleftIcon:R3,Copyright:z3,CopyrightIcon:z3,CornerDownLeft:T3,CornerDownLeftIcon:T3,CornerDownRight:D3,CornerDownRightIcon:D3,CornerLeftDown:H3,CornerLeftDownIcon:H3,CornerLeftUp:O3,CornerLeftUpIcon:O3,CornerRightDown:q3,CornerRightDownIcon:q3,CornerRightUp:F3,CornerRightUpIcon:F3,CornerUpLeft:B3,CornerUpLeftIcon:B3,CornerUpRight:V3,CornerUpRightIcon:V3,Cpu:U3,CpuIcon:U3,CreativeCommons:W3,CreativeCommonsIcon:W3,CreditCard:G3,CreditCardIcon:G3,Croissant:K3,CroissantIcon:K3,Crop:Z3,CropIcon:Z3,Cross:X3,CrossIcon:X3,Crosshair:Y3,CrosshairIcon:Y3,Crown:Q3,CrownIcon:Q3,Cuboid:J3,CuboidIcon:J3,CupSoda:ex,CupSodaIcon:ex,CurlyBraces:Ns,CurlyBracesIcon:Ns,Currency:tx,CurrencyIcon:tx,Cylinder:nx,CylinderIcon:nx,Dam:ox,DamIcon:ox,Database:X2,DatabaseBackup:rx,DatabaseBackupIcon:rx,DatabaseIcon:X2,DatabaseSearch:ax,DatabaseSearchIcon:ax,DatabaseZap:ix,DatabaseZapIcon:ix,DecimalsArrowLeft:sx,DecimalsArrowLeftIcon:sx,DecimalsArrowRight:cx,DecimalsArrowRightIcon:cx,Delete:lx,DeleteIcon:lx,Dessert:dx,DessertIcon:dx,Diameter:ux,DiameterIcon:ux,Diamond:Y2,DiamondIcon:Y2,DiamondMinus:hx,DiamondMinusIcon:hx,DiamondPercent:Cc,DiamondPercentIcon:Cc,DiamondPlus:fx,DiamondPlusIcon:fx,Dice1:px,Dice1Icon:px,Dice2:mx,Dice2Icon:mx,Dice3:yx,Dice3Icon:yx,Dice4:gx,Dice4Icon:gx,Dice5:kx,Dice5Icon:kx,Dice6:vx,Dice6Icon:vx,Dices:xx,DicesIcon:xx,Diff:wx,DiffIcon:wx,Disc:Cx,Disc2:Mx,Disc2Icon:Mx,Disc3:_x,Disc3Icon:_x,DiscAlbum:bx,DiscAlbumIcon:bx,DiscIcon:Cx,Divide:Sx,DivideCircle:oc,DivideCircleIcon:oc,DivideIcon:Sx,DivideSquare:v1,DivideSquareIcon:v1,Dna:Nx,DnaIcon:Nx,DnaOff:Lx,DnaOffIcon:Lx,Dock:Ix,DockIcon:Ix,Dog:Ax,DogIcon:Ax,DollarSign:Ex,DollarSignIcon:Ex,Donut:jx,DonutIcon:jx,DoorClosed:Px,DoorClosedIcon:Px,DoorClosedLocked:$x,DoorClosedLockedIcon:$x,DoorOpen:zx,DoorOpenIcon:zx,Dot:Rx,DotIcon:Rx,DotSquare:x1,DotSquareIcon:x1,Download:e0,DownloadCloud:xc,DownloadCloudIcon:xc,DownloadIcon:e0,DraftingCompass:Tx,DraftingCompassIcon:Tx,Drama:Dx,DramaIcon:Dx,Dribbble:Hx,DribbbleIcon:Hx,Drill:Ox,DrillIcon:Ox,Drone:Fx,DroneIcon:Fx,Droplet:Vx,DropletIcon:Vx,DropletOff:qx,DropletOffIcon:qx,Droplets:Bx,DropletsIcon:Bx,Drum:Ux,DrumIcon:Ux,Drumstick:Wx,DrumstickIcon:Wx,Dumbbell:Gx,DumbbellIcon:Gx,Ear:Kx,EarIcon:Kx,EarOff:Zx,EarOffIcon:Zx,Earth:Sc,EarthIcon:Sc,EarthLock:Xx,EarthLockIcon:Xx,Eclipse:Yx,EclipseIcon:Yx,Edit:to,Edit2:Rl,Edit2Icon:Rl,Edit3:zl,Edit3Icon:zl,EditIcon:to,Egg:e8,EggFried:Qx,EggFriedIcon:Qx,EggIcon:e8,EggOff:Jx,EggOffIcon:Jx,Ellipsis:Nc,EllipsisIcon:Nc,EllipsisVertical:Lc,EllipsisVerticalIcon:Lc,Equal:o8,EqualApproximately:t8,EqualApproximatelyIcon:t8,EqualIcon:o8,EqualNot:n8,EqualNotIcon:n8,EqualSquare:w1,EqualSquareIcon:w1,Eraser:r8,EraserIcon:r8,EthernetPort:a8,EthernetPortIcon:a8,Euro:i8,EuroIcon:i8,EvCharger:s8,EvChargerIcon:s8,Expand:c8,ExpandIcon:c8,ExternalLink:Q2,ExternalLinkIcon:Q2,Eye:u8,EyeClosed:l8,EyeClosedIcon:l8,EyeIcon:u8,EyeOff:d8,EyeOffIcon:d8,Facebook:h8,FacebookIcon:h8,Factory:f8,FactoryIcon:f8,Fan:y8,FanIcon:y8,FastForward:p8,FastForwardIcon:p8,Feather:m8,FeatherIcon:m8,Fence:g8,FenceIcon:g8,FerrisWheel:k8,FerrisWheelIcon:k8,Figma:v8,FigmaIcon:v8,File:G8,FileArchive:x8,FileArchiveIcon:x8,FileAudio:Mr,FileAudio2:Mr,FileAudio2Icon:Mr,FileAudioIcon:Mr,FileAxis3D:Ic,FileAxis3DIcon:Ic,FileAxis3d:Ic,FileAxis3dIcon:Ic,FileBadge:Ac,FileBadge2:Ac,FileBadge2Icon:Ac,FileBadgeIcon:Ac,FileBarChart:$c,FileBarChart2:Pc,FileBarChart2Icon:Pc,FileBarChartIcon:$c,FileBox:w8,FileBoxIcon:w8,FileBraces:jc,FileBracesCorner:Ec,FileBracesCornerIcon:Ec,FileBracesIcon:jc,FileChartColumn:Pc,FileChartColumnIcon:Pc,FileChartColumnIncreasing:$c,FileChartColumnIncreasingIcon:$c,FileChartLine:zc,FileChartLineIcon:zc,FileChartPie:Rc,FileChartPieIcon:Rc,FileCheck:M8,FileCheck2:Tc,FileCheck2Icon:Tc,FileCheckCorner:Tc,FileCheckCornerIcon:Tc,FileCheckIcon:M8,FileClock:_8,FileClockIcon:_8,FileCode:b8,FileCode2:Dc,FileCode2Icon:Dc,FileCodeCorner:Dc,FileCodeCornerIcon:Dc,FileCodeIcon:b8,FileCog:Hc,FileCog2:Hc,FileCog2Icon:Hc,FileCogIcon:Hc,FileDiff:C8,FileDiffIcon:C8,FileDigit:S8,FileDigitIcon:S8,FileDown:J2,FileDownIcon:J2,FileEdit:Uc,FileEditIcon:Uc,FileExclamationPoint:Oc,FileExclamationPointIcon:Oc,FileHeadphone:Mr,FileHeadphoneIcon:Mr,FileHeart:L8,FileHeartIcon:L8,FileIcon:G8,FileImage:N8,FileImageIcon:N8,FileInput:I8,FileInputIcon:I8,FileJson:jc,FileJson2:Ec,FileJson2Icon:Ec,FileJsonIcon:jc,FileKey:Fc,FileKey2:Fc,FileKey2Icon:Fc,FileKeyIcon:Fc,FileLineChart:zc,FileLineChartIcon:zc,FileLock:qc,FileLock2:qc,FileLock2Icon:qc,FileLockIcon:qc,FileMinus:A8,FileMinus2:Vc,FileMinus2Icon:Vc,FileMinusCorner:Vc,FileMinusCornerIcon:Vc,FileMinusIcon:A8,FileMusic:j8,FileMusicIcon:j8,FileOutput:E8,FileOutputIcon:E8,FilePen:Uc,FilePenIcon:Uc,FilePenLine:Bc,FilePenLineIcon:Bc,FilePieChart:Rc,FilePieChartIcon:Rc,FilePlay:Wc,FilePlayIcon:Wc,FilePlus:$8,FilePlus2:Gc,FilePlus2Icon:Gc,FilePlusCorner:Gc,FilePlusCornerIcon:Gc,FilePlusIcon:$8,FileQuestion:Kc,FileQuestionIcon:Kc,FileQuestionMark:Kc,FileQuestionMarkIcon:Kc,FileScan:P8,FileScanIcon:P8,FileSearch:z8,FileSearch2:Zc,FileSearch2Icon:Zc,FileSearchCorner:Zc,FileSearchCornerIcon:Zc,FileSearchIcon:z8,FileSignal:Xc,FileSignalIcon:Xc,FileSignature:Bc,FileSignatureIcon:Bc,FileSliders:R8,FileSlidersIcon:R8,FileSpreadsheet:T8,FileSpreadsheetIcon:T8,FileStack:D8,FileStackIcon:D8,FileSymlink:H8,FileSymlinkIcon:H8,FileTerminal:O8,FileTerminalIcon:O8,FileText:F8,FileTextIcon:F8,FileType:q8,FileType2:Yc,FileType2Icon:Yc,FileTypeCorner:Yc,FileTypeCornerIcon:Yc,FileTypeIcon:q8,FileUp:V8,FileUpIcon:V8,FileUser:B8,FileUserIcon:B8,FileVideo:Wc,FileVideo2:Qc,FileVideo2Icon:Qc,FileVideoCamera:Qc,FileVideoCameraIcon:Qc,FileVideoIcon:Wc,FileVolume:U8,FileVolume2:Xc,FileVolume2Icon:Xc,FileVolumeIcon:U8,FileWarning:Oc,FileWarningIcon:Oc,FileX:W8,FileX2:Jc,FileX2Icon:Jc,FileXCorner:Jc,FileXCornerIcon:Jc,FileXIcon:W8,Files:K8,FilesIcon:K8,Film:Z8,FilmIcon:Z8,Filter:rl,FilterIcon:rl,FilterX:ol,FilterXIcon:ol,Fingerprint:el,FingerprintIcon:el,FingerprintPattern:el,FingerprintPatternIcon:el,FireExtinguisher:X8,FireExtinguisherIcon:X8,Fish:J8,FishIcon:J8,FishOff:Y8,FishOffIcon:Y8,FishSymbol:Q8,FishSymbolIcon:Q8,FishingHook:e6,FishingHookIcon:e6,Flag:r6,FlagIcon:r6,FlagOff:t6,FlagOffIcon:t6,FlagTriangleLeft:n6,FlagTriangleLeftIcon:n6,FlagTriangleRight:o6,FlagTriangleRightIcon:o6,Flame:i6,FlameIcon:i6,FlameKindling:a6,FlameKindlingIcon:a6,Flashlight:c6,FlashlightIcon:c6,FlashlightOff:s6,FlashlightOffIcon:s6,FlaskConical:u6,FlaskConicalIcon:u6,FlaskConicalOff:l6,FlaskConicalOffIcon:l6,FlaskRound:d6,FlaskRoundIcon:d6,FlipHorizontal:f6,FlipHorizontal2:h6,FlipHorizontal2Icon:h6,FlipHorizontalIcon:f6,FlipVertical:y6,FlipVertical2:p6,FlipVertical2Icon:p6,FlipVerticalIcon:y6,Flower:g6,Flower2:m6,Flower2Icon:m6,FlowerIcon:g6,Focus:k6,FocusIcon:k6,FoldHorizontal:v6,FoldHorizontalIcon:v6,FoldVertical:x6,FoldVerticalIcon:x6,Folder:G6,FolderArchive:w6,FolderArchiveIcon:w6,FolderCheck:M6,FolderCheckIcon:M6,FolderClock:b6,FolderClockIcon:b6,FolderClosed:C6,FolderClosedIcon:C6,FolderCode:_6,FolderCodeIcon:_6,FolderCog:tl,FolderCog2:tl,FolderCog2Icon:tl,FolderCogIcon:tl,FolderDot:S6,FolderDotIcon:S6,FolderDown:L6,FolderDownIcon:L6,FolderEdit:nl,FolderEditIcon:nl,FolderGit:I6,FolderGit2:N6,FolderGit2Icon:N6,FolderGitIcon:I6,FolderHeart:A6,FolderHeartIcon:A6,FolderIcon:G6,FolderInput:E6,FolderInputIcon:E6,FolderKanban:j6,FolderKanbanIcon:j6,FolderKey:$6,FolderKeyIcon:$6,FolderLock:P6,FolderLockIcon:P6,FolderMinus:z6,FolderMinusIcon:z6,FolderOpen:eh,FolderOpenDot:R6,FolderOpenDotIcon:R6,FolderOpenIcon:eh,FolderOutput:T6,FolderOutputIcon:T6,FolderPen:nl,FolderPenIcon:nl,FolderPlus:D6,FolderPlusIcon:D6,FolderRoot:H6,FolderRootIcon:H6,FolderSearch:F6,FolderSearch2:O6,FolderSearch2Icon:O6,FolderSearchIcon:F6,FolderSymlink:q6,FolderSymlinkIcon:q6,FolderSync:V6,FolderSyncIcon:V6,FolderTree:B6,FolderTreeIcon:B6,FolderUp:U6,FolderUpIcon:U6,FolderX:W6,FolderXIcon:W6,Folders:K6,FoldersIcon:K6,Footprints:Z6,FootprintsIcon:Z6,ForkKnife:ld,ForkKnifeCrossed:cd,ForkKnifeCrossedIcon:cd,ForkKnifeIcon:ld,Forklift:Q6,ForkliftIcon:Q6,Form:X6,FormIcon:X6,FormInput:Dl,FormInputIcon:Dl,Forward:Y6,ForwardIcon:Y6,Frame:J6,FrameIcon:J6,Framer:nw,FramerIcon:nw,Frown:ew,FrownIcon:ew,Fuel:tw,FuelIcon:tw,Fullscreen:ow,FullscreenIcon:ow,FunctionSquare:M1,FunctionSquareIcon:M1,Funnel:rl,FunnelIcon:rl,FunnelPlus:rw,FunnelPlusIcon:rw,FunnelX:ol,FunnelXIcon:ol,GalleryHorizontal:iw,GalleryHorizontalEnd:aw,GalleryHorizontalEndIcon:aw,GalleryHorizontalIcon:iw,GalleryThumbnails:sw,GalleryThumbnailsIcon:sw,GalleryVertical:lw,GalleryVerticalEnd:cw,GalleryVerticalEndIcon:cw,GalleryVerticalIcon:lw,Gamepad:fw,Gamepad2:dw,Gamepad2Icon:dw,GamepadDirectional:uw,GamepadDirectionalIcon:uw,GamepadIcon:fw,GanttChart:Os,GanttChartIcon:Os,GanttChartSquare:Sr,GanttChartSquareIcon:Sr,Gauge:hw,GaugeCircle:rc,GaugeCircleIcon:rc,GaugeIcon:hw,Gavel:pw,GavelIcon:pw,Gem:yw,GemIcon:yw,GeorgianLari:mw,GeorgianLariIcon:mw,Ghost:kw,GhostIcon:kw,Gift:gw,GiftIcon:gw,GitBranch:ww,GitBranchIcon:ww,GitBranchMinus:vw,GitBranchMinusIcon:vw,GitBranchPlus:xw,GitBranchPlusIcon:xw,GitCommit:al,GitCommitHorizontal:al,GitCommitHorizontalIcon:al,GitCommitIcon:al,GitCommitVertical:Mw,GitCommitVerticalIcon:Mw,GitCompare:_w,GitCompareArrows:bw,GitCompareArrowsIcon:bw,GitCompareIcon:_w,GitFork:Cw,GitForkIcon:Cw,GitGraph:Sw,GitGraphIcon:Sw,GitMerge:Lw,GitMergeIcon:Lw,GitPullRequest:$w,GitPullRequestArrow:Nw,GitPullRequestArrowIcon:Nw,GitPullRequestClosed:Iw,GitPullRequestClosedIcon:Iw,GitPullRequestCreate:Ew,GitPullRequestCreateArrow:Aw,GitPullRequestCreateArrowIcon:Aw,GitPullRequestCreateIcon:Ew,GitPullRequestDraft:jw,GitPullRequestDraftIcon:jw,GitPullRequestIcon:$w,Github:Pw,GithubIcon:Pw,Gitlab:zw,GitlabIcon:zw,GlassWater:Rw,GlassWaterIcon:Rw,Glasses:Tw,GlassesIcon:Tw,Globe:Ow,Globe2:Sc,Globe2Icon:Sc,GlobeIcon:Ow,GlobeLock:Dw,GlobeLockIcon:Dw,GlobeX:Hw,GlobeXIcon:Hw,Goal:Fw,GoalIcon:Fw,Gpu:qw,GpuIcon:qw,Grab:dl,GrabIcon:dl,GraduationCap:Vw,GraduationCapIcon:Vw,Grape:Bw,GrapeIcon:Bw,Grid:br,Grid2X2:ll,Grid2X2Check:il,Grid2X2CheckIcon:il,Grid2X2Icon:ll,Grid2X2Plus:sl,Grid2X2PlusIcon:sl,Grid2X2X:cl,Grid2X2XIcon:cl,Grid2x2:ll,Grid2x2Check:il,Grid2x2CheckIcon:il,Grid2x2Icon:ll,Grid2x2Plus:sl,Grid2x2PlusIcon:sl,Grid2x2X:cl,Grid2x2XIcon:cl,Grid3X3:br,Grid3X3Icon:br,Grid3x2:Uw,Grid3x2Icon:Uw,Grid3x3:br,Grid3x3Icon:br,GridIcon:br,Grip:Gw,GripHorizontal:Ww,GripHorizontalIcon:Ww,GripIcon:Gw,GripVertical:Kw,GripVerticalIcon:Kw,Group:Zw,GroupIcon:Zw,Guitar:Xw,GuitarIcon:Xw,Ham:Yw,HamIcon:Yw,Hamburger:Qw,HamburgerIcon:Qw,Hammer:Jw,HammerIcon:Jw,Hand:th,HandCoins:e7,HandCoinsIcon:e7,HandFist:t7,HandFistIcon:t7,HandGrab:dl,HandGrabIcon:dl,HandHeart:n7,HandHeartIcon:n7,HandHelping:ul,HandHelpingIcon:ul,HandIcon:th,HandMetal:o7,HandMetalIcon:o7,HandPlatter:r7,HandPlatterIcon:r7,Handbag:a7,HandbagIcon:a7,Handshake:i7,HandshakeIcon:i7,HardDrive:l7,HardDriveDownload:s7,HardDriveDownloadIcon:s7,HardDriveIcon:l7,HardDriveUpload:c7,HardDriveUploadIcon:c7,HardHat:d7,HardHatIcon:d7,Hash:u7,HashIcon:u7,HatGlasses:h7,HatGlassesIcon:h7,Haze:f7,HazeIcon:f7,Hd:p7,HdIcon:p7,HdmiPort:y7,HdmiPortIcon:y7,Heading:M7,Heading1:m7,Heading1Icon:m7,Heading2:g7,Heading2Icon:g7,Heading3:k7,Heading3Icon:k7,Heading4:v7,Heading4Icon:v7,Heading5:x7,Heading5Icon:x7,Heading6:w7,Heading6Icon:w7,HeadingIcon:M7,HeadphoneOff:b7,HeadphoneOffIcon:b7,Headphones:_7,HeadphonesIcon:_7,Headset:C7,HeadsetIcon:C7,Heart:j7,HeartCrack:S7,HeartCrackIcon:S7,HeartHandshake:N7,HeartHandshakeIcon:N7,HeartIcon:j7,HeartMinus:L7,HeartMinusIcon:L7,HeartOff:I7,HeartOffIcon:I7,HeartPlus:A7,HeartPlusIcon:A7,HeartPulse:E7,HeartPulseIcon:E7,Heater:$7,HeaterIcon:$7,Helicopter:P7,HelicopterIcon:P7,HelpCircle:Vo,HelpCircleIcon:Vo,HelpingHand:ul,HelpingHandIcon:ul,Hexagon:nh,HexagonIcon:nh,Highlighter:z7,HighlighterIcon:z7,History:R7,HistoryIcon:R7,Home:hl,HomeIcon:hl,Hop:T7,HopIcon:T7,HopOff:D7,HopOffIcon:D7,Hospital:H7,HospitalIcon:H7,Hotel:O7,HotelIcon:O7,Hourglass:F7,HourglassIcon:F7,House:hl,HouseHeart:q7,HouseHeartIcon:q7,HouseIcon:hl,HousePlug:V7,HousePlugIcon:V7,HousePlus:B7,HousePlusIcon:B7,HouseWifi:U7,HouseWifiIcon:U7,IceCream:pl,IceCream2:fl,IceCream2Icon:fl,IceCreamBowl:fl,IceCreamBowlIcon:fl,IceCreamCone:pl,IceCreamConeIcon:pl,IceCreamIcon:pl,Icon:_Y,IdCard:G7,IdCardIcon:G7,IdCardLanyard:W7,IdCardLanyardIcon:W7,Image:rh,ImageDown:K7,ImageDownIcon:K7,ImageIcon:rh,ImageMinus:X7,ImageMinusIcon:X7,ImageOff:Z7,ImageOffIcon:Z7,ImagePlay:Y7,ImagePlayIcon:Y7,ImagePlus:oh,ImagePlusIcon:oh,ImageUp:Q7,ImageUpIcon:Q7,ImageUpscale:J7,ImageUpscaleIcon:J7,Images:eM,ImagesIcon:eM,Import:tM,ImportIcon:tM,Inbox:nM,InboxIcon:nM,Indent:Cr,IndentDecrease:_r,IndentDecreaseIcon:_r,IndentIcon:Cr,IndentIncrease:Cr,IndentIncreaseIcon:Cr,IndianRupee:oM,IndianRupeeIcon:oM,Infinity:aM,InfinityIcon:aM,Info:rM,InfoIcon:rM,Inspect:N1,InspectIcon:N1,InspectionPanel:iM,InspectionPanelIcon:iM,Instagram:sM,InstagramIcon:sM,Italic:cM,ItalicIcon:cM,IterationCcw:lM,IterationCcwIcon:lM,IterationCw:dM,IterationCwIcon:dM,JapaneseYen:uM,JapaneseYenIcon:uM,Joystick:hM,JoystickIcon:hM,Kanban:fM,KanbanIcon:fM,KanbanSquare:b1,KanbanSquareDashed:m1,KanbanSquareDashedIcon:m1,KanbanSquareIcon:b1,Kayak:pM,KayakIcon:pM,Key:gM,KeyIcon:gM,KeyRound:yM,KeyRoundIcon:yM,KeySquare:mM,KeySquareIcon:mM,Keyboard:xM,KeyboardIcon:xM,KeyboardMusic:kM,KeyboardMusicIcon:kM,KeyboardOff:vM,KeyboardOffIcon:vM,Lamp:SM,LampCeiling:wM,LampCeilingIcon:wM,LampDesk:MM,LampDeskIcon:MM,LampFloor:bM,LampFloorIcon:bM,LampIcon:SM,LampWallDown:_M,LampWallDownIcon:_M,LampWallUp:CM,LampWallUpIcon:CM,LandPlot:LM,LandPlotIcon:LM,Landmark:NM,LandmarkIcon:NM,Languages:IM,LanguagesIcon:IM,Laptop:jM,Laptop2:yl,Laptop2Icon:yl,LaptopIcon:jM,LaptopMinimal:yl,LaptopMinimalCheck:AM,LaptopMinimalCheckIcon:AM,LaptopMinimalIcon:yl,Lasso:$M,LassoIcon:$M,LassoSelect:EM,LassoSelectIcon:EM,Laugh:PM,LaughIcon:PM,Layers:ka,Layers2:zM,Layers2Icon:zM,Layers3:ka,Layers3Icon:ka,LayersIcon:ka,LayersPlus:RM,LayersPlusIcon:RM,Layout:Pl,LayoutDashboard:ah,LayoutDashboardIcon:ah,LayoutGrid:TM,LayoutGridIcon:TM,LayoutIcon:Pl,LayoutList:DM,LayoutListIcon:DM,LayoutPanelLeft:HM,LayoutPanelLeftIcon:HM,LayoutPanelTop:FM,LayoutPanelTopIcon:FM,LayoutTemplate:OM,LayoutTemplateIcon:OM,Leaf:qM,LeafIcon:qM,LeafyGreen:VM,LeafyGreenIcon:VM,Lectern:BM,LecternIcon:BM,LetterText:K1,LetterTextIcon:K1,Library:WM,LibraryBig:UM,LibraryBigIcon:UM,LibraryIcon:WM,LibrarySquare:_1,LibrarySquareIcon:_1,LifeBuoy:GM,LifeBuoyIcon:GM,Ligature:KM,LigatureIcon:KM,Lightbulb:XM,LightbulbIcon:XM,LightbulbOff:ZM,LightbulbOffIcon:ZM,LineChart:Ts,LineChartIcon:Ts,LineSquiggle:YM,LineSquiggleIcon:YM,Link:JM,Link2:Ii,Link2Icon:Ii,Link2Off:QM,Link2OffIcon:QM,LinkIcon:JM,Linkedin:eb,LinkedinIcon:eb,List:vb,ListCheck:tb,ListCheckIcon:tb,ListChecks:nb,ListChecksIcon:nb,ListChevronsDownUp:ob,ListChevronsDownUpIcon:ob,ListChevronsUpDown:ab,ListChevronsUpDownIcon:ab,ListCollapse:rb,ListCollapseIcon:rb,ListEnd:ib,ListEndIcon:ib,ListFilter:cb,ListFilterIcon:cb,ListFilterPlus:sb,ListFilterPlusIcon:sb,ListIcon:vb,ListIndentDecrease:_r,ListIndentDecreaseIcon:_r,ListIndentIncrease:Cr,ListIndentIncreaseIcon:Cr,ListMinus:lb,ListMinusIcon:lb,ListMusic:db,ListMusicIcon:db,ListOrdered:ub,ListOrderedIcon:ub,ListPlus:hb,ListPlusIcon:hb,ListRestart:fb,ListRestartIcon:fb,ListStart:pb,ListStartIcon:pb,ListTodo:yb,ListTodoIcon:yb,ListTree:mb,ListTreeIcon:mb,ListVideo:gb,ListVideoIcon:gb,ListX:kb,ListXIcon:kb,Loader:wb,Loader2:Fn,Loader2Icon:Fn,LoaderCircle:Fn,LoaderCircleIcon:Fn,LoaderIcon:wb,LoaderPinwheel:xb,LoaderPinwheelIcon:xb,Locate:_b,LocateFixed:Mb,LocateFixedIcon:Mb,LocateIcon:_b,LocateOff:bb,LocateOffIcon:bb,LocationEdit:vl,LocationEditIcon:vl,Lock:Sb,LockIcon:Sb,LockKeyhole:Cb,LockKeyholeIcon:Cb,LockKeyholeOpen:ml,LockKeyholeOpenIcon:ml,LockOpen:gl,LockOpenIcon:gl,LogIn:Lb,LogInIcon:Lb,LogOut:Nb,LogOutIcon:Nb,Logs:Ib,LogsIcon:Ib,Lollipop:Ab,LollipopIcon:Ab,LucideAArrowDown:sy,LucideAArrowUp:cy,LucideALargeSmall:ly,LucideAccessibility:dy,LucideActivity:uy,LucideActivitySquare:Kl,LucideAirVent:hy,LucideAirplay:fy,LucideAlarmCheck:fs,LucideAlarmClock:yy,LucideAlarmClockCheck:fs,LucideAlarmClockMinus:ps,LucideAlarmClockOff:py,LucideAlarmClockPlus:ys,LucideAlarmMinus:ps,LucideAlarmPlus:ys,LucideAlarmSmoke:my,LucideAlbum:gy,LucideAlertCircle:ci,LucideAlertOctagon:bl,LucideAlertTriangle:Er,LucideAlignCenter:ui,LucideAlignCenterHorizontal:vy,LucideAlignCenterVertical:ky,LucideAlignEndHorizontal:xy,LucideAlignEndVertical:wy,LucideAlignHorizontalDistributeCenter:My,LucideAlignHorizontalDistributeEnd:by,LucideAlignHorizontalDistributeStart:_y,LucideAlignHorizontalJustifyCenter:Cy,LucideAlignHorizontalJustifyEnd:Ly,LucideAlignHorizontalJustifyStart:Sy,LucideAlignHorizontalSpaceAround:Ny,LucideAlignHorizontalSpaceBetween:Iy,LucideAlignJustify:G1,LucideAlignLeft:Bo,LucideAlignRight:hi,LucideAlignStartHorizontal:Ay,LucideAlignStartVertical:Ey,LucideAlignVerticalDistributeCenter:jy,LucideAlignVerticalDistributeEnd:$y,LucideAlignVerticalDistributeStart:Py,LucideAlignVerticalJustifyCenter:zy,LucideAlignVerticalJustifyEnd:Ry,LucideAlignVerticalJustifyStart:Ty,LucideAlignVerticalSpaceAround:Dy,LucideAlignVerticalSpaceBetween:Hy,LucideAmbulance:Oy,LucideAmpersand:Fy,LucideAmpersands:qy,LucideAmphora:Vy,LucideAnchor:By,LucideAngry:Uy,LucideAnnoyed:Wy,LucideAntenna:Gy,LucideAnvil:Ky,LucideAperture:Zy,LucideAppWindow:Yy,LucideAppWindowMac:Xy,LucideApple:Qy,LucideArchive:tm,LucideArchiveRestore:Jy,LucideArchiveX:em,LucideAreaChart:As,LucideArmchair:nm,LucideArrowBigDown:rm,LucideArrowBigDownDash:om,LucideArrowBigLeft:im,LucideArrowBigLeftDash:am,LucideArrowBigRight:cm,LucideArrowBigRightDash:sm,LucideArrowBigUp:dm,LucideArrowBigUpDash:lm,LucideArrowDown:xm,LucideArrowDown01:um,LucideArrowDown10:hm,LucideArrowDownAZ:ms,LucideArrowDownAz:ms,LucideArrowDownCircle:Bs,LucideArrowDownFromLine:fm,LucideArrowDownLeft:ym,LucideArrowDownLeftFromCircle:Us,LucideArrowDownLeftFromSquare:Jl,LucideArrowDownLeftSquare:Zl,LucideArrowDownNarrowWide:pm,LucideArrowDownRight:gm,LucideArrowDownRightFromCircle:Gs,LucideArrowDownRightFromSquare:e1,LucideArrowDownRightSquare:Xl,LucideArrowDownSquare:Yl,LucideArrowDownToDot:mm,LucideArrowDownToLine:km,LucideArrowDownUp:vm,LucideArrowDownWideNarrow:gs,LucideArrowDownZA:ks,LucideArrowDownZa:ks,LucideArrowLeft:bm,LucideArrowLeftCircle:Ws,LucideArrowLeftFromLine:wm,LucideArrowLeftRight:W2,LucideArrowLeftSquare:Ql,LucideArrowLeftToLine:Mm,LucideArrowRight:Ju,LucideArrowRightCircle:Xs,LucideArrowRightFromLine:_m,LucideArrowRightLeft:Cm,LucideArrowRightSquare:o1,LucideArrowRightToLine:Sm,LucideArrowUp:Rm,LucideArrowUp01:Lm,LucideArrowUp10:Nm,LucideArrowUpAZ:vs,LucideArrowUpAz:vs,LucideArrowUpCircle:Ys,LucideArrowUpDown:Im,LucideArrowUpFromDot:Am,LucideArrowUpFromLine:Em,LucideArrowUpLeft:jm,LucideArrowUpLeftFromCircle:Ks,LucideArrowUpLeftFromSquare:t1,LucideArrowUpLeftSquare:r1,LucideArrowUpNarrowWide:xs,LucideArrowUpRight:Pm,LucideArrowUpRightFromCircle:Zs,LucideArrowUpRightFromSquare:n1,LucideArrowUpRightSquare:s1,LucideArrowUpSquare:a1,LucideArrowUpToLine:$m,LucideArrowUpWideNarrow:zm,LucideArrowUpZA:ws,LucideArrowUpZa:ws,LucideArrowsUpFromLine:Tm,LucideAsterisk:Dm,LucideAsteriskSquare:i1,LucideAtSign:Hm,LucideAtom:Om,LucideAudioLines:Fm,LucideAudioWaveform:Vm,LucideAward:qm,LucideAxe:Bm,LucideAxis3D:Ms,LucideAxis3d:Ms,LucideBaby:Um,LucideBackpack:Wm,LucideBadge:cg,LucideBadgeAlert:Km,LucideBadgeCent:Gm,LucideBadgeCheck:bs,LucideBadgeDollarSign:Zm,LucideBadgeEuro:Ym,LucideBadgeHelp:_s,LucideBadgeIndianRupee:Xm,LucideBadgeInfo:Qm,LucideBadgeJapaneseYen:Jm,LucideBadgeMinus:eg,LucideBadgePercent:tg,LucideBadgePlus:ng,LucideBadgePoundSterling:og,LucideBadgeQuestionMark:_s,LucideBadgeRussianRuble:rg,LucideBadgeSwissFranc:ag,LucideBadgeTurkishLira:ig,LucideBadgeX:sg,LucideBaggageClaim:lg,LucideBalloon:dg,LucideBan:G2,LucideBanana:ug,LucideBandage:hg,LucideBanknote:mg,LucideBanknoteArrowDown:fg,LucideBanknoteArrowUp:pg,LucideBanknoteX:yg,LucideBarChart:Ds,LucideBarChart2:Hs,LucideBarChart3:Rs,LucideBarChart4:zs,LucideBarChartBig:Ps,LucideBarChartHorizontal:js,LucideBarChartHorizontalBig:Es,LucideBarcode:gg,LucideBarrel:kg,LucideBaseline:vg,LucideBath:xg,LucideBattery:Lg,LucideBatteryCharging:wg,LucideBatteryFull:Mg,LucideBatteryLow:bg,LucideBatteryMedium:_g,LucideBatteryPlus:Cg,LucideBatteryWarning:Sg,LucideBeaker:Ng,LucideBean:Ag,LucideBeanOff:Ig,LucideBed:$g,LucideBedDouble:Eg,LucideBedSingle:jg,LucideBeef:Pg,LucideBeer:Rg,LucideBeerOff:zg,LucideBell:Vg,LucideBellDot:Tg,LucideBellElectric:Dg,LucideBellMinus:Hg,LucideBellOff:Og,LucideBellPlus:Fg,LucideBellRing:qg,LucideBetweenHorizonalEnd:Cs,LucideBetweenHorizonalStart:Ss,LucideBetweenHorizontalEnd:Cs,LucideBetweenHorizontalStart:Ss,LucideBetweenVerticalEnd:Bg,LucideBetweenVerticalStart:Ug,LucideBicepsFlexed:Wg,LucideBike:Gg,LucideBinary:Kg,LucideBinoculars:Zg,LucideBiohazard:Xg,LucideBird:Yg,LucideBirdhouse:Qg,LucideBitcoin:Jg,LucideBlend:ek,LucideBlinds:tk,LucideBlocks:nk,LucideBluetooth:ik,LucideBluetoothConnected:ok,LucideBluetoothOff:rk,LucideBluetoothSearching:ak,LucideBold:sk,LucideBolt:ck,LucideBomb:lk,LucideBone:dk,LucideBook:zk,LucideBookA:uk,LucideBookAlert:hk,LucideBookAudio:fk,LucideBookCheck:pk,LucideBookCopy:yk,LucideBookDashed:Ls,LucideBookDown:mk,LucideBookHeadphones:gk,LucideBookHeart:kk,LucideBookImage:vk,LucideBookKey:xk,LucideBookLock:wk,LucideBookMarked:Mk,LucideBookMinus:bk,LucideBookOpen:Sk,LucideBookOpenCheck:_k,LucideBookOpenText:Ck,LucideBookPlus:Lk,LucideBookSearch:Nk,LucideBookTemplate:Ls,LucideBookText:Ik,LucideBookType:Ak,LucideBookUp:jk,LucideBookUp2:Ek,LucideBookUser:$k,LucideBookX:Pk,LucideBookmark:Ok,LucideBookmarkCheck:Rk,LucideBookmarkMinus:Tk,LucideBookmarkPlus:Dk,LucideBookmarkX:Hk,LucideBoomBox:Fk,LucideBot:Vk,LucideBotMessageSquare:qk,LucideBotOff:Bk,LucideBottleWine:Uk,LucideBowArrow:Wk,LucideBox:Gk,LucideBoxSelect:k1,LucideBoxes:Kk,LucideBraces:Ns,LucideBrackets:Zk,LucideBrain:Qk,LucideBrainCircuit:Xk,LucideBrainCog:Yk,LucideBrickWall:t4,LucideBrickWallFire:Jk,LucideBrickWallShield:e4,LucideBriefcase:a4,LucideBriefcaseBusiness:n4,LucideBriefcaseConveyorBelt:o4,LucideBriefcaseMedical:r4,LucideBringToFront:i4,LucideBrush:l4,LucideBrushCleaning:s4,LucideBubbles:c4,LucideBug:h4,LucideBugOff:d4,LucideBugPlay:u4,LucideBuilding:f4,LucideBuilding2:p4,LucideBus:m4,LucideBusFront:y4,LucideCable:k4,LucideCableCar:g4,LucideCake:x4,LucideCakeSlice:v4,LucideCalculator:w4,LucideCalendar:q4,LucideCalendar1:M4,LucideCalendarArrowDown:b4,LucideCalendarArrowUp:_4,LucideCalendarCheck:S4,LucideCalendarCheck2:C4,LucideCalendarClock:L4,LucideCalendarCog:N4,LucideCalendarDays:I4,LucideCalendarFold:A4,LucideCalendarHeart:E4,LucideCalendarMinus:$4,LucideCalendarMinus2:j4,LucideCalendarOff:P4,LucideCalendarPlus:T4,LucideCalendarPlus2:z4,LucideCalendarRange:R4,LucideCalendarSearch:D4,LucideCalendarSync:H4,LucideCalendarX:F4,LucideCalendarX2:O4,LucideCalendars:V4,LucideCamera:U4,LucideCameraOff:B4,LucideCandlestickChart:$s,LucideCandy:K4,LucideCandyCane:W4,LucideCandyOff:G4,LucideCannabis:X4,LucideCannabisOff:Z4,LucideCaptions:Is,LucideCaptionsOff:Y4,LucideCar:e5,LucideCarFront:Q4,LucideCarTaxiFront:J4,LucideCaravan:t5,LucideCardSim:n5,LucideCarrot:o5,LucideCaseLower:r5,LucideCaseSensitive:a5,LucideCaseUpper:i5,LucideCassetteTape:s5,LucideCast:c5,LucideCastle:l5,LucideCat:d5,LucideCctv:u5,LucideChartArea:As,LucideChartBar:js,LucideChartBarBig:Es,LucideChartBarDecreasing:h5,LucideChartBarIncreasing:f5,LucideChartBarStacked:p5,LucideChartCandlestick:$s,LucideChartColumn:Rs,LucideChartColumnBig:Ps,LucideChartColumnDecreasing:y5,LucideChartColumnIncreasing:zs,LucideChartColumnStacked:m5,LucideChartGantt:g5,LucideChartLine:Ts,LucideChartNetwork:k5,LucideChartNoAxesColumn:Hs,LucideChartNoAxesColumnDecreasing:v5,LucideChartNoAxesColumnIncreasing:Ds,LucideChartNoAxesCombined:x5,LucideChartNoAxesGantt:Os,LucideChartPie:Fs,LucideChartScatter:qs,LucideChartSpline:w5,LucideCheck:Ni,LucideCheckCheck:M5,LucideCheckCircle:Qs,LucideCheckCircle2:li,LucideCheckLine:b5,LucideCheckSquare:l1,LucideCheckSquare2:d1,LucideChefHat:_5,LucideCherry:C5,LucideChessBishop:S5,LucideChessKing:L5,LucideChessKnight:N5,LucideChessPawn:I5,LucideChessQueen:A5,LucideChessRook:j5,LucideChevronDown:E5,LucideChevronDownCircle:Js,LucideChevronDownSquare:u1,LucideChevronFirst:$5,LucideChevronLast:P5,LucideChevronLeft:z5,LucideChevronLeftCircle:ec,LucideChevronLeftSquare:h1,LucideChevronRight:R5,LucideChevronRightCircle:tc,LucideChevronRightSquare:p1,LucideChevronUp:T5,LucideChevronUpCircle:nc,LucideChevronUpSquare:f1,LucideChevronsDown:H5,LucideChevronsDownUp:D5,LucideChevronsLeft:q5,LucideChevronsLeftRight:F5,LucideChevronsLeftRightEllipsis:O5,LucideChevronsRight:B5,LucideChevronsRightLeft:V5,LucideChevronsUp:W5,LucideChevronsUpDown:U5,LucideChrome:Vs,LucideChromium:Vs,LucideChurch:G5,LucideCigarette:Z5,LucideCigaretteOff:K5,LucideCircle:K2,LucideCircleAlert:ci,LucideCircleArrowDown:Bs,LucideCircleArrowLeft:Ws,LucideCircleArrowOutDownLeft:Us,LucideCircleArrowOutDownRight:Gs,LucideCircleArrowOutUpLeft:Ks,LucideCircleArrowOutUpRight:Zs,LucideCircleArrowRight:Xs,LucideCircleArrowUp:Ys,LucideCircleCheck:li,LucideCircleCheckBig:Qs,LucideCircleChevronDown:Js,LucideCircleChevronLeft:ec,LucideCircleChevronRight:tc,LucideCircleChevronUp:nc,LucideCircleDashed:X5,LucideCircleDivide:oc,LucideCircleDollarSign:Y5,LucideCircleDot:J5,LucideCircleDotDashed:Q5,LucideCircleEllipsis:ev,LucideCircleEqual:tv,LucideCircleFadingArrowUp:nv,LucideCircleFadingPlus:ov,LucideCircleGauge:rc,LucideCircleHelp:Vo,LucideCircleMinus:ac,LucideCircleOff:rv,LucideCircleParking:sc,LucideCircleParkingOff:ic,LucideCirclePause:cc,LucideCirclePercent:lc,LucideCirclePile:av,LucideCirclePlay:dc,LucideCirclePlus:uc,LucideCirclePoundSterling:iv,LucideCirclePower:hc,LucideCircleQuestionMark:Vo,LucideCircleSlash:sv,LucideCircleSlash2:fc,LucideCircleSlashed:fc,LucideCircleSmall:cv,LucideCircleStar:lv,LucideCircleStop:yc,LucideCircleUser:mc,LucideCircleUserRound:pc,LucideCircleX:gc,LucideCircuitBoard:dv,LucideCitrus:uv,LucideClapperboard:hv,LucideClipboard:Mv,LucideClipboardCheck:fv,LucideClipboardClock:pv,LucideClipboardCopy:yv,LucideClipboardEdit:vc,LucideClipboardList:mv,LucideClipboardMinus:gv,LucideClipboardPaste:kv,LucideClipboardPen:vc,LucideClipboardPenLine:kc,LucideClipboardPlus:vv,LucideClipboardSignature:kc,LucideClipboardType:xv,LucideClipboardX:wv,LucideClock:Fv,LucideClock1:bv,LucideClock10:_v,LucideClock11:Cv,LucideClock12:Sv,LucideClock2:Lv,LucideClock3:Nv,LucideClock4:Iv,LucideClock5:Av,LucideClock6:Ev,LucideClock7:jv,LucideClock8:$v,LucideClock9:Pv,LucideClockAlert:zv,LucideClockArrowDown:Rv,LucideClockArrowUp:Hv,LucideClockCheck:Tv,LucideClockFading:Dv,LucideClockPlus:Ov,LucideClosedCaption:qv,LucideCloud:Z2,LucideCloudAlert:Vv,LucideCloudBackup:Bv,LucideCloudCheck:Uv,LucideCloudCog:Wv,LucideCloudDownload:xc,LucideCloudDrizzle:Gv,LucideCloudFog:Kv,LucideCloudHail:Zv,LucideCloudLightning:Xv,LucideCloudMoon:Qv,LucideCloudMoonRain:Yv,LucideCloudOff:Jv,LucideCloudRain:t3,LucideCloudRainWind:e3,LucideCloudSnow:n3,LucideCloudSun:r3,LucideCloudSunRain:o3,LucideCloudSync:a3,LucideCloudUpload:wc,LucideCloudy:i3,LucideClover:s3,LucideClub:c3,LucideCode:l3,LucideCode2:Mc,LucideCodeSquare:y1,LucideCodeXml:Mc,LucideCodepen:d3,LucideCodesandbox:u3,LucideCoffee:h3,LucideCog:f3,LucideCoins:p3,LucideColumns:bc,LucideColumns2:bc,LucideColumns3:di,LucideColumns3Cog:wr,LucideColumns4:y3,LucideColumnsSettings:wr,LucideCombine:m3,LucideCommand:g3,LucideCompass:k3,LucideComponent:v3,LucideComputer:x3,LucideConciergeBell:w3,LucideCone:M3,LucideConstruction:b3,LucideContact:_3,LucideContact2:_c,LucideContactRound:_c,LucideContainer:C3,LucideContrast:S3,LucideCookie:L3,LucideCookingPot:N3,LucideCopy:P3,LucideCopyCheck:I3,LucideCopyMinus:A3,LucideCopyPlus:E3,LucideCopySlash:j3,LucideCopyX:$3,LucideCopyleft:R3,LucideCopyright:z3,LucideCornerDownLeft:T3,LucideCornerDownRight:D3,LucideCornerLeftDown:H3,LucideCornerLeftUp:O3,LucideCornerRightDown:q3,LucideCornerRightUp:F3,LucideCornerUpLeft:B3,LucideCornerUpRight:V3,LucideCpu:U3,LucideCreativeCommons:W3,LucideCreditCard:G3,LucideCroissant:K3,LucideCrop:Z3,LucideCross:X3,LucideCrosshair:Y3,LucideCrown:Q3,LucideCuboid:J3,LucideCupSoda:ex,LucideCurlyBraces:Ns,LucideCurrency:tx,LucideCylinder:nx,LucideDam:ox,LucideDatabase:X2,LucideDatabaseBackup:rx,LucideDatabaseSearch:ax,LucideDatabaseZap:ix,LucideDecimalsArrowLeft:sx,LucideDecimalsArrowRight:cx,LucideDelete:lx,LucideDessert:dx,LucideDiameter:ux,LucideDiamond:Y2,LucideDiamondMinus:hx,LucideDiamondPercent:Cc,LucideDiamondPlus:fx,LucideDice1:px,LucideDice2:mx,LucideDice3:yx,LucideDice4:gx,LucideDice5:kx,LucideDice6:vx,LucideDices:xx,LucideDiff:wx,LucideDisc:Cx,LucideDisc2:Mx,LucideDisc3:_x,LucideDiscAlbum:bx,LucideDivide:Sx,LucideDivideCircle:oc,LucideDivideSquare:v1,LucideDna:Nx,LucideDnaOff:Lx,LucideDock:Ix,LucideDog:Ax,LucideDollarSign:Ex,LucideDonut:jx,LucideDoorClosed:Px,LucideDoorClosedLocked:$x,LucideDoorOpen:zx,LucideDot:Rx,LucideDotSquare:x1,LucideDownload:e0,LucideDownloadCloud:xc,LucideDraftingCompass:Tx,LucideDrama:Dx,LucideDribbble:Hx,LucideDrill:Ox,LucideDrone:Fx,LucideDroplet:Vx,LucideDropletOff:qx,LucideDroplets:Bx,LucideDrum:Ux,LucideDrumstick:Wx,LucideDumbbell:Gx,LucideEar:Kx,LucideEarOff:Zx,LucideEarth:Sc,LucideEarthLock:Xx,LucideEclipse:Yx,LucideEdit:to,LucideEdit2:Rl,LucideEdit3:zl,LucideEgg:e8,LucideEggFried:Qx,LucideEggOff:Jx,LucideEllipsis:Nc,LucideEllipsisVertical:Lc,LucideEqual:o8,LucideEqualApproximately:t8,LucideEqualNot:n8,LucideEqualSquare:w1,LucideEraser:r8,LucideEthernetPort:a8,LucideEuro:i8,LucideEvCharger:s8,LucideExpand:c8,LucideExternalLink:Q2,LucideEye:u8,LucideEyeClosed:l8,LucideEyeOff:d8,LucideFacebook:h8,LucideFactory:f8,LucideFan:y8,LucideFastForward:p8,LucideFeather:m8,LucideFence:g8,LucideFerrisWheel:k8,LucideFigma:v8,LucideFile:G8,LucideFileArchive:x8,LucideFileAudio:Mr,LucideFileAudio2:Mr,LucideFileAxis3D:Ic,LucideFileAxis3d:Ic,LucideFileBadge:Ac,LucideFileBadge2:Ac,LucideFileBarChart:$c,LucideFileBarChart2:Pc,LucideFileBox:w8,LucideFileBraces:jc,LucideFileBracesCorner:Ec,LucideFileChartColumn:Pc,LucideFileChartColumnIncreasing:$c,LucideFileChartLine:zc,LucideFileChartPie:Rc,LucideFileCheck:M8,LucideFileCheck2:Tc,LucideFileCheckCorner:Tc,LucideFileClock:_8,LucideFileCode:b8,LucideFileCode2:Dc,LucideFileCodeCorner:Dc,LucideFileCog:Hc,LucideFileCog2:Hc,LucideFileDiff:C8,LucideFileDigit:S8,LucideFileDown:J2,LucideFileEdit:Uc,LucideFileExclamationPoint:Oc,LucideFileHeadphone:Mr,LucideFileHeart:L8,LucideFileImage:N8,LucideFileInput:I8,LucideFileJson:jc,LucideFileJson2:Ec,LucideFileKey:Fc,LucideFileKey2:Fc,LucideFileLineChart:zc,LucideFileLock:qc,LucideFileLock2:qc,LucideFileMinus:A8,LucideFileMinus2:Vc,LucideFileMinusCorner:Vc,LucideFileMusic:j8,LucideFileOutput:E8,LucideFilePen:Uc,LucideFilePenLine:Bc,LucideFilePieChart:Rc,LucideFilePlay:Wc,LucideFilePlus:$8,LucideFilePlus2:Gc,LucideFilePlusCorner:Gc,LucideFileQuestion:Kc,LucideFileQuestionMark:Kc,LucideFileScan:P8,LucideFileSearch:z8,LucideFileSearch2:Zc,LucideFileSearchCorner:Zc,LucideFileSignal:Xc,LucideFileSignature:Bc,LucideFileSliders:R8,LucideFileSpreadsheet:T8,LucideFileStack:D8,LucideFileSymlink:H8,LucideFileTerminal:O8,LucideFileText:F8,LucideFileType:q8,LucideFileType2:Yc,LucideFileTypeCorner:Yc,LucideFileUp:V8,LucideFileUser:B8,LucideFileVideo:Wc,LucideFileVideo2:Qc,LucideFileVideoCamera:Qc,LucideFileVolume:U8,LucideFileVolume2:Xc,LucideFileWarning:Oc,LucideFileX:W8,LucideFileX2:Jc,LucideFileXCorner:Jc,LucideFiles:K8,LucideFilm:Z8,LucideFilter:rl,LucideFilterX:ol,LucideFingerprint:el,LucideFingerprintPattern:el,LucideFireExtinguisher:X8,LucideFish:J8,LucideFishOff:Y8,LucideFishSymbol:Q8,LucideFishingHook:e6,LucideFlag:r6,LucideFlagOff:t6,LucideFlagTriangleLeft:n6,LucideFlagTriangleRight:o6,LucideFlame:i6,LucideFlameKindling:a6,LucideFlashlight:c6,LucideFlashlightOff:s6,LucideFlaskConical:u6,LucideFlaskConicalOff:l6,LucideFlaskRound:d6,LucideFlipHorizontal:f6,LucideFlipHorizontal2:h6,LucideFlipVertical:y6,LucideFlipVertical2:p6,LucideFlower:g6,LucideFlower2:m6,LucideFocus:k6,LucideFoldHorizontal:v6,LucideFoldVertical:x6,LucideFolder:G6,LucideFolderArchive:w6,LucideFolderCheck:M6,LucideFolderClock:b6,LucideFolderClosed:C6,LucideFolderCode:_6,LucideFolderCog:tl,LucideFolderCog2:tl,LucideFolderDot:S6,LucideFolderDown:L6,LucideFolderEdit:nl,LucideFolderGit:I6,LucideFolderGit2:N6,LucideFolderHeart:A6,LucideFolderInput:E6,LucideFolderKanban:j6,LucideFolderKey:$6,LucideFolderLock:P6,LucideFolderMinus:z6,LucideFolderOpen:eh,LucideFolderOpenDot:R6,LucideFolderOutput:T6,LucideFolderPen:nl,LucideFolderPlus:D6,LucideFolderRoot:H6,LucideFolderSearch:F6,LucideFolderSearch2:O6,LucideFolderSymlink:q6,LucideFolderSync:V6,LucideFolderTree:B6,LucideFolderUp:U6,LucideFolderX:W6,LucideFolders:K6,LucideFootprints:Z6,LucideForkKnife:ld,LucideForkKnifeCrossed:cd,LucideForklift:Q6,LucideForm:X6,LucideFormInput:Dl,LucideForward:Y6,LucideFrame:J6,LucideFramer:nw,LucideFrown:ew,LucideFuel:tw,LucideFullscreen:ow,LucideFunctionSquare:M1,LucideFunnel:rl,LucideFunnelPlus:rw,LucideFunnelX:ol,LucideGalleryHorizontal:iw,LucideGalleryHorizontalEnd:aw,LucideGalleryThumbnails:sw,LucideGalleryVertical:lw,LucideGalleryVerticalEnd:cw,LucideGamepad:fw,LucideGamepad2:dw,LucideGamepadDirectional:uw,LucideGanttChart:Os,LucideGanttChartSquare:Sr,LucideGauge:hw,LucideGaugeCircle:rc,LucideGavel:pw,LucideGem:yw,LucideGeorgianLari:mw,LucideGhost:kw,LucideGift:gw,LucideGitBranch:ww,LucideGitBranchMinus:vw,LucideGitBranchPlus:xw,LucideGitCommit:al,LucideGitCommitHorizontal:al,LucideGitCommitVertical:Mw,LucideGitCompare:_w,LucideGitCompareArrows:bw,LucideGitFork:Cw,LucideGitGraph:Sw,LucideGitMerge:Lw,LucideGitPullRequest:$w,LucideGitPullRequestArrow:Nw,LucideGitPullRequestClosed:Iw,LucideGitPullRequestCreate:Ew,LucideGitPullRequestCreateArrow:Aw,LucideGitPullRequestDraft:jw,LucideGithub:Pw,LucideGitlab:zw,LucideGlassWater:Rw,LucideGlasses:Tw,LucideGlobe:Ow,LucideGlobe2:Sc,LucideGlobeLock:Dw,LucideGlobeX:Hw,LucideGoal:Fw,LucideGpu:qw,LucideGrab:dl,LucideGraduationCap:Vw,LucideGrape:Bw,LucideGrid:br,LucideGrid2X2:ll,LucideGrid2X2Check:il,LucideGrid2X2Plus:sl,LucideGrid2X2X:cl,LucideGrid2x2:ll,LucideGrid2x2Check:il,LucideGrid2x2Plus:sl,LucideGrid2x2X:cl,LucideGrid3X3:br,LucideGrid3x2:Uw,LucideGrid3x3:br,LucideGrip:Gw,LucideGripHorizontal:Ww,LucideGripVertical:Kw,LucideGroup:Zw,LucideGuitar:Xw,LucideHam:Yw,LucideHamburger:Qw,LucideHammer:Jw,LucideHand:th,LucideHandCoins:e7,LucideHandFist:t7,LucideHandGrab:dl,LucideHandHeart:n7,LucideHandHelping:ul,LucideHandMetal:o7,LucideHandPlatter:r7,LucideHandbag:a7,LucideHandshake:i7,LucideHardDrive:l7,LucideHardDriveDownload:s7,LucideHardDriveUpload:c7,LucideHardHat:d7,LucideHash:u7,LucideHatGlasses:h7,LucideHaze:f7,LucideHd:p7,LucideHdmiPort:y7,LucideHeading:M7,LucideHeading1:m7,LucideHeading2:g7,LucideHeading3:k7,LucideHeading4:v7,LucideHeading5:x7,LucideHeading6:w7,LucideHeadphoneOff:b7,LucideHeadphones:_7,LucideHeadset:C7,LucideHeart:j7,LucideHeartCrack:S7,LucideHeartHandshake:N7,LucideHeartMinus:L7,LucideHeartOff:I7,LucideHeartPlus:A7,LucideHeartPulse:E7,LucideHeater:$7,LucideHelicopter:P7,LucideHelpCircle:Vo,LucideHelpingHand:ul,LucideHexagon:nh,LucideHighlighter:z7,LucideHistory:R7,LucideHome:hl,LucideHop:T7,LucideHopOff:D7,LucideHospital:H7,LucideHotel:O7,LucideHourglass:F7,LucideHouse:hl,LucideHouseHeart:q7,LucideHousePlug:V7,LucideHousePlus:B7,LucideHouseWifi:U7,LucideIceCream:pl,LucideIceCream2:fl,LucideIceCreamBowl:fl,LucideIceCreamCone:pl,LucideIdCard:G7,LucideIdCardLanyard:W7,LucideImage:rh,LucideImageDown:K7,LucideImageMinus:X7,LucideImageOff:Z7,LucideImagePlay:Y7,LucideImagePlus:oh,LucideImageUp:Q7,LucideImageUpscale:J7,LucideImages:eM,LucideImport:tM,LucideInbox:nM,LucideIndent:Cr,LucideIndentDecrease:_r,LucideIndentIncrease:Cr,LucideIndianRupee:oM,LucideInfinity:aM,LucideInfo:rM,LucideInspect:N1,LucideInspectionPanel:iM,LucideInstagram:sM,LucideItalic:cM,LucideIterationCcw:lM,LucideIterationCw:dM,LucideJapaneseYen:uM,LucideJoystick:hM,LucideKanban:fM,LucideKanbanSquare:b1,LucideKanbanSquareDashed:m1,LucideKayak:pM,LucideKey:gM,LucideKeyRound:yM,LucideKeySquare:mM,LucideKeyboard:xM,LucideKeyboardMusic:kM,LucideKeyboardOff:vM,LucideLamp:SM,LucideLampCeiling:wM,LucideLampDesk:MM,LucideLampFloor:bM,LucideLampWallDown:_M,LucideLampWallUp:CM,LucideLandPlot:LM,LucideLandmark:NM,LucideLanguages:IM,LucideLaptop:jM,LucideLaptop2:yl,LucideLaptopMinimal:yl,LucideLaptopMinimalCheck:AM,LucideLasso:$M,LucideLassoSelect:EM,LucideLaugh:PM,LucideLayers:ka,LucideLayers2:zM,LucideLayers3:ka,LucideLayersPlus:RM,LucideLayout:Pl,LucideLayoutDashboard:ah,LucideLayoutGrid:TM,LucideLayoutList:DM,LucideLayoutPanelLeft:HM,LucideLayoutPanelTop:FM,LucideLayoutTemplate:OM,LucideLeaf:qM,LucideLeafyGreen:VM,LucideLectern:BM,LucideLetterText:K1,LucideLibrary:WM,LucideLibraryBig:UM,LucideLibrarySquare:_1,LucideLifeBuoy:GM,LucideLigature:KM,LucideLightbulb:XM,LucideLightbulbOff:ZM,LucideLineChart:Ts,LucideLineSquiggle:YM,LucideLink:JM,LucideLink2:Ii,LucideLink2Off:QM,LucideLinkedin:eb,LucideList:vb,LucideListCheck:tb,LucideListChecks:nb,LucideListChevronsDownUp:ob,LucideListChevronsUpDown:ab,LucideListCollapse:rb,LucideListEnd:ib,LucideListFilter:cb,LucideListFilterPlus:sb,LucideListIndentDecrease:_r,LucideListIndentIncrease:Cr,LucideListMinus:lb,LucideListMusic:db,LucideListOrdered:ub,LucideListPlus:hb,LucideListRestart:fb,LucideListStart:pb,LucideListTodo:yb,LucideListTree:mb,LucideListVideo:gb,LucideListX:kb,LucideLoader:wb,LucideLoader2:Fn,LucideLoaderCircle:Fn,LucideLoaderPinwheel:xb,LucideLocate:_b,LucideLocateFixed:Mb,LucideLocateOff:bb,LucideLocationEdit:vl,LucideLock:Sb,LucideLockKeyhole:Cb,LucideLockKeyholeOpen:ml,LucideLockOpen:gl,LucideLogIn:Lb,LucideLogOut:Nb,LucideLogs:Ib,LucideLollipop:Ab,LucideLuggage:Eb,LucideMSquare:C1,LucideMagnet:jb,LucideMail:Ob,LucideMailCheck:$b,LucideMailMinus:Pb,LucideMailOpen:zb,LucideMailPlus:Rb,LucideMailQuestion:kl,LucideMailQuestionMark:kl,LucideMailSearch:Tb,LucideMailWarning:Db,LucideMailX:Hb,LucideMailbox:qb,LucideMails:Fb,LucideMap:o9,LucideMapMinus:Vb,LucideMapPin:e9,LucideMapPinCheck:Ub,LucideMapPinCheckInside:Bb,LucideMapPinHouse:Wb,LucideMapPinMinus:Kb,LucideMapPinMinusInside:Gb,LucideMapPinOff:Zb,LucideMapPinPen:vl,LucideMapPinPlus:Yb,LucideMapPinPlusInside:Xb,LucideMapPinX:Qb,LucideMapPinXInside:Jb,LucideMapPinned:t9,LucideMapPlus:n9,LucideMars:a9,LucideMarsStroke:r9,LucideMartini:i9,LucideMaximize:s9,LucideMaximize2:xd,LucideMedal:c9,LucideMegaphone:d9,LucideMegaphoneOff:l9,LucideMeh:u9,LucideMemoryStick:h9,LucideMenu:p9,LucideMenuSquare:S1,LucideMerge:f9,LucideMessageCircle:_9,LucideMessageCircleCode:y9,LucideMessageCircleDashed:m9,LucideMessageCircleHeart:g9,LucideMessageCircleMore:k9,LucideMessageCircleOff:v9,LucideMessageCirclePlus:x9,LucideMessageCircleQuestion:xl,LucideMessageCircleQuestionMark:xl,LucideMessageCircleReply:w9,LucideMessageCircleWarning:M9,LucideMessageCircleX:b9,LucideMessageSquare:O9,LucideMessageSquareCode:C9,LucideMessageSquareDashed:S9,LucideMessageSquareDiff:L9,LucideMessageSquareDot:N9,LucideMessageSquareHeart:I9,LucideMessageSquareLock:A9,LucideMessageSquareMore:E9,LucideMessageSquareOff:j9,LucideMessageSquarePlus:$9,LucideMessageSquareQuote:P9,LucideMessageSquareReply:z9,LucideMessageSquareShare:R9,LucideMessageSquareText:T9,LucideMessageSquareWarning:D9,LucideMessageSquareX:H9,LucideMessagesSquare:F9,LucideMic:V9,LucideMic2:wl,LucideMicOff:q9,LucideMicVocal:wl,LucideMicrochip:B9,LucideMicroscope:U9,LucideMicrowave:W9,LucideMilestone:G9,LucideMilk:Z9,LucideMilkOff:K9,LucideMinimize:Y9,LucideMinimize2:X9,LucideMinus:ih,LucideMinusCircle:ac,LucideMinusSquare:L1,LucideMonitor:u_,LucideMonitorCheck:Q9,LucideMonitorCloud:J9,LucideMonitorCog:e_,LucideMonitorDot:t_,LucideMonitorDown:n_,LucideMonitorOff:o_,LucideMonitorPause:r_,LucideMonitorPlay:a_,LucideMonitorSmartphone:i_,LucideMonitorSpeaker:s_,LucideMonitorStop:c_,LucideMonitorUp:l_,LucideMonitorX:d_,LucideMoon:f_,LucideMoonStar:h_,LucideMoreHorizontal:Nc,LucideMoreVertical:Lc,LucideMotorbike:p_,LucideMountain:m_,LucideMountainSnow:y_,LucideMouse:M_,LucideMouseOff:g_,LucideMousePointer:w_,LucideMousePointer2:sh,LucideMousePointer2Off:k_,LucideMousePointerBan:v_,LucideMousePointerClick:x_,LucideMousePointerSquareDashed:g1,LucideMove:P_,LucideMove3D:Ml,LucideMove3d:Ml,LucideMoveDiagonal:__,LucideMoveDiagonal2:b_,LucideMoveDown:L_,LucideMoveDownLeft:C_,LucideMoveDownRight:S_,LucideMoveHorizontal:N_,LucideMoveLeft:ch,LucideMoveRight:I_,LucideMoveUp:j_,LucideMoveUpLeft:A_,LucideMoveUpRight:E_,LucideMoveVertical:$_,LucideMusic:D_,LucideMusic2:z_,LucideMusic3:R_,LucideMusic4:T_,LucideNavigation:q_,LucideNavigation2:O_,LucideNavigation2Off:H_,LucideNavigationOff:F_,LucideNetwork:V_,LucideNewspaper:B_,LucideNfc:U_,LucideNonBinary:W_,LucideNotebook:X_,LucideNotebookPen:G_,LucideNotebookTabs:K_,LucideNotebookText:Z_,LucideNotepadText:Q_,LucideNotepadTextDashed:Y_,LucideNut:J_,LucideNutOff:eC,LucideOctagon:nC,LucideOctagonAlert:bl,LucideOctagonMinus:tC,LucideOctagonPause:_l,LucideOctagonX:Cl,LucideOmega:oC,LucideOption:aC,LucideOrbit:rC,LucideOrigami:iC,LucideOutdent:_r,LucidePackage:pC,LucidePackage2:sC,LucidePackageCheck:cC,LucidePackageMinus:lC,LucidePackageOpen:dC,LucidePackagePlus:uC,LucidePackageSearch:hC,LucidePackageX:fC,LucidePaintBucket:yC,LucidePaintRoller:mC,LucidePaintbrush:gC,LucidePaintbrush2:Sl,LucidePaintbrushVertical:Sl,LucidePalette:kC,LucidePalmtree:Q1,LucidePanda:vC,LucidePanelBottom:wC,LucidePanelBottomClose:xC,LucidePanelBottomDashed:Ll,LucidePanelBottomInactive:Ll,LucidePanelBottomOpen:MC,LucidePanelLeft:El,LucidePanelLeftClose:Nl,LucidePanelLeftDashed:Il,LucidePanelLeftInactive:Il,LucidePanelLeftOpen:Al,LucidePanelLeftRightDashed:bC,LucidePanelRight:_C,LucidePanelRightClose:lh,LucidePanelRightDashed:jl,LucidePanelRightInactive:jl,LucidePanelRightOpen:dh,LucidePanelTop:NC,LucidePanelTopBottomDashed:CC,LucidePanelTopClose:SC,LucidePanelTopDashed:$l,LucidePanelTopInactive:$l,LucidePanelTopOpen:LC,LucidePanelsLeftBottom:IC,LucidePanelsLeftRight:di,LucidePanelsRightBottom:AC,LucidePanelsTopBottom:Fl,LucidePanelsTopLeft:Pl,LucidePaperclip:EC,LucideParentheses:$C,LucideParkingCircle:sc,LucideParkingCircleOff:ic,LucideParkingMeter:jC,LucideParkingSquare:A1,LucideParkingSquareOff:I1,LucidePartyPopper:PC,LucidePause:zC,LucidePauseCircle:cc,LucidePauseOctagon:_l,LucidePawPrint:RC,LucidePcCase:TC,LucidePen:Rl,LucidePenBox:to,LucidePenLine:zl,LucidePenOff:DC,LucidePenSquare:to,LucidePenTool:HC,LucidePencil:hh,LucidePencilLine:uh,LucidePencilOff:OC,LucidePencilRuler:FC,LucidePentagon:qC,LucidePercent:VC,LucidePercentCircle:lc,LucidePercentDiamond:Cc,LucidePercentSquare:E1,LucidePersonStanding:UC,LucidePhilippinePeso:BC,LucidePhone:QC,LucidePhoneCall:WC,LucidePhoneForwarded:GC,LucidePhoneIncoming:KC,LucidePhoneMissed:ZC,LucidePhoneOff:XC,LucidePhoneOutgoing:YC,LucidePi:JC,LucidePiSquare:P1,LucidePiano:eS,LucidePickaxe:tS,LucidePictureInPicture:oS,LucidePictureInPicture2:nS,LucidePieChart:Fs,LucidePiggyBank:rS,LucidePilcrow:sS,LucidePilcrowLeft:aS,LucidePilcrowRight:iS,LucidePilcrowSquare:j1,LucidePill:lS,LucidePillBottle:cS,LucidePin:uS,LucidePinOff:dS,LucidePipette:hS,LucidePizza:fS,LucidePlane:mS,LucidePlaneLanding:pS,LucidePlaneTakeoff:yS,LucidePlay:wd,LucidePlayCircle:dc,LucidePlaySquare:$1,LucidePlug:kS,LucidePlug2:gS,LucidePlugZap:Tl,LucidePlugZap2:Tl,LucidePlus:fh,LucidePlusCircle:uc,LucidePlusSquare:z1,LucidePocket:xS,LucidePocketKnife:vS,LucidePodcast:MS,LucidePointer:bS,LucidePointerOff:wS,LucidePopcorn:_S,LucidePopsicle:CS,LucidePoundSterling:SS,LucidePower:NS,LucidePowerCircle:hc,LucidePowerOff:LS,LucidePowerSquare:R1,LucidePresentation:IS,LucidePrinter:jS,LucidePrinterCheck:AS,LucidePrinterX:ES,LucideProjector:PS,LucideProportions:$S,LucidePuzzle:zS,LucidePyramid:RS,LucideQrCode:TS,LucideQuote:DS,LucideRabbit:HS,LucideRadar:OS,LucideRadiation:FS,LucideRadical:qS,LucideRadio:US,LucideRadioReceiver:VS,LucideRadioTower:BS,LucideRadius:WS,LucideRailSymbol:GS,LucideRainbow:KS,LucideRat:ZS,LucideRatio:XS,LucideReceipt:iL,LucideReceiptCent:YS,LucideReceiptEuro:QS,LucideReceiptIndianRupee:JS,LucideReceiptJapaneseYen:eL,LucideReceiptPoundSterling:tL,LucideReceiptRussianRuble:nL,LucideReceiptSwissFranc:oL,LucideReceiptText:rL,LucideReceiptTurkishLira:aL,LucideRectangleCircle:sL,LucideRectangleEllipsis:Dl,LucideRectangleGoggles:cL,LucideRectangleHorizontal:lL,LucideRectangleVertical:dL,LucideRecycle:uL,LucideRedo:pL,LucideRedo2:hL,LucideRedoDot:fL,LucideRefreshCcw:gL,LucideRefreshCcwDot:yL,LucideRefreshCw:kL,LucideRefreshCwOff:mL,LucideRefrigerator:vL,LucideRegex:xL,LucideRemoveFormatting:wL,LucideRepeat:_L,LucideRepeat1:bL,LucideRepeat2:ML,LucideReplace:SL,LucideReplaceAll:CL,LucideReply:NL,LucideReplyAll:LL,LucideRewind:IL,LucideRibbon:EL,LucideRocket:AL,LucideRockingChair:jL,LucideRollerCoaster:$L,LucideRose:PL,LucideRotate3D:Hl,LucideRotate3d:Hl,LucideRotateCcw:TL,LucideRotateCcwKey:zL,LucideRotateCcwSquare:RL,LucideRotateCw:HL,LucideRotateCwSquare:DL,LucideRoute:FL,LucideRouteOff:OL,LucideRouter:qL,LucideRows:Ol,LucideRows2:Ol,LucideRows3:Fl,LucideRows4:VL,LucideRss:BL,LucideRuler:WL,LucideRulerDimensionLine:UL,LucideRussianRuble:GL,LucideSailboat:KL,LucideSalad:ZL,LucideSandwich:XL,LucideSatellite:QL,LucideSatelliteDish:YL,LucideSaudiRiyal:JL,LucideSave:nN,LucideSaveAll:eN,LucideSaveOff:tN,LucideScale:oN,LucideScale3D:ql,LucideScale3d:ql,LucideScaling:rN,LucideScan:fN,LucideScanBarcode:aN,LucideScanEye:iN,LucideScanFace:sN,LucideScanHeart:cN,LucideScanLine:lN,LucideScanQrCode:dN,LucideScanSearch:uN,LucideScanText:hN,LucideScatterChart:qs,LucideSchool:pN,LucideSchool2:ed,LucideScissors:gN,LucideScissorsLineDashed:yN,LucideScissorsSquare:T1,LucideScissorsSquareDashedBottom:c1,LucideScooter:mN,LucideScreenShare:vN,LucideScreenShareOff:kN,LucideScroll:wN,LucideScrollText:xN,LucideSearch:ph,LucideSearchAlert:MN,LucideSearchCheck:bN,LucideSearchCode:_N,LucideSearchSlash:CN,LucideSearchX:SN,LucideSection:LN,LucideSend:IN,LucideSendHorizonal:Vl,LucideSendHorizontal:Vl,LucideSendToBack:NN,LucideSeparatorHorizontal:EN,LucideSeparatorVertical:AN,LucideServer:yh,LucideServerCog:jN,LucideServerCrash:$N,LucideServerOff:PN,LucideSettings:RN,LucideSettings2:zN,LucideShapes:mh,LucideShare:TN,LucideShare2:gh,LucideSheet:DN,LucideShell:HN,LucideShield:ZN,LucideShieldAlert:ON,LucideShieldBan:FN,LucideShieldCheck:qN,LucideShieldClose:Ul,LucideShieldEllipsis:VN,LucideShieldHalf:BN,LucideShieldMinus:UN,LucideShieldOff:WN,LucideShieldPlus:GN,LucideShieldQuestion:Bl,LucideShieldQuestionMark:Bl,LucideShieldUser:KN,LucideShieldX:Ul,LucideShip:QN,LucideShipWheel:XN,LucideShirt:YN,LucideShoppingBag:eI,LucideShoppingBasket:JN,LucideShoppingCart:tI,LucideShovel:nI,LucideShowerHead:oI,LucideShredder:rI,LucideShrimp:aI,LucideShrink:iI,LucideShrub:sI,LucideShuffle:cI,LucideSidebar:El,LucideSidebarClose:Nl,LucideSidebarOpen:Al,LucideSigma:lI,LucideSigmaSquare:D1,LucideSignal:pI,LucideSignalHigh:dI,LucideSignalLow:uI,LucideSignalMedium:hI,LucideSignalZero:fI,LucideSignature:yI,LucideSignpost:gI,LucideSignpostBig:mI,LucideSiren:kI,LucideSkipBack:vI,LucideSkipForward:xI,LucideSkull:wI,LucideSlack:MI,LucideSlash:bI,LucideSlashSquare:H1,LucideSlice:_I,LucideSliders:Wl,LucideSlidersHorizontal:CI,LucideSlidersVertical:Wl,LucideSmartphone:NI,LucideSmartphoneCharging:SI,LucideSmartphoneNfc:LI,LucideSmile:AI,LucideSmilePlus:II,LucideSnail:EI,LucideSnowflake:jI,LucideSoapDispenserDroplet:$I,LucideSofa:PI,LucideSolarPanel:zI,LucideSortAsc:xs,LucideSortDesc:gs,LucideSoup:RI,LucideSpace:TI,LucideSpade:DI,LucideSparkle:HI,LucideSparkles:Gl,LucideSpeaker:OI,LucideSpeech:FI,LucideSpellCheck:VI,LucideSpellCheck2:qI,LucideSpline:BI,LucideSplinePointer:UI,LucideSplit:WI,LucideSplitSquareHorizontal:O1,LucideSplitSquareVertical:F1,LucideSpool:GI,LucideSpotlight:KI,LucideSprayCan:ZI,LucideSprout:XI,LucideSquare:t0,LucideSquareActivity:Kl,LucideSquareArrowDown:Yl,LucideSquareArrowDownLeft:Zl,LucideSquareArrowDownRight:Xl,LucideSquareArrowLeft:Ql,LucideSquareArrowOutDownLeft:Jl,LucideSquareArrowOutDownRight:e1,LucideSquareArrowOutUpLeft:t1,LucideSquareArrowOutUpRight:n1,LucideSquareArrowRight:o1,LucideSquareArrowUp:a1,LucideSquareArrowUpLeft:r1,LucideSquareArrowUpRight:s1,LucideSquareAsterisk:i1,LucideSquareBottomDashedScissors:c1,LucideSquareChartGantt:Sr,LucideSquareCheck:d1,LucideSquareCheckBig:l1,LucideSquareChevronDown:u1,LucideSquareChevronLeft:h1,LucideSquareChevronRight:p1,LucideSquareChevronUp:f1,LucideSquareCode:y1,LucideSquareDashed:k1,LucideSquareDashedBottom:QI,LucideSquareDashedBottomCode:YI,LucideSquareDashedKanban:m1,LucideSquareDashedMousePointer:g1,LucideSquareDashedTopSolid:JI,LucideSquareDivide:v1,LucideSquareDot:x1,LucideSquareEqual:w1,LucideSquareFunction:M1,LucideSquareGanttChart:Sr,LucideSquareKanban:b1,LucideSquareLibrary:_1,LucideSquareM:C1,LucideSquareMenu:S1,LucideSquareMinus:L1,LucideSquareMousePointer:N1,LucideSquareParking:A1,LucideSquareParkingOff:I1,LucideSquarePause:eA,LucideSquarePen:to,LucideSquarePercent:E1,LucideSquarePi:P1,LucideSquarePilcrow:j1,LucideSquarePlay:$1,LucideSquarePlus:z1,LucideSquarePower:R1,LucideSquareRadical:tA,LucideSquareRoundCorner:nA,LucideSquareScissors:T1,LucideSquareSigma:D1,LucideSquareSlash:H1,LucideSquareSplitHorizontal:O1,LucideSquareSplitVertical:F1,LucideSquareSquare:rA,LucideSquareStack:oA,LucideSquareStar:iA,LucideSquareStop:aA,LucideSquareTerminal:q1,LucideSquareUser:B1,LucideSquareUserRound:V1,LucideSquareX:U1,LucideSquaresExclude:sA,LucideSquaresIntersect:cA,LucideSquaresSubtract:lA,LucideSquaresUnite:dA,LucideSquircle:n0,LucideSquircleDashed:uA,LucideSquirrel:hA,LucideStamp:fA,LucideStar:mA,LucideStarHalf:pA,LucideStarOff:yA,LucideStars:Gl,LucideStepBack:gA,LucideStepForward:kA,LucideStethoscope:vA,LucideSticker:o0,LucideStickyNote:kh,LucideStone:xA,LucideStopCircle:yc,LucideStore:wA,LucideStretchHorizontal:bA,LucideStretchVertical:MA,LucideStrikethrough:_A,LucideSubscript:CA,LucideSubtitles:Is,LucideSun:AA,LucideSunDim:SA,LucideSunMedium:LA,LucideSunMoon:NA,LucideSunSnow:IA,LucideSunrise:EA,LucideSunset:jA,LucideSuperscript:$A,LucideSwatchBook:PA,LucideSwissFranc:zA,LucideSwitchCamera:RA,LucideSword:TA,LucideSwords:DA,LucideSyringe:HA,LucideTable:GA,LucideTable2:OA,LucideTableCellsMerge:FA,LucideTableCellsSplit:qA,LucideTableColumnsSplit:VA,LucideTableConfig:wr,LucideTableOfContents:BA,LucideTableProperties:UA,LucideTableRowsSplit:WA,LucideTablet:ZA,LucideTabletSmartphone:KA,LucideTablets:XA,LucideTag:YA,LucideTags:QA,LucideTally1:JA,LucideTally2:eE,LucideTally3:tE,LucideTally4:nE,LucideTally5:oE,LucideTangent:rE,LucideTarget:aE,LucideTelescope:iE,LucideTent:cE,LucideTentTree:sE,LucideTerminal:lE,LucideTerminalSquare:q1,LucideTestTube:dE,LucideTestTube2:W1,LucideTestTubeDiagonal:W1,LucideTestTubes:uE,LucideText:Bo,LucideTextAlignCenter:ui,LucideTextAlignEnd:hi,LucideTextAlignJustify:G1,LucideTextAlignStart:Bo,LucideTextCursor:fE,LucideTextCursorInput:hE,LucideTextInitial:K1,LucideTextQuote:pE,LucideTextSearch:yE,LucideTextSelect:Z1,LucideTextSelection:Z1,LucideTextWrap:X1,LucideTheater:mE,LucideThermometer:vE,LucideThermometerSnowflake:gE,LucideThermometerSun:kE,LucideThumbsDown:xE,LucideThumbsUp:wE,LucideTicket:NE,LucideTicketCheck:ME,LucideTicketMinus:bE,LucideTicketPercent:_E,LucideTicketPlus:CE,LucideTicketSlash:SE,LucideTicketX:LE,LucideTickets:AE,LucideTicketsPlane:IE,LucideTimer:$E,LucideTimerOff:EE,LucideTimerReset:jE,LucideToggleLeft:PE,LucideToggleRight:zE,LucideToilet:RE,LucideToolCase:DE,LucideToolbox:TE,LucideTornado:HE,LucideTorus:OE,LucideTouchpad:qE,LucideTouchpadOff:FE,LucideTowerControl:VE,LucideToyBrick:BE,LucideTractor:UE,LucideTrafficCone:WE,LucideTrain:Y1,LucideTrainFront:KE,LucideTrainFrontTunnel:GE,LucideTrainTrack:ZE,LucideTramFront:Y1,LucideTransgender:XE,LucideTrash:YE,LucideTrash2:vh,LucideTreeDeciduous:QE,LucideTreePalm:Q1,LucideTreePine:JE,LucideTrees:ej,LucideTrello:tj,LucideTrendingDown:nj,LucideTrendingUp:rj,LucideTrendingUpDown:oj,LucideTriangle:sj,LucideTriangleAlert:Er,LucideTriangleDashed:aj,LucideTriangleRight:ij,LucideTrophy:cj,LucideTruck:dj,LucideTruckElectric:lj,LucideTurkishLira:uj,LucideTurntable:hj,LucideTurtle:fj,LucideTv:yj,LucideTv2:J1,LucideTvMinimal:J1,LucideTvMinimalPlay:pj,LucideTwitch:mj,LucideTwitter:gj,LucideType:r0,LucideTypeOutline:kj,LucideUmbrella:xj,LucideUmbrellaOff:vj,LucideUnderline:wj,LucideUndo:_j,LucideUndo2:Mj,LucideUndoDot:bj,LucideUnfoldHorizontal:Cj,LucideUnfoldVertical:Sj,LucideUngroup:Lj,LucideUniversity:ed,LucideUnlink:Ij,LucideUnlink2:Nj,LucideUnlock:gl,LucideUnlockKeyhole:ml,LucideUnplug:Aj,LucideUpload:xh,LucideUploadCloud:wc,LucideUsb:Ej,LucideUser:wh,LucideUser2:id,LucideUserCheck:jj,LucideUserCheck2:td,LucideUserCircle:mc,LucideUserCircle2:pc,LucideUserCog:$j,LucideUserCog2:nd,LucideUserKey:Pj,LucideUserLock:zj,LucideUserMinus:Rj,LucideUserMinus2:od,LucideUserPen:Tj,LucideUserPlus:Dj,LucideUserPlus2:rd,LucideUserRound:id,LucideUserRoundCheck:td,LucideUserRoundCog:nd,LucideUserRoundKey:Hj,LucideUserRoundMinus:od,LucideUserRoundPen:Oj,LucideUserRoundPlus:rd,LucideUserRoundSearch:Fj,LucideUserRoundX:ad,LucideUserSearch:qj,LucideUserSquare:B1,LucideUserSquare2:V1,LucideUserStar:Vj,LucideUserX:Bj,LucideUserX2:ad,LucideUsers:Uj,LucideUsers2:sd,LucideUsersRound:sd,LucideUtensils:ld,LucideUtensilsCrossed:cd,LucideUtilityPole:Wj,LucideVan:Gj,LucideVariable:Kj,LucideVault:Zj,LucideVectorSquare:Xj,LucideVegan:Yj,LucideVenetianMask:Qj,LucideVenus:e$,LucideVenusAndMars:Jj,LucideVerified:bs,LucideVibrate:n$,LucideVibrateOff:t$,LucideVideo:r$,LucideVideoOff:o$,LucideVideotape:a$,LucideView:i$,LucideVoicemail:s$,LucideVolleyball:c$,LucideVolume:f$,LucideVolume1:l$,LucideVolume2:d$,LucideVolumeOff:u$,LucideVolumeX:h$,LucideVote:p$,LucideWallet:m$,LucideWallet2:dd,LucideWalletCards:y$,LucideWalletMinimal:dd,LucideWallpaper:g$,LucideWand:k$,LucideWand2:ud,LucideWandSparkles:ud,LucideWarehouse:v$,LucideWashingMachine:x$,LucideWatch:w$,LucideWaves:C$,LucideWavesArrowDown:M$,LucideWavesArrowUp:b$,LucideWavesLadder:_$,LucideWaypoints:S$,LucideWebcam:L$,LucideWebhook:I$,LucideWebhookOff:N$,LucideWeight:E$,LucideWeightTilde:A$,LucideWheat:P$,LucideWheatOff:j$,LucideWholeWord:$$,LucideWifi:q$,LucideWifiCog:z$,LucideWifiHigh:R$,LucideWifiLow:T$,LucideWifiOff:D$,LucideWifiPen:H$,LucideWifiSync:O$,LucideWifiZero:F$,LucideWind:B$,LucideWindArrowDown:V$,LucideWine:W$,LucideWineOff:U$,LucideWorkflow:G$,LucideWorm:K$,LucideWrapText:X1,LucideWrench:Z$,LucideX:Ai,LucideXCircle:gc,LucideXOctagon:Cl,LucideXSquare:U1,LucideYoutube:X$,LucideZap:Q$,LucideZapOff:Y$,LucideZoomIn:J$,LucideZoomOut:eP,Luggage:Eb,LuggageIcon:Eb,MSquare:C1,MSquareIcon:C1,Magnet:jb,MagnetIcon:jb,Mail:Ob,MailCheck:$b,MailCheckIcon:$b,MailIcon:Ob,MailMinus:Pb,MailMinusIcon:Pb,MailOpen:zb,MailOpenIcon:zb,MailPlus:Rb,MailPlusIcon:Rb,MailQuestion:kl,MailQuestionIcon:kl,MailQuestionMark:kl,MailQuestionMarkIcon:kl,MailSearch:Tb,MailSearchIcon:Tb,MailWarning:Db,MailWarningIcon:Db,MailX:Hb,MailXIcon:Hb,Mailbox:qb,MailboxIcon:qb,Mails:Fb,MailsIcon:Fb,Map:o9,MapIcon:o9,MapMinus:Vb,MapMinusIcon:Vb,MapPin:e9,MapPinCheck:Ub,MapPinCheckIcon:Ub,MapPinCheckInside:Bb,MapPinCheckInsideIcon:Bb,MapPinHouse:Wb,MapPinHouseIcon:Wb,MapPinIcon:e9,MapPinMinus:Kb,MapPinMinusIcon:Kb,MapPinMinusInside:Gb,MapPinMinusInsideIcon:Gb,MapPinOff:Zb,MapPinOffIcon:Zb,MapPinPen:vl,MapPinPenIcon:vl,MapPinPlus:Yb,MapPinPlusIcon:Yb,MapPinPlusInside:Xb,MapPinPlusInsideIcon:Xb,MapPinX:Qb,MapPinXIcon:Qb,MapPinXInside:Jb,MapPinXInsideIcon:Jb,MapPinned:t9,MapPinnedIcon:t9,MapPlus:n9,MapPlusIcon:n9,Mars:a9,MarsIcon:a9,MarsStroke:r9,MarsStrokeIcon:r9,Martini:i9,MartiniIcon:i9,Maximize:s9,Maximize2:xd,Maximize2Icon:xd,MaximizeIcon:s9,Medal:c9,MedalIcon:c9,Megaphone:d9,MegaphoneIcon:d9,MegaphoneOff:l9,MegaphoneOffIcon:l9,Meh:u9,MehIcon:u9,MemoryStick:h9,MemoryStickIcon:h9,Menu:p9,MenuIcon:p9,MenuSquare:S1,MenuSquareIcon:S1,Merge:f9,MergeIcon:f9,MessageCircle:_9,MessageCircleCode:y9,MessageCircleCodeIcon:y9,MessageCircleDashed:m9,MessageCircleDashedIcon:m9,MessageCircleHeart:g9,MessageCircleHeartIcon:g9,MessageCircleIcon:_9,MessageCircleMore:k9,MessageCircleMoreIcon:k9,MessageCircleOff:v9,MessageCircleOffIcon:v9,MessageCirclePlus:x9,MessageCirclePlusIcon:x9,MessageCircleQuestion:xl,MessageCircleQuestionIcon:xl,MessageCircleQuestionMark:xl,MessageCircleQuestionMarkIcon:xl,MessageCircleReply:w9,MessageCircleReplyIcon:w9,MessageCircleWarning:M9,MessageCircleWarningIcon:M9,MessageCircleX:b9,MessageCircleXIcon:b9,MessageSquare:O9,MessageSquareCode:C9,MessageSquareCodeIcon:C9,MessageSquareDashed:S9,MessageSquareDashedIcon:S9,MessageSquareDiff:L9,MessageSquareDiffIcon:L9,MessageSquareDot:N9,MessageSquareDotIcon:N9,MessageSquareHeart:I9,MessageSquareHeartIcon:I9,MessageSquareIcon:O9,MessageSquareLock:A9,MessageSquareLockIcon:A9,MessageSquareMore:E9,MessageSquareMoreIcon:E9,MessageSquareOff:j9,MessageSquareOffIcon:j9,MessageSquarePlus:$9,MessageSquarePlusIcon:$9,MessageSquareQuote:P9,MessageSquareQuoteIcon:P9,MessageSquareReply:z9,MessageSquareReplyIcon:z9,MessageSquareShare:R9,MessageSquareShareIcon:R9,MessageSquareText:T9,MessageSquareTextIcon:T9,MessageSquareWarning:D9,MessageSquareWarningIcon:D9,MessageSquareX:H9,MessageSquareXIcon:H9,MessagesSquare:F9,MessagesSquareIcon:F9,Mic:V9,Mic2:wl,Mic2Icon:wl,MicIcon:V9,MicOff:q9,MicOffIcon:q9,MicVocal:wl,MicVocalIcon:wl,Microchip:B9,MicrochipIcon:B9,Microscope:U9,MicroscopeIcon:U9,Microwave:W9,MicrowaveIcon:W9,Milestone:G9,MilestoneIcon:G9,Milk:Z9,MilkIcon:Z9,MilkOff:K9,MilkOffIcon:K9,Minimize:Y9,Minimize2:X9,Minimize2Icon:X9,MinimizeIcon:Y9,Minus:ih,MinusCircle:ac,MinusCircleIcon:ac,MinusIcon:ih,MinusSquare:L1,MinusSquareIcon:L1,Monitor:u_,MonitorCheck:Q9,MonitorCheckIcon:Q9,MonitorCloud:J9,MonitorCloudIcon:J9,MonitorCog:e_,MonitorCogIcon:e_,MonitorDot:t_,MonitorDotIcon:t_,MonitorDown:n_,MonitorDownIcon:n_,MonitorIcon:u_,MonitorOff:o_,MonitorOffIcon:o_,MonitorPause:r_,MonitorPauseIcon:r_,MonitorPlay:a_,MonitorPlayIcon:a_,MonitorSmartphone:i_,MonitorSmartphoneIcon:i_,MonitorSpeaker:s_,MonitorSpeakerIcon:s_,MonitorStop:c_,MonitorStopIcon:c_,MonitorUp:l_,MonitorUpIcon:l_,MonitorX:d_,MonitorXIcon:d_,Moon:f_,MoonIcon:f_,MoonStar:h_,MoonStarIcon:h_,MoreHorizontal:Nc,MoreHorizontalIcon:Nc,MoreVertical:Lc,MoreVerticalIcon:Lc,Motorbike:p_,MotorbikeIcon:p_,Mountain:m_,MountainIcon:m_,MountainSnow:y_,MountainSnowIcon:y_,Mouse:M_,MouseIcon:M_,MouseOff:g_,MouseOffIcon:g_,MousePointer:w_,MousePointer2:sh,MousePointer2Icon:sh,MousePointer2Off:k_,MousePointer2OffIcon:k_,MousePointerBan:v_,MousePointerBanIcon:v_,MousePointerClick:x_,MousePointerClickIcon:x_,MousePointerIcon:w_,MousePointerSquareDashed:g1,MousePointerSquareDashedIcon:g1,Move:P_,Move3D:Ml,Move3DIcon:Ml,Move3d:Ml,Move3dIcon:Ml,MoveDiagonal:__,MoveDiagonal2:b_,MoveDiagonal2Icon:b_,MoveDiagonalIcon:__,MoveDown:L_,MoveDownIcon:L_,MoveDownLeft:C_,MoveDownLeftIcon:C_,MoveDownRight:S_,MoveDownRightIcon:S_,MoveHorizontal:N_,MoveHorizontalIcon:N_,MoveIcon:P_,MoveLeft:ch,MoveLeftIcon:ch,MoveRight:I_,MoveRightIcon:I_,MoveUp:j_,MoveUpIcon:j_,MoveUpLeft:A_,MoveUpLeftIcon:A_,MoveUpRight:E_,MoveUpRightIcon:E_,MoveVertical:$_,MoveVerticalIcon:$_,Music:D_,Music2:z_,Music2Icon:z_,Music3:R_,Music3Icon:R_,Music4:T_,Music4Icon:T_,MusicIcon:D_,Navigation:q_,Navigation2:O_,Navigation2Icon:O_,Navigation2Off:H_,Navigation2OffIcon:H_,NavigationIcon:q_,NavigationOff:F_,NavigationOffIcon:F_,Network:V_,NetworkIcon:V_,Newspaper:B_,NewspaperIcon:B_,Nfc:U_,NfcIcon:U_,NonBinary:W_,NonBinaryIcon:W_,Notebook:X_,NotebookIcon:X_,NotebookPen:G_,NotebookPenIcon:G_,NotebookTabs:K_,NotebookTabsIcon:K_,NotebookText:Z_,NotebookTextIcon:Z_,NotepadText:Q_,NotepadTextDashed:Y_,NotepadTextDashedIcon:Y_,NotepadTextIcon:Q_,Nut:J_,NutIcon:J_,NutOff:eC,NutOffIcon:eC,Octagon:nC,OctagonAlert:bl,OctagonAlertIcon:bl,OctagonIcon:nC,OctagonMinus:tC,OctagonMinusIcon:tC,OctagonPause:_l,OctagonPauseIcon:_l,OctagonX:Cl,OctagonXIcon:Cl,Omega:oC,OmegaIcon:oC,Option:aC,OptionIcon:aC,Orbit:rC,OrbitIcon:rC,Origami:iC,OrigamiIcon:iC,Outdent:_r,OutdentIcon:_r,Package:pC,Package2:sC,Package2Icon:sC,PackageCheck:cC,PackageCheckIcon:cC,PackageIcon:pC,PackageMinus:lC,PackageMinusIcon:lC,PackageOpen:dC,PackageOpenIcon:dC,PackagePlus:uC,PackagePlusIcon:uC,PackageSearch:hC,PackageSearchIcon:hC,PackageX:fC,PackageXIcon:fC,PaintBucket:yC,PaintBucketIcon:yC,PaintRoller:mC,PaintRollerIcon:mC,Paintbrush:gC,Paintbrush2:Sl,Paintbrush2Icon:Sl,PaintbrushIcon:gC,PaintbrushVertical:Sl,PaintbrushVerticalIcon:Sl,Palette:kC,PaletteIcon:kC,Palmtree:Q1,PalmtreeIcon:Q1,Panda:vC,PandaIcon:vC,PanelBottom:wC,PanelBottomClose:xC,PanelBottomCloseIcon:xC,PanelBottomDashed:Ll,PanelBottomDashedIcon:Ll,PanelBottomIcon:wC,PanelBottomInactive:Ll,PanelBottomInactiveIcon:Ll,PanelBottomOpen:MC,PanelBottomOpenIcon:MC,PanelLeft:El,PanelLeftClose:Nl,PanelLeftCloseIcon:Nl,PanelLeftDashed:Il,PanelLeftDashedIcon:Il,PanelLeftIcon:El,PanelLeftInactive:Il,PanelLeftInactiveIcon:Il,PanelLeftOpen:Al,PanelLeftOpenIcon:Al,PanelLeftRightDashed:bC,PanelLeftRightDashedIcon:bC,PanelRight:_C,PanelRightClose:lh,PanelRightCloseIcon:lh,PanelRightDashed:jl,PanelRightDashedIcon:jl,PanelRightIcon:_C,PanelRightInactive:jl,PanelRightInactiveIcon:jl,PanelRightOpen:dh,PanelRightOpenIcon:dh,PanelTop:NC,PanelTopBottomDashed:CC,PanelTopBottomDashedIcon:CC,PanelTopClose:SC,PanelTopCloseIcon:SC,PanelTopDashed:$l,PanelTopDashedIcon:$l,PanelTopIcon:NC,PanelTopInactive:$l,PanelTopInactiveIcon:$l,PanelTopOpen:LC,PanelTopOpenIcon:LC,PanelsLeftBottom:IC,PanelsLeftBottomIcon:IC,PanelsLeftRight:di,PanelsLeftRightIcon:di,PanelsRightBottom:AC,PanelsRightBottomIcon:AC,PanelsTopBottom:Fl,PanelsTopBottomIcon:Fl,PanelsTopLeft:Pl,PanelsTopLeftIcon:Pl,Paperclip:EC,PaperclipIcon:EC,Parentheses:$C,ParenthesesIcon:$C,ParkingCircle:sc,ParkingCircleIcon:sc,ParkingCircleOff:ic,ParkingCircleOffIcon:ic,ParkingMeter:jC,ParkingMeterIcon:jC,ParkingSquare:A1,ParkingSquareIcon:A1,ParkingSquareOff:I1,ParkingSquareOffIcon:I1,PartyPopper:PC,PartyPopperIcon:PC,Pause:zC,PauseCircle:cc,PauseCircleIcon:cc,PauseIcon:zC,PauseOctagon:_l,PauseOctagonIcon:_l,PawPrint:RC,PawPrintIcon:RC,PcCase:TC,PcCaseIcon:TC,Pen:Rl,PenBox:to,PenBoxIcon:to,PenIcon:Rl,PenLine:zl,PenLineIcon:zl,PenOff:DC,PenOffIcon:DC,PenSquare:to,PenSquareIcon:to,PenTool:HC,PenToolIcon:HC,Pencil:hh,PencilIcon:hh,PencilLine:uh,PencilLineIcon:uh,PencilOff:OC,PencilOffIcon:OC,PencilRuler:FC,PencilRulerIcon:FC,Pentagon:qC,PentagonIcon:qC,Percent:VC,PercentCircle:lc,PercentCircleIcon:lc,PercentDiamond:Cc,PercentDiamondIcon:Cc,PercentIcon:VC,PercentSquare:E1,PercentSquareIcon:E1,PersonStanding:UC,PersonStandingIcon:UC,PhilippinePeso:BC,PhilippinePesoIcon:BC,Phone:QC,PhoneCall:WC,PhoneCallIcon:WC,PhoneForwarded:GC,PhoneForwardedIcon:GC,PhoneIcon:QC,PhoneIncoming:KC,PhoneIncomingIcon:KC,PhoneMissed:ZC,PhoneMissedIcon:ZC,PhoneOff:XC,PhoneOffIcon:XC,PhoneOutgoing:YC,PhoneOutgoingIcon:YC,Pi:JC,PiIcon:JC,PiSquare:P1,PiSquareIcon:P1,Piano:eS,PianoIcon:eS,Pickaxe:tS,PickaxeIcon:tS,PictureInPicture:oS,PictureInPicture2:nS,PictureInPicture2Icon:nS,PictureInPictureIcon:oS,PieChart:Fs,PieChartIcon:Fs,PiggyBank:rS,PiggyBankIcon:rS,Pilcrow:sS,PilcrowIcon:sS,PilcrowLeft:aS,PilcrowLeftIcon:aS,PilcrowRight:iS,PilcrowRightIcon:iS,PilcrowSquare:j1,PilcrowSquareIcon:j1,Pill:lS,PillBottle:cS,PillBottleIcon:cS,PillIcon:lS,Pin:uS,PinIcon:uS,PinOff:dS,PinOffIcon:dS,Pipette:hS,PipetteIcon:hS,Pizza:fS,PizzaIcon:fS,Plane:mS,PlaneIcon:mS,PlaneLanding:pS,PlaneLandingIcon:pS,PlaneTakeoff:yS,PlaneTakeoffIcon:yS,Play:wd,PlayCircle:dc,PlayCircleIcon:dc,PlayIcon:wd,PlaySquare:$1,PlaySquareIcon:$1,Plug:kS,Plug2:gS,Plug2Icon:gS,PlugIcon:kS,PlugZap:Tl,PlugZap2:Tl,PlugZap2Icon:Tl,PlugZapIcon:Tl,Plus:fh,PlusCircle:uc,PlusCircleIcon:uc,PlusIcon:fh,PlusSquare:z1,PlusSquareIcon:z1,Pocket:xS,PocketIcon:xS,PocketKnife:vS,PocketKnifeIcon:vS,Podcast:MS,PodcastIcon:MS,Pointer:bS,PointerIcon:bS,PointerOff:wS,PointerOffIcon:wS,Popcorn:_S,PopcornIcon:_S,Popsicle:CS,PopsicleIcon:CS,PoundSterling:SS,PoundSterlingIcon:SS,Power:NS,PowerCircle:hc,PowerCircleIcon:hc,PowerIcon:NS,PowerOff:LS,PowerOffIcon:LS,PowerSquare:R1,PowerSquareIcon:R1,Presentation:IS,PresentationIcon:IS,Printer:jS,PrinterCheck:AS,PrinterCheckIcon:AS,PrinterIcon:jS,PrinterX:ES,PrinterXIcon:ES,Projector:PS,ProjectorIcon:PS,Proportions:$S,ProportionsIcon:$S,Puzzle:zS,PuzzleIcon:zS,Pyramid:RS,PyramidIcon:RS,QrCode:TS,QrCodeIcon:TS,Quote:DS,QuoteIcon:DS,Rabbit:HS,RabbitIcon:HS,Radar:OS,RadarIcon:OS,Radiation:FS,RadiationIcon:FS,Radical:qS,RadicalIcon:qS,Radio:US,RadioIcon:US,RadioReceiver:VS,RadioReceiverIcon:VS,RadioTower:BS,RadioTowerIcon:BS,Radius:WS,RadiusIcon:WS,RailSymbol:GS,RailSymbolIcon:GS,Rainbow:KS,RainbowIcon:KS,Rat:ZS,RatIcon:ZS,Ratio:XS,RatioIcon:XS,Receipt:iL,ReceiptCent:YS,ReceiptCentIcon:YS,ReceiptEuro:QS,ReceiptEuroIcon:QS,ReceiptIcon:iL,ReceiptIndianRupee:JS,ReceiptIndianRupeeIcon:JS,ReceiptJapaneseYen:eL,ReceiptJapaneseYenIcon:eL,ReceiptPoundSterling:tL,ReceiptPoundSterlingIcon:tL,ReceiptRussianRuble:nL,ReceiptRussianRubleIcon:nL,ReceiptSwissFranc:oL,ReceiptSwissFrancIcon:oL,ReceiptText:rL,ReceiptTextIcon:rL,ReceiptTurkishLira:aL,ReceiptTurkishLiraIcon:aL,RectangleCircle:sL,RectangleCircleIcon:sL,RectangleEllipsis:Dl,RectangleEllipsisIcon:Dl,RectangleGoggles:cL,RectangleGogglesIcon:cL,RectangleHorizontal:lL,RectangleHorizontalIcon:lL,RectangleVertical:dL,RectangleVerticalIcon:dL,Recycle:uL,RecycleIcon:uL,Redo:pL,Redo2:hL,Redo2Icon:hL,RedoDot:fL,RedoDotIcon:fL,RedoIcon:pL,RefreshCcw:gL,RefreshCcwDot:yL,RefreshCcwDotIcon:yL,RefreshCcwIcon:gL,RefreshCw:kL,RefreshCwIcon:kL,RefreshCwOff:mL,RefreshCwOffIcon:mL,Refrigerator:vL,RefrigeratorIcon:vL,Regex:xL,RegexIcon:xL,RemoveFormatting:wL,RemoveFormattingIcon:wL,Repeat:_L,Repeat1:bL,Repeat1Icon:bL,Repeat2:ML,Repeat2Icon:ML,RepeatIcon:_L,Replace:SL,ReplaceAll:CL,ReplaceAllIcon:CL,ReplaceIcon:SL,Reply:NL,ReplyAll:LL,ReplyAllIcon:LL,ReplyIcon:NL,Rewind:IL,RewindIcon:IL,Ribbon:EL,RibbonIcon:EL,Rocket:AL,RocketIcon:AL,RockingChair:jL,RockingChairIcon:jL,RollerCoaster:$L,RollerCoasterIcon:$L,Rose:PL,RoseIcon:PL,Rotate3D:Hl,Rotate3DIcon:Hl,Rotate3d:Hl,Rotate3dIcon:Hl,RotateCcw:TL,RotateCcwIcon:TL,RotateCcwKey:zL,RotateCcwKeyIcon:zL,RotateCcwSquare:RL,RotateCcwSquareIcon:RL,RotateCw:HL,RotateCwIcon:HL,RotateCwSquare:DL,RotateCwSquareIcon:DL,Route:FL,RouteIcon:FL,RouteOff:OL,RouteOffIcon:OL,Router:qL,RouterIcon:qL,Rows:Ol,Rows2:Ol,Rows2Icon:Ol,Rows3:Fl,Rows3Icon:Fl,Rows4:VL,Rows4Icon:VL,RowsIcon:Ol,Rss:BL,RssIcon:BL,Ruler:WL,RulerDimensionLine:UL,RulerDimensionLineIcon:UL,RulerIcon:WL,RussianRuble:GL,RussianRubleIcon:GL,Sailboat:KL,SailboatIcon:KL,Salad:ZL,SaladIcon:ZL,Sandwich:XL,SandwichIcon:XL,Satellite:QL,SatelliteDish:YL,SatelliteDishIcon:YL,SatelliteIcon:QL,SaudiRiyal:JL,SaudiRiyalIcon:JL,Save:nN,SaveAll:eN,SaveAllIcon:eN,SaveIcon:nN,SaveOff:tN,SaveOffIcon:tN,Scale:oN,Scale3D:ql,Scale3DIcon:ql,Scale3d:ql,Scale3dIcon:ql,ScaleIcon:oN,Scaling:rN,ScalingIcon:rN,Scan:fN,ScanBarcode:aN,ScanBarcodeIcon:aN,ScanEye:iN,ScanEyeIcon:iN,ScanFace:sN,ScanFaceIcon:sN,ScanHeart:cN,ScanHeartIcon:cN,ScanIcon:fN,ScanLine:lN,ScanLineIcon:lN,ScanQrCode:dN,ScanQrCodeIcon:dN,ScanSearch:uN,ScanSearchIcon:uN,ScanText:hN,ScanTextIcon:hN,ScatterChart:qs,ScatterChartIcon:qs,School:pN,School2:ed,School2Icon:ed,SchoolIcon:pN,Scissors:gN,ScissorsIcon:gN,ScissorsLineDashed:yN,ScissorsLineDashedIcon:yN,ScissorsSquare:T1,ScissorsSquareDashedBottom:c1,ScissorsSquareDashedBottomIcon:c1,ScissorsSquareIcon:T1,Scooter:mN,ScooterIcon:mN,ScreenShare:vN,ScreenShareIcon:vN,ScreenShareOff:kN,ScreenShareOffIcon:kN,Scroll:wN,ScrollIcon:wN,ScrollText:xN,ScrollTextIcon:xN,Search:ph,SearchAlert:MN,SearchAlertIcon:MN,SearchCheck:bN,SearchCheckIcon:bN,SearchCode:_N,SearchCodeIcon:_N,SearchIcon:ph,SearchSlash:CN,SearchSlashIcon:CN,SearchX:SN,SearchXIcon:SN,Section:LN,SectionIcon:LN,Send:IN,SendHorizonal:Vl,SendHorizonalIcon:Vl,SendHorizontal:Vl,SendHorizontalIcon:Vl,SendIcon:IN,SendToBack:NN,SendToBackIcon:NN,SeparatorHorizontal:EN,SeparatorHorizontalIcon:EN,SeparatorVertical:AN,SeparatorVerticalIcon:AN,Server:yh,ServerCog:jN,ServerCogIcon:jN,ServerCrash:$N,ServerCrashIcon:$N,ServerIcon:yh,ServerOff:PN,ServerOffIcon:PN,Settings:RN,Settings2:zN,Settings2Icon:zN,SettingsIcon:RN,Shapes:mh,ShapesIcon:mh,Share:TN,Share2:gh,Share2Icon:gh,ShareIcon:TN,Sheet:DN,SheetIcon:DN,Shell:HN,ShellIcon:HN,Shield:ZN,ShieldAlert:ON,ShieldAlertIcon:ON,ShieldBan:FN,ShieldBanIcon:FN,ShieldCheck:qN,ShieldCheckIcon:qN,ShieldClose:Ul,ShieldCloseIcon:Ul,ShieldEllipsis:VN,ShieldEllipsisIcon:VN,ShieldHalf:BN,ShieldHalfIcon:BN,ShieldIcon:ZN,ShieldMinus:UN,ShieldMinusIcon:UN,ShieldOff:WN,ShieldOffIcon:WN,ShieldPlus:GN,ShieldPlusIcon:GN,ShieldQuestion:Bl,ShieldQuestionIcon:Bl,ShieldQuestionMark:Bl,ShieldQuestionMarkIcon:Bl,ShieldUser:KN,ShieldUserIcon:KN,ShieldX:Ul,ShieldXIcon:Ul,Ship:QN,ShipIcon:QN,ShipWheel:XN,ShipWheelIcon:XN,Shirt:YN,ShirtIcon:YN,ShoppingBag:eI,ShoppingBagIcon:eI,ShoppingBasket:JN,ShoppingBasketIcon:JN,ShoppingCart:tI,ShoppingCartIcon:tI,Shovel:nI,ShovelIcon:nI,ShowerHead:oI,ShowerHeadIcon:oI,Shredder:rI,ShredderIcon:rI,Shrimp:aI,ShrimpIcon:aI,Shrink:iI,ShrinkIcon:iI,Shrub:sI,ShrubIcon:sI,Shuffle:cI,ShuffleIcon:cI,Sidebar:El,SidebarClose:Nl,SidebarCloseIcon:Nl,SidebarIcon:El,SidebarOpen:Al,SidebarOpenIcon:Al,Sigma:lI,SigmaIcon:lI,SigmaSquare:D1,SigmaSquareIcon:D1,Signal:pI,SignalHigh:dI,SignalHighIcon:dI,SignalIcon:pI,SignalLow:uI,SignalLowIcon:uI,SignalMedium:hI,SignalMediumIcon:hI,SignalZero:fI,SignalZeroIcon:fI,Signature:yI,SignatureIcon:yI,Signpost:gI,SignpostBig:mI,SignpostBigIcon:mI,SignpostIcon:gI,Siren:kI,SirenIcon:kI,SkipBack:vI,SkipBackIcon:vI,SkipForward:xI,SkipForwardIcon:xI,Skull:wI,SkullIcon:wI,Slack:MI,SlackIcon:MI,Slash:bI,SlashIcon:bI,SlashSquare:H1,SlashSquareIcon:H1,Slice:_I,SliceIcon:_I,Sliders:Wl,SlidersHorizontal:CI,SlidersHorizontalIcon:CI,SlidersIcon:Wl,SlidersVertical:Wl,SlidersVerticalIcon:Wl,Smartphone:NI,SmartphoneCharging:SI,SmartphoneChargingIcon:SI,SmartphoneIcon:NI,SmartphoneNfc:LI,SmartphoneNfcIcon:LI,Smile:AI,SmileIcon:AI,SmilePlus:II,SmilePlusIcon:II,Snail:EI,SnailIcon:EI,Snowflake:jI,SnowflakeIcon:jI,SoapDispenserDroplet:$I,SoapDispenserDropletIcon:$I,Sofa:PI,SofaIcon:PI,SolarPanel:zI,SolarPanelIcon:zI,SortAsc:xs,SortAscIcon:xs,SortDesc:gs,SortDescIcon:gs,Soup:RI,SoupIcon:RI,Space:TI,SpaceIcon:TI,Spade:DI,SpadeIcon:DI,Sparkle:HI,SparkleIcon:HI,Sparkles:Gl,SparklesIcon:Gl,Speaker:OI,SpeakerIcon:OI,Speech:FI,SpeechIcon:FI,SpellCheck:VI,SpellCheck2:qI,SpellCheck2Icon:qI,SpellCheckIcon:VI,Spline:BI,SplineIcon:BI,SplinePointer:UI,SplinePointerIcon:UI,Split:WI,SplitIcon:WI,SplitSquareHorizontal:O1,SplitSquareHorizontalIcon:O1,SplitSquareVertical:F1,SplitSquareVerticalIcon:F1,Spool:GI,SpoolIcon:GI,Spotlight:KI,SpotlightIcon:KI,SprayCan:ZI,SprayCanIcon:ZI,Sprout:XI,SproutIcon:XI,Square:t0,SquareActivity:Kl,SquareActivityIcon:Kl,SquareArrowDown:Yl,SquareArrowDownIcon:Yl,SquareArrowDownLeft:Zl,SquareArrowDownLeftIcon:Zl,SquareArrowDownRight:Xl,SquareArrowDownRightIcon:Xl,SquareArrowLeft:Ql,SquareArrowLeftIcon:Ql,SquareArrowOutDownLeft:Jl,SquareArrowOutDownLeftIcon:Jl,SquareArrowOutDownRight:e1,SquareArrowOutDownRightIcon:e1,SquareArrowOutUpLeft:t1,SquareArrowOutUpLeftIcon:t1,SquareArrowOutUpRight:n1,SquareArrowOutUpRightIcon:n1,SquareArrowRight:o1,SquareArrowRightIcon:o1,SquareArrowUp:a1,SquareArrowUpIcon:a1,SquareArrowUpLeft:r1,SquareArrowUpLeftIcon:r1,SquareArrowUpRight:s1,SquareArrowUpRightIcon:s1,SquareAsterisk:i1,SquareAsteriskIcon:i1,SquareBottomDashedScissors:c1,SquareBottomDashedScissorsIcon:c1,SquareChartGantt:Sr,SquareChartGanttIcon:Sr,SquareCheck:d1,SquareCheckBig:l1,SquareCheckBigIcon:l1,SquareCheckIcon:d1,SquareChevronDown:u1,SquareChevronDownIcon:u1,SquareChevronLeft:h1,SquareChevronLeftIcon:h1,SquareChevronRight:p1,SquareChevronRightIcon:p1,SquareChevronUp:f1,SquareChevronUpIcon:f1,SquareCode:y1,SquareCodeIcon:y1,SquareDashed:k1,SquareDashedBottom:QI,SquareDashedBottomCode:YI,SquareDashedBottomCodeIcon:YI,SquareDashedBottomIcon:QI,SquareDashedIcon:k1,SquareDashedKanban:m1,SquareDashedKanbanIcon:m1,SquareDashedMousePointer:g1,SquareDashedMousePointerIcon:g1,SquareDashedTopSolid:JI,SquareDashedTopSolidIcon:JI,SquareDivide:v1,SquareDivideIcon:v1,SquareDot:x1,SquareDotIcon:x1,SquareEqual:w1,SquareEqualIcon:w1,SquareFunction:M1,SquareFunctionIcon:M1,SquareGanttChart:Sr,SquareGanttChartIcon:Sr,SquareIcon:t0,SquareKanban:b1,SquareKanbanIcon:b1,SquareLibrary:_1,SquareLibraryIcon:_1,SquareM:C1,SquareMIcon:C1,SquareMenu:S1,SquareMenuIcon:S1,SquareMinus:L1,SquareMinusIcon:L1,SquareMousePointer:N1,SquareMousePointerIcon:N1,SquareParking:A1,SquareParkingIcon:A1,SquareParkingOff:I1,SquareParkingOffIcon:I1,SquarePause:eA,SquarePauseIcon:eA,SquarePen:to,SquarePenIcon:to,SquarePercent:E1,SquarePercentIcon:E1,SquarePi:P1,SquarePiIcon:P1,SquarePilcrow:j1,SquarePilcrowIcon:j1,SquarePlay:$1,SquarePlayIcon:$1,SquarePlus:z1,SquarePlusIcon:z1,SquarePower:R1,SquarePowerIcon:R1,SquareRadical:tA,SquareRadicalIcon:tA,SquareRoundCorner:nA,SquareRoundCornerIcon:nA,SquareScissors:T1,SquareScissorsIcon:T1,SquareSigma:D1,SquareSigmaIcon:D1,SquareSlash:H1,SquareSlashIcon:H1,SquareSplitHorizontal:O1,SquareSplitHorizontalIcon:O1,SquareSplitVertical:F1,SquareSplitVerticalIcon:F1,SquareSquare:rA,SquareSquareIcon:rA,SquareStack:oA,SquareStackIcon:oA,SquareStar:iA,SquareStarIcon:iA,SquareStop:aA,SquareStopIcon:aA,SquareTerminal:q1,SquareTerminalIcon:q1,SquareUser:B1,SquareUserIcon:B1,SquareUserRound:V1,SquareUserRoundIcon:V1,SquareX:U1,SquareXIcon:U1,SquaresExclude:sA,SquaresExcludeIcon:sA,SquaresIntersect:cA,SquaresIntersectIcon:cA,SquaresSubtract:lA,SquaresSubtractIcon:lA,SquaresUnite:dA,SquaresUniteIcon:dA,Squircle:n0,SquircleDashed:uA,SquircleDashedIcon:uA,SquircleIcon:n0,Squirrel:hA,SquirrelIcon:hA,Stamp:fA,StampIcon:fA,Star:mA,StarHalf:pA,StarHalfIcon:pA,StarIcon:mA,StarOff:yA,StarOffIcon:yA,Stars:Gl,StarsIcon:Gl,StepBack:gA,StepBackIcon:gA,StepForward:kA,StepForwardIcon:kA,Stethoscope:vA,StethoscopeIcon:vA,Sticker:o0,StickerIcon:o0,StickyNote:kh,StickyNoteIcon:kh,Stone:xA,StoneIcon:xA,StopCircle:yc,StopCircleIcon:yc,Store:wA,StoreIcon:wA,StretchHorizontal:bA,StretchHorizontalIcon:bA,StretchVertical:MA,StretchVerticalIcon:MA,Strikethrough:_A,StrikethroughIcon:_A,Subscript:CA,SubscriptIcon:CA,Subtitles:Is,SubtitlesIcon:Is,Sun:AA,SunDim:SA,SunDimIcon:SA,SunIcon:AA,SunMedium:LA,SunMediumIcon:LA,SunMoon:NA,SunMoonIcon:NA,SunSnow:IA,SunSnowIcon:IA,Sunrise:EA,SunriseIcon:EA,Sunset:jA,SunsetIcon:jA,Superscript:$A,SuperscriptIcon:$A,SwatchBook:PA,SwatchBookIcon:PA,SwissFranc:zA,SwissFrancIcon:zA,SwitchCamera:RA,SwitchCameraIcon:RA,Sword:TA,SwordIcon:TA,Swords:DA,SwordsIcon:DA,Syringe:HA,SyringeIcon:HA,Table:GA,Table2:OA,Table2Icon:OA,TableCellsMerge:FA,TableCellsMergeIcon:FA,TableCellsSplit:qA,TableCellsSplitIcon:qA,TableColumnsSplit:VA,TableColumnsSplitIcon:VA,TableConfig:wr,TableConfigIcon:wr,TableIcon:GA,TableOfContents:BA,TableOfContentsIcon:BA,TableProperties:UA,TablePropertiesIcon:UA,TableRowsSplit:WA,TableRowsSplitIcon:WA,Tablet:ZA,TabletIcon:ZA,TabletSmartphone:KA,TabletSmartphoneIcon:KA,Tablets:XA,TabletsIcon:XA,Tag:YA,TagIcon:YA,Tags:QA,TagsIcon:QA,Tally1:JA,Tally1Icon:JA,Tally2:eE,Tally2Icon:eE,Tally3:tE,Tally3Icon:tE,Tally4:nE,Tally4Icon:nE,Tally5:oE,Tally5Icon:oE,Tangent:rE,TangentIcon:rE,Target:aE,TargetIcon:aE,Telescope:iE,TelescopeIcon:iE,Tent:cE,TentIcon:cE,TentTree:sE,TentTreeIcon:sE,Terminal:lE,TerminalIcon:lE,TerminalSquare:q1,TerminalSquareIcon:q1,TestTube:dE,TestTube2:W1,TestTube2Icon:W1,TestTubeDiagonal:W1,TestTubeDiagonalIcon:W1,TestTubeIcon:dE,TestTubes:uE,TestTubesIcon:uE,Text:Bo,TextAlignCenter:ui,TextAlignCenterIcon:ui,TextAlignEnd:hi,TextAlignEndIcon:hi,TextAlignJustify:G1,TextAlignJustifyIcon:G1,TextAlignStart:Bo,TextAlignStartIcon:Bo,TextCursor:fE,TextCursorIcon:fE,TextCursorInput:hE,TextCursorInputIcon:hE,TextIcon:Bo,TextInitial:K1,TextInitialIcon:K1,TextQuote:pE,TextQuoteIcon:pE,TextSearch:yE,TextSearchIcon:yE,TextSelect:Z1,TextSelectIcon:Z1,TextSelection:Z1,TextSelectionIcon:Z1,TextWrap:X1,TextWrapIcon:X1,Theater:mE,TheaterIcon:mE,Thermometer:vE,ThermometerIcon:vE,ThermometerSnowflake:gE,ThermometerSnowflakeIcon:gE,ThermometerSun:kE,ThermometerSunIcon:kE,ThumbsDown:xE,ThumbsDownIcon:xE,ThumbsUp:wE,ThumbsUpIcon:wE,Ticket:NE,TicketCheck:ME,TicketCheckIcon:ME,TicketIcon:NE,TicketMinus:bE,TicketMinusIcon:bE,TicketPercent:_E,TicketPercentIcon:_E,TicketPlus:CE,TicketPlusIcon:CE,TicketSlash:SE,TicketSlashIcon:SE,TicketX:LE,TicketXIcon:LE,Tickets:AE,TicketsIcon:AE,TicketsPlane:IE,TicketsPlaneIcon:IE,Timer:$E,TimerIcon:$E,TimerOff:EE,TimerOffIcon:EE,TimerReset:jE,TimerResetIcon:jE,ToggleLeft:PE,ToggleLeftIcon:PE,ToggleRight:zE,ToggleRightIcon:zE,Toilet:RE,ToiletIcon:RE,ToolCase:DE,ToolCaseIcon:DE,Toolbox:TE,ToolboxIcon:TE,Tornado:HE,TornadoIcon:HE,Torus:OE,TorusIcon:OE,Touchpad:qE,TouchpadIcon:qE,TouchpadOff:FE,TouchpadOffIcon:FE,TowerControl:VE,TowerControlIcon:VE,ToyBrick:BE,ToyBrickIcon:BE,Tractor:UE,TractorIcon:UE,TrafficCone:WE,TrafficConeIcon:WE,Train:Y1,TrainFront:KE,TrainFrontIcon:KE,TrainFrontTunnel:GE,TrainFrontTunnelIcon:GE,TrainIcon:Y1,TrainTrack:ZE,TrainTrackIcon:ZE,TramFront:Y1,TramFrontIcon:Y1,Transgender:XE,TransgenderIcon:XE,Trash:YE,Trash2:vh,Trash2Icon:vh,TrashIcon:YE,TreeDeciduous:QE,TreeDeciduousIcon:QE,TreePalm:Q1,TreePalmIcon:Q1,TreePine:JE,TreePineIcon:JE,Trees:ej,TreesIcon:ej,Trello:tj,TrelloIcon:tj,TrendingDown:nj,TrendingDownIcon:nj,TrendingUp:rj,TrendingUpDown:oj,TrendingUpDownIcon:oj,TrendingUpIcon:rj,Triangle:sj,TriangleAlert:Er,TriangleAlertIcon:Er,TriangleDashed:aj,TriangleDashedIcon:aj,TriangleIcon:sj,TriangleRight:ij,TriangleRightIcon:ij,Trophy:cj,TrophyIcon:cj,Truck:dj,TruckElectric:lj,TruckElectricIcon:lj,TruckIcon:dj,TurkishLira:uj,TurkishLiraIcon:uj,Turntable:hj,TurntableIcon:hj,Turtle:fj,TurtleIcon:fj,Tv:yj,Tv2:J1,Tv2Icon:J1,TvIcon:yj,TvMinimal:J1,TvMinimalIcon:J1,TvMinimalPlay:pj,TvMinimalPlayIcon:pj,Twitch:mj,TwitchIcon:mj,Twitter:gj,TwitterIcon:gj,Type:r0,TypeIcon:r0,TypeOutline:kj,TypeOutlineIcon:kj,Umbrella:xj,UmbrellaIcon:xj,UmbrellaOff:vj,UmbrellaOffIcon:vj,Underline:wj,UnderlineIcon:wj,Undo:_j,Undo2:Mj,Undo2Icon:Mj,UndoDot:bj,UndoDotIcon:bj,UndoIcon:_j,UnfoldHorizontal:Cj,UnfoldHorizontalIcon:Cj,UnfoldVertical:Sj,UnfoldVerticalIcon:Sj,Ungroup:Lj,UngroupIcon:Lj,University:ed,UniversityIcon:ed,Unlink:Ij,Unlink2:Nj,Unlink2Icon:Nj,UnlinkIcon:Ij,Unlock:gl,UnlockIcon:gl,UnlockKeyhole:ml,UnlockKeyholeIcon:ml,Unplug:Aj,UnplugIcon:Aj,Upload:xh,UploadCloud:wc,UploadCloudIcon:wc,UploadIcon:xh,Usb:Ej,UsbIcon:Ej,User:wh,User2:id,User2Icon:id,UserCheck:jj,UserCheck2:td,UserCheck2Icon:td,UserCheckIcon:jj,UserCircle:mc,UserCircle2:pc,UserCircle2Icon:pc,UserCircleIcon:mc,UserCog:$j,UserCog2:nd,UserCog2Icon:nd,UserCogIcon:$j,UserIcon:wh,UserKey:Pj,UserKeyIcon:Pj,UserLock:zj,UserLockIcon:zj,UserMinus:Rj,UserMinus2:od,UserMinus2Icon:od,UserMinusIcon:Rj,UserPen:Tj,UserPenIcon:Tj,UserPlus:Dj,UserPlus2:rd,UserPlus2Icon:rd,UserPlusIcon:Dj,UserRound:id,UserRoundCheck:td,UserRoundCheckIcon:td,UserRoundCog:nd,UserRoundCogIcon:nd,UserRoundIcon:id,UserRoundKey:Hj,UserRoundKeyIcon:Hj,UserRoundMinus:od,UserRoundMinusIcon:od,UserRoundPen:Oj,UserRoundPenIcon:Oj,UserRoundPlus:rd,UserRoundPlusIcon:rd,UserRoundSearch:Fj,UserRoundSearchIcon:Fj,UserRoundX:ad,UserRoundXIcon:ad,UserSearch:qj,UserSearchIcon:qj,UserSquare:B1,UserSquare2:V1,UserSquare2Icon:V1,UserSquareIcon:B1,UserStar:Vj,UserStarIcon:Vj,UserX:Bj,UserX2:ad,UserX2Icon:ad,UserXIcon:Bj,Users:Uj,Users2:sd,Users2Icon:sd,UsersIcon:Uj,UsersRound:sd,UsersRoundIcon:sd,Utensils:ld,UtensilsCrossed:cd,UtensilsCrossedIcon:cd,UtensilsIcon:ld,UtilityPole:Wj,UtilityPoleIcon:Wj,Van:Gj,VanIcon:Gj,Variable:Kj,VariableIcon:Kj,Vault:Zj,VaultIcon:Zj,VectorSquare:Xj,VectorSquareIcon:Xj,Vegan:Yj,VeganIcon:Yj,VenetianMask:Qj,VenetianMaskIcon:Qj,Venus:e$,VenusAndMars:Jj,VenusAndMarsIcon:Jj,VenusIcon:e$,Verified:bs,VerifiedIcon:bs,Vibrate:n$,VibrateIcon:n$,VibrateOff:t$,VibrateOffIcon:t$,Video:r$,VideoIcon:r$,VideoOff:o$,VideoOffIcon:o$,Videotape:a$,VideotapeIcon:a$,View:i$,ViewIcon:i$,Voicemail:s$,VoicemailIcon:s$,Volleyball:c$,VolleyballIcon:c$,Volume:f$,Volume1:l$,Volume1Icon:l$,Volume2:d$,Volume2Icon:d$,VolumeIcon:f$,VolumeOff:u$,VolumeOffIcon:u$,VolumeX:h$,VolumeXIcon:h$,Vote:p$,VoteIcon:p$,Wallet:m$,Wallet2:dd,Wallet2Icon:dd,WalletCards:y$,WalletCardsIcon:y$,WalletIcon:m$,WalletMinimal:dd,WalletMinimalIcon:dd,Wallpaper:g$,WallpaperIcon:g$,Wand:k$,Wand2:ud,Wand2Icon:ud,WandIcon:k$,WandSparkles:ud,WandSparklesIcon:ud,Warehouse:v$,WarehouseIcon:v$,WashingMachine:x$,WashingMachineIcon:x$,Watch:w$,WatchIcon:w$,Waves:C$,WavesArrowDown:M$,WavesArrowDownIcon:M$,WavesArrowUp:b$,WavesArrowUpIcon:b$,WavesIcon:C$,WavesLadder:_$,WavesLadderIcon:_$,Waypoints:S$,WaypointsIcon:S$,Webcam:L$,WebcamIcon:L$,Webhook:I$,WebhookIcon:I$,WebhookOff:N$,WebhookOffIcon:N$,Weight:E$,WeightIcon:E$,WeightTilde:A$,WeightTildeIcon:A$,Wheat:P$,WheatIcon:P$,WheatOff:j$,WheatOffIcon:j$,WholeWord:$$,WholeWordIcon:$$,Wifi:q$,WifiCog:z$,WifiCogIcon:z$,WifiHigh:R$,WifiHighIcon:R$,WifiIcon:q$,WifiLow:T$,WifiLowIcon:T$,WifiOff:D$,WifiOffIcon:D$,WifiPen:H$,WifiPenIcon:H$,WifiSync:O$,WifiSyncIcon:O$,WifiZero:F$,WifiZeroIcon:F$,Wind:B$,WindArrowDown:V$,WindArrowDownIcon:V$,WindIcon:B$,Wine:W$,WineIcon:W$,WineOff:U$,WineOffIcon:U$,Workflow:G$,WorkflowIcon:G$,Worm:K$,WormIcon:K$,WrapText:X1,WrapTextIcon:X1,Wrench:Z$,WrenchIcon:Z$,X:Ai,XCircle:gc,XCircleIcon:gc,XIcon:Ai,XOctagon:Cl,XOctagonIcon:Cl,XSquare:U1,XSquareIcon:U1,Youtube:X$,YoutubeIcon:X$,Zap:Q$,ZapIcon:Q$,ZapOff:Y$,ZapOffIcon:Y$,ZoomIn:J$,ZoomInIcon:J$,ZoomOut:eP,ZoomOutIcon:eP,createLucideIcon:d,icons:gAe},Symbol.toStringTag,{value:"Module"})),vAe=new Set(["createLucideIcon","Icon","icons","default"]),xAe=Symbol.for("react.forward_ref");function wAe(e){return typeof e=="function"?!0:e!==null&&typeof e=="object"?e.$$typeof===xAe:!1}function MAe(e){return e.replace(/[A-Z]/g,(t,n)=>n===0?t.toLowerCase():`-${t.toLowerCase()}`)}function bAe(){const e={};for(const[t,n]of Object.entries(kAe))vAe.has(t)||wAe(n)&&(e[MAe(t)]=n);return e}const Wh=bAe(),_Ae="help-circle",CAe=Object.keys(Wh).sort(),SAe=["logos:aws","logos:google-cloud","logos:microsoft-azure"],OP={lucide:CAe,aws:[],gcp:[],azure:[],iconify:[...SAe]};function kH(e){for(const t of e)t.installed?OP[t.vendor]=[...t.iconNames]:OP[t.vendor]=[]}const LAe=["aws","gcp","azure","iconify"];function CY(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}:LAe.includes(o)?{vendor:o,name:r}:null}function NAe(e){return e.vendor==="lucide"?e.name:`${e.vendor}:${e.name}`}function IAe(e,t){const n=CY(e);if(!n)return null;if(n.vendor==="lucide"){const o=Wh[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 AAe="modulepreload",EAe=function(e){return"/"+e},HB={},V0=function(t,n,o){let r=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const i=document.querySelector("meta[property=csp-nonce]"),s=(i==null?void 0:i.nonce)||(i==null?void 0:i.getAttribute("nonce"));r=Promise.allSettled(n.map(c=>{if(c=EAe(c),c in HB)return;HB[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":AAe,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 a(i){const s=new Event("vite:preloadError",{cancelable:!0});if(s.payload=i,window.dispatchEvent(s),!s.defaultPrevented)throw i}return r.then(i=>{for(const s of i||[])s.status==="rejected"&&a(s.reason);return t().catch(a)})};let yp=null;function jAe(){return yp||(yp=V0(()=>import("./iconify-DP0e3Q9S.js"),[]).then(e=>e,()=>null),yp)}function SY(e,t){return f.jsx(Vo,{className:e,"aria-label":t,"aria-hidden":t===void 0?!0:void 0,"data-testid":"icon-renderer-placeholder"})}function $Ae({identifier:e,className:t,ariaLabel:n,color:o}){const[r,a]=m.useState(null);if(m.useEffect(()=>{let s=!0;return jAe().then(c=>{s&&a(c)}),()=>{s=!1}},[]),!r)return SY(t,n);const i=r.Icon;return f.jsx(i,{icon:e,className:t,color:o,"aria-label":n,"aria-hidden":n===void 0?!0:void 0})}function LY({iconId:e,studioBaseUrl:t,className:n,ariaLabel:o,color:r,strokeWidth:a,absoluteStrokeWidth:i}){const s=IAe(e,{studioBaseUrl:t});if(!s)return SY(n,o);if(s.kind==="lucide"){const c=s.component;return f.jsx(c,{className:n,color:r,strokeWidth:a,absoluteStrokeWidth:i,"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($Ae,{identifier:s.identifier,className:n,ariaLabel:o,color:r})}const PAe={studioBaseUrl:""},CF=m.createContext(PAe);function zAe({value:e,children:t}){return f.jsx(CF.Provider,{value:e,children:t})}const RAe=[".png",".jpg",".jpeg",".gif",".webp",".svg"],TAe=400,vH={width:200,height:200},DAe=e=>{const t=e.lastIndexOf(".");return t>=0?e.slice(t).toLowerCase():""},HAe=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 RAe.includes(DAe(e.name))},OAe=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&&HAe(r)&&n.push(r)}return n},FAe=(e,t=TAe)=>{if(e.width<=0||e.height<=0)return{...vH};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)}},qAe=24,VAe=4,BAe=(e,t,n=qAe,o=VAe)=>{if(e.length===0)return[];const r=Math.min(e.length,Math.max(1,o)),a=Math.ceil(e.length/r),i=new Array(r).fill(0),s=new Array(a).fill(0);e.forEach((g,k)=>{const x=k%r,v=Math.floor(k/r);i[x]=Math.max(i[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]+i[g-1]+n;const l=new Array(a).fill(0);for(let g=1;g<a;g++)l[g]=l[g-1]+s[g-1]+n;const h=i.reduce((g,k)=>g+k,0)+n*(r-1),u=s.reduce((g,k)=>g+k,0)+n*(a-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]}})},UAe=async e=>{const t=OAe(e.dataTransfer);if(t.length===0||!e.rfInstance)return!1;const n=e.rfInstance.screenToFlowPosition(e.clientPos),o=await Promise.all(t.map(a=>e.computeDims(a))),r=BAe(o,n);return t.forEach((a,i)=>{e.dispatch({file:a,position:r[i],dims:o[i],originalFilename:a.name})}),!0},WAe=e=>new Promise(t=>{let n=null;const o=a=>{n&&URL.revokeObjectURL(n),t(a)};try{n=URL.createObjectURL(e)}catch{t({...vH});return}const r=new Image;r.onload=()=>{o(FAe({width:r.naturalWidth,height:r.naturalHeight}))},r.onerror=()=>{o({...vH})},r.src=n}),GAe=2048,KAe=e=>{const t=e.type.toLowerCase();return t==="image/png"||t==="image/jpeg"||t==="image/webp"},ZAe=async(e,t=GAe)=>{if(!KAe(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,a=Math.round(n.width*r),i=Math.round(n.height*r),s=document.createElement("canvas");s.width=a,s.height=i;const c=s.getContext("2d");if(!c)return n.close(),e;c.drawImage(n,0,0,a,i),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 NY(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=NY(e[t]))&&(o&&(o+=" "),o+=n)}else for(n in e)e[n]&&(o&&(o+=" "),o+=n);return o}function IY(){for(var e,t,n=0,o="",r=arguments.length;n<r;n++)(e=arguments[n])&&(t=NY(e))&&(o&&(o+=" "),o+=t);return o}const SF="-",XAe=e=>{const t=QAe(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:i=>{const s=i.split(SF);return s[0]===""&&s.length!==1&&s.shift(),AY(s,t)||YAe(i)},getConflictingClassGroupIds:(i,s)=>{const c=n[i]||[];return s&&o[i]?[...c,...o[i]]:c}}},AY=(e,t)=>{var i;if(e.length===0)return t.classGroupId;const n=e[0],o=t.nextPart.get(n),r=o?AY(e.slice(1),o):void 0;if(r)return r;if(t.validators.length===0)return;const a=e.join(SF);return(i=t.validators.find(({validator:s})=>s(a)))==null?void 0:i.classGroupId},OB=/^\[(.+)\]$/,YAe=e=>{if(OB.test(e)){const t=OB.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},QAe=e=>{const{theme:t,prefix:n}=e,o={nextPart:new Map,validators:[]};return eEe(Object.entries(e.classGroups),n).forEach(([a,i])=>{xH(i,o,a,t)}),o},xH=(e,t,n,o)=>{e.forEach(r=>{if(typeof r=="string"){const a=r===""?t:FB(t,r);a.classGroupId=n;return}if(typeof r=="function"){if(JAe(r)){xH(r(o),t,n,o);return}t.validators.push({validator:r,classGroupId:n});return}Object.entries(r).forEach(([a,i])=>{xH(i,FB(t,a),n,o)})})},FB=(e,t)=>{let n=e;return t.split(SF).forEach(o=>{n.nextPart.has(o)||n.nextPart.set(o,{nextPart:new Map,validators:[]}),n=n.nextPart.get(o)}),n},JAe=e=>e.isThemeGetter,eEe=(e,t)=>t?e.map(([n,o])=>{const r=o.map(a=>typeof a=="string"?t+a:typeof a=="object"?Object.fromEntries(Object.entries(a).map(([i,s])=>[t+i,s])):a);return[n,r]}):e,tEe=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,o=new Map;const r=(a,i)=>{n.set(a,i),t++,t>e&&(t=0,o=n,n=new Map)};return{get(a){let i=n.get(a);if(i!==void 0)return i;if((i=o.get(a))!==void 0)return r(a,i),i},set(a,i){n.has(a)?n.set(a,i):r(a,i)}}},EY="!",nEe=e=>{const{separator:t,experimentalParseClassName:n}=e,o=t.length===1,r=t[0],a=t.length,i=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+a)===t)){c.push(s.slice(h,x)),h=x+a;continue}if(v==="/"){u=x;continue}}v==="["?l++:v==="]"&&l--}const p=c.length===0?s:s.substring(h),y=p.startsWith(EY),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:i}):i},oEe=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},rEe=e=>({cache:tEe(e.cacheSize),parseClassName:nEe(e),...XAe(e)}),aEe=/\s+/,iEe=(e,t)=>{const{parseClassName:n,getClassGroupId:o,getConflictingClassGroupIds:r}=t,a=[],i=e.trim().split(aEe);let s="";for(let c=i.length-1;c>=0;c-=1){const l=i[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=oEe(h).join(":"),v=u?x+EY:x,M=v+k;if(a.includes(M))continue;a.push(M);const w=r(k,g);for(let b=0;b<w.length;++b){const C=w[b];a.push(v+C)}s=l+(s.length>0?" "+s:s)}return s};function sEe(){let e=0,t,n,o="";for(;e<arguments.length;)(t=arguments[e++])&&(n=jY(t))&&(o&&(o+=" "),o+=n);return o}const jY=e=>{if(typeof e=="string")return e;let t,n="";for(let o=0;o<e.length;o++)e[o]&&(t=jY(e[o]))&&(n&&(n+=" "),n+=t);return n};function cEe(e,...t){let n,o,r,a=i;function i(c){const l=t.reduce((h,u)=>u(h),e());return n=rEe(l),o=n.cache.get,r=n.cache.set,a=s,s(c)}function s(c){const l=o(c);if(l)return l;const h=iEe(c,n);return r(c,h),h}return function(){return a(sEe.apply(null,arguments))}}const wt=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},$Y=/^\[(?:([a-z-]+):)?(.+)\]$/i,lEe=/^\d+\/\d+$/,dEe=new Set(["px","full","screen"]),uEe=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,hEe=/\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$/,fEe=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,pEe=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,yEe=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ua=e=>a0(e)||dEe.has(e)||lEe.test(e),Ja=e=>B0(e,"length",bEe),a0=e=>!!e&&!Number.isNaN(Number(e)),MT=e=>B0(e,"number",a0),v2=e=>!!e&&Number.isInteger(Number(e)),mEe=e=>e.endsWith("%")&&a0(e.slice(0,-1)),Be=e=>$Y.test(e),ei=e=>uEe.test(e),gEe=new Set(["length","size","percentage"]),kEe=e=>B0(e,gEe,PY),vEe=e=>B0(e,"position",PY),xEe=new Set(["image","url"]),wEe=e=>B0(e,xEe,CEe),MEe=e=>B0(e,"",_Ee),x2=()=>!0,B0=(e,t,n)=>{const o=$Y.exec(e);return o?o[1]?typeof t=="string"?o[1]===t:t.has(o[1]):n(o[2]):!1},bEe=e=>hEe.test(e)&&!fEe.test(e),PY=()=>!1,_Ee=e=>pEe.test(e),CEe=e=>yEe.test(e),SEe=()=>{const e=wt("colors"),t=wt("spacing"),n=wt("blur"),o=wt("brightness"),r=wt("borderColor"),a=wt("borderRadius"),i=wt("borderSpacing"),s=wt("borderWidth"),c=wt("contrast"),l=wt("grayscale"),h=wt("hueRotate"),u=wt("invert"),p=wt("gap"),y=wt("gradientColorStops"),g=wt("gradientColorStopPositions"),k=wt("inset"),x=wt("margin"),v=wt("opacity"),M=wt("padding"),w=wt("saturate"),b=wt("scale"),C=wt("sepia"),_=wt("skew"),S=wt("space"),N=wt("translate"),P=()=>["auto","contain","none"],A=()=>["auto","hidden","clip","visible","scroll"],E=()=>["auto",Be,t],z=()=>[Be,t],W=()=>["",ua,Ja],$=()=>["auto",a0,Be],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",Be],L=()=>["auto","avoid","all","avoid-page","page","left","right","column"],V=()=>[a0,Be];return{cacheSize:500,separator:":",theme:{colors:[x2],spacing:[ua,Ja],blur:["none","",ei,Be],brightness:V(),borderColor:[e],borderRadius:["none","","full",ei,Be],borderSpacing:z(),borderWidth:W(),contrast:V(),grayscale:R(),hueRotate:V(),invert:R(),gap:z(),gradientColorStops:[e],gradientColorStopPositions:[mEe,Ja],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",Be]}],container:["container"],columns:[{columns:[ei]}],"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(),Be]}],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",v2,Be]}],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",Be]}],grow:[{grow:R()}],shrink:[{shrink:R()}],order:[{order:["first","last","none",v2,Be]}],"grid-cols":[{"grid-cols":[x2]}],"col-start-end":[{col:["auto",{span:["full",v2,Be]},Be]}],"col-start":[{"col-start":$()}],"col-end":[{"col-end":$()}],"grid-rows":[{"grid-rows":[x2]}],"row-start-end":[{row:["auto",{span:[v2,Be]},Be]}],"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",Be]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Be]}],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",Be,t]}],"min-w":[{"min-w":[Be,t,"min","max","fit"]}],"max-w":[{"max-w":[Be,t,"none","full","min","max","fit","prose",{screen:[ei]},ei]}],h:[{h:[Be,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Be,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Be,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Be,t,"auto","min","max","fit"]}],"font-size":[{text:["base",ei,Ja]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",MT]}],"font-family":[{font:[x2]}],"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",Be]}],"line-clamp":[{"line-clamp":["none",a0,MT]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",ua,Be]}],"list-image":[{"list-image":["none",Be]}],"list-style-type":[{list:["none","disc","decimal",Be]}],"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",ua,Ja]}],"underline-offset":[{"underline-offset":["auto",ua,Be]}],"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",Be]}],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",Be]}],"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(),vEe]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",kEe]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},wEe]}],"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:[a]}],"rounded-s":[{"rounded-s":[a]}],"rounded-e":[{"rounded-e":[a]}],"rounded-t":[{"rounded-t":[a]}],"rounded-r":[{"rounded-r":[a]}],"rounded-b":[{"rounded-b":[a]}],"rounded-l":[{"rounded-l":[a]}],"rounded-ss":[{"rounded-ss":[a]}],"rounded-se":[{"rounded-se":[a]}],"rounded-ee":[{"rounded-ee":[a]}],"rounded-es":[{"rounded-es":[a]}],"rounded-tl":[{"rounded-tl":[a]}],"rounded-tr":[{"rounded-tr":[a]}],"rounded-br":[{"rounded-br":[a]}],"rounded-bl":[{"rounded-bl":[a]}],"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":[ua,Be]}],"outline-w":[{outline:[ua,Ja]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:W()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[v]}],"ring-offset-w":[{"ring-offset":[ua,Ja]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",ei,MEe]}],"shadow-color":[{shadow:[x2]}],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",ei,Be]}],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":[i]}],"border-spacing-x":[{"border-spacing-x":[i]}],"border-spacing-y":[{"border-spacing-y":[i]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Be]}],duration:[{duration:V()}],ease:[{ease:["linear","in","out","in-out",Be]}],delay:[{delay:V()}],animate:[{animate:["none","spin","ping","pulse","bounce",Be]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[b]}],"scale-x":[{"scale-x":[b]}],"scale-y":[{"scale-y":[b]}],rotate:[{rotate:[v2,Be]}],"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",Be]}],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",Be]}],"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",Be]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[ua,Ja,MT]}],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"]}}},LEe=cEe(SEe);function te(...e){return LEe(IY(e))}function Ut(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=Ut(e[n]))!==""&&(t+=(t&&" ")+o);else for(let n in e)e[n]&&(t+=(t&&" ")+n);return t}var NEe={value:()=>{}};function Gz(){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 tP(n)}function tP(e){this._=e}function IEe(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}})}tP.prototype=Gz.prototype={constructor:tP,on:function(e,t){var n=this._,o=IEe(e+"",n),r,a=-1,i=o.length;if(arguments.length<2){for(;++a<i;)if((r=(e=o[a]).type)&&(r=AEe(n[r],e.name)))return r;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++a<i;)if(r=(e=o[a]).type)n[r]=qB(n[r],e.name,t);else if(t==null)for(r in n)n[r]=qB(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 tP(e)},call:function(e,t){if((r=arguments.length-2)>0)for(var n=new Array(r),o=0,r,a;o<r;++o)n[o]=arguments[o+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(a=this._[e],o=0,r=a.length;o<r;++o)a[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,a=o.length;r<a;++r)o[r].value.apply(t,n)}};function AEe(e,t){for(var n=0,o=e.length,r;n<o;++n)if((r=e[n]).name===t)return r.value}function qB(e,t,n){for(var o=0,r=e.length;o<r;++o)if(e[o].name===t){e[o]=NEe,e=e.slice(0,o).concat(e.slice(o+1));break}return n!=null&&e.push({name:t,value:n}),e}var wH="http://www.w3.org/1999/xhtml";const VB={svg:"http://www.w3.org/2000/svg",xhtml:wH,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Kz(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),VB.hasOwnProperty(t)?{space:VB[t],local:e}:e}function EEe(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===wH&&t.documentElement.namespaceURI===wH?t.createElement(e):t.createElementNS(n,e)}}function jEe(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function zY(e){var t=Kz(e);return(t.local?jEe:EEe)(t)}function $Ee(){}function LF(e){return e==null?$Ee:function(){return this.querySelector(e)}}function PEe(e){typeof e!="function"&&(e=LF(e));for(var t=this._groups,n=t.length,o=new Array(n),r=0;r<n;++r)for(var a=t[r],i=a.length,s=o[r]=new Array(i),c,l,h=0;h<i;++h)(c=a[h])&&(l=e.call(c,c.__data__,h,a))&&("__data__"in c&&(l.__data__=c.__data__),s[h]=l);return new fo(o,this._parents)}function zEe(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function REe(){return[]}function RY(e){return e==null?REe:function(){return this.querySelectorAll(e)}}function TEe(e){return function(){return zEe(e.apply(this,arguments))}}function DEe(e){typeof e=="function"?e=TEe(e):e=RY(e);for(var t=this._groups,n=t.length,o=[],r=[],a=0;a<n;++a)for(var i=t[a],s=i.length,c,l=0;l<s;++l)(c=i[l])&&(o.push(e.call(c,c.__data__,l,i)),r.push(c));return new fo(o,r)}function TY(e){return function(){return this.matches(e)}}function DY(e){return function(t){return t.matches(e)}}var HEe=Array.prototype.find;function OEe(e){return function(){return HEe.call(this.children,e)}}function FEe(){return this.firstElementChild}function qEe(e){return this.select(e==null?FEe:OEe(typeof e=="function"?e:DY(e)))}var VEe=Array.prototype.filter;function BEe(){return Array.from(this.children)}function UEe(e){return function(){return VEe.call(this.children,e)}}function WEe(e){return this.selectAll(e==null?BEe:UEe(typeof e=="function"?e:DY(e)))}function GEe(e){typeof e!="function"&&(e=TY(e));for(var t=this._groups,n=t.length,o=new Array(n),r=0;r<n;++r)for(var a=t[r],i=a.length,s=o[r]=[],c,l=0;l<i;++l)(c=a[l])&&e.call(c,c.__data__,l,a)&&s.push(c);return new fo(o,this._parents)}function HY(e){return new Array(e.length)}function KEe(){return new fo(this._enter||this._groups.map(HY),this._parents)}function FP(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}FP.prototype={constructor:FP,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 ZEe(e){return function(){return e}}function XEe(e,t,n,o,r,a){for(var i=0,s,c=t.length,l=a.length;i<l;++i)(s=t[i])?(s.__data__=a[i],o[i]=s):n[i]=new FP(e,a[i]);for(;i<c;++i)(s=t[i])&&(r[i]=s)}function YEe(e,t,n,o,r,a,i){var s,c,l=new Map,h=t.length,u=a.length,p=new Array(h),y;for(s=0;s<h;++s)(c=t[s])&&(p[s]=y=i.call(c,c.__data__,s,t)+"",l.has(y)?r[s]=c:l.set(y,c));for(s=0;s<u;++s)y=i.call(e,a[s],s,a)+"",(c=l.get(y))?(o[s]=c,c.__data__=a[s],l.delete(y)):n[s]=new FP(e,a[s]);for(s=0;s<h;++s)(c=t[s])&&l.get(p[s])===c&&(r[s]=c)}function QEe(e){return e.__data__}function JEe(e,t){if(!arguments.length)return Array.from(this,QEe);var n=t?YEe:XEe,o=this._parents,r=this._groups;typeof e!="function"&&(e=ZEe(e));for(var a=r.length,i=new Array(a),s=new Array(a),c=new Array(a),l=0;l<a;++l){var h=o[l],u=r[l],p=u.length,y=eje(e.call(h,h&&h.__data__,l,o)),g=y.length,k=s[l]=new Array(g),x=i[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 i=new fo(i,o),i._enter=s,i._exit=c,i}function eje(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function tje(){return new fo(this._exit||this._groups.map(HY),this._parents)}function nje(e,t,n){var o=this.enter(),r=this,a=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?a.remove():n(a),o&&r?o.merge(r).order():r}function oje(e){for(var t=e.selection?e.selection():e,n=this._groups,o=t._groups,r=n.length,a=o.length,i=Math.min(r,a),s=new Array(r),c=0;c<i;++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 fo(s,this._parents)}function rje(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var o=e[t],r=o.length-1,a=o[r],i;--r>=0;)(i=o[r])&&(a&&i.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(i,a),a=i);return this}function aje(e){e||(e=ije);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),a=0;a<o;++a){for(var i=n[a],s=i.length,c=r[a]=new Array(s),l,h=0;h<s;++h)(l=i[h])&&(c[h]=l);c.sort(t)}return new fo(r,this._parents).order()}function ije(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function sje(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function cje(){return Array.from(this)}function lje(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var o=e[t],r=0,a=o.length;r<a;++r){var i=o[r];if(i)return i}return null}function dje(){let e=0;for(const t of this)++e;return e}function uje(){return!this.node()}function hje(e){for(var t=this._groups,n=0,o=t.length;n<o;++n)for(var r=t[n],a=0,i=r.length,s;a<i;++a)(s=r[a])&&e.call(s,s.__data__,a,r);return this}function fje(e){return function(){this.removeAttribute(e)}}function pje(e){return function(){this.removeAttributeNS(e.space,e.local)}}function yje(e,t){return function(){this.setAttribute(e,t)}}function mje(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function gje(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function kje(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 vje(e,t){var n=Kz(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?pje:fje:typeof t=="function"?n.local?kje:gje:n.local?mje:yje)(n,t))}function OY(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function xje(e){return function(){this.style.removeProperty(e)}}function wje(e,t,n){return function(){this.style.setProperty(e,t,n)}}function Mje(e,t,n){return function(){var o=t.apply(this,arguments);o==null?this.style.removeProperty(e):this.style.setProperty(e,o,n)}}function bje(e,t,n){return arguments.length>1?this.each((t==null?xje:typeof t=="function"?Mje:wje)(e,t,n??"")):v0(this.node(),e)}function v0(e,t){return e.style.getPropertyValue(t)||OY(e).getComputedStyle(e,null).getPropertyValue(t)}function _je(e){return function(){delete this[e]}}function Cje(e,t){return function(){this[e]=t}}function Sje(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function Lje(e,t){return arguments.length>1?this.each((t==null?_je:typeof t=="function"?Sje:Cje)(e,t)):this.node()[e]}function FY(e){return e.trim().split(/^|\s+/)}function NF(e){return e.classList||new qY(e)}function qY(e){this._node=e,this._names=FY(e.getAttribute("class")||"")}qY.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 VY(e,t){for(var n=NF(e),o=-1,r=t.length;++o<r;)n.add(t[o])}function BY(e,t){for(var n=NF(e),o=-1,r=t.length;++o<r;)n.remove(t[o])}function Nje(e){return function(){VY(this,e)}}function Ije(e){return function(){BY(this,e)}}function Aje(e,t){return function(){(t.apply(this,arguments)?VY:BY)(this,e)}}function Eje(e,t){var n=FY(e+"");if(arguments.length<2){for(var o=NF(this.node()),r=-1,a=n.length;++r<a;)if(!o.contains(n[r]))return!1;return!0}return this.each((typeof t=="function"?Aje:t?Nje:Ije)(n,t))}function jje(){this.textContent=""}function $je(e){return function(){this.textContent=e}}function Pje(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function zje(e){return arguments.length?this.each(e==null?jje:(typeof e=="function"?Pje:$je)(e)):this.node().textContent}function Rje(){this.innerHTML=""}function Tje(e){return function(){this.innerHTML=e}}function Dje(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function Hje(e){return arguments.length?this.each(e==null?Rje:(typeof e=="function"?Dje:Tje)(e)):this.node().innerHTML}function Oje(){this.nextSibling&&this.parentNode.appendChild(this)}function Fje(){return this.each(Oje)}function qje(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Vje(){return this.each(qje)}function Bje(e){var t=typeof e=="function"?e:zY(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function Uje(){return null}function Wje(e,t){var n=typeof e=="function"?e:zY(e),o=t==null?Uje:typeof t=="function"?t:LF(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),o.apply(this,arguments)||null)})}function Gje(){var e=this.parentNode;e&&e.removeChild(this)}function Kje(){return this.each(Gje)}function Zje(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Xje(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Yje(e){return this.select(e?Xje:Zje)}function Qje(e){return arguments.length?this.property("__data__",e):this.node().__data__}function Jje(e){return function(t){e.call(this,t,this.__data__)}}function e$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 t$e(e){return function(){var t=this.__on;if(t){for(var n=0,o=-1,r=t.length,a;n<r;++n)a=t[n],(!e.type||a.type===e.type)&&a.name===e.name?this.removeEventListener(a.type,a.listener,a.options):t[++o]=a;++o?t.length=o:delete this.__on}}}function n$e(e,t,n){return function(){var o=this.__on,r,a=Jje(t);if(o){for(var i=0,s=o.length;i<s;++i)if((r=o[i]).type===e.type&&r.name===e.name){this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=a,r.options=n),r.value=t;return}}this.addEventListener(e.type,a,n),r={type:e.type,name:e.name,value:t,listener:a,options:n},o?o.push(r):this.__on=[r]}}function o$e(e,t,n){var o=e$e(e+""),r,a=o.length,i;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<a;++r)if((i=o[r]).type===h.type&&i.name===h.name)return h.value}return}for(s=t?n$e:t$e,r=0;r<a;++r)this.each(s(o[r],t,n));return this}function UY(e,t,n){var o=OY(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 r$e(e,t){return function(){return UY(this,e,t)}}function a$e(e,t){return function(){return UY(this,e,t.apply(this,arguments))}}function i$e(e,t){return this.each((typeof t=="function"?a$e:r$e)(e,t))}function*s$e(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var o=e[t],r=0,a=o.length,i;r<a;++r)(i=o[r])&&(yield i)}var WY=[null];function fo(e,t){this._groups=e,this._parents=t}function vf(){return new fo([[document.documentElement]],WY)}function c$e(){return this}fo.prototype=vf.prototype={constructor:fo,select:PEe,selectAll:DEe,selectChild:qEe,selectChildren:WEe,filter:GEe,data:JEe,enter:KEe,exit:tje,join:nje,merge:oje,selection:c$e,order:rje,sort:aje,call:sje,nodes:cje,node:lje,size:dje,empty:uje,each:hje,attr:vje,style:bje,property:Lje,classed:Eje,text:zje,html:Hje,raise:Fje,lower:Vje,append:Bje,insert:Wje,remove:Kje,clone:Yje,datum:Qje,on:o$e,dispatch:i$e,[Symbol.iterator]:s$e};function ao(e){return typeof e=="string"?new fo([[document.querySelector(e)]],[document.documentElement]):new fo([[e]],WY)}function l$e(e){let t;for(;t=e.sourceEvent;)e=t;return e}function Ko(e,t){if(e=l$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 d$e={passive:!1},Gh={capture:!0,passive:!1};function bT(e){e.stopImmediatePropagation()}function i0(e){e.preventDefault(),e.stopImmediatePropagation()}function GY(e){var t=e.document.documentElement,n=ao(e).on("dragstart.drag",i0,Gh);"onselectstart"in t?n.on("selectstart.drag",i0,Gh):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function KY(e,t){var n=e.document.documentElement,o=ao(e).on("dragstart.drag",null);t&&(o.on("click.drag",i0,Gh),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 mp=e=>()=>e;function MH(e,{sourceEvent:t,subject:n,target:o,identifier:r,active:a,x:i,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:a,enumerable:!0,configurable:!0},x:{value:i,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}})}MH.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function u$e(e){return!e.ctrlKey&&!e.button}function h$e(){return this.parentNode}function f$e(e,t){return t??{x:e.x,y:e.y}}function p$e(){return navigator.maxTouchPoints||"ontouchstart"in this}function ZY(){var e=u$e,t=h$e,n=f$e,o=p$e,r={},a=Gz("start","drag","end"),i=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,d$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,Gh).on("mouseup.drag",k,Gh),GY(b.view),bT(b),l=!1,s=b.clientX,c=b.clientY,_("start",b))}}function g(b){if(i0(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),KY(b.view,l),i0(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]))&&(bT(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])&&(i0(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])&&(bT(b),N("end",b,C[S]))}function w(b,C,_,S,N,P){var A=a.copy(),E=Ko(P||_,C),z,W,$;if(($=n.call(b,new MH("beforestart",{sourceEvent:_,target:p,identifier:N,active:i,x:E[0],y:E[1],dx:0,dy:0,dispatch:A}),S))!=null)return z=$.x-E[0]||0,W=$.y-E[1]||0,function T(D,O,I){var R=E,L;switch(D){case"start":r[N]=T,L=i++;break;case"end":delete r[N],--i;case"drag":E=Ko(I||O,C),L=i;break}A.call(D,b,new MH(D,{sourceEvent:O,subject:$,target:p,identifier:N,active:L,x:E[0]+z,y:E[1]+W,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:mp(!!b),p):e},p.container=function(b){return arguments.length?(t=typeof b=="function"?b:mp(b),p):t},p.subject=function(b){return arguments.length?(n=typeof b=="function"?b:mp(b),p):n},p.touchable=function(b){return arguments.length?(o=typeof b=="function"?b:mp(!!b),p):o},p.on=function(){var b=a.on.apply(a,arguments);return b===a?p:b},p.clickDistance=function(b){return arguments.length?(u=(b=+b)*b,p):Math.sqrt(u)},p}function IF(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function XY(e,t){var n=Object.create(e.prototype);for(var o in t)n[o]=t[o];return n}function xf(){}var Kh=.7,qP=1/Kh,s0="\\s*([+-]?\\d+)\\s*",Zh="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Fr="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",y$e=/^#([0-9a-f]{3,8})$/,m$e=new RegExp(`^rgb\\(${s0},${s0},${s0}\\)$`),g$e=new RegExp(`^rgb\\(${Fr},${Fr},${Fr}\\)$`),k$e=new RegExp(`^rgba\\(${s0},${s0},${s0},${Zh}\\)$`),v$e=new RegExp(`^rgba\\(${Fr},${Fr},${Fr},${Zh}\\)$`),x$e=new RegExp(`^hsl\\(${Zh},${Fr},${Fr}\\)$`),w$e=new RegExp(`^hsla\\(${Zh},${Fr},${Fr},${Zh}\\)$`),BB={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};IF(xf,Id,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:UB,formatHex:UB,formatHex8:M$e,formatHsl:b$e,formatRgb:WB,toString:WB});function UB(){return this.rgb().formatHex()}function M$e(){return this.rgb().formatHex8()}function b$e(){return YY(this).formatHsl()}function WB(){return this.rgb().formatRgb()}function Id(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=y$e.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?GB(t):n===3?new Vn(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?gp(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?gp(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=m$e.exec(e))?new Vn(t[1],t[2],t[3],1):(t=g$e.exec(e))?new Vn(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=k$e.exec(e))?gp(t[1],t[2],t[3],t[4]):(t=v$e.exec(e))?gp(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=x$e.exec(e))?XB(t[1],t[2]/100,t[3]/100,1):(t=w$e.exec(e))?XB(t[1],t[2]/100,t[3]/100,t[4]):BB.hasOwnProperty(e)?GB(BB[e]):e==="transparent"?new Vn(NaN,NaN,NaN,0):null}function GB(e){return new Vn(e>>16&255,e>>8&255,e&255,1)}function gp(e,t,n,o){return o<=0&&(e=t=n=NaN),new Vn(e,t,n,o)}function _$e(e){return e instanceof xf||(e=Id(e)),e?(e=e.rgb(),new Vn(e.r,e.g,e.b,e.opacity)):new Vn}function bH(e,t,n,o){return arguments.length===1?_$e(e):new Vn(e,t,n,o??1)}function Vn(e,t,n,o){this.r=+e,this.g=+t,this.b=+n,this.opacity=+o}IF(Vn,bH,XY(xf,{brighter(e){return e=e==null?qP:Math.pow(qP,e),new Vn(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Kh:Math.pow(Kh,e),new Vn(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Vn(Md(this.r),Md(this.g),Md(this.b),VP(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:KB,formatHex:KB,formatHex8:C$e,formatRgb:ZB,toString:ZB}));function KB(){return`#${gd(this.r)}${gd(this.g)}${gd(this.b)}`}function C$e(){return`#${gd(this.r)}${gd(this.g)}${gd(this.b)}${gd((isNaN(this.opacity)?1:this.opacity)*255)}`}function ZB(){const e=VP(this.opacity);return`${e===1?"rgb(":"rgba("}${Md(this.r)}, ${Md(this.g)}, ${Md(this.b)}${e===1?")":`, ${e})`}`}function VP(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Md(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function gd(e){return e=Md(e),(e<16?"0":"")+e.toString(16)}function XB(e,t,n,o){return o<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Yo(e,t,n,o)}function YY(e){if(e instanceof Yo)return new Yo(e.h,e.s,e.l,e.opacity);if(e instanceof xf||(e=Id(e)),!e)return new Yo;if(e instanceof Yo)return e;e=e.rgb();var t=e.r/255,n=e.g/255,o=e.b/255,r=Math.min(t,n,o),a=Math.max(t,n,o),i=NaN,s=a-r,c=(a+r)/2;return s?(t===a?i=(n-o)/s+(n<o)*6:n===a?i=(o-t)/s+2:i=(t-n)/s+4,s/=c<.5?a+r:2-a-r,i*=60):s=c>0&&c<1?0:i,new Yo(i,s,c,e.opacity)}function S$e(e,t,n,o){return arguments.length===1?YY(e):new Yo(e,t,n,o??1)}function Yo(e,t,n,o){this.h=+e,this.s=+t,this.l=+n,this.opacity=+o}IF(Yo,S$e,XY(xf,{brighter(e){return e=e==null?qP:Math.pow(qP,e),new Yo(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Kh:Math.pow(Kh,e),new Yo(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 Vn(_T(e>=240?e-240:e+120,r,o),_T(e,r,o),_T(e<120?e+240:e-120,r,o),this.opacity)},clamp(){return new Yo(YB(this.h),kp(this.s),kp(this.l),VP(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=VP(this.opacity);return`${e===1?"hsl(":"hsla("}${YB(this.h)}, ${kp(this.s)*100}%, ${kp(this.l)*100}%${e===1?")":`, ${e})`}`}}));function YB(e){return e=(e||0)%360,e<0?e+360:e}function kp(e){return Math.max(0,Math.min(1,e||0))}function _T(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 Zz=e=>()=>e;function QY(e,t){return function(n){return e+n*t}}function L$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 Uat(e,t){var n=t-e;return n?QY(e,n>180||n<-180?n-360*Math.round(n/360):n):Zz(isNaN(e)?t:e)}function N$e(e){return(e=+e)==1?JY:function(t,n){return n-t?L$e(t,n,e):Zz(isNaN(t)?n:t)}}function JY(e,t){var n=t-e;return n?QY(e,n):Zz(isNaN(e)?t:e)}const BP=function e(t){var n=N$e(t);function o(r,a){var i=n((r=bH(r)).r,(a=bH(a)).r),s=n(r.g,a.g),c=n(r.b,a.b),l=JY(r.opacity,a.opacity);return function(h){return r.r=i(h),r.g=s(h),r.b=c(h),r.opacity=l(h),r+""}}return o.gamma=e,o}(1);function I$e(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,o=t.slice(),r;return function(a){for(r=0;r<n;++r)o[r]=e[r]*(1-a)+t[r]*a;return o}}function A$e(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function E$e(e,t){var n=t?t.length:0,o=e?Math.min(n,e.length):0,r=new Array(o),a=new Array(n),i;for(i=0;i<o;++i)r[i]=Mh(e[i],t[i]);for(;i<n;++i)a[i]=t[i];return function(s){for(i=0;i<o;++i)a[i]=r[i](s);return a}}function j$e(e,t){var n=new Date;return e=+e,t=+t,function(o){return n.setTime(e*(1-o)+t*o),n}}function jr(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function $$e(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]=Mh(e[r],t[r]):o[r]=t[r];return function(a){for(r in n)o[r]=n[r](a);return o}}var _H=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,CT=new RegExp(_H.source,"g");function P$e(e){return function(){return e}}function z$e(e){return function(t){return e(t)+""}}function eQ(e,t){var n=_H.lastIndex=CT.lastIndex=0,o,r,a,i=-1,s=[],c=[];for(e=e+"",t=t+"";(o=_H.exec(e))&&(r=CT.exec(t));)(a=r.index)>n&&(a=t.slice(n,a),s[i]?s[i]+=a:s[++i]=a),(o=o[0])===(r=r[0])?s[i]?s[i]+=r:s[++i]=r:(s[++i]=null,c.push({i,x:jr(o,r)})),n=CT.lastIndex;return n<t.length&&(a=t.slice(n),s[i]?s[i]+=a:s[++i]=a),s.length<2?c[0]?z$e(c[0].x):P$e(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 Mh(e,t){var n=typeof t,o;return t==null||n==="boolean"?Zz(t):(n==="number"?jr:n==="string"?(o=Id(t))?(t=o,BP):eQ:t instanceof Id?BP:t instanceof Date?j$e:A$e(t)?I$e:Array.isArray(t)?E$e:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?$$e:jr)(e,t)}var QB=180/Math.PI,CH={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function tQ(e,t,n,o,r,a){var i,s,c;return(i=Math.sqrt(e*e+t*t))&&(e/=i,t/=i),(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,i=-i),{translateX:r,translateY:a,rotate:Math.atan2(t,e)*QB,skewX:Math.atan(c)*QB,scaleX:i,scaleY:s}}var vp;function R$e(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?CH:tQ(t.a,t.b,t.c,t.d,t.e,t.f)}function T$e(e){return e==null||(vp||(vp=document.createElementNS("http://www.w3.org/2000/svg","g")),vp.setAttribute("transform",e),!(e=vp.transform.baseVal.consolidate()))?CH:(e=e.matrix,tQ(e.a,e.b,e.c,e.d,e.e,e.f))}function nQ(e,t,n,o){function r(l){return l.length?l.pop()+" ":""}function a(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:jr(l,u)},{i:k-2,x:jr(h,p)})}else(u||p)&&y.push("translate("+u+t+p+n)}function i(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:jr(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:jr(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:jr(l,u)},{i:k-2,x:jr(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),a(l.translateX,l.translateY,h.translateX,h.translateY,u,p),i(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 D$e=nQ(R$e,"px, ","px)","deg)"),H$e=nQ(T$e,", ",")",")"),O$e=1e-12;function JB(e){return((e=Math.exp(e))+1/e)/2}function F$e(e){return((e=Math.exp(e))-1/e)/2}function q$e(e){return((e=Math.exp(2*e))-1)/(e+1)}const nP=function e(t,n,o){function r(a,i){var s=a[0],c=a[1],l=a[2],h=i[0],u=i[1],p=i[2],y=h-s,g=u-c,k=y*y+g*g,x,v;if(k<O$e)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=JB(C),A=l/(n*M)*(P*q$e(t*N+C)-F$e(C));return[s+A*y,c+A*g,l*P/JB(t*N+C)]}}return x.duration=v*1e3*t/Math.SQRT2,x}return r.rho=function(a){var i=Math.max(.001,+a),s=i*i,c=s*s;return e(i,s,c)},r}(Math.SQRT2,2,4);var x0=0,E2=0,w2=0,oQ=1e3,UP,j2,WP=0,Ad=0,Xz=0,Xh=typeof performance=="object"&&performance.now?performance:Date,rQ=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function AF(){return Ad||(rQ(V$e),Ad=Xh.now()+Xz)}function V$e(){Ad=0}function GP(){this._call=this._time=this._next=null}GP.prototype=aQ.prototype={constructor:GP,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?AF():+n)+(t==null?0:+t),!this._next&&j2!==this&&(j2?j2._next=this:UP=this,j2=this),this._call=e,this._time=n,SH()},stop:function(){this._call&&(this._call=null,this._time=1/0,SH())}};function aQ(e,t,n){var o=new GP;return o.restart(e,t,n),o}function B$e(){AF(),++x0;for(var e=UP,t;e;)(t=Ad-e._time)>=0&&e._call.call(void 0,t),e=e._next;--x0}function eU(){Ad=(WP=Xh.now())+Xz,x0=E2=0;try{B$e()}finally{x0=0,W$e(),Ad=0}}function U$e(){var e=Xh.now(),t=e-WP;t>oQ&&(Xz-=t,WP=e)}function W$e(){for(var e,t=UP,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:UP=n);j2=e,SH(o)}function SH(e){if(!x0){E2&&(E2=clearTimeout(E2));var t=e-Ad;t>24?(e<1/0&&(E2=setTimeout(eU,e-Xh.now()-Xz)),w2&&(w2=clearInterval(w2))):(w2||(WP=Xh.now(),w2=setInterval(U$e,oQ)),x0=1,rQ(eU))}}function tU(e,t,n){var o=new GP;return t=t==null?0:+t,o.restart(r=>{o.stop(),e(r+t)},t,n),o}var G$e=Gz("start","end","cancel","interrupt"),K$e=[],iQ=0,nU=1,LH=2,oP=3,oU=4,NH=5,rP=6;function Yz(e,t,n,o,r,a){var i=e.__transition;if(!i)e.__transition={};else if(n in i)return;Z$e(e,n,{name:t,index:o,group:r,on:G$e,tween:K$e,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:iQ})}function EF(e,t){var n=cr(e,t);if(n.state>iQ)throw new Error("too late; already scheduled");return n}function Kr(e,t){var n=cr(e,t);if(n.state>oP)throw new Error("too late; already running");return n}function cr(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function Z$e(e,t,n){var o=e.__transition,r;o[t]=n,n.timer=aQ(a,0,n.time);function a(l){n.state=nU,n.timer.restart(i,n.delay,n.time),n.delay<=l&&i(l-n.delay)}function i(l){var h,u,p,y;if(n.state!==nU)return c();for(h in o)if(y=o[h],y.name===n.name){if(y.state===oP)return tU(i);y.state===oU?(y.state=rP,y.timer.stop(),y.on.call("interrupt",e,e.__data__,y.index,y.group),delete o[h]):+h<t&&(y.state=rP,y.timer.stop(),y.on.call("cancel",e,e.__data__,y.index,y.group),delete o[h])}if(tU(function(){n.state===oP&&(n.state=oU,n.timer.restart(s,n.delay,n.time),s(l))}),n.state=LH,n.on.call("start",e,e.__data__,n.index,n.group),n.state===LH){for(n.state=oP,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=NH,1),u=-1,p=r.length;++u<p;)r[u].call(e,h);n.state===NH&&(n.on.call("end",e,e.__data__,n.index,n.group),c())}function c(){n.state=rP,n.timer.stop(),delete o[t];for(var l in o)return;delete e.__transition}}function aP(e,t){var n=e.__transition,o,r,a=!0,i;if(n){t=t==null?null:t+"";for(i in n){if((o=n[i]).name!==t){a=!1;continue}r=o.state>LH&&o.state<NH,o.state=rP,o.timer.stop(),o.on.call(r?"interrupt":"cancel",e,e.__data__,o.index,o.group),delete n[i]}a&&delete e.__transition}}function X$e(e){return this.each(function(){aP(this,e)})}function Y$e(e,t){var n,o;return function(){var r=Kr(this,e),a=r.tween;if(a!==n){o=n=a;for(var i=0,s=o.length;i<s;++i)if(o[i].name===t){o=o.slice(),o.splice(i,1);break}}r.tween=o}}function Q$e(e,t,n){var o,r;if(typeof n!="function")throw new Error;return function(){var a=Kr(this,e),i=a.tween;if(i!==o){r=(o=i).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)}a.tween=r}}function J$e(e,t){var n=this._id;if(e+="",arguments.length<2){for(var o=cr(this.node(),n).tween,r=0,a=o.length,i;r<a;++r)if((i=o[r]).name===e)return i.value;return null}return this.each((t==null?Y$e:Q$e)(n,e,t))}function jF(e,t,n){var o=e._id;return e.each(function(){var r=Kr(this,o);(r.value||(r.value={}))[t]=n.apply(this,arguments)}),function(r){return cr(r,o).value[t]}}function sQ(e,t){var n;return(typeof t=="number"?jr:t instanceof Id?BP:(n=Id(t))?(t=n,BP):eQ)(e,t)}function ePe(e){return function(){this.removeAttribute(e)}}function tPe(e){return function(){this.removeAttributeNS(e.space,e.local)}}function nPe(e,t,n){var o,r=n+"",a;return function(){var i=this.getAttribute(e);return i===r?null:i===o?a:a=t(o=i,n)}}function oPe(e,t,n){var o,r=n+"",a;return function(){var i=this.getAttributeNS(e.space,e.local);return i===r?null:i===o?a:a=t(o=i,n)}}function rPe(e,t,n){var o,r,a;return function(){var i,s=n(this),c;return s==null?void this.removeAttribute(e):(i=this.getAttribute(e),c=s+"",i===c?null:i===o&&c===r?a:(r=c,a=t(o=i,s)))}}function aPe(e,t,n){var o,r,a;return function(){var i,s=n(this),c;return s==null?void this.removeAttributeNS(e.space,e.local):(i=this.getAttributeNS(e.space,e.local),c=s+"",i===c?null:i===o&&c===r?a:(r=c,a=t(o=i,s)))}}function iPe(e,t){var n=Kz(e),o=n==="transform"?H$e:sQ;return this.attrTween(e,typeof t=="function"?(n.local?aPe:rPe)(n,o,jF(this,"attr."+e,t)):t==null?(n.local?tPe:ePe)(n):(n.local?oPe:nPe)(n,o,t))}function sPe(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function cPe(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function lPe(e,t){var n,o;function r(){var a=t.apply(this,arguments);return a!==o&&(n=(o=a)&&cPe(e,a)),n}return r._value=t,r}function dPe(e,t){var n,o;function r(){var a=t.apply(this,arguments);return a!==o&&(n=(o=a)&&sPe(e,a)),n}return r._value=t,r}function uPe(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=Kz(e);return this.tween(n,(o.local?lPe:dPe)(o,t))}function hPe(e,t){return function(){EF(this,e).delay=+t.apply(this,arguments)}}function fPe(e,t){return t=+t,function(){EF(this,e).delay=t}}function pPe(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?hPe:fPe)(t,e)):cr(this.node(),t).delay}function yPe(e,t){return function(){Kr(this,e).duration=+t.apply(this,arguments)}}function mPe(e,t){return t=+t,function(){Kr(this,e).duration=t}}function gPe(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?yPe:mPe)(t,e)):cr(this.node(),t).duration}function kPe(e,t){if(typeof t!="function")throw new Error;return function(){Kr(this,e).ease=t}}function vPe(e){var t=this._id;return arguments.length?this.each(kPe(t,e)):cr(this.node(),t).ease}function xPe(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;Kr(this,e).ease=n}}function wPe(e){if(typeof e!="function")throw new Error;return this.each(xPe(this._id,e))}function MPe(e){typeof e!="function"&&(e=TY(e));for(var t=this._groups,n=t.length,o=new Array(n),r=0;r<n;++r)for(var a=t[r],i=a.length,s=o[r]=[],c,l=0;l<i;++l)(c=a[l])&&e.call(c,c.__data__,l,a)&&s.push(c);return new Na(o,this._parents,this._name,this._id)}function bPe(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,o=t.length,r=n.length,a=Math.min(o,r),i=new Array(o),s=0;s<a;++s)for(var c=t[s],l=n[s],h=c.length,u=i[s]=new Array(h),p,y=0;y<h;++y)(p=c[y]||l[y])&&(u[y]=p);for(;s<o;++s)i[s]=t[s];return new Na(i,this._parents,this._name,this._id)}function _Pe(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 CPe(e,t,n){var o,r,a=_Pe(t)?EF:Kr;return function(){var i=a(this,e),s=i.on;s!==o&&(r=(o=s).copy()).on(t,n),i.on=r}}function SPe(e,t){var n=this._id;return arguments.length<2?cr(this.node(),n).on.on(e):this.each(CPe(n,e,t))}function LPe(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function NPe(){return this.on("end.remove",LPe(this._id))}function IPe(e){var t=this._name,n=this._id;typeof e!="function"&&(e=LF(e));for(var o=this._groups,r=o.length,a=new Array(r),i=0;i<r;++i)for(var s=o[i],c=s.length,l=a[i]=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,Yz(l[p],t,n,p,l,cr(h,n)));return new Na(a,this._parents,t,n)}function APe(e){var t=this._name,n=this._id;typeof e!="function"&&(e=RY(e));for(var o=this._groups,r=o.length,a=[],i=[],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=cr(h,n),k=0,x=p.length;k<x;++k)(y=p[k])&&Yz(y,t,n,k,p,g);a.push(p),i.push(h)}return new Na(a,i,t,n)}var EPe=vf.prototype.constructor;function jPe(){return new EPe(this._groups,this._parents)}function $Pe(e,t){var n,o,r;return function(){var a=v0(this,e),i=(this.style.removeProperty(e),v0(this,e));return a===i?null:a===n&&i===o?r:r=t(n=a,o=i)}}function cQ(e){return function(){this.style.removeProperty(e)}}function PPe(e,t,n){var o,r=n+"",a;return function(){var i=v0(this,e);return i===r?null:i===o?a:a=t(o=i,n)}}function zPe(e,t,n){var o,r,a;return function(){var i=v0(this,e),s=n(this),c=s+"";return s==null&&(c=s=(this.style.removeProperty(e),v0(this,e))),i===c?null:i===o&&c===r?a:(r=c,a=t(o=i,s))}}function RPe(e,t){var n,o,r,a="style."+t,i="end."+a,s;return function(){var c=Kr(this,e),l=c.on,h=c.value[a]==null?s||(s=cQ(t)):void 0;(l!==n||r!==h)&&(o=(n=l).copy()).on(i,r=h),c.on=o}}function TPe(e,t,n){var o=(e+="")=="transform"?D$e:sQ;return t==null?this.styleTween(e,$Pe(e,o)).on("end.style."+e,cQ(e)):typeof t=="function"?this.styleTween(e,zPe(e,o,jF(this,"style."+e,t))).each(RPe(this._id,e)):this.styleTween(e,PPe(e,o,t),n).on("end.style."+e,null)}function DPe(e,t,n){return function(o){this.style.setProperty(e,t.call(this,o),n)}}function HPe(e,t,n){var o,r;function a(){var i=t.apply(this,arguments);return i!==r&&(o=(r=i)&&DPe(e,i,n)),o}return a._value=t,a}function OPe(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,HPe(e,t,n??""))}function FPe(e){return function(){this.textContent=e}}function qPe(e){return function(){var t=e(this);this.textContent=t??""}}function VPe(e){return this.tween("text",typeof e=="function"?qPe(jF(this,"text",e)):FPe(e==null?"":e+""))}function BPe(e){return function(t){this.textContent=e.call(this,t)}}function UPe(e){var t,n;function o(){var r=e.apply(this,arguments);return r!==n&&(t=(n=r)&&BPe(r)),t}return o._value=e,o}function WPe(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,UPe(e))}function GPe(){for(var e=this._name,t=this._id,n=lQ(),o=this._groups,r=o.length,a=0;a<r;++a)for(var i=o[a],s=i.length,c,l=0;l<s;++l)if(c=i[l]){var h=cr(c,t);Yz(c,e,n,l,i,{time:h.time+h.delay+h.duration,delay:0,duration:h.duration,ease:h.ease})}return new Na(o,this._parents,e,n)}function KPe(){var e,t,n=this,o=n._id,r=n.size();return new Promise(function(a,i){var s={value:i},c={value:function(){--r===0&&a()}};n.each(function(){var l=Kr(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&&a()})}var ZPe=0;function Na(e,t,n,o){this._groups=e,this._parents=t,this._name=n,this._id=o}function lQ(){return++ZPe}var ha=vf.prototype;Na.prototype={constructor:Na,select:IPe,selectAll:APe,selectChild:ha.selectChild,selectChildren:ha.selectChildren,filter:MPe,merge:bPe,selection:jPe,transition:GPe,call:ha.call,nodes:ha.nodes,node:ha.node,size:ha.size,empty:ha.empty,each:ha.each,on:SPe,attr:iPe,attrTween:uPe,style:TPe,styleTween:OPe,text:VPe,textTween:WPe,remove:NPe,tween:J$e,delay:pPe,duration:gPe,ease:vPe,easeVarying:wPe,end:KPe,[Symbol.iterator]:ha[Symbol.iterator]};function XPe(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var YPe={time:null,delay:0,duration:250,ease:XPe};function QPe(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 JPe(e){var t,n;e instanceof Na?(t=e._id,e=e._name):(t=lQ(),(n=YPe).time=AF(),e=e==null?null:e+"");for(var o=this._groups,r=o.length,a=0;a<r;++a)for(var i=o[a],s=i.length,c,l=0;l<s;++l)(c=i[l])&&Yz(c,e,t,l,i,n||QPe(c,t));return new Na(o,this._parents,e,t)}vf.prototype.interrupt=X$e;vf.prototype.transition=JPe;const xp=e=>()=>e;function eze(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 wa(e,t,n){this.k=e,this.x=t,this.y=n}wa.prototype={constructor:wa,scale:function(e){return e===1?this:new wa(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new wa(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 Qz=new wa(1,0,0);dQ.prototype=wa.prototype;function dQ(e){for(;!e.__zoom;)if(!(e=e.parentNode))return Qz;return e.__zoom}function ST(e){e.stopImmediatePropagation()}function M2(e){e.preventDefault(),e.stopImmediatePropagation()}function tze(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 rU(){return this.__zoom||Qz}function oze(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function rze(){return navigator.maxTouchPoints||"ontouchstart"in this}function aze(e,t,n){var o=e.invertX(t[0][0])-n[0][0],r=e.invertX(t[1][0])-n[1][0],a=e.invertY(t[0][1])-n[0][1],i=e.invertY(t[1][1])-n[1][1];return e.translate(r>o?(o+r)/2:Math.min(0,o)||Math.max(0,r),i>a?(a+i)/2:Math.min(0,a)||Math.max(0,i))}function uQ(){var e=tze,t=nze,n=aze,o=oze,r=rze,a=[0,1/0],i=[[-1/0,-1/0],[1/0,1/0]],s=250,c=nP,l=Gz("start","zoom","end"),h,u,p,y=500,g=150,k=0,x=10;function v($){$.property("__zoom",rU).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",W).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}v.transform=function($,T,D,O){var I=$.selection?$.selection():$;I.property("__zoom",rU),$!==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,i)},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),i)},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(Qz.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,i)},O,I)};function M($,T){return T=Math.max(a[0],Math.min(a[1],T)),T===$.k?$:new wa(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 wa($.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]),K=I.__zoom,X=typeof T=="function"?T.apply(I,R):T,J=c(K.invert(H).concat(j/K.k),X.invert(H).concat(j/X.k));return function(re){if(re===1)re=X;else{var oe=J(re),ne=j/oe[2];re=new wa(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 eze($,{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(a[0],Math.min(a[1],O.k*Math.pow(2,o.apply(this,arguments)))),R=Ko($);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)],aP(this),D.start()}M2($),D.wheel=setTimeout(L,g),D.zoom("mouse",n(w(M(O,I),D.mouse[0],D.mouse[1]),D.extent,i));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=Ko($,D),L=$.clientX,V=$.clientY;GY($.view),ST($),O.mouse=[R,this.__zoom.invert(R)],aP(this),O.start();function H(K){if(M2(K),!O.moved){var X=K.clientX-L,J=K.clientY-V;O.moved=X*X+J*J>k}O.event(K).zoom("mouse",n(w(O.that.__zoom,O.mouse[0]=Ko(K,D),O.mouse[1]),O.extent,i))}function j(K){I.on("mousemove.zoom mouseup.zoom",null),KY(K.view,O.moved),M2(K),O.event(K).end()}}function A($,...T){if(e.apply(this,arguments)){var D=this.__zoom,O=Ko($.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),i);M2($),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(ST($),L=0;L<O;++L)V=D[L],H=Ko(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)),aP(this),I.start())}}function z($,...T){if(this.__zooming){var D=_(this,T).event($),O=$.changedTouches,I=O.length,R,L,V,H;for(M2($),R=0;R<I;++R)L=O[R],V=Ko(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],K=D.touch0[1],X=D.touch1[0],J=D.touch1[1],re=(re=X[0]-j[0])*re+(re=X[1]-j[1])*re,oe=(oe=J[0]-K[0])*oe+(oe=J[1]-K[1])*oe;L=M(L,Math.sqrt(re/oe)),V=[(j[0]+X[0])/2,(j[1]+X[1])/2],H=[(K[0]+J[0])/2,(K[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,i))}}function W($,...T){if(this.__zooming){var D=_(this,T).event($),O=$.changedTouches,I=O.length,R,L;for(ST($),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=Ko(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"?$:xp(+$),v):o},v.filter=function($){return arguments.length?(e=typeof $=="function"?$:xp(!!$),v):e},v.touchable=function($){return arguments.length?(r=typeof $=="function"?$:xp(!!$),v):r},v.extent=function($){return arguments.length?(t=typeof $=="function"?$:xp([[+$[0][0],+$[0][1]],[+$[1][0],+$[1][1]]]),v):t},v.scaleExtent=function($){return arguments.length?(a[0]=+$[0],a[1]=+$[1],v):[a[0],a[1]]},v.translateExtent=function($){return arguments.length?(i[0][0]=+$[0][0],i[1][0]=+$[1][0],i[0][1]=+$[0][1],i[1][1]=+$[1][1],v):[[i[0][0],i[0][1]],[i[1][0],i[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 Br={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."},Yh=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],hQ=["Enter"," ","Escape"],fQ={"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 w0;(function(e){e.Strict="strict",e.Loose="loose"})(w0||(w0={}));var bd;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(bd||(bd={}));var M0;(function(e){e.Partial="partial",e.Full="full"})(M0||(M0={}));const pQ={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null};var mi;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(mi||(mi={}));var Qh;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(Qh||(Qh={}));var fe;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(fe||(fe={}));const aU={[fe.Left]:fe.Right,[fe.Right]:fe.Left,[fe.Top]:fe.Bottom,[fe.Bottom]:fe.Top};function yQ(e){return e===null?null:e?"valid":"invalid"}const mQ=e=>"id"in e&&"source"in e&&"target"in e,ize=e=>"id"in e&&"position"in e&&!("source"in e)&&!("target"in e),$F=e=>"id"in e&&"internals"in e&&!("source"in e)&&!("target"in e),wf=(e,t=[0,0])=>{const{width:n,height:o}=$a(e),r=e.origin??t,a=n*r[0],i=o*r[1];return{x:e.position.x-a,y:e.position.y-i}},sze=(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 a=typeof r=="string";let i=!t.nodeLookup&&!a?r:void 0;t.nodeLookup&&(i=a?t.nodeLookup.get(r):$F(r)?r:t.nodeLookup.get(r.id));const s=i?KP(i,t.nodeOrigin):{x:0,y:0,x2:0,y2:0};return Jz(o,s)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return eR(n)},Mf=(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=Jz(n,KP(r)),o=!0)}),o?eR(n):{x:0,y:0,width:0,height:0}},PF=(e,t,[n,o,r]=[0,0,1],a=!1,i=!1)=>{const s={..._f(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(i&&!u||p)continue;const y=h.width??l.width??l.initialWidth??null,g=h.height??l.height??l.initialHeight??null,k=Jh(s,_0(l)),x=(y??0)*(g??0),v=a&&k>0;(!l.internals.handleBounds||v||k>=x||l.dragging)&&c.push(l)}return c},cze=(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 lze(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 dze({nodes:e,width:t,height:n,panZoom:o,minZoom:r,maxZoom:a},i){if(e.size===0)return Promise.resolve(!0);const s=lze(e,i),c=Mf(s),l=zF(c,t,n,(i==null?void 0:i.minZoom)??r,(i==null?void 0:i.maxZoom)??a,(i==null?void 0:i.padding)??.1);return await o.setViewport(l,{duration:i==null?void 0:i.duration,ease:i==null?void 0:i.ease,interpolate:i==null?void 0:i.interpolate}),Promise.resolve(!0)}function gQ({nodeId:e,nextPosition:t,nodeLookup:n,nodeOrigin:o=[0,0],nodeExtent:r,onError:a}){const i=n.get(e),s=i.parentId?n.get(i.parentId):void 0,{x:c,y:l}=s?s.internals.positionAbsolute:{x:0,y:0},h=i.origin??o;let u=i.extent||r;if(i.extent==="parent"&&!i.expandParent)if(!s)a==null||a("005",Br.error005());else{const y=s.measured.width,g=s.measured.height;y&&g&&(u=[[c,l],[c+y,l+g]])}else s&&C0(i.extent)&&(u=[[i.extent[0][0]+c,i.extent[0][1]+l],[i.extent[1][0]+c,i.extent[1][1]+l]]);const p=C0(u)?Ed(t,u,i.measured):t;return(i.measured.width===void 0||i.measured.height===void 0)&&(a==null||a("015",Br.error015())),{position:{x:p.x-c+(i.measured.width??0)*h[0],y:p.y-l+(i.measured.height??0)*h[1]},positionAbsolute:p}}async function uze({nodesToRemove:e=[],edgesToRemove:t=[],nodes:n,edges:o,onBeforeDelete:r}){const a=new Set(e.map(p=>p.id)),i=[];for(const p of n){if(p.deletable===!1)continue;const y=a.has(p.id),g=!y&&p.parentId&&i.find(k=>k.id===p.parentId);(y||g)&&i.push(p)}const s=new Set(t.map(p=>p.id)),c=o.filter(p=>p.deletable!==!1),h=cze(i,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:i};const u=await r({nodes:i,edges:h});return typeof u=="boolean"?u?{edges:h,nodes:i}:{edges:[],nodes:[]}:u}const b0=(e,t=0,n=1)=>Math.min(Math.max(e,t),n),Ed=(e={x:0,y:0},t,n)=>({x:b0(e.x,t[0][0],t[1][0]-((n==null?void 0:n.width)??0)),y:b0(e.y,t[0][1],t[1][1]-((n==null?void 0:n.height)??0))});function kQ(e,t,n){const{width:o,height:r}=$a(n),{x:a,y:i}=n.internals.positionAbsolute;return Ed(e,[[a,i],[a+o,i+r]],t)}const iU=(e,t,n)=>e<t?b0(Math.abs(e-t),1,t)/t:e>n?-b0(Math.abs(e-n),1,t)/t:0,vQ=(e,t,n=15,o=40)=>{const r=iU(e.x,o,t.width-o)*n,a=iU(e.y,o,t.height-o)*n;return[r,a]},Jz=(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)}),IH=({x:e,y:t,width:n,height:o})=>({x:e,y:t,x2:e+n,y2:t+o}),eR=({x:e,y:t,x2:n,y2:o})=>({x:e,y:t,width:n-e,height:o-t}),_0=(e,t=[0,0])=>{var r,a;const{x:n,y:o}=$F(e)?e.internals.positionAbsolute:wf(e,t);return{x:n,y:o,width:((r=e.measured)==null?void 0:r.width)??e.width??e.initialWidth??0,height:((a=e.measured)==null?void 0:a.height)??e.height??e.initialHeight??0}},KP=(e,t=[0,0])=>{var r,a;const{x:n,y:o}=$F(e)?e.internals.positionAbsolute:wf(e,t);return{x:n,y:o,x2:n+(((r=e.measured)==null?void 0:r.width)??e.width??e.initialWidth??0),y2:o+(((a=e.measured)==null?void 0:a.height)??e.height??e.initialHeight??0)}},xQ=(e,t)=>eR(Jz(IH(e),IH(t))),Jh=(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)},sU=e=>Qo(e.width)&&Qo(e.height)&&Qo(e.x)&&Qo(e.y),Qo=e=>!isNaN(e)&&isFinite(e),hze=(e,t)=>{},bf=(e,t=[1,1])=>({x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}),_f=({x:e,y:t},[n,o,r],a=!1,i=[1,1])=>{const s={x:(e-n)/r,y:(t-o)/r};return a?bf(s,i):s},ZP=({x:e,y:t},[n,o,r])=>({x:e*r+n,y:t*r+o});function ku(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 fze(e,t,n){if(typeof e=="string"||typeof e=="number"){const o=ku(e,n),r=ku(e,t);return{top:o,right:r,bottom:o,left:r,x:r*2,y:o*2}}if(typeof e=="object"){const o=ku(e.top??e.y??0,n),r=ku(e.bottom??e.y??0,n),a=ku(e.left??e.x??0,t),i=ku(e.right??e.x??0,t);return{top:o,right:i,bottom:r,left:a,x:a+i,y:o+r}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function pze(e,t,n,o,r,a){const{x:i,y:s}=ZP(e,[t,n,o]),{x:c,y:l}=ZP({x:e.x+e.width,y:e.y+e.height},[t,n,o]),h=r-c,u=a-l;return{left:Math.floor(i),top:Math.floor(s),right:Math.floor(h),bottom:Math.floor(u)}}const zF=(e,t,n,o,r,a)=>{const i=fze(a,t,n),s=(t-i.x)/e.width,c=(n-i.y)/e.height,l=Math.min(s,c),h=b0(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=pze(e,y,g,h,t,n),x={left:Math.min(k.left-i.left,0),top:Math.min(k.top-i.top,0),right:Math.min(k.right-i.right,0),bottom:Math.min(k.bottom-i.bottom,0)};return{x:y-x.left+x.right,y:g-x.top+x.bottom,zoom:h}},ef=()=>{var e;return typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)==null?void 0:e.indexOf("Mac"))>=0};function C0(e){return e!=null&&e!=="parent"}function $a(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 wQ(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 MQ(e,t={width:0,height:0},n,o,r){const a={...e},i=o.get(n);if(i){const s=i.origin||r;a.x+=i.internals.positionAbsolute.x-(t.width??0)*s[0],a.y+=i.internals.positionAbsolute.y-(t.height??0)*s[1]}return a}function cU(e,t){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}function yze(){let e,t;return{promise:new Promise((o,r)=>{e=o,t=r}),resolve:e,reject:t}}function mze(e){return{...fQ,...e||{}}}function bh(e,{snapGrid:t=[0,0],snapToGrid:n=!1,transform:o,containerBounds:r}){const{x:a,y:i}=Jo(e),s=_f({x:a-((r==null?void 0:r.left)??0),y:i-((r==null?void 0:r.top)??0)},o),{x:c,y:l}=n?bf(s,t):s;return{xSnapped:c,ySnapped:l,...s}}const RF=e=>({width:e.offsetWidth,height:e.offsetHeight}),bQ=e=>{var t;return((t=e==null?void 0:e.getRootNode)==null?void 0:t.call(e))||(window==null?void 0:window.document)},gze=["INPUT","SELECT","TEXTAREA"];function _Q(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:gze.includes(t.nodeName)||t.hasAttribute("contenteditable")||!!t.closest(".nokey")}const CQ=e=>"clientX"in e,Jo=(e,t)=>{var a,i;const n=CQ(e),o=n?e.clientX:(a=e.touches)==null?void 0:a[0].clientX,r=n?e.clientY:(i=e.touches)==null?void 0:i[0].clientY;return{x:o-((t==null?void 0:t.left)??0),y:r-((t==null?void 0:t.top)??0)}},lU=(e,t,n,o,r)=>{const a=t.querySelectorAll(`.${e}`);return!a||!a.length?null:Array.from(a).map(i=>{const s=i.getBoundingClientRect();return{id:i.getAttribute("data-handleid"),type:e,nodeId:r,position:i.getAttribute("data-handlepos"),x:(s.left-n.left)/o,y:(s.top-n.top)/o,...RF(i)}})};function SQ({sourceX:e,sourceY:t,targetX:n,targetY:o,sourceControlX:r,sourceControlY:a,targetControlX:i,targetControlY:s}){const c=e*.125+r*.375+i*.375+n*.125,l=t*.125+a*.375+s*.375+o*.125,h=Math.abs(c-e),u=Math.abs(l-t);return[c,l,h,u]}function wp(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function dU({pos:e,x1:t,y1:n,x2:o,y2:r,c:a}){switch(e){case fe.Left:return[t-wp(t-o,a),n];case fe.Right:return[t+wp(o-t,a),n];case fe.Top:return[t,n-wp(n-r,a)];case fe.Bottom:return[t,n+wp(r-n,a)]}}function tR({sourceX:e,sourceY:t,sourcePosition:n=fe.Bottom,targetX:o,targetY:r,targetPosition:a=fe.Top,curvature:i=.25}){const[s,c]=dU({pos:n,x1:e,y1:t,x2:o,y2:r,c:i}),[l,h]=dU({pos:a,x1:o,y1:r,x2:e,y2:t,c:i}),[u,p,y,g]=SQ({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 LQ({sourceX:e,sourceY:t,targetX:n,targetY:o}){const r=Math.abs(n-e)/2,a=n<e?n+r:n-r,i=Math.abs(o-t)/2,s=o<t?o+i:o-i;return[a,s,r,i]}function kze({sourceNode:e,targetNode:t,selected:n=!1,zIndex:o=0,elevateOnSelect:r=!1,zIndexMode:a="basic"}){if(a==="manual")return o;const i=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 i+s}function vze({sourceNode:e,targetNode:t,width:n,height:o,transform:r}){const a=Jz(KP(e),KP(t));a.x===a.x2&&(a.x2+=1),a.y===a.y2&&(a.y2+=1);const i={x:-r[0]/r[2],y:-r[1]/r[2],width:n/r[2],height:o/r[2]};return Jh(i,eR(a))>0}const xze=({source:e,sourceHandle:t,target:n,targetHandle:o})=>`xy-edge__${e}${t||""}-${n}${o||""}`,wze=(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)),Mze=(e,t,n={})=>{if(!e.source||!e.target)return t;const o=n.getEdgeId||xze;let r;return mQ(e)?r={...e}:r={...e,id:o(e)},wze(r,t)?t:(r.sourceHandle===null&&delete r.sourceHandle,r.targetHandle===null&&delete r.targetHandle,t.concat(r))};function NQ({sourceX:e,sourceY:t,targetX:n,targetY:o}){const[r,a,i,s]=LQ({sourceX:e,sourceY:t,targetX:n,targetY:o});return[`M ${e},${t}L ${n},${o}`,r,a,i,s]}const uU={[fe.Left]:{x:-1,y:0},[fe.Right]:{x:1,y:0},[fe.Top]:{x:0,y:-1},[fe.Bottom]:{x:0,y:1}},bze=({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},hU=(e,t)=>Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2));function _ze({source:e,sourcePosition:t=fe.Bottom,target:n,targetPosition:o=fe.Top,center:r,offset:a,stepPosition:i}){const s=uU[t],c=uU[o],l={x:e.x+s.x*a,y:e.y+s.y*a},h={x:n.x+c.x*a,y:n.y+c.y*a},u=bze({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]=LQ({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)*i,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)*i);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($<=a){const T=Math.min(a-1,a-$);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)),W=Math.max(Math.abs(A.y-g[0].y),Math.abs(E.y-g[0].y));z>=W?(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 Cze(e,t,n,o){const r=Math.min(hU(e,t)/2,hU(t,n)/2,o),{x:a,y:i}=t;if(e.x===a&&a===n.x||e.y===i&&i===n.y)return`L${a} ${i}`;if(e.y===i){const l=e.x<n.x?-1:1,h=e.y<n.y?1:-1;return`L ${a+r*l},${i}Q ${a},${i} ${a},${i+r*h}`}const s=e.x<n.x?1:-1,c=e.y<n.y?-1:1;return`L ${a},${i+r*c}Q ${a},${i} ${a+r*s},${i}`}function tf({sourceX:e,sourceY:t,sourcePosition:n=fe.Bottom,targetX:o,targetY:r,targetPosition:a=fe.Top,borderRadius:i=5,centerX:s,centerY:c,offset:l=20,stepPosition:h=.5}){const[u,p,y,g,k]=_ze({source:{x:e,y:t},sourcePosition:n,target:{x:o,y:r},targetPosition:a,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+=Cze(u[v-1],u[v],u[v+1],i);return x+=`L${u[u.length-1].x} ${u[u.length-1].y}`,[x,p,y,g,k]}function fU(e){var t;return e&&!!(e.internals.handleBounds||(t=e.handles)!=null&&t.length)&&!!(e.measured.width||e.width||e.initialWidth)}function Sze(e){var u;const{sourceNode:t,targetNode:n}=e;if(!fU(t)||!fU(n))return null;const o=t.internals.handleBounds||pU(t.handles),r=n.internals.handleBounds||pU(n.handles),a=yU((o==null?void 0:o.source)??[],e.sourceHandle),i=yU(e.connectionMode===w0.Strict?(r==null?void 0:r.target)??[]:((r==null?void 0:r.target)??[]).concat((r==null?void 0:r.source)??[]),e.targetHandle);if(!a||!i)return(u=e.onError)==null||u.call(e,"008",Br.error008(a?"target":"source",{id:e.id,sourceHandle:e.sourceHandle,targetHandle:e.targetHandle})),null;const s=(a==null?void 0:a.position)||fe.Bottom,c=(i==null?void 0:i.position)||fe.Top,l=jd(t,a,s),h=jd(n,i,c);return{sourceX:l.x,sourceY:l.y,targetX:h.x,targetY:h.y,sourcePosition:s,targetPosition:c}}function pU(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 jd(e,t,n=fe.Left,o=!1){const r=((t==null?void 0:t.x)??0)+e.internals.positionAbsolute.x,a=((t==null?void 0:t.y)??0)+e.internals.positionAbsolute.y,{width:i,height:s}=t??$a(e);if(o)return{x:r+i/2,y:a+s/2};switch((t==null?void 0:t.position)??n){case fe.Top:return{x:r+i/2,y:a};case fe.Right:return{x:r+i,y:a+s/2};case fe.Bottom:return{x:r+i/2,y:a+s};case fe.Left:return{x:r,y:a+s/2}}}function yU(e,t){return e&&(t?e.find(n=>n.id===t):e[0])||null}function AH(e,t){return e?typeof e=="string"?e:`${t?`${t}__`:""}${Object.keys(e).sort().map(o=>`${o}=${e[o]}`).join("&")}`:""}function Lze(e,{id:t,defaultColor:n,defaultMarkerStart:o,defaultMarkerEnd:r}){const a=new Set;return e.reduce((i,s)=>([s.markerStart||o,s.markerEnd||r].forEach(c=>{if(c&&typeof c=="object"){const l=AH(c,t);a.has(l)||(i.push({id:l,color:c.color||n,...c}),a.add(l))}}),i),[]).sort((i,s)=>i.id.localeCompare(s.id))}const IQ=1e3,Nze=10,TF={nodeOrigin:[0,0],nodeExtent:Yh,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},Ize={...TF,checkEquality:!0};function DF(e,t){const n={...e};for(const o in t)t[o]!==void 0&&(n[o]=t[o]);return n}function Aze(e,t,n){const o=DF(TF,n);for(const r of e.values())if(r.parentId)OF(r,e,t,o);else{const a=wf(r,o.nodeOrigin),i=C0(r.extent)?r.extent:o.nodeExtent,s=Ed(a,i,$a(r));r.internals.positionAbsolute=s}}function Eze(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 a={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(a):r.type==="target"&&o.push(a)}return{source:n,target:o}}function HF(e){return e==="manual"}function EH(e,t,n,o={}){var h,u;const r=DF(Ize,o),a={i:0},i=new Map(t),s=r!=null&&r.elevateNodesOnSelect&&!HF(r.zIndexMode)?IQ:0;let c=e.length>0,l=!1;t.clear(),n.clear();for(const p of e){let y=i.get(p.id);if(r.checkEquality&&p===(y==null?void 0:y.internals.userNode))t.set(p.id,y);else{const g=wf(p,r.nodeOrigin),k=C0(p.extent)?p.extent:r.nodeExtent,x=Ed(g,k,$a(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:Eze(p,y),z:AQ(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&&OF(y,t,n,o,a),l||(l=p.selected??!1)}return{nodesInitialized:c,hasSelectedNodes:l}}function jze(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 OF(e,t,n,o,r){const{elevateNodesOnSelect:a,nodeOrigin:i,nodeExtent:s,zIndexMode:c}=DF(TF,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}jze(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*Nze),r&&h.internals.rootParentIndex!==void 0&&(r.i=h.internals.rootParentIndex);const u=a&&!HF(c)?IQ:0,{x:p,y,z:g}=$ze(e,h,i,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 AQ(e,t,n){const o=Qo(e.zIndex)?e.zIndex:0;return HF(n)?o:o+(e.selected?t:0)}function $ze(e,t,n,o,r,a){const{x:i,y:s}=t.internals.positionAbsolute,c=$a(e),l=wf(e,n),h=C0(e.extent)?Ed(l,e.extent,c):l;let u=Ed({x:i+h.x,y:s+h.y},o,c);e.extent==="parent"&&(u=kQ(u,c,t));const p=AQ(e,r,a),y=t.internals.z??0;return{x:u.x,y:u.y,z:y>=p?y+1:p}}function FF(e,t,n,o=[0,0]){var i;const r=[],a=new Map;for(const s of e){const c=t.get(s.parentId);if(!c)continue;const l=((i=a.get(s.parentId))==null?void 0:i.expandedRect)??_0(c),h=xQ(l,s.rect);a.set(s.parentId,{expandedRect:h,parent:c})}return a.size>0&&a.forEach(({expandedRect:s,parent:c},l)=>{var w;const h=c.internals.positionAbsolute,u=$a(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 Pze(e,t,n,o,r,a,i){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=RF(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=C0(g.extent)?g.extent:a;let{positionAbsolute:b}=g.internals;g.parentId&&g.extent==="parent"?b=kQ(b,k,t.get(g.parentId)):w&&(b=Ed(b,w,k));const C={...g,measured:k,internals:{...g.internals,positionAbsolute:b,handleBounds:{source:lU("source",y.nodeElement,M,u,g.id),target:lU("target",y.nodeElement,M,u,g.id)}}};t.set(g.id,C),g.parentId&&OF(C,t,n,{nodeOrigin:r,zIndexMode:i}),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:_0(C,r)}))}}if(p.length>0){const y=FF(p,t,n,r);l.push(...y)}return{changes:l,updatedInternals:c}}async function zze({delta:e,panZoom:t,transform:n,translateExtent:o,width:r,height:a}){if(!t||!e.x&&!e.y)return Promise.resolve(!1);const i=await t.setViewportConstrained({x:n[0]+e.x,y:n[1]+e.y,zoom:n[2]},[[0,0],[r,a]],o),s=!!i&&(i.x!==n[0]||i.y!==n[1]||i.k!==n[2]);return Promise.resolve(s)}function mU(e,t,n,o,r,a){let i=r;const s=o.get(i)||new Map;o.set(i,s.set(n,t)),i=`${r}-${e}`;const c=o.get(i)||new Map;if(o.set(i,c.set(n,t)),a){i=`${r}-${e}-${a}`;const l=o.get(i)||new Map;o.set(i,l.set(n,t))}}function EQ(e,t,n){e.clear(),t.clear();for(const o of n){const{source:r,target:a,sourceHandle:i=null,targetHandle:s=null}=o,c={edgeId:o.id,source:r,target:a,sourceHandle:i,targetHandle:s},l=`${r}-${i}--${a}-${s}`,h=`${a}-${s}--${r}-${i}`;mU("source",c,h,e,r,i),mU("target",c,l,e,a,s),t.set(o.id,o)}}function jQ(e,t){if(!e.parentId)return!1;const n=t.get(e.parentId);return n?n.selected?!0:jQ(n,t):!1}function gU(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 Rze(e,t,n,o){const r=new Map;for(const[a,i]of e)if((i.selected||i.id===o)&&(!i.parentId||!jQ(i,e))&&(i.draggable||t&&typeof i.draggable>"u")){const s=e.get(a);s&&r.set(a,{id:a,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 LT({nodeId:e,dragItems:t,nodeLookup:n,dragging:o=!0}){var i,s,c;const r=[];for(const[l,h]of t){const u=(i=n.get(l))==null?void 0:i.internals.userNode;u&&r.push({...u,position:h.position,dragging:o})}if(!e)return[r[0],r];const a=(s=n.get(e))==null?void 0:s.internals.userNode;return[a?{...a,position:((c=t.get(e))==null?void 0:c.position)||a.position,dragging:o}:r[0],r]}function Tze({dragItems:e,snapGrid:t,x:n,y:o}){const r=e.values().next().value;if(!r)return null;const a={x:n-r.distance.x,y:o-r.distance.y},i=bf(a,t);return{x:i.x-a.x,y:i.y-a.y}}function Dze({onNodeMouseDown:e,getStoreItems:t,onDragStart:n,onDrag:o,onDragStop:r}){let a={x:null,y:null},i=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:W}){const{nodeLookup:$,nodeExtent:T,snapGrid:D,snapToGrid:O,nodeOrigin:I,onNodeDrag:R,onSelectionDrag:L,onError:V,updateNodePositions:H}=t();a={x:z,y:W};let j=!1;const K=s.size>1,X=K&&T?IH(Mf(s)):null,J=K&&O?Tze({dragItems:s,snapGrid:D,x:z,y:W}):null;for(const[re,oe]of s){if(!$.has(re))continue;let ne={x:z-oe.distance.x,y:W-oe.distance.y};O&&(ne=J?{x:Math.round(ne.x+J.x),y:Math.round(ne.y+J.y)}:bf(ne,D));let ce=null;if(K&&T&&!oe.extent&&X){const{positionAbsolute:xe}=oe.internals,Re=xe.x-X.x+T[0][0],Ye=xe.x+oe.measured.width-X.x2+T[1][0],le=xe.y-X.y+T[0][1],Ie=xe.y+oe.measured.height-X.y2+T[1][1];ce=[[Re,le],[Ye,Ie]]}const{position:ve,positionAbsolute:ge}=gQ({nodeId:re,nextPosition:ne,nodeLookup:$,nodeExtent:ce||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]=LT({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:W,autoPanSpeed:$,autoPanOnNodeDrag:T}=t();if(!T){c=!1,cancelAnimationFrame(i);return}const[D,O]=vQ(l,h,$);(D!==0||O!==0)&&(a.x=(a.x??0)-D/z[2],a.y=(a.y??0)-O/z[2],await W({x:D,y:O})&&N(a)),i=requestAnimationFrame(P)}function A(z){var K;const{nodeLookup:W,multiSelectionActive:$,nodesDraggable:T,transform:D,snapGrid:O,snapToGrid:I,selectNodesOnDrag:R,onNodeDragStart:L,onSelectionDragStart:V,unselectNodesAndEdges:H}=t();u=!0,(!R||!C)&&!$&&_&&((K=W.get(_))!=null&&K.selected||H()),C&&R&&_&&(e==null||e(_));const j=bh(z.sourceEvent,{transform:D,snapGrid:O,snapToGrid:I,containerBounds:h});if(a=j,s=Rze(W,T,j,_),s.size>0&&(n||L||!_&&V)){const[X,J]=LT({nodeId:_,dragItems:s,nodeLookup:W});n==null||n(z.sourceEvent,s,X,J),L==null||L(z.sourceEvent,X,J),_||V==null||V(z.sourceEvent,J)}}const E=ZY().clickDistance(S).on("start",z=>{const{domNode:W,nodeDragThreshold:$,transform:T,snapGrid:D,snapToGrid:O}=t();h=(W==null?void 0:W.getBoundingClientRect())||null,y=!1,g=!1,k=z.sourceEvent,$===0&&A(z),a=bh(z.sourceEvent,{transform:T,snapGrid:D,snapToGrid:O,containerBounds:h}),l=Jo(z.sourceEvent,h)}).on("drag",z=>{const{autoPanOnNodeDrag:W,transform:$,snapGrid:T,snapToGrid:D,nodeDragThreshold:O,nodeLookup:I}=t(),R=bh(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&&W&&u&&(c=!0,P()),!u){const L=Jo(z.sourceEvent,h),V=L.x-l.x,H=L.y-l.y;Math.sqrt(V*V+H*H)>O&&A(z)}(a.x!==R.xSnapped||a.y!==R.ySnapped)&&s&&u&&(l=Jo(z.sourceEvent,h),N(R))}}).on("end",z=>{if(!(!u||y)&&(c=!1,u=!1,cancelAnimationFrame(i),s.size>0)){const{nodeLookup:W,updateNodePositions:$,onNodeDragStop:T,onSelectionDragStop:D}=t();if(g&&($(s,!1),g=!1),r||T||!_&&D){const[O,I]=LT({nodeId:_,dragItems:s,nodeLookup:W,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 W=z.target;return!z.button&&(!M||!gU(W,`.${M}`,b))&&(!w||gU(W,w,b))});p.call(E)}function v(){p==null||p.on(".drag",null)}return{update:x,destroy:v}}function Hze(e,t,n){const o=[],r={x:e.x-n,y:e.y-n,width:n*2,height:n*2};for(const a of t.values())Jh(r,_0(a))>0&&o.push(a);return o}const Oze=250;function Fze(e,t,n,o){var s,c;let r=[],a=1/0;const i=Hze(e,n,t+Oze);for(const l of i){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}=jd(l,u,u.position,!0),g=Math.sqrt(Math.pow(p-e.x,2)+Math.pow(y-e.y,2));g>t||(g<a?(r=[{...u,x:p,y}],a=g):g===a&&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 $Q(e,t,n,o,r,a=!1){var l,h,u;const i=o.get(e);if(!i)return null;const s=r==="strict"?(l=i.internals.handleBounds)==null?void 0:l[t]:[...((h=i.internals.handleBounds)==null?void 0:h.source)??[],...((u=i.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&&a?{...c,...jd(i,c,c.position,!0)}:c}function PQ(e,t){return e||(t!=null&&t.classList.contains("target")?"target":t!=null&&t.classList.contains("source")?"source":null)}function qze(e,t){let n=null;return t?n=!0:e&&!t&&(n=!1),n}const zQ=()=>!0;function Vze(e,{connectionMode:t,connectionRadius:n,handleId:o,nodeId:r,edgeUpdaterType:a,isTarget:i,domNode:s,nodeLookup:c,lib:l,autoPanOnConnect:h,flowId:u,panBy:p,cancelConnection:y,onConnectStart:g,onConnect:k,onConnectEnd:x,isValidConnection:v=zQ,onReconnectEnd:M,updateConnection:w,getTransform:b,getFromHandle:C,autoPanSpeed:_,dragThreshold:S=1,handleDomNode:N}){const P=bQ(e.target);let A=0,E;const{x:z,y:W}=Jo(e),$=PQ(a,N),T=s==null?void 0:s.getBoundingClientRect();let D=!1;if(!T||!$)return;const O=$Q(r,$,o,c,t);if(!O)return;let I=Jo(e,T),R=!1,L=null,V=!1,H=null;function j(){if(!h||!T)return;const[ve,ge]=vQ(I,T,_);p({x:ve,y:ge}),A=requestAnimationFrame(j)}const K={...O,nodeId:r,type:$,position:O.position},X=c.get(r);let re={inProgress:!0,isValid:null,from:jd(X,K,fe.Left,!0),fromHandle:K,fromPosition:K.position,fromNode:X,to:I,toHandle:null,toPosition:aU[K.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:jt}=Jo(ve),xt=Ie-z,Qt=jt-W;if(!(xt*xt+Qt*Qt>S*S))return;oe()}if(!C()||!K){ce(ve);return}const ge=b();I=Jo(ve,T),E=Fze(_f(I,ge,!1,[1,1]),n,c,K),R||(j(),R=!0);const xe=RQ(ve,{handle:E,connectionMode:t,fromNodeId:r,fromHandleId:o,fromType:i?"target":"source",isValidConnection:v,doc:P,lib:l,flowId:u,nodeLookup:c});H=xe.handleDomNode,L=xe.connection,V=qze(!!E,xe.isValid);const Re=c.get(r),Ye=Re?jd(Re,K,fe.Left,!0):re.from,le={...re,from:Ye,isValid:V,to:xe.toHandle&&V?ZP({x:xe.toHandle.x,y:xe.toHandle.y},ge):I,toHandle:xe.toHandle,toPosition:V&&xe.toHandle?xe.toHandle.position:aU[K.position],toNode:xe.toHandle?c.get(xe.toHandle.nodeId):null,pointer:I};w(le),re=le}function ce(ve){if(!("touches"in ve&&ve.touches.length>0)){if(D){(E||H)&&L&&V&&(k==null||k(L));const{inProgress:ge,...xe}=re,Re={...xe,toPosition:re.toHandle?re.toPosition:null};x==null||x(ve,Re),a&&(M==null||M(ve,Re))}y(),cancelAnimationFrame(A),R=!1,V=!1,L=null,H=null,P.removeEventListener("mousemove",ne),P.removeEventListener("mouseup",ce),P.removeEventListener("touchmove",ne),P.removeEventListener("touchend",ce)}}P.addEventListener("mousemove",ne),P.addEventListener("mouseup",ce),P.addEventListener("touchmove",ne),P.addEventListener("touchend",ce)}function RQ(e,{handle:t,connectionMode:n,fromNodeId:o,fromHandleId:r,fromType:a,doc:i,lib:s,flowId:c,isValidConnection:l=zQ,nodeLookup:h}){const u=a==="target",p=t?i.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}=Jo(e),k=i.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=PQ(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===w0.Strict?u&&M==="source"||!u&&M==="target":w!==o||b!==r);v.isValid=P&&l(S),v.toHandle=$Q(w,M,b,h,n,!0)}return v}const jH={onPointerDown:Vze,isValid:RQ};function Bze({domNode:e,panZoom:t,getTransform:n,getViewScale:o}){const r=ao(e);function a({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&&ef()?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=uQ().on("start",x).on("zoom",u?v:null).on("zoom.wheel",p?g:null);r.call(M,{})}function i(){r.on("zoom",null)}return{update:a,destroy:i,pointer:Ko}}const nR=e=>({x:e.x,y:e.y,zoom:e.k}),NT=({x:e,y:t,zoom:n})=>Qz.translate(e,t).scale(n),Bu=(e,t)=>e.target.closest(`.${t}`),TQ=(e,t)=>t===2&&Array.isArray(e)&&e.includes(2),Uze=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2,IT=(e,t=0,n=Uze,o=()=>{})=>{const r=typeof t=="number"&&t>0;return r||o(),r?e.transition().duration(t).ease(n).on("end",o):e},DQ=e=>{const t=e.ctrlKey&&ef()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*t};function Wze({zoomPanValues:e,noWheelClassName:t,d3Selection:n,d3Zoom:o,panOnScrollMode:r,panOnScrollSpeed:a,zoomOnPinch:i,onPanZoomStart:s,onPanZoom:c,onPanZoomEnd:l}){return h=>{if(Bu(h,t))return h.ctrlKey&&h.preventDefault(),!1;h.preventDefault(),h.stopImmediatePropagation();const u=n.property("__zoom").k||1;if(h.ctrlKey&&i){const x=Ko(h),v=DQ(h),M=u*Math.pow(2,v);o.scaleTo(n,M,x,h);return}const p=h.deltaMode===1?20:1;let y=r===bd.Vertical?0:h.deltaX*p,g=r===bd.Horizontal?0:h.deltaY*p;!ef()&&h.shiftKey&&r!==bd.Vertical&&(y=h.deltaY*p,g=0),o.translateBy(n,-(y/u)*a,-(g/u)*a,{internal:!0});const k=nR(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 Gze({noWheelClassName:e,preventScrolling:t,d3ZoomHandler:n}){return function(o,r){const a=o.type==="wheel",i=!t&&a&&!o.ctrlKey,s=Bu(o,e);if(o.ctrlKey&&a&&s&&o.preventDefault(),i||s)return null;o.preventDefault(),n.call(this,o,r)}}function Kze({zoomPanValues:e,onDraggingChange:t,onPanZoomStart:n}){return o=>{var a,i,s;if((a=o.sourceEvent)!=null&&a.internal)return;const r=nR(o.transform);e.mouseButton=((i=o.sourceEvent)==null?void 0:i.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 Zze({zoomPanValues:e,panOnDrag:t,onPaneContextMenu:n,onTransformChange:o,onPanZoom:r}){return a=>{var i,s;e.usedRightMouseButton=!!(n&&TQ(t,e.mouseButton??0)),(i=a.sourceEvent)!=null&&i.sync||o([a.transform.x,a.transform.y,a.transform.k]),r&&!((s=a.sourceEvent)!=null&&s.internal)&&(r==null||r(a.sourceEvent,nR(a.transform)))}}function Xze({zoomPanValues:e,panOnDrag:t,panOnScroll:n,onDraggingChange:o,onPanZoomEnd:r,onPaneContextMenu:a}){return i=>{var s;if(!((s=i.sourceEvent)!=null&&s.internal)&&(e.isZoomingOrPanning=!1,a&&TQ(t,e.mouseButton??0)&&!e.usedRightMouseButton&&i.sourceEvent&&a(i.sourceEvent),e.usedRightMouseButton=!1,o(!1),r)){const c=nR(i.transform);e.prevViewport=c,clearTimeout(e.timerId),e.timerId=setTimeout(()=>{r==null||r(i.sourceEvent,c)},n?150:0)}}}function Yze({zoomActivationKeyPressed:e,zoomOnScroll:t,zoomOnPinch:n,panOnDrag:o,panOnScroll:r,zoomOnDoubleClick:a,userSelectionActive:i,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"&&(Bu(u,`${l}-flow__node`)||Bu(u,`${l}-flow__edge`)))return!0;if(!o&&!p&&!r&&!a&&!n||i||h&&!g||Bu(u,s)&&g||Bu(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 Qze({domNode:e,minZoom:t,maxZoom:n,translateExtent:o,viewport:r,onPanZoom:a,onPanZoomStart:i,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=uQ().scaleExtent([t,n]).translateExtent(o),p=ao(e).call(u);M({x:r.x,y:r.y,zoom:b0(r.zoom,t,n)},[[0,0],[h.width,h.height]],o);const y=p.on("wheel.zoom"),g=p.on("dblclick.zoom");u.wheelDelta(DQ);function k(E,z){return p?new Promise(W=>{u==null||u.interpolate((z==null?void 0:z.interpolate)==="linear"?Mh:nP).transform(IT(p,z==null?void 0:z.duration,z==null?void 0:z.ease,()=>W(!0)),E)}):Promise.resolve(!1)}function x({noWheelClassName:E,noPanClassName:z,onPaneContextMenu:W,userSelectionActive:$,panOnScroll:T,panOnDrag:D,panOnScrollMode:O,panOnScrollSpeed:I,preventScrolling:R,zoomOnPinch:L,zoomOnScroll:V,zoomOnDoubleClick:H,zoomActivationKeyPressed:j,lib:K,onTransformChange:X,connectionInProgress:J,paneClickDistance:re,selectionOnDrag:oe}){$&&!l.isZoomingOrPanning&&v();const ne=T&&!j&&!$;u.clickDistance(oe?1/0:!Qo(re)||re<0?0:re);const ce=ne?Wze({zoomPanValues:l,noWheelClassName:E,d3Selection:p,d3Zoom:u,panOnScrollMode:O,panOnScrollSpeed:I,zoomOnPinch:L,onPanZoomStart:i,onPanZoom:a,onPanZoomEnd:s}):Gze({noWheelClassName:E,preventScrolling:R,d3ZoomHandler:y});if(p.on("wheel.zoom",ce,{passive:!1}),!$){const ge=Kze({zoomPanValues:l,onDraggingChange:c,onPanZoomStart:i});u.on("start",ge);const xe=Zze({zoomPanValues:l,panOnDrag:D,onPaneContextMenu:!!W,onPanZoom:a,onTransformChange:X});u.on("zoom",xe);const Re=Xze({zoomPanValues:l,panOnDrag:D,panOnScroll:T,onPaneContextMenu:W,onPanZoomEnd:s,onDraggingChange:c});u.on("end",Re)}const ve=Yze({zoomActivationKeyPressed:j,panOnDrag:D,zoomOnScroll:V,panOnScroll:T,zoomOnDoubleClick:H,zoomOnPinch:L,userSelectionActive:$,noPanClassName:z,noWheelClassName:E,lib:K,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,W){const $=NT(E),T=u==null?void 0:u.constrain()($,z,W);return T&&await k(T),new Promise(D=>D(T))}async function w(E,z){const W=NT(E);return await k(W,z),new Promise($=>$(W))}function b(E){if(p){const z=NT(E),W=p.property("__zoom");(W.k!==E.zoom||W.x!==E.x||W.y!==E.y)&&(u==null||u.transform(p,z,null,{sync:!0}))}}function C(){const E=p?dQ(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(W=>{u==null||u.interpolate((z==null?void 0:z.interpolate)==="linear"?Mh:nP).scaleTo(IT(p,z==null?void 0:z.duration,z==null?void 0:z.ease,()=>W(!0)),E)}):Promise.resolve(!1)}function S(E,z){return p?new Promise(W=>{u==null||u.interpolate((z==null?void 0:z.interpolate)==="linear"?Mh:nP).scaleBy(IT(p,z==null?void 0:z.duration,z==null?void 0:z.ease,()=>W(!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=!Qo(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 Ti;(function(e){e.Line="line",e.Handle="handle"})(Ti||(Ti={}));function Jze({width:e,prevWidth:t,height:n,prevHeight:o,affectsX:r,affectsY:a}){const i=e-t,s=n-o,c=[i>0?1:i<0?-1:0,s>0?1:s<0?-1:0];return i&&r&&(c[0]=c[0]*-1),s&&a&&(c[1]=c[1]*-1),c}function kU(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 ti(e,t){return Math.max(0,t-e)}function ni(e,t){return Math.max(0,e-t)}function Mp(e,t,n){return Math.max(0,t-e,e-n)}function vU(e,t){return e?!t:t}function eRe(e,t,n,o,r,a,i,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=-a[0]*C,W=-a[1]*_;let $=Mp(A,k,x),T=Mp(E,v,M);if(i){let I=0,R=0;c&&N<0?I=ti(w+N+z,i[0][0]):!c&&N>0&&(I=ni(w+A+z,i[1][0])),l&&P<0?R=ti(b+P+W,i[0][1]):!l&&P>0&&(R=ni(b+E+W,i[1][1])),$=Math.max($,I),T=Math.max(T,R)}if(s){let I=0,R=0;c&&N>0?I=ni(w+N,s[0][0]):!c&&N<0&&(I=ti(w+A,s[1][0])),l&&P>0?R=ni(b+P,s[0][1]):!l&&P<0&&(R=ti(b+E,s[1][1])),$=Math.max($,I),T=Math.max(T,R)}if(r){if(h){const I=Mp(A/S,v,M)*S;if($=Math.max($,I),i){let R=0;!c&&!l||c&&!l&&p?R=ni(b+W+A/S,i[1][1])*S:R=ti(b+W+(c?N:-N)/S,i[0][1])*S,$=Math.max($,R)}if(s){let R=0;!c&&!l||c&&!l&&p?R=ti(b+A/S,s[1][1])*S:R=ni(b+(c?N:-N)/S,s[0][1])*S,$=Math.max($,R)}}if(u){const I=Mp(E*S,k,x)/S;if(T=Math.max(T,I),i){let R=0;!c&&!l||l&&!c&&p?R=ni(w+E*S+z,i[1][0])/S:R=ti(w+(l?P:-P)*S+z,i[0][0])/S,T=Math.max(T,R)}if(s){let R=0;!c&&!l||l&&!c&&p?R=ti(w+E*S,s[1][0])/S:R=ni(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=(vU(c,l)?-N:N)/S:N=(vU(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:a[0]*N*(c?-1:1)+D,y:a[1]*P*(l?-1:1)+O}}const HQ={width:0,height:0,x:0,y:0},tRe={...HQ,pointerX:0,pointerY:0,aspectRatio:1};function nRe(e){return[[0,0],[e.measured.width,e.measured.height]]}function oRe(e,t,n){const o=t.position.x+e.position.x,r=t.position.y+e.position.y,a=e.measured.width??0,i=e.measured.height??0,s=n[0]*a,c=n[1]*i;return[[o-s,r-c],[o+a-s,r+i-c]]}function rRe({domNode:e,nodeId:t,getStoreItems:n,onChange:o,onEnd:r}){const a=ao(e);let i={controlDirection:kU("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={...HQ},M={...tRe};i={boundaries:h,resizeDirection:p,keepAspectRatio:u,controlDirection:kU(l)};let w,b=null,C=[],_,S,N,P=!1;const A=ZY().on("start",E=>{const{nodeLookup:z,transform:W,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}=bh(E.sourceEvent,{transform:W,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=oRe(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:W,snapToGrid:$,nodeOrigin:T}=n(),D=bh(E.sourceEvent,{transform:z,snapGrid:W,snapToGrid:$,containerBounds:b}),O=[];if(!w)return;const{x:I,y:R,width:L,height:V}=v,H={},j=w.origin??T,{width:K,height:X,x:J,y:re}=eRe(M,i.controlDirection,D,i.boundaries,i.keepAspectRatio,j,S,N),oe=K!==L,ne=X!==V,ce=J!==I&&oe,ve=re!==R&≠if(!ce&&!ve&&!oe&&!ne)return;if((ce||ve||j[0]===1||j[1]===1)&&(H.x=ce?J:v.x,H.y=ve?re:v.y,v.x=H.x,v.y=H.y,C.length>0)){const Ye=J-I,le=re-R;for(const Ie of C)Ie.position={x:Ie.position.x-Ye+j[0]*(K-L),y:Ie.position.y-le+j[1]*(X-V)},O.push(Ie)}if((oe||ne)&&(H.width=oe&&(!i.resizeDirection||i.resizeDirection==="horizontal")?K:v.width,H.height=ne&&(!i.resizeDirection||i.resizeDirection==="vertical")?X: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 le=j[1]*(H.height??0);H.y&&H.y<le&&(v.y=le,M.y=M.y-(H.y-le))}const ge=Jze({width:v.width,prevWidth:L,height:v.height,prevHeight:V,affectsX:i.controlDirection.affectsX,affectsY:i.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)});a.call(A)}function c(){a.on(".drag",null)}return{update:s,destroy:c}}var OQ={exports:{}},FQ={},qQ={exports:{}},VQ={};/**
|
|
8446
|
+
*/const kAe=Object.freeze(Object.defineProperty({__proto__:null,AArrowDown:sy,AArrowDownIcon:sy,AArrowUp:cy,AArrowUpIcon:cy,ALargeSmall:ly,ALargeSmallIcon:ly,Accessibility:dy,AccessibilityIcon:dy,Activity:uy,ActivityIcon:uy,ActivitySquare:Kl,ActivitySquareIcon:Kl,AirVent:hy,AirVentIcon:hy,Airplay:fy,AirplayIcon:fy,AlarmCheck:fs,AlarmCheckIcon:fs,AlarmClock:yy,AlarmClockCheck:fs,AlarmClockCheckIcon:fs,AlarmClockIcon:yy,AlarmClockMinus:ps,AlarmClockMinusIcon:ps,AlarmClockOff:py,AlarmClockOffIcon:py,AlarmClockPlus:ys,AlarmClockPlusIcon:ys,AlarmMinus:ps,AlarmMinusIcon:ps,AlarmPlus:ys,AlarmPlusIcon:ys,AlarmSmoke:my,AlarmSmokeIcon:my,Album:gy,AlbumIcon:gy,AlertCircle:ci,AlertCircleIcon:ci,AlertOctagon:bl,AlertOctagonIcon:bl,AlertTriangle:Er,AlertTriangleIcon:Er,AlignCenter:ui,AlignCenterHorizontal:vy,AlignCenterHorizontalIcon:vy,AlignCenterIcon:ui,AlignCenterVertical:ky,AlignCenterVerticalIcon:ky,AlignEndHorizontal:xy,AlignEndHorizontalIcon:xy,AlignEndVertical:wy,AlignEndVerticalIcon:wy,AlignHorizontalDistributeCenter:My,AlignHorizontalDistributeCenterIcon:My,AlignHorizontalDistributeEnd:by,AlignHorizontalDistributeEndIcon:by,AlignHorizontalDistributeStart:_y,AlignHorizontalDistributeStartIcon:_y,AlignHorizontalJustifyCenter:Cy,AlignHorizontalJustifyCenterIcon:Cy,AlignHorizontalJustifyEnd:Ly,AlignHorizontalJustifyEndIcon:Ly,AlignHorizontalJustifyStart:Sy,AlignHorizontalJustifyStartIcon:Sy,AlignHorizontalSpaceAround:Ny,AlignHorizontalSpaceAroundIcon:Ny,AlignHorizontalSpaceBetween:Iy,AlignHorizontalSpaceBetweenIcon:Iy,AlignJustify:G1,AlignJustifyIcon:G1,AlignLeft:Bo,AlignLeftIcon:Bo,AlignRight:hi,AlignRightIcon:hi,AlignStartHorizontal:Ay,AlignStartHorizontalIcon:Ay,AlignStartVertical:Ey,AlignStartVerticalIcon:Ey,AlignVerticalDistributeCenter:jy,AlignVerticalDistributeCenterIcon:jy,AlignVerticalDistributeEnd:$y,AlignVerticalDistributeEndIcon:$y,AlignVerticalDistributeStart:Py,AlignVerticalDistributeStartIcon:Py,AlignVerticalJustifyCenter:zy,AlignVerticalJustifyCenterIcon:zy,AlignVerticalJustifyEnd:Ry,AlignVerticalJustifyEndIcon:Ry,AlignVerticalJustifyStart:Ty,AlignVerticalJustifyStartIcon:Ty,AlignVerticalSpaceAround:Dy,AlignVerticalSpaceAroundIcon:Dy,AlignVerticalSpaceBetween:Hy,AlignVerticalSpaceBetweenIcon:Hy,Ambulance:Oy,AmbulanceIcon:Oy,Ampersand:Fy,AmpersandIcon:Fy,Ampersands:qy,AmpersandsIcon:qy,Amphora:Vy,AmphoraIcon:Vy,Anchor:By,AnchorIcon:By,Angry:Uy,AngryIcon:Uy,Annoyed:Wy,AnnoyedIcon:Wy,Antenna:Gy,AntennaIcon:Gy,Anvil:Ky,AnvilIcon:Ky,Aperture:Zy,ApertureIcon:Zy,AppWindow:Yy,AppWindowIcon:Yy,AppWindowMac:Xy,AppWindowMacIcon:Xy,Apple:Qy,AppleIcon:Qy,Archive:tm,ArchiveIcon:tm,ArchiveRestore:Jy,ArchiveRestoreIcon:Jy,ArchiveX:em,ArchiveXIcon:em,AreaChart:As,AreaChartIcon:As,Armchair:nm,ArmchairIcon:nm,ArrowBigDown:rm,ArrowBigDownDash:om,ArrowBigDownDashIcon:om,ArrowBigDownIcon:rm,ArrowBigLeft:im,ArrowBigLeftDash:am,ArrowBigLeftDashIcon:am,ArrowBigLeftIcon:im,ArrowBigRight:cm,ArrowBigRightDash:sm,ArrowBigRightDashIcon:sm,ArrowBigRightIcon:cm,ArrowBigUp:dm,ArrowBigUpDash:lm,ArrowBigUpDashIcon:lm,ArrowBigUpIcon:dm,ArrowDown:xm,ArrowDown01:um,ArrowDown01Icon:um,ArrowDown10:hm,ArrowDown10Icon:hm,ArrowDownAZ:ms,ArrowDownAZIcon:ms,ArrowDownAz:ms,ArrowDownAzIcon:ms,ArrowDownCircle:Bs,ArrowDownCircleIcon:Bs,ArrowDownFromLine:fm,ArrowDownFromLineIcon:fm,ArrowDownIcon:xm,ArrowDownLeft:ym,ArrowDownLeftFromCircle:Us,ArrowDownLeftFromCircleIcon:Us,ArrowDownLeftFromSquare:Jl,ArrowDownLeftFromSquareIcon:Jl,ArrowDownLeftIcon:ym,ArrowDownLeftSquare:Zl,ArrowDownLeftSquareIcon:Zl,ArrowDownNarrowWide:pm,ArrowDownNarrowWideIcon:pm,ArrowDownRight:gm,ArrowDownRightFromCircle:Gs,ArrowDownRightFromCircleIcon:Gs,ArrowDownRightFromSquare:e1,ArrowDownRightFromSquareIcon:e1,ArrowDownRightIcon:gm,ArrowDownRightSquare:Xl,ArrowDownRightSquareIcon:Xl,ArrowDownSquare:Yl,ArrowDownSquareIcon:Yl,ArrowDownToDot:mm,ArrowDownToDotIcon:mm,ArrowDownToLine:km,ArrowDownToLineIcon:km,ArrowDownUp:vm,ArrowDownUpIcon:vm,ArrowDownWideNarrow:gs,ArrowDownWideNarrowIcon:gs,ArrowDownZA:ks,ArrowDownZAIcon:ks,ArrowDownZa:ks,ArrowDownZaIcon:ks,ArrowLeft:bm,ArrowLeftCircle:Ws,ArrowLeftCircleIcon:Ws,ArrowLeftFromLine:wm,ArrowLeftFromLineIcon:wm,ArrowLeftIcon:bm,ArrowLeftRight:W2,ArrowLeftRightIcon:W2,ArrowLeftSquare:Ql,ArrowLeftSquareIcon:Ql,ArrowLeftToLine:Mm,ArrowLeftToLineIcon:Mm,ArrowRight:Ju,ArrowRightCircle:Xs,ArrowRightCircleIcon:Xs,ArrowRightFromLine:_m,ArrowRightFromLineIcon:_m,ArrowRightIcon:Ju,ArrowRightLeft:Cm,ArrowRightLeftIcon:Cm,ArrowRightSquare:o1,ArrowRightSquareIcon:o1,ArrowRightToLine:Sm,ArrowRightToLineIcon:Sm,ArrowUp:Rm,ArrowUp01:Lm,ArrowUp01Icon:Lm,ArrowUp10:Nm,ArrowUp10Icon:Nm,ArrowUpAZ:vs,ArrowUpAZIcon:vs,ArrowUpAz:vs,ArrowUpAzIcon:vs,ArrowUpCircle:Ys,ArrowUpCircleIcon:Ys,ArrowUpDown:Im,ArrowUpDownIcon:Im,ArrowUpFromDot:Am,ArrowUpFromDotIcon:Am,ArrowUpFromLine:Em,ArrowUpFromLineIcon:Em,ArrowUpIcon:Rm,ArrowUpLeft:jm,ArrowUpLeftFromCircle:Ks,ArrowUpLeftFromCircleIcon:Ks,ArrowUpLeftFromSquare:t1,ArrowUpLeftFromSquareIcon:t1,ArrowUpLeftIcon:jm,ArrowUpLeftSquare:r1,ArrowUpLeftSquareIcon:r1,ArrowUpNarrowWide:xs,ArrowUpNarrowWideIcon:xs,ArrowUpRight:Pm,ArrowUpRightFromCircle:Zs,ArrowUpRightFromCircleIcon:Zs,ArrowUpRightFromSquare:n1,ArrowUpRightFromSquareIcon:n1,ArrowUpRightIcon:Pm,ArrowUpRightSquare:s1,ArrowUpRightSquareIcon:s1,ArrowUpSquare:a1,ArrowUpSquareIcon:a1,ArrowUpToLine:$m,ArrowUpToLineIcon:$m,ArrowUpWideNarrow:zm,ArrowUpWideNarrowIcon:zm,ArrowUpZA:ws,ArrowUpZAIcon:ws,ArrowUpZa:ws,ArrowUpZaIcon:ws,ArrowsUpFromLine:Tm,ArrowsUpFromLineIcon:Tm,Asterisk:Dm,AsteriskIcon:Dm,AsteriskSquare:i1,AsteriskSquareIcon:i1,AtSign:Hm,AtSignIcon:Hm,Atom:Om,AtomIcon:Om,AudioLines:Fm,AudioLinesIcon:Fm,AudioWaveform:Vm,AudioWaveformIcon:Vm,Award:qm,AwardIcon:qm,Axe:Bm,AxeIcon:Bm,Axis3D:Ms,Axis3DIcon:Ms,Axis3d:Ms,Axis3dIcon:Ms,Baby:Um,BabyIcon:Um,Backpack:Wm,BackpackIcon:Wm,Badge:cg,BadgeAlert:Km,BadgeAlertIcon:Km,BadgeCent:Gm,BadgeCentIcon:Gm,BadgeCheck:bs,BadgeCheckIcon:bs,BadgeDollarSign:Zm,BadgeDollarSignIcon:Zm,BadgeEuro:Ym,BadgeEuroIcon:Ym,BadgeHelp:_s,BadgeHelpIcon:_s,BadgeIcon:cg,BadgeIndianRupee:Xm,BadgeIndianRupeeIcon:Xm,BadgeInfo:Qm,BadgeInfoIcon:Qm,BadgeJapaneseYen:Jm,BadgeJapaneseYenIcon:Jm,BadgeMinus:eg,BadgeMinusIcon:eg,BadgePercent:tg,BadgePercentIcon:tg,BadgePlus:ng,BadgePlusIcon:ng,BadgePoundSterling:og,BadgePoundSterlingIcon:og,BadgeQuestionMark:_s,BadgeQuestionMarkIcon:_s,BadgeRussianRuble:rg,BadgeRussianRubleIcon:rg,BadgeSwissFranc:ag,BadgeSwissFrancIcon:ag,BadgeTurkishLira:ig,BadgeTurkishLiraIcon:ig,BadgeX:sg,BadgeXIcon:sg,BaggageClaim:lg,BaggageClaimIcon:lg,Balloon:dg,BalloonIcon:dg,Ban:G2,BanIcon:G2,Banana:ug,BananaIcon:ug,Bandage:hg,BandageIcon:hg,Banknote:mg,BanknoteArrowDown:fg,BanknoteArrowDownIcon:fg,BanknoteArrowUp:pg,BanknoteArrowUpIcon:pg,BanknoteIcon:mg,BanknoteX:yg,BanknoteXIcon:yg,BarChart:Ds,BarChart2:Hs,BarChart2Icon:Hs,BarChart3:Rs,BarChart3Icon:Rs,BarChart4:zs,BarChart4Icon:zs,BarChartBig:Ps,BarChartBigIcon:Ps,BarChartHorizontal:js,BarChartHorizontalBig:Es,BarChartHorizontalBigIcon:Es,BarChartHorizontalIcon:js,BarChartIcon:Ds,Barcode:gg,BarcodeIcon:gg,Barrel:kg,BarrelIcon:kg,Baseline:vg,BaselineIcon:vg,Bath:xg,BathIcon:xg,Battery:Lg,BatteryCharging:wg,BatteryChargingIcon:wg,BatteryFull:Mg,BatteryFullIcon:Mg,BatteryIcon:Lg,BatteryLow:bg,BatteryLowIcon:bg,BatteryMedium:_g,BatteryMediumIcon:_g,BatteryPlus:Cg,BatteryPlusIcon:Cg,BatteryWarning:Sg,BatteryWarningIcon:Sg,Beaker:Ng,BeakerIcon:Ng,Bean:Ag,BeanIcon:Ag,BeanOff:Ig,BeanOffIcon:Ig,Bed:$g,BedDouble:Eg,BedDoubleIcon:Eg,BedIcon:$g,BedSingle:jg,BedSingleIcon:jg,Beef:Pg,BeefIcon:Pg,Beer:Rg,BeerIcon:Rg,BeerOff:zg,BeerOffIcon:zg,Bell:Vg,BellDot:Tg,BellDotIcon:Tg,BellElectric:Dg,BellElectricIcon:Dg,BellIcon:Vg,BellMinus:Hg,BellMinusIcon:Hg,BellOff:Og,BellOffIcon:Og,BellPlus:Fg,BellPlusIcon:Fg,BellRing:qg,BellRingIcon:qg,BetweenHorizonalEnd:Cs,BetweenHorizonalEndIcon:Cs,BetweenHorizonalStart:Ss,BetweenHorizonalStartIcon:Ss,BetweenHorizontalEnd:Cs,BetweenHorizontalEndIcon:Cs,BetweenHorizontalStart:Ss,BetweenHorizontalStartIcon:Ss,BetweenVerticalEnd:Bg,BetweenVerticalEndIcon:Bg,BetweenVerticalStart:Ug,BetweenVerticalStartIcon:Ug,BicepsFlexed:Wg,BicepsFlexedIcon:Wg,Bike:Gg,BikeIcon:Gg,Binary:Kg,BinaryIcon:Kg,Binoculars:Zg,BinocularsIcon:Zg,Biohazard:Xg,BiohazardIcon:Xg,Bird:Yg,BirdIcon:Yg,Birdhouse:Qg,BirdhouseIcon:Qg,Bitcoin:Jg,BitcoinIcon:Jg,Blend:ek,BlendIcon:ek,Blinds:tk,BlindsIcon:tk,Blocks:nk,BlocksIcon:nk,Bluetooth:ik,BluetoothConnected:ok,BluetoothConnectedIcon:ok,BluetoothIcon:ik,BluetoothOff:rk,BluetoothOffIcon:rk,BluetoothSearching:ak,BluetoothSearchingIcon:ak,Bold:sk,BoldIcon:sk,Bolt:ck,BoltIcon:ck,Bomb:lk,BombIcon:lk,Bone:dk,BoneIcon:dk,Book:zk,BookA:uk,BookAIcon:uk,BookAlert:hk,BookAlertIcon:hk,BookAudio:fk,BookAudioIcon:fk,BookCheck:pk,BookCheckIcon:pk,BookCopy:yk,BookCopyIcon:yk,BookDashed:Ls,BookDashedIcon:Ls,BookDown:mk,BookDownIcon:mk,BookHeadphones:gk,BookHeadphonesIcon:gk,BookHeart:kk,BookHeartIcon:kk,BookIcon:zk,BookImage:vk,BookImageIcon:vk,BookKey:xk,BookKeyIcon:xk,BookLock:wk,BookLockIcon:wk,BookMarked:Mk,BookMarkedIcon:Mk,BookMinus:bk,BookMinusIcon:bk,BookOpen:Sk,BookOpenCheck:_k,BookOpenCheckIcon:_k,BookOpenIcon:Sk,BookOpenText:Ck,BookOpenTextIcon:Ck,BookPlus:Lk,BookPlusIcon:Lk,BookSearch:Nk,BookSearchIcon:Nk,BookTemplate:Ls,BookTemplateIcon:Ls,BookText:Ik,BookTextIcon:Ik,BookType:Ak,BookTypeIcon:Ak,BookUp:jk,BookUp2:Ek,BookUp2Icon:Ek,BookUpIcon:jk,BookUser:$k,BookUserIcon:$k,BookX:Pk,BookXIcon:Pk,Bookmark:Ok,BookmarkCheck:Rk,BookmarkCheckIcon:Rk,BookmarkIcon:Ok,BookmarkMinus:Tk,BookmarkMinusIcon:Tk,BookmarkPlus:Dk,BookmarkPlusIcon:Dk,BookmarkX:Hk,BookmarkXIcon:Hk,BoomBox:Fk,BoomBoxIcon:Fk,Bot:Vk,BotIcon:Vk,BotMessageSquare:qk,BotMessageSquareIcon:qk,BotOff:Bk,BotOffIcon:Bk,BottleWine:Uk,BottleWineIcon:Uk,BowArrow:Wk,BowArrowIcon:Wk,Box:Gk,BoxIcon:Gk,BoxSelect:k1,BoxSelectIcon:k1,Boxes:Kk,BoxesIcon:Kk,Braces:Ns,BracesIcon:Ns,Brackets:Zk,BracketsIcon:Zk,Brain:Qk,BrainCircuit:Xk,BrainCircuitIcon:Xk,BrainCog:Yk,BrainCogIcon:Yk,BrainIcon:Qk,BrickWall:t4,BrickWallFire:Jk,BrickWallFireIcon:Jk,BrickWallIcon:t4,BrickWallShield:e4,BrickWallShieldIcon:e4,Briefcase:a4,BriefcaseBusiness:n4,BriefcaseBusinessIcon:n4,BriefcaseConveyorBelt:o4,BriefcaseConveyorBeltIcon:o4,BriefcaseIcon:a4,BriefcaseMedical:r4,BriefcaseMedicalIcon:r4,BringToFront:i4,BringToFrontIcon:i4,Brush:l4,BrushCleaning:s4,BrushCleaningIcon:s4,BrushIcon:l4,Bubbles:c4,BubblesIcon:c4,Bug:h4,BugIcon:h4,BugOff:d4,BugOffIcon:d4,BugPlay:u4,BugPlayIcon:u4,Building:f4,Building2:p4,Building2Icon:p4,BuildingIcon:f4,Bus:m4,BusFront:y4,BusFrontIcon:y4,BusIcon:m4,Cable:k4,CableCar:g4,CableCarIcon:g4,CableIcon:k4,Cake:x4,CakeIcon:x4,CakeSlice:v4,CakeSliceIcon:v4,Calculator:w4,CalculatorIcon:w4,Calendar:q4,Calendar1:M4,Calendar1Icon:M4,CalendarArrowDown:b4,CalendarArrowDownIcon:b4,CalendarArrowUp:_4,CalendarArrowUpIcon:_4,CalendarCheck:S4,CalendarCheck2:C4,CalendarCheck2Icon:C4,CalendarCheckIcon:S4,CalendarClock:L4,CalendarClockIcon:L4,CalendarCog:N4,CalendarCogIcon:N4,CalendarDays:I4,CalendarDaysIcon:I4,CalendarFold:A4,CalendarFoldIcon:A4,CalendarHeart:E4,CalendarHeartIcon:E4,CalendarIcon:q4,CalendarMinus:$4,CalendarMinus2:j4,CalendarMinus2Icon:j4,CalendarMinusIcon:$4,CalendarOff:P4,CalendarOffIcon:P4,CalendarPlus:T4,CalendarPlus2:z4,CalendarPlus2Icon:z4,CalendarPlusIcon:T4,CalendarRange:R4,CalendarRangeIcon:R4,CalendarSearch:D4,CalendarSearchIcon:D4,CalendarSync:H4,CalendarSyncIcon:H4,CalendarX:F4,CalendarX2:O4,CalendarX2Icon:O4,CalendarXIcon:F4,Calendars:V4,CalendarsIcon:V4,Camera:U4,CameraIcon:U4,CameraOff:B4,CameraOffIcon:B4,CandlestickChart:$s,CandlestickChartIcon:$s,Candy:K4,CandyCane:W4,CandyCaneIcon:W4,CandyIcon:K4,CandyOff:G4,CandyOffIcon:G4,Cannabis:X4,CannabisIcon:X4,CannabisOff:Z4,CannabisOffIcon:Z4,Captions:Is,CaptionsIcon:Is,CaptionsOff:Y4,CaptionsOffIcon:Y4,Car:e5,CarFront:Q4,CarFrontIcon:Q4,CarIcon:e5,CarTaxiFront:J4,CarTaxiFrontIcon:J4,Caravan:t5,CaravanIcon:t5,CardSim:n5,CardSimIcon:n5,Carrot:o5,CarrotIcon:o5,CaseLower:r5,CaseLowerIcon:r5,CaseSensitive:a5,CaseSensitiveIcon:a5,CaseUpper:i5,CaseUpperIcon:i5,CassetteTape:s5,CassetteTapeIcon:s5,Cast:c5,CastIcon:c5,Castle:l5,CastleIcon:l5,Cat:d5,CatIcon:d5,Cctv:u5,CctvIcon:u5,ChartArea:As,ChartAreaIcon:As,ChartBar:js,ChartBarBig:Es,ChartBarBigIcon:Es,ChartBarDecreasing:h5,ChartBarDecreasingIcon:h5,ChartBarIcon:js,ChartBarIncreasing:f5,ChartBarIncreasingIcon:f5,ChartBarStacked:p5,ChartBarStackedIcon:p5,ChartCandlestick:$s,ChartCandlestickIcon:$s,ChartColumn:Rs,ChartColumnBig:Ps,ChartColumnBigIcon:Ps,ChartColumnDecreasing:y5,ChartColumnDecreasingIcon:y5,ChartColumnIcon:Rs,ChartColumnIncreasing:zs,ChartColumnIncreasingIcon:zs,ChartColumnStacked:m5,ChartColumnStackedIcon:m5,ChartGantt:g5,ChartGanttIcon:g5,ChartLine:Ts,ChartLineIcon:Ts,ChartNetwork:k5,ChartNetworkIcon:k5,ChartNoAxesColumn:Hs,ChartNoAxesColumnDecreasing:v5,ChartNoAxesColumnDecreasingIcon:v5,ChartNoAxesColumnIcon:Hs,ChartNoAxesColumnIncreasing:Ds,ChartNoAxesColumnIncreasingIcon:Ds,ChartNoAxesCombined:x5,ChartNoAxesCombinedIcon:x5,ChartNoAxesGantt:Os,ChartNoAxesGanttIcon:Os,ChartPie:Fs,ChartPieIcon:Fs,ChartScatter:qs,ChartScatterIcon:qs,ChartSpline:w5,ChartSplineIcon:w5,Check:Ni,CheckCheck:M5,CheckCheckIcon:M5,CheckCircle:Qs,CheckCircle2:li,CheckCircle2Icon:li,CheckCircleIcon:Qs,CheckIcon:Ni,CheckLine:b5,CheckLineIcon:b5,CheckSquare:l1,CheckSquare2:d1,CheckSquare2Icon:d1,CheckSquareIcon:l1,ChefHat:_5,ChefHatIcon:_5,Cherry:C5,CherryIcon:C5,ChessBishop:S5,ChessBishopIcon:S5,ChessKing:L5,ChessKingIcon:L5,ChessKnight:N5,ChessKnightIcon:N5,ChessPawn:I5,ChessPawnIcon:I5,ChessQueen:A5,ChessQueenIcon:A5,ChessRook:j5,ChessRookIcon:j5,ChevronDown:E5,ChevronDownCircle:Js,ChevronDownCircleIcon:Js,ChevronDownIcon:E5,ChevronDownSquare:u1,ChevronDownSquareIcon:u1,ChevronFirst:$5,ChevronFirstIcon:$5,ChevronLast:P5,ChevronLastIcon:P5,ChevronLeft:z5,ChevronLeftCircle:ec,ChevronLeftCircleIcon:ec,ChevronLeftIcon:z5,ChevronLeftSquare:h1,ChevronLeftSquareIcon:h1,ChevronRight:R5,ChevronRightCircle:tc,ChevronRightCircleIcon:tc,ChevronRightIcon:R5,ChevronRightSquare:p1,ChevronRightSquareIcon:p1,ChevronUp:T5,ChevronUpCircle:nc,ChevronUpCircleIcon:nc,ChevronUpIcon:T5,ChevronUpSquare:f1,ChevronUpSquareIcon:f1,ChevronsDown:H5,ChevronsDownIcon:H5,ChevronsDownUp:D5,ChevronsDownUpIcon:D5,ChevronsLeft:q5,ChevronsLeftIcon:q5,ChevronsLeftRight:F5,ChevronsLeftRightEllipsis:O5,ChevronsLeftRightEllipsisIcon:O5,ChevronsLeftRightIcon:F5,ChevronsRight:B5,ChevronsRightIcon:B5,ChevronsRightLeft:V5,ChevronsRightLeftIcon:V5,ChevronsUp:W5,ChevronsUpDown:U5,ChevronsUpDownIcon:U5,ChevronsUpIcon:W5,Chrome:Vs,ChromeIcon:Vs,Chromium:Vs,ChromiumIcon:Vs,Church:G5,ChurchIcon:G5,Cigarette:Z5,CigaretteIcon:Z5,CigaretteOff:K5,CigaretteOffIcon:K5,Circle:K2,CircleAlert:ci,CircleAlertIcon:ci,CircleArrowDown:Bs,CircleArrowDownIcon:Bs,CircleArrowLeft:Ws,CircleArrowLeftIcon:Ws,CircleArrowOutDownLeft:Us,CircleArrowOutDownLeftIcon:Us,CircleArrowOutDownRight:Gs,CircleArrowOutDownRightIcon:Gs,CircleArrowOutUpLeft:Ks,CircleArrowOutUpLeftIcon:Ks,CircleArrowOutUpRight:Zs,CircleArrowOutUpRightIcon:Zs,CircleArrowRight:Xs,CircleArrowRightIcon:Xs,CircleArrowUp:Ys,CircleArrowUpIcon:Ys,CircleCheck:li,CircleCheckBig:Qs,CircleCheckBigIcon:Qs,CircleCheckIcon:li,CircleChevronDown:Js,CircleChevronDownIcon:Js,CircleChevronLeft:ec,CircleChevronLeftIcon:ec,CircleChevronRight:tc,CircleChevronRightIcon:tc,CircleChevronUp:nc,CircleChevronUpIcon:nc,CircleDashed:X5,CircleDashedIcon:X5,CircleDivide:oc,CircleDivideIcon:oc,CircleDollarSign:Y5,CircleDollarSignIcon:Y5,CircleDot:J5,CircleDotDashed:Q5,CircleDotDashedIcon:Q5,CircleDotIcon:J5,CircleEllipsis:ev,CircleEllipsisIcon:ev,CircleEqual:tv,CircleEqualIcon:tv,CircleFadingArrowUp:nv,CircleFadingArrowUpIcon:nv,CircleFadingPlus:ov,CircleFadingPlusIcon:ov,CircleGauge:rc,CircleGaugeIcon:rc,CircleHelp:Vo,CircleHelpIcon:Vo,CircleIcon:K2,CircleMinus:ac,CircleMinusIcon:ac,CircleOff:rv,CircleOffIcon:rv,CircleParking:sc,CircleParkingIcon:sc,CircleParkingOff:ic,CircleParkingOffIcon:ic,CirclePause:cc,CirclePauseIcon:cc,CirclePercent:lc,CirclePercentIcon:lc,CirclePile:av,CirclePileIcon:av,CirclePlay:dc,CirclePlayIcon:dc,CirclePlus:uc,CirclePlusIcon:uc,CirclePoundSterling:iv,CirclePoundSterlingIcon:iv,CirclePower:hc,CirclePowerIcon:hc,CircleQuestionMark:Vo,CircleQuestionMarkIcon:Vo,CircleSlash:sv,CircleSlash2:fc,CircleSlash2Icon:fc,CircleSlashIcon:sv,CircleSlashed:fc,CircleSlashedIcon:fc,CircleSmall:cv,CircleSmallIcon:cv,CircleStar:lv,CircleStarIcon:lv,CircleStop:yc,CircleStopIcon:yc,CircleUser:mc,CircleUserIcon:mc,CircleUserRound:pc,CircleUserRoundIcon:pc,CircleX:gc,CircleXIcon:gc,CircuitBoard:dv,CircuitBoardIcon:dv,Citrus:uv,CitrusIcon:uv,Clapperboard:hv,ClapperboardIcon:hv,Clipboard:Mv,ClipboardCheck:fv,ClipboardCheckIcon:fv,ClipboardClock:pv,ClipboardClockIcon:pv,ClipboardCopy:yv,ClipboardCopyIcon:yv,ClipboardEdit:vc,ClipboardEditIcon:vc,ClipboardIcon:Mv,ClipboardList:mv,ClipboardListIcon:mv,ClipboardMinus:gv,ClipboardMinusIcon:gv,ClipboardPaste:kv,ClipboardPasteIcon:kv,ClipboardPen:vc,ClipboardPenIcon:vc,ClipboardPenLine:kc,ClipboardPenLineIcon:kc,ClipboardPlus:vv,ClipboardPlusIcon:vv,ClipboardSignature:kc,ClipboardSignatureIcon:kc,ClipboardType:xv,ClipboardTypeIcon:xv,ClipboardX:wv,ClipboardXIcon:wv,Clock:Fv,Clock1:bv,Clock10:_v,Clock10Icon:_v,Clock11:Cv,Clock11Icon:Cv,Clock12:Sv,Clock12Icon:Sv,Clock1Icon:bv,Clock2:Lv,Clock2Icon:Lv,Clock3:Nv,Clock3Icon:Nv,Clock4:Iv,Clock4Icon:Iv,Clock5:Av,Clock5Icon:Av,Clock6:Ev,Clock6Icon:Ev,Clock7:jv,Clock7Icon:jv,Clock8:$v,Clock8Icon:$v,Clock9:Pv,Clock9Icon:Pv,ClockAlert:zv,ClockAlertIcon:zv,ClockArrowDown:Rv,ClockArrowDownIcon:Rv,ClockArrowUp:Hv,ClockArrowUpIcon:Hv,ClockCheck:Tv,ClockCheckIcon:Tv,ClockFading:Dv,ClockFadingIcon:Dv,ClockIcon:Fv,ClockPlus:Ov,ClockPlusIcon:Ov,ClosedCaption:qv,ClosedCaptionIcon:qv,Cloud:Z2,CloudAlert:Vv,CloudAlertIcon:Vv,CloudBackup:Bv,CloudBackupIcon:Bv,CloudCheck:Uv,CloudCheckIcon:Uv,CloudCog:Wv,CloudCogIcon:Wv,CloudDownload:xc,CloudDownloadIcon:xc,CloudDrizzle:Gv,CloudDrizzleIcon:Gv,CloudFog:Kv,CloudFogIcon:Kv,CloudHail:Zv,CloudHailIcon:Zv,CloudIcon:Z2,CloudLightning:Xv,CloudLightningIcon:Xv,CloudMoon:Qv,CloudMoonIcon:Qv,CloudMoonRain:Yv,CloudMoonRainIcon:Yv,CloudOff:Jv,CloudOffIcon:Jv,CloudRain:t3,CloudRainIcon:t3,CloudRainWind:e3,CloudRainWindIcon:e3,CloudSnow:n3,CloudSnowIcon:n3,CloudSun:r3,CloudSunIcon:r3,CloudSunRain:o3,CloudSunRainIcon:o3,CloudSync:a3,CloudSyncIcon:a3,CloudUpload:wc,CloudUploadIcon:wc,Cloudy:i3,CloudyIcon:i3,Clover:s3,CloverIcon:s3,Club:c3,ClubIcon:c3,Code:l3,Code2:Mc,Code2Icon:Mc,CodeIcon:l3,CodeSquare:y1,CodeSquareIcon:y1,CodeXml:Mc,CodeXmlIcon:Mc,Codepen:d3,CodepenIcon:d3,Codesandbox:u3,CodesandboxIcon:u3,Coffee:h3,CoffeeIcon:h3,Cog:f3,CogIcon:f3,Coins:p3,CoinsIcon:p3,Columns:bc,Columns2:bc,Columns2Icon:bc,Columns3:di,Columns3Cog:wr,Columns3CogIcon:wr,Columns3Icon:di,Columns4:y3,Columns4Icon:y3,ColumnsIcon:bc,ColumnsSettings:wr,ColumnsSettingsIcon:wr,Combine:m3,CombineIcon:m3,Command:g3,CommandIcon:g3,Compass:k3,CompassIcon:k3,Component:v3,ComponentIcon:v3,Computer:x3,ComputerIcon:x3,ConciergeBell:w3,ConciergeBellIcon:w3,Cone:M3,ConeIcon:M3,Construction:b3,ConstructionIcon:b3,Contact:_3,Contact2:_c,Contact2Icon:_c,ContactIcon:_3,ContactRound:_c,ContactRoundIcon:_c,Container:C3,ContainerIcon:C3,Contrast:S3,ContrastIcon:S3,Cookie:L3,CookieIcon:L3,CookingPot:N3,CookingPotIcon:N3,Copy:P3,CopyCheck:I3,CopyCheckIcon:I3,CopyIcon:P3,CopyMinus:A3,CopyMinusIcon:A3,CopyPlus:E3,CopyPlusIcon:E3,CopySlash:j3,CopySlashIcon:j3,CopyX:$3,CopyXIcon:$3,Copyleft:R3,CopyleftIcon:R3,Copyright:z3,CopyrightIcon:z3,CornerDownLeft:T3,CornerDownLeftIcon:T3,CornerDownRight:D3,CornerDownRightIcon:D3,CornerLeftDown:H3,CornerLeftDownIcon:H3,CornerLeftUp:O3,CornerLeftUpIcon:O3,CornerRightDown:q3,CornerRightDownIcon:q3,CornerRightUp:F3,CornerRightUpIcon:F3,CornerUpLeft:B3,CornerUpLeftIcon:B3,CornerUpRight:V3,CornerUpRightIcon:V3,Cpu:U3,CpuIcon:U3,CreativeCommons:W3,CreativeCommonsIcon:W3,CreditCard:G3,CreditCardIcon:G3,Croissant:K3,CroissantIcon:K3,Crop:Z3,CropIcon:Z3,Cross:X3,CrossIcon:X3,Crosshair:Y3,CrosshairIcon:Y3,Crown:Q3,CrownIcon:Q3,Cuboid:J3,CuboidIcon:J3,CupSoda:ex,CupSodaIcon:ex,CurlyBraces:Ns,CurlyBracesIcon:Ns,Currency:tx,CurrencyIcon:tx,Cylinder:nx,CylinderIcon:nx,Dam:ox,DamIcon:ox,Database:X2,DatabaseBackup:rx,DatabaseBackupIcon:rx,DatabaseIcon:X2,DatabaseSearch:ax,DatabaseSearchIcon:ax,DatabaseZap:ix,DatabaseZapIcon:ix,DecimalsArrowLeft:sx,DecimalsArrowLeftIcon:sx,DecimalsArrowRight:cx,DecimalsArrowRightIcon:cx,Delete:lx,DeleteIcon:lx,Dessert:dx,DessertIcon:dx,Diameter:ux,DiameterIcon:ux,Diamond:Y2,DiamondIcon:Y2,DiamondMinus:hx,DiamondMinusIcon:hx,DiamondPercent:Cc,DiamondPercentIcon:Cc,DiamondPlus:fx,DiamondPlusIcon:fx,Dice1:px,Dice1Icon:px,Dice2:mx,Dice2Icon:mx,Dice3:yx,Dice3Icon:yx,Dice4:gx,Dice4Icon:gx,Dice5:kx,Dice5Icon:kx,Dice6:vx,Dice6Icon:vx,Dices:xx,DicesIcon:xx,Diff:wx,DiffIcon:wx,Disc:Cx,Disc2:Mx,Disc2Icon:Mx,Disc3:_x,Disc3Icon:_x,DiscAlbum:bx,DiscAlbumIcon:bx,DiscIcon:Cx,Divide:Sx,DivideCircle:oc,DivideCircleIcon:oc,DivideIcon:Sx,DivideSquare:v1,DivideSquareIcon:v1,Dna:Nx,DnaIcon:Nx,DnaOff:Lx,DnaOffIcon:Lx,Dock:Ix,DockIcon:Ix,Dog:Ax,DogIcon:Ax,DollarSign:Ex,DollarSignIcon:Ex,Donut:jx,DonutIcon:jx,DoorClosed:Px,DoorClosedIcon:Px,DoorClosedLocked:$x,DoorClosedLockedIcon:$x,DoorOpen:zx,DoorOpenIcon:zx,Dot:Rx,DotIcon:Rx,DotSquare:x1,DotSquareIcon:x1,Download:e0,DownloadCloud:xc,DownloadCloudIcon:xc,DownloadIcon:e0,DraftingCompass:Tx,DraftingCompassIcon:Tx,Drama:Dx,DramaIcon:Dx,Dribbble:Hx,DribbbleIcon:Hx,Drill:Ox,DrillIcon:Ox,Drone:Fx,DroneIcon:Fx,Droplet:Vx,DropletIcon:Vx,DropletOff:qx,DropletOffIcon:qx,Droplets:Bx,DropletsIcon:Bx,Drum:Ux,DrumIcon:Ux,Drumstick:Wx,DrumstickIcon:Wx,Dumbbell:Gx,DumbbellIcon:Gx,Ear:Kx,EarIcon:Kx,EarOff:Zx,EarOffIcon:Zx,Earth:Sc,EarthIcon:Sc,EarthLock:Xx,EarthLockIcon:Xx,Eclipse:Yx,EclipseIcon:Yx,Edit:to,Edit2:Rl,Edit2Icon:Rl,Edit3:zl,Edit3Icon:zl,EditIcon:to,Egg:e8,EggFried:Qx,EggFriedIcon:Qx,EggIcon:e8,EggOff:Jx,EggOffIcon:Jx,Ellipsis:Nc,EllipsisIcon:Nc,EllipsisVertical:Lc,EllipsisVerticalIcon:Lc,Equal:o8,EqualApproximately:t8,EqualApproximatelyIcon:t8,EqualIcon:o8,EqualNot:n8,EqualNotIcon:n8,EqualSquare:w1,EqualSquareIcon:w1,Eraser:r8,EraserIcon:r8,EthernetPort:a8,EthernetPortIcon:a8,Euro:i8,EuroIcon:i8,EvCharger:s8,EvChargerIcon:s8,Expand:c8,ExpandIcon:c8,ExternalLink:Q2,ExternalLinkIcon:Q2,Eye:u8,EyeClosed:l8,EyeClosedIcon:l8,EyeIcon:u8,EyeOff:d8,EyeOffIcon:d8,Facebook:h8,FacebookIcon:h8,Factory:f8,FactoryIcon:f8,Fan:y8,FanIcon:y8,FastForward:p8,FastForwardIcon:p8,Feather:m8,FeatherIcon:m8,Fence:g8,FenceIcon:g8,FerrisWheel:k8,FerrisWheelIcon:k8,Figma:v8,FigmaIcon:v8,File:G8,FileArchive:x8,FileArchiveIcon:x8,FileAudio:Mr,FileAudio2:Mr,FileAudio2Icon:Mr,FileAudioIcon:Mr,FileAxis3D:Ic,FileAxis3DIcon:Ic,FileAxis3d:Ic,FileAxis3dIcon:Ic,FileBadge:Ac,FileBadge2:Ac,FileBadge2Icon:Ac,FileBadgeIcon:Ac,FileBarChart:$c,FileBarChart2:Pc,FileBarChart2Icon:Pc,FileBarChartIcon:$c,FileBox:w8,FileBoxIcon:w8,FileBraces:jc,FileBracesCorner:Ec,FileBracesCornerIcon:Ec,FileBracesIcon:jc,FileChartColumn:Pc,FileChartColumnIcon:Pc,FileChartColumnIncreasing:$c,FileChartColumnIncreasingIcon:$c,FileChartLine:zc,FileChartLineIcon:zc,FileChartPie:Rc,FileChartPieIcon:Rc,FileCheck:M8,FileCheck2:Tc,FileCheck2Icon:Tc,FileCheckCorner:Tc,FileCheckCornerIcon:Tc,FileCheckIcon:M8,FileClock:_8,FileClockIcon:_8,FileCode:b8,FileCode2:Dc,FileCode2Icon:Dc,FileCodeCorner:Dc,FileCodeCornerIcon:Dc,FileCodeIcon:b8,FileCog:Hc,FileCog2:Hc,FileCog2Icon:Hc,FileCogIcon:Hc,FileDiff:C8,FileDiffIcon:C8,FileDigit:S8,FileDigitIcon:S8,FileDown:J2,FileDownIcon:J2,FileEdit:Uc,FileEditIcon:Uc,FileExclamationPoint:Oc,FileExclamationPointIcon:Oc,FileHeadphone:Mr,FileHeadphoneIcon:Mr,FileHeart:L8,FileHeartIcon:L8,FileIcon:G8,FileImage:N8,FileImageIcon:N8,FileInput:I8,FileInputIcon:I8,FileJson:jc,FileJson2:Ec,FileJson2Icon:Ec,FileJsonIcon:jc,FileKey:Fc,FileKey2:Fc,FileKey2Icon:Fc,FileKeyIcon:Fc,FileLineChart:zc,FileLineChartIcon:zc,FileLock:qc,FileLock2:qc,FileLock2Icon:qc,FileLockIcon:qc,FileMinus:A8,FileMinus2:Vc,FileMinus2Icon:Vc,FileMinusCorner:Vc,FileMinusCornerIcon:Vc,FileMinusIcon:A8,FileMusic:j8,FileMusicIcon:j8,FileOutput:E8,FileOutputIcon:E8,FilePen:Uc,FilePenIcon:Uc,FilePenLine:Bc,FilePenLineIcon:Bc,FilePieChart:Rc,FilePieChartIcon:Rc,FilePlay:Wc,FilePlayIcon:Wc,FilePlus:$8,FilePlus2:Gc,FilePlus2Icon:Gc,FilePlusCorner:Gc,FilePlusCornerIcon:Gc,FilePlusIcon:$8,FileQuestion:Kc,FileQuestionIcon:Kc,FileQuestionMark:Kc,FileQuestionMarkIcon:Kc,FileScan:P8,FileScanIcon:P8,FileSearch:z8,FileSearch2:Zc,FileSearch2Icon:Zc,FileSearchCorner:Zc,FileSearchCornerIcon:Zc,FileSearchIcon:z8,FileSignal:Xc,FileSignalIcon:Xc,FileSignature:Bc,FileSignatureIcon:Bc,FileSliders:R8,FileSlidersIcon:R8,FileSpreadsheet:T8,FileSpreadsheetIcon:T8,FileStack:D8,FileStackIcon:D8,FileSymlink:H8,FileSymlinkIcon:H8,FileTerminal:O8,FileTerminalIcon:O8,FileText:F8,FileTextIcon:F8,FileType:q8,FileType2:Yc,FileType2Icon:Yc,FileTypeCorner:Yc,FileTypeCornerIcon:Yc,FileTypeIcon:q8,FileUp:V8,FileUpIcon:V8,FileUser:B8,FileUserIcon:B8,FileVideo:Wc,FileVideo2:Qc,FileVideo2Icon:Qc,FileVideoCamera:Qc,FileVideoCameraIcon:Qc,FileVideoIcon:Wc,FileVolume:U8,FileVolume2:Xc,FileVolume2Icon:Xc,FileVolumeIcon:U8,FileWarning:Oc,FileWarningIcon:Oc,FileX:W8,FileX2:Jc,FileX2Icon:Jc,FileXCorner:Jc,FileXCornerIcon:Jc,FileXIcon:W8,Files:K8,FilesIcon:K8,Film:Z8,FilmIcon:Z8,Filter:rl,FilterIcon:rl,FilterX:ol,FilterXIcon:ol,Fingerprint:el,FingerprintIcon:el,FingerprintPattern:el,FingerprintPatternIcon:el,FireExtinguisher:X8,FireExtinguisherIcon:X8,Fish:J8,FishIcon:J8,FishOff:Y8,FishOffIcon:Y8,FishSymbol:Q8,FishSymbolIcon:Q8,FishingHook:e6,FishingHookIcon:e6,Flag:r6,FlagIcon:r6,FlagOff:t6,FlagOffIcon:t6,FlagTriangleLeft:n6,FlagTriangleLeftIcon:n6,FlagTriangleRight:o6,FlagTriangleRightIcon:o6,Flame:i6,FlameIcon:i6,FlameKindling:a6,FlameKindlingIcon:a6,Flashlight:c6,FlashlightIcon:c6,FlashlightOff:s6,FlashlightOffIcon:s6,FlaskConical:u6,FlaskConicalIcon:u6,FlaskConicalOff:l6,FlaskConicalOffIcon:l6,FlaskRound:d6,FlaskRoundIcon:d6,FlipHorizontal:f6,FlipHorizontal2:h6,FlipHorizontal2Icon:h6,FlipHorizontalIcon:f6,FlipVertical:y6,FlipVertical2:p6,FlipVertical2Icon:p6,FlipVerticalIcon:y6,Flower:g6,Flower2:m6,Flower2Icon:m6,FlowerIcon:g6,Focus:k6,FocusIcon:k6,FoldHorizontal:v6,FoldHorizontalIcon:v6,FoldVertical:x6,FoldVerticalIcon:x6,Folder:G6,FolderArchive:w6,FolderArchiveIcon:w6,FolderCheck:M6,FolderCheckIcon:M6,FolderClock:b6,FolderClockIcon:b6,FolderClosed:C6,FolderClosedIcon:C6,FolderCode:_6,FolderCodeIcon:_6,FolderCog:tl,FolderCog2:tl,FolderCog2Icon:tl,FolderCogIcon:tl,FolderDot:S6,FolderDotIcon:S6,FolderDown:L6,FolderDownIcon:L6,FolderEdit:nl,FolderEditIcon:nl,FolderGit:I6,FolderGit2:N6,FolderGit2Icon:N6,FolderGitIcon:I6,FolderHeart:A6,FolderHeartIcon:A6,FolderIcon:G6,FolderInput:E6,FolderInputIcon:E6,FolderKanban:j6,FolderKanbanIcon:j6,FolderKey:$6,FolderKeyIcon:$6,FolderLock:P6,FolderLockIcon:P6,FolderMinus:z6,FolderMinusIcon:z6,FolderOpen:eh,FolderOpenDot:R6,FolderOpenDotIcon:R6,FolderOpenIcon:eh,FolderOutput:T6,FolderOutputIcon:T6,FolderPen:nl,FolderPenIcon:nl,FolderPlus:D6,FolderPlusIcon:D6,FolderRoot:H6,FolderRootIcon:H6,FolderSearch:F6,FolderSearch2:O6,FolderSearch2Icon:O6,FolderSearchIcon:F6,FolderSymlink:q6,FolderSymlinkIcon:q6,FolderSync:V6,FolderSyncIcon:V6,FolderTree:B6,FolderTreeIcon:B6,FolderUp:U6,FolderUpIcon:U6,FolderX:W6,FolderXIcon:W6,Folders:K6,FoldersIcon:K6,Footprints:Z6,FootprintsIcon:Z6,ForkKnife:ld,ForkKnifeCrossed:cd,ForkKnifeCrossedIcon:cd,ForkKnifeIcon:ld,Forklift:Q6,ForkliftIcon:Q6,Form:X6,FormIcon:X6,FormInput:Dl,FormInputIcon:Dl,Forward:Y6,ForwardIcon:Y6,Frame:J6,FrameIcon:J6,Framer:nw,FramerIcon:nw,Frown:ew,FrownIcon:ew,Fuel:tw,FuelIcon:tw,Fullscreen:ow,FullscreenIcon:ow,FunctionSquare:M1,FunctionSquareIcon:M1,Funnel:rl,FunnelIcon:rl,FunnelPlus:rw,FunnelPlusIcon:rw,FunnelX:ol,FunnelXIcon:ol,GalleryHorizontal:iw,GalleryHorizontalEnd:aw,GalleryHorizontalEndIcon:aw,GalleryHorizontalIcon:iw,GalleryThumbnails:sw,GalleryThumbnailsIcon:sw,GalleryVertical:lw,GalleryVerticalEnd:cw,GalleryVerticalEndIcon:cw,GalleryVerticalIcon:lw,Gamepad:fw,Gamepad2:dw,Gamepad2Icon:dw,GamepadDirectional:uw,GamepadDirectionalIcon:uw,GamepadIcon:fw,GanttChart:Os,GanttChartIcon:Os,GanttChartSquare:Sr,GanttChartSquareIcon:Sr,Gauge:hw,GaugeCircle:rc,GaugeCircleIcon:rc,GaugeIcon:hw,Gavel:pw,GavelIcon:pw,Gem:yw,GemIcon:yw,GeorgianLari:mw,GeorgianLariIcon:mw,Ghost:kw,GhostIcon:kw,Gift:gw,GiftIcon:gw,GitBranch:ww,GitBranchIcon:ww,GitBranchMinus:vw,GitBranchMinusIcon:vw,GitBranchPlus:xw,GitBranchPlusIcon:xw,GitCommit:al,GitCommitHorizontal:al,GitCommitHorizontalIcon:al,GitCommitIcon:al,GitCommitVertical:Mw,GitCommitVerticalIcon:Mw,GitCompare:_w,GitCompareArrows:bw,GitCompareArrowsIcon:bw,GitCompareIcon:_w,GitFork:Cw,GitForkIcon:Cw,GitGraph:Sw,GitGraphIcon:Sw,GitMerge:Lw,GitMergeIcon:Lw,GitPullRequest:$w,GitPullRequestArrow:Nw,GitPullRequestArrowIcon:Nw,GitPullRequestClosed:Iw,GitPullRequestClosedIcon:Iw,GitPullRequestCreate:Ew,GitPullRequestCreateArrow:Aw,GitPullRequestCreateArrowIcon:Aw,GitPullRequestCreateIcon:Ew,GitPullRequestDraft:jw,GitPullRequestDraftIcon:jw,GitPullRequestIcon:$w,Github:Pw,GithubIcon:Pw,Gitlab:zw,GitlabIcon:zw,GlassWater:Rw,GlassWaterIcon:Rw,Glasses:Tw,GlassesIcon:Tw,Globe:Ow,Globe2:Sc,Globe2Icon:Sc,GlobeIcon:Ow,GlobeLock:Dw,GlobeLockIcon:Dw,GlobeX:Hw,GlobeXIcon:Hw,Goal:Fw,GoalIcon:Fw,Gpu:qw,GpuIcon:qw,Grab:dl,GrabIcon:dl,GraduationCap:Vw,GraduationCapIcon:Vw,Grape:Bw,GrapeIcon:Bw,Grid:br,Grid2X2:ll,Grid2X2Check:il,Grid2X2CheckIcon:il,Grid2X2Icon:ll,Grid2X2Plus:sl,Grid2X2PlusIcon:sl,Grid2X2X:cl,Grid2X2XIcon:cl,Grid2x2:ll,Grid2x2Check:il,Grid2x2CheckIcon:il,Grid2x2Icon:ll,Grid2x2Plus:sl,Grid2x2PlusIcon:sl,Grid2x2X:cl,Grid2x2XIcon:cl,Grid3X3:br,Grid3X3Icon:br,Grid3x2:Uw,Grid3x2Icon:Uw,Grid3x3:br,Grid3x3Icon:br,GridIcon:br,Grip:Gw,GripHorizontal:Ww,GripHorizontalIcon:Ww,GripIcon:Gw,GripVertical:Kw,GripVerticalIcon:Kw,Group:Zw,GroupIcon:Zw,Guitar:Xw,GuitarIcon:Xw,Ham:Yw,HamIcon:Yw,Hamburger:Qw,HamburgerIcon:Qw,Hammer:Jw,HammerIcon:Jw,Hand:th,HandCoins:e7,HandCoinsIcon:e7,HandFist:t7,HandFistIcon:t7,HandGrab:dl,HandGrabIcon:dl,HandHeart:n7,HandHeartIcon:n7,HandHelping:ul,HandHelpingIcon:ul,HandIcon:th,HandMetal:o7,HandMetalIcon:o7,HandPlatter:r7,HandPlatterIcon:r7,Handbag:a7,HandbagIcon:a7,Handshake:i7,HandshakeIcon:i7,HardDrive:l7,HardDriveDownload:s7,HardDriveDownloadIcon:s7,HardDriveIcon:l7,HardDriveUpload:c7,HardDriveUploadIcon:c7,HardHat:d7,HardHatIcon:d7,Hash:u7,HashIcon:u7,HatGlasses:h7,HatGlassesIcon:h7,Haze:f7,HazeIcon:f7,Hd:p7,HdIcon:p7,HdmiPort:y7,HdmiPortIcon:y7,Heading:M7,Heading1:m7,Heading1Icon:m7,Heading2:g7,Heading2Icon:g7,Heading3:k7,Heading3Icon:k7,Heading4:v7,Heading4Icon:v7,Heading5:x7,Heading5Icon:x7,Heading6:w7,Heading6Icon:w7,HeadingIcon:M7,HeadphoneOff:b7,HeadphoneOffIcon:b7,Headphones:_7,HeadphonesIcon:_7,Headset:C7,HeadsetIcon:C7,Heart:j7,HeartCrack:S7,HeartCrackIcon:S7,HeartHandshake:N7,HeartHandshakeIcon:N7,HeartIcon:j7,HeartMinus:L7,HeartMinusIcon:L7,HeartOff:I7,HeartOffIcon:I7,HeartPlus:A7,HeartPlusIcon:A7,HeartPulse:E7,HeartPulseIcon:E7,Heater:$7,HeaterIcon:$7,Helicopter:P7,HelicopterIcon:P7,HelpCircle:Vo,HelpCircleIcon:Vo,HelpingHand:ul,HelpingHandIcon:ul,Hexagon:nh,HexagonIcon:nh,Highlighter:z7,HighlighterIcon:z7,History:R7,HistoryIcon:R7,Home:hl,HomeIcon:hl,Hop:T7,HopIcon:T7,HopOff:D7,HopOffIcon:D7,Hospital:H7,HospitalIcon:H7,Hotel:O7,HotelIcon:O7,Hourglass:F7,HourglassIcon:F7,House:hl,HouseHeart:q7,HouseHeartIcon:q7,HouseIcon:hl,HousePlug:V7,HousePlugIcon:V7,HousePlus:B7,HousePlusIcon:B7,HouseWifi:U7,HouseWifiIcon:U7,IceCream:pl,IceCream2:fl,IceCream2Icon:fl,IceCreamBowl:fl,IceCreamBowlIcon:fl,IceCreamCone:pl,IceCreamConeIcon:pl,IceCreamIcon:pl,Icon:_Y,IdCard:G7,IdCardIcon:G7,IdCardLanyard:W7,IdCardLanyardIcon:W7,Image:rh,ImageDown:K7,ImageDownIcon:K7,ImageIcon:rh,ImageMinus:X7,ImageMinusIcon:X7,ImageOff:Z7,ImageOffIcon:Z7,ImagePlay:Y7,ImagePlayIcon:Y7,ImagePlus:oh,ImagePlusIcon:oh,ImageUp:Q7,ImageUpIcon:Q7,ImageUpscale:J7,ImageUpscaleIcon:J7,Images:eM,ImagesIcon:eM,Import:tM,ImportIcon:tM,Inbox:nM,InboxIcon:nM,Indent:Cr,IndentDecrease:_r,IndentDecreaseIcon:_r,IndentIcon:Cr,IndentIncrease:Cr,IndentIncreaseIcon:Cr,IndianRupee:oM,IndianRupeeIcon:oM,Infinity:aM,InfinityIcon:aM,Info:rM,InfoIcon:rM,Inspect:N1,InspectIcon:N1,InspectionPanel:iM,InspectionPanelIcon:iM,Instagram:sM,InstagramIcon:sM,Italic:cM,ItalicIcon:cM,IterationCcw:lM,IterationCcwIcon:lM,IterationCw:dM,IterationCwIcon:dM,JapaneseYen:uM,JapaneseYenIcon:uM,Joystick:hM,JoystickIcon:hM,Kanban:fM,KanbanIcon:fM,KanbanSquare:b1,KanbanSquareDashed:m1,KanbanSquareDashedIcon:m1,KanbanSquareIcon:b1,Kayak:pM,KayakIcon:pM,Key:gM,KeyIcon:gM,KeyRound:yM,KeyRoundIcon:yM,KeySquare:mM,KeySquareIcon:mM,Keyboard:xM,KeyboardIcon:xM,KeyboardMusic:kM,KeyboardMusicIcon:kM,KeyboardOff:vM,KeyboardOffIcon:vM,Lamp:SM,LampCeiling:wM,LampCeilingIcon:wM,LampDesk:MM,LampDeskIcon:MM,LampFloor:bM,LampFloorIcon:bM,LampIcon:SM,LampWallDown:_M,LampWallDownIcon:_M,LampWallUp:CM,LampWallUpIcon:CM,LandPlot:LM,LandPlotIcon:LM,Landmark:NM,LandmarkIcon:NM,Languages:IM,LanguagesIcon:IM,Laptop:jM,Laptop2:yl,Laptop2Icon:yl,LaptopIcon:jM,LaptopMinimal:yl,LaptopMinimalCheck:AM,LaptopMinimalCheckIcon:AM,LaptopMinimalIcon:yl,Lasso:$M,LassoIcon:$M,LassoSelect:EM,LassoSelectIcon:EM,Laugh:PM,LaughIcon:PM,Layers:ka,Layers2:zM,Layers2Icon:zM,Layers3:ka,Layers3Icon:ka,LayersIcon:ka,LayersPlus:RM,LayersPlusIcon:RM,Layout:Pl,LayoutDashboard:ah,LayoutDashboardIcon:ah,LayoutGrid:TM,LayoutGridIcon:TM,LayoutIcon:Pl,LayoutList:DM,LayoutListIcon:DM,LayoutPanelLeft:HM,LayoutPanelLeftIcon:HM,LayoutPanelTop:FM,LayoutPanelTopIcon:FM,LayoutTemplate:OM,LayoutTemplateIcon:OM,Leaf:qM,LeafIcon:qM,LeafyGreen:VM,LeafyGreenIcon:VM,Lectern:BM,LecternIcon:BM,LetterText:K1,LetterTextIcon:K1,Library:WM,LibraryBig:UM,LibraryBigIcon:UM,LibraryIcon:WM,LibrarySquare:_1,LibrarySquareIcon:_1,LifeBuoy:GM,LifeBuoyIcon:GM,Ligature:KM,LigatureIcon:KM,Lightbulb:XM,LightbulbIcon:XM,LightbulbOff:ZM,LightbulbOffIcon:ZM,LineChart:Ts,LineChartIcon:Ts,LineSquiggle:YM,LineSquiggleIcon:YM,Link:JM,Link2:Ii,Link2Icon:Ii,Link2Off:QM,Link2OffIcon:QM,LinkIcon:JM,Linkedin:eb,LinkedinIcon:eb,List:vb,ListCheck:tb,ListCheckIcon:tb,ListChecks:nb,ListChecksIcon:nb,ListChevronsDownUp:ob,ListChevronsDownUpIcon:ob,ListChevronsUpDown:ab,ListChevronsUpDownIcon:ab,ListCollapse:rb,ListCollapseIcon:rb,ListEnd:ib,ListEndIcon:ib,ListFilter:cb,ListFilterIcon:cb,ListFilterPlus:sb,ListFilterPlusIcon:sb,ListIcon:vb,ListIndentDecrease:_r,ListIndentDecreaseIcon:_r,ListIndentIncrease:Cr,ListIndentIncreaseIcon:Cr,ListMinus:lb,ListMinusIcon:lb,ListMusic:db,ListMusicIcon:db,ListOrdered:ub,ListOrderedIcon:ub,ListPlus:hb,ListPlusIcon:hb,ListRestart:fb,ListRestartIcon:fb,ListStart:pb,ListStartIcon:pb,ListTodo:yb,ListTodoIcon:yb,ListTree:mb,ListTreeIcon:mb,ListVideo:gb,ListVideoIcon:gb,ListX:kb,ListXIcon:kb,Loader:wb,Loader2:Fn,Loader2Icon:Fn,LoaderCircle:Fn,LoaderCircleIcon:Fn,LoaderIcon:wb,LoaderPinwheel:xb,LoaderPinwheelIcon:xb,Locate:_b,LocateFixed:Mb,LocateFixedIcon:Mb,LocateIcon:_b,LocateOff:bb,LocateOffIcon:bb,LocationEdit:vl,LocationEditIcon:vl,Lock:Sb,LockIcon:Sb,LockKeyhole:Cb,LockKeyholeIcon:Cb,LockKeyholeOpen:ml,LockKeyholeOpenIcon:ml,LockOpen:gl,LockOpenIcon:gl,LogIn:Lb,LogInIcon:Lb,LogOut:Nb,LogOutIcon:Nb,Logs:Ib,LogsIcon:Ib,Lollipop:Ab,LollipopIcon:Ab,LucideAArrowDown:sy,LucideAArrowUp:cy,LucideALargeSmall:ly,LucideAccessibility:dy,LucideActivity:uy,LucideActivitySquare:Kl,LucideAirVent:hy,LucideAirplay:fy,LucideAlarmCheck:fs,LucideAlarmClock:yy,LucideAlarmClockCheck:fs,LucideAlarmClockMinus:ps,LucideAlarmClockOff:py,LucideAlarmClockPlus:ys,LucideAlarmMinus:ps,LucideAlarmPlus:ys,LucideAlarmSmoke:my,LucideAlbum:gy,LucideAlertCircle:ci,LucideAlertOctagon:bl,LucideAlertTriangle:Er,LucideAlignCenter:ui,LucideAlignCenterHorizontal:vy,LucideAlignCenterVertical:ky,LucideAlignEndHorizontal:xy,LucideAlignEndVertical:wy,LucideAlignHorizontalDistributeCenter:My,LucideAlignHorizontalDistributeEnd:by,LucideAlignHorizontalDistributeStart:_y,LucideAlignHorizontalJustifyCenter:Cy,LucideAlignHorizontalJustifyEnd:Ly,LucideAlignHorizontalJustifyStart:Sy,LucideAlignHorizontalSpaceAround:Ny,LucideAlignHorizontalSpaceBetween:Iy,LucideAlignJustify:G1,LucideAlignLeft:Bo,LucideAlignRight:hi,LucideAlignStartHorizontal:Ay,LucideAlignStartVertical:Ey,LucideAlignVerticalDistributeCenter:jy,LucideAlignVerticalDistributeEnd:$y,LucideAlignVerticalDistributeStart:Py,LucideAlignVerticalJustifyCenter:zy,LucideAlignVerticalJustifyEnd:Ry,LucideAlignVerticalJustifyStart:Ty,LucideAlignVerticalSpaceAround:Dy,LucideAlignVerticalSpaceBetween:Hy,LucideAmbulance:Oy,LucideAmpersand:Fy,LucideAmpersands:qy,LucideAmphora:Vy,LucideAnchor:By,LucideAngry:Uy,LucideAnnoyed:Wy,LucideAntenna:Gy,LucideAnvil:Ky,LucideAperture:Zy,LucideAppWindow:Yy,LucideAppWindowMac:Xy,LucideApple:Qy,LucideArchive:tm,LucideArchiveRestore:Jy,LucideArchiveX:em,LucideAreaChart:As,LucideArmchair:nm,LucideArrowBigDown:rm,LucideArrowBigDownDash:om,LucideArrowBigLeft:im,LucideArrowBigLeftDash:am,LucideArrowBigRight:cm,LucideArrowBigRightDash:sm,LucideArrowBigUp:dm,LucideArrowBigUpDash:lm,LucideArrowDown:xm,LucideArrowDown01:um,LucideArrowDown10:hm,LucideArrowDownAZ:ms,LucideArrowDownAz:ms,LucideArrowDownCircle:Bs,LucideArrowDownFromLine:fm,LucideArrowDownLeft:ym,LucideArrowDownLeftFromCircle:Us,LucideArrowDownLeftFromSquare:Jl,LucideArrowDownLeftSquare:Zl,LucideArrowDownNarrowWide:pm,LucideArrowDownRight:gm,LucideArrowDownRightFromCircle:Gs,LucideArrowDownRightFromSquare:e1,LucideArrowDownRightSquare:Xl,LucideArrowDownSquare:Yl,LucideArrowDownToDot:mm,LucideArrowDownToLine:km,LucideArrowDownUp:vm,LucideArrowDownWideNarrow:gs,LucideArrowDownZA:ks,LucideArrowDownZa:ks,LucideArrowLeft:bm,LucideArrowLeftCircle:Ws,LucideArrowLeftFromLine:wm,LucideArrowLeftRight:W2,LucideArrowLeftSquare:Ql,LucideArrowLeftToLine:Mm,LucideArrowRight:Ju,LucideArrowRightCircle:Xs,LucideArrowRightFromLine:_m,LucideArrowRightLeft:Cm,LucideArrowRightSquare:o1,LucideArrowRightToLine:Sm,LucideArrowUp:Rm,LucideArrowUp01:Lm,LucideArrowUp10:Nm,LucideArrowUpAZ:vs,LucideArrowUpAz:vs,LucideArrowUpCircle:Ys,LucideArrowUpDown:Im,LucideArrowUpFromDot:Am,LucideArrowUpFromLine:Em,LucideArrowUpLeft:jm,LucideArrowUpLeftFromCircle:Ks,LucideArrowUpLeftFromSquare:t1,LucideArrowUpLeftSquare:r1,LucideArrowUpNarrowWide:xs,LucideArrowUpRight:Pm,LucideArrowUpRightFromCircle:Zs,LucideArrowUpRightFromSquare:n1,LucideArrowUpRightSquare:s1,LucideArrowUpSquare:a1,LucideArrowUpToLine:$m,LucideArrowUpWideNarrow:zm,LucideArrowUpZA:ws,LucideArrowUpZa:ws,LucideArrowsUpFromLine:Tm,LucideAsterisk:Dm,LucideAsteriskSquare:i1,LucideAtSign:Hm,LucideAtom:Om,LucideAudioLines:Fm,LucideAudioWaveform:Vm,LucideAward:qm,LucideAxe:Bm,LucideAxis3D:Ms,LucideAxis3d:Ms,LucideBaby:Um,LucideBackpack:Wm,LucideBadge:cg,LucideBadgeAlert:Km,LucideBadgeCent:Gm,LucideBadgeCheck:bs,LucideBadgeDollarSign:Zm,LucideBadgeEuro:Ym,LucideBadgeHelp:_s,LucideBadgeIndianRupee:Xm,LucideBadgeInfo:Qm,LucideBadgeJapaneseYen:Jm,LucideBadgeMinus:eg,LucideBadgePercent:tg,LucideBadgePlus:ng,LucideBadgePoundSterling:og,LucideBadgeQuestionMark:_s,LucideBadgeRussianRuble:rg,LucideBadgeSwissFranc:ag,LucideBadgeTurkishLira:ig,LucideBadgeX:sg,LucideBaggageClaim:lg,LucideBalloon:dg,LucideBan:G2,LucideBanana:ug,LucideBandage:hg,LucideBanknote:mg,LucideBanknoteArrowDown:fg,LucideBanknoteArrowUp:pg,LucideBanknoteX:yg,LucideBarChart:Ds,LucideBarChart2:Hs,LucideBarChart3:Rs,LucideBarChart4:zs,LucideBarChartBig:Ps,LucideBarChartHorizontal:js,LucideBarChartHorizontalBig:Es,LucideBarcode:gg,LucideBarrel:kg,LucideBaseline:vg,LucideBath:xg,LucideBattery:Lg,LucideBatteryCharging:wg,LucideBatteryFull:Mg,LucideBatteryLow:bg,LucideBatteryMedium:_g,LucideBatteryPlus:Cg,LucideBatteryWarning:Sg,LucideBeaker:Ng,LucideBean:Ag,LucideBeanOff:Ig,LucideBed:$g,LucideBedDouble:Eg,LucideBedSingle:jg,LucideBeef:Pg,LucideBeer:Rg,LucideBeerOff:zg,LucideBell:Vg,LucideBellDot:Tg,LucideBellElectric:Dg,LucideBellMinus:Hg,LucideBellOff:Og,LucideBellPlus:Fg,LucideBellRing:qg,LucideBetweenHorizonalEnd:Cs,LucideBetweenHorizonalStart:Ss,LucideBetweenHorizontalEnd:Cs,LucideBetweenHorizontalStart:Ss,LucideBetweenVerticalEnd:Bg,LucideBetweenVerticalStart:Ug,LucideBicepsFlexed:Wg,LucideBike:Gg,LucideBinary:Kg,LucideBinoculars:Zg,LucideBiohazard:Xg,LucideBird:Yg,LucideBirdhouse:Qg,LucideBitcoin:Jg,LucideBlend:ek,LucideBlinds:tk,LucideBlocks:nk,LucideBluetooth:ik,LucideBluetoothConnected:ok,LucideBluetoothOff:rk,LucideBluetoothSearching:ak,LucideBold:sk,LucideBolt:ck,LucideBomb:lk,LucideBone:dk,LucideBook:zk,LucideBookA:uk,LucideBookAlert:hk,LucideBookAudio:fk,LucideBookCheck:pk,LucideBookCopy:yk,LucideBookDashed:Ls,LucideBookDown:mk,LucideBookHeadphones:gk,LucideBookHeart:kk,LucideBookImage:vk,LucideBookKey:xk,LucideBookLock:wk,LucideBookMarked:Mk,LucideBookMinus:bk,LucideBookOpen:Sk,LucideBookOpenCheck:_k,LucideBookOpenText:Ck,LucideBookPlus:Lk,LucideBookSearch:Nk,LucideBookTemplate:Ls,LucideBookText:Ik,LucideBookType:Ak,LucideBookUp:jk,LucideBookUp2:Ek,LucideBookUser:$k,LucideBookX:Pk,LucideBookmark:Ok,LucideBookmarkCheck:Rk,LucideBookmarkMinus:Tk,LucideBookmarkPlus:Dk,LucideBookmarkX:Hk,LucideBoomBox:Fk,LucideBot:Vk,LucideBotMessageSquare:qk,LucideBotOff:Bk,LucideBottleWine:Uk,LucideBowArrow:Wk,LucideBox:Gk,LucideBoxSelect:k1,LucideBoxes:Kk,LucideBraces:Ns,LucideBrackets:Zk,LucideBrain:Qk,LucideBrainCircuit:Xk,LucideBrainCog:Yk,LucideBrickWall:t4,LucideBrickWallFire:Jk,LucideBrickWallShield:e4,LucideBriefcase:a4,LucideBriefcaseBusiness:n4,LucideBriefcaseConveyorBelt:o4,LucideBriefcaseMedical:r4,LucideBringToFront:i4,LucideBrush:l4,LucideBrushCleaning:s4,LucideBubbles:c4,LucideBug:h4,LucideBugOff:d4,LucideBugPlay:u4,LucideBuilding:f4,LucideBuilding2:p4,LucideBus:m4,LucideBusFront:y4,LucideCable:k4,LucideCableCar:g4,LucideCake:x4,LucideCakeSlice:v4,LucideCalculator:w4,LucideCalendar:q4,LucideCalendar1:M4,LucideCalendarArrowDown:b4,LucideCalendarArrowUp:_4,LucideCalendarCheck:S4,LucideCalendarCheck2:C4,LucideCalendarClock:L4,LucideCalendarCog:N4,LucideCalendarDays:I4,LucideCalendarFold:A4,LucideCalendarHeart:E4,LucideCalendarMinus:$4,LucideCalendarMinus2:j4,LucideCalendarOff:P4,LucideCalendarPlus:T4,LucideCalendarPlus2:z4,LucideCalendarRange:R4,LucideCalendarSearch:D4,LucideCalendarSync:H4,LucideCalendarX:F4,LucideCalendarX2:O4,LucideCalendars:V4,LucideCamera:U4,LucideCameraOff:B4,LucideCandlestickChart:$s,LucideCandy:K4,LucideCandyCane:W4,LucideCandyOff:G4,LucideCannabis:X4,LucideCannabisOff:Z4,LucideCaptions:Is,LucideCaptionsOff:Y4,LucideCar:e5,LucideCarFront:Q4,LucideCarTaxiFront:J4,LucideCaravan:t5,LucideCardSim:n5,LucideCarrot:o5,LucideCaseLower:r5,LucideCaseSensitive:a5,LucideCaseUpper:i5,LucideCassetteTape:s5,LucideCast:c5,LucideCastle:l5,LucideCat:d5,LucideCctv:u5,LucideChartArea:As,LucideChartBar:js,LucideChartBarBig:Es,LucideChartBarDecreasing:h5,LucideChartBarIncreasing:f5,LucideChartBarStacked:p5,LucideChartCandlestick:$s,LucideChartColumn:Rs,LucideChartColumnBig:Ps,LucideChartColumnDecreasing:y5,LucideChartColumnIncreasing:zs,LucideChartColumnStacked:m5,LucideChartGantt:g5,LucideChartLine:Ts,LucideChartNetwork:k5,LucideChartNoAxesColumn:Hs,LucideChartNoAxesColumnDecreasing:v5,LucideChartNoAxesColumnIncreasing:Ds,LucideChartNoAxesCombined:x5,LucideChartNoAxesGantt:Os,LucideChartPie:Fs,LucideChartScatter:qs,LucideChartSpline:w5,LucideCheck:Ni,LucideCheckCheck:M5,LucideCheckCircle:Qs,LucideCheckCircle2:li,LucideCheckLine:b5,LucideCheckSquare:l1,LucideCheckSquare2:d1,LucideChefHat:_5,LucideCherry:C5,LucideChessBishop:S5,LucideChessKing:L5,LucideChessKnight:N5,LucideChessPawn:I5,LucideChessQueen:A5,LucideChessRook:j5,LucideChevronDown:E5,LucideChevronDownCircle:Js,LucideChevronDownSquare:u1,LucideChevronFirst:$5,LucideChevronLast:P5,LucideChevronLeft:z5,LucideChevronLeftCircle:ec,LucideChevronLeftSquare:h1,LucideChevronRight:R5,LucideChevronRightCircle:tc,LucideChevronRightSquare:p1,LucideChevronUp:T5,LucideChevronUpCircle:nc,LucideChevronUpSquare:f1,LucideChevronsDown:H5,LucideChevronsDownUp:D5,LucideChevronsLeft:q5,LucideChevronsLeftRight:F5,LucideChevronsLeftRightEllipsis:O5,LucideChevronsRight:B5,LucideChevronsRightLeft:V5,LucideChevronsUp:W5,LucideChevronsUpDown:U5,LucideChrome:Vs,LucideChromium:Vs,LucideChurch:G5,LucideCigarette:Z5,LucideCigaretteOff:K5,LucideCircle:K2,LucideCircleAlert:ci,LucideCircleArrowDown:Bs,LucideCircleArrowLeft:Ws,LucideCircleArrowOutDownLeft:Us,LucideCircleArrowOutDownRight:Gs,LucideCircleArrowOutUpLeft:Ks,LucideCircleArrowOutUpRight:Zs,LucideCircleArrowRight:Xs,LucideCircleArrowUp:Ys,LucideCircleCheck:li,LucideCircleCheckBig:Qs,LucideCircleChevronDown:Js,LucideCircleChevronLeft:ec,LucideCircleChevronRight:tc,LucideCircleChevronUp:nc,LucideCircleDashed:X5,LucideCircleDivide:oc,LucideCircleDollarSign:Y5,LucideCircleDot:J5,LucideCircleDotDashed:Q5,LucideCircleEllipsis:ev,LucideCircleEqual:tv,LucideCircleFadingArrowUp:nv,LucideCircleFadingPlus:ov,LucideCircleGauge:rc,LucideCircleHelp:Vo,LucideCircleMinus:ac,LucideCircleOff:rv,LucideCircleParking:sc,LucideCircleParkingOff:ic,LucideCirclePause:cc,LucideCirclePercent:lc,LucideCirclePile:av,LucideCirclePlay:dc,LucideCirclePlus:uc,LucideCirclePoundSterling:iv,LucideCirclePower:hc,LucideCircleQuestionMark:Vo,LucideCircleSlash:sv,LucideCircleSlash2:fc,LucideCircleSlashed:fc,LucideCircleSmall:cv,LucideCircleStar:lv,LucideCircleStop:yc,LucideCircleUser:mc,LucideCircleUserRound:pc,LucideCircleX:gc,LucideCircuitBoard:dv,LucideCitrus:uv,LucideClapperboard:hv,LucideClipboard:Mv,LucideClipboardCheck:fv,LucideClipboardClock:pv,LucideClipboardCopy:yv,LucideClipboardEdit:vc,LucideClipboardList:mv,LucideClipboardMinus:gv,LucideClipboardPaste:kv,LucideClipboardPen:vc,LucideClipboardPenLine:kc,LucideClipboardPlus:vv,LucideClipboardSignature:kc,LucideClipboardType:xv,LucideClipboardX:wv,LucideClock:Fv,LucideClock1:bv,LucideClock10:_v,LucideClock11:Cv,LucideClock12:Sv,LucideClock2:Lv,LucideClock3:Nv,LucideClock4:Iv,LucideClock5:Av,LucideClock6:Ev,LucideClock7:jv,LucideClock8:$v,LucideClock9:Pv,LucideClockAlert:zv,LucideClockArrowDown:Rv,LucideClockArrowUp:Hv,LucideClockCheck:Tv,LucideClockFading:Dv,LucideClockPlus:Ov,LucideClosedCaption:qv,LucideCloud:Z2,LucideCloudAlert:Vv,LucideCloudBackup:Bv,LucideCloudCheck:Uv,LucideCloudCog:Wv,LucideCloudDownload:xc,LucideCloudDrizzle:Gv,LucideCloudFog:Kv,LucideCloudHail:Zv,LucideCloudLightning:Xv,LucideCloudMoon:Qv,LucideCloudMoonRain:Yv,LucideCloudOff:Jv,LucideCloudRain:t3,LucideCloudRainWind:e3,LucideCloudSnow:n3,LucideCloudSun:r3,LucideCloudSunRain:o3,LucideCloudSync:a3,LucideCloudUpload:wc,LucideCloudy:i3,LucideClover:s3,LucideClub:c3,LucideCode:l3,LucideCode2:Mc,LucideCodeSquare:y1,LucideCodeXml:Mc,LucideCodepen:d3,LucideCodesandbox:u3,LucideCoffee:h3,LucideCog:f3,LucideCoins:p3,LucideColumns:bc,LucideColumns2:bc,LucideColumns3:di,LucideColumns3Cog:wr,LucideColumns4:y3,LucideColumnsSettings:wr,LucideCombine:m3,LucideCommand:g3,LucideCompass:k3,LucideComponent:v3,LucideComputer:x3,LucideConciergeBell:w3,LucideCone:M3,LucideConstruction:b3,LucideContact:_3,LucideContact2:_c,LucideContactRound:_c,LucideContainer:C3,LucideContrast:S3,LucideCookie:L3,LucideCookingPot:N3,LucideCopy:P3,LucideCopyCheck:I3,LucideCopyMinus:A3,LucideCopyPlus:E3,LucideCopySlash:j3,LucideCopyX:$3,LucideCopyleft:R3,LucideCopyright:z3,LucideCornerDownLeft:T3,LucideCornerDownRight:D3,LucideCornerLeftDown:H3,LucideCornerLeftUp:O3,LucideCornerRightDown:q3,LucideCornerRightUp:F3,LucideCornerUpLeft:B3,LucideCornerUpRight:V3,LucideCpu:U3,LucideCreativeCommons:W3,LucideCreditCard:G3,LucideCroissant:K3,LucideCrop:Z3,LucideCross:X3,LucideCrosshair:Y3,LucideCrown:Q3,LucideCuboid:J3,LucideCupSoda:ex,LucideCurlyBraces:Ns,LucideCurrency:tx,LucideCylinder:nx,LucideDam:ox,LucideDatabase:X2,LucideDatabaseBackup:rx,LucideDatabaseSearch:ax,LucideDatabaseZap:ix,LucideDecimalsArrowLeft:sx,LucideDecimalsArrowRight:cx,LucideDelete:lx,LucideDessert:dx,LucideDiameter:ux,LucideDiamond:Y2,LucideDiamondMinus:hx,LucideDiamondPercent:Cc,LucideDiamondPlus:fx,LucideDice1:px,LucideDice2:mx,LucideDice3:yx,LucideDice4:gx,LucideDice5:kx,LucideDice6:vx,LucideDices:xx,LucideDiff:wx,LucideDisc:Cx,LucideDisc2:Mx,LucideDisc3:_x,LucideDiscAlbum:bx,LucideDivide:Sx,LucideDivideCircle:oc,LucideDivideSquare:v1,LucideDna:Nx,LucideDnaOff:Lx,LucideDock:Ix,LucideDog:Ax,LucideDollarSign:Ex,LucideDonut:jx,LucideDoorClosed:Px,LucideDoorClosedLocked:$x,LucideDoorOpen:zx,LucideDot:Rx,LucideDotSquare:x1,LucideDownload:e0,LucideDownloadCloud:xc,LucideDraftingCompass:Tx,LucideDrama:Dx,LucideDribbble:Hx,LucideDrill:Ox,LucideDrone:Fx,LucideDroplet:Vx,LucideDropletOff:qx,LucideDroplets:Bx,LucideDrum:Ux,LucideDrumstick:Wx,LucideDumbbell:Gx,LucideEar:Kx,LucideEarOff:Zx,LucideEarth:Sc,LucideEarthLock:Xx,LucideEclipse:Yx,LucideEdit:to,LucideEdit2:Rl,LucideEdit3:zl,LucideEgg:e8,LucideEggFried:Qx,LucideEggOff:Jx,LucideEllipsis:Nc,LucideEllipsisVertical:Lc,LucideEqual:o8,LucideEqualApproximately:t8,LucideEqualNot:n8,LucideEqualSquare:w1,LucideEraser:r8,LucideEthernetPort:a8,LucideEuro:i8,LucideEvCharger:s8,LucideExpand:c8,LucideExternalLink:Q2,LucideEye:u8,LucideEyeClosed:l8,LucideEyeOff:d8,LucideFacebook:h8,LucideFactory:f8,LucideFan:y8,LucideFastForward:p8,LucideFeather:m8,LucideFence:g8,LucideFerrisWheel:k8,LucideFigma:v8,LucideFile:G8,LucideFileArchive:x8,LucideFileAudio:Mr,LucideFileAudio2:Mr,LucideFileAxis3D:Ic,LucideFileAxis3d:Ic,LucideFileBadge:Ac,LucideFileBadge2:Ac,LucideFileBarChart:$c,LucideFileBarChart2:Pc,LucideFileBox:w8,LucideFileBraces:jc,LucideFileBracesCorner:Ec,LucideFileChartColumn:Pc,LucideFileChartColumnIncreasing:$c,LucideFileChartLine:zc,LucideFileChartPie:Rc,LucideFileCheck:M8,LucideFileCheck2:Tc,LucideFileCheckCorner:Tc,LucideFileClock:_8,LucideFileCode:b8,LucideFileCode2:Dc,LucideFileCodeCorner:Dc,LucideFileCog:Hc,LucideFileCog2:Hc,LucideFileDiff:C8,LucideFileDigit:S8,LucideFileDown:J2,LucideFileEdit:Uc,LucideFileExclamationPoint:Oc,LucideFileHeadphone:Mr,LucideFileHeart:L8,LucideFileImage:N8,LucideFileInput:I8,LucideFileJson:jc,LucideFileJson2:Ec,LucideFileKey:Fc,LucideFileKey2:Fc,LucideFileLineChart:zc,LucideFileLock:qc,LucideFileLock2:qc,LucideFileMinus:A8,LucideFileMinus2:Vc,LucideFileMinusCorner:Vc,LucideFileMusic:j8,LucideFileOutput:E8,LucideFilePen:Uc,LucideFilePenLine:Bc,LucideFilePieChart:Rc,LucideFilePlay:Wc,LucideFilePlus:$8,LucideFilePlus2:Gc,LucideFilePlusCorner:Gc,LucideFileQuestion:Kc,LucideFileQuestionMark:Kc,LucideFileScan:P8,LucideFileSearch:z8,LucideFileSearch2:Zc,LucideFileSearchCorner:Zc,LucideFileSignal:Xc,LucideFileSignature:Bc,LucideFileSliders:R8,LucideFileSpreadsheet:T8,LucideFileStack:D8,LucideFileSymlink:H8,LucideFileTerminal:O8,LucideFileText:F8,LucideFileType:q8,LucideFileType2:Yc,LucideFileTypeCorner:Yc,LucideFileUp:V8,LucideFileUser:B8,LucideFileVideo:Wc,LucideFileVideo2:Qc,LucideFileVideoCamera:Qc,LucideFileVolume:U8,LucideFileVolume2:Xc,LucideFileWarning:Oc,LucideFileX:W8,LucideFileX2:Jc,LucideFileXCorner:Jc,LucideFiles:K8,LucideFilm:Z8,LucideFilter:rl,LucideFilterX:ol,LucideFingerprint:el,LucideFingerprintPattern:el,LucideFireExtinguisher:X8,LucideFish:J8,LucideFishOff:Y8,LucideFishSymbol:Q8,LucideFishingHook:e6,LucideFlag:r6,LucideFlagOff:t6,LucideFlagTriangleLeft:n6,LucideFlagTriangleRight:o6,LucideFlame:i6,LucideFlameKindling:a6,LucideFlashlight:c6,LucideFlashlightOff:s6,LucideFlaskConical:u6,LucideFlaskConicalOff:l6,LucideFlaskRound:d6,LucideFlipHorizontal:f6,LucideFlipHorizontal2:h6,LucideFlipVertical:y6,LucideFlipVertical2:p6,LucideFlower:g6,LucideFlower2:m6,LucideFocus:k6,LucideFoldHorizontal:v6,LucideFoldVertical:x6,LucideFolder:G6,LucideFolderArchive:w6,LucideFolderCheck:M6,LucideFolderClock:b6,LucideFolderClosed:C6,LucideFolderCode:_6,LucideFolderCog:tl,LucideFolderCog2:tl,LucideFolderDot:S6,LucideFolderDown:L6,LucideFolderEdit:nl,LucideFolderGit:I6,LucideFolderGit2:N6,LucideFolderHeart:A6,LucideFolderInput:E6,LucideFolderKanban:j6,LucideFolderKey:$6,LucideFolderLock:P6,LucideFolderMinus:z6,LucideFolderOpen:eh,LucideFolderOpenDot:R6,LucideFolderOutput:T6,LucideFolderPen:nl,LucideFolderPlus:D6,LucideFolderRoot:H6,LucideFolderSearch:F6,LucideFolderSearch2:O6,LucideFolderSymlink:q6,LucideFolderSync:V6,LucideFolderTree:B6,LucideFolderUp:U6,LucideFolderX:W6,LucideFolders:K6,LucideFootprints:Z6,LucideForkKnife:ld,LucideForkKnifeCrossed:cd,LucideForklift:Q6,LucideForm:X6,LucideFormInput:Dl,LucideForward:Y6,LucideFrame:J6,LucideFramer:nw,LucideFrown:ew,LucideFuel:tw,LucideFullscreen:ow,LucideFunctionSquare:M1,LucideFunnel:rl,LucideFunnelPlus:rw,LucideFunnelX:ol,LucideGalleryHorizontal:iw,LucideGalleryHorizontalEnd:aw,LucideGalleryThumbnails:sw,LucideGalleryVertical:lw,LucideGalleryVerticalEnd:cw,LucideGamepad:fw,LucideGamepad2:dw,LucideGamepadDirectional:uw,LucideGanttChart:Os,LucideGanttChartSquare:Sr,LucideGauge:hw,LucideGaugeCircle:rc,LucideGavel:pw,LucideGem:yw,LucideGeorgianLari:mw,LucideGhost:kw,LucideGift:gw,LucideGitBranch:ww,LucideGitBranchMinus:vw,LucideGitBranchPlus:xw,LucideGitCommit:al,LucideGitCommitHorizontal:al,LucideGitCommitVertical:Mw,LucideGitCompare:_w,LucideGitCompareArrows:bw,LucideGitFork:Cw,LucideGitGraph:Sw,LucideGitMerge:Lw,LucideGitPullRequest:$w,LucideGitPullRequestArrow:Nw,LucideGitPullRequestClosed:Iw,LucideGitPullRequestCreate:Ew,LucideGitPullRequestCreateArrow:Aw,LucideGitPullRequestDraft:jw,LucideGithub:Pw,LucideGitlab:zw,LucideGlassWater:Rw,LucideGlasses:Tw,LucideGlobe:Ow,LucideGlobe2:Sc,LucideGlobeLock:Dw,LucideGlobeX:Hw,LucideGoal:Fw,LucideGpu:qw,LucideGrab:dl,LucideGraduationCap:Vw,LucideGrape:Bw,LucideGrid:br,LucideGrid2X2:ll,LucideGrid2X2Check:il,LucideGrid2X2Plus:sl,LucideGrid2X2X:cl,LucideGrid2x2:ll,LucideGrid2x2Check:il,LucideGrid2x2Plus:sl,LucideGrid2x2X:cl,LucideGrid3X3:br,LucideGrid3x2:Uw,LucideGrid3x3:br,LucideGrip:Gw,LucideGripHorizontal:Ww,LucideGripVertical:Kw,LucideGroup:Zw,LucideGuitar:Xw,LucideHam:Yw,LucideHamburger:Qw,LucideHammer:Jw,LucideHand:th,LucideHandCoins:e7,LucideHandFist:t7,LucideHandGrab:dl,LucideHandHeart:n7,LucideHandHelping:ul,LucideHandMetal:o7,LucideHandPlatter:r7,LucideHandbag:a7,LucideHandshake:i7,LucideHardDrive:l7,LucideHardDriveDownload:s7,LucideHardDriveUpload:c7,LucideHardHat:d7,LucideHash:u7,LucideHatGlasses:h7,LucideHaze:f7,LucideHd:p7,LucideHdmiPort:y7,LucideHeading:M7,LucideHeading1:m7,LucideHeading2:g7,LucideHeading3:k7,LucideHeading4:v7,LucideHeading5:x7,LucideHeading6:w7,LucideHeadphoneOff:b7,LucideHeadphones:_7,LucideHeadset:C7,LucideHeart:j7,LucideHeartCrack:S7,LucideHeartHandshake:N7,LucideHeartMinus:L7,LucideHeartOff:I7,LucideHeartPlus:A7,LucideHeartPulse:E7,LucideHeater:$7,LucideHelicopter:P7,LucideHelpCircle:Vo,LucideHelpingHand:ul,LucideHexagon:nh,LucideHighlighter:z7,LucideHistory:R7,LucideHome:hl,LucideHop:T7,LucideHopOff:D7,LucideHospital:H7,LucideHotel:O7,LucideHourglass:F7,LucideHouse:hl,LucideHouseHeart:q7,LucideHousePlug:V7,LucideHousePlus:B7,LucideHouseWifi:U7,LucideIceCream:pl,LucideIceCream2:fl,LucideIceCreamBowl:fl,LucideIceCreamCone:pl,LucideIdCard:G7,LucideIdCardLanyard:W7,LucideImage:rh,LucideImageDown:K7,LucideImageMinus:X7,LucideImageOff:Z7,LucideImagePlay:Y7,LucideImagePlus:oh,LucideImageUp:Q7,LucideImageUpscale:J7,LucideImages:eM,LucideImport:tM,LucideInbox:nM,LucideIndent:Cr,LucideIndentDecrease:_r,LucideIndentIncrease:Cr,LucideIndianRupee:oM,LucideInfinity:aM,LucideInfo:rM,LucideInspect:N1,LucideInspectionPanel:iM,LucideInstagram:sM,LucideItalic:cM,LucideIterationCcw:lM,LucideIterationCw:dM,LucideJapaneseYen:uM,LucideJoystick:hM,LucideKanban:fM,LucideKanbanSquare:b1,LucideKanbanSquareDashed:m1,LucideKayak:pM,LucideKey:gM,LucideKeyRound:yM,LucideKeySquare:mM,LucideKeyboard:xM,LucideKeyboardMusic:kM,LucideKeyboardOff:vM,LucideLamp:SM,LucideLampCeiling:wM,LucideLampDesk:MM,LucideLampFloor:bM,LucideLampWallDown:_M,LucideLampWallUp:CM,LucideLandPlot:LM,LucideLandmark:NM,LucideLanguages:IM,LucideLaptop:jM,LucideLaptop2:yl,LucideLaptopMinimal:yl,LucideLaptopMinimalCheck:AM,LucideLasso:$M,LucideLassoSelect:EM,LucideLaugh:PM,LucideLayers:ka,LucideLayers2:zM,LucideLayers3:ka,LucideLayersPlus:RM,LucideLayout:Pl,LucideLayoutDashboard:ah,LucideLayoutGrid:TM,LucideLayoutList:DM,LucideLayoutPanelLeft:HM,LucideLayoutPanelTop:FM,LucideLayoutTemplate:OM,LucideLeaf:qM,LucideLeafyGreen:VM,LucideLectern:BM,LucideLetterText:K1,LucideLibrary:WM,LucideLibraryBig:UM,LucideLibrarySquare:_1,LucideLifeBuoy:GM,LucideLigature:KM,LucideLightbulb:XM,LucideLightbulbOff:ZM,LucideLineChart:Ts,LucideLineSquiggle:YM,LucideLink:JM,LucideLink2:Ii,LucideLink2Off:QM,LucideLinkedin:eb,LucideList:vb,LucideListCheck:tb,LucideListChecks:nb,LucideListChevronsDownUp:ob,LucideListChevronsUpDown:ab,LucideListCollapse:rb,LucideListEnd:ib,LucideListFilter:cb,LucideListFilterPlus:sb,LucideListIndentDecrease:_r,LucideListIndentIncrease:Cr,LucideListMinus:lb,LucideListMusic:db,LucideListOrdered:ub,LucideListPlus:hb,LucideListRestart:fb,LucideListStart:pb,LucideListTodo:yb,LucideListTree:mb,LucideListVideo:gb,LucideListX:kb,LucideLoader:wb,LucideLoader2:Fn,LucideLoaderCircle:Fn,LucideLoaderPinwheel:xb,LucideLocate:_b,LucideLocateFixed:Mb,LucideLocateOff:bb,LucideLocationEdit:vl,LucideLock:Sb,LucideLockKeyhole:Cb,LucideLockKeyholeOpen:ml,LucideLockOpen:gl,LucideLogIn:Lb,LucideLogOut:Nb,LucideLogs:Ib,LucideLollipop:Ab,LucideLuggage:Eb,LucideMSquare:C1,LucideMagnet:jb,LucideMail:Ob,LucideMailCheck:$b,LucideMailMinus:Pb,LucideMailOpen:zb,LucideMailPlus:Rb,LucideMailQuestion:kl,LucideMailQuestionMark:kl,LucideMailSearch:Tb,LucideMailWarning:Db,LucideMailX:Hb,LucideMailbox:qb,LucideMails:Fb,LucideMap:o9,LucideMapMinus:Vb,LucideMapPin:e9,LucideMapPinCheck:Ub,LucideMapPinCheckInside:Bb,LucideMapPinHouse:Wb,LucideMapPinMinus:Kb,LucideMapPinMinusInside:Gb,LucideMapPinOff:Zb,LucideMapPinPen:vl,LucideMapPinPlus:Yb,LucideMapPinPlusInside:Xb,LucideMapPinX:Qb,LucideMapPinXInside:Jb,LucideMapPinned:t9,LucideMapPlus:n9,LucideMars:a9,LucideMarsStroke:r9,LucideMartini:i9,LucideMaximize:s9,LucideMaximize2:xd,LucideMedal:c9,LucideMegaphone:d9,LucideMegaphoneOff:l9,LucideMeh:u9,LucideMemoryStick:h9,LucideMenu:p9,LucideMenuSquare:S1,LucideMerge:f9,LucideMessageCircle:_9,LucideMessageCircleCode:y9,LucideMessageCircleDashed:m9,LucideMessageCircleHeart:g9,LucideMessageCircleMore:k9,LucideMessageCircleOff:v9,LucideMessageCirclePlus:x9,LucideMessageCircleQuestion:xl,LucideMessageCircleQuestionMark:xl,LucideMessageCircleReply:w9,LucideMessageCircleWarning:M9,LucideMessageCircleX:b9,LucideMessageSquare:O9,LucideMessageSquareCode:C9,LucideMessageSquareDashed:S9,LucideMessageSquareDiff:L9,LucideMessageSquareDot:N9,LucideMessageSquareHeart:I9,LucideMessageSquareLock:A9,LucideMessageSquareMore:E9,LucideMessageSquareOff:j9,LucideMessageSquarePlus:$9,LucideMessageSquareQuote:P9,LucideMessageSquareReply:z9,LucideMessageSquareShare:R9,LucideMessageSquareText:T9,LucideMessageSquareWarning:D9,LucideMessageSquareX:H9,LucideMessagesSquare:F9,LucideMic:V9,LucideMic2:wl,LucideMicOff:q9,LucideMicVocal:wl,LucideMicrochip:B9,LucideMicroscope:U9,LucideMicrowave:W9,LucideMilestone:G9,LucideMilk:Z9,LucideMilkOff:K9,LucideMinimize:Y9,LucideMinimize2:X9,LucideMinus:ih,LucideMinusCircle:ac,LucideMinusSquare:L1,LucideMonitor:u_,LucideMonitorCheck:Q9,LucideMonitorCloud:J9,LucideMonitorCog:e_,LucideMonitorDot:t_,LucideMonitorDown:n_,LucideMonitorOff:o_,LucideMonitorPause:r_,LucideMonitorPlay:a_,LucideMonitorSmartphone:i_,LucideMonitorSpeaker:s_,LucideMonitorStop:c_,LucideMonitorUp:l_,LucideMonitorX:d_,LucideMoon:f_,LucideMoonStar:h_,LucideMoreHorizontal:Nc,LucideMoreVertical:Lc,LucideMotorbike:p_,LucideMountain:m_,LucideMountainSnow:y_,LucideMouse:M_,LucideMouseOff:g_,LucideMousePointer:w_,LucideMousePointer2:sh,LucideMousePointer2Off:k_,LucideMousePointerBan:v_,LucideMousePointerClick:x_,LucideMousePointerSquareDashed:g1,LucideMove:P_,LucideMove3D:Ml,LucideMove3d:Ml,LucideMoveDiagonal:__,LucideMoveDiagonal2:b_,LucideMoveDown:L_,LucideMoveDownLeft:C_,LucideMoveDownRight:S_,LucideMoveHorizontal:N_,LucideMoveLeft:ch,LucideMoveRight:I_,LucideMoveUp:j_,LucideMoveUpLeft:A_,LucideMoveUpRight:E_,LucideMoveVertical:$_,LucideMusic:D_,LucideMusic2:z_,LucideMusic3:R_,LucideMusic4:T_,LucideNavigation:q_,LucideNavigation2:O_,LucideNavigation2Off:H_,LucideNavigationOff:F_,LucideNetwork:V_,LucideNewspaper:B_,LucideNfc:U_,LucideNonBinary:W_,LucideNotebook:X_,LucideNotebookPen:G_,LucideNotebookTabs:K_,LucideNotebookText:Z_,LucideNotepadText:Q_,LucideNotepadTextDashed:Y_,LucideNut:J_,LucideNutOff:eC,LucideOctagon:nC,LucideOctagonAlert:bl,LucideOctagonMinus:tC,LucideOctagonPause:_l,LucideOctagonX:Cl,LucideOmega:oC,LucideOption:aC,LucideOrbit:rC,LucideOrigami:iC,LucideOutdent:_r,LucidePackage:pC,LucidePackage2:sC,LucidePackageCheck:cC,LucidePackageMinus:lC,LucidePackageOpen:dC,LucidePackagePlus:uC,LucidePackageSearch:hC,LucidePackageX:fC,LucidePaintBucket:yC,LucidePaintRoller:mC,LucidePaintbrush:gC,LucidePaintbrush2:Sl,LucidePaintbrushVertical:Sl,LucidePalette:kC,LucidePalmtree:Q1,LucidePanda:vC,LucidePanelBottom:wC,LucidePanelBottomClose:xC,LucidePanelBottomDashed:Ll,LucidePanelBottomInactive:Ll,LucidePanelBottomOpen:MC,LucidePanelLeft:El,LucidePanelLeftClose:Nl,LucidePanelLeftDashed:Il,LucidePanelLeftInactive:Il,LucidePanelLeftOpen:Al,LucidePanelLeftRightDashed:bC,LucidePanelRight:_C,LucidePanelRightClose:lh,LucidePanelRightDashed:jl,LucidePanelRightInactive:jl,LucidePanelRightOpen:dh,LucidePanelTop:NC,LucidePanelTopBottomDashed:CC,LucidePanelTopClose:SC,LucidePanelTopDashed:$l,LucidePanelTopInactive:$l,LucidePanelTopOpen:LC,LucidePanelsLeftBottom:IC,LucidePanelsLeftRight:di,LucidePanelsRightBottom:AC,LucidePanelsTopBottom:Fl,LucidePanelsTopLeft:Pl,LucidePaperclip:EC,LucideParentheses:$C,LucideParkingCircle:sc,LucideParkingCircleOff:ic,LucideParkingMeter:jC,LucideParkingSquare:A1,LucideParkingSquareOff:I1,LucidePartyPopper:PC,LucidePause:zC,LucidePauseCircle:cc,LucidePauseOctagon:_l,LucidePawPrint:RC,LucidePcCase:TC,LucidePen:Rl,LucidePenBox:to,LucidePenLine:zl,LucidePenOff:DC,LucidePenSquare:to,LucidePenTool:HC,LucidePencil:hh,LucidePencilLine:uh,LucidePencilOff:OC,LucidePencilRuler:FC,LucidePentagon:qC,LucidePercent:VC,LucidePercentCircle:lc,LucidePercentDiamond:Cc,LucidePercentSquare:E1,LucidePersonStanding:UC,LucidePhilippinePeso:BC,LucidePhone:QC,LucidePhoneCall:WC,LucidePhoneForwarded:GC,LucidePhoneIncoming:KC,LucidePhoneMissed:ZC,LucidePhoneOff:XC,LucidePhoneOutgoing:YC,LucidePi:JC,LucidePiSquare:P1,LucidePiano:eS,LucidePickaxe:tS,LucidePictureInPicture:oS,LucidePictureInPicture2:nS,LucidePieChart:Fs,LucidePiggyBank:rS,LucidePilcrow:sS,LucidePilcrowLeft:aS,LucidePilcrowRight:iS,LucidePilcrowSquare:j1,LucidePill:lS,LucidePillBottle:cS,LucidePin:uS,LucidePinOff:dS,LucidePipette:hS,LucidePizza:fS,LucidePlane:mS,LucidePlaneLanding:pS,LucidePlaneTakeoff:yS,LucidePlay:wd,LucidePlayCircle:dc,LucidePlaySquare:$1,LucidePlug:kS,LucidePlug2:gS,LucidePlugZap:Tl,LucidePlugZap2:Tl,LucidePlus:fh,LucidePlusCircle:uc,LucidePlusSquare:z1,LucidePocket:xS,LucidePocketKnife:vS,LucidePodcast:MS,LucidePointer:bS,LucidePointerOff:wS,LucidePopcorn:_S,LucidePopsicle:CS,LucidePoundSterling:SS,LucidePower:NS,LucidePowerCircle:hc,LucidePowerOff:LS,LucidePowerSquare:R1,LucidePresentation:IS,LucidePrinter:jS,LucidePrinterCheck:AS,LucidePrinterX:ES,LucideProjector:PS,LucideProportions:$S,LucidePuzzle:zS,LucidePyramid:RS,LucideQrCode:TS,LucideQuote:DS,LucideRabbit:HS,LucideRadar:OS,LucideRadiation:FS,LucideRadical:qS,LucideRadio:US,LucideRadioReceiver:VS,LucideRadioTower:BS,LucideRadius:WS,LucideRailSymbol:GS,LucideRainbow:KS,LucideRat:ZS,LucideRatio:XS,LucideReceipt:iL,LucideReceiptCent:YS,LucideReceiptEuro:QS,LucideReceiptIndianRupee:JS,LucideReceiptJapaneseYen:eL,LucideReceiptPoundSterling:tL,LucideReceiptRussianRuble:nL,LucideReceiptSwissFranc:oL,LucideReceiptText:rL,LucideReceiptTurkishLira:aL,LucideRectangleCircle:sL,LucideRectangleEllipsis:Dl,LucideRectangleGoggles:cL,LucideRectangleHorizontal:lL,LucideRectangleVertical:dL,LucideRecycle:uL,LucideRedo:pL,LucideRedo2:hL,LucideRedoDot:fL,LucideRefreshCcw:gL,LucideRefreshCcwDot:yL,LucideRefreshCw:kL,LucideRefreshCwOff:mL,LucideRefrigerator:vL,LucideRegex:xL,LucideRemoveFormatting:wL,LucideRepeat:_L,LucideRepeat1:bL,LucideRepeat2:ML,LucideReplace:SL,LucideReplaceAll:CL,LucideReply:NL,LucideReplyAll:LL,LucideRewind:IL,LucideRibbon:EL,LucideRocket:AL,LucideRockingChair:jL,LucideRollerCoaster:$L,LucideRose:PL,LucideRotate3D:Hl,LucideRotate3d:Hl,LucideRotateCcw:TL,LucideRotateCcwKey:zL,LucideRotateCcwSquare:RL,LucideRotateCw:HL,LucideRotateCwSquare:DL,LucideRoute:FL,LucideRouteOff:OL,LucideRouter:qL,LucideRows:Ol,LucideRows2:Ol,LucideRows3:Fl,LucideRows4:VL,LucideRss:BL,LucideRuler:WL,LucideRulerDimensionLine:UL,LucideRussianRuble:GL,LucideSailboat:KL,LucideSalad:ZL,LucideSandwich:XL,LucideSatellite:QL,LucideSatelliteDish:YL,LucideSaudiRiyal:JL,LucideSave:nN,LucideSaveAll:eN,LucideSaveOff:tN,LucideScale:oN,LucideScale3D:ql,LucideScale3d:ql,LucideScaling:rN,LucideScan:fN,LucideScanBarcode:aN,LucideScanEye:iN,LucideScanFace:sN,LucideScanHeart:cN,LucideScanLine:lN,LucideScanQrCode:dN,LucideScanSearch:uN,LucideScanText:hN,LucideScatterChart:qs,LucideSchool:pN,LucideSchool2:ed,LucideScissors:gN,LucideScissorsLineDashed:yN,LucideScissorsSquare:T1,LucideScissorsSquareDashedBottom:c1,LucideScooter:mN,LucideScreenShare:vN,LucideScreenShareOff:kN,LucideScroll:wN,LucideScrollText:xN,LucideSearch:ph,LucideSearchAlert:MN,LucideSearchCheck:bN,LucideSearchCode:_N,LucideSearchSlash:CN,LucideSearchX:SN,LucideSection:LN,LucideSend:IN,LucideSendHorizonal:Vl,LucideSendHorizontal:Vl,LucideSendToBack:NN,LucideSeparatorHorizontal:EN,LucideSeparatorVertical:AN,LucideServer:yh,LucideServerCog:jN,LucideServerCrash:$N,LucideServerOff:PN,LucideSettings:RN,LucideSettings2:zN,LucideShapes:mh,LucideShare:TN,LucideShare2:gh,LucideSheet:DN,LucideShell:HN,LucideShield:ZN,LucideShieldAlert:ON,LucideShieldBan:FN,LucideShieldCheck:qN,LucideShieldClose:Ul,LucideShieldEllipsis:VN,LucideShieldHalf:BN,LucideShieldMinus:UN,LucideShieldOff:WN,LucideShieldPlus:GN,LucideShieldQuestion:Bl,LucideShieldQuestionMark:Bl,LucideShieldUser:KN,LucideShieldX:Ul,LucideShip:QN,LucideShipWheel:XN,LucideShirt:YN,LucideShoppingBag:eI,LucideShoppingBasket:JN,LucideShoppingCart:tI,LucideShovel:nI,LucideShowerHead:oI,LucideShredder:rI,LucideShrimp:aI,LucideShrink:iI,LucideShrub:sI,LucideShuffle:cI,LucideSidebar:El,LucideSidebarClose:Nl,LucideSidebarOpen:Al,LucideSigma:lI,LucideSigmaSquare:D1,LucideSignal:pI,LucideSignalHigh:dI,LucideSignalLow:uI,LucideSignalMedium:hI,LucideSignalZero:fI,LucideSignature:yI,LucideSignpost:gI,LucideSignpostBig:mI,LucideSiren:kI,LucideSkipBack:vI,LucideSkipForward:xI,LucideSkull:wI,LucideSlack:MI,LucideSlash:bI,LucideSlashSquare:H1,LucideSlice:_I,LucideSliders:Wl,LucideSlidersHorizontal:CI,LucideSlidersVertical:Wl,LucideSmartphone:NI,LucideSmartphoneCharging:SI,LucideSmartphoneNfc:LI,LucideSmile:AI,LucideSmilePlus:II,LucideSnail:EI,LucideSnowflake:jI,LucideSoapDispenserDroplet:$I,LucideSofa:PI,LucideSolarPanel:zI,LucideSortAsc:xs,LucideSortDesc:gs,LucideSoup:RI,LucideSpace:TI,LucideSpade:DI,LucideSparkle:HI,LucideSparkles:Gl,LucideSpeaker:OI,LucideSpeech:FI,LucideSpellCheck:VI,LucideSpellCheck2:qI,LucideSpline:BI,LucideSplinePointer:UI,LucideSplit:WI,LucideSplitSquareHorizontal:O1,LucideSplitSquareVertical:F1,LucideSpool:GI,LucideSpotlight:KI,LucideSprayCan:ZI,LucideSprout:XI,LucideSquare:t0,LucideSquareActivity:Kl,LucideSquareArrowDown:Yl,LucideSquareArrowDownLeft:Zl,LucideSquareArrowDownRight:Xl,LucideSquareArrowLeft:Ql,LucideSquareArrowOutDownLeft:Jl,LucideSquareArrowOutDownRight:e1,LucideSquareArrowOutUpLeft:t1,LucideSquareArrowOutUpRight:n1,LucideSquareArrowRight:o1,LucideSquareArrowUp:a1,LucideSquareArrowUpLeft:r1,LucideSquareArrowUpRight:s1,LucideSquareAsterisk:i1,LucideSquareBottomDashedScissors:c1,LucideSquareChartGantt:Sr,LucideSquareCheck:d1,LucideSquareCheckBig:l1,LucideSquareChevronDown:u1,LucideSquareChevronLeft:h1,LucideSquareChevronRight:p1,LucideSquareChevronUp:f1,LucideSquareCode:y1,LucideSquareDashed:k1,LucideSquareDashedBottom:QI,LucideSquareDashedBottomCode:YI,LucideSquareDashedKanban:m1,LucideSquareDashedMousePointer:g1,LucideSquareDashedTopSolid:JI,LucideSquareDivide:v1,LucideSquareDot:x1,LucideSquareEqual:w1,LucideSquareFunction:M1,LucideSquareGanttChart:Sr,LucideSquareKanban:b1,LucideSquareLibrary:_1,LucideSquareM:C1,LucideSquareMenu:S1,LucideSquareMinus:L1,LucideSquareMousePointer:N1,LucideSquareParking:A1,LucideSquareParkingOff:I1,LucideSquarePause:eA,LucideSquarePen:to,LucideSquarePercent:E1,LucideSquarePi:P1,LucideSquarePilcrow:j1,LucideSquarePlay:$1,LucideSquarePlus:z1,LucideSquarePower:R1,LucideSquareRadical:tA,LucideSquareRoundCorner:nA,LucideSquareScissors:T1,LucideSquareSigma:D1,LucideSquareSlash:H1,LucideSquareSplitHorizontal:O1,LucideSquareSplitVertical:F1,LucideSquareSquare:rA,LucideSquareStack:oA,LucideSquareStar:iA,LucideSquareStop:aA,LucideSquareTerminal:q1,LucideSquareUser:B1,LucideSquareUserRound:V1,LucideSquareX:U1,LucideSquaresExclude:sA,LucideSquaresIntersect:cA,LucideSquaresSubtract:lA,LucideSquaresUnite:dA,LucideSquircle:n0,LucideSquircleDashed:uA,LucideSquirrel:hA,LucideStamp:fA,LucideStar:mA,LucideStarHalf:pA,LucideStarOff:yA,LucideStars:Gl,LucideStepBack:gA,LucideStepForward:kA,LucideStethoscope:vA,LucideSticker:o0,LucideStickyNote:kh,LucideStone:xA,LucideStopCircle:yc,LucideStore:wA,LucideStretchHorizontal:bA,LucideStretchVertical:MA,LucideStrikethrough:_A,LucideSubscript:CA,LucideSubtitles:Is,LucideSun:AA,LucideSunDim:SA,LucideSunMedium:LA,LucideSunMoon:NA,LucideSunSnow:IA,LucideSunrise:EA,LucideSunset:jA,LucideSuperscript:$A,LucideSwatchBook:PA,LucideSwissFranc:zA,LucideSwitchCamera:RA,LucideSword:TA,LucideSwords:DA,LucideSyringe:HA,LucideTable:GA,LucideTable2:OA,LucideTableCellsMerge:FA,LucideTableCellsSplit:qA,LucideTableColumnsSplit:VA,LucideTableConfig:wr,LucideTableOfContents:BA,LucideTableProperties:UA,LucideTableRowsSplit:WA,LucideTablet:ZA,LucideTabletSmartphone:KA,LucideTablets:XA,LucideTag:YA,LucideTags:QA,LucideTally1:JA,LucideTally2:eE,LucideTally3:tE,LucideTally4:nE,LucideTally5:oE,LucideTangent:rE,LucideTarget:aE,LucideTelescope:iE,LucideTent:cE,LucideTentTree:sE,LucideTerminal:lE,LucideTerminalSquare:q1,LucideTestTube:dE,LucideTestTube2:W1,LucideTestTubeDiagonal:W1,LucideTestTubes:uE,LucideText:Bo,LucideTextAlignCenter:ui,LucideTextAlignEnd:hi,LucideTextAlignJustify:G1,LucideTextAlignStart:Bo,LucideTextCursor:fE,LucideTextCursorInput:hE,LucideTextInitial:K1,LucideTextQuote:pE,LucideTextSearch:yE,LucideTextSelect:Z1,LucideTextSelection:Z1,LucideTextWrap:X1,LucideTheater:mE,LucideThermometer:vE,LucideThermometerSnowflake:gE,LucideThermometerSun:kE,LucideThumbsDown:xE,LucideThumbsUp:wE,LucideTicket:NE,LucideTicketCheck:ME,LucideTicketMinus:bE,LucideTicketPercent:_E,LucideTicketPlus:CE,LucideTicketSlash:SE,LucideTicketX:LE,LucideTickets:AE,LucideTicketsPlane:IE,LucideTimer:$E,LucideTimerOff:EE,LucideTimerReset:jE,LucideToggleLeft:PE,LucideToggleRight:zE,LucideToilet:RE,LucideToolCase:DE,LucideToolbox:TE,LucideTornado:HE,LucideTorus:OE,LucideTouchpad:qE,LucideTouchpadOff:FE,LucideTowerControl:VE,LucideToyBrick:BE,LucideTractor:UE,LucideTrafficCone:WE,LucideTrain:Y1,LucideTrainFront:KE,LucideTrainFrontTunnel:GE,LucideTrainTrack:ZE,LucideTramFront:Y1,LucideTransgender:XE,LucideTrash:YE,LucideTrash2:vh,LucideTreeDeciduous:QE,LucideTreePalm:Q1,LucideTreePine:JE,LucideTrees:ej,LucideTrello:tj,LucideTrendingDown:nj,LucideTrendingUp:rj,LucideTrendingUpDown:oj,LucideTriangle:sj,LucideTriangleAlert:Er,LucideTriangleDashed:aj,LucideTriangleRight:ij,LucideTrophy:cj,LucideTruck:dj,LucideTruckElectric:lj,LucideTurkishLira:uj,LucideTurntable:hj,LucideTurtle:fj,LucideTv:yj,LucideTv2:J1,LucideTvMinimal:J1,LucideTvMinimalPlay:pj,LucideTwitch:mj,LucideTwitter:gj,LucideType:r0,LucideTypeOutline:kj,LucideUmbrella:xj,LucideUmbrellaOff:vj,LucideUnderline:wj,LucideUndo:_j,LucideUndo2:Mj,LucideUndoDot:bj,LucideUnfoldHorizontal:Cj,LucideUnfoldVertical:Sj,LucideUngroup:Lj,LucideUniversity:ed,LucideUnlink:Ij,LucideUnlink2:Nj,LucideUnlock:gl,LucideUnlockKeyhole:ml,LucideUnplug:Aj,LucideUpload:xh,LucideUploadCloud:wc,LucideUsb:Ej,LucideUser:wh,LucideUser2:id,LucideUserCheck:jj,LucideUserCheck2:td,LucideUserCircle:mc,LucideUserCircle2:pc,LucideUserCog:$j,LucideUserCog2:nd,LucideUserKey:Pj,LucideUserLock:zj,LucideUserMinus:Rj,LucideUserMinus2:od,LucideUserPen:Tj,LucideUserPlus:Dj,LucideUserPlus2:rd,LucideUserRound:id,LucideUserRoundCheck:td,LucideUserRoundCog:nd,LucideUserRoundKey:Hj,LucideUserRoundMinus:od,LucideUserRoundPen:Oj,LucideUserRoundPlus:rd,LucideUserRoundSearch:Fj,LucideUserRoundX:ad,LucideUserSearch:qj,LucideUserSquare:B1,LucideUserSquare2:V1,LucideUserStar:Vj,LucideUserX:Bj,LucideUserX2:ad,LucideUsers:Uj,LucideUsers2:sd,LucideUsersRound:sd,LucideUtensils:ld,LucideUtensilsCrossed:cd,LucideUtilityPole:Wj,LucideVan:Gj,LucideVariable:Kj,LucideVault:Zj,LucideVectorSquare:Xj,LucideVegan:Yj,LucideVenetianMask:Qj,LucideVenus:e$,LucideVenusAndMars:Jj,LucideVerified:bs,LucideVibrate:n$,LucideVibrateOff:t$,LucideVideo:r$,LucideVideoOff:o$,LucideVideotape:a$,LucideView:i$,LucideVoicemail:s$,LucideVolleyball:c$,LucideVolume:f$,LucideVolume1:l$,LucideVolume2:d$,LucideVolumeOff:u$,LucideVolumeX:h$,LucideVote:p$,LucideWallet:m$,LucideWallet2:dd,LucideWalletCards:y$,LucideWalletMinimal:dd,LucideWallpaper:g$,LucideWand:k$,LucideWand2:ud,LucideWandSparkles:ud,LucideWarehouse:v$,LucideWashingMachine:x$,LucideWatch:w$,LucideWaves:C$,LucideWavesArrowDown:M$,LucideWavesArrowUp:b$,LucideWavesLadder:_$,LucideWaypoints:S$,LucideWebcam:L$,LucideWebhook:I$,LucideWebhookOff:N$,LucideWeight:E$,LucideWeightTilde:A$,LucideWheat:P$,LucideWheatOff:j$,LucideWholeWord:$$,LucideWifi:q$,LucideWifiCog:z$,LucideWifiHigh:R$,LucideWifiLow:T$,LucideWifiOff:D$,LucideWifiPen:H$,LucideWifiSync:O$,LucideWifiZero:F$,LucideWind:B$,LucideWindArrowDown:V$,LucideWine:W$,LucideWineOff:U$,LucideWorkflow:G$,LucideWorm:K$,LucideWrapText:X1,LucideWrench:Z$,LucideX:Ai,LucideXCircle:gc,LucideXOctagon:Cl,LucideXSquare:U1,LucideYoutube:X$,LucideZap:Q$,LucideZapOff:Y$,LucideZoomIn:J$,LucideZoomOut:eP,Luggage:Eb,LuggageIcon:Eb,MSquare:C1,MSquareIcon:C1,Magnet:jb,MagnetIcon:jb,Mail:Ob,MailCheck:$b,MailCheckIcon:$b,MailIcon:Ob,MailMinus:Pb,MailMinusIcon:Pb,MailOpen:zb,MailOpenIcon:zb,MailPlus:Rb,MailPlusIcon:Rb,MailQuestion:kl,MailQuestionIcon:kl,MailQuestionMark:kl,MailQuestionMarkIcon:kl,MailSearch:Tb,MailSearchIcon:Tb,MailWarning:Db,MailWarningIcon:Db,MailX:Hb,MailXIcon:Hb,Mailbox:qb,MailboxIcon:qb,Mails:Fb,MailsIcon:Fb,Map:o9,MapIcon:o9,MapMinus:Vb,MapMinusIcon:Vb,MapPin:e9,MapPinCheck:Ub,MapPinCheckIcon:Ub,MapPinCheckInside:Bb,MapPinCheckInsideIcon:Bb,MapPinHouse:Wb,MapPinHouseIcon:Wb,MapPinIcon:e9,MapPinMinus:Kb,MapPinMinusIcon:Kb,MapPinMinusInside:Gb,MapPinMinusInsideIcon:Gb,MapPinOff:Zb,MapPinOffIcon:Zb,MapPinPen:vl,MapPinPenIcon:vl,MapPinPlus:Yb,MapPinPlusIcon:Yb,MapPinPlusInside:Xb,MapPinPlusInsideIcon:Xb,MapPinX:Qb,MapPinXIcon:Qb,MapPinXInside:Jb,MapPinXInsideIcon:Jb,MapPinned:t9,MapPinnedIcon:t9,MapPlus:n9,MapPlusIcon:n9,Mars:a9,MarsIcon:a9,MarsStroke:r9,MarsStrokeIcon:r9,Martini:i9,MartiniIcon:i9,Maximize:s9,Maximize2:xd,Maximize2Icon:xd,MaximizeIcon:s9,Medal:c9,MedalIcon:c9,Megaphone:d9,MegaphoneIcon:d9,MegaphoneOff:l9,MegaphoneOffIcon:l9,Meh:u9,MehIcon:u9,MemoryStick:h9,MemoryStickIcon:h9,Menu:p9,MenuIcon:p9,MenuSquare:S1,MenuSquareIcon:S1,Merge:f9,MergeIcon:f9,MessageCircle:_9,MessageCircleCode:y9,MessageCircleCodeIcon:y9,MessageCircleDashed:m9,MessageCircleDashedIcon:m9,MessageCircleHeart:g9,MessageCircleHeartIcon:g9,MessageCircleIcon:_9,MessageCircleMore:k9,MessageCircleMoreIcon:k9,MessageCircleOff:v9,MessageCircleOffIcon:v9,MessageCirclePlus:x9,MessageCirclePlusIcon:x9,MessageCircleQuestion:xl,MessageCircleQuestionIcon:xl,MessageCircleQuestionMark:xl,MessageCircleQuestionMarkIcon:xl,MessageCircleReply:w9,MessageCircleReplyIcon:w9,MessageCircleWarning:M9,MessageCircleWarningIcon:M9,MessageCircleX:b9,MessageCircleXIcon:b9,MessageSquare:O9,MessageSquareCode:C9,MessageSquareCodeIcon:C9,MessageSquareDashed:S9,MessageSquareDashedIcon:S9,MessageSquareDiff:L9,MessageSquareDiffIcon:L9,MessageSquareDot:N9,MessageSquareDotIcon:N9,MessageSquareHeart:I9,MessageSquareHeartIcon:I9,MessageSquareIcon:O9,MessageSquareLock:A9,MessageSquareLockIcon:A9,MessageSquareMore:E9,MessageSquareMoreIcon:E9,MessageSquareOff:j9,MessageSquareOffIcon:j9,MessageSquarePlus:$9,MessageSquarePlusIcon:$9,MessageSquareQuote:P9,MessageSquareQuoteIcon:P9,MessageSquareReply:z9,MessageSquareReplyIcon:z9,MessageSquareShare:R9,MessageSquareShareIcon:R9,MessageSquareText:T9,MessageSquareTextIcon:T9,MessageSquareWarning:D9,MessageSquareWarningIcon:D9,MessageSquareX:H9,MessageSquareXIcon:H9,MessagesSquare:F9,MessagesSquareIcon:F9,Mic:V9,Mic2:wl,Mic2Icon:wl,MicIcon:V9,MicOff:q9,MicOffIcon:q9,MicVocal:wl,MicVocalIcon:wl,Microchip:B9,MicrochipIcon:B9,Microscope:U9,MicroscopeIcon:U9,Microwave:W9,MicrowaveIcon:W9,Milestone:G9,MilestoneIcon:G9,Milk:Z9,MilkIcon:Z9,MilkOff:K9,MilkOffIcon:K9,Minimize:Y9,Minimize2:X9,Minimize2Icon:X9,MinimizeIcon:Y9,Minus:ih,MinusCircle:ac,MinusCircleIcon:ac,MinusIcon:ih,MinusSquare:L1,MinusSquareIcon:L1,Monitor:u_,MonitorCheck:Q9,MonitorCheckIcon:Q9,MonitorCloud:J9,MonitorCloudIcon:J9,MonitorCog:e_,MonitorCogIcon:e_,MonitorDot:t_,MonitorDotIcon:t_,MonitorDown:n_,MonitorDownIcon:n_,MonitorIcon:u_,MonitorOff:o_,MonitorOffIcon:o_,MonitorPause:r_,MonitorPauseIcon:r_,MonitorPlay:a_,MonitorPlayIcon:a_,MonitorSmartphone:i_,MonitorSmartphoneIcon:i_,MonitorSpeaker:s_,MonitorSpeakerIcon:s_,MonitorStop:c_,MonitorStopIcon:c_,MonitorUp:l_,MonitorUpIcon:l_,MonitorX:d_,MonitorXIcon:d_,Moon:f_,MoonIcon:f_,MoonStar:h_,MoonStarIcon:h_,MoreHorizontal:Nc,MoreHorizontalIcon:Nc,MoreVertical:Lc,MoreVerticalIcon:Lc,Motorbike:p_,MotorbikeIcon:p_,Mountain:m_,MountainIcon:m_,MountainSnow:y_,MountainSnowIcon:y_,Mouse:M_,MouseIcon:M_,MouseOff:g_,MouseOffIcon:g_,MousePointer:w_,MousePointer2:sh,MousePointer2Icon:sh,MousePointer2Off:k_,MousePointer2OffIcon:k_,MousePointerBan:v_,MousePointerBanIcon:v_,MousePointerClick:x_,MousePointerClickIcon:x_,MousePointerIcon:w_,MousePointerSquareDashed:g1,MousePointerSquareDashedIcon:g1,Move:P_,Move3D:Ml,Move3DIcon:Ml,Move3d:Ml,Move3dIcon:Ml,MoveDiagonal:__,MoveDiagonal2:b_,MoveDiagonal2Icon:b_,MoveDiagonalIcon:__,MoveDown:L_,MoveDownIcon:L_,MoveDownLeft:C_,MoveDownLeftIcon:C_,MoveDownRight:S_,MoveDownRightIcon:S_,MoveHorizontal:N_,MoveHorizontalIcon:N_,MoveIcon:P_,MoveLeft:ch,MoveLeftIcon:ch,MoveRight:I_,MoveRightIcon:I_,MoveUp:j_,MoveUpIcon:j_,MoveUpLeft:A_,MoveUpLeftIcon:A_,MoveUpRight:E_,MoveUpRightIcon:E_,MoveVertical:$_,MoveVerticalIcon:$_,Music:D_,Music2:z_,Music2Icon:z_,Music3:R_,Music3Icon:R_,Music4:T_,Music4Icon:T_,MusicIcon:D_,Navigation:q_,Navigation2:O_,Navigation2Icon:O_,Navigation2Off:H_,Navigation2OffIcon:H_,NavigationIcon:q_,NavigationOff:F_,NavigationOffIcon:F_,Network:V_,NetworkIcon:V_,Newspaper:B_,NewspaperIcon:B_,Nfc:U_,NfcIcon:U_,NonBinary:W_,NonBinaryIcon:W_,Notebook:X_,NotebookIcon:X_,NotebookPen:G_,NotebookPenIcon:G_,NotebookTabs:K_,NotebookTabsIcon:K_,NotebookText:Z_,NotebookTextIcon:Z_,NotepadText:Q_,NotepadTextDashed:Y_,NotepadTextDashedIcon:Y_,NotepadTextIcon:Q_,Nut:J_,NutIcon:J_,NutOff:eC,NutOffIcon:eC,Octagon:nC,OctagonAlert:bl,OctagonAlertIcon:bl,OctagonIcon:nC,OctagonMinus:tC,OctagonMinusIcon:tC,OctagonPause:_l,OctagonPauseIcon:_l,OctagonX:Cl,OctagonXIcon:Cl,Omega:oC,OmegaIcon:oC,Option:aC,OptionIcon:aC,Orbit:rC,OrbitIcon:rC,Origami:iC,OrigamiIcon:iC,Outdent:_r,OutdentIcon:_r,Package:pC,Package2:sC,Package2Icon:sC,PackageCheck:cC,PackageCheckIcon:cC,PackageIcon:pC,PackageMinus:lC,PackageMinusIcon:lC,PackageOpen:dC,PackageOpenIcon:dC,PackagePlus:uC,PackagePlusIcon:uC,PackageSearch:hC,PackageSearchIcon:hC,PackageX:fC,PackageXIcon:fC,PaintBucket:yC,PaintBucketIcon:yC,PaintRoller:mC,PaintRollerIcon:mC,Paintbrush:gC,Paintbrush2:Sl,Paintbrush2Icon:Sl,PaintbrushIcon:gC,PaintbrushVertical:Sl,PaintbrushVerticalIcon:Sl,Palette:kC,PaletteIcon:kC,Palmtree:Q1,PalmtreeIcon:Q1,Panda:vC,PandaIcon:vC,PanelBottom:wC,PanelBottomClose:xC,PanelBottomCloseIcon:xC,PanelBottomDashed:Ll,PanelBottomDashedIcon:Ll,PanelBottomIcon:wC,PanelBottomInactive:Ll,PanelBottomInactiveIcon:Ll,PanelBottomOpen:MC,PanelBottomOpenIcon:MC,PanelLeft:El,PanelLeftClose:Nl,PanelLeftCloseIcon:Nl,PanelLeftDashed:Il,PanelLeftDashedIcon:Il,PanelLeftIcon:El,PanelLeftInactive:Il,PanelLeftInactiveIcon:Il,PanelLeftOpen:Al,PanelLeftOpenIcon:Al,PanelLeftRightDashed:bC,PanelLeftRightDashedIcon:bC,PanelRight:_C,PanelRightClose:lh,PanelRightCloseIcon:lh,PanelRightDashed:jl,PanelRightDashedIcon:jl,PanelRightIcon:_C,PanelRightInactive:jl,PanelRightInactiveIcon:jl,PanelRightOpen:dh,PanelRightOpenIcon:dh,PanelTop:NC,PanelTopBottomDashed:CC,PanelTopBottomDashedIcon:CC,PanelTopClose:SC,PanelTopCloseIcon:SC,PanelTopDashed:$l,PanelTopDashedIcon:$l,PanelTopIcon:NC,PanelTopInactive:$l,PanelTopInactiveIcon:$l,PanelTopOpen:LC,PanelTopOpenIcon:LC,PanelsLeftBottom:IC,PanelsLeftBottomIcon:IC,PanelsLeftRight:di,PanelsLeftRightIcon:di,PanelsRightBottom:AC,PanelsRightBottomIcon:AC,PanelsTopBottom:Fl,PanelsTopBottomIcon:Fl,PanelsTopLeft:Pl,PanelsTopLeftIcon:Pl,Paperclip:EC,PaperclipIcon:EC,Parentheses:$C,ParenthesesIcon:$C,ParkingCircle:sc,ParkingCircleIcon:sc,ParkingCircleOff:ic,ParkingCircleOffIcon:ic,ParkingMeter:jC,ParkingMeterIcon:jC,ParkingSquare:A1,ParkingSquareIcon:A1,ParkingSquareOff:I1,ParkingSquareOffIcon:I1,PartyPopper:PC,PartyPopperIcon:PC,Pause:zC,PauseCircle:cc,PauseCircleIcon:cc,PauseIcon:zC,PauseOctagon:_l,PauseOctagonIcon:_l,PawPrint:RC,PawPrintIcon:RC,PcCase:TC,PcCaseIcon:TC,Pen:Rl,PenBox:to,PenBoxIcon:to,PenIcon:Rl,PenLine:zl,PenLineIcon:zl,PenOff:DC,PenOffIcon:DC,PenSquare:to,PenSquareIcon:to,PenTool:HC,PenToolIcon:HC,Pencil:hh,PencilIcon:hh,PencilLine:uh,PencilLineIcon:uh,PencilOff:OC,PencilOffIcon:OC,PencilRuler:FC,PencilRulerIcon:FC,Pentagon:qC,PentagonIcon:qC,Percent:VC,PercentCircle:lc,PercentCircleIcon:lc,PercentDiamond:Cc,PercentDiamondIcon:Cc,PercentIcon:VC,PercentSquare:E1,PercentSquareIcon:E1,PersonStanding:UC,PersonStandingIcon:UC,PhilippinePeso:BC,PhilippinePesoIcon:BC,Phone:QC,PhoneCall:WC,PhoneCallIcon:WC,PhoneForwarded:GC,PhoneForwardedIcon:GC,PhoneIcon:QC,PhoneIncoming:KC,PhoneIncomingIcon:KC,PhoneMissed:ZC,PhoneMissedIcon:ZC,PhoneOff:XC,PhoneOffIcon:XC,PhoneOutgoing:YC,PhoneOutgoingIcon:YC,Pi:JC,PiIcon:JC,PiSquare:P1,PiSquareIcon:P1,Piano:eS,PianoIcon:eS,Pickaxe:tS,PickaxeIcon:tS,PictureInPicture:oS,PictureInPicture2:nS,PictureInPicture2Icon:nS,PictureInPictureIcon:oS,PieChart:Fs,PieChartIcon:Fs,PiggyBank:rS,PiggyBankIcon:rS,Pilcrow:sS,PilcrowIcon:sS,PilcrowLeft:aS,PilcrowLeftIcon:aS,PilcrowRight:iS,PilcrowRightIcon:iS,PilcrowSquare:j1,PilcrowSquareIcon:j1,Pill:lS,PillBottle:cS,PillBottleIcon:cS,PillIcon:lS,Pin:uS,PinIcon:uS,PinOff:dS,PinOffIcon:dS,Pipette:hS,PipetteIcon:hS,Pizza:fS,PizzaIcon:fS,Plane:mS,PlaneIcon:mS,PlaneLanding:pS,PlaneLandingIcon:pS,PlaneTakeoff:yS,PlaneTakeoffIcon:yS,Play:wd,PlayCircle:dc,PlayCircleIcon:dc,PlayIcon:wd,PlaySquare:$1,PlaySquareIcon:$1,Plug:kS,Plug2:gS,Plug2Icon:gS,PlugIcon:kS,PlugZap:Tl,PlugZap2:Tl,PlugZap2Icon:Tl,PlugZapIcon:Tl,Plus:fh,PlusCircle:uc,PlusCircleIcon:uc,PlusIcon:fh,PlusSquare:z1,PlusSquareIcon:z1,Pocket:xS,PocketIcon:xS,PocketKnife:vS,PocketKnifeIcon:vS,Podcast:MS,PodcastIcon:MS,Pointer:bS,PointerIcon:bS,PointerOff:wS,PointerOffIcon:wS,Popcorn:_S,PopcornIcon:_S,Popsicle:CS,PopsicleIcon:CS,PoundSterling:SS,PoundSterlingIcon:SS,Power:NS,PowerCircle:hc,PowerCircleIcon:hc,PowerIcon:NS,PowerOff:LS,PowerOffIcon:LS,PowerSquare:R1,PowerSquareIcon:R1,Presentation:IS,PresentationIcon:IS,Printer:jS,PrinterCheck:AS,PrinterCheckIcon:AS,PrinterIcon:jS,PrinterX:ES,PrinterXIcon:ES,Projector:PS,ProjectorIcon:PS,Proportions:$S,ProportionsIcon:$S,Puzzle:zS,PuzzleIcon:zS,Pyramid:RS,PyramidIcon:RS,QrCode:TS,QrCodeIcon:TS,Quote:DS,QuoteIcon:DS,Rabbit:HS,RabbitIcon:HS,Radar:OS,RadarIcon:OS,Radiation:FS,RadiationIcon:FS,Radical:qS,RadicalIcon:qS,Radio:US,RadioIcon:US,RadioReceiver:VS,RadioReceiverIcon:VS,RadioTower:BS,RadioTowerIcon:BS,Radius:WS,RadiusIcon:WS,RailSymbol:GS,RailSymbolIcon:GS,Rainbow:KS,RainbowIcon:KS,Rat:ZS,RatIcon:ZS,Ratio:XS,RatioIcon:XS,Receipt:iL,ReceiptCent:YS,ReceiptCentIcon:YS,ReceiptEuro:QS,ReceiptEuroIcon:QS,ReceiptIcon:iL,ReceiptIndianRupee:JS,ReceiptIndianRupeeIcon:JS,ReceiptJapaneseYen:eL,ReceiptJapaneseYenIcon:eL,ReceiptPoundSterling:tL,ReceiptPoundSterlingIcon:tL,ReceiptRussianRuble:nL,ReceiptRussianRubleIcon:nL,ReceiptSwissFranc:oL,ReceiptSwissFrancIcon:oL,ReceiptText:rL,ReceiptTextIcon:rL,ReceiptTurkishLira:aL,ReceiptTurkishLiraIcon:aL,RectangleCircle:sL,RectangleCircleIcon:sL,RectangleEllipsis:Dl,RectangleEllipsisIcon:Dl,RectangleGoggles:cL,RectangleGogglesIcon:cL,RectangleHorizontal:lL,RectangleHorizontalIcon:lL,RectangleVertical:dL,RectangleVerticalIcon:dL,Recycle:uL,RecycleIcon:uL,Redo:pL,Redo2:hL,Redo2Icon:hL,RedoDot:fL,RedoDotIcon:fL,RedoIcon:pL,RefreshCcw:gL,RefreshCcwDot:yL,RefreshCcwDotIcon:yL,RefreshCcwIcon:gL,RefreshCw:kL,RefreshCwIcon:kL,RefreshCwOff:mL,RefreshCwOffIcon:mL,Refrigerator:vL,RefrigeratorIcon:vL,Regex:xL,RegexIcon:xL,RemoveFormatting:wL,RemoveFormattingIcon:wL,Repeat:_L,Repeat1:bL,Repeat1Icon:bL,Repeat2:ML,Repeat2Icon:ML,RepeatIcon:_L,Replace:SL,ReplaceAll:CL,ReplaceAllIcon:CL,ReplaceIcon:SL,Reply:NL,ReplyAll:LL,ReplyAllIcon:LL,ReplyIcon:NL,Rewind:IL,RewindIcon:IL,Ribbon:EL,RibbonIcon:EL,Rocket:AL,RocketIcon:AL,RockingChair:jL,RockingChairIcon:jL,RollerCoaster:$L,RollerCoasterIcon:$L,Rose:PL,RoseIcon:PL,Rotate3D:Hl,Rotate3DIcon:Hl,Rotate3d:Hl,Rotate3dIcon:Hl,RotateCcw:TL,RotateCcwIcon:TL,RotateCcwKey:zL,RotateCcwKeyIcon:zL,RotateCcwSquare:RL,RotateCcwSquareIcon:RL,RotateCw:HL,RotateCwIcon:HL,RotateCwSquare:DL,RotateCwSquareIcon:DL,Route:FL,RouteIcon:FL,RouteOff:OL,RouteOffIcon:OL,Router:qL,RouterIcon:qL,Rows:Ol,Rows2:Ol,Rows2Icon:Ol,Rows3:Fl,Rows3Icon:Fl,Rows4:VL,Rows4Icon:VL,RowsIcon:Ol,Rss:BL,RssIcon:BL,Ruler:WL,RulerDimensionLine:UL,RulerDimensionLineIcon:UL,RulerIcon:WL,RussianRuble:GL,RussianRubleIcon:GL,Sailboat:KL,SailboatIcon:KL,Salad:ZL,SaladIcon:ZL,Sandwich:XL,SandwichIcon:XL,Satellite:QL,SatelliteDish:YL,SatelliteDishIcon:YL,SatelliteIcon:QL,SaudiRiyal:JL,SaudiRiyalIcon:JL,Save:nN,SaveAll:eN,SaveAllIcon:eN,SaveIcon:nN,SaveOff:tN,SaveOffIcon:tN,Scale:oN,Scale3D:ql,Scale3DIcon:ql,Scale3d:ql,Scale3dIcon:ql,ScaleIcon:oN,Scaling:rN,ScalingIcon:rN,Scan:fN,ScanBarcode:aN,ScanBarcodeIcon:aN,ScanEye:iN,ScanEyeIcon:iN,ScanFace:sN,ScanFaceIcon:sN,ScanHeart:cN,ScanHeartIcon:cN,ScanIcon:fN,ScanLine:lN,ScanLineIcon:lN,ScanQrCode:dN,ScanQrCodeIcon:dN,ScanSearch:uN,ScanSearchIcon:uN,ScanText:hN,ScanTextIcon:hN,ScatterChart:qs,ScatterChartIcon:qs,School:pN,School2:ed,School2Icon:ed,SchoolIcon:pN,Scissors:gN,ScissorsIcon:gN,ScissorsLineDashed:yN,ScissorsLineDashedIcon:yN,ScissorsSquare:T1,ScissorsSquareDashedBottom:c1,ScissorsSquareDashedBottomIcon:c1,ScissorsSquareIcon:T1,Scooter:mN,ScooterIcon:mN,ScreenShare:vN,ScreenShareIcon:vN,ScreenShareOff:kN,ScreenShareOffIcon:kN,Scroll:wN,ScrollIcon:wN,ScrollText:xN,ScrollTextIcon:xN,Search:ph,SearchAlert:MN,SearchAlertIcon:MN,SearchCheck:bN,SearchCheckIcon:bN,SearchCode:_N,SearchCodeIcon:_N,SearchIcon:ph,SearchSlash:CN,SearchSlashIcon:CN,SearchX:SN,SearchXIcon:SN,Section:LN,SectionIcon:LN,Send:IN,SendHorizonal:Vl,SendHorizonalIcon:Vl,SendHorizontal:Vl,SendHorizontalIcon:Vl,SendIcon:IN,SendToBack:NN,SendToBackIcon:NN,SeparatorHorizontal:EN,SeparatorHorizontalIcon:EN,SeparatorVertical:AN,SeparatorVerticalIcon:AN,Server:yh,ServerCog:jN,ServerCogIcon:jN,ServerCrash:$N,ServerCrashIcon:$N,ServerIcon:yh,ServerOff:PN,ServerOffIcon:PN,Settings:RN,Settings2:zN,Settings2Icon:zN,SettingsIcon:RN,Shapes:mh,ShapesIcon:mh,Share:TN,Share2:gh,Share2Icon:gh,ShareIcon:TN,Sheet:DN,SheetIcon:DN,Shell:HN,ShellIcon:HN,Shield:ZN,ShieldAlert:ON,ShieldAlertIcon:ON,ShieldBan:FN,ShieldBanIcon:FN,ShieldCheck:qN,ShieldCheckIcon:qN,ShieldClose:Ul,ShieldCloseIcon:Ul,ShieldEllipsis:VN,ShieldEllipsisIcon:VN,ShieldHalf:BN,ShieldHalfIcon:BN,ShieldIcon:ZN,ShieldMinus:UN,ShieldMinusIcon:UN,ShieldOff:WN,ShieldOffIcon:WN,ShieldPlus:GN,ShieldPlusIcon:GN,ShieldQuestion:Bl,ShieldQuestionIcon:Bl,ShieldQuestionMark:Bl,ShieldQuestionMarkIcon:Bl,ShieldUser:KN,ShieldUserIcon:KN,ShieldX:Ul,ShieldXIcon:Ul,Ship:QN,ShipIcon:QN,ShipWheel:XN,ShipWheelIcon:XN,Shirt:YN,ShirtIcon:YN,ShoppingBag:eI,ShoppingBagIcon:eI,ShoppingBasket:JN,ShoppingBasketIcon:JN,ShoppingCart:tI,ShoppingCartIcon:tI,Shovel:nI,ShovelIcon:nI,ShowerHead:oI,ShowerHeadIcon:oI,Shredder:rI,ShredderIcon:rI,Shrimp:aI,ShrimpIcon:aI,Shrink:iI,ShrinkIcon:iI,Shrub:sI,ShrubIcon:sI,Shuffle:cI,ShuffleIcon:cI,Sidebar:El,SidebarClose:Nl,SidebarCloseIcon:Nl,SidebarIcon:El,SidebarOpen:Al,SidebarOpenIcon:Al,Sigma:lI,SigmaIcon:lI,SigmaSquare:D1,SigmaSquareIcon:D1,Signal:pI,SignalHigh:dI,SignalHighIcon:dI,SignalIcon:pI,SignalLow:uI,SignalLowIcon:uI,SignalMedium:hI,SignalMediumIcon:hI,SignalZero:fI,SignalZeroIcon:fI,Signature:yI,SignatureIcon:yI,Signpost:gI,SignpostBig:mI,SignpostBigIcon:mI,SignpostIcon:gI,Siren:kI,SirenIcon:kI,SkipBack:vI,SkipBackIcon:vI,SkipForward:xI,SkipForwardIcon:xI,Skull:wI,SkullIcon:wI,Slack:MI,SlackIcon:MI,Slash:bI,SlashIcon:bI,SlashSquare:H1,SlashSquareIcon:H1,Slice:_I,SliceIcon:_I,Sliders:Wl,SlidersHorizontal:CI,SlidersHorizontalIcon:CI,SlidersIcon:Wl,SlidersVertical:Wl,SlidersVerticalIcon:Wl,Smartphone:NI,SmartphoneCharging:SI,SmartphoneChargingIcon:SI,SmartphoneIcon:NI,SmartphoneNfc:LI,SmartphoneNfcIcon:LI,Smile:AI,SmileIcon:AI,SmilePlus:II,SmilePlusIcon:II,Snail:EI,SnailIcon:EI,Snowflake:jI,SnowflakeIcon:jI,SoapDispenserDroplet:$I,SoapDispenserDropletIcon:$I,Sofa:PI,SofaIcon:PI,SolarPanel:zI,SolarPanelIcon:zI,SortAsc:xs,SortAscIcon:xs,SortDesc:gs,SortDescIcon:gs,Soup:RI,SoupIcon:RI,Space:TI,SpaceIcon:TI,Spade:DI,SpadeIcon:DI,Sparkle:HI,SparkleIcon:HI,Sparkles:Gl,SparklesIcon:Gl,Speaker:OI,SpeakerIcon:OI,Speech:FI,SpeechIcon:FI,SpellCheck:VI,SpellCheck2:qI,SpellCheck2Icon:qI,SpellCheckIcon:VI,Spline:BI,SplineIcon:BI,SplinePointer:UI,SplinePointerIcon:UI,Split:WI,SplitIcon:WI,SplitSquareHorizontal:O1,SplitSquareHorizontalIcon:O1,SplitSquareVertical:F1,SplitSquareVerticalIcon:F1,Spool:GI,SpoolIcon:GI,Spotlight:KI,SpotlightIcon:KI,SprayCan:ZI,SprayCanIcon:ZI,Sprout:XI,SproutIcon:XI,Square:t0,SquareActivity:Kl,SquareActivityIcon:Kl,SquareArrowDown:Yl,SquareArrowDownIcon:Yl,SquareArrowDownLeft:Zl,SquareArrowDownLeftIcon:Zl,SquareArrowDownRight:Xl,SquareArrowDownRightIcon:Xl,SquareArrowLeft:Ql,SquareArrowLeftIcon:Ql,SquareArrowOutDownLeft:Jl,SquareArrowOutDownLeftIcon:Jl,SquareArrowOutDownRight:e1,SquareArrowOutDownRightIcon:e1,SquareArrowOutUpLeft:t1,SquareArrowOutUpLeftIcon:t1,SquareArrowOutUpRight:n1,SquareArrowOutUpRightIcon:n1,SquareArrowRight:o1,SquareArrowRightIcon:o1,SquareArrowUp:a1,SquareArrowUpIcon:a1,SquareArrowUpLeft:r1,SquareArrowUpLeftIcon:r1,SquareArrowUpRight:s1,SquareArrowUpRightIcon:s1,SquareAsterisk:i1,SquareAsteriskIcon:i1,SquareBottomDashedScissors:c1,SquareBottomDashedScissorsIcon:c1,SquareChartGantt:Sr,SquareChartGanttIcon:Sr,SquareCheck:d1,SquareCheckBig:l1,SquareCheckBigIcon:l1,SquareCheckIcon:d1,SquareChevronDown:u1,SquareChevronDownIcon:u1,SquareChevronLeft:h1,SquareChevronLeftIcon:h1,SquareChevronRight:p1,SquareChevronRightIcon:p1,SquareChevronUp:f1,SquareChevronUpIcon:f1,SquareCode:y1,SquareCodeIcon:y1,SquareDashed:k1,SquareDashedBottom:QI,SquareDashedBottomCode:YI,SquareDashedBottomCodeIcon:YI,SquareDashedBottomIcon:QI,SquareDashedIcon:k1,SquareDashedKanban:m1,SquareDashedKanbanIcon:m1,SquareDashedMousePointer:g1,SquareDashedMousePointerIcon:g1,SquareDashedTopSolid:JI,SquareDashedTopSolidIcon:JI,SquareDivide:v1,SquareDivideIcon:v1,SquareDot:x1,SquareDotIcon:x1,SquareEqual:w1,SquareEqualIcon:w1,SquareFunction:M1,SquareFunctionIcon:M1,SquareGanttChart:Sr,SquareGanttChartIcon:Sr,SquareIcon:t0,SquareKanban:b1,SquareKanbanIcon:b1,SquareLibrary:_1,SquareLibraryIcon:_1,SquareM:C1,SquareMIcon:C1,SquareMenu:S1,SquareMenuIcon:S1,SquareMinus:L1,SquareMinusIcon:L1,SquareMousePointer:N1,SquareMousePointerIcon:N1,SquareParking:A1,SquareParkingIcon:A1,SquareParkingOff:I1,SquareParkingOffIcon:I1,SquarePause:eA,SquarePauseIcon:eA,SquarePen:to,SquarePenIcon:to,SquarePercent:E1,SquarePercentIcon:E1,SquarePi:P1,SquarePiIcon:P1,SquarePilcrow:j1,SquarePilcrowIcon:j1,SquarePlay:$1,SquarePlayIcon:$1,SquarePlus:z1,SquarePlusIcon:z1,SquarePower:R1,SquarePowerIcon:R1,SquareRadical:tA,SquareRadicalIcon:tA,SquareRoundCorner:nA,SquareRoundCornerIcon:nA,SquareScissors:T1,SquareScissorsIcon:T1,SquareSigma:D1,SquareSigmaIcon:D1,SquareSlash:H1,SquareSlashIcon:H1,SquareSplitHorizontal:O1,SquareSplitHorizontalIcon:O1,SquareSplitVertical:F1,SquareSplitVerticalIcon:F1,SquareSquare:rA,SquareSquareIcon:rA,SquareStack:oA,SquareStackIcon:oA,SquareStar:iA,SquareStarIcon:iA,SquareStop:aA,SquareStopIcon:aA,SquareTerminal:q1,SquareTerminalIcon:q1,SquareUser:B1,SquareUserIcon:B1,SquareUserRound:V1,SquareUserRoundIcon:V1,SquareX:U1,SquareXIcon:U1,SquaresExclude:sA,SquaresExcludeIcon:sA,SquaresIntersect:cA,SquaresIntersectIcon:cA,SquaresSubtract:lA,SquaresSubtractIcon:lA,SquaresUnite:dA,SquaresUniteIcon:dA,Squircle:n0,SquircleDashed:uA,SquircleDashedIcon:uA,SquircleIcon:n0,Squirrel:hA,SquirrelIcon:hA,Stamp:fA,StampIcon:fA,Star:mA,StarHalf:pA,StarHalfIcon:pA,StarIcon:mA,StarOff:yA,StarOffIcon:yA,Stars:Gl,StarsIcon:Gl,StepBack:gA,StepBackIcon:gA,StepForward:kA,StepForwardIcon:kA,Stethoscope:vA,StethoscopeIcon:vA,Sticker:o0,StickerIcon:o0,StickyNote:kh,StickyNoteIcon:kh,Stone:xA,StoneIcon:xA,StopCircle:yc,StopCircleIcon:yc,Store:wA,StoreIcon:wA,StretchHorizontal:bA,StretchHorizontalIcon:bA,StretchVertical:MA,StretchVerticalIcon:MA,Strikethrough:_A,StrikethroughIcon:_A,Subscript:CA,SubscriptIcon:CA,Subtitles:Is,SubtitlesIcon:Is,Sun:AA,SunDim:SA,SunDimIcon:SA,SunIcon:AA,SunMedium:LA,SunMediumIcon:LA,SunMoon:NA,SunMoonIcon:NA,SunSnow:IA,SunSnowIcon:IA,Sunrise:EA,SunriseIcon:EA,Sunset:jA,SunsetIcon:jA,Superscript:$A,SuperscriptIcon:$A,SwatchBook:PA,SwatchBookIcon:PA,SwissFranc:zA,SwissFrancIcon:zA,SwitchCamera:RA,SwitchCameraIcon:RA,Sword:TA,SwordIcon:TA,Swords:DA,SwordsIcon:DA,Syringe:HA,SyringeIcon:HA,Table:GA,Table2:OA,Table2Icon:OA,TableCellsMerge:FA,TableCellsMergeIcon:FA,TableCellsSplit:qA,TableCellsSplitIcon:qA,TableColumnsSplit:VA,TableColumnsSplitIcon:VA,TableConfig:wr,TableConfigIcon:wr,TableIcon:GA,TableOfContents:BA,TableOfContentsIcon:BA,TableProperties:UA,TablePropertiesIcon:UA,TableRowsSplit:WA,TableRowsSplitIcon:WA,Tablet:ZA,TabletIcon:ZA,TabletSmartphone:KA,TabletSmartphoneIcon:KA,Tablets:XA,TabletsIcon:XA,Tag:YA,TagIcon:YA,Tags:QA,TagsIcon:QA,Tally1:JA,Tally1Icon:JA,Tally2:eE,Tally2Icon:eE,Tally3:tE,Tally3Icon:tE,Tally4:nE,Tally4Icon:nE,Tally5:oE,Tally5Icon:oE,Tangent:rE,TangentIcon:rE,Target:aE,TargetIcon:aE,Telescope:iE,TelescopeIcon:iE,Tent:cE,TentIcon:cE,TentTree:sE,TentTreeIcon:sE,Terminal:lE,TerminalIcon:lE,TerminalSquare:q1,TerminalSquareIcon:q1,TestTube:dE,TestTube2:W1,TestTube2Icon:W1,TestTubeDiagonal:W1,TestTubeDiagonalIcon:W1,TestTubeIcon:dE,TestTubes:uE,TestTubesIcon:uE,Text:Bo,TextAlignCenter:ui,TextAlignCenterIcon:ui,TextAlignEnd:hi,TextAlignEndIcon:hi,TextAlignJustify:G1,TextAlignJustifyIcon:G1,TextAlignStart:Bo,TextAlignStartIcon:Bo,TextCursor:fE,TextCursorIcon:fE,TextCursorInput:hE,TextCursorInputIcon:hE,TextIcon:Bo,TextInitial:K1,TextInitialIcon:K1,TextQuote:pE,TextQuoteIcon:pE,TextSearch:yE,TextSearchIcon:yE,TextSelect:Z1,TextSelectIcon:Z1,TextSelection:Z1,TextSelectionIcon:Z1,TextWrap:X1,TextWrapIcon:X1,Theater:mE,TheaterIcon:mE,Thermometer:vE,ThermometerIcon:vE,ThermometerSnowflake:gE,ThermometerSnowflakeIcon:gE,ThermometerSun:kE,ThermometerSunIcon:kE,ThumbsDown:xE,ThumbsDownIcon:xE,ThumbsUp:wE,ThumbsUpIcon:wE,Ticket:NE,TicketCheck:ME,TicketCheckIcon:ME,TicketIcon:NE,TicketMinus:bE,TicketMinusIcon:bE,TicketPercent:_E,TicketPercentIcon:_E,TicketPlus:CE,TicketPlusIcon:CE,TicketSlash:SE,TicketSlashIcon:SE,TicketX:LE,TicketXIcon:LE,Tickets:AE,TicketsIcon:AE,TicketsPlane:IE,TicketsPlaneIcon:IE,Timer:$E,TimerIcon:$E,TimerOff:EE,TimerOffIcon:EE,TimerReset:jE,TimerResetIcon:jE,ToggleLeft:PE,ToggleLeftIcon:PE,ToggleRight:zE,ToggleRightIcon:zE,Toilet:RE,ToiletIcon:RE,ToolCase:DE,ToolCaseIcon:DE,Toolbox:TE,ToolboxIcon:TE,Tornado:HE,TornadoIcon:HE,Torus:OE,TorusIcon:OE,Touchpad:qE,TouchpadIcon:qE,TouchpadOff:FE,TouchpadOffIcon:FE,TowerControl:VE,TowerControlIcon:VE,ToyBrick:BE,ToyBrickIcon:BE,Tractor:UE,TractorIcon:UE,TrafficCone:WE,TrafficConeIcon:WE,Train:Y1,TrainFront:KE,TrainFrontIcon:KE,TrainFrontTunnel:GE,TrainFrontTunnelIcon:GE,TrainIcon:Y1,TrainTrack:ZE,TrainTrackIcon:ZE,TramFront:Y1,TramFrontIcon:Y1,Transgender:XE,TransgenderIcon:XE,Trash:YE,Trash2:vh,Trash2Icon:vh,TrashIcon:YE,TreeDeciduous:QE,TreeDeciduousIcon:QE,TreePalm:Q1,TreePalmIcon:Q1,TreePine:JE,TreePineIcon:JE,Trees:ej,TreesIcon:ej,Trello:tj,TrelloIcon:tj,TrendingDown:nj,TrendingDownIcon:nj,TrendingUp:rj,TrendingUpDown:oj,TrendingUpDownIcon:oj,TrendingUpIcon:rj,Triangle:sj,TriangleAlert:Er,TriangleAlertIcon:Er,TriangleDashed:aj,TriangleDashedIcon:aj,TriangleIcon:sj,TriangleRight:ij,TriangleRightIcon:ij,Trophy:cj,TrophyIcon:cj,Truck:dj,TruckElectric:lj,TruckElectricIcon:lj,TruckIcon:dj,TurkishLira:uj,TurkishLiraIcon:uj,Turntable:hj,TurntableIcon:hj,Turtle:fj,TurtleIcon:fj,Tv:yj,Tv2:J1,Tv2Icon:J1,TvIcon:yj,TvMinimal:J1,TvMinimalIcon:J1,TvMinimalPlay:pj,TvMinimalPlayIcon:pj,Twitch:mj,TwitchIcon:mj,Twitter:gj,TwitterIcon:gj,Type:r0,TypeIcon:r0,TypeOutline:kj,TypeOutlineIcon:kj,Umbrella:xj,UmbrellaIcon:xj,UmbrellaOff:vj,UmbrellaOffIcon:vj,Underline:wj,UnderlineIcon:wj,Undo:_j,Undo2:Mj,Undo2Icon:Mj,UndoDot:bj,UndoDotIcon:bj,UndoIcon:_j,UnfoldHorizontal:Cj,UnfoldHorizontalIcon:Cj,UnfoldVertical:Sj,UnfoldVerticalIcon:Sj,Ungroup:Lj,UngroupIcon:Lj,University:ed,UniversityIcon:ed,Unlink:Ij,Unlink2:Nj,Unlink2Icon:Nj,UnlinkIcon:Ij,Unlock:gl,UnlockIcon:gl,UnlockKeyhole:ml,UnlockKeyholeIcon:ml,Unplug:Aj,UnplugIcon:Aj,Upload:xh,UploadCloud:wc,UploadCloudIcon:wc,UploadIcon:xh,Usb:Ej,UsbIcon:Ej,User:wh,User2:id,User2Icon:id,UserCheck:jj,UserCheck2:td,UserCheck2Icon:td,UserCheckIcon:jj,UserCircle:mc,UserCircle2:pc,UserCircle2Icon:pc,UserCircleIcon:mc,UserCog:$j,UserCog2:nd,UserCog2Icon:nd,UserCogIcon:$j,UserIcon:wh,UserKey:Pj,UserKeyIcon:Pj,UserLock:zj,UserLockIcon:zj,UserMinus:Rj,UserMinus2:od,UserMinus2Icon:od,UserMinusIcon:Rj,UserPen:Tj,UserPenIcon:Tj,UserPlus:Dj,UserPlus2:rd,UserPlus2Icon:rd,UserPlusIcon:Dj,UserRound:id,UserRoundCheck:td,UserRoundCheckIcon:td,UserRoundCog:nd,UserRoundCogIcon:nd,UserRoundIcon:id,UserRoundKey:Hj,UserRoundKeyIcon:Hj,UserRoundMinus:od,UserRoundMinusIcon:od,UserRoundPen:Oj,UserRoundPenIcon:Oj,UserRoundPlus:rd,UserRoundPlusIcon:rd,UserRoundSearch:Fj,UserRoundSearchIcon:Fj,UserRoundX:ad,UserRoundXIcon:ad,UserSearch:qj,UserSearchIcon:qj,UserSquare:B1,UserSquare2:V1,UserSquare2Icon:V1,UserSquareIcon:B1,UserStar:Vj,UserStarIcon:Vj,UserX:Bj,UserX2:ad,UserX2Icon:ad,UserXIcon:Bj,Users:Uj,Users2:sd,Users2Icon:sd,UsersIcon:Uj,UsersRound:sd,UsersRoundIcon:sd,Utensils:ld,UtensilsCrossed:cd,UtensilsCrossedIcon:cd,UtensilsIcon:ld,UtilityPole:Wj,UtilityPoleIcon:Wj,Van:Gj,VanIcon:Gj,Variable:Kj,VariableIcon:Kj,Vault:Zj,VaultIcon:Zj,VectorSquare:Xj,VectorSquareIcon:Xj,Vegan:Yj,VeganIcon:Yj,VenetianMask:Qj,VenetianMaskIcon:Qj,Venus:e$,VenusAndMars:Jj,VenusAndMarsIcon:Jj,VenusIcon:e$,Verified:bs,VerifiedIcon:bs,Vibrate:n$,VibrateIcon:n$,VibrateOff:t$,VibrateOffIcon:t$,Video:r$,VideoIcon:r$,VideoOff:o$,VideoOffIcon:o$,Videotape:a$,VideotapeIcon:a$,View:i$,ViewIcon:i$,Voicemail:s$,VoicemailIcon:s$,Volleyball:c$,VolleyballIcon:c$,Volume:f$,Volume1:l$,Volume1Icon:l$,Volume2:d$,Volume2Icon:d$,VolumeIcon:f$,VolumeOff:u$,VolumeOffIcon:u$,VolumeX:h$,VolumeXIcon:h$,Vote:p$,VoteIcon:p$,Wallet:m$,Wallet2:dd,Wallet2Icon:dd,WalletCards:y$,WalletCardsIcon:y$,WalletIcon:m$,WalletMinimal:dd,WalletMinimalIcon:dd,Wallpaper:g$,WallpaperIcon:g$,Wand:k$,Wand2:ud,Wand2Icon:ud,WandIcon:k$,WandSparkles:ud,WandSparklesIcon:ud,Warehouse:v$,WarehouseIcon:v$,WashingMachine:x$,WashingMachineIcon:x$,Watch:w$,WatchIcon:w$,Waves:C$,WavesArrowDown:M$,WavesArrowDownIcon:M$,WavesArrowUp:b$,WavesArrowUpIcon:b$,WavesIcon:C$,WavesLadder:_$,WavesLadderIcon:_$,Waypoints:S$,WaypointsIcon:S$,Webcam:L$,WebcamIcon:L$,Webhook:I$,WebhookIcon:I$,WebhookOff:N$,WebhookOffIcon:N$,Weight:E$,WeightIcon:E$,WeightTilde:A$,WeightTildeIcon:A$,Wheat:P$,WheatIcon:P$,WheatOff:j$,WheatOffIcon:j$,WholeWord:$$,WholeWordIcon:$$,Wifi:q$,WifiCog:z$,WifiCogIcon:z$,WifiHigh:R$,WifiHighIcon:R$,WifiIcon:q$,WifiLow:T$,WifiLowIcon:T$,WifiOff:D$,WifiOffIcon:D$,WifiPen:H$,WifiPenIcon:H$,WifiSync:O$,WifiSyncIcon:O$,WifiZero:F$,WifiZeroIcon:F$,Wind:B$,WindArrowDown:V$,WindArrowDownIcon:V$,WindIcon:B$,Wine:W$,WineIcon:W$,WineOff:U$,WineOffIcon:U$,Workflow:G$,WorkflowIcon:G$,Worm:K$,WormIcon:K$,WrapText:X1,WrapTextIcon:X1,Wrench:Z$,WrenchIcon:Z$,X:Ai,XCircle:gc,XCircleIcon:gc,XIcon:Ai,XOctagon:Cl,XOctagonIcon:Cl,XSquare:U1,XSquareIcon:U1,Youtube:X$,YoutubeIcon:X$,Zap:Q$,ZapIcon:Q$,ZapOff:Y$,ZapOffIcon:Y$,ZoomIn:J$,ZoomInIcon:J$,ZoomOut:eP,ZoomOutIcon:eP,createLucideIcon:d,icons:gAe},Symbol.toStringTag,{value:"Module"})),vAe=new Set(["createLucideIcon","Icon","icons","default"]),xAe=Symbol.for("react.forward_ref");function wAe(e){return typeof e=="function"?!0:e!==null&&typeof e=="object"?e.$$typeof===xAe:!1}function MAe(e){return e.replace(/[A-Z]/g,(t,n)=>n===0?t.toLowerCase():`-${t.toLowerCase()}`)}function bAe(){const e={};for(const[t,n]of Object.entries(kAe))vAe.has(t)||wAe(n)&&(e[MAe(t)]=n);return e}const Wh=bAe(),_Ae="help-circle",CAe=Object.keys(Wh).sort(),SAe=["logos:aws","logos:google-cloud","logos:microsoft-azure"],OP={lucide:CAe,aws:[],gcp:[],azure:[],iconify:[...SAe]};function kH(e){for(const t of e)t.installed?OP[t.vendor]=[...t.iconNames]:OP[t.vendor]=[]}const LAe=["aws","gcp","azure","iconify"];function CY(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}:LAe.includes(o)?{vendor:o,name:r}:null}function NAe(e){return e.vendor==="lucide"?e.name:`${e.vendor}:${e.name}`}function IAe(e,t){const n=CY(e);if(!n)return null;if(n.vendor==="lucide"){const o=Wh[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 AAe="modulepreload",EAe=function(e){return"/"+e},HB={},V0=function(t,n,o){let r=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const i=document.querySelector("meta[property=csp-nonce]"),s=(i==null?void 0:i.nonce)||(i==null?void 0:i.getAttribute("nonce"));r=Promise.allSettled(n.map(c=>{if(c=EAe(c),c in HB)return;HB[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":AAe,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 a(i){const s=new Event("vite:preloadError",{cancelable:!0});if(s.payload=i,window.dispatchEvent(s),!s.defaultPrevented)throw i}return r.then(i=>{for(const s of i||[])s.status==="rejected"&&a(s.reason);return t().catch(a)})};let yp=null;function jAe(){return yp||(yp=V0(()=>import("./iconify-MlxYu4AY.js"),[]).then(e=>e,()=>null),yp)}function SY(e,t){return f.jsx(Vo,{className:e,"aria-label":t,"aria-hidden":t===void 0?!0:void 0,"data-testid":"icon-renderer-placeholder"})}function $Ae({identifier:e,className:t,ariaLabel:n,color:o}){const[r,a]=m.useState(null);if(m.useEffect(()=>{let s=!0;return jAe().then(c=>{s&&a(c)}),()=>{s=!1}},[]),!r)return SY(t,n);const i=r.Icon;return f.jsx(i,{icon:e,className:t,color:o,"aria-label":n,"aria-hidden":n===void 0?!0:void 0})}function LY({iconId:e,studioBaseUrl:t,className:n,ariaLabel:o,color:r,strokeWidth:a,absoluteStrokeWidth:i}){const s=IAe(e,{studioBaseUrl:t});if(!s)return SY(n,o);if(s.kind==="lucide"){const c=s.component;return f.jsx(c,{className:n,color:r,strokeWidth:a,absoluteStrokeWidth:i,"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($Ae,{identifier:s.identifier,className:n,ariaLabel:o,color:r})}const PAe={studioBaseUrl:""},CF=m.createContext(PAe);function zAe({value:e,children:t}){return f.jsx(CF.Provider,{value:e,children:t})}const RAe=[".png",".jpg",".jpeg",".gif",".webp",".svg"],TAe=400,vH={width:200,height:200},DAe=e=>{const t=e.lastIndexOf(".");return t>=0?e.slice(t).toLowerCase():""},HAe=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 RAe.includes(DAe(e.name))},OAe=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&&HAe(r)&&n.push(r)}return n},FAe=(e,t=TAe)=>{if(e.width<=0||e.height<=0)return{...vH};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)}},qAe=24,VAe=4,BAe=(e,t,n=qAe,o=VAe)=>{if(e.length===0)return[];const r=Math.min(e.length,Math.max(1,o)),a=Math.ceil(e.length/r),i=new Array(r).fill(0),s=new Array(a).fill(0);e.forEach((g,k)=>{const x=k%r,v=Math.floor(k/r);i[x]=Math.max(i[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]+i[g-1]+n;const l=new Array(a).fill(0);for(let g=1;g<a;g++)l[g]=l[g-1]+s[g-1]+n;const h=i.reduce((g,k)=>g+k,0)+n*(r-1),u=s.reduce((g,k)=>g+k,0)+n*(a-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]}})},UAe=async e=>{const t=OAe(e.dataTransfer);if(t.length===0||!e.rfInstance)return!1;const n=e.rfInstance.screenToFlowPosition(e.clientPos),o=await Promise.all(t.map(a=>e.computeDims(a))),r=BAe(o,n);return t.forEach((a,i)=>{e.dispatch({file:a,position:r[i],dims:o[i],originalFilename:a.name})}),!0},WAe=e=>new Promise(t=>{let n=null;const o=a=>{n&&URL.revokeObjectURL(n),t(a)};try{n=URL.createObjectURL(e)}catch{t({...vH});return}const r=new Image;r.onload=()=>{o(FAe({width:r.naturalWidth,height:r.naturalHeight}))},r.onerror=()=>{o({...vH})},r.src=n}),GAe=2048,KAe=e=>{const t=e.type.toLowerCase();return t==="image/png"||t==="image/jpeg"||t==="image/webp"},ZAe=async(e,t=GAe)=>{if(!KAe(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,a=Math.round(n.width*r),i=Math.round(n.height*r),s=document.createElement("canvas");s.width=a,s.height=i;const c=s.getContext("2d");if(!c)return n.close(),e;c.drawImage(n,0,0,a,i),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 NY(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=NY(e[t]))&&(o&&(o+=" "),o+=n)}else for(n in e)e[n]&&(o&&(o+=" "),o+=n);return o}function IY(){for(var e,t,n=0,o="",r=arguments.length;n<r;n++)(e=arguments[n])&&(t=NY(e))&&(o&&(o+=" "),o+=t);return o}const SF="-",XAe=e=>{const t=QAe(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:i=>{const s=i.split(SF);return s[0]===""&&s.length!==1&&s.shift(),AY(s,t)||YAe(i)},getConflictingClassGroupIds:(i,s)=>{const c=n[i]||[];return s&&o[i]?[...c,...o[i]]:c}}},AY=(e,t)=>{var i;if(e.length===0)return t.classGroupId;const n=e[0],o=t.nextPart.get(n),r=o?AY(e.slice(1),o):void 0;if(r)return r;if(t.validators.length===0)return;const a=e.join(SF);return(i=t.validators.find(({validator:s})=>s(a)))==null?void 0:i.classGroupId},OB=/^\[(.+)\]$/,YAe=e=>{if(OB.test(e)){const t=OB.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},QAe=e=>{const{theme:t,prefix:n}=e,o={nextPart:new Map,validators:[]};return eEe(Object.entries(e.classGroups),n).forEach(([a,i])=>{xH(i,o,a,t)}),o},xH=(e,t,n,o)=>{e.forEach(r=>{if(typeof r=="string"){const a=r===""?t:FB(t,r);a.classGroupId=n;return}if(typeof r=="function"){if(JAe(r)){xH(r(o),t,n,o);return}t.validators.push({validator:r,classGroupId:n});return}Object.entries(r).forEach(([a,i])=>{xH(i,FB(t,a),n,o)})})},FB=(e,t)=>{let n=e;return t.split(SF).forEach(o=>{n.nextPart.has(o)||n.nextPart.set(o,{nextPart:new Map,validators:[]}),n=n.nextPart.get(o)}),n},JAe=e=>e.isThemeGetter,eEe=(e,t)=>t?e.map(([n,o])=>{const r=o.map(a=>typeof a=="string"?t+a:typeof a=="object"?Object.fromEntries(Object.entries(a).map(([i,s])=>[t+i,s])):a);return[n,r]}):e,tEe=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,o=new Map;const r=(a,i)=>{n.set(a,i),t++,t>e&&(t=0,o=n,n=new Map)};return{get(a){let i=n.get(a);if(i!==void 0)return i;if((i=o.get(a))!==void 0)return r(a,i),i},set(a,i){n.has(a)?n.set(a,i):r(a,i)}}},EY="!",nEe=e=>{const{separator:t,experimentalParseClassName:n}=e,o=t.length===1,r=t[0],a=t.length,i=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+a)===t)){c.push(s.slice(h,x)),h=x+a;continue}if(v==="/"){u=x;continue}}v==="["?l++:v==="]"&&l--}const p=c.length===0?s:s.substring(h),y=p.startsWith(EY),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:i}):i},oEe=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},rEe=e=>({cache:tEe(e.cacheSize),parseClassName:nEe(e),...XAe(e)}),aEe=/\s+/,iEe=(e,t)=>{const{parseClassName:n,getClassGroupId:o,getConflictingClassGroupIds:r}=t,a=[],i=e.trim().split(aEe);let s="";for(let c=i.length-1;c>=0;c-=1){const l=i[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=oEe(h).join(":"),v=u?x+EY:x,M=v+k;if(a.includes(M))continue;a.push(M);const w=r(k,g);for(let b=0;b<w.length;++b){const C=w[b];a.push(v+C)}s=l+(s.length>0?" "+s:s)}return s};function sEe(){let e=0,t,n,o="";for(;e<arguments.length;)(t=arguments[e++])&&(n=jY(t))&&(o&&(o+=" "),o+=n);return o}const jY=e=>{if(typeof e=="string")return e;let t,n="";for(let o=0;o<e.length;o++)e[o]&&(t=jY(e[o]))&&(n&&(n+=" "),n+=t);return n};function cEe(e,...t){let n,o,r,a=i;function i(c){const l=t.reduce((h,u)=>u(h),e());return n=rEe(l),o=n.cache.get,r=n.cache.set,a=s,s(c)}function s(c){const l=o(c);if(l)return l;const h=iEe(c,n);return r(c,h),h}return function(){return a(sEe.apply(null,arguments))}}const wt=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},$Y=/^\[(?:([a-z-]+):)?(.+)\]$/i,lEe=/^\d+\/\d+$/,dEe=new Set(["px","full","screen"]),uEe=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,hEe=/\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$/,fEe=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,pEe=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,yEe=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ua=e=>a0(e)||dEe.has(e)||lEe.test(e),Ja=e=>B0(e,"length",bEe),a0=e=>!!e&&!Number.isNaN(Number(e)),MT=e=>B0(e,"number",a0),v2=e=>!!e&&Number.isInteger(Number(e)),mEe=e=>e.endsWith("%")&&a0(e.slice(0,-1)),Be=e=>$Y.test(e),ei=e=>uEe.test(e),gEe=new Set(["length","size","percentage"]),kEe=e=>B0(e,gEe,PY),vEe=e=>B0(e,"position",PY),xEe=new Set(["image","url"]),wEe=e=>B0(e,xEe,CEe),MEe=e=>B0(e,"",_Ee),x2=()=>!0,B0=(e,t,n)=>{const o=$Y.exec(e);return o?o[1]?typeof t=="string"?o[1]===t:t.has(o[1]):n(o[2]):!1},bEe=e=>hEe.test(e)&&!fEe.test(e),PY=()=>!1,_Ee=e=>pEe.test(e),CEe=e=>yEe.test(e),SEe=()=>{const e=wt("colors"),t=wt("spacing"),n=wt("blur"),o=wt("brightness"),r=wt("borderColor"),a=wt("borderRadius"),i=wt("borderSpacing"),s=wt("borderWidth"),c=wt("contrast"),l=wt("grayscale"),h=wt("hueRotate"),u=wt("invert"),p=wt("gap"),y=wt("gradientColorStops"),g=wt("gradientColorStopPositions"),k=wt("inset"),x=wt("margin"),v=wt("opacity"),M=wt("padding"),w=wt("saturate"),b=wt("scale"),C=wt("sepia"),_=wt("skew"),S=wt("space"),N=wt("translate"),P=()=>["auto","contain","none"],A=()=>["auto","hidden","clip","visible","scroll"],E=()=>["auto",Be,t],z=()=>[Be,t],W=()=>["",ua,Ja],$=()=>["auto",a0,Be],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",Be],L=()=>["auto","avoid","all","avoid-page","page","left","right","column"],V=()=>[a0,Be];return{cacheSize:500,separator:":",theme:{colors:[x2],spacing:[ua,Ja],blur:["none","",ei,Be],brightness:V(),borderColor:[e],borderRadius:["none","","full",ei,Be],borderSpacing:z(),borderWidth:W(),contrast:V(),grayscale:R(),hueRotate:V(),invert:R(),gap:z(),gradientColorStops:[e],gradientColorStopPositions:[mEe,Ja],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",Be]}],container:["container"],columns:[{columns:[ei]}],"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(),Be]}],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",v2,Be]}],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",Be]}],grow:[{grow:R()}],shrink:[{shrink:R()}],order:[{order:["first","last","none",v2,Be]}],"grid-cols":[{"grid-cols":[x2]}],"col-start-end":[{col:["auto",{span:["full",v2,Be]},Be]}],"col-start":[{"col-start":$()}],"col-end":[{"col-end":$()}],"grid-rows":[{"grid-rows":[x2]}],"row-start-end":[{row:["auto",{span:[v2,Be]},Be]}],"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",Be]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Be]}],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",Be,t]}],"min-w":[{"min-w":[Be,t,"min","max","fit"]}],"max-w":[{"max-w":[Be,t,"none","full","min","max","fit","prose",{screen:[ei]},ei]}],h:[{h:[Be,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Be,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Be,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Be,t,"auto","min","max","fit"]}],"font-size":[{text:["base",ei,Ja]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",MT]}],"font-family":[{font:[x2]}],"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",Be]}],"line-clamp":[{"line-clamp":["none",a0,MT]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",ua,Be]}],"list-image":[{"list-image":["none",Be]}],"list-style-type":[{list:["none","disc","decimal",Be]}],"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",ua,Ja]}],"underline-offset":[{"underline-offset":["auto",ua,Be]}],"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",Be]}],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",Be]}],"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(),vEe]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",kEe]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},wEe]}],"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:[a]}],"rounded-s":[{"rounded-s":[a]}],"rounded-e":[{"rounded-e":[a]}],"rounded-t":[{"rounded-t":[a]}],"rounded-r":[{"rounded-r":[a]}],"rounded-b":[{"rounded-b":[a]}],"rounded-l":[{"rounded-l":[a]}],"rounded-ss":[{"rounded-ss":[a]}],"rounded-se":[{"rounded-se":[a]}],"rounded-ee":[{"rounded-ee":[a]}],"rounded-es":[{"rounded-es":[a]}],"rounded-tl":[{"rounded-tl":[a]}],"rounded-tr":[{"rounded-tr":[a]}],"rounded-br":[{"rounded-br":[a]}],"rounded-bl":[{"rounded-bl":[a]}],"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":[ua,Be]}],"outline-w":[{outline:[ua,Ja]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:W()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[v]}],"ring-offset-w":[{"ring-offset":[ua,Ja]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",ei,MEe]}],"shadow-color":[{shadow:[x2]}],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",ei,Be]}],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":[i]}],"border-spacing-x":[{"border-spacing-x":[i]}],"border-spacing-y":[{"border-spacing-y":[i]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Be]}],duration:[{duration:V()}],ease:[{ease:["linear","in","out","in-out",Be]}],delay:[{delay:V()}],animate:[{animate:["none","spin","ping","pulse","bounce",Be]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[b]}],"scale-x":[{"scale-x":[b]}],"scale-y":[{"scale-y":[b]}],rotate:[{rotate:[v2,Be]}],"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",Be]}],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",Be]}],"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",Be]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[ua,Ja,MT]}],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"]}}},LEe=cEe(SEe);function te(...e){return LEe(IY(e))}function Ut(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=Ut(e[n]))!==""&&(t+=(t&&" ")+o);else for(let n in e)e[n]&&(t+=(t&&" ")+n);return t}var NEe={value:()=>{}};function Gz(){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 tP(n)}function tP(e){this._=e}function IEe(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}})}tP.prototype=Gz.prototype={constructor:tP,on:function(e,t){var n=this._,o=IEe(e+"",n),r,a=-1,i=o.length;if(arguments.length<2){for(;++a<i;)if((r=(e=o[a]).type)&&(r=AEe(n[r],e.name)))return r;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++a<i;)if(r=(e=o[a]).type)n[r]=qB(n[r],e.name,t);else if(t==null)for(r in n)n[r]=qB(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 tP(e)},call:function(e,t){if((r=arguments.length-2)>0)for(var n=new Array(r),o=0,r,a;o<r;++o)n[o]=arguments[o+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(a=this._[e],o=0,r=a.length;o<r;++o)a[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,a=o.length;r<a;++r)o[r].value.apply(t,n)}};function AEe(e,t){for(var n=0,o=e.length,r;n<o;++n)if((r=e[n]).name===t)return r.value}function qB(e,t,n){for(var o=0,r=e.length;o<r;++o)if(e[o].name===t){e[o]=NEe,e=e.slice(0,o).concat(e.slice(o+1));break}return n!=null&&e.push({name:t,value:n}),e}var wH="http://www.w3.org/1999/xhtml";const VB={svg:"http://www.w3.org/2000/svg",xhtml:wH,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Kz(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),VB.hasOwnProperty(t)?{space:VB[t],local:e}:e}function EEe(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===wH&&t.documentElement.namespaceURI===wH?t.createElement(e):t.createElementNS(n,e)}}function jEe(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function zY(e){var t=Kz(e);return(t.local?jEe:EEe)(t)}function $Ee(){}function LF(e){return e==null?$Ee:function(){return this.querySelector(e)}}function PEe(e){typeof e!="function"&&(e=LF(e));for(var t=this._groups,n=t.length,o=new Array(n),r=0;r<n;++r)for(var a=t[r],i=a.length,s=o[r]=new Array(i),c,l,h=0;h<i;++h)(c=a[h])&&(l=e.call(c,c.__data__,h,a))&&("__data__"in c&&(l.__data__=c.__data__),s[h]=l);return new fo(o,this._parents)}function zEe(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function REe(){return[]}function RY(e){return e==null?REe:function(){return this.querySelectorAll(e)}}function TEe(e){return function(){return zEe(e.apply(this,arguments))}}function DEe(e){typeof e=="function"?e=TEe(e):e=RY(e);for(var t=this._groups,n=t.length,o=[],r=[],a=0;a<n;++a)for(var i=t[a],s=i.length,c,l=0;l<s;++l)(c=i[l])&&(o.push(e.call(c,c.__data__,l,i)),r.push(c));return new fo(o,r)}function TY(e){return function(){return this.matches(e)}}function DY(e){return function(t){return t.matches(e)}}var HEe=Array.prototype.find;function OEe(e){return function(){return HEe.call(this.children,e)}}function FEe(){return this.firstElementChild}function qEe(e){return this.select(e==null?FEe:OEe(typeof e=="function"?e:DY(e)))}var VEe=Array.prototype.filter;function BEe(){return Array.from(this.children)}function UEe(e){return function(){return VEe.call(this.children,e)}}function WEe(e){return this.selectAll(e==null?BEe:UEe(typeof e=="function"?e:DY(e)))}function GEe(e){typeof e!="function"&&(e=TY(e));for(var t=this._groups,n=t.length,o=new Array(n),r=0;r<n;++r)for(var a=t[r],i=a.length,s=o[r]=[],c,l=0;l<i;++l)(c=a[l])&&e.call(c,c.__data__,l,a)&&s.push(c);return new fo(o,this._parents)}function HY(e){return new Array(e.length)}function KEe(){return new fo(this._enter||this._groups.map(HY),this._parents)}function FP(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}FP.prototype={constructor:FP,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 ZEe(e){return function(){return e}}function XEe(e,t,n,o,r,a){for(var i=0,s,c=t.length,l=a.length;i<l;++i)(s=t[i])?(s.__data__=a[i],o[i]=s):n[i]=new FP(e,a[i]);for(;i<c;++i)(s=t[i])&&(r[i]=s)}function YEe(e,t,n,o,r,a,i){var s,c,l=new Map,h=t.length,u=a.length,p=new Array(h),y;for(s=0;s<h;++s)(c=t[s])&&(p[s]=y=i.call(c,c.__data__,s,t)+"",l.has(y)?r[s]=c:l.set(y,c));for(s=0;s<u;++s)y=i.call(e,a[s],s,a)+"",(c=l.get(y))?(o[s]=c,c.__data__=a[s],l.delete(y)):n[s]=new FP(e,a[s]);for(s=0;s<h;++s)(c=t[s])&&l.get(p[s])===c&&(r[s]=c)}function QEe(e){return e.__data__}function JEe(e,t){if(!arguments.length)return Array.from(this,QEe);var n=t?YEe:XEe,o=this._parents,r=this._groups;typeof e!="function"&&(e=ZEe(e));for(var a=r.length,i=new Array(a),s=new Array(a),c=new Array(a),l=0;l<a;++l){var h=o[l],u=r[l],p=u.length,y=eje(e.call(h,h&&h.__data__,l,o)),g=y.length,k=s[l]=new Array(g),x=i[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 i=new fo(i,o),i._enter=s,i._exit=c,i}function eje(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function tje(){return new fo(this._exit||this._groups.map(HY),this._parents)}function nje(e,t,n){var o=this.enter(),r=this,a=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?a.remove():n(a),o&&r?o.merge(r).order():r}function oje(e){for(var t=e.selection?e.selection():e,n=this._groups,o=t._groups,r=n.length,a=o.length,i=Math.min(r,a),s=new Array(r),c=0;c<i;++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 fo(s,this._parents)}function rje(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var o=e[t],r=o.length-1,a=o[r],i;--r>=0;)(i=o[r])&&(a&&i.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(i,a),a=i);return this}function aje(e){e||(e=ije);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),a=0;a<o;++a){for(var i=n[a],s=i.length,c=r[a]=new Array(s),l,h=0;h<s;++h)(l=i[h])&&(c[h]=l);c.sort(t)}return new fo(r,this._parents).order()}function ije(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function sje(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function cje(){return Array.from(this)}function lje(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var o=e[t],r=0,a=o.length;r<a;++r){var i=o[r];if(i)return i}return null}function dje(){let e=0;for(const t of this)++e;return e}function uje(){return!this.node()}function hje(e){for(var t=this._groups,n=0,o=t.length;n<o;++n)for(var r=t[n],a=0,i=r.length,s;a<i;++a)(s=r[a])&&e.call(s,s.__data__,a,r);return this}function fje(e){return function(){this.removeAttribute(e)}}function pje(e){return function(){this.removeAttributeNS(e.space,e.local)}}function yje(e,t){return function(){this.setAttribute(e,t)}}function mje(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function gje(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function kje(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 vje(e,t){var n=Kz(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?pje:fje:typeof t=="function"?n.local?kje:gje:n.local?mje:yje)(n,t))}function OY(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function xje(e){return function(){this.style.removeProperty(e)}}function wje(e,t,n){return function(){this.style.setProperty(e,t,n)}}function Mje(e,t,n){return function(){var o=t.apply(this,arguments);o==null?this.style.removeProperty(e):this.style.setProperty(e,o,n)}}function bje(e,t,n){return arguments.length>1?this.each((t==null?xje:typeof t=="function"?Mje:wje)(e,t,n??"")):v0(this.node(),e)}function v0(e,t){return e.style.getPropertyValue(t)||OY(e).getComputedStyle(e,null).getPropertyValue(t)}function _je(e){return function(){delete this[e]}}function Cje(e,t){return function(){this[e]=t}}function Sje(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function Lje(e,t){return arguments.length>1?this.each((t==null?_je:typeof t=="function"?Sje:Cje)(e,t)):this.node()[e]}function FY(e){return e.trim().split(/^|\s+/)}function NF(e){return e.classList||new qY(e)}function qY(e){this._node=e,this._names=FY(e.getAttribute("class")||"")}qY.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 VY(e,t){for(var n=NF(e),o=-1,r=t.length;++o<r;)n.add(t[o])}function BY(e,t){for(var n=NF(e),o=-1,r=t.length;++o<r;)n.remove(t[o])}function Nje(e){return function(){VY(this,e)}}function Ije(e){return function(){BY(this,e)}}function Aje(e,t){return function(){(t.apply(this,arguments)?VY:BY)(this,e)}}function Eje(e,t){var n=FY(e+"");if(arguments.length<2){for(var o=NF(this.node()),r=-1,a=n.length;++r<a;)if(!o.contains(n[r]))return!1;return!0}return this.each((typeof t=="function"?Aje:t?Nje:Ije)(n,t))}function jje(){this.textContent=""}function $je(e){return function(){this.textContent=e}}function Pje(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function zje(e){return arguments.length?this.each(e==null?jje:(typeof e=="function"?Pje:$je)(e)):this.node().textContent}function Rje(){this.innerHTML=""}function Tje(e){return function(){this.innerHTML=e}}function Dje(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function Hje(e){return arguments.length?this.each(e==null?Rje:(typeof e=="function"?Dje:Tje)(e)):this.node().innerHTML}function Oje(){this.nextSibling&&this.parentNode.appendChild(this)}function Fje(){return this.each(Oje)}function qje(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Vje(){return this.each(qje)}function Bje(e){var t=typeof e=="function"?e:zY(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function Uje(){return null}function Wje(e,t){var n=typeof e=="function"?e:zY(e),o=t==null?Uje:typeof t=="function"?t:LF(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),o.apply(this,arguments)||null)})}function Gje(){var e=this.parentNode;e&&e.removeChild(this)}function Kje(){return this.each(Gje)}function Zje(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Xje(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Yje(e){return this.select(e?Xje:Zje)}function Qje(e){return arguments.length?this.property("__data__",e):this.node().__data__}function Jje(e){return function(t){e.call(this,t,this.__data__)}}function e$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 t$e(e){return function(){var t=this.__on;if(t){for(var n=0,o=-1,r=t.length,a;n<r;++n)a=t[n],(!e.type||a.type===e.type)&&a.name===e.name?this.removeEventListener(a.type,a.listener,a.options):t[++o]=a;++o?t.length=o:delete this.__on}}}function n$e(e,t,n){return function(){var o=this.__on,r,a=Jje(t);if(o){for(var i=0,s=o.length;i<s;++i)if((r=o[i]).type===e.type&&r.name===e.name){this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=a,r.options=n),r.value=t;return}}this.addEventListener(e.type,a,n),r={type:e.type,name:e.name,value:t,listener:a,options:n},o?o.push(r):this.__on=[r]}}function o$e(e,t,n){var o=e$e(e+""),r,a=o.length,i;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<a;++r)if((i=o[r]).type===h.type&&i.name===h.name)return h.value}return}for(s=t?n$e:t$e,r=0;r<a;++r)this.each(s(o[r],t,n));return this}function UY(e,t,n){var o=OY(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 r$e(e,t){return function(){return UY(this,e,t)}}function a$e(e,t){return function(){return UY(this,e,t.apply(this,arguments))}}function i$e(e,t){return this.each((typeof t=="function"?a$e:r$e)(e,t))}function*s$e(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var o=e[t],r=0,a=o.length,i;r<a;++r)(i=o[r])&&(yield i)}var WY=[null];function fo(e,t){this._groups=e,this._parents=t}function vf(){return new fo([[document.documentElement]],WY)}function c$e(){return this}fo.prototype=vf.prototype={constructor:fo,select:PEe,selectAll:DEe,selectChild:qEe,selectChildren:WEe,filter:GEe,data:JEe,enter:KEe,exit:tje,join:nje,merge:oje,selection:c$e,order:rje,sort:aje,call:sje,nodes:cje,node:lje,size:dje,empty:uje,each:hje,attr:vje,style:bje,property:Lje,classed:Eje,text:zje,html:Hje,raise:Fje,lower:Vje,append:Bje,insert:Wje,remove:Kje,clone:Yje,datum:Qje,on:o$e,dispatch:i$e,[Symbol.iterator]:s$e};function ao(e){return typeof e=="string"?new fo([[document.querySelector(e)]],[document.documentElement]):new fo([[e]],WY)}function l$e(e){let t;for(;t=e.sourceEvent;)e=t;return e}function Ko(e,t){if(e=l$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 d$e={passive:!1},Gh={capture:!0,passive:!1};function bT(e){e.stopImmediatePropagation()}function i0(e){e.preventDefault(),e.stopImmediatePropagation()}function GY(e){var t=e.document.documentElement,n=ao(e).on("dragstart.drag",i0,Gh);"onselectstart"in t?n.on("selectstart.drag",i0,Gh):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function KY(e,t){var n=e.document.documentElement,o=ao(e).on("dragstart.drag",null);t&&(o.on("click.drag",i0,Gh),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 mp=e=>()=>e;function MH(e,{sourceEvent:t,subject:n,target:o,identifier:r,active:a,x:i,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:a,enumerable:!0,configurable:!0},x:{value:i,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}})}MH.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function u$e(e){return!e.ctrlKey&&!e.button}function h$e(){return this.parentNode}function f$e(e,t){return t??{x:e.x,y:e.y}}function p$e(){return navigator.maxTouchPoints||"ontouchstart"in this}function ZY(){var e=u$e,t=h$e,n=f$e,o=p$e,r={},a=Gz("start","drag","end"),i=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,d$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,Gh).on("mouseup.drag",k,Gh),GY(b.view),bT(b),l=!1,s=b.clientX,c=b.clientY,_("start",b))}}function g(b){if(i0(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),KY(b.view,l),i0(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]))&&(bT(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])&&(i0(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])&&(bT(b),N("end",b,C[S]))}function w(b,C,_,S,N,P){var A=a.copy(),E=Ko(P||_,C),z,W,$;if(($=n.call(b,new MH("beforestart",{sourceEvent:_,target:p,identifier:N,active:i,x:E[0],y:E[1],dx:0,dy:0,dispatch:A}),S))!=null)return z=$.x-E[0]||0,W=$.y-E[1]||0,function T(D,O,I){var R=E,L;switch(D){case"start":r[N]=T,L=i++;break;case"end":delete r[N],--i;case"drag":E=Ko(I||O,C),L=i;break}A.call(D,b,new MH(D,{sourceEvent:O,subject:$,target:p,identifier:N,active:L,x:E[0]+z,y:E[1]+W,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:mp(!!b),p):e},p.container=function(b){return arguments.length?(t=typeof b=="function"?b:mp(b),p):t},p.subject=function(b){return arguments.length?(n=typeof b=="function"?b:mp(b),p):n},p.touchable=function(b){return arguments.length?(o=typeof b=="function"?b:mp(!!b),p):o},p.on=function(){var b=a.on.apply(a,arguments);return b===a?p:b},p.clickDistance=function(b){return arguments.length?(u=(b=+b)*b,p):Math.sqrt(u)},p}function IF(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function XY(e,t){var n=Object.create(e.prototype);for(var o in t)n[o]=t[o];return n}function xf(){}var Kh=.7,qP=1/Kh,s0="\\s*([+-]?\\d+)\\s*",Zh="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Fr="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",y$e=/^#([0-9a-f]{3,8})$/,m$e=new RegExp(`^rgb\\(${s0},${s0},${s0}\\)$`),g$e=new RegExp(`^rgb\\(${Fr},${Fr},${Fr}\\)$`),k$e=new RegExp(`^rgba\\(${s0},${s0},${s0},${Zh}\\)$`),v$e=new RegExp(`^rgba\\(${Fr},${Fr},${Fr},${Zh}\\)$`),x$e=new RegExp(`^hsl\\(${Zh},${Fr},${Fr}\\)$`),w$e=new RegExp(`^hsla\\(${Zh},${Fr},${Fr},${Zh}\\)$`),BB={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};IF(xf,Id,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:UB,formatHex:UB,formatHex8:M$e,formatHsl:b$e,formatRgb:WB,toString:WB});function UB(){return this.rgb().formatHex()}function M$e(){return this.rgb().formatHex8()}function b$e(){return YY(this).formatHsl()}function WB(){return this.rgb().formatRgb()}function Id(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=y$e.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?GB(t):n===3?new Vn(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?gp(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?gp(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=m$e.exec(e))?new Vn(t[1],t[2],t[3],1):(t=g$e.exec(e))?new Vn(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=k$e.exec(e))?gp(t[1],t[2],t[3],t[4]):(t=v$e.exec(e))?gp(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=x$e.exec(e))?XB(t[1],t[2]/100,t[3]/100,1):(t=w$e.exec(e))?XB(t[1],t[2]/100,t[3]/100,t[4]):BB.hasOwnProperty(e)?GB(BB[e]):e==="transparent"?new Vn(NaN,NaN,NaN,0):null}function GB(e){return new Vn(e>>16&255,e>>8&255,e&255,1)}function gp(e,t,n,o){return o<=0&&(e=t=n=NaN),new Vn(e,t,n,o)}function _$e(e){return e instanceof xf||(e=Id(e)),e?(e=e.rgb(),new Vn(e.r,e.g,e.b,e.opacity)):new Vn}function bH(e,t,n,o){return arguments.length===1?_$e(e):new Vn(e,t,n,o??1)}function Vn(e,t,n,o){this.r=+e,this.g=+t,this.b=+n,this.opacity=+o}IF(Vn,bH,XY(xf,{brighter(e){return e=e==null?qP:Math.pow(qP,e),new Vn(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Kh:Math.pow(Kh,e),new Vn(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Vn(Md(this.r),Md(this.g),Md(this.b),VP(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:KB,formatHex:KB,formatHex8:C$e,formatRgb:ZB,toString:ZB}));function KB(){return`#${gd(this.r)}${gd(this.g)}${gd(this.b)}`}function C$e(){return`#${gd(this.r)}${gd(this.g)}${gd(this.b)}${gd((isNaN(this.opacity)?1:this.opacity)*255)}`}function ZB(){const e=VP(this.opacity);return`${e===1?"rgb(":"rgba("}${Md(this.r)}, ${Md(this.g)}, ${Md(this.b)}${e===1?")":`, ${e})`}`}function VP(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Md(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function gd(e){return e=Md(e),(e<16?"0":"")+e.toString(16)}function XB(e,t,n,o){return o<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Yo(e,t,n,o)}function YY(e){if(e instanceof Yo)return new Yo(e.h,e.s,e.l,e.opacity);if(e instanceof xf||(e=Id(e)),!e)return new Yo;if(e instanceof Yo)return e;e=e.rgb();var t=e.r/255,n=e.g/255,o=e.b/255,r=Math.min(t,n,o),a=Math.max(t,n,o),i=NaN,s=a-r,c=(a+r)/2;return s?(t===a?i=(n-o)/s+(n<o)*6:n===a?i=(o-t)/s+2:i=(t-n)/s+4,s/=c<.5?a+r:2-a-r,i*=60):s=c>0&&c<1?0:i,new Yo(i,s,c,e.opacity)}function S$e(e,t,n,o){return arguments.length===1?YY(e):new Yo(e,t,n,o??1)}function Yo(e,t,n,o){this.h=+e,this.s=+t,this.l=+n,this.opacity=+o}IF(Yo,S$e,XY(xf,{brighter(e){return e=e==null?qP:Math.pow(qP,e),new Yo(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Kh:Math.pow(Kh,e),new Yo(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 Vn(_T(e>=240?e-240:e+120,r,o),_T(e,r,o),_T(e<120?e+240:e-120,r,o),this.opacity)},clamp(){return new Yo(YB(this.h),kp(this.s),kp(this.l),VP(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=VP(this.opacity);return`${e===1?"hsl(":"hsla("}${YB(this.h)}, ${kp(this.s)*100}%, ${kp(this.l)*100}%${e===1?")":`, ${e})`}`}}));function YB(e){return e=(e||0)%360,e<0?e+360:e}function kp(e){return Math.max(0,Math.min(1,e||0))}function _T(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 Zz=e=>()=>e;function QY(e,t){return function(n){return e+n*t}}function L$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 Uat(e,t){var n=t-e;return n?QY(e,n>180||n<-180?n-360*Math.round(n/360):n):Zz(isNaN(e)?t:e)}function N$e(e){return(e=+e)==1?JY:function(t,n){return n-t?L$e(t,n,e):Zz(isNaN(t)?n:t)}}function JY(e,t){var n=t-e;return n?QY(e,n):Zz(isNaN(e)?t:e)}const BP=function e(t){var n=N$e(t);function o(r,a){var i=n((r=bH(r)).r,(a=bH(a)).r),s=n(r.g,a.g),c=n(r.b,a.b),l=JY(r.opacity,a.opacity);return function(h){return r.r=i(h),r.g=s(h),r.b=c(h),r.opacity=l(h),r+""}}return o.gamma=e,o}(1);function I$e(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,o=t.slice(),r;return function(a){for(r=0;r<n;++r)o[r]=e[r]*(1-a)+t[r]*a;return o}}function A$e(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function E$e(e,t){var n=t?t.length:0,o=e?Math.min(n,e.length):0,r=new Array(o),a=new Array(n),i;for(i=0;i<o;++i)r[i]=Mh(e[i],t[i]);for(;i<n;++i)a[i]=t[i];return function(s){for(i=0;i<o;++i)a[i]=r[i](s);return a}}function j$e(e,t){var n=new Date;return e=+e,t=+t,function(o){return n.setTime(e*(1-o)+t*o),n}}function jr(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function $$e(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]=Mh(e[r],t[r]):o[r]=t[r];return function(a){for(r in n)o[r]=n[r](a);return o}}var _H=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,CT=new RegExp(_H.source,"g");function P$e(e){return function(){return e}}function z$e(e){return function(t){return e(t)+""}}function eQ(e,t){var n=_H.lastIndex=CT.lastIndex=0,o,r,a,i=-1,s=[],c=[];for(e=e+"",t=t+"";(o=_H.exec(e))&&(r=CT.exec(t));)(a=r.index)>n&&(a=t.slice(n,a),s[i]?s[i]+=a:s[++i]=a),(o=o[0])===(r=r[0])?s[i]?s[i]+=r:s[++i]=r:(s[++i]=null,c.push({i,x:jr(o,r)})),n=CT.lastIndex;return n<t.length&&(a=t.slice(n),s[i]?s[i]+=a:s[++i]=a),s.length<2?c[0]?z$e(c[0].x):P$e(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 Mh(e,t){var n=typeof t,o;return t==null||n==="boolean"?Zz(t):(n==="number"?jr:n==="string"?(o=Id(t))?(t=o,BP):eQ:t instanceof Id?BP:t instanceof Date?j$e:A$e(t)?I$e:Array.isArray(t)?E$e:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?$$e:jr)(e,t)}var QB=180/Math.PI,CH={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function tQ(e,t,n,o,r,a){var i,s,c;return(i=Math.sqrt(e*e+t*t))&&(e/=i,t/=i),(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,i=-i),{translateX:r,translateY:a,rotate:Math.atan2(t,e)*QB,skewX:Math.atan(c)*QB,scaleX:i,scaleY:s}}var vp;function R$e(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?CH:tQ(t.a,t.b,t.c,t.d,t.e,t.f)}function T$e(e){return e==null||(vp||(vp=document.createElementNS("http://www.w3.org/2000/svg","g")),vp.setAttribute("transform",e),!(e=vp.transform.baseVal.consolidate()))?CH:(e=e.matrix,tQ(e.a,e.b,e.c,e.d,e.e,e.f))}function nQ(e,t,n,o){function r(l){return l.length?l.pop()+" ":""}function a(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:jr(l,u)},{i:k-2,x:jr(h,p)})}else(u||p)&&y.push("translate("+u+t+p+n)}function i(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:jr(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:jr(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:jr(l,u)},{i:k-2,x:jr(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),a(l.translateX,l.translateY,h.translateX,h.translateY,u,p),i(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 D$e=nQ(R$e,"px, ","px)","deg)"),H$e=nQ(T$e,", ",")",")"),O$e=1e-12;function JB(e){return((e=Math.exp(e))+1/e)/2}function F$e(e){return((e=Math.exp(e))-1/e)/2}function q$e(e){return((e=Math.exp(2*e))-1)/(e+1)}const nP=function e(t,n,o){function r(a,i){var s=a[0],c=a[1],l=a[2],h=i[0],u=i[1],p=i[2],y=h-s,g=u-c,k=y*y+g*g,x,v;if(k<O$e)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=JB(C),A=l/(n*M)*(P*q$e(t*N+C)-F$e(C));return[s+A*y,c+A*g,l*P/JB(t*N+C)]}}return x.duration=v*1e3*t/Math.SQRT2,x}return r.rho=function(a){var i=Math.max(.001,+a),s=i*i,c=s*s;return e(i,s,c)},r}(Math.SQRT2,2,4);var x0=0,E2=0,w2=0,oQ=1e3,UP,j2,WP=0,Ad=0,Xz=0,Xh=typeof performance=="object"&&performance.now?performance:Date,rQ=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function AF(){return Ad||(rQ(V$e),Ad=Xh.now()+Xz)}function V$e(){Ad=0}function GP(){this._call=this._time=this._next=null}GP.prototype=aQ.prototype={constructor:GP,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?AF():+n)+(t==null?0:+t),!this._next&&j2!==this&&(j2?j2._next=this:UP=this,j2=this),this._call=e,this._time=n,SH()},stop:function(){this._call&&(this._call=null,this._time=1/0,SH())}};function aQ(e,t,n){var o=new GP;return o.restart(e,t,n),o}function B$e(){AF(),++x0;for(var e=UP,t;e;)(t=Ad-e._time)>=0&&e._call.call(void 0,t),e=e._next;--x0}function eU(){Ad=(WP=Xh.now())+Xz,x0=E2=0;try{B$e()}finally{x0=0,W$e(),Ad=0}}function U$e(){var e=Xh.now(),t=e-WP;t>oQ&&(Xz-=t,WP=e)}function W$e(){for(var e,t=UP,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:UP=n);j2=e,SH(o)}function SH(e){if(!x0){E2&&(E2=clearTimeout(E2));var t=e-Ad;t>24?(e<1/0&&(E2=setTimeout(eU,e-Xh.now()-Xz)),w2&&(w2=clearInterval(w2))):(w2||(WP=Xh.now(),w2=setInterval(U$e,oQ)),x0=1,rQ(eU))}}function tU(e,t,n){var o=new GP;return t=t==null?0:+t,o.restart(r=>{o.stop(),e(r+t)},t,n),o}var G$e=Gz("start","end","cancel","interrupt"),K$e=[],iQ=0,nU=1,LH=2,oP=3,oU=4,NH=5,rP=6;function Yz(e,t,n,o,r,a){var i=e.__transition;if(!i)e.__transition={};else if(n in i)return;Z$e(e,n,{name:t,index:o,group:r,on:G$e,tween:K$e,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:iQ})}function EF(e,t){var n=cr(e,t);if(n.state>iQ)throw new Error("too late; already scheduled");return n}function Kr(e,t){var n=cr(e,t);if(n.state>oP)throw new Error("too late; already running");return n}function cr(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function Z$e(e,t,n){var o=e.__transition,r;o[t]=n,n.timer=aQ(a,0,n.time);function a(l){n.state=nU,n.timer.restart(i,n.delay,n.time),n.delay<=l&&i(l-n.delay)}function i(l){var h,u,p,y;if(n.state!==nU)return c();for(h in o)if(y=o[h],y.name===n.name){if(y.state===oP)return tU(i);y.state===oU?(y.state=rP,y.timer.stop(),y.on.call("interrupt",e,e.__data__,y.index,y.group),delete o[h]):+h<t&&(y.state=rP,y.timer.stop(),y.on.call("cancel",e,e.__data__,y.index,y.group),delete o[h])}if(tU(function(){n.state===oP&&(n.state=oU,n.timer.restart(s,n.delay,n.time),s(l))}),n.state=LH,n.on.call("start",e,e.__data__,n.index,n.group),n.state===LH){for(n.state=oP,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=NH,1),u=-1,p=r.length;++u<p;)r[u].call(e,h);n.state===NH&&(n.on.call("end",e,e.__data__,n.index,n.group),c())}function c(){n.state=rP,n.timer.stop(),delete o[t];for(var l in o)return;delete e.__transition}}function aP(e,t){var n=e.__transition,o,r,a=!0,i;if(n){t=t==null?null:t+"";for(i in n){if((o=n[i]).name!==t){a=!1;continue}r=o.state>LH&&o.state<NH,o.state=rP,o.timer.stop(),o.on.call(r?"interrupt":"cancel",e,e.__data__,o.index,o.group),delete n[i]}a&&delete e.__transition}}function X$e(e){return this.each(function(){aP(this,e)})}function Y$e(e,t){var n,o;return function(){var r=Kr(this,e),a=r.tween;if(a!==n){o=n=a;for(var i=0,s=o.length;i<s;++i)if(o[i].name===t){o=o.slice(),o.splice(i,1);break}}r.tween=o}}function Q$e(e,t,n){var o,r;if(typeof n!="function")throw new Error;return function(){var a=Kr(this,e),i=a.tween;if(i!==o){r=(o=i).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)}a.tween=r}}function J$e(e,t){var n=this._id;if(e+="",arguments.length<2){for(var o=cr(this.node(),n).tween,r=0,a=o.length,i;r<a;++r)if((i=o[r]).name===e)return i.value;return null}return this.each((t==null?Y$e:Q$e)(n,e,t))}function jF(e,t,n){var o=e._id;return e.each(function(){var r=Kr(this,o);(r.value||(r.value={}))[t]=n.apply(this,arguments)}),function(r){return cr(r,o).value[t]}}function sQ(e,t){var n;return(typeof t=="number"?jr:t instanceof Id?BP:(n=Id(t))?(t=n,BP):eQ)(e,t)}function ePe(e){return function(){this.removeAttribute(e)}}function tPe(e){return function(){this.removeAttributeNS(e.space,e.local)}}function nPe(e,t,n){var o,r=n+"",a;return function(){var i=this.getAttribute(e);return i===r?null:i===o?a:a=t(o=i,n)}}function oPe(e,t,n){var o,r=n+"",a;return function(){var i=this.getAttributeNS(e.space,e.local);return i===r?null:i===o?a:a=t(o=i,n)}}function rPe(e,t,n){var o,r,a;return function(){var i,s=n(this),c;return s==null?void this.removeAttribute(e):(i=this.getAttribute(e),c=s+"",i===c?null:i===o&&c===r?a:(r=c,a=t(o=i,s)))}}function aPe(e,t,n){var o,r,a;return function(){var i,s=n(this),c;return s==null?void this.removeAttributeNS(e.space,e.local):(i=this.getAttributeNS(e.space,e.local),c=s+"",i===c?null:i===o&&c===r?a:(r=c,a=t(o=i,s)))}}function iPe(e,t){var n=Kz(e),o=n==="transform"?H$e:sQ;return this.attrTween(e,typeof t=="function"?(n.local?aPe:rPe)(n,o,jF(this,"attr."+e,t)):t==null?(n.local?tPe:ePe)(n):(n.local?oPe:nPe)(n,o,t))}function sPe(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function cPe(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function lPe(e,t){var n,o;function r(){var a=t.apply(this,arguments);return a!==o&&(n=(o=a)&&cPe(e,a)),n}return r._value=t,r}function dPe(e,t){var n,o;function r(){var a=t.apply(this,arguments);return a!==o&&(n=(o=a)&&sPe(e,a)),n}return r._value=t,r}function uPe(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=Kz(e);return this.tween(n,(o.local?lPe:dPe)(o,t))}function hPe(e,t){return function(){EF(this,e).delay=+t.apply(this,arguments)}}function fPe(e,t){return t=+t,function(){EF(this,e).delay=t}}function pPe(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?hPe:fPe)(t,e)):cr(this.node(),t).delay}function yPe(e,t){return function(){Kr(this,e).duration=+t.apply(this,arguments)}}function mPe(e,t){return t=+t,function(){Kr(this,e).duration=t}}function gPe(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?yPe:mPe)(t,e)):cr(this.node(),t).duration}function kPe(e,t){if(typeof t!="function")throw new Error;return function(){Kr(this,e).ease=t}}function vPe(e){var t=this._id;return arguments.length?this.each(kPe(t,e)):cr(this.node(),t).ease}function xPe(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;Kr(this,e).ease=n}}function wPe(e){if(typeof e!="function")throw new Error;return this.each(xPe(this._id,e))}function MPe(e){typeof e!="function"&&(e=TY(e));for(var t=this._groups,n=t.length,o=new Array(n),r=0;r<n;++r)for(var a=t[r],i=a.length,s=o[r]=[],c,l=0;l<i;++l)(c=a[l])&&e.call(c,c.__data__,l,a)&&s.push(c);return new Na(o,this._parents,this._name,this._id)}function bPe(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,o=t.length,r=n.length,a=Math.min(o,r),i=new Array(o),s=0;s<a;++s)for(var c=t[s],l=n[s],h=c.length,u=i[s]=new Array(h),p,y=0;y<h;++y)(p=c[y]||l[y])&&(u[y]=p);for(;s<o;++s)i[s]=t[s];return new Na(i,this._parents,this._name,this._id)}function _Pe(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 CPe(e,t,n){var o,r,a=_Pe(t)?EF:Kr;return function(){var i=a(this,e),s=i.on;s!==o&&(r=(o=s).copy()).on(t,n),i.on=r}}function SPe(e,t){var n=this._id;return arguments.length<2?cr(this.node(),n).on.on(e):this.each(CPe(n,e,t))}function LPe(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function NPe(){return this.on("end.remove",LPe(this._id))}function IPe(e){var t=this._name,n=this._id;typeof e!="function"&&(e=LF(e));for(var o=this._groups,r=o.length,a=new Array(r),i=0;i<r;++i)for(var s=o[i],c=s.length,l=a[i]=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,Yz(l[p],t,n,p,l,cr(h,n)));return new Na(a,this._parents,t,n)}function APe(e){var t=this._name,n=this._id;typeof e!="function"&&(e=RY(e));for(var o=this._groups,r=o.length,a=[],i=[],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=cr(h,n),k=0,x=p.length;k<x;++k)(y=p[k])&&Yz(y,t,n,k,p,g);a.push(p),i.push(h)}return new Na(a,i,t,n)}var EPe=vf.prototype.constructor;function jPe(){return new EPe(this._groups,this._parents)}function $Pe(e,t){var n,o,r;return function(){var a=v0(this,e),i=(this.style.removeProperty(e),v0(this,e));return a===i?null:a===n&&i===o?r:r=t(n=a,o=i)}}function cQ(e){return function(){this.style.removeProperty(e)}}function PPe(e,t,n){var o,r=n+"",a;return function(){var i=v0(this,e);return i===r?null:i===o?a:a=t(o=i,n)}}function zPe(e,t,n){var o,r,a;return function(){var i=v0(this,e),s=n(this),c=s+"";return s==null&&(c=s=(this.style.removeProperty(e),v0(this,e))),i===c?null:i===o&&c===r?a:(r=c,a=t(o=i,s))}}function RPe(e,t){var n,o,r,a="style."+t,i="end."+a,s;return function(){var c=Kr(this,e),l=c.on,h=c.value[a]==null?s||(s=cQ(t)):void 0;(l!==n||r!==h)&&(o=(n=l).copy()).on(i,r=h),c.on=o}}function TPe(e,t,n){var o=(e+="")=="transform"?D$e:sQ;return t==null?this.styleTween(e,$Pe(e,o)).on("end.style."+e,cQ(e)):typeof t=="function"?this.styleTween(e,zPe(e,o,jF(this,"style."+e,t))).each(RPe(this._id,e)):this.styleTween(e,PPe(e,o,t),n).on("end.style."+e,null)}function DPe(e,t,n){return function(o){this.style.setProperty(e,t.call(this,o),n)}}function HPe(e,t,n){var o,r;function a(){var i=t.apply(this,arguments);return i!==r&&(o=(r=i)&&DPe(e,i,n)),o}return a._value=t,a}function OPe(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,HPe(e,t,n??""))}function FPe(e){return function(){this.textContent=e}}function qPe(e){return function(){var t=e(this);this.textContent=t??""}}function VPe(e){return this.tween("text",typeof e=="function"?qPe(jF(this,"text",e)):FPe(e==null?"":e+""))}function BPe(e){return function(t){this.textContent=e.call(this,t)}}function UPe(e){var t,n;function o(){var r=e.apply(this,arguments);return r!==n&&(t=(n=r)&&BPe(r)),t}return o._value=e,o}function WPe(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,UPe(e))}function GPe(){for(var e=this._name,t=this._id,n=lQ(),o=this._groups,r=o.length,a=0;a<r;++a)for(var i=o[a],s=i.length,c,l=0;l<s;++l)if(c=i[l]){var h=cr(c,t);Yz(c,e,n,l,i,{time:h.time+h.delay+h.duration,delay:0,duration:h.duration,ease:h.ease})}return new Na(o,this._parents,e,n)}function KPe(){var e,t,n=this,o=n._id,r=n.size();return new Promise(function(a,i){var s={value:i},c={value:function(){--r===0&&a()}};n.each(function(){var l=Kr(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&&a()})}var ZPe=0;function Na(e,t,n,o){this._groups=e,this._parents=t,this._name=n,this._id=o}function lQ(){return++ZPe}var ha=vf.prototype;Na.prototype={constructor:Na,select:IPe,selectAll:APe,selectChild:ha.selectChild,selectChildren:ha.selectChildren,filter:MPe,merge:bPe,selection:jPe,transition:GPe,call:ha.call,nodes:ha.nodes,node:ha.node,size:ha.size,empty:ha.empty,each:ha.each,on:SPe,attr:iPe,attrTween:uPe,style:TPe,styleTween:OPe,text:VPe,textTween:WPe,remove:NPe,tween:J$e,delay:pPe,duration:gPe,ease:vPe,easeVarying:wPe,end:KPe,[Symbol.iterator]:ha[Symbol.iterator]};function XPe(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var YPe={time:null,delay:0,duration:250,ease:XPe};function QPe(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 JPe(e){var t,n;e instanceof Na?(t=e._id,e=e._name):(t=lQ(),(n=YPe).time=AF(),e=e==null?null:e+"");for(var o=this._groups,r=o.length,a=0;a<r;++a)for(var i=o[a],s=i.length,c,l=0;l<s;++l)(c=i[l])&&Yz(c,e,t,l,i,n||QPe(c,t));return new Na(o,this._parents,e,t)}vf.prototype.interrupt=X$e;vf.prototype.transition=JPe;const xp=e=>()=>e;function eze(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 wa(e,t,n){this.k=e,this.x=t,this.y=n}wa.prototype={constructor:wa,scale:function(e){return e===1?this:new wa(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new wa(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 Qz=new wa(1,0,0);dQ.prototype=wa.prototype;function dQ(e){for(;!e.__zoom;)if(!(e=e.parentNode))return Qz;return e.__zoom}function ST(e){e.stopImmediatePropagation()}function M2(e){e.preventDefault(),e.stopImmediatePropagation()}function tze(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 rU(){return this.__zoom||Qz}function oze(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function rze(){return navigator.maxTouchPoints||"ontouchstart"in this}function aze(e,t,n){var o=e.invertX(t[0][0])-n[0][0],r=e.invertX(t[1][0])-n[1][0],a=e.invertY(t[0][1])-n[0][1],i=e.invertY(t[1][1])-n[1][1];return e.translate(r>o?(o+r)/2:Math.min(0,o)||Math.max(0,r),i>a?(a+i)/2:Math.min(0,a)||Math.max(0,i))}function uQ(){var e=tze,t=nze,n=aze,o=oze,r=rze,a=[0,1/0],i=[[-1/0,-1/0],[1/0,1/0]],s=250,c=nP,l=Gz("start","zoom","end"),h,u,p,y=500,g=150,k=0,x=10;function v($){$.property("__zoom",rU).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",W).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}v.transform=function($,T,D,O){var I=$.selection?$.selection():$;I.property("__zoom",rU),$!==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,i)},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),i)},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(Qz.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,i)},O,I)};function M($,T){return T=Math.max(a[0],Math.min(a[1],T)),T===$.k?$:new wa(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 wa($.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]),K=I.__zoom,X=typeof T=="function"?T.apply(I,R):T,J=c(K.invert(H).concat(j/K.k),X.invert(H).concat(j/X.k));return function(re){if(re===1)re=X;else{var oe=J(re),ne=j/oe[2];re=new wa(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 eze($,{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(a[0],Math.min(a[1],O.k*Math.pow(2,o.apply(this,arguments)))),R=Ko($);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)],aP(this),D.start()}M2($),D.wheel=setTimeout(L,g),D.zoom("mouse",n(w(M(O,I),D.mouse[0],D.mouse[1]),D.extent,i));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=Ko($,D),L=$.clientX,V=$.clientY;GY($.view),ST($),O.mouse=[R,this.__zoom.invert(R)],aP(this),O.start();function H(K){if(M2(K),!O.moved){var X=K.clientX-L,J=K.clientY-V;O.moved=X*X+J*J>k}O.event(K).zoom("mouse",n(w(O.that.__zoom,O.mouse[0]=Ko(K,D),O.mouse[1]),O.extent,i))}function j(K){I.on("mousemove.zoom mouseup.zoom",null),KY(K.view,O.moved),M2(K),O.event(K).end()}}function A($,...T){if(e.apply(this,arguments)){var D=this.__zoom,O=Ko($.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),i);M2($),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(ST($),L=0;L<O;++L)V=D[L],H=Ko(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)),aP(this),I.start())}}function z($,...T){if(this.__zooming){var D=_(this,T).event($),O=$.changedTouches,I=O.length,R,L,V,H;for(M2($),R=0;R<I;++R)L=O[R],V=Ko(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],K=D.touch0[1],X=D.touch1[0],J=D.touch1[1],re=(re=X[0]-j[0])*re+(re=X[1]-j[1])*re,oe=(oe=J[0]-K[0])*oe+(oe=J[1]-K[1])*oe;L=M(L,Math.sqrt(re/oe)),V=[(j[0]+X[0])/2,(j[1]+X[1])/2],H=[(K[0]+J[0])/2,(K[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,i))}}function W($,...T){if(this.__zooming){var D=_(this,T).event($),O=$.changedTouches,I=O.length,R,L;for(ST($),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=Ko(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"?$:xp(+$),v):o},v.filter=function($){return arguments.length?(e=typeof $=="function"?$:xp(!!$),v):e},v.touchable=function($){return arguments.length?(r=typeof $=="function"?$:xp(!!$),v):r},v.extent=function($){return arguments.length?(t=typeof $=="function"?$:xp([[+$[0][0],+$[0][1]],[+$[1][0],+$[1][1]]]),v):t},v.scaleExtent=function($){return arguments.length?(a[0]=+$[0],a[1]=+$[1],v):[a[0],a[1]]},v.translateExtent=function($){return arguments.length?(i[0][0]=+$[0][0],i[1][0]=+$[1][0],i[0][1]=+$[0][1],i[1][1]=+$[1][1],v):[[i[0][0],i[0][1]],[i[1][0],i[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 Br={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."},Yh=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],hQ=["Enter"," ","Escape"],fQ={"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 w0;(function(e){e.Strict="strict",e.Loose="loose"})(w0||(w0={}));var bd;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(bd||(bd={}));var M0;(function(e){e.Partial="partial",e.Full="full"})(M0||(M0={}));const pQ={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null};var mi;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(mi||(mi={}));var Qh;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(Qh||(Qh={}));var fe;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(fe||(fe={}));const aU={[fe.Left]:fe.Right,[fe.Right]:fe.Left,[fe.Top]:fe.Bottom,[fe.Bottom]:fe.Top};function yQ(e){return e===null?null:e?"valid":"invalid"}const mQ=e=>"id"in e&&"source"in e&&"target"in e,ize=e=>"id"in e&&"position"in e&&!("source"in e)&&!("target"in e),$F=e=>"id"in e&&"internals"in e&&!("source"in e)&&!("target"in e),wf=(e,t=[0,0])=>{const{width:n,height:o}=$a(e),r=e.origin??t,a=n*r[0],i=o*r[1];return{x:e.position.x-a,y:e.position.y-i}},sze=(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 a=typeof r=="string";let i=!t.nodeLookup&&!a?r:void 0;t.nodeLookup&&(i=a?t.nodeLookup.get(r):$F(r)?r:t.nodeLookup.get(r.id));const s=i?KP(i,t.nodeOrigin):{x:0,y:0,x2:0,y2:0};return Jz(o,s)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return eR(n)},Mf=(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=Jz(n,KP(r)),o=!0)}),o?eR(n):{x:0,y:0,width:0,height:0}},PF=(e,t,[n,o,r]=[0,0,1],a=!1,i=!1)=>{const s={..._f(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(i&&!u||p)continue;const y=h.width??l.width??l.initialWidth??null,g=h.height??l.height??l.initialHeight??null,k=Jh(s,_0(l)),x=(y??0)*(g??0),v=a&&k>0;(!l.internals.handleBounds||v||k>=x||l.dragging)&&c.push(l)}return c},cze=(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 lze(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 dze({nodes:e,width:t,height:n,panZoom:o,minZoom:r,maxZoom:a},i){if(e.size===0)return Promise.resolve(!0);const s=lze(e,i),c=Mf(s),l=zF(c,t,n,(i==null?void 0:i.minZoom)??r,(i==null?void 0:i.maxZoom)??a,(i==null?void 0:i.padding)??.1);return await o.setViewport(l,{duration:i==null?void 0:i.duration,ease:i==null?void 0:i.ease,interpolate:i==null?void 0:i.interpolate}),Promise.resolve(!0)}function gQ({nodeId:e,nextPosition:t,nodeLookup:n,nodeOrigin:o=[0,0],nodeExtent:r,onError:a}){const i=n.get(e),s=i.parentId?n.get(i.parentId):void 0,{x:c,y:l}=s?s.internals.positionAbsolute:{x:0,y:0},h=i.origin??o;let u=i.extent||r;if(i.extent==="parent"&&!i.expandParent)if(!s)a==null||a("005",Br.error005());else{const y=s.measured.width,g=s.measured.height;y&&g&&(u=[[c,l],[c+y,l+g]])}else s&&C0(i.extent)&&(u=[[i.extent[0][0]+c,i.extent[0][1]+l],[i.extent[1][0]+c,i.extent[1][1]+l]]);const p=C0(u)?Ed(t,u,i.measured):t;return(i.measured.width===void 0||i.measured.height===void 0)&&(a==null||a("015",Br.error015())),{position:{x:p.x-c+(i.measured.width??0)*h[0],y:p.y-l+(i.measured.height??0)*h[1]},positionAbsolute:p}}async function uze({nodesToRemove:e=[],edgesToRemove:t=[],nodes:n,edges:o,onBeforeDelete:r}){const a=new Set(e.map(p=>p.id)),i=[];for(const p of n){if(p.deletable===!1)continue;const y=a.has(p.id),g=!y&&p.parentId&&i.find(k=>k.id===p.parentId);(y||g)&&i.push(p)}const s=new Set(t.map(p=>p.id)),c=o.filter(p=>p.deletable!==!1),h=cze(i,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:i};const u=await r({nodes:i,edges:h});return typeof u=="boolean"?u?{edges:h,nodes:i}:{edges:[],nodes:[]}:u}const b0=(e,t=0,n=1)=>Math.min(Math.max(e,t),n),Ed=(e={x:0,y:0},t,n)=>({x:b0(e.x,t[0][0],t[1][0]-((n==null?void 0:n.width)??0)),y:b0(e.y,t[0][1],t[1][1]-((n==null?void 0:n.height)??0))});function kQ(e,t,n){const{width:o,height:r}=$a(n),{x:a,y:i}=n.internals.positionAbsolute;return Ed(e,[[a,i],[a+o,i+r]],t)}const iU=(e,t,n)=>e<t?b0(Math.abs(e-t),1,t)/t:e>n?-b0(Math.abs(e-n),1,t)/t:0,vQ=(e,t,n=15,o=40)=>{const r=iU(e.x,o,t.width-o)*n,a=iU(e.y,o,t.height-o)*n;return[r,a]},Jz=(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)}),IH=({x:e,y:t,width:n,height:o})=>({x:e,y:t,x2:e+n,y2:t+o}),eR=({x:e,y:t,x2:n,y2:o})=>({x:e,y:t,width:n-e,height:o-t}),_0=(e,t=[0,0])=>{var r,a;const{x:n,y:o}=$F(e)?e.internals.positionAbsolute:wf(e,t);return{x:n,y:o,width:((r=e.measured)==null?void 0:r.width)??e.width??e.initialWidth??0,height:((a=e.measured)==null?void 0:a.height)??e.height??e.initialHeight??0}},KP=(e,t=[0,0])=>{var r,a;const{x:n,y:o}=$F(e)?e.internals.positionAbsolute:wf(e,t);return{x:n,y:o,x2:n+(((r=e.measured)==null?void 0:r.width)??e.width??e.initialWidth??0),y2:o+(((a=e.measured)==null?void 0:a.height)??e.height??e.initialHeight??0)}},xQ=(e,t)=>eR(Jz(IH(e),IH(t))),Jh=(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)},sU=e=>Qo(e.width)&&Qo(e.height)&&Qo(e.x)&&Qo(e.y),Qo=e=>!isNaN(e)&&isFinite(e),hze=(e,t)=>{},bf=(e,t=[1,1])=>({x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}),_f=({x:e,y:t},[n,o,r],a=!1,i=[1,1])=>{const s={x:(e-n)/r,y:(t-o)/r};return a?bf(s,i):s},ZP=({x:e,y:t},[n,o,r])=>({x:e*r+n,y:t*r+o});function ku(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 fze(e,t,n){if(typeof e=="string"||typeof e=="number"){const o=ku(e,n),r=ku(e,t);return{top:o,right:r,bottom:o,left:r,x:r*2,y:o*2}}if(typeof e=="object"){const o=ku(e.top??e.y??0,n),r=ku(e.bottom??e.y??0,n),a=ku(e.left??e.x??0,t),i=ku(e.right??e.x??0,t);return{top:o,right:i,bottom:r,left:a,x:a+i,y:o+r}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function pze(e,t,n,o,r,a){const{x:i,y:s}=ZP(e,[t,n,o]),{x:c,y:l}=ZP({x:e.x+e.width,y:e.y+e.height},[t,n,o]),h=r-c,u=a-l;return{left:Math.floor(i),top:Math.floor(s),right:Math.floor(h),bottom:Math.floor(u)}}const zF=(e,t,n,o,r,a)=>{const i=fze(a,t,n),s=(t-i.x)/e.width,c=(n-i.y)/e.height,l=Math.min(s,c),h=b0(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=pze(e,y,g,h,t,n),x={left:Math.min(k.left-i.left,0),top:Math.min(k.top-i.top,0),right:Math.min(k.right-i.right,0),bottom:Math.min(k.bottom-i.bottom,0)};return{x:y-x.left+x.right,y:g-x.top+x.bottom,zoom:h}},ef=()=>{var e;return typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)==null?void 0:e.indexOf("Mac"))>=0};function C0(e){return e!=null&&e!=="parent"}function $a(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 wQ(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 MQ(e,t={width:0,height:0},n,o,r){const a={...e},i=o.get(n);if(i){const s=i.origin||r;a.x+=i.internals.positionAbsolute.x-(t.width??0)*s[0],a.y+=i.internals.positionAbsolute.y-(t.height??0)*s[1]}return a}function cU(e,t){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}function yze(){let e,t;return{promise:new Promise((o,r)=>{e=o,t=r}),resolve:e,reject:t}}function mze(e){return{...fQ,...e||{}}}function bh(e,{snapGrid:t=[0,0],snapToGrid:n=!1,transform:o,containerBounds:r}){const{x:a,y:i}=Jo(e),s=_f({x:a-((r==null?void 0:r.left)??0),y:i-((r==null?void 0:r.top)??0)},o),{x:c,y:l}=n?bf(s,t):s;return{xSnapped:c,ySnapped:l,...s}}const RF=e=>({width:e.offsetWidth,height:e.offsetHeight}),bQ=e=>{var t;return((t=e==null?void 0:e.getRootNode)==null?void 0:t.call(e))||(window==null?void 0:window.document)},gze=["INPUT","SELECT","TEXTAREA"];function _Q(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:gze.includes(t.nodeName)||t.hasAttribute("contenteditable")||!!t.closest(".nokey")}const CQ=e=>"clientX"in e,Jo=(e,t)=>{var a,i;const n=CQ(e),o=n?e.clientX:(a=e.touches)==null?void 0:a[0].clientX,r=n?e.clientY:(i=e.touches)==null?void 0:i[0].clientY;return{x:o-((t==null?void 0:t.left)??0),y:r-((t==null?void 0:t.top)??0)}},lU=(e,t,n,o,r)=>{const a=t.querySelectorAll(`.${e}`);return!a||!a.length?null:Array.from(a).map(i=>{const s=i.getBoundingClientRect();return{id:i.getAttribute("data-handleid"),type:e,nodeId:r,position:i.getAttribute("data-handlepos"),x:(s.left-n.left)/o,y:(s.top-n.top)/o,...RF(i)}})};function SQ({sourceX:e,sourceY:t,targetX:n,targetY:o,sourceControlX:r,sourceControlY:a,targetControlX:i,targetControlY:s}){const c=e*.125+r*.375+i*.375+n*.125,l=t*.125+a*.375+s*.375+o*.125,h=Math.abs(c-e),u=Math.abs(l-t);return[c,l,h,u]}function wp(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function dU({pos:e,x1:t,y1:n,x2:o,y2:r,c:a}){switch(e){case fe.Left:return[t-wp(t-o,a),n];case fe.Right:return[t+wp(o-t,a),n];case fe.Top:return[t,n-wp(n-r,a)];case fe.Bottom:return[t,n+wp(r-n,a)]}}function tR({sourceX:e,sourceY:t,sourcePosition:n=fe.Bottom,targetX:o,targetY:r,targetPosition:a=fe.Top,curvature:i=.25}){const[s,c]=dU({pos:n,x1:e,y1:t,x2:o,y2:r,c:i}),[l,h]=dU({pos:a,x1:o,y1:r,x2:e,y2:t,c:i}),[u,p,y,g]=SQ({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 LQ({sourceX:e,sourceY:t,targetX:n,targetY:o}){const r=Math.abs(n-e)/2,a=n<e?n+r:n-r,i=Math.abs(o-t)/2,s=o<t?o+i:o-i;return[a,s,r,i]}function kze({sourceNode:e,targetNode:t,selected:n=!1,zIndex:o=0,elevateOnSelect:r=!1,zIndexMode:a="basic"}){if(a==="manual")return o;const i=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 i+s}function vze({sourceNode:e,targetNode:t,width:n,height:o,transform:r}){const a=Jz(KP(e),KP(t));a.x===a.x2&&(a.x2+=1),a.y===a.y2&&(a.y2+=1);const i={x:-r[0]/r[2],y:-r[1]/r[2],width:n/r[2],height:o/r[2]};return Jh(i,eR(a))>0}const xze=({source:e,sourceHandle:t,target:n,targetHandle:o})=>`xy-edge__${e}${t||""}-${n}${o||""}`,wze=(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)),Mze=(e,t,n={})=>{if(!e.source||!e.target)return t;const o=n.getEdgeId||xze;let r;return mQ(e)?r={...e}:r={...e,id:o(e)},wze(r,t)?t:(r.sourceHandle===null&&delete r.sourceHandle,r.targetHandle===null&&delete r.targetHandle,t.concat(r))};function NQ({sourceX:e,sourceY:t,targetX:n,targetY:o}){const[r,a,i,s]=LQ({sourceX:e,sourceY:t,targetX:n,targetY:o});return[`M ${e},${t}L ${n},${o}`,r,a,i,s]}const uU={[fe.Left]:{x:-1,y:0},[fe.Right]:{x:1,y:0},[fe.Top]:{x:0,y:-1},[fe.Bottom]:{x:0,y:1}},bze=({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},hU=(e,t)=>Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2));function _ze({source:e,sourcePosition:t=fe.Bottom,target:n,targetPosition:o=fe.Top,center:r,offset:a,stepPosition:i}){const s=uU[t],c=uU[o],l={x:e.x+s.x*a,y:e.y+s.y*a},h={x:n.x+c.x*a,y:n.y+c.y*a},u=bze({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]=LQ({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)*i,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)*i);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($<=a){const T=Math.min(a-1,a-$);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)),W=Math.max(Math.abs(A.y-g[0].y),Math.abs(E.y-g[0].y));z>=W?(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 Cze(e,t,n,o){const r=Math.min(hU(e,t)/2,hU(t,n)/2,o),{x:a,y:i}=t;if(e.x===a&&a===n.x||e.y===i&&i===n.y)return`L${a} ${i}`;if(e.y===i){const l=e.x<n.x?-1:1,h=e.y<n.y?1:-1;return`L ${a+r*l},${i}Q ${a},${i} ${a},${i+r*h}`}const s=e.x<n.x?1:-1,c=e.y<n.y?-1:1;return`L ${a},${i+r*c}Q ${a},${i} ${a+r*s},${i}`}function tf({sourceX:e,sourceY:t,sourcePosition:n=fe.Bottom,targetX:o,targetY:r,targetPosition:a=fe.Top,borderRadius:i=5,centerX:s,centerY:c,offset:l=20,stepPosition:h=.5}){const[u,p,y,g,k]=_ze({source:{x:e,y:t},sourcePosition:n,target:{x:o,y:r},targetPosition:a,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+=Cze(u[v-1],u[v],u[v+1],i);return x+=`L${u[u.length-1].x} ${u[u.length-1].y}`,[x,p,y,g,k]}function fU(e){var t;return e&&!!(e.internals.handleBounds||(t=e.handles)!=null&&t.length)&&!!(e.measured.width||e.width||e.initialWidth)}function Sze(e){var u;const{sourceNode:t,targetNode:n}=e;if(!fU(t)||!fU(n))return null;const o=t.internals.handleBounds||pU(t.handles),r=n.internals.handleBounds||pU(n.handles),a=yU((o==null?void 0:o.source)??[],e.sourceHandle),i=yU(e.connectionMode===w0.Strict?(r==null?void 0:r.target)??[]:((r==null?void 0:r.target)??[]).concat((r==null?void 0:r.source)??[]),e.targetHandle);if(!a||!i)return(u=e.onError)==null||u.call(e,"008",Br.error008(a?"target":"source",{id:e.id,sourceHandle:e.sourceHandle,targetHandle:e.targetHandle})),null;const s=(a==null?void 0:a.position)||fe.Bottom,c=(i==null?void 0:i.position)||fe.Top,l=jd(t,a,s),h=jd(n,i,c);return{sourceX:l.x,sourceY:l.y,targetX:h.x,targetY:h.y,sourcePosition:s,targetPosition:c}}function pU(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 jd(e,t,n=fe.Left,o=!1){const r=((t==null?void 0:t.x)??0)+e.internals.positionAbsolute.x,a=((t==null?void 0:t.y)??0)+e.internals.positionAbsolute.y,{width:i,height:s}=t??$a(e);if(o)return{x:r+i/2,y:a+s/2};switch((t==null?void 0:t.position)??n){case fe.Top:return{x:r+i/2,y:a};case fe.Right:return{x:r+i,y:a+s/2};case fe.Bottom:return{x:r+i/2,y:a+s};case fe.Left:return{x:r,y:a+s/2}}}function yU(e,t){return e&&(t?e.find(n=>n.id===t):e[0])||null}function AH(e,t){return e?typeof e=="string"?e:`${t?`${t}__`:""}${Object.keys(e).sort().map(o=>`${o}=${e[o]}`).join("&")}`:""}function Lze(e,{id:t,defaultColor:n,defaultMarkerStart:o,defaultMarkerEnd:r}){const a=new Set;return e.reduce((i,s)=>([s.markerStart||o,s.markerEnd||r].forEach(c=>{if(c&&typeof c=="object"){const l=AH(c,t);a.has(l)||(i.push({id:l,color:c.color||n,...c}),a.add(l))}}),i),[]).sort((i,s)=>i.id.localeCompare(s.id))}const IQ=1e3,Nze=10,TF={nodeOrigin:[0,0],nodeExtent:Yh,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},Ize={...TF,checkEquality:!0};function DF(e,t){const n={...e};for(const o in t)t[o]!==void 0&&(n[o]=t[o]);return n}function Aze(e,t,n){const o=DF(TF,n);for(const r of e.values())if(r.parentId)OF(r,e,t,o);else{const a=wf(r,o.nodeOrigin),i=C0(r.extent)?r.extent:o.nodeExtent,s=Ed(a,i,$a(r));r.internals.positionAbsolute=s}}function Eze(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 a={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(a):r.type==="target"&&o.push(a)}return{source:n,target:o}}function HF(e){return e==="manual"}function EH(e,t,n,o={}){var h,u;const r=DF(Ize,o),a={i:0},i=new Map(t),s=r!=null&&r.elevateNodesOnSelect&&!HF(r.zIndexMode)?IQ:0;let c=e.length>0,l=!1;t.clear(),n.clear();for(const p of e){let y=i.get(p.id);if(r.checkEquality&&p===(y==null?void 0:y.internals.userNode))t.set(p.id,y);else{const g=wf(p,r.nodeOrigin),k=C0(p.extent)?p.extent:r.nodeExtent,x=Ed(g,k,$a(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:Eze(p,y),z:AQ(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&&OF(y,t,n,o,a),l||(l=p.selected??!1)}return{nodesInitialized:c,hasSelectedNodes:l}}function jze(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 OF(e,t,n,o,r){const{elevateNodesOnSelect:a,nodeOrigin:i,nodeExtent:s,zIndexMode:c}=DF(TF,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}jze(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*Nze),r&&h.internals.rootParentIndex!==void 0&&(r.i=h.internals.rootParentIndex);const u=a&&!HF(c)?IQ:0,{x:p,y,z:g}=$ze(e,h,i,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 AQ(e,t,n){const o=Qo(e.zIndex)?e.zIndex:0;return HF(n)?o:o+(e.selected?t:0)}function $ze(e,t,n,o,r,a){const{x:i,y:s}=t.internals.positionAbsolute,c=$a(e),l=wf(e,n),h=C0(e.extent)?Ed(l,e.extent,c):l;let u=Ed({x:i+h.x,y:s+h.y},o,c);e.extent==="parent"&&(u=kQ(u,c,t));const p=AQ(e,r,a),y=t.internals.z??0;return{x:u.x,y:u.y,z:y>=p?y+1:p}}function FF(e,t,n,o=[0,0]){var i;const r=[],a=new Map;for(const s of e){const c=t.get(s.parentId);if(!c)continue;const l=((i=a.get(s.parentId))==null?void 0:i.expandedRect)??_0(c),h=xQ(l,s.rect);a.set(s.parentId,{expandedRect:h,parent:c})}return a.size>0&&a.forEach(({expandedRect:s,parent:c},l)=>{var w;const h=c.internals.positionAbsolute,u=$a(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 Pze(e,t,n,o,r,a,i){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=RF(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=C0(g.extent)?g.extent:a;let{positionAbsolute:b}=g.internals;g.parentId&&g.extent==="parent"?b=kQ(b,k,t.get(g.parentId)):w&&(b=Ed(b,w,k));const C={...g,measured:k,internals:{...g.internals,positionAbsolute:b,handleBounds:{source:lU("source",y.nodeElement,M,u,g.id),target:lU("target",y.nodeElement,M,u,g.id)}}};t.set(g.id,C),g.parentId&&OF(C,t,n,{nodeOrigin:r,zIndexMode:i}),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:_0(C,r)}))}}if(p.length>0){const y=FF(p,t,n,r);l.push(...y)}return{changes:l,updatedInternals:c}}async function zze({delta:e,panZoom:t,transform:n,translateExtent:o,width:r,height:a}){if(!t||!e.x&&!e.y)return Promise.resolve(!1);const i=await t.setViewportConstrained({x:n[0]+e.x,y:n[1]+e.y,zoom:n[2]},[[0,0],[r,a]],o),s=!!i&&(i.x!==n[0]||i.y!==n[1]||i.k!==n[2]);return Promise.resolve(s)}function mU(e,t,n,o,r,a){let i=r;const s=o.get(i)||new Map;o.set(i,s.set(n,t)),i=`${r}-${e}`;const c=o.get(i)||new Map;if(o.set(i,c.set(n,t)),a){i=`${r}-${e}-${a}`;const l=o.get(i)||new Map;o.set(i,l.set(n,t))}}function EQ(e,t,n){e.clear(),t.clear();for(const o of n){const{source:r,target:a,sourceHandle:i=null,targetHandle:s=null}=o,c={edgeId:o.id,source:r,target:a,sourceHandle:i,targetHandle:s},l=`${r}-${i}--${a}-${s}`,h=`${a}-${s}--${r}-${i}`;mU("source",c,h,e,r,i),mU("target",c,l,e,a,s),t.set(o.id,o)}}function jQ(e,t){if(!e.parentId)return!1;const n=t.get(e.parentId);return n?n.selected?!0:jQ(n,t):!1}function gU(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 Rze(e,t,n,o){const r=new Map;for(const[a,i]of e)if((i.selected||i.id===o)&&(!i.parentId||!jQ(i,e))&&(i.draggable||t&&typeof i.draggable>"u")){const s=e.get(a);s&&r.set(a,{id:a,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 LT({nodeId:e,dragItems:t,nodeLookup:n,dragging:o=!0}){var i,s,c;const r=[];for(const[l,h]of t){const u=(i=n.get(l))==null?void 0:i.internals.userNode;u&&r.push({...u,position:h.position,dragging:o})}if(!e)return[r[0],r];const a=(s=n.get(e))==null?void 0:s.internals.userNode;return[a?{...a,position:((c=t.get(e))==null?void 0:c.position)||a.position,dragging:o}:r[0],r]}function Tze({dragItems:e,snapGrid:t,x:n,y:o}){const r=e.values().next().value;if(!r)return null;const a={x:n-r.distance.x,y:o-r.distance.y},i=bf(a,t);return{x:i.x-a.x,y:i.y-a.y}}function Dze({onNodeMouseDown:e,getStoreItems:t,onDragStart:n,onDrag:o,onDragStop:r}){let a={x:null,y:null},i=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:W}){const{nodeLookup:$,nodeExtent:T,snapGrid:D,snapToGrid:O,nodeOrigin:I,onNodeDrag:R,onSelectionDrag:L,onError:V,updateNodePositions:H}=t();a={x:z,y:W};let j=!1;const K=s.size>1,X=K&&T?IH(Mf(s)):null,J=K&&O?Tze({dragItems:s,snapGrid:D,x:z,y:W}):null;for(const[re,oe]of s){if(!$.has(re))continue;let ne={x:z-oe.distance.x,y:W-oe.distance.y};O&&(ne=J?{x:Math.round(ne.x+J.x),y:Math.round(ne.y+J.y)}:bf(ne,D));let ce=null;if(K&&T&&!oe.extent&&X){const{positionAbsolute:xe}=oe.internals,Re=xe.x-X.x+T[0][0],Ye=xe.x+oe.measured.width-X.x2+T[1][0],le=xe.y-X.y+T[0][1],Ie=xe.y+oe.measured.height-X.y2+T[1][1];ce=[[Re,le],[Ye,Ie]]}const{position:ve,positionAbsolute:ge}=gQ({nodeId:re,nextPosition:ne,nodeLookup:$,nodeExtent:ce||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]=LT({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:W,autoPanSpeed:$,autoPanOnNodeDrag:T}=t();if(!T){c=!1,cancelAnimationFrame(i);return}const[D,O]=vQ(l,h,$);(D!==0||O!==0)&&(a.x=(a.x??0)-D/z[2],a.y=(a.y??0)-O/z[2],await W({x:D,y:O})&&N(a)),i=requestAnimationFrame(P)}function A(z){var K;const{nodeLookup:W,multiSelectionActive:$,nodesDraggable:T,transform:D,snapGrid:O,snapToGrid:I,selectNodesOnDrag:R,onNodeDragStart:L,onSelectionDragStart:V,unselectNodesAndEdges:H}=t();u=!0,(!R||!C)&&!$&&_&&((K=W.get(_))!=null&&K.selected||H()),C&&R&&_&&(e==null||e(_));const j=bh(z.sourceEvent,{transform:D,snapGrid:O,snapToGrid:I,containerBounds:h});if(a=j,s=Rze(W,T,j,_),s.size>0&&(n||L||!_&&V)){const[X,J]=LT({nodeId:_,dragItems:s,nodeLookup:W});n==null||n(z.sourceEvent,s,X,J),L==null||L(z.sourceEvent,X,J),_||V==null||V(z.sourceEvent,J)}}const E=ZY().clickDistance(S).on("start",z=>{const{domNode:W,nodeDragThreshold:$,transform:T,snapGrid:D,snapToGrid:O}=t();h=(W==null?void 0:W.getBoundingClientRect())||null,y=!1,g=!1,k=z.sourceEvent,$===0&&A(z),a=bh(z.sourceEvent,{transform:T,snapGrid:D,snapToGrid:O,containerBounds:h}),l=Jo(z.sourceEvent,h)}).on("drag",z=>{const{autoPanOnNodeDrag:W,transform:$,snapGrid:T,snapToGrid:D,nodeDragThreshold:O,nodeLookup:I}=t(),R=bh(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&&W&&u&&(c=!0,P()),!u){const L=Jo(z.sourceEvent,h),V=L.x-l.x,H=L.y-l.y;Math.sqrt(V*V+H*H)>O&&A(z)}(a.x!==R.xSnapped||a.y!==R.ySnapped)&&s&&u&&(l=Jo(z.sourceEvent,h),N(R))}}).on("end",z=>{if(!(!u||y)&&(c=!1,u=!1,cancelAnimationFrame(i),s.size>0)){const{nodeLookup:W,updateNodePositions:$,onNodeDragStop:T,onSelectionDragStop:D}=t();if(g&&($(s,!1),g=!1),r||T||!_&&D){const[O,I]=LT({nodeId:_,dragItems:s,nodeLookup:W,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 W=z.target;return!z.button&&(!M||!gU(W,`.${M}`,b))&&(!w||gU(W,w,b))});p.call(E)}function v(){p==null||p.on(".drag",null)}return{update:x,destroy:v}}function Hze(e,t,n){const o=[],r={x:e.x-n,y:e.y-n,width:n*2,height:n*2};for(const a of t.values())Jh(r,_0(a))>0&&o.push(a);return o}const Oze=250;function Fze(e,t,n,o){var s,c;let r=[],a=1/0;const i=Hze(e,n,t+Oze);for(const l of i){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}=jd(l,u,u.position,!0),g=Math.sqrt(Math.pow(p-e.x,2)+Math.pow(y-e.y,2));g>t||(g<a?(r=[{...u,x:p,y}],a=g):g===a&&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 $Q(e,t,n,o,r,a=!1){var l,h,u;const i=o.get(e);if(!i)return null;const s=r==="strict"?(l=i.internals.handleBounds)==null?void 0:l[t]:[...((h=i.internals.handleBounds)==null?void 0:h.source)??[],...((u=i.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&&a?{...c,...jd(i,c,c.position,!0)}:c}function PQ(e,t){return e||(t!=null&&t.classList.contains("target")?"target":t!=null&&t.classList.contains("source")?"source":null)}function qze(e,t){let n=null;return t?n=!0:e&&!t&&(n=!1),n}const zQ=()=>!0;function Vze(e,{connectionMode:t,connectionRadius:n,handleId:o,nodeId:r,edgeUpdaterType:a,isTarget:i,domNode:s,nodeLookup:c,lib:l,autoPanOnConnect:h,flowId:u,panBy:p,cancelConnection:y,onConnectStart:g,onConnect:k,onConnectEnd:x,isValidConnection:v=zQ,onReconnectEnd:M,updateConnection:w,getTransform:b,getFromHandle:C,autoPanSpeed:_,dragThreshold:S=1,handleDomNode:N}){const P=bQ(e.target);let A=0,E;const{x:z,y:W}=Jo(e),$=PQ(a,N),T=s==null?void 0:s.getBoundingClientRect();let D=!1;if(!T||!$)return;const O=$Q(r,$,o,c,t);if(!O)return;let I=Jo(e,T),R=!1,L=null,V=!1,H=null;function j(){if(!h||!T)return;const[ve,ge]=vQ(I,T,_);p({x:ve,y:ge}),A=requestAnimationFrame(j)}const K={...O,nodeId:r,type:$,position:O.position},X=c.get(r);let re={inProgress:!0,isValid:null,from:jd(X,K,fe.Left,!0),fromHandle:K,fromPosition:K.position,fromNode:X,to:I,toHandle:null,toPosition:aU[K.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:jt}=Jo(ve),xt=Ie-z,Qt=jt-W;if(!(xt*xt+Qt*Qt>S*S))return;oe()}if(!C()||!K){ce(ve);return}const ge=b();I=Jo(ve,T),E=Fze(_f(I,ge,!1,[1,1]),n,c,K),R||(j(),R=!0);const xe=RQ(ve,{handle:E,connectionMode:t,fromNodeId:r,fromHandleId:o,fromType:i?"target":"source",isValidConnection:v,doc:P,lib:l,flowId:u,nodeLookup:c});H=xe.handleDomNode,L=xe.connection,V=qze(!!E,xe.isValid);const Re=c.get(r),Ye=Re?jd(Re,K,fe.Left,!0):re.from,le={...re,from:Ye,isValid:V,to:xe.toHandle&&V?ZP({x:xe.toHandle.x,y:xe.toHandle.y},ge):I,toHandle:xe.toHandle,toPosition:V&&xe.toHandle?xe.toHandle.position:aU[K.position],toNode:xe.toHandle?c.get(xe.toHandle.nodeId):null,pointer:I};w(le),re=le}function ce(ve){if(!("touches"in ve&&ve.touches.length>0)){if(D){(E||H)&&L&&V&&(k==null||k(L));const{inProgress:ge,...xe}=re,Re={...xe,toPosition:re.toHandle?re.toPosition:null};x==null||x(ve,Re),a&&(M==null||M(ve,Re))}y(),cancelAnimationFrame(A),R=!1,V=!1,L=null,H=null,P.removeEventListener("mousemove",ne),P.removeEventListener("mouseup",ce),P.removeEventListener("touchmove",ne),P.removeEventListener("touchend",ce)}}P.addEventListener("mousemove",ne),P.addEventListener("mouseup",ce),P.addEventListener("touchmove",ne),P.addEventListener("touchend",ce)}function RQ(e,{handle:t,connectionMode:n,fromNodeId:o,fromHandleId:r,fromType:a,doc:i,lib:s,flowId:c,isValidConnection:l=zQ,nodeLookup:h}){const u=a==="target",p=t?i.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}=Jo(e),k=i.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=PQ(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===w0.Strict?u&&M==="source"||!u&&M==="target":w!==o||b!==r);v.isValid=P&&l(S),v.toHandle=$Q(w,M,b,h,n,!0)}return v}const jH={onPointerDown:Vze,isValid:RQ};function Bze({domNode:e,panZoom:t,getTransform:n,getViewScale:o}){const r=ao(e);function a({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&&ef()?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=uQ().on("start",x).on("zoom",u?v:null).on("zoom.wheel",p?g:null);r.call(M,{})}function i(){r.on("zoom",null)}return{update:a,destroy:i,pointer:Ko}}const nR=e=>({x:e.x,y:e.y,zoom:e.k}),NT=({x:e,y:t,zoom:n})=>Qz.translate(e,t).scale(n),Bu=(e,t)=>e.target.closest(`.${t}`),TQ=(e,t)=>t===2&&Array.isArray(e)&&e.includes(2),Uze=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2,IT=(e,t=0,n=Uze,o=()=>{})=>{const r=typeof t=="number"&&t>0;return r||o(),r?e.transition().duration(t).ease(n).on("end",o):e},DQ=e=>{const t=e.ctrlKey&&ef()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*t};function Wze({zoomPanValues:e,noWheelClassName:t,d3Selection:n,d3Zoom:o,panOnScrollMode:r,panOnScrollSpeed:a,zoomOnPinch:i,onPanZoomStart:s,onPanZoom:c,onPanZoomEnd:l}){return h=>{if(Bu(h,t))return h.ctrlKey&&h.preventDefault(),!1;h.preventDefault(),h.stopImmediatePropagation();const u=n.property("__zoom").k||1;if(h.ctrlKey&&i){const x=Ko(h),v=DQ(h),M=u*Math.pow(2,v);o.scaleTo(n,M,x,h);return}const p=h.deltaMode===1?20:1;let y=r===bd.Vertical?0:h.deltaX*p,g=r===bd.Horizontal?0:h.deltaY*p;!ef()&&h.shiftKey&&r!==bd.Vertical&&(y=h.deltaY*p,g=0),o.translateBy(n,-(y/u)*a,-(g/u)*a,{internal:!0});const k=nR(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 Gze({noWheelClassName:e,preventScrolling:t,d3ZoomHandler:n}){return function(o,r){const a=o.type==="wheel",i=!t&&a&&!o.ctrlKey,s=Bu(o,e);if(o.ctrlKey&&a&&s&&o.preventDefault(),i||s)return null;o.preventDefault(),n.call(this,o,r)}}function Kze({zoomPanValues:e,onDraggingChange:t,onPanZoomStart:n}){return o=>{var a,i,s;if((a=o.sourceEvent)!=null&&a.internal)return;const r=nR(o.transform);e.mouseButton=((i=o.sourceEvent)==null?void 0:i.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 Zze({zoomPanValues:e,panOnDrag:t,onPaneContextMenu:n,onTransformChange:o,onPanZoom:r}){return a=>{var i,s;e.usedRightMouseButton=!!(n&&TQ(t,e.mouseButton??0)),(i=a.sourceEvent)!=null&&i.sync||o([a.transform.x,a.transform.y,a.transform.k]),r&&!((s=a.sourceEvent)!=null&&s.internal)&&(r==null||r(a.sourceEvent,nR(a.transform)))}}function Xze({zoomPanValues:e,panOnDrag:t,panOnScroll:n,onDraggingChange:o,onPanZoomEnd:r,onPaneContextMenu:a}){return i=>{var s;if(!((s=i.sourceEvent)!=null&&s.internal)&&(e.isZoomingOrPanning=!1,a&&TQ(t,e.mouseButton??0)&&!e.usedRightMouseButton&&i.sourceEvent&&a(i.sourceEvent),e.usedRightMouseButton=!1,o(!1),r)){const c=nR(i.transform);e.prevViewport=c,clearTimeout(e.timerId),e.timerId=setTimeout(()=>{r==null||r(i.sourceEvent,c)},n?150:0)}}}function Yze({zoomActivationKeyPressed:e,zoomOnScroll:t,zoomOnPinch:n,panOnDrag:o,panOnScroll:r,zoomOnDoubleClick:a,userSelectionActive:i,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"&&(Bu(u,`${l}-flow__node`)||Bu(u,`${l}-flow__edge`)))return!0;if(!o&&!p&&!r&&!a&&!n||i||h&&!g||Bu(u,s)&&g||Bu(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 Qze({domNode:e,minZoom:t,maxZoom:n,translateExtent:o,viewport:r,onPanZoom:a,onPanZoomStart:i,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=uQ().scaleExtent([t,n]).translateExtent(o),p=ao(e).call(u);M({x:r.x,y:r.y,zoom:b0(r.zoom,t,n)},[[0,0],[h.width,h.height]],o);const y=p.on("wheel.zoom"),g=p.on("dblclick.zoom");u.wheelDelta(DQ);function k(E,z){return p?new Promise(W=>{u==null||u.interpolate((z==null?void 0:z.interpolate)==="linear"?Mh:nP).transform(IT(p,z==null?void 0:z.duration,z==null?void 0:z.ease,()=>W(!0)),E)}):Promise.resolve(!1)}function x({noWheelClassName:E,noPanClassName:z,onPaneContextMenu:W,userSelectionActive:$,panOnScroll:T,panOnDrag:D,panOnScrollMode:O,panOnScrollSpeed:I,preventScrolling:R,zoomOnPinch:L,zoomOnScroll:V,zoomOnDoubleClick:H,zoomActivationKeyPressed:j,lib:K,onTransformChange:X,connectionInProgress:J,paneClickDistance:re,selectionOnDrag:oe}){$&&!l.isZoomingOrPanning&&v();const ne=T&&!j&&!$;u.clickDistance(oe?1/0:!Qo(re)||re<0?0:re);const ce=ne?Wze({zoomPanValues:l,noWheelClassName:E,d3Selection:p,d3Zoom:u,panOnScrollMode:O,panOnScrollSpeed:I,zoomOnPinch:L,onPanZoomStart:i,onPanZoom:a,onPanZoomEnd:s}):Gze({noWheelClassName:E,preventScrolling:R,d3ZoomHandler:y});if(p.on("wheel.zoom",ce,{passive:!1}),!$){const ge=Kze({zoomPanValues:l,onDraggingChange:c,onPanZoomStart:i});u.on("start",ge);const xe=Zze({zoomPanValues:l,panOnDrag:D,onPaneContextMenu:!!W,onPanZoom:a,onTransformChange:X});u.on("zoom",xe);const Re=Xze({zoomPanValues:l,panOnDrag:D,panOnScroll:T,onPaneContextMenu:W,onPanZoomEnd:s,onDraggingChange:c});u.on("end",Re)}const ve=Yze({zoomActivationKeyPressed:j,panOnDrag:D,zoomOnScroll:V,panOnScroll:T,zoomOnDoubleClick:H,zoomOnPinch:L,userSelectionActive:$,noPanClassName:z,noWheelClassName:E,lib:K,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,W){const $=NT(E),T=u==null?void 0:u.constrain()($,z,W);return T&&await k(T),new Promise(D=>D(T))}async function w(E,z){const W=NT(E);return await k(W,z),new Promise($=>$(W))}function b(E){if(p){const z=NT(E),W=p.property("__zoom");(W.k!==E.zoom||W.x!==E.x||W.y!==E.y)&&(u==null||u.transform(p,z,null,{sync:!0}))}}function C(){const E=p?dQ(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(W=>{u==null||u.interpolate((z==null?void 0:z.interpolate)==="linear"?Mh:nP).scaleTo(IT(p,z==null?void 0:z.duration,z==null?void 0:z.ease,()=>W(!0)),E)}):Promise.resolve(!1)}function S(E,z){return p?new Promise(W=>{u==null||u.interpolate((z==null?void 0:z.interpolate)==="linear"?Mh:nP).scaleBy(IT(p,z==null?void 0:z.duration,z==null?void 0:z.ease,()=>W(!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=!Qo(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 Ti;(function(e){e.Line="line",e.Handle="handle"})(Ti||(Ti={}));function Jze({width:e,prevWidth:t,height:n,prevHeight:o,affectsX:r,affectsY:a}){const i=e-t,s=n-o,c=[i>0?1:i<0?-1:0,s>0?1:s<0?-1:0];return i&&r&&(c[0]=c[0]*-1),s&&a&&(c[1]=c[1]*-1),c}function kU(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 ti(e,t){return Math.max(0,t-e)}function ni(e,t){return Math.max(0,e-t)}function Mp(e,t,n){return Math.max(0,t-e,e-n)}function vU(e,t){return e?!t:t}function eRe(e,t,n,o,r,a,i,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=-a[0]*C,W=-a[1]*_;let $=Mp(A,k,x),T=Mp(E,v,M);if(i){let I=0,R=0;c&&N<0?I=ti(w+N+z,i[0][0]):!c&&N>0&&(I=ni(w+A+z,i[1][0])),l&&P<0?R=ti(b+P+W,i[0][1]):!l&&P>0&&(R=ni(b+E+W,i[1][1])),$=Math.max($,I),T=Math.max(T,R)}if(s){let I=0,R=0;c&&N>0?I=ni(w+N,s[0][0]):!c&&N<0&&(I=ti(w+A,s[1][0])),l&&P>0?R=ni(b+P,s[0][1]):!l&&P<0&&(R=ti(b+E,s[1][1])),$=Math.max($,I),T=Math.max(T,R)}if(r){if(h){const I=Mp(A/S,v,M)*S;if($=Math.max($,I),i){let R=0;!c&&!l||c&&!l&&p?R=ni(b+W+A/S,i[1][1])*S:R=ti(b+W+(c?N:-N)/S,i[0][1])*S,$=Math.max($,R)}if(s){let R=0;!c&&!l||c&&!l&&p?R=ti(b+A/S,s[1][1])*S:R=ni(b+(c?N:-N)/S,s[0][1])*S,$=Math.max($,R)}}if(u){const I=Mp(E*S,k,x)/S;if(T=Math.max(T,I),i){let R=0;!c&&!l||l&&!c&&p?R=ni(w+E*S+z,i[1][0])/S:R=ti(w+(l?P:-P)*S+z,i[0][0])/S,T=Math.max(T,R)}if(s){let R=0;!c&&!l||l&&!c&&p?R=ti(w+E*S,s[1][0])/S:R=ni(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=(vU(c,l)?-N:N)/S:N=(vU(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:a[0]*N*(c?-1:1)+D,y:a[1]*P*(l?-1:1)+O}}const HQ={width:0,height:0,x:0,y:0},tRe={...HQ,pointerX:0,pointerY:0,aspectRatio:1};function nRe(e){return[[0,0],[e.measured.width,e.measured.height]]}function oRe(e,t,n){const o=t.position.x+e.position.x,r=t.position.y+e.position.y,a=e.measured.width??0,i=e.measured.height??0,s=n[0]*a,c=n[1]*i;return[[o-s,r-c],[o+a-s,r+i-c]]}function rRe({domNode:e,nodeId:t,getStoreItems:n,onChange:o,onEnd:r}){const a=ao(e);let i={controlDirection:kU("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={...HQ},M={...tRe};i={boundaries:h,resizeDirection:p,keepAspectRatio:u,controlDirection:kU(l)};let w,b=null,C=[],_,S,N,P=!1;const A=ZY().on("start",E=>{const{nodeLookup:z,transform:W,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}=bh(E.sourceEvent,{transform:W,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=oRe(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:W,snapToGrid:$,nodeOrigin:T}=n(),D=bh(E.sourceEvent,{transform:z,snapGrid:W,snapToGrid:$,containerBounds:b}),O=[];if(!w)return;const{x:I,y:R,width:L,height:V}=v,H={},j=w.origin??T,{width:K,height:X,x:J,y:re}=eRe(M,i.controlDirection,D,i.boundaries,i.keepAspectRatio,j,S,N),oe=K!==L,ne=X!==V,ce=J!==I&&oe,ve=re!==R&≠if(!ce&&!ve&&!oe&&!ne)return;if((ce||ve||j[0]===1||j[1]===1)&&(H.x=ce?J:v.x,H.y=ve?re:v.y,v.x=H.x,v.y=H.y,C.length>0)){const Ye=J-I,le=re-R;for(const Ie of C)Ie.position={x:Ie.position.x-Ye+j[0]*(K-L),y:Ie.position.y-le+j[1]*(X-V)},O.push(Ie)}if((oe||ne)&&(H.width=oe&&(!i.resizeDirection||i.resizeDirection==="horizontal")?K:v.width,H.height=ne&&(!i.resizeDirection||i.resizeDirection==="vertical")?X: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 le=j[1]*(H.height??0);H.y&&H.y<le&&(v.y=le,M.y=M.y-(H.y-le))}const ge=Jze({width:v.width,prevWidth:L,height:v.height,prevHeight:V,affectsX:i.controlDirection.affectsX,affectsY:i.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)});a.call(A)}function c(){a.on(".drag",null)}return{update:s,destroy:c}}var OQ={exports:{}},FQ={},qQ={exports:{}},VQ={};/**
|
|
8447
8447
|
* @license React
|
|
8448
8448
|
* use-sync-external-store-shim.production.js
|
|
8449
8449
|
*
|
|
@@ -8466,7 +8466,7 @@ Error generating stack: `+a.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)??SU,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)&&_Q(y))return!1;const k=NU(y.code,s);if(a.current.add(y[k]),LU(i,a.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=NU(y.code,s);LU(i,a.current,!0)?(o(!1),a.current.clear()):a.current.delete(y[g]),y.key==="Meta"&&a.current.clear(),r.current=!1},p=()=>{a.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 LU(e,t,n){return e.filter(o=>n||o.length===t.size).some(o=>o.every(r=>t.has(r)))}function NU(e,t){return t.includes(e)?"code":"key"}const ZRe=()=>{const e=vt();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,a],panZoom:i}=e.getState();return i?(await i.setViewport({x:t.x??o,y:t.y??r,zoom:t.zoom??a},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:a,maxZoom:i,panZoom:s}=e.getState(),c=zF(t,o,r,a,i,(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:a,domNode:i}=e.getState();if(!i)return t;const{x:s,y:c}=i.getBoundingClientRect(),l={x:t.x-s,y:t.y-c},h=n.snapGrid??r,u=n.snapToGrid??a;return _f(l,o,u,h)},flowToScreenPosition:t=>{const{transform:n,domNode:o}=e.getState();if(!o)return t;const{x:r,y:a}=o.getBoundingClientRect(),i=ZP(t,n);return{x:i.x+r,y:i.y+a}}}),[])};function ZQ(e,t){const n=[],o=new Map,r=[];for(const a of e)if(a.type==="add"){r.push(a);continue}else if(a.type==="remove"||a.type==="replace")o.set(a.id,[a]);else{const i=o.get(a.id);i?i.push(a):o.set(a.id,[a])}for(const a of t){const i=o.get(a.id);if(!i){n.push(a);continue}if(i[0].type==="remove")continue;if(i[0].type==="replace"){n.push({...i[0].item});continue}const s={...a};for(const c of i)XRe(c,s);n.push(s)}return r.length&&r.forEach(a=>{a.index!==void 0?n.splice(a.index,0,{...a.item}):n.push({...a.item})}),n}function XRe(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 XQ(e,t){return ZQ(e,t)}function YQ(e,t){return ZQ(e,t)}function hd(e,t){return{id:e,type:"select",selected:t}}function Uu(e,t=new Set,n=!1){const o=[];for(const[r,a]of e){const i=t.has(r);!(a.selected===void 0&&!i)&&a.selected!==i&&(n&&(a.selected=i),o.push(hd(a.id,i)))}return o}function IU({items:e=[],lookup:t}){var r;const n=[],o=new Map(e.map(a=>[a.id,a]));for(const[a,i]of e.entries()){const s=t.get(i.id),c=((r=s==null?void 0:s.internals)==null?void 0:r.userNode)??s;c!==void 0&&c!==i&&n.push({id:i.id,item:i,type:"replace"}),c===void 0&&n.push({item:i,type:"add",index:a})}for(const[a]of t)o.get(a)===void 0&&n.push({id:a,type:"remove"});return n}function AU(e){return{id:e.id,type:"remove"}}const EU=e=>ize(e),YRe=e=>mQ(e);function QQ(e){return m.forwardRef(e)}function jU(e){const[t,n]=m.useState(BigInt(0)),[o]=m.useState(()=>QRe(()=>n(r=>r+BigInt(1))));return $H(()=>{const r=o.get();r.length&&(e(r),o.reset())},[t]),o}function QRe(e){let t=[];return{get:()=>t,reset:()=>{t=[]},push:n=>{t.push(n),e()}}}const JQ=m.createContext(null);function JRe({children:e}){const t=vt(),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=IU({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=jU(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(IU({items:y,lookup:p}))},[]),a=jU(r),i=m.useMemo(()=>({nodeQueue:o,edgeQueue:a}),[]);return f.jsx(JQ.Provider,{value:i,children:e})}function eTe(){const e=m.useContext(JQ);if(!e)throw new Error("useBatchContext must be used within a BatchProvider");return e}const tTe=e=>!!e.panZoom;function aR(){const e=ZRe(),t=vt(),n=eTe(),o=Te(tTe),r=m.useMemo(()=>{const a=u=>t.getState().nodeLookup.get(u),i=u=>{n.nodeQueue.push(u)},s=u=>{n.edgeQueue.push(u)},c=u=>{var v,M;const{nodeLookup:p,nodeOrigin:y}=t.getState(),g=EU(u)?u:p.get(u.id),k=g.parentId?MQ(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 _0(x)},l=(u,p,y={replace:!1})=>{i(g=>g.map(k=>{if(k.id===u){const x=typeof p=="function"?p(k):p;return y.replace&&EU(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&&YRe(x)?x:{...k,...x}}return k}))};return{getNodes:()=>t.getState().nodes.map(u=>({...u})),getNode:u=>{var p;return(p=a(u))==null?void 0:p.internals.userNode},getInternalNode:a,getEdges:()=>{const{edges:u=[]}=t.getState();return u.map(p=>({...p}))},getEdge:u=>t.getState().edgeLookup.get(u),setNodes:i,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 uze({nodesToRemove:u,edgesToRemove:p,nodes:y,edges:g,onBeforeDelete:b}),S=_.length>0,N=C.length>0;if(S){const P=_.map(AU);x==null||x(_),M(P)}if(N){const P=C.map(AU);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=sU(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=_0(x?v:M),b=Jh(w,k);return p&&b>0||b>=w.width*w.height||b>=k.width*k.height}):[]},isNodeIntersecting:(u,p,y=!0)=>{const k=sU(u)?u:c(u);if(!k)return!1;const x=Jh(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 sze(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??yze();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 $U=e=>e.selected,nTe=typeof window<"u"?window:void 0;function oTe({deleteKeyCode:e,multiSelectionKeyCode:t}){const n=vt(),{deleteElements:o}=aR(),r=nf(e,{actInsideInputWithModifier:!1}),a=nf(t,{target:nTe});m.useEffect(()=>{if(r){const{edges:i,nodes:s}=n.getState();o({nodes:s.filter($U),edges:i.filter($U)}),n.setState({nodesSelectionActive:!1})}},[r]),m.useEffect(()=>{n.setState({multiSelectionActive:a})},[a])}function rTe(e){const t=vt();m.useEffect(()=>{const n=()=>{var r,a,i,s;if(!e.current||!(((a=(r=e.current).checkVisibility)==null?void 0:a.call(r))??!0))return!1;const o=RF(e.current);(o.height===0||o.width===0)&&((s=(i=t.getState()).onError)==null||s.call(i,"004",Br.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 iR={position:"absolute",width:"100%",height:"100%",top:0,left:0},aTe=e=>({userSelectionActive:e.userSelectionActive,lib:e.lib,connectionInProgress:e.connection.inProgress});function iTe({onPaneContextMenu:e,zoomOnScroll:t=!0,zoomOnPinch:n=!0,panOnScroll:o=!1,panOnScrollSpeed:r=.5,panOnScrollMode:a=bd.Free,zoomOnDoubleClick:i=!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=vt(),_=m.useRef(null),{userSelectionActive:S,lib:N,connectionInProgress:P}=Te(aTe,St),A=nf(p),E=m.useRef();rTe(_);const z=m.useCallback(W=>{v==null||v({x:W[0],y:W[1],zoom:W[2]}),M||C.setState({transform:W})},[v,M]);return m.useEffect(()=>{if(_.current){E.current=Qze({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:W,y:$,zoom:T}=E.current.getViewport();return C.setState({panZoom:E.current,transform:[W,$,T],domNode:_.current.closest(".react-flow")}),()=>{var D;(D=E.current)==null||D.destroy()}}},[]),m.useEffect(()=>{var W;(W=E.current)==null||W.update({onPaneContextMenu:e,zoomOnScroll:t,zoomOnPinch:n,panOnScroll:o,panOnScrollSpeed:r,panOnScrollMode:a,zoomOnDoubleClick:i,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,a,i,s,A,y,x,S,k,N,z,P,b,w]),f.jsx("div",{className:"react-flow__renderer",ref:_,style:iR,children:g})}const sTe=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function cTe(){const{userSelectionActive:e,userSelectionRect:t}=Te(sTe,St);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 ET=(e,t)=>n=>{n.target===t.current&&(e==null||e(n))},lTe=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,connectionInProgress:e.connection.inProgress,dragging:e.paneDragging});function dTe({isSelecting:e,selectionKeyPressed:t,selectionMode:n=M0.Full,panOnDrag:o,paneClickDistance:r,selectionOnDrag:a,onSelectionStart:i,onSelectionEnd:s,onPaneClick:c,onPaneContextMenu:l,onPaneScroll:h,onPaneMouseEnter:u,onPaneMouseMove:p,onPaneMouseLeave:y,children:g}){const k=vt(),{userSelectionActive:x,elementsSelectable:v,dragging:M,connectionInProgress:w}=Te(lTe,St),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,W=I=>{P.current&&(I.stopPropagation(),P.current=!1)},$=I=>{var X,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||!(a&&L||t)||I.button!==0||!I.isPrimary)return;(J=(X=I.target)==null?void 0:X.setPointerCapture)==null||J.call(X,I.pointerId),P.current=!1;const{x:j,y:K}=Jo(I.nativeEvent,_.current);k.setState({userSelectionRect:{width:0,height:0,startX:j,startY:K,x:j,y:K}}),L||(I.stopPropagation(),I.preventDefault())},T=I=>{const{userSelectionRect:R,transform:L,nodeLookup:V,edgeLookup:H,connectionLookup:j,triggerNodeChanges:K,triggerEdgeChanges:X,defaultEdgeOptions:J,resetSelectedElements:re}=k.getState();if(!_.current||!R)return;const{x:oe,y:ne}=Jo(I.nativeEvent,_.current),{startX:ce,startY:ve}=R;if(!P.current){const le=t?0:r;if(Math.hypot(oe-ce,ne-ve)<=le)return;re(),i==null||i(I)}P.current=!0;const ge={startX:ce,startY:ve,x:oe<ce?oe:ce,y:ne<ve?ne:ve,width:Math.abs(oe-ce),height:Math.abs(ne-ve)},xe=S.current,Re=N.current;S.current=new Set(PF(V,ge,L,n===M0.Partial,!0).map(le=>le.id)),N.current=new Set;const Ye=(J==null?void 0:J.selectable)??!0;for(const le of S.current){const Ie=j.get(le);if(Ie)for(const{edgeId:jt}of Ie.values()){const xt=H.get(jt);xt&&(xt.selectable??Ye)&&N.current.add(jt)}}if(!cU(xe,S.current)){const le=Uu(V,S.current,!0);K(le)}if(!cU(Re,N.current)){const le=Uu(H,N.current);X(le)}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:Ut(["react-flow__pane",{draggable:O,dragging:M,selection:e}]),onClick:b?void 0:ET(A,C),onContextMenu:ET(E,C),onWheel:ET(z,C),onPointerEnter:b?void 0:u,onPointerMove:b?T:p,onPointerUp:b?D:void 0,onPointerDownCapture:b?$:void 0,onClickCapture:b?W:void 0,onPointerLeave:y,ref:C,style:iR,children:[g,f.jsx(cTe,{})]})}function PH({id:e,store:t,unselect:n=!1,nodeRef:o}){const{addSelectedNodes:r,unselectNodesAndEdges:a,multiSelectionActive:i,nodeLookup:s,onError:c}=t.getState(),l=s.get(e);if(!l){c==null||c("012",Br.error012(e));return}t.setState({nodesSelectionActive:!1}),l.selected?(n||l.selected&&i)&&(a({nodes:[l],edges:[]}),requestAnimationFrame(()=>{var h;return(h=o==null?void 0:o.current)==null?void 0:h.blur()})):r([e])}function eJ({nodeRef:e,disabled:t=!1,noDragClassName:n,handleSelector:o,nodeId:r,isSelectable:a,nodeClickDistance:i}){const s=vt(),[c,l]=m.useState(!1),h=m.useRef();return m.useEffect(()=>{h.current=Dze({getStoreItems:()=>s.getState(),onNodeMouseDown:u=>{PH({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:a,nodeId:r,nodeClickDistance:i}),()=>{var u;(u=h.current)==null||u.destroy()}},[n,o,t,a,e,r,i]),c}const uTe=e=>t=>t.selected&&(t.draggable||e&&typeof t.draggable>"u");function tJ(){const e=vt();return m.useCallback(n=>{const{nodeExtent:o,snapToGrid:r,snapGrid:a,nodesDraggable:i,onError:s,updateNodePositions:c,nodeLookup:l,nodeOrigin:h}=e.getState(),u=new Map,p=uTe(i),y=r?a[0]:5,g=r?a[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=bf(M,a));const{position:w,positionAbsolute:b}=gQ({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),hTe=qF.Provider;qF.Consumer;const nJ=()=>m.useContext(qF),fTe=e=>({connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName,rfId:e.rfId}),pTe=(e,t,n)=>o=>{const{connectionClickStartHandle:r,connectionMode:a,connection:i}=o,{fromHandle:s,toHandle:c,isValid:l}=i,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:a===w0.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 yTe({type:e="source",position:t=fe.Top,isValidConnection:n,isConnectable:o=!0,isConnectableStart:r=!0,isConnectableEnd:a=!0,id:i,onConnect:s,children:c,className:l,onMouseDown:h,onTouchStart:u,...p},y){var T,D;const g=i||null,k=e==="target",x=vt(),v=nJ(),{connectOnClick:M,noPanClassName:w,rfId:b}=Te(fTe,St),{connectingFrom:C,connectingTo:_,clickConnecting:S,isPossibleEndHandle:N,connectionInProcess:P,clickConnectionInProcess:A,valid:E}=Te(pTe(v,g,e),St);v||(D=(T=x.getState()).onError)==null||D.call(T,"010",Br.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(Mze(V,H))}R==null||R(V),s==null||s(V)},W=O=>{if(!v)return;const I=CQ(O.nativeEvent);if(r&&(I&&O.button===0||!I)){const R=x.getState();jH.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:K,nodeLookup:X,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=bQ(O.target),oe=n||H,{connection:ne,isValid:ce}=jH.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:K,doc:re,lib:j,nodeLookup:X});ce&&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:Ut(["react-flow__handle",`react-flow__handle-${t}`,"nodrag",w,l,{source:!k,target:k,connectable:o,connectablestart:r,connectableend:a,clickconnecting:S,connectingfrom:C,connectingto:_,valid:E,connectionindicator:o&&(!P||N)&&(P||A?a:r)}]),onMouseDown:W,onTouchStart:W,onClick:M?$:void 0,ref:y,...p,children:c})}const ct=m.memo(QQ(yTe));function mTe({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 gTe({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 kTe(){return null}function vTe({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 XP={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},PU={input:mTe,default:gTe,output:vTe,group:kTe};function xTe(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 wTe=e=>{const{width:t,height:n,x:o,y:r}=Mf(e.nodeLookup,{filter:a=>!!a.selected});return{width:Qo(t)?t:null,height:Qo(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 MTe({onSelectionContextMenu:e,noPanClassName:t,disableKeyboardA11y:n}){const o=vt(),{width:r,height:a,transformString:i,userSelectionActive:s}=Te(wTe,St),c=tJ(),l=m.useRef(null);m.useEffect(()=>{var y;n||(y=l.current)==null||y.focus({preventScroll:!0})},[n]);const h=!s&&r!==null&&a!==null;if(eJ({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(XP,y.key)&&(y.preventDefault(),c({direction:XP[y.key],factor:y.shiftKey?4:1}))};return f.jsx("div",{className:Ut(["react-flow__nodesselection","react-flow__container",t]),style:{transform:i},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:a}})})}const zU=typeof window<"u"?window:void 0,bTe=e=>({nodesSelectionActive:e.nodesSelectionActive,userSelectionActive:e.userSelectionActive});function oJ({children:e,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:o,onPaneMouseLeave:r,onPaneContextMenu:a,onPaneScroll:i,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:W,onSelectionContextMenu:$,noWheelClassName:T,noPanClassName:D,disableKeyboardA11y:O,onViewportChange:I,isControlledViewport:R}){const{nodesSelectionActive:L,userSelectionActive:V}=Te(bTe,St),H=nf(l,{target:zU}),j=nf(k,{target:zU}),K=j||N,X=j||b,J=h&&K!==!0,re=H||V||J;return oTe({deleteKeyCode:c,multiSelectionKeyCode:g}),f.jsx(iTe,{onPaneContextMenu:a,elementsSelectable:v,zoomOnScroll:M,zoomOnPinch:w,panOnScroll:X,panOnScrollSpeed:C,panOnScrollMode:_,zoomOnDoubleClick:S,panOnDrag:!H&&K,defaultViewport:P,translateExtent:A,minZoom:E,maxZoom:z,zoomActivationKeyCode:x,preventScrolling:W,noWheelClassName:T,noPanClassName:D,onViewportChange:I,isControlledViewport:R,paneClickDistance:s,selectionOnDrag:J,children:f.jsxs(dTe,{onSelectionStart:p,onSelectionEnd:y,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:o,onPaneMouseLeave:r,onPaneContextMenu:a,onPaneScroll:i,panOnDrag:K,isSelecting:!!re,selectionMode:u,selectionKeyPressed:H,paneClickDistance:s,selectionOnDrag:J,children:[e,L&&f.jsx(MTe,{onSelectionContextMenu:$,noPanClassName:D,disableKeyboardA11y:O})]})})}oJ.displayName="FlowRenderer";const _Te=m.memo(oJ),CTe=e=>t=>e?PF(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 STe(e){return Te(m.useCallback(CTe(e),[e]),St)}const LTe=e=>e.updateNodeInternals;function NTe(){const e=Te(LTe),[t]=m.useState(()=>typeof ResizeObserver>"u"?null:new ResizeObserver(n=>{const o=new Map;n.forEach(r=>{const a=r.target.getAttribute("data-id");o.set(a,{id:a,nodeElement:r.target,force:!0})}),e(o)}));return m.useEffect(()=>()=>{t==null||t.disconnect()},[t]),t}function ITe({node:e,nodeType:t,hasDimensions:n,resizeObserver:o}){const r=vt(),a=m.useRef(null),i=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(()=>{a.current&&!e.hidden&&(!h||i.current!==a.current)&&(i.current&&(o==null||o.unobserve(i.current)),o==null||o.observe(a.current),i.current=a.current)},[h,e.hidden]),m.useEffect(()=>()=>{i.current&&(o==null||o.unobserve(i.current),i.current=null)},[]),m.useEffect(()=>{if(a.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:a.current,force:!0}]])))}},[e.id,t,e.sourcePosition,e.targetPosition]),a}function ATe({id:e,onClick:t,onMouseEnter:n,onMouseMove:o,onMouseLeave:r,onContextMenu:a,onDoubleClick:i,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}=Te(oe=>{const ne=oe.nodeLookup.get(e),ce=oe.parentLookup.has(e);return{node:ne,internals:ne.internals,isParent:ce}},St);let _=w.type||"default",S=(x==null?void 0:x[_])||PU[_];S===void 0&&(M==null||M("003",Br.error003(_)),_="default",S=(x==null?void 0:x.default)||PU.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=vt(),W=wQ(w),$=ITe({node:w,nodeType:_,hasDimensions:W,resizeObserver:u}),T=eJ({nodeRef:$,disabled:w.hidden||!N,noDragClassName:p,handleSelector:w.dragHandle,nodeId:e,isSelectable:P,nodeClickDistance:v}),D=tJ();if(w.hidden)return null;const O=$a(w),I=xTe(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=a?oe=>a(oe,{...b.userNode}):void 0,K=i?oe=>i(oe,{...b.userNode}):void 0,X=oe=>{const{selectNodesOnDrag:ne,nodeDragThreshold:ce}=z.getState();P&&(!ne||!N||ce>0)&&PH({id:e,store:z,nodeRef:$}),t&&t(oe,{...b.userNode})},J=oe=>{if(!(_Q(oe.nativeEvent)||g)){if(hQ.includes(oe.key)&&P){const ne=oe.key==="Escape";PH({id:e,store:z,unselect:ne,nodeRef:$})}else if(N&&w.selected&&Object.prototype.hasOwnProperty.call(XP,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:XP[oe.key],factor:oe.shiftKey?4:1})}}},re=()=>{var Re;if(g||!((Re=$.current)!=null&&Re.matches(":focus-visible")))return;const{transform:oe,width:ne,height:ce,autoPanOnNodeFocus:ve,setCenter:ge}=z.getState();if(!ve)return;PF(new Map([[e,w]]),{x:0,y:0,width:ne,height:ce},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:Ut(["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:W?"visible":"hidden",...w.style,...I},"data-id":e,"data-testid":`rf__node-${e}`,onMouseEnter:L,onMouseMove:V,onMouseLeave:H,onContextMenu:j,onClick:X,onDoubleClick:K,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:`${WQ}-${k}`,"aria-label":w.ariaLabel,...w.domAttributes,children:f.jsx(hTe,{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 ETe=m.memo(ATe);const jTe=e=>({nodesDraggable:e.nodesDraggable,nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,onError:e.onError});function rJ(e){const{nodesDraggable:t,nodesConnectable:n,nodesFocusable:o,elementsSelectable:r,onError:a}=Te(jTe,St),i=STe(e.onlyRenderVisibleElements),s=NTe();return f.jsx("div",{className:"react-flow__nodes",style:iR,children:i.map(c=>f.jsx(ETe,{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:a},c))})}rJ.displayName="NodeRenderer";const $Te=m.memo(rJ);function PTe(e){return Te(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 a=n.nodeLookup.get(r.source),i=n.nodeLookup.get(r.target);a&&i&&vze({sourceNode:a,targetNode:i,width:n.width,height:n.height,transform:n.transform})&&o.push(r.id)}return o},[e]),St)}const zTe=({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"})},RTe=({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"})},RU={[Qh.Arrow]:zTe,[Qh.ArrowClosed]:RTe};function TTe(e){const t=vt();return m.useMemo(()=>{var r,a;return Object.prototype.hasOwnProperty.call(RU,e)?RU[e]:((a=(r=t.getState()).onError)==null||a.call(r,"009",Br.error009(e)),null)},[e])}const DTe=({id:e,type:t,color:n,width:o=12.5,height:r=12.5,markerUnits:a="strokeWidth",strokeWidth:i,orient:s="auto-start-reverse"})=>{const c=TTe(t);return c?f.jsx("marker",{className:"react-flow__arrowhead",id:e,markerWidth:`${o}`,markerHeight:`${r}`,viewBox:"-10 -10 20 20",markerUnits:a,orient:s,refX:"0",refY:"0",children:f.jsx(c,{color:n,strokeWidth:i})}):null},aJ=({defaultColor:e,rfId:t})=>{const n=Te(a=>a.edges),o=Te(a=>a.defaultEdgeOptions),r=m.useMemo(()=>Lze(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(a=>f.jsx(DTe,{id:a.id,type:a.type,color:a.color,width:a.width,height:a.height,markerUnits:a.markerUnits,strokeWidth:a.strokeWidth,orient:a.orient},a.id))})}):null};aJ.displayName="MarkerDefinitions";var HTe=m.memo(aJ);function iJ({x:e,y:t,label:n,labelStyle:o,labelShowBg:r=!0,labelBgStyle:a,labelBgPadding:i=[2,4],labelBgBorderRadius:s=2,children:c,className:l,...h}){const[u,p]=m.useState({x:1,y:0,width:0,height:0}),y=Ut(["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*i[0],x:-i[0],y:-i[1],height:u.height+2*i[1],className:"react-flow__edge-textbg",style:a,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}iJ.displayName="EdgeText";const OTe=m.memo(iJ);function Cf({path:e,labelX:t,labelY:n,label:o,labelStyle:r,labelShowBg:a,labelBgStyle:i,labelBgPadding:s,labelBgBorderRadius:c,interactionWidth:l=20,...h}){return f.jsxs(f.Fragment,{children:[f.jsx("path",{...h,d:e,fill:"none",className:Ut(["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&&Qo(t)&&Qo(n)?f.jsx(OTe,{x:t,y:n,label:o,labelStyle:r,labelShowBg:a,labelBgStyle:i,labelBgPadding:s,labelBgBorderRadius:c}):null]})}function TU({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 sJ({sourceX:e,sourceY:t,sourcePosition:n=fe.Bottom,targetX:o,targetY:r,targetPosition:a=fe.Top}){const[i,s]=TU({pos:n,x1:e,y1:t,x2:o,y2:r}),[c,l]=TU({pos:a,x1:o,y1:r,x2:e,y2:t}),[h,u,p,y]=SQ({sourceX:e,sourceY:t,targetX:o,targetY:r,sourceControlX:i,sourceControlY:s,targetControlX:c,targetControlY:l});return[`M${e},${t} C${i},${s} ${c},${l} ${o},${r}`,h,u,p,y]}function cJ(e){return m.memo(({id:t,sourceX:n,sourceY:o,targetX:r,targetY:a,sourcePosition:i,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]=sJ({sourceX:n,sourceY:o,sourcePosition:i,targetX:r,targetY:a,targetPosition:s}),C=e.isInternal?void 0:t;return f.jsx(Cf,{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 FTe=cJ({isInternal:!1}),lJ=cJ({isInternal:!0});FTe.displayName="SimpleBezierEdge";lJ.displayName="SimpleBezierEdgeInternal";function dJ(e){return m.memo(({id:t,sourceX:n,sourceY:o,targetX:r,targetY:a,label:i,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]=tf({sourceX:n,sourceY:o,sourcePosition:y,targetX:r,targetY:a,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(Cf,{id:_,path:w,labelX:b,labelY:C,label:i,labelStyle:s,labelShowBg:c,labelBgStyle:l,labelBgPadding:h,labelBgBorderRadius:u,style:p,markerEnd:k,markerStart:x,interactionWidth:M})})}const uJ=dJ({isInternal:!1}),hJ=dJ({isInternal:!0});uJ.displayName="SmoothStepEdge";hJ.displayName="SmoothStepEdgeInternal";function fJ(e){return m.memo(({id:t,...n})=>{var r;const o=e.isInternal?void 0:t;return f.jsx(uJ,{...n,id:o,pathOptions:m.useMemo(()=>{var a;return{borderRadius:0,offset:(a=n.pathOptions)==null?void 0:a.offset}},[(r=n.pathOptions)==null?void 0:r.offset])})})}const qTe=fJ({isInternal:!1}),pJ=fJ({isInternal:!0});qTe.displayName="StepEdge";pJ.displayName="StepEdgeInternal";function yJ(e){return m.memo(({id:t,sourceX:n,sourceY:o,targetX:r,targetY:a,label:i,labelStyle:s,labelShowBg:c,labelBgStyle:l,labelBgPadding:h,labelBgBorderRadius:u,style:p,markerEnd:y,markerStart:g,interactionWidth:k})=>{const[x,v,M]=NQ({sourceX:n,sourceY:o,targetX:r,targetY:a}),w=e.isInternal?void 0:t;return f.jsx(Cf,{id:w,path:x,labelX:v,labelY:M,label:i,labelStyle:s,labelShowBg:c,labelBgStyle:l,labelBgPadding:h,labelBgBorderRadius:u,style:p,markerEnd:y,markerStart:g,interactionWidth:k})})}const VTe=yJ({isInternal:!1}),mJ=yJ({isInternal:!0});VTe.displayName="StraightEdge";mJ.displayName="StraightEdgeInternal";function gJ(e){return m.memo(({id:t,sourceX:n,sourceY:o,targetX:r,targetY:a,sourcePosition:i=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]=tR({sourceX:n,sourceY:o,sourcePosition:i,targetX:r,targetY:a,targetPosition:s,curvature:v==null?void 0:v.curvature}),_=e.isInternal?void 0:t;return f.jsx(Cf,{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 BTe=gJ({isInternal:!1}),kJ=gJ({isInternal:!0});BTe.displayName="BezierEdge";kJ.displayName="BezierEdgeInternal";const DU={default:kJ,straight:mJ,step:pJ,smoothstep:hJ,simplebezier:lJ},HU={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null},UTe=(e,t,n)=>n===fe.Left?e-t:n===fe.Right?e+t:e,WTe=(e,t,n)=>n===fe.Top?e-t:n===fe.Bottom?e+t:e,OU="react-flow__edgeupdater";function FU({position:e,centerX:t,centerY:n,radius:o=10,onMouseDown:r,onMouseEnter:a,onMouseOut:i,type:s}){return f.jsx("circle",{onMouseDown:r,onMouseEnter:a,onMouseOut:i,className:Ut([OU,`${OU}-${s}`]),cx:UTe(t,o,e),cy:WTe(n,o,e),r:o,stroke:"transparent",fill:"transparent"})}function GTe({isReconnectable:e,reconnectRadius:t,edge:n,sourceX:o,sourceY:r,targetX:a,targetY:i,sourcePosition:s,targetPosition:c,onReconnect:l,onReconnectStart:h,onReconnectEnd:u,setReconnecting:p,setUpdateHover:y}){const g=vt(),k=(b,C)=>{if(b.button!==0)return;const{autoPanOnConnect:_,domNode:S,connectionMode:N,connectionRadius:P,lib:A,onConnectStart:E,cancelConnection:z,nodeLookup:W,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)};jH.onPointerDown(b.nativeEvent,{autoPanOnConnect:_,connectionMode:N,connectionRadius:P,domNode:S,handleId:C.id,nodeId:C.nodeId,nodeLookup:W,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(FU,{position:s,centerX:o,centerY:r,radius:t,onMouseDown:x,onMouseEnter:M,onMouseOut:w,type:"source"}),(e===!0||e==="target")&&f.jsx(FU,{position:c,centerX:a,centerY:i,radius:t,onMouseDown:v,onMouseEnter:M,onMouseOut:w,type:"target"})]})}function KTe({id:e,edgesFocusable:t,edgesReconnectable:n,elementsSelectable:o,onClick:r,onDoubleClick:a,onContextMenu:i,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=Te(ge=>ge.edgeLookup.get(e));const b=Te(ge=>ge.defaultEdgeOptions);w=b?{...b,...w}:w;let C=w.type||"default",_=(k==null?void 0:k[C])||DU[C];_===void 0&&(v==null||v("011",Br.error011(C)),C="default",_=(k==null?void 0:k.default)||DU.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),[W,$]=m.useState(!1),T=vt(),{zIndex:D,sourceX:O,sourceY:I,targetX:R,targetY:L,sourcePosition:V,targetPosition:H}=Te(m.useCallback(ge=>{const xe=ge.nodeLookup.get(w.source),Re=ge.nodeLookup.get(w.target);if(!xe||!Re)return{zIndex:w.zIndex,...HU};const Ye=Sze({id:e,sourceNode:xe,targetNode:Re,sourceHandle:w.sourceHandle||null,targetHandle:w.targetHandle||null,connectionMode:ge.connectionMode,onError:v});return{zIndex:kze({selected:w.selected,zIndex:w.zIndex,sourceNode:xe,targetNode:Re,elevateOnSelect:ge.elevateEdgesOnSelect,zIndexMode:ge.zIndexMode}),...Ye||HU}},[w.source,w.target,w.sourceHandle,w.targetHandle,w.selected,w.zIndex]),St),j=m.useMemo(()=>w.markerStart?`url('#${AH(w.markerStart,g)}')`:void 0,[w.markerStart,g]),K=m.useMemo(()=>w.markerEnd?`url('#${AH(w.markerEnd,g)}')`:void 0,[w.markerEnd,g]);if(w.hidden||O===null||I===null||R===null||L===null)return null;const X=ge=>{var le;const{addSelectedEdges:xe,unselectNodesAndEdges:Re,multiSelectionActive:Ye}=T.getState();P&&(T.setState({nodesSelectionActive:!1}),w.selected&&Ye?(Re({nodes:[],edges:[w]}),(le=A.current)==null||le.blur()):xe([e])),r&&r(ge,w)},J=a?ge=>{a(ge,{...w})}:void 0,re=i?ge=>{i(ge,{...w})}:void 0,oe=s?ge=>{s(ge,{...w})}:void 0,ne=c?ge=>{c(ge,{...w})}:void 0,ce=l?ge=>{l(ge,{...w})}:void 0,ve=ge=>{var xe;if(!M&&hQ.includes(ge.key)&&P){const{unselectNodesAndEdges:Re,addSelectedEdges:Ye}=T.getState();ge.key==="Escape"?((xe=A.current)==null||xe.blur(),Re({edges:[w]})):Ye([e])}};return f.jsx("svg",{style:{zIndex:D},children:f.jsxs("g",{className:Ut(["react-flow__edge",`react-flow__edge-${C}`,w.className,x,{selected:w.selected,animated:w.animated,inactive:!P&&!r,updating:E,selectable:P}]),onClick:X,onDoubleClick:J,onContextMenu:re,onMouseEnter:oe,onMouseMove:ne,onMouseLeave:ce,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?`${GQ}-${g}`:void 0,ref:A,...w.domAttributes,children:[!W&&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:K,pathOptions:"pathOptions"in w?w.pathOptions:void 0,interactionWidth:w.interactionWidth}),N&&f.jsx(GTe,{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 ZTe=m.memo(KTe);const XTe=e=>({edgesFocusable:e.edgesFocusable,edgesReconnectable:e.edgesReconnectable,elementsSelectable:e.elementsSelectable,connectionMode:e.connectionMode,onError:e.onError});function vJ({defaultMarkerColor:e,onlyRenderVisibleElements:t,rfId:n,edgeTypes:o,noPanClassName:r,onReconnect:a,onEdgeContextMenu:i,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}=Te(XTe,St),b=PTe(t);return f.jsxs("div",{className:"react-flow__edges",children:[f.jsx(HTe,{defaultColor:e,rfId:n}),b.map(C=>f.jsx(ZTe,{id:C,edgesFocusable:x,edgesReconnectable:v,elementsSelectable:M,noPanClassName:r,onReconnect:a,onContextMenu:i,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))]})}vJ.displayName="EdgeRenderer";const YTe=m.memo(vJ),QTe=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function JTe({children:e}){const t=Te(QTe);return f.jsx("div",{className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:t},children:e})}function eDe(e){const t=aR(),n=m.useRef(!1);m.useEffect(()=>{!n.current&&t.viewportInitialized&&e&&(setTimeout(()=>e(t),1),n.current=!0)},[e,t.viewportInitialized])}const tDe=e=>{var t;return(t=e.panZoom)==null?void 0:t.syncViewport};function nDe(e){const t=Te(tDe),n=vt();return m.useEffect(()=>{e&&(t==null||t(e),n.setState({transform:[e.x,e.y,e.zoom]}))},[e,t]),null}function oDe(e){return e.connection.inProgress?{...e.connection,to:_f(e.connection.to,e.transform)}:{...e.connection}}function rDe(e){return oDe}function aDe(e){const t=rDe();return Te(t,St)}const iDe=e=>({nodesConnectable:e.nodesConnectable,isValid:e.connection.isValid,inProgress:e.connection.inProgress,width:e.width,height:e.height});function sDe({containerStyle:e,style:t,type:n,component:o}){const{nodesConnectable:r,width:a,height:i,isValid:s,inProgress:c}=Te(iDe,St);return!(a&&r&&c)?null:f.jsx("svg",{style:e,width:a,height:i,className:"react-flow__connectionline react-flow__container",children:f.jsx("g",{className:Ut(["react-flow__connection",yQ(s)]),children:f.jsx(xJ,{style:t,type:n,CustomComponent:o,isValid:s})})})}const xJ=({style:e,type:t=mi.Bezier,CustomComponent:n,isValid:o})=>{const{inProgress:r,from:a,fromNode:i,fromHandle:s,fromPosition:c,to:l,toNode:h,toHandle:u,toPosition:p,pointer:y}=aDe();if(!r)return;if(n)return f.jsx(n,{connectionLineType:t,connectionLineStyle:e,fromNode:i,fromHandle:s,fromX:a.x,fromY:a.y,toX:l.x,toY:l.y,fromPosition:c,toPosition:p,connectionStatus:yQ(o),toNode:h,toHandle:u,pointer:y});let g="";const k={sourceX:a.x,sourceY:a.y,sourcePosition:c,targetX:l.x,targetY:l.y,targetPosition:p};switch(t){case mi.Bezier:[g]=tR(k);break;case mi.SimpleBezier:[g]=sJ(k);break;case mi.Step:[g]=tf({...k,borderRadius:0});break;case mi.SmoothStep:[g]=tf(k);break;default:[g]=NQ(k)}return f.jsx("path",{d:g,fill:"none",className:"react-flow__connection-path",style:e})};xJ.displayName="ConnectionLine";const cDe={};function qU(e=cDe){m.useRef(e),vt(),m.useEffect(()=>{},[e])}function lDe(){vt(),m.useRef(!1),m.useEffect(()=>{},[])}function wJ({nodeTypes:e,edgeTypes:t,onInit:n,onNodeClick:o,onEdgeClick:r,onNodeDoubleClick:a,onEdgeDoubleClick:i,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:W,maxZoom:$,preventScrolling:T,defaultMarkerColor:D,zoomOnScroll:O,zoomOnPinch:I,panOnScroll:R,panOnScrollSpeed:L,panOnScrollMode:V,zoomOnDoubleClick:H,panOnDrag:j,onPaneClick:K,onPaneMouseEnter:X,onPaneMouseMove:J,onPaneMouseLeave:re,onPaneScroll:oe,onPaneContextMenu:ne,paneClickDistance:ce,nodeClickDistance:ve,onEdgeContextMenu:ge,onEdgeMouseEnter:xe,onEdgeMouseMove:Re,onEdgeMouseLeave:Ye,reconnectRadius:le,onReconnect:Ie,onReconnectStart:jt,onReconnectEnd:xt,noDragClassName:Qt,noWheelClassName:se,noPanClassName:Q,disableKeyboardA11y:$t,nodeExtent:hn,rfId:ae,viewport:Y,onViewportChange:he}){return qU(e),qU(t),lDe(),eDe(n),nDe(Y),f.jsx(_Te,{onPaneClick:K,onPaneMouseEnter:X,onPaneMouseMove:J,onPaneMouseLeave:re,onPaneContextMenu:ne,onPaneScroll:oe,paneClickDistance:ce,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:W,maxZoom:$,onSelectionContextMenu:u,preventScrolling:T,noDragClassName:Qt,noWheelClassName:se,noPanClassName:Q,disableKeyboardA11y:$t,onViewportChange:he,isControlledViewport:!!Y,children:f.jsxs(JTe,{children:[f.jsx(YTe,{edgeTypes:t,onEdgeClick:r,onEdgeDoubleClick:i,onReconnect:Ie,onReconnectStart:jt,onReconnectEnd:xt,onlyRenderVisibleElements:P,onEdgeContextMenu:ge,onEdgeMouseEnter:xe,onEdgeMouseMove:Re,onEdgeMouseLeave:Ye,reconnectRadius:le,defaultMarkerColor:D,noPanClassName:Q,disableKeyboardA11y:$t,rfId:ae}),f.jsx(sDe,{style:k,type:g,component:x,containerStyle:v}),f.jsx("div",{className:"react-flow__edgelabel-renderer"}),f.jsx($Te,{nodeTypes:e,onNodeClick:o,onNodeDoubleClick:a,onNodeMouseEnter:s,onNodeMouseMove:c,onNodeMouseLeave:l,onNodeContextMenu:h,nodeClickDistance:ve,onlyRenderVisibleElements:P,noPanClassName:Q,noDragClassName:Qt,disableKeyboardA11y:$t,nodeExtent:hn,rfId:ae}),f.jsx("div",{className:"react-flow__viewport-portal"})]})})}wJ.displayName="GraphView";const dDe=m.memo(wJ),VU=({nodes:e,edges:t,defaultNodes:n,defaultEdges:o,width:r,height:a,fitView:i,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??Yh;EQ(k,x,v);const{nodesInitialized:C}=EH(M,y,g,{nodeOrigin:w,nodeExtent:b,zIndexMode:p});let _=[0,0,1];if(i&&r&&a){const S=Mf(y,{filter:E=>!!((E.width||E.initialWidth)&&(E.height||E.initialHeight))}),{x:N,y:P,zoom:A}=zF(S,r,a,c,l,(s==null?void 0:s.padding)??.1);_=[N,P,A]}return{rfId:"1",width:r??0,height:a??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:Yh,nodeExtent:b,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:w0.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:i??!1,fitViewOptions:s,fitViewResolver:null,connection:{...pQ},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:hze,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1,ariaLabelConfig:fQ,zIndexMode:p,onNodesChangeMiddlewareMap:new Map,onEdgesChangeMiddlewareMap:new Map}},uDe=({nodes:e,edges:t,defaultNodes:n,defaultEdges:o,width:r,height:a,fitView:i,fitViewOptions:s,minZoom:c,maxZoom:l,nodeOrigin:h,nodeExtent:u,zIndexMode:p})=>ARe((y,g)=>{async function k(){const{nodeLookup:x,panZoom:v,fitViewOptions:M,fitViewResolver:w,width:b,height:C,minZoom:_,maxZoom:S}=g();v&&(await dze({nodes:x,width:b,height:C,panZoom:v,minZoom:_,maxZoom:S},M),w==null||w.resolve(!0),y({fitViewResolver:null}))}return{...VU({nodes:e,edges:t,width:r,height:a,fitView:i,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}=EH(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();EQ(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}=Pze(x,M,w,b,C,_,P);E&&(Aze(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)),W={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 $=jd(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(W)}if(M.length>0){const{parentLookup:P,nodeOrigin:A}=g(),E=FF(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 _=XQ(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 _=YQ(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=>hd(S,!0));b(_);return}b(Uu(w,new Set([...x]),!0)),C(Uu(M))},addSelectedEdges:x=>{const{multiSelectionActive:v,edgeLookup:M,nodeLookup:w,triggerNodeChanges:b,triggerEdgeChanges:C}=g();if(v){const _=x.map(S=>hd(S,!0));C(_);return}C(Uu(M,new Set([...x]))),b(Uu(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(hd(E.id,!1))}const A=[];for(const E of N)E.selected&&A.push(hd(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,hd(N.id,!1)]:S,[]),_=x.reduce((S,N)=>N.selected?[...S,hd(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]||(EH(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 zze({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:{...pQ}})},updateConnection:x=>{y({connection:x})},reset:()=>y({...VU()})}},Object.is);function hDe({initialNodes:e,initialEdges:t,defaultNodes:n,defaultEdges:o,initialWidth:r,initialHeight:a,initialMinZoom:i,initialMaxZoom:s,initialFitViewOptions:c,fitView:l,nodeOrigin:h,nodeExtent:u,zIndexMode:p,children:y}){const[g]=m.useState(()=>uDe({nodes:e,edges:t,defaultNodes:n,defaultEdges:o,width:r,height:a,fitView:l,minZoom:i,maxZoom:s,fitViewOptions:c,nodeOrigin:h,nodeExtent:u,zIndexMode:p}));return f.jsx(ERe,{value:g,children:f.jsx(JRe,{children:y})})}function fDe({children:e,nodes:t,edges:n,defaultNodes:o,defaultEdges:r,width:a,height:i,fitView:s,fitViewOptions:c,minZoom:l,maxZoom:h,nodeOrigin:u,nodeExtent:p,zIndexMode:y}){return m.useContext(rR)?f.jsx(f.Fragment,{children:e}):f.jsx(hDe,{initialNodes:t,initialEdges:n,defaultNodes:o,defaultEdges:r,initialWidth:a,initialHeight:i,fitView:s,initialFitViewOptions:c,initialMinZoom:l,initialMaxZoom:h,nodeOrigin:u,nodeExtent:p,zIndexMode:y,children:e})}const pDe={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};function yDe({nodes:e,edges:t,defaultNodes:n,defaultEdges:o,className:r,nodeTypes:a,edgeTypes:i,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:W,onSelectionDragStart:$,onSelectionDrag:T,onSelectionDragStop:D,onSelectionContextMenu:O,onSelectionStart:I,onSelectionEnd:R,onBeforeDelete:L,connectionMode:V,connectionLineType:H=mi.Bezier,connectionLineStyle:j,connectionLineComponent:K,connectionLineContainerStyle:X,deleteKeyCode:J="Backspace",selectionKeyCode:re="Shift",selectionOnDrag:oe=!1,selectionMode:ne=M0.Full,panActivationKeyCode:ce="Space",multiSelectionKeyCode:ve=ef()?"Meta":"Control",zoomActivationKeyCode:ge=ef()?"Meta":"Control",snapToGrid:xe,snapGrid:Re,onlyRenderVisibleElements:Ye=!1,selectNodesOnDrag:le,nodesDraggable:Ie,autoPanOnNodeFocus:jt,nodesConnectable:xt,nodesFocusable:Qt,nodeOrigin:se=KQ,edgesFocusable:Q,edgesReconnectable:$t,elementsSelectable:hn=!0,defaultViewport:ae=BRe,minZoom:Y=.5,maxZoom:he=2,translateExtent:Ae=Yh,preventScrolling:De=!0,nodeExtent:Ke,defaultMarkerColor:Ft="#b1b1b7",zoomOnScroll:fn=!0,zoomOnPinch:Jt=!0,panOnScroll:ke=!1,panOnScrollSpeed:Le=.5,panOnScrollMode:Ht=bd.Free,zoomOnDoubleClick:Pn=!0,panOnDrag:en=!0,onPaneClick:n2,onPaneMouseEnter:ko,onPaneMouseMove:Xn,onPaneMouseLeave:Ra,onPaneScroll:Qe,onPaneContextMenu:Wt,paneClickDistance:Jd=1,nodeClickDistance:eu=0,children:tu,onReconnect:nu,onReconnectStart:ou,onReconnectEnd:ru,onEdgeContextMenu:Zi,onEdgeDoubleClick:Xi,onEdgeMouseEnter:Yi,onEdgeMouseMove:Qi,onEdgeMouseLeave:ta,reconnectRadius:na=10,onNodesChange:au,onEdgesChange:iu,noDragClassName:zo="nodrag",noWheelClassName:Ji="nowheel",noPanClassName:Fe="nopan",fitView:Nt,fitViewOptions:Ta,connectOnClick:su,attributionPosition:oa,proOptions:ur,defaultEdgeOptions:ra,elevateNodesOnSelect:vo=!0,elevateEdgesOnSelect:Yn=!1,disableKeyboardA11y:sn=!1,autoPanOnConnect:Gt,autoPanOnNodeDrag:Ro,autoPanSpeed:es,connectionRadius:cu,isValidConnection:To,onError:ts,style:pt,id:Qn,nodeDragThreshold:Da,connectionDragThreshold:lu,viewport:aa,onViewportChange:ia,width:du,height:ns,colorMode:hr="light",debug:sa,onScroll:tn,ariaLabelConfig:fr,zIndexMode:Ha="basic",...Do},zn){const Jn=Qn||"1",Oa=KRe(hr),xo=m.useCallback(ca=>{ca.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),tn==null||tn(ca)},[tn]);return f.jsx("div",{"data-testid":"rf__wrapper",...Do,onScroll:xo,style:{...pt,...pDe},ref:zn,className:Ut(["react-flow",r,Oa]),id:Qn,role:"application",children:f.jsxs(fDe,{nodes:e,edges:t,width:du,height:ns,fitView:Nt,fitViewOptions:Ta,minZoom:Y,maxZoom:he,nodeOrigin:se,nodeExtent:Ke,zIndexMode:Ha,children:[f.jsx(GRe,{nodes:e,edges:t,defaultNodes:n,defaultEdges:o,onConnect:y,onConnectStart:g,onConnectEnd:k,onClickConnectStart:x,onClickConnectEnd:v,nodesDraggable:Ie,autoPanOnNodeFocus:jt,nodesConnectable:xt,nodesFocusable:Qt,edgesFocusable:Q,edgesReconnectable:$t,elementsSelectable:hn,elevateNodesOnSelect:vo,elevateEdgesOnSelect:Yn,minZoom:Y,maxZoom:he,nodeExtent:Ke,onNodesChange:au,onEdgesChange:iu,snapToGrid:xe,snapGrid:Re,connectionMode:V,translateExtent:Ae,connectOnClick:su,defaultEdgeOptions:ra,fitView:Nt,fitViewOptions:Ta,onNodesDelete:A,onEdgesDelete:E,onDelete:z,onNodeDragStart:S,onNodeDrag:N,onNodeDragStop:P,onSelectionDrag:T,onSelectionDragStart:$,onSelectionDragStop:D,onMove:h,onMoveStart:u,onMoveEnd:p,noPanClassName:Fe,nodeOrigin:se,rfId:Jn,autoPanOnConnect:Gt,autoPanOnNodeDrag:Ro,autoPanSpeed:es,onError:ts,connectionRadius:cu,isValidConnection:To,selectNodesOnDrag:le,nodeDragThreshold:Da,connectionDragThreshold:lu,onBeforeDelete:L,debug:sa,ariaLabelConfig:fr,zIndexMode:Ha}),f.jsx(dDe,{onInit:l,onNodeClick:s,onEdgeClick:c,onNodeMouseEnter:M,onNodeMouseMove:w,onNodeMouseLeave:b,onNodeContextMenu:C,onNodeDoubleClick:_,nodeTypes:a,edgeTypes:i,connectionLineType:H,connectionLineStyle:j,connectionLineComponent:K,connectionLineContainerStyle:X,selectionKeyCode:re,selectionOnDrag:oe,selectionMode:ne,deleteKeyCode:J,multiSelectionKeyCode:ve,panActivationKeyCode:ce,zoomActivationKeyCode:ge,onlyRenderVisibleElements:Ye,defaultViewport:ae,translateExtent:Ae,minZoom:Y,maxZoom:he,preventScrolling:De,zoomOnScroll:fn,zoomOnPinch:Jt,zoomOnDoubleClick:Pn,panOnScroll:ke,panOnScrollSpeed:Le,panOnScrollMode:Ht,panOnDrag:en,onPaneClick:n2,onPaneMouseEnter:ko,onPaneMouseMove:Xn,onPaneMouseLeave:Ra,onPaneScroll:Qe,onPaneContextMenu:Wt,paneClickDistance:Jd,nodeClickDistance:eu,onSelectionContextMenu:O,onSelectionStart:I,onSelectionEnd:R,onReconnect:nu,onReconnectStart:ou,onReconnectEnd:ru,onEdgeContextMenu:Zi,onEdgeDoubleClick:Xi,onEdgeMouseEnter:Yi,onEdgeMouseMove:Qi,onEdgeMouseLeave:ta,reconnectRadius:na,defaultMarkerColor:Ft,noDragClassName:zo,noWheelClassName:Ji,noPanClassName:Fe,rfId:Jn,disableKeyboardA11y:sn,nodeExtent:Ke,viewport:aa,onViewportChange:ia}),f.jsx(VRe,{onSelectionChange:W}),tu,f.jsx(DRe,{proOptions:ur,position:oa}),f.jsx(TRe,{rfId:Jn,disableKeyboardA11y:sn})]})})}var mDe=QQ(yDe);const gDe=e=>{var t;return(t=e.domNode)==null?void 0:t.querySelector(".react-flow__edgelabel-renderer")};function kDe({children:e}){const t=Te(gDe);return t?Od.createPortal(e,t):null}const vDe=e=>{var t;return(t=e.domNode)==null?void 0:t.querySelector(".react-flow__viewport-portal")};function xDe({children:e}){const t=Te(vDe);return t?Od.createPortal(e,t):null}function MJ(){const e=vt();return m.useCallback(t=>{const{domNode:n,updateNodeInternals:o}=e.getState(),r=Array.isArray(t)?t:[t],a=new Map;r.forEach(i=>{const s=n==null?void 0:n.querySelector(`.react-flow__node[data-id="${i}"]`);s&&a.set(i,{id:i,nodeElement:s,force:!0})}),requestAnimationFrame(()=>o(a,{triggerFitView:!1}))},[])}function BU(e){return Te(m.useCallback(n=>n.nodeLookup.get(e),[e]),St)}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:Ut(["react-flow__background-pattern",n,o])})}function MDe({radius:e,className:t}){return f.jsx("circle",{cx:e,cy:e,r:e,className:Ut(["react-flow__background-pattern","dots",t])})}var Ei;(function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"})(Ei||(Ei={}));const bDe={[Ei.Dots]:1,[Ei.Lines]:1,[Ei.Cross]:6},_De=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function bJ({id:e,variant:t=Ei.Dots,gap:n=20,size:o,lineWidth:r=1,offset:a=0,color:i,bgColor:s,style:c,className:l,patternClassName:h}){const u=m.useRef(null),{transform:p,patternId:y}=Te(_De,St),g=o||bDe[t],k=t===Ei.Dots,x=t===Ei.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(a)?a:[a,a],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:Ut(["react-flow__background",l]),style:{...c,...iR,"--xy-background-color-props":s,"--xy-background-pattern-color-props":i},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(MDe,{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})`})]})}bJ.displayName="Background";const CDe=m.memo(bJ);function SDe(){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 LDe(){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 NDe(){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 IDe(){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 ADe(){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 Wu({children:e,className:t,...n}){return f.jsx("button",{type:"button",className:Ut(["react-flow__controls-button",t]),...n,children:e})}const EDe=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom,ariaLabelConfig:e.ariaLabelConfig});function _J({style:e,showZoom:t=!0,showFitView:n=!0,showInteractive:o=!0,fitViewOptions:r,onZoomIn:a,onZoomOut:i,onFitView:s,onInteractiveChange:c,className:l,children:h,position:u="bottom-left",orientation:p="vertical","aria-label":y}){const g=vt(),{isInteractive:k,minZoomReached:x,maxZoomReached:v,ariaLabelConfig:M}=Te(EDe,St),{zoomIn:w,zoomOut:b,fitView:C}=aR(),_=()=>{w(),a==null||a()},S=()=>{b(),i==null||i()},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(L0,{className:Ut(["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(Wu,{onClick:_,className:"react-flow__controls-zoomin",title:M["controls.zoomIn.ariaLabel"],"aria-label":M["controls.zoomIn.ariaLabel"],disabled:v,children:f.jsx(SDe,{})}),f.jsx(Wu,{onClick:S,className:"react-flow__controls-zoomout",title:M["controls.zoomOut.ariaLabel"],"aria-label":M["controls.zoomOut.ariaLabel"],disabled:x,children:f.jsx(LDe,{})})]}),n&&f.jsx(Wu,{className:"react-flow__controls-fitview",onClick:N,title:M["controls.fitView.ariaLabel"],"aria-label":M["controls.fitView.ariaLabel"],children:f.jsx(NDe,{})}),o&&f.jsx(Wu,{className:"react-flow__controls-interactive",onClick:P,title:M["controls.interactive.ariaLabel"],"aria-label":M["controls.interactive.ariaLabel"],children:k?f.jsx(ADe,{}):f.jsx(IDe,{})}),h]})}_J.displayName="Controls";const jDe=m.memo(_J);function $De({id:e,x:t,y:n,width:o,height:r,style:a,color:i,strokeColor:s,strokeWidth:c,className:l,borderRadius:h,shapeRendering:u,selected:p,onClick:y}){const{background:g,backgroundColor:k}=a||{},x=i||g||k;return f.jsx("rect",{className:Ut(["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 PDe=m.memo($De),zDe=e=>e.nodes.map(t=>t.id),jT=e=>e instanceof Function?e:()=>e;function RDe({nodeStrokeColor:e,nodeColor:t,nodeClassName:n="",nodeBorderRadius:o=5,nodeStrokeWidth:r,nodeComponent:a=PDe,onClick:i}){const s=Te(zDe,St),c=jT(t),l=jT(e),h=jT(n),u=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return f.jsx(f.Fragment,{children:s.map(p=>f.jsx(DDe,{id:p,nodeColorFunc:c,nodeStrokeColorFunc:l,nodeClassNameFunc:h,nodeBorderRadius:o,nodeStrokeWidth:r,NodeComponent:a,onClick:i,shapeRendering:u},p))})}function TDe({id:e,nodeColorFunc:t,nodeStrokeColorFunc:n,nodeClassNameFunc:o,nodeBorderRadius:r,nodeStrokeWidth:a,shapeRendering:i,NodeComponent:s,onClick:c}){const{node:l,x:h,y:u,width:p,height:y}=Te(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}=$a(x);return{node:x,x:v,y:M,width:w,height:b}},St);return!l||l.hidden||!wQ(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:a,shapeRendering:i,onClick:c,id:l.id})}const DDe=m.memo(TDe);var HDe=m.memo(RDe);const ODe=200,FDe=150,qDe=e=>!e.hidden,VDe=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?xQ(Mf(e.nodeLookup,{filter:qDe}),t):t,rfId:e.rfId,panZoom:e.panZoom,translateExtent:e.translateExtent,flowWidth:e.width,flowHeight:e.height,ariaLabelConfig:e.ariaLabelConfig}},BDe="react-flow__minimap-desc";function CJ({style:e,className:t,nodeStrokeColor:n,nodeColor:o,nodeClassName:r="",nodeBorderRadius:a=5,nodeStrokeWidth:i,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=vt(),_=m.useRef(null),{boundingRect:S,viewBB:N,rfId:P,panZoom:A,translateExtent:E,flowWidth:z,flowHeight:W,ariaLabelConfig:$}=Te(VDe,St),T=(e==null?void 0:e.width)??ODe,D=(e==null?void 0:e.height)??FDe,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,K=S.y-(V-S.height)/2-H,X=L+H*2,J=V+H*2,re=`${BDe}-${P}`,oe=m.useRef(0),ne=m.useRef();oe.current=R,m.useEffect(()=>{if(_.current&&A)return ne.current=Bze({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:W,inversePan:M,pannable:k,zoomStep:w,zoomable:x})},[k,x,M,w,E,z,W]);const ce=y?xe=>{var le;const[Re,Ye]=((le=ne.current)==null?void 0:le.pointer(xe))||[0,0];y(xe,{x:Re,y:Ye})}:void 0,ve=g?m.useCallback((xe,Re)=>{const Ye=C.getState().nodeLookup.get(Re).internals.userNode;g(xe,Ye)},[]):void 0,ge=v??$["minimap.ariaLabel"];return f.jsx(L0,{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 i=="number"?i:void 0},className:Ut(["react-flow__minimap",t]),"data-testid":"rf__minimap",children:f.jsxs("svg",{width:T,height:D,viewBox:`${j} ${K} ${X} ${J}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":re,ref:_,onClick:ce,children:[ge&&f.jsx("title",{id:re,children:ge}),f.jsx(HDe,{onClick:ve,nodeColor:o,nodeStrokeColor:n,nodeBorderRadius:a,nodeClassName:r,nodeStrokeWidth:i,nodeComponent:s}),f.jsx("path",{className:"react-flow__minimap-mask",d:`M${j-H},${K-H}h${X+H*2}v${J+H*2}h${-X-H*2}z
|
|
8468
8468
|
M${N.x},${N.y}h${N.width}v${N.height}h${-N.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}CJ.displayName="MiniMap";const UDe=m.memo(CJ),WDe=e=>t=>e?`${Math.max(1/t.transform[2],1)}`:void 0,GDe={[Ti.Line]:"right",[Ti.Handle]:"bottom-right"};function KDe({nodeId:e,position:t,variant:n=Ti.Handle,className:o,style:r=void 0,children:a,color:i,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=nJ(),w=typeof e=="string"?e:M,b=vt(),C=m.useRef(null),_=n===Ti.Handle,S=Te(m.useCallback(WDe(_&&y),[_,y]),St),N=m.useRef(null),P=t??GDe[n];m.useEffect(()=>{if(!(!C.current||!w))return N.current||(N.current=rRe({domNode:C.current,nodeId:w,getStoreItems:()=>{const{nodeLookup:E,transform:z,snapGrid:W,snapToGrid:$,nodeOrigin:T,domNode:D}=b.getState();return{nodeLookup:E,transform:z,snapGrid:W,snapToGrid:$,nodeOrigin:T,paneDomNode:D}},onChange:(E,z)=>{const{triggerNodeChanges:W,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,...MQ({x:E.x??R.position.x,y:E.y??R.position.y},{width:V,height:H},R.parentId,$,L)}},K=FF([j],$,T,D);O.push(...K),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)}W(O)},onEnd:({width:E,height:z})=>{const W={id:w,type:"dimensions",resizing:!1,dimensions:{width:E,height:z}};b.getState().triggerNodeChanges([W])}})),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:Ut(["react-flow__resize-control","nodrag",...A,n,o]),ref:C,style:{...r,scale:S,...i&&{[_?"backgroundColor":"borderColor"]:i}},children:a})}const UU=m.memo(KDe),ZDe=24,XDe=e=>({type:Qh.ArrowClosed,width:18,height:18,...e?{color:e}:{}}),YDe={solid:{},dashed:{strokeDasharray:"6 4"},dotted:{strokeDasharray:"2 4"}},QDe=3,WU=new WeakMap,JDe=(e,t,n=!1)=>{const o=WU.get(e);if(o&&o.isAdjacentToRunning===t&&o.selected===n)return o.edge;const r=e.style?YDe[e.style]:{},a=Ct(e.color,"edge"),i=e.borderSize??2,s=n?Math.max(QDe,i):i,l={...r,...a,...n?{strokeWidth:s,opacity:1}:{strokeWidth:s}},h=e.direction??"forward",u=a.stroke,p=XDe(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:ZDe};return WU.set(e,{isAdjacentToRunning:t,selected:n,edge:k}),k},eHe=(e,t={})=>{const n=t.setTimer??((l,h)=>globalThis.setTimeout(l,h)),o=t.clearTimer??(l=>{globalThis.clearTimeout(l)});let r=null,a=null;return{schedule:l=>{r!==null&&o(r),a=l,r=n(()=>{r=null;const h=a;a=null,h&&h()},e)},flush:()=>{r!==null&&(o(r),r=null);const l=a;a=null,l&&l()},cancel:()=>{r!==null&&(o(r),r=null),a=null},get pending(){return r!==null}}},SJ="seeflow:detail-panel-width",Lu=380,zH=320,RH=800;function TH(e){return Number.isFinite(e)?e<zH?zH:e>RH?RH:e:Lu}function tHe(){if(typeof window>"u")return Lu;try{const e=window.localStorage.getItem(SJ);if(e===null)return Lu;const t=Number(e);return!Number.isFinite(t)||t<zH||t>RH?Lu:t}catch{return Lu}}function nHe(e){if(!(typeof window>"u"))try{const t=TH(e);window.localStorage.setItem(SJ,String(t))}catch{}}function oHe(e,t,n,o){const r=typeof window>"u"?null:window;if(!r)return;let a=TH(e);const i=c=>{a=TH(e+(t-c.clientX)),n.onWidth(a)},s=()=>{r.removeEventListener("pointermove",i),r.removeEventListener("pointerup",s),r.removeEventListener("pointercancel",s),n.onCommit(a)};r.addEventListener("pointermove",i),r.addEventListener("pointerup",s),r.addEventListener("pointercancel",s)}function rHe(e,t,n){return`${n!==void 0?n.replace(/\/+$/,""):"/api/projects"}/${encodeURIComponent(e)}/files/${encodeURI(t)}`}const YP=(e,t)=>{const n=e.w/2,o=e.h/2,r=e.x+n,a=e.y+o,i=t.x-r,s=t.y-a;if(i===0&&s===0)return{x:r,y:a,side:"right"};const c=Math.abs(i),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+i*p,g=a+s*p,k=c*o>=l*n?i>=0?"right":"left":s>=0?"bottom":"top";return{x:y,y:g,side:k}},DH=(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,a=e.w-n,i=o,s=e.h-o,c=Math.min(r,a,i,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===a?{side:"right",t:l}:c===i?{side:"top",t:h}:{side:"bottom",t:h}},QP=(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)}}},iHe=(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},a={x:t.box.x+t.box.w/2,y:t.box.y+t.box.h/2},i=e.pin?QP(e.box,e.pin):e.autoPicked===!1?e.fallback:YP(e.box,a),s=t.pin?QP(t.box,t.pin):t.autoPicked===!1?t.fallback:YP(t.box,r);return{source:i,target:s}};function vi({initialValue:e,onCommit:t,onExit:n,multiline:o=!1,commitMode:r="enter-commits",required:a=!1,field:i,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(eHe(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 W=x.current;return()=>{W.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),a&&E.trim().length===0){x.current.cancel();return}x.current.schedule(()=>b(E))},_=()=>{x.current.cancel();const E=w();if(a&&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":i,"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 LJ=8,GU=12,KU={height:`${LJ}px`,borderColor:"transparent"},ZU={width:`${LJ}px`,borderColor:"transparent"},sHe={width:`${GU}px`,height:`${GU}px`,background:"transparent",border:"none"},cHe={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},lHe=[{position:"top",style:KU},{position:"bottom",style:KU},{position:"left",style:ZU},{position:"right",style:ZU}],dHe=["top-left","top-right","bottom-left","bottom-right"],XU={pointerEvents:"none",cursor:"default"};function Fd({visible:e,minWidth:t=80,minHeight:n=40,onResizeStart:o,onResize:r,onResizeEnd:a,cornerVariant:i="invisible"}){const s=i==="visible"?cHe:sHe,c=h=>e?h:{...h,...XU},l=e?s:{...s,opacity:0,...XU};return f.jsxs(f.Fragment,{children:[lHe.map(({position:h,style:u})=>f.jsx(UU,{position:h,variant:Ti.Line,minWidth:t,minHeight:n,style:c(u),onResizeStart:o,onResize:r,onResizeEnd:a,children:f.jsx("span",{"data-testid":"resize-control","data-position":h})},h)),dHe.map(h=>f.jsx(UU,{position:h,variant:Ti.Handle,minWidth:t,minHeight:n,style:l,autoScale:!1,onResizeStart:o,onResize:r,onResizeEnd:a,children:f.jsx("span",{"data-testid":"resize-control","data-position":h})},h))]})}function qd(e){const{onResize:t,onResizeEnd:n,onResizeFinal:o,setResizing:r}=e,[a,i]=m.useState(!1),s=m.useRef(null),c=m.useRef(t),l=m.useRef(n),h=m.useRef(o),u=m.useRef(r);m.useEffect(()=>{c.current=t},[t]),m.useEffect(()=>{l.current=n},[n]),m.useEffect(()=>{h.current=o},[o]),m.useEffect(()=>{u.current=r},[r]);const p=m.useCallback((k,x)=>{var v;i(!0),(v=u.current)==null||v.call(u,!0),s.current=x?{x:x.x,y:x.y,width:x.width,height:x.height}:null},[]),y=m.useCallback((k,x)=>{var v;(v=c.current)==null||v.call(c,{x:x.x,y:x.y,width:x.width,height:x.height})},[]),g=m.useCallback((k,x)=>{var M,w,b,C;i(!1),(M=u.current)==null||M.call(u,!1);const v=s.current;s.current=null,!(v&&v.width===x.width&&v.height===x.height)&&((w=c.current)==null||w.call(c,{x:x.x,y:x.y,width:x.width,height:x.height}),(b=l.current)==null||b.call(l,{x:x.x,y:x.y,width:x.width,height:x.height}),v&&((C=h.current)==null||C.call(h,{x:x.x,y:x.y,width:x.width,height:x.height},v)))},[]);return{isResizing:a,onResizeStart:p,onResizeEvent:y,onResizeEnd:g}}const N0={width:48,height:48},uHe=24,hHe=24,_p="sf:opacity-0 sf:transition-opacity";function fHe(e){return Ct(e,"text").color??"currentColor"}function pHe({id:e,data:t,selected:n,isConnectable:o}){const{onResizeStart:r,onResizeEvent:a,onResizeEnd:i}=qd({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}),s=t.width!==void 0||t.height!==void 0,c=!!t.onNameChange,[l,h]=m.useState(!1),{studioBaseUrl:u}=m.useContext(CF),p=fHe(t.color),y=t.strokeWidth??2,g={...s?{}:{width:N0.width,height:N0.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(Fd,{visible:!!n&&!!t.onResize&&!l,cornerVariant:"visible",minWidth:uHe,minHeight:hHe,onResizeStart:r,onResize:a,onResizeEnd:i}),f.jsx(ct,{type:"target",position:fe.Top,id:"t",isConnectable:o,className:te(_p,n&&"sf:opacity-100!")}),f.jsx(ct,{type:"target",position:fe.Left,id:"l",isConnectable:o,className:te(_p,n&&"sf:opacity-100!")}),f.jsx(LY,{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(vi,{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(_p,n&&"sf:opacity-100!")}),f.jsx(ct,{type:"source",position:fe.Bottom,id:"b",isConnectable:o,className:te(_p,n&&"sf:opacity-100!")})]})}function yHe(e,t){return e.selected===t.selected&&e.data===t.data&&e.width===t.width&&e.height===t.height}const mHe=m.memo(pHe,yHe);function gHe(e,t){const n=e.screenToFlowPosition({x:t.width/2,y:t.height/2});return{x:n.x-N0.width/2,y:n.y-N0.height/2}}const NJ="seeflow:icon-recents",kHe=16;function IJ(){if(typeof window>"u")return[];try{const e=window.localStorage.getItem(NJ);if(e===null)return[];const t=JSON.parse(e);return Array.isArray(t)?t.every(n=>typeof n=="string")?t:[]:[]}catch{return[]}}function vHe(e){if(!(typeof window>"u"))try{const n=IJ().filter(r=>r!==e),o=[e,...n].slice(0,kHe);window.localStorage.setItem(NJ,JSON.stringify(o))}catch{}}const xHe=typeof navigator<"u"&&typeof navigator.platform=="string"&&navigator.platform.toLowerCase().includes("mac"),wHe=e=>e.length===1?e.toUpperCase():e==="Escape"?"Esc":e,zt=(e,t=xHe)=>{const n=wHe(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("+")},VF=[{id:"tool.select",label:"Select tool",description:"Switch to the selection tool",category:"Tools",shortcut:zt({key:"V"})},{id:"tool.hand",label:"Hand tool",description:"Pan the canvas; node interaction is suspended while armed",category:"Tools",shortcut:zt({key:"H"})},{id:"tool.rectangle",label:"Rectangle",description:"Draw rectangle nodes",category:"Tools",shortcut:zt({key:"R"})},{id:"tool.ellipse",label:"Ellipse",description:"Draw ellipse nodes",category:"Tools",shortcut:zt({key:"O"})},{id:"tool.text",label:"Text",description:"Add a text node",category:"Tools",shortcut:zt({key:"T"})},{id:"tool.sticky",label:"Sticky note",description:"Add a sticky note",category:"Tools",shortcut:zt({key:"S"})},{id:"tool.database",label:"Database",description:"Add a database node",category:"Tools",shortcut:zt({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:zt({meta:!0,key:"Z"}),enabled:e=>e.canUndo},{id:"edit.redo",label:"Redo",category:"Edit",shortcut:zt({meta:!0,shift:!0,key:"Z"}),enabled:e=>e.canRedo},{id:"edit.copy",label:"Copy",category:"Edit",shortcut:zt({meta:!0,key:"C"}),enabled:e=>e.hasSelection},{id:"edit.paste",label:"Paste",category:"Edit",shortcut:zt({meta:!0,key:"V"}),enabled:e=>e.hasClipboard},{id:"edit.duplicate",label:"Duplicate",category:"Edit",shortcut:zt({meta:!0,key:"D"}),enabled:e=>e.hasSelection},{id:"edit.delete",label:"Delete",category:"Edit",shortcut:zt({key:"Delete"}),enabled:e=>e.hasSelection},{id:"edit.selectAll",label:"Select all",category:"Edit",shortcut:zt({meta:!0,key:"A"})},{id:"view.fit",label:"Fit view",description:"Fit everything in the viewport",category:"View",shortcut:zt({meta:!0,key:"0"})},{id:"view.zoomIn",label:"Zoom in",category:"View",shortcut:zt({meta:!0,key:"="})},{id:"view.zoomOut",label:"Zoom out",category:"View",shortcut:zt({meta:!0,key:"-"})},{id:"view.zoom100",label:"Zoom to 100%",category:"View",shortcut:zt({key:"1"})},{id:"view.zoomToSelection",label:"Zoom to selection",category:"View",shortcut:zt({key:"F"}),enabled:e=>e.hasSelection},{id:"layout.tidy",label:"Tidy layout",description:"Auto-layout the canvas or current selection",category:"Layout",shortcut:zt({meta:!0,shift:!0,key:"L"})},{id:"selection.deselect",label:"Deselect",description:"Clear selection and exit draw mode",category:"Selection",shortcut:zt({key:"Escape"})},{id:"help.commandPalette",label:"Open command palette",category:"Help",shortcut:zt({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}],$T=e=>{const t=VF.find(n=>n.id===e);return t?t.shortcut?`${t.label} (${t.shortcut})`:t.label:""},MHe=1,bHe=10,_He=e=>{if(e.metaKey||e.ctrlKey||e.altKey)return null;const t=e.shiftKey?bHe:MHe;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}},CHe=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}},SHe=(e,t,n)=>{if(t.length===0)return[];const o=new Map(n.map(a=>[a.id,a])),r=[];for(const a of t){const i=o.get(a);i&&r.push({id:a,position:{x:i.position.x+e.dx,y:i.position.y+e.dy}})}return r},LHe=({event:e,isEditableActive:t,hasNodes:n,hasConnectors:o,selectedIds:r,hasClipboard:a})=>{if(!(e.metaKey||e.ctrlKey))return{type:"noop"};if(e.shiftKey||e.altKey)return{type:"noop"};const i=e.key.toLowerCase();return i!=="a"&&i!=="c"&&i!=="v"&&i!=="d"?{type:"noop"}:t?{type:"noop"}:i==="a"?!n&&!o?{type:"noop"}:{type:"selectAll"}:i==="c"?r.length===0?{type:"noop"}:{type:"copy",ids:r}:i==="d"?r.length===0?{type:"noop"}:{type:"duplicate",ids:r}:a?{type:"paste"}:{type:"noop"}},NHe=(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},IHe=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}},ri="seeflow",AJ=e=>`${e}:last-used-style:v1`,PT=()=>({node:{},connector:{}}),zT=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),BF=e=>{var t;try{const n=(t=globalThis.localStorage)==null?void 0:t.getItem(AJ(e));if(!n)return PT();const o=JSON.parse(n);if(!zT(o))return PT();const r=zT(o.node)?o.node:{},a=zT(o.connector)?o.connector:{};return{node:r,connector:a}}catch{return PT()}},EJ=(e,t)=>{var n;try{(n=globalThis.localStorage)==null||n.setItem(AJ(e),JSON.stringify(t))}catch{}},$2=e=>BF(e),YU=(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 a=BF(e);EJ(e,{...a,node:{...a.node,...r}})},AHe=(e,t)=>{const n=BF(e);EJ(e,{...n,connector:{...n.connector,...t}})},UF=1,QU=17,HH=(e,t)=>{if(!e)return{};const n={};for(const o of t)e[o]!==void 0&&(n[o]=e[o]);return n},EHe=["borderColor","backgroundColor","borderSize","borderStyle","fontSize","cornerRadius","shadow"],jHe=["borderColor","backgroundColor","borderSize","borderStyle","fontSize","shadow"],$He=["fontSize"],PHe=["borderColor","borderWidth","borderStyle","shadow"];function JU(e,t,n){if(e==="text")return{width:t.width,height:t.height,fontSize:QU,...HH(n,$He)};const o=e==="ellipse"?jHe:EHe;return{width:t.width,height:t.height,borderSize:UF,fontSize:QU,...HH(n,o)}}function zHe(e,t,n){return{path:e,width:t.width,height:t.height,borderWidth:UF,...HH(n,PHe)}}const mn=async(e,t,n,o,r)=>{const a={method:t},i={...o??{}};r!==void 0&&(i["content-type"]="application/json",a.body=JSON.stringify(r)),Object.keys(i).length>0&&(a.headers=i);const s=await e(n,a);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()},RHe=e=>{const{baseUrl:t,project:n,flow:o}=e,r=e.fetch??globalThis.fetch.bind(globalThis),a=e.EventSource??globalThis.EventSource,i=e.headers,s=`${t}/api/projects/${encodeURIComponent(n)}`,c=`${s}/flows/${encodeURIComponent(o)}`,l=`${t}/api/icons`;return{async createNode(u){const p=await mn(r,"POST",`${c}/nodes`,i,u);return{id:p.id,node:p.node}},async updateNode(u,p){await mn(r,"PATCH",`${c}/nodes/${u}`,i,p)},async updateNodePosition(u,p){return await mn(r,"PATCH",`${c}/nodes/${u}/position`,i,p)},async deleteNode(u){await mn(r,"DELETE",`${c}/nodes/${u}`,i)},async reorderNode(u,p){await mn(r,"PATCH",`${c}/nodes/${u}/order`,i,p)},async createConnector(u){return{id:(await mn(r,"POST",`${c}/connectors`,i,u)).id}},async updateConnector(u,p){await mn(r,"PATCH",`${c}/connectors/${u}`,i,p)},async deleteConnector(u){await mn(r,"DELETE",`${c}/connectors/${u}`,i)},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};i&&(x.headers={...i});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 mn(r,"POST",`${c}/play/${u}`,i,{})},async openFile(u){await mn(r,"POST",`${s}/files/open`,i,{path:u})},async revealFile(u){await mn(r,"POST",`${s}/files/reveal`,i,{path:u})},async computeLayout(u,p){const y=await mn(r,"POST",`${t}/api/layout`,i,{nodes:u,edges:p});return{nodes:y.nodes,connectors:y.connectors}},icons:{async listPacks(){return(await mn(r,"GET",`${l}/packs`,i)).packs},async install(u,p){return{jobId:(await mn(r,"POST",`${l}/install`,i,{vendor:u,acceptTerms:p.acceptTerms??!1})).jobId}},subscribeJob(u,p){const y=`${l}/jobs/${encodeURIComponent(u)}/events`,g=new a(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 mn(r,"DELETE",`${l}/packs/${encodeURIComponent(u)}`,i)},async getLicense(u){const p=await mn(r,"GET",`${l}/licenses/${encodeURIComponent(u)}`,i);return{summary:p.summary,url:p.url,requiresAcceptance:p.requiresAcceptance}}}}},THe=500,DHe=500,HHe=2e3,OHe=(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},eW=(e,t,n)=>{const o=Date.now(),r=THe,a=DHe,{stack:i,cursor:s}=e;if(t.coalesceKey&&s>0){const h=i[s-1];if(h&&h.coalesceKey===t.coalesceKey&&o-h.capturedAt<=a){const u=i.slice(0,s);return u[s-1]={...h,do:t.do,capturedAt:o,beforeFields:OHe(h.beforeFields,t.beforeFields)},{stack:u,cursor:s}}}const c=i.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}},FHe=e=>e.cursor===0?{state:e,entry:void 0}:{state:{...e,cursor:e.cursor-1},entry:e.stack[e.cursor-1]},qHe=e=>e.cursor===e.stack.length?{state:e,entry:void 0}:{state:{...e,cursor:e.cursor+1},entry:e.stack[e.cursor]},jJ=()=>({stack:[],cursor:0}),tW=e=>e.cursor===e.stack.length?e:{stack:e.stack.slice(0,e.cursor),cursor:e.cursor},VHe=(e,t,n=Date.now(),o=HHe)=>n-t>o?jJ():e,BHe=new Set(["borderColor","backgroundColor","borderSize","borderWidth","borderStyle","fontSize","textAlign","cornerRadius","shadow","color","strokeWidth","target"]);function UHe(e,t){let n={stack:[],cursor:0},o=0;const r=new Set;let a=null;const i=()=>({canUndo:n.cursor>0,canRedo:n.cursor<n.stack.length}),s=()=>{const k=i();for(const x of r)x(k)},c=()=>{if(a){o=Date.now();return}const k=tW(n);o=Date.now(),k!==n&&(n=k,s())},l=k=>{if(a){a.ops.push({redo:k.do,undo:k.undo});return}n=eW(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&&BHe.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=FHe(n);k.entry&&(n=k.state,s(),await k.entry.undo())},y=async()=>{const k=qHe(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=jJ(),s()},markExternalChange:()=>{const k=VHe(n,o);k!==n&&(n=k,s())},batch:async(k,x,v)=>{if(a)return x();const M=tW(n);o=Date.now(),M!==n&&(n=M,s());const w={name:k,ops:[]};a=w;try{const b=await x();if(a=null,w.ops.length>0){const C=w.ops.slice();n=eW(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){a=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(i()),()=>{r.delete(k)})}}}function $J(e,t,n){let o=null,r=!1;const a=new ResizeObserver(()=>{r||(o!==null&&clearTimeout(o),o=setTimeout(()=>{o=null,!r&&n()},t))});return a.observe(e),()=>{r||(r=!0,o!==null&&(clearTimeout(o),o=null),a.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 a={};for(const i of r)a[i]=i;return a},e.getValidEnumValues=r=>{const a=e.objectKeys(r).filter(s=>typeof r[r[s]]!="number"),i={};for(const s of a)i[s]=r[s];return e.objectValues(i)},e.objectValues=r=>e.objectKeys(r).map(function(a){return r[a]}),e.objectKeys=typeof Object.keys=="function"?r=>Object.keys(r):r=>{const a=[];for(const i in r)Object.prototype.hasOwnProperty.call(r,i)&&a.push(i);return a},e.find=(r,a)=>{for(const i of r)if(a(i))return i},e.isInteger=typeof Number.isInteger=="function"?r=>Number.isInteger(r):r=>typeof r=="number"&&Number.isFinite(r)&&Math.floor(r)===r;function o(r,a=" | "){return r.map(i=>typeof i=="string"?`'${i}'`:i).join(a)}e.joinValues=o,e.jsonStringifyReplacer=(r,a)=>typeof a=="bigint"?a.toString():a})(st||(st={}));var nW;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(nW||(nW={}));const Ce=st.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),fi=e=>{switch(typeof e){case"undefined":return Ce.undefined;case"string":return Ce.string;case"number":return Number.isNaN(e)?Ce.nan:Ce.number;case"boolean":return Ce.boolean;case"function":return Ce.function;case"bigint":return Ce.bigint;case"symbol":return Ce.symbol;case"object":return Array.isArray(e)?Ce.array:e===null?Ce.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?Ce.promise:typeof Map<"u"&&e instanceof Map?Ce.map:typeof Set<"u"&&e instanceof Set?Ce.set:typeof Date<"u"&&e instanceof Date?Ce.date:Ce.object;default:return Ce.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 Ia 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(a){return a.message},o={_errors:[]},r=a=>{for(const i of a.issues)if(i.code==="invalid_union")i.unionErrors.map(r);else if(i.code==="invalid_return_type")r(i.returnTypeError);else if(i.code==="invalid_arguments")r(i.argumentsError);else if(i.path.length===0)o._errors.push(n(i));else{let s=o,c=0;for(;c<i.path.length;){const l=i.path[c];c===i.path.length-1?(s[l]=s[l]||{_errors:[]},s[l]._errors.push(n(i))):s[l]=s[l]||{_errors:[]},s=s[l],c++}}};return r(this),o}static assert(t){if(!(t instanceof Ia))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 a=r.path[0];n[a]=n[a]||[],n[a].push(t(r))}else o.push(t(r));return{formErrors:o,fieldErrors:n}}get formErrors(){return this.flatten()}}Ia.create=e=>new Ia(e);const OH=(e,t)=>{let n;switch(e.code){case me.invalid_type:e.received===Ce.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 WHe=OH;function GHe(){return WHe}const KHe=e=>{const{data:t,path:n,errorMaps:o,issueData:r}=e,a=[...n,...r.path||[]],i={...r,path:a};if(r.message!==void 0)return{...r,path:a,message:r.message};let s="";const c=o.filter(l=>!!l).slice().reverse();for(const l of c)s=l(i,{data:t,defaultError:s}).message;return{...r,path:a,message:s}};function Me(e,t){const n=GHe(),o=KHe({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===OH?void 0:OH].filter(r=>!!r)});e.common.issues.push(o)}class In{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 a=await r.key,i=await r.value;o.push({key:a,value:i})}return In.mergeObjectSync(t,o)}static mergeObjectSync(t,n){const o={};for(const r of n){const{key:a,value:i}=r;if(a.status==="aborted"||i.status==="aborted")return qe;a.status==="dirty"&&t.dirty(),i.status==="dirty"&&t.dirty(),a.value!=="__proto__"&&(typeof i.value<"u"||r.alwaysSet)&&(o[a.value]=i.value)}return{status:t.value,value:o}}}const qe=Object.freeze({status:"aborted"}),P2=e=>({status:"dirty",value:e}),Po=e=>({status:"valid",value:e}),oW=e=>e.status==="aborted",rW=e=>e.status==="dirty",I0=e=>e.status==="valid",JP=e=>typeof Promise<"u"&&e instanceof Promise;var Ne;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(Ne||(Ne={}));class Ur{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 aW=(e,t)=>{if(I0(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 Ia(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:(i,s)=>{const{message:c}=e;return i.code==="invalid_enum_value"?{message:c??s.defaultError}:typeof s.data>"u"?{message:c??o??s.defaultError}:i.code!=="invalid_type"?{message:s.defaultError}:{message:c??n??s.defaultError}},description:r}}class tt{get description(){return this._def.description}_getType(t){return fi(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:fi(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new In,ctx:{common:t.parent.common,data:t.data,parsedType:fi(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(JP(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:fi(t)},r=this._parseSync({data:t,path:o.path,parent:o});return aW(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:fi(t)};if(!this["~standard"].async)try{const a=this._parseSync({data:t,path:[],parent:n});return I0(a)?{value:a.value}:{issues:n.common.issues}}catch(a){(r=(o=a==null?void 0:a.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(a=>I0(a)?{value:a.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:fi(t)},r=this._parse({data:t,path:o.path,parent:o}),a=await(JP(r)?r:Promise.resolve(r));return aW(o,a)}refine(t,n){const o=r=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(r):n;return this._refinement((r,a)=>{const i=t(r),s=()=>a.addIssue({code:me.custom,...o(r)});return typeof Promise<"u"&&i instanceof Promise?i.then(c=>c?!0:(s(),!1)):i?!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 j0({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 ji.create(this,this._def)}nullable(){return $0.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return qr.create(this)}promise(){return rz.create(this,this._def)}or(t){return tz.create([this,t],this._def)}and(t){return nz.create(this,t,this._def)}transform(t){return new j0({...Ge(this._def),schema:this,typeName:Oe.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new UH({...Ge(this._def),innerType:this,defaultValue:n,typeName:Oe.ZodDefault})}brand(){return new gOe({typeName:Oe.ZodBranded,type:this,...Ge(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new WH({...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 WF.create(this,t)}readonly(){return GH.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const ZHe=/^c[^\s-]{8,}$/i,XHe=/^[0-9a-z]+$/,YHe=/^[0-9A-HJKMNP-TV-Z]{26}$/i,QHe=/^[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,JHe=/^[a-z0-9_-]{21}$/i,eOe=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,tOe=/^[-+]?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)?)??$/,nOe=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,oOe="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let RT;const rOe=/^(?:(?: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])$/,aOe=/^(?:(?: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])$/,iOe=/^(([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]))$/,sOe=/^(([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])$/,cOe=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,lOe=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,PJ="((\\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])))",dOe=new RegExp(`^${PJ}$`);function zJ(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 uOe(e){return new RegExp(`^${zJ(e)}$`)}function hOe(e){let t=`${PJ}T${zJ(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 fOe(e,t){return!!((t==="v4"||!t)&&rOe.test(e)||(t==="v6"||!t)&&iOe.test(e))}function pOe(e,t){if(!eOe.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 yOe(e,t){return!!((t==="v4"||!t)&&aOe.test(e)||(t==="v6"||!t)&&sOe.test(e))}class Ma extends tt{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==Ce.string){const a=this._getOrReturnCtx(t);return Me(a,{code:me.invalid_type,expected:Ce.string,received:a.parsedType}),qe}const o=new In;let r;for(const a of this._def.checks)if(a.kind==="min")t.data.length<a.value&&(r=this._getOrReturnCtx(t,r),Me(r,{code:me.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),o.dirty());else if(a.kind==="max")t.data.length>a.value&&(r=this._getOrReturnCtx(t,r),Me(r,{code:me.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),o.dirty());else if(a.kind==="length"){const i=t.data.length>a.value,s=t.data.length<a.value;(i||s)&&(r=this._getOrReturnCtx(t,r),i?Me(r,{code:me.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}):s&&Me(r,{code:me.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}),o.dirty())}else if(a.kind==="email")nOe.test(t.data)||(r=this._getOrReturnCtx(t,r),Me(r,{validation:"email",code:me.invalid_string,message:a.message}),o.dirty());else if(a.kind==="emoji")RT||(RT=new RegExp(oOe,"u")),RT.test(t.data)||(r=this._getOrReturnCtx(t,r),Me(r,{validation:"emoji",code:me.invalid_string,message:a.message}),o.dirty());else if(a.kind==="uuid")QHe.test(t.data)||(r=this._getOrReturnCtx(t,r),Me(r,{validation:"uuid",code:me.invalid_string,message:a.message}),o.dirty());else if(a.kind==="nanoid")JHe.test(t.data)||(r=this._getOrReturnCtx(t,r),Me(r,{validation:"nanoid",code:me.invalid_string,message:a.message}),o.dirty());else if(a.kind==="cuid")ZHe.test(t.data)||(r=this._getOrReturnCtx(t,r),Me(r,{validation:"cuid",code:me.invalid_string,message:a.message}),o.dirty());else if(a.kind==="cuid2")XHe.test(t.data)||(r=this._getOrReturnCtx(t,r),Me(r,{validation:"cuid2",code:me.invalid_string,message:a.message}),o.dirty());else if(a.kind==="ulid")YHe.test(t.data)||(r=this._getOrReturnCtx(t,r),Me(r,{validation:"ulid",code:me.invalid_string,message:a.message}),o.dirty());else if(a.kind==="url")try{new URL(t.data)}catch{r=this._getOrReturnCtx(t,r),Me(r,{validation:"url",code:me.invalid_string,message:a.message}),o.dirty()}else a.kind==="regex"?(a.regex.lastIndex=0,a.regex.test(t.data)||(r=this._getOrReturnCtx(t,r),Me(r,{validation:"regex",code:me.invalid_string,message:a.message}),o.dirty())):a.kind==="trim"?t.data=t.data.trim():a.kind==="includes"?t.data.includes(a.value,a.position)||(r=this._getOrReturnCtx(t,r),Me(r,{code:me.invalid_string,validation:{includes:a.value,position:a.position},message:a.message}),o.dirty()):a.kind==="toLowerCase"?t.data=t.data.toLowerCase():a.kind==="toUpperCase"?t.data=t.data.toUpperCase():a.kind==="startsWith"?t.data.startsWith(a.value)||(r=this._getOrReturnCtx(t,r),Me(r,{code:me.invalid_string,validation:{startsWith:a.value},message:a.message}),o.dirty()):a.kind==="endsWith"?t.data.endsWith(a.value)||(r=this._getOrReturnCtx(t,r),Me(r,{code:me.invalid_string,validation:{endsWith:a.value},message:a.message}),o.dirty()):a.kind==="datetime"?hOe(a).test(t.data)||(r=this._getOrReturnCtx(t,r),Me(r,{code:me.invalid_string,validation:"datetime",message:a.message}),o.dirty()):a.kind==="date"?dOe.test(t.data)||(r=this._getOrReturnCtx(t,r),Me(r,{code:me.invalid_string,validation:"date",message:a.message}),o.dirty()):a.kind==="time"?uOe(a).test(t.data)||(r=this._getOrReturnCtx(t,r),Me(r,{code:me.invalid_string,validation:"time",message:a.message}),o.dirty()):a.kind==="duration"?tOe.test(t.data)||(r=this._getOrReturnCtx(t,r),Me(r,{validation:"duration",code:me.invalid_string,message:a.message}),o.dirty()):a.kind==="ip"?fOe(t.data,a.version)||(r=this._getOrReturnCtx(t,r),Me(r,{validation:"ip",code:me.invalid_string,message:a.message}),o.dirty()):a.kind==="jwt"?pOe(t.data,a.alg)||(r=this._getOrReturnCtx(t,r),Me(r,{validation:"jwt",code:me.invalid_string,message:a.message}),o.dirty()):a.kind==="cidr"?yOe(t.data,a.version)||(r=this._getOrReturnCtx(t,r),Me(r,{validation:"cidr",code:me.invalid_string,message:a.message}),o.dirty()):a.kind==="base64"?cOe.test(t.data)||(r=this._getOrReturnCtx(t,r),Me(r,{validation:"base64",code:me.invalid_string,message:a.message}),o.dirty()):a.kind==="base64url"?lOe.test(t.data)||(r=this._getOrReturnCtx(t,r),Me(r,{validation:"base64url",code:me.invalid_string,message:a.message}),o.dirty()):st.assertNever(a);return{status:o.value,value:t.data}}_regex(t,n,o){return this.refinement(r=>t.test(r),{validation:n,code:me.invalid_string,...Ne.errToObj(o)})}_addCheck(t){return new Ma({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...Ne.errToObj(t)})}url(t){return this._addCheck({kind:"url",...Ne.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...Ne.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...Ne.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...Ne.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...Ne.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...Ne.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...Ne.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...Ne.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...Ne.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...Ne.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...Ne.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...Ne.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,...Ne.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,...Ne.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...Ne.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...Ne.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...Ne.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...Ne.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...Ne.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...Ne.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...Ne.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...Ne.errToObj(n)})}nonempty(t){return this.min(1,Ne.errToObj(t))}trim(){return new Ma({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Ma({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Ma({...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}}Ma.create=e=>new Ma({checks:[],typeName:Oe.ZodString,coerce:(e==null?void 0:e.coerce)??!1,...Ge(e)});function mOe(e,t){const n=(e.toString().split(".")[1]||"").length,o=(t.toString().split(".")[1]||"").length,r=n>o?n:o,a=Number.parseInt(e.toFixed(r).replace(".","")),i=Number.parseInt(t.toFixed(r).replace(".",""));return a%i/10**r}class A0 extends tt{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)!==Ce.number){const a=this._getOrReturnCtx(t);return Me(a,{code:me.invalid_type,expected:Ce.number,received:a.parsedType}),qe}let o;const r=new In;for(const a of this._def.checks)a.kind==="int"?st.isInteger(t.data)||(o=this._getOrReturnCtx(t,o),Me(o,{code:me.invalid_type,expected:"integer",received:"float",message:a.message}),r.dirty()):a.kind==="min"?(a.inclusive?t.data<a.value:t.data<=a.value)&&(o=this._getOrReturnCtx(t,o),Me(o,{code:me.too_small,minimum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),r.dirty()):a.kind==="max"?(a.inclusive?t.data>a.value:t.data>=a.value)&&(o=this._getOrReturnCtx(t,o),Me(o,{code:me.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),r.dirty()):a.kind==="multipleOf"?mOe(t.data,a.value)!==0&&(o=this._getOrReturnCtx(t,o),Me(o,{code:me.not_multiple_of,multipleOf:a.value,message:a.message}),r.dirty()):a.kind==="finite"?Number.isFinite(t.data)||(o=this._getOrReturnCtx(t,o),Me(o,{code:me.not_finite,message:a.message}),r.dirty()):st.assertNever(a);return{status:r.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,Ne.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Ne.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Ne.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Ne.toString(n))}setLimit(t,n,o,r){return new A0({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:o,message:Ne.toString(r)}]})}_addCheck(t){return new A0({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:Ne.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Ne.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Ne.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Ne.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Ne.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Ne.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:Ne.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Ne.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Ne.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)}}A0.create=e=>new A0({checks:[],typeName:Oe.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...Ge(e)});class of extends tt{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)!==Ce.bigint)return this._getInvalidInput(t);let o;const r=new In;for(const a of this._def.checks)a.kind==="min"?(a.inclusive?t.data<a.value:t.data<=a.value)&&(o=this._getOrReturnCtx(t,o),Me(o,{code:me.too_small,type:"bigint",minimum:a.value,inclusive:a.inclusive,message:a.message}),r.dirty()):a.kind==="max"?(a.inclusive?t.data>a.value:t.data>=a.value)&&(o=this._getOrReturnCtx(t,o),Me(o,{code:me.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),r.dirty()):a.kind==="multipleOf"?t.data%a.value!==BigInt(0)&&(o=this._getOrReturnCtx(t,o),Me(o,{code:me.not_multiple_of,multipleOf:a.value,message:a.message}),r.dirty()):st.assertNever(a);return{status:r.value,value:t.data}}_getInvalidInput(t){const n=this._getOrReturnCtx(t);return Me(n,{code:me.invalid_type,expected:Ce.bigint,received:n.parsedType}),qe}gte(t,n){return this.setLimit("min",t,!0,Ne.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Ne.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Ne.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Ne.toString(n))}setLimit(t,n,o,r){return new of({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:o,message:Ne.toString(r)}]})}_addCheck(t){return new of({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Ne.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Ne.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Ne.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Ne.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Ne.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}}of.create=e=>new of({checks:[],typeName:Oe.ZodBigInt,coerce:(e==null?void 0:e.coerce)??!1,...Ge(e)});class FH extends tt{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==Ce.boolean){const o=this._getOrReturnCtx(t);return Me(o,{code:me.invalid_type,expected:Ce.boolean,received:o.parsedType}),qe}return Po(t.data)}}FH.create=e=>new FH({typeName:Oe.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...Ge(e)});class ez extends tt{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==Ce.date){const a=this._getOrReturnCtx(t);return Me(a,{code:me.invalid_type,expected:Ce.date,received:a.parsedType}),qe}if(Number.isNaN(t.data.getTime())){const a=this._getOrReturnCtx(t);return Me(a,{code:me.invalid_date}),qe}const o=new In;let r;for(const a of this._def.checks)a.kind==="min"?t.data.getTime()<a.value&&(r=this._getOrReturnCtx(t,r),Me(r,{code:me.too_small,message:a.message,inclusive:!0,exact:!1,minimum:a.value,type:"date"}),o.dirty()):a.kind==="max"?t.data.getTime()>a.value&&(r=this._getOrReturnCtx(t,r),Me(r,{code:me.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),o.dirty()):st.assertNever(a);return{status:o.value,value:new Date(t.data.getTime())}}_addCheck(t){return new ez({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:Ne.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:Ne.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}}ez.create=e=>new ez({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:Oe.ZodDate,...Ge(e)});class iW extends tt{_parse(t){if(this._getType(t)!==Ce.symbol){const o=this._getOrReturnCtx(t);return Me(o,{code:me.invalid_type,expected:Ce.symbol,received:o.parsedType}),qe}return Po(t.data)}}iW.create=e=>new iW({typeName:Oe.ZodSymbol,...Ge(e)});class sW extends tt{_parse(t){if(this._getType(t)!==Ce.undefined){const o=this._getOrReturnCtx(t);return Me(o,{code:me.invalid_type,expected:Ce.undefined,received:o.parsedType}),qe}return Po(t.data)}}sW.create=e=>new sW({typeName:Oe.ZodUndefined,...Ge(e)});class cW extends tt{_parse(t){if(this._getType(t)!==Ce.null){const o=this._getOrReturnCtx(t);return Me(o,{code:me.invalid_type,expected:Ce.null,received:o.parsedType}),qe}return Po(t.data)}}cW.create=e=>new cW({typeName:Oe.ZodNull,...Ge(e)});class lW extends tt{constructor(){super(...arguments),this._any=!0}_parse(t){return Po(t.data)}}lW.create=e=>new lW({typeName:Oe.ZodAny,...Ge(e)});class qH extends tt{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Po(t.data)}}qH.create=e=>new qH({typeName:Oe.ZodUnknown,...Ge(e)});class Di extends tt{_parse(t){const n=this._getOrReturnCtx(t);return Me(n,{code:me.invalid_type,expected:Ce.never,received:n.parsedType}),qe}}Di.create=e=>new Di({typeName:Oe.ZodNever,...Ge(e)});class dW extends tt{_parse(t){if(this._getType(t)!==Ce.undefined){const o=this._getOrReturnCtx(t);return Me(o,{code:me.invalid_type,expected:Ce.void,received:o.parsedType}),qe}return Po(t.data)}}dW.create=e=>new dW({typeName:Oe.ZodVoid,...Ge(e)});class qr extends tt{_parse(t){const{ctx:n,status:o}=this._processInputParams(t),r=this._def;if(n.parsedType!==Ce.array)return Me(n,{code:me.invalid_type,expected:Ce.array,received:n.parsedType}),qe;if(r.exactLength!==null){const i=n.data.length>r.exactLength.value,s=n.data.length<r.exactLength.value;(i||s)&&(Me(n,{code:i?me.too_big:me.too_small,minimum:s?r.exactLength.value:void 0,maximum:i?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((i,s)=>r.type._parseAsync(new Ur(n,i,n.path,s)))).then(i=>In.mergeArray(o,i));const a=[...n.data].map((i,s)=>r.type._parseSync(new Ur(n,i,n.path,s)));return In.mergeArray(o,a)}get element(){return this._def.type}min(t,n){return new qr({...this._def,minLength:{value:t,message:Ne.toString(n)}})}max(t,n){return new qr({...this._def,maxLength:{value:t,message:Ne.toString(n)}})}length(t,n){return new qr({...this._def,exactLength:{value:t,message:Ne.toString(n)}})}nonempty(t){return this.min(1,t)}}qr.create=(e,t)=>new qr({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Oe.ZodArray,...Ge(t)});function Nu(e){if(e instanceof Vt){const t={};for(const n in e.shape){const o=e.shape[n];t[n]=ji.create(Nu(o))}return new Vt({...e._def,shape:()=>t})}else return e instanceof qr?new qr({...e._def,type:Nu(e.element)}):e instanceof ji?ji.create(Nu(e.unwrap())):e instanceof $0?$0.create(Nu(e.unwrap())):e instanceof $d?$d.create(e.items.map(t=>Nu(t))):e}class Vt extends tt{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)!==Ce.object){const l=this._getOrReturnCtx(t);return Me(l,{code:me.invalid_type,expected:Ce.object,received:l.parsedType}),qe}const{status:o,ctx:r}=this._processInputParams(t),{shape:a,keys:i}=this._getCached(),s=[];if(!(this._def.catchall instanceof Di&&this._def.unknownKeys==="strip"))for(const l in r.data)i.includes(l)||s.push(l);const c=[];for(const l of i){const h=a[l],u=r.data[l];c.push({key:{status:"valid",value:l},value:h._parse(new Ur(r,u,r.path,l)),alwaysSet:l in r.data})}if(this._def.catchall instanceof Di){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 Ur(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=>In.mergeObjectSync(o,l)):In.mergeObjectSync(o,c)}get shape(){return this._def.shape()}strict(t){return Ne.errToObj,new Vt({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,o)=>{var a,i;const r=((i=(a=this._def).errorMap)==null?void 0:i.call(a,n,o).message)??o.defaultError;return n.code==="unrecognized_keys"?{message:Ne.errToObj(t).message??r}:{message:r}}}:{}})}strip(){return new Vt({...this._def,unknownKeys:"strip"})}passthrough(){return new Vt({...this._def,unknownKeys:"passthrough"})}extend(t){return new Vt({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new Vt({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 Vt({...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 Vt({...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 Vt({...this._def,shape:()=>n})}deepPartial(){return Nu(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 Vt({...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 a=this.shape[o];for(;a instanceof ji;)a=a._def.innerType;n[o]=a}return new Vt({...this._def,shape:()=>n})}keyof(){return RJ(st.objectKeys(this.shape))}}Vt.create=(e,t)=>new Vt({shape:()=>e,unknownKeys:"strip",catchall:Di.create(),typeName:Oe.ZodObject,...Ge(t)});Vt.strictCreate=(e,t)=>new Vt({shape:()=>e,unknownKeys:"strict",catchall:Di.create(),typeName:Oe.ZodObject,...Ge(t)});Vt.lazycreate=(e,t)=>new Vt({shape:e,unknownKeys:"strip",catchall:Di.create(),typeName:Oe.ZodObject,...Ge(t)});class tz extends tt{_parse(t){const{ctx:n}=this._processInputParams(t),o=this._def.options;function r(a){for(const s of a)if(s.result.status==="valid")return s.result;for(const s of a)if(s.result.status==="dirty")return n.common.issues.push(...s.ctx.common.issues),s.result;const i=a.map(s=>new Ia(s.ctx.common.issues));return Me(n,{code:me.invalid_union,unionErrors:i}),qe}if(n.common.async)return Promise.all(o.map(async a=>{const i={...n,common:{...n.common,issues:[]},parent:null};return{result:await a._parseAsync({data:n.data,path:n.path,parent:i}),ctx:i}})).then(r);{let a;const i=[];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"&&!a&&(a={result:h,ctx:l}),l.common.issues.length&&i.push(l.common.issues)}if(a)return n.common.issues.push(...a.ctx.common.issues),a.result;const s=i.map(c=>new Ia(c));return Me(n,{code:me.invalid_union,unionErrors:s}),qe}}get options(){return this._def.options}}tz.create=(e,t)=>new tz({options:e,typeName:Oe.ZodUnion,...Ge(t)});function VH(e,t){const n=fi(e),o=fi(t);if(e===t)return{valid:!0,data:e};if(n===Ce.object&&o===Ce.object){const r=st.objectKeys(t),a=st.objectKeys(e).filter(s=>r.indexOf(s)!==-1),i={...e,...t};for(const s of a){const c=VH(e[s],t[s]);if(!c.valid)return{valid:!1};i[s]=c.data}return{valid:!0,data:i}}else if(n===Ce.array&&o===Ce.array){if(e.length!==t.length)return{valid:!1};const r=[];for(let a=0;a<e.length;a++){const i=e[a],s=t[a],c=VH(i,s);if(!c.valid)return{valid:!1};r.push(c.data)}return{valid:!0,data:r}}else return n===Ce.date&&o===Ce.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class nz extends tt{_parse(t){const{status:n,ctx:o}=this._processInputParams(t),r=(a,i)=>{if(oW(a)||oW(i))return qe;const s=VH(a.value,i.value);return s.valid?((rW(a)||rW(i))&&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(([a,i])=>r(a,i)):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}))}}nz.create=(e,t,n)=>new nz({left:e,right:t,typeName:Oe.ZodIntersection,...Ge(n)});class $d extends tt{_parse(t){const{status:n,ctx:o}=this._processInputParams(t);if(o.parsedType!==Ce.array)return Me(o,{code:me.invalid_type,expected:Ce.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 a=[...o.data].map((i,s)=>{const c=this._def.items[s]||this._def.rest;return c?c._parse(new Ur(o,i,o.path,s)):null}).filter(i=>!!i);return o.common.async?Promise.all(a).then(i=>In.mergeArray(n,i)):In.mergeArray(n,a)}get items(){return this._def.items}rest(t){return new $d({...this._def,rest:t})}}$d.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new $d({items:e,typeName:Oe.ZodTuple,rest:null,...Ge(t)})};class oz extends tt{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!==Ce.object)return Me(o,{code:me.invalid_type,expected:Ce.object,received:o.parsedType}),qe;const r=[],a=this._def.keyType,i=this._def.valueType;for(const s in o.data)r.push({key:a._parse(new Ur(o,s,o.path,s)),value:i._parse(new Ur(o,o.data[s],o.path,s)),alwaysSet:s in o.data});return o.common.async?In.mergeObjectAsync(n,r):In.mergeObjectSync(n,r)}get element(){return this._def.valueType}static create(t,n,o){return n instanceof tt?new oz({keyType:t,valueType:n,typeName:Oe.ZodRecord,...Ge(o)}):new oz({keyType:Ma.create(),valueType:t,typeName:Oe.ZodRecord,...Ge(n)})}}class uW extends tt{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!==Ce.map)return Me(o,{code:me.invalid_type,expected:Ce.map,received:o.parsedType}),qe;const r=this._def.keyType,a=this._def.valueType,i=[...o.data.entries()].map(([s,c],l)=>({key:r._parse(new Ur(o,s,o.path,[l,"key"])),value:a._parse(new Ur(o,c,o.path,[l,"value"]))}));if(o.common.async){const s=new Map;return Promise.resolve().then(async()=>{for(const c of i){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 i){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}}}}uW.create=(e,t,n)=>new uW({valueType:t,keyType:e,typeName:Oe.ZodMap,...Ge(n)});class rf extends tt{_parse(t){const{status:n,ctx:o}=this._processInputParams(t);if(o.parsedType!==Ce.set)return Me(o,{code:me.invalid_type,expected:Ce.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 a=this._def.valueType;function i(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)=>a._parse(new Ur(o,c,o.path,l)));return o.common.async?Promise.all(s).then(c=>i(c)):i(s)}min(t,n){return new rf({...this._def,minSize:{value:t,message:Ne.toString(n)}})}max(t,n){return new rf({...this._def,maxSize:{value:t,message:Ne.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}rf.create=(e,t)=>new rf({valueType:e,minSize:null,maxSize:null,typeName:Oe.ZodSet,...Ge(t)});class hW extends tt{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})}}hW.create=(e,t)=>new hW({getter:e,typeName:Oe.ZodLazy,...Ge(t)});class BH extends tt{_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}}BH.create=(e,t)=>new BH({value:e,typeName:Oe.ZodLiteral,...Ge(t)});function RJ(e,t){return new E0({values:e,typeName:Oe.ZodEnum,...Ge(t)})}class E0 extends tt{_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 E0.create(t,{...this._def,...n})}exclude(t,n=this._def){return E0.create(this.options.filter(o=>!t.includes(o)),{...this._def,...n})}}E0.create=RJ;class fW extends tt{_parse(t){const n=st.getValidEnumValues(this._def.values),o=this._getOrReturnCtx(t);if(o.parsedType!==Ce.string&&o.parsedType!==Ce.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}}fW.create=(e,t)=>new fW({values:e,typeName:Oe.ZodNativeEnum,...Ge(t)});class rz extends tt{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Ce.promise&&n.common.async===!1)return Me(n,{code:me.invalid_type,expected:Ce.promise,received:n.parsedType}),qe;const o=n.parsedType===Ce.promise?n.data:Promise.resolve(n.data);return Po(o.then(r=>this._def.type.parseAsync(r,{path:n.path,errorMap:n.common.contextualErrorMap})))}}rz.create=(e,t)=>new rz({type:e,typeName:Oe.ZodPromise,...Ge(t)});class j0 extends tt{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,a={addIssue:i=>{Me(o,i),i.fatal?n.abort():n.dirty()},get path(){return o.path}};if(a.addIssue=a.addIssue.bind(a),r.type==="preprocess"){const i=r.transform(o.data,a);if(o.common.async)return Promise.resolve(i).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"?P2(c.value):c});{if(n.value==="aborted")return qe;const s=this._def.schema._parseSync({data:i,path:o.path,parent:o});return s.status==="aborted"?qe:s.status==="dirty"||n.value==="dirty"?P2(s.value):s}}if(r.type==="refinement"){const i=s=>{const c=r.refinement(s,a);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(),i(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(),i(s.value).then(()=>({status:n.value,value:s.value}))))}if(r.type==="transform")if(o.common.async===!1){const i=this._def.schema._parseSync({data:o.data,path:o.path,parent:o});if(!I0(i))return qe;const s=r.transform(i.value,a);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(i=>I0(i)?Promise.resolve(r.transform(i.value,a)).then(s=>({status:n.value,value:s})):qe);st.assertNever(r)}}j0.create=(e,t,n)=>new j0({schema:e,typeName:Oe.ZodEffects,effect:t,...Ge(n)});j0.createWithPreprocess=(e,t,n)=>new j0({schema:t,effect:{type:"preprocess",transform:e},typeName:Oe.ZodEffects,...Ge(n)});class ji extends tt{_parse(t){return this._getType(t)===Ce.undefined?Po(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}ji.create=(e,t)=>new ji({innerType:e,typeName:Oe.ZodOptional,...Ge(t)});class $0 extends tt{_parse(t){return this._getType(t)===Ce.null?Po(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}$0.create=(e,t)=>new $0({innerType:e,typeName:Oe.ZodNullable,...Ge(t)});class UH extends tt{_parse(t){const{ctx:n}=this._processInputParams(t);let o=n.data;return n.parsedType===Ce.undefined&&(o=this._def.defaultValue()),this._def.innerType._parse({data:o,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}UH.create=(e,t)=>new UH({innerType:e,typeName:Oe.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Ge(t)});class WH extends tt{_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 JP(r)?r.then(a=>({status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new Ia(o.common.issues)},input:o.data})})):{status:"valid",value:r.status==="valid"?r.value:this._def.catchValue({get error(){return new Ia(o.common.issues)},input:o.data})}}removeCatch(){return this._def.innerType}}WH.create=(e,t)=>new WH({innerType:e,typeName:Oe.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Ge(t)});class pW extends tt{_parse(t){if(this._getType(t)!==Ce.nan){const o=this._getOrReturnCtx(t);return Me(o,{code:me.invalid_type,expected:Ce.nan,received:o.parsedType}),qe}return{status:"valid",value:t.data}}}pW.create=e=>new pW({typeName:Oe.ZodNaN,...Ge(e)});class gOe extends tt{_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 WF extends tt{_parse(t){const{status:n,ctx:o}=this._processInputParams(t);if(o.common.async)return(async()=>{const a=await this._def.in._parseAsync({data:o.data,path:o.path,parent:o});return a.status==="aborted"?qe:a.status==="dirty"?(n.dirty(),P2(a.value)):this._def.out._parseAsync({data:a.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 WF({in:t,out:n,typeName:Oe.ZodPipeline})}}class GH extends tt{_parse(t){const n=this._def.innerType._parse(t),o=r=>(I0(r)&&(r.value=Object.freeze(r.value)),r);return JP(n)?n.then(r=>o(r)):o(n)}unwrap(){return this._def.innerType}}GH.create=(e,t)=>new GH({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 cn=Ma.create,TJ=A0.create,kOe=FH.create,_h=qH.create;Di.create;const ss=qr.create,it=Vt.create,KH=tz.create;nz.create;$d.create;const yW=oz.create,Cp=BH.create,Sp=E0.create;rz.create;ji.create;$0.create;const vOe=it({$state:cn().min(1)}),ya=it({$action:cn().min(1)}),xOe=it({$cond:_h(),$then:_h(),$else:_h().optional()}),Wo=e=>KH([e,vOe,ya,xOe]),Rt=Wo(cn()),fa=Wo(TJ()),Lp=Wo(kOe()),DJ={Card:it({title:Rt.optional()}),Separator:it({orientation:Wo(Sp(["horizontal","vertical"])).optional()}),Tabs:it({value:Rt.optional(),items:ss(it({id:cn(),label:cn()})),onChange:ya.optional()}),Accordion:it({items:ss(it({id:cn(),title:cn(),content:cn()}))}),Badge:it({label:Rt,variant:Wo(Sp(["default","secondary","destructive","outline"])).optional()}),Avatar:it({src:Rt.optional(),alt:Rt.optional(),fallback:Rt.optional()}),Progress:it({value:fa}),Skeleton:it({width:fa.optional(),height:fa.optional()}),Label:it({text:Rt}),Heading:it({level:Wo(KH([Cp(1),Cp(2),Cp(3),Cp(4)])).optional(),text:Rt}),Text:it({text:Rt,muted:Lp.optional()}),Icon:it({name:Rt,size:fa.optional()}),Chart:it({kind:Wo(Sp(["bar","line","area","pie"])),data:Wo(ss(yW(cn(),_h()))),xKey:Rt.optional(),series:ss(it({key:cn(),label:cn().optional()})).optional()}),Table:it({columns:ss(it({key:cn(),label:cn()})),rows:Wo(ss(yW(cn(),_h())))}),Metric:it({label:Rt,value:Wo(KH([cn(),TJ()]))}),CodeBlock:it({code:Rt,language:Rt.optional()}),Markdown:it({content:Rt}),Button:it({label:Rt,variant:Wo(Sp(["default","destructive","outline","secondary","ghost","link"])).optional(),onClick:ya.optional(),disabled:Lp.optional()}),Input:it({value:Rt.optional(),placeholder:Rt.optional(),onChange:ya.optional()}),Checkbox:it({checked:Lp.optional(),onChange:ya.optional(),label:Rt.optional()}),Switch:it({checked:Lp.optional(),onChange:ya.optional()}),Select:it({value:Rt.optional(),items:ss(it({value:cn(),label:cn()})),onChange:ya.optional()}),Textarea:it({value:Rt.optional(),placeholder:Rt.optional(),rows:fa.optional(),onChange:ya.optional()}),Slider:it({value:fa.optional(),min:fa.optional(),max:fa.optional(),step:fa.optional(),onChange:ya.optional()})},HJ=Object.keys(DJ);Object.fromEntries(HJ.map(e=>[e,{props:DJ[e],description:e}]));function mW(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Wr(...e){return t=>{let n=!1;const o=e.map(r=>{const a=mW(r,t);return!n&&typeof a=="function"&&(n=!0),a});if(n)return()=>{for(let r=0;r<o.length;r++){const a=o[r];typeof a=="function"?a():mW(e[r],null)}}}}function mt(...e){return m.useCallback(Wr(...e),e)}var wOe=Symbol.for("react.lazy"),az=EO[" use ".trim().toString()];function MOe(e){return typeof e=="object"&&e!==null&&"then"in e}function OJ(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===wOe&&"_payload"in e&&MOe(e._payload)}function bOe(e){const t=COe(e),n=m.forwardRef((o,r)=>{let{children:a,...i}=o;OJ(a)&&typeof az=="function"&&(a=az(a._payload));const s=m.Children.toArray(a),c=s.find(LOe);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,{...i,ref:r,children:m.isValidElement(l)?m.cloneElement(l,void 0,h):null})}return f.jsx(t,{...i,ref:r,children:a})});return n.displayName=`${e}.Slot`,n}var _Oe=bOe("Slot");function COe(e){const t=m.forwardRef((n,o)=>{let{children:r,...a}=n;if(OJ(r)&&typeof az=="function"&&(r=az(r._payload)),m.isValidElement(r)){const i=IOe(r),s=NOe(a,r.props);return r.type!==m.Fragment&&(s.ref=o?Wr(o,i):i),m.cloneElement(r,s)}return m.Children.count(r)>1?m.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var SOe=Symbol("radix.slottable");function LOe(e){return m.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===SOe}function NOe(e,t){const n={...t};for(const o in t){const r=e[o],a=t[o];/^on[A-Z]/.test(o)?r&&a?n[o]=(...s)=>{const c=a(...s);return r(...s),c}:r&&(n[o]=r):o==="style"?n[o]={...r,...a}:o==="className"&&(n[o]=[r,a].filter(Boolean).join(" "))}return{...e,...n}}function IOe(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 gW=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,kW=IY,FJ=(e,t)=>n=>{var o;if((t==null?void 0:t.variants)==null)return kW(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:r,defaultVariants:a}=t,i=Object.keys(r).map(l=>{const h=n==null?void 0:n[l],u=a==null?void 0:a[l];if(h===null)return null;const p=gW(h)||gW(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({...a,...s}[k]):{...a,...s}[k]===x})?[...l,u,p]:l},[]);return kW(e,i,c,n==null?void 0:n.class,n==null?void 0:n.className)},AOe=FJ("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},a)=>{const i=o?_Oe:"button";return f.jsx(i,{className:te(AOe({variant:t,size:n,className:e})),ref:a,...r})});rt.displayName="Button";function qJ(e,[t,n]){return Math.min(n,Math.max(t,e))}function Se(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 EOe(e,t){const n=m.createContext(t),o=a=>{const{children:i,...s}=a,c=m.useMemo(()=>s,Object.values(s));return f.jsx(n.Provider,{value:c,children:i})};o.displayName=e+"Provider";function r(a){const i=m.useContext(n);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[o,r]}function lr(e,t=[]){let n=[];function o(a,i){const s=m.createContext(i),c=n.length;n=[...n,i];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=a+"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(i!==void 0)return i;throw new Error(`\`${u}\` must be used within \`${a}\``)}return[l,h]}const r=()=>{const a=n.map(i=>m.createContext(i));return function(s){const c=(s==null?void 0:s[e])||a;return m.useMemo(()=>({[`__scope${e}`]:{...s,[e]:c}}),[s,c])}};return r.scopeName=e,[o,jOe(r,...t)]}function jOe(...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(a){const i=o.reduce((s,{useScope:c,scopeName:l})=>{const u=c(a)[`__scope${l}`];return{...s,...u}},{});return m.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}var Hi=globalThis!=null&&globalThis.document?m.useLayoutEffect:()=>{},$Oe=EO[" useInsertionEffect ".trim().toString()]||Hi;function Vd({prop:e,defaultProp:t,onChange:n=()=>{},caller:o}){const[r,a,i]=POe({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=zOe(h)?h(e):h;p!==e&&((u=i.current)==null||u.call(i,p))}else a(h)},[s,e,a,i]);return[c,l]}function POe({defaultProp:e,onChange:t}){const[n,o]=m.useState(e),r=m.useRef(n),a=m.useRef(t);return $Oe(()=>{a.current=t},[t]),m.useEffect(()=>{var i;r.current!==n&&((i=a.current)==null||i.call(a,n),r.current=n)},[n,r]),[n,o,a]}function zOe(e){return typeof e=="function"}var ROe=m.createContext(void 0);function sR(e){const t=m.useContext(ROe);return e||t||"ltr"}function TOe(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 VJ(e){const[t,n]=m.useState(void 0);return Hi(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const o=new ResizeObserver(r=>{if(!Array.isArray(r)||!r.length)return;const a=r[0];let i,s;if("borderBoxSize"in a){const c=a.borderBoxSize,l=Array.isArray(c)?c[0]:c;i=l.inlineSize,s=l.blockSize}else i=e.offsetWidth,s=e.offsetHeight;n({width:i,height:s})});return o.observe(e,{box:"border-box"}),()=>o.unobserve(e)}else n(void 0)},[e]),t}function P0(e){const t=DOe(e),n=m.forwardRef((o,r)=>{const{children:a,...i}=o,s=m.Children.toArray(a),c=s.find(OOe);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,{...i,ref:r,children:m.isValidElement(l)?m.cloneElement(l,void 0,h):null})}return f.jsx(t,{...i,ref:r,children:a})});return n.displayName=`${e}.Slot`,n}function DOe(e){const t=m.forwardRef((n,o)=>{const{children:r,...a}=n;if(m.isValidElement(r)){const i=qOe(r),s=FOe(a,r.props);return r.type!==m.Fragment&&(s.ref=o?Wr(o,i):i),m.cloneElement(r,s)}return m.Children.count(r)>1?m.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var BJ=Symbol("radix.slottable");function HOe(e){const t=({children:n})=>f.jsx(f.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=BJ,t}function OOe(e){return m.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===BJ}function FOe(e,t){const n={...t};for(const o in t){const r=e[o],a=t[o];/^on[A-Z]/.test(o)?r&&a?n[o]=(...s)=>{const c=a(...s);return r(...s),c}:r&&(n[o]=r):o==="style"?n[o]={...r,...a}:o==="className"&&(n[o]=[r,a].filter(Boolean).join(" "))}return{...e,...n}}function qOe(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 VOe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ve=VOe.reduce((e,t)=>{const n=P0(`Primitive.${t}`),o=m.forwardRef((r,a)=>{const{asChild:i,...s}=r,c=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),f.jsx(c,{...s,ref:a})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{});function UJ(e,t){e&&Od.flushSync(()=>e.dispatchEvent(t))}function GF(e){const t=e+"CollectionProvider",[n,o]=lr(t),[r,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=k=>{const{scope:x,children:v}=k,M=Ar.useRef(null),w=Ar.useRef(new Map).current;return f.jsx(r,{scope:x,itemMap:w,collectionRef:M,children:v})};i.displayName=t;const s=e+"CollectionSlot",c=P0(s),l=Ar.forwardRef((k,x)=>{const{scope:v,children:M}=k,w=a(s,v),b=mt(x,w.collectionRef);return f.jsx(c,{ref:b,children:M})});l.displayName=s;const h=e+"CollectionItemSlot",u="data-radix-collection-item",p=P0(h),y=Ar.forwardRef((k,x)=>{const{scope:v,children:M,...w}=k,b=Ar.useRef(null),C=mt(x,b),_=a(h,v);return Ar.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=a(e+"CollectionConsumer",k);return Ar.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:i,Slot:l,ItemSlot:y},g,o]}var WJ=["PageUp","PageDown"],GJ=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],KJ={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},U0="Slider",[ZH,BOe,UOe]=GF(U0),[ZJ]=lr(U0,[UOe]),[WOe,cR]=ZJ(U0),XJ=m.forwardRef((e,t)=>{const{name:n,min:o=0,max:r=100,step:a=1,orientation:i="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=i==="horizontal"?GOe:KOe,[b=[],C]=Vd({prop:h,defaultProp:l,onChange:E=>{var W;(W=[...x.current][v.current])==null||W.focus(),u(E)}}),_=m.useRef(b);function S(E){const z=JOe(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:W}={commit:!1}){const $=oFe(a),T=rFe(Math.round((E-o)/a)*a+o,$),D=qJ(T,[o,r]);C((O=[])=>{const I=YOe(O,D,z);if(nFe(I,c*a)){v.current=I.indexOf(D);const R=String(I)!==String(O);return R&&W&&p(I),R?I:O}else return O})}return f.jsx(WOe,{scope:e.__scopeSlider,name:n,disabled:s,min:o,max:r,valueIndexToChangeRef:v,thumbs:x.current,values:b,orientation:i,form:g,children:f.jsx(ZH.Provider,{scope:e.__scopeSlider,children:f.jsx(ZH.Slot,{scope:e.__scopeSlider,children:f.jsx(w,{"aria-disabled":s,"data-disabled":s?"":void 0,...k,ref:t,onPointerDown:Se(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=WJ.includes(E.key)||E.shiftKey&&GJ.includes(E.key)?10:1,D=v.current,O=b[D],I=a*T*z;A(O+I,D,{commit:!0})}}})})})})});XJ.displayName=U0;var[YJ,QJ]=ZJ(U0,{startEdge:"left",endEdge:"right",size:"width",direction:1}),GOe=m.forwardRef((e,t)=>{const{min:n,max:o,dir:r,inverted:a,onSlideStart:i,onSlideMove:s,onSlideEnd:c,onStepKeyDown:l,...h}=e,[u,p]=m.useState(null),y=mt(t,w=>p(w)),g=m.useRef(void 0),k=sR(r),x=k==="ltr",v=x&&!a||!x&&a;function M(w){const b=g.current||u.getBoundingClientRect(),C=[0,b.width],S=KF(C,v?[n,o]:[o,n]);return g.current=b,S(w-b.left)}return f.jsx(YJ,{scope:e.__scopeSlider,startEdge:v?"left":"right",endEdge:v?"right":"left",direction:v?1:-1,size:"width",children:f.jsx(JJ,{dir:k,"data-orientation":"horizontal",...h,ref:y,style:{...h.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:w=>{const b=M(w.clientX);i==null||i(b)},onSlideMove:w=>{const b=M(w.clientX);s==null||s(b)},onSlideEnd:()=>{g.current=void 0,c==null||c()},onStepKeyDown:w=>{const C=KJ[v?"from-left":"from-right"].includes(w.key);l==null||l({event:w,direction:C?-1:1})}})})}),KOe=m.forwardRef((e,t)=>{const{min:n,max:o,inverted:r,onSlideStart:a,onSlideMove:i,onSlideEnd:s,onStepKeyDown:c,...l}=e,h=m.useRef(null),u=mt(t,h),p=m.useRef(void 0),y=!r;function g(k){const x=p.current||h.current.getBoundingClientRect(),v=[0,x.height],w=KF(v,y?[o,n]:[n,o]);return p.current=x,w(k-x.top)}return f.jsx(YJ,{scope:e.__scopeSlider,startEdge:y?"bottom":"top",endEdge:y?"top":"bottom",size:"height",direction:y?1:-1,children:f.jsx(JJ,{"data-orientation":"vertical",...l,ref:u,style:{...l.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:k=>{const x=g(k.clientY);a==null||a(x)},onSlideMove:k=>{const x=g(k.clientY);i==null||i(x)},onSlideEnd:()=>{p.current=void 0,s==null||s()},onStepKeyDown:k=>{const v=KJ[y?"from-bottom":"from-top"].includes(k.key);c==null||c({event:k,direction:v?-1:1})}})})}),JJ=m.forwardRef((e,t)=>{const{__scopeSlider:n,onSlideStart:o,onSlideMove:r,onSlideEnd:a,onHomeKeyDown:i,onEndKeyDown:s,onStepKeyDown:c,...l}=e,h=cR(U0,n);return f.jsx(Ve.span,{...l,ref:t,onKeyDown:Se(e.onKeyDown,u=>{u.key==="Home"?(i(u),u.preventDefault()):u.key==="End"?(s(u),u.preventDefault()):WJ.concat(GJ).includes(u.key)&&(c(u),u.preventDefault())}),onPointerDown:Se(e.onPointerDown,u=>{const p=u.target;p.setPointerCapture(u.pointerId),u.preventDefault(),h.thumbs.has(p)?p.focus():o(u)}),onPointerMove:Se(e.onPointerMove,u=>{u.target.hasPointerCapture(u.pointerId)&&r(u)}),onPointerUp:Se(e.onPointerUp,u=>{const p=u.target;p.hasPointerCapture(u.pointerId)&&(p.releasePointerCapture(u.pointerId),a(u))})})}),eee="SliderTrack",tee=m.forwardRef((e,t)=>{const{__scopeSlider:n,...o}=e,r=cR(eee,n);return f.jsx(Ve.span,{"data-disabled":r.disabled?"":void 0,"data-orientation":r.orientation,...o,ref:t})});tee.displayName=eee;var XH="SliderRange",nee=m.forwardRef((e,t)=>{const{__scopeSlider:n,...o}=e,r=cR(XH,n),a=QJ(XH,n),i=m.useRef(null),s=mt(t,i),c=r.values.length,l=r.values.map(p=>aee(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,[a.startEdge]:h+"%",[a.endEdge]:u+"%"}})});nee.displayName=XH;var YH="SliderThumb",oee=m.forwardRef((e,t)=>{const n=BOe(e.__scopeSlider),[o,r]=m.useState(null),a=mt(t,s=>r(s)),i=m.useMemo(()=>o?n().findIndex(s=>s.ref.current===o):-1,[n,o]);return f.jsx(ZOe,{...e,ref:a,index:i})}),ZOe=m.forwardRef((e,t)=>{const{__scopeSlider:n,index:o,name:r,...a}=e,i=cR(YH,n),s=QJ(YH,n),[c,l]=m.useState(null),h=mt(t,M=>l(M)),u=c?i.form||!!c.closest("form"):!0,p=VJ(c),y=i.values[o],g=y===void 0?0:aee(y,i.min,i.max),k=QOe(o,i.values.length),x=p==null?void 0:p[s.size],v=x?eFe(x,g,s.direction):0;return m.useEffect(()=>{if(c)return i.thumbs.add(c),()=>{i.thumbs.delete(c)}},[c,i.thumbs]),f.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[s.startEdge]:`calc(${g}% + ${v}px)`},children:[f.jsx(ZH.ItemSlot,{scope:e.__scopeSlider,children:f.jsx(Ve.span,{role:"slider","aria-label":e["aria-label"]||k,"aria-valuemin":i.min,"aria-valuenow":y,"aria-valuemax":i.max,"aria-orientation":i.orientation,"data-orientation":i.orientation,"data-disabled":i.disabled?"":void 0,tabIndex:i.disabled?void 0:0,...a,ref:h,style:y===void 0?{display:"none"}:e.style,onFocus:Se(e.onFocus,()=>{i.valueIndexToChangeRef.current=o})})}),u&&f.jsx(ree,{name:r??(i.name?i.name+(i.values.length>1?"[]":""):void 0),form:i.form,value:y},o)]})});oee.displayName=YH;var XOe="RadioBubbleInput",ree=m.forwardRef(({__scopeSlider:e,value:t,...n},o)=>{const r=m.useRef(null),a=mt(r,o),i=TOe(t);return m.useEffect(()=>{const s=r.current;if(!s)return;const c=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(c,"value").set;if(i!==t&&h){const u=new Event("input",{bubbles:!0});h.call(s,t),s.dispatchEvent(u)}},[i,t]),f.jsx(Ve.input,{style:{display:"none"},...n,ref:a,defaultValue:t})});ree.displayName=XOe;function YOe(e=[],t,n){const o=[...e];return o[n]=t,o.sort((r,a)=>r-a)}function aee(e,t,n){const a=100/(n-t)*(e-t);return qJ(a,[0,100])}function QOe(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function JOe(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 eFe(e,t,n){const o=e/2,a=KF([0,50],[0,o]);return(o-a(t)*n)*n}function tFe(e){return e.slice(0,-1).map((t,n)=>e[n+1]-t)}function nFe(e,t){if(t>0){const n=tFe(e);return Math.min(...n)>=t}return!0}function KF(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 oFe(e){return(String(e).split(".")[1]||"").length}function rFe(e,t){const n=Math.pow(10,t);return Math.round(e*n)/n}var iee=XJ,aFe=tee,iFe=nee,sFe=oee;const ZF=m.forwardRef(({className:e,...t},n)=>f.jsxs(iee,{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(aFe,{className:"sf:relative sf:h-1.5 sf:w-full sf:grow sf:overflow-hidden sf:rounded-full sf:bg-secondary",children:f.jsx(iFe,{className:"sf:absolute sf:h-full sf:bg-primary"})}),f.jsx(sFe,{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"})]}));ZF.displayName=iee.displayName;const cFe={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 lFe({text:e,level:t=2}){const n=`h${t}`;return f.jsx(n,{className:te(cFe[t]),children:e})}const see=m.createContext({custom:{}});function dFe({value:e,children:t}){return f.jsx(see.Provider,{value:e,children:t})}function uFe(){return m.useContext(see)}function z0({name:e,as:t,size:n=16,fallback:o=_Ae,...r}){const a=uFe(),i=t??(e?a.custom[e]:void 0)??(e?Wh[e]:void 0)??Wh[o];return i?f.jsx(i,{size:n,...r}):null}function hFe({name:e,size:t=16}){return f.jsx(z0,{name:e,size:t,"aria-hidden":!0})}function fFe(e){return e==null?"":typeof e=="string"||typeof e=="number"?e:typeof e=="object"?JSON.stringify(e):String(e)}function pFe({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:fFe(t)})]})}function yFe(e){return e==null?"":typeof e=="string"||typeof e=="number"?String(e):JSON.stringify(e)}function mFe({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:yFe(n[r.key])},r.key))},o))})]})})}function gFe({text:e,muted:t}){return f.jsx("p",{className:te("sf:text-sm",t&&"sf:text-muted-foreground"),children:e})}function kFe({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 vFe({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 xFe({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(a=>f.jsx("button",{type:"button","data-state":e===a.id?"active":"inactive",onClick:()=>n==null?void 0:n({value:a.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:a.label},a.id))}),o]})}function wFe({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 vW={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 MFe({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",vW[t]??vW.default),children:e})}function bFe({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 _Fe({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 CFe({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 SFe({text:e}){return f.jsx("span",{className:"sf:font-medium sf:text-sm sf:leading-none",children:e})}function LFe({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 XF="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 NFe({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:XF})}function IFe({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 AFe({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 EFe({value:e,items:t,onChange:n}){return f.jsx("select",{value:e??"",onChange:o=>n==null?void 0:n({value:o.target.value}),className:XF,children:(t??[]).map(o=>f.jsx("option",{value:o.value,children:o.label},o.value))})}function jFe({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(XF,"sf:min-h-16 sf:py-2")})}function $Fe({value:e,min:t=0,max:n=100,step:o=1,onChange:r}){return f.jsx(ZF,{value:e===void 0?void 0:[e],min:t,max:n,step:o,onValueChange:a=>{const[i]=a;typeof i=="number"&&(r==null||r({value:i}))}})}const PFe=m.lazy(()=>V0(()=>import("./chart-BIsuELng.js"),__vite__mapDeps([0,1,2,3,4,5,6,7])));function zFe(e){return f.jsx(m.Suspense,{fallback:null,children:f.jsx(PFe,{...e})})}const RFe=m.lazy(()=>V0(()=>import("./markdown-Dw6v_KEB.js"),[]));function TFe(e){return f.jsx(m.Suspense,{fallback:null,children:f.jsx(RFe,{...e})})}const DFe=m.lazy(()=>V0(()=>import("./code-block-CXyix7T4.js"),[]));function HFe(e){return f.jsx(m.Suspense,{fallback:null,children:f.jsx(DFe,{...e})})}const cee={Card:kFe,Separator:vFe,Tabs:xFe,Accordion:wFe,Badge:MFe,Avatar:bFe,Progress:_Fe,Skeleton:CFe,Label:SFe,Heading:lFe,Text:gFe,Icon:hFe,Chart:zFe,Table:mFe,Metric:pFe,CodeBlock:HFe,Markdown:TFe,Button:LFe,Input:NFe,Checkbox:IFe,Switch:AFe,Select:EFe,Textarea:jFe,Slider:$Fe},xW=HJ.filter(e=>cee[e]===void 0);if(xW.length>0)throw new Error(`componentRegistry is missing impls for: ${xW.join(", ")}. Every catalog entry in COMPONENT_NAMES must have a matching component impl.`);const OFe={components:cee};function FFe(e,t){return t.kind==="set"?{...e,[t.path]:t.value}:{...e,...t.partial}}function lee(e){return e===null||typeof e!="object"?!1:"$state"in e||"$action"in e||"$param"in e||"$cond"in e}function iP(e,t,n,o){if(!lee(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)?a=>n(r,a):void 0}if("$cond"in e){const r=iP(e.$cond,t,n,o);return iP(r?e.$then:e.$else,t,n,o)}return e}function qFe(e,t,n,o){if(!e)return{};const r={};for(const[a,i]of Object.entries(e))r[a]=iP(i,t,n,o);return r}function wW({spec:e,nodeId:t,apiBaseUrl:n="/api",projectSlug:o,flowSlug:r}){const[a,i]=m.useReducer(FFe,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=VFe(u.value,h,a);i({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();i({kind:"set",path:`/__errors/${l}`,value:x});return}const k=await g.json();k!==null&&typeof k=="object"&&i({kind:"merge",partial:k})}catch(g){i({kind:"set",path:`/__errors/${l}`,value:g instanceof Error?g.message:String(g)})}},[e.actions,o,r,n,t,a]);return dee(e.root,e,a,c,s)}function VFe(e,t,n){return lee(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 dee(e,t,n,o,r){const a=t.elements[e];if(!a)return null;const i=OFe.components[a.type];if(!i)return null;const s=qFe(a.props,n,o,r),l=(a.children??[]).map(h=>f.jsx(BFe,{children:dee(h,t,n,o,r)},h));return f.jsx(i,{...s,children:l.length>0?l:void 0})}function BFe({children:e}){return e}function Gr(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 UFe(e,t=globalThis==null?void 0:globalThis.document){const n=Gr(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 WFe="DismissableLayer",QH="dismissableLayer.update",GFe="dismissableLayer.pointerDownOutside",KFe="dismissableLayer.focusOutside",MW,uee=m.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Sf=m.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:o,onPointerDownOutside:r,onFocusOutside:a,onInteractOutside:i,onDismiss:s,...c}=e,l=m.useContext(uee),[h,u]=m.useState(null),p=(h==null?void 0:h.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,y]=m.useState({}),g=mt(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=YFe(S=>{const N=S.target,P=[...l.branches].some(A=>A.contains(N));!b||P||(r==null||r(S),i==null||i(S),S.defaultPrevented||s==null||s())},p),_=QFe(S=>{const N=S.target;[...l.branches].some(A=>A.contains(N))||(a==null||a(S),i==null||i(S),S.defaultPrevented||s==null||s())},p);return UFe(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&&(MW=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(h)),l.layers.add(h),bW(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=MW)}},[h,p,n,l]),m.useEffect(()=>()=>{h&&(l.layers.delete(h),l.layersWithOutsidePointerEventsDisabled.delete(h),bW())},[h,l]),m.useEffect(()=>{const S=()=>y({});return document.addEventListener(QH,S),()=>document.removeEventListener(QH,S)},[]),f.jsx(Ve.div,{...c,ref:g,style:{pointerEvents:w?b?"auto":"none":void 0,...e.style},onFocusCapture:Se(e.onFocusCapture,_.onFocusCapture),onBlurCapture:Se(e.onBlurCapture,_.onBlurCapture),onPointerDownCapture:Se(e.onPointerDownCapture,C.onPointerDownCapture)})});Sf.displayName=WFe;var ZFe="DismissableLayerBranch",XFe=m.forwardRef((e,t)=>{const n=m.useContext(uee),o=m.useRef(null),r=mt(t,o);return m.useEffect(()=>{const a=o.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),f.jsx(Ve.div,{...e,ref:r})});XFe.displayName=ZFe;function YFe(e,t=globalThis==null?void 0:globalThis.document){const n=Gr(e),o=m.useRef(!1),r=m.useRef(()=>{});return m.useEffect(()=>{const a=s=>{if(s.target&&!o.current){let c=function(){hee(GFe,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},i=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",a),t.removeEventListener("click",r.current)}},[t,n]),{onPointerDownCapture:()=>o.current=!0}}function QFe(e,t=globalThis==null?void 0:globalThis.document){const n=Gr(e),o=m.useRef(!1);return m.useEffect(()=>{const r=a=>{a.target&&!o.current&&hee(KFe,n,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",r),()=>t.removeEventListener("focusin",r)},[t,n]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function bW(){const e=new CustomEvent(QH);document.dispatchEvent(e)}function hee(e,t,n,{discrete:o}){const r=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),o?UJ(r,a):r.dispatchEvent(a)}var TT=0;function YF(){m.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??_W()),document.body.insertAdjacentElement("beforeend",e[1]??_W()),TT++,()=>{TT===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),TT--}},[])}function _W(){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 DT="focusScope.autoFocusOnMount",HT="focusScope.autoFocusOnUnmount",CW={bubbles:!1,cancelable:!0},JFe="FocusScope",lR=m.forwardRef((e,t)=>{const{loop:n=!1,trapped:o=!1,onMountAutoFocus:r,onUnmountAutoFocus:a,...i}=e,[s,c]=m.useState(null),l=Gr(r),h=Gr(a),u=m.useRef(null),p=mt(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:ai(u.current,{select:!0})},x=function(w){if(y.paused||!s)return;const b=w.relatedTarget;b!==null&&(s.contains(b)||ai(u.current,{select:!0}))},v=function(w){if(document.activeElement===document.body)for(const C of w)C.removedNodes.length>0&&ai(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){LW.add(y);const k=document.activeElement;if(!s.contains(k)){const v=new CustomEvent(DT,CW);s.addEventListener(DT,l),s.dispatchEvent(v),v.defaultPrevented||(eqe(aqe(fee(s)),{select:!0}),document.activeElement===k&&ai(s))}return()=>{s.removeEventListener(DT,l),setTimeout(()=>{const v=new CustomEvent(HT,CW);s.addEventListener(HT,h),s.dispatchEvent(v),v.defaultPrevented||ai(k??document.body,{select:!0}),s.removeEventListener(HT,h),LW.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]=tqe(M);w&&b?!k.shiftKey&&v===b?(k.preventDefault(),n&&ai(w,{select:!0})):k.shiftKey&&v===w&&(k.preventDefault(),n&&ai(b,{select:!0})):v===M&&k.preventDefault()}},[n,o,y.paused]);return f.jsx(Ve.div,{tabIndex:-1,...i,ref:p,onKeyDown:g})});lR.displayName=JFe;function eqe(e,{select:t=!1}={}){const n=document.activeElement;for(const o of e)if(ai(o,{select:t}),document.activeElement!==n)return}function tqe(e){const t=fee(e),n=SW(t,e),o=SW(t.reverse(),e);return[n,o]}function fee(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 SW(e,t){for(const n of e)if(!nqe(n,{upTo:t}))return n}function nqe(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 oqe(e){return e instanceof HTMLInputElement&&"select"in e}function ai(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&oqe(e)&&t&&e.select()}}var LW=rqe();function rqe(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=NW(e,t),e.unshift(t)},remove(t){var n;e=NW(e,t),(n=e[0])==null||n.resume()}}}function NW(e,t){const n=[...e],o=n.indexOf(t);return o!==-1&&n.splice(o,1),n}function aqe(e){return e.filter(t=>t.tagName!=="A")}var iqe=EO[" useId ".trim().toString()]||(()=>{}),sqe=0;function Nn(e){const[t,n]=m.useState(iqe());return Hi(()=>{n(o=>o??String(sqe++))},[e]),e||(t?`radix-${t}`:"")}const cqe=["top","right","bottom","left"],Oi=Math.min,ro=Math.max,iz=Math.round,Np=Math.floor,Vr=e=>({x:e,y:e}),lqe={left:"right",right:"left",bottom:"top",top:"bottom"};function JH(e,t,n){return ro(e,Oi(t,n))}function Aa(e,t){return typeof e=="function"?e(t):e}function Ea(e){return e.split("-")[0]}function W0(e){return e.split("-")[1]}function QF(e){return e==="x"?"y":"x"}function JF(e){return e==="y"?"height":"width"}function Tr(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function eq(e){return QF(Tr(e))}function dqe(e,t,n){n===void 0&&(n=!1);const o=W0(e),r=eq(e),a=JF(r);let i=r==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(i=sz(i)),[i,sz(i)]}function uqe(e){const t=sz(e);return[eO(e),t,eO(t)]}function eO(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const IW=["left","right"],AW=["right","left"],hqe=["top","bottom"],fqe=["bottom","top"];function pqe(e,t,n){switch(e){case"top":case"bottom":return n?t?AW:IW:t?IW:AW;case"left":case"right":return t?hqe:fqe;default:return[]}}function yqe(e,t,n,o){const r=W0(e);let a=pqe(Ea(e),n==="start",o);return r&&(a=a.map(i=>i+"-"+r),t&&(a=a.concat(a.map(eO)))),a}function sz(e){const t=Ea(e);return lqe[t]+e.slice(t.length)}function mqe(e){return{top:0,right:0,bottom:0,left:0,...e}}function pee(e){return typeof e!="number"?mqe(e):{top:e,right:e,bottom:e,left:e}}function cz(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 EW(e,t,n){let{reference:o,floating:r}=e;const a=Tr(t),i=eq(t),s=JF(i),c=Ea(t),l=a==="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(W0(t)){case"start":y[i]-=p*(n&&l?-1:1);break;case"end":y[i]+=p*(n&&l?-1:1);break}return y}async function gqe(e,t){var n;t===void 0&&(t={});const{x:o,y:r,platform:a,rects:i,elements:s,strategy:c}=e,{boundary:l="clippingAncestors",rootBoundary:h="viewport",elementContext:u="floating",altBoundary:p=!1,padding:y=0}=Aa(t,e),g=pee(y),x=s[p?u==="floating"?"reference":"floating":u],v=cz(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(x)))==null||n?x:x.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(s.floating)),boundary:l,rootBoundary:h,strategy:c})),M=u==="floating"?{x:o,y:r,width:i.floating.width,height:i.floating.height}:i.reference,w=await(a.getOffsetParent==null?void 0:a.getOffsetParent(s.floating)),b=await(a.isElement==null?void 0:a.isElement(w))?await(a.getScale==null?void 0:a.getScale(w))||{x:1,y:1}:{x:1,y:1},C=cz(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.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 kqe=50,vqe=async(e,t,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:a=[],platform:i}=n,s=i.detectOverflow?i:{...i,detectOverflow:gqe},c=await(i.isRTL==null?void 0:i.isRTL(t));let l=await i.getElementRects({reference:e,floating:t,strategy:r}),{x:h,y:u}=EW(l,o,c),p=o,y=0;const g={};for(let k=0;k<a.length;k++){const x=a[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<kqe&&(y++,typeof _=="object"&&(_.placement&&(p=_.placement),_.rects&&(l=_.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:r}):_.rects),{x:h,y:u}=EW(l,p,c)),k=-1)}return{x:h,y:u,placement:p,strategy:r,middlewareData:g}},xqe=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:o,placement:r,rects:a,platform:i,elements:s,middlewareData:c}=t,{element:l,padding:h=0}=Aa(e,t)||{};if(l==null)return{};const u=pee(h),p={x:n,y:o},y=eq(r),g=JF(y),k=await i.getDimensions(l),x=y==="y",v=x?"top":"left",M=x?"bottom":"right",w=x?"clientHeight":"clientWidth",b=a.reference[g]+a.reference[y]-p[y]-a.floating[g],C=p[y]-a.reference[y],_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(l));let S=_?_[w]:0;(!S||!await(i.isElement==null?void 0:i.isElement(_)))&&(S=s.floating[w]||a.floating[g]);const N=b/2-C/2,P=S/2-k[g]/2-1,A=Oi(u[v],P),E=Oi(u[M],P),z=A,W=S-k[g]-E,$=S/2-k[g]/2+N,T=JH(z,$,W),D=!c.arrow&&W0(r)!=null&&$!==T&&a.reference[g]/2-($<z?A:E)-k[g]/2<0,O=D?$<z?$-z:$-W:0;return{[y]:p[y]+O,data:{[y]:T,centerOffset:$-T-O,...D&&{alignmentOffset:O}},reset:D}}}),wqe=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:r,middlewareData:a,rects:i,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}=Aa(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const v=Ea(r),M=Tr(s),w=Ea(s)===s,b=await(c.isRTL==null?void 0:c.isRTL(l.floating)),C=p||(w||!k?[sz(s)]:uqe(s)),_=g!=="none";!p&&_&&C.push(...yqe(s,k,g,b));const S=[s,...C],N=await c.detectOverflow(t,x),P=[];let A=((o=a.flip)==null?void 0:o.overflows)||[];if(h&&P.push(N[v]),u){const $=dqe(r,i,b);P.push(N[$[0]],N[$[1]])}if(A=[...A,{placement:r,overflows:P}],!P.every($=>$<=0)){var E,z;const $=(((E=a.flip)==null?void 0:E.index)||0)+1,T=S[$];if(T&&(!(u==="alignment"?M!==Tr(T):!1)||A.every(I=>Tr(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 W;const O=(W=A.filter(I=>{if(_){const R=Tr(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:W[0];O&&(D=O);break}case"initialPlacement":D=s;break}if(r!==D)return{reset:{placement:D}}}return{}}}};function jW(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function $W(e){return cqe.some(t=>e[t]>=0)}const Mqe=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:o}=t,{strategy:r="referenceHidden",...a}=Aa(e,t);switch(r){case"referenceHidden":{const i=await o.detectOverflow(t,{...a,elementContext:"reference"}),s=jW(i,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:$W(s)}}}case"escaped":{const i=await o.detectOverflow(t,{...a,altBoundary:!0}),s=jW(i,n.floating);return{data:{escapedOffsets:s,escaped:$W(s)}}}default:return{}}}}},yee=new Set(["left","top"]);async function bqe(e,t){const{placement:n,platform:o,elements:r}=e,a=await(o.isRTL==null?void 0:o.isRTL(r.floating)),i=Ea(n),s=W0(n),c=Tr(n)==="y",l=yee.has(i)?-1:1,h=a&&c?-1:1,u=Aa(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 _qe=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:r,y:a,placement:i,middlewareData:s}=t,c=await bqe(t,e);return i===((n=s.offset)==null?void 0:n.placement)&&(o=s.arrow)!=null&&o.alignmentOffset?{}:{x:r+c.x,y:a+c.y,data:{...c,placement:i}}}}},Cqe=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:r,platform:a}=t,{mainAxis:i=!0,crossAxis:s=!1,limiter:c={fn:v=>{let{x:M,y:w}=v;return{x:M,y:w}}},...l}=Aa(e,t),h={x:n,y:o},u=await a.detectOverflow(t,l),p=Tr(Ea(r)),y=QF(p);let g=h[y],k=h[p];if(i){const v=y==="y"?"top":"left",M=y==="y"?"bottom":"right",w=g+u[v],b=g-u[M];g=JH(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=JH(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]:i,[p]:s}}}}}},Sqe=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:o,placement:r,rects:a,middlewareData:i}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=Aa(e,t),h={x:n,y:o},u=Tr(r),p=QF(u);let y=h[p],g=h[u];const k=Aa(s,t),x=typeof k=="number"?{mainAxis:k,crossAxis:0}:{mainAxis:0,crossAxis:0,...k};if(c){const w=p==="y"?"height":"width",b=a.reference[p]-a.floating[w]+x.mainAxis,C=a.reference[p]+a.reference[w]-x.mainAxis;y<b?y=b:y>C&&(y=C)}if(l){var v,M;const w=p==="y"?"width":"height",b=yee.has(Ea(r)),C=a.reference[u]-a.floating[w]+(b&&((v=i.offset)==null?void 0:v[u])||0)+(b?0:x.crossAxis),_=a.reference[u]+a.reference[w]+(b?0:((M=i.offset)==null?void 0:M[u])||0)-(b?x.crossAxis:0);g<C?g=C:g>_&&(g=_)}return{[p]:y,[u]:g}}}},Lqe=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,o;const{placement:r,rects:a,platform:i,elements:s}=t,{apply:c=()=>{},...l}=Aa(e,t),h=await i.detectOverflow(t,l),u=Ea(r),p=W0(r),y=Tr(r)==="y",{width:g,height:k}=a.floating;let x,v;u==="top"||u==="bottom"?(x=u,v=p===(await(i.isRTL==null?void 0:i.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=Oi(k-h[x],M),C=Oi(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=ro(h.left,0),E=ro(h.right,0),z=ro(h.top,0),W=ro(h.bottom,0);y?N=g-2*(A!==0||E!==0?A+E:ro(h.left,h.right)):S=k-2*(z!==0||W!==0?z+W:ro(h.top,h.bottom))}await c({...t,availableWidth:N,availableHeight:S});const P=await i.getDimensions(s.floating);return g!==P.width||k!==P.height?{reset:{rects:!0}}:{}}}};function dR(){return typeof window<"u"}function G0(e){return mee(e)?(e.nodeName||"").toLowerCase():"#document"}function lo(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Zr(e){var t;return(t=(mee(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function mee(e){return dR()?e instanceof Node||e instanceof lo(e).Node:!1}function rr(e){return dR()?e instanceof Element||e instanceof lo(e).Element:!1}function Pa(e){return dR()?e instanceof HTMLElement||e instanceof lo(e).HTMLElement:!1}function PW(e){return!dR()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof lo(e).ShadowRoot}function Lf(e){const{overflow:t,overflowX:n,overflowY:o,display:r}=ar(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&r!=="inline"&&r!=="contents"}function Nqe(e){return/^(table|td|th)$/.test(G0(e))}function uR(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const Iqe=/transform|translate|scale|rotate|perspective|filter/,Aqe=/paint|layout|strict|content/,cs=e=>!!e&&e!=="none";let OT;function tq(e){const t=rr(e)?ar(e):e;return cs(t.transform)||cs(t.translate)||cs(t.scale)||cs(t.rotate)||cs(t.perspective)||!nq()&&(cs(t.backdropFilter)||cs(t.filter))||Iqe.test(t.willChange||"")||Aqe.test(t.contain||"")}function Eqe(e){let t=Fi(e);for(;Pa(t)&&!R0(t);){if(tq(t))return t;if(uR(t))return null;t=Fi(t)}return null}function nq(){return OT==null&&(OT=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),OT}function R0(e){return/^(html|body|#document)$/.test(G0(e))}function ar(e){return lo(e).getComputedStyle(e)}function hR(e){return rr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Fi(e){if(G0(e)==="html")return e;const t=e.assignedSlot||e.parentNode||PW(e)&&e.host||Zr(e);return PW(t)?t.host:t}function gee(e){const t=Fi(e);return R0(t)?e.ownerDocument?e.ownerDocument.body:e.body:Pa(t)&&Lf(t)?t:gee(t)}function af(e,t,n){var o;t===void 0&&(t=[]),n===void 0&&(n=!0);const r=gee(e),a=r===((o=e.ownerDocument)==null?void 0:o.body),i=lo(r);if(a){const s=tO(i);return t.concat(i,i.visualViewport||[],Lf(r)?r:[],s&&n?af(s):[])}else return t.concat(r,af(r,[],n))}function tO(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function kee(e){const t=ar(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const r=Pa(e),a=r?e.offsetWidth:n,i=r?e.offsetHeight:o,s=iz(n)!==a||iz(o)!==i;return s&&(n=a,o=i),{width:n,height:o,$:s}}function oq(e){return rr(e)?e:e.contextElement}function c0(e){const t=oq(e);if(!Pa(t))return Vr(1);const n=t.getBoundingClientRect(),{width:o,height:r,$:a}=kee(t);let i=(a?iz(n.width):n.width)/o,s=(a?iz(n.height):n.height)/r;return(!i||!Number.isFinite(i))&&(i=1),(!s||!Number.isFinite(s))&&(s=1),{x:i,y:s}}const jqe=Vr(0);function vee(e){const t=lo(e);return!nq()||!t.visualViewport?jqe:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function $qe(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==lo(e)?!1:t}function Pd(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=e.getBoundingClientRect(),a=oq(e);let i=Vr(1);t&&(o?rr(o)&&(i=c0(o)):i=c0(e));const s=$qe(a,n,o)?vee(a):Vr(0);let c=(r.left+s.x)/i.x,l=(r.top+s.y)/i.y,h=r.width/i.x,u=r.height/i.y;if(a){const p=lo(a),y=o&&rr(o)?lo(o):o;let g=p,k=tO(g);for(;k&&o&&y!==g;){const x=c0(k),v=k.getBoundingClientRect(),M=ar(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=lo(k),k=tO(g)}}return cz({width:h,height:u,x:c,y:l})}function fR(e,t){const n=hR(e).scrollLeft;return t?t.left+n:Pd(Zr(e)).left+n}function xee(e,t){const n=e.getBoundingClientRect(),o=n.left+t.scrollLeft-fR(e,n),r=n.top+t.scrollTop;return{x:o,y:r}}function Pqe(e){let{elements:t,rect:n,offsetParent:o,strategy:r}=e;const a=r==="fixed",i=Zr(o),s=t?uR(t.floating):!1;if(o===i||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=Vr(1);const h=Vr(0),u=Pa(o);if((u||!u&&!a)&&((G0(o)!=="body"||Lf(i))&&(c=hR(o)),u)){const y=Pd(o);l=c0(o),h.x=y.x+o.clientLeft,h.y=y.y+o.clientTop}const p=i&&!u&&!a?xee(i,c):Vr(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 zqe(e){return Array.from(e.getClientRects())}function Rqe(e){const t=Zr(e),n=hR(e),o=e.ownerDocument.body,r=ro(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),a=ro(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let i=-n.scrollLeft+fR(e);const s=-n.scrollTop;return ar(o).direction==="rtl"&&(i+=ro(t.clientWidth,o.clientWidth)-r),{width:r,height:a,x:i,y:s}}const zW=25;function Tqe(e,t){const n=lo(e),o=Zr(e),r=n.visualViewport;let a=o.clientWidth,i=o.clientHeight,s=0,c=0;if(r){a=r.width,i=r.height;const h=nq();(!h||h&&t==="fixed")&&(s=r.offsetLeft,c=r.offsetTop)}const l=fR(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<=zW&&(a-=g)}else l<=zW&&(a+=l);return{width:a,height:i,x:s,y:c}}function Dqe(e,t){const n=Pd(e,!0,t==="fixed"),o=n.top+e.clientTop,r=n.left+e.clientLeft,a=Pa(e)?c0(e):Vr(1),i=e.clientWidth*a.x,s=e.clientHeight*a.y,c=r*a.x,l=o*a.y;return{width:i,height:s,x:c,y:l}}function RW(e,t,n){let o;if(t==="viewport")o=Tqe(e,n);else if(t==="document")o=Rqe(Zr(e));else if(rr(t))o=Dqe(t,n);else{const r=vee(e);o={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return cz(o)}function wee(e,t){const n=Fi(e);return n===t||!rr(n)||R0(n)?!1:ar(n).position==="fixed"||wee(n,t)}function Hqe(e,t){const n=t.get(e);if(n)return n;let o=af(e,[],!1).filter(s=>rr(s)&&G0(s)!=="body"),r=null;const a=ar(e).position==="fixed";let i=a?Fi(e):e;for(;rr(i)&&!R0(i);){const s=ar(i),c=tq(i);!c&&s.position==="fixed"&&(r=null),(a?!c&&!r:!c&&s.position==="static"&&!!r&&(r.position==="absolute"||r.position==="fixed")||Lf(i)&&!c&&wee(e,i))?o=o.filter(h=>h!==i):r=s,i=Fi(i)}return t.set(e,o),o}function Oqe(e){let{element:t,boundary:n,rootBoundary:o,strategy:r}=e;const i=[...n==="clippingAncestors"?uR(t)?[]:Hqe(t,this._c):[].concat(n),o],s=RW(t,i[0],r);let c=s.top,l=s.right,h=s.bottom,u=s.left;for(let p=1;p<i.length;p++){const y=RW(t,i[p],r);c=ro(y.top,c),l=Oi(y.right,l),h=Oi(y.bottom,h),u=ro(y.left,u)}return{width:l-u,height:h-c,x:u,y:c}}function Fqe(e){const{width:t,height:n}=kee(e);return{width:t,height:n}}function qqe(e,t,n){const o=Pa(t),r=Zr(t),a=n==="fixed",i=Pd(e,!0,a,t);let s={scrollLeft:0,scrollTop:0};const c=Vr(0);function l(){c.x=fR(r)}if(o||!o&&!a)if((G0(t)!=="body"||Lf(r))&&(s=hR(t)),o){const y=Pd(t,!0,a,t);c.x=y.x+t.clientLeft,c.y=y.y+t.clientTop}else r&&l();a&&!o&&r&&l();const h=r&&!o&&!a?xee(r,s):Vr(0),u=i.left+s.scrollLeft-c.x-h.x,p=i.top+s.scrollTop-c.y-h.y;return{x:u,y:p,width:i.width,height:i.height}}function FT(e){return ar(e).position==="static"}function TW(e,t){if(!Pa(e)||ar(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Zr(e)===n&&(n=n.ownerDocument.body),n}function Mee(e,t){const n=lo(e);if(uR(e))return n;if(!Pa(e)){let r=Fi(e);for(;r&&!R0(r);){if(rr(r)&&!FT(r))return r;r=Fi(r)}return n}let o=TW(e,t);for(;o&&Nqe(o)&&FT(o);)o=TW(o,t);return o&&R0(o)&&FT(o)&&!tq(o)?n:o||Eqe(e)||n}const Vqe=async function(e){const t=this.getOffsetParent||Mee,n=this.getDimensions,o=await n(e.floating);return{reference:qqe(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function Bqe(e){return ar(e).direction==="rtl"}const Uqe={convertOffsetParentRelativeRectToViewportRelativeRect:Pqe,getDocumentElement:Zr,getClippingRect:Oqe,getOffsetParent:Mee,getElementRects:Vqe,getClientRects:zqe,getDimensions:Fqe,getScale:c0,isElement:rr,isRTL:Bqe};function bee(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Wqe(e,t){let n=null,o;const r=Zr(e);function a(){var s;clearTimeout(o),(s=n)==null||s.disconnect(),n=null}function i(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),a();const l=e.getBoundingClientRect(),{left:h,top:u,width:p,height:y}=l;if(s||t(),!p||!y)return;const g=Np(u),k=Np(r.clientWidth-(h+p)),x=Np(r.clientHeight-(u+y)),v=Np(h),w={rootMargin:-g+"px "+-k+"px "+-x+"px "+-v+"px",threshold:ro(0,Oi(1,c))||1};let b=!0;function C(_){const S=_[0].intersectionRatio;if(S!==c){if(!b)return i();S?i(!1,S):o=setTimeout(()=>{i(!1,1e-7)},1e3)}S===1&&!bee(l,e.getBoundingClientRect())&&i(),b=!1}try{n=new IntersectionObserver(C,{...w,root:r.ownerDocument})}catch{n=new IntersectionObserver(C,w)}n.observe(e)}return i(!0),a}function Gqe(e,t,n,o){o===void 0&&(o={});const{ancestorScroll:r=!0,ancestorResize:a=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:c=!1}=o,l=oq(e),h=r||a?[...l?af(l):[],...t?af(t):[]]:[];h.forEach(v=>{r&&v.addEventListener("scroll",n,{passive:!0}),a&&v.addEventListener("resize",n)});const u=l&&s?Wqe(l,n):null;let p=-1,y=null;i&&(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?Pd(e):null;c&&x();function x(){const v=Pd(e);k&&!bee(k,v)&&n(),k=v,g=requestAnimationFrame(x)}return n(),()=>{var v;h.forEach(M=>{r&&M.removeEventListener("scroll",n),a&&M.removeEventListener("resize",n)}),u==null||u(),(v=y)==null||v.disconnect(),y=null,c&&cancelAnimationFrame(g)}}const Kqe=_qe,Zqe=Cqe,Xqe=wqe,Yqe=Lqe,Qqe=Mqe,DW=xqe,Jqe=Sqe,eVe=(e,t,n)=>{const o=new Map,r={platform:Uqe,...n},a={...r.platform,_c:o};return vqe(e,t,{...r,platform:a})};var tVe=typeof document<"u",nVe=function(){},sP=tVe?m.useLayoutEffect:nVe;function lz(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(!lz(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 a=r[o];if(!(a==="_owner"&&e.$$typeof)&&!lz(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function _ee(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function HW(e,t){const n=_ee(e);return Math.round(t*n)/n}function qT(e){const t=m.useRef(e);return sP(()=>{t.current=e}),t}function oVe(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:o=[],platform:r,elements:{reference:a,floating:i}={},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);lz(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=a||g,C=i||x,_=m.useRef(null),S=m.useRef(null),N=m.useRef(h),P=c!=null,A=qT(c),E=qT(r),z=qT(l),W=m.useCallback(()=>{if(!_.current||!S.current)return;const I={placement:t,strategy:n,middleware:p};E.current&&(I.platform=E.current),eVe(_.current,S.current,I).then(R=>{const L={...R,isPositioned:z.current!==!1};$.current&&!lz(N.current,L)&&(N.current=L,Od.flushSync(()=>{u(L)}))})},[p,t,n,E,z]);sP(()=>{l===!1&&N.current.isPositioned&&(N.current.isPositioned=!1,u(I=>({...I,isPositioned:!1})))},[l]);const $=m.useRef(!1);sP(()=>($.current=!0,()=>{$.current=!1}),[]),sP(()=>{if(b&&(_.current=b),C&&(S.current=C),b&&C){if(A.current)return A.current(b,C,W);W()}},[b,C,W,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=HW(D.floating,h.x),L=HW(D.floating,h.y);return s?{...I,transform:"translate("+R+"px, "+L+"px)",..._ee(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:W,refs:T,elements:D,floatingStyles:O}),[h,W,T,D,O])}const rVe=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?DW({element:o.current,padding:r}).fn(n):{}:o?DW({element:o,padding:r}).fn(n):{}}}},aVe=(e,t)=>{const n=Kqe(e);return{name:n.name,fn:n.fn,options:[e,t]}},iVe=(e,t)=>{const n=Zqe(e);return{name:n.name,fn:n.fn,options:[e,t]}},sVe=(e,t)=>({fn:Jqe(e).fn,options:[e,t]}),cVe=(e,t)=>{const n=Xqe(e);return{name:n.name,fn:n.fn,options:[e,t]}},lVe=(e,t)=>{const n=Yqe(e);return{name:n.name,fn:n.fn,options:[e,t]}},dVe=(e,t)=>{const n=Qqe(e);return{name:n.name,fn:n.fn,options:[e,t]}},uVe=(e,t)=>{const n=rVe(e);return{name:n.name,fn:n.fn,options:[e,t]}};var hVe="Arrow",Cee=m.forwardRef((e,t)=>{const{children:n,width:o=10,height:r=5,...a}=e;return f.jsx(Ve.svg,{...a,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"})})});Cee.displayName=hVe;var fVe=Cee,rq="Popper",[See,K0]=lr(rq),[pVe,Lee]=See(rq),Nee=e=>{const{__scopePopper:t,children:n}=e,[o,r]=m.useState(null);return f.jsx(pVe,{scope:t,anchor:o,onAnchorChange:r,children:n})};Nee.displayName=rq;var Iee="PopperAnchor",Aee=m.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:o,...r}=e,a=Lee(Iee,n),i=m.useRef(null),s=mt(t,i),c=m.useRef(null);return m.useEffect(()=>{const l=c.current;c.current=(o==null?void 0:o.current)||i.current,l!==c.current&&a.onAnchorChange(c.current)}),o?null:f.jsx(Ve.div,{...r,ref:s})});Aee.displayName=Iee;var aq="PopperContent",[yVe,mVe]=See(aq),Eee=m.forwardRef((e,t)=>{var re,oe,ne,ce,ve,ge;const{__scopePopper:n,side:o="bottom",sideOffset:r=0,align:a="center",alignOffset:i=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=Lee(aq,n),[v,M]=m.useState(null),w=mt(t,xe=>M(xe)),[b,C]=m.useState(null),_=VJ(b),S=(_==null?void 0:_.width)??0,N=(_==null?void 0:_.height)??0,P=o+(a!=="center"?"-"+a:""),A=typeof h=="number"?h:{top:0,right:0,bottom:0,left:0,...h},E=Array.isArray(l)?l:[l],z=E.length>0,W={padding:A,boundary:E.filter(kVe),altBoundary:z},{refs:$,floatingStyles:T,placement:D,isPositioned:O,middlewareData:I}=oVe({strategy:"fixed",placement:P,whileElementsMounted:(...xe)=>Gqe(...xe,{animationFrame:y==="always"}),elements:{reference:x.anchor},middleware:[aVe({mainAxis:r+N,alignmentAxis:i}),c&&iVe({mainAxis:!0,crossAxis:!1,limiter:u==="partial"?sVe():void 0,...W}),c&&cVe({...W}),lVe({...W,apply:({elements:xe,rects:Re,availableWidth:Ye,availableHeight:le})=>{const{width:Ie,height:jt}=Re.reference,xt=xe.floating.style;xt.setProperty("--radix-popper-available-width",`${Ye}px`),xt.setProperty("--radix-popper-available-height",`${le}px`),xt.setProperty("--radix-popper-anchor-width",`${Ie}px`),xt.setProperty("--radix-popper-anchor-height",`${jt}px`)}}),b&&uVe({element:b,padding:s}),vVe({arrowWidth:S,arrowHeight:N}),p&&dVe({strategy:"referenceHidden",...W})]}),[R,L]=Pee(D),V=Gr(g);Hi(()=>{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,K=((ne=I.arrow)==null?void 0:ne.centerOffset)!==0,[X,J]=m.useState();return Hi(()=>{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:X,"--radix-popper-transform-origin":[(ce=I.transformOrigin)==null?void 0:ce.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(yVe,{scope:n,placedSide:R,onArrowChange:C,arrowX:H,arrowY:j,shouldHideArrow:K,children:f.jsx(Ve.div,{"data-side":R,"data-align":L,...k,ref:w,style:{...k.style,animation:O?void 0:"none"}})})})});Eee.displayName=aq;var jee="PopperArrow",gVe={top:"bottom",right:"left",bottom:"top",left:"right"},$ee=m.forwardRef(function(t,n){const{__scopePopper:o,...r}=t,a=mVe(jee,o),i=gVe[a.placedSide];return f.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:f.jsx(fVe,{...r,ref:n,style:{...r.style,display:"block"}})})});$ee.displayName=jee;function kVe(e){return e!==null}var vVe=e=>({name:"transformOrigin",options:e,fn(t){var x,v,M;const{placement:n,rects:o,middlewareData:r}=t,i=((x=r.arrow)==null?void 0:x.centerOffset)!==0,s=i?0:e.arrowWidth,c=i?0:e.arrowHeight,[l,h]=Pee(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=i?u:`${p}px`,k=`${-c}px`):l==="top"?(g=i?u:`${p}px`,k=`${o.floating.height+c}px`):l==="right"?(g=`${-c}px`,k=i?u:`${y}px`):l==="left"&&(g=`${o.floating.width+c}px`,k=i?u:`${y}px`),{data:{x:g,y:k}}}});function Pee(e){const[t,n="center"]=e.split("-");return[t,n]}var iq=Nee,pR=Aee,sq=Eee,cq=$ee,xVe="Portal",Nf=m.forwardRef((e,t)=>{var s;const{container:n,...o}=e,[r,a]=m.useState(!1);Hi(()=>a(!0),[]);const i=n||r&&((s=globalThis==null?void 0:globalThis.document)==null?void 0:s.body);return i?Lce.createPortal(f.jsx(Ve.div,{...o,ref:t}),i):null});Nf.displayName=xVe;function wVe(e,t){return m.useReducer((n,o)=>t[n][o]??n,e)}var mo=e=>{const{present:t,children:n}=e,o=MVe(t),r=typeof n=="function"?n({present:o.isPresent}):m.Children.only(n),a=mt(o.ref,bVe(r));return typeof n=="function"||o.isPresent?m.cloneElement(r,{ref:a}):null};mo.displayName="Presence";function MVe(e){const[t,n]=m.useState(),o=m.useRef(null),r=m.useRef(e),a=m.useRef("none"),i=e?"mounted":"unmounted",[s,c]=wVe(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return m.useEffect(()=>{const l=Ip(o.current);a.current=s==="mounted"?l:"none"},[s]),Hi(()=>{const l=o.current,h=r.current;if(h!==e){const p=a.current,y=Ip(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]),Hi(()=>{if(t){let l;const h=t.ownerDocument.defaultView??window,u=y=>{const k=Ip(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&&(a.current=Ip(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 Ip(e){return(e==null?void 0:e.animationName)||"none"}function bVe(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 _Ve=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},vu=new WeakMap,Ap=new WeakMap,Ep={},VT=0,zee=function(e){return e&&(e.host||zee(e.parentNode))},CVe=function(e,t){return t.map(function(n){if(e.contains(n))return n;var o=zee(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})},SVe=function(e,t,n,o){var r=CVe(t,Array.isArray(e)?e:[e]);Ep[n]||(Ep[n]=new WeakMap);var a=Ep[n],i=[],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=(vu.get(p)||0)+1,x=(a.get(p)||0)+1;vu.set(p,k),a.set(p,x),i.push(p),k===1&&g&&Ap.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(),VT++,function(){i.forEach(function(u){var p=vu.get(u)-1,y=a.get(u)-1;vu.set(u,p),a.set(u,y),p||(Ap.has(u)||u.removeAttribute(o),Ap.delete(u)),y||u.removeAttribute(n)}),VT--,VT||(vu=new WeakMap,vu=new WeakMap,Ap=new WeakMap,Ep={})}},lq=function(e,t,n){n===void 0&&(n="data-aria-hidden");var o=Array.from(Array.isArray(e)?e:[e]),r=_Ve(e);return r?(o.push.apply(o,Array.from(r.querySelectorAll("[aria-live], script"))),SVe(o,r,n,"aria-hidden")):function(){return null}},zr=function(){return zr=Object.assign||function(t){for(var n,o=1,r=arguments.length;o<r;o++){n=arguments[o];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},zr.apply(this,arguments)};function Ree(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 LVe(e,t,n){if(n||arguments.length===2)for(var o=0,r=t.length,a;o<r;o++)(a||!(o in t))&&(a||(a=Array.prototype.slice.call(t,0,o)),a[o]=t[o]);return e.concat(a||Array.prototype.slice.call(t))}var cP="right-scroll-bar-position",lP="width-before-scroll-bar",NVe="with-scroll-bars-hidden",IVe="--removed-body-scroll-bar-size";function BT(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function AVe(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 EVe=typeof window<"u"?m.useLayoutEffect:m.useEffect,OW=new WeakMap;function jVe(e,t){var n=AVe(null,function(o){return e.forEach(function(r){return BT(r,o)})});return EVe(function(){var o=OW.get(n);if(o){var r=new Set(o),a=new Set(e),i=n.current;r.forEach(function(s){a.has(s)||BT(s,null)}),a.forEach(function(s){r.has(s)||BT(s,i)})}OW.set(n,e)},[e]),n}function $Ve(e){return e}function PVe(e,t){t===void 0&&(t=$Ve);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(a){var i=t(a,o);return n.push(i),function(){n=n.filter(function(s){return s!==i})}},assignSyncMedium:function(a){for(o=!0;n.length;){var i=n;n=[],i.forEach(a)}n={push:function(s){return a(s)},filter:function(){return n}}},assignMedium:function(a){o=!0;var i=[];if(n.length){var s=n;n=[],s.forEach(a),i=n}var c=function(){var h=i;i=[],h.forEach(a)},l=function(){return Promise.resolve().then(c)};l(),n={push:function(h){i.push(h),l()},filter:function(h){return i=i.filter(h),n}}}};return r}function zVe(e){e===void 0&&(e={});var t=PVe(null);return t.options=zr({async:!0,ssr:!1},e),t}var Tee=function(e){var t=e.sideCar,n=Ree(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,zr({},n))};Tee.isSideCarExport=!0;function RVe(e,t){return e.useMedium(t),Tee}var Dee=zVe(),UT=function(){},yR=m.forwardRef(function(e,t){var n=m.useRef(null),o=m.useState({onScrollCapture:UT,onWheelCapture:UT,onTouchMoveCapture:UT}),r=o[0],a=o[1],i=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=Ree(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=p,_=jVe([n,t]),S=zr(zr({},b),r);return m.createElement(m.Fragment,null,h&&m.createElement(C,{sideCar:Dee,removeScrollBar:l,shards:u,noRelative:y,noIsolation:g,inert:k,setCallbacks:a,allowPinchZoom:!!x,lockRef:n,gapMode:w}),i?m.cloneElement(m.Children.only(s),zr(zr({},S),{ref:_})):m.createElement(M,zr({},S,{className:c,ref:_}),s))});yR.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};yR.classNames={fullWidth:lP,zeroRight:cP};var TVe=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function DVe(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=TVe();return t&&e.setAttribute("nonce",t),e}function HVe(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function OVe(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var FVe=function(){var e=0,t=null;return{add:function(n){e==0&&(t=DVe())&&(HVe(t,n),OVe(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},qVe=function(){var e=FVe();return function(t,n){m.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Hee=function(){var e=qVe(),t=function(n){var o=n.styles,r=n.dynamic;return e(o,r),null};return t},VVe={left:0,top:0,right:0,gap:0},WT=function(e){return parseInt(e||"",10)||0},BVe=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[WT(n),WT(o),WT(r)]},UVe=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return VVe;var t=BVe(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])}},WVe=Hee(),l0="data-scroll-locked",GVe=function(e,t,n,o){var r=e.left,a=e.top,i=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":i,"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 LJ=8,GU=12,KU={height:`${LJ}px`,borderColor:"transparent"},ZU={width:`${LJ}px`,borderColor:"transparent"},sHe={width:`${GU}px`,height:`${GU}px`,background:"transparent",border:"none"},cHe={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},lHe=[{position:"top",style:KU},{position:"bottom",style:KU},{position:"left",style:ZU},{position:"right",style:ZU}],dHe=["top-left","top-right","bottom-left","bottom-right"],XU={pointerEvents:"none",cursor:"default"};function Fd({visible:e,minWidth:t=80,minHeight:n=40,onResizeStart:o,onResize:r,onResizeEnd:a,cornerVariant:i="invisible"}){const s=i==="visible"?cHe:sHe,c=h=>e?h:{...h,...XU},l=e?s:{...s,opacity:0,...XU};return f.jsxs(f.Fragment,{children:[lHe.map(({position:h,style:u})=>f.jsx(UU,{position:h,variant:Ti.Line,minWidth:t,minHeight:n,style:c(u),onResizeStart:o,onResize:r,onResizeEnd:a,children:f.jsx("span",{"data-testid":"resize-control","data-position":h})},h)),dHe.map(h=>f.jsx(UU,{position:h,variant:Ti.Handle,minWidth:t,minHeight:n,style:l,autoScale:!1,onResizeStart:o,onResize:r,onResizeEnd:a,children:f.jsx("span",{"data-testid":"resize-control","data-position":h})},h))]})}function qd(e){const{onResize:t,onResizeEnd:n,onResizeFinal:o,setResizing:r}=e,[a,i]=m.useState(!1),s=m.useRef(null),c=m.useRef(t),l=m.useRef(n),h=m.useRef(o),u=m.useRef(r);m.useEffect(()=>{c.current=t},[t]),m.useEffect(()=>{l.current=n},[n]),m.useEffect(()=>{h.current=o},[o]),m.useEffect(()=>{u.current=r},[r]);const p=m.useCallback((k,x)=>{var v;i(!0),(v=u.current)==null||v.call(u,!0),s.current=x?{x:x.x,y:x.y,width:x.width,height:x.height}:null},[]),y=m.useCallback((k,x)=>{var v;(v=c.current)==null||v.call(c,{x:x.x,y:x.y,width:x.width,height:x.height})},[]),g=m.useCallback((k,x)=>{var M,w,b,C;i(!1),(M=u.current)==null||M.call(u,!1);const v=s.current;s.current=null,!(v&&v.width===x.width&&v.height===x.height)&&((w=c.current)==null||w.call(c,{x:x.x,y:x.y,width:x.width,height:x.height}),(b=l.current)==null||b.call(l,{x:x.x,y:x.y,width:x.width,height:x.height}),v&&((C=h.current)==null||C.call(h,{x:x.x,y:x.y,width:x.width,height:x.height},v)))},[]);return{isResizing:a,onResizeStart:p,onResizeEvent:y,onResizeEnd:g}}const N0={width:48,height:48},uHe=24,hHe=24,_p="sf:opacity-0 sf:transition-opacity";function fHe(e){return Ct(e,"text").color??"currentColor"}function pHe({id:e,data:t,selected:n,isConnectable:o}){const{onResizeStart:r,onResizeEvent:a,onResizeEnd:i}=qd({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}),s=t.width!==void 0||t.height!==void 0,c=!!t.onNameChange,[l,h]=m.useState(!1),{studioBaseUrl:u}=m.useContext(CF),p=fHe(t.color),y=t.strokeWidth??2,g={...s?{}:{width:N0.width,height:N0.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(Fd,{visible:!!n&&!!t.onResize&&!l,cornerVariant:"visible",minWidth:uHe,minHeight:hHe,onResizeStart:r,onResize:a,onResizeEnd:i}),f.jsx(ct,{type:"target",position:fe.Top,id:"t",isConnectable:o,className:te(_p,n&&"sf:opacity-100!")}),f.jsx(ct,{type:"target",position:fe.Left,id:"l",isConnectable:o,className:te(_p,n&&"sf:opacity-100!")}),f.jsx(LY,{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(vi,{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(_p,n&&"sf:opacity-100!")}),f.jsx(ct,{type:"source",position:fe.Bottom,id:"b",isConnectable:o,className:te(_p,n&&"sf:opacity-100!")})]})}function yHe(e,t){return e.selected===t.selected&&e.data===t.data&&e.width===t.width&&e.height===t.height}const mHe=m.memo(pHe,yHe);function gHe(e,t){const n=e.screenToFlowPosition({x:t.width/2,y:t.height/2});return{x:n.x-N0.width/2,y:n.y-N0.height/2}}const NJ="seeflow:icon-recents",kHe=16;function IJ(){if(typeof window>"u")return[];try{const e=window.localStorage.getItem(NJ);if(e===null)return[];const t=JSON.parse(e);return Array.isArray(t)?t.every(n=>typeof n=="string")?t:[]:[]}catch{return[]}}function vHe(e){if(!(typeof window>"u"))try{const n=IJ().filter(r=>r!==e),o=[e,...n].slice(0,kHe);window.localStorage.setItem(NJ,JSON.stringify(o))}catch{}}const xHe=typeof navigator<"u"&&typeof navigator.platform=="string"&&navigator.platform.toLowerCase().includes("mac"),wHe=e=>e.length===1?e.toUpperCase():e==="Escape"?"Esc":e,zt=(e,t=xHe)=>{const n=wHe(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("+")},VF=[{id:"tool.select",label:"Select tool",description:"Switch to the selection tool",category:"Tools",shortcut:zt({key:"V"})},{id:"tool.hand",label:"Hand tool",description:"Pan the canvas; node interaction is suspended while armed",category:"Tools",shortcut:zt({key:"H"})},{id:"tool.rectangle",label:"Rectangle",description:"Draw rectangle nodes",category:"Tools",shortcut:zt({key:"R"})},{id:"tool.ellipse",label:"Ellipse",description:"Draw ellipse nodes",category:"Tools",shortcut:zt({key:"O"})},{id:"tool.text",label:"Text",description:"Add a text node",category:"Tools",shortcut:zt({key:"T"})},{id:"tool.sticky",label:"Sticky note",description:"Add a sticky note",category:"Tools",shortcut:zt({key:"S"})},{id:"tool.database",label:"Database",description:"Add a database node",category:"Tools",shortcut:zt({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:zt({meta:!0,key:"Z"}),enabled:e=>e.canUndo},{id:"edit.redo",label:"Redo",category:"Edit",shortcut:zt({meta:!0,shift:!0,key:"Z"}),enabled:e=>e.canRedo},{id:"edit.copy",label:"Copy",category:"Edit",shortcut:zt({meta:!0,key:"C"}),enabled:e=>e.hasSelection},{id:"edit.paste",label:"Paste",category:"Edit",shortcut:zt({meta:!0,key:"V"}),enabled:e=>e.hasClipboard},{id:"edit.duplicate",label:"Duplicate",category:"Edit",shortcut:zt({meta:!0,key:"D"}),enabled:e=>e.hasSelection},{id:"edit.delete",label:"Delete",category:"Edit",shortcut:zt({key:"Delete"}),enabled:e=>e.hasSelection},{id:"edit.selectAll",label:"Select all",category:"Edit",shortcut:zt({meta:!0,key:"A"})},{id:"view.fit",label:"Fit view",description:"Fit everything in the viewport",category:"View",shortcut:zt({meta:!0,key:"0"})},{id:"view.zoomIn",label:"Zoom in",category:"View",shortcut:zt({meta:!0,key:"="})},{id:"view.zoomOut",label:"Zoom out",category:"View",shortcut:zt({meta:!0,key:"-"})},{id:"view.zoom100",label:"Zoom to 100%",category:"View",shortcut:zt({key:"1"})},{id:"view.zoomToSelection",label:"Zoom to selection",category:"View",shortcut:zt({key:"F"}),enabled:e=>e.hasSelection},{id:"layout.tidy",label:"Tidy layout",description:"Auto-layout the canvas or current selection",category:"Layout",shortcut:zt({meta:!0,shift:!0,key:"L"})},{id:"selection.deselect",label:"Deselect",description:"Clear selection and exit draw mode",category:"Selection",shortcut:zt({key:"Escape"})},{id:"help.commandPalette",label:"Open command palette",category:"Help",shortcut:zt({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}],$T=e=>{const t=VF.find(n=>n.id===e);return t?t.shortcut?`${t.label} (${t.shortcut})`:t.label:""},MHe=1,bHe=10,_He=e=>{if(e.metaKey||e.ctrlKey||e.altKey)return null;const t=e.shiftKey?bHe:MHe;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}},CHe=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}},SHe=(e,t,n)=>{if(t.length===0)return[];const o=new Map(n.map(a=>[a.id,a])),r=[];for(const a of t){const i=o.get(a);i&&r.push({id:a,position:{x:i.position.x+e.dx,y:i.position.y+e.dy}})}return r},LHe=({event:e,isEditableActive:t,hasNodes:n,hasConnectors:o,selectedIds:r,hasClipboard:a})=>{if(!(e.metaKey||e.ctrlKey))return{type:"noop"};if(e.shiftKey||e.altKey)return{type:"noop"};const i=e.key.toLowerCase();return i!=="a"&&i!=="c"&&i!=="v"&&i!=="d"?{type:"noop"}:t?{type:"noop"}:i==="a"?!n&&!o?{type:"noop"}:{type:"selectAll"}:i==="c"?r.length===0?{type:"noop"}:{type:"copy",ids:r}:i==="d"?r.length===0?{type:"noop"}:{type:"duplicate",ids:r}:a?{type:"paste"}:{type:"noop"}},NHe=(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},IHe=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}},ri="seeflow",AJ=e=>`${e}:last-used-style:v1`,PT=()=>({node:{},connector:{}}),zT=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),BF=e=>{var t;try{const n=(t=globalThis.localStorage)==null?void 0:t.getItem(AJ(e));if(!n)return PT();const o=JSON.parse(n);if(!zT(o))return PT();const r=zT(o.node)?o.node:{},a=zT(o.connector)?o.connector:{};return{node:r,connector:a}}catch{return PT()}},EJ=(e,t)=>{var n;try{(n=globalThis.localStorage)==null||n.setItem(AJ(e),JSON.stringify(t))}catch{}},$2=e=>BF(e),YU=(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 a=BF(e);EJ(e,{...a,node:{...a.node,...r}})},AHe=(e,t)=>{const n=BF(e);EJ(e,{...n,connector:{...n.connector,...t}})},UF=1,QU=17,HH=(e,t)=>{if(!e)return{};const n={};for(const o of t)e[o]!==void 0&&(n[o]=e[o]);return n},EHe=["borderColor","backgroundColor","borderSize","borderStyle","fontSize","cornerRadius","shadow"],jHe=["borderColor","backgroundColor","borderSize","borderStyle","fontSize","shadow"],$He=["fontSize"],PHe=["borderColor","borderWidth","borderStyle","shadow"];function JU(e,t,n){if(e==="text")return{width:t.width,height:t.height,fontSize:QU,...HH(n,$He)};const o=e==="ellipse"?jHe:EHe;return{width:t.width,height:t.height,borderSize:UF,fontSize:QU,...HH(n,o)}}function zHe(e,t,n){return{path:e,width:t.width,height:t.height,borderWidth:UF,...HH(n,PHe)}}const mn=async(e,t,n,o,r)=>{const a={method:t},i={...o??{}};r!==void 0&&(i["content-type"]="application/json",a.body=JSON.stringify(r)),Object.keys(i).length>0&&(a.headers=i);const s=await e(n,a);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()},RHe=e=>{const{baseUrl:t,project:n,flow:o}=e,r=e.fetch??globalThis.fetch.bind(globalThis),a=e.EventSource??globalThis.EventSource,i=e.headers,s=`${t}/api/projects/${encodeURIComponent(n)}`,c=`${s}/flows/${encodeURIComponent(o)}`,l=`${t}/api/icons`;return{async createNode(u){const p=await mn(r,"POST",`${c}/nodes`,i,u);return{id:p.id,node:p.node}},async updateNode(u,p){await mn(r,"PATCH",`${c}/nodes/${u}`,i,p)},async updateNodePosition(u,p){return await mn(r,"PATCH",`${c}/nodes/${u}/position`,i,p)},async deleteNode(u){await mn(r,"DELETE",`${c}/nodes/${u}`,i)},async reorderNode(u,p){await mn(r,"PATCH",`${c}/nodes/${u}/order`,i,p)},async createConnector(u){return{id:(await mn(r,"POST",`${c}/connectors`,i,u)).id}},async updateConnector(u,p){await mn(r,"PATCH",`${c}/connectors/${u}`,i,p)},async deleteConnector(u){await mn(r,"DELETE",`${c}/connectors/${u}`,i)},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};i&&(x.headers={...i});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 mn(r,"POST",`${c}/play/${u}`,i,{})},async openFile(u){await mn(r,"POST",`${s}/files/open`,i,{path:u})},async revealFile(u){await mn(r,"POST",`${s}/files/reveal`,i,{path:u})},async computeLayout(u,p){const y=await mn(r,"POST",`${t}/api/layout`,i,{nodes:u,edges:p});return{nodes:y.nodes,connectors:y.connectors}},icons:{async listPacks(){return(await mn(r,"GET",`${l}/packs`,i)).packs},async install(u,p){return{jobId:(await mn(r,"POST",`${l}/install`,i,{vendor:u,acceptTerms:p.acceptTerms??!1})).jobId}},subscribeJob(u,p){const y=`${l}/jobs/${encodeURIComponent(u)}/events`,g=new a(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 mn(r,"DELETE",`${l}/packs/${encodeURIComponent(u)}`,i)},async getLicense(u){const p=await mn(r,"GET",`${l}/licenses/${encodeURIComponent(u)}`,i);return{summary:p.summary,url:p.url,requiresAcceptance:p.requiresAcceptance}}}}},THe=500,DHe=500,HHe=2e3,OHe=(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},eW=(e,t,n)=>{const o=Date.now(),r=THe,a=DHe,{stack:i,cursor:s}=e;if(t.coalesceKey&&s>0){const h=i[s-1];if(h&&h.coalesceKey===t.coalesceKey&&o-h.capturedAt<=a){const u=i.slice(0,s);return u[s-1]={...h,do:t.do,capturedAt:o,beforeFields:OHe(h.beforeFields,t.beforeFields)},{stack:u,cursor:s}}}const c=i.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}},FHe=e=>e.cursor===0?{state:e,entry:void 0}:{state:{...e,cursor:e.cursor-1},entry:e.stack[e.cursor-1]},qHe=e=>e.cursor===e.stack.length?{state:e,entry:void 0}:{state:{...e,cursor:e.cursor+1},entry:e.stack[e.cursor]},jJ=()=>({stack:[],cursor:0}),tW=e=>e.cursor===e.stack.length?e:{stack:e.stack.slice(0,e.cursor),cursor:e.cursor},VHe=(e,t,n=Date.now(),o=HHe)=>n-t>o?jJ():e,BHe=new Set(["borderColor","backgroundColor","borderSize","borderWidth","borderStyle","fontSize","textAlign","cornerRadius","shadow","color","strokeWidth","target"]);function UHe(e,t){let n={stack:[],cursor:0},o=0;const r=new Set;let a=null;const i=()=>({canUndo:n.cursor>0,canRedo:n.cursor<n.stack.length}),s=()=>{const k=i();for(const x of r)x(k)},c=()=>{if(a){o=Date.now();return}const k=tW(n);o=Date.now(),k!==n&&(n=k,s())},l=k=>{if(a){a.ops.push({redo:k.do,undo:k.undo});return}n=eW(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&&BHe.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=FHe(n);k.entry&&(n=k.state,s(),await k.entry.undo())},y=async()=>{const k=qHe(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=jJ(),s()},markExternalChange:()=>{const k=VHe(n,o);k!==n&&(n=k,s())},batch:async(k,x,v)=>{if(a)return x();const M=tW(n);o=Date.now(),M!==n&&(n=M,s());const w={name:k,ops:[]};a=w;try{const b=await x();if(a=null,w.ops.length>0){const C=w.ops.slice();n=eW(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){a=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(i()),()=>{r.delete(k)})}}}function $J(e,t,n){let o=null,r=!1;const a=new ResizeObserver(()=>{r||(o!==null&&clearTimeout(o),o=setTimeout(()=>{o=null,!r&&n()},t))});return a.observe(e),()=>{r||(r=!0,o!==null&&(clearTimeout(o),o=null),a.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 a={};for(const i of r)a[i]=i;return a},e.getValidEnumValues=r=>{const a=e.objectKeys(r).filter(s=>typeof r[r[s]]!="number"),i={};for(const s of a)i[s]=r[s];return e.objectValues(i)},e.objectValues=r=>e.objectKeys(r).map(function(a){return r[a]}),e.objectKeys=typeof Object.keys=="function"?r=>Object.keys(r):r=>{const a=[];for(const i in r)Object.prototype.hasOwnProperty.call(r,i)&&a.push(i);return a},e.find=(r,a)=>{for(const i of r)if(a(i))return i},e.isInteger=typeof Number.isInteger=="function"?r=>Number.isInteger(r):r=>typeof r=="number"&&Number.isFinite(r)&&Math.floor(r)===r;function o(r,a=" | "){return r.map(i=>typeof i=="string"?`'${i}'`:i).join(a)}e.joinValues=o,e.jsonStringifyReplacer=(r,a)=>typeof a=="bigint"?a.toString():a})(st||(st={}));var nW;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(nW||(nW={}));const Ce=st.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),fi=e=>{switch(typeof e){case"undefined":return Ce.undefined;case"string":return Ce.string;case"number":return Number.isNaN(e)?Ce.nan:Ce.number;case"boolean":return Ce.boolean;case"function":return Ce.function;case"bigint":return Ce.bigint;case"symbol":return Ce.symbol;case"object":return Array.isArray(e)?Ce.array:e===null?Ce.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?Ce.promise:typeof Map<"u"&&e instanceof Map?Ce.map:typeof Set<"u"&&e instanceof Set?Ce.set:typeof Date<"u"&&e instanceof Date?Ce.date:Ce.object;default:return Ce.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 Ia 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(a){return a.message},o={_errors:[]},r=a=>{for(const i of a.issues)if(i.code==="invalid_union")i.unionErrors.map(r);else if(i.code==="invalid_return_type")r(i.returnTypeError);else if(i.code==="invalid_arguments")r(i.argumentsError);else if(i.path.length===0)o._errors.push(n(i));else{let s=o,c=0;for(;c<i.path.length;){const l=i.path[c];c===i.path.length-1?(s[l]=s[l]||{_errors:[]},s[l]._errors.push(n(i))):s[l]=s[l]||{_errors:[]},s=s[l],c++}}};return r(this),o}static assert(t){if(!(t instanceof Ia))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 a=r.path[0];n[a]=n[a]||[],n[a].push(t(r))}else o.push(t(r));return{formErrors:o,fieldErrors:n}}get formErrors(){return this.flatten()}}Ia.create=e=>new Ia(e);const OH=(e,t)=>{let n;switch(e.code){case me.invalid_type:e.received===Ce.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 WHe=OH;function GHe(){return WHe}const KHe=e=>{const{data:t,path:n,errorMaps:o,issueData:r}=e,a=[...n,...r.path||[]],i={...r,path:a};if(r.message!==void 0)return{...r,path:a,message:r.message};let s="";const c=o.filter(l=>!!l).slice().reverse();for(const l of c)s=l(i,{data:t,defaultError:s}).message;return{...r,path:a,message:s}};function Me(e,t){const n=GHe(),o=KHe({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===OH?void 0:OH].filter(r=>!!r)});e.common.issues.push(o)}class In{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 a=await r.key,i=await r.value;o.push({key:a,value:i})}return In.mergeObjectSync(t,o)}static mergeObjectSync(t,n){const o={};for(const r of n){const{key:a,value:i}=r;if(a.status==="aborted"||i.status==="aborted")return qe;a.status==="dirty"&&t.dirty(),i.status==="dirty"&&t.dirty(),a.value!=="__proto__"&&(typeof i.value<"u"||r.alwaysSet)&&(o[a.value]=i.value)}return{status:t.value,value:o}}}const qe=Object.freeze({status:"aborted"}),P2=e=>({status:"dirty",value:e}),Po=e=>({status:"valid",value:e}),oW=e=>e.status==="aborted",rW=e=>e.status==="dirty",I0=e=>e.status==="valid",JP=e=>typeof Promise<"u"&&e instanceof Promise;var Ne;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(Ne||(Ne={}));class Ur{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 aW=(e,t)=>{if(I0(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 Ia(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:(i,s)=>{const{message:c}=e;return i.code==="invalid_enum_value"?{message:c??s.defaultError}:typeof s.data>"u"?{message:c??o??s.defaultError}:i.code!=="invalid_type"?{message:s.defaultError}:{message:c??n??s.defaultError}},description:r}}class tt{get description(){return this._def.description}_getType(t){return fi(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:fi(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new In,ctx:{common:t.parent.common,data:t.data,parsedType:fi(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(JP(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:fi(t)},r=this._parseSync({data:t,path:o.path,parent:o});return aW(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:fi(t)};if(!this["~standard"].async)try{const a=this._parseSync({data:t,path:[],parent:n});return I0(a)?{value:a.value}:{issues:n.common.issues}}catch(a){(r=(o=a==null?void 0:a.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(a=>I0(a)?{value:a.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:fi(t)},r=this._parse({data:t,path:o.path,parent:o}),a=await(JP(r)?r:Promise.resolve(r));return aW(o,a)}refine(t,n){const o=r=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(r):n;return this._refinement((r,a)=>{const i=t(r),s=()=>a.addIssue({code:me.custom,...o(r)});return typeof Promise<"u"&&i instanceof Promise?i.then(c=>c?!0:(s(),!1)):i?!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 j0({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 ji.create(this,this._def)}nullable(){return $0.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return qr.create(this)}promise(){return rz.create(this,this._def)}or(t){return tz.create([this,t],this._def)}and(t){return nz.create(this,t,this._def)}transform(t){return new j0({...Ge(this._def),schema:this,typeName:Oe.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new UH({...Ge(this._def),innerType:this,defaultValue:n,typeName:Oe.ZodDefault})}brand(){return new gOe({typeName:Oe.ZodBranded,type:this,...Ge(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new WH({...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 WF.create(this,t)}readonly(){return GH.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const ZHe=/^c[^\s-]{8,}$/i,XHe=/^[0-9a-z]+$/,YHe=/^[0-9A-HJKMNP-TV-Z]{26}$/i,QHe=/^[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,JHe=/^[a-z0-9_-]{21}$/i,eOe=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,tOe=/^[-+]?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)?)??$/,nOe=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,oOe="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let RT;const rOe=/^(?:(?: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])$/,aOe=/^(?:(?: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])$/,iOe=/^(([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]))$/,sOe=/^(([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])$/,cOe=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,lOe=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,PJ="((\\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])))",dOe=new RegExp(`^${PJ}$`);function zJ(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 uOe(e){return new RegExp(`^${zJ(e)}$`)}function hOe(e){let t=`${PJ}T${zJ(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 fOe(e,t){return!!((t==="v4"||!t)&&rOe.test(e)||(t==="v6"||!t)&&iOe.test(e))}function pOe(e,t){if(!eOe.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 yOe(e,t){return!!((t==="v4"||!t)&&aOe.test(e)||(t==="v6"||!t)&&sOe.test(e))}class Ma extends tt{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==Ce.string){const a=this._getOrReturnCtx(t);return Me(a,{code:me.invalid_type,expected:Ce.string,received:a.parsedType}),qe}const o=new In;let r;for(const a of this._def.checks)if(a.kind==="min")t.data.length<a.value&&(r=this._getOrReturnCtx(t,r),Me(r,{code:me.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),o.dirty());else if(a.kind==="max")t.data.length>a.value&&(r=this._getOrReturnCtx(t,r),Me(r,{code:me.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),o.dirty());else if(a.kind==="length"){const i=t.data.length>a.value,s=t.data.length<a.value;(i||s)&&(r=this._getOrReturnCtx(t,r),i?Me(r,{code:me.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}):s&&Me(r,{code:me.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}),o.dirty())}else if(a.kind==="email")nOe.test(t.data)||(r=this._getOrReturnCtx(t,r),Me(r,{validation:"email",code:me.invalid_string,message:a.message}),o.dirty());else if(a.kind==="emoji")RT||(RT=new RegExp(oOe,"u")),RT.test(t.data)||(r=this._getOrReturnCtx(t,r),Me(r,{validation:"emoji",code:me.invalid_string,message:a.message}),o.dirty());else if(a.kind==="uuid")QHe.test(t.data)||(r=this._getOrReturnCtx(t,r),Me(r,{validation:"uuid",code:me.invalid_string,message:a.message}),o.dirty());else if(a.kind==="nanoid")JHe.test(t.data)||(r=this._getOrReturnCtx(t,r),Me(r,{validation:"nanoid",code:me.invalid_string,message:a.message}),o.dirty());else if(a.kind==="cuid")ZHe.test(t.data)||(r=this._getOrReturnCtx(t,r),Me(r,{validation:"cuid",code:me.invalid_string,message:a.message}),o.dirty());else if(a.kind==="cuid2")XHe.test(t.data)||(r=this._getOrReturnCtx(t,r),Me(r,{validation:"cuid2",code:me.invalid_string,message:a.message}),o.dirty());else if(a.kind==="ulid")YHe.test(t.data)||(r=this._getOrReturnCtx(t,r),Me(r,{validation:"ulid",code:me.invalid_string,message:a.message}),o.dirty());else if(a.kind==="url")try{new URL(t.data)}catch{r=this._getOrReturnCtx(t,r),Me(r,{validation:"url",code:me.invalid_string,message:a.message}),o.dirty()}else a.kind==="regex"?(a.regex.lastIndex=0,a.regex.test(t.data)||(r=this._getOrReturnCtx(t,r),Me(r,{validation:"regex",code:me.invalid_string,message:a.message}),o.dirty())):a.kind==="trim"?t.data=t.data.trim():a.kind==="includes"?t.data.includes(a.value,a.position)||(r=this._getOrReturnCtx(t,r),Me(r,{code:me.invalid_string,validation:{includes:a.value,position:a.position},message:a.message}),o.dirty()):a.kind==="toLowerCase"?t.data=t.data.toLowerCase():a.kind==="toUpperCase"?t.data=t.data.toUpperCase():a.kind==="startsWith"?t.data.startsWith(a.value)||(r=this._getOrReturnCtx(t,r),Me(r,{code:me.invalid_string,validation:{startsWith:a.value},message:a.message}),o.dirty()):a.kind==="endsWith"?t.data.endsWith(a.value)||(r=this._getOrReturnCtx(t,r),Me(r,{code:me.invalid_string,validation:{endsWith:a.value},message:a.message}),o.dirty()):a.kind==="datetime"?hOe(a).test(t.data)||(r=this._getOrReturnCtx(t,r),Me(r,{code:me.invalid_string,validation:"datetime",message:a.message}),o.dirty()):a.kind==="date"?dOe.test(t.data)||(r=this._getOrReturnCtx(t,r),Me(r,{code:me.invalid_string,validation:"date",message:a.message}),o.dirty()):a.kind==="time"?uOe(a).test(t.data)||(r=this._getOrReturnCtx(t,r),Me(r,{code:me.invalid_string,validation:"time",message:a.message}),o.dirty()):a.kind==="duration"?tOe.test(t.data)||(r=this._getOrReturnCtx(t,r),Me(r,{validation:"duration",code:me.invalid_string,message:a.message}),o.dirty()):a.kind==="ip"?fOe(t.data,a.version)||(r=this._getOrReturnCtx(t,r),Me(r,{validation:"ip",code:me.invalid_string,message:a.message}),o.dirty()):a.kind==="jwt"?pOe(t.data,a.alg)||(r=this._getOrReturnCtx(t,r),Me(r,{validation:"jwt",code:me.invalid_string,message:a.message}),o.dirty()):a.kind==="cidr"?yOe(t.data,a.version)||(r=this._getOrReturnCtx(t,r),Me(r,{validation:"cidr",code:me.invalid_string,message:a.message}),o.dirty()):a.kind==="base64"?cOe.test(t.data)||(r=this._getOrReturnCtx(t,r),Me(r,{validation:"base64",code:me.invalid_string,message:a.message}),o.dirty()):a.kind==="base64url"?lOe.test(t.data)||(r=this._getOrReturnCtx(t,r),Me(r,{validation:"base64url",code:me.invalid_string,message:a.message}),o.dirty()):st.assertNever(a);return{status:o.value,value:t.data}}_regex(t,n,o){return this.refinement(r=>t.test(r),{validation:n,code:me.invalid_string,...Ne.errToObj(o)})}_addCheck(t){return new Ma({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...Ne.errToObj(t)})}url(t){return this._addCheck({kind:"url",...Ne.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...Ne.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...Ne.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...Ne.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...Ne.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...Ne.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...Ne.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...Ne.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...Ne.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...Ne.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...Ne.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...Ne.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,...Ne.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,...Ne.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...Ne.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...Ne.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...Ne.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...Ne.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...Ne.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...Ne.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...Ne.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...Ne.errToObj(n)})}nonempty(t){return this.min(1,Ne.errToObj(t))}trim(){return new Ma({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Ma({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Ma({...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}}Ma.create=e=>new Ma({checks:[],typeName:Oe.ZodString,coerce:(e==null?void 0:e.coerce)??!1,...Ge(e)});function mOe(e,t){const n=(e.toString().split(".")[1]||"").length,o=(t.toString().split(".")[1]||"").length,r=n>o?n:o,a=Number.parseInt(e.toFixed(r).replace(".","")),i=Number.parseInt(t.toFixed(r).replace(".",""));return a%i/10**r}class A0 extends tt{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)!==Ce.number){const a=this._getOrReturnCtx(t);return Me(a,{code:me.invalid_type,expected:Ce.number,received:a.parsedType}),qe}let o;const r=new In;for(const a of this._def.checks)a.kind==="int"?st.isInteger(t.data)||(o=this._getOrReturnCtx(t,o),Me(o,{code:me.invalid_type,expected:"integer",received:"float",message:a.message}),r.dirty()):a.kind==="min"?(a.inclusive?t.data<a.value:t.data<=a.value)&&(o=this._getOrReturnCtx(t,o),Me(o,{code:me.too_small,minimum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),r.dirty()):a.kind==="max"?(a.inclusive?t.data>a.value:t.data>=a.value)&&(o=this._getOrReturnCtx(t,o),Me(o,{code:me.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),r.dirty()):a.kind==="multipleOf"?mOe(t.data,a.value)!==0&&(o=this._getOrReturnCtx(t,o),Me(o,{code:me.not_multiple_of,multipleOf:a.value,message:a.message}),r.dirty()):a.kind==="finite"?Number.isFinite(t.data)||(o=this._getOrReturnCtx(t,o),Me(o,{code:me.not_finite,message:a.message}),r.dirty()):st.assertNever(a);return{status:r.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,Ne.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Ne.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Ne.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Ne.toString(n))}setLimit(t,n,o,r){return new A0({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:o,message:Ne.toString(r)}]})}_addCheck(t){return new A0({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:Ne.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Ne.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Ne.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Ne.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Ne.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Ne.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:Ne.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Ne.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Ne.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)}}A0.create=e=>new A0({checks:[],typeName:Oe.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...Ge(e)});class of extends tt{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)!==Ce.bigint)return this._getInvalidInput(t);let o;const r=new In;for(const a of this._def.checks)a.kind==="min"?(a.inclusive?t.data<a.value:t.data<=a.value)&&(o=this._getOrReturnCtx(t,o),Me(o,{code:me.too_small,type:"bigint",minimum:a.value,inclusive:a.inclusive,message:a.message}),r.dirty()):a.kind==="max"?(a.inclusive?t.data>a.value:t.data>=a.value)&&(o=this._getOrReturnCtx(t,o),Me(o,{code:me.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),r.dirty()):a.kind==="multipleOf"?t.data%a.value!==BigInt(0)&&(o=this._getOrReturnCtx(t,o),Me(o,{code:me.not_multiple_of,multipleOf:a.value,message:a.message}),r.dirty()):st.assertNever(a);return{status:r.value,value:t.data}}_getInvalidInput(t){const n=this._getOrReturnCtx(t);return Me(n,{code:me.invalid_type,expected:Ce.bigint,received:n.parsedType}),qe}gte(t,n){return this.setLimit("min",t,!0,Ne.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Ne.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Ne.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Ne.toString(n))}setLimit(t,n,o,r){return new of({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:o,message:Ne.toString(r)}]})}_addCheck(t){return new of({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Ne.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Ne.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Ne.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Ne.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Ne.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}}of.create=e=>new of({checks:[],typeName:Oe.ZodBigInt,coerce:(e==null?void 0:e.coerce)??!1,...Ge(e)});class FH extends tt{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==Ce.boolean){const o=this._getOrReturnCtx(t);return Me(o,{code:me.invalid_type,expected:Ce.boolean,received:o.parsedType}),qe}return Po(t.data)}}FH.create=e=>new FH({typeName:Oe.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...Ge(e)});class ez extends tt{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==Ce.date){const a=this._getOrReturnCtx(t);return Me(a,{code:me.invalid_type,expected:Ce.date,received:a.parsedType}),qe}if(Number.isNaN(t.data.getTime())){const a=this._getOrReturnCtx(t);return Me(a,{code:me.invalid_date}),qe}const o=new In;let r;for(const a of this._def.checks)a.kind==="min"?t.data.getTime()<a.value&&(r=this._getOrReturnCtx(t,r),Me(r,{code:me.too_small,message:a.message,inclusive:!0,exact:!1,minimum:a.value,type:"date"}),o.dirty()):a.kind==="max"?t.data.getTime()>a.value&&(r=this._getOrReturnCtx(t,r),Me(r,{code:me.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),o.dirty()):st.assertNever(a);return{status:o.value,value:new Date(t.data.getTime())}}_addCheck(t){return new ez({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:Ne.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:Ne.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}}ez.create=e=>new ez({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:Oe.ZodDate,...Ge(e)});class iW extends tt{_parse(t){if(this._getType(t)!==Ce.symbol){const o=this._getOrReturnCtx(t);return Me(o,{code:me.invalid_type,expected:Ce.symbol,received:o.parsedType}),qe}return Po(t.data)}}iW.create=e=>new iW({typeName:Oe.ZodSymbol,...Ge(e)});class sW extends tt{_parse(t){if(this._getType(t)!==Ce.undefined){const o=this._getOrReturnCtx(t);return Me(o,{code:me.invalid_type,expected:Ce.undefined,received:o.parsedType}),qe}return Po(t.data)}}sW.create=e=>new sW({typeName:Oe.ZodUndefined,...Ge(e)});class cW extends tt{_parse(t){if(this._getType(t)!==Ce.null){const o=this._getOrReturnCtx(t);return Me(o,{code:me.invalid_type,expected:Ce.null,received:o.parsedType}),qe}return Po(t.data)}}cW.create=e=>new cW({typeName:Oe.ZodNull,...Ge(e)});class lW extends tt{constructor(){super(...arguments),this._any=!0}_parse(t){return Po(t.data)}}lW.create=e=>new lW({typeName:Oe.ZodAny,...Ge(e)});class qH extends tt{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Po(t.data)}}qH.create=e=>new qH({typeName:Oe.ZodUnknown,...Ge(e)});class Di extends tt{_parse(t){const n=this._getOrReturnCtx(t);return Me(n,{code:me.invalid_type,expected:Ce.never,received:n.parsedType}),qe}}Di.create=e=>new Di({typeName:Oe.ZodNever,...Ge(e)});class dW extends tt{_parse(t){if(this._getType(t)!==Ce.undefined){const o=this._getOrReturnCtx(t);return Me(o,{code:me.invalid_type,expected:Ce.void,received:o.parsedType}),qe}return Po(t.data)}}dW.create=e=>new dW({typeName:Oe.ZodVoid,...Ge(e)});class qr extends tt{_parse(t){const{ctx:n,status:o}=this._processInputParams(t),r=this._def;if(n.parsedType!==Ce.array)return Me(n,{code:me.invalid_type,expected:Ce.array,received:n.parsedType}),qe;if(r.exactLength!==null){const i=n.data.length>r.exactLength.value,s=n.data.length<r.exactLength.value;(i||s)&&(Me(n,{code:i?me.too_big:me.too_small,minimum:s?r.exactLength.value:void 0,maximum:i?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((i,s)=>r.type._parseAsync(new Ur(n,i,n.path,s)))).then(i=>In.mergeArray(o,i));const a=[...n.data].map((i,s)=>r.type._parseSync(new Ur(n,i,n.path,s)));return In.mergeArray(o,a)}get element(){return this._def.type}min(t,n){return new qr({...this._def,minLength:{value:t,message:Ne.toString(n)}})}max(t,n){return new qr({...this._def,maxLength:{value:t,message:Ne.toString(n)}})}length(t,n){return new qr({...this._def,exactLength:{value:t,message:Ne.toString(n)}})}nonempty(t){return this.min(1,t)}}qr.create=(e,t)=>new qr({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Oe.ZodArray,...Ge(t)});function Nu(e){if(e instanceof Vt){const t={};for(const n in e.shape){const o=e.shape[n];t[n]=ji.create(Nu(o))}return new Vt({...e._def,shape:()=>t})}else return e instanceof qr?new qr({...e._def,type:Nu(e.element)}):e instanceof ji?ji.create(Nu(e.unwrap())):e instanceof $0?$0.create(Nu(e.unwrap())):e instanceof $d?$d.create(e.items.map(t=>Nu(t))):e}class Vt extends tt{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)!==Ce.object){const l=this._getOrReturnCtx(t);return Me(l,{code:me.invalid_type,expected:Ce.object,received:l.parsedType}),qe}const{status:o,ctx:r}=this._processInputParams(t),{shape:a,keys:i}=this._getCached(),s=[];if(!(this._def.catchall instanceof Di&&this._def.unknownKeys==="strip"))for(const l in r.data)i.includes(l)||s.push(l);const c=[];for(const l of i){const h=a[l],u=r.data[l];c.push({key:{status:"valid",value:l},value:h._parse(new Ur(r,u,r.path,l)),alwaysSet:l in r.data})}if(this._def.catchall instanceof Di){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 Ur(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=>In.mergeObjectSync(o,l)):In.mergeObjectSync(o,c)}get shape(){return this._def.shape()}strict(t){return Ne.errToObj,new Vt({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,o)=>{var a,i;const r=((i=(a=this._def).errorMap)==null?void 0:i.call(a,n,o).message)??o.defaultError;return n.code==="unrecognized_keys"?{message:Ne.errToObj(t).message??r}:{message:r}}}:{}})}strip(){return new Vt({...this._def,unknownKeys:"strip"})}passthrough(){return new Vt({...this._def,unknownKeys:"passthrough"})}extend(t){return new Vt({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new Vt({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 Vt({...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 Vt({...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 Vt({...this._def,shape:()=>n})}deepPartial(){return Nu(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 Vt({...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 a=this.shape[o];for(;a instanceof ji;)a=a._def.innerType;n[o]=a}return new Vt({...this._def,shape:()=>n})}keyof(){return RJ(st.objectKeys(this.shape))}}Vt.create=(e,t)=>new Vt({shape:()=>e,unknownKeys:"strip",catchall:Di.create(),typeName:Oe.ZodObject,...Ge(t)});Vt.strictCreate=(e,t)=>new Vt({shape:()=>e,unknownKeys:"strict",catchall:Di.create(),typeName:Oe.ZodObject,...Ge(t)});Vt.lazycreate=(e,t)=>new Vt({shape:e,unknownKeys:"strip",catchall:Di.create(),typeName:Oe.ZodObject,...Ge(t)});class tz extends tt{_parse(t){const{ctx:n}=this._processInputParams(t),o=this._def.options;function r(a){for(const s of a)if(s.result.status==="valid")return s.result;for(const s of a)if(s.result.status==="dirty")return n.common.issues.push(...s.ctx.common.issues),s.result;const i=a.map(s=>new Ia(s.ctx.common.issues));return Me(n,{code:me.invalid_union,unionErrors:i}),qe}if(n.common.async)return Promise.all(o.map(async a=>{const i={...n,common:{...n.common,issues:[]},parent:null};return{result:await a._parseAsync({data:n.data,path:n.path,parent:i}),ctx:i}})).then(r);{let a;const i=[];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"&&!a&&(a={result:h,ctx:l}),l.common.issues.length&&i.push(l.common.issues)}if(a)return n.common.issues.push(...a.ctx.common.issues),a.result;const s=i.map(c=>new Ia(c));return Me(n,{code:me.invalid_union,unionErrors:s}),qe}}get options(){return this._def.options}}tz.create=(e,t)=>new tz({options:e,typeName:Oe.ZodUnion,...Ge(t)});function VH(e,t){const n=fi(e),o=fi(t);if(e===t)return{valid:!0,data:e};if(n===Ce.object&&o===Ce.object){const r=st.objectKeys(t),a=st.objectKeys(e).filter(s=>r.indexOf(s)!==-1),i={...e,...t};for(const s of a){const c=VH(e[s],t[s]);if(!c.valid)return{valid:!1};i[s]=c.data}return{valid:!0,data:i}}else if(n===Ce.array&&o===Ce.array){if(e.length!==t.length)return{valid:!1};const r=[];for(let a=0;a<e.length;a++){const i=e[a],s=t[a],c=VH(i,s);if(!c.valid)return{valid:!1};r.push(c.data)}return{valid:!0,data:r}}else return n===Ce.date&&o===Ce.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class nz extends tt{_parse(t){const{status:n,ctx:o}=this._processInputParams(t),r=(a,i)=>{if(oW(a)||oW(i))return qe;const s=VH(a.value,i.value);return s.valid?((rW(a)||rW(i))&&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(([a,i])=>r(a,i)):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}))}}nz.create=(e,t,n)=>new nz({left:e,right:t,typeName:Oe.ZodIntersection,...Ge(n)});class $d extends tt{_parse(t){const{status:n,ctx:o}=this._processInputParams(t);if(o.parsedType!==Ce.array)return Me(o,{code:me.invalid_type,expected:Ce.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 a=[...o.data].map((i,s)=>{const c=this._def.items[s]||this._def.rest;return c?c._parse(new Ur(o,i,o.path,s)):null}).filter(i=>!!i);return o.common.async?Promise.all(a).then(i=>In.mergeArray(n,i)):In.mergeArray(n,a)}get items(){return this._def.items}rest(t){return new $d({...this._def,rest:t})}}$d.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new $d({items:e,typeName:Oe.ZodTuple,rest:null,...Ge(t)})};class oz extends tt{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!==Ce.object)return Me(o,{code:me.invalid_type,expected:Ce.object,received:o.parsedType}),qe;const r=[],a=this._def.keyType,i=this._def.valueType;for(const s in o.data)r.push({key:a._parse(new Ur(o,s,o.path,s)),value:i._parse(new Ur(o,o.data[s],o.path,s)),alwaysSet:s in o.data});return o.common.async?In.mergeObjectAsync(n,r):In.mergeObjectSync(n,r)}get element(){return this._def.valueType}static create(t,n,o){return n instanceof tt?new oz({keyType:t,valueType:n,typeName:Oe.ZodRecord,...Ge(o)}):new oz({keyType:Ma.create(),valueType:t,typeName:Oe.ZodRecord,...Ge(n)})}}class uW extends tt{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!==Ce.map)return Me(o,{code:me.invalid_type,expected:Ce.map,received:o.parsedType}),qe;const r=this._def.keyType,a=this._def.valueType,i=[...o.data.entries()].map(([s,c],l)=>({key:r._parse(new Ur(o,s,o.path,[l,"key"])),value:a._parse(new Ur(o,c,o.path,[l,"value"]))}));if(o.common.async){const s=new Map;return Promise.resolve().then(async()=>{for(const c of i){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 i){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}}}}uW.create=(e,t,n)=>new uW({valueType:t,keyType:e,typeName:Oe.ZodMap,...Ge(n)});class rf extends tt{_parse(t){const{status:n,ctx:o}=this._processInputParams(t);if(o.parsedType!==Ce.set)return Me(o,{code:me.invalid_type,expected:Ce.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 a=this._def.valueType;function i(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)=>a._parse(new Ur(o,c,o.path,l)));return o.common.async?Promise.all(s).then(c=>i(c)):i(s)}min(t,n){return new rf({...this._def,minSize:{value:t,message:Ne.toString(n)}})}max(t,n){return new rf({...this._def,maxSize:{value:t,message:Ne.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}rf.create=(e,t)=>new rf({valueType:e,minSize:null,maxSize:null,typeName:Oe.ZodSet,...Ge(t)});class hW extends tt{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})}}hW.create=(e,t)=>new hW({getter:e,typeName:Oe.ZodLazy,...Ge(t)});class BH extends tt{_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}}BH.create=(e,t)=>new BH({value:e,typeName:Oe.ZodLiteral,...Ge(t)});function RJ(e,t){return new E0({values:e,typeName:Oe.ZodEnum,...Ge(t)})}class E0 extends tt{_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 E0.create(t,{...this._def,...n})}exclude(t,n=this._def){return E0.create(this.options.filter(o=>!t.includes(o)),{...this._def,...n})}}E0.create=RJ;class fW extends tt{_parse(t){const n=st.getValidEnumValues(this._def.values),o=this._getOrReturnCtx(t);if(o.parsedType!==Ce.string&&o.parsedType!==Ce.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}}fW.create=(e,t)=>new fW({values:e,typeName:Oe.ZodNativeEnum,...Ge(t)});class rz extends tt{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Ce.promise&&n.common.async===!1)return Me(n,{code:me.invalid_type,expected:Ce.promise,received:n.parsedType}),qe;const o=n.parsedType===Ce.promise?n.data:Promise.resolve(n.data);return Po(o.then(r=>this._def.type.parseAsync(r,{path:n.path,errorMap:n.common.contextualErrorMap})))}}rz.create=(e,t)=>new rz({type:e,typeName:Oe.ZodPromise,...Ge(t)});class j0 extends tt{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,a={addIssue:i=>{Me(o,i),i.fatal?n.abort():n.dirty()},get path(){return o.path}};if(a.addIssue=a.addIssue.bind(a),r.type==="preprocess"){const i=r.transform(o.data,a);if(o.common.async)return Promise.resolve(i).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"?P2(c.value):c});{if(n.value==="aborted")return qe;const s=this._def.schema._parseSync({data:i,path:o.path,parent:o});return s.status==="aborted"?qe:s.status==="dirty"||n.value==="dirty"?P2(s.value):s}}if(r.type==="refinement"){const i=s=>{const c=r.refinement(s,a);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(),i(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(),i(s.value).then(()=>({status:n.value,value:s.value}))))}if(r.type==="transform")if(o.common.async===!1){const i=this._def.schema._parseSync({data:o.data,path:o.path,parent:o});if(!I0(i))return qe;const s=r.transform(i.value,a);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(i=>I0(i)?Promise.resolve(r.transform(i.value,a)).then(s=>({status:n.value,value:s})):qe);st.assertNever(r)}}j0.create=(e,t,n)=>new j0({schema:e,typeName:Oe.ZodEffects,effect:t,...Ge(n)});j0.createWithPreprocess=(e,t,n)=>new j0({schema:t,effect:{type:"preprocess",transform:e},typeName:Oe.ZodEffects,...Ge(n)});class ji extends tt{_parse(t){return this._getType(t)===Ce.undefined?Po(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}ji.create=(e,t)=>new ji({innerType:e,typeName:Oe.ZodOptional,...Ge(t)});class $0 extends tt{_parse(t){return this._getType(t)===Ce.null?Po(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}$0.create=(e,t)=>new $0({innerType:e,typeName:Oe.ZodNullable,...Ge(t)});class UH extends tt{_parse(t){const{ctx:n}=this._processInputParams(t);let o=n.data;return n.parsedType===Ce.undefined&&(o=this._def.defaultValue()),this._def.innerType._parse({data:o,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}UH.create=(e,t)=>new UH({innerType:e,typeName:Oe.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Ge(t)});class WH extends tt{_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 JP(r)?r.then(a=>({status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new Ia(o.common.issues)},input:o.data})})):{status:"valid",value:r.status==="valid"?r.value:this._def.catchValue({get error(){return new Ia(o.common.issues)},input:o.data})}}removeCatch(){return this._def.innerType}}WH.create=(e,t)=>new WH({innerType:e,typeName:Oe.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Ge(t)});class pW extends tt{_parse(t){if(this._getType(t)!==Ce.nan){const o=this._getOrReturnCtx(t);return Me(o,{code:me.invalid_type,expected:Ce.nan,received:o.parsedType}),qe}return{status:"valid",value:t.data}}}pW.create=e=>new pW({typeName:Oe.ZodNaN,...Ge(e)});class gOe extends tt{_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 WF extends tt{_parse(t){const{status:n,ctx:o}=this._processInputParams(t);if(o.common.async)return(async()=>{const a=await this._def.in._parseAsync({data:o.data,path:o.path,parent:o});return a.status==="aborted"?qe:a.status==="dirty"?(n.dirty(),P2(a.value)):this._def.out._parseAsync({data:a.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 WF({in:t,out:n,typeName:Oe.ZodPipeline})}}class GH extends tt{_parse(t){const n=this._def.innerType._parse(t),o=r=>(I0(r)&&(r.value=Object.freeze(r.value)),r);return JP(n)?n.then(r=>o(r)):o(n)}unwrap(){return this._def.innerType}}GH.create=(e,t)=>new GH({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 cn=Ma.create,TJ=A0.create,kOe=FH.create,_h=qH.create;Di.create;const ss=qr.create,it=Vt.create,KH=tz.create;nz.create;$d.create;const yW=oz.create,Cp=BH.create,Sp=E0.create;rz.create;ji.create;$0.create;const vOe=it({$state:cn().min(1)}),ya=it({$action:cn().min(1)}),xOe=it({$cond:_h(),$then:_h(),$else:_h().optional()}),Wo=e=>KH([e,vOe,ya,xOe]),Rt=Wo(cn()),fa=Wo(TJ()),Lp=Wo(kOe()),DJ={Card:it({title:Rt.optional()}),Separator:it({orientation:Wo(Sp(["horizontal","vertical"])).optional()}),Tabs:it({value:Rt.optional(),items:ss(it({id:cn(),label:cn()})),onChange:ya.optional()}),Accordion:it({items:ss(it({id:cn(),title:cn(),content:cn()}))}),Badge:it({label:Rt,variant:Wo(Sp(["default","secondary","destructive","outline"])).optional()}),Avatar:it({src:Rt.optional(),alt:Rt.optional(),fallback:Rt.optional()}),Progress:it({value:fa}),Skeleton:it({width:fa.optional(),height:fa.optional()}),Label:it({text:Rt}),Heading:it({level:Wo(KH([Cp(1),Cp(2),Cp(3),Cp(4)])).optional(),text:Rt}),Text:it({text:Rt,muted:Lp.optional()}),Icon:it({name:Rt,size:fa.optional()}),Chart:it({kind:Wo(Sp(["bar","line","area","pie"])),data:Wo(ss(yW(cn(),_h()))),xKey:Rt.optional(),series:ss(it({key:cn(),label:cn().optional()})).optional()}),Table:it({columns:ss(it({key:cn(),label:cn()})),rows:Wo(ss(yW(cn(),_h())))}),Metric:it({label:Rt,value:Wo(KH([cn(),TJ()]))}),CodeBlock:it({code:Rt,language:Rt.optional()}),Markdown:it({content:Rt}),Button:it({label:Rt,variant:Wo(Sp(["default","destructive","outline","secondary","ghost","link"])).optional(),onClick:ya.optional(),disabled:Lp.optional()}),Input:it({value:Rt.optional(),placeholder:Rt.optional(),onChange:ya.optional()}),Checkbox:it({checked:Lp.optional(),onChange:ya.optional(),label:Rt.optional()}),Switch:it({checked:Lp.optional(),onChange:ya.optional()}),Select:it({value:Rt.optional(),items:ss(it({value:cn(),label:cn()})),onChange:ya.optional()}),Textarea:it({value:Rt.optional(),placeholder:Rt.optional(),rows:fa.optional(),onChange:ya.optional()}),Slider:it({value:fa.optional(),min:fa.optional(),max:fa.optional(),step:fa.optional(),onChange:ya.optional()})},HJ=Object.keys(DJ);Object.fromEntries(HJ.map(e=>[e,{props:DJ[e],description:e}]));function mW(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Wr(...e){return t=>{let n=!1;const o=e.map(r=>{const a=mW(r,t);return!n&&typeof a=="function"&&(n=!0),a});if(n)return()=>{for(let r=0;r<o.length;r++){const a=o[r];typeof a=="function"?a():mW(e[r],null)}}}}function mt(...e){return m.useCallback(Wr(...e),e)}var wOe=Symbol.for("react.lazy"),az=EO[" use ".trim().toString()];function MOe(e){return typeof e=="object"&&e!==null&&"then"in e}function OJ(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===wOe&&"_payload"in e&&MOe(e._payload)}function bOe(e){const t=COe(e),n=m.forwardRef((o,r)=>{let{children:a,...i}=o;OJ(a)&&typeof az=="function"&&(a=az(a._payload));const s=m.Children.toArray(a),c=s.find(LOe);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,{...i,ref:r,children:m.isValidElement(l)?m.cloneElement(l,void 0,h):null})}return f.jsx(t,{...i,ref:r,children:a})});return n.displayName=`${e}.Slot`,n}var _Oe=bOe("Slot");function COe(e){const t=m.forwardRef((n,o)=>{let{children:r,...a}=n;if(OJ(r)&&typeof az=="function"&&(r=az(r._payload)),m.isValidElement(r)){const i=IOe(r),s=NOe(a,r.props);return r.type!==m.Fragment&&(s.ref=o?Wr(o,i):i),m.cloneElement(r,s)}return m.Children.count(r)>1?m.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var SOe=Symbol("radix.slottable");function LOe(e){return m.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===SOe}function NOe(e,t){const n={...t};for(const o in t){const r=e[o],a=t[o];/^on[A-Z]/.test(o)?r&&a?n[o]=(...s)=>{const c=a(...s);return r(...s),c}:r&&(n[o]=r):o==="style"?n[o]={...r,...a}:o==="className"&&(n[o]=[r,a].filter(Boolean).join(" "))}return{...e,...n}}function IOe(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 gW=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,kW=IY,FJ=(e,t)=>n=>{var o;if((t==null?void 0:t.variants)==null)return kW(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:r,defaultVariants:a}=t,i=Object.keys(r).map(l=>{const h=n==null?void 0:n[l],u=a==null?void 0:a[l];if(h===null)return null;const p=gW(h)||gW(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({...a,...s}[k]):{...a,...s}[k]===x})?[...l,u,p]:l},[]);return kW(e,i,c,n==null?void 0:n.class,n==null?void 0:n.className)},AOe=FJ("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},a)=>{const i=o?_Oe:"button";return f.jsx(i,{className:te(AOe({variant:t,size:n,className:e})),ref:a,...r})});rt.displayName="Button";function qJ(e,[t,n]){return Math.min(n,Math.max(t,e))}function Se(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 EOe(e,t){const n=m.createContext(t),o=a=>{const{children:i,...s}=a,c=m.useMemo(()=>s,Object.values(s));return f.jsx(n.Provider,{value:c,children:i})};o.displayName=e+"Provider";function r(a){const i=m.useContext(n);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[o,r]}function lr(e,t=[]){let n=[];function o(a,i){const s=m.createContext(i),c=n.length;n=[...n,i];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=a+"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(i!==void 0)return i;throw new Error(`\`${u}\` must be used within \`${a}\``)}return[l,h]}const r=()=>{const a=n.map(i=>m.createContext(i));return function(s){const c=(s==null?void 0:s[e])||a;return m.useMemo(()=>({[`__scope${e}`]:{...s,[e]:c}}),[s,c])}};return r.scopeName=e,[o,jOe(r,...t)]}function jOe(...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(a){const i=o.reduce((s,{useScope:c,scopeName:l})=>{const u=c(a)[`__scope${l}`];return{...s,...u}},{});return m.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}var Hi=globalThis!=null&&globalThis.document?m.useLayoutEffect:()=>{},$Oe=EO[" useInsertionEffect ".trim().toString()]||Hi;function Vd({prop:e,defaultProp:t,onChange:n=()=>{},caller:o}){const[r,a,i]=POe({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=zOe(h)?h(e):h;p!==e&&((u=i.current)==null||u.call(i,p))}else a(h)},[s,e,a,i]);return[c,l]}function POe({defaultProp:e,onChange:t}){const[n,o]=m.useState(e),r=m.useRef(n),a=m.useRef(t);return $Oe(()=>{a.current=t},[t]),m.useEffect(()=>{var i;r.current!==n&&((i=a.current)==null||i.call(a,n),r.current=n)},[n,r]),[n,o,a]}function zOe(e){return typeof e=="function"}var ROe=m.createContext(void 0);function sR(e){const t=m.useContext(ROe);return e||t||"ltr"}function TOe(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 VJ(e){const[t,n]=m.useState(void 0);return Hi(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const o=new ResizeObserver(r=>{if(!Array.isArray(r)||!r.length)return;const a=r[0];let i,s;if("borderBoxSize"in a){const c=a.borderBoxSize,l=Array.isArray(c)?c[0]:c;i=l.inlineSize,s=l.blockSize}else i=e.offsetWidth,s=e.offsetHeight;n({width:i,height:s})});return o.observe(e,{box:"border-box"}),()=>o.unobserve(e)}else n(void 0)},[e]),t}function P0(e){const t=DOe(e),n=m.forwardRef((o,r)=>{const{children:a,...i}=o,s=m.Children.toArray(a),c=s.find(OOe);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,{...i,ref:r,children:m.isValidElement(l)?m.cloneElement(l,void 0,h):null})}return f.jsx(t,{...i,ref:r,children:a})});return n.displayName=`${e}.Slot`,n}function DOe(e){const t=m.forwardRef((n,o)=>{const{children:r,...a}=n;if(m.isValidElement(r)){const i=qOe(r),s=FOe(a,r.props);return r.type!==m.Fragment&&(s.ref=o?Wr(o,i):i),m.cloneElement(r,s)}return m.Children.count(r)>1?m.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var BJ=Symbol("radix.slottable");function HOe(e){const t=({children:n})=>f.jsx(f.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=BJ,t}function OOe(e){return m.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===BJ}function FOe(e,t){const n={...t};for(const o in t){const r=e[o],a=t[o];/^on[A-Z]/.test(o)?r&&a?n[o]=(...s)=>{const c=a(...s);return r(...s),c}:r&&(n[o]=r):o==="style"?n[o]={...r,...a}:o==="className"&&(n[o]=[r,a].filter(Boolean).join(" "))}return{...e,...n}}function qOe(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 VOe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ve=VOe.reduce((e,t)=>{const n=P0(`Primitive.${t}`),o=m.forwardRef((r,a)=>{const{asChild:i,...s}=r,c=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),f.jsx(c,{...s,ref:a})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{});function UJ(e,t){e&&Od.flushSync(()=>e.dispatchEvent(t))}function GF(e){const t=e+"CollectionProvider",[n,o]=lr(t),[r,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=k=>{const{scope:x,children:v}=k,M=Ar.useRef(null),w=Ar.useRef(new Map).current;return f.jsx(r,{scope:x,itemMap:w,collectionRef:M,children:v})};i.displayName=t;const s=e+"CollectionSlot",c=P0(s),l=Ar.forwardRef((k,x)=>{const{scope:v,children:M}=k,w=a(s,v),b=mt(x,w.collectionRef);return f.jsx(c,{ref:b,children:M})});l.displayName=s;const h=e+"CollectionItemSlot",u="data-radix-collection-item",p=P0(h),y=Ar.forwardRef((k,x)=>{const{scope:v,children:M,...w}=k,b=Ar.useRef(null),C=mt(x,b),_=a(h,v);return Ar.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=a(e+"CollectionConsumer",k);return Ar.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:i,Slot:l,ItemSlot:y},g,o]}var WJ=["PageUp","PageDown"],GJ=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],KJ={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},U0="Slider",[ZH,BOe,UOe]=GF(U0),[ZJ]=lr(U0,[UOe]),[WOe,cR]=ZJ(U0),XJ=m.forwardRef((e,t)=>{const{name:n,min:o=0,max:r=100,step:a=1,orientation:i="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=i==="horizontal"?GOe:KOe,[b=[],C]=Vd({prop:h,defaultProp:l,onChange:E=>{var W;(W=[...x.current][v.current])==null||W.focus(),u(E)}}),_=m.useRef(b);function S(E){const z=JOe(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:W}={commit:!1}){const $=oFe(a),T=rFe(Math.round((E-o)/a)*a+o,$),D=qJ(T,[o,r]);C((O=[])=>{const I=YOe(O,D,z);if(nFe(I,c*a)){v.current=I.indexOf(D);const R=String(I)!==String(O);return R&&W&&p(I),R?I:O}else return O})}return f.jsx(WOe,{scope:e.__scopeSlider,name:n,disabled:s,min:o,max:r,valueIndexToChangeRef:v,thumbs:x.current,values:b,orientation:i,form:g,children:f.jsx(ZH.Provider,{scope:e.__scopeSlider,children:f.jsx(ZH.Slot,{scope:e.__scopeSlider,children:f.jsx(w,{"aria-disabled":s,"data-disabled":s?"":void 0,...k,ref:t,onPointerDown:Se(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=WJ.includes(E.key)||E.shiftKey&&GJ.includes(E.key)?10:1,D=v.current,O=b[D],I=a*T*z;A(O+I,D,{commit:!0})}}})})})})});XJ.displayName=U0;var[YJ,QJ]=ZJ(U0,{startEdge:"left",endEdge:"right",size:"width",direction:1}),GOe=m.forwardRef((e,t)=>{const{min:n,max:o,dir:r,inverted:a,onSlideStart:i,onSlideMove:s,onSlideEnd:c,onStepKeyDown:l,...h}=e,[u,p]=m.useState(null),y=mt(t,w=>p(w)),g=m.useRef(void 0),k=sR(r),x=k==="ltr",v=x&&!a||!x&&a;function M(w){const b=g.current||u.getBoundingClientRect(),C=[0,b.width],S=KF(C,v?[n,o]:[o,n]);return g.current=b,S(w-b.left)}return f.jsx(YJ,{scope:e.__scopeSlider,startEdge:v?"left":"right",endEdge:v?"right":"left",direction:v?1:-1,size:"width",children:f.jsx(JJ,{dir:k,"data-orientation":"horizontal",...h,ref:y,style:{...h.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:w=>{const b=M(w.clientX);i==null||i(b)},onSlideMove:w=>{const b=M(w.clientX);s==null||s(b)},onSlideEnd:()=>{g.current=void 0,c==null||c()},onStepKeyDown:w=>{const C=KJ[v?"from-left":"from-right"].includes(w.key);l==null||l({event:w,direction:C?-1:1})}})})}),KOe=m.forwardRef((e,t)=>{const{min:n,max:o,inverted:r,onSlideStart:a,onSlideMove:i,onSlideEnd:s,onStepKeyDown:c,...l}=e,h=m.useRef(null),u=mt(t,h),p=m.useRef(void 0),y=!r;function g(k){const x=p.current||h.current.getBoundingClientRect(),v=[0,x.height],w=KF(v,y?[o,n]:[n,o]);return p.current=x,w(k-x.top)}return f.jsx(YJ,{scope:e.__scopeSlider,startEdge:y?"bottom":"top",endEdge:y?"top":"bottom",size:"height",direction:y?1:-1,children:f.jsx(JJ,{"data-orientation":"vertical",...l,ref:u,style:{...l.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:k=>{const x=g(k.clientY);a==null||a(x)},onSlideMove:k=>{const x=g(k.clientY);i==null||i(x)},onSlideEnd:()=>{p.current=void 0,s==null||s()},onStepKeyDown:k=>{const v=KJ[y?"from-bottom":"from-top"].includes(k.key);c==null||c({event:k,direction:v?-1:1})}})})}),JJ=m.forwardRef((e,t)=>{const{__scopeSlider:n,onSlideStart:o,onSlideMove:r,onSlideEnd:a,onHomeKeyDown:i,onEndKeyDown:s,onStepKeyDown:c,...l}=e,h=cR(U0,n);return f.jsx(Ve.span,{...l,ref:t,onKeyDown:Se(e.onKeyDown,u=>{u.key==="Home"?(i(u),u.preventDefault()):u.key==="End"?(s(u),u.preventDefault()):WJ.concat(GJ).includes(u.key)&&(c(u),u.preventDefault())}),onPointerDown:Se(e.onPointerDown,u=>{const p=u.target;p.setPointerCapture(u.pointerId),u.preventDefault(),h.thumbs.has(p)?p.focus():o(u)}),onPointerMove:Se(e.onPointerMove,u=>{u.target.hasPointerCapture(u.pointerId)&&r(u)}),onPointerUp:Se(e.onPointerUp,u=>{const p=u.target;p.hasPointerCapture(u.pointerId)&&(p.releasePointerCapture(u.pointerId),a(u))})})}),eee="SliderTrack",tee=m.forwardRef((e,t)=>{const{__scopeSlider:n,...o}=e,r=cR(eee,n);return f.jsx(Ve.span,{"data-disabled":r.disabled?"":void 0,"data-orientation":r.orientation,...o,ref:t})});tee.displayName=eee;var XH="SliderRange",nee=m.forwardRef((e,t)=>{const{__scopeSlider:n,...o}=e,r=cR(XH,n),a=QJ(XH,n),i=m.useRef(null),s=mt(t,i),c=r.values.length,l=r.values.map(p=>aee(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,[a.startEdge]:h+"%",[a.endEdge]:u+"%"}})});nee.displayName=XH;var YH="SliderThumb",oee=m.forwardRef((e,t)=>{const n=BOe(e.__scopeSlider),[o,r]=m.useState(null),a=mt(t,s=>r(s)),i=m.useMemo(()=>o?n().findIndex(s=>s.ref.current===o):-1,[n,o]);return f.jsx(ZOe,{...e,ref:a,index:i})}),ZOe=m.forwardRef((e,t)=>{const{__scopeSlider:n,index:o,name:r,...a}=e,i=cR(YH,n),s=QJ(YH,n),[c,l]=m.useState(null),h=mt(t,M=>l(M)),u=c?i.form||!!c.closest("form"):!0,p=VJ(c),y=i.values[o],g=y===void 0?0:aee(y,i.min,i.max),k=QOe(o,i.values.length),x=p==null?void 0:p[s.size],v=x?eFe(x,g,s.direction):0;return m.useEffect(()=>{if(c)return i.thumbs.add(c),()=>{i.thumbs.delete(c)}},[c,i.thumbs]),f.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[s.startEdge]:`calc(${g}% + ${v}px)`},children:[f.jsx(ZH.ItemSlot,{scope:e.__scopeSlider,children:f.jsx(Ve.span,{role:"slider","aria-label":e["aria-label"]||k,"aria-valuemin":i.min,"aria-valuenow":y,"aria-valuemax":i.max,"aria-orientation":i.orientation,"data-orientation":i.orientation,"data-disabled":i.disabled?"":void 0,tabIndex:i.disabled?void 0:0,...a,ref:h,style:y===void 0?{display:"none"}:e.style,onFocus:Se(e.onFocus,()=>{i.valueIndexToChangeRef.current=o})})}),u&&f.jsx(ree,{name:r??(i.name?i.name+(i.values.length>1?"[]":""):void 0),form:i.form,value:y},o)]})});oee.displayName=YH;var XOe="RadioBubbleInput",ree=m.forwardRef(({__scopeSlider:e,value:t,...n},o)=>{const r=m.useRef(null),a=mt(r,o),i=TOe(t);return m.useEffect(()=>{const s=r.current;if(!s)return;const c=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(c,"value").set;if(i!==t&&h){const u=new Event("input",{bubbles:!0});h.call(s,t),s.dispatchEvent(u)}},[i,t]),f.jsx(Ve.input,{style:{display:"none"},...n,ref:a,defaultValue:t})});ree.displayName=XOe;function YOe(e=[],t,n){const o=[...e];return o[n]=t,o.sort((r,a)=>r-a)}function aee(e,t,n){const a=100/(n-t)*(e-t);return qJ(a,[0,100])}function QOe(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function JOe(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 eFe(e,t,n){const o=e/2,a=KF([0,50],[0,o]);return(o-a(t)*n)*n}function tFe(e){return e.slice(0,-1).map((t,n)=>e[n+1]-t)}function nFe(e,t){if(t>0){const n=tFe(e);return Math.min(...n)>=t}return!0}function KF(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 oFe(e){return(String(e).split(".")[1]||"").length}function rFe(e,t){const n=Math.pow(10,t);return Math.round(e*n)/n}var iee=XJ,aFe=tee,iFe=nee,sFe=oee;const ZF=m.forwardRef(({className:e,...t},n)=>f.jsxs(iee,{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(aFe,{className:"sf:relative sf:h-1.5 sf:w-full sf:grow sf:overflow-hidden sf:rounded-full sf:bg-secondary",children:f.jsx(iFe,{className:"sf:absolute sf:h-full sf:bg-primary"})}),f.jsx(sFe,{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"})]}));ZF.displayName=iee.displayName;const cFe={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 lFe({text:e,level:t=2}){const n=`h${t}`;return f.jsx(n,{className:te(cFe[t]),children:e})}const see=m.createContext({custom:{}});function dFe({value:e,children:t}){return f.jsx(see.Provider,{value:e,children:t})}function uFe(){return m.useContext(see)}function z0({name:e,as:t,size:n=16,fallback:o=_Ae,...r}){const a=uFe(),i=t??(e?a.custom[e]:void 0)??(e?Wh[e]:void 0)??Wh[o];return i?f.jsx(i,{size:n,...r}):null}function hFe({name:e,size:t=16}){return f.jsx(z0,{name:e,size:t,"aria-hidden":!0})}function fFe(e){return e==null?"":typeof e=="string"||typeof e=="number"?e:typeof e=="object"?JSON.stringify(e):String(e)}function pFe({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:fFe(t)})]})}function yFe(e){return e==null?"":typeof e=="string"||typeof e=="number"?String(e):JSON.stringify(e)}function mFe({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:yFe(n[r.key])},r.key))},o))})]})})}function gFe({text:e,muted:t}){return f.jsx("p",{className:te("sf:text-sm",t&&"sf:text-muted-foreground"),children:e})}function kFe({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 vFe({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 xFe({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(a=>f.jsx("button",{type:"button","data-state":e===a.id?"active":"inactive",onClick:()=>n==null?void 0:n({value:a.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:a.label},a.id))}),o]})}function wFe({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 vW={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 MFe({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",vW[t]??vW.default),children:e})}function bFe({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 _Fe({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 CFe({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 SFe({text:e}){return f.jsx("span",{className:"sf:font-medium sf:text-sm sf:leading-none",children:e})}function LFe({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 XF="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 NFe({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:XF})}function IFe({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 AFe({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 EFe({value:e,items:t,onChange:n}){return f.jsx("select",{value:e??"",onChange:o=>n==null?void 0:n({value:o.target.value}),className:XF,children:(t??[]).map(o=>f.jsx("option",{value:o.value,children:o.label},o.value))})}function jFe({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(XF,"sf:min-h-16 sf:py-2")})}function $Fe({value:e,min:t=0,max:n=100,step:o=1,onChange:r}){return f.jsx(ZF,{value:e===void 0?void 0:[e],min:t,max:n,step:o,onValueChange:a=>{const[i]=a;typeof i=="number"&&(r==null||r({value:i}))}})}const PFe=m.lazy(()=>V0(()=>import("./chart-YfoAGRGq.js"),__vite__mapDeps([0,1,2,3,4,5,6,7])));function zFe(e){return f.jsx(m.Suspense,{fallback:null,children:f.jsx(PFe,{...e})})}const RFe=m.lazy(()=>V0(()=>import("./markdown-71DgXg9K.js"),[]));function TFe(e){return f.jsx(m.Suspense,{fallback:null,children:f.jsx(RFe,{...e})})}const DFe=m.lazy(()=>V0(()=>import("./code-block-CeM4DS5T.js"),[]));function HFe(e){return f.jsx(m.Suspense,{fallback:null,children:f.jsx(DFe,{...e})})}const cee={Card:kFe,Separator:vFe,Tabs:xFe,Accordion:wFe,Badge:MFe,Avatar:bFe,Progress:_Fe,Skeleton:CFe,Label:SFe,Heading:lFe,Text:gFe,Icon:hFe,Chart:zFe,Table:mFe,Metric:pFe,CodeBlock:HFe,Markdown:TFe,Button:LFe,Input:NFe,Checkbox:IFe,Switch:AFe,Select:EFe,Textarea:jFe,Slider:$Fe},xW=HJ.filter(e=>cee[e]===void 0);if(xW.length>0)throw new Error(`componentRegistry is missing impls for: ${xW.join(", ")}. Every catalog entry in COMPONENT_NAMES must have a matching component impl.`);const OFe={components:cee};function FFe(e,t){return t.kind==="set"?{...e,[t.path]:t.value}:{...e,...t.partial}}function lee(e){return e===null||typeof e!="object"?!1:"$state"in e||"$action"in e||"$param"in e||"$cond"in e}function iP(e,t,n,o){if(!lee(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)?a=>n(r,a):void 0}if("$cond"in e){const r=iP(e.$cond,t,n,o);return iP(r?e.$then:e.$else,t,n,o)}return e}function qFe(e,t,n,o){if(!e)return{};const r={};for(const[a,i]of Object.entries(e))r[a]=iP(i,t,n,o);return r}function wW({spec:e,nodeId:t,apiBaseUrl:n="/api",projectSlug:o,flowSlug:r}){const[a,i]=m.useReducer(FFe,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=VFe(u.value,h,a);i({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();i({kind:"set",path:`/__errors/${l}`,value:x});return}const k=await g.json();k!==null&&typeof k=="object"&&i({kind:"merge",partial:k})}catch(g){i({kind:"set",path:`/__errors/${l}`,value:g instanceof Error?g.message:String(g)})}},[e.actions,o,r,n,t,a]);return dee(e.root,e,a,c,s)}function VFe(e,t,n){return lee(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 dee(e,t,n,o,r){const a=t.elements[e];if(!a)return null;const i=OFe.components[a.type];if(!i)return null;const s=qFe(a.props,n,o,r),l=(a.children??[]).map(h=>f.jsx(BFe,{children:dee(h,t,n,o,r)},h));return f.jsx(i,{...s,children:l.length>0?l:void 0})}function BFe({children:e}){return e}function Gr(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 UFe(e,t=globalThis==null?void 0:globalThis.document){const n=Gr(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 WFe="DismissableLayer",QH="dismissableLayer.update",GFe="dismissableLayer.pointerDownOutside",KFe="dismissableLayer.focusOutside",MW,uee=m.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Sf=m.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:o,onPointerDownOutside:r,onFocusOutside:a,onInteractOutside:i,onDismiss:s,...c}=e,l=m.useContext(uee),[h,u]=m.useState(null),p=(h==null?void 0:h.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,y]=m.useState({}),g=mt(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=YFe(S=>{const N=S.target,P=[...l.branches].some(A=>A.contains(N));!b||P||(r==null||r(S),i==null||i(S),S.defaultPrevented||s==null||s())},p),_=QFe(S=>{const N=S.target;[...l.branches].some(A=>A.contains(N))||(a==null||a(S),i==null||i(S),S.defaultPrevented||s==null||s())},p);return UFe(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&&(MW=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(h)),l.layers.add(h),bW(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=MW)}},[h,p,n,l]),m.useEffect(()=>()=>{h&&(l.layers.delete(h),l.layersWithOutsidePointerEventsDisabled.delete(h),bW())},[h,l]),m.useEffect(()=>{const S=()=>y({});return document.addEventListener(QH,S),()=>document.removeEventListener(QH,S)},[]),f.jsx(Ve.div,{...c,ref:g,style:{pointerEvents:w?b?"auto":"none":void 0,...e.style},onFocusCapture:Se(e.onFocusCapture,_.onFocusCapture),onBlurCapture:Se(e.onBlurCapture,_.onBlurCapture),onPointerDownCapture:Se(e.onPointerDownCapture,C.onPointerDownCapture)})});Sf.displayName=WFe;var ZFe="DismissableLayerBranch",XFe=m.forwardRef((e,t)=>{const n=m.useContext(uee),o=m.useRef(null),r=mt(t,o);return m.useEffect(()=>{const a=o.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),f.jsx(Ve.div,{...e,ref:r})});XFe.displayName=ZFe;function YFe(e,t=globalThis==null?void 0:globalThis.document){const n=Gr(e),o=m.useRef(!1),r=m.useRef(()=>{});return m.useEffect(()=>{const a=s=>{if(s.target&&!o.current){let c=function(){hee(GFe,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},i=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",a),t.removeEventListener("click",r.current)}},[t,n]),{onPointerDownCapture:()=>o.current=!0}}function QFe(e,t=globalThis==null?void 0:globalThis.document){const n=Gr(e),o=m.useRef(!1);return m.useEffect(()=>{const r=a=>{a.target&&!o.current&&hee(KFe,n,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",r),()=>t.removeEventListener("focusin",r)},[t,n]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function bW(){const e=new CustomEvent(QH);document.dispatchEvent(e)}function hee(e,t,n,{discrete:o}){const r=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),o?UJ(r,a):r.dispatchEvent(a)}var TT=0;function YF(){m.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??_W()),document.body.insertAdjacentElement("beforeend",e[1]??_W()),TT++,()=>{TT===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),TT--}},[])}function _W(){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 DT="focusScope.autoFocusOnMount",HT="focusScope.autoFocusOnUnmount",CW={bubbles:!1,cancelable:!0},JFe="FocusScope",lR=m.forwardRef((e,t)=>{const{loop:n=!1,trapped:o=!1,onMountAutoFocus:r,onUnmountAutoFocus:a,...i}=e,[s,c]=m.useState(null),l=Gr(r),h=Gr(a),u=m.useRef(null),p=mt(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:ai(u.current,{select:!0})},x=function(w){if(y.paused||!s)return;const b=w.relatedTarget;b!==null&&(s.contains(b)||ai(u.current,{select:!0}))},v=function(w){if(document.activeElement===document.body)for(const C of w)C.removedNodes.length>0&&ai(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){LW.add(y);const k=document.activeElement;if(!s.contains(k)){const v=new CustomEvent(DT,CW);s.addEventListener(DT,l),s.dispatchEvent(v),v.defaultPrevented||(eqe(aqe(fee(s)),{select:!0}),document.activeElement===k&&ai(s))}return()=>{s.removeEventListener(DT,l),setTimeout(()=>{const v=new CustomEvent(HT,CW);s.addEventListener(HT,h),s.dispatchEvent(v),v.defaultPrevented||ai(k??document.body,{select:!0}),s.removeEventListener(HT,h),LW.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]=tqe(M);w&&b?!k.shiftKey&&v===b?(k.preventDefault(),n&&ai(w,{select:!0})):k.shiftKey&&v===w&&(k.preventDefault(),n&&ai(b,{select:!0})):v===M&&k.preventDefault()}},[n,o,y.paused]);return f.jsx(Ve.div,{tabIndex:-1,...i,ref:p,onKeyDown:g})});lR.displayName=JFe;function eqe(e,{select:t=!1}={}){const n=document.activeElement;for(const o of e)if(ai(o,{select:t}),document.activeElement!==n)return}function tqe(e){const t=fee(e),n=SW(t,e),o=SW(t.reverse(),e);return[n,o]}function fee(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 SW(e,t){for(const n of e)if(!nqe(n,{upTo:t}))return n}function nqe(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 oqe(e){return e instanceof HTMLInputElement&&"select"in e}function ai(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&oqe(e)&&t&&e.select()}}var LW=rqe();function rqe(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=NW(e,t),e.unshift(t)},remove(t){var n;e=NW(e,t),(n=e[0])==null||n.resume()}}}function NW(e,t){const n=[...e],o=n.indexOf(t);return o!==-1&&n.splice(o,1),n}function aqe(e){return e.filter(t=>t.tagName!=="A")}var iqe=EO[" useId ".trim().toString()]||(()=>{}),sqe=0;function Nn(e){const[t,n]=m.useState(iqe());return Hi(()=>{n(o=>o??String(sqe++))},[e]),e||(t?`radix-${t}`:"")}const cqe=["top","right","bottom","left"],Oi=Math.min,ro=Math.max,iz=Math.round,Np=Math.floor,Vr=e=>({x:e,y:e}),lqe={left:"right",right:"left",bottom:"top",top:"bottom"};function JH(e,t,n){return ro(e,Oi(t,n))}function Aa(e,t){return typeof e=="function"?e(t):e}function Ea(e){return e.split("-")[0]}function W0(e){return e.split("-")[1]}function QF(e){return e==="x"?"y":"x"}function JF(e){return e==="y"?"height":"width"}function Tr(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function eq(e){return QF(Tr(e))}function dqe(e,t,n){n===void 0&&(n=!1);const o=W0(e),r=eq(e),a=JF(r);let i=r==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(i=sz(i)),[i,sz(i)]}function uqe(e){const t=sz(e);return[eO(e),t,eO(t)]}function eO(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const IW=["left","right"],AW=["right","left"],hqe=["top","bottom"],fqe=["bottom","top"];function pqe(e,t,n){switch(e){case"top":case"bottom":return n?t?AW:IW:t?IW:AW;case"left":case"right":return t?hqe:fqe;default:return[]}}function yqe(e,t,n,o){const r=W0(e);let a=pqe(Ea(e),n==="start",o);return r&&(a=a.map(i=>i+"-"+r),t&&(a=a.concat(a.map(eO)))),a}function sz(e){const t=Ea(e);return lqe[t]+e.slice(t.length)}function mqe(e){return{top:0,right:0,bottom:0,left:0,...e}}function pee(e){return typeof e!="number"?mqe(e):{top:e,right:e,bottom:e,left:e}}function cz(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 EW(e,t,n){let{reference:o,floating:r}=e;const a=Tr(t),i=eq(t),s=JF(i),c=Ea(t),l=a==="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(W0(t)){case"start":y[i]-=p*(n&&l?-1:1);break;case"end":y[i]+=p*(n&&l?-1:1);break}return y}async function gqe(e,t){var n;t===void 0&&(t={});const{x:o,y:r,platform:a,rects:i,elements:s,strategy:c}=e,{boundary:l="clippingAncestors",rootBoundary:h="viewport",elementContext:u="floating",altBoundary:p=!1,padding:y=0}=Aa(t,e),g=pee(y),x=s[p?u==="floating"?"reference":"floating":u],v=cz(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(x)))==null||n?x:x.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(s.floating)),boundary:l,rootBoundary:h,strategy:c})),M=u==="floating"?{x:o,y:r,width:i.floating.width,height:i.floating.height}:i.reference,w=await(a.getOffsetParent==null?void 0:a.getOffsetParent(s.floating)),b=await(a.isElement==null?void 0:a.isElement(w))?await(a.getScale==null?void 0:a.getScale(w))||{x:1,y:1}:{x:1,y:1},C=cz(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.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 kqe=50,vqe=async(e,t,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:a=[],platform:i}=n,s=i.detectOverflow?i:{...i,detectOverflow:gqe},c=await(i.isRTL==null?void 0:i.isRTL(t));let l=await i.getElementRects({reference:e,floating:t,strategy:r}),{x:h,y:u}=EW(l,o,c),p=o,y=0;const g={};for(let k=0;k<a.length;k++){const x=a[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<kqe&&(y++,typeof _=="object"&&(_.placement&&(p=_.placement),_.rects&&(l=_.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:r}):_.rects),{x:h,y:u}=EW(l,p,c)),k=-1)}return{x:h,y:u,placement:p,strategy:r,middlewareData:g}},xqe=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:o,placement:r,rects:a,platform:i,elements:s,middlewareData:c}=t,{element:l,padding:h=0}=Aa(e,t)||{};if(l==null)return{};const u=pee(h),p={x:n,y:o},y=eq(r),g=JF(y),k=await i.getDimensions(l),x=y==="y",v=x?"top":"left",M=x?"bottom":"right",w=x?"clientHeight":"clientWidth",b=a.reference[g]+a.reference[y]-p[y]-a.floating[g],C=p[y]-a.reference[y],_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(l));let S=_?_[w]:0;(!S||!await(i.isElement==null?void 0:i.isElement(_)))&&(S=s.floating[w]||a.floating[g]);const N=b/2-C/2,P=S/2-k[g]/2-1,A=Oi(u[v],P),E=Oi(u[M],P),z=A,W=S-k[g]-E,$=S/2-k[g]/2+N,T=JH(z,$,W),D=!c.arrow&&W0(r)!=null&&$!==T&&a.reference[g]/2-($<z?A:E)-k[g]/2<0,O=D?$<z?$-z:$-W:0;return{[y]:p[y]+O,data:{[y]:T,centerOffset:$-T-O,...D&&{alignmentOffset:O}},reset:D}}}),wqe=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:r,middlewareData:a,rects:i,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}=Aa(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const v=Ea(r),M=Tr(s),w=Ea(s)===s,b=await(c.isRTL==null?void 0:c.isRTL(l.floating)),C=p||(w||!k?[sz(s)]:uqe(s)),_=g!=="none";!p&&_&&C.push(...yqe(s,k,g,b));const S=[s,...C],N=await c.detectOverflow(t,x),P=[];let A=((o=a.flip)==null?void 0:o.overflows)||[];if(h&&P.push(N[v]),u){const $=dqe(r,i,b);P.push(N[$[0]],N[$[1]])}if(A=[...A,{placement:r,overflows:P}],!P.every($=>$<=0)){var E,z;const $=(((E=a.flip)==null?void 0:E.index)||0)+1,T=S[$];if(T&&(!(u==="alignment"?M!==Tr(T):!1)||A.every(I=>Tr(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 W;const O=(W=A.filter(I=>{if(_){const R=Tr(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:W[0];O&&(D=O);break}case"initialPlacement":D=s;break}if(r!==D)return{reset:{placement:D}}}return{}}}};function jW(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function $W(e){return cqe.some(t=>e[t]>=0)}const Mqe=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:o}=t,{strategy:r="referenceHidden",...a}=Aa(e,t);switch(r){case"referenceHidden":{const i=await o.detectOverflow(t,{...a,elementContext:"reference"}),s=jW(i,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:$W(s)}}}case"escaped":{const i=await o.detectOverflow(t,{...a,altBoundary:!0}),s=jW(i,n.floating);return{data:{escapedOffsets:s,escaped:$W(s)}}}default:return{}}}}},yee=new Set(["left","top"]);async function bqe(e,t){const{placement:n,platform:o,elements:r}=e,a=await(o.isRTL==null?void 0:o.isRTL(r.floating)),i=Ea(n),s=W0(n),c=Tr(n)==="y",l=yee.has(i)?-1:1,h=a&&c?-1:1,u=Aa(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 _qe=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:r,y:a,placement:i,middlewareData:s}=t,c=await bqe(t,e);return i===((n=s.offset)==null?void 0:n.placement)&&(o=s.arrow)!=null&&o.alignmentOffset?{}:{x:r+c.x,y:a+c.y,data:{...c,placement:i}}}}},Cqe=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:r,platform:a}=t,{mainAxis:i=!0,crossAxis:s=!1,limiter:c={fn:v=>{let{x:M,y:w}=v;return{x:M,y:w}}},...l}=Aa(e,t),h={x:n,y:o},u=await a.detectOverflow(t,l),p=Tr(Ea(r)),y=QF(p);let g=h[y],k=h[p];if(i){const v=y==="y"?"top":"left",M=y==="y"?"bottom":"right",w=g+u[v],b=g-u[M];g=JH(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=JH(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]:i,[p]:s}}}}}},Sqe=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:o,placement:r,rects:a,middlewareData:i}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=Aa(e,t),h={x:n,y:o},u=Tr(r),p=QF(u);let y=h[p],g=h[u];const k=Aa(s,t),x=typeof k=="number"?{mainAxis:k,crossAxis:0}:{mainAxis:0,crossAxis:0,...k};if(c){const w=p==="y"?"height":"width",b=a.reference[p]-a.floating[w]+x.mainAxis,C=a.reference[p]+a.reference[w]-x.mainAxis;y<b?y=b:y>C&&(y=C)}if(l){var v,M;const w=p==="y"?"width":"height",b=yee.has(Ea(r)),C=a.reference[u]-a.floating[w]+(b&&((v=i.offset)==null?void 0:v[u])||0)+(b?0:x.crossAxis),_=a.reference[u]+a.reference[w]+(b?0:((M=i.offset)==null?void 0:M[u])||0)-(b?x.crossAxis:0);g<C?g=C:g>_&&(g=_)}return{[p]:y,[u]:g}}}},Lqe=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,o;const{placement:r,rects:a,platform:i,elements:s}=t,{apply:c=()=>{},...l}=Aa(e,t),h=await i.detectOverflow(t,l),u=Ea(r),p=W0(r),y=Tr(r)==="y",{width:g,height:k}=a.floating;let x,v;u==="top"||u==="bottom"?(x=u,v=p===(await(i.isRTL==null?void 0:i.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=Oi(k-h[x],M),C=Oi(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=ro(h.left,0),E=ro(h.right,0),z=ro(h.top,0),W=ro(h.bottom,0);y?N=g-2*(A!==0||E!==0?A+E:ro(h.left,h.right)):S=k-2*(z!==0||W!==0?z+W:ro(h.top,h.bottom))}await c({...t,availableWidth:N,availableHeight:S});const P=await i.getDimensions(s.floating);return g!==P.width||k!==P.height?{reset:{rects:!0}}:{}}}};function dR(){return typeof window<"u"}function G0(e){return mee(e)?(e.nodeName||"").toLowerCase():"#document"}function lo(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Zr(e){var t;return(t=(mee(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function mee(e){return dR()?e instanceof Node||e instanceof lo(e).Node:!1}function rr(e){return dR()?e instanceof Element||e instanceof lo(e).Element:!1}function Pa(e){return dR()?e instanceof HTMLElement||e instanceof lo(e).HTMLElement:!1}function PW(e){return!dR()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof lo(e).ShadowRoot}function Lf(e){const{overflow:t,overflowX:n,overflowY:o,display:r}=ar(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&r!=="inline"&&r!=="contents"}function Nqe(e){return/^(table|td|th)$/.test(G0(e))}function uR(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const Iqe=/transform|translate|scale|rotate|perspective|filter/,Aqe=/paint|layout|strict|content/,cs=e=>!!e&&e!=="none";let OT;function tq(e){const t=rr(e)?ar(e):e;return cs(t.transform)||cs(t.translate)||cs(t.scale)||cs(t.rotate)||cs(t.perspective)||!nq()&&(cs(t.backdropFilter)||cs(t.filter))||Iqe.test(t.willChange||"")||Aqe.test(t.contain||"")}function Eqe(e){let t=Fi(e);for(;Pa(t)&&!R0(t);){if(tq(t))return t;if(uR(t))return null;t=Fi(t)}return null}function nq(){return OT==null&&(OT=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),OT}function R0(e){return/^(html|body|#document)$/.test(G0(e))}function ar(e){return lo(e).getComputedStyle(e)}function hR(e){return rr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Fi(e){if(G0(e)==="html")return e;const t=e.assignedSlot||e.parentNode||PW(e)&&e.host||Zr(e);return PW(t)?t.host:t}function gee(e){const t=Fi(e);return R0(t)?e.ownerDocument?e.ownerDocument.body:e.body:Pa(t)&&Lf(t)?t:gee(t)}function af(e,t,n){var o;t===void 0&&(t=[]),n===void 0&&(n=!0);const r=gee(e),a=r===((o=e.ownerDocument)==null?void 0:o.body),i=lo(r);if(a){const s=tO(i);return t.concat(i,i.visualViewport||[],Lf(r)?r:[],s&&n?af(s):[])}else return t.concat(r,af(r,[],n))}function tO(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function kee(e){const t=ar(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const r=Pa(e),a=r?e.offsetWidth:n,i=r?e.offsetHeight:o,s=iz(n)!==a||iz(o)!==i;return s&&(n=a,o=i),{width:n,height:o,$:s}}function oq(e){return rr(e)?e:e.contextElement}function c0(e){const t=oq(e);if(!Pa(t))return Vr(1);const n=t.getBoundingClientRect(),{width:o,height:r,$:a}=kee(t);let i=(a?iz(n.width):n.width)/o,s=(a?iz(n.height):n.height)/r;return(!i||!Number.isFinite(i))&&(i=1),(!s||!Number.isFinite(s))&&(s=1),{x:i,y:s}}const jqe=Vr(0);function vee(e){const t=lo(e);return!nq()||!t.visualViewport?jqe:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function $qe(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==lo(e)?!1:t}function Pd(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=e.getBoundingClientRect(),a=oq(e);let i=Vr(1);t&&(o?rr(o)&&(i=c0(o)):i=c0(e));const s=$qe(a,n,o)?vee(a):Vr(0);let c=(r.left+s.x)/i.x,l=(r.top+s.y)/i.y,h=r.width/i.x,u=r.height/i.y;if(a){const p=lo(a),y=o&&rr(o)?lo(o):o;let g=p,k=tO(g);for(;k&&o&&y!==g;){const x=c0(k),v=k.getBoundingClientRect(),M=ar(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=lo(k),k=tO(g)}}return cz({width:h,height:u,x:c,y:l})}function fR(e,t){const n=hR(e).scrollLeft;return t?t.left+n:Pd(Zr(e)).left+n}function xee(e,t){const n=e.getBoundingClientRect(),o=n.left+t.scrollLeft-fR(e,n),r=n.top+t.scrollTop;return{x:o,y:r}}function Pqe(e){let{elements:t,rect:n,offsetParent:o,strategy:r}=e;const a=r==="fixed",i=Zr(o),s=t?uR(t.floating):!1;if(o===i||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=Vr(1);const h=Vr(0),u=Pa(o);if((u||!u&&!a)&&((G0(o)!=="body"||Lf(i))&&(c=hR(o)),u)){const y=Pd(o);l=c0(o),h.x=y.x+o.clientLeft,h.y=y.y+o.clientTop}const p=i&&!u&&!a?xee(i,c):Vr(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 zqe(e){return Array.from(e.getClientRects())}function Rqe(e){const t=Zr(e),n=hR(e),o=e.ownerDocument.body,r=ro(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),a=ro(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let i=-n.scrollLeft+fR(e);const s=-n.scrollTop;return ar(o).direction==="rtl"&&(i+=ro(t.clientWidth,o.clientWidth)-r),{width:r,height:a,x:i,y:s}}const zW=25;function Tqe(e,t){const n=lo(e),o=Zr(e),r=n.visualViewport;let a=o.clientWidth,i=o.clientHeight,s=0,c=0;if(r){a=r.width,i=r.height;const h=nq();(!h||h&&t==="fixed")&&(s=r.offsetLeft,c=r.offsetTop)}const l=fR(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<=zW&&(a-=g)}else l<=zW&&(a+=l);return{width:a,height:i,x:s,y:c}}function Dqe(e,t){const n=Pd(e,!0,t==="fixed"),o=n.top+e.clientTop,r=n.left+e.clientLeft,a=Pa(e)?c0(e):Vr(1),i=e.clientWidth*a.x,s=e.clientHeight*a.y,c=r*a.x,l=o*a.y;return{width:i,height:s,x:c,y:l}}function RW(e,t,n){let o;if(t==="viewport")o=Tqe(e,n);else if(t==="document")o=Rqe(Zr(e));else if(rr(t))o=Dqe(t,n);else{const r=vee(e);o={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return cz(o)}function wee(e,t){const n=Fi(e);return n===t||!rr(n)||R0(n)?!1:ar(n).position==="fixed"||wee(n,t)}function Hqe(e,t){const n=t.get(e);if(n)return n;let o=af(e,[],!1).filter(s=>rr(s)&&G0(s)!=="body"),r=null;const a=ar(e).position==="fixed";let i=a?Fi(e):e;for(;rr(i)&&!R0(i);){const s=ar(i),c=tq(i);!c&&s.position==="fixed"&&(r=null),(a?!c&&!r:!c&&s.position==="static"&&!!r&&(r.position==="absolute"||r.position==="fixed")||Lf(i)&&!c&&wee(e,i))?o=o.filter(h=>h!==i):r=s,i=Fi(i)}return t.set(e,o),o}function Oqe(e){let{element:t,boundary:n,rootBoundary:o,strategy:r}=e;const i=[...n==="clippingAncestors"?uR(t)?[]:Hqe(t,this._c):[].concat(n),o],s=RW(t,i[0],r);let c=s.top,l=s.right,h=s.bottom,u=s.left;for(let p=1;p<i.length;p++){const y=RW(t,i[p],r);c=ro(y.top,c),l=Oi(y.right,l),h=Oi(y.bottom,h),u=ro(y.left,u)}return{width:l-u,height:h-c,x:u,y:c}}function Fqe(e){const{width:t,height:n}=kee(e);return{width:t,height:n}}function qqe(e,t,n){const o=Pa(t),r=Zr(t),a=n==="fixed",i=Pd(e,!0,a,t);let s={scrollLeft:0,scrollTop:0};const c=Vr(0);function l(){c.x=fR(r)}if(o||!o&&!a)if((G0(t)!=="body"||Lf(r))&&(s=hR(t)),o){const y=Pd(t,!0,a,t);c.x=y.x+t.clientLeft,c.y=y.y+t.clientTop}else r&&l();a&&!o&&r&&l();const h=r&&!o&&!a?xee(r,s):Vr(0),u=i.left+s.scrollLeft-c.x-h.x,p=i.top+s.scrollTop-c.y-h.y;return{x:u,y:p,width:i.width,height:i.height}}function FT(e){return ar(e).position==="static"}function TW(e,t){if(!Pa(e)||ar(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Zr(e)===n&&(n=n.ownerDocument.body),n}function Mee(e,t){const n=lo(e);if(uR(e))return n;if(!Pa(e)){let r=Fi(e);for(;r&&!R0(r);){if(rr(r)&&!FT(r))return r;r=Fi(r)}return n}let o=TW(e,t);for(;o&&Nqe(o)&&FT(o);)o=TW(o,t);return o&&R0(o)&&FT(o)&&!tq(o)?n:o||Eqe(e)||n}const Vqe=async function(e){const t=this.getOffsetParent||Mee,n=this.getDimensions,o=await n(e.floating);return{reference:qqe(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function Bqe(e){return ar(e).direction==="rtl"}const Uqe={convertOffsetParentRelativeRectToViewportRelativeRect:Pqe,getDocumentElement:Zr,getClippingRect:Oqe,getOffsetParent:Mee,getElementRects:Vqe,getClientRects:zqe,getDimensions:Fqe,getScale:c0,isElement:rr,isRTL:Bqe};function bee(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Wqe(e,t){let n=null,o;const r=Zr(e);function a(){var s;clearTimeout(o),(s=n)==null||s.disconnect(),n=null}function i(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),a();const l=e.getBoundingClientRect(),{left:h,top:u,width:p,height:y}=l;if(s||t(),!p||!y)return;const g=Np(u),k=Np(r.clientWidth-(h+p)),x=Np(r.clientHeight-(u+y)),v=Np(h),w={rootMargin:-g+"px "+-k+"px "+-x+"px "+-v+"px",threshold:ro(0,Oi(1,c))||1};let b=!0;function C(_){const S=_[0].intersectionRatio;if(S!==c){if(!b)return i();S?i(!1,S):o=setTimeout(()=>{i(!1,1e-7)},1e3)}S===1&&!bee(l,e.getBoundingClientRect())&&i(),b=!1}try{n=new IntersectionObserver(C,{...w,root:r.ownerDocument})}catch{n=new IntersectionObserver(C,w)}n.observe(e)}return i(!0),a}function Gqe(e,t,n,o){o===void 0&&(o={});const{ancestorScroll:r=!0,ancestorResize:a=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:c=!1}=o,l=oq(e),h=r||a?[...l?af(l):[],...t?af(t):[]]:[];h.forEach(v=>{r&&v.addEventListener("scroll",n,{passive:!0}),a&&v.addEventListener("resize",n)});const u=l&&s?Wqe(l,n):null;let p=-1,y=null;i&&(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?Pd(e):null;c&&x();function x(){const v=Pd(e);k&&!bee(k,v)&&n(),k=v,g=requestAnimationFrame(x)}return n(),()=>{var v;h.forEach(M=>{r&&M.removeEventListener("scroll",n),a&&M.removeEventListener("resize",n)}),u==null||u(),(v=y)==null||v.disconnect(),y=null,c&&cancelAnimationFrame(g)}}const Kqe=_qe,Zqe=Cqe,Xqe=wqe,Yqe=Lqe,Qqe=Mqe,DW=xqe,Jqe=Sqe,eVe=(e,t,n)=>{const o=new Map,r={platform:Uqe,...n},a={...r.platform,_c:o};return vqe(e,t,{...r,platform:a})};var tVe=typeof document<"u",nVe=function(){},sP=tVe?m.useLayoutEffect:nVe;function lz(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(!lz(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 a=r[o];if(!(a==="_owner"&&e.$$typeof)&&!lz(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function _ee(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function HW(e,t){const n=_ee(e);return Math.round(t*n)/n}function qT(e){const t=m.useRef(e);return sP(()=>{t.current=e}),t}function oVe(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:o=[],platform:r,elements:{reference:a,floating:i}={},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);lz(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=a||g,C=i||x,_=m.useRef(null),S=m.useRef(null),N=m.useRef(h),P=c!=null,A=qT(c),E=qT(r),z=qT(l),W=m.useCallback(()=>{if(!_.current||!S.current)return;const I={placement:t,strategy:n,middleware:p};E.current&&(I.platform=E.current),eVe(_.current,S.current,I).then(R=>{const L={...R,isPositioned:z.current!==!1};$.current&&!lz(N.current,L)&&(N.current=L,Od.flushSync(()=>{u(L)}))})},[p,t,n,E,z]);sP(()=>{l===!1&&N.current.isPositioned&&(N.current.isPositioned=!1,u(I=>({...I,isPositioned:!1})))},[l]);const $=m.useRef(!1);sP(()=>($.current=!0,()=>{$.current=!1}),[]),sP(()=>{if(b&&(_.current=b),C&&(S.current=C),b&&C){if(A.current)return A.current(b,C,W);W()}},[b,C,W,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=HW(D.floating,h.x),L=HW(D.floating,h.y);return s?{...I,transform:"translate("+R+"px, "+L+"px)",..._ee(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:W,refs:T,elements:D,floatingStyles:O}),[h,W,T,D,O])}const rVe=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?DW({element:o.current,padding:r}).fn(n):{}:o?DW({element:o,padding:r}).fn(n):{}}}},aVe=(e,t)=>{const n=Kqe(e);return{name:n.name,fn:n.fn,options:[e,t]}},iVe=(e,t)=>{const n=Zqe(e);return{name:n.name,fn:n.fn,options:[e,t]}},sVe=(e,t)=>({fn:Jqe(e).fn,options:[e,t]}),cVe=(e,t)=>{const n=Xqe(e);return{name:n.name,fn:n.fn,options:[e,t]}},lVe=(e,t)=>{const n=Yqe(e);return{name:n.name,fn:n.fn,options:[e,t]}},dVe=(e,t)=>{const n=Qqe(e);return{name:n.name,fn:n.fn,options:[e,t]}},uVe=(e,t)=>{const n=rVe(e);return{name:n.name,fn:n.fn,options:[e,t]}};var hVe="Arrow",Cee=m.forwardRef((e,t)=>{const{children:n,width:o=10,height:r=5,...a}=e;return f.jsx(Ve.svg,{...a,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"})})});Cee.displayName=hVe;var fVe=Cee,rq="Popper",[See,K0]=lr(rq),[pVe,Lee]=See(rq),Nee=e=>{const{__scopePopper:t,children:n}=e,[o,r]=m.useState(null);return f.jsx(pVe,{scope:t,anchor:o,onAnchorChange:r,children:n})};Nee.displayName=rq;var Iee="PopperAnchor",Aee=m.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:o,...r}=e,a=Lee(Iee,n),i=m.useRef(null),s=mt(t,i),c=m.useRef(null);return m.useEffect(()=>{const l=c.current;c.current=(o==null?void 0:o.current)||i.current,l!==c.current&&a.onAnchorChange(c.current)}),o?null:f.jsx(Ve.div,{...r,ref:s})});Aee.displayName=Iee;var aq="PopperContent",[yVe,mVe]=See(aq),Eee=m.forwardRef((e,t)=>{var re,oe,ne,ce,ve,ge;const{__scopePopper:n,side:o="bottom",sideOffset:r=0,align:a="center",alignOffset:i=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=Lee(aq,n),[v,M]=m.useState(null),w=mt(t,xe=>M(xe)),[b,C]=m.useState(null),_=VJ(b),S=(_==null?void 0:_.width)??0,N=(_==null?void 0:_.height)??0,P=o+(a!=="center"?"-"+a:""),A=typeof h=="number"?h:{top:0,right:0,bottom:0,left:0,...h},E=Array.isArray(l)?l:[l],z=E.length>0,W={padding:A,boundary:E.filter(kVe),altBoundary:z},{refs:$,floatingStyles:T,placement:D,isPositioned:O,middlewareData:I}=oVe({strategy:"fixed",placement:P,whileElementsMounted:(...xe)=>Gqe(...xe,{animationFrame:y==="always"}),elements:{reference:x.anchor},middleware:[aVe({mainAxis:r+N,alignmentAxis:i}),c&&iVe({mainAxis:!0,crossAxis:!1,limiter:u==="partial"?sVe():void 0,...W}),c&&cVe({...W}),lVe({...W,apply:({elements:xe,rects:Re,availableWidth:Ye,availableHeight:le})=>{const{width:Ie,height:jt}=Re.reference,xt=xe.floating.style;xt.setProperty("--radix-popper-available-width",`${Ye}px`),xt.setProperty("--radix-popper-available-height",`${le}px`),xt.setProperty("--radix-popper-anchor-width",`${Ie}px`),xt.setProperty("--radix-popper-anchor-height",`${jt}px`)}}),b&&uVe({element:b,padding:s}),vVe({arrowWidth:S,arrowHeight:N}),p&&dVe({strategy:"referenceHidden",...W})]}),[R,L]=Pee(D),V=Gr(g);Hi(()=>{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,K=((ne=I.arrow)==null?void 0:ne.centerOffset)!==0,[X,J]=m.useState();return Hi(()=>{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:X,"--radix-popper-transform-origin":[(ce=I.transformOrigin)==null?void 0:ce.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(yVe,{scope:n,placedSide:R,onArrowChange:C,arrowX:H,arrowY:j,shouldHideArrow:K,children:f.jsx(Ve.div,{"data-side":R,"data-align":L,...k,ref:w,style:{...k.style,animation:O?void 0:"none"}})})})});Eee.displayName=aq;var jee="PopperArrow",gVe={top:"bottom",right:"left",bottom:"top",left:"right"},$ee=m.forwardRef(function(t,n){const{__scopePopper:o,...r}=t,a=mVe(jee,o),i=gVe[a.placedSide];return f.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:f.jsx(fVe,{...r,ref:n,style:{...r.style,display:"block"}})})});$ee.displayName=jee;function kVe(e){return e!==null}var vVe=e=>({name:"transformOrigin",options:e,fn(t){var x,v,M;const{placement:n,rects:o,middlewareData:r}=t,i=((x=r.arrow)==null?void 0:x.centerOffset)!==0,s=i?0:e.arrowWidth,c=i?0:e.arrowHeight,[l,h]=Pee(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=i?u:`${p}px`,k=`${-c}px`):l==="top"?(g=i?u:`${p}px`,k=`${o.floating.height+c}px`):l==="right"?(g=`${-c}px`,k=i?u:`${y}px`):l==="left"&&(g=`${o.floating.width+c}px`,k=i?u:`${y}px`),{data:{x:g,y:k}}}});function Pee(e){const[t,n="center"]=e.split("-");return[t,n]}var iq=Nee,pR=Aee,sq=Eee,cq=$ee,xVe="Portal",Nf=m.forwardRef((e,t)=>{var s;const{container:n,...o}=e,[r,a]=m.useState(!1);Hi(()=>a(!0),[]);const i=n||r&&((s=globalThis==null?void 0:globalThis.document)==null?void 0:s.body);return i?Lce.createPortal(f.jsx(Ve.div,{...o,ref:t}),i):null});Nf.displayName=xVe;function wVe(e,t){return m.useReducer((n,o)=>t[n][o]??n,e)}var mo=e=>{const{present:t,children:n}=e,o=MVe(t),r=typeof n=="function"?n({present:o.isPresent}):m.Children.only(n),a=mt(o.ref,bVe(r));return typeof n=="function"||o.isPresent?m.cloneElement(r,{ref:a}):null};mo.displayName="Presence";function MVe(e){const[t,n]=m.useState(),o=m.useRef(null),r=m.useRef(e),a=m.useRef("none"),i=e?"mounted":"unmounted",[s,c]=wVe(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return m.useEffect(()=>{const l=Ip(o.current);a.current=s==="mounted"?l:"none"},[s]),Hi(()=>{const l=o.current,h=r.current;if(h!==e){const p=a.current,y=Ip(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]),Hi(()=>{if(t){let l;const h=t.ownerDocument.defaultView??window,u=y=>{const k=Ip(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&&(a.current=Ip(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 Ip(e){return(e==null?void 0:e.animationName)||"none"}function bVe(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 _Ve=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},vu=new WeakMap,Ap=new WeakMap,Ep={},VT=0,zee=function(e){return e&&(e.host||zee(e.parentNode))},CVe=function(e,t){return t.map(function(n){if(e.contains(n))return n;var o=zee(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})},SVe=function(e,t,n,o){var r=CVe(t,Array.isArray(e)?e:[e]);Ep[n]||(Ep[n]=new WeakMap);var a=Ep[n],i=[],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=(vu.get(p)||0)+1,x=(a.get(p)||0)+1;vu.set(p,k),a.set(p,x),i.push(p),k===1&&g&&Ap.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(),VT++,function(){i.forEach(function(u){var p=vu.get(u)-1,y=a.get(u)-1;vu.set(u,p),a.set(u,y),p||(Ap.has(u)||u.removeAttribute(o),Ap.delete(u)),y||u.removeAttribute(n)}),VT--,VT||(vu=new WeakMap,vu=new WeakMap,Ap=new WeakMap,Ep={})}},lq=function(e,t,n){n===void 0&&(n="data-aria-hidden");var o=Array.from(Array.isArray(e)?e:[e]),r=_Ve(e);return r?(o.push.apply(o,Array.from(r.querySelectorAll("[aria-live], script"))),SVe(o,r,n,"aria-hidden")):function(){return null}},zr=function(){return zr=Object.assign||function(t){for(var n,o=1,r=arguments.length;o<r;o++){n=arguments[o];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},zr.apply(this,arguments)};function Ree(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 LVe(e,t,n){if(n||arguments.length===2)for(var o=0,r=t.length,a;o<r;o++)(a||!(o in t))&&(a||(a=Array.prototype.slice.call(t,0,o)),a[o]=t[o]);return e.concat(a||Array.prototype.slice.call(t))}var cP="right-scroll-bar-position",lP="width-before-scroll-bar",NVe="with-scroll-bars-hidden",IVe="--removed-body-scroll-bar-size";function BT(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function AVe(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 EVe=typeof window<"u"?m.useLayoutEffect:m.useEffect,OW=new WeakMap;function jVe(e,t){var n=AVe(null,function(o){return e.forEach(function(r){return BT(r,o)})});return EVe(function(){var o=OW.get(n);if(o){var r=new Set(o),a=new Set(e),i=n.current;r.forEach(function(s){a.has(s)||BT(s,null)}),a.forEach(function(s){r.has(s)||BT(s,i)})}OW.set(n,e)},[e]),n}function $Ve(e){return e}function PVe(e,t){t===void 0&&(t=$Ve);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(a){var i=t(a,o);return n.push(i),function(){n=n.filter(function(s){return s!==i})}},assignSyncMedium:function(a){for(o=!0;n.length;){var i=n;n=[],i.forEach(a)}n={push:function(s){return a(s)},filter:function(){return n}}},assignMedium:function(a){o=!0;var i=[];if(n.length){var s=n;n=[],s.forEach(a),i=n}var c=function(){var h=i;i=[],h.forEach(a)},l=function(){return Promise.resolve().then(c)};l(),n={push:function(h){i.push(h),l()},filter:function(h){return i=i.filter(h),n}}}};return r}function zVe(e){e===void 0&&(e={});var t=PVe(null);return t.options=zr({async:!0,ssr:!1},e),t}var Tee=function(e){var t=e.sideCar,n=Ree(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,zr({},n))};Tee.isSideCarExport=!0;function RVe(e,t){return e.useMedium(t),Tee}var Dee=zVe(),UT=function(){},yR=m.forwardRef(function(e,t){var n=m.useRef(null),o=m.useState({onScrollCapture:UT,onWheelCapture:UT,onTouchMoveCapture:UT}),r=o[0],a=o[1],i=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=Ree(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=p,_=jVe([n,t]),S=zr(zr({},b),r);return m.createElement(m.Fragment,null,h&&m.createElement(C,{sideCar:Dee,removeScrollBar:l,shards:u,noRelative:y,noIsolation:g,inert:k,setCallbacks:a,allowPinchZoom:!!x,lockRef:n,gapMode:w}),i?m.cloneElement(m.Children.only(s),zr(zr({},S),{ref:_})):m.createElement(M,zr({},S,{className:c,ref:_}),s))});yR.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};yR.classNames={fullWidth:lP,zeroRight:cP};var TVe=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function DVe(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=TVe();return t&&e.setAttribute("nonce",t),e}function HVe(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function OVe(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var FVe=function(){var e=0,t=null;return{add:function(n){e==0&&(t=DVe())&&(HVe(t,n),OVe(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},qVe=function(){var e=FVe();return function(t,n){m.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Hee=function(){var e=qVe(),t=function(n){var o=n.styles,r=n.dynamic;return e(o,r),null};return t},VVe={left:0,top:0,right:0,gap:0},WT=function(e){return parseInt(e||"",10)||0},BVe=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[WT(n),WT(o),WT(r)]},UVe=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return VVe;var t=BVe(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])}},WVe=Hee(),l0="data-scroll-locked",GVe=function(e,t,n,o){var r=e.left,a=e.top,i=e.right,s=e.gap;return n===void 0&&(n="margin"),`
|
|
8470
8470
|
.`.concat(NVe,` {
|
|
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 i="#".repeat(r),s=n.enter("headingAtx"),c=n.enter("phrasing");a.move(i+" ");let l=n.containerPhrasing(e,{before:"# ",after:`
|
|
8539
8539
|
`,...a.current()});return/^[\t ]/.test(l)&&(l=uf(l.charCodeAt(0))+l.slice(1)),l=l?i+" "+l:i,n.options.closeAtx&&(l+=" "+i),c(),s(),l}Mre.peek=Iet;function Mre(e){return e.value||""}function Iet(){return"<"}bre.peek=Aet;function bre(e,t,n,o){const r=Yq(n),a=r==='"'?"Quote":"Apostrophe",i=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${a}`),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(")"),i(),l}function Aet(){return"!"}_re.peek=Eet;function _re(e,t,n,o){const r=e.referenceType,a=n.enter("imageReference");let i=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+"]["),i();const h=n.stack;n.stack=[],i=n.enter("reference");const u=n.safe(n.associationId(e),{before:c,after:"]",...s.current()});return i(),n.stack=h,a(),r==="full"||!l||l!==u?c+=s.move(u+"]"):r==="shortcut"?c=c.slice(0,-1):c+=s.move("]"),c}function Eet(){return"!"}Cre.peek=jet;function Cre(e,t,n){let o=e.value||"",r="`",a=-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+" ");++a<n.unsafe.length;){const i=n.unsafe[a],s=n.compilePattern(i);let c;if(i.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 jet(){return"`"}function Sre(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))}Lre.peek=$et;function Lre(e,t,n,o){const r=Yq(n),a=r==='"'?"Quote":"Apostrophe",i=n.createTracker(o);let s,c;if(Sre(e,n)){const h=n.stack;n.stack=[],s=n.enter("autolink");let u=i.move("<");return u+=i.move(n.containerPhrasing(e,{before:u,after:">",...i.current()})),u+=i.move(">"),s(),n.stack=h,u}s=n.enter("link"),c=n.enter("label");let l=i.move("[");return l+=i.move(n.containerPhrasing(e,{before:l,after:"](",...i.current()})),l+=i.move("]("),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),l+=i.move("<"),l+=i.move(n.safe(e.url,{before:l,after:">",...i.current()})),l+=i.move(">")):(c=n.enter("destinationRaw"),l+=i.move(n.safe(e.url,{before:l,after:e.title?" ":")",...i.current()}))),c(),e.title&&(c=n.enter(`title${a}`),l+=i.move(" "+r),l+=i.move(n.safe(e.title,{before:l,after:r,...i.current()})),l+=i.move(r),c()),l+=i.move(")"),s(),l}function $et(e,t,n){return Sre(e,n)?"<":"["}Nre.peek=Pet;function Nre(e,t,n,o){const r=e.referenceType,a=n.enter("linkReference");let i=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+"]["),i();const h=n.stack;n.stack=[],i=n.enter("reference");const u=n.safe(n.associationId(e),{before:c,after:"]",...s.current()});return i(),n.stack=h,a(),r==="full"||!l||l!==u?c+=s.move(u+"]"):r==="shortcut"?c=c.slice(0,-1):c+=s.move("]"),c}function Pet(){return"["}function Qq(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 zet(e){const t=Qq(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 Ret(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 Ire(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 Tet(e,t,n,o){const r=n.enter("list"),a=n.bulletCurrent;let i=e.ordered?Ret(n):Qq(n);const s=e.ordered?i==="."?")":".":zet(n);let c=t&&n.bulletLastUsed?i===n.bulletLastUsed:!1;if(!e.ordered){const h=e.children?e.children[0]:void 0;if((i==="*"||i==="-")&&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),Ire(n)===i&&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&&(i=s),n.bulletCurrent=i;const l=n.containerFlow(e,o);return n.bulletLastUsed=i,n.bulletCurrent=a,r(),l}function Det(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 Het(e,t,n,o){const r=Det(n);let a=n.bulletCurrent||Qq(n);t&&t.type==="list"&&t.ordered&&(a=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let i=a.length+1;(r==="tab"||r==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(i=Math.ceil(i/4)*4);const s=n.createTracker(o);s.move(a+" ".repeat(i-a.length)),s.shift(i);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(i))+u:(y?a:a+" ".repeat(i-a.length))+u}}function Oet(e,t,n,o){const r=n.enter("paragraph"),a=n.enter("phrasing"),i=n.containerPhrasing(e,o);return a(),r(),i}const Fet=zR(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function qet(e,t,n,o){return(e.children.some(function(i){return Fet(i)})?n.containerPhrasing:n.containerFlow).call(n,e,o)}function Vet(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}Are.peek=Bet;function Are(e,t,n,o){const r=Vet(n),a=n.enter("strong"),i=n.createTracker(o),s=i.move(r+r);let c=i.move(n.containerPhrasing(e,{after:r,before:s,...i.current()}));const l=c.charCodeAt(0),h=Mz(o.before.charCodeAt(o.before.length-1),l,r);h.inside&&(c=uf(l)+c.slice(1));const u=c.charCodeAt(c.length-1),p=Mz(o.after.charCodeAt(0),u,r);p.inside&&(c=c.slice(0,-1)+uf(u));const y=i.move(r+r);return a(),n.attentionEncodeSurroundingInfo={after:p.outside,before:h.outside},s+c+y}function Bet(e,t,n){return n.options.strong||"*"}function Uet(e,t,n,o){return n.safe(e.value,o)}function Wet(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 Get(e,t,n){const o=(Ire(n)+(n.options.ruleSpaces?" ":"")).repeat(Wet(n));return n.options.ruleSpaces?o.slice(0,-1):o}const Ere={blockquote:yet,break:eK,code:wet,definition:bet,emphasis:wre,hardBreak:eK,heading:Net,html:Mre,image:bre,imageReference:_re,inlineCode:Cre,link:Lre,linkReference:Nre,list:Tet,listItem:Het,paragraph:Oet,root:qet,strong:Are,text:Uet,thematicBreak:Get};function Ket(){return{enter:{table:Zet,tableData:tK,tableHeader:tK,tableRow:Yet},exit:{codeText:Qet,table:Xet,tableData:hD,tableHeader:hD,tableRow:hD}}}function Zet(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 Xet(e){this.exit(e),this.data.inTable=void 0}function Yet(e){this.enter({type:"tableRow",children:[]},e)}function hD(e){this.exit(e)}function tK(e){this.enter({type:"tableCell",children:[]},e)}function Qet(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,Jet));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function Jet(e,t){return t==="|"?t:e}function ett(e){const t=e||{},n=t.tableCellPadding,o=t.tablePipeAlign,r=t.stringLength,a=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:i,tableCell:c,tableRow:s}};function i(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:a,after:a});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=Ere.inlineCode(y,g,k);return k.stack.includes("tableCell")&&(x=x.replace(/\|/g,"\\$&")),x}}function ttt(){return{exit:{taskListCheckValueChecked:nK,taskListCheckValueUnchecked:nK,paragraph:ott}}}function ntt(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:rtt}}}function nK(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function ott(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 a=-1,i;for(;++a<r.length;){const s=r[a];if(s.type==="paragraph"){i=s;break}}i===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 rtt(e,t,n,o){const r=e.children[0],a=typeof e.checked=="boolean"&&r&&r.type==="paragraph",i="["+(e.checked?"x":" ")+"] ",s=n.createTracker(o);a&&s.move(i);let c=Ere.listItem(e,t,n,{...o,...s.current()});return a&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),c;function l(h){return h+i}}function att(){return[zJe(),net(),iet(),Ket(),ttt()]}function itt(e){return{extensions:[RJe(),oet(e),set(),ett(e),ntt()]}}const stt={tokenize:ftt,partial:!0},jre={tokenize:ptt,partial:!0},$re={tokenize:ytt,partial:!0},Pre={tokenize:mtt,partial:!0},ctt={tokenize:gtt,partial:!0},zre={name:"wwwAutolink",tokenize:utt,previous:Tre},Rre={name:"protocolAutolink",tokenize:htt,previous:Dre},za={name:"emailAutolink",tokenize:dtt,previous:Hre},ea={};function ltt(){return{text:ea}}let ls=48;for(;ls<123;)ea[ls]=za,ls++,ls===58?ls=65:ls===91&&(ls=97);ea[43]=za;ea[45]=za;ea[46]=za;ea[95]=za;ea[72]=[za,Rre];ea[104]=[za,Rre];ea[87]=[za,zre];ea[119]=[za,zre];function dtt(e,t,n){const o=this;let r,a;return i;function i(u){return!MO(u)||!Hre.call(o,o.previous)||Jq(o.events)?n(u):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),s(u))}function s(u){return MO(u)?(e.consume(u),s):u===64?(e.consume(u),c):n(u)}function c(u){return u===46?e.check(ctt,h,l)(u):u===45||u===95||kn(u)?(a=!0,e.consume(u),c):h(u)}function l(u){return e.consume(u),r=!0,c}function h(u){return a&&r&&Sn(o.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(u)):n(u)}}function utt(e,t,n){const o=this;return r;function r(i){return i!==87&&i!==119||!Tre.call(o,o.previous)||Jq(o.events)?n(i):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(stt,e.attempt(jre,e.attempt($re,a),n),n)(i))}function a(i){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(i)}}function htt(e,t,n){const o=this;let r="",a=!1;return i;function i(u){return(u===72||u===104)&&Dre.call(o,o.previous)&&!Jq(o.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),r+=String.fromCodePoint(u),e.consume(u),s):n(u)}function s(u){if(Sn(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),a?l:(a=!0,c)):n(u)}function l(u){return u===null||vz(u)||yt(u)||Td(u)||jR(u)?n(u):e.attempt(jre,e.attempt($re,h),n)(u)}function h(u){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(u)}}function ftt(e,t,n){let o=0;return r;function r(i){return(i===87||i===119)&&o<3?(o++,e.consume(i),r):i===46&&o===3?(e.consume(i),a):n(i)}function a(i){return i===null?n(i):t(i)}}function ptt(e,t,n){let o,r,a;return i;function i(l){return l===46||l===95?e.check(Pre,c,s)(l):l===null||yt(l)||Td(l)||l!==45&&jR(l)?c(l):(a=!0,e.consume(l),i)}function s(l){return l===95?o=!0:(r=o,o=void 0),e.consume(l),i}function c(l){return r||o||!a?n(l):t(l)}}function ytt(e,t){let n=0,o=0;return r;function r(i){return i===40?(n++,e.consume(i),r):i===41&&o<n?a(i):i===33||i===34||i===38||i===39||i===41||i===42||i===44||i===46||i===58||i===59||i===60||i===63||i===93||i===95||i===126?e.check(Pre,t,a)(i):i===null||yt(i)||Td(i)?t(i):(e.consume(i),r)}function a(i){return i===41&&o++,e.consume(i),r}}function mtt(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),a):s===93?(e.consume(s),r):s===60||s===null||yt(s)||Td(s)?t(s):n(s)}function r(s){return s===null||s===40||s===91||yt(s)||Td(s)?t(s):o(s)}function a(s){return Sn(s)?i(s):n(s)}function i(s){return s===59?(e.consume(s),o):Sn(s)?(e.consume(s),i):n(s)}}function gtt(e,t,n){return o;function o(a){return e.consume(a),r}function r(a){return kn(a)?n(a):t(a)}}function Tre(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||yt(e)}function Dre(e){return!Sn(e)}function Hre(e){return!(e===47||MO(e))}function MO(e){return e===43||e===45||e===46||e===95||kn(e)}function Jq(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 ktt={tokenize:Stt,partial:!0};function vtt(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:btt,continuation:{tokenize:_tt},exit:Ctt}},text:{91:{name:"gfmFootnoteCall",tokenize:Mtt},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:xtt,resolveTo:wtt}}}}function xtt(e,t,n){const o=this;let r=o.events.length;const a=o.parser.gfmFootnotes||(o.parser.gfmFootnotes=[]);let i;for(;r--;){const c=o.events[r][1];if(c.type==="labelImage"){i=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(!i||!i._balanced)return n(c);const l=nr(o.sliceSerialize({start:i.end,end:o.now()}));return l.codePointAt(0)!==94||!a.includes(l.slice(1))?n(c):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),t(c))}}function wtt(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 a={type:"gfmFootnoteCallString",start:Object.assign({},r.end),end:Object.assign({},e[e.length-1][1].start)},i={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],["enter",o,t],e[n+3],e[n+4],["enter",r,t],["exit",r,t],["enter",a,t],["enter",i,t],["exit",i,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",o,t]];return e.splice(n,e.length-n+1,...s),e}function Mtt(e,t,n){const o=this,r=o.parser.gfmFootnotes||(o.parser.gfmFootnotes=[]);let a=0,i;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(a>999||u===93&&!i||u===null||u===91||yt(u))return n(u);if(u===93){e.exit("chunkString");const p=e.exit("gfmFootnoteCallString");return r.includes(nr(o.sliceSerialize(p)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(u),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(u)}return yt(u)||(i=!0),a++,e.consume(u),u===92?h:l}function h(u){return u===91||u===92||u===93?(e.consume(u),a++,l):l(u)}}function btt(e,t,n){const o=this,r=o.parser.gfmFootnotes||(o.parser.gfmFootnotes=[]);let a,i=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(i>999||g===93&&!s||g===null||g===91||yt(g))return n(g);if(g===93){e.exit("chunkString");const k=e.exit("gfmFootnoteDefinitionLabelString");return a=nr(o.sliceSerialize(k)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p}return yt(g)||(s=!0),i++,e.consume(g),g===92?u:h}function u(g){return g===91||g===92||g===93?(e.consume(g),i++,h):h(g)}function p(g){return g===58?(e.enter("definitionMarker"),e.consume(g),e.exit("definitionMarker"),r.includes(a)||r.push(a),ot(e,y,"gfmFootnoteDefinitionWhitespace")):n(g)}function y(g){return t(g)}}function _tt(e,t,n){return e.check(Df,t,e.attempt(ktt,t,n))}function Ctt(e){e.exit("gfmFootnoteDefinition")}function Stt(e,t,n){const o=this;return ot(e,r,"gfmFootnoteDefinitionIndent",5);function r(a){const i=o.events[o.events.length-1];return i&&i[1].type==="gfmFootnoteDefinitionIndent"&&i[2].sliceSerialize(i[1],!0).length===4?t(a):n(a)}}function Ltt(e){let n=(e||{}).singleTilde;const o={name:"strikethrough",tokenize:a,resolveAll:r};return n==null&&(n=!0),{text:{126:o},insideSpan:{null:[o]},attentionMarkers:{null:[126]}};function r(i,s){let c=-1;for(;++c<i.length;)if(i[c][0]==="enter"&&i[c][1].type==="strikethroughSequenceTemporary"&&i[c][1]._close){let l=c;for(;l--;)if(i[l][0]==="exit"&&i[l][1].type==="strikethroughSequenceTemporary"&&i[l][1]._open&&i[c][1].end.offset-i[c][1].start.offset===i[l][1].end.offset-i[l][1].start.offset){i[c][1].type="strikethroughSequence",i[l][1].type="strikethroughSequence";const h={type:"strikethrough",start:Object.assign({},i[l][1].start),end:Object.assign({},i[c][1].end)},u={type:"strikethroughText",start:Object.assign({},i[l][1].end),end:Object.assign({},i[c][1].start)},p=[["enter",h,s],["enter",i[l][1],s],["exit",i[l][1],s],["enter",u,s]],y=s.parser.constructs.insideSpan.null;y&&uo(p,p.length,0,$R(y,i.slice(l+1,c),s)),uo(p,p.length,0,[["exit",u,s],["enter",i[c][1],s],["exit",i[c][1],s],["exit",h,s]]),uo(i,l-1,c-l+3,p),c=l+p.length-2;break}}for(c=-1;++c<i.length;)i[c][1].type==="strikethroughSequenceTemporary"&&(i[c][1].type="data");return i}function a(i,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):(i.enter("strikethroughSequenceTemporary"),y(g))}function y(g){const k=H0(l);if(g===126)return u>1?c(g):(i.consume(g),u++,y);if(u<2&&!n)return c(g);const x=i.exit("strikethroughSequenceTemporary"),v=H0(g);return x._open=!v||v===2&&!!k,x._close=!k||k===2&&!!v,s(g)}}}class Ntt{constructor(){this.map=[]}add(t,n,o){Itt(this,t,n,o)}consume(t){if(this.map.sort(function(a,i){return a[0]-i[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 a of r)t.push(a);r=o.pop()}this.map.length=0}}function Itt(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 Att(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 a=o.length-1;o[a]=o[a]==="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 Ett(){return{flow:{null:{name:"table",tokenize:jtt,resolveAll:$tt}}}}function jtt(e,t,n){const o=this;let r=0,a=0,i;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,W=z==="tableHead"||z==="tableRow"?_:c;return W===_&&o.parser.lazy[o.now().line]?n(A):W(A)}function c(A){return e.enter("tableHead"),e.enter("tableRow"),l(A)}function l(A){return A===124||(i=!0,a+=1),h(A)}function h(A){return A===null?n(A):$e(A)?a>1?(a=0,o.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(A),e.exit("lineEnding"),y):n(A):Ze(A)?ot(e,h,"whitespace")(A):(a+=1,i&&(i=!1,r+=1),A===124?(e.enter("tableCellDivider"),e.consume(A),e.exit("tableCellDivider"),i=!0,h):(e.enter("data"),u(A)))}function u(A){return A===null||A===124||yt(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"),i=!1,Ze(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?(i=!0,e.enter("tableCellDivider"),e.consume(A),e.exit("tableCellDivider"),k):C(A)}function k(A){return Ze(A)?ot(e,x,"whitespace")(A):x(A)}function x(A){return A===58?(a+=1,i=!0,e.enter("tableDelimiterMarker"),e.consume(A),e.exit("tableDelimiterMarker"),v):A===45?(a+=1,v(A)):A===null||$e(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?(i=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(A),e.exit("tableDelimiterMarker"),w):(e.exit("tableDelimiterFiller"),w(A))}function w(A){return Ze(A)?ot(e,b,"whitespace")(A):b(A)}function b(A){return A===124?g(A):A===null||$e(A)?!i||r!==a?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||$e(A)?(e.exit("tableRow"),t(A)):Ze(A)?ot(e,S,"whitespace")(A):(e.enter("data"),N(A))}function N(A){return A===null||A===124||yt(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 $tt(e,t){let n=-1,o=!0,r=0,a=[0,0,0,0],i=[0,0,0,0],s=!1,c=0,l,h,u;const p=new Ntt;for(;++n<e.length;){const y=e[n],g=y[1];y[0]==="enter"?g.type==="tableHead"?(s=!1,c!==0&&(oK(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,a=[0,0,0,0],i=[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,i[2]===0&&(a[1]!==0&&(i[0]=i[1],u=Up(p,t,a,r,void 0,u),a=[0,0,0,0]),i[2]=n)):g.type==="tableCellDivider"&&(o?o=!1:(a[1]!==0&&(i[0]=i[1],u=Up(p,t,a,r,void 0,u)),a=i,i=[a[1],n,0,0])):g.type==="tableHead"?(s=!0,c=n):g.type==="tableRow"||g.type==="tableDelimiterRow"?(c=n,a[1]!==0?(i[0]=i[1],u=Up(p,t,a,r,n,u)):i[1]!==0&&(u=Up(p,t,i,r,n,u)),r=0):r&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")&&(i[3]=n)}for(c!==0&&oK(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=Att(t.events,n))}return e}function Up(e,t,n,o,r,a){const i=o===1?"tableHeader":o===2?"tableDelimiter":"tableData",s="tableContent";n[0]!==0&&(a.end=Object.assign({},Eu(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const c=Eu(t.events,n[1]);if(a={type:i,start:Object.assign({},c),end:Object.assign({},c)},e.add(n[1],0,[["enter",a,t]]),n[2]!==0){const l=Eu(t.events,n[2]),h=Eu(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&&(a.end=Object.assign({},Eu(t.events,r)),e.add(r,0,[["exit",a,t]]),a=void 0),a}function oK(e,t,n,o,r){const a=[],i=Eu(t.events,n);r&&(r.end=Object.assign({},i),a.push(["exit",r,t])),o.end=Object.assign({},i),a.push(["exit",o,t]),e.add(n+1,0,a)}function Eu(e,t){const n=e[t],o=n[0]==="enter"?"start":"end";return n[1][o]}const Ptt={name:"tasklistCheck",tokenize:Rtt};function ztt(){return{text:{91:Ptt}}}function Rtt(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"),a)}function a(c){return yt(c)?(e.enter("taskListCheckValueUnchecked"),e.consume(c),e.exit("taskListCheckValueUnchecked"),i):c===88||c===120?(e.enter("taskListCheckValueChecked"),e.consume(c),e.exit("taskListCheckValueChecked"),i):n(c)}function i(c){return c===93?(e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),s):n(c)}function s(c){return $e(c)?t(c):Ze(c)?e.check({tokenize:Ttt},t,n)(c):n(c)}}function Ttt(e,t,n){return ot(e,o,"whitespace");function o(r){return r===null?n(r):t(r)}}function Dtt(e){return Zoe([ltt(),vtt(),Ltt(e),Ett(),ztt()])}const Htt={};function Ott(e){const t=this,n=e||Htt,o=t.data(),r=o.micromarkExtensions||(o.micromarkExtensions=[]),a=o.fromMarkdownExtensions||(o.fromMarkdownExtensions=[]),i=o.toMarkdownExtensions||(o.toMarkdownExtensions=[]);r.push(Dtt(n)),a.push(att()),i.push(itt(n))}let Wp=null,Ftt=0;function qtt(){return Wp||(Wp=V0(()=>import("./mermaid.core-DWCabHOC.js").then(e=>e.ak),__vite__mapDeps([8,9,1])).then(e=>{const t=e;return t.default??t}),Wp)}function rK(){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 aK({code:e,className:t}){const n=m.useRef(null),o=m.useRef(`seeflow-mermaid-${++Ftt}`),[r,a]=m.useState(null),[i,s]=m.useState(()=>rK());return m.useEffect(()=>{if(typeof document>"u")return;const c=()=>s(rK()),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 a(null),qtt().then(async l=>{l.initialize({startOnLoad:!1,theme:i?"dark":"default",securityLevel:"strict",fontFamily:'"Inter", ui-sans-serif, system-ui, sans-serif'});const h=`${o.current}-${i?"d":"l"}`,u=await l.render(h,e);if(c)return;const p=n.current;p&&(p.innerHTML=u.svg)}).catch(l=>{c||a(l instanceof Error?l.message:String(l))}),()=>{c=!0}},[e,i]),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":i?"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 Vtt({flowId:e,node:t,connector:n,adapter:o,onNameChange:r,onDescriptionChange:a,onDetailChange:i,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(()=>tHe()),S=A=>{A.preventDefault(),oHe(C,A.clientX,{onWidth:_,onCommit:nHe})};m.useEffect(()=>{const A=E=>{var W;if(E.key!=="Escape")return;const z=document.activeElement;(W=z==null?void 0:z.getAttribute("data-testid"))!=null&&W.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(Ai,{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(Btt,{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(z0,{name:b,size:16})}):null,f.jsx("div",{className:"sf:min-w-0 sf:flex-1",children:f.jsx(fD,{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(Ktt,{report:c}):null,f.jsx(fD,{nodeId:y.id,value:k,placeholder:"Short description shown on the node body",multiline:!0,ariaLabel:"Description",testIdBase:"detail-panel-description",onSave:a,textClassName:"sf:text-[13px] sf:leading-relaxed sf:text-muted-foreground sf:dark:text-zinc-400"}),f.jsx(fD,{nodeId:y.id,value:x,placeholder:"Long-form notes, context, anything…",multiline:!0,ariaLabel:"Detail",testIdBase:"detail-panel-detail",onSave:i,markdown:!0,textClassName:"sf:text-sm sf:leading-relaxed sf:text-foreground"}),y.type==="html"&&e?f.jsx(Utt,{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(Xtt,{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 fD({nodeId:e,value:t,placeholder:n,multiline:o,ariaLabel:r,testIdBase:a,onSave:i,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(!i)return f.jsx("div",{"data-testid":a,"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(iK,{value:t}):t});const g=()=>{const C=u.current,_=C?o?C.innerText:C.textContent??"":t;i(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:a,after:a});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=Ere.inlineCode(y,g,k);return k.stack.includes("tableCell")&&(x=x.replace(/\|/g,"\\$&")),x}}function ttt(){return{exit:{taskListCheckValueChecked:nK,taskListCheckValueUnchecked:nK,paragraph:ott}}}function ntt(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:rtt}}}function nK(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function ott(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 a=-1,i;for(;++a<r.length;){const s=r[a];if(s.type==="paragraph"){i=s;break}}i===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 rtt(e,t,n,o){const r=e.children[0],a=typeof e.checked=="boolean"&&r&&r.type==="paragraph",i="["+(e.checked?"x":" ")+"] ",s=n.createTracker(o);a&&s.move(i);let c=Ere.listItem(e,t,n,{...o,...s.current()});return a&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),c;function l(h){return h+i}}function att(){return[zJe(),net(),iet(),Ket(),ttt()]}function itt(e){return{extensions:[RJe(),oet(e),set(),ett(e),ntt()]}}const stt={tokenize:ftt,partial:!0},jre={tokenize:ptt,partial:!0},$re={tokenize:ytt,partial:!0},Pre={tokenize:mtt,partial:!0},ctt={tokenize:gtt,partial:!0},zre={name:"wwwAutolink",tokenize:utt,previous:Tre},Rre={name:"protocolAutolink",tokenize:htt,previous:Dre},za={name:"emailAutolink",tokenize:dtt,previous:Hre},ea={};function ltt(){return{text:ea}}let ls=48;for(;ls<123;)ea[ls]=za,ls++,ls===58?ls=65:ls===91&&(ls=97);ea[43]=za;ea[45]=za;ea[46]=za;ea[95]=za;ea[72]=[za,Rre];ea[104]=[za,Rre];ea[87]=[za,zre];ea[119]=[za,zre];function dtt(e,t,n){const o=this;let r,a;return i;function i(u){return!MO(u)||!Hre.call(o,o.previous)||Jq(o.events)?n(u):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),s(u))}function s(u){return MO(u)?(e.consume(u),s):u===64?(e.consume(u),c):n(u)}function c(u){return u===46?e.check(ctt,h,l)(u):u===45||u===95||kn(u)?(a=!0,e.consume(u),c):h(u)}function l(u){return e.consume(u),r=!0,c}function h(u){return a&&r&&Sn(o.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(u)):n(u)}}function utt(e,t,n){const o=this;return r;function r(i){return i!==87&&i!==119||!Tre.call(o,o.previous)||Jq(o.events)?n(i):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(stt,e.attempt(jre,e.attempt($re,a),n),n)(i))}function a(i){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(i)}}function htt(e,t,n){const o=this;let r="",a=!1;return i;function i(u){return(u===72||u===104)&&Dre.call(o,o.previous)&&!Jq(o.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),r+=String.fromCodePoint(u),e.consume(u),s):n(u)}function s(u){if(Sn(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),a?l:(a=!0,c)):n(u)}function l(u){return u===null||vz(u)||yt(u)||Td(u)||jR(u)?n(u):e.attempt(jre,e.attempt($re,h),n)(u)}function h(u){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(u)}}function ftt(e,t,n){let o=0;return r;function r(i){return(i===87||i===119)&&o<3?(o++,e.consume(i),r):i===46&&o===3?(e.consume(i),a):n(i)}function a(i){return i===null?n(i):t(i)}}function ptt(e,t,n){let o,r,a;return i;function i(l){return l===46||l===95?e.check(Pre,c,s)(l):l===null||yt(l)||Td(l)||l!==45&&jR(l)?c(l):(a=!0,e.consume(l),i)}function s(l){return l===95?o=!0:(r=o,o=void 0),e.consume(l),i}function c(l){return r||o||!a?n(l):t(l)}}function ytt(e,t){let n=0,o=0;return r;function r(i){return i===40?(n++,e.consume(i),r):i===41&&o<n?a(i):i===33||i===34||i===38||i===39||i===41||i===42||i===44||i===46||i===58||i===59||i===60||i===63||i===93||i===95||i===126?e.check(Pre,t,a)(i):i===null||yt(i)||Td(i)?t(i):(e.consume(i),r)}function a(i){return i===41&&o++,e.consume(i),r}}function mtt(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),a):s===93?(e.consume(s),r):s===60||s===null||yt(s)||Td(s)?t(s):n(s)}function r(s){return s===null||s===40||s===91||yt(s)||Td(s)?t(s):o(s)}function a(s){return Sn(s)?i(s):n(s)}function i(s){return s===59?(e.consume(s),o):Sn(s)?(e.consume(s),i):n(s)}}function gtt(e,t,n){return o;function o(a){return e.consume(a),r}function r(a){return kn(a)?n(a):t(a)}}function Tre(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||yt(e)}function Dre(e){return!Sn(e)}function Hre(e){return!(e===47||MO(e))}function MO(e){return e===43||e===45||e===46||e===95||kn(e)}function Jq(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 ktt={tokenize:Stt,partial:!0};function vtt(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:btt,continuation:{tokenize:_tt},exit:Ctt}},text:{91:{name:"gfmFootnoteCall",tokenize:Mtt},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:xtt,resolveTo:wtt}}}}function xtt(e,t,n){const o=this;let r=o.events.length;const a=o.parser.gfmFootnotes||(o.parser.gfmFootnotes=[]);let i;for(;r--;){const c=o.events[r][1];if(c.type==="labelImage"){i=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(!i||!i._balanced)return n(c);const l=nr(o.sliceSerialize({start:i.end,end:o.now()}));return l.codePointAt(0)!==94||!a.includes(l.slice(1))?n(c):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),t(c))}}function wtt(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 a={type:"gfmFootnoteCallString",start:Object.assign({},r.end),end:Object.assign({},e[e.length-1][1].start)},i={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],["enter",o,t],e[n+3],e[n+4],["enter",r,t],["exit",r,t],["enter",a,t],["enter",i,t],["exit",i,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",o,t]];return e.splice(n,e.length-n+1,...s),e}function Mtt(e,t,n){const o=this,r=o.parser.gfmFootnotes||(o.parser.gfmFootnotes=[]);let a=0,i;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(a>999||u===93&&!i||u===null||u===91||yt(u))return n(u);if(u===93){e.exit("chunkString");const p=e.exit("gfmFootnoteCallString");return r.includes(nr(o.sliceSerialize(p)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(u),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(u)}return yt(u)||(i=!0),a++,e.consume(u),u===92?h:l}function h(u){return u===91||u===92||u===93?(e.consume(u),a++,l):l(u)}}function btt(e,t,n){const o=this,r=o.parser.gfmFootnotes||(o.parser.gfmFootnotes=[]);let a,i=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(i>999||g===93&&!s||g===null||g===91||yt(g))return n(g);if(g===93){e.exit("chunkString");const k=e.exit("gfmFootnoteDefinitionLabelString");return a=nr(o.sliceSerialize(k)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p}return yt(g)||(s=!0),i++,e.consume(g),g===92?u:h}function u(g){return g===91||g===92||g===93?(e.consume(g),i++,h):h(g)}function p(g){return g===58?(e.enter("definitionMarker"),e.consume(g),e.exit("definitionMarker"),r.includes(a)||r.push(a),ot(e,y,"gfmFootnoteDefinitionWhitespace")):n(g)}function y(g){return t(g)}}function _tt(e,t,n){return e.check(Df,t,e.attempt(ktt,t,n))}function Ctt(e){e.exit("gfmFootnoteDefinition")}function Stt(e,t,n){const o=this;return ot(e,r,"gfmFootnoteDefinitionIndent",5);function r(a){const i=o.events[o.events.length-1];return i&&i[1].type==="gfmFootnoteDefinitionIndent"&&i[2].sliceSerialize(i[1],!0).length===4?t(a):n(a)}}function Ltt(e){let n=(e||{}).singleTilde;const o={name:"strikethrough",tokenize:a,resolveAll:r};return n==null&&(n=!0),{text:{126:o},insideSpan:{null:[o]},attentionMarkers:{null:[126]}};function r(i,s){let c=-1;for(;++c<i.length;)if(i[c][0]==="enter"&&i[c][1].type==="strikethroughSequenceTemporary"&&i[c][1]._close){let l=c;for(;l--;)if(i[l][0]==="exit"&&i[l][1].type==="strikethroughSequenceTemporary"&&i[l][1]._open&&i[c][1].end.offset-i[c][1].start.offset===i[l][1].end.offset-i[l][1].start.offset){i[c][1].type="strikethroughSequence",i[l][1].type="strikethroughSequence";const h={type:"strikethrough",start:Object.assign({},i[l][1].start),end:Object.assign({},i[c][1].end)},u={type:"strikethroughText",start:Object.assign({},i[l][1].end),end:Object.assign({},i[c][1].start)},p=[["enter",h,s],["enter",i[l][1],s],["exit",i[l][1],s],["enter",u,s]],y=s.parser.constructs.insideSpan.null;y&&uo(p,p.length,0,$R(y,i.slice(l+1,c),s)),uo(p,p.length,0,[["exit",u,s],["enter",i[c][1],s],["exit",i[c][1],s],["exit",h,s]]),uo(i,l-1,c-l+3,p),c=l+p.length-2;break}}for(c=-1;++c<i.length;)i[c][1].type==="strikethroughSequenceTemporary"&&(i[c][1].type="data");return i}function a(i,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):(i.enter("strikethroughSequenceTemporary"),y(g))}function y(g){const k=H0(l);if(g===126)return u>1?c(g):(i.consume(g),u++,y);if(u<2&&!n)return c(g);const x=i.exit("strikethroughSequenceTemporary"),v=H0(g);return x._open=!v||v===2&&!!k,x._close=!k||k===2&&!!v,s(g)}}}class Ntt{constructor(){this.map=[]}add(t,n,o){Itt(this,t,n,o)}consume(t){if(this.map.sort(function(a,i){return a[0]-i[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 a of r)t.push(a);r=o.pop()}this.map.length=0}}function Itt(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 Att(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 a=o.length-1;o[a]=o[a]==="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 Ett(){return{flow:{null:{name:"table",tokenize:jtt,resolveAll:$tt}}}}function jtt(e,t,n){const o=this;let r=0,a=0,i;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,W=z==="tableHead"||z==="tableRow"?_:c;return W===_&&o.parser.lazy[o.now().line]?n(A):W(A)}function c(A){return e.enter("tableHead"),e.enter("tableRow"),l(A)}function l(A){return A===124||(i=!0,a+=1),h(A)}function h(A){return A===null?n(A):$e(A)?a>1?(a=0,o.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(A),e.exit("lineEnding"),y):n(A):Ze(A)?ot(e,h,"whitespace")(A):(a+=1,i&&(i=!1,r+=1),A===124?(e.enter("tableCellDivider"),e.consume(A),e.exit("tableCellDivider"),i=!0,h):(e.enter("data"),u(A)))}function u(A){return A===null||A===124||yt(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"),i=!1,Ze(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?(i=!0,e.enter("tableCellDivider"),e.consume(A),e.exit("tableCellDivider"),k):C(A)}function k(A){return Ze(A)?ot(e,x,"whitespace")(A):x(A)}function x(A){return A===58?(a+=1,i=!0,e.enter("tableDelimiterMarker"),e.consume(A),e.exit("tableDelimiterMarker"),v):A===45?(a+=1,v(A)):A===null||$e(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?(i=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(A),e.exit("tableDelimiterMarker"),w):(e.exit("tableDelimiterFiller"),w(A))}function w(A){return Ze(A)?ot(e,b,"whitespace")(A):b(A)}function b(A){return A===124?g(A):A===null||$e(A)?!i||r!==a?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||$e(A)?(e.exit("tableRow"),t(A)):Ze(A)?ot(e,S,"whitespace")(A):(e.enter("data"),N(A))}function N(A){return A===null||A===124||yt(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 $tt(e,t){let n=-1,o=!0,r=0,a=[0,0,0,0],i=[0,0,0,0],s=!1,c=0,l,h,u;const p=new Ntt;for(;++n<e.length;){const y=e[n],g=y[1];y[0]==="enter"?g.type==="tableHead"?(s=!1,c!==0&&(oK(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,a=[0,0,0,0],i=[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,i[2]===0&&(a[1]!==0&&(i[0]=i[1],u=Up(p,t,a,r,void 0,u),a=[0,0,0,0]),i[2]=n)):g.type==="tableCellDivider"&&(o?o=!1:(a[1]!==0&&(i[0]=i[1],u=Up(p,t,a,r,void 0,u)),a=i,i=[a[1],n,0,0])):g.type==="tableHead"?(s=!0,c=n):g.type==="tableRow"||g.type==="tableDelimiterRow"?(c=n,a[1]!==0?(i[0]=i[1],u=Up(p,t,a,r,n,u)):i[1]!==0&&(u=Up(p,t,i,r,n,u)),r=0):r&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")&&(i[3]=n)}for(c!==0&&oK(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=Att(t.events,n))}return e}function Up(e,t,n,o,r,a){const i=o===1?"tableHeader":o===2?"tableDelimiter":"tableData",s="tableContent";n[0]!==0&&(a.end=Object.assign({},Eu(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const c=Eu(t.events,n[1]);if(a={type:i,start:Object.assign({},c),end:Object.assign({},c)},e.add(n[1],0,[["enter",a,t]]),n[2]!==0){const l=Eu(t.events,n[2]),h=Eu(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&&(a.end=Object.assign({},Eu(t.events,r)),e.add(r,0,[["exit",a,t]]),a=void 0),a}function oK(e,t,n,o,r){const a=[],i=Eu(t.events,n);r&&(r.end=Object.assign({},i),a.push(["exit",r,t])),o.end=Object.assign({},i),a.push(["exit",o,t]),e.add(n+1,0,a)}function Eu(e,t){const n=e[t],o=n[0]==="enter"?"start":"end";return n[1][o]}const Ptt={name:"tasklistCheck",tokenize:Rtt};function ztt(){return{text:{91:Ptt}}}function Rtt(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"),a)}function a(c){return yt(c)?(e.enter("taskListCheckValueUnchecked"),e.consume(c),e.exit("taskListCheckValueUnchecked"),i):c===88||c===120?(e.enter("taskListCheckValueChecked"),e.consume(c),e.exit("taskListCheckValueChecked"),i):n(c)}function i(c){return c===93?(e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),s):n(c)}function s(c){return $e(c)?t(c):Ze(c)?e.check({tokenize:Ttt},t,n)(c):n(c)}}function Ttt(e,t,n){return ot(e,o,"whitespace");function o(r){return r===null?n(r):t(r)}}function Dtt(e){return Zoe([ltt(),vtt(),Ltt(e),Ett(),ztt()])}const Htt={};function Ott(e){const t=this,n=e||Htt,o=t.data(),r=o.micromarkExtensions||(o.micromarkExtensions=[]),a=o.fromMarkdownExtensions||(o.fromMarkdownExtensions=[]),i=o.toMarkdownExtensions||(o.toMarkdownExtensions=[]);r.push(Dtt(n)),a.push(att()),i.push(itt(n))}let Wp=null,Ftt=0;function qtt(){return Wp||(Wp=V0(()=>import("./mermaid.core-CSskwtFd.js").then(e=>e.ak),__vite__mapDeps([8,9,1])).then(e=>{const t=e;return t.default??t}),Wp)}function rK(){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 aK({code:e,className:t}){const n=m.useRef(null),o=m.useRef(`seeflow-mermaid-${++Ftt}`),[r,a]=m.useState(null),[i,s]=m.useState(()=>rK());return m.useEffect(()=>{if(typeof document>"u")return;const c=()=>s(rK()),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 a(null),qtt().then(async l=>{l.initialize({startOnLoad:!1,theme:i?"dark":"default",securityLevel:"strict",fontFamily:'"Inter", ui-sans-serif, system-ui, sans-serif'});const h=`${o.current}-${i?"d":"l"}`,u=await l.render(h,e);if(c)return;const p=n.current;p&&(p.innerHTML=u.svg)}).catch(l=>{c||a(l instanceof Error?l.message:String(l))}),()=>{c=!0}},[e,i]),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":i?"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 Vtt({flowId:e,node:t,connector:n,adapter:o,onNameChange:r,onDescriptionChange:a,onDetailChange:i,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(()=>tHe()),S=A=>{A.preventDefault(),oHe(C,A.clientX,{onWidth:_,onCommit:nHe})};m.useEffect(()=>{const A=E=>{var W;if(E.key!=="Escape")return;const z=document.activeElement;(W=z==null?void 0:z.getAttribute("data-testid"))!=null&&W.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(Ai,{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(Btt,{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(z0,{name:b,size:16})}):null,f.jsx("div",{className:"sf:min-w-0 sf:flex-1",children:f.jsx(fD,{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(Ktt,{report:c}):null,f.jsx(fD,{nodeId:y.id,value:k,placeholder:"Short description shown on the node body",multiline:!0,ariaLabel:"Description",testIdBase:"detail-panel-description",onSave:a,textClassName:"sf:text-[13px] sf:leading-relaxed sf:text-muted-foreground sf:dark:text-zinc-400"}),f.jsx(fD,{nodeId:y.id,value:x,placeholder:"Long-form notes, context, anything…",multiline:!0,ariaLabel:"Detail",testIdBase:"detail-panel-detail",onSave:i,markdown:!0,textClassName:"sf:text-sm sf:leading-relaxed sf:text-foreground"}),y.type==="html"&&e?f.jsx(Utt,{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(Xtt,{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 fD({nodeId:e,value:t,placeholder:n,multiline:o,ariaLabel:r,testIdBase:a,onSave:i,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(!i)return f.jsx("div",{"data-testid":a,"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(iK,{value:t}):t});const g=()=>{const C=u.current,_=C?o?C.innerText:C.textContent??"":t;i(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":a,"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":`${a}-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(iK,{value:t}):t})})}function Btt({nodeId:e,icon:t,onChange:n}){const[o,r]=m.useState(!1);return f.jsx(yq,{open:o,onOpenChange:r,onPick:a=>{n(e,a),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(z0,{name:t,size:16,"aria-hidden":!0}):f.jsx(oh,{className:"sf:h-4 sf:w-4","aria-hidden":!0})})})}function Utt({adapter:e,nodeId:t,htmlPath:n}){const[o,r]=m.useState({kind:"idle"}),a=typeof(e==null?void 0:e.openFile)=="function",i=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})]}),a||i?f.jsxs("div",{className:"sf:flex sf:flex-wrap sf:items-center sf:gap-2",children:[a?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(uh,{className:"sf:h-3.5 sf:w-3.5"}),"Open in editor"]}):null,i?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(eh,{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 Wtt(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 a=Math.floor(r/60);return a<24?`${a}h ago`:`${Math.floor(a/24)}d ago`}function Gtt(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 Ktt({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(kq,{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: ${Wtt(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:Gtt(r)})]},o))}):null]})}function Ore(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 Ztt(e){if(!m.isValidElement(e))return null;const t=e.props;return!t||typeof t.className!="string"||!t.className.includes("language-mermaid")?null:Ore(t.children)}function iK({value:e}){return f.jsx(CJe,{remarkPlugins:[Ott],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(aK,{code:Ore(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=Ztt(t);return n!==null?f.jsx(aK,{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 Xtt({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(pa,{label:"Source",value:e.source}),f.jsx(pa,{label:"Target",value:e.target}),e.label?f.jsx(pa,{label:"Label",value:e.label}):null,e.style?f.jsx(pa,{label:"Style",value:e.style}):null,e.color?f.jsx(pa,{label:"Color",value:e.color}):null,e.direction?f.jsx(pa,{label:"Direction",value:e.direction}):null,e.url?f.jsx(pa,{label:"URL",value:`${e.method??"GET"} ${e.url}`}):null,e.eventName?f.jsx(pa,{label:"Event",value:e.eventName}):null,e.queueName?f.jsx(pa,{label:"Queue",value:e.queueName}):null]})})}function pa({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 Ytt="https://seeflow.dev/embed",Qtt=(e,t)=>{const n=`${Ytt}/${encodeURIComponent(e)}`;return t?`${n}?theme=${t}`:n},Jtt=e=>{var t,n;return(n=(t=e==null?void 0:e.documentElement)==null?void 0:t.classList)!=null&&n.contains("dark")?"dark":"light"},ent=e=>e.replace(/&/g,"&").replace(/"/g,""").replace(/</g,"<"),tnt=e=>[`<iframe src="${ent(e)}"`,' width="100%"',' height="600"',' style="border:0"',' allow="fullscreen"',' loading="lazy"></iframe>'].join(`
|
|
8543
8543
|
`),nnt="Embed this canvas",ont="Paste this iframe into any page to embed the canvas.",rnt="Copy snippet",ant="Copied!",int="Press ⌘C to copy",snt="Close",cnt="Theme",lnt=1500,dnt=[{value:"match",label:"Match my theme"},{value:"light",label:"Light"},{value:"dark",label:"Dark"}],unt=e=>e==="light"?"light":e==="dark"?"dark":Jtt(typeof document<"u"?document:null);function hnt({open:e,onOpenChange:t,projectId:n}){const[o,r]=m.useState("idle"),[a,i]=m.useState("match"),s=m.useRef(null),c=m.useMemo(()=>tnt(Qtt(n,unt(a))),[n,a]),l=m.useCallback(async()=>{try{await navigator.clipboard.writeText(c),r("copied"),setTimeout(()=>r("idle"),lnt)}catch{r("fallback");const h=s.current;h&&(h.focus(),h.select())}},[c]);return f.jsx(ir,{open:e,onOpenChange:t,children:f.jsxs(Xr,{"data-testid":"embed-dialog-content",children:[f.jsxs(Yr,{children:[f.jsx(Qr,{children:nnt}),f.jsx(Jr,{children:ont})]}),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:cnt}),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:dnt.map(h=>{const u=a===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:()=>i(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:int}):null,f.jsxs(sr,{children:[f.jsx(rt,{variant:"outline","data-testid":"embed-dialog-close",onClick:()=>t(!1),children:snt}),f.jsx(rt,{"data-testid":"embed-dialog-copy",onClick:l,children:o==="copied"?ant:rnt})]})]})})}const sK="Share / download",fnt="Download PDF",pnt="Download PNG",ynt="Embed",mnt="Export to seeflow.dev";function Fre({mode:e,projectId:t,enableEmbed:n,onDownloadPdf:o,onDownloadPng:r,onExportToCloud:a,embedOpen:i,onEmbedOpenChange:s}){const[c,l]=m.useState(!1),[h,u]=m.useState(!1),[p,y]=m.useState(!1),g=i!==void 0,k=g?i: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"&&!!a;return!w&&!b&&!C&&!_?null:f.jsxs(f.Fragment,{children:[f.jsxs(ooe,{children:[f.jsx(roe,{asChild:!0,children:f.jsx("button",{type:"button","data-testid":"share-menu-trigger","aria-label":sK,title:sK,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(gh,{className:"sf:h-4 sf:w-4","aria-hidden":"true"})})}),f.jsxs(Eq,{align:"end","data-testid":"share-menu-content",onCloseAutoFocus:S=>{S.preventDefault()},children:[w?f.jsxs(R2,{"data-testid":"share-menu-pdf",disabled:c,onSelect:S=>{S.preventDefault(),v()},children:[c?f.jsx(Fn,{className:"sf:h-4 sf:w-4 sf:animate-spin","aria-hidden":"true"}):f.jsx(J2,{className:"sf:h-4 sf:w-4","aria-hidden":"true"}),f.jsx("span",{children:fnt})]}):null,b?f.jsxs(R2,{"data-testid":"share-menu-png",disabled:h,onSelect:S=>{S.preventDefault(),M()},children:[h?f.jsx(Fn,{className:"sf:h-4 sf:w-4 sf:animate-spin","aria-hidden":"true"}):f.jsx(rh,{className:"sf:h-4 sf:w-4","aria-hidden":"true"}),f.jsx("span",{children:pnt})]}):null,C?f.jsxs(R2,{"data-testid":"share-menu-embed",onSelect:S=>{S.preventDefault(),x(!0)},children:[f.jsx(t0,{className:"sf:h-4 sf:w-4","aria-hidden":"true"}),f.jsx("span",{children:ynt})]}):null,_?f.jsxs(R2,{"data-testid":"share-menu-export-cloud",onSelect:()=>{a==null||a()},children:[f.jsx(xh,{className:"sf:h-4 sf:w-4","aria-hidden":"true"}),f.jsx("span",{children:mnt})]}):null]})]}),C&&t?f.jsx(hnt,{open:k,onOpenChange:x,projectId:t}):null]})}const gnt=8;function knt(e){let t=Number.POSITIVE_INFINITY,n=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY,r=Number.NEGATIVE_INFINITY,a=!1;for(const i of e){const s=i.data.width,c=i.data.height;s===void 0||c===void 0||(a=!0,i.position.x<t&&(t=i.position.x),i.position.y<n&&(n=i.position.y),i.position.x+s>o&&(o=i.position.x+s),i.position.y+c>r&&(r=i.position.y+c))}return a?{x:t,y:n,width:o-t,height:r-n}:null}function vnt(e){return e.length>=2}function xnt({selectedNodes:e,onMultiResize:t,paddingPx:n=gnt}){aR();const[o,r]=m.useState(null),[a,i]=m.useState(null);if(m.useRef(!1),m.useRef(null),!vnt(e))return null;const s=knt(e);if(!s)return null;const c=a??s;return c.x-n,c.y-n,c.width+n*2,c.height+n*2,null}const cK=22,lK=11,dK=3,uK=2,pD=8,yD=1,hK=["none","white","slate","gray","red","orange","amber","yellow","lime","green","teal","cyan","sky","blue","indigo","violet","fuchsia","pink"],Gp=[{value:"solid",icon:kz,label:"Solid",testId:"style-tab-border-style-solid"},{value:"dashed",icon:goe,label:"Dashed",testId:"style-tab-border-style-dashed"},{value:"dotted",icon:koe,label:"Dotted",testId:"style-tab-border-style-dotted"}],fK=[{value:"solid",icon:kz,label:"Solid",testId:"style-tab-edge-style-solid"},{value:"dashed",icon:goe,label:"Dashed",testId:"style-tab-edge-style-dashed"},{value:"dotted",icon:koe,label:"Dotted",testId:"style-tab-edge-style-dotted"}],pK=[{value:"curve",icon:voe,label:"Curve",testId:"style-tab-edge-path-curve"},{value:"step",icon:jKe,label:"Zigzag",testId:"style-tab-edge-path-step"}],wnt="center",Mnt=[{value:"left",icon:Bo,label:"Left",testId:"style-tab-text-align-left"},{value:"center",icon:ui,label:"Center",testId:"style-tab-text-align-center"},{value:"right",icon:hi,label:"Right",testId:"style-tab-text-align-right"}],yK=[{value:"none",icon:ih,label:"None",testId:"style-tab-direction-none"},{value:"backward",icon:ch,label:"Backward",testId:"style-tab-direction-backward"},{value:"forward",icon:Ju,label:"Forward",testId:"style-tab-direction-forward"},{value:"both",icon:W2,label:"Both",testId:"style-tab-direction-both"}];function bnt({nodes:e,connectors:t,onStyleNode:n,onStyleNodePreview:o,onStyleNodes:r,onStyleNodesPreview:a,onStyleConnector:i,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(se=>se.type!=="icon"),x=k[0],v=u&&e.every(se=>se.type==="icon"),M=v?e.find(se=>se.type==="icon"):void 0,w=u&&e.every(se=>se.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=se=>{if(e.length>1&&r)r(e.map(Q=>Q.id),{borderColor:se,backgroundColor:se});else for(const Q of e)n(Q.id,{borderColor:se,backgroundColor:se});for(const Q of t)i(Q.id,{color:se})},E=se=>{for(const Q of e)n(Q.id,{borderStyle:se});for(const Q of t)i(Q.id,{style:se})},z=se=>{for(const Q of e)n(Q.id,{borderSize:se});for(const Q of t)i(Q.id,{borderSize:se})},W=se=>{for(const Q of e)o==null||o(Q.id,{borderSize:se});for(const Q of t)s==null||s(Q.id,{borderSize:se})},$=se=>{if(e.length>1&&r)r(e.map(Q=>Q.id),{fontSize:se});else for(const Q of e)n(Q.id,{fontSize:se})},T=se=>{if(e.length>1&&a)a(e.map(Q=>Q.id),{fontSize:se});else for(const Q of e)o==null||o(Q.id,{fontSize:se})},D=k.length>1&&new Set(k.map(se=>se.data.fontSize??cK)).size>1,O=se=>{if(e.length>1&&r)r(e.map(Q=>Q.id),{textAlign:se});else for(const Q of e)n(Q.id,{textAlign:se})},I=(x==null?void 0:x.data.textAlign)??wnt,R=se=>{for(const Q of t)i(Q.id,{fontSize:se})},L=se=>{for(const Q of t)s==null||s(Q.id,{fontSize:se})},V=t.length>1&&new Set(t.map(se=>se.fontSize??lK)).size>1,H=se=>{for(const Q of e)n(Q.id,{cornerRadius:se})},j=se=>{for(const Q of e)o==null||o(Q.id,{cornerRadius:se})},K=k.length>1&&new Set(k.map(se=>se.data.cornerRadius??pD)).size>1,X=se=>{for(const Q of e)n(Q.id,{shadow:se})},J=se=>{for(const Q of e)o==null||o(Q.id,{shadow:se})},re=k.length>1&&new Set(k.map(se=>se.data.shadow??yD)).size>1,oe=se=>{for(const Q of t)i(Q.id,{path:se})},ne=se=>{for(const Q of t)i(Q.id,{direction:se})},ce=se=>{for(const Q of e)n(Q.id,{color:se})},ve=(M==null?void 0:M.data.color)??"default",ge=p?(g==null?void 0:g.borderSize)??uK:(x==null?void 0:x.data.borderSize)??dK,xe=p?uK:dK,Re=p?"edge":"border",Ye=p?"Connector color":"Color",le=p?"connector color":"color",Ie="style-tab-color-trigger",jt="style-tab-color";if(v){const se=!!c&&e.length===1&&!!M,Q=()=>{M&&c&&c(M.id)};return f.jsx(d0,{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(Cnt,{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:ce}),se?f.jsxs(Q0,{children:[f.jsx(J0,{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(o0,{className:"sf:h-4 sf:w-4"})})}),f.jsx(Yd,{side:"right",className:"sf:px-2 sf:py-1 sf:text-xs",children:"Change icon"})]}):null]})})}if(w){const se=e[0],Q=(se==null?void 0:se.data.borderColor)??"default",$t=(se==null?void 0:se.data.borderStyle)??"solid",hn=(se==null?void 0:se.data.borderWidth)??1,ae=ke=>{for(const Le of e)n(Le.id,{borderColor:ke})},Y=ke=>{for(const Le of e)n(Le.id,{borderStyle:ke})},he=ke=>{for(const Le of e)n(Le.id,{borderWidth:ke})},Ae=ke=>{for(const Le of e)o==null||o(Le.id,{borderWidth:ke})},De=ke=>{for(const Le of e)n(Le.id,{cornerRadius:ke})},Ke=ke=>{for(const Le of e)o==null||o(Le.id,{cornerRadius:ke})},Ft=ke=>{for(const Le of e)n(Le.id,{shadow:ke})},fn=ke=>{for(const Le of e)o==null||o(Le.id,{shadow:ke})},Jt=()=>{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:bz(Q),children:ke?f.jsx(_z,{}):null})};return f.jsx(d0,{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:Jt,children:f.jsx(bO,{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(n0,{className:"sf:h-4 sf:w-4"}),children:f.jsx("div",{"data-testid":"style-strip-image-corner-radius",children:f.jsx(ds,{value:se==null?void 0:se.data.cornerRadius,defaultValue:pD,min:0,max:32,suffix:"px",onPreview:Ke,onCommit:De,testId:"style-tab-image-corner-radius-slider"})})}),f.jsx(_o,{testId:"style-strip-image-shadow-button",tooltip:"Shadow",ariaLabel:"image shadow",renderIcon:()=>f.jsx(ka,{className:"sf:h-4 sf:w-4"}),children:f.jsx("div",{"data-testid":"style-strip-image-shadow",children:f.jsx(ds,{value:se==null?void 0:se.data.shadow,defaultValue:yD,min:0,max:5,onPreview:fn,onCommit:Ft,testId:"style-tab-image-shadow-slider"})})}),f.jsx(_o,{testId:"style-strip-image-border-style",tooltip:"Border style",ariaLabel:"image border style",renderIcon:()=>{var Le;const ke=((Le=Gp.find(Ht=>Ht.value===$t))==null?void 0:Le.icon)??kz;return f.jsx(ke,{className:"sf:h-4 sf:w-4"})},children:f.jsx(bu,{ariaLabel:"Border style",value:$t,onChange:Y,options:Gp})}),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:hn}),children:f.jsx(ds,{value:se==null?void 0:se.data.borderWidth,defaultValue:1,min:0,max:8,suffix:"px",onPreview:Ae,onCommit:he,testId:"style-tab-image-border-width-slider"})})]})})}const xt=!b,Qt=()=>{const se=C==="none";return f.jsx("span",{className:te("sf:relative sf:h-5 sf:w-5 sf:rounded-full",se&&"sf:bg-card"),style:se?void 0:bz(C),children:se?f.jsx(_z,{}):null})};return f.jsx(d0,{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:le,renderIcon:Qt,children:f.jsx(bO,{testId:"style-strip-color",activeToken:C,previewKind:Re,tokenTestIdPrefix:jt,innerTestId:Ie,ariaLabel:le,allowNone:!p,onSelect:A})}),l?f.jsx(_o,{testId:"style-strip-corner-radius-button",tooltip:"Corners",ariaLabel:"corners",renderIcon:()=>f.jsx(n0,{className:"sf:h-4 sf:w-4"}),children:f.jsx("div",{"data-testid":"style-strip-corner-radius",children:f.jsx(ds,{value:x==null?void 0:x.data.cornerRadius,defaultValue:pD,min:0,max:32,suffix:"px",indeterminate:K,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(ka,{className:"sf:h-4 sf:w-4"}),children:f.jsx("div",{"data-testid":"style-strip-shadow",children:f.jsx(ds,{value:x==null?void 0:x.data.shadow,defaultValue:yD,min:0,max:5,indeterminate:re,onPreview:J,onCommit:X,testId:"style-tab-shadow-slider"})})}):null,xt?f.jsx(_o,{testId:"style-strip-border",tooltip:p?"Connector":"Border",ariaLabel:p?"connector":"border",renderIcon:()=>{var Q,$t;const se=(p?(Q=fK.find(hn=>hn.value===S))==null?void 0:Q.icon:($t=Gp.find(hn=>hn.value===_))==null?void 0:$t.icon)??kz;return f.jsx(se,{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(Kp,{label:"Style",testId:"style-strip-border-style",children:p?f.jsx(bu,{ariaLabel:"Connector style",value:S,onChange:se=>E(se),options:fK}):f.jsx(bu,{ariaLabel:"Border style",value:_,onChange:se=>E(se),options:Gp})}),f.jsx(Kp,{label:"Width",testId:"style-strip-border-size",children:f.jsx(ds,{value:ge,defaultValue:xe,min:0,max:8,suffix:"px",onPreview:W,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(r0,{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(Kp,{label:"Size",testId:p?"style-strip-connector-font-size":"style-strip-font-size",children:f.jsx(ds,{value:p?g==null?void 0:g.fontSize:x==null?void 0:x.data.fontSize,defaultValue:p?lK:cK,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(Kp,{label:"Align",testId:"style-strip-text-align",children:f.jsx(bu,{ariaLabel:"Text alignment",value:I,onChange:O,options:Mnt})}):null]})}):null,p?f.jsx(_o,{testId:"style-strip-path",tooltip:"Connector path",ariaLabel:"connector path",renderIcon:()=>{var Q;const se=((Q=pK.find($t=>$t.value===P))==null?void 0:Q.icon)??voe;return f.jsx(se,{className:"sf:h-4 sf:w-4"})},children:f.jsx(bu,{ariaLabel:"Connector path",value:P,onChange:oe,options:pK})}):null,p?f.jsx(_o,{testId:"style-strip-direction",tooltip:"Direction",ariaLabel:"direction",renderIcon:()=>{var Q;const se=((Q=yK.find($t=>$t.value===N))==null?void 0:Q.icon)??Ju;return f.jsx(se,{className:"sf:h-4 sf:w-4"})},children:f.jsx(bu,{ariaLabel:"Connector direction",value:N,onChange:ne,options:yK})}):null]})})}function bz(e){return e==="default"?{backgroundColor:"hsl(var(--card))"}:{backgroundColor:fle[e].edge}}function _z(){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 _nt({token:e,isActive:t,onClick:n,testId:o,ariaLabel:r}){const a=e==="none",i=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",a&&"sf:border sf:border-border sf:bg-card",i&&"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:a?void 0:bz(e),children:[a?f.jsx(_z,{}):null,t&&!a?f.jsx(Ni,{className:"sf:h-2.5 sf:w-2.5 sf:drop-shadow-sm",style:{color:i?"hsl(0, 0%, 30%)":"hsl(var(--foreground))"}}):null]})}function Cnt({testId:e,tooltip:t,ariaLabel:n,activeToken:o,previewKind:r,tokenTestIdPrefix:a,innerTestId:i,allowNone:s,onSelect:c}){const[l,h]=m.useState(!1),u=o==="none";return f.jsxs(Bd,{open:l,onOpenChange:h,children:[f.jsxs(Q0,{children:[f.jsx(J0,{asChild:!0,children:f.jsx(X0,{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":i,className:te("sf:relative sf:h-5 sf:w-5 sf:rounded-full",u&&"sf:bg-card"),style:u?void 0:bz(o),children:u?f.jsx(_z,{}):null})})})}),f.jsx(Yd,{side:"right",className:"sf:px-2 sf:py-1 sf:text-xs",children:t})]}),f.jsx(Gi,{side:"right",align:"start",className:"sf:w-auto sf:p-1.5","data-testid":`${i}-popover`,children:f.jsx(bO,{testId:`${a}-grid`,activeToken:o,previewKind:r,tokenTestIdPrefix:a,innerTestId:i,ariaLabel:n,allowNone:s,onSelect:p=>{c(p),h(!1)}})})]})}function bO({testId:e,activeToken:t,previewKind:n,tokenTestIdPrefix:o,innerTestId:r,ariaLabel:a,allowNone:i,onSelect:s}){const c=i===!1?hK.filter(l=>l!=="none"):hK;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(_nt,{token:l,isActive:t===l,onClick:()=>s(l),testId:`${o}-${l}`,ariaLabel:`${a} ${l}`},l))})}function Kp({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[a,i]=m.useState(!1);return f.jsxs(Bd,{open:a,onOpenChange:i,children:[f.jsxs(Q0,{children:[f.jsx(J0,{asChild:!0,children:f.jsx(X0,{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(Yd,{side:"right",className:"sf:px-2 sf:py-1 sf:text-xs",children:t})]}),f.jsx(Gi,{side:"right",align:"start",className:"sf:w-auto sf:p-3",children:r})]})}function ds({value:e,defaultValue:t,min:n,max:o,suffix:r,indeterminate:a,onPreview:i,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=a&&!p;return f.jsxs("div",{className:"sf:flex sf:w-48 sf:items-center sf:gap-3",children:[f.jsx(ZF,{min:n,max:o,step:1,value:[h],onValueChange:([k])=>{const x=k??n;u(x),y(!0),i==null||i(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]})})]})}function Snt(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 Lnt=(()=>{let e=0;const t=()=>`0000${(Math.random()*36**4<<0).toString(36)}`.slice(-4);return()=>(e+=1,`u${t()}${e}`)})();function $i(e){const t=[];for(let n=0,o=e.length;n<o;n++)t.push(e[n]);return t}let Cu=null;function qre(e={}){return Cu||(e.includeStyleProperties?(Cu=e.includeStyleProperties,Cu):(Cu=$i(window.getComputedStyle(document.documentElement)),Cu))}function Cz(e,t){const o=(e.ownerDocument.defaultView||window).getComputedStyle(e).getPropertyValue(t);return o?parseFloat(o.replace("px","")):0}function Nnt(e){const t=Cz(e,"border-left-width"),n=Cz(e,"border-right-width");return e.clientWidth+t+n}function Int(e){const t=Cz(e,"border-top-width"),n=Cz(e,"border-bottom-width");return e.clientHeight+t+n}function Vre(e,t={}){const n=t.width||Nnt(e),o=t.height||Int(e);return{width:n,height:o}}function Ant(){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 eo=16384;function Ent(e){(e.width>eo||e.height>eo)&&(e.width>eo&&e.height>eo?e.width>e.height?(e.height*=eo/e.width,e.width=eo):(e.width*=eo/e.height,e.height=eo):e.width>eo?(e.height*=eo/e.width,e.width=eo):(e.width*=eo/e.height,e.height=eo))}function Sz(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 jnt(e){return Promise.resolve().then(()=>new XMLSerializer().serializeToString(e)).then(encodeURIComponent).then(t=>`data:image/svg+xml;charset=utf-8,${t}`)}async function $nt(e,t,n){const o="http://www.w3.org/2000/svg",r=document.createElementNS(o,"svg"),a=document.createElementNS(o,"foreignObject");return r.setAttribute("width",`${t}`),r.setAttribute("height",`${n}`),r.setAttribute("viewBox",`0 0 ${t} ${n}`),a.setAttribute("width","100%"),a.setAttribute("height","100%"),a.setAttribute("x","0"),a.setAttribute("y","0"),a.setAttribute("externalResourcesRequired","true"),r.appendChild(a),a.appendChild(e),jnt(r)}const Gn=(e,t)=>{if(e instanceof t)return!0;const n=Object.getPrototypeOf(e);return n===null?!1:n.constructor.name===t.name||Gn(n,t)};function Pnt(e){const t=e.getPropertyValue("content");return`${e.cssText} content: '${t.replace(/'|"/g,"")}';`}function znt(e,t){return qre(t).map(n=>{const o=e.getPropertyValue(n),r=e.getPropertyPriority(n);return`${n}: ${o}${r?" !important":""};`}).join(" ")}function Rnt(e,t,n,o){const r=`.${e}:${t}`,a=n.cssText?Pnt(n):znt(n,o);return document.createTextNode(`${r}{${a}}`)}function mK(e,t,n,o){const r=window.getComputedStyle(e,n),a=r.getPropertyValue("content");if(a===""||a==="none")return;const i=Lnt();try{t.className=`${t.className} ${i}`}catch{return}const s=document.createElement("style");s.appendChild(Rnt(i,n,r,o)),t.appendChild(s)}function Tnt(e,t,n){mK(e,t,":before",n),mK(e,t,":after",n)}const gK="application/font-woff",kK="image/jpeg",Dnt={woff:gK,woff2:gK,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:kK,jpeg:kK,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml",webp:"image/webp"};function Hnt(e){const t=/\.([^./]*?)$/g.exec(e);return t?t[1]:""}function eV(e){const t=Hnt(e).toLowerCase();return Dnt[t]||""}function Ont(e){return e.split(/,/)[1]}function _O(e){return e.search(/^(data:)/)!==-1}function Fnt(e,t){return`data:${t};base64,${e}`}async function Bre(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((a,i)=>{const s=new FileReader;s.onerror=i,s.onloadend=()=>{try{a(n({res:o,result:s.result}))}catch(c){i(c)}},s.readAsDataURL(r)})}const mD={};function qnt(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 tV(e,t,n){const o=qnt(e,t,n.includeQueryParams);if(mD[o]!=null)return mD[o];n.cacheBust&&(e+=(/\?/.test(e)?"&":"?")+new Date().getTime());let r;try{const a=await Bre(e,n.fetchRequestInit,({res:i,result:s})=>(t||(t=i.headers.get("Content-Type")||""),Ont(s)));r=Fnt(a,t)}catch(a){r=n.imagePlaceholder||"";let i=`Failed to fetch resource: ${e}`;a&&(i=typeof a=="string"?a:a.message),i&&console.warn(i)}return mD[o]=r,r}async function Vnt(e){const t=e.toDataURL();return t==="data:,"?e.cloneNode(!1):Sz(t)}async function Bnt(e,t){if(e.currentSrc){const a=document.createElement("canvas"),i=a.getContext("2d");a.width=e.clientWidth,a.height=e.clientHeight,i==null||i.drawImage(e,0,0,a.width,a.height);const s=a.toDataURL();return Sz(s)}const n=e.poster,o=eV(n),r=await tV(n,o,t);return Sz(r)}async function Unt(e,t){var n;try{if(!((n=e==null?void 0:e.contentDocument)===null||n===void 0)&&n.body)return await TR(e.contentDocument.body,t,!0)}catch{}return e.cloneNode(!1)}async function Wnt(e,t){return Gn(e,HTMLCanvasElement)?Vnt(e):Gn(e,HTMLVideoElement)?Bnt(e,t):Gn(e,HTMLIFrameElement)?Unt(e,t):e.cloneNode(Ure(e))}const Gnt=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SLOT",Ure=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SVG";async function Knt(e,t,n){var o,r;if(Ure(t))return t;let a=[];return Gnt(e)&&e.assignedNodes?a=$i(e.assignedNodes()):Gn(e,HTMLIFrameElement)&&(!((o=e.contentDocument)===null||o===void 0)&&o.body)?a=$i(e.contentDocument.body.childNodes):a=$i(((r=e.shadowRoot)!==null&&r!==void 0?r:e).childNodes),a.length===0||Gn(e,HTMLVideoElement)||await a.reduce((i,s)=>i.then(()=>TR(s,n)).then(c=>{c&&t.appendChild(c)}),Promise.resolve()),t}function Znt(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):qre(n).forEach(a=>{let i=r.getPropertyValue(a);a==="font-size"&&i.endsWith("px")&&(i=`${Math.floor(parseFloat(i.substring(0,i.length-2)))-.1}px`),Gn(e,HTMLIFrameElement)&&a==="display"&&i==="inline"&&(i="block"),a==="d"&&t.getAttribute("d")&&(i=`path(${t.getAttribute("d")})`),o.setProperty(a,i,r.getPropertyPriority(a))})}function Xnt(e,t){Gn(e,HTMLTextAreaElement)&&(t.innerHTML=e.value),Gn(e,HTMLInputElement)&&t.setAttribute("value",e.value)}function Ynt(e,t){if(Gn(e,HTMLSelectElement)){const n=t,o=Array.from(n.children).find(r=>e.value===r.getAttribute("value"));o&&o.setAttribute("selected","")}}function Qnt(e,t,n){return Gn(t,Element)&&(Znt(e,t,n),Tnt(e,t,n),Xnt(e,t),Ynt(e,t)),t}async function Jnt(e,t){const n=e.querySelectorAll?e.querySelectorAll("use"):[];if(n.length===0)return e;const o={};for(let a=0;a<n.length;a++){const s=n[a].getAttribute("xlink:href");if(s){const c=e.querySelector(s),l=document.querySelector(s);!c&&l&&!o[s]&&(o[s]=await TR(l,t,!0))}}const r=Object.values(o);if(r.length){const a="http://www.w3.org/1999/xhtml",i=document.createElementNS(a,"svg");i.setAttribute("xmlns",a),i.style.position="absolute",i.style.width="0",i.style.height="0",i.style.overflow="hidden",i.style.display="none";const s=document.createElementNS(a,"defs");i.appendChild(s);for(let c=0;c<r.length;c++)s.appendChild(r[c]);e.appendChild(i)}return e}async function TR(e,t,n){return!n&&t.filter&&!t.filter(e)?null:Promise.resolve(e).then(o=>Wnt(o,t)).then(o=>Knt(e,o,t)).then(o=>Qnt(e,o,t)).then(o=>Jnt(o,t))}const Wre=/url\((['"]?)([^'"]+?)\1\)/g,eot=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,tot=/src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;function not(e){const t=e.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1");return new RegExp(`(url\\(['"]?)(${t})(['"]?\\))`,"g")}function oot(e){const t=[];return e.replace(Wre,(n,o,r)=>(t.push(r),n)),t.filter(n=>!_O(n))}async function rot(e,t,n,o,r){try{const a=n?Snt(t,n):t,i=eV(t);let s;return r||(s=await tV(a,i,o)),e.replace(not(t),`$1${s}$3`)}catch{}return e}function aot(e,{preferredFontFormat:t}){return t?e.replace(tot,n=>{for(;;){const[o,,r]=eot.exec(n)||[];if(!r)return"";if(r===t)return`src: ${o};`}}):e}function Gre(e){return e.search(Wre)!==-1}async function Kre(e,t,n){if(!Gre(e))return e;const o=aot(e,n);return oot(o).reduce((a,i)=>a.then(s=>rot(s,i,t,n)),Promise.resolve(o))}async function Su(e,t,n){var o;const r=(o=t.style)===null||o===void 0?void 0:o.getPropertyValue(e);if(r){const a=await Kre(r,null,n);return t.style.setProperty(e,a,t.style.getPropertyPriority(e)),!0}return!1}async function iot(e,t){await Su("background",e,t)||await Su("background-image",e,t),await Su("mask",e,t)||await Su("-webkit-mask",e,t)||await Su("mask-image",e,t)||await Su("-webkit-mask-image",e,t)}async function sot(e,t){const n=Gn(e,HTMLImageElement);if(!(n&&!_O(e.src))&&!(Gn(e,SVGImageElement)&&!_O(e.href.baseVal)))return;const o=n?e.src:e.href.baseVal,r=await tV(o,eV(o),t);await new Promise((a,i)=>{e.onload=a,e.onerror=t.onImageErrorHandler?(...c)=>{try{a(t.onImageErrorHandler(...c))}catch(l){i(l)}}:i;const s=e;s.decode&&(s.decode=a),s.loading==="lazy"&&(s.loading="eager"),n?(e.srcset="",e.src=r):e.href.baseVal=r})}async function cot(e,t){const o=$i(e.childNodes).map(r=>Zre(r,t));await Promise.all(o).then(()=>e)}async function Zre(e,t){Gn(e,Element)&&(await iot(e,t),await sot(e,t),await cot(e,t))}function lot(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 vK={};async function xK(e){let t=vK[e];if(t!=null)return t;const o=await(await fetch(e)).text();return t={url:e,cssText:o},vK[e]=t,t}async function wK(e,t){let n=e.cssText;const o=/url\(["']?([^"')]+)["']?\)/g,a=(n.match(/url\([^)]+\)/g)||[]).map(async i=>{let s=i.replace(o,"$1");return s.startsWith("https://")||(s=new URL(s,e.url).href),Bre(s,t.fetchRequestInit,({result:c})=>(n=n.replace(i,`url(${c})`),[i,c]))});return Promise.all(a).then(()=>n)}function MK(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 a=/@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi,i="((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})",s=new RegExp(i,"gi");for(;;){let c=a.exec(o);if(c===null){if(c=s.exec(o),c===null)break;a.lastIndex=s.lastIndex}else s.lastIndex=a.lastIndex;t.push(c[0])}return t}async function dot(e,t){const n=[],o=[];return e.forEach(r=>{if("cssRules"in r)try{$i(r.cssRules||[]).forEach((a,i)=>{if(a.type===CSSRule.IMPORT_RULE){let s=i+1;const c=a.href,l=xK(c).then(h=>wK(h,t)).then(h=>MK(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(a){const i=e.find(s=>s.href==null)||document.styleSheets[0];r.href!=null&&o.push(xK(r.href).then(s=>wK(s,t)).then(s=>MK(s).forEach(c=>{i.insertRule(c,i.cssRules.length)})).catch(s=>{console.error("Error loading remote stylesheet",s)})),console.error("Error inlining remote css file",a)}}),Promise.all(o).then(()=>(e.forEach(r=>{if("cssRules"in r)try{$i(r.cssRules||[]).forEach(a=>{n.push(a)})}catch(a){console.error(`Error while reading CSS rules from ${r.href}`,a)}}),n))}function uot(e){return e.filter(t=>t.type===CSSRule.FONT_FACE_RULE).filter(t=>Gre(t.style.getPropertyValue("src")))}async function hot(e,t){if(e.ownerDocument==null)throw new Error("Provided element is not within a Document");const n=$i(e.ownerDocument.styleSheets),o=await dot(n,t);return uot(o)}function Xre(e){return e.trim().replace(/["']/g,"")}function fot(e){const t=new Set;function n(o){(o.style.fontFamily||getComputedStyle(o).fontFamily).split(",").forEach(a=>{t.add(Xre(a))}),Array.from(o.children).forEach(a=>{a instanceof HTMLElement&&n(a)})}return n(e),t}async function pot(e,t){const n=await hot(e,t),o=fot(e);return(await Promise.all(n.filter(a=>o.has(Xre(a.style.fontFamily))).map(a=>{const i=a.parentStyleSheet?a.parentStyleSheet.href:null;return Kre(a.cssText,i,t)}))).join(`
|
|
8544
|
-
`)}async function yot(e,t){const n=t.fontEmbedCSS!=null?t.fontEmbedCSS:t.skipFonts?null:await pot(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 mot(e,t={}){const{width:n,height:o}=Vre(e,t),r=await TR(e,t,!0);return await yot(r,t),await Zre(r,t),lot(r,t),await $nt(r,n,o)}async function got(e,t={}){const{width:n,height:o}=Vre(e,t),r=await mot(e,t),a=await Sz(r),i=document.createElement("canvas"),s=i.getContext("2d"),c=t.pixelRatio||Ant(),l=t.canvasWidth||n,h=t.canvasHeight||o;return i.width=l*c,i.height=h*c,t.skipAutoScale||Ent(i),i.style.width=`${l}`,i.style.height=`${h}`,t.backgroundColor&&(s.fillStyle=t.backgroundColor,s.fillRect(0,0,i.width,i.height)),s.drawImage(a,0,0,i.width,i.height),i}async function kot(e,t={}){return(await got(e,t)).toDataURL()}const vot=e=>e instanceof Element?!(e.classList.contains("react-flow__minimap")||e.classList.contains("react-flow__controls")||e.classList.contains("react-flow__panel")):!0,xot=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"},wot=async e=>{const t=await kot(e,{cacheBust:!0,filter:vot,backgroundColor:xot(e)}),n=await new Promise((o,r)=>{const a=new Image;a.onload=()=>o({width:a.naturalWidth,height:a.naturalHeight}),a.onerror=()=>r(new Error("Failed to decode captured image")),a.src=t});return{dataUrl:t,...n}},Mot=(e,t)=>{const n=document.createElement("a");n.href=e,n.download=t,n.rel="noopener",document.body.appendChild(n),n.click(),n.remove()},bot=e=>{const t=e.replace(/[^A-Za-z0-9_-]+/g,"-").replace(/^-+|-+$/g,"");return t.length>0?t.slice(0,80):"canvas"},bK=(e,t)=>`${bot(e??"canvas")}.${t}`,_ot=({projectId:e,getReactFlow:t})=>{const[n,o]=m.useState(null),r=m.useCallback(()=>o(null),[]),a=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 wot(h)}finally{l.setViewport(u,{duration:0})}},[t]),i=m.useCallback(async()=>{o(null);try{const l=await a();if(!l)return;Mot(l.dataUrl,bK(e,"png"))}catch(l){o(l instanceof Error?l.message:String(l))}},[a,e]),s=m.useCallback(async()=>{o(null);try{const l=await a();if(!l)return;const{jsPDF:h}=await V0(async()=>{const{jsPDF:y}=await import("./jspdf.es.min-CP3g_qxA.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(bK(e,"pdf"))}catch(l){o(l instanceof Error?l.message:String(l))}},[a,e]),c=m.useCallback(async()=>{const l=await a();return l==null?void 0:l.dataUrl},[a]);return{exportPdf:s,exportPng:i,capturePreview:c,lastError:n,clearError:r}},Cot=12,Sot=1200;function Lot(e,t={}){const n=t.idleMs??Sot;let o,r=null,a=null;const i=typeof requestAnimationFrame<"u",s=()=>{o!==void 0&&(clearTimeout(o),o=void 0)},c=()=>{a!==null&&typeof cancelAnimationFrame<"u"&&cancelAnimationFrame(a),a=null},l=()=>{if(a=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},!i){l();return}a===null&&(a=requestAnimationFrame(l))},onLeave:()=>{c(),r=null,s(),e.dataset.active="false"},dispose:()=>{c(),r=null,s()}}}function Not(){const e=m.useRef(null),t=Te(i=>i.transform,(i,s)=>i[0]===s[0]&&i[1]===s[1]&&i[2]===s[2]),[n,o,r]=t,a=Cot*r;return m.useEffect(()=>{var u;const i=e.current;if(!i)return;const s=(u=i.parentElement)==null?void 0:u.querySelector(".react-flow__pane");if(!s)return;const{onMove:c,onLeave:l,dispose:h}=Lot(i);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:`${a}px ${a}px`}})}const Iot="Hide inspector",Aot="Open inspector";function Eot({open:e,onToggle:t}){const n=e?lh:dh,o=e?Iot:Aot;return f.jsx(d0,{delayDuration:300,children:f.jsxs(Q0,{children:[f.jsx(J0,{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(Yd,{children:o})]})})}const jot={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},$ot={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},Pot={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};function zot(e){const t=e.mode==="edit"?jot:e.mode==="mini"?Pot:$ot;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}}const _K=40,CK=4,S2={padding:.15,duration:300,includeHiddenNodes:!1};function Rot(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 SK=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},Tot=(e,t)=>{var o;const n=document.elementsFromPoint(e,t);for(const r of n){const a=(o=r.closest)==null?void 0:o.call(r,".react-flow__node");if(a)return a}return null},Yre=15,gD=(e,t,n)=>{const o=Tot(t,n);if(o)return o;if(!e)return null;let r=null,a=Yre;const i=e.querySelectorAll(".react-flow__node");for(const s of i){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<=a&&(r=s,a=u)}return r};function LK(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 i=e==="source"?n:t,s=e==="source"?t:n,c=r(i),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,YP(g,k))}function Dot(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 Hot=(e,t)=>{if(!t)return e;const n=t.data?{...e.data,...t.data}:e.data;return{...e,...t,data:n}},Oot=(e,t)=>t?{...e,...t}:e,Fot={rectangle:YUe,ellipse:kr,sticky:kr,text:kr,database:kr,server:kr,user:kr,queue:kr,cloud:kr,diamond:kr,hexagon:kr,image:FUe,icon:mHe,html:RUe,component:rUe,linkflow:UUe},qot={editableEdge:eWe},Vot={zIndex:0},Bot={hideAttribution:!0},Uot=8,NK=(e,t)=>e?typeof e=="string"?`url('#${e}')`:`url('#${`${t?`${t}__`:""}${Object.keys(e).sort().map(r=>`${r}=${e[r]}`).join("&")}`}')`:void 0,Wot=e=>function({fromX:n,fromY:o,toX:r,toY:a,fromPosition:i,toPosition:s,connectionLineStyle:c}){const l=Te(V=>e.current?V.edges.find(H=>H.reconnectable===!0)??null:null),h=l==null?void 0:l.data,u=Te(V=>{var j;const H=V.connection;return((j=H==null?void 0:H.fromHandle)==null?void 0:j.nodeId)??null}),p=Te(V=>l!=null&&l.source?V.nodeLookup.get(l.source)??null:null),y=Te(V=>l!=null&&l.target?V.nodeLookup.get(l.target)??null:null),g=Te(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,_=i;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 K=null;if(M)K=QP(j,M);else if(w!==!1&&v){const X=v.measured.width??v.width??0,J=v.measured.height??v.height??0;if(X>0&&J>0){const re={x:v.internals.positionAbsolute.x+X/2,y:v.internals.positionAbsolute.y+J/2};K=YP(j,re)}}K&&(b=K.x,C=K.y,_=IK[K.side])}}const S=Te(V=>V.transform[2]),N=Te(V=>V.nodeLookup),P=Te(V=>{var H;return((H=V.connection.toHandle)==null?void 0:H.nodeId)??null});let A=r,E=a,z=s;if(S>0){const V=Yre/S,H=l?k?l.target:l.source:null;let j=null;if(P&&P!==H){const K=N.get(P)??null;K&&(j=K)}if(!j){let K=V;for(const X of N.values()){if(H&&X.id===H||x&&X.id===x.id)continue;const J=X.measured.width??X.width??0,re=X.measured.height??X.height??0;if(J===0||re===0)continue;const oe=X.internals.positionAbsolute.x,ne=X.internals.positionAbsolute.y,ce=Math.max(oe-r,0,r-(oe+J)),ve=Math.max(ne-a,0,a-(ne+re)),ge=Math.hypot(ce,ve);ge<=K&&(K=ge,j=X)}}if(!j&&l&&x){const K=x.measured.width??x.width??0,X=x.measured.height??x.height??0;if(K>0&&X>0){const J=x.internals.positionAbsolute.x,re=x.internals.positionAbsolute.y,oe=Math.max(J-r,0,r-(J+K)),ne=Math.max(re-a,0,a-(re+X));Math.hypot(oe,ne)<=V&&(j=x)}}if(j){const K=j.measured.width??j.width??0,X=j.measured.height??j.height??0;if(K>0&&X>0){const J=DH({x:j.internals.positionAbsolute.x,y:j.internals.positionAbsolute.y,w:K,h:X},{x:r,y:a}),re=QP({x:j.internals.positionAbsolute.x,y:j.internals.positionAbsolute.y,w:K,h:X},J);A=re.x,E=re.y,z=IK[re.side]}}}const W=(h==null?void 0:h.path)==="step",[$]=W?tf({sourceX:b,sourceY:C,sourcePosition:_,targetX:A,targetY:E,targetPosition:z,borderRadius:Uot}):tR({sourceX:b,sourceY:C,sourcePosition:_,targetX:A,targetY:E,targetPosition:z}),T=(l==null?void 0:l.style)??c??void 0,D=Te(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=NK(O,D),L=NK(I,D);return f.jsx("path",{d:$,fill:"none",className:"react-flow__connection-path",style:T,markerStart:R,markerEnd:L})},IK={top:fe.Top,right:fe.Right,bottom:fe.Bottom,left:fe.Left};function Got({storeApiRef:e}){const t=vt();return m.useEffect(()=>(e.current=t,()=>{e.current===t&&(e.current=null)}),[t,e]),null}function Kot({wrapperRef:e}){const t=Te(o=>o.transform[2]),n=e.current;return n&&n.style.setProperty("--rf-zoom",String(t)),null}const Zot=new Set(["INPUT","TEXTAREA","SELECT"]),CO=e=>e?Zot.has(e.tagName)?!0:e instanceof HTMLElement&&e.isContentEditable:!1;function Xot(e){const{event:t,selectedNodeIds:n,hasClipboard:o,activeElement:r,onCopySelection:a,onPasteSelection:i}=e;if(!(t.metaKey||t.ctrlKey)||t.shiftKey||t.altKey)return!1;const s=t.key.toLowerCase();return s!=="c"&&s!=="v"||CO(r)?!1:s==="c"?n.length===0||!a?!1:(t.preventDefault(),a([...n]),!0):!o||!i?!1:(t.preventDefault(),i(),!0)}const AK=(e,t)=>{var n;return((n=e==null?void 0:e[t])==null?void 0:n.status)??"idle"},Yot=(e,t)=>{var n;return(n=e==null?void 0:e[t])==null?void 0:n.status},Qot=(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 Jot(e,t){var xV,wV;const{mode:n,adapter:o,topLeftSlot:r,topRightSlot:a,projectId:i,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:W,onCreateImageFromFile:$,onRetryImageUpload:T,onCreateHtmlNode:D,onCreateConnector:O,onReconnectConnector:I,onReorderNode:R,onDeleteNode:L,onCopyNode:V,onPasteAt:H,hasClipboard:j,onCopySelection:K,onPasteSelection:X,selectedNodes:J,selectedConnectors:re,onStyleNode:oe,onStyleNodePreview:ne,onStyleNodes:ce,onStyleNodesPreview:ve,onStyleConnector:ge,onStyleConnectorPreview:xe,onRfInit:Re,onTidy:Ye,onNodeClick:le,onConnectorClick:Ie,onPaneClick:jt,onCreateAndConnectFromPane:xt,pendingEditNodeId:Qt,iconPickerOpen:se,onOpenIconPicker:Q,onCloseIconPicker:$t,onPickIcon:hn,onRequestIconReplace:ae,onPinEndpoint:Y,onUnpinEndpoint:he,canvasMode:Ae,onCanvasModeChange:De,disableSidebar:Ke,statusReport:Ft,onNameChange:fn,onDescriptionChange:Jt,onDetailChange:ke,onIconChange:Le,autoFitView:Ht,autoFitViewSignal:Pn,customIcons:en,onExportToCloud:n2,onNodeDragStart:ko,onNodeDragStop:Xn,onViewportChange:Ra,history:Qe,showToolbar:Wt,showStyleStrip:Jd,showDetailPanel:eu,showStatusBadges:tu,showResizeHandles:nu,showControls:ou,showShareMenu:ru,showMiniMap:Zi,enableKeyboard:Xi,enableContextMenu:Yi,enableDragDrop:Qi,enableImageDrop:ta,enableZoom:na,enablePan:au,enableSelection:iu,enableNodeMove:zo,enableEmbed:Ji}=e,Fe=m.useMemo(()=>zot({mode:n,showToolbar:Wt,showStyleStrip:Jd,showDetailPanel:eu,showStatusBadges:tu,showResizeHandles:nu,showControls:ou,showShareMenu:ru,showMiniMap:Zi,enableKeyboard:Xi,enableContextMenu:Yi,enableDragDrop:Qi,enableImageDrop:ta,enableZoom:na,enablePan:au,enableSelection:iu,enableNodeMove:zo,enableEmbed:Ji}),[n,Wt,Jd,eu,tu,nu,ou,ru,Zi,Xi,Yi,Qi,ta,na,au,iu,zo,Ji]),Nt=n==="edit",Ta=m.useRef(Fe);m.useEffect(()=>{Ta.current=Fe},[Fe]);const su=Ht??(n==="mini"?!0:void 0),oa=m.useMemo(()=>Rot(su),[su]),ur=x==null?void 0:x.runs,ra=x==null?void 0:x.statuses,vo=(xV=x==null?void 0:x.pendingOverrides)==null?void 0:xV.nodes,Yn=(wV=x==null?void 0:x.pendingOverrides)==null?void 0:wV.connectors,sn=m.useRef(null),Gt=m.useRef(null),Ro=m.useRef(!1),es=m.useRef(!1),cu=m.useRef(!1),To=m.useRef(oa);To.current=oa,m.useEffect(()=>{if(Ro.current||!oa.onMount||u.length===0)return;const B=Gt.current;B&&(B.fitView(S2),Ro.current=!0)},[u,oa.onMount]);const ts=m.useRef(null),pt=Ae.kind==="draw"?Ae.shape:null,Qn=Ae.kind==="hand",Da=m.useRef(new Map),lu=m.useCallback((B,Z)=>(Da.current.set(B,Z),()=>{Da.current.get(B)===Z&&Da.current.delete(B)}),[]),[aa,ia]=m.useState(!1),du=m.useRef(!1);m.useEffect(()=>{du.current=aa},[aa]);const ns=m.useRef(!1),hr=m.useRef(!1),sa=m.useRef(!1),[tn,fr]=m.useState(null),Ha=m.useRef(null);m.useEffect(()=>{Ha.current=tn},[tn]),m.useCallback(()=>{fr(null)},[]);const Do=m.useMemo(()=>Wot(sa),[]),zn=m.useRef(null),Jn=m.useRef(null),Oa=m.useCallback(B=>{const Z=sn.current;if(!Z){zn.current=B;return}const ie=zn.current;if(ie&&ie!==B){const de=Z.querySelector(`.react-flow__node[data-id="${CSS.escape(ie)}"]`);de==null||de.removeAttribute("data-connect-source")}if(B){const de=Z.querySelector(`.react-flow__node[data-id="${CSS.escape(B)}"]`);de==null||de.setAttribute("data-connect-source","true")}zn.current=B},[]),xo=m.useCallback(B=>{const Z=sn.current,ie=Jn.current;if(ie!==B){if(Z&&ie){const de=Z.querySelector(`.react-flow__node[data-id="${CSS.escape(ie)}"]`);de==null||de.removeAttribute("data-connect-target")}if(Z&&B){const de=Z.querySelector(`.react-flow__node[data-id="${CSS.escape(B)}"]`);de==null||de.setAttribute("data-connect-target","true")}Jn.current=B}},[]),ca=m.useCallback(()=>{Oa(null),xo(null)},[Oa,xo]);m.useEffect(()=>{if(!aa){xo(null);return}let B=null,Z=null;const ie=()=>{B=null;const ue=Z;if(Z=null,!ue)return;const je=gD(sn.current,ue.clientX,ue.clientY),we=(je==null?void 0:je.getAttribute("data-id"))??null;if(we&&we===zn.current){xo(null);return}xo(we)},de=ue=>{Z={clientX:ue.clientX,clientY:ue.clientY},B===null&&(B=requestAnimationFrame(ie))};return document.addEventListener("pointermove",de,{passive:!0}),()=>{document.removeEventListener("pointermove",de),B!==null&&cancelAnimationFrame(B)}},[aa,xo]);const[Fa,o2]=m.useState(null),[dt,qa]=m.useState(null),pr=m.useRef(null),wo=m.useRef(null),la=m.useRef(null),Va=m.useRef(!1);m.useEffect(()=>{pr.current=pt},[pt]);const uu=m.useCallback(()=>{De({kind:"select"}),o2(null),qa(null),pr.current=null,wo.current=null,la.current=null,Va.current=!1},[De]);m.useEffect(()=>{if(!Fe.enableKeyboard)return;const B=Z=>{var ue,je;if(Z.key!=="Escape"||CO(document.activeElement))return;if(pr.current){Z.preventDefault(),uu();return}if(du.current){Z.preventDefault(),ns.current=!0,hr.current=!0;try{(ue=ts.current)==null||ue.getState().cancelConnection()}catch{}document.dispatchEvent(new MouseEvent("mouseup",{bubbles:!0,cancelable:!0,button:0})),ia(!1);return}if(Ha.current){Z.preventDefault(),fr(null);return}const ie=bn.current.size>0,de=bo.current.size>0;(ie||de)&&(Z.preventDefault(),(je=Mo.current)==null||je.call(Mo,[],[]))};return window.addEventListener("keydown",B),()=>window.removeEventListener("keydown",B)},[uu,Fe.enableKeyboard]),m.useEffect(()=>{if(!Fe.enableKeyboard)return;const B=Z=>{const ie=NHe(Z,{isEditableActive:CO(document.activeElement)});ie&&Qe&&(Z.preventDefault(),Z.stopPropagation(),ie==="undo"?Qe.undo():Qe.redo())};return window.addEventListener("keydown",B),()=>window.removeEventListener("keydown",B)},[Qe,Fe.enableKeyboard]),m.useEffect(()=>{if(!Fe.enableKeyboard)return;const B=Z=>{Xot({event:Z,selectedNodeIds:y,hasClipboard:!!j,activeElement:document.activeElement,onCopySelection:K,onPasteSelection:X})};return window.addEventListener("keydown",B),()=>window.removeEventListener("keydown",B)},[y,j,K,X,Fe.enableKeyboard]);const Of=m.useCallback(B=>{var de,ue;if(!pr.current)return;const Z=B.target;if(!(Z!=null&&Z.classList.contains("react-flow__pane")))return;const ie={x:B.clientX,y:B.clientY};Va.current=!0,wo.current=ie,la.current=ie,o2(ie),qa(ie);try{(ue=(de=B.currentTarget).setPointerCapture)==null||ue.call(de,B.pointerId)}catch{}B.preventDefault(),B.stopPropagation()},[]),hu=m.useCallback(B=>{if(!Va.current)return;const Z={x:B.clientX,y:B.clientY};la.current=Z,qa(Z)},[]),DR=m.useCallback(B=>{var mr,c2;if(!Va.current)return;Va.current=!1;try{(c2=(mr=B.currentTarget).releasePointerCapture)==null||c2.call(mr,B.pointerId)}catch{}const Z=wo.current,ie=la.current,de=pr.current,ue=Gt.current;if(uu(),!Z||!ie||!de||!ue)return;const je=Math.min(Z.x,ie.x),we=Math.min(Z.y,ie.y),Ee=Math.max(Z.x,ie.x),nt=Math.max(Z.y,ie.y),lt=Ee-je,ht=nt-we,Pe=ue.screenToFlowPosition({x:je,y:we}),Dn=ue.screenToFlowPosition({x:Ee,y:nt}),Oo=Dn.x-Pe.x,ft=Dn.y-Pe.y;if(de==="linkflow"){const MV=lt<CK&&ht<CK,Jae=MV?hz.width:Math.max(Oo,fz.width),eie=MV?hz.height:Math.max(ft,fz.height);W==null||W(Pe,{width:Jae,height:eie});return}const _e=lt<_K||ht<_K,Kt=_e?uz[de].width:Oo,mu=_e?uz[de].height:ft;z==null||z(de,Pe,{width:Kt,height:mu})},[uu,z,W]),yr=m.useRef(!1),Ba=m.useRef(!1),Ff=m.useRef(new Map),os=m.useCallback(()=>{var B;es.current&&(Ba.current||yr.current||(es.current=!1,(B=Gt.current)==null||B.fitView(S2)))},[]),r2=m.useCallback(B=>{Ba.current=B,B||os()},[os]);m.useEffect(()=>{var B;if(!cu.current){cu.current=!0;return}if(To.current.onExternalNodeChange){if(Ba.current||yr.current){es.current=!0;return}(B=Gt.current)==null||B.fitView(S2)}},[Pn]);const qf=!!R||!!L||!!V||!!H||!!he,[wn,Ua]=m.useState(null),[q,F]=m.useState(!1),[U,G]=m.useState(null),[ee,ze]=m.useState(null),Je=m.useRef(null),et=m.useRef(null);m.useEffect(()=>{if(!wn)return;const B=et.current;if(!B)return;const Z=new MouseEvent("contextmenu",{clientX:wn.x,clientY:wn.y,bubbles:!0,cancelable:!0,button:2,buttons:2});B.dispatchEvent(Z)},[wn]);const Pt=m.useCallback(B=>{const Z=Je.current;!Z||!R||R(Z,B)},[R]),Ho=m.useCallback(()=>{const B=Je.current;!B||!L||L(B)},[L]),fu=m.useCallback(()=>{const B=Je.current;!B||!V||V(B)},[V]),He=m.useCallback(()=>{const B=Je.current;!B||!ae||ae(B)},[ae]);m.useCallback((B,Z,ie,de,ue)=>{Ta.current.enableContextMenu&&(Je.current=null,F(!1),G(null),ze({connectorId:B,kind:Z,pinned:ie}),Ua({x:de,y:ue}))},[]);const Mn=m.useCallback(()=>{const B=ee;!B||!he||he(B.connectorId,B.kind)},[ee,he]),pu=m.useCallback(()=>{if(!H)return;const B=wn,Z=Gt.current;if(!B||!Z)return;const ie=Z.screenToFlowPosition({x:B.x,y:B.y});H(ie)},[wn,H]),rs=typeof navigator<"u"&&/Mac|iPhone|iPad|iPod/.test(navigator.platform||navigator.userAgent||""),yu=rs?"⌘C":"Ctrl+C",HR=rs?"⌘V":"Ctrl+V",Wa=m.useMemo(()=>new Set(y),[y]),Rn=m.useMemo(()=>new Set(g),[g]),We=m.useMemo(()=>{if(y.length<2)return[];const B=vo,Z=[];for(const ie of y){const de=u.find(Ee=>Ee.id===ie);if(!de)continue;const ue=B==null?void 0:B[ie],je=(ue==null?void 0:ue.data)??{},we=de.data;Z.push({id:ie,position:(ue==null?void 0:ue.position)??de.position,data:{width:je.width??we.width,height:je.height??we.height}})}return Z},[u,vo,y]),nn=J??[],on=m.useMemo(()=>{const B=ue=>{const je=Nt?void 0:Ff.current.get(ue.id),we={id:ue.id,type:ue.type,position:je??ue.position,data:{...ue.data,projectId:i,fileBaseUrl:c,projectSlug:ue.type==="component"?i:void 0,flowSlug:ue.type==="component"?s:void 0,apiBaseUrl:ue.type==="component"?l:void 0,onRetryUpload:T,status:Yot(ur,ue.id),errorMessage:Qot(ur,ue.id),statusReport:ra==null?void 0:ra[ue.id],onPlay:v,onResize:b,onResizeEnd:C,setResizing:r2,onFitToContent:ue.type==="html"?_:ue.type==="component"?S:void 0,onNameChange:(()=>{if(Nt&&ue.type!=="ellipse")return P})(),onDescriptionChange:(()=>{if(Nt&&(ue.type==="rectangle"||ue.type==="ellipse"||ue.type==="sticky"))return A})(),onIconChange:(()=>{if(Nt&&!(ue.type!=="rectangle"&&ue.type!=="component"))return Le})(),autoEditOnMount:Qt===ue.id?!0:void 0},selected:Wa.has(ue.id)};return(!(ue.data.autoSize===!0)||Ba.current)&&(ue.data.width!==void 0&&(we.width=ue.data.width),ue.data.height!==void 0&&(we.height=ue.data.height)),Wa.has(ue.id)||(we.connectable=!1),we},Z=u.map(ue=>B(Hot(ue,vo==null?void 0:vo[ue.id]))),ie=new Set(u.map(ue=>ue.id)),de=[];if(vo)for(const[ue,je]of Object.entries(vo)){if(ie.has(ue))continue;const we=je;typeof we.type!="string"||!we.position||!we.data||de.push(B({...we,id:ue}))}return[...Z,...de]},[i,s,c,l,u,Wa,ur,ra,v,b,C,_,S,r2,vo,P,A,Le,T,Qt,Nt]),[Tn,Ga]=m.useState(on);m.useEffect(()=>{yr.current||Ba.current||Ga(on)},[on]),m.useEffect(()=>{a2.current=Tn},[Tn]);const bn=m.useRef(Wa);m.useEffect(()=>{bn.current=Wa},[Wa]);const Mo=m.useRef(k);m.useEffect(()=>{Mo.current=k},[k]);const bo=m.useRef(Rn);m.useEffect(()=>{bo.current=Rn},[Rn]);const a2=m.useRef(on),as=m.useRef(!1),Vf=m.useRef(new Set),Bf=m.useRef(new Set),OR=m.useRef(new Set),FR=m.useRef(new Set),Ka=m.useRef(null),kae=m.useCallback(B=>{var ft;const Z=as.current?OR.current:(ft=Ka.current)!=null&&ft.shift?Ka.current.nodeIds:null,ie=Z&&Z.size>0?B.filter(_e=>_e.type!=="select"?!0:!(_e.selected===!1&&Z.has(_e.id))):B,de=new Set;for(const _e of ie)_e.type==="select"&&de.add(_e.id);const ue=XQ(ie,a2.current),je=new Set;if(Ba.current)for(const _e of ie)_e.type==="dimensions"&&je.add(_e.id);const we=je.size===0?ue:ue.map(_e=>!je.has(_e.id)||_e.width===void 0&&_e.height===void 0?_e:{..._e,data:{..._e.data,..._e.width!==void 0?{width:_e.width}:{},..._e.height!==void 0?{height:_e.height}:{}}}),Ee=bn.current,nt=as.current||Ee.size===0?we:we.map(_e=>Ee.has(_e.id)&&!de.has(_e.id)&&!_e.selected?{..._e,selected:!0}:_e);if(a2.current=nt,Ga(nt),de.size===0)return;if(as.current){for(const _e of ie)_e.type==="select"&&(_e.selected?Vf.current.add(_e.id):Vf.current.delete(_e.id));return}const lt=Mo.current;if(!lt)return;const ht=nt.filter(_e=>_e.selected).map(_e=>_e.id),Pe=bn.current;Pe.size===ht.length&&ht.every(_e=>Pe.has(_e))||(bn.current=new Set(ht),lt(ht,[...bo.current]))},[]),Uf=m.useRef([]),vae=m.useCallback(B=>{var ht;const Z=as.current?FR.current:(ht=Ka.current)!=null&&ht.shift?Ka.current.edgeIds:null,ie=Z&&Z.size>0?B.filter(Pe=>Pe.type!=="select"?!0:!(Pe.selected===!1&&Z.has(Pe.id))):B,de=new Set;for(const Pe of ie)Pe.type==="select"&&de.add(Pe.id);if(de.size===0)return;if(as.current){for(const Pe of ie)Pe.type==="select"&&(Pe.selected?Bf.current.add(Pe.id):Bf.current.delete(Pe.id));return}const ue=Mo.current;if(!ue)return;const we=YQ(ie,Uf.current).filter(Pe=>Pe.selected).map(Pe=>Pe.id),Ee=bo.current;Ee.size===we.length&&we.every(Pe=>Ee.has(Pe))||(bo.current=new Set(we),ue([...bn.current],we))},[]),xae=m.useCallback(B=>{as.current=!0;const Z=Ka.current,ie=(Z==null?void 0:Z.shift)??(B.shiftKey||B.metaKey||B.ctrlKey);OR.current=ie?new Set((Z==null?void 0:Z.nodeIds)??bn.current):new Set,FR.current=ie?new Set((Z==null?void 0:Z.edgeIds)??bo.current):new Set,Vf.current=new Set(OR.current),Bf.current=new Set(FR.current)},[]),wae=m.useCallback(()=>{as.current=!1,Ka.current=null;const B=Mo.current;if(!B)return;const Z=[...Vf.current],ie=new Set(Z),de=new Set(Bf.current);for(const nt of Uf.current)ie.has(nt.source)&&ie.has(nt.target)&&de.add(nt.id);const ue=bn.current,je=bo.current,we=ue.size===ie.size&&Z.every(nt=>ue.has(nt)),Ee=je.size===de.size&&[...de].every(nt=>je.has(nt));we&&Ee||(bn.current=new Set(Z),bo.current=new Set(de),B(Z,[...de]))},[]),Mae=m.useCallback(B=>{if(Ka.current=null,pr.current||B.button!==0)return;const Z=B.target;Z!=null&&Z.classList.contains("react-flow__pane")&&(Ka.current={shift:B.shiftKey||B.metaKey||B.ctrlKey,nodeIds:new Set(bn.current),edgeIds:new Set(bo.current)})},[]),bae=m.useCallback(B=>{if(!Ta.current.enableContextMenu||bn.current.size<2)return;const ie=B.target;ie!==et.current&&(ie!=null&&ie.closest(".seeflow-connector-endpoint-dot")||(B.preventDefault(),B.stopPropagation(),Je.current=null,F(!0),G(null),ze(null),Ua({x:B.clientX,y:B.clientY})))},[]),_ae=m.useCallback(B=>{const Z=B.dataTransfer;if(!Z)return;const ie=Z.types?Array.from(Z.types):[],de=ie.includes("Files"),ue=ie.includes(iG),je=de&&!!$&&Fe.enableImageDrop,we=ue&&!!D&&Fe.enableDragDrop;if(!(!je&&!we)){B.preventDefault();try{Z.dropEffect="copy"}catch{}}},[$,D,Fe.enableImageDrop,Fe.enableDragDrop]),Cae=m.useCallback(B=>{const Z=B.dataTransfer;if((Z!=null&&Z.types?Array.from(Z.types):[]).includes(iG)&&D&&Fe.enableDragDrop){B.preventDefault();const je=Gt.current;if(!je)return;const we=je.screenToFlowPosition({x:B.clientX,y:B.clientY});D({position:we});return}if(!$||!Fe.enableImageDrop)return;const ue={x:B.clientX,y:B.clientY};B.preventDefault(),UAe({dataTransfer:Z,clientPos:ue,rfInstance:Gt.current,computeDims:WAe,dispatch:$})},[$,D,Fe.enableImageDrop,Fe.enableDragDrop]),rV=!!I,aV=Rn.size===1?[...Rn][0]:null,qR=m.useMemo(()=>{const B=Ee=>{const nt=AK(ur,Ee.source)==="running"||AK(ur,Ee.target)==="running",lt=Rn.has(Ee.id),ht=JDe(Ee,nt,lt);lt&&(ht.selected=!0);const Pe=rV&&Ee.id===aV,Dn=Pe?{...ht,reconnectable:!0}:ht;return{...Dn,data:{...Dn.data,onLabelChange:Nt?E:void 0,reconnectable:Pe,registerEditHandle:lu}}},Z=new Set(p.map(Ee=>Ee.id)),ie=p.map(Ee=>B(Oot(Ee,Yn==null?void 0:Yn[Ee.id]))),de=[];if(Yn)for(const[Ee,nt]of Object.entries(Yn)){if(Z.has(Ee))continue;const lt=nt;typeof lt.source!="string"||typeof lt.target!="string"||de.push(B({...lt,id:Ee}))}const ue=[...ie,...de],je=[],we=[];for(const Ee of ue)Rn.has(Ee.id)?we.push(Ee):je.push(Ee);return[...je,...we]},[p,ur,Rn,aV,Yn,E,rV,lu,Nt]);m.useEffect(()=>{Uf.current=qR},[qR]);const i2=e.adapter??null,Sae=m.useMemo(()=>{if(i2!=null&&i2.computeLayout)return async()=>{const B=Gt.current,Z=a2.current;if(Z.length<2)return;const ie=Z.map(ft=>{var c2;const _e=(c2=B==null?void 0:B.getInternalNode(ft.id))==null?void 0:c2.measured,Kt=ft.data,mu=(_e==null?void 0:_e.width)??Kt.width??200,mr=(_e==null?void 0:_e.height)??Kt.height??120;return{id:ft.id,type:ft.type,width:mu,height:mr}}),de=new Map;for(const ft of Z)de.set(ft.id,ft.position);const ue=Uf.current.map(ft=>({id:ft.id,source:ft.source,target:ft.target})),je=i2.computeLayout;if(!je)return;const we=await je(ie,ue),Ee=new Map;for(const[ft,_e]of Object.entries(we.nodes))Ee.set(ft,_e.position);let nt=Number.POSITIVE_INFINITY,lt=Number.POSITIVE_INFINITY,ht=Number.POSITIVE_INFINITY,Pe=Number.POSITIVE_INFINITY;for(const ft of ie){const _e=de.get(ft.id);if(!_e)continue;_e.x<nt&&(nt=_e.x),_e.y<lt&&(lt=_e.y);const Kt=Ee.get(ft.id);Kt&&(Kt.x<ht&&(ht=Kt.x),Kt.y<Pe&&(Pe=Kt.y))}const Dn=Number.isFinite(nt)&&Number.isFinite(ht)?nt-ht:0,Oo=Number.isFinite(lt)&&Number.isFinite(Pe)?lt-Pe:0;Ga(ft=>ft.map(_e=>{const Kt=Ee.get(_e.id);return Kt?{..._e,position:{x:Kt.x+Dn,y:Kt.y+Oo}}:_e}))}},[i2]),Wf=Ye??(Nt?void 0:Sae),Gf=m.useRef(!1),iV=m.useRef(null),Lae=m.useCallback(B=>{var Ee;if(!Nt||!O)return;const{source:Z,target:ie}=B;if(!Z||!ie||Z===ie)return;Gf.current=!0;const de=((Ee=iV.current)==null?void 0:Ee.nodeId)??null,ue=de!==null&&de===ie&&de!==Z;O(ue?ie:Z,ue?Z:ie)},[O,Nt]),VR=m.useCallback(B=>{const Z=ie=>{if(!ie)return!1;const de=a2.current.find(ue=>ue.id===ie);return de?de.type==="text":!1};return!Z(B.source)&&!Z(B.target)},[]),Nae=m.useCallback((B,Z)=>{var ht;ia(!1),ca();const ie=Gf.current;if(Gf.current=!1,ie||sa.current)return;if(ns.current){ns.current=!1;return}if(!O)return;const de=(ht=Z.fromNode)==null?void 0:ht.id,ue=Z.fromHandle;if(!de||!ue)return;const je=SK(B);if(!je)return;const we=gD(sn.current,je.clientX,je.clientY);if(!we)return;const Ee=we.getAttribute("data-id");if(!Ee||Ee===de||!VR({source:de,target:Ee,sourceHandle:null,targetHandle:null}))return;let nt;const lt=Gt.current;if(lt){const Pe=lt.getInternalNode(Ee);if(Pe){const Dn=Pe.measured.width??Pe.width??0,Oo=Pe.measured.height??Pe.height??0;if(Dn>0&&Oo>0){const ft=lt.screenToFlowPosition({x:je.clientX,y:je.clientY});nt=DH({x:Pe.internals.positionAbsolute.x,y:Pe.internals.positionAbsolute.y,w:Dn,h:Oo},ft)}}}O(de,Ee,nt?{targetPin:nt}:void 0)},[O,ca,VR]),Kf=m.useRef(!1),Iae=m.useCallback((B,Z)=>{if(!I)return;const{source:ie,target:de,sourceHandle:ue,targetHandle:je}=Z;if(!ie||!de||ie===de)return;const we={};if(ie!==B.source&&(we.source=ie),de!==B.target&&(we.target=de),typeof ue=="string"&&ue!==B.sourceHandle&&(we.sourceHandle=ue),typeof je=="string"&&je!==B.targetHandle&&(we.targetHandle=je),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 Ee=Gt.current;if(!(we.source===void 0&&we.target===void 0)&&Ee){const lt=we.source!==void 0?"source":"target",ht=LK(lt,B.source,B.target,B.data,Pe=>Ee.getInternalNode(Pe)??null);ht&&(lt==="source"?we.targetPin=ht:we.sourcePin=ht)}Kf.current=!0,I(B.id,we)},[I]),Aae=m.useCallback((B,Z,ie,de)=>{var mu;ia(!1),ca(),sa.current=!1;const ue=Kf.current;if(Kf.current=!1,ue)return;if(hr.current){hr.current=!1;return}if(!I)return;const je=SK(B);let we=((mu=de.toNode)==null?void 0:mu.id)??null;if(!we&&je){const mr=gD(sn.current,je.clientX,je.clientY);we=(mr==null?void 0:mr.getAttribute("data-id"))??null}const Ee=ie==="source"?"target":"source",nt=Dot(Ee,Z.source,Z.target,we);if(nt==="no-op"||nt==="self-loop"||!je)return;const lt=Gt.current;if(!lt)return;const ht=nt==="pin-own"?Ee==="source"?Z.source:Z.target:we,Pe=lt.getInternalNode(ht);if(!Pe)return;const Dn=Pe.measured.width??Pe.width??0,Oo=Pe.measured.height??Pe.height??0;if(Dn===0||Oo===0)return;const ft=lt.screenToFlowPosition({x:je.clientX,y:je.clientY}),_e=DH({x:Pe.internals.positionAbsolute.x,y:Pe.internals.positionAbsolute.y,w:Dn,h:Oo},ft);if(nt==="pin-own"){if(!Y)return;Y(Z.id,Ee,_e);return}const Kt=LK(Ee,Z.source,Z.target,Z.data,mr=>lt.getInternalNode(mr)??null);Ee==="source"?I(Z.id,{source:we,sourceHandle:null,sourceHandleAutoPicked:!1,sourcePin:_e,...Kt?{targetPin:Kt}:{}}):I(Z.id,{target:we,targetHandle:null,targetHandleAutoPicked:!1,targetPin:_e,...Kt?{sourcePin:Kt}:{}})},[I,ca,Y]),is=m.useMemo(()=>{var Ee;if(!Fa||!dt)return null;const B=(Ee=sn.current)==null?void 0:Ee.getBoundingClientRect(),Z=(B==null?void 0:B.left)??0,ie=(B==null?void 0:B.top)??0,de=Math.min(Fa.x,dt.x),ue=Math.min(Fa.y,dt.y),je=Math.abs(dt.x-Fa.x),we=Math.abs(dt.y-Fa.y);return{left:de-Z,top:ue-ie,width:je,height:we}},[Fa,dt]),Za=pt?$2(ri).node:void 0,s2=pt==="linkflow",Eae=pt&&!s2?Mte(pt):"",jae=pt&&!s2?bte(pt,Za):void 0,$ae=pt==="text",[sV,cV]=m.useState(!1),[Pae,Zf]=m.useState(!1),[zae,lV]=m.useState(!1),[dV,Rae]=m.useState(()=>({canUndo:(Qe==null?void 0:Qe.canUndo)??!1,canRedo:(Qe==null?void 0:Qe.canRedo)??!1}));m.useEffect(()=>Qe?Qe.subscribe(Rae):void 0,[Qe]);const[uV,hV]=m.useState(!1),Tae=Qe?dV.canUndo:!1,Dae=Qe?dV.canRedo:!1,Xa=_ot({projectId:i,getReactFlow:()=>Gt.current});m.useImperativeHandle(t,()=>({exportPdf:Xa.exportPdf,exportPng:Xa.exportPng,openEmbedDialog:()=>lV(!0),capturePreview:Xa.capturePreview}),[Xa.exportPdf,Xa.exportPng,Xa.capturePreview]),m.useEffect(()=>{if(!Fe.enableKeyboard)return;const B=de=>{if(!de)return!1;const ue=de.tagName;return ue==="INPUT"||ue==="TEXTAREA"||ue==="SELECT"?!0:de instanceof HTMLElement&&de.isContentEditable},Z=de=>{de.code==="Space"&&(B(document.activeElement)||(de.preventDefault(),cV(!0)))},ie=de=>{de.code==="Space"&&(cV(!1),Zf(!1))};return window.addEventListener("keydown",Z),window.addEventListener("keyup",ie),()=>{window.removeEventListener("keydown",Z),window.removeEventListener("keyup",ie)}},[Fe.enableKeyboard]);const Xf=m.useCallback(B=>{if(B.length!==0){if(!Nt){const Z=Ff.current;for(const ie of B)Z.set(ie.id,{x:ie.position.x,y:ie.position.y});return}if(B.length===1){const Z=B[0];Z&&M&&M(Z.id,{x:Z.position.x,y:Z.position.y});return}if(w){w(B.map(Z=>({id:Z.id,position:{x:Z.position.x,y:Z.position.y}})));return}if(M)for(const Z of B)M(Z.id,{x:Z.position.x,y:Z.position.y})}},[M,w,Nt]),fV=m.useCallback((B,Z,ie)=>{yr.current=!1,Xf(ie),os()},[Xf,os]),pV=m.useCallback(()=>{yr.current=!0},[]),yV=m.useCallback((B,Z)=>{yr.current=!1,Xf(Z),os()},[Xf,os]),Hae=m.useCallback((B,Z)=>{Ha.current&&fr(null);const ie=sn.current;ie&&ie.style.setProperty("--rf-zoom",String(Z.zoom)),Ra==null||Ra(Z)},[Ra]),Oae=m.useCallback(()=>{yr.current=!0,ko==null||ko()},[ko]),Fae=m.useCallback((B,Z,ie)=>{fV(B,Z,ie),Xn==null||Xn()},[fV,Xn]),qae=m.useCallback(()=>{pV(),ko==null||ko()},[pV,ko]),Vae=m.useCallback((B,Z)=>{yV(B,Z),Xn==null||Xn()},[yV,Xn]),Bae=m.useCallback((B,Z)=>{var ie;(ie=Da.current.get(Z.id))==null||ie()},[]),Uae=m.useCallback((B,Z)=>{le==null||le(Z.id)},[le]),Wae=m.useCallback(B=>{jt==null||jt()},[jt]),Gae=m.useCallback((B,Z)=>{Ie==null||Ie(Z.id)},[Ie]),mV=pt?"crosshair":Qn||sV?Pae?"grabbing":"grab":void 0,gV=y.length+g.length===1,kV=gV?y[0]:void 0,vV=gV?g[0]:void 0,Kae=kV?u.find(B=>B.id===kV)??null:null;vV&&p.find(B=>B.id===vV);const Zae=i??null,BR=Fe.showDetailPanel&&!Ke,Xae=BR,Yae=m.useMemo(()=>({custom:en??{}}),[en]),Qae=m.useMemo(()=>({studioBaseUrl:h}),[h]),Yf=o==null?void 0:o.icons;return m.useEffect(()=>{if(!Yf)return;let B=!1;return(async()=>{try{const Z=await Yf.listPacks();if(B)return;kH(Z)}catch{}})(),()=>{B=!0}},[Yf]),f.jsx(dFe,{value:Yae,children:f.jsx(zAe,{value:Qae,children:f.jsx("div",{"data-testid":"seeflow-canvas","data-mode":n,"data-canvas-mode":Ae.kind,"data-can-undo":Tae?"true":"false","data-can-redo":Dae?"true":"false",ref:sn,className:"seeflow-canvas-root sf:relative sf:flex sf:h-full sf:w-full",style:mV?{cursor:mV}:void 0,onPointerDownCapture:Mae,onPointerDown:B=>{sV&&Zf(!0),Of(B)},onPointerMove:hu,onPointerUp:B=>{Zf(!1),DR(B)},onPointerCancel:()=>{Va.current=!1,wo.current=null,la.current=null,o2(null),qa(null),Zf(!1)},onContextMenuCapture:bae,onDragOver:_ae,onDrop:Cae,children:f.jsxs(MBe,{containerRef:sn,children:[f.jsxs("div",{className:"sf:relative sf:flex-1 sf:min-w-0 sf:h-full",children:[f.jsxs(mDe,{nodes:Tn,edges:qR,onNodesChange:kae,nodeTypes:Fot,edgeTypes:qot,proOptions:Bot,fitView:!0,minZoom:n==="mini"?.05:.5,nodesDraggable:(Nt?!!M:!0)&&!pt&&!Qn&&Fe.enableNodeMove,nodesConnectable:Nt&&!!O&&!pt&&!Qn,deleteKeyCode:Nt?["Backspace","Delete"]:null,zoomOnScroll:Fe.enableZoom,zoomOnPinch:Fe.enableZoom,className:aa?"seeflow-connecting":void 0,onConnect:Nt?Lae:void 0,isValidConnection:VR,onConnectStart:(B,Z)=>{ia(!0),Gf.current=!1,iV.current={nodeId:Z.nodeId??null,handleType:Z.handleType??null},Oa(Z.nodeId??null)},onConnectEnd:Nae,onReconnect:Nt&&I?Iae:void 0,onReconnectStart:(B,Z,ie)=>{ia(!0),Kf.current=!1,sa.current=!0;const de=ie==="source"?Z.source:Z.target;Oa(de)},onReconnectEnd:Aae,connectionLineComponent:Do,connectionLineStyle:{strokeWidth:2},connectionRadius:32,reconnectRadius:10,edgesReconnectable:!1,elevateNodesOnSelect:!1,elementsSelectable:!pt&&!Qn&&Fe.enableSelection,selectNodesOnDrag:!1,nodeClickDistance:5,selectionOnDrag:!pt&&!Qn&&Fe.enableSelection,panOnDrag:pt?!1:Qn?[0,1,2]:Fe.enablePan?[1,2]:!1,selectionMode:M0.Partial,selectionKeyCode:null,multiSelectionKeyCode:pt?null:["Meta","Shift"],panActivationKeyCode:pt?null:"Space",onSelectionStart:xae,onSelectionEnd:wae,defaultEdgeOptions:Vot,zoomOnDoubleClick:!1,onInit:B=>{Gt.current=B;const Z=sn.current;Z&&Z.style.setProperty("--rf-zoom",String(B.getZoom())),Z&&Z.setAttribute("data-canvas-ready","true"),!Ro.current&&oa.onMount&&u.length>0&&(B.fitView(S2),Ro.current=!0),Re==null||Re(B)},onMove:Hae,onEdgesChange:vae,onNodeDragStart:Oae,onNodeDragStop:Fae,onSelectionDragStart:qae,onSelectionDragStop:Vae,onNodeClick:Uae,onEdgeClick:Gae,onEdgeDoubleClick:Bae,onPaneClick:Wae,onNodeContextMenu:Fe.enableContextMenu&&qf?(B,Z)=>{B.preventDefault(),Je.current=Z.id,F(!0),G(Z.type??null),ze(null),Ua({x:B.clientX,y:B.clientY})}:void 0,onPaneContextMenu:Fe.enableContextMenu&&H?B=>{B.preventDefault(),Je.current=null,F(!1),G(null),ze(null),Ua({x:B.clientX,y:B.clientY})}:void 0,children:[f.jsx(Got,{storeApiRef:ts}),f.jsx(Kot,{wrapperRef:sn}),f.jsx(CDe,{gap:12,size:.6}),n!=="mini"&&f.jsx(Not,{}),Fe.showControls?f.jsxs(jDe,{showInteractive:!1,showFitView:!1,children:[f.jsx(Wu,{"data-testid":"controls-fit-view","aria-label":"Fit view",title:"Fit view",disabled:u.length===0,onClick:()=>{var B;(B=Gt.current)==null||B.fitView(S2)},children:f.jsx(xd,{className:"sf:h-3 sf:w-3","aria-hidden":"true"})}),f.jsx(Wu,{"data-testid":"controls-tidy","aria-label":"Tidy layout (⌘⇧L)",title:"Tidy layout (⌘⇧L)",disabled:!Wf,onClick:()=>Wf==null?void 0:Wf(),children:f.jsx(ah,{className:"sf:h-3 sf:w-3","aria-hidden":"true"})})]}):null,Fe.showMiniMap?f.jsx(UDe,{className:"sf-canvas-minimap"}):null,Fe.showResizeHandles?f.jsx(xnt,{selectedNodes:We,onMultiResize:N}):null,r||Fe.showToolbar||Fe.showStyleStrip&&oe&&ge?f.jsx(L0,{position:"top-left",children:f.jsxs("div",{className:"sf:flex sf:flex-col sf:items-start sf:gap-2",children:[r,Fe.showToolbar?f.jsx(WKe,{mode:Ae,onModeChange:De,iconPickerOpen:se??!1,onOpenIconPicker:Q,onCloseIconPicker:$t,onPickIcon:hn,showShapeTools:Nt&&!!z,iconsAdapter:Yf}):null,Fe.showStyleStrip&&oe&&ge?f.jsx(bnt,{nodes:nn,connectors:re??[],onStyleNode:oe,onStyleNodePreview:ne,onStyleNodes:ce,onStyleNodesPreview:ve,onStyleConnector:ge,onStyleConnectorPreview:xe,onRequestIconReplace:ae}):null]})}):null,Fe.showShareMenu||a||BR?f.jsx(L0,{position:"top-right",children:f.jsxs("div",{className:"sf:flex sf:items-center sf:gap-1",children:[a,BR?f.jsx(Eot,{open:uV,onToggle:()=>hV(B=>!B)}):null,Fe.showShareMenu?f.jsx(Fre,{mode:n==="mini"?"view":n,projectId:i,enableEmbed:Fe.enableEmbed,onDownloadPdf:Xa.exportPdf,onDownloadPng:Xa.exportPng,onExportToCloud:n2,embedOpen:zae,onEmbedOpenChange:lV}):null]})}):null]}),is?f.jsxs("div",{"data-testid":"canvas-draw-ghost","data-ghost-shape":pt??void 0,"aria-hidden":!0,className:te("sf:pointer-events-none sf:absolute sf:z-10",Eae,$ae?"sf:rounded-sm sf:border sf:border-dashed sf:border-muted-foreground/40":"",s2?"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:{...jae,left:is.left,top:is.top,width:is.width,height:is.height},children:[s2?f.jsxs("span",{className:"sf:inline-flex sf:items-center sf:gap-2",children:[f.jsx(Ii,{size:14,"aria-hidden":!0}),f.jsx("span",{children:"Link to a flow"})]}):null,(()=>{if(s2)return null;const B=pt?gq[pt]:void 0;if(!B)return null;const Z=_te(Za);return f.jsx(B,{width:is.width,height:is.height,borderColor:Z.borderColor,backgroundColor:Z.backgroundColor,borderSize:(Za==null?void 0:Za.borderSize)??UF,borderStyle:Za==null?void 0:Za.borderStyle})})()]}):null,Fe.enableContextMenu&&qf?f.jsxs(zGe,{onOpenChange:B=>{B||(Ua(null),Je.current=null,G(null),ze(null))},children:[f.jsx(RGe,{asChild:!0,children:f.jsx("div",{ref:et,"data-testid":"node-context-menu-trigger","aria-hidden":!0,className:"sf:pointer-events-none sf:fixed",style:{left:(wn==null?void 0:wn.x)??0,top:(wn==null?void 0:wn.y)??0,width:0,height:0}})}),f.jsxs(Dne,{"data-testid":"node-context-menu",children:[ee!=null&&ee.pinned&&he?f.jsx(Lr,{"data-testid":"connector-endpoint-context-menu-unpin",onSelect:Mn,children:"Unpin"}):null,q&&V?f.jsxs(Lr,{"data-testid":"node-context-menu-copy",onSelect:fu,children:["Copy",f.jsx(sO,{children:yu})]}):null,H?f.jsxs(Lr,{"data-testid":"node-context-menu-paste",disabled:!j,onSelect:pu,children:["Paste",f.jsx(sO,{children:HR})]}):null,q&&(V||H)&&(U==="icon"&&ae||R||L)?f.jsx(uP,{}):null,q&&U==="icon"&&ae?f.jsx(Lr,{"data-testid":"node-context-menu-change-icon",onSelect:He,children:"Change icon"}):null,q&&U==="icon"&&ae&&(R||L)?f.jsx(uP,{}):null,q&&R?f.jsxs(f.Fragment,{children:[f.jsx(Lr,{"data-testid":"node-context-menu-to-front",onSelect:()=>Pt({op:"toFront"}),children:"Bring to front"}),f.jsx(Lr,{"data-testid":"node-context-menu-forward",onSelect:()=>Pt({op:"forward"}),children:"Bring forward"}),f.jsx(Lr,{"data-testid":"node-context-menu-backward",onSelect:()=>Pt({op:"backward"}),children:"Send backward"}),f.jsx(Lr,{"data-testid":"node-context-menu-to-back",onSelect:()=>Pt({op:"toBack"}),children:"Send to back"})]}):null,q&&R&&L?f.jsx(uP,{}):null,q&&L?f.jsx(Lr,{"data-testid":"node-context-menu-delete",onSelect:Ho,children:"Delete"}):null]})]}):null,xt?f.jsxs(Bd,{open:!!tn,onOpenChange:B=>{B||fr(null)},children:[f.jsx(bBe,{asChild:!0,children:f.jsx("div",{"data-testid":"drop-popover-anchor","aria-hidden":!0,className:"sf:pointer-events-none sf:fixed",style:{left:(tn==null?void 0:tn.clientX)??0,top:(tn==null?void 0:tn.clientY)??0,width:0,height:0}})}),f.jsx(Gi,{"data-testid":"drop-popover",align:"start",side:"bottom",sideOffset:4,className:"sf:w-auto sf:p-1",onOpenAutoFocus:B=>{B.preventDefault()},children:f.jsx("div",{role:"menu","aria-label":"Create connected node",className:"sf:flex sf:flex-col sf:gap-0.5",children:UKe.map(({shape:B,label:Z,Icon:ie})=>B==="linkflow"?null:f.jsxs("button",{type:"button",role:"menuitem","data-testid":`drop-popover-shape-${B}`,onClick:()=>{const de=tn;de&&(xt({sourceNodeId:de.sourceNodeId,position:{x:de.flowX,y:de.flowY},shape:B}),fr(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:Z})]},B))})})]}):null]}),Xae?f.jsx(Vtt,{flowId:Zae,node:Kae,connector:null,adapter:o??null,statusReport:Ft,onNameChange:fn,onDescriptionChange:Jt,onDetailChange:ke,onIconChange:Le,open:uV,onClose:()=>{var B;hV(!1),(B=Mo.current)==null||B.call(Mo,[],[])}}):null]})})})})}const ert=m.forwardRef(Jot);/**
|
|
8544
|
+
`)}async function yot(e,t){const n=t.fontEmbedCSS!=null?t.fontEmbedCSS:t.skipFonts?null:await pot(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 mot(e,t={}){const{width:n,height:o}=Vre(e,t),r=await TR(e,t,!0);return await yot(r,t),await Zre(r,t),lot(r,t),await $nt(r,n,o)}async function got(e,t={}){const{width:n,height:o}=Vre(e,t),r=await mot(e,t),a=await Sz(r),i=document.createElement("canvas"),s=i.getContext("2d"),c=t.pixelRatio||Ant(),l=t.canvasWidth||n,h=t.canvasHeight||o;return i.width=l*c,i.height=h*c,t.skipAutoScale||Ent(i),i.style.width=`${l}`,i.style.height=`${h}`,t.backgroundColor&&(s.fillStyle=t.backgroundColor,s.fillRect(0,0,i.width,i.height)),s.drawImage(a,0,0,i.width,i.height),i}async function kot(e,t={}){return(await got(e,t)).toDataURL()}const vot=e=>e instanceof Element?!(e.classList.contains("react-flow__minimap")||e.classList.contains("react-flow__controls")||e.classList.contains("react-flow__panel")):!0,xot=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"},wot=async e=>{const t=await kot(e,{cacheBust:!0,filter:vot,backgroundColor:xot(e)}),n=await new Promise((o,r)=>{const a=new Image;a.onload=()=>o({width:a.naturalWidth,height:a.naturalHeight}),a.onerror=()=>r(new Error("Failed to decode captured image")),a.src=t});return{dataUrl:t,...n}},Mot=(e,t)=>{const n=document.createElement("a");n.href=e,n.download=t,n.rel="noopener",document.body.appendChild(n),n.click(),n.remove()},bot=e=>{const t=e.replace(/[^A-Za-z0-9_-]+/g,"-").replace(/^-+|-+$/g,"");return t.length>0?t.slice(0,80):"canvas"},bK=(e,t)=>`${bot(e??"canvas")}.${t}`,_ot=({projectId:e,getReactFlow:t})=>{const[n,o]=m.useState(null),r=m.useCallback(()=>o(null),[]),a=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 wot(h)}finally{l.setViewport(u,{duration:0})}},[t]),i=m.useCallback(async()=>{o(null);try{const l=await a();if(!l)return;Mot(l.dataUrl,bK(e,"png"))}catch(l){o(l instanceof Error?l.message:String(l))}},[a,e]),s=m.useCallback(async()=>{o(null);try{const l=await a();if(!l)return;const{jsPDF:h}=await V0(async()=>{const{jsPDF:y}=await import("./jspdf.es.min-DIDY-jNM.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(bK(e,"pdf"))}catch(l){o(l instanceof Error?l.message:String(l))}},[a,e]),c=m.useCallback(async()=>{const l=await a();return l==null?void 0:l.dataUrl},[a]);return{exportPdf:s,exportPng:i,capturePreview:c,lastError:n,clearError:r}},Cot=12,Sot=1200;function Lot(e,t={}){const n=t.idleMs??Sot;let o,r=null,a=null;const i=typeof requestAnimationFrame<"u",s=()=>{o!==void 0&&(clearTimeout(o),o=void 0)},c=()=>{a!==null&&typeof cancelAnimationFrame<"u"&&cancelAnimationFrame(a),a=null},l=()=>{if(a=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},!i){l();return}a===null&&(a=requestAnimationFrame(l))},onLeave:()=>{c(),r=null,s(),e.dataset.active="false"},dispose:()=>{c(),r=null,s()}}}function Not(){const e=m.useRef(null),t=Te(i=>i.transform,(i,s)=>i[0]===s[0]&&i[1]===s[1]&&i[2]===s[2]),[n,o,r]=t,a=Cot*r;return m.useEffect(()=>{var u;const i=e.current;if(!i)return;const s=(u=i.parentElement)==null?void 0:u.querySelector(".react-flow__pane");if(!s)return;const{onMove:c,onLeave:l,dispose:h}=Lot(i);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:`${a}px ${a}px`}})}const Iot="Hide inspector",Aot="Open inspector";function Eot({open:e,onToggle:t}){const n=e?lh:dh,o=e?Iot:Aot;return f.jsx(d0,{delayDuration:300,children:f.jsxs(Q0,{children:[f.jsx(J0,{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(Yd,{children:o})]})})}const jot={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},$ot={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},Pot={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};function zot(e){const t=e.mode==="edit"?jot:e.mode==="mini"?Pot:$ot;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}}const _K=40,CK=4,S2={padding:.15,duration:300,includeHiddenNodes:!1};function Rot(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 SK=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},Tot=(e,t)=>{var o;const n=document.elementsFromPoint(e,t);for(const r of n){const a=(o=r.closest)==null?void 0:o.call(r,".react-flow__node");if(a)return a}return null},Yre=15,gD=(e,t,n)=>{const o=Tot(t,n);if(o)return o;if(!e)return null;let r=null,a=Yre;const i=e.querySelectorAll(".react-flow__node");for(const s of i){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<=a&&(r=s,a=u)}return r};function LK(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 i=e==="source"?n:t,s=e==="source"?t:n,c=r(i),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,YP(g,k))}function Dot(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 Hot=(e,t)=>{if(!t)return e;const n=t.data?{...e.data,...t.data}:e.data;return{...e,...t,data:n}},Oot=(e,t)=>t?{...e,...t}:e,Fot={rectangle:YUe,ellipse:kr,sticky:kr,text:kr,database:kr,server:kr,user:kr,queue:kr,cloud:kr,diamond:kr,hexagon:kr,image:FUe,icon:mHe,html:RUe,component:rUe,linkflow:UUe},qot={editableEdge:eWe},Vot={zIndex:0},Bot={hideAttribution:!0},Uot=8,NK=(e,t)=>e?typeof e=="string"?`url('#${e}')`:`url('#${`${t?`${t}__`:""}${Object.keys(e).sort().map(r=>`${r}=${e[r]}`).join("&")}`}')`:void 0,Wot=e=>function({fromX:n,fromY:o,toX:r,toY:a,fromPosition:i,toPosition:s,connectionLineStyle:c}){const l=Te(V=>e.current?V.edges.find(H=>H.reconnectable===!0)??null:null),h=l==null?void 0:l.data,u=Te(V=>{var j;const H=V.connection;return((j=H==null?void 0:H.fromHandle)==null?void 0:j.nodeId)??null}),p=Te(V=>l!=null&&l.source?V.nodeLookup.get(l.source)??null:null),y=Te(V=>l!=null&&l.target?V.nodeLookup.get(l.target)??null:null),g=Te(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,_=i;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 K=null;if(M)K=QP(j,M);else if(w!==!1&&v){const X=v.measured.width??v.width??0,J=v.measured.height??v.height??0;if(X>0&&J>0){const re={x:v.internals.positionAbsolute.x+X/2,y:v.internals.positionAbsolute.y+J/2};K=YP(j,re)}}K&&(b=K.x,C=K.y,_=IK[K.side])}}const S=Te(V=>V.transform[2]),N=Te(V=>V.nodeLookup),P=Te(V=>{var H;return((H=V.connection.toHandle)==null?void 0:H.nodeId)??null});let A=r,E=a,z=s;if(S>0){const V=Yre/S,H=l?k?l.target:l.source:null;let j=null;if(P&&P!==H){const K=N.get(P)??null;K&&(j=K)}if(!j){let K=V;for(const X of N.values()){if(H&&X.id===H||x&&X.id===x.id)continue;const J=X.measured.width??X.width??0,re=X.measured.height??X.height??0;if(J===0||re===0)continue;const oe=X.internals.positionAbsolute.x,ne=X.internals.positionAbsolute.y,ce=Math.max(oe-r,0,r-(oe+J)),ve=Math.max(ne-a,0,a-(ne+re)),ge=Math.hypot(ce,ve);ge<=K&&(K=ge,j=X)}}if(!j&&l&&x){const K=x.measured.width??x.width??0,X=x.measured.height??x.height??0;if(K>0&&X>0){const J=x.internals.positionAbsolute.x,re=x.internals.positionAbsolute.y,oe=Math.max(J-r,0,r-(J+K)),ne=Math.max(re-a,0,a-(re+X));Math.hypot(oe,ne)<=V&&(j=x)}}if(j){const K=j.measured.width??j.width??0,X=j.measured.height??j.height??0;if(K>0&&X>0){const J=DH({x:j.internals.positionAbsolute.x,y:j.internals.positionAbsolute.y,w:K,h:X},{x:r,y:a}),re=QP({x:j.internals.positionAbsolute.x,y:j.internals.positionAbsolute.y,w:K,h:X},J);A=re.x,E=re.y,z=IK[re.side]}}}const W=(h==null?void 0:h.path)==="step",[$]=W?tf({sourceX:b,sourceY:C,sourcePosition:_,targetX:A,targetY:E,targetPosition:z,borderRadius:Uot}):tR({sourceX:b,sourceY:C,sourcePosition:_,targetX:A,targetY:E,targetPosition:z}),T=(l==null?void 0:l.style)??c??void 0,D=Te(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=NK(O,D),L=NK(I,D);return f.jsx("path",{d:$,fill:"none",className:"react-flow__connection-path",style:T,markerStart:R,markerEnd:L})},IK={top:fe.Top,right:fe.Right,bottom:fe.Bottom,left:fe.Left};function Got({storeApiRef:e}){const t=vt();return m.useEffect(()=>(e.current=t,()=>{e.current===t&&(e.current=null)}),[t,e]),null}function Kot({wrapperRef:e}){const t=Te(o=>o.transform[2]),n=e.current;return n&&n.style.setProperty("--rf-zoom",String(t)),null}const Zot=new Set(["INPUT","TEXTAREA","SELECT"]),CO=e=>e?Zot.has(e.tagName)?!0:e instanceof HTMLElement&&e.isContentEditable:!1;function Xot(e){const{event:t,selectedNodeIds:n,hasClipboard:o,activeElement:r,onCopySelection:a,onPasteSelection:i}=e;if(!(t.metaKey||t.ctrlKey)||t.shiftKey||t.altKey)return!1;const s=t.key.toLowerCase();return s!=="c"&&s!=="v"||CO(r)?!1:s==="c"?n.length===0||!a?!1:(t.preventDefault(),a([...n]),!0):!o||!i?!1:(t.preventDefault(),i(),!0)}const AK=(e,t)=>{var n;return((n=e==null?void 0:e[t])==null?void 0:n.status)??"idle"},Yot=(e,t)=>{var n;return(n=e==null?void 0:e[t])==null?void 0:n.status},Qot=(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 Jot(e,t){var xV,wV;const{mode:n,adapter:o,topLeftSlot:r,topRightSlot:a,projectId:i,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:W,onCreateImageFromFile:$,onRetryImageUpload:T,onCreateHtmlNode:D,onCreateConnector:O,onReconnectConnector:I,onReorderNode:R,onDeleteNode:L,onCopyNode:V,onPasteAt:H,hasClipboard:j,onCopySelection:K,onPasteSelection:X,selectedNodes:J,selectedConnectors:re,onStyleNode:oe,onStyleNodePreview:ne,onStyleNodes:ce,onStyleNodesPreview:ve,onStyleConnector:ge,onStyleConnectorPreview:xe,onRfInit:Re,onTidy:Ye,onNodeClick:le,onConnectorClick:Ie,onPaneClick:jt,onCreateAndConnectFromPane:xt,pendingEditNodeId:Qt,iconPickerOpen:se,onOpenIconPicker:Q,onCloseIconPicker:$t,onPickIcon:hn,onRequestIconReplace:ae,onPinEndpoint:Y,onUnpinEndpoint:he,canvasMode:Ae,onCanvasModeChange:De,disableSidebar:Ke,statusReport:Ft,onNameChange:fn,onDescriptionChange:Jt,onDetailChange:ke,onIconChange:Le,autoFitView:Ht,autoFitViewSignal:Pn,customIcons:en,onExportToCloud:n2,onNodeDragStart:ko,onNodeDragStop:Xn,onViewportChange:Ra,history:Qe,showToolbar:Wt,showStyleStrip:Jd,showDetailPanel:eu,showStatusBadges:tu,showResizeHandles:nu,showControls:ou,showShareMenu:ru,showMiniMap:Zi,enableKeyboard:Xi,enableContextMenu:Yi,enableDragDrop:Qi,enableImageDrop:ta,enableZoom:na,enablePan:au,enableSelection:iu,enableNodeMove:zo,enableEmbed:Ji}=e,Fe=m.useMemo(()=>zot({mode:n,showToolbar:Wt,showStyleStrip:Jd,showDetailPanel:eu,showStatusBadges:tu,showResizeHandles:nu,showControls:ou,showShareMenu:ru,showMiniMap:Zi,enableKeyboard:Xi,enableContextMenu:Yi,enableDragDrop:Qi,enableImageDrop:ta,enableZoom:na,enablePan:au,enableSelection:iu,enableNodeMove:zo,enableEmbed:Ji}),[n,Wt,Jd,eu,tu,nu,ou,ru,Zi,Xi,Yi,Qi,ta,na,au,iu,zo,Ji]),Nt=n==="edit",Ta=m.useRef(Fe);m.useEffect(()=>{Ta.current=Fe},[Fe]);const su=Ht??(n==="mini"?!0:void 0),oa=m.useMemo(()=>Rot(su),[su]),ur=x==null?void 0:x.runs,ra=x==null?void 0:x.statuses,vo=(xV=x==null?void 0:x.pendingOverrides)==null?void 0:xV.nodes,Yn=(wV=x==null?void 0:x.pendingOverrides)==null?void 0:wV.connectors,sn=m.useRef(null),Gt=m.useRef(null),Ro=m.useRef(!1),es=m.useRef(!1),cu=m.useRef(!1),To=m.useRef(oa);To.current=oa,m.useEffect(()=>{if(Ro.current||!oa.onMount||u.length===0)return;const B=Gt.current;B&&(B.fitView(S2),Ro.current=!0)},[u,oa.onMount]);const ts=m.useRef(null),pt=Ae.kind==="draw"?Ae.shape:null,Qn=Ae.kind==="hand",Da=m.useRef(new Map),lu=m.useCallback((B,Z)=>(Da.current.set(B,Z),()=>{Da.current.get(B)===Z&&Da.current.delete(B)}),[]),[aa,ia]=m.useState(!1),du=m.useRef(!1);m.useEffect(()=>{du.current=aa},[aa]);const ns=m.useRef(!1),hr=m.useRef(!1),sa=m.useRef(!1),[tn,fr]=m.useState(null),Ha=m.useRef(null);m.useEffect(()=>{Ha.current=tn},[tn]),m.useCallback(()=>{fr(null)},[]);const Do=m.useMemo(()=>Wot(sa),[]),zn=m.useRef(null),Jn=m.useRef(null),Oa=m.useCallback(B=>{const Z=sn.current;if(!Z){zn.current=B;return}const ie=zn.current;if(ie&&ie!==B){const de=Z.querySelector(`.react-flow__node[data-id="${CSS.escape(ie)}"]`);de==null||de.removeAttribute("data-connect-source")}if(B){const de=Z.querySelector(`.react-flow__node[data-id="${CSS.escape(B)}"]`);de==null||de.setAttribute("data-connect-source","true")}zn.current=B},[]),xo=m.useCallback(B=>{const Z=sn.current,ie=Jn.current;if(ie!==B){if(Z&&ie){const de=Z.querySelector(`.react-flow__node[data-id="${CSS.escape(ie)}"]`);de==null||de.removeAttribute("data-connect-target")}if(Z&&B){const de=Z.querySelector(`.react-flow__node[data-id="${CSS.escape(B)}"]`);de==null||de.setAttribute("data-connect-target","true")}Jn.current=B}},[]),ca=m.useCallback(()=>{Oa(null),xo(null)},[Oa,xo]);m.useEffect(()=>{if(!aa){xo(null);return}let B=null,Z=null;const ie=()=>{B=null;const ue=Z;if(Z=null,!ue)return;const je=gD(sn.current,ue.clientX,ue.clientY),we=(je==null?void 0:je.getAttribute("data-id"))??null;if(we&&we===zn.current){xo(null);return}xo(we)},de=ue=>{Z={clientX:ue.clientX,clientY:ue.clientY},B===null&&(B=requestAnimationFrame(ie))};return document.addEventListener("pointermove",de,{passive:!0}),()=>{document.removeEventListener("pointermove",de),B!==null&&cancelAnimationFrame(B)}},[aa,xo]);const[Fa,o2]=m.useState(null),[dt,qa]=m.useState(null),pr=m.useRef(null),wo=m.useRef(null),la=m.useRef(null),Va=m.useRef(!1);m.useEffect(()=>{pr.current=pt},[pt]);const uu=m.useCallback(()=>{De({kind:"select"}),o2(null),qa(null),pr.current=null,wo.current=null,la.current=null,Va.current=!1},[De]);m.useEffect(()=>{if(!Fe.enableKeyboard)return;const B=Z=>{var ue,je;if(Z.key!=="Escape"||CO(document.activeElement))return;if(pr.current){Z.preventDefault(),uu();return}if(du.current){Z.preventDefault(),ns.current=!0,hr.current=!0;try{(ue=ts.current)==null||ue.getState().cancelConnection()}catch{}document.dispatchEvent(new MouseEvent("mouseup",{bubbles:!0,cancelable:!0,button:0})),ia(!1);return}if(Ha.current){Z.preventDefault(),fr(null);return}const ie=bn.current.size>0,de=bo.current.size>0;(ie||de)&&(Z.preventDefault(),(je=Mo.current)==null||je.call(Mo,[],[]))};return window.addEventListener("keydown",B),()=>window.removeEventListener("keydown",B)},[uu,Fe.enableKeyboard]),m.useEffect(()=>{if(!Fe.enableKeyboard)return;const B=Z=>{const ie=NHe(Z,{isEditableActive:CO(document.activeElement)});ie&&Qe&&(Z.preventDefault(),Z.stopPropagation(),ie==="undo"?Qe.undo():Qe.redo())};return window.addEventListener("keydown",B),()=>window.removeEventListener("keydown",B)},[Qe,Fe.enableKeyboard]),m.useEffect(()=>{if(!Fe.enableKeyboard)return;const B=Z=>{Xot({event:Z,selectedNodeIds:y,hasClipboard:!!j,activeElement:document.activeElement,onCopySelection:K,onPasteSelection:X})};return window.addEventListener("keydown",B),()=>window.removeEventListener("keydown",B)},[y,j,K,X,Fe.enableKeyboard]);const Of=m.useCallback(B=>{var de,ue;if(!pr.current)return;const Z=B.target;if(!(Z!=null&&Z.classList.contains("react-flow__pane")))return;const ie={x:B.clientX,y:B.clientY};Va.current=!0,wo.current=ie,la.current=ie,o2(ie),qa(ie);try{(ue=(de=B.currentTarget).setPointerCapture)==null||ue.call(de,B.pointerId)}catch{}B.preventDefault(),B.stopPropagation()},[]),hu=m.useCallback(B=>{if(!Va.current)return;const Z={x:B.clientX,y:B.clientY};la.current=Z,qa(Z)},[]),DR=m.useCallback(B=>{var mr,c2;if(!Va.current)return;Va.current=!1;try{(c2=(mr=B.currentTarget).releasePointerCapture)==null||c2.call(mr,B.pointerId)}catch{}const Z=wo.current,ie=la.current,de=pr.current,ue=Gt.current;if(uu(),!Z||!ie||!de||!ue)return;const je=Math.min(Z.x,ie.x),we=Math.min(Z.y,ie.y),Ee=Math.max(Z.x,ie.x),nt=Math.max(Z.y,ie.y),lt=Ee-je,ht=nt-we,Pe=ue.screenToFlowPosition({x:je,y:we}),Dn=ue.screenToFlowPosition({x:Ee,y:nt}),Oo=Dn.x-Pe.x,ft=Dn.y-Pe.y;if(de==="linkflow"){const MV=lt<CK&&ht<CK,Jae=MV?hz.width:Math.max(Oo,fz.width),eie=MV?hz.height:Math.max(ft,fz.height);W==null||W(Pe,{width:Jae,height:eie});return}const _e=lt<_K||ht<_K,Kt=_e?uz[de].width:Oo,mu=_e?uz[de].height:ft;z==null||z(de,Pe,{width:Kt,height:mu})},[uu,z,W]),yr=m.useRef(!1),Ba=m.useRef(!1),Ff=m.useRef(new Map),os=m.useCallback(()=>{var B;es.current&&(Ba.current||yr.current||(es.current=!1,(B=Gt.current)==null||B.fitView(S2)))},[]),r2=m.useCallback(B=>{Ba.current=B,B||os()},[os]);m.useEffect(()=>{var B;if(!cu.current){cu.current=!0;return}if(To.current.onExternalNodeChange){if(Ba.current||yr.current){es.current=!0;return}(B=Gt.current)==null||B.fitView(S2)}},[Pn]);const qf=!!R||!!L||!!V||!!H||!!he,[wn,Ua]=m.useState(null),[q,F]=m.useState(!1),[U,G]=m.useState(null),[ee,ze]=m.useState(null),Je=m.useRef(null),et=m.useRef(null);m.useEffect(()=>{if(!wn)return;const B=et.current;if(!B)return;const Z=new MouseEvent("contextmenu",{clientX:wn.x,clientY:wn.y,bubbles:!0,cancelable:!0,button:2,buttons:2});B.dispatchEvent(Z)},[wn]);const Pt=m.useCallback(B=>{const Z=Je.current;!Z||!R||R(Z,B)},[R]),Ho=m.useCallback(()=>{const B=Je.current;!B||!L||L(B)},[L]),fu=m.useCallback(()=>{const B=Je.current;!B||!V||V(B)},[V]),He=m.useCallback(()=>{const B=Je.current;!B||!ae||ae(B)},[ae]);m.useCallback((B,Z,ie,de,ue)=>{Ta.current.enableContextMenu&&(Je.current=null,F(!1),G(null),ze({connectorId:B,kind:Z,pinned:ie}),Ua({x:de,y:ue}))},[]);const Mn=m.useCallback(()=>{const B=ee;!B||!he||he(B.connectorId,B.kind)},[ee,he]),pu=m.useCallback(()=>{if(!H)return;const B=wn,Z=Gt.current;if(!B||!Z)return;const ie=Z.screenToFlowPosition({x:B.x,y:B.y});H(ie)},[wn,H]),rs=typeof navigator<"u"&&/Mac|iPhone|iPad|iPod/.test(navigator.platform||navigator.userAgent||""),yu=rs?"⌘C":"Ctrl+C",HR=rs?"⌘V":"Ctrl+V",Wa=m.useMemo(()=>new Set(y),[y]),Rn=m.useMemo(()=>new Set(g),[g]),We=m.useMemo(()=>{if(y.length<2)return[];const B=vo,Z=[];for(const ie of y){const de=u.find(Ee=>Ee.id===ie);if(!de)continue;const ue=B==null?void 0:B[ie],je=(ue==null?void 0:ue.data)??{},we=de.data;Z.push({id:ie,position:(ue==null?void 0:ue.position)??de.position,data:{width:je.width??we.width,height:je.height??we.height}})}return Z},[u,vo,y]),nn=J??[],on=m.useMemo(()=>{const B=ue=>{const je=Nt?void 0:Ff.current.get(ue.id),we={id:ue.id,type:ue.type,position:je??ue.position,data:{...ue.data,projectId:i,fileBaseUrl:c,projectSlug:ue.type==="component"?i:void 0,flowSlug:ue.type==="component"?s:void 0,apiBaseUrl:ue.type==="component"?l:void 0,onRetryUpload:T,status:Yot(ur,ue.id),errorMessage:Qot(ur,ue.id),statusReport:ra==null?void 0:ra[ue.id],onPlay:v,onResize:b,onResizeEnd:C,setResizing:r2,onFitToContent:ue.type==="html"?_:ue.type==="component"?S:void 0,onNameChange:(()=>{if(Nt&&ue.type!=="ellipse")return P})(),onDescriptionChange:(()=>{if(Nt&&(ue.type==="rectangle"||ue.type==="ellipse"||ue.type==="sticky"))return A})(),onIconChange:(()=>{if(Nt&&!(ue.type!=="rectangle"&&ue.type!=="component"))return Le})(),autoEditOnMount:Qt===ue.id?!0:void 0},selected:Wa.has(ue.id)};return(!(ue.data.autoSize===!0)||Ba.current)&&(ue.data.width!==void 0&&(we.width=ue.data.width),ue.data.height!==void 0&&(we.height=ue.data.height)),Wa.has(ue.id)||(we.connectable=!1),we},Z=u.map(ue=>B(Hot(ue,vo==null?void 0:vo[ue.id]))),ie=new Set(u.map(ue=>ue.id)),de=[];if(vo)for(const[ue,je]of Object.entries(vo)){if(ie.has(ue))continue;const we=je;typeof we.type!="string"||!we.position||!we.data||de.push(B({...we,id:ue}))}return[...Z,...de]},[i,s,c,l,u,Wa,ur,ra,v,b,C,_,S,r2,vo,P,A,Le,T,Qt,Nt]),[Tn,Ga]=m.useState(on);m.useEffect(()=>{yr.current||Ba.current||Ga(on)},[on]),m.useEffect(()=>{a2.current=Tn},[Tn]);const bn=m.useRef(Wa);m.useEffect(()=>{bn.current=Wa},[Wa]);const Mo=m.useRef(k);m.useEffect(()=>{Mo.current=k},[k]);const bo=m.useRef(Rn);m.useEffect(()=>{bo.current=Rn},[Rn]);const a2=m.useRef(on),as=m.useRef(!1),Vf=m.useRef(new Set),Bf=m.useRef(new Set),OR=m.useRef(new Set),FR=m.useRef(new Set),Ka=m.useRef(null),kae=m.useCallback(B=>{var ft;const Z=as.current?OR.current:(ft=Ka.current)!=null&&ft.shift?Ka.current.nodeIds:null,ie=Z&&Z.size>0?B.filter(_e=>_e.type!=="select"?!0:!(_e.selected===!1&&Z.has(_e.id))):B,de=new Set;for(const _e of ie)_e.type==="select"&&de.add(_e.id);const ue=XQ(ie,a2.current),je=new Set;if(Ba.current)for(const _e of ie)_e.type==="dimensions"&&je.add(_e.id);const we=je.size===0?ue:ue.map(_e=>!je.has(_e.id)||_e.width===void 0&&_e.height===void 0?_e:{..._e,data:{..._e.data,..._e.width!==void 0?{width:_e.width}:{},..._e.height!==void 0?{height:_e.height}:{}}}),Ee=bn.current,nt=as.current||Ee.size===0?we:we.map(_e=>Ee.has(_e.id)&&!de.has(_e.id)&&!_e.selected?{..._e,selected:!0}:_e);if(a2.current=nt,Ga(nt),de.size===0)return;if(as.current){for(const _e of ie)_e.type==="select"&&(_e.selected?Vf.current.add(_e.id):Vf.current.delete(_e.id));return}const lt=Mo.current;if(!lt)return;const ht=nt.filter(_e=>_e.selected).map(_e=>_e.id),Pe=bn.current;Pe.size===ht.length&&ht.every(_e=>Pe.has(_e))||(bn.current=new Set(ht),lt(ht,[...bo.current]))},[]),Uf=m.useRef([]),vae=m.useCallback(B=>{var ht;const Z=as.current?FR.current:(ht=Ka.current)!=null&&ht.shift?Ka.current.edgeIds:null,ie=Z&&Z.size>0?B.filter(Pe=>Pe.type!=="select"?!0:!(Pe.selected===!1&&Z.has(Pe.id))):B,de=new Set;for(const Pe of ie)Pe.type==="select"&&de.add(Pe.id);if(de.size===0)return;if(as.current){for(const Pe of ie)Pe.type==="select"&&(Pe.selected?Bf.current.add(Pe.id):Bf.current.delete(Pe.id));return}const ue=Mo.current;if(!ue)return;const we=YQ(ie,Uf.current).filter(Pe=>Pe.selected).map(Pe=>Pe.id),Ee=bo.current;Ee.size===we.length&&we.every(Pe=>Ee.has(Pe))||(bo.current=new Set(we),ue([...bn.current],we))},[]),xae=m.useCallback(B=>{as.current=!0;const Z=Ka.current,ie=(Z==null?void 0:Z.shift)??(B.shiftKey||B.metaKey||B.ctrlKey);OR.current=ie?new Set((Z==null?void 0:Z.nodeIds)??bn.current):new Set,FR.current=ie?new Set((Z==null?void 0:Z.edgeIds)??bo.current):new Set,Vf.current=new Set(OR.current),Bf.current=new Set(FR.current)},[]),wae=m.useCallback(()=>{as.current=!1,Ka.current=null;const B=Mo.current;if(!B)return;const Z=[...Vf.current],ie=new Set(Z),de=new Set(Bf.current);for(const nt of Uf.current)ie.has(nt.source)&&ie.has(nt.target)&&de.add(nt.id);const ue=bn.current,je=bo.current,we=ue.size===ie.size&&Z.every(nt=>ue.has(nt)),Ee=je.size===de.size&&[...de].every(nt=>je.has(nt));we&&Ee||(bn.current=new Set(Z),bo.current=new Set(de),B(Z,[...de]))},[]),Mae=m.useCallback(B=>{if(Ka.current=null,pr.current||B.button!==0)return;const Z=B.target;Z!=null&&Z.classList.contains("react-flow__pane")&&(Ka.current={shift:B.shiftKey||B.metaKey||B.ctrlKey,nodeIds:new Set(bn.current),edgeIds:new Set(bo.current)})},[]),bae=m.useCallback(B=>{if(!Ta.current.enableContextMenu||bn.current.size<2)return;const ie=B.target;ie!==et.current&&(ie!=null&&ie.closest(".seeflow-connector-endpoint-dot")||(B.preventDefault(),B.stopPropagation(),Je.current=null,F(!0),G(null),ze(null),Ua({x:B.clientX,y:B.clientY})))},[]),_ae=m.useCallback(B=>{const Z=B.dataTransfer;if(!Z)return;const ie=Z.types?Array.from(Z.types):[],de=ie.includes("Files"),ue=ie.includes(iG),je=de&&!!$&&Fe.enableImageDrop,we=ue&&!!D&&Fe.enableDragDrop;if(!(!je&&!we)){B.preventDefault();try{Z.dropEffect="copy"}catch{}}},[$,D,Fe.enableImageDrop,Fe.enableDragDrop]),Cae=m.useCallback(B=>{const Z=B.dataTransfer;if((Z!=null&&Z.types?Array.from(Z.types):[]).includes(iG)&&D&&Fe.enableDragDrop){B.preventDefault();const je=Gt.current;if(!je)return;const we=je.screenToFlowPosition({x:B.clientX,y:B.clientY});D({position:we});return}if(!$||!Fe.enableImageDrop)return;const ue={x:B.clientX,y:B.clientY};B.preventDefault(),UAe({dataTransfer:Z,clientPos:ue,rfInstance:Gt.current,computeDims:WAe,dispatch:$})},[$,D,Fe.enableImageDrop,Fe.enableDragDrop]),rV=!!I,aV=Rn.size===1?[...Rn][0]:null,qR=m.useMemo(()=>{const B=Ee=>{const nt=AK(ur,Ee.source)==="running"||AK(ur,Ee.target)==="running",lt=Rn.has(Ee.id),ht=JDe(Ee,nt,lt);lt&&(ht.selected=!0);const Pe=rV&&Ee.id===aV,Dn=Pe?{...ht,reconnectable:!0}:ht;return{...Dn,data:{...Dn.data,onLabelChange:Nt?E:void 0,reconnectable:Pe,registerEditHandle:lu}}},Z=new Set(p.map(Ee=>Ee.id)),ie=p.map(Ee=>B(Oot(Ee,Yn==null?void 0:Yn[Ee.id]))),de=[];if(Yn)for(const[Ee,nt]of Object.entries(Yn)){if(Z.has(Ee))continue;const lt=nt;typeof lt.source!="string"||typeof lt.target!="string"||de.push(B({...lt,id:Ee}))}const ue=[...ie,...de],je=[],we=[];for(const Ee of ue)Rn.has(Ee.id)?we.push(Ee):je.push(Ee);return[...je,...we]},[p,ur,Rn,aV,Yn,E,rV,lu,Nt]);m.useEffect(()=>{Uf.current=qR},[qR]);const i2=e.adapter??null,Sae=m.useMemo(()=>{if(i2!=null&&i2.computeLayout)return async()=>{const B=Gt.current,Z=a2.current;if(Z.length<2)return;const ie=Z.map(ft=>{var c2;const _e=(c2=B==null?void 0:B.getInternalNode(ft.id))==null?void 0:c2.measured,Kt=ft.data,mu=(_e==null?void 0:_e.width)??Kt.width??200,mr=(_e==null?void 0:_e.height)??Kt.height??120;return{id:ft.id,type:ft.type,width:mu,height:mr}}),de=new Map;for(const ft of Z)de.set(ft.id,ft.position);const ue=Uf.current.map(ft=>({id:ft.id,source:ft.source,target:ft.target})),je=i2.computeLayout;if(!je)return;const we=await je(ie,ue),Ee=new Map;for(const[ft,_e]of Object.entries(we.nodes))Ee.set(ft,_e.position);let nt=Number.POSITIVE_INFINITY,lt=Number.POSITIVE_INFINITY,ht=Number.POSITIVE_INFINITY,Pe=Number.POSITIVE_INFINITY;for(const ft of ie){const _e=de.get(ft.id);if(!_e)continue;_e.x<nt&&(nt=_e.x),_e.y<lt&&(lt=_e.y);const Kt=Ee.get(ft.id);Kt&&(Kt.x<ht&&(ht=Kt.x),Kt.y<Pe&&(Pe=Kt.y))}const Dn=Number.isFinite(nt)&&Number.isFinite(ht)?nt-ht:0,Oo=Number.isFinite(lt)&&Number.isFinite(Pe)?lt-Pe:0;Ga(ft=>ft.map(_e=>{const Kt=Ee.get(_e.id);return Kt?{..._e,position:{x:Kt.x+Dn,y:Kt.y+Oo}}:_e}))}},[i2]),Wf=Ye??(Nt?void 0:Sae),Gf=m.useRef(!1),iV=m.useRef(null),Lae=m.useCallback(B=>{var Ee;if(!Nt||!O)return;const{source:Z,target:ie}=B;if(!Z||!ie||Z===ie)return;Gf.current=!0;const de=((Ee=iV.current)==null?void 0:Ee.nodeId)??null,ue=de!==null&&de===ie&&de!==Z;O(ue?ie:Z,ue?Z:ie)},[O,Nt]),VR=m.useCallback(B=>{const Z=ie=>{if(!ie)return!1;const de=a2.current.find(ue=>ue.id===ie);return de?de.type==="text":!1};return!Z(B.source)&&!Z(B.target)},[]),Nae=m.useCallback((B,Z)=>{var ht;ia(!1),ca();const ie=Gf.current;if(Gf.current=!1,ie||sa.current)return;if(ns.current){ns.current=!1;return}if(!O)return;const de=(ht=Z.fromNode)==null?void 0:ht.id,ue=Z.fromHandle;if(!de||!ue)return;const je=SK(B);if(!je)return;const we=gD(sn.current,je.clientX,je.clientY);if(!we)return;const Ee=we.getAttribute("data-id");if(!Ee||Ee===de||!VR({source:de,target:Ee,sourceHandle:null,targetHandle:null}))return;let nt;const lt=Gt.current;if(lt){const Pe=lt.getInternalNode(Ee);if(Pe){const Dn=Pe.measured.width??Pe.width??0,Oo=Pe.measured.height??Pe.height??0;if(Dn>0&&Oo>0){const ft=lt.screenToFlowPosition({x:je.clientX,y:je.clientY});nt=DH({x:Pe.internals.positionAbsolute.x,y:Pe.internals.positionAbsolute.y,w:Dn,h:Oo},ft)}}}O(de,Ee,nt?{targetPin:nt}:void 0)},[O,ca,VR]),Kf=m.useRef(!1),Iae=m.useCallback((B,Z)=>{if(!I)return;const{source:ie,target:de,sourceHandle:ue,targetHandle:je}=Z;if(!ie||!de||ie===de)return;const we={};if(ie!==B.source&&(we.source=ie),de!==B.target&&(we.target=de),typeof ue=="string"&&ue!==B.sourceHandle&&(we.sourceHandle=ue),typeof je=="string"&&je!==B.targetHandle&&(we.targetHandle=je),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 Ee=Gt.current;if(!(we.source===void 0&&we.target===void 0)&&Ee){const lt=we.source!==void 0?"source":"target",ht=LK(lt,B.source,B.target,B.data,Pe=>Ee.getInternalNode(Pe)??null);ht&&(lt==="source"?we.targetPin=ht:we.sourcePin=ht)}Kf.current=!0,I(B.id,we)},[I]),Aae=m.useCallback((B,Z,ie,de)=>{var mu;ia(!1),ca(),sa.current=!1;const ue=Kf.current;if(Kf.current=!1,ue)return;if(hr.current){hr.current=!1;return}if(!I)return;const je=SK(B);let we=((mu=de.toNode)==null?void 0:mu.id)??null;if(!we&&je){const mr=gD(sn.current,je.clientX,je.clientY);we=(mr==null?void 0:mr.getAttribute("data-id"))??null}const Ee=ie==="source"?"target":"source",nt=Dot(Ee,Z.source,Z.target,we);if(nt==="no-op"||nt==="self-loop"||!je)return;const lt=Gt.current;if(!lt)return;const ht=nt==="pin-own"?Ee==="source"?Z.source:Z.target:we,Pe=lt.getInternalNode(ht);if(!Pe)return;const Dn=Pe.measured.width??Pe.width??0,Oo=Pe.measured.height??Pe.height??0;if(Dn===0||Oo===0)return;const ft=lt.screenToFlowPosition({x:je.clientX,y:je.clientY}),_e=DH({x:Pe.internals.positionAbsolute.x,y:Pe.internals.positionAbsolute.y,w:Dn,h:Oo},ft);if(nt==="pin-own"){if(!Y)return;Y(Z.id,Ee,_e);return}const Kt=LK(Ee,Z.source,Z.target,Z.data,mr=>lt.getInternalNode(mr)??null);Ee==="source"?I(Z.id,{source:we,sourceHandle:null,sourceHandleAutoPicked:!1,sourcePin:_e,...Kt?{targetPin:Kt}:{}}):I(Z.id,{target:we,targetHandle:null,targetHandleAutoPicked:!1,targetPin:_e,...Kt?{sourcePin:Kt}:{}})},[I,ca,Y]),is=m.useMemo(()=>{var Ee;if(!Fa||!dt)return null;const B=(Ee=sn.current)==null?void 0:Ee.getBoundingClientRect(),Z=(B==null?void 0:B.left)??0,ie=(B==null?void 0:B.top)??0,de=Math.min(Fa.x,dt.x),ue=Math.min(Fa.y,dt.y),je=Math.abs(dt.x-Fa.x),we=Math.abs(dt.y-Fa.y);return{left:de-Z,top:ue-ie,width:je,height:we}},[Fa,dt]),Za=pt?$2(ri).node:void 0,s2=pt==="linkflow",Eae=pt&&!s2?Mte(pt):"",jae=pt&&!s2?bte(pt,Za):void 0,$ae=pt==="text",[sV,cV]=m.useState(!1),[Pae,Zf]=m.useState(!1),[zae,lV]=m.useState(!1),[dV,Rae]=m.useState(()=>({canUndo:(Qe==null?void 0:Qe.canUndo)??!1,canRedo:(Qe==null?void 0:Qe.canRedo)??!1}));m.useEffect(()=>Qe?Qe.subscribe(Rae):void 0,[Qe]);const[uV,hV]=m.useState(!1),Tae=Qe?dV.canUndo:!1,Dae=Qe?dV.canRedo:!1,Xa=_ot({projectId:i,getReactFlow:()=>Gt.current});m.useImperativeHandle(t,()=>({exportPdf:Xa.exportPdf,exportPng:Xa.exportPng,openEmbedDialog:()=>lV(!0),capturePreview:Xa.capturePreview}),[Xa.exportPdf,Xa.exportPng,Xa.capturePreview]),m.useEffect(()=>{if(!Fe.enableKeyboard)return;const B=de=>{if(!de)return!1;const ue=de.tagName;return ue==="INPUT"||ue==="TEXTAREA"||ue==="SELECT"?!0:de instanceof HTMLElement&&de.isContentEditable},Z=de=>{de.code==="Space"&&(B(document.activeElement)||(de.preventDefault(),cV(!0)))},ie=de=>{de.code==="Space"&&(cV(!1),Zf(!1))};return window.addEventListener("keydown",Z),window.addEventListener("keyup",ie),()=>{window.removeEventListener("keydown",Z),window.removeEventListener("keyup",ie)}},[Fe.enableKeyboard]);const Xf=m.useCallback(B=>{if(B.length!==0){if(!Nt){const Z=Ff.current;for(const ie of B)Z.set(ie.id,{x:ie.position.x,y:ie.position.y});return}if(B.length===1){const Z=B[0];Z&&M&&M(Z.id,{x:Z.position.x,y:Z.position.y});return}if(w){w(B.map(Z=>({id:Z.id,position:{x:Z.position.x,y:Z.position.y}})));return}if(M)for(const Z of B)M(Z.id,{x:Z.position.x,y:Z.position.y})}},[M,w,Nt]),fV=m.useCallback((B,Z,ie)=>{yr.current=!1,Xf(ie),os()},[Xf,os]),pV=m.useCallback(()=>{yr.current=!0},[]),yV=m.useCallback((B,Z)=>{yr.current=!1,Xf(Z),os()},[Xf,os]),Hae=m.useCallback((B,Z)=>{Ha.current&&fr(null);const ie=sn.current;ie&&ie.style.setProperty("--rf-zoom",String(Z.zoom)),Ra==null||Ra(Z)},[Ra]),Oae=m.useCallback(()=>{yr.current=!0,ko==null||ko()},[ko]),Fae=m.useCallback((B,Z,ie)=>{fV(B,Z,ie),Xn==null||Xn()},[fV,Xn]),qae=m.useCallback(()=>{pV(),ko==null||ko()},[pV,ko]),Vae=m.useCallback((B,Z)=>{yV(B,Z),Xn==null||Xn()},[yV,Xn]),Bae=m.useCallback((B,Z)=>{var ie;(ie=Da.current.get(Z.id))==null||ie()},[]),Uae=m.useCallback((B,Z)=>{le==null||le(Z.id)},[le]),Wae=m.useCallback(B=>{jt==null||jt()},[jt]),Gae=m.useCallback((B,Z)=>{Ie==null||Ie(Z.id)},[Ie]),mV=pt?"crosshair":Qn||sV?Pae?"grabbing":"grab":void 0,gV=y.length+g.length===1,kV=gV?y[0]:void 0,vV=gV?g[0]:void 0,Kae=kV?u.find(B=>B.id===kV)??null:null;vV&&p.find(B=>B.id===vV);const Zae=i??null,BR=Fe.showDetailPanel&&!Ke,Xae=BR,Yae=m.useMemo(()=>({custom:en??{}}),[en]),Qae=m.useMemo(()=>({studioBaseUrl:h}),[h]),Yf=o==null?void 0:o.icons;return m.useEffect(()=>{if(!Yf)return;let B=!1;return(async()=>{try{const Z=await Yf.listPacks();if(B)return;kH(Z)}catch{}})(),()=>{B=!0}},[Yf]),f.jsx(dFe,{value:Yae,children:f.jsx(zAe,{value:Qae,children:f.jsx("div",{"data-testid":"seeflow-canvas","data-mode":n,"data-canvas-mode":Ae.kind,"data-can-undo":Tae?"true":"false","data-can-redo":Dae?"true":"false",ref:sn,className:"seeflow-canvas-root sf:relative sf:flex sf:h-full sf:w-full",style:mV?{cursor:mV}:void 0,onPointerDownCapture:Mae,onPointerDown:B=>{sV&&Zf(!0),Of(B)},onPointerMove:hu,onPointerUp:B=>{Zf(!1),DR(B)},onPointerCancel:()=>{Va.current=!1,wo.current=null,la.current=null,o2(null),qa(null),Zf(!1)},onContextMenuCapture:bae,onDragOver:_ae,onDrop:Cae,children:f.jsxs(MBe,{containerRef:sn,children:[f.jsxs("div",{className:"sf:relative sf:flex-1 sf:min-w-0 sf:h-full",children:[f.jsxs(mDe,{nodes:Tn,edges:qR,onNodesChange:kae,nodeTypes:Fot,edgeTypes:qot,proOptions:Bot,fitView:!0,minZoom:n==="mini"?.05:.5,nodesDraggable:(Nt?!!M:!0)&&!pt&&!Qn&&Fe.enableNodeMove,nodesConnectable:Nt&&!!O&&!pt&&!Qn,deleteKeyCode:Nt?["Backspace","Delete"]:null,zoomOnScroll:Fe.enableZoom,zoomOnPinch:Fe.enableZoom,className:aa?"seeflow-connecting":void 0,onConnect:Nt?Lae:void 0,isValidConnection:VR,onConnectStart:(B,Z)=>{ia(!0),Gf.current=!1,iV.current={nodeId:Z.nodeId??null,handleType:Z.handleType??null},Oa(Z.nodeId??null)},onConnectEnd:Nae,onReconnect:Nt&&I?Iae:void 0,onReconnectStart:(B,Z,ie)=>{ia(!0),Kf.current=!1,sa.current=!0;const de=ie==="source"?Z.source:Z.target;Oa(de)},onReconnectEnd:Aae,connectionLineComponent:Do,connectionLineStyle:{strokeWidth:2},connectionRadius:32,reconnectRadius:10,edgesReconnectable:!1,elevateNodesOnSelect:!1,elementsSelectable:!pt&&!Qn&&Fe.enableSelection,selectNodesOnDrag:!1,nodeClickDistance:5,selectionOnDrag:!pt&&!Qn&&Fe.enableSelection,panOnDrag:pt?!1:Qn?[0,1,2]:Fe.enablePan?[1,2]:!1,selectionMode:M0.Partial,selectionKeyCode:null,multiSelectionKeyCode:pt?null:["Meta","Shift"],panActivationKeyCode:pt?null:"Space",onSelectionStart:xae,onSelectionEnd:wae,defaultEdgeOptions:Vot,zoomOnDoubleClick:!1,onInit:B=>{Gt.current=B;const Z=sn.current;Z&&Z.style.setProperty("--rf-zoom",String(B.getZoom())),Z&&Z.setAttribute("data-canvas-ready","true"),!Ro.current&&oa.onMount&&u.length>0&&(B.fitView(S2),Ro.current=!0),Re==null||Re(B)},onMove:Hae,onEdgesChange:vae,onNodeDragStart:Oae,onNodeDragStop:Fae,onSelectionDragStart:qae,onSelectionDragStop:Vae,onNodeClick:Uae,onEdgeClick:Gae,onEdgeDoubleClick:Bae,onPaneClick:Wae,onNodeContextMenu:Fe.enableContextMenu&&qf?(B,Z)=>{B.preventDefault(),Je.current=Z.id,F(!0),G(Z.type??null),ze(null),Ua({x:B.clientX,y:B.clientY})}:void 0,onPaneContextMenu:Fe.enableContextMenu&&H?B=>{B.preventDefault(),Je.current=null,F(!1),G(null),ze(null),Ua({x:B.clientX,y:B.clientY})}:void 0,children:[f.jsx(Got,{storeApiRef:ts}),f.jsx(Kot,{wrapperRef:sn}),f.jsx(CDe,{gap:12,size:.6}),n!=="mini"&&f.jsx(Not,{}),Fe.showControls?f.jsxs(jDe,{showInteractive:!1,showFitView:!1,children:[f.jsx(Wu,{"data-testid":"controls-fit-view","aria-label":"Fit view",title:"Fit view",disabled:u.length===0,onClick:()=>{var B;(B=Gt.current)==null||B.fitView(S2)},children:f.jsx(xd,{className:"sf:h-3 sf:w-3","aria-hidden":"true"})}),f.jsx(Wu,{"data-testid":"controls-tidy","aria-label":"Tidy layout (⌘⇧L)",title:"Tidy layout (⌘⇧L)",disabled:!Wf,onClick:()=>Wf==null?void 0:Wf(),children:f.jsx(ah,{className:"sf:h-3 sf:w-3","aria-hidden":"true"})})]}):null,Fe.showMiniMap?f.jsx(UDe,{className:"sf-canvas-minimap"}):null,Fe.showResizeHandles?f.jsx(xnt,{selectedNodes:We,onMultiResize:N}):null,r||Fe.showToolbar||Fe.showStyleStrip&&oe&&ge?f.jsx(L0,{position:"top-left",children:f.jsxs("div",{className:"sf:flex sf:flex-col sf:items-start sf:gap-2",children:[r,Fe.showToolbar?f.jsx(WKe,{mode:Ae,onModeChange:De,iconPickerOpen:se??!1,onOpenIconPicker:Q,onCloseIconPicker:$t,onPickIcon:hn,showShapeTools:Nt&&!!z,iconsAdapter:Yf}):null,Fe.showStyleStrip&&oe&&ge?f.jsx(bnt,{nodes:nn,connectors:re??[],onStyleNode:oe,onStyleNodePreview:ne,onStyleNodes:ce,onStyleNodesPreview:ve,onStyleConnector:ge,onStyleConnectorPreview:xe,onRequestIconReplace:ae}):null]})}):null,Fe.showShareMenu||a||BR?f.jsx(L0,{position:"top-right",children:f.jsxs("div",{className:"sf:flex sf:items-center sf:gap-1",children:[a,BR?f.jsx(Eot,{open:uV,onToggle:()=>hV(B=>!B)}):null,Fe.showShareMenu?f.jsx(Fre,{mode:n==="mini"?"view":n,projectId:i,enableEmbed:Fe.enableEmbed,onDownloadPdf:Xa.exportPdf,onDownloadPng:Xa.exportPng,onExportToCloud:n2,embedOpen:zae,onEmbedOpenChange:lV}):null]})}):null]}),is?f.jsxs("div",{"data-testid":"canvas-draw-ghost","data-ghost-shape":pt??void 0,"aria-hidden":!0,className:te("sf:pointer-events-none sf:absolute sf:z-10",Eae,$ae?"sf:rounded-sm sf:border sf:border-dashed sf:border-muted-foreground/40":"",s2?"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:{...jae,left:is.left,top:is.top,width:is.width,height:is.height},children:[s2?f.jsxs("span",{className:"sf:inline-flex sf:items-center sf:gap-2",children:[f.jsx(Ii,{size:14,"aria-hidden":!0}),f.jsx("span",{children:"Link to a flow"})]}):null,(()=>{if(s2)return null;const B=pt?gq[pt]:void 0;if(!B)return null;const Z=_te(Za);return f.jsx(B,{width:is.width,height:is.height,borderColor:Z.borderColor,backgroundColor:Z.backgroundColor,borderSize:(Za==null?void 0:Za.borderSize)??UF,borderStyle:Za==null?void 0:Za.borderStyle})})()]}):null,Fe.enableContextMenu&&qf?f.jsxs(zGe,{onOpenChange:B=>{B||(Ua(null),Je.current=null,G(null),ze(null))},children:[f.jsx(RGe,{asChild:!0,children:f.jsx("div",{ref:et,"data-testid":"node-context-menu-trigger","aria-hidden":!0,className:"sf:pointer-events-none sf:fixed",style:{left:(wn==null?void 0:wn.x)??0,top:(wn==null?void 0:wn.y)??0,width:0,height:0}})}),f.jsxs(Dne,{"data-testid":"node-context-menu",children:[ee!=null&&ee.pinned&&he?f.jsx(Lr,{"data-testid":"connector-endpoint-context-menu-unpin",onSelect:Mn,children:"Unpin"}):null,q&&V?f.jsxs(Lr,{"data-testid":"node-context-menu-copy",onSelect:fu,children:["Copy",f.jsx(sO,{children:yu})]}):null,H?f.jsxs(Lr,{"data-testid":"node-context-menu-paste",disabled:!j,onSelect:pu,children:["Paste",f.jsx(sO,{children:HR})]}):null,q&&(V||H)&&(U==="icon"&&ae||R||L)?f.jsx(uP,{}):null,q&&U==="icon"&&ae?f.jsx(Lr,{"data-testid":"node-context-menu-change-icon",onSelect:He,children:"Change icon"}):null,q&&U==="icon"&&ae&&(R||L)?f.jsx(uP,{}):null,q&&R?f.jsxs(f.Fragment,{children:[f.jsx(Lr,{"data-testid":"node-context-menu-to-front",onSelect:()=>Pt({op:"toFront"}),children:"Bring to front"}),f.jsx(Lr,{"data-testid":"node-context-menu-forward",onSelect:()=>Pt({op:"forward"}),children:"Bring forward"}),f.jsx(Lr,{"data-testid":"node-context-menu-backward",onSelect:()=>Pt({op:"backward"}),children:"Send backward"}),f.jsx(Lr,{"data-testid":"node-context-menu-to-back",onSelect:()=>Pt({op:"toBack"}),children:"Send to back"})]}):null,q&&R&&L?f.jsx(uP,{}):null,q&&L?f.jsx(Lr,{"data-testid":"node-context-menu-delete",onSelect:Ho,children:"Delete"}):null]})]}):null,xt?f.jsxs(Bd,{open:!!tn,onOpenChange:B=>{B||fr(null)},children:[f.jsx(bBe,{asChild:!0,children:f.jsx("div",{"data-testid":"drop-popover-anchor","aria-hidden":!0,className:"sf:pointer-events-none sf:fixed",style:{left:(tn==null?void 0:tn.clientX)??0,top:(tn==null?void 0:tn.clientY)??0,width:0,height:0}})}),f.jsx(Gi,{"data-testid":"drop-popover",align:"start",side:"bottom",sideOffset:4,className:"sf:w-auto sf:p-1",onOpenAutoFocus:B=>{B.preventDefault()},children:f.jsx("div",{role:"menu","aria-label":"Create connected node",className:"sf:flex sf:flex-col sf:gap-0.5",children:UKe.map(({shape:B,label:Z,Icon:ie})=>B==="linkflow"?null:f.jsxs("button",{type:"button",role:"menuitem","data-testid":`drop-popover-shape-${B}`,onClick:()=>{const de=tn;de&&(xt({sourceNodeId:de.sourceNodeId,position:{x:de.flowX,y:de.flowY},shape:B}),fr(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:Z})]},B))})})]}):null]}),Xae?f.jsx(Vtt,{flowId:Zae,node:Kae,connector:null,adapter:o??null,statusReport:Ft,onNameChange:fn,onDescriptionChange:Jt,onDetailChange:ke,onIconChange:Le,open:uV,onClose:()=>{var B;hV(!1),(B=Mo.current)==null||B.call(Mo,[],[])}}):null]})})})})}const ert=m.forwardRef(Jot);/**
|
|
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 drt=go("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"}]]),jK="seeflow.export.email",$K="seeflow.export.name",PK="seeflow.export.visibility";function urt({open:e,onOpenChange:t,project:n,flowName:o,onCapturePreview:r}){const[a,i]=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=tle(n),M=_F(e?n:null),w=M.flows;m.useEffect(()=>{e&&(i(localStorage.getItem(jK)??""),c(o??localStorage.getItem($K)??""),h(localStorage.getItem(PK)??"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(a.trim(),s.trim(),l,$,Array.from(k));localStorage.setItem(jK,a.trim()),localStorage.setItem($K,s.trim()),localStorage.setItem(PK,l),p({kind:"done",shareUrl:T})}catch($){p({kind:"error",message:$ instanceof Error?$.message:String($)})}},[v,a,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=a.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,W=w!==null&&k.size===w.length;return f.jsx(ir,{open:e,onOpenChange:t,children:f.jsxs(Xr,{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(Yr,{children:[f.jsx(Qr,{children:"Export project to seeflow.dev"}),f.jsx(Jr,{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:a,onChange:$=>i($.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(EK,{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:W?"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(crt,{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(sr,{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(EK,{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(Jre,{className:"h-4 w-4","aria-hidden":"true"}):f.jsx(tae,{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(art,{className:"h-4 w-4","aria-hidden":"true"})})]})]}),f.jsx(sr,{children:f.jsx(rt,{type:"button",onClick:()=>t(!1),"data-testid":"export-done",children:"Done"})})]})]})})}function hrt({open:e,onOpenChange:t,onCreated:n}){const[o,r]=m.useState(""),[a,i]=m.useState(""),[s,c]=m.useState(""),[l,h]=m.useState(null),[u,p]=m.useState(!1);m.useEffect(()=>{e&&(r(""),i(""),c(""),h(null),p(!1))},[e]);const y=o.trim(),g=a.trim(),k=s.trim(),x=g.length>0&&!u,v=async M=>{if(M.preventDefault(),!!x){p(!0),h(null);try{const w=await dle({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(Xr,{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(Yr,{children:[f.jsx(Qr,{children:"Create new project"}),f.jsx(Jr,{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:a,onChange:M=>i(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(sr,{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 zK="seeflow:navigate",frt=e=>(window.addEventListener("popstate",e),window.addEventListener(zK,e),()=>{window.removeEventListener("popstate",e),window.removeEventListener(zK,e)}),RK=()=>window.location.pathname,prt=()=>m.useSyncExternalStore(frt,RK,RK),rae=(e,t)=>`/projects/${encodeURIComponent(e)}/flows/${encodeURIComponent(t)}`,aae=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}},iae=e=>{const t=e.indexOf("/");return t<=0||t===e.length-1?null:{project:e.slice(0,t),flow:e.slice(t+1)}},yrt=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},mrt="seeflow:navigate",SO="seeflow:flow-stack",nV=e=>({project:e.project,flow:e.flow,slug:`${e.project}/${e.flow}`}),grt=e=>{const t=aae(e);return t?[nV(t)]:[]},krt=(e,t)=>[...e,nV(t)],vrt=e=>e?[nV(e)]:[],xrt=(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 Rr=[],TK=!1;const oV=()=>{typeof window>"u"||window.dispatchEvent(new Event(SO))},wrt=e=>(window.addEventListener(SO,e),()=>window.removeEventListener(SO,e)),DK=()=>Rr,sae=()=>m.useSyncExternalStore(wrt,DK,DK),cae=(e,t)=>{window.history.pushState({stackDepth:e},"",t),window.dispatchEvent(new Event(mrt))},Mrt=(e,t)=>{const n=window.history.state??null;window.history.replaceState({...n??{},stackDepth:e},"",t)},brt=e=>{const t=krt(Rr,e);cae(t.length,rae(e.project,e.flow)),Rr=t,oV()},_rt=()=>{window.history.back()},Io=e=>{const t=vrt(e),n=e?rae(e.project,e.flow):"/";window.location.pathname===n?Mrt(t.length,n):cae(t.length,n),Rr!==t&&(Rr=t,oV())},Crt=()=>{if(TK)return;Rr=grt(window.location.pathname);const e=window.history.state??null;typeof(e==null?void 0:e.stackDepth)!="number"&&window.history.replaceState({...e??{},stackDepth:Rr.length},"",window.location.pathname+window.location.search+window.location.hash),window.addEventListener("popstate",()=>{const t=window.history.state??null,n=aae(window.location.pathname),o=xrt(Rr,t==null?void 0:t.stackDepth,n);if(o!==null){Rr!==o&&(Rr=o,oV());return}Io(n)}),TK=!0},Srt="seeflow:last-flow:",lae=e=>`${Srt}${e}`,dae=e=>{if(typeof window>"u")return null;try{return window.localStorage.getItem(lae(e))}catch{return null}},Lrt=(e,t)=>{if(!(typeof window>"u"))try{window.localStorage.setItem(lae(e),t)}catch{}},Nrt=(e,t)=>{var o;if(e.length===0)return null;if(t){const r=e.find(a=>a.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 Irt({projects:e,currentProjectSlug:t,onProjectCreated:n,onUnregisterProject:o}){const[r,a]=m.useState(!1),[i,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(),a(P=>!P))};return document.addEventListener("keydown",S),()=>document.removeEventListener("keydown",S)},[]);const x=e.find(S=>S.projectSlug===t),v=S=>{const P=dae(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(Bd,{open:r,onOpenChange:a,children:[f.jsx(X0,{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(zte,{children:"⌘K"}),f.jsx(eae,{className:"h-3.5 w-3.5 opacity-60"})]})}),f.jsxs(Gi,{align:"end",sideOffset:6,className:"relative w-[320px] p-0","data-testid":"project-switcher-popover",children:[f.jsxs(xq,{children:[f.jsx($te,{placeholder:"Search projects..."}),f.jsxs(wq,{className:"pb-12",children:[f.jsx(Mq,{children:"No projects."}),e.length>0?f.jsx(pz,{heading:"Projects",children:e.map(S=>f.jsxs(yz,{value:`${S.name} ${S.projectSlug}`,onSelect:()=>{a(!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(),a(!1),w(S)},children:f.jsx(oae,{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:()=>{a(!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(nae,{className:"h-4 w-4"})})]})]}),f.jsx(hrt,{open:i,onOpenChange:s,onCreated:M}),f.jsx(ir,{open:c!==null,onOpenChange:S=>{S||b()},children:f.jsxs(Xr,{className:"sm:max-w-md","data-testid":"unregister-project-dialog",children:[f.jsxs(Yr,{children:[f.jsx(Qr,{children:g?"Delete project?":"Unregister project?"}),f.jsxs(Jr,{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(sr,{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 uae="seeflow:theme",HK="(prefers-color-scheme: dark)";function Art(e){return e==="light"||e==="dark"||e==="system"}function Ert(e){try{const t=e.getItem(uae);return Art(t)?t:"system"}catch{return"system"}}function jrt(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 $rt(e,t){try{e.setItem(uae,t)}catch{}}function Prt(e,t){return e==="system"?t?"dark":"light":e}function zrt(e,t){t==="dark"?(e.classList.add("dark"),e.classList.remove("light")):(e.classList.add("light"),e.classList.remove("dark"))}function Rrt(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 Trt(){const[e,t]=m.useState(()=>{if(typeof window>"u")return"system";const i=jrt(window.location.search);return i||Ert(window.localStorage)}),[n,o]=m.useState(()=>typeof window>"u"?!1:window.matchMedia(HK).matches);m.useEffect(()=>{if(typeof window>"u")return;const i=window.matchMedia(HK);return Rrt(i,o)},[]);const r=Prt(e,n);m.useEffect(()=>{typeof document>"u"||zrt(document.documentElement,r)},[r]);const a=m.useCallback(i=>{typeof window<"u"&&$rt(window.localStorage,i),t(i)},[]);return{theme:e,setTheme:a,resolvedTheme:r}}const Drt=[{value:"light",label:"Light"},{value:"dark",label:"Dark"},{value:"system",label:"System"}];function Hrt({projects:e,currentProjectSlug:t,onProjectCreated:n,onUnregisterProject:o,share:r,onBack:a,previousFlowName:i}){const{theme:s,setTheme:c}=Trt(),l=i!==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(Q0,{children:[f.jsx(J0,{asChild:!0,children:f.jsx("button",{type:"button",onClick:a,"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(rrt,{size:16,strokeWidth:2.25})})}),f.jsxs(Yd,{side:"bottom",children:["Back to ",i]})]}):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(drt,{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.101"]})]})]}),f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsx(Irt,{projects:e,currentProjectSlug:t,onProjectCreated:n,onUnregisterProject:o}),r?f.jsx(Fre,{mode:"edit",enableEmbed:!1,onDownloadPdf:r.onDownloadPdf,onDownloadPng:r.onDownloadPng,onExportToCloud:r.onExportToCloud}):null,f.jsxs(ooe,{children:[f.jsx(roe,{asChild:!0,children:f.jsx(rt,{type:"button",variant:"outline",size:"icon","aria-label":"Settings","data-testid":"settings-trigger",children:f.jsx(srt,{className:"h-4 w-4"})})}),f.jsxs(Eq,{align:"end",sideOffset:6,className:"w-44","data-testid":"settings-menu",children:[f.jsx(aoe,{children:"Theme"}),f.jsx(sKe,{value:s,onValueChange:h=>c(h),children:Drt.map(h=>f.jsx(ioe,{value:h.value,"data-testid":`theme-${h.value}`,children:h.label},h.value))})]})]})]})]})}const Ort=()=>{const[e,t]=m.useState(null),[n,o]=m.useState(null),r=m.useCallback(()=>nle().then(a=>{t(a),o(null)}).catch(a=>{console.error("[useDemos] failed",a),t([]),o(String(a))}),[]);return m.useEffect(()=>{r()},[r]),{demos:e,error:n,refresh:r}},Frt=()=>{const[e,t]=m.useState(null),[n,o]=m.useState(!0),[r,a]=m.useState(null),i=m.useCallback(()=>(o(!0),ole().then(c=>{t(c),a(null)}).catch(c=>{console.error("[useProjects] failed",c),t([]),a(String(c))}).finally(()=>o(!1))),[]);m.useEffect(()=>{i()},[i]);const s=m.useCallback(async(c,l)=>{await sle(c,l),await i()},[i]);return{projects:e,loading:n,error:r,refresh:i,unregisterProject:s}},qrt=(e={})=>{const[t,n]=m.useState(!1),{onRegistryReload:o,onHello:r}=e,a=m.useRef(o),i=m.useRef(r);return m.useEffect(()=>{a.current=o,i.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=i.current)==null||c.call(i)}),s.addEventListener("registry:reload",()=>{var c;(c=a.current)==null||c.call(a)}),()=>{s.close()}},[]),{connected:t}},hae="seeflow:last-project",Vrt=()=>{if(typeof window>"u")return null;try{return window.localStorage.getItem(hae)}catch{return null}},OK=e=>{if(!(typeof window>"u"))try{window.localStorage.setItem(hae,e)}catch{}},Brt=(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},Urt=(e,t)=>{const n=e!==null&&t!==null,[o,r]=m.useState(null),[a,i]=m.useState(n),[s,c]=m.useState(null),l=m.useCallback(()=>{!e||!t||(i(!0),ale(e,t).then(u=>{r(u),c(null)}).catch(u=>{console.error("[useDemoData] failed",u),c(String(u))}).finally(()=>i(!1)))},[e,t]),h=m.useCallback(u=>{r(u),c(null)},[]);return m.useEffect(()=>{if(!e||!t){r(null),i(!1);return}l()},[e,t,l]),{detail:o,loading:a,error:s,refresh:l,applyDetail:h}},Wrt=5,Grt={"node:running":"running","node:done":"done","node:error":"error"},Krt=(e,t)=>{if(t.type==="reset")return{};const n=e[t.nodeId]??[],o=[t.entry,...n].slice(0,Wrt);return{...e,[t.nodeId]:o}},Zrt=e=>{const[t,n]=m.useReducer(Krt,{}),o=m.useRef(n);o.current=n,m.useEffect(()=>{o.current({type:"reset"})},[e]);const r=m.useCallback(i=>{const s=Grt[i.type];if(!s)return;const c=typeof i.nodeId=="string"?i.nodeId:null;if(!c)return;const l=typeof i.runId=="string"?i.runId:void 0,h=typeof i.ts=="number"?i.ts:Date.now();o.current({type:"append",nodeId:c,entry:{status:s,ts:h,runId:l}})},[]),a=m.useCallback(()=>{o.current({type:"reset"})},[]);return{events:t,apply:r,reset:a}},Xrt=(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()}}}},Yrt=e=>{const[t,n]=m.useReducer(Xrt,{}),o=m.useRef(n);o.current=n,m.useEffect(()=>{o.current({type:"reset"})},[e]);const r=m.useCallback(i=>{const s=typeof i.nodeId=="string"?i.nodeId:null;if(!s)return;const c=typeof i.runId=="string"?i.runId:void 0;if(i.type==="node:running"){o.current({type:"running",nodeId:s,runId:c,ts:i.ts});return}if(i.type==="node:done"){const l=typeof i.status=="number"?i.status:void 0;o.current({type:"done",nodeId:s,runId:c,responseStatus:l,body:i.body,ts:i.ts});return}if(i.type==="node:error"){const l=typeof i.message=="string"?i.message:void 0;o.current({type:"error",nodeId:s,runId:c,message:l,ts:i.ts})}},[]),a=m.useCallback(()=>{o.current({type:"reset"})},[]);return{runs:t,apply:r,reset:a}},Qrt=new Set(["ok","warn","error","pending"]),Jrt=(e,t)=>{if(t.type!=="node:status")return e;const n=typeof t.nodeId=="string"?t.nodeId:null;if(!n||typeof t.state!="string"||!Qrt.has(t.state))return e;const o=typeof t.summary=="string"?t.summary:void 0,r=typeof t.detail=="string"?t.detail:void 0,a=t.data&&typeof t.data=="object"&&!Array.isArray(t.data)?t.data:void 0,i=typeof t.ts=="number"?t.ts:Date.now();return{...e,[n]:{state:t.state,summary:o,detail:r,data:a,ts:i}}},eat=(e,t)=>{switch(t.type){case"reset":return{};case"event":return Jrt(e,t.event)}},tat=e=>{const[t,n]=m.useReducer(eat,{}),o=m.useRef(n);o.current=n,m.useEffect(()=>{o.current({type:"reset"})},[e]);const r=m.useCallback(i=>{o.current({type:"event",event:i})},[]),a=m.useCallback(()=>{o.current({type:"reset"})},[]);return{statusByNode:t,apply:r,reset:a}},nat=(e,t={})=>{const[n,o]=m.useState(!1),{onHello:r,onFlowReload:a,onEvent:i}=t,s=m.useRef(r),c=m.useRef(a),l=m.useRef(i);return m.useEffect(()=>{s.current=r,c.current=a,l.current=i},[r,a,i]),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=FK(p,"flow:reload");(k=l.current)==null||k.call(l,y);const g=oat(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,FK(y,p))});return()=>{u.close()}},[e]),{connected:n}},FK=(e,t)=>{try{const n=JSON.parse(e.data);return{type:t,ts:Date.now(),...n}}catch{return{type:t,ts:Date.now()}}},oat=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,qK=["File","Edit","View","Tools","Layout","Selection","Help"],fae="seeflow:command-palette:recent",pae=5,yae=new Map(VF.map(e=>[e.id,e])),rat=e=>typeof e=="string"&&yae.has(e),VK=()=>{if(typeof window>"u")return[];try{const e=window.localStorage.getItem(fae);if(!e)return[];const t=JSON.parse(e);return Array.isArray(t)?t.filter(rat).slice(0,pae):[]}catch{return[]}},aat=e=>{if(!(typeof window>"u"))try{window.localStorage.setItem(fae,JSON.stringify(e))}catch{}},BK=(e,t)=>e.enabled?e.enabled(t):!0,iat=(e,t)=>t.length===0?!0:`${e.label} ${e.description??""}`.toLowerCase().includes(t);function sat({open:e,onOpenChange:t,runCommand:n,ctx:o}){const[r,a]=m.useState(""),[i,s]=m.useState(0),[c,l]=m.useState(()=>VK()),h=m.useRef(null),u=m.useRef(null);m.useEffect(()=>{e&&(a(""),s(0),l(VK()))},[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=yae.get(E);z&&P.push({cmd:z,enabled:BK(z,o)})}return{groups:[{category:"Recent",rows:P}],flat:P}}const C=new Map;for(const P of VF){if(!iat(P,b))continue;const A={cmd:P,enabled:BK(P,o)},E=C.get(P.category);E?E.push(A):C.set(P.category,[A])}const S=[...qK.filter(P=>C.has(P)),...Array.from(C.keys()).filter(P=>!qK.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,pae);return aat(_),_})},[]),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(i))},[x,i,g]);m.useEffect(()=>{if(!e)return;const b=u.current;if(!b)return;const C=b.querySelector(`[data-command-row-index="${i}"]`);C&&typeof C.scrollIntoView=="function"&&C.scrollIntoView({block:"nearest"})},[i,e]);const w=r.trim().length>0;return f.jsx(pq,{open:e,onOpenChange:t,children:f.jsx(vR,{children:f.jsxs(Y0,{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=>a(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===i;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 cat(e){return e.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")}const lat=/^[a-z0-9][a-z0-9-]*$/,dat={"--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 uat({open:e,onOpenChange:t,onCreate:n,onCreated:o}){const[r,a]=m.useState(""),[i,s]=m.useState(""),[c,l]=m.useState(!1),[h,u]=m.useState(null),[p,y]=m.useState(!1);m.useEffect(()=>{e&&(a(""),s(""),l(!1),u(null),y(!1))},[e]);const g=C=>{a(C),c||s(cat(C))},k=C=>{s(C),c||l(!0)},x=i.trim(),v=r.trim(),M=x.length>0&&lat.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(Xr,{className:"sm:max-w-md",style:dat,"data-testid":"flow-create-dialog",onOpenAutoFocus:C=>{C.preventDefault();const _=document.querySelector('[data-testid="flow-create-name-input"]');_==null||_.focus()},children:[f.jsxs(Yr,{children:[f.jsx(Qr,{children:"Create new flow"}),f.jsx(Jr,{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:i,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(sr,{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 hat({open:e,onOpenChange:t,flow:n,flows:o,onDelete:r,onDeleted:a}){var M;const i=m.useMemo(()=>o.filter(w=>w.flowSlug!==(n==null?void 0:n.flowSlug)),[o,n==null?void 0:n.flowSlug]),s=((M=i[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),a==null||a(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(Xr,{className:"sm:max-w-md","data-testid":"flow-delete-dialog",children:[f.jsxs(Yr,{children:[f.jsx(Qr,{children:"Delete flow"}),f.jsxs(Jr,{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:i.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(sr,{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 fat({open:e,onOpenChange:t,flow:n,onRename:o,onRenamed:r}){const[a,i]=m.useState(""),[s,c]=m.useState(null),[l,h]=m.useState(!1);if(m.useEffect(()=>{e&&n&&(i(n.name),c(null),h(!1))},[e,n]),!n)return f.jsx(ir,{open:!1,onOpenChange:t});const u=a.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(Xr,{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(Yr,{children:[f.jsx(Qr,{children:"Rename flow"}),f.jsx(Jr,{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:a,onChange:k=>i(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(sr,{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 pat({project:e,activeFlow:t,flows:n,onSelect:o,onCreate:r,onRename:a,onDelete:i}){const[s,c]=m.useState(!1),l=n.find(h=>h.flowSlug===t);return f.jsxs(Bd,{open:s,onOpenChange:c,children:[f.jsx(X0,{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(eae,{className:"h-3.5 w-3.5 opacity-60"})]})}),f.jsx(Gi,{align:"start",sideOffset:6,className:"w-[260px] p-0","data-testid":"flow-switcher-popover",children:f.jsx(xq,{children:f.jsxs(wq,{children:[f.jsx(Mq,{children:"No flows."}),n.length>0?f.jsx(pz,{heading:"Flows",children:n.map(h=>{const u=h.flowSlug===t;return f.jsxs(yz,{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),a==null||a(h.flowSlug)},children:f.jsx(irt,{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),i==null||i(h.flowSlug)},children:f.jsx(oae,{className:"h-3.5 w-3.5"})})]})]},h.flowSlug)})}):null,n.length>0?f.jsx(Pte,{}):null,f.jsx(pz,{children:f.jsxs(yz,{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(nae,{className:"h-4 w-4 opacity-70"}),f.jsx("span",{className:"font-medium",children:"New flow"})]})})]})})})]})}const yat={"--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"},UK=e=>e?`${e.project}/${e.flow}`:null,mat=e=>{const t=e.indexOf("/");return t<1||t===e.length-1?null:{project:e.slice(0,t),flow:e.slice(t+1)}},WK=e=>`linkflow-picker-row-${e.replace(/\//g,"__")}`;function gat({open:e,onOpenChange:t,mode:n,demos:o,currentSlug:r,initialTarget:a,onCommit:i}){const[s,c]=m.useState(""),[l,h]=m.useState(()=>n==="edit"?UK(a):null);m.useEffect(()=>{e&&(c(""),h(n==="edit"?UK(a):null))},[e,n,a]);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=mat(l);w&&(i(w),t(!1))},[l,p,i,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?WK(l):void 0,M=p>=0;return f.jsx(ir,{open:e,onOpenChange:t,children:f.jsxs(Xr,{className:"sm:max-w-md",style:yat,"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(Yr,{children:[f.jsx(Qr,{"data-testid":"linkflow-picker-title",children:x}),f.jsx(Jr,{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:WK(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(sr,{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 kat=(e,t)=>{if(e.has(t))return e;const n=new Set(e);return n.add(t),n},vat=(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},xat=(e,t)=>{if(!e.has(t))return e;const n=new Set(e);return n.delete(t),n},wat=(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},Mat=(e,t)=>{if(e.size===0)return e;const n=new Set(t.map(a=>a.id));let o=!1;const r=new Set(e);for(const a of r)n.has(a)||(r.delete(a),o=!0);return o?r:e},GK=()=>{const[e,t]=m.useState(()=>new Set),n=m.useCallback(c=>{t(l=>kat(l,c))},[]),o=m.useCallback(c=>{t(l=>vat(l,c))},[]),r=m.useCallback(c=>{t(l=>xat(l,c))},[]),a=m.useCallback(c=>{t(l=>wat(l,c))},[]),i=m.useCallback(c=>{t(l=>Mat(l,c))},[]),s=m.useCallback(()=>t(new Set),[]);return{ids:e,mark:n,markMany:o,unmark:r,unmarkMany:a,pruneAgainst:i,reset:s}},kD=(e,t)=>e===t?!0:e==null||t==null||typeof e!=typeof t||typeof e!="object"?!1:JSON.stringify(e)===JSON.stringify(t),bat=(e,t,n)=>({...e,[t]:{...e[t],...n}}),_at=(e,t)=>{if(!(t in e))return e;const n={...e};return delete n[t],n},KK=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),Cat=(e,t)=>{const n=Object.entries(e);if(n.length===0)return e;const o=new Map(t.map(i=>[i.id,i]));let r=!1;const a={...e};for(const[i,s]of n){const c=o.get(i);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"&&KK(y)&&KK(g)){const k={};let x=!1;for(const v of Object.keys(y))kD(y[v],g[v])||(k[v]=y[v],x=!0);x&&(h[p]=k,u=!0)}else kD(y,g)||(h[p]=y,u=!0)}u?kD(l,s)||(a[i]=l,r=!0):(delete a[i],r=!0)}return r?a:e},ZK=()=>{const[e,t]=m.useState({}),n=m.useCallback((i,s)=>{t(c=>bat(c,i,s))},[]),o=m.useCallback(i=>{t(s=>_at(s,i))},[]),r=m.useCallback(i=>{t(s=>Cat(s,i))},[]),a=m.useCallback(()=>t({}),[]);return{overrides:e,setOverride:n,dropOverride:o,pruneAgainst:r,reset:a}};function Sat({nodes:e,connectors:t,flowPos:n,nodeIdGen:o,connectorIdGen:r,defaultOffset:a={x:24,y:24}}){const i=new Map;for(const y of e)i.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:a.x,h=n?n.y-c:a.y,u=e.map(y=>{const g=i.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:i.get(y.source)??y.source,target:i.get(y.target)??y.target}});return{newNodes:u,newConnectors:p,idMap:i}}const Lat=e=>({type:"image",position:e.position,data:{path:"",alt:e.originalFilename,width:e.dims.width,height:e.dims.height,_uploading:!0}}),Nat=e=>({type:"image",data:mae(e)}),Iat=e=>({type:"image",position:e.position,data:{path:"",alt:e.originalFilename,width:e.dims.width,height:e.dims.height,_uploadError:e.message}}),mae=e=>({...zHe(e.path,e.dims,e.lastUsed),alt:e.originalFilename}),Aat=async(e,t)=>{const{nodeId:n,flowId:o,file:r,originalFilename:a,position:i,dims:s,lastUsed:c}=e;t.rememberRetry(n,{file:r,originalFilename:a,position:i,dims:s}),t.setOverride(n,Lat({position:i,dims:s,originalFilename:a}));const l=async()=>{let h;try{h=(await t.upload(o,n,r,a)).path}catch(y){const g=y instanceof Error?y.message:String(y);throw t.setOverride(n,Iat({position:i,dims:s,originalFilename:a,message:g})),y}t.setOverride(n,Nat({path:h,dims:s,originalFilename:a,lastUsed:c}));const u=mae({path:h,dims:s,originalFilename:a,lastUsed:c}),p={id:n,type:"image",position:i,data:u};await t.createNode(o,p),t.forgetRetry(n)};if(t.history){await t.history.batch("insert-image",l);return}await l()};function Eat(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 jat="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",$at=248;function vr(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<$at&&(t+=jat[r%62])}}return t}const Pat=new Set(["INPUT","TEXTAREA","SELECT"]),xr=e=>e?Pat.has(e.tagName)?!0:e instanceof HTMLElement&&e.isContentEditable:!1,zat=(e,t,n)=>{const o=e.indexOf(t);if(o<0)return null;const r=e.length,a=[...e];switch(n.op){case"forward":{if(o>=r-1)return null;const i=a[o],s=a[o+1];return i===void 0||s===void 0?null:(a[o]=s,a[o+1]=i,a)}case"backward":{if(o<=0)return null;const i=a[o],s=a[o-1];return i===void 0||s===void 0?null:(a[o]=s,a[o-1]=i,a)}case"toFront":{if(o===r-1)return null;const[i]=a.splice(o,1);return i===void 0?null:(a.push(i),a)}case"toBack":{if(o===0)return null;const[i]=a.splice(o,1);return i===void 0?null:(a.unshift(i),a)}case"toIndex":{const i=Math.min(Math.max(n.index,0),r-1);if(i===o)return null;const[s]=a.splice(o,1);return s===void 0?null:(a.splice(i,0,s),a)}}};function Rat({project:e,flow:t,slug:n,demos:o,detail:r,loading:a,runs:i,nodeEvents:s,statusByNode:c,externalReloadSignal:l,onPlayNode:h,refreshFlows:u,canvasRef:p}){var wn,Ua;const y=o.find(q=>q.slug===n),{flows:g,createFlow:k,renameFlow:x,deleteFlow:v}=_F(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=ZK(),z=ZK(),W=GK(),$=GK(),[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),[K,X]=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),ce=m.useCallback(q=>{ne.current=q},[]),{reset:ve}=E,{reset:ge}=z,{reset:xe}=W,{reset:Re}=$;m.useEffect(()=>{w([]),C([]),S(null),ve(),ge(),xe(),Re(),D(null),I(null),hr.current=null,tn(!1),Yn.current.clear()},[r==null?void 0:r.id]);const Ye=m.useCallback((q,F)=>{w(q),C(F)},[]),le=(wn=r==null?void 0:r.flow)==null?void 0:wn.nodes,Ie=(Ua=r==null?void 0:r.flow)==null?void 0:Ua.connectors,{pruneAgainst:jt}=E,{pruneAgainst:xt}=z,{pruneAgainst:Qt}=W,{pruneAgainst:se}=$;m.useEffect(()=>{if(!(!le||!T)&&le.length===T.length){for(let q=0;q<le.length;q++){const F=le[q],U=T[q];if(!F||F.id!==U)return}D(null)}},[le,T]);const Q=(r==null?void 0:r.id)??null,$t=m.useMemo(()=>RHe({baseUrl:"",project:e,flow:t}),[e,t]),hn=m.useRef({nodes:[],connectors:[]});m.useEffect(()=>{hn.current={nodes:le??[],connectors:Ie??[]}},[le,Ie]);const{adapter:ae,history:Y}=m.useMemo(()=>UHe($t,()=>hn.current),[$t,Q]);m.useEffect(()=>{le&&(jt(le),Qt(le))},[le,jt,Qt]),m.useEffect(()=>{Ie&&(xt(Ie),se(Ie))},[Ie,xt,se]);const he=m.useRef(!1);m.useEffect(()=>{if(!he.current){he.current=!0;return}Y.markExternalChange()},[l,Y]);const[Ae,De]=m.useState(!1),[Ke,Ft]=m.useState(null),[fn,Jt]=m.useState(null),{setOverride:ke,dropOverride:Le}=E,Ht=m.useRef(E.overrides);m.useEffect(()=>{Ht.current=E.overrides},[E.overrides]);const Pn=m.useCallback((q,F)=>{!Q||!ae||(ke(q,{position:F}),I(null),ae.updateNodePosition(q,F).catch(U=>{Le(q),I(U instanceof Error?U.message:String(U)),console.error("updateNodePosition failed",U)}))},[Q,ae,ke,Le]),en=m.useCallback(q=>{if(!Q||!ae||q.length===0)return;const F=q.map(U=>(le==null?void 0:le.find(ee=>ee.id===U.id))?{id:U.id,next:U.position}:null).filter(U=>U!==null);if(F.length!==0){for(const U of F)ke(U.id,{position:U.next});I(null),Y.batch("move-nodes",async()=>{for(const U of F)await ae.updateNodePosition(U.id,U.next)}).catch(U=>{for(const G of F)Le(G.id);I(U instanceof Error?U.message:String(U)),console.error("updateNodePosition batch failed",U)})}},[Q,ae,Y,le,ke,Le]),n2=m.useCallback((q,F)=>{ke(q,{position:{x:F.x,y:F.y},data:{width:F.width,height:F.height}})},[ke]),ko=m.useCallback((q,F)=>{if(!Q||!ae)return;const U={width:F.width,height:F.height,position:{x:F.x,y:F.y}};ke(q,{position:U.position,data:{width:U.width,height:U.height}}),I(null),ae.updateNode(q,U).catch(G=>{Le(q),I(G instanceof Error?G.message:String(G)),console.error("updateNode resize failed",G)})},[Q,ae,ke,Le]),Xn=m.useCallback(q=>{if(!Q||!ae)return;const F={autoSize:!0};ke(q,{data:{autoSize:!0,width:void 0,height:void 0}}),I(null),ae.updateNode(q,F).catch(U=>{Le(q),I(U instanceof Error?U.message:String(U)),console.error("updateNode (fit-to-content) failed",U)})},[Q,ae,ke,Le]),Ra=m.useCallback(q=>{if(!Q||!ae||q.length===0)return;const F=[];for(const G of q){if(!(le==null?void 0:le.find(Je=>Je.id===G.id)))continue;const ze={position:G.position};G.width!==void 0&&(ze.width=G.width),G.height!==void 0&&(ze.height=G.height),F.push({id:G.id,next:ze})}if(F.length===0)return;for(const G of F){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 U=F.map(G=>G.id).slice().sort().join(",");Y.batch("multi-resize",async()=>{for(const G of F)await ae.updateNode(G.id,G.next)},{coalesceKey:`multi:resize:${U}`}).catch(G=>{for(const ee of F)Le(ee.id);I(G instanceof Error?G.message:String(G)),console.error("updateNode multi-resize batch failed",G)})},[Q,ae,Y,le,ke,Le]),{setOverride:Qe,dropOverride:Wt}=z,Jd=m.useCallback((q,F)=>{ke(q,{data:F})},[ke]),eu=m.useCallback((q,F)=>{for(const U of q)ke(U,{data:F})},[ke]),tu=m.useCallback((q,F)=>{Qe(q,F)},[Qe]),nu=m.useCallback((q,F)=>{!Q||!ae||(YU(ri,F),ke(q,{data:F}),I(null),ae.updateNode(q,F).catch(U=>{Le(q),I(U instanceof Error?U.message:String(U)),console.error("updateNode style failed",U)}))},[Q,ae,ke,Le]),ou=m.useCallback((q,F)=>{if(!Q||!ae||q.length===0)return;YU(ri,F);const U=q.filter(G=>le==null?void 0:le.some(ee=>ee.id===G));if(U.length!==0){for(const G of U)ke(G,{data:F});I(null),Y.batch("style-nodes",async()=>{for(const G of U)await ae.updateNode(G,F)}).catch(G=>{for(const ee of U)Le(ee);I(G instanceof Error?G.message:String(G)),console.error("updateNode style-nodes batch failed",G)})}},[Q,ae,Y,le,ke,Le]),ru=m.useCallback((q,F)=>{!Q||!ae||(AHe(ri,F),Qe(q,F),I(null),ae.updateConnector(q,F).catch(U=>{Wt(q),I(U instanceof Error?U.message:String(U)),console.error("updateConnector failed",U)}))},[Q,ae,Qe,Wt]),{mark:Zi,markMany:Xi,unmark:Yi,unmarkMany:Qi}=W,{markMany:ta,unmarkMany:na}=$,au=m.useCallback(q=>{if(!Q||!ae||!(le==null?void 0:le.find(ee=>ee.id===q)))return;const U=(Ie??[]).filter(ee=>ee.source===q||ee.target===q).map(ee=>ee.id),G=new Set(U);I(null),Zi(q),U.length>0&&ta(U),w(ee=>ee.filter(ze=>ze!==q)),C(ee=>ee.filter(ze=>!G.has(ze))),ae.deleteNode(q).catch(ee=>{Yi(q),U.length>0&&na(U),I(ee instanceof Error?ee.message:String(ee)),console.error("deleteNode failed",ee)})},[Q,ae,le,Ie,Zi,ta,Yi,na]),iu=m.useCallback((q,F)=>{if(!Q||!ae||!le)return;const U=T??le.map(ee=>ee.id),G=zat(U,q,F);G&&(D(G),I(null),ae.reorderNode(q,F).catch(ee=>{D(null),I(ee instanceof Error?ee.message:String(ee)),console.error("reorderNode failed",ee)}))},[Q,ae,le,T]),zo=m.useCallback((q,F)=>{if(!Q||!ae||q.length===0&&F.length===0)return;const U=new Set(q),G=q.map(He=>le==null?void 0:le.find(Mn=>Mn.id===He)).filter(He=>!!He),ee=(Ie??[]).filter(He=>U.has(He.source)||U.has(He.target)),ze=new Set(ee.map(He=>He.id)),Je=F.map(He=>Ie==null?void 0:Ie.find(Mn=>Mn.id===He)).filter(He=>!!He).filter(He=>!ze.has(He.id));if(G.length===0&&ee.length===0&&Je.length===0)return;I(null);const et=G.map(He=>He.id),Pt=[...ee.map(He=>He.id),...Je.map(He=>He.id)];et.length>0&&Xi(et),Pt.length>0&&ta(Pt);const Ho=G;w(He=>He.filter(Mn=>!U.has(Mn)));const fu=new Set(Je.map(He=>He.id));C(He=>He.filter(Mn=>!fu.has(Mn)&&!ze.has(Mn))),Y.batch("delete-selection",async()=>{for(const He of Ho)await ae.deleteNode(He.id);await Promise.all(Je.map(He=>ae.deleteConnector(He.id)))}).catch(He=>{et.length>0&&Qi(et),Pt.length>0&&na(Pt),I(He instanceof Error?He.message:String(He)),console.error("deleteSelection batch failed",He)})},[Q,ae,Y,le,Ie,Xi,ta,Qi,na]);m.useEffect(()=>{A.current=zo},[zo]),m.useEffect(()=>{const q=F=>{if(F.key!=="Delete"&&F.key!=="Backspace"||xr(document.activeElement)||document.querySelector('[data-testid="inline-edit-input"]'))return;const U=N.current,G=P.current;U.length===0&&G.length===0||(F.preventDefault(),zo(U,G))};return window.addEventListener("keydown",q),()=>window.removeEventListener("keydown",q)},[zo]);const Ji=m.useCallback((q,F)=>{!Q||!ae||(ke(q,{data:{name:F}}),I(null),ae.updateNode(q,{name:F}).catch(U=>{I(U instanceof Error?U.message:String(U)),console.error("updateNode name failed",U)}))},[Q,ae,ke]),Fe=m.useCallback((q,F)=>{!Q||!ae||(ke(q,{data:{description:F}}),I(null),ae.updateNode(q,{description:F}).catch(U=>{I(U instanceof Error?U.message:String(U)),console.error("updateNode description failed",U)}))},[Q,ae,ke]),Nt=m.useCallback((q,F)=>{!Q||!ae||(ke(q,{data:{detail:F}}),I(null),ae.updateNode(q,{detail:F}).catch(U=>{I(U instanceof Error?U.message:String(U)),console.error("updateNode detail failed",U)}))},[Q,ae,ke]),Ta=m.useCallback((q,F)=>{!Q||!ae||(ke(q,{data:{icon:F??void 0}}),I(null),ae.updateNode(q,{icon:F}).catch(U=>{I(U instanceof Error?U.message:String(U)),console.error("updateNode icon failed",U)}))},[Q,ae,ke]),su=m.useCallback((q,F)=>{!Q||!ae||(ke(q,{data:{target:F}}),I(null),ae.updateNode(q,{target:F}).catch(U=>{Le(q),I(U instanceof Error?U.message:String(U)),console.error("updateNode target failed",U)}))},[Q,ae,ke,Le]),oa=m.useCallback((q,F,U)=>{if(!Q||!ae)return;I(null);const G=`node-${vr()}`,ee=JU(q,U,$2(ri).node),ze={id:G,type:q,position:F,data:ee};ke(G,{id:G,type:q,position:F,data:ee}),ae.createNode(ze).catch(et=>{Le(G),I(et instanceof Error?et.message:String(et)),console.error("createNode failed",et)})},[Q,ae,ke,Le]),ur=m.useCallback((q,F)=>{if(!Q||!ae)return;I(null);const U=`node-${vr()}`,G={width:F.width,height:F.height},ee={id:U,type:"linkflow",position:q,data:G},ze={...G,_autoOpenPickerOnMount:!0};ke(U,{id:U,type:"linkflow",position:q,data:ze}),ae.createNode(ee).catch(et=>{Le(U),I(et instanceof Error?et.message:String(et)),console.error("createNode (linkflow) failed",et)})},[Q,ae,ke,Le]),ra=m.useCallback((q,F)=>{if(!Q||!ae)return;I(null);const U=`node-${vr()}`,G={icon:q,width:N0.width,height:N0.height},ee={id:U,type:"icon",position:F,data:G};ke(U,{id:U,type:"icon",position:F,data:G}),w([U]),ae.createNode(ee).catch(Je=>{Le(U),I(Je instanceof Error?Je.message:String(Je)),console.error("createNode (icon) failed",Je)})},[Q,ae,ke,Le]),vo=m.useCallback(q=>{if(!Q||!ae)return;I(null);const F=`node-${vr()}`,U={id:F,type:"html",position:q.position,data:{}},G={id:F,type:"html",position:q.position,data:{}};ke(F,G),w([F]),ae.createNode(U).catch(ee=>{Le(F),I(ee instanceof Error?ee.message:String(ee)),console.error("createNode (type:'html') failed",ee)})},[Q,ae,ke,Le]),Yn=m.useRef(new Map),sn=m.useCallback((q,F)=>{Yn.current.set(q,F)},[]),Gt=m.useCallback(q=>{Yn.current.delete(q)},[]),Ro=m.useCallback(q=>{!Q||!ae||(I(null),Aat({...q,flowId:Q,lastUsed:$2(ri).node},{upload:async(F,U,G,ee)=>ae.uploadImage(U,await ZAe(G),ee),createNode:async(F,U)=>{const{id:G}=await ae.createNode(U);return{id:G}},setOverride:ke,history:Y,rememberRetry:sn,forgetRetry:Gt}).catch(F=>{console.error("image-upload-flow failed",F)}))},[Q,ae,Y,ke,sn,Gt]),es=m.useCallback(q=>{if(!Q||!ae)return;const F=`node-${vr()}`;Ro({nodeId:F,...q})},[Q,ae,Ro]),cu=m.useCallback(q=>{const F=Yn.current.get(q);F&&Ro({nodeId:q,...F})},[Ro]),[To,ts]=m.useState({open:!1,mode:"insert"}),pt=m.useCallback((q,F)=>{ts({open:!0,mode:q,nodeId:F})},[]),Qn=m.useCallback(()=>{ts(q=>({...q,open:!1}))},[]),Da=m.useCallback(()=>{pt("insert")},[pt]),lu=m.useCallback(q=>pt("replace",q),[pt]),aa=m.useCallback(q=>{if(vHe(q),To.mode==="replace"&&To.nodeId){if(Q&&ae){const F=To.nodeId;ke(F,{data:{icon:q}}),I(null),ae.updateNode(F,{icon:q}).catch(U=>{Le(F),I(U instanceof Error?U.message:String(U)),console.error("updateNode (icon replace) failed",U)})}}else{const F=ne.current;if(F&&Q){const U=gHe(F,{width:window.innerWidth,height:window.innerHeight});ra(q,U)}}Qn()},[To.mode,To.nodeId,Q,ae,ke,Le,ra,Qn]),ia=m.useCallback((q,F)=>{!Q||!ae||(Qe(q,{label:F}),I(null),ae.updateConnector(q,{label:F}).catch(U=>{I(U instanceof Error?U.message:String(U)),console.error("updateConnector label failed",U)}))},[Q,ae,Qe]),du=m.useCallback((q,F,U)=>{if(!Q||!ae)return;const G=`conn-${vr()}`,ee=U==null?void 0:U.targetPin,ze=$2(ri).connector,Je={id:G,source:q,target:F,sourceHandleAutoPicked:!0,targetHandleAutoPicked:!0,...ee?{targetPin:ee}:{},...ze},et={id:G,source:q,target:F,sourceHandleAutoPicked:!0,targetHandleAutoPicked:!0,...ee?{targetPin:ee}:{},...ze};Qe(G,Je),I(null),ae.createConnector(et).catch(Pt=>{Wt(G),I(Pt instanceof Error?Pt.message:String(Pt)),console.error("createConnector failed",Pt)})},[Q,ae,Qe,Wt]),ns=m.useCallback(({sourceNodeId:q,position:F,shape:U})=>{if(!Q||!ae)return;I(null);const G=`node-${vr()}`,ee=`conn-${vr()}`,ze=uz[U],Je=$2(ri),et=JU(U,ze,Je.node),Pt={id:G,type:U,position:F,data:et},Ho={id:ee,source:q,target:G,sourceHandleAutoPicked:!0,targetHandleAutoPicked:!0,...Je.connector};ke(G,{id:G,type:U,position:F,data:et}),Qe(ee,Ho),S(G),Y.batch("create-and-connect",async()=>{await ae.createNode(Pt),await ae.createConnector(Ho)}).catch(He=>{Le(G),Wt(ee),I(He instanceof Error?He.message:String(He)),console.error("createAndConnectFromPane failed",He)})},[Q,ae,Y,ke,Le,Qe,Wt]),hr=m.useRef(null),[sa,tn]=m.useState(!1),[fr,Ha]=m.useState(()=>({canUndo:Y.canUndo,canRedo:Y.canRedo}));m.useEffect(()=>Y.subscribe(Ha),[Y]);const Do=m.useCallback(q=>{if(!le)return;const F=new Set(q),U=le.filter(ee=>F.has(ee.id));if(U.length===0)return;const G=(Ie??[]).filter(ee=>F.has(ee.source)&&F.has(ee.target));hr.current=JSON.parse(JSON.stringify({nodes:U,connectors:G})),tn(!0)},[le,Ie]),zn=m.useCallback(q=>{if(!Q||!ae)return;const F=hr.current;if(!F||F.nodes.length===0)return;const{newNodes:U,newConnectors:G}=Sat({nodes:F.nodes,connectors:F.connectors,flowPos:q,nodeIdGen:()=>`node-${vr()}`,connectorIdGen:()=>`conn-${vr()}`});for(const ee of U)ke(ee.id,ee);for(const ee of G)Qe(ee.id,ee);w(U.map(ee=>ee.id)),C(G.map(ee=>ee.id)),I(null),Y.batch("paste",async()=>{for(const ee of U)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 ze of U)Le(ze.id);for(const ze of G)Wt(ze.id);I(ee instanceof Error?ee.message:String(ee)),console.error("paste failed",ee)})},[Q,ae,Y,ke,Le,Qe,Wt]);m.useEffect(()=>{const q=F=>{const U=LHe({event:F,isEditableActive:xr(document.activeElement),hasNodes:!!le&&le.length>0,hasConnectors:!!Ie&&Ie.length>0,selectedIds:N.current,hasClipboard:!!hr.current});if(U.type!=="noop"&&!(U.type==="copy"||U.type==="paste")){if(F.preventDefault(),U.type==="selectAll"){w((le??[]).map(G=>G.id)),C((Ie??[]).map(G=>G.id));return}Do([...U.ids]),zn(null)}};return window.addEventListener("keydown",q),()=>window.removeEventListener("keydown",q)},[le,Ie,Do,zn]),m.useEffect(()=>{const q=F=>{const U=_He(F);if(!U||xr(document.activeElement))return;const G=N.current;if(G.length===0)return;const ee=E.overrides,ze=(le??[]).map(et=>{var Ho;const Pt=((Ho=ee[et.id])==null?void 0:Ho.position)??et.position;return{id:et.id,position:Pt}}),Je=SHe(U,G,ze);if(Je.length!==0)if(F.preventDefault(),Je.length===1){const et=Je[0];et&&Pn(et.id,et.position)}else en(Je)};return window.addEventListener("keydown",q),()=>window.removeEventListener("keydown",q)},[le,E.overrides,Pn,en]),m.useEffect(()=>{const q=F=>{const U=CHe(F);if(!U||xr(document.activeElement))return;F.preventDefault();const G=ne.current;G&&(U==="fit"?G.fitView({padding:.2,duration:200}):U==="in"?G.zoomIn({duration:150}):G.zoomOut({duration:150}))};return window.addEventListener("keydown",q),()=>window.removeEventListener("keydown",q)},[]);const Jn=m.useCallback(async q=>{if(!Q||!ae||!le||!ae.computeLayout)return;const F=E.overrides,U=ne.current,G=q==="selection"?new Set(N.current):null,ee=G?le.filter(We=>G.has(We.id)):le;if(ee.length<2)return;const ze=new Set(ee.map(We=>We.id)),Je=(Ie??[]).filter(We=>ze.has(We.source)&&ze.has(We.target)),et=new Map,Pt=ee.map(We=>{var bo;const nn=((bo=F[We.id])==null?void 0:bo.position)??We.position;et.set(We.id,nn);const on=U==null?void 0:U.getInternalNode(We.id),Tn=on==null?void 0:on.measured,Ga=We.data,bn=(Tn==null?void 0:Tn.width)??Ga.width??200,Mo=(Tn==null?void 0:Tn.height)??Ga.height??120;return{id:We.id,type:We.type,width:bn,height:Mo}}),Ho=Je.map(We=>({id:We.id,source:We.source,target:We.target})),fu=await ae.computeLayout(Pt,Ho),He=new Map;for(const[We,nn]of Object.entries(fu.nodes))He.set(We,nn.position);let Mn=Number.POSITIVE_INFINITY,pu=Number.POSITIVE_INFINITY,rs=Number.POSITIVE_INFINITY,yu=Number.POSITIVE_INFINITY;for(const We of Pt){const nn=et.get(We.id);if(!nn)continue;nn.x<Mn&&(Mn=nn.x),nn.y<pu&&(pu=nn.y);const on=He.get(We.id);on&&(on.x<rs&&(rs=on.x),on.y<yu&&(yu=on.y))}const HR=Number.isFinite(Mn)&&Number.isFinite(rs)?Mn-rs:0,Wa=Number.isFinite(pu)&&Number.isFinite(yu)?pu-yu:0,Rn=[];for(const We of Pt){const nn=et.get(We.id),on=He.get(We.id);if(!nn||!on)continue;const Tn={x:on.x+HR,y:on.y+Wa},Ga=Tn.x-nn.x,bn=Tn.y-nn.y;Math.abs(Ga)<1&&Math.abs(bn)<1||Rn.push({id:We.id,prev:nn,next:Tn})}if(Rn.length!==0){I(null);for(const We of Rn)ke(We.id,{position:We.next});Y.batch("tidy",async()=>{for(const We of Rn)await ae.updateNodePosition(We.id,We.next)}).catch(We=>{for(const nn of Rn)Le(nn.id);I(We instanceof Error?We.message:String(We)),console.error("Tidy batch failed",We)})}},[Q,ae,Y,le,Ie,E.overrides,ke,Le]);m.useEffect(()=>{const q=F=>{if(!(F.metaKey||F.ctrlKey)||!F.shiftKey||F.altKey||F.key.toLowerCase()!=="l"||xr(document.activeElement))return;F.preventDefault();const U=N.current.length>0?"selection":"all";Jn(U)};return window.addEventListener("keydown",q),()=>window.removeEventListener("keydown",q)},[Jn]);const Oa=m.useCallback(()=>{const q=N.current.length>0?"selection":"all";Jn(q)},[Jn]);m.useEffect(()=>{const q=F=>{if(xr(document.activeElement)||document.querySelector('[data-testid="inline-edit-input"]'))return;const U=IHe(F);if(U===null)return;const G=V.current;if(U==="select"){G.kind!=="select"&&L({kind:"select"});return}if(U==="hand"){L(G.kind==="hand"?{kind:"select"}:{kind:"hand"});return}if(G.kind==="draw"&&G.shape===U){L({kind:"select"});return}L({kind:"draw",shape:U})};return window.addEventListener("keydown",q),()=>window.removeEventListener("keydown",q)},[]),m.useEffect(()=>{const q=F=>{if(F.key!=="Escape"||xr(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",q),()=>window.removeEventListener("keydown",q)},[]),m.useEffect(()=>{const q=F=>{if(F.key.toLowerCase()!=="f"||F.metaKey||F.ctrlKey||F.shiftKey||F.altKey||xr(document.activeElement)||document.querySelector('[data-testid="inline-edit-input"]'))return;const U=N.current;if(U.length===0)return;const G=ne.current;G&&G.fitView({nodes:U.map(ee=>({id:ee})),padding:.2,duration:200})};return window.addEventListener("keydown",q),()=>window.removeEventListener("keydown",q)},[]),m.useEffect(()=>{const q=F=>{if(F.key!=="1"||F.metaKey||F.ctrlKey||F.shiftKey||F.altKey||xr(document.activeElement)||document.querySelector('[data-testid="inline-edit-input"]'))return;const U=ne.current;if(!U)return;const{x:G,y:ee}=U.getViewport();U.setViewport({x:G,y:ee,zoom:1},{duration:150})};return window.addEventListener("keydown",q),()=>window.removeEventListener("keydown",q)},[]);const xo=m.useCallback(q=>{var F,U;switch(q){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;Do([...G]);return}case"edit.paste":zn(null);return;case"edit.duplicate":{const G=N.current;if(G.length===0)return;Do([...G]),zn(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((le??[]).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:ze}=G.getViewport();G.setViewport({x:ee,y:ze,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(ze=>({id:ze})),padding:.2,duration:200});return}case"layout.tidy":{const G=N.current.length>0?"selection":"all";Jn(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":{(F=p.current)==null||F.exportPdf();return}case"export.png":{(U=p.current)==null||U.exportPng();return}}},[Y,Do,zn,zo,le,Ie,Jn,p]);m.useEffect(()=>{const q=F=>{(F.metaKey||F.ctrlKey)&&(F.shiftKey||F.altKey||F.key.toLowerCase()==="p"&&(F.preventDefault(),!xr(document.activeElement)&&xo("help.commandPalette")))};return window.addEventListener("keydown",q),()=>window.removeEventListener("keydown",q)},[xo]);const ca=m.useCallback((q,F)=>{if(!Q||!ae)return;const U={...F.source!==void 0?{source:F.source}:{},...F.target!==void 0?{target:F.target}:{},...F.sourceHandle!==void 0?{sourceHandle:F.sourceHandle===null?void 0:F.sourceHandle}:{},...F.targetHandle!==void 0?{targetHandle:F.targetHandle===null?void 0:F.targetHandle}:{},...F.sourceHandleAutoPicked!==void 0?{sourceHandleAutoPicked:F.sourceHandleAutoPicked}:{},...F.targetHandleAutoPicked!==void 0?{targetHandleAutoPicked:F.targetHandleAutoPicked}:{},...F.sourcePin!==void 0?{sourcePin:F.sourcePin===null?void 0:F.sourcePin}:{},...F.targetPin!==void 0?{targetPin:F.targetPin===null?void 0:F.targetPin}:{}};Qe(q,U),I(null),ae.updateConnector(q,F).catch(G=>{Wt(q),I(G instanceof Error?G.message:String(G)),console.error("updateConnector reconnect failed",G)})},[Q,ae,Qe,Wt]),Fa=m.useCallback((q,F,U)=>{if(!Q||!ae)return;const G=F==="source"?"sourcePin":"targetPin";Qe(q,{[G]:U}),I(null),ae.updateConnector(q,{[G]:U}).catch(ee=>{Wt(q),I(ee instanceof Error?ee.message:String(ee)),console.error("updateConnector pin failed",ee)})},[Q,ae,Qe,Wt]),o2=m.useCallback((q,F)=>{if(!Q||!ae)return;const U=Ie==null?void 0:Ie.find(ze=>ze.id===q);if(!(U?F==="source"?U.sourcePin:U.targetPin:void 0))return;const ee=F==="source"?"sourcePin":"targetPin";Qe(q,{[ee]:void 0}),I(null),ae.updateConnector(q,{[ee]:null}).catch(ze=>{Wt(q),I(ze instanceof Error?ze.message:String(ze)),console.error("updateConnector unpin failed",ze)})},[Q,ae,Ie,Qe,Wt]),dt=r==null?void 0:r.flow,qa=E.overrides,pr=z.overrides,wo=W.ids,la=$.ids,Va=m.useMemo(()=>{if(!dt||M.length===0)return[];const q=new Map(dt.nodes.map(U=>[U.id,U])),F=[];for(const U of M){const G=q.get(U);if(!G)continue;const ee=qa[U];if(!ee){F.push(G);continue}const ze=ee.data?{...G.data,...ee.data}:G.data;F.push({...G,...ee,data:ze})}return F},[dt,M,qa]),uu=m.useMemo(()=>{if(!dt||b.length===0)return[];const q=new Map(dt.connectors.map(U=>[U.id,U])),F=[];for(const U of b){const G=q.get(U);if(!G)continue;const ee=pr[U];F.push(ee?{...G,...ee}:G)}return F},[dt,b,pr]),Of=m.useMemo(()=>{if(!dt)return null;if(!T)return dt.nodes;const q=new Map(dt.nodes.map(G=>[G.id,G])),F=[],U=new Set;for(const G of T){const ee=q.get(G);ee&&(F.push(ee),U.add(G))}for(const G of dt.nodes)U.has(G.id)||F.push(G);return F},[dt,T]),hu=m.useMemo(()=>{const q=Of??(dt==null?void 0:dt.nodes)??null;return q?wo.size===0?q:q.filter(F=>!wo.has(F.id)):null},[Of,dt,wo]),DR=m.useMemo(()=>{const q=(dt==null?void 0:dt.connectors)??null;return q?la.size===0&&wo.size===0?q:q.filter(F=>!la.has(F.id)&&!wo.has(F.source)&&!wo.has(F.target)):null},[dt,la,wo]),yr=m.useCallback((q,F)=>{X({nodeId:q,mode:F})},[]),Ba=m.useMemo(()=>{if(!hu)return null;let q=!1;const F=hu.map(U=>{if(U.type!=="linkflow")return U;q=!0;const G=U.data.target,ee=G?()=>brt({project:G.project,flow:G.flow}):void 0,ze=G?Eat(G,o):void 0;return{...U,data:{...U.data,onOpenPicker:yr.bind(null,U.id),onFollow:ee,_resolvedTarget:ze}}});return q?F:hu},[hu,yr,o]),Ff=(g==null?void 0:g.some(q=>q.flowSlug===t))??!1;if(!y&&!Ff&&!(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||a&&!r)return f.jsx("div",{className:"flex h-full w-full items-center justify-center text-sm text-muted-foreground",children:"Loading demo…"});const r2=M[0],qf=r2?c[r2]: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(uat,{open:Ae,onOpenChange:De,onCreate:k,onCreated:async q=>{await u(),J.current.add(`${e}/${q.flowSlug}`),Io({project:e,flow:q.flowSlug})}}),f.jsx(fat,{open:Ke!==null,onOpenChange:q=>{q||Ft(null)},flow:Ke,onRename:x,onRenamed:async(q,F)=>{await u(),q.flowSlug!==F&&(J.current.add(`${e}/${q.flowSlug}`),Io({project:e,flow:q.flowSlug}))}}),f.jsx(hat,{open:fn!==null,onOpenChange:q=>{q||Jt(null)},flow:fn,flows:g??[],onDelete:v,onDeleted:async(q,F)=>{var G;if(await u(),q!==t)return;const U=F??((G=g==null?void 0:g.find(ee=>ee.isDefault&&ee.flowSlug!==q))==null?void 0:G.flowSlug);U&&Io({project:e,flow:U})}}),dt&&ae?f.jsx(ert,{ref:p,mode:"edit",adapter:ae,history:Y,topRightSlot:f.jsx(pat,{project:e,activeFlow:t,flows:g??[],onSelect:q=>{q!==t&&Io({project:e,flow:q})},onCreate:()=>De(!0),onRename:q=>{const F=g==null?void 0:g.find(U=>U.flowSlug===q);F&&Ft({flowSlug:F.flowSlug,name:F.name,icon:F.icon})},onDelete:q=>{const F=g==null?void 0:g.find(U=>U.flowSlug===q);F&&Jt({flowSlug:F.flowSlug,name:F.name,isDefault:F.isDefault})}}),projectId:e,flowSlug:t,enableEmbed:!1,showShareMenu:!1,nodes:Ba??dt.nodes,connectors:DR??dt.connectors,selectedNodeIds:M,selectedConnectorIds:b,onSelectionChange:Ye,runtime:{runs:i,statuses:c,pendingOverrides:{nodes:qa,connectors:pr}},onPlayNode:h,onNodePositionChange:Pn,onNodePositionsChange:en,onNodeResize:n2,onNodeResizeEnd:ko,onHtmlNodeFitToContent:Xn,onComponentNodeFitToContent:Xn,onMultiResize:Ra,onNodeNameChange:Ji,onNodeDescriptionChange:Fe,onConnectorLabelChange:ia,onCreateShapeNode:oa,onCreateLinkflowNode:Q?ur:void 0,onCreateImageFromFile:Q?es:void 0,onRetryImageUpload:Q?cu:void 0,onCreateHtmlNode:Q?vo:void 0,iconPickerOpen:To.open,onOpenIconPicker:Q?Da:void 0,onCloseIconPicker:Q?Qn:void 0,onPickIcon:Q?aa:void 0,onRequestIconReplace:Q?lu:void 0,onCreateConnector:du,onReconnectConnector:ca,onPinEndpoint:Q?Fa:void 0,onUnpinEndpoint:Q?o2:void 0,onReorderNode:iu,onDeleteNode:au,onCopyNode:q=>Do([q]),onPasteAt:zn,onCopySelection:Q?Do:void 0,onPasteSelection:Q?()=>zn(null):void 0,hasClipboard:sa,selectedNodes:Va,selectedConnectors:uu,onStyleNode:nu,onStyleNodePreview:Jd,onStyleNodes:ou,onStyleNodesPreview:eu,onStyleConnector:ru,onStyleConnectorPreview:tu,onRfInit:ce,onTidy:le?Oa:void 0,onCreateAndConnectFromPane:ns,pendingEditNodeId:_,canvasMode:R,onCanvasModeChange:L,statusReport:qf,onNameChange:Ji,onDescriptionChange:Fe,onDetailChange:Nt,onIconChange:Ta,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(sat,{open:H,onOpenChange:j,runCommand:xo,ctx:{hasSelection:M.length>0||b.length>0,canUndo:fr.canUndo,canRedo:fr.canRedo,hasClipboard:sa,canExportDemo:!!Q}}),f.jsx(gat,{open:K!==null,onOpenChange:q=>{q||X(null)},mode:(K==null?void 0:K.mode)??"link",demos:o,currentSlug:n,initialTarget:(K==null?void 0:K.mode)==="edit"?(()=>{const q=le==null?void 0:le.find(U=>U.id===K.nodeId);return!q||q.type!=="linkflow"?null:q.data.target??null})():null,onCommit:q=>{K&&su(K.nodeId,q)}})]})}const Tat=e=>({display:e?"block":"none",height:"100%"});function Dat({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:Tat(r),children:t(n,r)},n.slug)})})}function Hat({demos:e,refreshFlows:t,canvasRef:n}){const o=sae();return f.jsx(Dat,{stack:o,renderEntry:(r,a)=>f.jsx(Oat,{entry:r,demos:e,refreshFlows:t,canvasRef:a?n:void 0})})}function Oat({entry:e,demos:t,refreshFlows:n,canvasRef:o}){const{project:r,flow:a,slug:i}=e,s=t.find(z=>z.slug===i),c=(s==null?void 0:s.id)??null,l=m.useRef(null),h=o??l,{detail:u,loading:p,refresh:y,applyDetail:g}=Urt(r,a),[k,x]=m.useState(0),{runs:v,apply:M}=Yrt(c),{events:w,apply:b}=Zrt(c),{statusByNode:C,apply:_,reset:S}=tat(c),N=m.useCallback(()=>{S(),y(),n()},[y,n,S]),P=m.useCallback(z=>{if(!c||!s)return;const W={id:c,slug:s.slug,filePath:""},$=z.valid?{...W,name:z.flow.name??s.name,flow:z.flow,valid:!0,error:null}:{...W,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,_]);nat(c,{onHello:N,onFlowReload:P,onEvent:A});const E=m.useCallback(z=>{ule(r,a,z).catch(W=>{M({type:"node:error",nodeId:z,message:W instanceof Error?W.message:String(W),ts:Date.now()})})},[r,a,M]);return f.jsx(Rat,{project:r,flow:a,slug:i,demos:t,detail:u,loading:p,runs:v,nodeEvents:w,statusByNode:C,externalReloadSignal:k,onPlayNode:E,refreshFlows:n,canvasRef:h})}const XK="npx seeflow register --path .";function Fat(){const[e,t]=m.useState(!1),n=async()=>{try{await navigator.clipboard.writeText(XK),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(lrt,{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:XK}),f.jsx(rt,{type:"button",variant:"ghost",size:"sm",onClick:n,"aria-label":"Copy register command",children:e?f.jsx(Jre,{className:"h-4 w-4"}):f.jsx(tae,{className:"h-4 w-4"})})]})]})})}function qat({demos:e}){return e.length===0?f.jsx(Fat,{}):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=iae(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"&&Crt();function Vat(){var S;const e=prt(),{demos:t,refresh:n}=Ort(),{projects:o,refresh:r,unregisterProject:a}=Frt(),i=sae(),s=i.at(-1)??null,c=(s==null?void 0:s.project)??null,l=(s==null?void 0:s.slug)??null,h=i.length>1?i.at(-2)??null:null,u=yrt(e),p=(u==null?void 0:u.project)??null,{flows:y}=_F(p);qrt({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=>{OK(N.id),n(),r(),Io({project:N.slug,flow:"main"})},[n,r]),x=m.useCallback(async(N,P)=>{await a(N,P),await n(),c===N&&Io(null)},[a,n,c]);m.useEffect(()=>{if(e!=="/"||t===null)return;const N=Brt(t,Vrt());if(N){const P=iae(N.slug);P&&Io(P)}},[e,t]),m.useEffect(()=>{g&&OK(g.id)},[g]),m.useEffect(()=>{s&&Lrt(s.project,s.flow)},[s]),m.useEffect(()=>{if(!p||!y)return;const N=Nrt(y,dae(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(d0,{delayDuration:150,children:f.jsxs("div",{className:"flex h-full w-full flex-col bg-background text-foreground",children:[f.jsx(Hrt,{projects:o??[],currentProjectSlug:c??void 0,onProjectCreated:k,onUnregisterProject:x,share:C,onBack:_?_rt:void 0,previousFlowName:_}),f.jsx("main",{className:"min-h-0 flex-1",children:i.length>0?f.jsx(Hat,{demos:t,refreshFlows:n,canvasRef:v}):f.jsx(qat,{demos:t})}),b&&c?f.jsx(urt,{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 gae=document.getElementById("root");if(!gae)throw new Error("Root element #root not found");vD.createRoot(gae).render(f.jsx(Ar.StrictMode,{children:f.jsx(Vat,{})}));export{xf as C,CJe as M,Ar as R,V0 as _,Vn as a,IY as b,YG as c,pP as d,IF as e,XY as f,aZe as g,hf as h,cZe as i,Uat as j,Mh as k,jr as l,f as m,JY as n,Ott as o,_$e as p,GKe as q,m as r,ao as s,lZe as t,Rq as u,QKe as w,Bat as z};
|
|
8629
|
+
*/const drt=go("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"}]]),jK="seeflow.export.email",$K="seeflow.export.name",PK="seeflow.export.visibility";function urt({open:e,onOpenChange:t,project:n,flowName:o,onCapturePreview:r}){const[a,i]=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=tle(n),M=_F(e?n:null),w=M.flows;m.useEffect(()=>{e&&(i(localStorage.getItem(jK)??""),c(o??localStorage.getItem($K)??""),h(localStorage.getItem(PK)??"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(a.trim(),s.trim(),l,$,Array.from(k));localStorage.setItem(jK,a.trim()),localStorage.setItem($K,s.trim()),localStorage.setItem(PK,l),p({kind:"done",shareUrl:T})}catch($){p({kind:"error",message:$ instanceof Error?$.message:String($)})}},[v,a,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=a.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,W=w!==null&&k.size===w.length;return f.jsx(ir,{open:e,onOpenChange:t,children:f.jsxs(Xr,{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(Yr,{children:[f.jsx(Qr,{children:"Export project to seeflow.dev"}),f.jsx(Jr,{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:a,onChange:$=>i($.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(EK,{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:W?"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(crt,{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(sr,{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(EK,{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(Jre,{className:"h-4 w-4","aria-hidden":"true"}):f.jsx(tae,{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(art,{className:"h-4 w-4","aria-hidden":"true"})})]})]}),f.jsx(sr,{children:f.jsx(rt,{type:"button",onClick:()=>t(!1),"data-testid":"export-done",children:"Done"})})]})]})})}function hrt({open:e,onOpenChange:t,onCreated:n}){const[o,r]=m.useState(""),[a,i]=m.useState(""),[s,c]=m.useState(""),[l,h]=m.useState(null),[u,p]=m.useState(!1);m.useEffect(()=>{e&&(r(""),i(""),c(""),h(null),p(!1))},[e]);const y=o.trim(),g=a.trim(),k=s.trim(),x=g.length>0&&!u,v=async M=>{if(M.preventDefault(),!!x){p(!0),h(null);try{const w=await dle({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(Xr,{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(Yr,{children:[f.jsx(Qr,{children:"Create new project"}),f.jsx(Jr,{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:a,onChange:M=>i(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(sr,{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 zK="seeflow:navigate",frt=e=>(window.addEventListener("popstate",e),window.addEventListener(zK,e),()=>{window.removeEventListener("popstate",e),window.removeEventListener(zK,e)}),RK=()=>window.location.pathname,prt=()=>m.useSyncExternalStore(frt,RK,RK),rae=(e,t)=>`/projects/${encodeURIComponent(e)}/flows/${encodeURIComponent(t)}`,aae=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}},iae=e=>{const t=e.indexOf("/");return t<=0||t===e.length-1?null:{project:e.slice(0,t),flow:e.slice(t+1)}},yrt=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},mrt="seeflow:navigate",SO="seeflow:flow-stack",nV=e=>({project:e.project,flow:e.flow,slug:`${e.project}/${e.flow}`}),grt=e=>{const t=aae(e);return t?[nV(t)]:[]},krt=(e,t)=>[...e,nV(t)],vrt=e=>e?[nV(e)]:[],xrt=(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 Rr=[],TK=!1;const oV=()=>{typeof window>"u"||window.dispatchEvent(new Event(SO))},wrt=e=>(window.addEventListener(SO,e),()=>window.removeEventListener(SO,e)),DK=()=>Rr,sae=()=>m.useSyncExternalStore(wrt,DK,DK),cae=(e,t)=>{window.history.pushState({stackDepth:e},"",t),window.dispatchEvent(new Event(mrt))},Mrt=(e,t)=>{const n=window.history.state??null;window.history.replaceState({...n??{},stackDepth:e},"",t)},brt=e=>{const t=krt(Rr,e);cae(t.length,rae(e.project,e.flow)),Rr=t,oV()},_rt=()=>{window.history.back()},Io=e=>{const t=vrt(e),n=e?rae(e.project,e.flow):"/";window.location.pathname===n?Mrt(t.length,n):cae(t.length,n),Rr!==t&&(Rr=t,oV())},Crt=()=>{if(TK)return;Rr=grt(window.location.pathname);const e=window.history.state??null;typeof(e==null?void 0:e.stackDepth)!="number"&&window.history.replaceState({...e??{},stackDepth:Rr.length},"",window.location.pathname+window.location.search+window.location.hash),window.addEventListener("popstate",()=>{const t=window.history.state??null,n=aae(window.location.pathname),o=xrt(Rr,t==null?void 0:t.stackDepth,n);if(o!==null){Rr!==o&&(Rr=o,oV());return}Io(n)}),TK=!0},Srt="seeflow:last-flow:",lae=e=>`${Srt}${e}`,dae=e=>{if(typeof window>"u")return null;try{return window.localStorage.getItem(lae(e))}catch{return null}},Lrt=(e,t)=>{if(!(typeof window>"u"))try{window.localStorage.setItem(lae(e),t)}catch{}},Nrt=(e,t)=>{var o;if(e.length===0)return null;if(t){const r=e.find(a=>a.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 Irt({projects:e,currentProjectSlug:t,onProjectCreated:n,onUnregisterProject:o}){const[r,a]=m.useState(!1),[i,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(),a(P=>!P))};return document.addEventListener("keydown",S),()=>document.removeEventListener("keydown",S)},[]);const x=e.find(S=>S.projectSlug===t),v=S=>{const P=dae(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(Bd,{open:r,onOpenChange:a,children:[f.jsx(X0,{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(zte,{children:"⌘K"}),f.jsx(eae,{className:"h-3.5 w-3.5 opacity-60"})]})}),f.jsxs(Gi,{align:"end",sideOffset:6,className:"relative w-[320px] p-0","data-testid":"project-switcher-popover",children:[f.jsxs(xq,{children:[f.jsx($te,{placeholder:"Search projects..."}),f.jsxs(wq,{className:"pb-12",children:[f.jsx(Mq,{children:"No projects."}),e.length>0?f.jsx(pz,{heading:"Projects",children:e.map(S=>f.jsxs(yz,{value:`${S.name} ${S.projectSlug}`,onSelect:()=>{a(!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(),a(!1),w(S)},children:f.jsx(oae,{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:()=>{a(!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(nae,{className:"h-4 w-4"})})]})]}),f.jsx(hrt,{open:i,onOpenChange:s,onCreated:M}),f.jsx(ir,{open:c!==null,onOpenChange:S=>{S||b()},children:f.jsxs(Xr,{className:"sm:max-w-md","data-testid":"unregister-project-dialog",children:[f.jsxs(Yr,{children:[f.jsx(Qr,{children:g?"Delete project?":"Unregister project?"}),f.jsxs(Jr,{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(sr,{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 uae="seeflow:theme",HK="(prefers-color-scheme: dark)";function Art(e){return e==="light"||e==="dark"||e==="system"}function Ert(e){try{const t=e.getItem(uae);return Art(t)?t:"system"}catch{return"system"}}function jrt(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 $rt(e,t){try{e.setItem(uae,t)}catch{}}function Prt(e,t){return e==="system"?t?"dark":"light":e}function zrt(e,t){t==="dark"?(e.classList.add("dark"),e.classList.remove("light")):(e.classList.add("light"),e.classList.remove("dark"))}function Rrt(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 Trt(){const[e,t]=m.useState(()=>{if(typeof window>"u")return"system";const i=jrt(window.location.search);return i||Ert(window.localStorage)}),[n,o]=m.useState(()=>typeof window>"u"?!1:window.matchMedia(HK).matches);m.useEffect(()=>{if(typeof window>"u")return;const i=window.matchMedia(HK);return Rrt(i,o)},[]);const r=Prt(e,n);m.useEffect(()=>{typeof document>"u"||zrt(document.documentElement,r)},[r]);const a=m.useCallback(i=>{typeof window<"u"&&$rt(window.localStorage,i),t(i)},[]);return{theme:e,setTheme:a,resolvedTheme:r}}const Drt=[{value:"light",label:"Light"},{value:"dark",label:"Dark"},{value:"system",label:"System"}];function Hrt({projects:e,currentProjectSlug:t,onProjectCreated:n,onUnregisterProject:o,share:r,onBack:a,previousFlowName:i}){const{theme:s,setTheme:c}=Trt(),l=i!==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(Q0,{children:[f.jsx(J0,{asChild:!0,children:f.jsx("button",{type:"button",onClick:a,"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(rrt,{size:16,strokeWidth:2.25})})}),f.jsxs(Yd,{side:"bottom",children:["Back to ",i]})]}):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(drt,{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.102"]})]})]}),f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsx(Irt,{projects:e,currentProjectSlug:t,onProjectCreated:n,onUnregisterProject:o}),r?f.jsx(Fre,{mode:"edit",enableEmbed:!1,onDownloadPdf:r.onDownloadPdf,onDownloadPng:r.onDownloadPng,onExportToCloud:r.onExportToCloud}):null,f.jsxs(ooe,{children:[f.jsx(roe,{asChild:!0,children:f.jsx(rt,{type:"button",variant:"outline",size:"icon","aria-label":"Settings","data-testid":"settings-trigger",children:f.jsx(srt,{className:"h-4 w-4"})})}),f.jsxs(Eq,{align:"end",sideOffset:6,className:"w-44","data-testid":"settings-menu",children:[f.jsx(aoe,{children:"Theme"}),f.jsx(sKe,{value:s,onValueChange:h=>c(h),children:Drt.map(h=>f.jsx(ioe,{value:h.value,"data-testid":`theme-${h.value}`,children:h.label},h.value))})]})]})]})]})}const Ort=()=>{const[e,t]=m.useState(null),[n,o]=m.useState(null),r=m.useCallback(()=>nle().then(a=>{t(a),o(null)}).catch(a=>{console.error("[useDemos] failed",a),t([]),o(String(a))}),[]);return m.useEffect(()=>{r()},[r]),{demos:e,error:n,refresh:r}},Frt=()=>{const[e,t]=m.useState(null),[n,o]=m.useState(!0),[r,a]=m.useState(null),i=m.useCallback(()=>(o(!0),ole().then(c=>{t(c),a(null)}).catch(c=>{console.error("[useProjects] failed",c),t([]),a(String(c))}).finally(()=>o(!1))),[]);m.useEffect(()=>{i()},[i]);const s=m.useCallback(async(c,l)=>{await sle(c,l),await i()},[i]);return{projects:e,loading:n,error:r,refresh:i,unregisterProject:s}},qrt=(e={})=>{const[t,n]=m.useState(!1),{onRegistryReload:o,onHello:r}=e,a=m.useRef(o),i=m.useRef(r);return m.useEffect(()=>{a.current=o,i.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=i.current)==null||c.call(i)}),s.addEventListener("registry:reload",()=>{var c;(c=a.current)==null||c.call(a)}),()=>{s.close()}},[]),{connected:t}},hae="seeflow:last-project",Vrt=()=>{if(typeof window>"u")return null;try{return window.localStorage.getItem(hae)}catch{return null}},OK=e=>{if(!(typeof window>"u"))try{window.localStorage.setItem(hae,e)}catch{}},Brt=(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},Urt=(e,t)=>{const n=e!==null&&t!==null,[o,r]=m.useState(null),[a,i]=m.useState(n),[s,c]=m.useState(null),l=m.useCallback(()=>{!e||!t||(i(!0),ale(e,t).then(u=>{r(u),c(null)}).catch(u=>{console.error("[useDemoData] failed",u),c(String(u))}).finally(()=>i(!1)))},[e,t]),h=m.useCallback(u=>{r(u),c(null)},[]);return m.useEffect(()=>{if(!e||!t){r(null),i(!1);return}l()},[e,t,l]),{detail:o,loading:a,error:s,refresh:l,applyDetail:h}},Wrt=5,Grt={"node:running":"running","node:done":"done","node:error":"error"},Krt=(e,t)=>{if(t.type==="reset")return{};const n=e[t.nodeId]??[],o=[t.entry,...n].slice(0,Wrt);return{...e,[t.nodeId]:o}},Zrt=e=>{const[t,n]=m.useReducer(Krt,{}),o=m.useRef(n);o.current=n,m.useEffect(()=>{o.current({type:"reset"})},[e]);const r=m.useCallback(i=>{const s=Grt[i.type];if(!s)return;const c=typeof i.nodeId=="string"?i.nodeId:null;if(!c)return;const l=typeof i.runId=="string"?i.runId:void 0,h=typeof i.ts=="number"?i.ts:Date.now();o.current({type:"append",nodeId:c,entry:{status:s,ts:h,runId:l}})},[]),a=m.useCallback(()=>{o.current({type:"reset"})},[]);return{events:t,apply:r,reset:a}},Xrt=(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()}}}},Yrt=e=>{const[t,n]=m.useReducer(Xrt,{}),o=m.useRef(n);o.current=n,m.useEffect(()=>{o.current({type:"reset"})},[e]);const r=m.useCallback(i=>{const s=typeof i.nodeId=="string"?i.nodeId:null;if(!s)return;const c=typeof i.runId=="string"?i.runId:void 0;if(i.type==="node:running"){o.current({type:"running",nodeId:s,runId:c,ts:i.ts});return}if(i.type==="node:done"){const l=typeof i.status=="number"?i.status:void 0;o.current({type:"done",nodeId:s,runId:c,responseStatus:l,body:i.body,ts:i.ts});return}if(i.type==="node:error"){const l=typeof i.message=="string"?i.message:void 0;o.current({type:"error",nodeId:s,runId:c,message:l,ts:i.ts})}},[]),a=m.useCallback(()=>{o.current({type:"reset"})},[]);return{runs:t,apply:r,reset:a}},Qrt=new Set(["ok","warn","error","pending"]),Jrt=(e,t)=>{if(t.type!=="node:status")return e;const n=typeof t.nodeId=="string"?t.nodeId:null;if(!n||typeof t.state!="string"||!Qrt.has(t.state))return e;const o=typeof t.summary=="string"?t.summary:void 0,r=typeof t.detail=="string"?t.detail:void 0,a=t.data&&typeof t.data=="object"&&!Array.isArray(t.data)?t.data:void 0,i=typeof t.ts=="number"?t.ts:Date.now();return{...e,[n]:{state:t.state,summary:o,detail:r,data:a,ts:i}}},eat=(e,t)=>{switch(t.type){case"reset":return{};case"event":return Jrt(e,t.event)}},tat=e=>{const[t,n]=m.useReducer(eat,{}),o=m.useRef(n);o.current=n,m.useEffect(()=>{o.current({type:"reset"})},[e]);const r=m.useCallback(i=>{o.current({type:"event",event:i})},[]),a=m.useCallback(()=>{o.current({type:"reset"})},[]);return{statusByNode:t,apply:r,reset:a}},nat=(e,t={})=>{const[n,o]=m.useState(!1),{onHello:r,onFlowReload:a,onEvent:i}=t,s=m.useRef(r),c=m.useRef(a),l=m.useRef(i);return m.useEffect(()=>{s.current=r,c.current=a,l.current=i},[r,a,i]),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=FK(p,"flow:reload");(k=l.current)==null||k.call(l,y);const g=oat(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,FK(y,p))});return()=>{u.close()}},[e]),{connected:n}},FK=(e,t)=>{try{const n=JSON.parse(e.data);return{type:t,ts:Date.now(),...n}}catch{return{type:t,ts:Date.now()}}},oat=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,qK=["File","Edit","View","Tools","Layout","Selection","Help"],fae="seeflow:command-palette:recent",pae=5,yae=new Map(VF.map(e=>[e.id,e])),rat=e=>typeof e=="string"&&yae.has(e),VK=()=>{if(typeof window>"u")return[];try{const e=window.localStorage.getItem(fae);if(!e)return[];const t=JSON.parse(e);return Array.isArray(t)?t.filter(rat).slice(0,pae):[]}catch{return[]}},aat=e=>{if(!(typeof window>"u"))try{window.localStorage.setItem(fae,JSON.stringify(e))}catch{}},BK=(e,t)=>e.enabled?e.enabled(t):!0,iat=(e,t)=>t.length===0?!0:`${e.label} ${e.description??""}`.toLowerCase().includes(t);function sat({open:e,onOpenChange:t,runCommand:n,ctx:o}){const[r,a]=m.useState(""),[i,s]=m.useState(0),[c,l]=m.useState(()=>VK()),h=m.useRef(null),u=m.useRef(null);m.useEffect(()=>{e&&(a(""),s(0),l(VK()))},[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=yae.get(E);z&&P.push({cmd:z,enabled:BK(z,o)})}return{groups:[{category:"Recent",rows:P}],flat:P}}const C=new Map;for(const P of VF){if(!iat(P,b))continue;const A={cmd:P,enabled:BK(P,o)},E=C.get(P.category);E?E.push(A):C.set(P.category,[A])}const S=[...qK.filter(P=>C.has(P)),...Array.from(C.keys()).filter(P=>!qK.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,pae);return aat(_),_})},[]),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(i))},[x,i,g]);m.useEffect(()=>{if(!e)return;const b=u.current;if(!b)return;const C=b.querySelector(`[data-command-row-index="${i}"]`);C&&typeof C.scrollIntoView=="function"&&C.scrollIntoView({block:"nearest"})},[i,e]);const w=r.trim().length>0;return f.jsx(pq,{open:e,onOpenChange:t,children:f.jsx(vR,{children:f.jsxs(Y0,{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=>a(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===i;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 cat(e){return e.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")}const lat=/^[a-z0-9][a-z0-9-]*$/,dat={"--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 uat({open:e,onOpenChange:t,onCreate:n,onCreated:o}){const[r,a]=m.useState(""),[i,s]=m.useState(""),[c,l]=m.useState(!1),[h,u]=m.useState(null),[p,y]=m.useState(!1);m.useEffect(()=>{e&&(a(""),s(""),l(!1),u(null),y(!1))},[e]);const g=C=>{a(C),c||s(cat(C))},k=C=>{s(C),c||l(!0)},x=i.trim(),v=r.trim(),M=x.length>0&&lat.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(Xr,{className:"sm:max-w-md",style:dat,"data-testid":"flow-create-dialog",onOpenAutoFocus:C=>{C.preventDefault();const _=document.querySelector('[data-testid="flow-create-name-input"]');_==null||_.focus()},children:[f.jsxs(Yr,{children:[f.jsx(Qr,{children:"Create new flow"}),f.jsx(Jr,{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:i,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(sr,{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 hat({open:e,onOpenChange:t,flow:n,flows:o,onDelete:r,onDeleted:a}){var M;const i=m.useMemo(()=>o.filter(w=>w.flowSlug!==(n==null?void 0:n.flowSlug)),[o,n==null?void 0:n.flowSlug]),s=((M=i[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),a==null||a(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(Xr,{className:"sm:max-w-md","data-testid":"flow-delete-dialog",children:[f.jsxs(Yr,{children:[f.jsx(Qr,{children:"Delete flow"}),f.jsxs(Jr,{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:i.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(sr,{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 fat({open:e,onOpenChange:t,flow:n,onRename:o,onRenamed:r}){const[a,i]=m.useState(""),[s,c]=m.useState(null),[l,h]=m.useState(!1);if(m.useEffect(()=>{e&&n&&(i(n.name),c(null),h(!1))},[e,n]),!n)return f.jsx(ir,{open:!1,onOpenChange:t});const u=a.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(Xr,{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(Yr,{children:[f.jsx(Qr,{children:"Rename flow"}),f.jsx(Jr,{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:a,onChange:k=>i(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(sr,{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 pat({project:e,activeFlow:t,flows:n,onSelect:o,onCreate:r,onRename:a,onDelete:i}){const[s,c]=m.useState(!1),l=n.find(h=>h.flowSlug===t);return f.jsxs(Bd,{open:s,onOpenChange:c,children:[f.jsx(X0,{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(eae,{className:"h-3.5 w-3.5 opacity-60"})]})}),f.jsx(Gi,{align:"start",sideOffset:6,className:"w-[260px] p-0","data-testid":"flow-switcher-popover",children:f.jsx(xq,{children:f.jsxs(wq,{children:[f.jsx(Mq,{children:"No flows."}),n.length>0?f.jsx(pz,{heading:"Flows",children:n.map(h=>{const u=h.flowSlug===t;return f.jsxs(yz,{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),a==null||a(h.flowSlug)},children:f.jsx(irt,{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),i==null||i(h.flowSlug)},children:f.jsx(oae,{className:"h-3.5 w-3.5"})})]})]},h.flowSlug)})}):null,n.length>0?f.jsx(Pte,{}):null,f.jsx(pz,{children:f.jsxs(yz,{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(nae,{className:"h-4 w-4 opacity-70"}),f.jsx("span",{className:"font-medium",children:"New flow"})]})})]})})})]})}const yat={"--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"},UK=e=>e?`${e.project}/${e.flow}`:null,mat=e=>{const t=e.indexOf("/");return t<1||t===e.length-1?null:{project:e.slice(0,t),flow:e.slice(t+1)}},WK=e=>`linkflow-picker-row-${e.replace(/\//g,"__")}`;function gat({open:e,onOpenChange:t,mode:n,demos:o,currentSlug:r,initialTarget:a,onCommit:i}){const[s,c]=m.useState(""),[l,h]=m.useState(()=>n==="edit"?UK(a):null);m.useEffect(()=>{e&&(c(""),h(n==="edit"?UK(a):null))},[e,n,a]);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=mat(l);w&&(i(w),t(!1))},[l,p,i,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?WK(l):void 0,M=p>=0;return f.jsx(ir,{open:e,onOpenChange:t,children:f.jsxs(Xr,{className:"sm:max-w-md",style:yat,"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(Yr,{children:[f.jsx(Qr,{"data-testid":"linkflow-picker-title",children:x}),f.jsx(Jr,{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:WK(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(sr,{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 kat=(e,t)=>{if(e.has(t))return e;const n=new Set(e);return n.add(t),n},vat=(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},xat=(e,t)=>{if(!e.has(t))return e;const n=new Set(e);return n.delete(t),n},wat=(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},Mat=(e,t)=>{if(e.size===0)return e;const n=new Set(t.map(a=>a.id));let o=!1;const r=new Set(e);for(const a of r)n.has(a)||(r.delete(a),o=!0);return o?r:e},GK=()=>{const[e,t]=m.useState(()=>new Set),n=m.useCallback(c=>{t(l=>kat(l,c))},[]),o=m.useCallback(c=>{t(l=>vat(l,c))},[]),r=m.useCallback(c=>{t(l=>xat(l,c))},[]),a=m.useCallback(c=>{t(l=>wat(l,c))},[]),i=m.useCallback(c=>{t(l=>Mat(l,c))},[]),s=m.useCallback(()=>t(new Set),[]);return{ids:e,mark:n,markMany:o,unmark:r,unmarkMany:a,pruneAgainst:i,reset:s}},kD=(e,t)=>e===t?!0:e==null||t==null||typeof e!=typeof t||typeof e!="object"?!1:JSON.stringify(e)===JSON.stringify(t),bat=(e,t,n)=>({...e,[t]:{...e[t],...n}}),_at=(e,t)=>{if(!(t in e))return e;const n={...e};return delete n[t],n},KK=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),Cat=(e,t)=>{const n=Object.entries(e);if(n.length===0)return e;const o=new Map(t.map(i=>[i.id,i]));let r=!1;const a={...e};for(const[i,s]of n){const c=o.get(i);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"&&KK(y)&&KK(g)){const k={};let x=!1;for(const v of Object.keys(y))kD(y[v],g[v])||(k[v]=y[v],x=!0);x&&(h[p]=k,u=!0)}else kD(y,g)||(h[p]=y,u=!0)}u?kD(l,s)||(a[i]=l,r=!0):(delete a[i],r=!0)}return r?a:e},ZK=()=>{const[e,t]=m.useState({}),n=m.useCallback((i,s)=>{t(c=>bat(c,i,s))},[]),o=m.useCallback(i=>{t(s=>_at(s,i))},[]),r=m.useCallback(i=>{t(s=>Cat(s,i))},[]),a=m.useCallback(()=>t({}),[]);return{overrides:e,setOverride:n,dropOverride:o,pruneAgainst:r,reset:a}};function Sat({nodes:e,connectors:t,flowPos:n,nodeIdGen:o,connectorIdGen:r,defaultOffset:a={x:24,y:24}}){const i=new Map;for(const y of e)i.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:a.x,h=n?n.y-c:a.y,u=e.map(y=>{const g=i.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:i.get(y.source)??y.source,target:i.get(y.target)??y.target}});return{newNodes:u,newConnectors:p,idMap:i}}const Lat=e=>({type:"image",position:e.position,data:{path:"",alt:e.originalFilename,width:e.dims.width,height:e.dims.height,_uploading:!0}}),Nat=e=>({type:"image",data:mae(e)}),Iat=e=>({type:"image",position:e.position,data:{path:"",alt:e.originalFilename,width:e.dims.width,height:e.dims.height,_uploadError:e.message}}),mae=e=>({...zHe(e.path,e.dims,e.lastUsed),alt:e.originalFilename}),Aat=async(e,t)=>{const{nodeId:n,flowId:o,file:r,originalFilename:a,position:i,dims:s,lastUsed:c}=e;t.rememberRetry(n,{file:r,originalFilename:a,position:i,dims:s}),t.setOverride(n,Lat({position:i,dims:s,originalFilename:a}));const l=async()=>{let h;try{h=(await t.upload(o,n,r,a)).path}catch(y){const g=y instanceof Error?y.message:String(y);throw t.setOverride(n,Iat({position:i,dims:s,originalFilename:a,message:g})),y}t.setOverride(n,Nat({path:h,dims:s,originalFilename:a,lastUsed:c}));const u=mae({path:h,dims:s,originalFilename:a,lastUsed:c}),p={id:n,type:"image",position:i,data:u};await t.createNode(o,p),t.forgetRetry(n)};if(t.history){await t.history.batch("insert-image",l);return}await l()};function Eat(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 jat="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",$at=248;function vr(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<$at&&(t+=jat[r%62])}}return t}const Pat=new Set(["INPUT","TEXTAREA","SELECT"]),xr=e=>e?Pat.has(e.tagName)?!0:e instanceof HTMLElement&&e.isContentEditable:!1,zat=(e,t,n)=>{const o=e.indexOf(t);if(o<0)return null;const r=e.length,a=[...e];switch(n.op){case"forward":{if(o>=r-1)return null;const i=a[o],s=a[o+1];return i===void 0||s===void 0?null:(a[o]=s,a[o+1]=i,a)}case"backward":{if(o<=0)return null;const i=a[o],s=a[o-1];return i===void 0||s===void 0?null:(a[o]=s,a[o-1]=i,a)}case"toFront":{if(o===r-1)return null;const[i]=a.splice(o,1);return i===void 0?null:(a.push(i),a)}case"toBack":{if(o===0)return null;const[i]=a.splice(o,1);return i===void 0?null:(a.unshift(i),a)}case"toIndex":{const i=Math.min(Math.max(n.index,0),r-1);if(i===o)return null;const[s]=a.splice(o,1);return s===void 0?null:(a.splice(i,0,s),a)}}};function Rat({project:e,flow:t,slug:n,demos:o,detail:r,loading:a,runs:i,nodeEvents:s,statusByNode:c,externalReloadSignal:l,onPlayNode:h,refreshFlows:u,canvasRef:p}){var wn,Ua;const y=o.find(q=>q.slug===n),{flows:g,createFlow:k,renameFlow:x,deleteFlow:v}=_F(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=ZK(),z=ZK(),W=GK(),$=GK(),[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),[K,X]=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),ce=m.useCallback(q=>{ne.current=q},[]),{reset:ve}=E,{reset:ge}=z,{reset:xe}=W,{reset:Re}=$;m.useEffect(()=>{w([]),C([]),S(null),ve(),ge(),xe(),Re(),D(null),I(null),hr.current=null,tn(!1),Yn.current.clear()},[r==null?void 0:r.id]);const Ye=m.useCallback((q,F)=>{w(q),C(F)},[]),le=(wn=r==null?void 0:r.flow)==null?void 0:wn.nodes,Ie=(Ua=r==null?void 0:r.flow)==null?void 0:Ua.connectors,{pruneAgainst:jt}=E,{pruneAgainst:xt}=z,{pruneAgainst:Qt}=W,{pruneAgainst:se}=$;m.useEffect(()=>{if(!(!le||!T)&&le.length===T.length){for(let q=0;q<le.length;q++){const F=le[q],U=T[q];if(!F||F.id!==U)return}D(null)}},[le,T]);const Q=(r==null?void 0:r.id)??null,$t=m.useMemo(()=>RHe({baseUrl:"",project:e,flow:t}),[e,t]),hn=m.useRef({nodes:[],connectors:[]});m.useEffect(()=>{hn.current={nodes:le??[],connectors:Ie??[]}},[le,Ie]);const{adapter:ae,history:Y}=m.useMemo(()=>UHe($t,()=>hn.current),[$t,Q]);m.useEffect(()=>{le&&(jt(le),Qt(le))},[le,jt,Qt]),m.useEffect(()=>{Ie&&(xt(Ie),se(Ie))},[Ie,xt,se]);const he=m.useRef(!1);m.useEffect(()=>{if(!he.current){he.current=!0;return}Y.markExternalChange()},[l,Y]);const[Ae,De]=m.useState(!1),[Ke,Ft]=m.useState(null),[fn,Jt]=m.useState(null),{setOverride:ke,dropOverride:Le}=E,Ht=m.useRef(E.overrides);m.useEffect(()=>{Ht.current=E.overrides},[E.overrides]);const Pn=m.useCallback((q,F)=>{!Q||!ae||(ke(q,{position:F}),I(null),ae.updateNodePosition(q,F).catch(U=>{Le(q),I(U instanceof Error?U.message:String(U)),console.error("updateNodePosition failed",U)}))},[Q,ae,ke,Le]),en=m.useCallback(q=>{if(!Q||!ae||q.length===0)return;const F=q.map(U=>(le==null?void 0:le.find(ee=>ee.id===U.id))?{id:U.id,next:U.position}:null).filter(U=>U!==null);if(F.length!==0){for(const U of F)ke(U.id,{position:U.next});I(null),Y.batch("move-nodes",async()=>{for(const U of F)await ae.updateNodePosition(U.id,U.next)}).catch(U=>{for(const G of F)Le(G.id);I(U instanceof Error?U.message:String(U)),console.error("updateNodePosition batch failed",U)})}},[Q,ae,Y,le,ke,Le]),n2=m.useCallback((q,F)=>{ke(q,{position:{x:F.x,y:F.y},data:{width:F.width,height:F.height}})},[ke]),ko=m.useCallback((q,F)=>{if(!Q||!ae)return;const U={width:F.width,height:F.height,position:{x:F.x,y:F.y}};ke(q,{position:U.position,data:{width:U.width,height:U.height}}),I(null),ae.updateNode(q,U).catch(G=>{Le(q),I(G instanceof Error?G.message:String(G)),console.error("updateNode resize failed",G)})},[Q,ae,ke,Le]),Xn=m.useCallback(q=>{if(!Q||!ae)return;const F={autoSize:!0};ke(q,{data:{autoSize:!0,width:void 0,height:void 0}}),I(null),ae.updateNode(q,F).catch(U=>{Le(q),I(U instanceof Error?U.message:String(U)),console.error("updateNode (fit-to-content) failed",U)})},[Q,ae,ke,Le]),Ra=m.useCallback(q=>{if(!Q||!ae||q.length===0)return;const F=[];for(const G of q){if(!(le==null?void 0:le.find(Je=>Je.id===G.id)))continue;const ze={position:G.position};G.width!==void 0&&(ze.width=G.width),G.height!==void 0&&(ze.height=G.height),F.push({id:G.id,next:ze})}if(F.length===0)return;for(const G of F){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 U=F.map(G=>G.id).slice().sort().join(",");Y.batch("multi-resize",async()=>{for(const G of F)await ae.updateNode(G.id,G.next)},{coalesceKey:`multi:resize:${U}`}).catch(G=>{for(const ee of F)Le(ee.id);I(G instanceof Error?G.message:String(G)),console.error("updateNode multi-resize batch failed",G)})},[Q,ae,Y,le,ke,Le]),{setOverride:Qe,dropOverride:Wt}=z,Jd=m.useCallback((q,F)=>{ke(q,{data:F})},[ke]),eu=m.useCallback((q,F)=>{for(const U of q)ke(U,{data:F})},[ke]),tu=m.useCallback((q,F)=>{Qe(q,F)},[Qe]),nu=m.useCallback((q,F)=>{!Q||!ae||(YU(ri,F),ke(q,{data:F}),I(null),ae.updateNode(q,F).catch(U=>{Le(q),I(U instanceof Error?U.message:String(U)),console.error("updateNode style failed",U)}))},[Q,ae,ke,Le]),ou=m.useCallback((q,F)=>{if(!Q||!ae||q.length===0)return;YU(ri,F);const U=q.filter(G=>le==null?void 0:le.some(ee=>ee.id===G));if(U.length!==0){for(const G of U)ke(G,{data:F});I(null),Y.batch("style-nodes",async()=>{for(const G of U)await ae.updateNode(G,F)}).catch(G=>{for(const ee of U)Le(ee);I(G instanceof Error?G.message:String(G)),console.error("updateNode style-nodes batch failed",G)})}},[Q,ae,Y,le,ke,Le]),ru=m.useCallback((q,F)=>{!Q||!ae||(AHe(ri,F),Qe(q,F),I(null),ae.updateConnector(q,F).catch(U=>{Wt(q),I(U instanceof Error?U.message:String(U)),console.error("updateConnector failed",U)}))},[Q,ae,Qe,Wt]),{mark:Zi,markMany:Xi,unmark:Yi,unmarkMany:Qi}=W,{markMany:ta,unmarkMany:na}=$,au=m.useCallback(q=>{if(!Q||!ae||!(le==null?void 0:le.find(ee=>ee.id===q)))return;const U=(Ie??[]).filter(ee=>ee.source===q||ee.target===q).map(ee=>ee.id),G=new Set(U);I(null),Zi(q),U.length>0&&ta(U),w(ee=>ee.filter(ze=>ze!==q)),C(ee=>ee.filter(ze=>!G.has(ze))),ae.deleteNode(q).catch(ee=>{Yi(q),U.length>0&&na(U),I(ee instanceof Error?ee.message:String(ee)),console.error("deleteNode failed",ee)})},[Q,ae,le,Ie,Zi,ta,Yi,na]),iu=m.useCallback((q,F)=>{if(!Q||!ae||!le)return;const U=T??le.map(ee=>ee.id),G=zat(U,q,F);G&&(D(G),I(null),ae.reorderNode(q,F).catch(ee=>{D(null),I(ee instanceof Error?ee.message:String(ee)),console.error("reorderNode failed",ee)}))},[Q,ae,le,T]),zo=m.useCallback((q,F)=>{if(!Q||!ae||q.length===0&&F.length===0)return;const U=new Set(q),G=q.map(He=>le==null?void 0:le.find(Mn=>Mn.id===He)).filter(He=>!!He),ee=(Ie??[]).filter(He=>U.has(He.source)||U.has(He.target)),ze=new Set(ee.map(He=>He.id)),Je=F.map(He=>Ie==null?void 0:Ie.find(Mn=>Mn.id===He)).filter(He=>!!He).filter(He=>!ze.has(He.id));if(G.length===0&&ee.length===0&&Je.length===0)return;I(null);const et=G.map(He=>He.id),Pt=[...ee.map(He=>He.id),...Je.map(He=>He.id)];et.length>0&&Xi(et),Pt.length>0&&ta(Pt);const Ho=G;w(He=>He.filter(Mn=>!U.has(Mn)));const fu=new Set(Je.map(He=>He.id));C(He=>He.filter(Mn=>!fu.has(Mn)&&!ze.has(Mn))),Y.batch("delete-selection",async()=>{for(const He of Ho)await ae.deleteNode(He.id);await Promise.all(Je.map(He=>ae.deleteConnector(He.id)))}).catch(He=>{et.length>0&&Qi(et),Pt.length>0&&na(Pt),I(He instanceof Error?He.message:String(He)),console.error("deleteSelection batch failed",He)})},[Q,ae,Y,le,Ie,Xi,ta,Qi,na]);m.useEffect(()=>{A.current=zo},[zo]),m.useEffect(()=>{const q=F=>{if(F.key!=="Delete"&&F.key!=="Backspace"||xr(document.activeElement)||document.querySelector('[data-testid="inline-edit-input"]'))return;const U=N.current,G=P.current;U.length===0&&G.length===0||(F.preventDefault(),zo(U,G))};return window.addEventListener("keydown",q),()=>window.removeEventListener("keydown",q)},[zo]);const Ji=m.useCallback((q,F)=>{!Q||!ae||(ke(q,{data:{name:F}}),I(null),ae.updateNode(q,{name:F}).catch(U=>{I(U instanceof Error?U.message:String(U)),console.error("updateNode name failed",U)}))},[Q,ae,ke]),Fe=m.useCallback((q,F)=>{!Q||!ae||(ke(q,{data:{description:F}}),I(null),ae.updateNode(q,{description:F}).catch(U=>{I(U instanceof Error?U.message:String(U)),console.error("updateNode description failed",U)}))},[Q,ae,ke]),Nt=m.useCallback((q,F)=>{!Q||!ae||(ke(q,{data:{detail:F}}),I(null),ae.updateNode(q,{detail:F}).catch(U=>{I(U instanceof Error?U.message:String(U)),console.error("updateNode detail failed",U)}))},[Q,ae,ke]),Ta=m.useCallback((q,F)=>{!Q||!ae||(ke(q,{data:{icon:F??void 0}}),I(null),ae.updateNode(q,{icon:F}).catch(U=>{I(U instanceof Error?U.message:String(U)),console.error("updateNode icon failed",U)}))},[Q,ae,ke]),su=m.useCallback((q,F)=>{!Q||!ae||(ke(q,{data:{target:F}}),I(null),ae.updateNode(q,{target:F}).catch(U=>{Le(q),I(U instanceof Error?U.message:String(U)),console.error("updateNode target failed",U)}))},[Q,ae,ke,Le]),oa=m.useCallback((q,F,U)=>{if(!Q||!ae)return;I(null);const G=`node-${vr()}`,ee=JU(q,U,$2(ri).node),ze={id:G,type:q,position:F,data:ee};ke(G,{id:G,type:q,position:F,data:ee}),ae.createNode(ze).catch(et=>{Le(G),I(et instanceof Error?et.message:String(et)),console.error("createNode failed",et)})},[Q,ae,ke,Le]),ur=m.useCallback((q,F)=>{if(!Q||!ae)return;I(null);const U=`node-${vr()}`,G={width:F.width,height:F.height},ee={id:U,type:"linkflow",position:q,data:G},ze={...G,_autoOpenPickerOnMount:!0};ke(U,{id:U,type:"linkflow",position:q,data:ze}),ae.createNode(ee).catch(et=>{Le(U),I(et instanceof Error?et.message:String(et)),console.error("createNode (linkflow) failed",et)})},[Q,ae,ke,Le]),ra=m.useCallback((q,F)=>{if(!Q||!ae)return;I(null);const U=`node-${vr()}`,G={icon:q,width:N0.width,height:N0.height},ee={id:U,type:"icon",position:F,data:G};ke(U,{id:U,type:"icon",position:F,data:G}),w([U]),ae.createNode(ee).catch(Je=>{Le(U),I(Je instanceof Error?Je.message:String(Je)),console.error("createNode (icon) failed",Je)})},[Q,ae,ke,Le]),vo=m.useCallback(q=>{if(!Q||!ae)return;I(null);const F=`node-${vr()}`,U={id:F,type:"html",position:q.position,data:{}},G={id:F,type:"html",position:q.position,data:{}};ke(F,G),w([F]),ae.createNode(U).catch(ee=>{Le(F),I(ee instanceof Error?ee.message:String(ee)),console.error("createNode (type:'html') failed",ee)})},[Q,ae,ke,Le]),Yn=m.useRef(new Map),sn=m.useCallback((q,F)=>{Yn.current.set(q,F)},[]),Gt=m.useCallback(q=>{Yn.current.delete(q)},[]),Ro=m.useCallback(q=>{!Q||!ae||(I(null),Aat({...q,flowId:Q,lastUsed:$2(ri).node},{upload:async(F,U,G,ee)=>ae.uploadImage(U,await ZAe(G),ee),createNode:async(F,U)=>{const{id:G}=await ae.createNode(U);return{id:G}},setOverride:ke,history:Y,rememberRetry:sn,forgetRetry:Gt}).catch(F=>{console.error("image-upload-flow failed",F)}))},[Q,ae,Y,ke,sn,Gt]),es=m.useCallback(q=>{if(!Q||!ae)return;const F=`node-${vr()}`;Ro({nodeId:F,...q})},[Q,ae,Ro]),cu=m.useCallback(q=>{const F=Yn.current.get(q);F&&Ro({nodeId:q,...F})},[Ro]),[To,ts]=m.useState({open:!1,mode:"insert"}),pt=m.useCallback((q,F)=>{ts({open:!0,mode:q,nodeId:F})},[]),Qn=m.useCallback(()=>{ts(q=>({...q,open:!1}))},[]),Da=m.useCallback(()=>{pt("insert")},[pt]),lu=m.useCallback(q=>pt("replace",q),[pt]),aa=m.useCallback(q=>{if(vHe(q),To.mode==="replace"&&To.nodeId){if(Q&&ae){const F=To.nodeId;ke(F,{data:{icon:q}}),I(null),ae.updateNode(F,{icon:q}).catch(U=>{Le(F),I(U instanceof Error?U.message:String(U)),console.error("updateNode (icon replace) failed",U)})}}else{const F=ne.current;if(F&&Q){const U=gHe(F,{width:window.innerWidth,height:window.innerHeight});ra(q,U)}}Qn()},[To.mode,To.nodeId,Q,ae,ke,Le,ra,Qn]),ia=m.useCallback((q,F)=>{!Q||!ae||(Qe(q,{label:F}),I(null),ae.updateConnector(q,{label:F}).catch(U=>{I(U instanceof Error?U.message:String(U)),console.error("updateConnector label failed",U)}))},[Q,ae,Qe]),du=m.useCallback((q,F,U)=>{if(!Q||!ae)return;const G=`conn-${vr()}`,ee=U==null?void 0:U.targetPin,ze=$2(ri).connector,Je={id:G,source:q,target:F,sourceHandleAutoPicked:!0,targetHandleAutoPicked:!0,...ee?{targetPin:ee}:{},...ze},et={id:G,source:q,target:F,sourceHandleAutoPicked:!0,targetHandleAutoPicked:!0,...ee?{targetPin:ee}:{},...ze};Qe(G,Je),I(null),ae.createConnector(et).catch(Pt=>{Wt(G),I(Pt instanceof Error?Pt.message:String(Pt)),console.error("createConnector failed",Pt)})},[Q,ae,Qe,Wt]),ns=m.useCallback(({sourceNodeId:q,position:F,shape:U})=>{if(!Q||!ae)return;I(null);const G=`node-${vr()}`,ee=`conn-${vr()}`,ze=uz[U],Je=$2(ri),et=JU(U,ze,Je.node),Pt={id:G,type:U,position:F,data:et},Ho={id:ee,source:q,target:G,sourceHandleAutoPicked:!0,targetHandleAutoPicked:!0,...Je.connector};ke(G,{id:G,type:U,position:F,data:et}),Qe(ee,Ho),S(G),Y.batch("create-and-connect",async()=>{await ae.createNode(Pt),await ae.createConnector(Ho)}).catch(He=>{Le(G),Wt(ee),I(He instanceof Error?He.message:String(He)),console.error("createAndConnectFromPane failed",He)})},[Q,ae,Y,ke,Le,Qe,Wt]),hr=m.useRef(null),[sa,tn]=m.useState(!1),[fr,Ha]=m.useState(()=>({canUndo:Y.canUndo,canRedo:Y.canRedo}));m.useEffect(()=>Y.subscribe(Ha),[Y]);const Do=m.useCallback(q=>{if(!le)return;const F=new Set(q),U=le.filter(ee=>F.has(ee.id));if(U.length===0)return;const G=(Ie??[]).filter(ee=>F.has(ee.source)&&F.has(ee.target));hr.current=JSON.parse(JSON.stringify({nodes:U,connectors:G})),tn(!0)},[le,Ie]),zn=m.useCallback(q=>{if(!Q||!ae)return;const F=hr.current;if(!F||F.nodes.length===0)return;const{newNodes:U,newConnectors:G}=Sat({nodes:F.nodes,connectors:F.connectors,flowPos:q,nodeIdGen:()=>`node-${vr()}`,connectorIdGen:()=>`conn-${vr()}`});for(const ee of U)ke(ee.id,ee);for(const ee of G)Qe(ee.id,ee);w(U.map(ee=>ee.id)),C(G.map(ee=>ee.id)),I(null),Y.batch("paste",async()=>{for(const ee of U)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 ze of U)Le(ze.id);for(const ze of G)Wt(ze.id);I(ee instanceof Error?ee.message:String(ee)),console.error("paste failed",ee)})},[Q,ae,Y,ke,Le,Qe,Wt]);m.useEffect(()=>{const q=F=>{const U=LHe({event:F,isEditableActive:xr(document.activeElement),hasNodes:!!le&&le.length>0,hasConnectors:!!Ie&&Ie.length>0,selectedIds:N.current,hasClipboard:!!hr.current});if(U.type!=="noop"&&!(U.type==="copy"||U.type==="paste")){if(F.preventDefault(),U.type==="selectAll"){w((le??[]).map(G=>G.id)),C((Ie??[]).map(G=>G.id));return}Do([...U.ids]),zn(null)}};return window.addEventListener("keydown",q),()=>window.removeEventListener("keydown",q)},[le,Ie,Do,zn]),m.useEffect(()=>{const q=F=>{const U=_He(F);if(!U||xr(document.activeElement))return;const G=N.current;if(G.length===0)return;const ee=E.overrides,ze=(le??[]).map(et=>{var Ho;const Pt=((Ho=ee[et.id])==null?void 0:Ho.position)??et.position;return{id:et.id,position:Pt}}),Je=SHe(U,G,ze);if(Je.length!==0)if(F.preventDefault(),Je.length===1){const et=Je[0];et&&Pn(et.id,et.position)}else en(Je)};return window.addEventListener("keydown",q),()=>window.removeEventListener("keydown",q)},[le,E.overrides,Pn,en]),m.useEffect(()=>{const q=F=>{const U=CHe(F);if(!U||xr(document.activeElement))return;F.preventDefault();const G=ne.current;G&&(U==="fit"?G.fitView({padding:.2,duration:200}):U==="in"?G.zoomIn({duration:150}):G.zoomOut({duration:150}))};return window.addEventListener("keydown",q),()=>window.removeEventListener("keydown",q)},[]);const Jn=m.useCallback(async q=>{if(!Q||!ae||!le||!ae.computeLayout)return;const F=E.overrides,U=ne.current,G=q==="selection"?new Set(N.current):null,ee=G?le.filter(We=>G.has(We.id)):le;if(ee.length<2)return;const ze=new Set(ee.map(We=>We.id)),Je=(Ie??[]).filter(We=>ze.has(We.source)&&ze.has(We.target)),et=new Map,Pt=ee.map(We=>{var bo;const nn=((bo=F[We.id])==null?void 0:bo.position)??We.position;et.set(We.id,nn);const on=U==null?void 0:U.getInternalNode(We.id),Tn=on==null?void 0:on.measured,Ga=We.data,bn=(Tn==null?void 0:Tn.width)??Ga.width??200,Mo=(Tn==null?void 0:Tn.height)??Ga.height??120;return{id:We.id,type:We.type,width:bn,height:Mo}}),Ho=Je.map(We=>({id:We.id,source:We.source,target:We.target})),fu=await ae.computeLayout(Pt,Ho),He=new Map;for(const[We,nn]of Object.entries(fu.nodes))He.set(We,nn.position);let Mn=Number.POSITIVE_INFINITY,pu=Number.POSITIVE_INFINITY,rs=Number.POSITIVE_INFINITY,yu=Number.POSITIVE_INFINITY;for(const We of Pt){const nn=et.get(We.id);if(!nn)continue;nn.x<Mn&&(Mn=nn.x),nn.y<pu&&(pu=nn.y);const on=He.get(We.id);on&&(on.x<rs&&(rs=on.x),on.y<yu&&(yu=on.y))}const HR=Number.isFinite(Mn)&&Number.isFinite(rs)?Mn-rs:0,Wa=Number.isFinite(pu)&&Number.isFinite(yu)?pu-yu:0,Rn=[];for(const We of Pt){const nn=et.get(We.id),on=He.get(We.id);if(!nn||!on)continue;const Tn={x:on.x+HR,y:on.y+Wa},Ga=Tn.x-nn.x,bn=Tn.y-nn.y;Math.abs(Ga)<1&&Math.abs(bn)<1||Rn.push({id:We.id,prev:nn,next:Tn})}if(Rn.length!==0){I(null);for(const We of Rn)ke(We.id,{position:We.next});Y.batch("tidy",async()=>{for(const We of Rn)await ae.updateNodePosition(We.id,We.next)}).catch(We=>{for(const nn of Rn)Le(nn.id);I(We instanceof Error?We.message:String(We)),console.error("Tidy batch failed",We)})}},[Q,ae,Y,le,Ie,E.overrides,ke,Le]);m.useEffect(()=>{const q=F=>{if(!(F.metaKey||F.ctrlKey)||!F.shiftKey||F.altKey||F.key.toLowerCase()!=="l"||xr(document.activeElement))return;F.preventDefault();const U=N.current.length>0?"selection":"all";Jn(U)};return window.addEventListener("keydown",q),()=>window.removeEventListener("keydown",q)},[Jn]);const Oa=m.useCallback(()=>{const q=N.current.length>0?"selection":"all";Jn(q)},[Jn]);m.useEffect(()=>{const q=F=>{if(xr(document.activeElement)||document.querySelector('[data-testid="inline-edit-input"]'))return;const U=IHe(F);if(U===null)return;const G=V.current;if(U==="select"){G.kind!=="select"&&L({kind:"select"});return}if(U==="hand"){L(G.kind==="hand"?{kind:"select"}:{kind:"hand"});return}if(G.kind==="draw"&&G.shape===U){L({kind:"select"});return}L({kind:"draw",shape:U})};return window.addEventListener("keydown",q),()=>window.removeEventListener("keydown",q)},[]),m.useEffect(()=>{const q=F=>{if(F.key!=="Escape"||xr(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",q),()=>window.removeEventListener("keydown",q)},[]),m.useEffect(()=>{const q=F=>{if(F.key.toLowerCase()!=="f"||F.metaKey||F.ctrlKey||F.shiftKey||F.altKey||xr(document.activeElement)||document.querySelector('[data-testid="inline-edit-input"]'))return;const U=N.current;if(U.length===0)return;const G=ne.current;G&&G.fitView({nodes:U.map(ee=>({id:ee})),padding:.2,duration:200})};return window.addEventListener("keydown",q),()=>window.removeEventListener("keydown",q)},[]),m.useEffect(()=>{const q=F=>{if(F.key!=="1"||F.metaKey||F.ctrlKey||F.shiftKey||F.altKey||xr(document.activeElement)||document.querySelector('[data-testid="inline-edit-input"]'))return;const U=ne.current;if(!U)return;const{x:G,y:ee}=U.getViewport();U.setViewport({x:G,y:ee,zoom:1},{duration:150})};return window.addEventListener("keydown",q),()=>window.removeEventListener("keydown",q)},[]);const xo=m.useCallback(q=>{var F,U;switch(q){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;Do([...G]);return}case"edit.paste":zn(null);return;case"edit.duplicate":{const G=N.current;if(G.length===0)return;Do([...G]),zn(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((le??[]).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:ze}=G.getViewport();G.setViewport({x:ee,y:ze,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(ze=>({id:ze})),padding:.2,duration:200});return}case"layout.tidy":{const G=N.current.length>0?"selection":"all";Jn(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":{(F=p.current)==null||F.exportPdf();return}case"export.png":{(U=p.current)==null||U.exportPng();return}}},[Y,Do,zn,zo,le,Ie,Jn,p]);m.useEffect(()=>{const q=F=>{(F.metaKey||F.ctrlKey)&&(F.shiftKey||F.altKey||F.key.toLowerCase()==="p"&&(F.preventDefault(),!xr(document.activeElement)&&xo("help.commandPalette")))};return window.addEventListener("keydown",q),()=>window.removeEventListener("keydown",q)},[xo]);const ca=m.useCallback((q,F)=>{if(!Q||!ae)return;const U={...F.source!==void 0?{source:F.source}:{},...F.target!==void 0?{target:F.target}:{},...F.sourceHandle!==void 0?{sourceHandle:F.sourceHandle===null?void 0:F.sourceHandle}:{},...F.targetHandle!==void 0?{targetHandle:F.targetHandle===null?void 0:F.targetHandle}:{},...F.sourceHandleAutoPicked!==void 0?{sourceHandleAutoPicked:F.sourceHandleAutoPicked}:{},...F.targetHandleAutoPicked!==void 0?{targetHandleAutoPicked:F.targetHandleAutoPicked}:{},...F.sourcePin!==void 0?{sourcePin:F.sourcePin===null?void 0:F.sourcePin}:{},...F.targetPin!==void 0?{targetPin:F.targetPin===null?void 0:F.targetPin}:{}};Qe(q,U),I(null),ae.updateConnector(q,F).catch(G=>{Wt(q),I(G instanceof Error?G.message:String(G)),console.error("updateConnector reconnect failed",G)})},[Q,ae,Qe,Wt]),Fa=m.useCallback((q,F,U)=>{if(!Q||!ae)return;const G=F==="source"?"sourcePin":"targetPin";Qe(q,{[G]:U}),I(null),ae.updateConnector(q,{[G]:U}).catch(ee=>{Wt(q),I(ee instanceof Error?ee.message:String(ee)),console.error("updateConnector pin failed",ee)})},[Q,ae,Qe,Wt]),o2=m.useCallback((q,F)=>{if(!Q||!ae)return;const U=Ie==null?void 0:Ie.find(ze=>ze.id===q);if(!(U?F==="source"?U.sourcePin:U.targetPin:void 0))return;const ee=F==="source"?"sourcePin":"targetPin";Qe(q,{[ee]:void 0}),I(null),ae.updateConnector(q,{[ee]:null}).catch(ze=>{Wt(q),I(ze instanceof Error?ze.message:String(ze)),console.error("updateConnector unpin failed",ze)})},[Q,ae,Ie,Qe,Wt]),dt=r==null?void 0:r.flow,qa=E.overrides,pr=z.overrides,wo=W.ids,la=$.ids,Va=m.useMemo(()=>{if(!dt||M.length===0)return[];const q=new Map(dt.nodes.map(U=>[U.id,U])),F=[];for(const U of M){const G=q.get(U);if(!G)continue;const ee=qa[U];if(!ee){F.push(G);continue}const ze=ee.data?{...G.data,...ee.data}:G.data;F.push({...G,...ee,data:ze})}return F},[dt,M,qa]),uu=m.useMemo(()=>{if(!dt||b.length===0)return[];const q=new Map(dt.connectors.map(U=>[U.id,U])),F=[];for(const U of b){const G=q.get(U);if(!G)continue;const ee=pr[U];F.push(ee?{...G,...ee}:G)}return F},[dt,b,pr]),Of=m.useMemo(()=>{if(!dt)return null;if(!T)return dt.nodes;const q=new Map(dt.nodes.map(G=>[G.id,G])),F=[],U=new Set;for(const G of T){const ee=q.get(G);ee&&(F.push(ee),U.add(G))}for(const G of dt.nodes)U.has(G.id)||F.push(G);return F},[dt,T]),hu=m.useMemo(()=>{const q=Of??(dt==null?void 0:dt.nodes)??null;return q?wo.size===0?q:q.filter(F=>!wo.has(F.id)):null},[Of,dt,wo]),DR=m.useMemo(()=>{const q=(dt==null?void 0:dt.connectors)??null;return q?la.size===0&&wo.size===0?q:q.filter(F=>!la.has(F.id)&&!wo.has(F.source)&&!wo.has(F.target)):null},[dt,la,wo]),yr=m.useCallback((q,F)=>{X({nodeId:q,mode:F})},[]),Ba=m.useMemo(()=>{if(!hu)return null;let q=!1;const F=hu.map(U=>{if(U.type!=="linkflow")return U;q=!0;const G=U.data.target,ee=G?()=>brt({project:G.project,flow:G.flow}):void 0,ze=G?Eat(G,o):void 0;return{...U,data:{...U.data,onOpenPicker:yr.bind(null,U.id),onFollow:ee,_resolvedTarget:ze}}});return q?F:hu},[hu,yr,o]),Ff=(g==null?void 0:g.some(q=>q.flowSlug===t))??!1;if(!y&&!Ff&&!(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||a&&!r)return f.jsx("div",{className:"flex h-full w-full items-center justify-center text-sm text-muted-foreground",children:"Loading demo…"});const r2=M[0],qf=r2?c[r2]: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(uat,{open:Ae,onOpenChange:De,onCreate:k,onCreated:async q=>{await u(),J.current.add(`${e}/${q.flowSlug}`),Io({project:e,flow:q.flowSlug})}}),f.jsx(fat,{open:Ke!==null,onOpenChange:q=>{q||Ft(null)},flow:Ke,onRename:x,onRenamed:async(q,F)=>{await u(),q.flowSlug!==F&&(J.current.add(`${e}/${q.flowSlug}`),Io({project:e,flow:q.flowSlug}))}}),f.jsx(hat,{open:fn!==null,onOpenChange:q=>{q||Jt(null)},flow:fn,flows:g??[],onDelete:v,onDeleted:async(q,F)=>{var G;if(await u(),q!==t)return;const U=F??((G=g==null?void 0:g.find(ee=>ee.isDefault&&ee.flowSlug!==q))==null?void 0:G.flowSlug);U&&Io({project:e,flow:U})}}),dt&&ae?f.jsx(ert,{ref:p,mode:"edit",adapter:ae,history:Y,topRightSlot:f.jsx(pat,{project:e,activeFlow:t,flows:g??[],onSelect:q=>{q!==t&&Io({project:e,flow:q})},onCreate:()=>De(!0),onRename:q=>{const F=g==null?void 0:g.find(U=>U.flowSlug===q);F&&Ft({flowSlug:F.flowSlug,name:F.name,icon:F.icon})},onDelete:q=>{const F=g==null?void 0:g.find(U=>U.flowSlug===q);F&&Jt({flowSlug:F.flowSlug,name:F.name,isDefault:F.isDefault})}}),projectId:e,flowSlug:t,enableEmbed:!1,showShareMenu:!1,nodes:Ba??dt.nodes,connectors:DR??dt.connectors,selectedNodeIds:M,selectedConnectorIds:b,onSelectionChange:Ye,runtime:{runs:i,statuses:c,pendingOverrides:{nodes:qa,connectors:pr}},onPlayNode:h,onNodePositionChange:Pn,onNodePositionsChange:en,onNodeResize:n2,onNodeResizeEnd:ko,onHtmlNodeFitToContent:Xn,onComponentNodeFitToContent:Xn,onMultiResize:Ra,onNodeNameChange:Ji,onNodeDescriptionChange:Fe,onConnectorLabelChange:ia,onCreateShapeNode:oa,onCreateLinkflowNode:Q?ur:void 0,onCreateImageFromFile:Q?es:void 0,onRetryImageUpload:Q?cu:void 0,onCreateHtmlNode:Q?vo:void 0,iconPickerOpen:To.open,onOpenIconPicker:Q?Da:void 0,onCloseIconPicker:Q?Qn:void 0,onPickIcon:Q?aa:void 0,onRequestIconReplace:Q?lu:void 0,onCreateConnector:du,onReconnectConnector:ca,onPinEndpoint:Q?Fa:void 0,onUnpinEndpoint:Q?o2:void 0,onReorderNode:iu,onDeleteNode:au,onCopyNode:q=>Do([q]),onPasteAt:zn,onCopySelection:Q?Do:void 0,onPasteSelection:Q?()=>zn(null):void 0,hasClipboard:sa,selectedNodes:Va,selectedConnectors:uu,onStyleNode:nu,onStyleNodePreview:Jd,onStyleNodes:ou,onStyleNodesPreview:eu,onStyleConnector:ru,onStyleConnectorPreview:tu,onRfInit:ce,onTidy:le?Oa:void 0,onCreateAndConnectFromPane:ns,pendingEditNodeId:_,canvasMode:R,onCanvasModeChange:L,statusReport:qf,onNameChange:Ji,onDescriptionChange:Fe,onDetailChange:Nt,onIconChange:Ta,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(sat,{open:H,onOpenChange:j,runCommand:xo,ctx:{hasSelection:M.length>0||b.length>0,canUndo:fr.canUndo,canRedo:fr.canRedo,hasClipboard:sa,canExportDemo:!!Q}}),f.jsx(gat,{open:K!==null,onOpenChange:q=>{q||X(null)},mode:(K==null?void 0:K.mode)??"link",demos:o,currentSlug:n,initialTarget:(K==null?void 0:K.mode)==="edit"?(()=>{const q=le==null?void 0:le.find(U=>U.id===K.nodeId);return!q||q.type!=="linkflow"?null:q.data.target??null})():null,onCommit:q=>{K&&su(K.nodeId,q)}})]})}const Tat=e=>({display:e?"block":"none",height:"100%"});function Dat({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:Tat(r),children:t(n,r)},n.slug)})})}function Hat({demos:e,refreshFlows:t,canvasRef:n}){const o=sae();return f.jsx(Dat,{stack:o,renderEntry:(r,a)=>f.jsx(Oat,{entry:r,demos:e,refreshFlows:t,canvasRef:a?n:void 0})})}function Oat({entry:e,demos:t,refreshFlows:n,canvasRef:o}){const{project:r,flow:a,slug:i}=e,s=t.find(z=>z.slug===i),c=(s==null?void 0:s.id)??null,l=m.useRef(null),h=o??l,{detail:u,loading:p,refresh:y,applyDetail:g}=Urt(r,a),[k,x]=m.useState(0),{runs:v,apply:M}=Yrt(c),{events:w,apply:b}=Zrt(c),{statusByNode:C,apply:_,reset:S}=tat(c),N=m.useCallback(()=>{S(),y(),n()},[y,n,S]),P=m.useCallback(z=>{if(!c||!s)return;const W={id:c,slug:s.slug,filePath:""},$=z.valid?{...W,name:z.flow.name??s.name,flow:z.flow,valid:!0,error:null}:{...W,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,_]);nat(c,{onHello:N,onFlowReload:P,onEvent:A});const E=m.useCallback(z=>{ule(r,a,z).catch(W=>{M({type:"node:error",nodeId:z,message:W instanceof Error?W.message:String(W),ts:Date.now()})})},[r,a,M]);return f.jsx(Rat,{project:r,flow:a,slug:i,demos:t,detail:u,loading:p,runs:v,nodeEvents:w,statusByNode:C,externalReloadSignal:k,onPlayNode:E,refreshFlows:n,canvasRef:h})}const XK="npx seeflow register --path .";function Fat(){const[e,t]=m.useState(!1),n=async()=>{try{await navigator.clipboard.writeText(XK),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(lrt,{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:XK}),f.jsx(rt,{type:"button",variant:"ghost",size:"sm",onClick:n,"aria-label":"Copy register command",children:e?f.jsx(Jre,{className:"h-4 w-4"}):f.jsx(tae,{className:"h-4 w-4"})})]})]})})}function qat({demos:e}){return e.length===0?f.jsx(Fat,{}):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=iae(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"&&Crt();function Vat(){var S;const e=prt(),{demos:t,refresh:n}=Ort(),{projects:o,refresh:r,unregisterProject:a}=Frt(),i=sae(),s=i.at(-1)??null,c=(s==null?void 0:s.project)??null,l=(s==null?void 0:s.slug)??null,h=i.length>1?i.at(-2)??null:null,u=yrt(e),p=(u==null?void 0:u.project)??null,{flows:y}=_F(p);qrt({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=>{OK(N.id),n(),r(),Io({project:N.slug,flow:"main"})},[n,r]),x=m.useCallback(async(N,P)=>{await a(N,P),await n(),c===N&&Io(null)},[a,n,c]);m.useEffect(()=>{if(e!=="/"||t===null)return;const N=Brt(t,Vrt());if(N){const P=iae(N.slug);P&&Io(P)}},[e,t]),m.useEffect(()=>{g&&OK(g.id)},[g]),m.useEffect(()=>{s&&Lrt(s.project,s.flow)},[s]),m.useEffect(()=>{if(!p||!y)return;const N=Nrt(y,dae(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(d0,{delayDuration:150,children:f.jsxs("div",{className:"flex h-full w-full flex-col bg-background text-foreground",children:[f.jsx(Hrt,{projects:o??[],currentProjectSlug:c??void 0,onProjectCreated:k,onUnregisterProject:x,share:C,onBack:_?_rt:void 0,previousFlowName:_}),f.jsx("main",{className:"min-h-0 flex-1",children:i.length>0?f.jsx(Hat,{demos:t,refreshFlows:n,canvasRef:v}):f.jsx(qat,{demos:t})}),b&&c?f.jsx(urt,{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 gae=document.getElementById("root");if(!gae)throw new Error("Root element #root not found");vD.createRoot(gae).render(f.jsx(Ar.StrictMode,{children:f.jsx(Vat,{})}));export{xf as C,CJe as M,Ar as R,V0 as _,Vn as a,IY as b,YG as c,pP as d,IF as e,XY as f,aZe as g,hf as h,cZe as i,Uat as j,Mh as k,jr as l,f as m,JY as n,Ott as o,_$e as p,GKe as q,m as r,ao as s,lZe as t,Rq as u,QKe as w,Bat as z};
|