blade-code 0.7.5 → 0.7.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (77) hide show
  1. package/dist/blade.js +2 -2
  2. package/dist/chunk-10q3krvh.js +6 -0
  3. package/dist/chunk-1tzcptyb.js +3 -0
  4. package/dist/{chunk-ay3rhhx8.js → chunk-1y33d6xh.js} +1 -1
  5. package/dist/chunk-5accz8n9.js +1 -0
  6. package/dist/{chunk-kfg3vx5z.js → chunk-64x50qbc.js} +1 -1
  7. package/dist/chunk-8raa4q9y.js +1564 -0
  8. package/dist/chunk-ad19yrq6.js +1 -0
  9. package/dist/{chunk-jsn8476q.js → chunk-arwynrtf.js} +2 -2
  10. package/dist/chunk-bvn4e2vq.js +1 -0
  11. package/dist/{chunk-63dzf6hr.js → chunk-cadngkwr.js} +1 -1
  12. package/dist/{chunk-98jpdmgc.js → chunk-cdx3hp1r.js} +5 -5
  13. package/dist/{chunk-373pmz70.js → chunk-d9qh7bat.js} +1 -1
  14. package/dist/chunk-ebynn53v.js +26 -0
  15. package/dist/{chunk-cyxb6fxe.js → chunk-ezkbqmvd.js} +1 -1
  16. package/dist/{chunk-a8znntss.js → chunk-fceeqn6k.js} +2 -2
  17. package/dist/{chunk-c3yn8ds8.js → chunk-g60w2r7f.js} +2 -2
  18. package/dist/{chunk-k4behavv.js → chunk-h7qab07x.js} +1 -1
  19. package/dist/{chunk-bmcc85nj.js → chunk-jhzf05kz.js} +1 -1
  20. package/dist/chunk-k76q8cyc.js +151 -0
  21. package/dist/chunk-krrm6bjr.js +1 -0
  22. package/dist/{chunk-gjf2d2yg.js → chunk-m3hsaaq5.js} +1 -1
  23. package/dist/chunk-n2yq1wn8.js +9 -0
  24. package/dist/{chunk-rtn0rb16.js → chunk-npaj13y3.js} +2 -2
  25. package/dist/{chunk-0rw4tdqy.js → chunk-pf45ctn7.js} +1 -1
  26. package/dist/{chunk-cw125vv3.js → chunk-q6sj33v8.js} +1 -1
  27. package/dist/chunk-qedtzcp2.js +1 -0
  28. package/dist/{chunk-e21htmg4.js → chunk-qyfdt8h1.js} +1 -1
  29. package/dist/{chunk-38h3yh6z.js → chunk-r0hc7wad.js} +1 -1
  30. package/dist/chunk-rhvxr82g.js +2 -0
  31. package/dist/chunk-t6qek6xk.js +1 -0
  32. package/dist/{chunk-jf48kahn.js → chunk-ttf06k8y.js} +3 -3
  33. package/dist/chunk-tyjns370.js +1 -0
  34. package/dist/{chunk-7pcm8vy5.js → chunk-ve6bvba4.js} +28 -28
  35. package/dist/chunk-wdxbjvd5.js +2 -0
  36. package/dist/{chunk-n969rv4v.js → chunk-wg5nxtb2.js} +1 -1
  37. package/dist/{chunk-qxvp127d.js → chunk-wstkn75a.js} +1 -1
  38. package/dist/chunk-x4fx52e7.js +24 -0
  39. package/dist/chunk-xj63cr29.js +1 -0
  40. package/dist/{chunk-yaj4nmmp.js → chunk-zmndvdgb.js} +1 -1
  41. package/dist/{chunk-pvxp2gzr.js → chunk-zr71r1z1.js} +1 -1
  42. package/dist/web/assets/{FilePreview-evNzCuVx.js → FilePreview-CbtOITD1.js} +1 -1
  43. package/dist/web/assets/{MarkdownRenderer-BQoiQTDd.js → MarkdownRenderer-CW8WpEw1.js} +1 -1
  44. package/dist/web/assets/McpModal-DnqrgBON.js +5 -0
  45. package/dist/web/assets/SettingsModal-CRNT-LCq.js +1 -0
  46. package/dist/web/assets/{SettingsStore-CfDjhOkS.js → SettingsStore-B2GIhfKs.js} +1 -1
  47. package/dist/web/assets/SkillsModal-COQMbIdT.js +1 -0
  48. package/dist/web/assets/{TerminalPanel-Cs16_6ew.js → TerminalPanel-dCMUvQaH.js} +1 -1
  49. package/dist/web/assets/index-21gV5nOE.css +1 -0
  50. package/dist/web/assets/index-Cnz-_jPt.js +10 -0
  51. package/dist/web/assets/{useRequest-BJp539HQ.js → useRequest-C7k7cDPD.js} +1 -1
  52. package/dist/web/assets/{vendor-icons-DlzC8I7m.js → vendor-icons-BKXQ7ALf.js} +75 -30
  53. package/dist/web/assets/{vendor-radix-CfxBc_4-.js → vendor-radix-2yBsoRqx.js} +2 -2
  54. package/dist/web/index.html +2 -2
  55. package/package.json +1 -1
  56. package/dist/chunk-1vngdr7p.js +0 -1
  57. package/dist/chunk-5smacbk0.js +0 -24
  58. package/dist/chunk-8ea9h3mb.js +0 -151
  59. package/dist/chunk-8w1hd9ct.js +0 -1534
  60. package/dist/chunk-aevyre2t.js +0 -1
  61. package/dist/chunk-apb1p5q4.js +0 -1
  62. package/dist/chunk-b4hmtjec.js +0 -1
  63. package/dist/chunk-cqrg2pp7.js +0 -1
  64. package/dist/chunk-g1eb7f4q.js +0 -1
  65. package/dist/chunk-jfykets9.js +0 -6
  66. package/dist/chunk-kssr4fbg.js +0 -1
  67. package/dist/chunk-rkhhzc4r.js +0 -26
  68. package/dist/chunk-vhc1yr3v.js +0 -1
  69. package/dist/chunk-w1zb8zac.js +0 -3
  70. package/dist/chunk-yz2jztga.js +0 -7
  71. package/dist/chunk-zye2s6f0.js +0 -2
  72. package/dist/web/assets/McpModal-BT9OivhK.js +0 -5
  73. package/dist/web/assets/SettingsModal-CDRcorCS.js +0 -1
  74. package/dist/web/assets/SkillsModal-DCPaqoOe.js +0 -1
  75. package/dist/web/assets/dialog-C8VDk-ma.js +0 -1
  76. package/dist/web/assets/index-9t-WxRrl.js +0 -10
  77. package/dist/web/assets/index-Bu13aXyE.css +0 -1
@@ -1,4 +1,4 @@
1
- import{r as n}from"./vendor-react-Dm1xU4bP.js";/**
1
+ import{r as c}from"./vendor-react-Dm1xU4bP.js";/**
2
2
  * @license lucide-react v0.300.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -8,12 +8,17 @@ import{r as n}from"./vendor-react-Dm1xU4bP.js";/**
8
8
  *
9
9
  * This source code is licensed under the ISC license.
10
10
  * See the LICENSE file in the root directory of this source tree.
11
- */const m=a=>a.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase().trim(),e=(a,c)=>{const h=n.forwardRef(({color:l="currentColor",size:t=24,strokeWidth:s=2,absoluteStrokeWidth:r,className:o="",children:y,...k},p)=>n.createElement("svg",{ref:p,...x,width:t,height:t,stroke:l,strokeWidth:r?Number(s)*24/Number(t):s,className:["lucide",`lucide-${m(a)}`,o].join(" "),...k},[...c.map(([i,d])=>n.createElement(i,d)),...Array.isArray(y)?y:[y]]));return h.displayName=`${a}`,h};/**
11
+ */const m=a=>a.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase().trim(),e=(a,s)=>{const h=c.forwardRef(({color:r="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:k,className:l="",children:y,...o},i)=>c.createElement("svg",{ref:i,...x,width:t,height:t,stroke:r,strokeWidth:k?Number(n)*24/Number(t):n,className:["lucide",`lucide-${m(a)}`,l].join(" "),...o},[...s.map(([p,d])=>c.createElement(p,d)),...Array.isArray(y)?y:[y]]));return h.displayName=`${a}`,h};/**
12
12
  * @license lucide-react v0.300.0 - ISC
13
13
  *
14
14
  * This source code is licensed under the ISC license.
15
15
  * See the LICENSE file in the root directory of this source tree.
16
- */const M=e("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
16
+ */const M=e("CheckCircle2",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
17
+ * @license lucide-react v0.300.0 - ISC
18
+ *
19
+ * This source code is licensed under the ISC license.
20
+ * See the LICENSE file in the root directory of this source tree.
21
+ */const g=e("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
17
22
  * @license lucide-react v0.300.0 - ISC
18
23
  *
19
24
  * This source code is licensed under the ISC license.
@@ -33,134 +38,174 @@ import{r as n}from"./vendor-react-Dm1xU4bP.js";/**
33
38
  *
34
39
  * This source code is licensed under the ISC license.
35
40
  * See the LICENSE file in the root directory of this source tree.
36
- */const g=e("Command",[["path",{d:"M15 6v12a3 3 0 1 0 3-3H6a3 3 0 1 0 3 3V6a3 3 0 1 0-3 3h12a3 3 0 1 0-3-3",key:"11bfej"}]]);/**
41
+ */const C=e("ChevronsUpDown",[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]]);/**
42
+ * @license lucide-react v0.300.0 - ISC
43
+ *
44
+ * This source code is licensed under the ISC license.
45
+ * See the LICENSE file in the root directory of this source tree.
46
+ */const q=e("Command",[["path",{d:"M15 6v12a3 3 0 1 0 3-3H6a3 3 0 1 0 3 3V6a3 3 0 1 0-3 3h12a3 3 0 1 0-3-3",key:"11bfej"}]]);/**
47
+ * @license lucide-react v0.300.0 - ISC
48
+ *
49
+ * This source code is licensed under the ISC license.
50
+ * See the LICENSE file in the root directory of this source tree.
51
+ */const L=e("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/**
52
+ * @license lucide-react v0.300.0 - ISC
53
+ *
54
+ * This source code is licensed under the ISC license.
55
+ * See the LICENSE file in the root directory of this source tree.
56
+ */const j=e("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/**
57
+ * @license lucide-react v0.300.0 - ISC
58
+ *
59
+ * This source code is licensed under the ISC license.
60
+ * See the LICENSE file in the root directory of this source tree.
61
+ */const z=e("ExternalLink",[["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}],["polyline",{points:"15 3 21 3 21 9",key:"mznyad"}],["line",{x1:"10",x2:"21",y1:"14",y2:"3",key:"18c3s4"}]]);/**
62
+ * @license lucide-react v0.300.0 - ISC
63
+ *
64
+ * This source code is licensed under the ISC license.
65
+ * See the LICENSE file in the root directory of this source tree.
66
+ */const H=e("EyeOff",[["path",{d:"M9.88 9.88a3 3 0 1 0 4.24 4.24",key:"1jxqfv"}],["path",{d:"M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68",key:"9wicm4"}],["path",{d:"M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61",key:"1jreej"}],["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}]]);/**
67
+ * @license lucide-react v0.300.0 - ISC
68
+ *
69
+ * This source code is licensed under the ISC license.
70
+ * See the LICENSE file in the root directory of this source tree.
71
+ */const b=e("Eye",[["path",{d:"M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z",key:"rwhkz3"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
72
+ * @license lucide-react v0.300.0 - ISC
73
+ *
74
+ * This source code is licensed under the ISC license.
75
+ * See the LICENSE file in the root directory of this source tree.
76
+ */const S=e("FileCode",[["path",{d:"M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z",key:"1nnpy2"}],["polyline",{points:"14 2 14 8 20 8",key:"1ew0cm"}],["path",{d:"m10 13-2 2 2 2",key:"17smn8"}],["path",{d:"m14 17 2-2-2-2",key:"14mezr"}]]);/**
77
+ * @license lucide-react v0.300.0 - ISC
78
+ *
79
+ * This source code is licensed under the ISC license.
80
+ * See the LICENSE file in the root directory of this source tree.
81
+ */const V=e("FileText",[["path",{d:"M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z",key:"1nnpy2"}],["polyline",{points:"14 2 14 8 20 8",key:"1ew0cm"}],["line",{x1:"16",x2:"8",y1:"13",y2:"13",key:"14keom"}],["line",{x1:"16",x2:"8",y1:"17",y2:"17",key:"17nazh"}],["line",{x1:"10",x2:"8",y1:"9",y2:"9",key:"1a5vjj"}]]);/**
37
82
  * @license lucide-react v0.300.0 - ISC
38
83
  *
39
84
  * This source code is licensed under the ISC license.
40
85
  * See the LICENSE file in the root directory of this source tree.
41
- */const q=e("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/**
86
+ */const F=e("FolderOpen",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]);/**
42
87
  * @license lucide-react v0.300.0 - ISC
43
88
  *
44
89
  * This source code is licensed under the ISC license.
45
90
  * See the LICENSE file in the root directory of this source tree.
46
- */const C=e("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/**
91
+ */const P=e("Folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);/**
47
92
  * @license lucide-react v0.300.0 - ISC
48
93
  *
49
94
  * This source code is licensed under the ISC license.
50
95
  * See the LICENSE file in the root directory of this source tree.
51
- */const L=e("ExternalLink",[["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}],["polyline",{points:"15 3 21 3 21 9",key:"mznyad"}],["line",{x1:"10",x2:"21",y1:"14",y2:"3",key:"18c3s4"}]]);/**
96
+ */const T=e("Gauge",[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]]);/**
52
97
  * @license lucide-react v0.300.0 - ISC
53
98
  *
54
99
  * This source code is licensed under the ISC license.
55
100
  * See the LICENSE file in the root directory of this source tree.
56
- */const j=e("EyeOff",[["path",{d:"M9.88 9.88a3 3 0 1 0 4.24 4.24",key:"1jxqfv"}],["path",{d:"M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68",key:"9wicm4"}],["path",{d:"M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61",key:"1jreej"}],["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}]]);/**
101
+ */const A=e("GitBranch",[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]]);/**
57
102
  * @license lucide-react v0.300.0 - ISC
58
103
  *
59
104
  * This source code is licensed under the ISC license.
60
105
  * See the LICENSE file in the root directory of this source tree.
61
- */const z=e("Eye",[["path",{d:"M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z",key:"rwhkz3"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
106
+ */const E=e("GitFork",[["circle",{cx:"12",cy:"18",r:"3",key:"1mpf1b"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["path",{d:"M18 9v2c0 .6-.4 1-1 1H7c-.6 0-1-.4-1-1V9",key:"1uq4wg"}],["path",{d:"M12 12v3",key:"158kv8"}]]);/**
62
107
  * @license lucide-react v0.300.0 - ISC
63
108
  *
64
109
  * This source code is licensed under the ISC license.
65
110
  * See the LICENSE file in the root directory of this source tree.
66
- */const H=e("FileCode",[["path",{d:"M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z",key:"1nnpy2"}],["polyline",{points:"14 2 14 8 20 8",key:"1ew0cm"}],["path",{d:"m10 13-2 2 2 2",key:"17smn8"}],["path",{d:"m14 17 2-2-2-2",key:"14mezr"}]]);/**
111
+ */const R=e("HelpCircle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
67
112
  * @license lucide-react v0.300.0 - ISC
68
113
  *
69
114
  * This source code is licensed under the ISC license.
70
115
  * See the LICENSE file in the root directory of this source tree.
71
- */const b=e("FileText",[["path",{d:"M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z",key:"1nnpy2"}],["polyline",{points:"14 2 14 8 20 8",key:"1ew0cm"}],["line",{x1:"16",x2:"8",y1:"13",y2:"13",key:"14keom"}],["line",{x1:"16",x2:"8",y1:"17",y2:"17",key:"17nazh"}],["line",{x1:"10",x2:"8",y1:"9",y2:"9",key:"1a5vjj"}]]);/**
116
+ */const D=e("Loader2",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
72
117
  * @license lucide-react v0.300.0 - ISC
73
118
  *
74
119
  * This source code is licensed under the ISC license.
75
120
  * See the LICENSE file in the root directory of this source tree.
76
- */const S=e("FolderOpen",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]);/**
121
+ */const G=e("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);/**
77
122
  * @license lucide-react v0.300.0 - ISC
78
123
  *
79
124
  * This source code is licensed under the ISC license.
80
125
  * See the LICENSE file in the root directory of this source tree.
81
- */const V=e("Folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);/**
126
+ */const Z=e("Paperclip",[["path",{d:"m21.44 11.05-9.19 9.19a6 6 0 0 1-8.49-8.49l8.57-8.57A4 4 0 1 1 18 8.84l-8.59 8.57a2 2 0 0 1-2.83-2.83l8.49-8.48",key:"1u3ebp"}]]);/**
82
127
  * @license lucide-react v0.300.0 - ISC
83
128
  *
84
129
  * This source code is licensed under the ISC license.
85
130
  * See the LICENSE file in the root directory of this source tree.
86
- */const E=e("GitBranch",[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]]);/**
131
+ */const O=e("Pause",[["rect",{width:"4",height:"16",x:"6",y:"4",key:"iffhe4"}],["rect",{width:"4",height:"16",x:"14",y:"4",key:"sjin7j"}]]);/**
87
132
  * @license lucide-react v0.300.0 - ISC
88
133
  *
89
134
  * This source code is licensed under the ISC license.
90
135
  * See the LICENSE file in the root directory of this source tree.
91
- */const A=e("HelpCircle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
136
+ */const $=e("Pencil",[["path",{d:"M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z",key:"5qss01"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);/**
92
137
  * @license lucide-react v0.300.0 - ISC
93
138
  *
94
139
  * This source code is licensed under the ISC license.
95
140
  * See the LICENSE file in the root directory of this source tree.
96
- */const F=e("Loader2",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
141
+ */const B=e("Play",[["polygon",{points:"5 3 19 12 5 21 5 3",key:"191637"}]]);/**
97
142
  * @license lucide-react v0.300.0 - ISC
98
143
  *
99
144
  * This source code is licensed under the ISC license.
100
145
  * See the LICENSE file in the root directory of this source tree.
101
- */const P=e("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);/**
146
+ */const N=e("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
102
147
  * @license lucide-react v0.300.0 - ISC
103
148
  *
104
149
  * This source code is licensed under the ISC license.
105
150
  * See the LICENSE file in the root directory of this source tree.
106
- */const T=e("Paperclip",[["path",{d:"m21.44 11.05-9.19 9.19a6 6 0 0 1-8.49-8.49l8.57-8.57A4 4 0 1 1 18 8.84l-8.59 8.57a2 2 0 0 1-2.83-2.83l8.49-8.48",key:"1u3ebp"}]]);/**
151
+ */const U=e("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/**
107
152
  * @license lucide-react v0.300.0 - ISC
108
153
  *
109
154
  * This source code is licensed under the ISC license.
110
155
  * See the LICENSE file in the root directory of this source tree.
111
- */const R=e("Pencil",[["path",{d:"M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z",key:"5qss01"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);/**
156
+ */const X=e("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);/**
112
157
  * @license lucide-react v0.300.0 - ISC
113
158
  *
114
159
  * This source code is licensed under the ISC license.
115
160
  * See the LICENSE file in the root directory of this source tree.
116
- */const Z=e("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
161
+ */const I=e("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
117
162
  * @license lucide-react v0.300.0 - ISC
118
163
  *
119
164
  * This source code is licensed under the ISC license.
120
165
  * See the LICENSE file in the root directory of this source tree.
121
- */const D=e("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/**
166
+ */const K=e("Send",[["path",{d:"m22 2-7 20-4-9-9-4Z",key:"1q3vgg"}],["path",{d:"M22 2 11 13",key:"nzbqef"}]]);/**
122
167
  * @license lucide-react v0.300.0 - ISC
123
168
  *
124
169
  * This source code is licensed under the ISC license.
125
170
  * See the LICENSE file in the root directory of this source tree.
126
- */const O=e("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
171
+ */const W=e("Server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]);/**
127
172
  * @license lucide-react v0.300.0 - ISC
128
173
  *
129
174
  * This source code is licensed under the ISC license.
130
175
  * See the LICENSE file in the root directory of this source tree.
131
- */const $=e("Send",[["path",{d:"m22 2-7 20-4-9-9-4Z",key:"1q3vgg"}],["path",{d:"M22 2 11 13",key:"nzbqef"}]]);/**
176
+ */const J=e("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
132
177
  * @license lucide-react v0.300.0 - ISC
133
178
  *
134
179
  * This source code is licensed under the ISC license.
135
180
  * See the LICENSE file in the root directory of this source tree.
136
- */const B=e("Server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]);/**
181
+ */const Q=e("Sparkles",[["path",{d:"m12 3-1.912 5.813a2 2 0 0 1-1.275 1.275L3 12l5.813 1.912a2 2 0 0 1 1.275 1.275L12 21l1.912-5.813a2 2 0 0 1 1.275-1.275L21 12l-5.813-1.912a2 2 0 0 1-1.275-1.275L12 3Z",key:"17u4zn"}],["path",{d:"M5 3v4",key:"bklmnn"}],["path",{d:"M19 17v4",key:"iiml17"}],["path",{d:"M3 5h4",key:"nem4j1"}],["path",{d:"M17 19h4",key:"lbex7p"}]]);/**
137
182
  * @license lucide-react v0.300.0 - ISC
138
183
  *
139
184
  * This source code is licensed under the ISC license.
140
185
  * See the LICENSE file in the root directory of this source tree.
141
- */const G=e("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
186
+ */const Y=e("Square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);/**
142
187
  * @license lucide-react v0.300.0 - ISC
143
188
  *
144
189
  * This source code is licensed under the ISC license.
145
190
  * See the LICENSE file in the root directory of this source tree.
146
- */const N=e("Sparkles",[["path",{d:"m12 3-1.912 5.813a2 2 0 0 1-1.275 1.275L3 12l5.813 1.912a2 2 0 0 1 1.275 1.275L12 21l1.912-5.813a2 2 0 0 1 1.275-1.275L21 12l-5.813-1.912a2 2 0 0 1-1.275-1.275L12 3Z",key:"17u4zn"}],["path",{d:"M5 3v4",key:"bklmnn"}],["path",{d:"M19 17v4",key:"iiml17"}],["path",{d:"M3 5h4",key:"nem4j1"}],["path",{d:"M17 19h4",key:"lbex7p"}]]);/**
191
+ */const _=e("Target",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"6",key:"1vlfrh"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]]);/**
147
192
  * @license lucide-react v0.300.0 - ISC
148
193
  *
149
194
  * This source code is licensed under the ISC license.
150
195
  * See the LICENSE file in the root directory of this source tree.
151
- */const X=e("Square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);/**
196
+ */const e1=e("Terminal",[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]]);/**
152
197
  * @license lucide-react v0.300.0 - ISC
153
198
  *
154
199
  * This source code is licensed under the ISC license.
155
200
  * See the LICENSE file in the root directory of this source tree.
156
- */const I=e("Terminal",[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]]);/**
201
+ */const a1=e("Timer",[["line",{x1:"10",x2:"14",y1:"2",y2:"2",key:"14vaq8"}],["line",{x1:"12",x2:"15",y1:"14",y2:"11",key:"17fdiu"}],["circle",{cx:"12",cy:"14",r:"8",key:"1e1u0o"}]]);/**
157
202
  * @license lucide-react v0.300.0 - ISC
158
203
  *
159
204
  * This source code is licensed under the ISC license.
160
205
  * See the LICENSE file in the root directory of this source tree.
161
- */const K=e("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
206
+ */const t1=e("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
162
207
  * @license lucide-react v0.300.0 - ISC
163
208
  *
164
209
  * This source code is licensed under the ISC license.
165
210
  * See the LICENSE file in the root directory of this source tree.
166
- */const W=e("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);export{u as C,C as D,j as E,H as F,E as G,A as H,F as L,P as M,Z as P,D as R,N as S,I as T,W as X,B as a,G as b,M as c,R as d,K as e,g as f,b as g,T as h,w as i,X as j,$ as k,f as l,z as m,S as n,V as o,O as p,L as q,q as r};
211
+ */const y1=e("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);export{L as A,u as C,j as D,H as E,S as F,E as G,R as H,D as L,G as M,N as P,X as R,Q as S,e1 as T,y1 as X,W as a,J as b,g as c,$ as d,t1 as e,A as f,q as g,V as h,Z as i,w as j,Y as k,K as l,f as m,M as n,_ as o,O as p,B as q,C as r,T as s,a1 as t,b as u,F as v,P as w,U as x,I as y,z};
@@ -38,8 +38,8 @@ import{r as s,a as Xe,j as p,b as Pn,u as Rn,o as Tn,s as An,f as _n,c as On,d a
38
38
  `)},Ot=function(){var e=parseInt(document.body.getAttribute(J)||"0",10);return isFinite(e)?e:0},Pa=function(){s.useEffect(function(){return document.body.setAttribute(J,(Ot()+1).toString()),function(){var e=Ot()-1;e<=0?document.body.removeAttribute(J):document.body.setAttribute(J,e.toString())}},[])},Ra=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,o=n===void 0?"margin":n;Pa();var a=s.useMemo(function(){return Ea(o)},[o]);return s.createElement(Sa,{styles:xa(a,!t,o,r?"":"!important")})},Ue=!1;if(typeof window<"u")try{var me=Object.defineProperty({},"passive",{get:function(){return Ue=!0,!0}});window.addEventListener("test",me,me),window.removeEventListener("test",me,me)}catch{Ue=!1}var q=Ue?{passive:!1}:!1,Ta=function(e){return e.tagName==="TEXTAREA"},mr=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!Ta(e)&&r[t]==="visible")},Aa=function(e){return mr(e,"overflowY")},_a=function(e){return mr(e,"overflowX")},Nt=function(e,t){var r=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var o=gr(e,n);if(o){var a=br(e,n),i=a[1],c=a[2];if(i>c)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},Oa=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},Na=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},gr=function(e,t){return e==="v"?Aa(t):_a(t)},br=function(e,t){return e==="v"?Oa(t):Na(t)},Ia=function(e,t){return e==="h"&&t==="rtl"?-1:1},Da=function(e,t,r,n,o){var a=Ia(e,window.getComputedStyle(t).direction),i=a*n,c=r.target,u=t.contains(c),l=!1,d=i>0,f=0,v=0;do{if(!c)break;var m=br(e,c),y=m[0],h=m[1],g=m[2],b=h-g-a*y;(y||b)&&gr(e,c)&&(f+=b,v+=y);var C=c.parentNode;c=C&&C.nodeType===Node.DOCUMENT_FRAGMENT_NODE?C.host:C}while(!u&&c!==document.body||u&&(t.contains(c)||t===c));return(d&&Math.abs(f)<1||!d&&Math.abs(v)<1)&&(l=!0),l},ge=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},It=function(e){return[e.deltaX,e.deltaY]},Dt=function(e){return e&&"current"in e?e.current:e},Ma=function(e,t){return e[0]===t[0]&&e[1]===t[1]},La=function(e){return`
39
39
  .block-interactivity-`.concat(e,` {pointer-events: none;}
40
40
  .allow-interactivity-`).concat(e,` {pointer-events: all;}
41
- `)},ja=0,Q=[];function Fa(e){var t=s.useRef([]),r=s.useRef([0,0]),n=s.useRef(),o=s.useState(ja++)[0],a=s.useState(hr)[0],i=s.useRef(e);s.useEffect(function(){i.current=e},[e]),s.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var h=oa([e.lockRef.current],(e.shards||[]).map(Dt),!0).filter(Boolean);return h.forEach(function(g){return g.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),h.forEach(function(g){return g.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var c=s.useCallback(function(h,g){if("touches"in h&&h.touches.length===2||h.type==="wheel"&&h.ctrlKey)return!i.current.allowPinchZoom;var b=ge(h),C=r.current,w="deltaX"in h?h.deltaX:C[0]-b[0],E="deltaY"in h?h.deltaY:C[1]-b[1],x,R=h.target,S=Math.abs(w)>Math.abs(E)?"h":"v";if("touches"in h&&S==="h"&&R.type==="range")return!1;var T=window.getSelection(),A=T&&T.anchorNode,O=A?A===R||A.contains(R):!1;if(O)return!1;var I=Nt(S,R);if(!I)return!0;if(I?x=S:(x=S==="v"?"h":"v",I=Nt(S,R)),!I)return!1;if(!n.current&&"changedTouches"in h&&(w||E)&&(n.current=x),!x)return!0;var U=n.current||x;return Da(U,g,h,U==="h"?w:E)},[]),u=s.useCallback(function(h){var g=h;if(!(!Q.length||Q[Q.length-1]!==a)){var b="deltaY"in g?It(g):ge(g),C=t.current.filter(function(x){return x.name===g.type&&(x.target===g.target||g.target===x.shadowParent)&&Ma(x.delta,b)})[0];if(C&&C.should){g.cancelable&&g.preventDefault();return}if(!C){var w=(i.current.shards||[]).map(Dt).filter(Boolean).filter(function(x){return x.contains(g.target)}),E=w.length>0?c(g,w[0]):!i.current.noIsolation;E&&g.cancelable&&g.preventDefault()}}},[]),l=s.useCallback(function(h,g,b,C){var w={name:h,delta:g,target:b,should:C,shadowParent:ka(b)};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(E){return E!==w})},1)},[]),d=s.useCallback(function(h){r.current=ge(h),n.current=void 0},[]),f=s.useCallback(function(h){l(h.type,It(h),h.target,c(h,e.lockRef.current))},[]),v=s.useCallback(function(h){l(h.type,ge(h),h.target,c(h,e.lockRef.current))},[]);s.useEffect(function(){return Q.push(a),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:v}),document.addEventListener("wheel",u,q),document.addEventListener("touchmove",u,q),document.addEventListener("touchstart",d,q),function(){Q=Q.filter(function(h){return h!==a}),document.removeEventListener("wheel",u,q),document.removeEventListener("touchmove",u,q),document.removeEventListener("touchstart",d,q)}},[]);var m=e.removeScrollBar,y=e.inert;return s.createElement(s.Fragment,null,y?s.createElement(a,{styles:La(o)}):null,m?s.createElement(Ra,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function ka(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const $a=pa(vr,Fa);var ot=s.forwardRef(function(e,t){return s.createElement(Ae,F({},e,{ref:t,sideCar:$a}))});ot.classNames=Ae.classNames;var _e="Popover",[yr]=H(_e,[Te]),ie=Te(),[Wa,V]=yr(_e),Cr=e=>{const{__scopePopover:t,children:r,open:n,defaultOpen:o,onOpenChange:a,modal:i=!1}=e,c=ie(t),u=s.useRef(null),[l,d]=s.useState(!1),[f,v]=se({prop:n,defaultProp:o??!1,onChange:a,caller:_e});return p.jsx(ir,{...c,children:p.jsx(Wa,{scope:t,contentId:Y(),triggerRef:u,open:f,onOpenChange:v,onOpenToggle:s.useCallback(()=>v(m=>!m),[v]),hasCustomAnchor:l,onCustomAnchorAdd:s.useCallback(()=>d(!0),[]),onCustomAnchorRemove:s.useCallback(()=>d(!1),[]),modal:i,children:r})})};Cr.displayName=_e;var wr="PopoverAnchor",Ba=s.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=V(wr,r),a=ie(r),{onCustomAnchorAdd:i,onCustomAnchorRemove:c}=o;return s.useEffect(()=>(i(),()=>c()),[i,c]),p.jsx(rt,{...a,...n,ref:t})});Ba.displayName=wr;var Er="PopoverTrigger",Sr=s.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=V(Er,r),a=ie(r),i=N(t,o.triggerRef),c=p.jsx(_.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Ar(o.open),...n,ref:i,onClick:P(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?c:p.jsx(rt,{asChild:!0,...a,children:c})});Sr.displayName=Er;var at="PopoverPortal",[Ha,Va]=yr(at,{forceMount:void 0}),xr=e=>{const{__scopePopover:t,forceMount:r,children:n,container:o}=e,a=V(at,t);return p.jsx(Ha,{scope:t,forceMount:r,children:p.jsx(M,{present:r||a.open,children:p.jsx(nt,{asChild:!0,container:o,children:n})})})};xr.displayName=at;var te="PopoverContent",Pr=s.forwardRef((e,t)=>{const r=Va(te,e.__scopePopover),{forceMount:n=r.forceMount,...o}=e,a=V(te,e.__scopePopover);return p.jsx(M,{present:n||a.open,children:a.modal?p.jsx(za,{...o,ref:t}):p.jsx(Ya,{...o,ref:t})})});Pr.displayName=te;var Ua=Yo("PopoverContent.RemoveScroll"),za=s.forwardRef((e,t)=>{const r=V(te,e.__scopePopover),n=s.useRef(null),o=N(t,n),a=s.useRef(!1);return s.useEffect(()=>{const i=n.current;if(i)return dr(i)},[]),p.jsx(ot,{as:Ua,allowPinchZoom:!0,children:p.jsx(Rr,{...e,ref:o,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:P(e.onCloseAutoFocus,i=>{var c;i.preventDefault(),a.current||(c=r.triggerRef.current)==null||c.focus()}),onPointerDownOutside:P(e.onPointerDownOutside,i=>{const c=i.detail.originalEvent,u=c.button===0&&c.ctrlKey===!0,l=c.button===2||u;a.current=l},{checkForDefaultPrevented:!1}),onFocusOutside:P(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1})})})}),Ya=s.forwardRef((e,t)=>{const r=V(te,e.__scopePopover),n=s.useRef(!1),o=s.useRef(!1);return p.jsx(Rr,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var i,c;(i=e.onCloseAutoFocus)==null||i.call(e,a),a.defaultPrevented||(n.current||(c=r.triggerRef.current)==null||c.focus(),a.preventDefault()),n.current=!1,o.current=!1},onInteractOutside:a=>{var u,l;(u=e.onInteractOutside)==null||u.call(e,a),a.defaultPrevented||(n.current=!0,a.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const i=a.target;((l=r.triggerRef.current)==null?void 0:l.contains(i))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&o.current&&a.preventDefault()}})}),Rr=s.forwardRef((e,t)=>{const{__scopePopover:r,trapFocus:n,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:i,onEscapeKeyDown:c,onPointerDownOutside:u,onFocusOutside:l,onInteractOutside:d,...f}=e,v=V(te,r),m=ie(r);return Kt(),p.jsx(Je,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:o,onUnmountAutoFocus:a,children:p.jsx(Re,{asChild:!0,disableOutsidePointerEvents:i,onInteractOutside:d,onEscapeKeyDown:c,onPointerDownOutside:u,onFocusOutside:l,onDismiss:()=>v.onOpenChange(!1),children:p.jsx(cr,{"data-state":Ar(v.open),role:"dialog",id:v.contentId,...m,...f,ref:t,style:{...f.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),Tr="PopoverClose",Ga=s.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=V(Tr,r);return p.jsx(_.button,{type:"button",...n,ref:t,onClick:P(e.onClick,()=>o.onOpenChange(!1))})});Ga.displayName=Tr;var Xa="PopoverArrow",Ka=s.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=ie(r);return p.jsx(lr,{...o,...n,ref:t})});Ka.displayName=Xa;function Ar(e){return e?"open":"closed"}var ii=Cr,ci=Sr,li=xr,ui=Pr,Za=Symbol("radix.slottable");function qa(e){const t=({children:r})=>p.jsx(p.Fragment,{children:r});return t.displayName=`${e}.Slottable`,t.__radixId=Za,t}var Qa=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),Ja="VisuallyHidden",_r=s.forwardRef((e,t)=>p.jsx(_.span,{...e,ref:t,style:{...Qa,...e.style}}));_r.displayName=Ja;var es=_r,[Oe]=H("Tooltip",[Te]),Ne=Te(),Or="TooltipProvider",ts=700,ze="tooltip.open",[rs,st]=Oe(Or),Nr=e=>{const{__scopeTooltip:t,delayDuration:r=ts,skipDelayDuration:n=300,disableHoverableContent:o=!1,children:a}=e,i=s.useRef(!0),c=s.useRef(!1),u=s.useRef(0);return s.useEffect(()=>{const l=u.current;return()=>window.clearTimeout(l)},[]),p.jsx(rs,{scope:t,isOpenDelayedRef:i,delayDuration:r,onOpen:s.useCallback(()=>{window.clearTimeout(u.current),i.current=!1},[]),onClose:s.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>i.current=!0,n)},[n]),isPointerInTransitRef:c,onPointerInTransitChange:s.useCallback(l=>{c.current=l},[]),disableHoverableContent:o,children:a})};Nr.displayName=Or;var ae="Tooltip",[ns,Ie]=Oe(ae),Ir=e=>{const{__scopeTooltip:t,children:r,open:n,defaultOpen:o,onOpenChange:a,disableHoverableContent:i,delayDuration:c}=e,u=st(ae,e.__scopeTooltip),l=Ne(t),[d,f]=s.useState(null),v=Y(),m=s.useRef(0),y=i??u.disableHoverableContent,h=c??u.delayDuration,g=s.useRef(!1),[b,C]=se({prop:n,defaultProp:o??!1,onChange:S=>{S?(u.onOpen(),document.dispatchEvent(new CustomEvent(ze))):u.onClose(),a==null||a(S)},caller:ae}),w=s.useMemo(()=>b?g.current?"delayed-open":"instant-open":"closed",[b]),E=s.useCallback(()=>{window.clearTimeout(m.current),m.current=0,g.current=!1,C(!0)},[C]),x=s.useCallback(()=>{window.clearTimeout(m.current),m.current=0,C(!1)},[C]),R=s.useCallback(()=>{window.clearTimeout(m.current),m.current=window.setTimeout(()=>{g.current=!0,C(!0),m.current=0},h)},[h,C]);return s.useEffect(()=>()=>{m.current&&(window.clearTimeout(m.current),m.current=0)},[]),p.jsx(ir,{...l,children:p.jsx(ns,{scope:t,contentId:v,open:b,stateAttribute:w,trigger:d,onTriggerChange:f,onTriggerEnter:s.useCallback(()=>{u.isOpenDelayedRef.current?R():E()},[u.isOpenDelayedRef,R,E]),onTriggerLeave:s.useCallback(()=>{y?x():(window.clearTimeout(m.current),m.current=0)},[x,y]),onOpen:E,onClose:x,disableHoverableContent:y,children:r})})};Ir.displayName=ae;var Ye="TooltipTrigger",Dr=s.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,o=Ie(Ye,r),a=st(Ye,r),i=Ne(r),c=s.useRef(null),u=N(t,c,o.onTriggerChange),l=s.useRef(!1),d=s.useRef(!1),f=s.useCallback(()=>l.current=!1,[]);return s.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),p.jsx(rt,{asChild:!0,...i,children:p.jsx(_.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...n,ref:u,onPointerMove:P(e.onPointerMove,v=>{v.pointerType!=="touch"&&!d.current&&!a.isPointerInTransitRef.current&&(o.onTriggerEnter(),d.current=!0)}),onPointerLeave:P(e.onPointerLeave,()=>{o.onTriggerLeave(),d.current=!1}),onPointerDown:P(e.onPointerDown,()=>{o.open&&o.onClose(),l.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:P(e.onFocus,()=>{l.current||o.onOpen()}),onBlur:P(e.onBlur,o.onClose),onClick:P(e.onClick,o.onClose)})})});Dr.displayName=Ye;var os="TooltipPortal",[di,as]=Oe(os,{forceMount:void 0}),re="TooltipContent",Mr=s.forwardRef((e,t)=>{const r=as(re,e.__scopeTooltip),{forceMount:n=r.forceMount,side:o="top",...a}=e,i=Ie(re,e.__scopeTooltip);return p.jsx(M,{present:n||i.open,children:i.disableHoverableContent?p.jsx(Lr,{side:o,...a,ref:t}):p.jsx(ss,{side:o,...a,ref:t})})}),ss=s.forwardRef((e,t)=>{const r=Ie(re,e.__scopeTooltip),n=st(re,e.__scopeTooltip),o=s.useRef(null),a=N(t,o),[i,c]=s.useState(null),{trigger:u,onClose:l}=r,d=o.current,{onPointerInTransitChange:f}=n,v=s.useCallback(()=>{c(null),f(!1)},[f]),m=s.useCallback((y,h)=>{const g=y.currentTarget,b={x:y.clientX,y:y.clientY},C=ds(b,g.getBoundingClientRect()),w=fs(b,C),E=ps(h.getBoundingClientRect()),x=hs([...w,...E]);c(x),f(!0)},[f]);return s.useEffect(()=>()=>v(),[v]),s.useEffect(()=>{if(u&&d){const y=g=>m(g,d),h=g=>m(g,u);return u.addEventListener("pointerleave",y),d.addEventListener("pointerleave",h),()=>{u.removeEventListener("pointerleave",y),d.removeEventListener("pointerleave",h)}}},[u,d,m,v]),s.useEffect(()=>{if(i){const y=h=>{const g=h.target,b={x:h.clientX,y:h.clientY},C=(u==null?void 0:u.contains(g))||(d==null?void 0:d.contains(g)),w=!vs(b,i);C?v():w&&(v(),l())};return document.addEventListener("pointermove",y),()=>document.removeEventListener("pointermove",y)}},[u,d,i,l,v]),p.jsx(Lr,{...e,ref:a})}),[is,cs]=Oe(ae,{isInside:!1}),ls=qa("TooltipContent"),Lr=s.forwardRef((e,t)=>{const{__scopeTooltip:r,children:n,"aria-label":o,onEscapeKeyDown:a,onPointerDownOutside:i,...c}=e,u=Ie(re,r),l=Ne(r),{onClose:d}=u;return s.useEffect(()=>(document.addEventListener(ze,d),()=>document.removeEventListener(ze,d)),[d]),s.useEffect(()=>{if(u.trigger){const f=v=>{const m=v.target;m!=null&&m.contains(u.trigger)&&d()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[u.trigger,d]),p.jsx(Re,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:i,onFocusOutside:f=>f.preventDefault(),onDismiss:d,children:p.jsxs(cr,{"data-state":u.stateAttribute,...l,...c,ref:t,style:{...c.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[p.jsx(ls,{children:n}),p.jsx(is,{scope:r,isInside:!0,children:p.jsx(es,{id:u.contentId,role:"tooltip",children:o||n})})]})})});Mr.displayName=re;var jr="TooltipArrow",us=s.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,o=Ne(r);return cs(jr,r).isInside?null:p.jsx(lr,{...o,...n,ref:t})});us.displayName=jr;function ds(e,t){const r=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(r,n,o,a)){case a:return"left";case o:return"right";case r:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function fs(e,t,r=5){const n=[];switch(t){case"top":n.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":n.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":n.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":n.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r});break}return n}function ps(e){const{top:t,right:r,bottom:n,left:o}=e;return[{x:o,y:t},{x:r,y:t},{x:r,y:n},{x:o,y:n}]}function vs(e,t){const{x:r,y:n}=e;let o=!1;for(let a=0,i=t.length-1;a<t.length;i=a++){const c=t[a],u=t[i],l=c.x,d=c.y,f=u.x,v=u.y;d>n!=v>n&&r<(f-l)*(n-d)/(v-d)+l&&(o=!o)}return o}function hs(e){const t=e.slice();return t.sort((r,n)=>r.x<n.x?-1:r.x>n.x?1:r.y<n.y?-1:r.y>n.y?1:0),ms(t)}function ms(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n<e.length;n++){const o=e[n];for(;t.length>=2;){const a=t[t.length-1],i=t[t.length-2];if((a.x-i.x)*(o.y-i.y)>=(a.y-i.y)*(o.x-i.x))t.pop();else break}t.push(o)}t.pop();const r=[];for(let n=e.length-1;n>=0;n--){const o=e[n];for(;r.length>=2;){const a=r[r.length-1],i=r[r.length-2];if((a.x-i.x)*(o.y-i.y)>=(a.y-i.y)*(o.x-i.x))r.pop();else break}r.push(o)}return r.pop(),t.length===1&&r.length===1&&t[0].x===r[0].x&&t[0].y===r[0].y?t:t.concat(r)}var fi=Nr,pi=Ir,vi=Dr,hi=Mr;function gs(e){const t=bs(e),r=s.forwardRef((n,o)=>{const{children:a,...i}=n,c=s.Children.toArray(a),u=c.find(Cs);if(u){const l=u.props.children,d=c.map(f=>f===u?s.Children.count(l)>1?s.Children.only(null):s.isValidElement(l)?l.props.children:null:f);return p.jsx(t,{...i,ref:o,children:s.isValidElement(l)?s.cloneElement(l,void 0,d):null})}return p.jsx(t,{...i,ref:o,children:a})});return r.displayName=`${e}.Slot`,r}function bs(e){const t=s.forwardRef((r,n)=>{const{children:o,...a}=r;if(s.isValidElement(o)){const i=Es(o),c=ws(a,o.props);return o.type!==s.Fragment&&(c.ref=n?ne(n,i):i),s.cloneElement(o,c)}return s.Children.count(o)>1?s.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var ys=Symbol("radix.slottable");function Cs(e){return s.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===ys}function ws(e,t){const r={...t};for(const n in t){const o=e[n],a=t[n];/^on[A-Z]/.test(n)?o&&a?r[n]=(...c)=>{const u=a(...c);return o(...c),u}:o&&(r[n]=o):n==="style"?r[n]={...o,...a}:n==="className"&&(r[n]=[o,a].filter(Boolean).join(" "))}return{...e,...r}}function Es(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var De="Dialog",[Fr]=H(De),[Ss,j]=Fr(De),kr=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:o,onOpenChange:a,modal:i=!0}=e,c=s.useRef(null),u=s.useRef(null),[l,d]=se({prop:n,defaultProp:o??!1,onChange:a,caller:De});return p.jsx(Ss,{scope:t,triggerRef:c,contentRef:u,contentId:Y(),titleId:Y(),descriptionId:Y(),open:l,onOpenChange:d,onOpenToggle:s.useCallback(()=>d(f=>!f),[d]),modal:i,children:r})};kr.displayName=De;var $r="DialogTrigger",xs=s.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=j($r,r),a=N(t,o.triggerRef);return p.jsx(_.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":lt(o.open),...n,ref:a,onClick:P(e.onClick,o.onOpenToggle)})});xs.displayName=$r;var it="DialogPortal",[Ps,Wr]=Fr(it,{forceMount:void 0}),Br=e=>{const{__scopeDialog:t,forceMount:r,children:n,container:o}=e,a=j(it,t);return p.jsx(Ps,{scope:t,forceMount:r,children:s.Children.map(n,i=>p.jsx(M,{present:r||a.open,children:p.jsx(nt,{asChild:!0,container:o,children:i})}))})};Br.displayName=it;var Se="DialogOverlay",Hr=s.forwardRef((e,t)=>{const r=Wr(Se,e.__scopeDialog),{forceMount:n=r.forceMount,...o}=e,a=j(Se,e.__scopeDialog);return a.modal?p.jsx(M,{present:n||a.open,children:p.jsx(Ts,{...o,ref:t})}):null});Hr.displayName=Se;var Rs=gs("DialogOverlay.RemoveScroll"),Ts=s.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=j(Se,r);return p.jsx(ot,{as:Rs,allowPinchZoom:!0,shards:[o.contentRef],children:p.jsx(_.div,{"data-state":lt(o.open),...n,ref:t,style:{pointerEvents:"auto",...n.style}})})}),G="DialogContent",Vr=s.forwardRef((e,t)=>{const r=Wr(G,e.__scopeDialog),{forceMount:n=r.forceMount,...o}=e,a=j(G,e.__scopeDialog);return p.jsx(M,{present:n||a.open,children:a.modal?p.jsx(As,{...o,ref:t}):p.jsx(_s,{...o,ref:t})})});Vr.displayName=G;var As=s.forwardRef((e,t)=>{const r=j(G,e.__scopeDialog),n=s.useRef(null),o=N(t,r.contentRef,n);return s.useEffect(()=>{const a=n.current;if(a)return dr(a)},[]),p.jsx(Ur,{...e,ref:o,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:P(e.onCloseAutoFocus,a=>{var i;a.preventDefault(),(i=r.triggerRef.current)==null||i.focus()}),onPointerDownOutside:P(e.onPointerDownOutside,a=>{const i=a.detail.originalEvent,c=i.button===0&&i.ctrlKey===!0;(i.button===2||c)&&a.preventDefault()}),onFocusOutside:P(e.onFocusOutside,a=>a.preventDefault())})}),_s=s.forwardRef((e,t)=>{const r=j(G,e.__scopeDialog),n=s.useRef(!1),o=s.useRef(!1);return p.jsx(Ur,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var i,c;(i=e.onCloseAutoFocus)==null||i.call(e,a),a.defaultPrevented||(n.current||(c=r.triggerRef.current)==null||c.focus(),a.preventDefault()),n.current=!1,o.current=!1},onInteractOutside:a=>{var u,l;(u=e.onInteractOutside)==null||u.call(e,a),a.defaultPrevented||(n.current=!0,a.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const i=a.target;((l=r.triggerRef.current)==null?void 0:l.contains(i))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&o.current&&a.preventDefault()}})}),Ur=s.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:o,onCloseAutoFocus:a,...i}=e,c=j(G,r),u=s.useRef(null),l=N(t,u);return Kt(),p.jsxs(p.Fragment,{children:[p.jsx(Je,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:o,onUnmountAutoFocus:a,children:p.jsx(Re,{role:"dialog",id:c.contentId,"aria-describedby":c.descriptionId,"aria-labelledby":c.titleId,"data-state":lt(c.open),...i,ref:l,onDismiss:()=>c.onOpenChange(!1)})}),p.jsxs(p.Fragment,{children:[p.jsx(Os,{titleId:c.titleId}),p.jsx(Is,{contentRef:u,descriptionId:c.descriptionId})]})]})}),ct="DialogTitle",zr=s.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=j(ct,r);return p.jsx(_.h2,{id:o.titleId,...n,ref:t})});zr.displayName=ct;var Yr="DialogDescription",Gr=s.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=j(Yr,r);return p.jsx(_.p,{id:o.descriptionId,...n,ref:t})});Gr.displayName=Yr;var Xr="DialogClose",Kr=s.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=j(Xr,r);return p.jsx(_.button,{type:"button",...n,ref:t,onClick:P(e.onClick,()=>o.onOpenChange(!1))})});Kr.displayName=Xr;function lt(e){return e?"open":"closed"}var Zr="DialogTitleWarning",[mi,qr]=to(Zr,{contentName:G,titleName:ct,docsSlug:"dialog"}),Os=({titleId:e})=>{const t=qr(Zr),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
41
+ `)},ja=0,Q=[];function Fa(e){var t=s.useRef([]),r=s.useRef([0,0]),n=s.useRef(),o=s.useState(ja++)[0],a=s.useState(hr)[0],i=s.useRef(e);s.useEffect(function(){i.current=e},[e]),s.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var h=oa([e.lockRef.current],(e.shards||[]).map(Dt),!0).filter(Boolean);return h.forEach(function(g){return g.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),h.forEach(function(g){return g.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var c=s.useCallback(function(h,g){if("touches"in h&&h.touches.length===2||h.type==="wheel"&&h.ctrlKey)return!i.current.allowPinchZoom;var b=ge(h),C=r.current,w="deltaX"in h?h.deltaX:C[0]-b[0],E="deltaY"in h?h.deltaY:C[1]-b[1],x,R=h.target,S=Math.abs(w)>Math.abs(E)?"h":"v";if("touches"in h&&S==="h"&&R.type==="range")return!1;var T=window.getSelection(),A=T&&T.anchorNode,O=A?A===R||A.contains(R):!1;if(O)return!1;var I=Nt(S,R);if(!I)return!0;if(I?x=S:(x=S==="v"?"h":"v",I=Nt(S,R)),!I)return!1;if(!n.current&&"changedTouches"in h&&(w||E)&&(n.current=x),!x)return!0;var U=n.current||x;return Da(U,g,h,U==="h"?w:E)},[]),u=s.useCallback(function(h){var g=h;if(!(!Q.length||Q[Q.length-1]!==a)){var b="deltaY"in g?It(g):ge(g),C=t.current.filter(function(x){return x.name===g.type&&(x.target===g.target||g.target===x.shadowParent)&&Ma(x.delta,b)})[0];if(C&&C.should){g.cancelable&&g.preventDefault();return}if(!C){var w=(i.current.shards||[]).map(Dt).filter(Boolean).filter(function(x){return x.contains(g.target)}),E=w.length>0?c(g,w[0]):!i.current.noIsolation;E&&g.cancelable&&g.preventDefault()}}},[]),l=s.useCallback(function(h,g,b,C){var w={name:h,delta:g,target:b,should:C,shadowParent:ka(b)};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(E){return E!==w})},1)},[]),d=s.useCallback(function(h){r.current=ge(h),n.current=void 0},[]),f=s.useCallback(function(h){l(h.type,It(h),h.target,c(h,e.lockRef.current))},[]),v=s.useCallback(function(h){l(h.type,ge(h),h.target,c(h,e.lockRef.current))},[]);s.useEffect(function(){return Q.push(a),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:v}),document.addEventListener("wheel",u,q),document.addEventListener("touchmove",u,q),document.addEventListener("touchstart",d,q),function(){Q=Q.filter(function(h){return h!==a}),document.removeEventListener("wheel",u,q),document.removeEventListener("touchmove",u,q),document.removeEventListener("touchstart",d,q)}},[]);var m=e.removeScrollBar,y=e.inert;return s.createElement(s.Fragment,null,y?s.createElement(a,{styles:La(o)}):null,m?s.createElement(Ra,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function ka(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const $a=pa(vr,Fa);var ot=s.forwardRef(function(e,t){return s.createElement(Ae,F({},e,{ref:t,sideCar:$a}))});ot.classNames=Ae.classNames;var _e="Popover",[yr]=H(_e,[Te]),ie=Te(),[Wa,V]=yr(_e),Cr=e=>{const{__scopePopover:t,children:r,open:n,defaultOpen:o,onOpenChange:a,modal:i=!1}=e,c=ie(t),u=s.useRef(null),[l,d]=s.useState(!1),[f,v]=se({prop:n,defaultProp:o??!1,onChange:a,caller:_e});return p.jsx(ir,{...c,children:p.jsx(Wa,{scope:t,contentId:Y(),triggerRef:u,open:f,onOpenChange:v,onOpenToggle:s.useCallback(()=>v(m=>!m),[v]),hasCustomAnchor:l,onCustomAnchorAdd:s.useCallback(()=>d(!0),[]),onCustomAnchorRemove:s.useCallback(()=>d(!1),[]),modal:i,children:r})})};Cr.displayName=_e;var wr="PopoverAnchor",Ba=s.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=V(wr,r),a=ie(r),{onCustomAnchorAdd:i,onCustomAnchorRemove:c}=o;return s.useEffect(()=>(i(),()=>c()),[i,c]),p.jsx(rt,{...a,...n,ref:t})});Ba.displayName=wr;var Er="PopoverTrigger",Sr=s.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=V(Er,r),a=ie(r),i=N(t,o.triggerRef),c=p.jsx(_.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Ar(o.open),...n,ref:i,onClick:P(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?c:p.jsx(rt,{asChild:!0,...a,children:c})});Sr.displayName=Er;var at="PopoverPortal",[Ha,Va]=yr(at,{forceMount:void 0}),xr=e=>{const{__scopePopover:t,forceMount:r,children:n,container:o}=e,a=V(at,t);return p.jsx(Ha,{scope:t,forceMount:r,children:p.jsx(M,{present:r||a.open,children:p.jsx(nt,{asChild:!0,container:o,children:n})})})};xr.displayName=at;var te="PopoverContent",Pr=s.forwardRef((e,t)=>{const r=Va(te,e.__scopePopover),{forceMount:n=r.forceMount,...o}=e,a=V(te,e.__scopePopover);return p.jsx(M,{present:n||a.open,children:a.modal?p.jsx(za,{...o,ref:t}):p.jsx(Ya,{...o,ref:t})})});Pr.displayName=te;var Ua=Yo("PopoverContent.RemoveScroll"),za=s.forwardRef((e,t)=>{const r=V(te,e.__scopePopover),n=s.useRef(null),o=N(t,n),a=s.useRef(!1);return s.useEffect(()=>{const i=n.current;if(i)return dr(i)},[]),p.jsx(ot,{as:Ua,allowPinchZoom:!0,children:p.jsx(Rr,{...e,ref:o,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:P(e.onCloseAutoFocus,i=>{var c;i.preventDefault(),a.current||(c=r.triggerRef.current)==null||c.focus()}),onPointerDownOutside:P(e.onPointerDownOutside,i=>{const c=i.detail.originalEvent,u=c.button===0&&c.ctrlKey===!0,l=c.button===2||u;a.current=l},{checkForDefaultPrevented:!1}),onFocusOutside:P(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1})})})}),Ya=s.forwardRef((e,t)=>{const r=V(te,e.__scopePopover),n=s.useRef(!1),o=s.useRef(!1);return p.jsx(Rr,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var i,c;(i=e.onCloseAutoFocus)==null||i.call(e,a),a.defaultPrevented||(n.current||(c=r.triggerRef.current)==null||c.focus(),a.preventDefault()),n.current=!1,o.current=!1},onInteractOutside:a=>{var u,l;(u=e.onInteractOutside)==null||u.call(e,a),a.defaultPrevented||(n.current=!0,a.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const i=a.target;((l=r.triggerRef.current)==null?void 0:l.contains(i))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&o.current&&a.preventDefault()}})}),Rr=s.forwardRef((e,t)=>{const{__scopePopover:r,trapFocus:n,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:i,onEscapeKeyDown:c,onPointerDownOutside:u,onFocusOutside:l,onInteractOutside:d,...f}=e,v=V(te,r),m=ie(r);return Kt(),p.jsx(Je,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:o,onUnmountAutoFocus:a,children:p.jsx(Re,{asChild:!0,disableOutsidePointerEvents:i,onInteractOutside:d,onEscapeKeyDown:c,onPointerDownOutside:u,onFocusOutside:l,onDismiss:()=>v.onOpenChange(!1),children:p.jsx(cr,{"data-state":Ar(v.open),role:"dialog",id:v.contentId,...m,...f,ref:t,style:{...f.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),Tr="PopoverClose",Ga=s.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=V(Tr,r);return p.jsx(_.button,{type:"button",...n,ref:t,onClick:P(e.onClick,()=>o.onOpenChange(!1))})});Ga.displayName=Tr;var Xa="PopoverArrow",Ka=s.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=ie(r);return p.jsx(lr,{...o,...n,ref:t})});Ka.displayName=Xa;function Ar(e){return e?"open":"closed"}var ii=Cr,ci=Sr,li=xr,ui=Pr;function Za(e){const t=qa(e),r=s.forwardRef((n,o)=>{const{children:a,...i}=n,c=s.Children.toArray(a),u=c.find(Ja);if(u){const l=u.props.children,d=c.map(f=>f===u?s.Children.count(l)>1?s.Children.only(null):s.isValidElement(l)?l.props.children:null:f);return p.jsx(t,{...i,ref:o,children:s.isValidElement(l)?s.cloneElement(l,void 0,d):null})}return p.jsx(t,{...i,ref:o,children:a})});return r.displayName=`${e}.Slot`,r}function qa(e){const t=s.forwardRef((r,n)=>{const{children:o,...a}=r;if(s.isValidElement(o)){const i=ts(o),c=es(a,o.props);return o.type!==s.Fragment&&(c.ref=n?ne(n,i):i),s.cloneElement(o,c)}return s.Children.count(o)>1?s.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Qa=Symbol("radix.slottable");function Ja(e){return s.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Qa}function es(e,t){const r={...t};for(const n in t){const o=e[n],a=t[n];/^on[A-Z]/.test(n)?o&&a?r[n]=(...c)=>{const u=a(...c);return o(...c),u}:o&&(r[n]=o):n==="style"?r[n]={...o,...a}:n==="className"&&(r[n]=[o,a].filter(Boolean).join(" "))}return{...e,...r}}function ts(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var Oe="Dialog",[_r]=H(Oe),[rs,j]=_r(Oe),Or=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:o,onOpenChange:a,modal:i=!0}=e,c=s.useRef(null),u=s.useRef(null),[l,d]=se({prop:n,defaultProp:o??!1,onChange:a,caller:Oe});return p.jsx(rs,{scope:t,triggerRef:c,contentRef:u,contentId:Y(),titleId:Y(),descriptionId:Y(),open:l,onOpenChange:d,onOpenToggle:s.useCallback(()=>d(f=>!f),[d]),modal:i,children:r})};Or.displayName=Oe;var Nr="DialogTrigger",ns=s.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=j(Nr,r),a=N(t,o.triggerRef);return p.jsx(_.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":ct(o.open),...n,ref:a,onClick:P(e.onClick,o.onOpenToggle)})});ns.displayName=Nr;var st="DialogPortal",[os,Ir]=_r(st,{forceMount:void 0}),Dr=e=>{const{__scopeDialog:t,forceMount:r,children:n,container:o}=e,a=j(st,t);return p.jsx(os,{scope:t,forceMount:r,children:s.Children.map(n,i=>p.jsx(M,{present:r||a.open,children:p.jsx(nt,{asChild:!0,container:o,children:i})}))})};Dr.displayName=st;var Se="DialogOverlay",Mr=s.forwardRef((e,t)=>{const r=Ir(Se,e.__scopeDialog),{forceMount:n=r.forceMount,...o}=e,a=j(Se,e.__scopeDialog);return a.modal?p.jsx(M,{present:n||a.open,children:p.jsx(ss,{...o,ref:t})}):null});Mr.displayName=Se;var as=Za("DialogOverlay.RemoveScroll"),ss=s.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=j(Se,r);return p.jsx(ot,{as,allowPinchZoom:!0,shards:[o.contentRef],children:p.jsx(_.div,{"data-state":ct(o.open),...n,ref:t,style:{pointerEvents:"auto",...n.style}})})}),G="DialogContent",Lr=s.forwardRef((e,t)=>{const r=Ir(G,e.__scopeDialog),{forceMount:n=r.forceMount,...o}=e,a=j(G,e.__scopeDialog);return p.jsx(M,{present:n||a.open,children:a.modal?p.jsx(is,{...o,ref:t}):p.jsx(cs,{...o,ref:t})})});Lr.displayName=G;var is=s.forwardRef((e,t)=>{const r=j(G,e.__scopeDialog),n=s.useRef(null),o=N(t,r.contentRef,n);return s.useEffect(()=>{const a=n.current;if(a)return dr(a)},[]),p.jsx(jr,{...e,ref:o,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:P(e.onCloseAutoFocus,a=>{var i;a.preventDefault(),(i=r.triggerRef.current)==null||i.focus()}),onPointerDownOutside:P(e.onPointerDownOutside,a=>{const i=a.detail.originalEvent,c=i.button===0&&i.ctrlKey===!0;(i.button===2||c)&&a.preventDefault()}),onFocusOutside:P(e.onFocusOutside,a=>a.preventDefault())})}),cs=s.forwardRef((e,t)=>{const r=j(G,e.__scopeDialog),n=s.useRef(!1),o=s.useRef(!1);return p.jsx(jr,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var i,c;(i=e.onCloseAutoFocus)==null||i.call(e,a),a.defaultPrevented||(n.current||(c=r.triggerRef.current)==null||c.focus(),a.preventDefault()),n.current=!1,o.current=!1},onInteractOutside:a=>{var u,l;(u=e.onInteractOutside)==null||u.call(e,a),a.defaultPrevented||(n.current=!0,a.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const i=a.target;((l=r.triggerRef.current)==null?void 0:l.contains(i))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&o.current&&a.preventDefault()}})}),jr=s.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:o,onCloseAutoFocus:a,...i}=e,c=j(G,r),u=s.useRef(null),l=N(t,u);return Kt(),p.jsxs(p.Fragment,{children:[p.jsx(Je,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:o,onUnmountAutoFocus:a,children:p.jsx(Re,{role:"dialog",id:c.contentId,"aria-describedby":c.descriptionId,"aria-labelledby":c.titleId,"data-state":ct(c.open),...i,ref:l,onDismiss:()=>c.onOpenChange(!1)})}),p.jsxs(p.Fragment,{children:[p.jsx(ls,{titleId:c.titleId}),p.jsx(ds,{contentRef:u,descriptionId:c.descriptionId})]})]})}),it="DialogTitle",Fr=s.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=j(it,r);return p.jsx(_.h2,{id:o.titleId,...n,ref:t})});Fr.displayName=it;var kr="DialogDescription",$r=s.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=j(kr,r);return p.jsx(_.p,{id:o.descriptionId,...n,ref:t})});$r.displayName=kr;var Wr="DialogClose",Br=s.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=j(Wr,r);return p.jsx(_.button,{type:"button",...n,ref:t,onClick:P(e.onClick,()=>o.onOpenChange(!1))})});Br.displayName=Wr;function ct(e){return e?"open":"closed"}var Hr="DialogTitleWarning",[di,Vr]=to(Hr,{contentName:G,titleName:it,docsSlug:"dialog"}),ls=({titleId:e})=>{const t=Vr(Hr),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
42
42
 
43
43
  If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
44
44
 
45
- For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return s.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},Ns="DialogDescriptionWarning",Is=({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${qr(Ns).contentName}}.`;return s.useEffect(()=>{var a;const o=(a=e.current)==null?void 0:a.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},gi=kr,bi=Br,yi=Hr,Ci=Vr,wi=zr,Ei=Gr,Si=Kr;function Mt(e){const t=Ds(e),r=s.forwardRef((n,o)=>{const{children:a,...i}=n,c=s.Children.toArray(a),u=c.find(Ls);if(u){const l=u.props.children,d=c.map(f=>f===u?s.Children.count(l)>1?s.Children.only(null):s.isValidElement(l)?l.props.children:null:f);return p.jsx(t,{...i,ref:o,children:s.isValidElement(l)?s.cloneElement(l,void 0,d):null})}return p.jsx(t,{...i,ref:o,children:a})});return r.displayName=`${e}.Slot`,r}function Ds(e){const t=s.forwardRef((r,n)=>{const{children:o,...a}=r;if(s.isValidElement(o)){const i=Fs(o),c=js(a,o.props);return o.type!==s.Fragment&&(c.ref=n?ne(n,i):i),s.cloneElement(o,c)}return s.Children.count(o)>1?s.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Ms=Symbol("radix.slottable");function Ls(e){return s.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Ms}function js(e,t){const r={...t};for(const n in t){const o=e[n],a=t[n];/^on[A-Z]/.test(n)?o&&a?r[n]=(...c)=>{const u=a(...c);return o(...c),u}:o&&(r[n]=o):n==="style"?r[n]={...o,...a}:n==="className"&&(r[n]=[o,a].filter(Boolean).join(" "))}return{...e,...r}}function Fs(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function ks(e){const t=e+"CollectionProvider",[r,n]=H(t),[o,a]=r(t,{collectionRef:{current:null},itemMap:new Map}),i=h=>{const{scope:g,children:b}=h,C=z.useRef(null),w=z.useRef(new Map).current;return p.jsx(o,{scope:g,itemMap:w,collectionRef:C,children:b})};i.displayName=t;const c=e+"CollectionSlot",u=Mt(c),l=z.forwardRef((h,g)=>{const{scope:b,children:C}=h,w=a(c,b),E=N(g,w.collectionRef);return p.jsx(u,{ref:E,children:C})});l.displayName=c;const d=e+"CollectionItemSlot",f="data-radix-collection-item",v=Mt(d),m=z.forwardRef((h,g)=>{const{scope:b,children:C,...w}=h,E=z.useRef(null),x=N(g,E),R=a(d,b);return z.useEffect(()=>(R.itemMap.set(E,{ref:E,...w}),()=>void R.itemMap.delete(E))),p.jsx(v,{[f]:"",ref:x,children:C})});m.displayName=d;function y(h){const g=a(e+"CollectionConsumer",h);return z.useCallback(()=>{const C=g.collectionRef.current;if(!C)return[];const w=Array.from(C.querySelectorAll(`[${f}]`));return Array.from(g.itemMap.values()).sort((R,S)=>w.indexOf(R.ref.current)-w.indexOf(S.ref.current))},[g.collectionRef,g.itemMap])}return[{Provider:i,Slot:l,ItemSlot:m},y,n]}var He="rovingFocusGroup.onEntryFocus",$s={bubbles:!1,cancelable:!0},ce="RovingFocusGroup",[Ge,Qr,Ws]=ks(ce),[Bs,Jr]=H(ce,[Ws]),[Hs,Vs]=Bs(ce),en=s.forwardRef((e,t)=>p.jsx(Ge.Provider,{scope:e.__scopeRovingFocusGroup,children:p.jsx(Ge.Slot,{scope:e.__scopeRovingFocusGroup,children:p.jsx(Us,{...e,ref:t})})}));en.displayName=ce;var Us=s.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,orientation:n,loop:o=!1,dir:a,currentTabStopId:i,defaultCurrentTabStopId:c,onCurrentTabStopIdChange:u,onEntryFocus:l,preventScrollOnEntryFocus:d=!1,...f}=e,v=s.useRef(null),m=N(t,v),y=Ke(a),[h,g]=se({prop:i,defaultProp:c??null,onChange:u,caller:ce}),[b,C]=s.useState(!1),w=D(l),E=Qr(r),x=s.useRef(!1),[R,S]=s.useState(0);return s.useEffect(()=>{const T=v.current;if(T)return T.addEventListener(He,w),()=>T.removeEventListener(He,w)},[w]),p.jsx(Hs,{scope:r,orientation:n,dir:y,loop:o,currentTabStopId:h,onItemFocus:s.useCallback(T=>g(T),[g]),onItemShiftTab:s.useCallback(()=>C(!0),[]),onFocusableItemAdd:s.useCallback(()=>S(T=>T+1),[]),onFocusableItemRemove:s.useCallback(()=>S(T=>T-1),[]),children:p.jsx(_.div,{tabIndex:b||R===0?-1:0,"data-orientation":n,...f,ref:m,style:{outline:"none",...e.style},onMouseDown:P(e.onMouseDown,()=>{x.current=!0}),onFocus:P(e.onFocus,T=>{const A=!x.current;if(T.target===T.currentTarget&&A&&!b){const O=new CustomEvent(He,$s);if(T.currentTarget.dispatchEvent(O),!O.defaultPrevented){const I=E().filter($=>$.focusable),U=I.find($=>$.active),X=I.find($=>$.id===h),le=[U,X,...I].filter(Boolean).map($=>$.ref.current);nn(le,d)}}x.current=!1}),onBlur:P(e.onBlur,()=>C(!1))})})}),tn="RovingFocusGroupItem",rn=s.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,focusable:n=!0,active:o=!1,tabStopId:a,children:i,...c}=e,u=Y(),l=a||u,d=Vs(tn,r),f=d.currentTabStopId===l,v=Qr(r),{onFocusableItemAdd:m,onFocusableItemRemove:y,currentTabStopId:h}=d;return s.useEffect(()=>{if(n)return m(),()=>y()},[n,m,y]),p.jsx(Ge.ItemSlot,{scope:r,id:l,focusable:n,active:o,children:p.jsx(_.span,{tabIndex:f?0:-1,"data-orientation":d.orientation,...c,ref:t,onMouseDown:P(e.onMouseDown,g=>{n?d.onItemFocus(l):g.preventDefault()}),onFocus:P(e.onFocus,()=>d.onItemFocus(l)),onKeyDown:P(e.onKeyDown,g=>{if(g.key==="Tab"&&g.shiftKey){d.onItemShiftTab();return}if(g.target!==g.currentTarget)return;const b=Gs(g,d.orientation,d.dir);if(b!==void 0){if(g.metaKey||g.ctrlKey||g.altKey||g.shiftKey)return;g.preventDefault();let w=v().filter(E=>E.focusable).map(E=>E.ref.current);if(b==="last")w.reverse();else if(b==="prev"||b==="next"){b==="prev"&&w.reverse();const E=w.indexOf(g.currentTarget);w=d.loop?Xs(w,E+1):w.slice(E+1)}setTimeout(()=>nn(w))}}),children:typeof i=="function"?i({isCurrentTabStop:f,hasTabStop:h!=null}):i})})});rn.displayName=tn;var zs={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Ys(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Gs(e,t,r){const n=Ys(e.key,r);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return zs[n]}function nn(e,t=!1){const r=document.activeElement;for(const n of e)if(n===r||(n.focus({preventScroll:t}),document.activeElement!==r))return}function Xs(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var Ks=en,Zs=rn,Me="Tabs",[qs]=H(Me,[Jr]),on=Jr(),[Qs,ut]=qs(Me),an=s.forwardRef((e,t)=>{const{__scopeTabs:r,value:n,onValueChange:o,defaultValue:a,orientation:i="horizontal",dir:c,activationMode:u="automatic",...l}=e,d=Ke(c),[f,v]=se({prop:n,onChange:o,defaultProp:a??"",caller:Me});return p.jsx(Qs,{scope:r,baseId:Y(),value:f,onValueChange:v,orientation:i,dir:d,activationMode:u,children:p.jsx(_.div,{dir:d,"data-orientation":i,...l,ref:t})})});an.displayName=Me;var sn="TabsList",cn=s.forwardRef((e,t)=>{const{__scopeTabs:r,loop:n=!0,...o}=e,a=ut(sn,r),i=on(r);return p.jsx(Ks,{asChild:!0,...i,orientation:a.orientation,dir:a.dir,loop:n,children:p.jsx(_.div,{role:"tablist","aria-orientation":a.orientation,...o,ref:t})})});cn.displayName=sn;var ln="TabsTrigger",un=s.forwardRef((e,t)=>{const{__scopeTabs:r,value:n,disabled:o=!1,...a}=e,i=ut(ln,r),c=on(r),u=pn(i.baseId,n),l=vn(i.baseId,n),d=n===i.value;return p.jsx(Zs,{asChild:!0,...c,focusable:!o,active:d,children:p.jsx(_.button,{type:"button",role:"tab","aria-selected":d,"aria-controls":l,"data-state":d?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:u,...a,ref:t,onMouseDown:P(e.onMouseDown,f=>{!o&&f.button===0&&f.ctrlKey===!1?i.onValueChange(n):f.preventDefault()}),onKeyDown:P(e.onKeyDown,f=>{[" ","Enter"].includes(f.key)&&i.onValueChange(n)}),onFocus:P(e.onFocus,()=>{const f=i.activationMode!=="manual";!d&&!o&&f&&i.onValueChange(n)})})})});un.displayName=ln;var dn="TabsContent",fn=s.forwardRef((e,t)=>{const{__scopeTabs:r,value:n,forceMount:o,children:a,...i}=e,c=ut(dn,r),u=pn(c.baseId,n),l=vn(c.baseId,n),d=n===c.value,f=s.useRef(d);return s.useEffect(()=>{const v=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(v)},[]),p.jsx(M,{present:o||d,children:({present:v})=>p.jsx(_.div,{"data-state":d?"active":"inactive","data-orientation":c.orientation,role:"tabpanel","aria-labelledby":u,hidden:!v,id:l,tabIndex:0,...i,ref:t,style:{...e.style,animationDuration:f.current?"0s":void 0},children:v&&a})})});fn.displayName=dn;function pn(e,t){return`${e}-trigger-${t}`}function vn(e,t){return`${e}-content-${t}`}var xi=an,Pi=cn,Ri=un,Ti=fn;export{ni as C,Ei as D,Pi as L,yi as O,li as P,ti as R,ei as S,ci as T,ri as V,oa as _,io as a,vo as b,ui as c,ii as d,hi as e,fi as f,pi as g,vi as h,xi as i,Ri as j,Ti as k,si as l,oi as m,ai as n,F as o,fr as p,gi as q,bi as r,Ci as s,Si as t,wi as u};
45
+ For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return s.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},us="DialogDescriptionWarning",ds=({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Vr(us).contentName}}.`;return s.useEffect(()=>{var a;const o=(a=e.current)==null?void 0:a.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},fi=Or,pi=Dr,vi=Mr,hi=Lr,mi=Fr,gi=$r,bi=Br,fs=Symbol("radix.slottable");function ps(e){const t=({children:r})=>p.jsx(p.Fragment,{children:r});return t.displayName=`${e}.Slottable`,t.__radixId=fs,t}var vs=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),hs="VisuallyHidden",Ur=s.forwardRef((e,t)=>p.jsx(_.span,{...e,ref:t,style:{...vs,...e.style}}));Ur.displayName=hs;var ms=Ur,[Ne]=H("Tooltip",[Te]),Ie=Te(),zr="TooltipProvider",gs=700,ze="tooltip.open",[bs,lt]=Ne(zr),Yr=e=>{const{__scopeTooltip:t,delayDuration:r=gs,skipDelayDuration:n=300,disableHoverableContent:o=!1,children:a}=e,i=s.useRef(!0),c=s.useRef(!1),u=s.useRef(0);return s.useEffect(()=>{const l=u.current;return()=>window.clearTimeout(l)},[]),p.jsx(bs,{scope:t,isOpenDelayedRef:i,delayDuration:r,onOpen:s.useCallback(()=>{window.clearTimeout(u.current),i.current=!1},[]),onClose:s.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>i.current=!0,n)},[n]),isPointerInTransitRef:c,onPointerInTransitChange:s.useCallback(l=>{c.current=l},[]),disableHoverableContent:o,children:a})};Yr.displayName=zr;var ae="Tooltip",[ys,De]=Ne(ae),Gr=e=>{const{__scopeTooltip:t,children:r,open:n,defaultOpen:o,onOpenChange:a,disableHoverableContent:i,delayDuration:c}=e,u=lt(ae,e.__scopeTooltip),l=Ie(t),[d,f]=s.useState(null),v=Y(),m=s.useRef(0),y=i??u.disableHoverableContent,h=c??u.delayDuration,g=s.useRef(!1),[b,C]=se({prop:n,defaultProp:o??!1,onChange:S=>{S?(u.onOpen(),document.dispatchEvent(new CustomEvent(ze))):u.onClose(),a==null||a(S)},caller:ae}),w=s.useMemo(()=>b?g.current?"delayed-open":"instant-open":"closed",[b]),E=s.useCallback(()=>{window.clearTimeout(m.current),m.current=0,g.current=!1,C(!0)},[C]),x=s.useCallback(()=>{window.clearTimeout(m.current),m.current=0,C(!1)},[C]),R=s.useCallback(()=>{window.clearTimeout(m.current),m.current=window.setTimeout(()=>{g.current=!0,C(!0),m.current=0},h)},[h,C]);return s.useEffect(()=>()=>{m.current&&(window.clearTimeout(m.current),m.current=0)},[]),p.jsx(ir,{...l,children:p.jsx(ys,{scope:t,contentId:v,open:b,stateAttribute:w,trigger:d,onTriggerChange:f,onTriggerEnter:s.useCallback(()=>{u.isOpenDelayedRef.current?R():E()},[u.isOpenDelayedRef,R,E]),onTriggerLeave:s.useCallback(()=>{y?x():(window.clearTimeout(m.current),m.current=0)},[x,y]),onOpen:E,onClose:x,disableHoverableContent:y,children:r})})};Gr.displayName=ae;var Ye="TooltipTrigger",Xr=s.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,o=De(Ye,r),a=lt(Ye,r),i=Ie(r),c=s.useRef(null),u=N(t,c,o.onTriggerChange),l=s.useRef(!1),d=s.useRef(!1),f=s.useCallback(()=>l.current=!1,[]);return s.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),p.jsx(rt,{asChild:!0,...i,children:p.jsx(_.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...n,ref:u,onPointerMove:P(e.onPointerMove,v=>{v.pointerType!=="touch"&&!d.current&&!a.isPointerInTransitRef.current&&(o.onTriggerEnter(),d.current=!0)}),onPointerLeave:P(e.onPointerLeave,()=>{o.onTriggerLeave(),d.current=!1}),onPointerDown:P(e.onPointerDown,()=>{o.open&&o.onClose(),l.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:P(e.onFocus,()=>{l.current||o.onOpen()}),onBlur:P(e.onBlur,o.onClose),onClick:P(e.onClick,o.onClose)})})});Xr.displayName=Ye;var Cs="TooltipPortal",[yi,ws]=Ne(Cs,{forceMount:void 0}),re="TooltipContent",Kr=s.forwardRef((e,t)=>{const r=ws(re,e.__scopeTooltip),{forceMount:n=r.forceMount,side:o="top",...a}=e,i=De(re,e.__scopeTooltip);return p.jsx(M,{present:n||i.open,children:i.disableHoverableContent?p.jsx(Zr,{side:o,...a,ref:t}):p.jsx(Es,{side:o,...a,ref:t})})}),Es=s.forwardRef((e,t)=>{const r=De(re,e.__scopeTooltip),n=lt(re,e.__scopeTooltip),o=s.useRef(null),a=N(t,o),[i,c]=s.useState(null),{trigger:u,onClose:l}=r,d=o.current,{onPointerInTransitChange:f}=n,v=s.useCallback(()=>{c(null),f(!1)},[f]),m=s.useCallback((y,h)=>{const g=y.currentTarget,b={x:y.clientX,y:y.clientY},C=Ts(b,g.getBoundingClientRect()),w=As(b,C),E=_s(h.getBoundingClientRect()),x=Ns([...w,...E]);c(x),f(!0)},[f]);return s.useEffect(()=>()=>v(),[v]),s.useEffect(()=>{if(u&&d){const y=g=>m(g,d),h=g=>m(g,u);return u.addEventListener("pointerleave",y),d.addEventListener("pointerleave",h),()=>{u.removeEventListener("pointerleave",y),d.removeEventListener("pointerleave",h)}}},[u,d,m,v]),s.useEffect(()=>{if(i){const y=h=>{const g=h.target,b={x:h.clientX,y:h.clientY},C=(u==null?void 0:u.contains(g))||(d==null?void 0:d.contains(g)),w=!Os(b,i);C?v():w&&(v(),l())};return document.addEventListener("pointermove",y),()=>document.removeEventListener("pointermove",y)}},[u,d,i,l,v]),p.jsx(Zr,{...e,ref:a})}),[Ss,xs]=Ne(ae,{isInside:!1}),Ps=ps("TooltipContent"),Zr=s.forwardRef((e,t)=>{const{__scopeTooltip:r,children:n,"aria-label":o,onEscapeKeyDown:a,onPointerDownOutside:i,...c}=e,u=De(re,r),l=Ie(r),{onClose:d}=u;return s.useEffect(()=>(document.addEventListener(ze,d),()=>document.removeEventListener(ze,d)),[d]),s.useEffect(()=>{if(u.trigger){const f=v=>{const m=v.target;m!=null&&m.contains(u.trigger)&&d()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[u.trigger,d]),p.jsx(Re,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:i,onFocusOutside:f=>f.preventDefault(),onDismiss:d,children:p.jsxs(cr,{"data-state":u.stateAttribute,...l,...c,ref:t,style:{...c.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[p.jsx(Ps,{children:n}),p.jsx(Ss,{scope:r,isInside:!0,children:p.jsx(ms,{id:u.contentId,role:"tooltip",children:o||n})})]})})});Kr.displayName=re;var qr="TooltipArrow",Rs=s.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,o=Ie(r);return xs(qr,r).isInside?null:p.jsx(lr,{...o,...n,ref:t})});Rs.displayName=qr;function Ts(e,t){const r=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(r,n,o,a)){case a:return"left";case o:return"right";case r:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function As(e,t,r=5){const n=[];switch(t){case"top":n.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":n.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":n.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":n.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r});break}return n}function _s(e){const{top:t,right:r,bottom:n,left:o}=e;return[{x:o,y:t},{x:r,y:t},{x:r,y:n},{x:o,y:n}]}function Os(e,t){const{x:r,y:n}=e;let o=!1;for(let a=0,i=t.length-1;a<t.length;i=a++){const c=t[a],u=t[i],l=c.x,d=c.y,f=u.x,v=u.y;d>n!=v>n&&r<(f-l)*(n-d)/(v-d)+l&&(o=!o)}return o}function Ns(e){const t=e.slice();return t.sort((r,n)=>r.x<n.x?-1:r.x>n.x?1:r.y<n.y?-1:r.y>n.y?1:0),Is(t)}function Is(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n<e.length;n++){const o=e[n];for(;t.length>=2;){const a=t[t.length-1],i=t[t.length-2];if((a.x-i.x)*(o.y-i.y)>=(a.y-i.y)*(o.x-i.x))t.pop();else break}t.push(o)}t.pop();const r=[];for(let n=e.length-1;n>=0;n--){const o=e[n];for(;r.length>=2;){const a=r[r.length-1],i=r[r.length-2];if((a.x-i.x)*(o.y-i.y)>=(a.y-i.y)*(o.x-i.x))r.pop();else break}r.push(o)}return r.pop(),t.length===1&&r.length===1&&t[0].x===r[0].x&&t[0].y===r[0].y?t:t.concat(r)}var Ci=Yr,wi=Gr,Ei=Xr,Si=Kr;function Mt(e){const t=Ds(e),r=s.forwardRef((n,o)=>{const{children:a,...i}=n,c=s.Children.toArray(a),u=c.find(Ls);if(u){const l=u.props.children,d=c.map(f=>f===u?s.Children.count(l)>1?s.Children.only(null):s.isValidElement(l)?l.props.children:null:f);return p.jsx(t,{...i,ref:o,children:s.isValidElement(l)?s.cloneElement(l,void 0,d):null})}return p.jsx(t,{...i,ref:o,children:a})});return r.displayName=`${e}.Slot`,r}function Ds(e){const t=s.forwardRef((r,n)=>{const{children:o,...a}=r;if(s.isValidElement(o)){const i=Fs(o),c=js(a,o.props);return o.type!==s.Fragment&&(c.ref=n?ne(n,i):i),s.cloneElement(o,c)}return s.Children.count(o)>1?s.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Ms=Symbol("radix.slottable");function Ls(e){return s.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Ms}function js(e,t){const r={...t};for(const n in t){const o=e[n],a=t[n];/^on[A-Z]/.test(n)?o&&a?r[n]=(...c)=>{const u=a(...c);return o(...c),u}:o&&(r[n]=o):n==="style"?r[n]={...o,...a}:n==="className"&&(r[n]=[o,a].filter(Boolean).join(" "))}return{...e,...r}}function Fs(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function ks(e){const t=e+"CollectionProvider",[r,n]=H(t),[o,a]=r(t,{collectionRef:{current:null},itemMap:new Map}),i=h=>{const{scope:g,children:b}=h,C=z.useRef(null),w=z.useRef(new Map).current;return p.jsx(o,{scope:g,itemMap:w,collectionRef:C,children:b})};i.displayName=t;const c=e+"CollectionSlot",u=Mt(c),l=z.forwardRef((h,g)=>{const{scope:b,children:C}=h,w=a(c,b),E=N(g,w.collectionRef);return p.jsx(u,{ref:E,children:C})});l.displayName=c;const d=e+"CollectionItemSlot",f="data-radix-collection-item",v=Mt(d),m=z.forwardRef((h,g)=>{const{scope:b,children:C,...w}=h,E=z.useRef(null),x=N(g,E),R=a(d,b);return z.useEffect(()=>(R.itemMap.set(E,{ref:E,...w}),()=>void R.itemMap.delete(E))),p.jsx(v,{[f]:"",ref:x,children:C})});m.displayName=d;function y(h){const g=a(e+"CollectionConsumer",h);return z.useCallback(()=>{const C=g.collectionRef.current;if(!C)return[];const w=Array.from(C.querySelectorAll(`[${f}]`));return Array.from(g.itemMap.values()).sort((R,S)=>w.indexOf(R.ref.current)-w.indexOf(S.ref.current))},[g.collectionRef,g.itemMap])}return[{Provider:i,Slot:l,ItemSlot:m},y,n]}var He="rovingFocusGroup.onEntryFocus",$s={bubbles:!1,cancelable:!0},ce="RovingFocusGroup",[Ge,Qr,Ws]=ks(ce),[Bs,Jr]=H(ce,[Ws]),[Hs,Vs]=Bs(ce),en=s.forwardRef((e,t)=>p.jsx(Ge.Provider,{scope:e.__scopeRovingFocusGroup,children:p.jsx(Ge.Slot,{scope:e.__scopeRovingFocusGroup,children:p.jsx(Us,{...e,ref:t})})}));en.displayName=ce;var Us=s.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,orientation:n,loop:o=!1,dir:a,currentTabStopId:i,defaultCurrentTabStopId:c,onCurrentTabStopIdChange:u,onEntryFocus:l,preventScrollOnEntryFocus:d=!1,...f}=e,v=s.useRef(null),m=N(t,v),y=Ke(a),[h,g]=se({prop:i,defaultProp:c??null,onChange:u,caller:ce}),[b,C]=s.useState(!1),w=D(l),E=Qr(r),x=s.useRef(!1),[R,S]=s.useState(0);return s.useEffect(()=>{const T=v.current;if(T)return T.addEventListener(He,w),()=>T.removeEventListener(He,w)},[w]),p.jsx(Hs,{scope:r,orientation:n,dir:y,loop:o,currentTabStopId:h,onItemFocus:s.useCallback(T=>g(T),[g]),onItemShiftTab:s.useCallback(()=>C(!0),[]),onFocusableItemAdd:s.useCallback(()=>S(T=>T+1),[]),onFocusableItemRemove:s.useCallback(()=>S(T=>T-1),[]),children:p.jsx(_.div,{tabIndex:b||R===0?-1:0,"data-orientation":n,...f,ref:m,style:{outline:"none",...e.style},onMouseDown:P(e.onMouseDown,()=>{x.current=!0}),onFocus:P(e.onFocus,T=>{const A=!x.current;if(T.target===T.currentTarget&&A&&!b){const O=new CustomEvent(He,$s);if(T.currentTarget.dispatchEvent(O),!O.defaultPrevented){const I=E().filter($=>$.focusable),U=I.find($=>$.active),X=I.find($=>$.id===h),le=[U,X,...I].filter(Boolean).map($=>$.ref.current);nn(le,d)}}x.current=!1}),onBlur:P(e.onBlur,()=>C(!1))})})}),tn="RovingFocusGroupItem",rn=s.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,focusable:n=!0,active:o=!1,tabStopId:a,children:i,...c}=e,u=Y(),l=a||u,d=Vs(tn,r),f=d.currentTabStopId===l,v=Qr(r),{onFocusableItemAdd:m,onFocusableItemRemove:y,currentTabStopId:h}=d;return s.useEffect(()=>{if(n)return m(),()=>y()},[n,m,y]),p.jsx(Ge.ItemSlot,{scope:r,id:l,focusable:n,active:o,children:p.jsx(_.span,{tabIndex:f?0:-1,"data-orientation":d.orientation,...c,ref:t,onMouseDown:P(e.onMouseDown,g=>{n?d.onItemFocus(l):g.preventDefault()}),onFocus:P(e.onFocus,()=>d.onItemFocus(l)),onKeyDown:P(e.onKeyDown,g=>{if(g.key==="Tab"&&g.shiftKey){d.onItemShiftTab();return}if(g.target!==g.currentTarget)return;const b=Gs(g,d.orientation,d.dir);if(b!==void 0){if(g.metaKey||g.ctrlKey||g.altKey||g.shiftKey)return;g.preventDefault();let w=v().filter(E=>E.focusable).map(E=>E.ref.current);if(b==="last")w.reverse();else if(b==="prev"||b==="next"){b==="prev"&&w.reverse();const E=w.indexOf(g.currentTarget);w=d.loop?Xs(w,E+1):w.slice(E+1)}setTimeout(()=>nn(w))}}),children:typeof i=="function"?i({isCurrentTabStop:f,hasTabStop:h!=null}):i})})});rn.displayName=tn;var zs={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Ys(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Gs(e,t,r){const n=Ys(e.key,r);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return zs[n]}function nn(e,t=!1){const r=document.activeElement;for(const n of e)if(n===r||(n.focus({preventScroll:t}),document.activeElement!==r))return}function Xs(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var Ks=en,Zs=rn,Me="Tabs",[qs]=H(Me,[Jr]),on=Jr(),[Qs,ut]=qs(Me),an=s.forwardRef((e,t)=>{const{__scopeTabs:r,value:n,onValueChange:o,defaultValue:a,orientation:i="horizontal",dir:c,activationMode:u="automatic",...l}=e,d=Ke(c),[f,v]=se({prop:n,onChange:o,defaultProp:a??"",caller:Me});return p.jsx(Qs,{scope:r,baseId:Y(),value:f,onValueChange:v,orientation:i,dir:d,activationMode:u,children:p.jsx(_.div,{dir:d,"data-orientation":i,...l,ref:t})})});an.displayName=Me;var sn="TabsList",cn=s.forwardRef((e,t)=>{const{__scopeTabs:r,loop:n=!0,...o}=e,a=ut(sn,r),i=on(r);return p.jsx(Ks,{asChild:!0,...i,orientation:a.orientation,dir:a.dir,loop:n,children:p.jsx(_.div,{role:"tablist","aria-orientation":a.orientation,...o,ref:t})})});cn.displayName=sn;var ln="TabsTrigger",un=s.forwardRef((e,t)=>{const{__scopeTabs:r,value:n,disabled:o=!1,...a}=e,i=ut(ln,r),c=on(r),u=pn(i.baseId,n),l=vn(i.baseId,n),d=n===i.value;return p.jsx(Zs,{asChild:!0,...c,focusable:!o,active:d,children:p.jsx(_.button,{type:"button",role:"tab","aria-selected":d,"aria-controls":l,"data-state":d?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:u,...a,ref:t,onMouseDown:P(e.onMouseDown,f=>{!o&&f.button===0&&f.ctrlKey===!1?i.onValueChange(n):f.preventDefault()}),onKeyDown:P(e.onKeyDown,f=>{[" ","Enter"].includes(f.key)&&i.onValueChange(n)}),onFocus:P(e.onFocus,()=>{const f=i.activationMode!=="manual";!d&&!o&&f&&i.onValueChange(n)})})})});un.displayName=ln;var dn="TabsContent",fn=s.forwardRef((e,t)=>{const{__scopeTabs:r,value:n,forceMount:o,children:a,...i}=e,c=ut(dn,r),u=pn(c.baseId,n),l=vn(c.baseId,n),d=n===c.value,f=s.useRef(d);return s.useEffect(()=>{const v=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(v)},[]),p.jsx(M,{present:o||d,children:({present:v})=>p.jsx(_.div,{"data-state":d?"active":"inactive","data-orientation":c.orientation,role:"tabpanel","aria-labelledby":u,hidden:!v,id:l,tabIndex:0,...i,ref:t,style:{...e.style,animationDuration:f.current?"0s":void 0},children:v&&a})})});fn.displayName=dn;function pn(e,t){return`${e}-trigger-${t}`}function vn(e,t){return`${e}-content-${t}`}var xi=an,Pi=cn,Ri=un,Ti=fn;export{ni as C,gi as D,Pi as L,vi as O,li as P,ti as R,ei as S,ci as T,ri as V,oa as _,io as a,vo as b,ui as c,ii as d,fi as e,pi as f,hi as g,bi as h,mi as i,Si as j,Ci as k,wi as l,Ei as m,xi as n,Ri as o,Ti as p,si as q,oi as r,ai as s,F as t,fr as u};
@@ -5,8 +5,8 @@
5
5
  <link rel="icon" type="image/svg+xml" href="/favicon.svg" />
6
6
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
7
  <title>BladeCode</title>
8
- <script type="module" crossorigin src="/assets/index-9t-WxRrl.js"></script>
9
- <link rel="stylesheet" crossorigin href="/assets/index-Bu13aXyE.css">
8
+ <script type="module" crossorigin src="/assets/index-Cnz-_jPt.js"></script>
9
+ <link rel="stylesheet" crossorigin href="/assets/index-21gV5nOE.css">
10
10
  </head>
11
11
  <body>
12
12
  <div id="root"></div>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "blade-code",
3
- "version": "0.7.5",
3
+ "version": "0.7.6",
4
4
  "private": false,
5
5
  "description": "🗡️ Blade Code - 智能代码助手命令行工具",
6
6
  "type": "module",
@@ -1 +0,0 @@
1
- import{Ab as a}from"./chunk-98jpdmgc.js";import"./chunk-w1zb8zac.js";import"./chunk-kfg3vx5z.js";export{a as createChatServiceAsync};
@@ -1,24 +0,0 @@
1
- import{Aa as X0,Ca as w}from"./chunk-rkhhzc4r.js";import{nanoid as L0}from"nanoid";import{devtools as R0,subscribeWithSelector as I0}from"zustand/middleware";import{createStore as N0}from"zustand/vanilla";var $0={name:"ayu-dark",colors:{primary:"#ffcc66",secondary:"#bae67e",accent:"#73d0ff",success:"#bae67e",warning:"#ffcc66",error:"#ff3333",info:"#73d0ff",light:"#f0f0f0",dark:"#000000",muted:"#5c6773",highlight:"#2d323b",text:{primary:"#e6e1cf",secondary:"#bae67e",muted:"#5c6773",light:"#ffffff"},background:{primary:"#0f1419",secondary:"#14191f",dark:"#000000"},border:{light:"#2d323b",dark:"#000000"},syntax:{comment:"#5c6773",string:"#bae67e",number:"#ffcc66",keyword:"#ff8f40",function:"#73d0ff",variable:"#e6e1cf",operator:"#f29e74",type:"#73d0ff",tag:"#ff8f40",attr:"#ffd580",default:"#e6e1cf"}},spacing:{xs:0.25,sm:0.5,md:1,lg:1.5,xl:2},typography:{fontSize:{xs:0.75,sm:0.875,base:1,lg:1.125,xl:1.25,"2xl":1.5,"3xl":1.875},fontWeight:{light:300,normal:400,medium:500,semibold:600,bold:700}},borderRadius:{sm:0.125,base:0.25,lg:0.5,xl:0.75},boxShadow:{sm:"0 1px 2px 0 rgba(0, 0, 0, 0.2)",base:"0 1px 3px 0 rgba(0, 0, 0, 0.3), 0 1px 2px 0 rgba(0, 0, 0, 0.2)",lg:"0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2)"}},G0={name:"dracula",colors:{primary:"#bd93f9",secondary:"#ffb86c",accent:"#ff79c6",success:"#50fa7b",warning:"#f1fa8c",error:"#ff5555",info:"#8be9fd",light:"#f8f8f2",dark:"#282a36",muted:"#6272a4",highlight:"#44475a",text:{primary:"#f8f8f2",secondary:"#f1fa8c",muted:"#6272a4",light:"#ffffff"},background:{primary:"#282a36",secondary:"#44475a",dark:"#21222c"},border:{light:"#44475a",dark:"#000000"},syntax:{comment:"#6272a4",string:"#f1fa8c",number:"#bd93f9",keyword:"#ff79c6",function:"#50fa7b",variable:"#f8f8f2",operator:"#ff79c6",type:"#8be9fd",tag:"#ff79c6",attr:"#50fa7b",default:"#f8f8f2"}},spacing:{xs:0.25,sm:0.5,md:1,lg:1.5,xl:2},typography:{fontSize:{xs:0.75,sm:0.875,base:1,lg:1.125,xl:1.25,"2xl":1.5,"3xl":1.875},fontWeight:{light:300,normal:400,medium:500,semibold:600,bold:700}},borderRadius:{sm:0.125,base:0.25,lg:0.5,xl:0.75},boxShadow:{sm:"0 1px 2px 0 rgba(40, 42, 54, 0.2)",base:"0 1px 3px 0 rgba(40, 42, 54, 0.3), 0 1px 2px 0 rgba(40, 42, 54, 0.2)",lg:"0 10px 15px -3px rgba(40, 42, 54, 0.3), 0 4px 6px -2px rgba(40, 42, 54, 0.2)"}},V0={name:"monokai",colors:{primary:"#66d9ef",secondary:"#a6e22e",accent:"#f92672",success:"#a6e22e",warning:"#e6db74",error:"#f92672",info:"#66d9ef",light:"#f8f8f2",dark:"#272822",muted:"#75715e",highlight:"#3e3d32",text:{primary:"#f8f8f2",secondary:"#e6db74",muted:"#75715e",light:"#ffffff"},background:{primary:"#272822",secondary:"#3e3d32",dark:"#1e1f1c"},border:{light:"#3e3d32",dark:"#000000"},syntax:{comment:"#75715e",string:"#e6db74",number:"#ae81ff",keyword:"#f92672",function:"#a6e22e",variable:"#f8f8f2",operator:"#f92672",type:"#66d9ef",tag:"#f92672",attr:"#a6e22e",default:"#f8f8f2"}},spacing:{xs:0.25,sm:0.5,md:1,lg:1.5,xl:2},typography:{fontSize:{xs:0.75,sm:0.875,base:1,lg:1.125,xl:1.25,"2xl":1.5,"3xl":1.875},fontWeight:{light:300,normal:400,medium:500,semibold:600,bold:700}},borderRadius:{sm:0.125,base:0.25,lg:0.5,xl:0.75},boxShadow:{sm:"0 1px 2px 0 rgba(39, 40, 34, 0.2)",base:"0 1px 3px 0 rgba(39, 40, 34, 0.3), 0 1px 2px 0 rgba(39, 40, 34, 0.2)",lg:"0 10px 15px -3px rgba(39, 40, 34, 0.3), 0 4px 6px -2px rgba(39, 40, 34, 0.2)"}},j0={name:"nord",colors:{primary:"#88c0d0",secondary:"#81a1c1",accent:"#b48ead",success:"#a3be8c",warning:"#ebcb8b",error:"#bf616a",info:"#88c0d0",light:"#eceff4",dark:"#2e3440",muted:"#4c566a",highlight:"#434c5e",text:{primary:"#eceff4",secondary:"#d8dee9",muted:"#4c566a",light:"#ffffff"},background:{primary:"#2e3440",secondary:"#3b4252",dark:"#242933"},border:{light:"#434c5e",dark:"#000000"},syntax:{comment:"#616e88",string:"#a3be8c",number:"#b48ead",keyword:"#81a1c1",function:"#88c0d0",variable:"#d8dee9",operator:"#81a1c1",type:"#8fbcbb",tag:"#81a1c1",attr:"#8fbcbb",default:"#eceff4"}},spacing:{xs:0.25,sm:0.5,md:1,lg:1.5,xl:2},typography:{fontSize:{xs:0.75,sm:0.875,base:1,lg:1.125,xl:1.25,"2xl":1.5,"3xl":1.875},fontWeight:{light:300,normal:400,medium:500,semibold:600,bold:700}},borderRadius:{sm:0.125,base:0.25,lg:0.5,xl:0.75},boxShadow:{sm:"0 1px 2px 0 rgba(46, 52, 64, 0.2)",base:"0 1px 3px 0 rgba(46, 52, 64, 0.3), 0 1px 2px 0 rgba(46, 52, 64, 0.2)",lg:"0 10px 15px -3px rgba(46, 52, 64, 0.3), 0 4px 6px -2px rgba(46, 52, 64, 0.2)"}},F0={name:"solarized-light",colors:{primary:"#268bd2",secondary:"#2aa198",accent:"#d33682",success:"#859900",warning:"#cb4b16",error:"#dc322f",info:"#268bd2",light:"#fdf6e3",dark:"#073642",muted:"#93a1a1",highlight:"#eee8d5",text:{primary:"#586e75",secondary:"#657b83",muted:"#93a1a1",light:"#002b36"},background:{primary:"#fdf6e3",secondary:"#eee8d5",dark:"#073642"},border:{light:"#eee8d5",dark:"#073642"},syntax:{comment:"#93a1a1",string:"#2aa198",number:"#d33682",keyword:"#859900",function:"#268bd2",variable:"#657b83",operator:"#859900",type:"#b58900",tag:"#268bd2",attr:"#93a1a1",default:"#657b83"}},spacing:{xs:0.25,sm:0.5,md:1,lg:1.5,xl:2},typography:{fontSize:{xs:0.75,sm:0.875,base:1,lg:1.125,xl:1.25,"2xl":1.5,"3xl":1.875},fontWeight:{light:300,normal:400,medium:500,semibold:600,bold:700}},borderRadius:{sm:0.125,base:0.25,lg:0.5,xl:0.75},boxShadow:{sm:"0 1px 2px 0 rgba(253, 246, 227, 0.2)",base:"0 1px 3px 0 rgba(253, 246, 227, 0.3), 0 1px 2px 0 rgba(253, 246, 227, 0.2)",lg:"0 10px 15px -3px rgba(253, 246, 227, 0.3), 0 4px 6px -2px rgba(253, 246, 227, 0.2)"}},U0={name:"solarized-dark",colors:{primary:"#268bd2",secondary:"#2aa198",accent:"#d33682",success:"#859900",warning:"#b58900",error:"#dc322f",info:"#268bd2",light:"#fdf6e3",dark:"#073642",muted:"#586e75",highlight:"#073642",text:{primary:"#839496",secondary:"#93a1a1",muted:"#586e75",light:"#fdf6e3"},background:{primary:"#002b36",secondary:"#073642",dark:"#001f29"},border:{light:"#073642",dark:"#000000"},syntax:{comment:"#586e75",string:"#2aa198",number:"#d33682",keyword:"#859900",function:"#268bd2",variable:"#839496",operator:"#859900",type:"#b58900",tag:"#268bd2",attr:"#93a1a1",default:"#839496"}},spacing:{xs:0.25,sm:0.5,md:1,lg:1.5,xl:2},typography:{fontSize:{xs:0.75,sm:0.875,base:1,lg:1.125,xl:1.25,"2xl":1.5,"3xl":1.875},fontWeight:{light:300,normal:400,medium:500,semibold:600,bold:700}},borderRadius:{sm:0.125,base:0.25,lg:0.5,xl:0.75},boxShadow:{sm:"0 1px 2px 0 rgba(0, 43, 54, 0.2)",base:"0 1px 3px 0 rgba(0, 43, 54, 0.3), 0 1px 2px 0 rgba(0, 43, 54, 0.2)",lg:"0 10px 15px -3px rgba(0, 43, 54, 0.3), 0 4px 6px -2px rgba(0, 43, 54, 0.2)"}},J0={name:"tokyo-night",colors:{primary:"#7aa2f7",secondary:"#7dcfff",accent:"#bb9af7",success:"#9ece6a",warning:"#e0af68",error:"#f7768e",info:"#7aa2f7",light:"#c0caf5",dark:"#1a1b26",muted:"#565f89",highlight:"#292e42",text:{primary:"#a9b1d6",secondary:"#c0caf5",muted:"#565f89",light:"#ffffff"},background:{primary:"#1a1b26",secondary:"#292e42",dark:"#16161e"},border:{light:"#292e42",dark:"#000000"},syntax:{comment:"#565f89",string:"#9ece6a",number:"#ff9e64",keyword:"#bb9af7",function:"#7aa2f7",variable:"#c0caf5",operator:"#89ddff",type:"#7dcfff",tag:"#f7768e",attr:"#7aa2f7",default:"#a9b1d6"}},spacing:{xs:0.25,sm:0.5,md:1,lg:1.5,xl:2},typography:{fontSize:{xs:0.75,sm:0.875,base:1,lg:1.125,xl:1.25,"2xl":1.5,"3xl":1.875},fontWeight:{light:300,normal:400,medium:500,semibold:600,bold:700}},borderRadius:{sm:0.125,base:0.25,lg:0.5,xl:0.75},boxShadow:{sm:"0 1px 2px 0 rgba(26, 27, 38, 0.2)",base:"0 1px 3px 0 rgba(26, 27, 38, 0.3), 0 1px 2px 0 rgba(26, 27, 38, 0.2)",lg:"0 10px 15px -3px rgba(26, 27, 38, 0.3), 0 4px 6px -2px rgba(26, 27, 38, 0.2)"}},H0={name:"github",colors:{primary:"#0969da",secondary:"#8250df",accent:"#bc4c00",success:"#1a7f37",warning:"#bc4c00",error:"#d1242f",info:"#0969da",light:"#f6f8fa",dark:"#24292f",muted:"#6e7781",highlight:"#ddf4ff",text:{primary:"#24292f",secondary:"#57606a",muted:"#6e7781",light:"#ffffff"},background:{primary:"#ffffff",secondary:"#f6f8fa",dark:"#24292f"},border:{light:"#d0d7de",dark:"#24292f"},syntax:{comment:"#6e7781",string:"#0a3069",number:"#0550ae",keyword:"#cf222e",function:"#8250df",variable:"#24292f",operator:"#cf222e",type:"#0550ae",tag:"#116329",attr:"#0550ae",default:"#24292f"}},spacing:{xs:0.25,sm:0.5,md:1,lg:1.5,xl:2},typography:{fontSize:{xs:0.75,sm:0.875,base:1,lg:1.125,xl:1.25,"2xl":1.5,"3xl":1.875},fontWeight:{light:300,normal:400,medium:500,semibold:600,bold:700}},borderRadius:{sm:0.125,base:0.25,lg:0.5,xl:0.75},boxShadow:{sm:"0 1px 2px 0 rgba(255, 255, 255, 0.2)",base:"0 1px 3px 0 rgba(255, 255, 255, 0.3), 0 1px 2px 0 rgba(255, 255, 255, 0.2)",lg:"0 10px 15px -3px rgba(255, 255, 255, 0.3), 0 4px 6px -2px rgba(255, 255, 255, 0.2)"}},z0={name:"gruvbox",colors:{primary:"#83a598",secondary:"#8ec07c",accent:"#d3869b",success:"#b8bb26",warning:"#fabd2f",error:"#fb4934",info:"#83a598",light:"#fbf1c7",dark:"#282828",muted:"#928374",highlight:"#3c3836",text:{primary:"#ebdbb2",secondary:"#d5c4a1",muted:"#928374",light:"#ffffff"},background:{primary:"#282828",secondary:"#3c3836",dark:"#1d2021"},border:{light:"#3c3836",dark:"#000000"},syntax:{comment:"#928374",string:"#b8bb26",number:"#d3869b",keyword:"#fb4934",function:"#8ec07c",variable:"#ebdbb2",operator:"#fe8019",type:"#fabd2f",tag:"#fb4934",attr:"#b8bb26",default:"#ebdbb2"}},spacing:{xs:0.25,sm:0.5,md:1,lg:1.5,xl:2},typography:{fontSize:{xs:0.75,sm:0.875,base:1,lg:1.125,xl:1.25,"2xl":1.5,"3xl":1.875},fontWeight:{light:300,normal:400,medium:500,semibold:600,bold:700}},borderRadius:{sm:0.125,base:0.25,lg:0.5,xl:0.75},boxShadow:{sm:"0 1px 2px 0 rgba(40, 40, 40, 0.2)",base:"0 1px 3px 0 rgba(40, 40, 40, 0.3), 0 1px 2px 0 rgba(40, 40, 40, 0.2)",lg:"0 10px 15px -3px rgba(40, 40, 40, 0.3), 0 4px 6px -2px rgba(40, 40, 40, 0.2)"}},_0={name:"one-dark",colors:{primary:"#61afef",secondary:"#c678dd",accent:"#e5c07b",success:"#98c379",warning:"#e5c07b",error:"#e06c75",info:"#56b6c2",light:"#abb2bf",dark:"#282c34",muted:"#5c6370",highlight:"#3e4451",text:{primary:"#abb2bf",secondary:"#c6c8d0",muted:"#5c6370",light:"#ffffff"},background:{primary:"#282c34",secondary:"#3e4451",dark:"#21252b"},border:{light:"#3e4451",dark:"#000000"},syntax:{comment:"#5c6370",string:"#98c379",number:"#d19a66",keyword:"#c678dd",function:"#61afef",variable:"#e06c75",operator:"#56b6c2",type:"#e5c07b",tag:"#e06c75",attr:"#d19a66",default:"#abb2bf"}},spacing:{xs:0.25,sm:0.5,md:1,lg:1.5,xl:2},typography:{fontSize:{xs:0.75,sm:0.875,base:1,lg:1.125,xl:1.25,"2xl":1.5,"3xl":1.875},fontWeight:{light:300,normal:400,medium:500,semibold:600,bold:700}},borderRadius:{sm:0.125,base:0.25,lg:0.5,xl:0.75},boxShadow:{sm:"0 1px 2px 0 rgba(40, 44, 52, 0.2)",base:"0 1px 3px 0 rgba(40, 44, 52, 0.3), 0 1px 2px 0 rgba(40, 44, 52, 0.2)",lg:"0 10px 15px -3px rgba(40, 44, 52, 0.3), 0 4px 6px -2px rgba(40, 44, 52, 0.2)"}},u0={name:"catppuccin",colors:{primary:"#89b4fa",secondary:"#cba6f7",accent:"#f5c2e7",success:"#a6e3a1",warning:"#f9e2af",error:"#f38ba8",info:"#89dceb",light:"#cdd6f4",dark:"#11111b",muted:"#6c7086",highlight:"#181825",text:{primary:"#cdd6f4",secondary:"#bac2de",muted:"#6c7086",light:"#ffffff"},background:{primary:"#1e1e2e",secondary:"#181825",dark:"#11111b"},border:{light:"#181825",dark:"#000000"},syntax:{comment:"#6c7086",string:"#a6e3a1",number:"#fab387",keyword:"#cba6f7",function:"#89b4fa",variable:"#cdd6f4",operator:"#89dceb",type:"#f5c2e7",tag:"#f38ba8",attr:"#89b4fa",default:"#cdd6f4"}},spacing:{xs:0.25,sm:0.5,md:1,lg:1.5,xl:2},typography:{fontSize:{xs:0.75,sm:0.875,base:1,lg:1.125,xl:1.25,"2xl":1.5,"3xl":1.875},fontWeight:{light:300,normal:400,medium:500,semibold:600,bold:700}},borderRadius:{sm:0.125,base:0.25,lg:0.5,xl:0.75},boxShadow:{sm:"0 1px 2px 0 rgba(30, 30, 46, 0.2)",base:"0 1px 3px 0 rgba(30, 30, 46, 0.3), 0 1px 2px 0 rgba(30, 30, 46, 0.2)",lg:"0 10px 15px -3px rgba(30, 30, 46, 0.3), 0 4px 6px -2px rgba(30, 30, 46, 0.2)"}},W0={name:"rose-pine",colors:{primary:"#9ccfd8",secondary:"#c4a7e7",accent:"#f6c177",success:"#31748f",warning:"#f6c177",error:"#eb6f92",info:"#9ccfd8",light:"#e0def4",dark:"#191724",muted:"#6e6a86",highlight:"#1f1d2e",text:{primary:"#e0def4",secondary:"#cecacd",muted:"#6e6a86",light:"#ffffff"},background:{primary:"#191724",secondary:"#1f1d2e",dark:"#12101a"},border:{light:"#1f1d2e",dark:"#000000"},syntax:{comment:"#6e6a86",string:"#9ccfd8",number:"#ea9a97",keyword:"#c4a7e7",function:"#31748f",variable:"#e0def4",operator:"#f6c177",type:"#9ccfd8",tag:"#eb6f92",attr:"#f6c177",default:"#e0def4"}},spacing:{xs:0.25,sm:0.5,md:1,lg:1.5,xl:2},typography:{fontSize:{xs:0.75,sm:0.875,base:1,lg:1.125,xl:1.25,"2xl":1.5,"3xl":1.875},fontWeight:{light:300,normal:400,medium:500,semibold:600,bold:700}},borderRadius:{sm:0.125,base:0.25,lg:0.5,xl:0.75},boxShadow:{sm:"0 1px 2px 0 rgba(25, 23, 36, 0.2)",base:"0 1px 3px 0 rgba(25, 23, 36, 0.3), 0 1px 2px 0 rgba(25, 23, 36, 0.2)",lg:"0 10px 15px -3px rgba(25, 23, 36, 0.3), 0 4px 6px -2px rgba(25, 23, 36, 0.2)"}},K0={name:"kanagawa",colors:{primary:"#8ba4b0",secondary:"#a292a3",accent:"#c47fd5",success:"#76946a",warning:"#c0a36e",error:"#c34043",info:"#7e9cd8",light:"#dcd7ba",dark:"#1f1f28",muted:"#727169",highlight:"#2a2a37",text:{primary:"#dcd7ba",secondary:"#c8c093",muted:"#727169",light:"#ffffff"},background:{primary:"#1f1f28",secondary:"#2a2a37",dark:"#16161d"},border:{light:"#2a2a37",dark:"#000000"},syntax:{comment:"#727169",string:"#98bb6c",number:"#d27e99",keyword:"#957fb8",function:"#7e9cd8",variable:"#dcd7ba",operator:"#c0a36e",type:"#7aa89f",tag:"#c34043",attr:"#7fb4ca",default:"#dcd7ba"}},spacing:{xs:0.25,sm:0.5,md:1,lg:1.5,xl:2},typography:{fontSize:{xs:0.75,sm:0.875,base:1,lg:1.125,xl:1.25,"2xl":1.5,"3xl":1.875},fontWeight:{light:300,normal:400,medium:500,semibold:600,bold:700}},borderRadius:{sm:0.125,base:0.25,lg:0.5,xl:0.75},boxShadow:{sm:"0 1px 2px 0 rgba(31, 31, 40, 0.2)",base:"0 1px 3px 0 rgba(31, 31, 40, 0.3), 0 1px 2px 0 rgba(31, 31, 40, 0.2)",lg:"0 10px 15px -3px rgba(31, 31, 40, 0.3), 0 4px 6px -2px rgba(31, 31, 40, 0.2)"}},g=[{id:"ayu-dark",label:"Ayu Dark",theme:$0,tags:["dark","popular"]},{id:"dracula",label:"Dracula",theme:G0,tags:["dark","popular"]},{id:"monokai",label:"Monokai",theme:V0,tags:["dark","classic"]},{id:"nord",label:"Nord",theme:j0,tags:["dark","minimal"]},{id:"solarized-light",label:"Solarized Light",theme:F0,tags:["light"]},{id:"solarized-dark",label:"Solarized Dark",theme:U0,tags:["dark"]},{id:"tokyo-night",label:"Tokyo Night",theme:J0,tags:["dark","popular"]},{id:"github",label:"GitHub",theme:H0,tags:["light","minimal"]},{id:"gruvbox",label:"Gruvbox",theme:z0,tags:["dark","warm"]},{id:"one-dark",label:"One Dark",theme:_0,tags:["dark","popular"]},{id:"catppuccin",label:"Catppuccin",theme:u0,tags:["dark","pastel"]},{id:"rose-pine",label:"Rose Pine",theme:W0,tags:["dark","elegant"]},{id:"kanagawa",label:"Kanagawa",theme:K0,tags:["dark","japanese"]}];var c={primary:"#0066cc",secondary:"#6c757d",accent:"#e83e8c",success:"#28a745",warning:"#ffc107",error:"#dc3545",info:"#17a2b8",light:"#f8f9fa",dark:"#343a40",muted:"#6c757d",highlight:"#fff3cd",text:{primary:"#212529",secondary:"#6c757d",muted:"#6c757d",light:"#ffffff"},background:{primary:"#ffffff",secondary:"#f8f9fa",dark:"#343a40"},border:{light:"#dee2e6",dark:"#495057"},syntax:{comment:"#6c757d",string:"#28a745",number:"#e83e8c",keyword:"#007bff",function:"#17a2b8",variable:"#495057",operator:"#ffc107",type:"#007bff",tag:"#dc3545",attr:"#ffc107",default:"#212529"}},T={name:"default",colors:c,spacing:{xs:0.25,sm:0.5,md:1,lg:1.5,xl:2},typography:{fontSize:{xs:0.75,sm:0.875,base:1,lg:1.125,xl:1.25,"2xl":1.5,"3xl":1.875},fontWeight:{light:300,normal:400,medium:500,semibold:600,bold:700}},borderRadius:{sm:0.125,base:0.25,lg:0.5,xl:0.75},boxShadow:{sm:"0 1px 2px 0 rgba(0, 0, 0, 0.05)",base:"0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)",lg:"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)"}},q0={...T,name:"dark",colors:{...c,text:{primary:"#ffffff",secondary:"#e2e8f0",muted:"#94a3b8",light:"#000000"},background:{primary:"#1e293b",secondary:"#334155",dark:"#0f172a"},border:{light:"#475569",dark:"#64748b"},syntax:{comment:"#94a3b8",string:"#34d399",number:"#f472b6",keyword:"#60a5fa",function:"#06b6d4",variable:"#e2e8f0",operator:"#fbbf24",type:"#60a5fa",tag:"#fb7185",attr:"#fbbf24",default:"#ffffff"}}};class i{currentTheme=T;themes=new Map;constructor(){this.themes.set("default",T),this.themes.set("dark",q0);for(let X of g)this.themes.set(X.id,X.theme)}setTheme(X){let Z=this.themes.get(X);if(Z)this.currentTheme=Z;else throw Error(`Theme '${X}' not found`)}getTheme(){return this.currentTheme}getAvailableThemes(){return Array.from(this.themes.keys())}getCurrentThemeName(){return this.currentTheme.name}getThemeByName(X){return this.themes.get(X)}hasTheme(X){return this.themes.has(X)}}var o=new i;var w0={initializationStatus:"idle",initializationError:null,activeModal:"none",sessionSelectorData:void 0,modelEditorTarget:null,tasks:[],awaitingSecondCtrlC:!1,thinkingModeEnabled:!1,subagentProgress:null},S=(X)=>({...w0,actions:{setInitializationStatus:(Z)=>{X((Q)=>({app:{...Q.app,initializationStatus:Z}}))},setInitializationError:(Z)=>{X((Q)=>({app:{...Q.app,initializationError:Z}}))},setActiveModal:(Z)=>{X((Q)=>({app:{...Q.app,activeModal:Z}}))},showSessionSelector:(Z)=>{X((Q)=>({app:{...Q.app,activeModal:"sessionSelector",sessionSelectorData:Z}}))},showModelEditWizard:(Z)=>{X((Q)=>({app:{...Q.app,activeModal:"modelEditWizard",modelEditorTarget:Z}}))},closeModal:()=>{X((Z)=>({app:{...Z.app,activeModal:"none",sessionSelectorData:void 0,modelEditorTarget:null}}))},setTasks:(Z)=>{X((Q)=>({app:{...Q.app,tasks:Z}}))},updateTask:(Z)=>{X((Q)=>({app:{...Q.app,tasks:Q.app.tasks.map((Y)=>Y.id===Z.id?Z:Y)}}))},setAwaitingSecondCtrlC:(Z)=>{X((Q)=>({app:{...Q.app,awaitingSecondCtrlC:Z}}))},setThinkingModeEnabled:(Z)=>{X((Q)=>({app:{...Q.app,thinkingModeEnabled:Z}}))},toggleThinkingMode:()=>{X((Z)=>({app:{...Z.app,thinkingModeEnabled:!Z.app.thinkingModeEnabled}}))},startSubagentProgress:(Z,Q,Y)=>{X(($)=>({app:{...$.app,subagentProgress:{id:Z,type:Q,description:Y,status:"running",startTime:Date.now()}}}))},updateSubagentTool:(Z)=>{X((Q)=>{if(!Q.app.subagentProgress)return Q;return{app:{...Q.app,subagentProgress:{...Q.app.subagentProgress,currentTool:Z}}}})},completeSubagentProgress:(Z)=>{X((Q)=>{if(!Q.app.subagentProgress)return Q;return{app:{...Q.app,subagentProgress:{...Q.app.subagentProgress,status:Z?"completed":"failed",currentTool:void 0}}}}),setTimeout(()=>{X((Q)=>({app:{...Q.app,subagentProgress:null}}))},1500)}}});var O0={isProcessing:!1,abortController:null,pendingCommands:[],recoveredSteeringCount:0},C=(X,Z)=>({...O0,actions:{setProcessing:(Q)=>{X((Y)=>({command:{...Y.command,isProcessing:Q}}))},createAbortController:()=>{let Q=Z().command.abortController;if(Q&&!Q.signal.aborted)Q.abort("interrupted-by-new-command");let Y=new AbortController;return X(($)=>({command:{...$.command,abortController:Y}})),Y},getAbortController:()=>{return Z().command.abortController},clearAbortController:(Q)=>{let Y=Z().command.abortController;if(Q!==void 0&&Y!==Q)return;X(($)=>({command:{...$.command,abortController:null}}))},abort:(Q)=>{let{abortController:Y}=Z().command;if(Y&&!Y.signal.aborted)Y.abort(Q??"user-cancel");X(($)=>({command:{...$.command,isProcessing:!1,pendingCommands:[]}}))},enqueueCommand:(Q)=>{X((Y)=>({command:{...Y.command,pendingCommands:[...Y.command.pendingCommands,Q]}}))},dequeueCommand:()=>{let{pendingCommands:Q}=Z().command;if(Q.length===0)return;let[Y,...$]=Q;return X((G)=>({command:{...G.command,pendingCommands:$}})),Y},clearQueue:()=>{X((Q)=>({command:{...Q.command,pendingCommands:[]}}))},setRecoveredSteeringCount:(Q)=>{X((Y)=>({command:{...Y.command,recoveredSteeringCount:Math.max(0,Q)}}))}}});var p0={config:null},f=(X)=>({...p0,actions:{setConfig:(Z)=>{X((Q)=>({config:{...Q.config,config:Z}}))},updateConfig:(Z)=>{X((Q)=>{if(!Q.config.config)throw Error(`[ConfigSlice] Config not initialized. Cannot update: ${JSON.stringify(Z)}`);return{config:{...Q.config,config:{...Q.config.config,...Z}}}})}}});var x0={currentFocus:"main-input",previousFocus:null},b=(X)=>({...x0,actions:{setFocus:(Z)=>{X((Q)=>({focus:{...Q.focus,currentFocus:Z,previousFocus:Q.focus.currentFocus}}))},restorePreviousFocus:()=>{X((Z)=>({focus:{...Z.focus,currentFocus:Z.focus.previousFocus||"main-input",previousFocus:null}}))}}});import{nanoid as E0}from"nanoid";var h={"deepseek-chat":{input:0.27,output:1.1},"deepseek-coder":{input:0.14,output:0.28},"deepseek-reasoner":{input:0.55,output:2.19},"deepseek-v3":{input:0.27,output:1.1},"deepseek-v4":{input:0.27,output:1.1},"deepseek-v4-pro":{input:0.27,output:1.1},"deepseek-v4-0724":{input:0.27,output:1.1},"gpt-4o":{input:2.5,output:10},"gpt-4o-mini":{input:0.15,output:0.6},"gpt-4.1":{input:2,output:8},"gpt-4.1-mini":{input:0.4,output:1.6},"gpt-4.1-nano":{input:0.1,output:0.4},"gpt-4-turbo":{input:10,output:30},"gpt-4":{input:30,output:60},"gpt-3.5-turbo":{input:0.5,output:1.5},o1:{input:15,output:60},"o1-mini":{input:3,output:12},"o1-pro":{input:150,output:600},o3:{input:10,output:40},"o3-mini":{input:1.1,output:4.4},"o4-mini":{input:1.1,output:4.4},"claude-3.5-sonnet":{input:3,output:15,cacheRead:0.3,cacheWrite:3.75},"claude-3.5-haiku":{input:0.8,output:4,cacheRead:0.08,cacheWrite:1},"claude-sonnet-4":{input:3,output:15,cacheRead:0.3,cacheWrite:3.75},"claude-4-opus":{input:15,output:75,cacheRead:1.5,cacheWrite:18.75},"claude-opus-4":{input:15,output:75,cacheRead:1.5,cacheWrite:18.75},"qwen-plus":{input:0.8,output:2},"qwen-max":{input:2,output:6},"qwen-turbo":{input:0.3,output:0.6},"qwen3-235b":{input:2,output:8},"gemini-2.5-pro":{input:1.25,output:10},"gemini-2.5-flash":{input:0.15,output:0.6}};function P0(X){let Z=X.toLowerCase();if(h[Z])return h[Z];for(let[Q,Y]of Object.entries(h))if(Z.includes(Q)||Q.includes(Z))return Y;return}function l(X,Z,Q,Y,$){let G=P0(X);if(!G)return 0;let U=Z/1e6*G.input+Q/1e6*G.output;if(Y&&G.cacheRead)U+=Y/1e6*G.cacheRead;if($&&G.cacheWrite)U+=$/1e6*G.cacheWrite;return Math.round(U*1e6)/1e6}var F={codeBlock:/^```(\w+)?\s*$/,heading:/^ *(#{1,4}) +(.+)/,blockquote:/^(>+)\s?(.*)/,ulItem:/^([ \t]*)([-*+]) +(.+)/,olItem:/^([ \t]*)(\d+)\. +(.+)/,hr:/^ *([-*_] *){3,} *$/,table:/^\|(.+)\|$/,tableSeparator:/^\|[\s]*:?-+:?[\s]*(\|[\s]*:?-+:?[\s]*)+\|?$/,diffStart:/^<<<DIFF>>>$/,diffEnd:/^<<<\/DIFF>>>$/,commandMessage:/<command-message>(.*?)<\/command-message>/};function r0(X){let Z=[],Q=X.split(/\r?\n/),Y=!1,$=[],G=null,U=0,u=!1,H=[],W=[],q=!1,O=[],x=!1,z=[],j=0,V=!0;for(let p=0;p<Q.length;p++){let _=Q[p];if(q){if(_.match(F.diffEnd)){try{let K=JSON.parse(O.join(`
2
- `));Z.push({type:"diff",content:"",diffData:{patch:K.patch,startLine:K.startLine,matchLine:K.matchLine}})}catch(K){Z.push({type:"text",content:O.join(`
3
- `)})}q=!1,O=[],V=!1;continue}O.push(_);continue}if(_.match(F.diffStart)){q=!0,O=[],V=!1;continue}if(Y){let K=_.match(F.codeBlock),P=_.trim()==="```";if(K&&K[1])U++,$.push(_);else if(P)if(U>0)U--,$.push(_);else{let Z0=$.join(`
4
- `);Z.push({type:"code",content:Z0,language:G||void 0}),Y=!1,$=[],G=null,U=0,V=!1}else $.push(_);continue}let r=_.match(F.codeBlock);if(r){Y=!0,G=r[1]||null,U=0,V=!1;continue}let E=_.match(F.table),Y0=_.match(F.tableSeparator);if(E&&!u){if(p+1<Q.length){if(Q[p+1].match(F.tableSeparator)){u=!0,H=E[1].split("|").map((P)=>P.trim()).filter((P)=>P.length>0),W=[],V=!1;continue}}}if(u&&Y0)continue;if(u&&E){let K=E[1].split("|").map((P)=>P.trim()).filter((P)=>P.length>0);while(K.length<H.length)K.push("");if(K.length>H.length)K.length=H.length;W.push(K);continue}if(u&&!E){if(H.length>0&&W.length>0)Z.push({type:"table",content:"",tableData:{headers:H,rows:W}});u=!1,H=[],W=[]}let N=_.match(F.blockquote);if(N){let K=N[1].length,P=N[2]||"";if(x&&K===j)z.push(P);else{if(x)Z.push({type:"blockquote",content:z.join(`
5
- `),blockquoteLevel:j,blockquoteLines:[...z]});x=!0,j=K,z=[P]}V=!1;continue}if(x)Z.push({type:"blockquote",content:z.join(`
6
- `),blockquoteLevel:j,blockquoteLines:[...z]}),x=!1,z=[],j=0;let y=_.match(F.heading);if(y){Z.push({type:"heading",content:y[2],level:y[1].length}),V=!1;continue}let L=_.match(F.ulItem);if(L){Z.push({type:"list",content:L[3],listType:"ul",marker:L[2],indentation:L[1].length}),V=!1;continue}let R=_.match(F.olItem);if(R){Z.push({type:"list",content:R[3],listType:"ol",marker:R[2],indentation:R[1].length}),V=!1;continue}if(_.match(F.hr)){Z.push({type:"hr",content:""}),V=!1;continue}if(_.trim().length===0){if(!V)Z.push({type:"empty",content:""}),V=!0;continue}let d=_.match(F.commandMessage);if(d){Z.push({type:"command-message",content:d[1]}),V=!1;continue}Z.push({type:"text",content:_}),V=!1}if(Y){let p=$.join(`
7
- `);Z.push({type:"code",content:p,language:G||void 0})}if(u&&H.length>0&&W.length>0)Z.push({type:"table",content:"",tableData:{headers:H,rows:W}});if(x&&z.length>0)Z.push({type:"blockquote",content:z.join(`
8
- `),blockquoteLevel:j,blockquoteLines:[...z]});while(Z.length>0&&Z[Z.length-1].type==="empty")Z.pop();return Z}var D=new Map;function v0(){return{inCodeBlock:!1,codeBlockContent:[],codeBlockLang:null,codeBlockDepth:0,inTable:!1,tableHeaders:[],tableRows:[],inDiff:!1,diffContent:[],inBlockquote:!1,blockquoteLines:[],blockquoteLevel:0,lastLineEmpty:!0,pendingTableHeader:null}}function D0(X){let Z=D.get(X);if(Z)return Z;let Q={state:v0(),blocks:[],pendingLine:"",finalized:!1};return D.set(X,Q),Q}function n(X){return X.endsWith("\r")?X.slice(0,-1):X}function a(X,Z){if(X.tableHeaders.length>0&&X.tableRows.length>0)Z.push({type:"table",content:"",tableData:{headers:X.tableHeaders,rows:X.tableRows}});X.inTable=!1,X.tableHeaders=[],X.tableRows=[]}function M(X,Z){if(X.blockquoteLines.length>0)Z.push({type:"blockquote",content:X.blockquoteLines.join(`
9
- `),blockquoteLevel:X.blockquoteLevel,blockquoteLines:[...X.blockquoteLines]});X.inBlockquote=!1,X.blockquoteLines=[],X.blockquoteLevel=0}function s(X,Z){let Q=X.codeBlockContent.join(`
10
- `);Z.push({type:"code",content:Q,language:X.codeBlockLang||void 0}),X.inCodeBlock=!1,X.codeBlockContent=[],X.codeBlockLang=null,X.codeBlockDepth=0,X.lastLineEmpty=!1}function k(X,Z,Q=!0){let{state:Y,blocks:$}=Z;if(Y.pendingTableHeader!==null){if(X.match(F.tableSeparator)){Y.inTable=!0,Y.tableHeaders=Y.pendingTableHeader.slice(1,-1).split("|").map((j)=>j.trim()).filter((j)=>j.length>0),Y.tableRows=[],Y.pendingTableHeader=null,Y.lastLineEmpty=!1;return}$.push({type:"text",content:Y.pendingTableHeader}),Y.pendingTableHeader=null,Y.lastLineEmpty=!1}if(Y.inDiff){if(X.match(F.diffEnd)){try{let j=JSON.parse(Y.diffContent.join(`
11
- `));$.push({type:"diff",content:"",diffData:{patch:j.patch,startLine:j.startLine,matchLine:j.matchLine}})}catch(j){$.push({type:"text",content:Y.diffContent.join(`
12
- `)})}Y.inDiff=!1,Y.diffContent=[],Y.lastLineEmpty=!1;return}Y.diffContent.push(X);return}if(X.match(F.diffStart)){Y.inDiff=!0,Y.diffContent=[],Y.lastLineEmpty=!1;return}if(Y.inCodeBlock){let j=X.match(F.codeBlock),V=X.trim()==="```";if(j&&j[1])Y.codeBlockDepth++,Y.codeBlockContent.push(X);else if(V)if(Y.codeBlockDepth>0)Y.codeBlockDepth--,Y.codeBlockContent.push(X);else s(Y,$);else Y.codeBlockContent.push(X);return}let G=X.match(F.codeBlock);if(G){Y.inCodeBlock=!0,Y.codeBlockLang=G[1]||null,Y.codeBlockDepth=0,Y.lastLineEmpty=!1;return}let U=X.match(F.table),u=X.match(F.tableSeparator);if(U&&!Y.inTable){Y.pendingTableHeader=X;return}if(Y.inTable&&u)return;if(Y.inTable&&U){let j=U[1].split("|").map((V)=>V.trim()).filter((V)=>V.length>0);while(j.length<Y.tableHeaders.length)j.push("");if(j.length>Y.tableHeaders.length)j.length=Y.tableHeaders.length;Y.tableRows.push(j);return}if(Y.inTable&&!U){if(a(Y,$),Q){k(X,Z,!1);return}}let H=X.match(F.blockquote);if(H){let j=H[1].length,V=H[2]||"";if(Y.inBlockquote&&j===Y.blockquoteLevel)Y.blockquoteLines.push(V);else{if(Y.inBlockquote)M(Y,$);Y.inBlockquote=!0,Y.blockquoteLevel=j,Y.blockquoteLines=[V]}Y.lastLineEmpty=!1;return}if(Y.inBlockquote)M(Y,$);let W=X.match(F.heading);if(W){$.push({type:"heading",content:W[2],level:W[1].length}),Y.lastLineEmpty=!1;return}let q=X.match(F.ulItem);if(q){$.push({type:"list",content:q[3],listType:"ul",marker:q[2],indentation:q[1].length}),Y.lastLineEmpty=!1;return}let O=X.match(F.olItem);if(O){$.push({type:"list",content:O[3],listType:"ol",marker:O[2],indentation:O[1].length}),Y.lastLineEmpty=!1;return}if(X.match(F.hr)){$.push({type:"hr",content:""}),Y.lastLineEmpty=!1;return}if(X.trim().length===0){if(!Y.lastLineEmpty)$.push({type:"empty",content:""}),Y.lastLineEmpty=!0;return}let z=X.match(F.commandMessage);if(z){$.push({type:"command-message",content:z[1]}),Y.lastLineEmpty=!1;return}$.push({type:"text",content:X}),Y.lastLineEmpty=!1}function c0(X,Z){if(!X||!Z)return;let Q=D0(X);if(Q.finalized)return;let Y=Q.pendingLine+Z,$=Y.split(`
13
- `),G=Y.endsWith(`
14
- `),U=G?$:$.slice(0,-1);Q.pendingLine=G?"":$[$.length-1]??"";for(let u of U)k(n(u),Q)}function i0(X){let Z=D.get(X);if(!Z||Z.finalized)return;if(Z.pendingLine)k(n(Z.pendingLine),Z),Z.pendingLine="";if(Z.state.pendingTableHeader!==null)Z.blocks.push({type:"text",content:Z.state.pendingTableHeader}),Z.state.pendingTableHeader=null;if(Z.state.inCodeBlock)s(Z.state,Z.blocks);if(Z.state.inTable)a(Z.state,Z.blocks);if(Z.state.inBlockquote)M(Z.state,Z.blocks);if(Z.state.inDiff)Z.blocks.push({type:"text",content:Z.state.diffContent.join(`
15
- `)}),Z.state.inDiff=!1,Z.state.diffContent=[];while(Z.blocks.length>0&&Z.blocks[Z.blocks.length-1].type==="empty")Z.blocks.pop();Z.finalized=!0}function o0(X){let Z=D.get(X);if(!Z||!Z.finalized)return null;return Z.blocks}function l0(X){let Z=D.get(X);if(!Z)return null;return Z.blocks}function B0(X){let Z=D.get(X);if(!Z)return null;let Q=[],Y=Z.state;if(Y.inDiff)Q.push("<<<DIFF>>>"),Q.push(...Y.diffContent);else if(Y.inCodeBlock){let $=Y.codeBlockLang?`\`\`\`${Y.codeBlockLang}`:"```";Q.push($),Q.push(...Y.codeBlockContent)}else if(Y.inTable){if(Y.tableHeaders.length>0){Q.push(`| ${Y.tableHeaders.join(" | ")} |`),Q.push(`| ${Y.tableHeaders.map(()=>"---").join(" | ")} |`);for(let $ of Y.tableRows)Q.push(`| ${$.join(" | ")} |`)}}else if(Y.inBlockquote){let $=">".repeat(Y.blockquoteLevel)+" ";for(let G of Y.blockquoteLines)Q.push($+G)}else if(Y.pendingTableHeader)Q.push(Y.pendingTableHeader);if(Z.pendingLine)Q.push(Z.pendingLine);return Q.length>0?Q:null}function n0(X){let Z=D.get(X);if(!Z)return null;let Q="text";if(Z.state.inDiff)Q="diff";else if(Z.state.inCodeBlock)Q="code";else if(Z.state.inTable||Z.state.pendingTableHeader)Q="table";let Y=B0(X);if(!Y||Y.length===0)return null;return{lines:Y,mode:Q}}function a0(X){D.delete(X)}function I(){D.clear()}var t=2000,A=[];function A0(){let X=A;return A=[],X}var Q0={inputTokens:0,outputTokens:0,totalTokens:0,maxContextTokens:200000,totalInputTokens:0,totalOutputTokens:0,cacheReadTokens:0,cacheWriteTokens:0,turnCount:0,estimatedCostUsd:0},e={sessionId:E0(),messages:[],restoredContextMessages:null,restoredVisibleMessageCount:0,isCompacting:!1,currentCommand:null,error:null,isActive:!0,tokenUsage:{...Q0},currentThinkingContent:null,thinkingExpanded:!1,clearCount:0,historyExpanded:!1,expandedMessageCount:100,currentStreamingMessageId:null,currentStreamingChunks:[],currentStreamingLines:[],currentStreamingTail:"",currentStreamingLineCount:0,currentStreamingVersion:0,finalizingStreamingMessageId:null},m=(X,Z)=>({...e,actions:{addMessage:(Q)=>{X((Y)=>({session:{...Y.session,messages:[...Y.session.messages,Q],error:null}}))},addUserMessage:(Q)=>{let Y={id:`user-${Date.now()}-${Math.random()}`,role:"user",content:Q,timestamp:Date.now()};Z().session.actions.addMessage(Y)},addAssistantMessage:(Q,Y)=>{let $={id:`assistant-${Date.now()}-${Math.random()}`,role:"assistant",content:Q,timestamp:Date.now(),thinkingContent:Y};Z().session.actions.addMessage($)},addAssistantMessageAndClearThinking:(Q)=>{let Y=Z().session.currentThinkingContent,$={id:`assistant-${Date.now()}-${Math.random()}`,role:"assistant",content:Q,timestamp:Date.now(),thinkingContent:Y||void 0};X((G)=>({session:{...G.session,messages:[...G.session.messages,$],currentThinkingContent:null,error:null}}))},addToolMessage:(Q,Y)=>{let $={id:`tool-${Date.now()}-${Math.random()}`,role:"tool",content:Q,timestamp:Date.now(),metadata:Y};Z().session.actions.addMessage($)},setCompacting:(Q)=>{X((Y)=>({session:{...Y.session,isCompacting:Q}}))},setCommand:(Q)=>{X((Y)=>({session:{...Y.session,currentCommand:Q}}))},setError:(Q)=>{X((Y)=>({session:{...Y.session,error:Q}}))},clearMessages:()=>{I(),X((Q)=>({session:{...Q.session,messages:[],restoredContextMessages:null,restoredVisibleMessageCount:0,error:null,clearCount:Q.session.clearCount+1}}))},resetSession:()=>{I(),X((Q)=>({session:{...Q.session,...e,sessionId:Q.session.sessionId,isActive:!0}}))},restoreSession:(Q,Y,$)=>{I(),X((G)=>({session:{...G.session,sessionId:Q,messages:Y,restoredContextMessages:$??null,restoredVisibleMessageCount:$?Y.length:0,error:null,isActive:!0}}))},updateTokenUsage:(Q)=>{X((Y)=>{let $=Y.session.tokenUsage,G=(Q.inputTokens??0)-(Q.inputTokens!==void 0?$.inputTokens:0),U=(Q.outputTokens??0)-(Q.outputTokens!==void 0?$.outputTokens:0),u=$.totalInputTokens+Math.max(0,G),H=$.totalOutputTokens+Math.max(0,U),W=$.cacheReadTokens+(Q.cacheReadTokens??0),q=$.cacheWriteTokens+(Q.cacheWriteTokens??0),O=Y.config?.config,z=O?.models?.find((V)=>V.id===O.currentModelId)?.model??"",j=l(z,u,H,W,q);return{session:{...Y.session,tokenUsage:{...$,...Q,totalInputTokens:u,totalOutputTokens:H,cacheReadTokens:W,cacheWriteTokens:q,estimatedCostUsd:j}}}})},resetTokenUsage:()=>{X((Q)=>({session:{...Q.session,tokenUsage:{...Q0}}}))},setCurrentThinkingContent:(Q)=>{if(Z().session.currentThinkingContent===Q)return;X((Y)=>({session:{...Y.session,currentThinkingContent:Q}}))},appendThinkingContent:(Q)=>{X((Y)=>({session:{...Y.session,currentThinkingContent:(Y.session.currentThinkingContent||"")+Q}}))},setThinkingExpanded:(Q)=>{X((Y)=>({session:{...Y.session,thinkingExpanded:Q}}))},toggleThinkingExpanded:()=>{X((Q)=>({session:{...Q.session,thinkingExpanded:!Q.session.thinkingExpanded}}))},setHistoryExpanded:(Q)=>{X((Y)=>({session:{...Y.session,historyExpanded:Q}}))},toggleHistoryExpanded:()=>{X((Q)=>({session:{...Q.session,historyExpanded:!Q.session.historyExpanded}}))},setExpandedMessageCount:(Q)=>{X((Y)=>({session:{...Y.session,expandedMessageCount:Q}}))},incrementClearCount:()=>{X((Q)=>({session:{...Q.session,clearCount:Q.session.clearCount+1}}))},startStreamingAssistantMessage:()=>{let Q=`assistant-${Date.now()}-${Math.random()}`,Y={id:Q,role:"assistant",content:"",timestamp:Date.now()};return A=[],X(($)=>({session:{...$.session,messages:[...$.session.messages,Y],currentStreamingMessageId:Q,currentStreamingChunks:[],currentStreamingLines:[],currentStreamingTail:"",currentStreamingLineCount:0,currentStreamingVersion:0,error:null}})),Q},appendAssistantContent:(Q)=>{let Y=Z().session.currentStreamingMessageId,$=Y??`assistant-${Date.now()}-${Math.random()}`;return A.push(Q),X((G)=>{let U=(p)=>p.endsWith("\r")?p.slice(0,-1):p,u=Y?G.session.currentStreamingLines:[],H=Y?G.session.currentStreamingTail:"",W=Y?G.session.currentStreamingLineCount:0,q=Y?G.session.currentStreamingVersion:0,x=(H+Q).split(`
16
- `),z=x.slice(0,-1).map(U),j=U(x[x.length-1]??""),V=u;if(z.length>0){if(V=[...u,...z],V.length>t){let p=V.length-t;V=V.slice(p)}}return{session:{...G.session,currentStreamingMessageId:$,currentStreamingLines:V,currentStreamingTail:j,currentStreamingLineCount:W+z.length,currentStreamingVersion:q+1,error:null}}}),$},finalizeStreamingMessage:(Q,Y)=>{let $=A0();X((G)=>{let U=G.session.currentStreamingMessageId,H=$.join("")+(Q||""),W=(G.session.currentThinkingContent||"")+(Y||"");if(H.length>0){let q={id:U||`assistant-${Date.now()}-${Math.random()}`,role:"assistant",content:H,timestamp:Date.now(),thinkingContent:W||void 0};return{session:{...G.session,messages:[...G.session.messages,q],currentStreamingMessageId:null,currentStreamingChunks:[],currentStreamingLines:[],currentStreamingTail:"",currentStreamingLineCount:0,currentStreamingVersion:0,currentThinkingContent:null,finalizingStreamingMessageId:q.id}}}return{session:{...G.session,currentStreamingMessageId:null,currentStreamingChunks:[],currentStreamingLines:[],currentStreamingTail:"",currentStreamingLineCount:0,currentStreamingVersion:0,currentThinkingContent:null,finalizingStreamingMessageId:null}}})},clearFinalizingStreamingMessageId:()=>{X((Q)=>({session:{...Q.session,finalizingStreamingMessageId:null}}))},discardStreamingMessage:()=>{A=[],X((Q)=>({session:{...Q.session,currentStreamingMessageId:null,currentStreamingChunks:[],currentStreamingLines:[],currentStreamingTail:"",currentStreamingLineCount:0,currentStreamingVersion:0,finalizingStreamingMessageId:null}}))}}});var y0=N0()(R0(I0((...X)=>({session:m(...X),app:S(...X),config:f(...X),focus:b(...X),command:C(...X)})),{name:"BladeStore",enabled:!0})),J=()=>y0.getState(),u1=()=>J().session.actions,W1=()=>J().app.actions,K1=()=>J().session.messages,v=()=>J().config.config,B=null;async function q1(){if(v()!==null)return;if(B)return B;return B=(async()=>{try{let Q=await X0.getInstance().initialize();J().config.actions.setConfig(Q)}catch(Z){throw B=null,Error(`[FAIL] Store 未初始化且无法自动初始化
17
-
18
- `+`原因: ${Z instanceof Error?Z.message:"未知错误"}
19
-
20
- `+`请确保:
21
- `+`1. 配置文件格式正确 (~/.blade/config.json)
22
- `+`2. 运行 blade 进行首次配置
23
- `+"3. 配置文件权限正确")}finally{B=null}})(),B}var w1=()=>J().config.config?.models??[],O1=()=>{let X=v();if(!X)return;let Z=X.currentModelId;return X.models.find((Y)=>Y.id===Z)??X.models[0]},p1=(X)=>{let Z=v();if(!Z)return;return Z.models.find((Q)=>Q.id===X)},x1=()=>J().config.config?.mcpServers??{},P1=()=>J().app.thinkingModeEnabled,v1=()=>({setPermissionMode:async(X)=>{J().config.actions.updateConfig({permissionMode:X})},setTheme:async(X,Z={})=>{try{o.setTheme(X)}catch{return}J().config.actions.updateConfig({theme:X}),await w().save({theme:X},{scope:"global",...Z})},setLanguage:async(X,Z={})=>{J().config.actions.updateConfig({language:X}),await w().save({language:X},{scope:"global",...Z})},setDebug:async(X,Z={})=>{J().config.actions.updateConfig({debug:X}),await w().save({debug:X},{scope:"global",...Z})},setTemperature:async(X,Z={})=>{J().config.actions.updateConfig({temperature:X}),await w().save({temperature:X},{scope:"global",...Z})},updateConfig:async(X,Z={})=>{let Q=v();if(!Q)throw Error("Config not initialized");let Y={...Q};J().config.actions.updateConfig(X);try{await w().save(X,Z)}catch($){throw J().config.actions.setConfig(Y),$}},flush:async()=>{await w().flush()},appendPermissionAllowRule:async(X,Z={})=>{let Q=v();if(!Q)throw Error("Config not initialized");let Y=Q.permissions?.allow||[];if(!Y.includes(X)){let $=[...Y,X];J().config.actions.updateConfig({permissions:{...Q.permissions,allow:$}})}await w().appendPermissionRule(X,Z)},appendLocalPermissionAllowRule:async(X,Z={})=>{let Q=v();if(!Q)throw Error("Config not initialized");let Y=Q.permissions?.allow||[];if(!Y.includes(X)){let $=[...Y,X];J().config.actions.updateConfig({permissions:{...Q.permissions,allow:$}})}await w().appendLocalPermissionRule(X,Z)},setCurrentModel:async(X,Z={})=>{let Q=v();if(!Q)throw Error("Config not initialized");if(!Q.models.find(($)=>$.id===X))throw Error(`Model not found: ${X}`);J().config.actions.updateConfig({currentModelId:X}),await w().save({currentModelId:X},{scope:"global",...Z})},addModel:async(X,Z={})=>{let Q=v();if(!Q)throw Error("Config not initialized");let Y="id"in X?X:{id:L0(),...X},G={models:[...Q.models,Y]};if(Q.models.length===0)G.currentModelId=Y.id;return J().config.actions.updateConfig(G),await w().save(G,{scope:"global",...Z}),Y},updateModel:async(X,Z,Q={})=>{let Y=v();if(!Y)throw Error("Config not initialized");let $=Y.models.findIndex((U)=>U.id===X);if($===-1)throw Error(`Model not found: ${X}`);let G=[...Y.models];G[$]={...G[$],...Z},J().config.actions.updateConfig({models:G}),await w().save({models:G},{scope:"global",...Q})},removeModel:async(X,Z={})=>{let Q=v();if(!Q)throw Error("Config not initialized");if(Q.models.length===1)throw Error("Cannot remove the only model");let Y=Q.models.filter((G)=>G.id!==X),$={models:Y};if(Q.currentModelId===X)$.currentModelId=Y[0].id;J().config.actions.updateConfig($),await w().save($,{scope:"global",...Z})},addMcpServer:async(X,Z,Q={})=>{let Y=v();if(!Y)throw Error("Config not initialized");let G={...Y.mcpServers??{},[X]:Z};J().config.actions.updateConfig({mcpServers:G}),await w().save({mcpServers:G},{scope:"project",...Q})},removeMcpServer:async(X,Z={})=>{let Q=v();if(!Q)throw Error("Config not initialized");let $={...Q.mcpServers??{}};delete $[X],J().config.actions.updateConfig({mcpServers:$}),await w().save({mcpServers:$},{scope:"project",...Z})}});
24
- export{g as ca,o as da,F as ea,r0 as fa,c0 as ga,i0 as ha,o0 as ia,l0 as ja,n0 as ka,a0 as la,y0 as ma,J as na,u1 as oa,W1 as pa,K1 as qa,v as ra,q1 as sa,w1 as ta,O1 as ua,p1 as va,x1 as wa,P1 as xa,v1 as ya};