@muyichengshayu/promptx 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,216 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/CodexSessionManagerDialog-c35LrKjV.js","assets/index-D9ui_gwj.js","assets/index-DDNrspNi.css","assets/TaskDiffReviewDialog-BYcla0q4.js","assets/WorkbenchSettingsDialog-C0uQRStP.js"])))=>i.map(i=>d[i]);
2
+ import{h as Iu,w as me,o as nt,a as A,c as we,b as R,d as g,n as pe,e as ue,u as v,t as te,f as de,g as He,T as Ut,i as ge,j as Ct,r as Rt,k as wt,l as su,F as ot,m as ft,p as O,q as ae,s as zt,v as Vn,x as Rr,y as Pu,_ as Mu,z as mu,A as Lr,B as zr,C as qr,D as yt,E as kt,G as un,H as nn}from"./index-D9ui_gwj.js";/**
3
+ * @license lucide-vue-next v0.577.0 - ISC
4
+ *
5
+ * This source code is licensed under the ISC license.
6
+ * See the LICENSE file in the root directory of this source tree.
7
+ */const Or=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};/**
8
+ * @license lucide-vue-next v0.577.0 - ISC
9
+ *
10
+ * This source code is licensed under the ISC license.
11
+ * See the LICENSE file in the root directory of this source tree.
12
+ */const rn=e=>e==="";/**
13
+ * @license lucide-vue-next v0.577.0 - ISC
14
+ *
15
+ * This source code is licensed under the ISC license.
16
+ * See the LICENSE file in the root directory of this source tree.
17
+ */const Nr=(...e)=>e.filter((t,u,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===u).join(" ").trim();/**
18
+ * @license lucide-vue-next v0.577.0 - ISC
19
+ *
20
+ * This source code is licensed under the ISC license.
21
+ * See the LICENSE file in the root directory of this source tree.
22
+ */const on=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
23
+ * @license lucide-vue-next v0.577.0 - ISC
24
+ *
25
+ * This source code is licensed under the ISC license.
26
+ * See the LICENSE file in the root directory of this source tree.
27
+ */const jr=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,u,r)=>r?r.toUpperCase():u.toLowerCase());/**
28
+ * @license lucide-vue-next v0.577.0 - ISC
29
+ *
30
+ * This source code is licensed under the ISC license.
31
+ * See the LICENSE file in the root directory of this source tree.
32
+ */const Vr=e=>{const t=jr(e);return t.charAt(0).toUpperCase()+t.slice(1)};/**
33
+ * @license lucide-vue-next v0.577.0 - ISC
34
+ *
35
+ * This source code is licensed under the ISC license.
36
+ * See the LICENSE file in the root directory of this source tree.
37
+ */var Bt={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};/**
38
+ * @license lucide-vue-next v0.577.0 - ISC
39
+ *
40
+ * This source code is licensed under the ISC license.
41
+ * See the LICENSE file in the root directory of this source tree.
42
+ */const Hr=({name:e,iconNode:t,absoluteStrokeWidth:u,"absolute-stroke-width":r,strokeWidth:n,"stroke-width":o,size:i=Bt.width,color:s=Bt.stroke,...a},{slots:l})=>Iu("svg",{...Bt,...a,width:i,height:i,stroke:s,"stroke-width":rn(u)||rn(r)||u===!0||r===!0?Number(n||o||Bt["stroke-width"])*24/Number(i):n||o||Bt["stroke-width"],class:Nr("lucide",a.class,...e?[`lucide-${on(Vr(e))}-icon`,`lucide-${on(e)}`]:["lucide-icon"]),...!l.default&&!Or(a)&&{"aria-hidden":"true"}},[...t.map(f=>Iu(...f)),...l.default?[l.default()]:[]]);/**
43
+ * @license lucide-vue-next v0.577.0 - ISC
44
+ *
45
+ * This source code is licensed under the ISC license.
46
+ * See the LICENSE file in the root directory of this source tree.
47
+ */const be=(e,t)=>(u,{slots:r,attrs:n})=>Iu(Hr,{...n,...u,iconNode:t,name:e},r);/**
48
+ * @license lucide-vue-next v0.577.0 - ISC
49
+ *
50
+ * This source code is licensed under the ISC license.
51
+ * See the LICENSE file in the root directory of this source tree.
52
+ */const Ur=be("arrow-down",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);/**
53
+ * @license lucide-vue-next v0.577.0 - ISC
54
+ *
55
+ * This source code is licensed under the ISC license.
56
+ * See the LICENSE file in the root directory of this source tree.
57
+ */const Wr=be("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/**
58
+ * @license lucide-vue-next v0.577.0 - ISC
59
+ *
60
+ * This source code is licensed under the ISC license.
61
+ * See the LICENSE file in the root directory of this source tree.
62
+ */const Zr=be("blocks",[["path",{d:"M10 22V7a1 1 0 0 0-1-1H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-5a1 1 0 0 0-1-1H2",key:"1ah6g2"}],["rect",{x:"14",y:"2",width:"8",height:"8",rx:"1",key:"88lufb"}]]);/**
63
+ * @license lucide-vue-next v0.577.0 - ISC
64
+ *
65
+ * This source code is licensed under the ISC license.
66
+ * See the LICENSE file in the root directory of this source tree.
67
+ */const Kr=be("bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);/**
68
+ * @license lucide-vue-next v0.577.0 - ISC
69
+ *
70
+ * This source code is licensed under the ISC license.
71
+ * See the LICENSE file in the root directory of this source tree.
72
+ */const Xr=be("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
73
+ * @license lucide-vue-next v0.577.0 - ISC
74
+ *
75
+ * This source code is licensed under the ISC license.
76
+ * See the LICENSE file in the root directory of this source tree.
77
+ */const qt=be("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
78
+ * @license lucide-vue-next v0.577.0 - ISC
79
+ *
80
+ * This source code is licensed under the ISC license.
81
+ * See the LICENSE file in the root directory of this source tree.
82
+ */const Gr=be("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
83
+ * @license lucide-vue-next v0.577.0 - ISC
84
+ *
85
+ * This source code is licensed under the ISC license.
86
+ * See the LICENSE file in the root directory of this source tree.
87
+ */const bu=be("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
88
+ * @license lucide-vue-next v0.577.0 - ISC
89
+ *
90
+ * This source code is licensed under the ISC license.
91
+ * See the LICENSE file in the root directory of this source tree.
92
+ */const Hn=be("circle-alert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/**
93
+ * @license lucide-vue-next v0.577.0 - ISC
94
+ *
95
+ * This source code is licensed under the ISC license.
96
+ * See the LICENSE file in the root directory of this source tree.
97
+ */const Jr=be("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
98
+ * @license lucide-vue-next v0.577.0 - ISC
99
+ *
100
+ * This source code is licensed under the ISC license.
101
+ * See the LICENSE file in the root directory of this source tree.
102
+ */const Yr=be("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"}]]);/**
103
+ * @license lucide-vue-next v0.577.0 - ISC
104
+ *
105
+ * This source code is licensed under the ISC license.
106
+ * See the LICENSE file in the root directory of this source tree.
107
+ */const sn=be("file-diff",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M9 10h6",key:"9gxzsh"}],["path",{d:"M12 13V7",key:"h0r20n"}],["path",{d:"M9 17h6",key:"r8uit2"}]]);/**
108
+ * @license lucide-vue-next v0.577.0 - ISC
109
+ *
110
+ * This source code is licensed under the ISC license.
111
+ * See the LICENSE file in the root directory of this source tree.
112
+ */const Qr=be("file-text",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/**
113
+ * @license lucide-vue-next v0.577.0 - ISC
114
+ *
115
+ * This source code is licensed under the ISC license.
116
+ * See the LICENSE file in the root directory of this source tree.
117
+ */const xu=be("file",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]]);/**
118
+ * @license lucide-vue-next v0.577.0 - ISC
119
+ *
120
+ * This source code is licensed under the ISC license.
121
+ * See the LICENSE file in the root directory of this source tree.
122
+ */const Gt=be("folder-open",[["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"}]]);/**
123
+ * @license lucide-vue-next v0.577.0 - ISC
124
+ *
125
+ * This source code is licensed under the ISC license.
126
+ * See the LICENSE file in the root directory of this source tree.
127
+ */const eo=be("image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]);/**
128
+ * @license lucide-vue-next v0.577.0 - ISC
129
+ *
130
+ * This source code is licensed under the ISC license.
131
+ * See the LICENSE file in the root directory of this source tree.
132
+ */const Tt=be("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
133
+ * @license lucide-vue-next v0.577.0 - ISC
134
+ *
135
+ * This source code is licensed under the ISC license.
136
+ * See the LICENSE file in the root directory of this source tree.
137
+ */const Un=be("pencil-line",[["path",{d:"M13 21h8",key:"1jsn5i"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}],["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]]);/**
138
+ * @license lucide-vue-next v0.577.0 - ISC
139
+ *
140
+ * This source code is licensed under the ISC license.
141
+ * See the LICENSE file in the root directory of this source tree.
142
+ */const to=be("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
143
+ * @license lucide-vue-next v0.577.0 - ISC
144
+ *
145
+ * This source code is licensed under the ISC license.
146
+ * See the LICENSE file in the root directory of this source tree.
147
+ */const uo=be("scan-text",[["path",{d:"M3 7V5a2 2 0 0 1 2-2h2",key:"aa7l1z"}],["path",{d:"M17 3h2a2 2 0 0 1 2 2v2",key:"4qcy5o"}],["path",{d:"M21 17v2a2 2 0 0 1-2 2h-2",key:"6vwrx8"}],["path",{d:"M7 21H5a2 2 0 0 1-2-2v-2",key:"ioqczr"}],["path",{d:"M7 8h8",key:"1jbsf9"}],["path",{d:"M7 12h10",key:"b7w52i"}],["path",{d:"M7 16h6",key:"1vyc9m"}]]);/**
148
+ * @license lucide-vue-next v0.577.0 - ISC
149
+ *
150
+ * This source code is licensed under the ISC license.
151
+ * See the LICENSE file in the root directory of this source tree.
152
+ */const no=be("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);/**
153
+ * @license lucide-vue-next v0.577.0 - ISC
154
+ *
155
+ * This source code is licensed under the ISC license.
156
+ * See the LICENSE file in the root directory of this source tree.
157
+ */const ro=be("send-horizontal",[["path",{d:"M3.714 3.048a.498.498 0 0 0-.683.627l2.843 7.627a2 2 0 0 1 0 1.396l-2.842 7.627a.498.498 0 0 0 .682.627l18-8.5a.5.5 0 0 0 0-.904z",key:"117uat"}],["path",{d:"M6 12h16",key:"s4cdu5"}]]);/**
158
+ * @license lucide-vue-next v0.577.0 - ISC
159
+ *
160
+ * This source code is licensed under the ISC license.
161
+ * See the LICENSE file in the root directory of this source tree.
162
+ */const oo=be("settings-2",[["path",{d:"M14 17H5",key:"gfn3mx"}],["path",{d:"M19 7h-9",key:"6i9tg"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]]);/**
163
+ * @license lucide-vue-next v0.577.0 - ISC
164
+ *
165
+ * This source code is licensed under the ISC license.
166
+ * See the LICENSE file in the root directory of this source tree.
167
+ */const Wn=be("square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);/**
168
+ * @license lucide-vue-next v0.577.0 - ISC
169
+ *
170
+ * This source code is licensed under the ISC license.
171
+ * See the LICENSE file in the root directory of this source tree.
172
+ */const tu=be("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]);/**
173
+ * @license lucide-vue-next v0.577.0 - ISC
174
+ *
175
+ * This source code is licensed under the ISC license.
176
+ * See the LICENSE file in the root directory of this source tree.
177
+ */const io=be("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
178
+ * @license lucide-vue-next v0.577.0 - ISC
179
+ *
180
+ * This source code is licensed under the ISC license.
181
+ * See the LICENSE file in the root directory of this source tree.
182
+ */const so=be("upload",[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]]);/**
183
+ * @license lucide-vue-next v0.577.0 - ISC
184
+ *
185
+ * This source code is licensed under the ISC license.
186
+ * See the LICENSE file in the root directory of this source tree.
187
+ */const ao=be("wand-sparkles",[["path",{d:"m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72",key:"ul74o6"}],["path",{d:"m14 7 3 3",key:"1r5n42"}],["path",{d:"M5 6v4",key:"ilb8ba"}],["path",{d:"M19 14v4",key:"blhpug"}],["path",{d:"M10 2v2",key:"7u0qdc"}],["path",{d:"M7 8H3",key:"zfb6yr"}],["path",{d:"M21 16h-4",key:"1cnmox"}],["path",{d:"M11 3H9",key:"1obp7u"}]]);/**
188
+ * @license lucide-vue-next v0.577.0 - ISC
189
+ *
190
+ * This source code is licensed under the ISC license.
191
+ * See the LICENSE file in the root directory of this source tree.
192
+ */const Zn=be("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),lo={class:"panel w-full max-w-md overflow-hidden"},co={class:"theme-divider flex items-start justify-between gap-3 border-b px-5 py-4"},fo={class:"flex items-start gap-3"},po={class:"theme-heading text-base font-semibold"},ho={key:0,class:"theme-muted-text mt-1 text-sm leading-6"},mo=["disabled"],bo={class:"flex justify-end gap-2 px-5 py-4"},xo=["disabled"],go=["disabled"],an={__name:"ConfirmDialog",props:{open:{type:Boolean,default:!1},title:{type:String,default:"确认操作"},description:{type:String,default:""},confirmText:{type:String,default:"确认"},cancelText:{type:String,default:"取消"},loading:{type:Boolean,default:!1},danger:{type:Boolean,default:!1}},emits:["cancel","confirm"],setup(e,{emit:t}){const u=e,r=t;function n(o){!u.open||u.loading||o.key==="Escape"&&r("cancel")}return me(()=>u.open,o=>{if(document.body.classList.toggle("overflow-hidden",o),o){window.addEventListener("keydown",n);return}window.removeEventListener("keydown",n)}),nt(()=>{document.body.classList.remove("overflow-hidden"),window.removeEventListener("keydown",n)}),(o,i)=>(A(),we(Ut,{to:"body"},[e.open?(A(),R("div",{key:0,class:"fixed inset-0 z-[70] flex items-center justify-center bg-black/45 px-4 backdrop-blur-sm",onClick:i[3]||(i[3]=He(s=>!e.loading&&r("cancel"),["self"]))},[g("section",lo,[g("div",co,[g("div",fo,[g("span",{class:pe(["inline-flex h-10 w-10 shrink-0 items-center justify-center rounded-sm border border-dashed",e.danger?"theme-status-danger":"theme-status-neutral"])},[ue(v(io),{class:"h-4 w-4"})],2),g("div",null,[g("h2",po,te(e.title),1),e.description?(A(),R("p",ho,te(e.description),1)):de("",!0)])]),g("button",{type:"button",class:"theme-icon-button h-8 w-8",disabled:e.loading,onClick:i[0]||(i[0]=s=>r("cancel"))},[ue(v(Zn),{class:"h-4 w-4"})],8,mo)]),g("div",bo,[g("button",{type:"button",class:"tool-button px-4 py-2 text-sm",disabled:e.loading,onClick:i[1]||(i[1]=s=>r("cancel"))},te(e.cancelText),9,xo),g("button",{type:"button",class:pe(["tool-button px-4 py-2 text-sm",e.danger?"border-[var(--theme-danger)] bg-[var(--theme-danger)] text-[var(--theme-textInverse)] hover:opacity-90":"tool-button-primary"]),disabled:e.loading,onClick:i[2]||(i[2]=s=>r("confirm"))},te(e.loading?"处理中...":e.confirmText),11,go)])])])):de("",!0)]))}},vo=["disabled","onKeydown"],yo={class:"min-w-0 flex-1"},ko={class:"theme-muted-text text-sm"},_o={class:"theme-muted-text flex shrink-0 items-center gap-2"},wo={class:"flex min-h-0 w-full flex-col"},So={class:"min-h-0 flex-1 space-y-2 overflow-y-auto p-2"},Co=["onClick"],Do={class:"theme-empty-state px-3 py-4 text-sm"},Eo={__name:"WorkbenchSelect",props:{modelValue:{type:[String,Number],default:""},options:{type:Array,default:()=>[]},loading:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},placeholder:{type:String,default:"请选择"},emptyText:{type:String,default:"暂无可选项"},getOptionValue:{type:Function,default:e=>(e==null?void 0:e.id)??(e==null?void 0:e.value)??""}},emits:["update:modelValue","refresh-intent"],setup(e,{emit:t}){const u=e,r=t,n=O(null),o=O(null),i=O(!1),s=O(!1),a=O({}),l=ae(()=>{const F=String(u.modelValue??"");return u.options.find($=>String(u.getOptionValue($)??"")===F)||null});function f(){u.disabled||(i.value||r("refresh-intent"),i.value=!0)}function d(){i.value=!1}function b(){if(i.value){d();return}f()}function x(F){r("update:modelValue",String(u.getOptionValue(F)??"").trim()),d()}function p(){if(!i.value||!n.value||typeof window>"u")return;const F=n.value.getBoundingClientRect(),$=window.innerWidth,M=window.innerHeight,B=8,q=8,H=160,G=360,Z=Math.max(0,M-F.bottom-q),U=Math.max(0,F.top-q);s.value=Z<260&&U>Z;const L=s.value?U-B:Z-B,z=Math.max(Math.min(G,Math.max(L,0)),Math.min(H,s.value?U:Z)),V=Math.min(F.width,$-q*2),X=Math.min(Math.max(q,F.left),Math.max(q,$-q-V));a.value={left:`${X}px`,top:s.value?`${F.top-B}px`:`${F.bottom+B}px`,width:`${V}px`,maxHeight:`${Math.max(z,120)}px`,transform:s.value?"translateY(-100%)":"none"}}function D(F){var $;!i.value||!n.value||n.value.contains(F.target)||($=o.value)!=null&&$.contains(F.target)||d()}function T(F){F.key==="Escape"&&d()}return me(()=>u.disabled,F=>{F&&d()}),me(i,async F=>{F&&(await ge(),p())}),Ct(()=>{document.addEventListener("pointerdown",D),document.addEventListener("keydown",T),window.addEventListener("resize",p),window.addEventListener("scroll",p,!0)}),nt(()=>{document.removeEventListener("pointerdown",D),document.removeEventListener("keydown",T),window.removeEventListener("resize",p),window.removeEventListener("scroll",p,!0)}),(F,$)=>(A(),R("div",{ref_key:"rootRef",ref:n,class:"relative min-w-0"},[g("button",{type:"button",class:pe(["flex w-full items-center gap-3 rounded-sm border border-[var(--theme-inputBorder)] bg-[var(--theme-inputBg)] px-3 py-2 text-left text-[var(--theme-textPrimary)] transition hover:border-[var(--theme-borderStrong)] focus:border-[var(--theme-borderStrong)] focus:outline-none focus:ring-2 focus:ring-[var(--theme-focusRing)]",e.disabled?"cursor-not-allowed opacity-60":""]),disabled:e.disabled,onClick:b,onKeydown:[wt(He(f,["prevent"]),["down"]),wt(He(b,["prevent"]),["enter"]),wt(He(b,["prevent"]),["space"])]},[g("div",yo,[Rt(F.$slots,"trigger",{selectedOption:l.value,open:i.value,loading:e.loading},()=>[g("div",ko,te(l.value?String(e.getOptionValue(l.value)):e.placeholder),1)])]),g("div",_o,[e.loading?(A(),we(v(Tt),{key:0,class:"h-4 w-4 animate-spin"})):de("",!0),ue(v(qt),{class:pe(["h-4 w-4 transition",i.value?"rotate-180":""])},null,8,["class"])])],42,vo),(A(),we(Ut,{to:"body"},[i.value?(A(),R("div",{key:0,ref_key:"panelRef",ref:o,class:"theme-popover fixed z-[70] flex overflow-hidden rounded-sm border",style:su(a.value)},[g("div",wo,[Rt(F.$slots,"header",{loading:e.loading,options:e.options}),g("div",So,[e.options.length?(A(!0),R(ot,{key:0},ft(e.options,M=>Rt(F.$slots,"option",{key:String(e.getOptionValue(M)??""),option:M,selected:String(e.getOptionValue(M)??"")===String(e.modelValue??""),select:()=>x(M)},()=>[g("button",{type:"button",class:"theme-filter-idle w-full rounded-sm border border-dashed px-3 py-2 text-left text-sm",onClick:B=>x(M)},te(String(e.getOptionValue(M)??"")),9,Co)])),128)):Rt(F.$slots,"empty",{key:1},()=>[g("div",Do,te(e.emptyText),1)])])])],4)):de("",!0)]))],512))}},Ao={key:0,class:"flex items-center gap-2 text-sm"},To={class:"min-w-0 flex-1 truncate font-medium text-[var(--theme-textPrimary)]"},Fo={key:1,class:"theme-muted-text text-sm"},Io={class:"theme-divider theme-muted-text flex items-center justify-between gap-3 border-b border-dashed px-3 py-2 text-[11px]"},Po=["onClick"],Mo={class:"flex items-start gap-3"},$o={class:"min-w-0 flex-1"},Bo={class:"flex items-center gap-2 text-sm"},Ro={class:"min-w-0 flex-1 truncate font-medium text-[var(--theme-textPrimary)]"},Lo={__name:"CodexSessionSelect",props:{modelValue:{type:String,default:""},sessions:{type:Array,default:()=>[]},loading:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},emits:["update:modelValue","refresh-intent"],setup(e,{emit:t}){const u=t;function r(a){return(a==null?void 0:a.title)||"未命名项目"}function n(a){return(a==null?void 0:a.cwd)||"未设置路径"}function o(a){return a!=null&&a.running?"运行中":"空闲"}function i(a){return a!=null&&a.running?"theme-status-warning":"theme-status-success"}function s(a){return a?"theme-filter-active":"theme-filter-idle"}return(a,l)=>(A(),we(Eo,{"model-value":e.modelValue,options:e.sessions,loading:e.loading,disabled:e.disabled,placeholder:"请选择项目","empty-text":"还没有项目,请先到管理弹窗里新建。","get-option-value":f=>(f==null?void 0:f.id)||"","onUpdate:modelValue":l[0]||(l[0]=f=>u("update:modelValue",f)),onRefreshIntent:l[1]||(l[1]=f=>u("refresh-intent"))},{trigger:zt(({selectedOption:f})=>[f?(A(),R("div",Ao,[g("span",To,te(r(f))+" - "+te(n(f)),1),g("span",{class:pe(["inline-flex items-center rounded-sm border border-dashed px-1.5 py-0.5 text-[10px]",i(f)])},te(o(f)),3)])):(A(),R("div",Fo,te(e.loading?"正在同步项目...":"请选择项目"),1))]),header:zt(()=>[g("div",Io,[g("span",null,te(e.loading?"正在同步最新项目...":`共 ${e.sessions.length} 个项目`),1),e.loading?(A(),we(v(Tt),{key:0,class:"h-3.5 w-3.5 animate-spin"})):de("",!0)])]),option:zt(({option:f,selected:d,select:b})=>[g("button",{type:"button",class:pe(["w-full rounded-sm border border-dashed p-3 text-left transition",s(d)]),onClick:b},[g("div",Mo,[g("div",$o,[g("div",Bo,[g("span",Ro,te(r(f))+" - "+te(n(f)),1),g("span",{class:pe(["inline-flex items-center rounded-sm border border-dashed px-1.5 py-0.5 text-[10px]",i(f)])},te(o(f)),3)])]),d?(A(),we(v(Xr),{key:0,class:"mt-0.5 h-4 w-4 shrink-0 text-[var(--theme-textSecondary)]"})):de("",!0)])],10,Po)]),_:1},8,["model-value","options","loading","disabled","get-option-value"]))}},ln={},Kn=typeof import.meta<"u"&&ln?ln:{};function zo(){if(typeof window>"u")return"http://localhost:3000";const e=new URL(window.location.origin);return e.port=Kn.VITE_API_PORT||"3000",e.toString().replace(/\/$/,"")}const Hu=(Kn.VITE_API_BASE_URL||zo()).replace(/\/$/,"");async function Ie(e,t={}){const u=typeof t.body<"u"&&!(t.body instanceof FormData),r=await fetch(`${Hu}${e}`,{headers:{...u?{"Content-Type":"application/json"}:{},...t.headers||{}},...t});if(!r.ok){const o=await r.json().catch(()=>({}));throw new Error(o.message||"请求失败。")}return r.status===204?null:(r.headers.get("content-type")||"").includes("application/json")?r.json():r.text()}function Uu(){return Hu}function gu(e){return e?e.startsWith("http")?e:`${Hu}${e}`:""}function qo(){return Ie("/api/tasks")}function Oo(e=30){const t=new URLSearchParams,u=Math.max(1,Number(e)||30);return t.set("limit",String(u)),Ie(`/api/tasks/workspace-diff-summaries?${t.toString()}`,{cache:"no-store"})}function No(e){return Ie("/api/tasks",{method:"POST",body:JSON.stringify(e)})}function jo(e){return Ie(`/api/tasks/${e}`)}function Vo(e,t){return Ie(`/api/tasks/${e}`,{method:"PUT",body:JSON.stringify(t)})}function Ho(e){return Ie(`/api/tasks/${e}`,{method:"DELETE"})}const Xn=Uu();async function Uo(e){const t=new FormData;t.append("file",e);const u=await fetch(`${Xn}/api/uploads`,{method:"POST",body:t});if(!u.ok){const r=await u.json().catch(()=>({}));throw new Error(r.message||"上传失败。")}return u.json()}async function Wo(e){const t=new FormData;t.append("file",e);const u=await fetch(`${Xn}/api/imports/pdf`,{method:"POST",body:t});if(!u.ok){const r=await u.json().catch(()=>({}));throw new Error(r.message||"PDF 导入失败。")}return u.json()}function Zo(){return Ie("/api/codex/sessions")}function Ko(){return Ie("/api/codex/workspaces")}function Xd(e={}){const t=new URLSearchParams,u=String(e.path||"").trim(),r=Number(e.limit||0);u&&t.set("path",u),Number.isFinite(r)&&r>0&&t.set("limit",String(r));const n=t.toString();return Ie(`/api/codex/directories/tree${n?`?${n}`:""}`,{cache:"no-store"})}function Gd(e,t={}){const u=new URLSearchParams,r=String(e||"").trim(),n=String(t.path||"").trim(),o=Number(t.limit||0);r&&u.set("q",r),n&&u.set("path",n),Number.isFinite(o)&&o>0&&u.set("limit",String(o));const i=u.toString();return Ie(`/api/codex/directories/search${i?`?${i}`:""}`,{cache:"no-store"})}function Xo(e){return Ie("/api/codex/sessions",{method:"POST",body:JSON.stringify(e)})}function Go(e,t){return Ie(`/api/codex/sessions/${encodeURIComponent(e)}`,{method:"PATCH",body:JSON.stringify(t)})}function Jo(e){return Ie(`/api/codex/sessions/${encodeURIComponent(e)}`,{method:"DELETE"})}function Yo(e,t={}){const u=new URLSearchParams,r=String(t.path||"").trim(),n=String(t.refreshToken||"").trim();r&&u.set("path",r),n&&u.set("_",n);const o=u.toString();return Ie(`/api/codex/sessions/${encodeURIComponent(e)}/files/tree${o?`?${o}`:""}`,{cache:"no-store"})}function Qo(e,t,u={}){const r=new URLSearchParams,n=String(t||"").trim(),o=Number(u.limit||60),i=String(u.refreshToken||"").trim();n&&r.set("q",n),Number.isFinite(o)&&o>0&&r.set("limit",String(o)),i&&r.set("_",i);const s=r.toString();return Ie(`/api/codex/sessions/${encodeURIComponent(e)}/files/search${s?`?${s}`:""}`,{cache:"no-store"})}function ei(e,t){return Ie(`/api/tasks/${encodeURIComponent(e)}/codex-session`,{method:"POST",body:JSON.stringify({sessionId:t})})}function ti(e,t={}){const u=new URLSearchParams,r=Number(t.limit||20),n=!!t.includeEvents;Number.isFinite(r)&&r>0&&u.set("limit",String(r)),n&&u.set("includeEvents","true");const o=u.toString();return Ie(`/api/tasks/${encodeURIComponent(e)}/codex-runs${o?`?${o}`:""}`,{cache:"no-store"})}function Jd(e,t={}){const u=new URLSearchParams,r=String(t.scope||"workspace").trim(),n=String(t.runId||"").trim(),o=String(t.filePath||"").trim(),i=t.includeFiles!==!1,s=t.includeStats!==!1;r==="run"?u.set("scope","run"):r==="task"?u.set("scope","task"):u.set("scope","workspace"),n&&u.set("runId",n),o&&u.set("filePath",o),i||u.set("includeFiles","false"),s||u.set("includeStats","false");const a=u.toString();return Ie(`/api/tasks/${encodeURIComponent(e)}/git-diff${a?`?${a}`:""}`,{cache:"no-store"})}function ui(e,t){return Ie(`/api/tasks/${encodeURIComponent(e)}/codex-runs`,{method:"POST",body:JSON.stringify(t)})}function ni(e){return Ie(`/api/tasks/${encodeURIComponent(e)}/codex-runs`,{method:"DELETE"})}function ri(e){return Ie(`/api/codex/runs/${encodeURIComponent(e)}/stop`,{method:"POST"})}const oi=`${Uu()}/api/events/stream`,Et=new Set;let _t=null,uu=null;function $u(){uu&&(window.clearTimeout(uu),uu=null)}function Gn(){_t&&(_t.close(),_t=null)}function ii(e){Et.forEach(t=>{try{t(e)}catch{}})}function Jn(){typeof window>"u"||typeof window.EventSource>"u"||_t||!Et.size||($u(),_t=new window.EventSource(oi),_t.onmessage=e=>{try{const t=JSON.parse(String(e.data||"{}"));if(!(t!=null&&t.type))return;ii(t)}catch{}},_t.onerror=()=>{Gn(),Et.size&&($u(),uu=window.setTimeout(()=>{Jn()},1500))})}function si(e){return typeof e!="function"?()=>{}:(Et.add(e),Jn(),()=>{Et.delete(e),!Et.size&&($u(),Gn())})}const Yn=O(0),nu=O(0),ru=O(""),ou=O(0),Qn=Vn({}),Bu=Vn({}),Lt=new Map;let cn=!1;function vu(e,t=""){const u=String(t||"").trim();u&&(e[u]=Math.max(0,Number(e[u])||0)+1)}function ai(e={}){const t=String(e.type||"").trim(),u=String(e.reason||"").trim();return{updatesTaskList:t==="ready"||t==="tasks.changed"||t==="runs.changed",updatesSessions:t==="ready"||t==="runs.changed"||t==="sessions.changed",updatesTaskRuns:t==="runs.changed",updatesTaskDiff:t==="runs.changed"||t==="tasks.changed"&&(u==="session-linked"||u==="session-cleared")}}function li(e="",t={}){const u=String(e||"").trim();if(!u)return;const r=Lt.get(u);r!=null&&r.size&&r.forEach(n=>{try{n(t)}catch{}})}function ci(e={}){const t=String(e.type||"").trim(),u=String(e.taskSlug||"").trim(),r=ai(e);if(t){if(t==="ready"){Yn.value+=1,ru.value="",nu.value+=1,ou.value+=1;return}if(t==="tasks.changed"){ru.value=u,r.updatesTaskList&&(nu.value+=1),r.updatesTaskDiff&&vu(Bu,u);return}if(t==="runs.changed"){ru.value=u,r.updatesTaskList&&(nu.value+=1),r.updatesSessions&&(ou.value+=1),r.updatesTaskRuns&&vu(Qn,u),r.updatesTaskDiff&&vu(Bu,u);return}if(t==="sessions.changed"){r.updatesSessions&&(ou.value+=1);return}t==="run.event"&&li(u,{taskSlug:u,runId:String(e.runId||"").trim(),event:e.event||null})}}function er(){cn||typeof window>"u"||(si(e=>{ci(e)}),cn=!0)}function di(e=""){const t=String(e||"").trim();return t?Math.max(0,Number(Qn[t])||0):0}function fi(e=""){const t=String(e||"").trim();return t?Math.max(0,Number(Bu[t])||0):0}function pi(e="",t){const u=String(e||"").trim();if(!u||typeof t!="function")return()=>{};er();const r=Lt.get(u)||new Set;return r.add(t),Lt.set(u,r),()=>{const n=Lt.get(u);n&&(n.delete(t),n.size||Lt.delete(u))}}function tr(){return er(),{readyVersion:Yn,listSyncVersion:nu,listSyncTaskSlug:ru,sessionsSyncVersion:ou,getTaskRunSyncVersion:di,getTaskDiffSyncVersion:fi}}const hi=1500,mi=3e4,bi=150,xi=48,gi=1800,vi=7200;function dn(e=""){const t=Date.parse(String(e||""));return Number.isFinite(t)?t:0}function fn(e=[],t=""){return[...e].sort((u,r)=>{const n=+!!(r!=null&&r.running)-+!!(u!=null&&u.running);if(n)return n;const o=+((r==null?void 0:r.id)===t)-+((u==null?void 0:u.id)===t);if(o)return o;const i=dn(r.updatedAt)-dn(u.updatedAt);return i||String(u.title||u.cwd||u.id).localeCompare(String(r.title||r.cwd||r.id),"zh-CN")})}function yi(e="",t=500){const u=String(e||"").trim();return u?u.length<=t?u:`${u.slice(0,t)}...`:""}function yu(e=[]){const t=Array.isArray(e)?e:[];return t.length?t.map(u=>`${u.completed?"[x]":"[ ]"} ${u.text||"未命名任务"}`).join(`
193
+ `):""}function xt(e=0){const t=Number(e||0);return Number.isFinite(t)?t.toLocaleString("zh-CN"):"0"}function ur(e=0){const t=Math.max(0,Math.floor(Number(e)||0));if(t<66)return`${t}s`;const u=Math.floor(t/3600),r=Math.floor(t%3600/60),n=t%60;return u>0?`${u}小时${r}分${n}秒`:`${r}分${n}秒`}function Ne(e="",t=140){const u=String(e||"").replace(/\s+/g," ").trim();return u?u.length<=t?u:`${u.slice(0,t)}...`:""}function nr(e="",t=[]){const u=t.filter(Boolean);if(!u.length)return"";const r=u.map(n=>`- ${n}`).join(`
194
+ `);return e?`${e}
195
+ ${r}`:r}function Wt(){return{commandCount:0,webSearchCount:0,fileChangeCount:0,subAgentCount:0,waitingAgentCount:0,currentActivity:"",latestActivity:"",latestDetail:""}}function Wu(e=""){const t=String(e||"").trim();if(!t)return null;const u=t.match(/^Reconnecting\.\.\.\s*(\d+)\/(\d+)\s*\(([\s\S]+)\)$/i);return u?{attempt:Number(u[1]||0),total:Number(u[2]||0),reason:String(u[3]||"").trim(),rawMessage:t}:null}function pn(e={},t="completed"){const u=e.action||{},r=String(u.type||"").trim(),n=String(e.query||u.query||"").trim(),o=Array.isArray(u.queries)?u.queries.map(s=>String(s||"").trim()).filter(Boolean):[],i=String(u.url||n||"").trim();return r==="search"?{kind:"command",title:t==="started"?"正在搜索网页":"已搜索网页",detail:nr(n?`关键词:${n}`:"",o.length>1?o:[])}:r==="open_page"?{kind:"command",title:t==="started"?"正在打开网页":"已打开网页",detail:i}:{kind:"command",title:t==="started"?"准备网页检索":"网页检索已更新",detail:n}}function hn(e={},t="completed"){const u=String(e.tool||"").trim(),r=Array.isArray(e.receiver_thread_ids)?e.receiver_thread_ids.filter(Boolean).length:0,n=Ne(e.prompt);return u==="spawn_agent"?{kind:"todo",title:t==="started"?"正在启动子代理":`已启动 ${r||1} 个子代理`,detail:n?`任务:${n}`:""}:u==="wait"?{kind:"todo",title:t==="started"?r?`等待 ${r} 个子代理返回结果`:"等待子代理返回结果":"子代理结果已汇总",detail:n?`等待内容:${n}`:""}:{kind:"todo",title:t==="started"?`正在执行协作工具:${u||"未知工具"}`:`协作工具完成:${u||"未知工具"}`,detail:n?`任务:${n}`:""}}function mn(e={},t="completed"){const u=Array.isArray(e.changes)?e.changes:[],r={create:"新增",update:"更新",delete:"删除"};return{kind:"command",title:t==="started"?"正在整理文件变更":`已记录 ${u.length||0} 个文件改动`,detail:nr("",u.map(n=>{const o=String((n==null?void 0:n.path)||"").trim();return`${r[String((n==null?void 0:n.kind)||"").trim()]||"变更"} ${o||"未命名文件"}`}))}}function ki(e,t={}){var o,i,s,a,l,f,d,b;e!=null&&e.summary||(e.summary=Wt());const u=e.summary,r=String(t.type||"").trim(),n=t.item||{};if(r==="turn.started"){u.currentActivity="正在分析任务",u.latestActivity="Codex 开始执行",u.latestDetail="";return}if(r==="turn.completed"){u.currentActivity="",u.waitingAgentCount=0,u.latestActivity="Codex 执行完成",u.latestDetail="";return}if(r==="turn.failed"){u.currentActivity="",u.waitingAgentCount=0,u.latestActivity="本轮运行失败",u.latestDetail="";return}if(r==="error"){const x=Wu(Ot(t));if(x){u.currentActivity=`网络异常,正在重试 (${x.attempt}/${x.total})`,u.latestActivity=u.currentActivity,u.latestDetail=Ne(x.reason,120);return}u.currentActivity="",u.latestActivity="Codex 返回错误",u.latestDetail=Ne(Ot(t),120);return}if(r==="item.started"){if(n.type==="command_execution"){u.currentActivity="正在执行命令",u.latestActivity="开始执行命令",u.latestDetail=Ne(n.command,120);return}if(n.type==="web_search"){u.currentActivity=((o=n.action)==null?void 0:o.type)==="open_page"?"正在打开网页":"正在搜索网页",u.latestActivity=u.currentActivity,u.latestDetail=Ne(((i=n.action)==null?void 0:i.type)==="open_page"?((s=n.action)==null?void 0:s.url)||n.query:n.query||((a=n.action)==null?void 0:a.query),120);return}if(n.type==="collab_tool_call"){if(n.tool==="wait"){const x=Array.isArray(n.receiver_thread_ids)?n.receiver_thread_ids.filter(Boolean).length:0;u.waitingAgentCount=x,u.currentActivity=x?`等待 ${x} 个子代理返回结果`:"等待子代理返回结果",u.latestActivity=u.currentActivity,u.latestDetail=Ne(n.prompt,120);return}if(n.tool==="spawn_agent"){u.currentActivity="正在启动子代理",u.latestActivity="正在启动子代理",u.latestDetail=Ne(n.prompt,120);return}}if(n.type==="file_change"){u.currentActivity="正在整理文件变更",u.latestActivity="正在整理文件变更",u.latestDetail=Ne((n.changes||[]).map(x=>x==null?void 0:x.path).filter(Boolean).join(","),120);return}n.type==="todo_list"&&(u.currentActivity="正在规划执行步骤",u.latestActivity="正在规划执行步骤",u.latestDetail=Ne((n.items||[]).map(x=>x==null?void 0:x.text).filter(Boolean).join(";"),120));return}if(r==="item.completed"){if(n.type==="command_execution"){u.commandCount+=1,u.currentActivity="",u.latestActivity="命令执行完成",u.latestDetail=Ne(n.command,120);return}if(n.type==="web_search"){u.webSearchCount+=1,u.currentActivity="",u.latestActivity=((l=n.action)==null?void 0:l.type)==="open_page"?"已打开网页":"已搜索网页",u.latestDetail=Ne(((f=n.action)==null?void 0:f.type)==="open_page"?((d=n.action)==null?void 0:d.url)||n.query:n.query||((b=n.action)==null?void 0:b.query),120);return}if(n.type==="collab_tool_call"){if(n.tool==="spawn_agent"){const x=Array.isArray(n.receiver_thread_ids)?n.receiver_thread_ids.filter(Boolean).length:0;u.subAgentCount+=x,u.currentActivity="",u.latestActivity=x?`已启动 ${x} 个子代理`:"已启动子代理",u.latestDetail=Ne(n.prompt,120);return}if(n.tool==="wait"){u.waitingAgentCount=0,u.currentActivity="",u.latestActivity="子代理结果已汇总",u.latestDetail=Ne(n.prompt,120);return}u.currentActivity="",u.latestActivity=`协作工具完成:${n.tool||"未知工具"}`,u.latestDetail=Ne(n.prompt,120);return}if(n.type==="file_change"){const x=Array.isArray(n.changes)?n.changes:[];u.fileChangeCount+=x.length,u.currentActivity="",u.latestActivity=x.length?`已记录 ${x.length} 个文件改动`:"已记录文件改动",u.latestDetail=Ne(x.map(p=>p==null?void 0:p.path).filter(Boolean).join(","),120);return}if(n.type==="todo_list"){u.currentActivity="",u.latestActivity="待办列表已更新",u.latestDetail=Ne((n.items||[]).map(x=>x==null?void 0:x.text).filter(Boolean).join(";"),120);return}n.type==="agent_message"&&(u.currentActivity="",u.latestActivity="Codex 已返回结果",u.latestDetail=Ne(n.text,120))}}function _i(e={},t={}){const u=Date.parse(String(e.startedAt||""));if(!Number.isFinite(u))return 0;if(e.status==="running"){if(t.currentRunningRunId&&String(t.currentRunningRunId)===String(e.runId||"")&&Number.isFinite(Number(t.runningElapsedSeconds)))return Math.max(0,Math.floor(Number(t.runningElapsedSeconds)||0));const n=Number(t.nowMs)||Date.now();return Math.max(0,Math.floor((n-u)/1e3))}const r=Date.parse(String(e.finishedAt||""));return Number.isFinite(r)&&r>=u?Math.max(0,Math.floor((r-u)/1e3)):0}function rr(e={},t={}){const u=e.summary||Wt(),r=[],n=_i(e,t);return n>0&&r.push({key:"elapsed",label:"耗时",value:ur(n)}),u.webSearchCount&&r.push({key:"web",label:"网页",value:xt(u.webSearchCount)}),u.commandCount&&r.push({key:"command",label:"命令",value:xt(u.commandCount)}),u.fileChangeCount&&r.push({key:"file",label:"改动",value:xt(u.fileChangeCount)}),u.subAgentCount&&r.push({key:"agent",label:"子代理",value:xt(u.subAgentCount)}),r}function or(e={}){const t=e.summary||Wt();return t.waitingAgentCount>0?`当前:等待 ${xt(t.waitingAgentCount)} 个子代理返回结果`:t.currentActivity?`当前:${t.currentActivity}`:t.latestActivity?`最近:${t.latestActivity}`:e.status==="running"?"当前:正在等待 Codex 返回更多事件":""}function ir(e={}){const t=e.summary||Wt();return String(t.latestDetail||"").trim()}function wi(e={}){return!!(rr(e).length||or(e)||ir(e))}const Si=[{type:"startup_config",title:"Codex 启动配置冲突",summary:"PromptX 默认会附带满血模式和跳过 Git 仓库检查参数;如果仍出现这类错误,通常说明本机 Codex 包装脚本、别名或外部环境覆盖了实际启动参数。",patterns:[/not inside a trusted directory/i,/do you trust the contents of this directory/i,/trusted directory/i,/skip-git-repo-check/i,/prompt injection/i,/目录.*信任/,/可信目录/]},{type:"billing",title:"额度或账单异常",summary:"Codex 可能因为额度不足、欠费或账单限制而无法继续执行。",patterns:[/insufficient_quota/i,/exceeded your current quota/i,/\bquota\b/i,/\bbilling\b/i,/credit balance/i,/payment required/i,/余额不足/,/欠费/,/账单/,/充值/]},{type:"permission",title:"权限不足",summary:"Codex 当前权限不够,无法访问所需文件、命令或资源。",patterns:[/permission denied/i,/insufficient permissions?/i,/forbidden/i,/unauthorized/i,/access denied/i,/not allowed/i,/权限不足/,/没有权限/,/无权/,/拒绝访问/]},{type:"rate_limit",title:"请求过于频繁",summary:"Codex 可能触发了限流,请稍后再试。",patterns:[/rate limit/i,/too many requests/i,/\b429\b/,/请求过于频繁/,/限流/]},{type:"context_limit",title:"上下文过长",summary:"这次发送的内容可能过长,超过了模型可处理的上下文限制。",patterns:[/context length/i,/maximum context length/i,/context_length_exceeded/i,/token limit/i,/prompt is too long/i,/上下文过长/,/超过.*token/i,/超出.*上下文/]},{type:"model_unavailable",title:"模型或服务暂不可用",summary:"Codex 背后的模型或服务当前不可用,请稍后重试。",patterns:[/model .*not found/i,/model .*unavailable/i,/service unavailable/i,/server error/i,/overloaded/i,/\b503\b/,/模型不可用/,/服务不可用/]},{type:"network",title:"网络连接异常",summary:"Codex 在请求过程中遇到了网络问题或连接超时。",patterns:[/timed out/i,/\btimeout\b/i,/stream disconnected/i,/error sending request/i,/connection reset/i,/connection closed/i,/socket hang up/i,/network error/i,/fetch failed/i,/econnreset/i,/econnrefused/i,/enotfound/i,/network is unreachable/i,/temporary failure in name resolution/i,/网络异常/,/连接超时/]},{type:"cli_missing",title:"Codex CLI 不可用",summary:"当前环境没有正确安装或配置 Codex CLI。",patterns:[/找不到 Codex CLI/,/codex --version/i,/enoent/i,/not recognized as an internal or external command/i,/command not found/i]}];function Ft(e=""){const t=String(e||"").trim();if(!t)return null;const u=Si.find(r=>r.patterns.some(n=>n.test(t)));return u?{type:u.type,title:u.title,summary:u.summary,rawMessage:t}:null}function St(e=""){const t=String(e||"").trim();if(!t)return"";const u=Ft(t);return u?`${u.summary}
196
+
197
+ 原始错误:${u.rawMessage}`:t}function Ru(e,t=0){if(!e||t>4)return"";if(typeof e=="string")return e.trim();if(typeof e!="object")return"";const u=["message","detail","error","last_error","cause","reason","stderr","text","summary"];for(const r of u){if(!Object.prototype.hasOwnProperty.call(e,r))continue;const n=Ru(e[r],t+1);if(n)return n}for(const r of Object.values(e)){const n=Ru(r,t+1);if(n)return n}return""}function Ot(e={}){return Ru(e)}function Ci(e={}){const t=String(e.type||"").trim(),u=e.item||{};if(!t)return{title:"收到 Codex 事件",detail:""};if(t==="thread.started")return{title:"Codex 线程已创建",detail:e.thread_id?`线程 ID: ${e.thread_id}`:""};if(t==="turn.started")return{title:"Codex 开始执行",detail:""};if(t==="turn.completed")return{title:"Codex 执行完成",detail:e.usage?[`输入 ${xt(e.usage.input_tokens)}`,e.usage.cached_input_tokens?`缓存 ${xt(e.usage.cached_input_tokens)}`:"",`输出 ${xt(e.usage.output_tokens)}`].filter(Boolean).join(" / "):""};if(t==="error"||t==="turn.failed"){const r=Ot(e)||"Codex 执行失败",n=t==="error"?Wu(r):null;if(n)return{kind:"info",title:`网络异常,正在重试 (${n.attempt}/${n.total})`,detail:St(n.reason||n.rawMessage)};const o=Ft(r);return{kind:"error",title:(o==null?void 0:o.title)||(t==="turn.failed"?"本轮运行失败":"Codex 返回错误"),detail:St(r)}}if(t==="item.started")return u.type==="web_search"?pn(u,"started"):u.type==="collab_tool_call"?hn(u,"started"):u.type==="file_change"?mn(u,"started"):u.type==="command_execution"?{kind:"command",title:"开始执行命令",detail:u.command||""}:u.type==="todo_list"?{kind:"todo",title:"更新待办列表",detail:yu(u.items)}:{title:`开始处理 ${u.type||"未知项目"}`,detail:""};if(t==="item.updated"&&u.type==="todo_list")return{kind:"todo",title:"更新待办列表",detail:yu(u.items)};if(t==="item.completed"){if(u.type==="agent_message"&&u.text)return{kind:"result",title:"Codex 已返回结果",detail:""};if(u.type==="web_search")return pn(u,"completed");if(u.type==="collab_tool_call")return hn(u,"completed");if(u.type==="file_change")return mn(u,"completed");if(u.type==="command_execution"){const r=u.exit_code===0||u.status==="completed";return{kind:r?"command":"error",title:r?"命令执行完成":`命令执行失败(exit ${u.exit_code??"?"})`,detail:[u.command,yi(u.aggregated_output)].filter(Boolean).join(`
198
+
199
+ `)}}return u.type==="todo_list"?{kind:"todo",title:"更新待办列表",detail:yu(u.items)}:{title:`完成 ${u.type||"未知项目"}`,detail:""}}return{title:`事件: ${t}`,detail:""}}function Di(e){return e.status==="running"?"进行中":e.status==="error"?"失败":e.status==="interrupted"?"已中断":e.status==="stopped"?"已停止":"已完成"}function sr(e={},t){if(typeof e=="string"){const n=e.trim();return n?{id:t(),kind:"info",title:n,detail:""}:null}const u=String(e.title||"").trim(),r=String(e.detail||"").trim();return!u&&!r?null:{id:t(),kind:e.kind||"info",title:u||r,detail:u?r:""}}function Ei(e={},t){return{id:t(),runId:String(e.id||"").trim(),prompt:String(e.prompt||"").trim(),status:"completed",startedAt:e.startedAt||e.createdAt||"",finishedAt:e.finishedAt||"",events:[],responseMessage:"",errorMessage:"",lastEventSeq:0,summary:Wt()}}function dt(e,t,u){const r=sr(t,u);r&&(e.events.push(r),e.events.length>120&&e.events.splice(0,e.events.length-120))}function Ai(e,t,u){var n;const r=sr(t,u);if(r){for(let o=e.events.length-1;o>=0;o-=1)if(String(((n=e.events[o])==null?void 0:n.title)||"").startsWith("网络异常,正在重试")){e.events.splice(o,1,r);return}e.events.push(r),e.events.length>120&&e.events.splice(0,e.events.length-120)}}function Ti(e,t={},u,r=()=>{}){var n,o,i,s,a,l,f,d,b,x,p;if(t.type==="session"){r(t.session),dt(e,{title:`已连接项目:${((n=t.session)==null?void 0:n.title)||"未命名项目"}`,detail:(o=t.session)!=null&&o.cwd?`工作目录:${t.session.cwd}`:""},u);return}if(t.type==="session.updated"){r(t.session),dt(e,{title:"项目线程已更新",detail:(i=t.session)!=null&&i.started?"后续请求会继续复用当前项目的 Codex 线程。":""},u);return}if(t.type==="status"){if(t.stage==="starting"||t.stage==="resuming")return;dt(e,{title:t.message||"状态已更新",detail:""},u);return}if(t.type==="stderr"){const D=Ft(t.text);dt(e,{kind:"error",title:(D==null?void 0:D.title)||"stderr",detail:St(t.text)},u);return}if(t.type==="stdout"){dt(e,{kind:"command",title:"stdout",detail:t.text},u);return}if(t.type==="codex"){ki(e,t.event);const D=Ci(t.event);String(D.title||"").startsWith("网络异常,正在重试")?Ai(e,D,u):dt(e,D,u),((s=t.event)==null?void 0:s.type)==="item.completed"&&((l=(a=t.event)==null?void 0:a.item)==null?void 0:l.type)==="agent_message"&&((d=(f=t.event)==null?void 0:f.item)!=null&&d.text)&&(e.responseMessage=t.event.item.text);const T=Ot(t.event)||"Codex 执行失败";if(!(((b=t.event)==null?void 0:b.type)==="error"?Wu(T):null)&&(((x=t.event)==null?void 0:x.type)==="error"||((p=t.event)==null?void 0:p.type)==="turn.failed")){const $=Ot(t.event)||"Codex 执行失败";e.errorMessage=St($),e.status="error"}return}if(t.type==="completed"){dt(e,{kind:"result",title:"本轮执行结束",detail:""},u),t.message&&(e.responseMessage=t.message);return}if(t.type==="stopped"){dt(e,{title:t.message||"执行已手动停止",detail:""},u);return}if(t.type==="error"){const D=Ft(t.message);dt(e,{kind:"error",title:(D==null?void 0:D.title)||"执行失败",detail:St(t.message||"Codex 执行失败")},u)}}function Fi(e="",t=""){const u=String(e||"").trim(),r=String(t||"").trim();if(!r)return!1;if(!u||/no last agent message|wrote empty content/i.test(u)||/^Codex 执行失败[。.]?$/i.test(u))return!0;const n=Ft(u),o=Ft(r);return!n&&!!o}function Ii(e,t={}){e.status=t.status||"completed",e.responseMessage=String(t.responseMessage||e.responseMessage||""),e.finishedAt=String(t.finishedAt||e.finishedAt||"");const u=St(String(t.errorMessage||"")),r=String(e.errorMessage||"");return e.errorMessage=Fi(t.errorMessage,r)?r:u,e.status==="completed"&&!e.responseMessage&&(e.responseMessage="本轮 Codex 执行已完成,没有返回额外文本。"),e}function ar(e,t={},u,r=()=>{}){const n=Math.max(0,Number(t==null?void 0:t.seq)||0);if(n&&n<=Number(e.lastEventSeq||0))return!1;const o=(t==null?void 0:t.payload)||{};return Ti(e,o,u,r),o.type==="completed"?(e.status="completed",e.finishedAt=new Date().toISOString()):o.type==="stopped"?(e.status="stopped",e.errorMessage="",e.finishedAt=new Date().toISOString()):o.type==="error"&&(e.status="error",e.errorMessage=St(String(o.message||e.errorMessage||"Codex 执行失败")),e.finishedAt=new Date().toISOString()),n&&(e.lastEventSeq=n),!0}function bn(e,t,u,r){const n=Ei(e,t);return(e.events||[]).forEach(o=>{ar(n,o,u,r)}),Ii(n,e)}function Pi(e,t){const u=tr(),r=O([]),n=O([]),o=O(!1),i=O(!1),s=O(!1),a=O(""),l=O([]),f=O(null),d=O(0),b=O(0),x=O(!1),p=O(""),D=O(!1),T=typeof window<"u"&&typeof window.EventSource<"u";let F=0,$=0,M=null,B=null,q=null,H=0,G=0,Z=null,U=null,L="",z=0,V=null,X=null,ne=!0,Q={sessions:!1,runs:!1};const se=ae(()=>typeof e.buildPrompt=="function"||!!String(e.prompt||"").trim()),ye=ae(()=>r.value.length>0),re=ae({get(){return String(e.selectedSessionId||"").trim()},set(c){t("selected-session-change",String(c||"").trim())}}),K=ae(()=>fn(r.value,re.value)),le=ae(()=>ye.value?"":"还没有 PromptX 项目,请先在管理弹窗里新建一个固定工作目录。"),oe=ae(()=>`运行中 (${ur(b.value)})`);function Fe(){M&&(window.clearInterval(M),M=null)}function Ce(){Fe(),d.value||(d.value=Date.now()),b.value=Math.max(0,Math.floor((Date.now()-d.value)/1e3)),M=window.setInterval(()=>{b.value=Math.max(0,Math.floor((Date.now()-d.value)/1e3))},1e3)}function De(){U&&(window.clearInterval(U),U=null)}function he(){X&&(window.clearTimeout(X),X=null)}function ke(){he();const c=Q;Q={sessions:!1,runs:!1},c.sessions&&Be({force:!0}).catch(()=>{}),c.runs&&Pe({force:!0}).catch(()=>{})}function qe(c={}){typeof window>"u"||(Q={sessions:Q.sessions||!!c.sessions,runs:Q.runs||!!c.runs},!(X||!Q.sessions&&!Q.runs)&&(X=window.setTimeout(()=>{ke()},bi)))}function Ke(c=f.value){return c?c.scrollHeight-c.scrollTop-c.clientHeight<=xi:!0}function Qe(){ne=Ke(),ne&&(D.value=!1)}function Ee(c={}){const{force:m=!1}=c;m&&(ne=!0,D.value=!1),ge(()=>{if(!f.value)return;if(!m&&!ne){D.value=!0;return}const w=()=>{f.value&&(f.value.scrollTop=f.value.scrollHeight,ne=!0,D.value=!1)};w(),requestAnimationFrame(()=>{w(),requestAnimationFrame(w)})})}function Xe(){Ee({force:!0})}function Ae(c){return rr(c,{currentRunningRunId:p.value,runningElapsedSeconds:b.value,nowMs:Date.now()})}function je(){x.value=!0,Ue().catch(()=>{})}function et(){x.value=!1}function _e(c,m,w={}){const{preserveRunning:I=!1}=w;return m!=null&&m.id?I?{...m,running:!!(c!=null&&c.running)}:m:c||null}function Me(c,m={}){if(!(c!=null&&c.id))return;const w=[...r.value],I=w.findIndex(W=>W.id===c.id);I>=0?w[I]=_e(w[I],c,m):w.unshift(_e(null,c,m)),r.value=w}function Ge(){return F+=1,F}function $e(){return $+=1,$}function Oe(){const c=[...l.value].reverse().find(m=>m.status==="running")||null;if(p.value=(c==null?void 0:c.runId)||"",s.value=!!c,c!=null&&c.startedAt){const m=Date.parse(String(c.startedAt||""));d.value=Number.isFinite(m)?m:Date.now();return}d.value=0}function Te(c,m){const w=String(c||"").trim();if(!w||!m)return!1;const I=l.value.findIndex(ce=>ce.runId===w);if(I<0)return!1;const W=l.value[I];return ar(W,m,$e,ce=>{Me(ce,{preserveRunning:!0})})&&(l.value=[...l.value],Oe(),Ee()),!0}function Je(){De(),!(T||!e.active||!s.value||!e.taskSlug)&&(U=window.setInterval(()=>{Pe({force:!0}).catch(()=>{});const c=Date.now();c-z<vi||(z=c,Be({force:!0}).catch(()=>{}))},gi))}function fe(c=[]){const m=[...r.value],w=I=>{if(!(I!=null&&I.id))return;const W=m.findIndex(ve=>ve.id===I.id);W>=0?m[W]=_e(m[W],I,{preserveRunning:!0}):m.unshift(_e(null,I,{preserveRunning:!0}))};F=0,$=0,l.value=[...c||[]].reverse().map(I=>bn(I,Ge,$e,w)),r.value=m,Oe()}async function Pe(c={}){const{force:m=!1,scrollToLatest:w=!1}=c,I=String(e.taskSlug||"").trim();if(!(!I||!e.active&&!m))return Z&&!m||(Z=(async()=>{try{const ve=(await ti(I,{limit:20,includeEvents:!0})).items||[],ce=JSON.stringify(ve.map(tt=>({id:tt.id,status:tt.status,updatedAt:tt.updatedAt,eventCount:Array.isArray(tt.events)?tt.events.length:0}))),Re=w||L&&ce!==L;fe(ve),L=ce,Je(),Re&&Ee()}catch(W){a.value=W.message}finally{Z=null}})()),Z}async function Be(c={}){const{force:m=!1}=c;if(B)return B;const w=Date.now();return!m&&H&&w-H<hi?{items:r.value,workspaces:n.value}:(B=(async()=>{o.value=!0,a.value="";try{const W=(await Zo()).items||[];return r.value=W,H=Date.now(),{items:W,workspaces:n.value}}catch(I){throw a.value=I.message,I}finally{o.value=!1,B=null}})(),B)}async function Ue(c={}){const{force:m=!1}=c;if(q)return q;const w=Date.now();return!m&&G&&w-G<mi?{items:n.value}:(q=(async()=>{try{const I=await Ko();return n.value=I.items||[],G=Date.now(),{items:n.value}}finally{q=null}})(),q)}async function We(c={}){const{forceSessions:m=!1,forceWorkspaces:w=!1}=c,[I,W]=await Promise.all([Be({force:m}),Ue({force:w})]);return{items:(I==null?void 0:I.items)||r.value,workspaces:(W==null?void 0:W.items)||n.value}}function E(c=""){const m=String(c||"").trim();!m||n.value.includes(m)||(n.value=[m,...n.value])}function ee(c){const m=String(c||"").trim();if(e.sessionSelectionLocked&&m&&m!==re.value){a.value=e.sessionSelectionLockReason||"该任务已有项目历史,不能再切换项目;如需使用新项目,请新建任务。";return}re.value=m}function N(){We({forceSessions:!0,forceWorkspaces:!0}).catch(()=>{})}async function Y(c){i.value=!0,a.value="";try{const m=await Xo(c);return Me(m),E(m.cwd),re.value=m.id,m}catch(m){throw a.value=m.message,m}finally{i.value=!1}}async function Ze(c,m){i.value=!0,a.value="";try{const w=await Go(c,m);return Me(w),E(w.cwd),w}catch(w){throw a.value=w.message,w}finally{i.value=!1}}async function y(c){var w;const m=String(c||"").trim();if(!m)return{deletedSessionId:"",selectedSessionId:re.value};i.value=!0,a.value="";try{await Jo(m);const I=r.value.filter(ve=>ve.id!==m);r.value=I;let W=re.value;return re.value===m&&(W=((w=fn(I,"")[0])==null?void 0:w.id)||"",re.value=W),{deletedSessionId:m,selectedSessionId:W}}catch(I){throw a.value=I.message,I}finally{i.value=!1}}function _(c={}){const m=(c==null?void 0:c.run)||null,w=(c==null?void 0:c.session)||null;if(w&&Me(w,{preserveRunning:!0}),!(m!=null&&m.id)){Oe(),Ee({force:!0});return}const W=bn(m,Ge,$e,ce=>{Me(ce,{preserveRunning:!0})}),ve=l.value.findIndex(ce=>ce.runId===W.runId);if(ve>=0){const ce=[...l.value];ce.splice(ve,1,W),l.value=ce}else l.value=[...l.value,W];Oe(),Ee({force:!0})}async function C(){if(!e.taskSlug||!se.value||s.value)return!1;if(!re.value)return je(),a.value="请先选择一个 PromptX 项目。",!1;a.value="";try{await We({forceSessions:!0});const c=r.value.find(I=>I.id===re.value)||null;if(!c)return a.value="当前项目不存在,请重新选择。",!1;if(c.running)return a.value="当前项目正在运行中,请等待完成后再发送。",!1;const m=typeof e.buildPrompt=="function"?await e.buildPrompt():e.prompt;if(!String(m||"").trim())return a.value="没有可发送的提示词。",!1;const w=await ui(e.taskSlug,{sessionId:re.value,prompt:m});return _(w),typeof e.afterSend=="function"&&Promise.resolve(e.afterSend()).catch(I=>{console.error("[promptx] afterSend failed",I)}),T||(z=Date.now(),Promise.all([Pe({force:!0}),Be({force:!0})]).catch(I=>{a.value=I.message})),!0}catch(c){return a.value=c.message,!1}}async function P(){if(p.value)try{await ri(p.value),T||(z=Date.now(),await Promise.all([Pe({force:!0}),Be({force:!0})]))}catch(c){a.value=c.message}}async function J(){if(!(!e.taskSlug||s.value))try{await ni(e.taskSlug),l.value=[],p.value="",L="",ne=!0,D.value=!1,Ee({force:!0})}catch(c){a.value=c.message}}function k(c=""){if(!c)return"";const m=new Date(c);return Number.isNaN(m.getTime())?"":m.toLocaleTimeString("zh-CN",{hour:"2-digit",minute:"2-digit",second:"2-digit"})}function S(c){return c.status==="error"?"theme-process-error":c.status==="interrupted"||c.status==="stopped"?"theme-process-stopped":c.status==="completed"?"theme-process-completed":"theme-process-running"}function h(c){return!!(c.responseMessage||c.errorMessage||c.status==="completed")}return me(s,c=>{c?(d.value||(d.value=Date.now()),Ce()):(Fe(),d.value=0,b.value=0),Je(),t("sending-change",c)},{immediate:!0}),me(()=>e.active,c=>{if(c){We({forceSessions:!0}).catch(()=>{}),Pe({force:!0,scrollToLatest:!0}).catch(()=>{});return}he(),De()},{immediate:!0}),me(()=>e.taskSlug,()=>{l.value=[],p.value="",L="",ne=!0,D.value=!1,x.value=!1,a.value="",e.active&&Pe({force:!0,scrollToLatest:!0}).catch(()=>{})},{immediate:!0}),nt(()=>{Fe(),De(),he(),V==null||V()}),me(()=>u.readyVersion.value,()=>{const c=String(e.taskSlug||"").trim();!e.active&&!x.value||(x.value&&Ue().catch(()=>{}),qe({sessions:!0,runs:!!c}))}),me(()=>u.sessionsSyncVersion.value,()=>{!e.active&&!x.value||qe({sessions:!0})}),me(()=>u.getTaskRunSyncVersion(e.taskSlug),()=>{!e.active||!e.taskSlug||qe({sessions:!0,runs:!0})}),me(()=>String(e.taskSlug||"").trim(),c=>{V==null||V(),V=null,c&&(V=pi(c,({runId:m,event:w})=>{if(!e.active)return;Te(m,w)||qe({sessions:!0,runs:!0})}))},{immediate:!0}),{clearTurns:J,closeManager:et,formatTurnTime:k,getProcessCardClass:S,getProcessStatus:Di,getTurnSummaryDetail:ir,getDisplayTurnSummaryItems:Ae,getTurnSummaryStatus:or,handleCreateSession:Y,handleDeleteSession:y,handleSelectSession:ee,handleSend:C,handleUpdateSession:Ze,hasTurnSummary:wi,helperText:le,loading:o,managerBusy:i,openManager:je,refreshSessionsForSelection:N,selectedSessionId:re,sending:s,sessionError:a,shouldShowResponse:h,showManager:x,sortedSessions:K,stopSending:P,hasNewerMessages:D,transcriptRef:f,turns:l,workspaces:n,workingLabel:oe,sessions:r,loadSessions:Be,handleTranscriptScroll:Qe,scrollToBottom:Xe}}const xn={};function Mi(e){let t=xn[e];if(t)return t;t=xn[e]=[];for(let u=0;u<128;u++){const r=String.fromCharCode(u);t.push(r)}for(let u=0;u<e.length;u++){const r=e.charCodeAt(u);t[r]="%"+("0"+r.toString(16).toUpperCase()).slice(-2)}return t}function It(e,t){typeof t!="string"&&(t=It.defaultChars);const u=Mi(t);return e.replace(/(%[a-f0-9]{2})+/gi,function(r){let n="";for(let o=0,i=r.length;o<i;o+=3){const s=parseInt(r.slice(o+1,o+3),16);if(s<128){n+=u[s];continue}if((s&224)===192&&o+3<i){const a=parseInt(r.slice(o+4,o+6),16);if((a&192)===128){const l=s<<6&1984|a&63;l<128?n+="��":n+=String.fromCharCode(l),o+=3;continue}}if((s&240)===224&&o+6<i){const a=parseInt(r.slice(o+4,o+6),16),l=parseInt(r.slice(o+7,o+9),16);if((a&192)===128&&(l&192)===128){const f=s<<12&61440|a<<6&4032|l&63;f<2048||f>=55296&&f<=57343?n+="���":n+=String.fromCharCode(f),o+=6;continue}}if((s&248)===240&&o+9<i){const a=parseInt(r.slice(o+4,o+6),16),l=parseInt(r.slice(o+7,o+9),16),f=parseInt(r.slice(o+10,o+12),16);if((a&192)===128&&(l&192)===128&&(f&192)===128){let d=s<<18&1835008|a<<12&258048|l<<6&4032|f&63;d<65536||d>1114111?n+="����":(d-=65536,n+=String.fromCharCode(55296+(d>>10),56320+(d&1023))),o+=9;continue}}n+="�"}return n})}It.defaultChars=";/?:@&=+$,#";It.componentChars="";const gn={};function $i(e){let t=gn[e];if(t)return t;t=gn[e]=[];for(let u=0;u<128;u++){const r=String.fromCharCode(u);/^[0-9a-z]$/i.test(r)?t.push(r):t.push("%"+("0"+u.toString(16).toUpperCase()).slice(-2))}for(let u=0;u<e.length;u++)t[e.charCodeAt(u)]=e[u];return t}function Zt(e,t,u){typeof t!="string"&&(u=t,t=Zt.defaultChars),typeof u>"u"&&(u=!0);const r=$i(t);let n="";for(let o=0,i=e.length;o<i;o++){const s=e.charCodeAt(o);if(u&&s===37&&o+2<i&&/^[0-9a-f]{2}$/i.test(e.slice(o+1,o+3))){n+=e.slice(o,o+3),o+=2;continue}if(s<128){n+=r[s];continue}if(s>=55296&&s<=57343){if(s>=55296&&s<=56319&&o+1<i){const a=e.charCodeAt(o+1);if(a>=56320&&a<=57343){n+=encodeURIComponent(e[o]+e[o+1]),o++;continue}}n+="%EF%BF%BD";continue}n+=encodeURIComponent(e[o])}return n}Zt.defaultChars=";/?:@&=+$,-_.!~*'()#";Zt.componentChars="-_.!~*'()";function Zu(e){let t="";return t+=e.protocol||"",t+=e.slashes?"//":"",t+=e.auth?e.auth+"@":"",e.hostname&&e.hostname.indexOf(":")!==-1?t+="["+e.hostname+"]":t+=e.hostname||"",t+=e.port?":"+e.port:"",t+=e.pathname||"",t+=e.search||"",t+=e.hash||"",t}function au(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}const Bi=/^([a-z0-9.+-]+:)/i,Ri=/:[0-9]*$/,Li=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,zi=["<",">",'"',"`"," ","\r",`
200
+ `," "],qi=["{","}","|","\\","^","`"].concat(zi),Oi=["'"].concat(qi),vn=["%","/","?",";","#"].concat(Oi),yn=["/","?","#"],Ni=255,kn=/^[+a-z0-9A-Z_-]{0,63}$/,ji=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,_n={javascript:!0,"javascript:":!0},wn={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function Ku(e,t){if(e&&e instanceof au)return e;const u=new au;return u.parse(e,t),u}au.prototype.parse=function(e,t){let u,r,n,o=e;if(o=o.trim(),!t&&e.split("#").length===1){const l=Li.exec(o);if(l)return this.pathname=l[1],l[2]&&(this.search=l[2]),this}let i=Bi.exec(o);if(i&&(i=i[0],u=i.toLowerCase(),this.protocol=i,o=o.substr(i.length)),(t||i||o.match(/^\/\/[^@\/]+@[^@\/]+/))&&(n=o.substr(0,2)==="//",n&&!(i&&_n[i])&&(o=o.substr(2),this.slashes=!0)),!_n[i]&&(n||i&&!wn[i])){let l=-1;for(let p=0;p<yn.length;p++)r=o.indexOf(yn[p]),r!==-1&&(l===-1||r<l)&&(l=r);let f,d;l===-1?d=o.lastIndexOf("@"):d=o.lastIndexOf("@",l),d!==-1&&(f=o.slice(0,d),o=o.slice(d+1),this.auth=f),l=-1;for(let p=0;p<vn.length;p++)r=o.indexOf(vn[p]),r!==-1&&(l===-1||r<l)&&(l=r);l===-1&&(l=o.length),o[l-1]===":"&&l--;const b=o.slice(0,l);o=o.slice(l),this.parseHost(b),this.hostname=this.hostname||"";const x=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!x){const p=this.hostname.split(/\./);for(let D=0,T=p.length;D<T;D++){const F=p[D];if(F&&!F.match(kn)){let $="";for(let M=0,B=F.length;M<B;M++)F.charCodeAt(M)>127?$+="x":$+=F[M];if(!$.match(kn)){const M=p.slice(0,D),B=p.slice(D+1),q=F.match(ji);q&&(M.push(q[1]),B.unshift(q[2])),B.length&&(o=B.join(".")+o),this.hostname=M.join(".");break}}}}this.hostname.length>Ni&&(this.hostname=""),x&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}const s=o.indexOf("#");s!==-1&&(this.hash=o.substr(s),o=o.slice(0,s));const a=o.indexOf("?");return a!==-1&&(this.search=o.substr(a),o=o.slice(0,a)),o&&(this.pathname=o),wn[u]&&this.hostname&&!this.pathname&&(this.pathname=""),this};au.prototype.parseHost=function(e){let t=Ri.exec(e);t&&(t=t[0],t!==":"&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)};const Vi=Object.freeze(Object.defineProperty({__proto__:null,decode:It,encode:Zt,format:Zu,parse:Ku},Symbol.toStringTag,{value:"Module"})),lr=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,cr=/[\0-\x1F\x7F-\x9F]/,Hi=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u0890\u0891\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD80D[\uDC30-\uDC3F]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/,Xu=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDEAD\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/,dr=/[\$\+<->\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u0888\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20C0\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2B95\u2B97-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBC2\uFD40-\uFD4F\uFDCF\uFDFC-\uFDFF\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD833[\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF76\uDF7B-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0\uDCB1\uDD00-\uDE53\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC5\uDECE-\uDEDB\uDEE0-\uDEE8\uDEF0-\uDEF8\uDF00-\uDF92\uDF94-\uDFCA]/,fr=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/,Ui=Object.freeze(Object.defineProperty({__proto__:null,Any:lr,Cc:cr,Cf:Hi,P:Xu,S:dr,Z:fr},Symbol.toStringTag,{value:"Module"})),Wi=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),Zi=new Uint16Array("Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(e=>e.charCodeAt(0)));var ku;const Ki=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),Xi=(ku=String.fromCodePoint)!==null&&ku!==void 0?ku:function(e){let t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|e&1023),t+=String.fromCharCode(e),t};function Gi(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=Ki.get(e))!==null&&t!==void 0?t:e}var ze;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(ze||(ze={}));const Ji=32;var gt;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(gt||(gt={}));function Lu(e){return e>=ze.ZERO&&e<=ze.NINE}function Yi(e){return e>=ze.UPPER_A&&e<=ze.UPPER_F||e>=ze.LOWER_A&&e<=ze.LOWER_F}function Qi(e){return e>=ze.UPPER_A&&e<=ze.UPPER_Z||e>=ze.LOWER_A&&e<=ze.LOWER_Z||Lu(e)}function es(e){return e===ze.EQUALS||Qi(e)}var Le;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(Le||(Le={}));var bt;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(bt||(bt={}));class ts{constructor(t,u,r){this.decodeTree=t,this.emitCodePoint=u,this.errors=r,this.state=Le.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=bt.Strict}startEntity(t){this.decodeMode=t,this.state=Le.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,u){switch(this.state){case Le.EntityStart:return t.charCodeAt(u)===ze.NUM?(this.state=Le.NumericStart,this.consumed+=1,this.stateNumericStart(t,u+1)):(this.state=Le.NamedEntity,this.stateNamedEntity(t,u));case Le.NumericStart:return this.stateNumericStart(t,u);case Le.NumericDecimal:return this.stateNumericDecimal(t,u);case Le.NumericHex:return this.stateNumericHex(t,u);case Le.NamedEntity:return this.stateNamedEntity(t,u)}}stateNumericStart(t,u){return u>=t.length?-1:(t.charCodeAt(u)|Ji)===ze.LOWER_X?(this.state=Le.NumericHex,this.consumed+=1,this.stateNumericHex(t,u+1)):(this.state=Le.NumericDecimal,this.stateNumericDecimal(t,u))}addToNumericResult(t,u,r,n){if(u!==r){const o=r-u;this.result=this.result*Math.pow(n,o)+parseInt(t.substr(u,o),n),this.consumed+=o}}stateNumericHex(t,u){const r=u;for(;u<t.length;){const n=t.charCodeAt(u);if(Lu(n)||Yi(n))u+=1;else return this.addToNumericResult(t,r,u,16),this.emitNumericEntity(n,3)}return this.addToNumericResult(t,r,u,16),-1}stateNumericDecimal(t,u){const r=u;for(;u<t.length;){const n=t.charCodeAt(u);if(Lu(n))u+=1;else return this.addToNumericResult(t,r,u,10),this.emitNumericEntity(n,2)}return this.addToNumericResult(t,r,u,10),-1}emitNumericEntity(t,u){var r;if(this.consumed<=u)return(r=this.errors)===null||r===void 0||r.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===ze.SEMI)this.consumed+=1;else if(this.decodeMode===bt.Strict)return 0;return this.emitCodePoint(Gi(this.result),this.consumed),this.errors&&(t!==ze.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,u){const{decodeTree:r}=this;let n=r[this.treeIndex],o=(n&gt.VALUE_LENGTH)>>14;for(;u<t.length;u++,this.excess++){const i=t.charCodeAt(u);if(this.treeIndex=us(r,n,this.treeIndex+Math.max(1,o),i),this.treeIndex<0)return this.result===0||this.decodeMode===bt.Attribute&&(o===0||es(i))?0:this.emitNotTerminatedNamedEntity();if(n=r[this.treeIndex],o=(n&gt.VALUE_LENGTH)>>14,o!==0){if(i===ze.SEMI)return this.emitNamedEntityData(this.treeIndex,o,this.consumed+this.excess);this.decodeMode!==bt.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:u,decodeTree:r}=this,n=(r[u]&gt.VALUE_LENGTH)>>14;return this.emitNamedEntityData(u,n,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,u,r){const{decodeTree:n}=this;return this.emitCodePoint(u===1?n[t]&~gt.VALUE_LENGTH:n[t+1],r),u===3&&this.emitCodePoint(n[t+2],r),r}end(){var t;switch(this.state){case Le.NamedEntity:return this.result!==0&&(this.decodeMode!==bt.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Le.NumericDecimal:return this.emitNumericEntity(0,2);case Le.NumericHex:return this.emitNumericEntity(0,3);case Le.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Le.EntityStart:return 0}}}function pr(e){let t="";const u=new ts(e,r=>t+=Xi(r));return function(n,o){let i=0,s=0;for(;(s=n.indexOf("&",s))>=0;){t+=n.slice(i,s),u.startEntity(o);const l=u.write(n,s+1);if(l<0){i=s+u.end();break}i=s+l,s=l===0?i+1:i}const a=t+n.slice(i);return t="",a}}function us(e,t,u,r){const n=(t&gt.BRANCH_LENGTH)>>7,o=t&gt.JUMP_TABLE;if(n===0)return o!==0&&r===o?u:-1;if(o){const a=r-o;return a<0||a>=n?-1:e[u+a]-1}let i=u,s=i+n-1;for(;i<=s;){const a=i+s>>>1,l=e[a];if(l<r)i=a+1;else if(l>r)s=a-1;else return e[a+n]}return-1}const ns=pr(Wi);pr(Zi);function hr(e,t=bt.Legacy){return ns(e,t)}function rs(e){return Object.prototype.toString.call(e)}function Gu(e){return rs(e)==="[object String]"}const os=Object.prototype.hasOwnProperty;function is(e,t){return os.call(e,t)}function du(e){return Array.prototype.slice.call(arguments,1).forEach(function(u){if(u){if(typeof u!="object")throw new TypeError(u+"must be object");Object.keys(u).forEach(function(r){e[r]=u[r]})}}),e}function mr(e,t,u){return[].concat(e.slice(0,t),u,e.slice(t+1))}function Ju(e){return!(e>=55296&&e<=57343||e>=64976&&e<=65007||(e&65535)===65535||(e&65535)===65534||e>=0&&e<=8||e===11||e>=14&&e<=31||e>=127&&e<=159||e>1114111)}function lu(e){if(e>65535){e-=65536;const t=55296+(e>>10),u=56320+(e&1023);return String.fromCharCode(t,u)}return String.fromCharCode(e)}const br=/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g,ss=/&([a-z#][a-z0-9]{1,31});/gi,as=new RegExp(br.source+"|"+ss.source,"gi"),ls=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i;function cs(e,t){if(t.charCodeAt(0)===35&&ls.test(t)){const r=t[1].toLowerCase()==="x"?parseInt(t.slice(2),16):parseInt(t.slice(1),10);return Ju(r)?lu(r):e}const u=hr(e);return u!==e?u:e}function ds(e){return e.indexOf("\\")<0?e:e.replace(br,"$1")}function Pt(e){return e.indexOf("\\")<0&&e.indexOf("&")<0?e:e.replace(as,function(t,u,r){return u||cs(t,r)})}const fs=/[&<>"]/,ps=/[&<>"]/g,hs={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"};function ms(e){return hs[e]}function vt(e){return fs.test(e)?e.replace(ps,ms):e}const bs=/[.?*+^$[\]\\(){}|-]/g;function xs(e){return e.replace(bs,"\\$&")}function Se(e){switch(e){case 9:case 32:return!0}return!1}function Nt(e){if(e>=8192&&e<=8202)return!0;switch(e){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1}function jt(e){return Xu.test(e)||dr.test(e)}function Vt(e){switch(e){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}}function fu(e){return e=e.trim().replace(/\s+/g," "),"ẞ".toLowerCase()==="Ṿ"&&(e=e.replace(/ẞ/g,"ß")),e.toLowerCase().toUpperCase()}const gs={mdurl:Vi,ucmicro:Ui},vs=Object.freeze(Object.defineProperty({__proto__:null,arrayReplaceAt:mr,assign:du,escapeHtml:vt,escapeRE:xs,fromCodePoint:lu,has:is,isMdAsciiPunct:Vt,isPunctChar:jt,isSpace:Se,isString:Gu,isValidEntityCode:Ju,isWhiteSpace:Nt,lib:gs,normalizeReference:fu,unescapeAll:Pt,unescapeMd:ds},Symbol.toStringTag,{value:"Module"}));function ys(e,t,u){let r,n,o,i;const s=e.posMax,a=e.pos;for(e.pos=t+1,r=1;e.pos<s;){if(o=e.src.charCodeAt(e.pos),o===93&&(r--,r===0)){n=!0;break}if(i=e.pos,e.md.inline.skipToken(e),o===91){if(i===e.pos-1)r++;else if(u)return e.pos=a,-1}}let l=-1;return n&&(l=e.pos),e.pos=a,l}function ks(e,t,u){let r,n=t;const o={ok:!1,pos:0,str:""};if(e.charCodeAt(n)===60){for(n++;n<u;){if(r=e.charCodeAt(n),r===10||r===60)return o;if(r===62)return o.pos=n+1,o.str=Pt(e.slice(t+1,n)),o.ok=!0,o;if(r===92&&n+1<u){n+=2;continue}n++}return o}let i=0;for(;n<u&&(r=e.charCodeAt(n),!(r===32||r<32||r===127));){if(r===92&&n+1<u){if(e.charCodeAt(n+1)===32)break;n+=2;continue}if(r===40&&(i++,i>32))return o;if(r===41){if(i===0)break;i--}n++}return t===n||i!==0||(o.str=Pt(e.slice(t,n)),o.pos=n,o.ok=!0),o}function _s(e,t,u,r){let n,o=t;const i={ok:!1,can_continue:!1,pos:0,str:"",marker:0};if(r)i.str=r.str,i.marker=r.marker;else{if(o>=u)return i;let s=e.charCodeAt(o);if(s!==34&&s!==39&&s!==40)return i;t++,o++,s===40&&(s=41),i.marker=s}for(;o<u;){if(n=e.charCodeAt(o),n===i.marker)return i.pos=o+1,i.str+=Pt(e.slice(t,o)),i.ok=!0,i;if(n===40&&i.marker===41)return i;n===92&&o+1<u&&o++,o++}return i.can_continue=!0,i.str+=Pt(e.slice(t,o)),i}const ws=Object.freeze(Object.defineProperty({__proto__:null,parseLinkDestination:ks,parseLinkLabel:ys,parseLinkTitle:_s},Symbol.toStringTag,{value:"Module"})),lt={};lt.code_inline=function(e,t,u,r,n){const o=e[t];return"<code"+n.renderAttrs(o)+">"+vt(o.content)+"</code>"};lt.code_block=function(e,t,u,r,n){const o=e[t];return"<pre"+n.renderAttrs(o)+"><code>"+vt(e[t].content)+`</code></pre>
201
+ `};lt.fence=function(e,t,u,r,n){const o=e[t],i=o.info?Pt(o.info).trim():"";let s="",a="";if(i){const f=i.split(/(\s+)/g);s=f[0],a=f.slice(2).join("")}let l;if(u.highlight?l=u.highlight(o.content,s,a)||vt(o.content):l=vt(o.content),l.indexOf("<pre")===0)return l+`
202
+ `;if(i){const f=o.attrIndex("class"),d=o.attrs?o.attrs.slice():[];f<0?d.push(["class",u.langPrefix+s]):(d[f]=d[f].slice(),d[f][1]+=" "+u.langPrefix+s);const b={attrs:d};return`<pre><code${n.renderAttrs(b)}>${l}</code></pre>
203
+ `}return`<pre><code${n.renderAttrs(o)}>${l}</code></pre>
204
+ `};lt.image=function(e,t,u,r,n){const o=e[t];return o.attrs[o.attrIndex("alt")][1]=n.renderInlineAsText(o.children,u,r),n.renderToken(e,t,u)};lt.hardbreak=function(e,t,u){return u.xhtmlOut?`<br />
205
+ `:`<br>
206
+ `};lt.softbreak=function(e,t,u){return u.breaks?u.xhtmlOut?`<br />
207
+ `:`<br>
208
+ `:`
209
+ `};lt.text=function(e,t){return vt(e[t].content)};lt.html_block=function(e,t){return e[t].content};lt.html_inline=function(e,t){return e[t].content};function Mt(){this.rules=du({},lt)}Mt.prototype.renderAttrs=function(t){let u,r,n;if(!t.attrs)return"";for(n="",u=0,r=t.attrs.length;u<r;u++)n+=" "+vt(t.attrs[u][0])+'="'+vt(t.attrs[u][1])+'"';return n};Mt.prototype.renderToken=function(t,u,r){const n=t[u];let o="";if(n.hidden)return"";n.block&&n.nesting!==-1&&u&&t[u-1].hidden&&(o+=`
210
+ `),o+=(n.nesting===-1?"</":"<")+n.tag,o+=this.renderAttrs(n),n.nesting===0&&r.xhtmlOut&&(o+=" /");let i=!1;if(n.block&&(i=!0,n.nesting===1&&u+1<t.length)){const s=t[u+1];(s.type==="inline"||s.hidden||s.nesting===-1&&s.tag===n.tag)&&(i=!1)}return o+=i?`>
211
+ `:">",o};Mt.prototype.renderInline=function(e,t,u){let r="";const n=this.rules;for(let o=0,i=e.length;o<i;o++){const s=e[o].type;typeof n[s]<"u"?r+=n[s](e,o,t,u,this):r+=this.renderToken(e,o,t)}return r};Mt.prototype.renderInlineAsText=function(e,t,u){let r="";for(let n=0,o=e.length;n<o;n++)switch(e[n].type){case"text":r+=e[n].content;break;case"image":r+=this.renderInlineAsText(e[n].children,t,u);break;case"html_inline":case"html_block":r+=e[n].content;break;case"softbreak":case"hardbreak":r+=`
212
+ `;break}return r};Mt.prototype.render=function(e,t,u){let r="";const n=this.rules;for(let o=0,i=e.length;o<i;o++){const s=e[o].type;s==="inline"?r+=this.renderInline(e[o].children,t,u):typeof n[s]<"u"?r+=n[s](e,o,t,u,this):r+=this.renderToken(e,o,t,u)}return r};function Ye(){this.__rules__=[],this.__cache__=null}Ye.prototype.__find__=function(e){for(let t=0;t<this.__rules__.length;t++)if(this.__rules__[t].name===e)return t;return-1};Ye.prototype.__compile__=function(){const e=this,t=[""];e.__rules__.forEach(function(u){u.enabled&&u.alt.forEach(function(r){t.indexOf(r)<0&&t.push(r)})}),e.__cache__={},t.forEach(function(u){e.__cache__[u]=[],e.__rules__.forEach(function(r){r.enabled&&(u&&r.alt.indexOf(u)<0||e.__cache__[u].push(r.fn))})})};Ye.prototype.at=function(e,t,u){const r=this.__find__(e),n=u||{};if(r===-1)throw new Error("Parser rule not found: "+e);this.__rules__[r].fn=t,this.__rules__[r].alt=n.alt||[],this.__cache__=null};Ye.prototype.before=function(e,t,u,r){const n=this.__find__(e),o=r||{};if(n===-1)throw new Error("Parser rule not found: "+e);this.__rules__.splice(n,0,{name:t,enabled:!0,fn:u,alt:o.alt||[]}),this.__cache__=null};Ye.prototype.after=function(e,t,u,r){const n=this.__find__(e),o=r||{};if(n===-1)throw new Error("Parser rule not found: "+e);this.__rules__.splice(n+1,0,{name:t,enabled:!0,fn:u,alt:o.alt||[]}),this.__cache__=null};Ye.prototype.push=function(e,t,u){const r=u||{};this.__rules__.push({name:e,enabled:!0,fn:t,alt:r.alt||[]}),this.__cache__=null};Ye.prototype.enable=function(e,t){Array.isArray(e)||(e=[e]);const u=[];return e.forEach(function(r){const n=this.__find__(r);if(n<0){if(t)return;throw new Error("Rules manager: invalid rule name "+r)}this.__rules__[n].enabled=!0,u.push(r)},this),this.__cache__=null,u};Ye.prototype.enableOnly=function(e,t){Array.isArray(e)||(e=[e]),this.__rules__.forEach(function(u){u.enabled=!1}),this.enable(e,t)};Ye.prototype.disable=function(e,t){Array.isArray(e)||(e=[e]);const u=[];return e.forEach(function(r){const n=this.__find__(r);if(n<0){if(t)return;throw new Error("Rules manager: invalid rule name "+r)}this.__rules__[n].enabled=!1,u.push(r)},this),this.__cache__=null,u};Ye.prototype.getRules=function(e){return this.__cache__===null&&this.__compile__(),this.__cache__[e]||[]};function it(e,t,u){this.type=e,this.tag=t,this.attrs=null,this.map=null,this.nesting=u,this.level=0,this.children=null,this.content="",this.markup="",this.info="",this.meta=null,this.block=!1,this.hidden=!1}it.prototype.attrIndex=function(t){if(!this.attrs)return-1;const u=this.attrs;for(let r=0,n=u.length;r<n;r++)if(u[r][0]===t)return r;return-1};it.prototype.attrPush=function(t){this.attrs?this.attrs.push(t):this.attrs=[t]};it.prototype.attrSet=function(t,u){const r=this.attrIndex(t),n=[t,u];r<0?this.attrPush(n):this.attrs[r]=n};it.prototype.attrGet=function(t){const u=this.attrIndex(t);let r=null;return u>=0&&(r=this.attrs[u][1]),r};it.prototype.attrJoin=function(t,u){const r=this.attrIndex(t);r<0?this.attrPush([t,u]):this.attrs[r][1]=this.attrs[r][1]+" "+u};function xr(e,t,u){this.src=e,this.env=u,this.tokens=[],this.inlineMode=!1,this.md=t}xr.prototype.Token=it;const Ss=/\r\n?|\n/g,Cs=/\0/g;function Ds(e){let t;t=e.src.replace(Ss,`
213
+ `),t=t.replace(Cs,"�"),e.src=t}function Es(e){let t;e.inlineMode?(t=new e.Token("inline","",0),t.content=e.src,t.map=[0,1],t.children=[],e.tokens.push(t)):e.md.block.parse(e.src,e.md,e.env,e.tokens)}function As(e){const t=e.tokens;for(let u=0,r=t.length;u<r;u++){const n=t[u];n.type==="inline"&&e.md.inline.parse(n.content,e.md,e.env,n.children)}}function Ts(e){return/^<a[>\s]/i.test(e)}function Fs(e){return/^<\/a\s*>/i.test(e)}function Is(e){const t=e.tokens;if(e.md.options.linkify)for(let u=0,r=t.length;u<r;u++){if(t[u].type!=="inline"||!e.md.linkify.pretest(t[u].content))continue;let n=t[u].children,o=0;for(let i=n.length-1;i>=0;i--){const s=n[i];if(s.type==="link_close"){for(i--;n[i].level!==s.level&&n[i].type!=="link_open";)i--;continue}if(s.type==="html_inline"&&(Ts(s.content)&&o>0&&o--,Fs(s.content)&&o++),!(o>0)&&s.type==="text"&&e.md.linkify.test(s.content)){const a=s.content;let l=e.md.linkify.match(a);const f=[];let d=s.level,b=0;l.length>0&&l[0].index===0&&i>0&&n[i-1].type==="text_special"&&(l=l.slice(1));for(let x=0;x<l.length;x++){const p=l[x].url,D=e.md.normalizeLink(p);if(!e.md.validateLink(D))continue;let T=l[x].text;l[x].schema?l[x].schema==="mailto:"&&!/^mailto:/i.test(T)?T=e.md.normalizeLinkText("mailto:"+T).replace(/^mailto:/,""):T=e.md.normalizeLinkText(T):T=e.md.normalizeLinkText("http://"+T).replace(/^http:\/\//,"");const F=l[x].index;if(F>b){const q=new e.Token("text","",0);q.content=a.slice(b,F),q.level=d,f.push(q)}const $=new e.Token("link_open","a",1);$.attrs=[["href",D]],$.level=d++,$.markup="linkify",$.info="auto",f.push($);const M=new e.Token("text","",0);M.content=T,M.level=d,f.push(M);const B=new e.Token("link_close","a",-1);B.level=--d,B.markup="linkify",B.info="auto",f.push(B),b=l[x].lastIndex}if(b<a.length){const x=new e.Token("text","",0);x.content=a.slice(b),x.level=d,f.push(x)}t[u].children=n=mr(n,i,f)}}}}const gr=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,Ps=/\((c|tm|r)\)/i,Ms=/\((c|tm|r)\)/ig,$s={c:"©",r:"®",tm:"™"};function Bs(e,t){return $s[t.toLowerCase()]}function Rs(e){let t=0;for(let u=e.length-1;u>=0;u--){const r=e[u];r.type==="text"&&!t&&(r.content=r.content.replace(Ms,Bs)),r.type==="link_open"&&r.info==="auto"&&t--,r.type==="link_close"&&r.info==="auto"&&t++}}function Ls(e){let t=0;for(let u=e.length-1;u>=0;u--){const r=e[u];r.type==="text"&&!t&&gr.test(r.content)&&(r.content=r.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/mg,"$1—").replace(/(^|\s)--(?=\s|$)/mg,"$1–").replace(/(^|[^-\s])--(?=[^-\s]|$)/mg,"$1–")),r.type==="link_open"&&r.info==="auto"&&t--,r.type==="link_close"&&r.info==="auto"&&t++}}function zs(e){let t;if(e.md.options.typographer)for(t=e.tokens.length-1;t>=0;t--)e.tokens[t].type==="inline"&&(Ps.test(e.tokens[t].content)&&Rs(e.tokens[t].children),gr.test(e.tokens[t].content)&&Ls(e.tokens[t].children))}const qs=/['"]/,Sn=/['"]/g,Cn="’";function Jt(e,t,u){return e.slice(0,t)+u+e.slice(t+1)}function Os(e,t){let u;const r=[];for(let n=0;n<e.length;n++){const o=e[n],i=e[n].level;for(u=r.length-1;u>=0&&!(r[u].level<=i);u--);if(r.length=u+1,o.type!=="text")continue;let s=o.content,a=0,l=s.length;e:for(;a<l;){Sn.lastIndex=a;const f=Sn.exec(s);if(!f)break;let d=!0,b=!0;a=f.index+1;const x=f[0]==="'";let p=32;if(f.index-1>=0)p=s.charCodeAt(f.index-1);else for(u=n-1;u>=0&&!(e[u].type==="softbreak"||e[u].type==="hardbreak");u--)if(e[u].content){p=e[u].content.charCodeAt(e[u].content.length-1);break}let D=32;if(a<l)D=s.charCodeAt(a);else for(u=n+1;u<e.length&&!(e[u].type==="softbreak"||e[u].type==="hardbreak");u++)if(e[u].content){D=e[u].content.charCodeAt(0);break}const T=Vt(p)||jt(String.fromCharCode(p)),F=Vt(D)||jt(String.fromCharCode(D)),$=Nt(p),M=Nt(D);if(M?d=!1:F&&($||T||(d=!1)),$?b=!1:T&&(M||F||(b=!1)),D===34&&f[0]==='"'&&p>=48&&p<=57&&(b=d=!1),d&&b&&(d=T,b=F),!d&&!b){x&&(o.content=Jt(o.content,f.index,Cn));continue}if(b)for(u=r.length-1;u>=0;u--){let B=r[u];if(r[u].level<i)break;if(B.single===x&&r[u].level===i){B=r[u];let q,H;x?(q=t.md.options.quotes[2],H=t.md.options.quotes[3]):(q=t.md.options.quotes[0],H=t.md.options.quotes[1]),o.content=Jt(o.content,f.index,H),e[B.token].content=Jt(e[B.token].content,B.pos,q),a+=H.length-1,B.token===n&&(a+=q.length-1),s=o.content,l=s.length,r.length=u;continue e}}d?r.push({token:n,pos:f.index,single:x,level:i}):b&&x&&(o.content=Jt(o.content,f.index,Cn))}}}function Ns(e){if(e.md.options.typographer)for(let t=e.tokens.length-1;t>=0;t--)e.tokens[t].type!=="inline"||!qs.test(e.tokens[t].content)||Os(e.tokens[t].children,e)}function js(e){let t,u;const r=e.tokens,n=r.length;for(let o=0;o<n;o++){if(r[o].type!=="inline")continue;const i=r[o].children,s=i.length;for(t=0;t<s;t++)i[t].type==="text_special"&&(i[t].type="text");for(t=u=0;t<s;t++)i[t].type==="text"&&t+1<s&&i[t+1].type==="text"?i[t+1].content=i[t].content+i[t+1].content:(t!==u&&(i[u]=i[t]),u++);t!==u&&(i.length=u)}}const _u=[["normalize",Ds],["block",Es],["inline",As],["linkify",Is],["replacements",zs],["smartquotes",Ns],["text_join",js]];function Yu(){this.ruler=new Ye;for(let e=0;e<_u.length;e++)this.ruler.push(_u[e][0],_u[e][1])}Yu.prototype.process=function(e){const t=this.ruler.getRules("");for(let u=0,r=t.length;u<r;u++)t[u](e)};Yu.prototype.State=xr;function ct(e,t,u,r){this.src=e,this.md=t,this.env=u,this.tokens=r,this.bMarks=[],this.eMarks=[],this.tShift=[],this.sCount=[],this.bsCount=[],this.blkIndent=0,this.line=0,this.lineMax=0,this.tight=!1,this.ddIndent=-1,this.listIndent=-1,this.parentType="root",this.level=0;const n=this.src;for(let o=0,i=0,s=0,a=0,l=n.length,f=!1;i<l;i++){const d=n.charCodeAt(i);if(!f)if(Se(d)){s++,d===9?a+=4-a%4:a++;continue}else f=!0;(d===10||i===l-1)&&(d!==10&&i++,this.bMarks.push(o),this.eMarks.push(i),this.tShift.push(s),this.sCount.push(a),this.bsCount.push(0),f=!1,s=0,a=0,o=i+1)}this.bMarks.push(n.length),this.eMarks.push(n.length),this.tShift.push(0),this.sCount.push(0),this.bsCount.push(0),this.lineMax=this.bMarks.length-1}ct.prototype.push=function(e,t,u){const r=new it(e,t,u);return r.block=!0,u<0&&this.level--,r.level=this.level,u>0&&this.level++,this.tokens.push(r),r};ct.prototype.isEmpty=function(t){return this.bMarks[t]+this.tShift[t]>=this.eMarks[t]};ct.prototype.skipEmptyLines=function(t){for(let u=this.lineMax;t<u&&!(this.bMarks[t]+this.tShift[t]<this.eMarks[t]);t++);return t};ct.prototype.skipSpaces=function(t){for(let u=this.src.length;t<u;t++){const r=this.src.charCodeAt(t);if(!Se(r))break}return t};ct.prototype.skipSpacesBack=function(t,u){if(t<=u)return t;for(;t>u;)if(!Se(this.src.charCodeAt(--t)))return t+1;return t};ct.prototype.skipChars=function(t,u){for(let r=this.src.length;t<r&&this.src.charCodeAt(t)===u;t++);return t};ct.prototype.skipCharsBack=function(t,u,r){if(t<=r)return t;for(;t>r;)if(u!==this.src.charCodeAt(--t))return t+1;return t};ct.prototype.getLines=function(t,u,r,n){if(t>=u)return"";const o=new Array(u-t);for(let i=0,s=t;s<u;s++,i++){let a=0;const l=this.bMarks[s];let f=l,d;for(s+1<u||n?d=this.eMarks[s]+1:d=this.eMarks[s];f<d&&a<r;){const b=this.src.charCodeAt(f);if(Se(b))b===9?a+=4-(a+this.bsCount[s])%4:a++;else if(f-l<this.tShift[s])a++;else break;f++}a>r?o[i]=new Array(a-r+1).join(" ")+this.src.slice(f,d):o[i]=this.src.slice(f,d)}return o.join("")};ct.prototype.Token=it;const Vs=65536;function wu(e,t){const u=e.bMarks[t]+e.tShift[t],r=e.eMarks[t];return e.src.slice(u,r)}function Dn(e){const t=[],u=e.length;let r=0,n=e.charCodeAt(r),o=!1,i=0,s="";for(;r<u;)n===124&&(o?(s+=e.substring(i,r-1),i=r):(t.push(s+e.substring(i,r)),s="",i=r+1)),o=n===92,r++,n=e.charCodeAt(r);return t.push(s+e.substring(i)),t}function Hs(e,t,u,r){if(t+2>u)return!1;let n=t+1;if(e.sCount[n]<e.blkIndent||e.sCount[n]-e.blkIndent>=4)return!1;let o=e.bMarks[n]+e.tShift[n];if(o>=e.eMarks[n])return!1;const i=e.src.charCodeAt(o++);if(i!==124&&i!==45&&i!==58||o>=e.eMarks[n])return!1;const s=e.src.charCodeAt(o++);if(s!==124&&s!==45&&s!==58&&!Se(s)||i===45&&Se(s))return!1;for(;o<e.eMarks[n];){const B=e.src.charCodeAt(o);if(B!==124&&B!==45&&B!==58&&!Se(B))return!1;o++}let a=wu(e,t+1),l=a.split("|");const f=[];for(let B=0;B<l.length;B++){const q=l[B].trim();if(!q){if(B===0||B===l.length-1)continue;return!1}if(!/^:?-+:?$/.test(q))return!1;q.charCodeAt(q.length-1)===58?f.push(q.charCodeAt(0)===58?"center":"right"):q.charCodeAt(0)===58?f.push("left"):f.push("")}if(a=wu(e,t).trim(),a.indexOf("|")===-1||e.sCount[t]-e.blkIndent>=4)return!1;l=Dn(a),l.length&&l[0]===""&&l.shift(),l.length&&l[l.length-1]===""&&l.pop();const d=l.length;if(d===0||d!==f.length)return!1;if(r)return!0;const b=e.parentType;e.parentType="table";const x=e.md.block.ruler.getRules("blockquote"),p=e.push("table_open","table",1),D=[t,0];p.map=D;const T=e.push("thead_open","thead",1);T.map=[t,t+1];const F=e.push("tr_open","tr",1);F.map=[t,t+1];for(let B=0;B<l.length;B++){const q=e.push("th_open","th",1);f[B]&&(q.attrs=[["style","text-align:"+f[B]]]);const H=e.push("inline","",0);H.content=l[B].trim(),H.children=[],e.push("th_close","th",-1)}e.push("tr_close","tr",-1),e.push("thead_close","thead",-1);let $,M=0;for(n=t+2;n<u&&!(e.sCount[n]<e.blkIndent);n++){let B=!1;for(let H=0,G=x.length;H<G;H++)if(x[H](e,n,u,!0)){B=!0;break}if(B||(a=wu(e,n).trim(),!a)||e.sCount[n]-e.blkIndent>=4||(l=Dn(a),l.length&&l[0]===""&&l.shift(),l.length&&l[l.length-1]===""&&l.pop(),M+=d-l.length,M>Vs))break;if(n===t+2){const H=e.push("tbody_open","tbody",1);H.map=$=[t+2,0]}const q=e.push("tr_open","tr",1);q.map=[n,n+1];for(let H=0;H<d;H++){const G=e.push("td_open","td",1);f[H]&&(G.attrs=[["style","text-align:"+f[H]]]);const Z=e.push("inline","",0);Z.content=l[H]?l[H].trim():"",Z.children=[],e.push("td_close","td",-1)}e.push("tr_close","tr",-1)}return $&&(e.push("tbody_close","tbody",-1),$[1]=n),e.push("table_close","table",-1),D[1]=n,e.parentType=b,e.line=n,!0}function Us(e,t,u){if(e.sCount[t]-e.blkIndent<4)return!1;let r=t+1,n=r;for(;r<u;){if(e.isEmpty(r)){r++;continue}if(e.sCount[r]-e.blkIndent>=4){r++,n=r;continue}break}e.line=n;const o=e.push("code_block","code",0);return o.content=e.getLines(t,n,4+e.blkIndent,!1)+`
214
+ `,o.map=[t,e.line],!0}function Ws(e,t,u,r){let n=e.bMarks[t]+e.tShift[t],o=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||n+3>o)return!1;const i=e.src.charCodeAt(n);if(i!==126&&i!==96)return!1;let s=n;n=e.skipChars(n,i);let a=n-s;if(a<3)return!1;const l=e.src.slice(s,n),f=e.src.slice(n,o);if(i===96&&f.indexOf(String.fromCharCode(i))>=0)return!1;if(r)return!0;let d=t,b=!1;for(;d++,!(d>=u||(n=s=e.bMarks[d]+e.tShift[d],o=e.eMarks[d],n<o&&e.sCount[d]<e.blkIndent));)if(e.src.charCodeAt(n)===i&&!(e.sCount[d]-e.blkIndent>=4)&&(n=e.skipChars(n,i),!(n-s<a)&&(n=e.skipSpaces(n),!(n<o)))){b=!0;break}a=e.sCount[t],e.line=d+(b?1:0);const x=e.push("fence","code",0);return x.info=f,x.content=e.getLines(t+1,d,a,!0),x.markup=l,x.map=[t,e.line],!0}function Zs(e,t,u,r){let n=e.bMarks[t]+e.tShift[t],o=e.eMarks[t];const i=e.lineMax;if(e.sCount[t]-e.blkIndent>=4||e.src.charCodeAt(n)!==62)return!1;if(r)return!0;const s=[],a=[],l=[],f=[],d=e.md.block.ruler.getRules("blockquote"),b=e.parentType;e.parentType="blockquote";let x=!1,p;for(p=t;p<u;p++){const M=e.sCount[p]<e.blkIndent;if(n=e.bMarks[p]+e.tShift[p],o=e.eMarks[p],n>=o)break;if(e.src.charCodeAt(n++)===62&&!M){let q=e.sCount[p]+1,H,G;e.src.charCodeAt(n)===32?(n++,q++,G=!1,H=!0):e.src.charCodeAt(n)===9?(H=!0,(e.bsCount[p]+q)%4===3?(n++,q++,G=!1):G=!0):H=!1;let Z=q;for(s.push(e.bMarks[p]),e.bMarks[p]=n;n<o;){const U=e.src.charCodeAt(n);if(Se(U))U===9?Z+=4-(Z+e.bsCount[p]+(G?1:0))%4:Z++;else break;n++}x=n>=o,a.push(e.bsCount[p]),e.bsCount[p]=e.sCount[p]+1+(H?1:0),l.push(e.sCount[p]),e.sCount[p]=Z-q,f.push(e.tShift[p]),e.tShift[p]=n-e.bMarks[p];continue}if(x)break;let B=!1;for(let q=0,H=d.length;q<H;q++)if(d[q](e,p,u,!0)){B=!0;break}if(B){e.lineMax=p,e.blkIndent!==0&&(s.push(e.bMarks[p]),a.push(e.bsCount[p]),f.push(e.tShift[p]),l.push(e.sCount[p]),e.sCount[p]-=e.blkIndent);break}s.push(e.bMarks[p]),a.push(e.bsCount[p]),f.push(e.tShift[p]),l.push(e.sCount[p]),e.sCount[p]=-1}const D=e.blkIndent;e.blkIndent=0;const T=e.push("blockquote_open","blockquote",1);T.markup=">";const F=[t,0];T.map=F,e.md.block.tokenize(e,t,p);const $=e.push("blockquote_close","blockquote",-1);$.markup=">",e.lineMax=i,e.parentType=b,F[1]=e.line;for(let M=0;M<f.length;M++)e.bMarks[M+t]=s[M],e.tShift[M+t]=f[M],e.sCount[M+t]=l[M],e.bsCount[M+t]=a[M];return e.blkIndent=D,!0}function Ks(e,t,u,r){const n=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;let o=e.bMarks[t]+e.tShift[t];const i=e.src.charCodeAt(o++);if(i!==42&&i!==45&&i!==95)return!1;let s=1;for(;o<n;){const l=e.src.charCodeAt(o++);if(l!==i&&!Se(l))return!1;l===i&&s++}if(s<3)return!1;if(r)return!0;e.line=t+1;const a=e.push("hr","hr",0);return a.map=[t,e.line],a.markup=Array(s+1).join(String.fromCharCode(i)),!0}function En(e,t){const u=e.eMarks[t];let r=e.bMarks[t]+e.tShift[t];const n=e.src.charCodeAt(r++);if(n!==42&&n!==45&&n!==43)return-1;if(r<u){const o=e.src.charCodeAt(r);if(!Se(o))return-1}return r}function An(e,t){const u=e.bMarks[t]+e.tShift[t],r=e.eMarks[t];let n=u;if(n+1>=r)return-1;let o=e.src.charCodeAt(n++);if(o<48||o>57)return-1;for(;;){if(n>=r)return-1;if(o=e.src.charCodeAt(n++),o>=48&&o<=57){if(n-u>=10)return-1;continue}if(o===41||o===46)break;return-1}return n<r&&(o=e.src.charCodeAt(n),!Se(o))?-1:n}function Xs(e,t){const u=e.level+2;for(let r=t+2,n=e.tokens.length-2;r<n;r++)e.tokens[r].level===u&&e.tokens[r].type==="paragraph_open"&&(e.tokens[r+2].hidden=!0,e.tokens[r].hidden=!0,r+=2)}function Gs(e,t,u,r){let n,o,i,s,a=t,l=!0;if(e.sCount[a]-e.blkIndent>=4||e.listIndent>=0&&e.sCount[a]-e.listIndent>=4&&e.sCount[a]<e.blkIndent)return!1;let f=!1;r&&e.parentType==="paragraph"&&e.sCount[a]>=e.blkIndent&&(f=!0);let d,b,x;if((x=An(e,a))>=0){if(d=!0,i=e.bMarks[a]+e.tShift[a],b=Number(e.src.slice(i,x-1)),f&&b!==1)return!1}else if((x=En(e,a))>=0)d=!1;else return!1;if(f&&e.skipSpaces(x)>=e.eMarks[a])return!1;if(r)return!0;const p=e.src.charCodeAt(x-1),D=e.tokens.length;d?(s=e.push("ordered_list_open","ol",1),b!==1&&(s.attrs=[["start",b]])):s=e.push("bullet_list_open","ul",1);const T=[a,0];s.map=T,s.markup=String.fromCharCode(p);let F=!1;const $=e.md.block.ruler.getRules("list"),M=e.parentType;for(e.parentType="list";a<u;){o=x,n=e.eMarks[a];const B=e.sCount[a]+x-(e.bMarks[a]+e.tShift[a]);let q=B;for(;o<n;){const Q=e.src.charCodeAt(o);if(Q===9)q+=4-(q+e.bsCount[a])%4;else if(Q===32)q++;else break;o++}const H=o;let G;H>=n?G=1:G=q-B,G>4&&(G=1);const Z=B+G;s=e.push("list_item_open","li",1),s.markup=String.fromCharCode(p);const U=[a,0];s.map=U,d&&(s.info=e.src.slice(i,x-1));const L=e.tight,z=e.tShift[a],V=e.sCount[a],X=e.listIndent;if(e.listIndent=e.blkIndent,e.blkIndent=Z,e.tight=!0,e.tShift[a]=H-e.bMarks[a],e.sCount[a]=q,H>=n&&e.isEmpty(a+1)?e.line=Math.min(e.line+2,u):e.md.block.tokenize(e,a,u,!0),(!e.tight||F)&&(l=!1),F=e.line-a>1&&e.isEmpty(e.line-1),e.blkIndent=e.listIndent,e.listIndent=X,e.tShift[a]=z,e.sCount[a]=V,e.tight=L,s=e.push("list_item_close","li",-1),s.markup=String.fromCharCode(p),a=e.line,U[1]=a,a>=u||e.sCount[a]<e.blkIndent||e.sCount[a]-e.blkIndent>=4)break;let ne=!1;for(let Q=0,se=$.length;Q<se;Q++)if($[Q](e,a,u,!0)){ne=!0;break}if(ne)break;if(d){if(x=An(e,a),x<0)break;i=e.bMarks[a]+e.tShift[a]}else if(x=En(e,a),x<0)break;if(p!==e.src.charCodeAt(x-1))break}return d?s=e.push("ordered_list_close","ol",-1):s=e.push("bullet_list_close","ul",-1),s.markup=String.fromCharCode(p),T[1]=a,e.line=a,e.parentType=M,l&&Xs(e,D),!0}function Js(e,t,u,r){let n=e.bMarks[t]+e.tShift[t],o=e.eMarks[t],i=t+1;if(e.sCount[t]-e.blkIndent>=4||e.src.charCodeAt(n)!==91)return!1;function s($){const M=e.lineMax;if($>=M||e.isEmpty($))return null;let B=!1;if(e.sCount[$]-e.blkIndent>3&&(B=!0),e.sCount[$]<0&&(B=!0),!B){const G=e.md.block.ruler.getRules("reference"),Z=e.parentType;e.parentType="reference";let U=!1;for(let L=0,z=G.length;L<z;L++)if(G[L](e,$,M,!0)){U=!0;break}if(e.parentType=Z,U)return null}const q=e.bMarks[$]+e.tShift[$],H=e.eMarks[$];return e.src.slice(q,H+1)}let a=e.src.slice(n,o+1);o=a.length;let l=-1;for(n=1;n<o;n++){const $=a.charCodeAt(n);if($===91)return!1;if($===93){l=n;break}else if($===10){const M=s(i);M!==null&&(a+=M,o=a.length,i++)}else if($===92&&(n++,n<o&&a.charCodeAt(n)===10)){const M=s(i);M!==null&&(a+=M,o=a.length,i++)}}if(l<0||a.charCodeAt(l+1)!==58)return!1;for(n=l+2;n<o;n++){const $=a.charCodeAt(n);if($===10){const M=s(i);M!==null&&(a+=M,o=a.length,i++)}else if(!Se($))break}const f=e.md.helpers.parseLinkDestination(a,n,o);if(!f.ok)return!1;const d=e.md.normalizeLink(f.str);if(!e.md.validateLink(d))return!1;n=f.pos;const b=n,x=i,p=n;for(;n<o;n++){const $=a.charCodeAt(n);if($===10){const M=s(i);M!==null&&(a+=M,o=a.length,i++)}else if(!Se($))break}let D=e.md.helpers.parseLinkTitle(a,n,o);for(;D.can_continue;){const $=s(i);if($===null)break;a+=$,n=o,o=a.length,i++,D=e.md.helpers.parseLinkTitle(a,n,o,D)}let T;for(n<o&&p!==n&&D.ok?(T=D.str,n=D.pos):(T="",n=b,i=x);n<o;){const $=a.charCodeAt(n);if(!Se($))break;n++}if(n<o&&a.charCodeAt(n)!==10&&T)for(T="",n=b,i=x;n<o;){const $=a.charCodeAt(n);if(!Se($))break;n++}if(n<o&&a.charCodeAt(n)!==10)return!1;const F=fu(a.slice(1,l));return F?(r||(typeof e.env.references>"u"&&(e.env.references={}),typeof e.env.references[F]>"u"&&(e.env.references[F]={title:T,href:d}),e.line=i),!0):!1}const Ys=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Qs="[a-zA-Z_:][a-zA-Z0-9:._-]*",ea="[^\"'=<>`\\x00-\\x20]+",ta="'[^']*'",ua='"[^"]*"',na="(?:"+ea+"|"+ta+"|"+ua+")",ra="(?:\\s+"+Qs+"(?:\\s*=\\s*"+na+")?)",vr="<[A-Za-z][A-Za-z0-9\\-]*"+ra+"*\\s*\\/?>",yr="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",oa="<!---?>|<!--(?:[^-]|-[^-]|--[^>])*-->",ia="<[?][\\s\\S]*?[?]>",sa="<![A-Za-z][^>]*>",aa="<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",la=new RegExp("^(?:"+vr+"|"+yr+"|"+oa+"|"+ia+"|"+sa+"|"+aa+")"),ca=new RegExp("^(?:"+vr+"|"+yr+")"),Dt=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[new RegExp("^</?("+Ys.join("|")+")(?=(\\s|/?>|$))","i"),/^$/,!0],[new RegExp(ca.source+"\\s*$"),/^$/,!1]];function da(e,t,u,r){let n=e.bMarks[t]+e.tShift[t],o=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||!e.md.options.html||e.src.charCodeAt(n)!==60)return!1;let i=e.src.slice(n,o),s=0;for(;s<Dt.length&&!Dt[s][0].test(i);s++);if(s===Dt.length)return!1;if(r)return Dt[s][2];let a=t+1;if(!Dt[s][1].test(i)){for(;a<u&&!(e.sCount[a]<e.blkIndent);a++)if(n=e.bMarks[a]+e.tShift[a],o=e.eMarks[a],i=e.src.slice(n,o),Dt[s][1].test(i)){i.length!==0&&a++;break}}e.line=a;const l=e.push("html_block","",0);return l.map=[t,a],l.content=e.getLines(t,a,e.blkIndent,!0),!0}function fa(e,t,u,r){let n=e.bMarks[t]+e.tShift[t],o=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;let i=e.src.charCodeAt(n);if(i!==35||n>=o)return!1;let s=1;for(i=e.src.charCodeAt(++n);i===35&&n<o&&s<=6;)s++,i=e.src.charCodeAt(++n);if(s>6||n<o&&!Se(i))return!1;if(r)return!0;o=e.skipSpacesBack(o,n);const a=e.skipCharsBack(o,35,n);a>n&&Se(e.src.charCodeAt(a-1))&&(o=a),e.line=t+1;const l=e.push("heading_open","h"+String(s),1);l.markup="########".slice(0,s),l.map=[t,e.line];const f=e.push("inline","",0);f.content=e.src.slice(n,o).trim(),f.map=[t,e.line],f.children=[];const d=e.push("heading_close","h"+String(s),-1);return d.markup="########".slice(0,s),!0}function pa(e,t,u){const r=e.md.block.ruler.getRules("paragraph");if(e.sCount[t]-e.blkIndent>=4)return!1;const n=e.parentType;e.parentType="paragraph";let o=0,i,s=t+1;for(;s<u&&!e.isEmpty(s);s++){if(e.sCount[s]-e.blkIndent>3)continue;if(e.sCount[s]>=e.blkIndent){let x=e.bMarks[s]+e.tShift[s];const p=e.eMarks[s];if(x<p&&(i=e.src.charCodeAt(x),(i===45||i===61)&&(x=e.skipChars(x,i),x=e.skipSpaces(x),x>=p))){o=i===61?1:2;break}}if(e.sCount[s]<0)continue;let b=!1;for(let x=0,p=r.length;x<p;x++)if(r[x](e,s,u,!0)){b=!0;break}if(b)break}if(!o)return!1;const a=e.getLines(t,s,e.blkIndent,!1).trim();e.line=s+1;const l=e.push("heading_open","h"+String(o),1);l.markup=String.fromCharCode(i),l.map=[t,e.line];const f=e.push("inline","",0);f.content=a,f.map=[t,e.line-1],f.children=[];const d=e.push("heading_close","h"+String(o),-1);return d.markup=String.fromCharCode(i),e.parentType=n,!0}function ha(e,t,u){const r=e.md.block.ruler.getRules("paragraph"),n=e.parentType;let o=t+1;for(e.parentType="paragraph";o<u&&!e.isEmpty(o);o++){if(e.sCount[o]-e.blkIndent>3||e.sCount[o]<0)continue;let l=!1;for(let f=0,d=r.length;f<d;f++)if(r[f](e,o,u,!0)){l=!0;break}if(l)break}const i=e.getLines(t,o,e.blkIndent,!1).trim();e.line=o;const s=e.push("paragraph_open","p",1);s.map=[t,e.line];const a=e.push("inline","",0);return a.content=i,a.map=[t,e.line],a.children=[],e.push("paragraph_close","p",-1),e.parentType=n,!0}const Yt=[["table",Hs,["paragraph","reference"]],["code",Us],["fence",Ws,["paragraph","reference","blockquote","list"]],["blockquote",Zs,["paragraph","reference","blockquote","list"]],["hr",Ks,["paragraph","reference","blockquote","list"]],["list",Gs,["paragraph","reference","blockquote"]],["reference",Js],["html_block",da,["paragraph","reference","blockquote"]],["heading",fa,["paragraph","reference","blockquote"]],["lheading",pa],["paragraph",ha]];function pu(){this.ruler=new Ye;for(let e=0;e<Yt.length;e++)this.ruler.push(Yt[e][0],Yt[e][1],{alt:(Yt[e][2]||[]).slice()})}pu.prototype.tokenize=function(e,t,u){const r=this.ruler.getRules(""),n=r.length,o=e.md.options.maxNesting;let i=t,s=!1;for(;i<u&&(e.line=i=e.skipEmptyLines(i),!(i>=u||e.sCount[i]<e.blkIndent));){if(e.level>=o){e.line=u;break}const a=e.line;let l=!1;for(let f=0;f<n;f++)if(l=r[f](e,i,u,!1),l){if(a>=e.line)throw new Error("block rule didn't increment state.line");break}if(!l)throw new Error("none of the block rules matched");e.tight=!s,e.isEmpty(e.line-1)&&(s=!0),i=e.line,i<u&&e.isEmpty(i)&&(s=!0,i++,e.line=i)}};pu.prototype.parse=function(e,t,u,r){if(!e)return;const n=new this.State(e,t,u,r);this.tokenize(n,n.line,n.lineMax)};pu.prototype.State=ct;function Kt(e,t,u,r){this.src=e,this.env=u,this.md=t,this.tokens=r,this.tokens_meta=Array(r.length),this.pos=0,this.posMax=this.src.length,this.level=0,this.pending="",this.pendingLevel=0,this.cache={},this.delimiters=[],this._prev_delimiters=[],this.backticks={},this.backticksScanned=!1,this.linkLevel=0}Kt.prototype.pushPending=function(){const e=new it("text","",0);return e.content=this.pending,e.level=this.pendingLevel,this.tokens.push(e),this.pending="",e};Kt.prototype.push=function(e,t,u){this.pending&&this.pushPending();const r=new it(e,t,u);let n=null;return u<0&&(this.level--,this.delimiters=this._prev_delimiters.pop()),r.level=this.level,u>0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],n={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(r),this.tokens_meta.push(n),r};Kt.prototype.scanDelims=function(e,t){const u=this.posMax,r=this.src.charCodeAt(e),n=e>0?this.src.charCodeAt(e-1):32;let o=e;for(;o<u&&this.src.charCodeAt(o)===r;)o++;const i=o-e,s=o<u?this.src.charCodeAt(o):32,a=Vt(n)||jt(String.fromCharCode(n)),l=Vt(s)||jt(String.fromCharCode(s)),f=Nt(n),d=Nt(s),b=!d&&(!l||f||a),x=!f&&(!a||d||l);return{can_open:b&&(t||!x||a),can_close:x&&(t||!b||l),length:i}};Kt.prototype.Token=it;function ma(e){switch(e){case 10:case 33:case 35:case 36:case 37:case 38:case 42:case 43:case 45:case 58:case 60:case 61:case 62:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 125:case 126:return!0;default:return!1}}function ba(e,t){let u=e.pos;for(;u<e.posMax&&!ma(e.src.charCodeAt(u));)u++;return u===e.pos?!1:(t||(e.pending+=e.src.slice(e.pos,u)),e.pos=u,!0)}const xa=/(?:^|[^a-z0-9.+-])([a-z][a-z0-9.+-]*)$/i;function ga(e,t){if(!e.md.options.linkify||e.linkLevel>0)return!1;const u=e.pos,r=e.posMax;if(u+3>r||e.src.charCodeAt(u)!==58||e.src.charCodeAt(u+1)!==47||e.src.charCodeAt(u+2)!==47)return!1;const n=e.pending.match(xa);if(!n)return!1;const o=n[1],i=e.md.linkify.matchAtStart(e.src.slice(u-o.length));if(!i)return!1;let s=i.url;if(s.length<=o.length)return!1;let a=s.length;for(;a>0&&s.charCodeAt(a-1)===42;)a--;a!==s.length&&(s=s.slice(0,a));const l=e.md.normalizeLink(s);if(!e.md.validateLink(l))return!1;if(!t){e.pending=e.pending.slice(0,-o.length);const f=e.push("link_open","a",1);f.attrs=[["href",l]],f.markup="linkify",f.info="auto";const d=e.push("text","",0);d.content=e.md.normalizeLinkText(s);const b=e.push("link_close","a",-1);b.markup="linkify",b.info="auto"}return e.pos+=s.length-o.length,!0}function va(e,t){let u=e.pos;if(e.src.charCodeAt(u)!==10)return!1;const r=e.pending.length-1,n=e.posMax;if(!t)if(r>=0&&e.pending.charCodeAt(r)===32)if(r>=1&&e.pending.charCodeAt(r-1)===32){let o=r-1;for(;o>=1&&e.pending.charCodeAt(o-1)===32;)o--;e.pending=e.pending.slice(0,o),e.push("hardbreak","br",0)}else e.pending=e.pending.slice(0,-1),e.push("softbreak","br",0);else e.push("softbreak","br",0);for(u++;u<n&&Se(e.src.charCodeAt(u));)u++;return e.pos=u,!0}const Qu=[];for(let e=0;e<256;e++)Qu.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function(e){Qu[e.charCodeAt(0)]=1});function ya(e,t){let u=e.pos;const r=e.posMax;if(e.src.charCodeAt(u)!==92||(u++,u>=r))return!1;let n=e.src.charCodeAt(u);if(n===10){for(t||e.push("hardbreak","br",0),u++;u<r&&(n=e.src.charCodeAt(u),!!Se(n));)u++;return e.pos=u,!0}let o=e.src[u];if(n>=55296&&n<=56319&&u+1<r){const s=e.src.charCodeAt(u+1);s>=56320&&s<=57343&&(o+=e.src[u+1],u++)}const i="\\"+o;if(!t){const s=e.push("text_special","",0);n<256&&Qu[n]!==0?s.content=o:s.content=i,s.markup=i,s.info="escape"}return e.pos=u+1,!0}function ka(e,t){let u=e.pos;if(e.src.charCodeAt(u)!==96)return!1;const n=u;u++;const o=e.posMax;for(;u<o&&e.src.charCodeAt(u)===96;)u++;const i=e.src.slice(n,u),s=i.length;if(e.backticksScanned&&(e.backticks[s]||0)<=n)return t||(e.pending+=i),e.pos+=s,!0;let a=u,l;for(;(l=e.src.indexOf("`",a))!==-1;){for(a=l+1;a<o&&e.src.charCodeAt(a)===96;)a++;const f=a-l;if(f===s){if(!t){const d=e.push("code_inline","code",0);d.markup=i,d.content=e.src.slice(u,l).replace(/\n/g," ").replace(/^ (.+) $/,"$1")}return e.pos=a,!0}e.backticks[f]=l}return e.backticksScanned=!0,t||(e.pending+=i),e.pos+=s,!0}function _a(e,t){const u=e.pos,r=e.src.charCodeAt(u);if(t||r!==126)return!1;const n=e.scanDelims(e.pos,!0);let o=n.length;const i=String.fromCharCode(r);if(o<2)return!1;let s;o%2&&(s=e.push("text","",0),s.content=i,o--);for(let a=0;a<o;a+=2)s=e.push("text","",0),s.content=i+i,e.delimiters.push({marker:r,length:0,token:e.tokens.length-1,end:-1,open:n.can_open,close:n.can_close});return e.pos+=n.length,!0}function Tn(e,t){let u;const r=[],n=t.length;for(let o=0;o<n;o++){const i=t[o];if(i.marker!==126||i.end===-1)continue;const s=t[i.end];u=e.tokens[i.token],u.type="s_open",u.tag="s",u.nesting=1,u.markup="~~",u.content="",u=e.tokens[s.token],u.type="s_close",u.tag="s",u.nesting=-1,u.markup="~~",u.content="",e.tokens[s.token-1].type==="text"&&e.tokens[s.token-1].content==="~"&&r.push(s.token-1)}for(;r.length;){const o=r.pop();let i=o+1;for(;i<e.tokens.length&&e.tokens[i].type==="s_close";)i++;i--,o!==i&&(u=e.tokens[i],e.tokens[i]=e.tokens[o],e.tokens[o]=u)}}function wa(e){const t=e.tokens_meta,u=e.tokens_meta.length;Tn(e,e.delimiters);for(let r=0;r<u;r++)t[r]&&t[r].delimiters&&Tn(e,t[r].delimiters)}const kr={tokenize:_a,postProcess:wa};function Sa(e,t){const u=e.pos,r=e.src.charCodeAt(u);if(t||r!==95&&r!==42)return!1;const n=e.scanDelims(e.pos,r===42);for(let o=0;o<n.length;o++){const i=e.push("text","",0);i.content=String.fromCharCode(r),e.delimiters.push({marker:r,length:n.length,token:e.tokens.length-1,end:-1,open:n.can_open,close:n.can_close})}return e.pos+=n.length,!0}function Fn(e,t){const u=t.length;for(let r=u-1;r>=0;r--){const n=t[r];if(n.marker!==95&&n.marker!==42||n.end===-1)continue;const o=t[n.end],i=r>0&&t[r-1].end===n.end+1&&t[r-1].marker===n.marker&&t[r-1].token===n.token-1&&t[n.end+1].token===o.token+1,s=String.fromCharCode(n.marker),a=e.tokens[n.token];a.type=i?"strong_open":"em_open",a.tag=i?"strong":"em",a.nesting=1,a.markup=i?s+s:s,a.content="";const l=e.tokens[o.token];l.type=i?"strong_close":"em_close",l.tag=i?"strong":"em",l.nesting=-1,l.markup=i?s+s:s,l.content="",i&&(e.tokens[t[r-1].token].content="",e.tokens[t[n.end+1].token].content="",r--)}}function Ca(e){const t=e.tokens_meta,u=e.tokens_meta.length;Fn(e,e.delimiters);for(let r=0;r<u;r++)t[r]&&t[r].delimiters&&Fn(e,t[r].delimiters)}const _r={tokenize:Sa,postProcess:Ca};function Da(e,t){let u,r,n,o,i="",s="",a=e.pos,l=!0;if(e.src.charCodeAt(e.pos)!==91)return!1;const f=e.pos,d=e.posMax,b=e.pos+1,x=e.md.helpers.parseLinkLabel(e,e.pos,!0);if(x<0)return!1;let p=x+1;if(p<d&&e.src.charCodeAt(p)===40){for(l=!1,p++;p<d&&(u=e.src.charCodeAt(p),!(!Se(u)&&u!==10));p++);if(p>=d)return!1;if(a=p,n=e.md.helpers.parseLinkDestination(e.src,p,e.posMax),n.ok){for(i=e.md.normalizeLink(n.str),e.md.validateLink(i)?p=n.pos:i="",a=p;p<d&&(u=e.src.charCodeAt(p),!(!Se(u)&&u!==10));p++);if(n=e.md.helpers.parseLinkTitle(e.src,p,e.posMax),p<d&&a!==p&&n.ok)for(s=n.str,p=n.pos;p<d&&(u=e.src.charCodeAt(p),!(!Se(u)&&u!==10));p++);}(p>=d||e.src.charCodeAt(p)!==41)&&(l=!0),p++}if(l){if(typeof e.env.references>"u")return!1;if(p<d&&e.src.charCodeAt(p)===91?(a=p+1,p=e.md.helpers.parseLinkLabel(e,p),p>=0?r=e.src.slice(a,p++):p=x+1):p=x+1,r||(r=e.src.slice(b,x)),o=e.env.references[fu(r)],!o)return e.pos=f,!1;i=o.href,s=o.title}if(!t){e.pos=b,e.posMax=x;const D=e.push("link_open","a",1),T=[["href",i]];D.attrs=T,s&&T.push(["title",s]),e.linkLevel++,e.md.inline.tokenize(e),e.linkLevel--,e.push("link_close","a",-1)}return e.pos=p,e.posMax=d,!0}function Ea(e,t){let u,r,n,o,i,s,a,l,f="";const d=e.pos,b=e.posMax;if(e.src.charCodeAt(e.pos)!==33||e.src.charCodeAt(e.pos+1)!==91)return!1;const x=e.pos+2,p=e.md.helpers.parseLinkLabel(e,e.pos+1,!1);if(p<0)return!1;if(o=p+1,o<b&&e.src.charCodeAt(o)===40){for(o++;o<b&&(u=e.src.charCodeAt(o),!(!Se(u)&&u!==10));o++);if(o>=b)return!1;for(l=o,s=e.md.helpers.parseLinkDestination(e.src,o,e.posMax),s.ok&&(f=e.md.normalizeLink(s.str),e.md.validateLink(f)?o=s.pos:f=""),l=o;o<b&&(u=e.src.charCodeAt(o),!(!Se(u)&&u!==10));o++);if(s=e.md.helpers.parseLinkTitle(e.src,o,e.posMax),o<b&&l!==o&&s.ok)for(a=s.str,o=s.pos;o<b&&(u=e.src.charCodeAt(o),!(!Se(u)&&u!==10));o++);else a="";if(o>=b||e.src.charCodeAt(o)!==41)return e.pos=d,!1;o++}else{if(typeof e.env.references>"u")return!1;if(o<b&&e.src.charCodeAt(o)===91?(l=o+1,o=e.md.helpers.parseLinkLabel(e,o),o>=0?n=e.src.slice(l,o++):o=p+1):o=p+1,n||(n=e.src.slice(x,p)),i=e.env.references[fu(n)],!i)return e.pos=d,!1;f=i.href,a=i.title}if(!t){r=e.src.slice(x,p);const D=[];e.md.inline.parse(r,e.md,e.env,D);const T=e.push("image","img",0),F=[["src",f],["alt",""]];T.attrs=F,T.children=D,T.content=r,a&&F.push(["title",a])}return e.pos=o,e.posMax=b,!0}const Aa=/^([a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/,Ta=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;function Fa(e,t){let u=e.pos;if(e.src.charCodeAt(u)!==60)return!1;const r=e.pos,n=e.posMax;for(;;){if(++u>=n)return!1;const i=e.src.charCodeAt(u);if(i===60)return!1;if(i===62)break}const o=e.src.slice(r+1,u);if(Ta.test(o)){const i=e.md.normalizeLink(o);if(!e.md.validateLink(i))return!1;if(!t){const s=e.push("link_open","a",1);s.attrs=[["href",i]],s.markup="autolink",s.info="auto";const a=e.push("text","",0);a.content=e.md.normalizeLinkText(o);const l=e.push("link_close","a",-1);l.markup="autolink",l.info="auto"}return e.pos+=o.length+2,!0}if(Aa.test(o)){const i=e.md.normalizeLink("mailto:"+o);if(!e.md.validateLink(i))return!1;if(!t){const s=e.push("link_open","a",1);s.attrs=[["href",i]],s.markup="autolink",s.info="auto";const a=e.push("text","",0);a.content=e.md.normalizeLinkText(o);const l=e.push("link_close","a",-1);l.markup="autolink",l.info="auto"}return e.pos+=o.length+2,!0}return!1}function Ia(e){return/^<a[>\s]/i.test(e)}function Pa(e){return/^<\/a\s*>/i.test(e)}function Ma(e){const t=e|32;return t>=97&&t<=122}function $a(e,t){if(!e.md.options.html)return!1;const u=e.posMax,r=e.pos;if(e.src.charCodeAt(r)!==60||r+2>=u)return!1;const n=e.src.charCodeAt(r+1);if(n!==33&&n!==63&&n!==47&&!Ma(n))return!1;const o=e.src.slice(r).match(la);if(!o)return!1;if(!t){const i=e.push("html_inline","",0);i.content=o[0],Ia(i.content)&&e.linkLevel++,Pa(i.content)&&e.linkLevel--}return e.pos+=o[0].length,!0}const Ba=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,Ra=/^&([a-z][a-z0-9]{1,31});/i;function La(e,t){const u=e.pos,r=e.posMax;if(e.src.charCodeAt(u)!==38||u+1>=r)return!1;if(e.src.charCodeAt(u+1)===35){const o=e.src.slice(u).match(Ba);if(o){if(!t){const i=o[1][0].toLowerCase()==="x"?parseInt(o[1].slice(1),16):parseInt(o[1],10),s=e.push("text_special","",0);s.content=Ju(i)?lu(i):lu(65533),s.markup=o[0],s.info="entity"}return e.pos+=o[0].length,!0}}else{const o=e.src.slice(u).match(Ra);if(o){const i=hr(o[0]);if(i!==o[0]){if(!t){const s=e.push("text_special","",0);s.content=i,s.markup=o[0],s.info="entity"}return e.pos+=o[0].length,!0}}}return!1}function In(e){const t={},u=e.length;if(!u)return;let r=0,n=-2;const o=[];for(let i=0;i<u;i++){const s=e[i];if(o.push(0),(e[r].marker!==s.marker||n!==s.token-1)&&(r=i),n=s.token,s.length=s.length||0,!s.close)continue;t.hasOwnProperty(s.marker)||(t[s.marker]=[-1,-1,-1,-1,-1,-1]);const a=t[s.marker][(s.open?3:0)+s.length%3];let l=r-o[r]-1,f=l;for(;l>a;l-=o[l]+1){const d=e[l];if(d.marker===s.marker&&d.open&&d.end<0){let b=!1;if((d.close||s.open)&&(d.length+s.length)%3===0&&(d.length%3!==0||s.length%3!==0)&&(b=!0),!b){const x=l>0&&!e[l-1].open?o[l-1]+1:0;o[i]=i-l+x,o[l]=x,s.open=!1,d.end=i,d.close=!1,f=-1,n=-2;break}}}f!==-1&&(t[s.marker][(s.open?3:0)+(s.length||0)%3]=f)}}function za(e){const t=e.tokens_meta,u=e.tokens_meta.length;In(e.delimiters);for(let r=0;r<u;r++)t[r]&&t[r].delimiters&&In(t[r].delimiters)}function qa(e){let t,u,r=0;const n=e.tokens,o=e.tokens.length;for(t=u=0;t<o;t++)n[t].nesting<0&&r--,n[t].level=r,n[t].nesting>0&&r++,n[t].type==="text"&&t+1<o&&n[t+1].type==="text"?n[t+1].content=n[t].content+n[t+1].content:(t!==u&&(n[u]=n[t]),u++);t!==u&&(n.length=u)}const Su=[["text",ba],["linkify",ga],["newline",va],["escape",ya],["backticks",ka],["strikethrough",kr.tokenize],["emphasis",_r.tokenize],["link",Da],["image",Ea],["autolink",Fa],["html_inline",$a],["entity",La]],Cu=[["balance_pairs",za],["strikethrough",kr.postProcess],["emphasis",_r.postProcess],["fragments_join",qa]];function Xt(){this.ruler=new Ye;for(let e=0;e<Su.length;e++)this.ruler.push(Su[e][0],Su[e][1]);this.ruler2=new Ye;for(let e=0;e<Cu.length;e++)this.ruler2.push(Cu[e][0],Cu[e][1])}Xt.prototype.skipToken=function(e){const t=e.pos,u=this.ruler.getRules(""),r=u.length,n=e.md.options.maxNesting,o=e.cache;if(typeof o[t]<"u"){e.pos=o[t];return}let i=!1;if(e.level<n){for(let s=0;s<r;s++)if(e.level++,i=u[s](e,!0),e.level--,i){if(t>=e.pos)throw new Error("inline rule didn't increment state.pos");break}}else e.pos=e.posMax;i||e.pos++,o[t]=e.pos};Xt.prototype.tokenize=function(e){const t=this.ruler.getRules(""),u=t.length,r=e.posMax,n=e.md.options.maxNesting;for(;e.pos<r;){const o=e.pos;let i=!1;if(e.level<n){for(let s=0;s<u;s++)if(i=t[s](e,!1),i){if(o>=e.pos)throw new Error("inline rule didn't increment state.pos");break}}if(i){if(e.pos>=r)break;continue}e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()};Xt.prototype.parse=function(e,t,u,r){const n=new this.State(e,t,u,r);this.tokenize(n);const o=this.ruler2.getRules(""),i=o.length;for(let s=0;s<i;s++)o[s](n)};Xt.prototype.State=Kt;function Oa(e){const t={};e=e||{},t.src_Any=lr.source,t.src_Cc=cr.source,t.src_Z=fr.source,t.src_P=Xu.source,t.src_ZPCc=[t.src_Z,t.src_P,t.src_Cc].join("|"),t.src_ZCc=[t.src_Z,t.src_Cc].join("|");const u="[><|]";return t.src_pseudo_letter="(?:(?!"+u+"|"+t.src_ZPCc+")"+t.src_Any+")",t.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",t.src_auth="(?:(?:(?!"+t.src_ZCc+"|[@/\\[\\]()]).)+@)?",t.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",t.src_host_terminator="(?=$|"+u+"|"+t.src_ZPCc+")(?!"+(e["---"]?"-(?!--)|":"-|")+"_|:\\d|\\.-|\\.(?!$|"+t.src_ZPCc+"))",t.src_path="(?:[/?#](?:(?!"+t.src_ZCc+"|"+u+`|[()[\\]{}.,"'?!\\-;]).|\\[(?:(?!`+t.src_ZCc+"|\\]).)*\\]|\\((?:(?!"+t.src_ZCc+"|[)]).)*\\)|\\{(?:(?!"+t.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+t.src_ZCc+`|["]).)+\\"|\\'(?:(?!`+t.src_ZCc+"|[']).)+\\'|\\'(?="+t.src_pseudo_letter+"|[-])|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!"+t.src_ZCc+"|[.]|$)|"+(e["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+",(?!"+t.src_ZCc+"|$)|;(?!"+t.src_ZCc+"|$)|\\!+(?!"+t.src_ZCc+"|[!]|$)|\\?(?!"+t.src_ZCc+"|[?]|$))+|\\/)?",t.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*',t.src_xn="xn--[a-z0-9\\-]{1,59}",t.src_domain_root="(?:"+t.src_xn+"|"+t.src_pseudo_letter+"{1,63})",t.src_domain="(?:"+t.src_xn+"|(?:"+t.src_pseudo_letter+")|(?:"+t.src_pseudo_letter+"(?:-|"+t.src_pseudo_letter+"){0,61}"+t.src_pseudo_letter+"))",t.src_host="(?:(?:(?:(?:"+t.src_domain+")\\.)*"+t.src_domain+"))",t.tpl_host_fuzzy="(?:"+t.src_ip4+"|(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%)))",t.tpl_host_no_ip_fuzzy="(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%))",t.src_host_strict=t.src_host+t.src_host_terminator,t.tpl_host_fuzzy_strict=t.tpl_host_fuzzy+t.src_host_terminator,t.src_host_port_strict=t.src_host+t.src_port+t.src_host_terminator,t.tpl_host_port_fuzzy_strict=t.tpl_host_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_port_no_ip_fuzzy_strict=t.tpl_host_no_ip_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_fuzzy_test="localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+t.src_ZPCc+"|>|$))",t.tpl_email_fuzzy="(^|"+u+'|"|\\(|'+t.src_ZCc+")("+t.src_email_name+"@"+t.tpl_host_fuzzy_strict+")",t.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_fuzzy_strict+t.src_path+")",t.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_no_ip_fuzzy_strict+t.src_path+")",t}function zu(e){return Array.prototype.slice.call(arguments,1).forEach(function(u){u&&Object.keys(u).forEach(function(r){e[r]=u[r]})}),e}function hu(e){return Object.prototype.toString.call(e)}function Na(e){return hu(e)==="[object String]"}function ja(e){return hu(e)==="[object Object]"}function Va(e){return hu(e)==="[object RegExp]"}function Pn(e){return hu(e)==="[object Function]"}function Ha(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}const wr={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function Ua(e){return Object.keys(e||{}).reduce(function(t,u){return t||wr.hasOwnProperty(u)},!1)}const Wa={"http:":{validate:function(e,t,u){const r=e.slice(t);return u.re.http||(u.re.http=new RegExp("^\\/\\/"+u.re.src_auth+u.re.src_host_port_strict+u.re.src_path,"i")),u.re.http.test(r)?r.match(u.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(e,t,u){const r=e.slice(t);return u.re.no_http||(u.re.no_http=new RegExp("^"+u.re.src_auth+"(?:localhost|(?:(?:"+u.re.src_domain+")\\.)+"+u.re.src_domain_root+")"+u.re.src_port+u.re.src_host_terminator+u.re.src_path,"i")),u.re.no_http.test(r)?t>=3&&e[t-3]===":"||t>=3&&e[t-3]==="/"?0:r.match(u.re.no_http)[0].length:0}},"mailto:":{validate:function(e,t,u){const r=e.slice(t);return u.re.mailto||(u.re.mailto=new RegExp("^"+u.re.src_email_name+"@"+u.re.src_host_strict,"i")),u.re.mailto.test(r)?r.match(u.re.mailto)[0].length:0}}},Za="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",Ka="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function Xa(e){e.__index__=-1,e.__text_cache__=""}function Ga(e){return function(t,u){const r=t.slice(u);return e.test(r)?r.match(e)[0].length:0}}function Mn(){return function(e,t){t.normalize(e)}}function cu(e){const t=e.re=Oa(e.__opts__),u=e.__tlds__.slice();e.onCompile(),e.__tlds_replaced__||u.push(Za),u.push(t.src_xn),t.src_tlds=u.join("|");function r(s){return s.replace("%TLDS%",t.src_tlds)}t.email_fuzzy=RegExp(r(t.tpl_email_fuzzy),"i"),t.link_fuzzy=RegExp(r(t.tpl_link_fuzzy),"i"),t.link_no_ip_fuzzy=RegExp(r(t.tpl_link_no_ip_fuzzy),"i"),t.host_fuzzy_test=RegExp(r(t.tpl_host_fuzzy_test),"i");const n=[];e.__compiled__={};function o(s,a){throw new Error('(LinkifyIt) Invalid schema "'+s+'": '+a)}Object.keys(e.__schemas__).forEach(function(s){const a=e.__schemas__[s];if(a===null)return;const l={validate:null,link:null};if(e.__compiled__[s]=l,ja(a)){Va(a.validate)?l.validate=Ga(a.validate):Pn(a.validate)?l.validate=a.validate:o(s,a),Pn(a.normalize)?l.normalize=a.normalize:a.normalize?o(s,a):l.normalize=Mn();return}if(Na(a)){n.push(s);return}o(s,a)}),n.forEach(function(s){e.__compiled__[e.__schemas__[s]]&&(e.__compiled__[s].validate=e.__compiled__[e.__schemas__[s]].validate,e.__compiled__[s].normalize=e.__compiled__[e.__schemas__[s]].normalize)}),e.__compiled__[""]={validate:null,normalize:Mn()};const i=Object.keys(e.__compiled__).filter(function(s){return s.length>0&&e.__compiled__[s]}).map(Ha).join("|");e.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+i+")","i"),e.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+i+")","ig"),e.re.schema_at_start=RegExp("^"+e.re.schema_search.source,"i"),e.re.pretest=RegExp("("+e.re.schema_test.source+")|("+e.re.host_fuzzy_test.source+")|@","i"),Xa(e)}function Ja(e,t){const u=e.__index__,r=e.__last_index__,n=e.__text_cache__.slice(u,r);this.schema=e.__schema__.toLowerCase(),this.index=u+t,this.lastIndex=r+t,this.raw=n,this.text=n,this.url=n}function qu(e,t){const u=new Ja(e,t);return e.__compiled__[u.schema].normalize(u,e),u}function ut(e,t){if(!(this instanceof ut))return new ut(e,t);t||Ua(e)&&(t=e,e={}),this.__opts__=zu({},wr,t),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=zu({},Wa,e),this.__compiled__={},this.__tlds__=Ka,this.__tlds_replaced__=!1,this.re={},cu(this)}ut.prototype.add=function(t,u){return this.__schemas__[t]=u,cu(this),this};ut.prototype.set=function(t){return this.__opts__=zu(this.__opts__,t),this};ut.prototype.test=function(t){if(this.__text_cache__=t,this.__index__=-1,!t.length)return!1;let u,r,n,o,i,s,a,l,f;if(this.re.schema_test.test(t)){for(a=this.re.schema_search,a.lastIndex=0;(u=a.exec(t))!==null;)if(o=this.testSchemaAt(t,u[2],a.lastIndex),o){this.__schema__=u[2],this.__index__=u.index+u[1].length,this.__last_index__=u.index+u[0].length+o;break}}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(l=t.search(this.re.host_fuzzy_test),l>=0&&(this.__index__<0||l<this.__index__)&&(r=t.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy))!==null&&(i=r.index+r[1].length,(this.__index__<0||i<this.__index__)&&(this.__schema__="",this.__index__=i,this.__last_index__=r.index+r[0].length))),this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&(f=t.indexOf("@"),f>=0&&(n=t.match(this.re.email_fuzzy))!==null&&(i=n.index+n[1].length,s=n.index+n[0].length,(this.__index__<0||i<this.__index__||i===this.__index__&&s>this.__last_index__)&&(this.__schema__="mailto:",this.__index__=i,this.__last_index__=s))),this.__index__>=0};ut.prototype.pretest=function(t){return this.re.pretest.test(t)};ut.prototype.testSchemaAt=function(t,u,r){return this.__compiled__[u.toLowerCase()]?this.__compiled__[u.toLowerCase()].validate(t,r,this):0};ut.prototype.match=function(t){const u=[];let r=0;this.__index__>=0&&this.__text_cache__===t&&(u.push(qu(this,r)),r=this.__last_index__);let n=r?t.slice(r):t;for(;this.test(n);)u.push(qu(this,r)),n=n.slice(this.__last_index__),r+=this.__last_index__;return u.length?u:null};ut.prototype.matchAtStart=function(t){if(this.__text_cache__=t,this.__index__=-1,!t.length)return null;const u=this.re.schema_at_start.exec(t);if(!u)return null;const r=this.testSchemaAt(t,u[2],u[0].length);return r?(this.__schema__=u[2],this.__index__=u.index+u[1].length,this.__last_index__=u.index+u[0].length+r,qu(this,0)):null};ut.prototype.tlds=function(t,u){return t=Array.isArray(t)?t:[t],u?(this.__tlds__=this.__tlds__.concat(t).sort().filter(function(r,n,o){return r!==o[n-1]}).reverse(),cu(this),this):(this.__tlds__=t.slice(),this.__tlds_replaced__=!0,cu(this),this)};ut.prototype.normalize=function(t){t.schema||(t.url="http://"+t.url),t.schema==="mailto:"&&!/^mailto:/i.test(t.url)&&(t.url="mailto:"+t.url)};ut.prototype.onCompile=function(){};const At=2147483647,st=36,en=1,Ht=26,Ya=38,Qa=700,Sr=72,Cr=128,Dr="-",e0=/^xn--/,t0=/[^\0-\x7F]/,u0=/[\x2E\u3002\uFF0E\uFF61]/g,n0={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},Du=st-en,at=Math.floor,Eu=String.fromCharCode;function mt(e){throw new RangeError(n0[e])}function r0(e,t){const u=[];let r=e.length;for(;r--;)u[r]=t(e[r]);return u}function Er(e,t){const u=e.split("@");let r="";u.length>1&&(r=u[0]+"@",e=u[1]),e=e.replace(u0,".");const n=e.split("."),o=r0(n,t).join(".");return r+o}function Ar(e){const t=[];let u=0;const r=e.length;for(;u<r;){const n=e.charCodeAt(u++);if(n>=55296&&n<=56319&&u<r){const o=e.charCodeAt(u++);(o&64512)==56320?t.push(((n&1023)<<10)+(o&1023)+65536):(t.push(n),u--)}else t.push(n)}return t}const o0=e=>String.fromCodePoint(...e),i0=function(e){return e>=48&&e<58?26+(e-48):e>=65&&e<91?e-65:e>=97&&e<123?e-97:st},$n=function(e,t){return e+22+75*(e<26)-((t!=0)<<5)},Tr=function(e,t,u){let r=0;for(e=u?at(e/Qa):e>>1,e+=at(e/t);e>Du*Ht>>1;r+=st)e=at(e/Du);return at(r+(Du+1)*e/(e+Ya))},Fr=function(e){const t=[],u=e.length;let r=0,n=Cr,o=Sr,i=e.lastIndexOf(Dr);i<0&&(i=0);for(let s=0;s<i;++s)e.charCodeAt(s)>=128&&mt("not-basic"),t.push(e.charCodeAt(s));for(let s=i>0?i+1:0;s<u;){const a=r;for(let f=1,d=st;;d+=st){s>=u&&mt("invalid-input");const b=i0(e.charCodeAt(s++));b>=st&&mt("invalid-input"),b>at((At-r)/f)&&mt("overflow"),r+=b*f;const x=d<=o?en:d>=o+Ht?Ht:d-o;if(b<x)break;const p=st-x;f>at(At/p)&&mt("overflow"),f*=p}const l=t.length+1;o=Tr(r-a,l,a==0),at(r/l)>At-n&&mt("overflow"),n+=at(r/l),r%=l,t.splice(r++,0,n)}return String.fromCodePoint(...t)},Ir=function(e){const t=[];e=Ar(e);const u=e.length;let r=Cr,n=0,o=Sr;for(const a of e)a<128&&t.push(Eu(a));const i=t.length;let s=i;for(i&&t.push(Dr);s<u;){let a=At;for(const f of e)f>=r&&f<a&&(a=f);const l=s+1;a-r>at((At-n)/l)&&mt("overflow"),n+=(a-r)*l,r=a;for(const f of e)if(f<r&&++n>At&&mt("overflow"),f===r){let d=n;for(let b=st;;b+=st){const x=b<=o?en:b>=o+Ht?Ht:b-o;if(d<x)break;const p=d-x,D=st-x;t.push(Eu($n(x+p%D,0))),d=at(p/D)}t.push(Eu($n(d,0))),o=Tr(n,l,s===i),n=0,++s}++n,++r}return t.join("")},s0=function(e){return Er(e,function(t){return e0.test(t)?Fr(t.slice(4).toLowerCase()):t})},a0=function(e){return Er(e,function(t){return t0.test(t)?"xn--"+Ir(t):t})},Pr={version:"2.3.1",ucs2:{decode:Ar,encode:o0},decode:Fr,encode:Ir,toASCII:a0,toUnicode:s0},l0={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}},c0={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["paragraph"]},inline:{rules:["text"],rules2:["balance_pairs","fragments_join"]}}},d0={options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["blockquote","code","fence","heading","hr","html_block","lheading","list","reference","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","html_inline","image","link","newline","text"],rules2:["balance_pairs","emphasis","fragments_join"]}}},f0={default:l0,zero:c0,commonmark:d0},p0=/^(vbscript|javascript|file|data):/,h0=/^data:image\/(gif|png|jpeg|webp);/;function m0(e){const t=e.trim().toLowerCase();return p0.test(t)?h0.test(t):!0}const Mr=["http:","https:","mailto:"];function b0(e){const t=Ku(e,!0);if(t.hostname&&(!t.protocol||Mr.indexOf(t.protocol)>=0))try{t.hostname=Pr.toASCII(t.hostname)}catch{}return Zt(Zu(t))}function x0(e){const t=Ku(e,!0);if(t.hostname&&(!t.protocol||Mr.indexOf(t.protocol)>=0))try{t.hostname=Pr.toUnicode(t.hostname)}catch{}return It(Zu(t),It.defaultChars+"%")}function rt(e,t){if(!(this instanceof rt))return new rt(e,t);t||Gu(e)||(t=e||{},e="default"),this.inline=new Xt,this.block=new pu,this.core=new Yu,this.renderer=new Mt,this.linkify=new ut,this.validateLink=m0,this.normalizeLink=b0,this.normalizeLinkText=x0,this.utils=vs,this.helpers=du({},ws),this.options={},this.configure(e),t&&this.set(t)}rt.prototype.set=function(e){return du(this.options,e),this};rt.prototype.configure=function(e){const t=this;if(Gu(e)){const u=e;if(e=f0[u],!e)throw new Error('Wrong `markdown-it` preset "'+u+'", check name')}if(!e)throw new Error("Wrong `markdown-it` preset, can't be empty");return e.options&&t.set(e.options),e.components&&Object.keys(e.components).forEach(function(u){e.components[u].rules&&t[u].ruler.enableOnly(e.components[u].rules),e.components[u].rules2&&t[u].ruler2.enableOnly(e.components[u].rules2)}),this};rt.prototype.enable=function(e,t){let u=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(n){u=u.concat(this[n].ruler.enable(e,!0))},this),u=u.concat(this.inline.ruler2.enable(e,!0));const r=e.filter(function(n){return u.indexOf(n)<0});if(r.length&&!t)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+r);return this};rt.prototype.disable=function(e,t){let u=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(n){u=u.concat(this[n].ruler.disable(e,!0))},this),u=u.concat(this.inline.ruler2.disable(e,!0));const r=e.filter(function(n){return u.indexOf(n)<0});if(r.length&&!t)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+r);return this};rt.prototype.use=function(e){const t=[this].concat(Array.prototype.slice.call(arguments,1));return e.apply(e,t),this};rt.prototype.parse=function(e,t){if(typeof e!="string")throw new Error("Input data should be a String");const u=new this.core.State(e,this,t);return this.core.process(u),u.tokens};rt.prototype.render=function(e,t){return t=t||{},this.renderer.render(this.parse(e,t),this.options,t)};rt.prototype.parseInline=function(e,t){const u=new this.core.State(e,this,t);return u.inlineMode=!0,this.core.process(u),u.tokens};rt.prototype.renderInline=function(e,t){return t=t||{},this.renderer.render(this.parseInline(e,t),this.options,t)};const tn=new rt({html:!1,breaks:!0,linkify:!0,typographer:!1}),Bn=tn.renderer.rules.link_open;tn.renderer.rules.link_open=(e,t,u,r,n)=>{const o=e[t];return o.attrSet("target","_blank"),o.attrSet("rel","noreferrer noopener"),typeof Bn=="function"?Bn(e,t,u,r,n):n.renderToken(e,t,u)};function Rn(e=""){const t=String(e||"").trim();return t?tn.render(t):""}const g0={class:"panel relative flex h-full min-h-0 flex-col overflow-hidden"},v0={class:"theme-divider border-b bg-[var(--theme-appPanelMuted)] p-3"},y0={class:"flex flex-col gap-3"},k0={class:"flex flex-wrap items-center gap-2"},_0={class:"min-w-0 shrink-0"},w0={class:"theme-heading flex items-center gap-2 text-sm font-medium"},S0={key:0,class:"theme-muted-text mt-1 text-xs"},C0={class:"ml-auto flex items-center gap-2"},D0=["disabled"],E0=["disabled"],A0={class:"flex flex-col gap-2 sm:flex-row sm:items-center"},T0={class:"min-w-0 flex-1"},F0={key:0,class:"theme-danger-text inline-flex items-center gap-2 text-sm"},I0={class:"min-h-0 flex-1"},P0={key:0,class:"theme-empty-state px-4 py-6 text-sm"},M0={class:"flex justify-end"},$0={class:"min-w-0 w-full max-w-[92%] rounded-sm border border-dashed border-[var(--theme-promptBorder)] bg-[var(--theme-promptBg)] px-4 py-3 text-sm text-[var(--theme-promptText)]"},B0={class:"flex items-center justify-between gap-3 text-xs opacity-75"},R0={class:"flex items-center gap-2"},L0=["onClick"],z0={class:"relative mt-2"},q0={key:0,class:"pointer-events-none absolute inset-x-0 bottom-0 h-16 bg-gradient-to-t from-[var(--theme-promptBg)] via-[var(--theme-promptBg)] to-transparent"},O0={class:"flex justify-start"},N0={class:"flex items-center justify-between gap-3 text-xs"},j0={class:"flex items-center gap-2"},V0=["onClick"],H0={key:0,class:"mt-3 space-y-3"},U0={class:"text-sm font-medium leading-6"},W0={key:0,class:"mt-1 whitespace-pre-wrap break-all font-mono text-[11px] leading-5 opacity-85"},Z0={key:1,class:"mt-3 rounded-sm border border-dashed border-current/15 bg-white/10 px-3 py-2 text-xs text-current/70"},K0={key:2,class:"mt-3 text-xs text-current/80"},X0={key:3,class:"mt-3 rounded-sm border border-dashed border-current/15 bg-white/15 px-3 py-2 text-xs text-current/80"},G0={class:"flex items-start justify-between gap-3"},J0={class:"min-w-0 flex-1"},Y0={key:0,class:"leading-5"},Q0={key:1,class:"mt-1 break-all leading-5 opacity-75"},el={key:2,class:"mt-2 flex flex-wrap gap-2"},tl={class:"opacity-75"},ul={class:"font-medium"},nl=["onClick"],rl={key:0,class:"flex justify-start"},ol={class:"flex items-center justify-between gap-3 text-xs text-current/80"},il=["onClick"],sl={class:"relative mt-2"},al=["innerHTML"],ll={key:1,class:"theme-status-warning flex shrink-0 items-center justify-between gap-3 border-t border-dashed px-4 py-3 text-sm"},cl={class:"flex items-center gap-2"},dl=8,fl=320,pl=10,hl=400,Au="max-h-40 overflow-hidden",ml={__name:"CodexSessionPanel",props:{prompt:{type:String,default:""},buildPrompt:{type:Function,default:null},beforeSend:{type:Function,default:null},afterSend:{type:Function,default:null},taskSlug:{type:String,default:""},selectedSessionId:{type:String,default:""},active:{type:Boolean,default:!1},sessionSelectionLocked:{type:Boolean,default:!1},sessionSelectionLockReason:{type:String,default:""},diffSupported:{type:Boolean,default:!1}},emits:["selected-session-change","sending-change","open-diff"],setup(e,{expose:t,emit:u}){const r=Pu(()=>Mu(()=>import("./CodexSessionManagerDialog-c35LrKjV.js"),__vite__mapDeps([0,1,2]))),n=u,o=e,{closeManager:i,formatTurnTime:s,getProcessCardClass:a,getProcessStatus:l,getDisplayTurnSummaryItems:f,getTurnSummaryDetail:d,getTurnSummaryStatus:b,handleCreateSession:x,handleDeleteSession:p,handleSelectSession:D,handleSend:T,handleTranscriptScroll:F,handleUpdateSession:$,helperText:M,loading:B,managerBusy:q,openManager:H,refreshSessionsForSelection:G,selectedSessionId:Z,sending:U,hasTurnSummary:L,hasNewerMessages:z,sessionError:V,shouldShowResponse:X,showManager:ne,sortedSessions:Q,stopSending:se,transcriptRef:ye,turns:re,workspaces:K,workingLabel:le,sessions:oe,loadSessions:Fe,scrollToBottom:Ce}=Pi(o,n),De=O({}),he=O({}),ke=O({}),qe=ae(()=>{var E;return((E=re.value.at(-1))==null?void 0:E.id)||""}),Ke=new Map;function Qe(E,ee,N){const Y=String(E||"").trimEnd();return Y?Y.split(/\r?\n/).length>ee||Y.length>N:!1}function Ee(E){var ee;return(E==null?void 0:E.status)!=="running"&&(((ee=E==null?void 0:E.events)==null?void 0:ee.length)||0)>3}function Xe(E){return(E==null?void 0:E.status)!=="running"&&(E==null?void 0:E.id)!==qe.value&&je(E)}function Ae(E){return!(E!=null&&E.errorMessage)&&(E==null?void 0:E.id)!==qe.value&&_e(E)}function je(E){return Qe(E==null?void 0:E.prompt,dl,fl)}function et(E){return String((E==null?void 0:E.errorMessage)||(E==null?void 0:E.responseMessage)||"")}function _e(E){return Qe(et(E),pl,hl)}function Me(E){return String((E==null?void 0:E.runId)||(E==null?void 0:E.id)||"").trim()}function Ge(E=[]){const ee=new Set((E||[]).map(Y=>Y.id).filter(Boolean)),N=new Set((E||[]).map(Y=>Me(Y)).filter(Boolean));De.value=Object.fromEntries(Object.entries(De.value).filter(([Y])=>ee.has(Y))),he.value=Object.fromEntries(Object.entries(he.value).filter(([Y])=>ee.has(Y))),ke.value=Object.fromEntries(Object.entries(ke.value).filter(([Y])=>ee.has(Y)));for(const Y of Ke.keys())N.has(Y)||Ke.delete(Y)}function $e(E){return E!=null&&E.id?Object.prototype.hasOwnProperty.call(De.value,E.id)?!!De.value[E.id]:Ee(E):!1}function Oe(E){E!=null&&E.id&&(De.value={...De.value,[E.id]:!$e(E)})}function Te(E){return E!=null&&E.id?Object.prototype.hasOwnProperty.call(he.value,E.id)?!!he.value[E.id]:Xe(E):!1}function Je(E){!(E!=null&&E.id)||!je(E)||(he.value={...he.value,[E.id]:!Te(E)})}function fe(E){return E!=null&&E.id?Object.prototype.hasOwnProperty.call(ke.value,E.id)?!!ke.value[E.id]:Ae(E):!1}function Pe(E){!(E!=null&&E.id)||!_e(E)||(ke.value={...ke.value,[E.id]:!fe(E)})}function Be(E){E!=null&&E.runId&&n("open-diff",{scope:"run",runId:E.runId})}function Ue(){n("open-diff",{scope:"workspace",runId:""})}function We(E){if(E!=null&&E.errorMessage)return"";const ee=String((E==null?void 0:E.responseMessage)||""),N=Me(E);if(!N)return Rn(ee);const Y=Ke.get(N);if((Y==null?void 0:Y.source)===ee)return Y.html;const Ze=Rn(ee);return Ke.set(N,{source:ee,html:Ze}),Ze}return me(re,E=>{Ge(E)},{immediate:!0,deep:!0}),t({send:T,scrollToBottom:Ce,stop:se}),(E,ee)=>(A(),R("section",g0,[v(ne)?(A(),we(v(r),{key:0,open:v(ne),sessions:v(oe),workspaces:v(K),"selected-session-id":v(Z),"selection-locked":e.sessionSelectionLocked,"selection-lock-reason":e.sessionSelectionLockReason,loading:v(B),sending:v(U),"on-refresh":v(Fe),"on-create":v(x),"on-update":v($),"on-delete":v(p),onClose:v(i),onSelectSession:v(D)},null,8,["open","sessions","workspaces","selected-session-id","selection-locked","selection-lock-reason","loading","sending","on-refresh","on-create","on-update","on-delete","onClose","onSelectSession"])):de("",!0),g("div",v0,[g("div",y0,[g("div",k0,[g("div",_0,[g("div",w0,[ue(v(Kr),{class:"h-4 w-4"}),ee[5]||(ee[5]=g("span",null,"项目",-1))]),v(M)?(A(),R("p",S0,te(v(M)),1)):de("",!0)]),g("div",C0,[e.diffSupported?(A(),R("button",{key:0,type:"button",class:"tool-button inline-flex items-center gap-2 px-3 py-2 text-xs",disabled:!e.taskSlug,onClick:Ue},[ue(v(sn),{class:"h-4 w-4"}),ee[6]||(ee[6]=g("span",null,"代码变更",-1))],8,D0)):de("",!0),g("button",{type:"button",class:"tool-button inline-flex items-center gap-2 px-3 py-2 text-xs",disabled:v(U)||v(q),onClick:ee[0]||(ee[0]=(...N)=>v(H)&&v(H)(...N))},[ue(v(Un),{class:"h-4 w-4"}),ee[7]||(ee[7]=g("span",null,"管理项目",-1))],8,E0)])]),g("div",A0,[g("div",T0,[ue(Lo,{modelValue:v(Z),"onUpdate:modelValue":ee[1]||(ee[1]=N=>Rr(Z)?Z.value=N:null),sessions:v(Q),loading:v(B),disabled:v(U)||v(q)||e.sessionSelectionLocked,onRefreshIntent:v(G)},null,8,["modelValue","sessions","loading","disabled","onRefreshIntent"])])]),v(V)?(A(),R("p",F0,[ue(v(Hn),{class:"h-4 w-4"}),g("span",null,te(v(V)),1)])):de("",!0)])]),g("div",I0,[g("div",{ref_key:"transcriptRef",ref:ye,class:"h-full space-y-4 overflow-y-auto px-4 py-4",onScroll:ee[2]||(ee[2]=(...N)=>v(F)&&v(F)(...N))},[v(re).length?de("",!0):(A(),R("div",P0," 这里会显示项目执行过程和 Codex 回复。 ")),(A(!0),R(ot,null,ft(v(re),N=>(A(),R("div",{key:N.id,class:"space-y-3"},[g("div",M0,[g("div",$0,[g("div",B0,[ee[8]||(ee[8]=g("span",null,"本轮提示词",-1)),g("div",R0,[je(N)?(A(),R("button",{key:0,type:"button",class:"inline-flex items-center gap-1 rounded-sm border border-dashed border-current/30 px-2 py-1 text-[11px] transition hover:bg-white/15",onClick:Y=>Je(N)},[Te(N)?(A(),we(v(qt),{key:0,class:"h-3 w-3"})):(A(),we(v(bu),{key:1,class:"h-3 w-3"})),g("span",null,te(Te(N)?"展开":"收起"),1)],8,L0)):de("",!0),g("span",null,te(v(s)(N.startedAt)),1)])]),g("div",z0,[g("pre",{class:pe(["whitespace-pre-wrap break-all font-sans leading-7",je(N)&&Te(N)?Au:""])},te(N.prompt),3),je(N)&&Te(N)?(A(),R("div",q0)):de("",!0)])])]),g("div",O0,[g("div",{class:pe(["min-w-0 w-full max-w-[94%] rounded-sm border border-dashed px-4 py-3",v(a)(N)])},[g("div",N0,[ee[9]||(ee[9]=g("span",null,"执行过程",-1)),g("div",j0,[N.events.length?(A(),R("button",{key:0,type:"button",class:"inline-flex items-center gap-1 rounded-sm border border-dashed border-current/30 px-2 py-1 text-[11px] transition hover:bg-white/15",onClick:Y=>Oe(N)},[$e(N)?(A(),we(v(qt),{key:0,class:"h-3 w-3"})):(A(),we(v(bu),{key:1,class:"h-3 w-3"})),g("span",null,te($e(N)?`展开 (${N.events.length})`:"收起"),1)],8,V0)):de("",!0),g("span",null,te(v(l)(N)),1)])]),N.events.length&&!$e(N)?(A(),R("div",H0,[(A(!0),R(ot,null,ft(N.events,Y=>(A(),R("div",{key:Y.id,class:pe(["rounded-sm border border-dashed px-3 py-2",{"border-[var(--theme-borderMuted)] bg-[var(--theme-appPanelStrong)]":Y.kind==="info"||Y.kind==="command","theme-status-warning":Y.kind==="todo","theme-status-success":Y.kind==="result","theme-status-danger":Y.kind==="error"}])},[g("div",U0,te(Y.title),1),Y.detail?(A(),R("pre",W0,te(Y.detail),1)):de("",!0)],2))),128))])):N.events.length?(A(),R("div",Z0," 已折叠 "+te(N.events.length)+" 条过程日志 ",1)):(A(),R("p",K0,"正在等待 Codex 返回事件...")),v(L)(N)?(A(),R("div",X0,[g("div",G0,[g("div",J0,[v(b)(N)?(A(),R("div",Y0,te(v(b)(N)),1)):de("",!0),v(d)(N)?(A(),R("div",Q0,te(v(d)(N)),1)):de("",!0),v(f)(N).length?(A(),R("div",el,[(A(!0),R(ot,null,ft(v(f)(N),Y=>(A(),R("span",{key:Y.key,class:"inline-flex items-center gap-1 rounded-sm border border-dashed border-current/30 px-2 py-1"},[g("span",tl,te(Y.label),1),g("span",ul,te(Y.value),1)]))),128))])):de("",!0)]),e.diffSupported&&N.runId?(A(),R("button",{key:0,type:"button",class:"shrink-0 inline-flex items-center gap-1 rounded-sm border border-dashed border-current/30 px-2 py-1 text-[11px] transition hover:bg-white/15",onClick:Y=>Be(N)},[ue(v(sn),{class:"h-3 w-3"}),ee[10]||(ee[10]=g("span",null,"查看",-1))],8,nl)):de("",!0)])])):de("",!0)],2)]),v(X)(N)?(A(),R("div",rl,[g("div",{class:pe(["min-w-0 w-full max-w-[92%] rounded-sm border border-dashed px-4 py-3 text-sm leading-7",N.errorMessage?"border-[var(--theme-danger)] bg-[var(--theme-dangerSoft)] text-[var(--theme-dangerText)]":"border-[var(--theme-responseBorder)] bg-[var(--theme-responseBg)] text-[var(--theme-responseText)]"])},[g("div",ol,[g("span",null,te(N.errorMessage?"Codex 错误":"Codex 回复"),1),_e(N)?(A(),R("button",{key:0,type:"button",class:"inline-flex items-center gap-1 rounded-sm border border-dashed border-current/30 px-2 py-1 text-[11px] transition hover:bg-white/15",onClick:Y=>Pe(N)},[fe(N)?(A(),we(v(qt),{key:0,class:"h-3 w-3"})):(A(),we(v(bu),{key:1,class:"h-3 w-3"})),g("span",null,te(fe(N)?"展开":"收起"),1)],8,il)):de("",!0)]),g("div",sl,[N.errorMessage?(A(),R("div",{key:0,class:pe([_e(N)&&fe(N)?Au:"","whitespace-pre-wrap break-all"])},te(N.errorMessage),3)):(A(),R("div",{key:1,class:pe(["prose-like codex-markdown",_e(N)&&fe(N)?Au:""]),innerHTML:We(N)},null,10,al)),_e(N)&&fe(N)?(A(),R("div",{key:2,class:pe(["pointer-events-none absolute inset-x-0 bottom-0 h-16 bg-gradient-to-t",N.errorMessage?"from-[var(--theme-dangerSoft)] via-[var(--theme-dangerSoft)] to-transparent":"from-[var(--theme-responseBg)] via-[var(--theme-responseBg)] to-transparent"])},null,2)):de("",!0)])],2)])):de("",!0)]))),128))],544),v(z)?(A(),R("button",{key:0,type:"button",class:pe(["tool-button absolute right-4 z-10 inline-flex items-center gap-2 border-[var(--theme-borderStrong)] bg-[var(--theme-appOverlay)] px-3 py-2 text-xs shadow-sm backdrop-blur",v(U)?"bottom-20":"bottom-4"]),onClick:ee[3]||(ee[3]=(...N)=>v(Ce)&&v(Ce)(...N))},[ue(v(Ur),{class:"h-4 w-4"}),ee[11]||(ee[11]=g("span",null,"有新消息,跳到底部",-1))],2)):de("",!0)]),v(U)?(A(),R("div",ll,[g("div",cl,[ue(v(Tt),{class:"h-4 w-4 animate-spin"}),g("span",null,te(v(le)),1)]),g("button",{type:"button",class:"tool-button inline-flex items-center gap-2 px-3 py-2 text-xs",onClick:ee[4]||(ee[4]=(...N)=>v(se)&&v(se)(...N))},[ue(v(Wn),{class:"h-4 w-4"}),ee[12]||(ee[12]=g("span",null,"停止",-1))])])):de("",!0)]))}},bl={key:0,class:"h-full min-h-0"},xl={key:1,class:"panel theme-muted-text flex h-full items-center px-5 py-4 text-sm"},Ln={__name:"WorkbenchActivityPanel",props:{taskSlug:{type:String,default:""},buildPrompt:{type:Function,default:null},selectedSessionId:{type:String,default:""},sessionSelectionLocked:{type:Boolean,default:!1},sessionSelectionLockReason:{type:String,default:""},diffSupported:{type:Boolean,default:!1},emptyMessage:{type:String,default:""}},emits:["sending-change","selected-session-change","open-diff"],setup(e,{expose:t,emit:u}){const r=u,n=O(null);function o(){var a,l;return(l=(a=n.value)==null?void 0:a.send)==null?void 0:l.call(a)}function i(){var a,l;(l=(a=n.value)==null?void 0:a.stop)==null||l.call(a)}function s(){var a,l;(l=(a=n.value)==null?void 0:a.scrollToBottom)==null||l.call(a)}return t({send:o,stop:i,scrollToBottom:s}),(a,l)=>e.taskSlug?(A(),R("div",bl,[ue(ml,{ref_key:"panelRef",ref:n,active:!!e.taskSlug,"task-slug":e.taskSlug,"build-prompt":e.buildPrompt||(()=>""),"selected-session-id":e.selectedSessionId,"session-selection-locked":e.sessionSelectionLocked,"session-selection-lock-reason":e.sessionSelectionLockReason,"diff-supported":e.diffSupported,onSendingChange:l[0]||(l[0]=f=>r("sending-change",f)),onSelectedSessionChange:l[1]||(l[1]=f=>r("selected-session-change",f)),onOpenDiff:l[2]||(l[2]=f=>r("open-diff",f))},null,8,["active","task-slug","build-prompt","selected-session-id","session-selection-locked","session-selection-lock-reason","diff-supported"])])):e.emptyMessage?(A(),R("section",xl,te(e.emptyMessage),1)):de("",!0)}},gl={none:{label:"不过期",hours:null}};Object.entries(gl).map(([e,t])=>({value:e,label:t.label}));const xe={TEXT:"text",IMAGE:"image",IMPORTED_TEXT:"imported_text"};xe.TEXT+"",xe.IMAGE+"",xe.IMPORTED_TEXT+"";function vl(e=[],t=10){const u=e.find(r=>{var n;return(r.type===xe.TEXT||r.type===xe.IMPORTED_TEXT)&&((n=r.content)==null?void 0:n.trim())});return u?u.content.replace(/\s+/g," ").trim().slice(0,t):""}function yl(e){const{activeIndex:t,blocks:u,isTextLikeBlock:r,placeCursor:n,resizeAllTextareas:o,selectionMap:i,sessionId:s,setBlocks:a,textareas:l}=e,f=O(x()),d=O(null),b=O(null);function x(){return{open:!1,blockIndex:-1,start:0,end:0,query:"",trigger:"mention"}}function p(L,z){const V=l.value[L];if(!V||typeof document>"u")return null;const X=window.getComputedStyle(V),ne=document.createElement("div"),Q=document.createElement("span"),se=["boxSizing","width","height","overflowX","overflowY","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","paddingTop","paddingRight","paddingBottom","paddingLeft","fontStyle","fontVariant","fontWeight","fontStretch","fontSize","fontSizeAdjust","lineHeight","fontFamily","textAlign","textTransform","textIndent","textDecoration","letterSpacing","wordSpacing","tabSize"];ne.style.position="fixed",ne.style.left="-9999px",ne.style.top="0",ne.style.visibility="hidden",ne.style.whiteSpace="pre-wrap",ne.style.wordWrap="break-word",se.forEach(De=>{ne.style[De]=X[De]});const ye=V.value.slice(0,z),re=V.value.slice(z,z+1)||" ",K=V.value.slice(z+1);ne.textContent=ye,Q.textContent=re,ne.appendChild(Q),K&&ne.appendChild(document.createTextNode(K)),document.body.appendChild(ne);const le=V.getBoundingClientRect(),oe=Number.parseFloat(X.lineHeight)||Number.parseFloat(X.fontSize)*1.4||20,Fe=le.left+Q.offsetLeft-V.scrollLeft,Ce=le.top+Q.offsetTop-V.scrollTop;return document.body.removeChild(ne),{left:Fe,top:Ce,right:Fe,bottom:Ce+oe,width:0,height:oe}}function D(L,z){return!L&&!z?!1:!L||!z?!0:Math.abs((L.left||0)-(z.left||0))>=1||Math.abs((L.top||0)-(z.top||0))>=1||Math.abs((L.bottom||0)-(z.bottom||0))>=1}function T(){const L=f.value;if(!L.open||L.blockIndex<0){d.value=null;return}const z=p(L.blockIndex,L.start);D(z,d.value)&&(d.value=z)}function F(L){const z=Number(L==null?void 0:L.blockIndex);if(z<0)return;const V=u.value[z];if(!V||!r(V))return;const X=Math.max(0,Number(L.start)||0),ne=Math.max(X,Number(L.end)||X),Q=`${V.content.slice(0,X)}${V.content.slice(ne)}`,se=[...u.value];se.splice(z,1,{...V,content:Q}),a(se),t.value=z,i.value[z]={start:X,end:X},ge(()=>n(z,X))}function $(L={}){const{suppressCurrent:z=!1,cleanupShortcut:V=!1}=L,X=f.value;z&&X.open&&(b.value={blockIndex:X.blockIndex,start:X.start,end:X.end,query:X.query,trigger:X.trigger}),f.value=x(),d.value=null,V&&X.trigger==="shortcut"&&F(X)}function M(){$({suppressCurrent:!0,cleanupShortcut:f.value.trigger==="shortcut"})}function B(L,z){const V=z||l.value[L],X=u.value[L];if(!V||!X||!r(X)){f.value.blockIndex===L&&$();return}const ne=V.selectionStart??0,Q=V.selectionEnd??0;if(ne!==Q){f.value.blockIndex===L&&$();return}const ye=String(X.content||"").slice(0,Q),re=ye.lastIndexOf("@");if(re<0){f.value.blockIndex===L&&$();return}const K=ye.slice(re+1);if(/\s/.test(K)){f.value.blockIndex===L&&$();return}const le=re,oe=b.value;if(oe&&oe.blockIndex===L&&oe.start===le&&oe.end===Q&&oe.query===K)return;b.value=null;const Fe=!f.value.open||f.value.blockIndex!==L||f.value.start!==le,Ce=p(L,le),De=f.value.open&&f.value.blockIndex===L&&f.value.start===le&&f.value.trigger||"mention";f.value={open:!0,blockIndex:L,start:le,end:Q,query:K,trigger:De},(Fe||D(Ce,d.value))&&(d.value=Ce)}function q(L,z){i.value[L]={start:z.target.selectionStart??0,end:z.target.selectionEnd??0},B(L,z.target)}function H(L){t.value=L;const z=l.value[L];i.value[L]={start:(z==null?void 0:z.selectionStart)??0,end:(z==null?void 0:z.selectionEnd)??0},B(L,z)}function G(){var le,oe;const L=Math.min(t.value??0,Math.max(u.value.length-1,0)),z=u.value[L];if(!z||!r(z))return!1;const V=l.value[L],X=z.content.length,ne={start:(V==null?void 0:V.selectionStart)??((le=i.value[L])==null?void 0:le.start)??X,end:(V==null?void 0:V.selectionEnd)??((oe=i.value[L])==null?void 0:oe.end)??X},Q=Math.max(0,ne.start??0),se=Math.max(Q,ne.end??Q),ye=`${z.content.slice(0,Q)}@${z.content.slice(se)}`,re=Q+1,K=[...u.value];return K.splice(L,1,{...z,content:ye}),a(K),t.value=L,i.value[L]={start:re,end:re},b.value=null,ge(()=>{n(L,re),f.value={open:!0,blockIndex:L,start:Q,end:re,query:"",trigger:"shortcut"},d.value=p(L,Q)}),!0}function Z(L){const z=String((L==null?void 0:L.path)||"").trim(),V=f.value;if(!z||V.blockIndex<0)return $(),!1;const X=u.value[V.blockIndex];if(!X||!r(X))return $(),!1;const ne=V.trigger==="shortcut"?`${z} `:`@${z} `,Q=`${X.content.slice(0,V.start)}${ne}${X.content.slice(V.end)}`,se=V.start+ne.length,ye=[...u.value];return ye.splice(V.blockIndex,1,{...X,content:Q}),a(ye),t.value=V.blockIndex,i.value[V.blockIndex]={start:se,end:se},b.value=null,$(),ge(()=>n(V.blockIndex,se)),!0}function U(){f.value.open&&T()}return me(()=>(s==null?void 0:s.value)??s,()=>{$()}),me(()=>f.value.open,L=>{L||ge(()=>{o==null||o()})}),Ct(()=>{window.addEventListener("resize",U),window.addEventListener("scroll",U)}),nt(()=>{window.removeEventListener("resize",U),window.removeEventListener("scroll",U)}),{mentionState:f,mentionAnchorRect:d,applyMentionSelection:Z,closeMentionPicker:$,dismissMentionPicker:M,handleTextFocus:H,openPathPickerFromShortcut:G,recordSelection:q,syncMentionState:B,updateMentionAnchor:T}}const kl=["disabled"],_l=["disabled"],wl=["src"],Sl={__name:"ImagePreviewOverlay",props:{modelValue:{type:String,default:""},images:{type:Array,default:()=>[]}},emits:["update:modelValue"],setup(e,{emit:t}){const u=e,r=t,n=O(1),o=ae(()=>u.images.map(T=>String(T||"").trim()).filter(Boolean)),i=ae(()=>o.value.findIndex(T=>T===u.modelValue)),s=ae(()=>i.value>=0?o.value[i.value]:"");function a(){r("update:modelValue",""),n.value=1}function l(T){r("update:modelValue",String(T||"").trim()),n.value=1}function f(){i.value<=0||l(o.value[i.value-1])}function d(){i.value<0||i.value>=o.value.length-1||l(o.value[i.value+1])}function b(T){const F=Math.min(3,Math.max(.5,n.value+T));n.value=Math.round(F*100)/100}function x(){n.value=1}function p(T){s.value&&(T.preventDefault(),b(T.deltaY<0?.1:-.1))}function D(T){if(s.value){if(T.key==="Escape"){T.preventDefault(),a();return}if(T.key==="ArrowLeft"){T.preventDefault(),f();return}if(T.key==="ArrowRight"){T.preventDefault(),d();return}if(T.key==="+"||T.key==="="){T.preventDefault(),b(.1);return}if(T.key==="-"){T.preventDefault(),b(-.1);return}T.key==="0"&&(T.preventDefault(),x())}}return me(()=>u.modelValue,T=>{T||(n.value=1)}),me(o,T=>{if(u.modelValue){if(!T.length){a();return}if(!T.includes(u.modelValue)){const F=Math.min(i.value,T.length-1);l(T[F]||T[0])}}},{immediate:!0}),Ct(()=>{window.addEventListener("keydown",D)}),nt(()=>{window.removeEventListener("keydown",D)}),(T,F)=>(A(),we(Ut,{to:"body"},[s.value?(A(),R("div",{key:0,class:"fixed inset-0 z-50 flex items-center justify-center bg-black/85 p-6",onClick:a,onWheel:p},[g("div",{class:"absolute left-4 top-4 flex items-center gap-2",onClick:F[2]||(F[2]=He(()=>{},["stop"]))},[g("button",{type:"button",class:"rounded-sm border border-white/15 bg-black/55 px-3 py-2 text-sm text-white transition hover:bg-black/70",onClick:F[0]||(F[0]=$=>b(-.1))}," 缩小 "),g("button",{type:"button",class:"rounded-sm border border-white/15 bg-black/55 px-3 py-2 text-sm text-white transition hover:bg-black/70",onClick:x},te(Math.round(n.value*100))+"% ",1),g("button",{type:"button",class:"rounded-sm border border-white/15 bg-black/55 px-3 py-2 text-sm text-white transition hover:bg-black/70",onClick:F[1]||(F[1]=$=>b(.1))}," 放大 ")]),g("div",{class:"absolute right-4 top-4 flex items-center gap-2",onClick:F[3]||(F[3]=He(()=>{},["stop"]))},[g("button",{type:"button",class:"rounded-sm border border-white/15 bg-black/55 px-3 py-2 text-sm text-white transition hover:bg-black/70 disabled:cursor-not-allowed disabled:opacity-40",disabled:i.value<=0,onClick:f}," 上一张 ",8,kl),g("button",{type:"button",class:"rounded-sm border border-white/15 bg-black/55 px-3 py-2 text-sm text-white transition hover:bg-black/70 disabled:cursor-not-allowed disabled:opacity-40",disabled:i.value<0||i.value>=o.value.length-1,onClick:d}," 下一张 ",8,_l),g("button",{type:"button",class:"rounded-sm border border-white/15 bg-black/55 px-3 py-2 text-sm text-white transition hover:bg-black/70",onClick:a}," 关闭 ")]),g("img",{src:s.value,alt:"图片预览",class:"max-h-[90vh] max-w-[90vw] object-contain shadow-2xl transition-transform",style:su({transform:`scale(${n.value})`}),onClick:F[4]||(F[4]=He(()=>{},["stop"]))},null,12,wl)],32)):de("",!0)]))}};function Cl(e){const{props:t,panelRef:u,onClose:r}=e,n=O({left:"12px",top:"12px",width:"560px",maxHeight:"420px"}),o=O(!1),i=O("bottom");function s(){r==null||r()}function a(x=!1){const p=window.innerWidth,D=window.innerHeight,T=12,F=8,$=320,M=560,B=420,q=180,H=Math.min(M,Math.max($,p-T*2)),G=Math.min(H,p-T*2),Z=t.anchorRect||{left:(p-G)/2,top:D/2,bottom:D/2};let U=Z.left;U+G>p-T&&(U=p-T-G),U<T&&(U=T);const L=Math.max(0,D-T-(Z.bottom+F)),z=Math.max(0,Z.top-F-T);x?i.value=L>=z?"bottom":"top":i.value==="bottom"&&L<q&&z>L+24?i.value="top":i.value==="top"&&z<q&&L>z+24&&(i.value="bottom");const V=i.value,X=V==="bottom"?L:z,ne=Math.max(140,D-T*2),Q=Math.min(ne,Math.max(Math.min(B,X||B),q)),se={left:`${Math.round(U)}px`,width:`${Math.round(G)}px`,maxHeight:`${Math.round(Q)}px`,top:"auto",bottom:"auto"};return V==="bottom"?se.top=`${Math.round(Math.max(T,Z.bottom+F))}px`:se.bottom=`${Math.round(Math.max(T,D-Z.top+F))}px`,se}function l(x=!1){const p=a(x);n.value={...n.value,left:p.left,top:p.top,bottom:p.bottom,width:p.width,maxHeight:p.maxHeight}}function f(){return!t.open||!t.anchorRect?!1:(i.value="bottom",l(!0),o.value=!0,!0)}function d(){o.value=!1}function b(x){!t.open||!u.value||u.value.contains(x.target)||s()}return Ct(()=>{document.addEventListener("pointerdown",b)}),nt(()=>{document.removeEventListener("pointerdown",b)}),{closePicker:s,initializePanel:f,panelReady:o,panelStyle:n,resetPanel:d,updatePanelPosition:l}}const Tu="promptx:codex-recent-paths",Dl=12;function El(e){const{props:t,onSelect:u}=e,r=O([]),n=O(!1),o=O(""),i=O([]),s=O(!1),a=O(""),l=O([]),f=O([]),d=O("tree"),b=O(""),x=new Map;let p=null,D=0,T=0;const F=ae(()=>String(t.query||"").trim()),$=ae(()=>!!F.value),M=ae(()=>K(r.value)),B=ae(()=>String(t.sessionId||"").trim()),q=ae(()=>B.value?`promptx:codex-tree-expanded:${B.value}`:""),H=ae(()=>{if(!F.value)return l.value;const h=new Set(i.value.map(c=>c.path));return l.value.filter(c=>h.has(c.path))}),G=ae(()=>{const h=new Set(H.value.map(c=>c.path));return i.value.filter(c=>!h.has(c.path))}),Z=ae(()=>F.value?[...H.value,...G.value]:l.value),U=ae(()=>d.value==="search"?Z.value:M.value),L=ae(()=>d.value==="search"?s.value:n.value),z=ae(()=>d.value==="search"?a.value:o.value),V=ae(()=>d.value==="search"&&!!t.sessionId&&!F.value&&!l.value.length),X=ae(()=>d.value==="search"&&!!t.sessionId&&!!F.value&&!s.value&&!a.value&&!Z.value.length),ne=ae(()=>d.value==="tree"&&!!t.sessionId&&!n.value&&!o.value&&!M.value.length);function Q(h,c){if(!h||typeof window>"u")return c;try{const m=window.localStorage.getItem(h);return m?JSON.parse(m):c}catch{return c}}function se(h,c){if(!(!h||typeof window>"u"))try{window.localStorage.setItem(h,JSON.stringify(c))}catch{}}function ye(h=[]){return[...h].sort((c,m)=>{const w=+(c.type!=="directory")-+(m.type!=="directory");return w||String(c.path||c.name||"").localeCompare(String(m.path||m.name||""),"zh-CN")})}function re(h){return{...h,children:[],expanded:!1,loaded:!1,loading:!1}}function K(h=[],c=0,m=[]){return h.forEach(w=>{m.push({...w,depth:c}),w.type==="directory"&&w.expanded&&w.children.length&&K(w.children,c+1,m)}),m}function le(h,c=r.value){for(const m of c){if(m.path===h)return m;if(m.children.length){const w=le(h,m.children);if(w)return w}}return null}function oe(){r.value=[...r.value]}function Fe(h=r.value,c=[]){return h.forEach(m=>{m.type==="directory"&&m.expanded&&(c.push(m.path),m.children.length&&Fe(m.children,c))}),c}function Ce(){if(!q.value)return;const h=[...new Set(Fe())];f.value=h,se(q.value,h)}function De(){f.value=q.value?Q(q.value,[]).filter(Boolean):[]}function he(){const h=Q(Tu,[]);if(!Array.isArray(h)||!B.value){l.value=[];return}l.value=h.filter(c=>c&&c.sessionId===B.value&&c.path).sort((c,m)=>Number(m.usedAt||0)-Number(c.usedAt||0)).slice(0,Dl)}function ke(h){return h.name||h.path||"."}function qe(h){return h.path||"."}function Ke(h){if(!B.value||!(h!=null&&h.path))return;const c={sessionId:B.value,path:h.path,name:h.name||ke(h),type:h.type||"file",usedAt:Date.now()},m=Q(Tu,[]),w=[c];Array.isArray(m)&&m.forEach(I=>{!(I!=null&&I.path)||!(I!=null&&I.sessionId)||I.sessionId===c.sessionId&&I.path===c.path||w.push(I)}),se(Tu,w.slice(0,40)),he()}function Qe(h=""){const c=String(h||"").trim();return!c||!c.includes("/")?"":c.slice(0,c.lastIndexOf("/"))}function Ee(){const h=U.value;if(!h.length)return-1;const c=h.findIndex(m=>m.path===b.value);return c>=0?c:0}function Xe(){const h=U.value,c=Ee();return c<0||!h.length?null:h[c]||null}function Ae(){const h=U.value;if(!h.length){b.value="";return}h.some(c=>c.path===b.value)||(b.value=h[0].path)}function je(h,c){if(c){x.set(h,c);return}x.delete(h)}function et(){var c;const h=x.get(b.value);(c=h==null?void 0:h.scrollIntoView)==null||c.call(h,{block:"nearest"})}function _e(h=""){return String(h||"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}function Me(h="",c=""){const m=String(h||""),w=String(c||"").trim().toLowerCase();if(!m||!w)return null;const I=m.toLowerCase(),W=I.indexOf(w);if(W>=0)return{start:W,end:W+w.length};const ve=w.split(/[\\/\s_.-]+/).filter(Boolean).sort((ce,Re)=>Re.length-ce.length);for(const ce of ve){if(ce.length<2)continue;const Re=I.indexOf(ce);if(Re>=0)return{start:Re,end:Re+ce.length}}return null}function Ge(h="",c=""){const m=String(h||""),w=Me(m,c);return w?`${_e(m.slice(0,w.start))}<mark class="rounded bg-[var(--theme-warningSoft)] px-0.5 text-inherit">${_e(m.slice(w.start,w.end))}</mark>${_e(m.slice(w.end))}`:_e(m)}function $e(h){return Ge(ke(h),F.value)}function Oe(h){return Ge(qe(h),F.value)}async function Te(h="",c={}){if(!t.sessionId){r.value=[],o.value="",n.value=!1;return}const m=!h,w=m?null:le(h);if(!(!m&&!w)&&!(!c.force&&(m&&r.value.length||!m&&w.loaded))){m?(n.value=!0,o.value=""):(w.loading=!0,o.value="",oe());try{const I=await Yo(t.sessionId,{path:h,refreshToken:c.refreshToken||""}),W=ye(I.items||[]).map(re);if(m){r.value=W;return}w.children=W,w.loaded=!0}catch(I){o.value=I.message}finally{m?n.value=!1:(w.loading=!1,oe())}}}async function Je(h=r.value,c=new Set,m={}){for(const w of h)w.type!=="directory"||!c.has(w.path)||(w.expanded=!0,oe(),await Te(w.path,m),w.children.length&&await Je(w.children,c,m))}async function fe(h={}){await Te("",h);const c=new Set(f.value),m=c.size>0;for(const I of r.value)I.type!=="directory"||!I.hasChildren||(I.expanded=m?c.has(I.path):!0);if(oe(),m){await Je(r.value,c,h);return}const w=r.value.filter(I=>I.type==="directory"&&I.expanded&&I.hasChildren);await Promise.all(w.map(I=>Te(I.path,h))),Ce()}async function Pe(h){if(d.value!=="tree")return;const c=le(h);if(!(!c||c.type!=="directory")){if(!c.loaded&&!c.loading){c.expanded=!0,oe(),await Te(c.path),Ce();return}c.expanded=!c.expanded,oe(),Ce()}}function Be(h){return h!=null&&h.path?(Ke(h),u==null||u(h),!0):!1}async function Ue(h={}){const c=F.value;D+=1;const m=D,w=h.refreshToken||"";if(!t.open||!t.sessionId||!c){s.value=!1,a.value="",c||(i.value=[]);return}try{const I=await Qo(t.sessionId,c,{limit:80,refreshToken:w});if(m!==D)return;i.value=I.items||[]}catch(I){if(m!==D)return;a.value=I.message,i.value=[]}finally{m===D&&(s.value=!1)}}function We(h={}){if(p&&(window.clearTimeout(p),p=null),!t.open||!t.sessionId||!F.value){s.value=!1,a.value="",F.value||(i.value=[]);return}s.value=!0,a.value="",p=window.setTimeout(()=>{Ue(h)},120)}function E(){if(!t.sessionId){r.value=[],o.value="",n.value=!1,i.value=[],a.value="",s.value=!1;return}T=Date.now(),r.value=[],o.value="",i.value=[],a.value="",fe({force:!0,refreshToken:T}),We({refreshToken:T})}function ee(){he(),De(),Y($.value?"search":"tree"),E()}function N(){p&&(window.clearTimeout(p),p=null),i.value=[],a.value="",s.value=!1}function Y(h){d.value=h,h==="tree"&&t.sessionId&&!n.value&&!r.value.length&&fe({force:!0}),ge(()=>{Ae(),et()})}function Ze(h){const c=U.value;if(!c.length)return!1;const m=Ee(),w=m<0?0:(m+h+c.length)%c.length;return b.value=c[w].path,!0}async function y(){if(d.value!=="tree")return!1;const h=Xe();if(!h||h.type!=="directory")return!1;if(!h.expanded)return await Pe(h.path),b.value=h.path,!0;const c=U.value,m=Ee(),w=c[m+1];return w&&Qe(w.path)===h.path?(b.value=w.path,!0):!1}function _(){if(d.value!=="tree")return!1;const h=Xe();if(!h)return!1;if(h.type==="directory"&&h.expanded){const m=le(h.path);return m&&(m.expanded=!1,oe(),Ce()),b.value=h.path,!0}const c=Qe(h.path);return c?(b.value=c,!0):!1}function C(){const h=U.value;return h.length?Be(h[Ee()]):!1}function P(h=1){const c=["search","tree"],m=c.indexOf(d.value),w=m<0?0:(m+h+c.length)%c.length;return Y(c[w]),!0}function J(){r.value=[],o.value="",i.value=[],a.value="",he(),De(),t.sessionId&&(fe({force:!0}),t.open&&We())}function k(){Y($.value?"search":"tree"),We()}function S(){Ae(),ge(et)}return nt(()=>{p&&window.clearTimeout(p)}),{activeKey:b,activeTab:d,collapseActiveDirectory:_,confirmActive:C,currentError:z,currentLoading:L,emitSelect:Be,expandActiveDirectory:y,getDisplayName:ke,getHighlightedName:$e,getHighlightedPath:Oe,handleQueryChange:k,handleSessionChange:J,handleVisibleItemsChange:S,initializeData:ee,moveActive:Ze,normalSearchItems:G,normalizedQuery:F,recentSearchItems:H,resetData:N,setActiveTab:Y,setItemRef:je,showSearchEmptyState:X,showSearchPromptState:V,showTreeEmptyState:ne,switchTab:P,toggleDirectory:Pe,treeItems:M,visibleItems:U}}function Al(e){const{props:t,panelRef:u,onClose:r,onSelect:n}=e,{closePicker:o,initializePanel:i,panelReady:s,panelStyle:a,resetPanel:l,updatePanelPosition:f}=Cl({props:t,panelRef:u,onClose:r}),d=El({props:t,onSelect:n});return me(()=>t.open,b=>{if(!b){d.resetData(),l();return}l(),t.anchorRect&&i()&&d.initializeData()},{flush:"sync"}),me(()=>t.anchorRect,b=>{if(!(!t.open||!b)){if(!s.value){i()&&d.initializeData();return}f(!1)}},{flush:"sync"}),me(()=>t.sessionId,()=>{d.handleSessionChange()},{flush:"sync",immediate:!0}),me(()=>t.query,()=>{d.handleQueryChange()},{immediate:!0}),me(d.visibleItems,()=>{d.handleVisibleItemsChange()},{immediate:!0}),me(()=>d.activeKey.value,()=>{d.handleVisibleItemsChange()}),{...d,closePicker:o,panelReady:s,panelStyle:a}}const Tl={class:"theme-divider flex items-center justify-between gap-2 border-b border-dashed px-2.5 py-2"},Fl={class:"flex items-center gap-1.5"},Il={class:"flex shrink-0 items-center gap-2"},Pl={class:"min-h-0 flex-1 overflow-y-auto p-2"},Ml={key:0,class:"theme-empty-state px-3 py-4 text-xs"},$l={key:1,class:"theme-status-danger rounded-sm border border-dashed px-3 py-3 text-xs"},Bl={key:2,class:"theme-empty-state px-3 py-4 text-xs"},Rl={key:3,class:"theme-empty-state px-3 py-4 text-xs"},Ll={key:4,class:"theme-empty-state px-3 py-4 text-xs"},zl={key:5,class:"theme-empty-state px-3 py-4 text-xs"},ql={key:6,class:"space-y-1"},Ol={key:0,class:"theme-muted-text px-1 py-0.5 text-[10px] uppercase tracking-[0.12em]"},Nl=["onMouseenter","onClick"],jl={class:"min-w-0 flex-1"},Vl=["innerHTML"],Hl=["innerHTML"],Ul={key:1,class:"theme-muted-text px-1 py-0.5 text-[10px] uppercase tracking-[0.12em]"},Wl=["onMouseenter","onClick"],Zl={class:"min-w-0 flex-1"},Kl=["innerHTML"],Xl=["innerHTML"],Gl={key:7,class:"space-y-1"},Jl=["onMouseenter"],Yl={class:"flex items-start gap-1.5"},Ql=["onClick"],ec={key:1,class:"block h-5 w-5 shrink-0"},tc=["onClick"],uc={class:"min-w-0 flex-1"},nc={class:"flex items-center gap-1.5"},rc={__name:"PathMentionPicker",props:{open:{type:Boolean,default:!1},sessionId:{type:String,default:""},query:{type:String,default:""},anchorRect:{type:Object,default:null}},emits:["close","select"],setup(e,{expose:t,emit:u}){const r=e,n=u,o=O(null),{activeKey:i,activeTab:s,closePicker:a,collapseActiveDirectory:l,confirmActive:f,currentError:d,currentLoading:b,emitSelect:x,expandActiveDirectory:p,getDisplayName:D,getHighlightedName:T,getHighlightedPath:F,moveActive:$,normalSearchItems:M,normalizedQuery:B,panelReady:q,panelStyle:H,recentSearchItems:G,setActiveTab:Z,setItemRef:U,showSearchEmptyState:L,showSearchPromptState:z,showTreeEmptyState:V,switchTab:X,toggleDirectory:ne,treeItems:Q,visibleItems:se}=Al({props:r,panelRef:o,onClose:()=>n("close"),onSelect:ye=>n("select",ye)});return t({collapseActiveDirectory:l,moveActive:$,confirmActive:f,expandActiveDirectory:p,switchTab:X}),(ye,re)=>(A(),we(Ut,{to:"body"},[e.open&&v(q)?(A(),R("div",{key:0,ref_key:"panelRef",ref:o,class:"theme-popover fixed z-40 flex flex-col overflow-hidden rounded-sm border shadow-lg",style:su(v(H))},[g("div",Tl,[g("div",Fl,[g("button",{type:"button",class:pe(["inline-flex h-7 items-center gap-1 rounded-sm border px-2 text-[11px] transition",v(s)==="search"?"tool-button-primary":"theme-filter-idle border-dashed"]),onClick:re[0]||(re[0]=K=>v(Z)("search"))},[ue(v(no),{class:"h-3.5 w-3.5"}),re[3]||(re[3]=g("span",null,"搜索",-1))],2),g("button",{type:"button",class:pe(["inline-flex h-7 items-center gap-1 rounded-sm border px-2 text-[11px] transition",v(s)==="tree"?"tool-button-primary":"theme-filter-idle border-dashed"]),onClick:re[1]||(re[1]=K=>v(Z)("tree"))},[ue(v(Gt),{class:"h-3.5 w-3.5"}),re[4]||(re[4]=g("span",null,"文件树",-1))],2)]),g("div",Il,[g("div",{class:pe(["theme-muted-text inline-flex h-7 w-7 items-center justify-center",v(b)?"opacity-100":"opacity-0"])},[ue(v(Tt),{class:"h-3.5 w-3.5 animate-spin"})],2),g("button",{type:"button",class:"tool-button inline-flex h-7 w-7 items-center justify-center",onClick:re[2]||(re[2]=(...K)=>v(a)&&v(a)(...K))},[ue(v(Zn),{class:"h-4 w-4"})])])]),g("div",Pl,[e.sessionId?v(d)?(A(),R("div",$l,te(v(d)),1)):v(z)?(A(),R("div",Bl," 输入关键词开始搜索。 ")):v(L)?(A(),R("div",Rl," 无结果 ")):v(V)?(A(),R("div",Ll," 空目录 ")):v(b)&&!v(se).length?(A(),R("div",zl," 加载中... ")):v(s)==="search"?(A(),R("div",ql,[v(G).length?(A(),R("div",Ol," 最近 ")):de("",!0),(A(!0),R(ot,null,ft(v(G),K=>(A(),R("button",{key:K.path,ref_for:!0,ref:le=>v(U)(K.path,le),type:"button",class:pe(["flex w-full items-start gap-2 rounded-sm border border-transparent px-2.5 py-1.5 text-left transition",v(i)===K.path?"bg-[var(--theme-appPanelInset)]":"hover:bg-[var(--theme-appPanelMuted)]"]),onMouseenter:le=>i.value=K.path,onClick:le=>v(x)(K)},[(A(),we(mu(K.type==="directory"?v(Gt):v(xu)),{class:"theme-muted-text mt-0.5 h-4 w-4 shrink-0"})),g("div",jl,[g("div",null,[g("span",{class:"truncate text-[13px] text-[var(--theme-textPrimary)]",innerHTML:v(T)(K)},null,8,Vl)]),g("div",{class:"theme-muted-text truncate font-mono text-[10px]",innerHTML:v(F)(K)},null,8,Hl)])],42,Nl))),128)),v(B)&&v(M).length?(A(),R("div",Ul," 结果 ")):de("",!0),(A(!0),R(ot,null,ft(v(M),K=>(A(),R("button",{key:K.path,ref_for:!0,ref:le=>v(U)(K.path,le),type:"button",class:pe(["flex w-full items-start gap-2 rounded-sm border border-transparent px-2.5 py-1.5 text-left transition",v(i)===K.path?"bg-[var(--theme-appPanelInset)]":"hover:bg-[var(--theme-appPanelMuted)]"]),onMouseenter:le=>i.value=K.path,onClick:le=>v(x)(K)},[(A(),we(mu(K.type==="directory"?v(Gt):v(xu)),{class:"theme-muted-text mt-0.5 h-4 w-4 shrink-0"})),g("div",Zl,[g("div",null,[g("span",{class:"truncate text-[13px] text-[var(--theme-textPrimary)]",innerHTML:v(T)(K)},null,8,Kl)]),g("div",{class:"theme-muted-text truncate font-mono text-[10px]",innerHTML:v(F)(K)},null,8,Xl)])],42,Wl))),128))])):(A(),R("div",Gl,[(A(!0),R(ot,null,ft(v(Q),K=>(A(),R("div",{key:K.path,ref_for:!0,ref:le=>v(U)(K.path,le),class:pe(["rounded-sm border border-transparent px-1.5 py-1 transition",v(i)===K.path?"bg-[var(--theme-appPanelInset)]":K.type==="directory"&&K.expanded?"bg-[var(--theme-appPanelMuted)]":"hover:bg-[var(--theme-appPanelMuted)]"]),style:su({paddingLeft:`${K.depth*16+6}px`}),onMouseenter:le=>i.value=K.path},[g("div",Yl,[K.type==="directory"?(A(),R("button",{key:0,type:"button",class:"theme-icon-button h-5 w-5 shrink-0",onClick:He(le=>v(ne)(K.path),["stop"])},[K.loading?(A(),we(v(Tt),{key:0,class:"h-3.5 w-3.5 animate-spin"})):(A(),we(v(Gr),{key:1,class:pe(["h-3.5 w-3.5 transition",K.expanded?"rotate-90 text-[var(--theme-textPrimary)]":""])},null,8,["class"]))],8,Ql)):(A(),R("span",ec)),g("button",{type:"button",class:"flex min-w-0 flex-1 items-start gap-1.5 rounded-sm px-0.5 py-0.5 text-left",onClick:le=>v(x)(K)},[(A(),we(mu(K.type==="directory"?v(Gt):v(xu)),{class:pe(["h-4 w-4 shrink-0",K.type==="directory"&&K.expanded?"text-[var(--theme-textPrimary)]":"text-[var(--theme-textMuted)]"])},null,8,["class"])),g("div",uc,[g("div",nc,[g("span",{class:pe(["truncate text-[13px]",K.type==="directory"?"font-medium text-[var(--theme-textPrimary)]":"text-[var(--theme-textPrimary)]"])},te(v(D)(K)),3)])])],8,tc)])],46,Jl))),128))])):(A(),R("div",Ml," 请先选择项目。 "))])],4)):de("",!0)]))}},oc={class:"theme-divider theme-secondary-text border-b px-5 py-4 text-sm"},ic={class:"flex flex-wrap items-center justify-between gap-3"},sc={class:"theme-heading inline-flex items-center gap-2 font-medium"},ac={class:"grid w-full grid-cols-3 gap-2 sm:flex sm:w-auto sm:flex-wrap sm:items-center sm:justify-end"},lc={key:0,class:"mt-2 flex flex-wrap items-center gap-x-3 gap-y-2 text-xs"},cc={class:"theme-status-neutral inline-flex items-center gap-1.5 rounded-sm border border-dashed px-2 py-1"},dc={class:"flex flex-col gap-5"},fc={key:0,class:"group relative"},pc=["value","placeholder","onFocus","onInput","onKeydown","onClick","onKeyup","onSelect"],hc=["onClick"],mc={key:1,class:"group relative dashed-panel overflow-hidden"},bc={class:"theme-divider theme-secondary-text flex items-start justify-between gap-3 border-b border-dashed px-4 py-3 text-xs"},xc={class:"min-w-0 pr-24"},gc={class:"mt-1 truncate font-mono"},vc={class:"mt-1"},yc={class:"absolute right-3 top-3 flex flex-wrap gap-2 opacity-0 transition group-hover:opacity-100 focus-within:opacity-100"},kc=["onClick"],_c=["onClick"],wc=["onClick"],Sc={key:0,class:"theme-secondary-text px-4 py-3 text-sm leading-7"},Cc={key:0},Dc=["value","onFocus","onInput","onKeydown","onClick","onKeyup","onSelect"],Ec={key:2,class:"group relative"},Ac=["onClick"],Tc=["onClick"],Fc={class:"theme-divider theme-muted-text flex items-center gap-2 border-b px-4 py-3 text-xs"},Ic={class:"mx-auto flex w-full max-w-[720px] justify-center px-4 py-4"},Pc=["onClick"],Mc=["src"],$c={__name:"BlockEditor",props:{modelValue:{type:Array,required:!0},codexSessionId:{type:String,default:""},uploading:{type:Boolean,default:!1}},emits:["update:modelValue","upload-files","import-text-files","import-pdf-files","clear-request"],setup(e,{expose:t,emit:u}){const r=e,n=u,o=ae(()=>r.modelValue),i=ae(()=>r.codexSessionId),s=O(0),a=O([]),l=O(null),f=O(null),d=O(null),b=O(null),x=O({}),p=O(""),{mentionState:D,mentionAnchorRect:T,applyMentionSelection:F,closeMentionPicker:$,dismissMentionPicker:M,handleTextFocus:B,openPathPickerFromShortcut:q,recordSelection:H,syncMentionState:G,updateMentionAnchor:Z}=yl({activeIndex:s,blocks:o,isTextLikeBlock:z,placeCursor:oe,resizeAllTextareas:K,selectionMap:x,sessionId:i,setBlocks:se,textareas:a}),U=ae(()=>o.value.filter(y=>(y==null?void 0:y.type)===xe.IMAGE&&String(y.content||"").trim()).map(y=>String(y.content||"").trim()));function L(y){return(y==null?void 0:y.type)===xe.TEXT}function z(y){return(y==null?void 0:y.type)===xe.TEXT||(y==null?void 0:y.type)===xe.IMPORTED_TEXT}function V(y){return y&&y.type!==xe.TEXT}function X(y=""){return{type:xe.TEXT,content:y,meta:{}}}function ne(y=[]){const _=Array.isArray(y)?y.filter(Boolean):[];if(!_.length)return[X("")];const C=[];return _.forEach((P,J)=>{const k=C[C.length-1];!k&&V(P)&&C.push(X("")),k&&V(k)&&V(P)&&C.push(X("")),C.push(P),J===_.length-1&&V(P)&&C.push(X(""))}),C}function Q(y=[],_=[]){return y===_?!0:!Array.isArray(y)||!Array.isArray(_)||y.length!==_.length?!1:y.every((C,P)=>{var k,S,h,c;const J=_[P];return!J||(C==null?void 0:C.type)!==J.type||(C==null?void 0:C.content)!==J.content?!1:(((k=C==null?void 0:C.meta)==null?void 0:k.fileName)||"")===(((S=J.meta)==null?void 0:S.fileName)||"")&&!!((h=C==null?void 0:C.meta)!=null&&h.collapsed)==!!((c=J.meta)!=null&&c.collapsed)})}function se(y){n("update:modelValue",ne(y))}function ye(y,_){if(y){if(a.value[_]===y)return;a.value[_]=y,re(y);return}a.value[_]=null}function re(y,_={}){if(!y)return;const{allowShrink:C=!0,preserveViewport:P=!0,preserveSelection:J=!0}=_,k=window.scrollX,S=window.scrollY,h=y.selectionStart,c=y.selectionEnd,m=document.activeElement===y,w=Number.parseFloat(y.style.height)||y.offsetHeight||40;C?(y.style.height="auto",y.style.height=`${Math.max(y.scrollHeight,40)}px`):y.style.height=`${Math.max(w,y.scrollHeight,40)}px`,J&&m&&h!==null&&c!==null&&y.setSelectionRange(h,c),P&&(window.scrollX!==k||window.scrollY!==S)&&window.scrollTo(k,S)}function K(){a.value.forEach(y=>re(y))}function le(){ge(()=>{f.value&&(f.value.scrollTop=f.value.scrollHeight)})}function oe(y,_=null){const C=a.value[y];if(!C)return;const P=_??C.value.length;C.focus(),C.setSelectionRange(P,P),x.value[y]={start:P,end:P}}function Fe(y,_){const C=o.value.map((P,J)=>J===y?{...P,content:_}:P);se(C)}function Ce(y){const _=o.value.map((C,P)=>{var J;return P===y?{...C,meta:{...C.meta,collapsed:!((J=C.meta)!=null&&J.collapsed)}}:C});se(_)}function De(y){const _=o.value[y];if(!_||_.type!==xe.IMPORTED_TEXT)return;const C=o.value.map((P,J)=>J===y?{type:xe.TEXT,content:P.content,meta:{}}:P);se(C),s.value=y,ge(()=>oe(y,0))}function he(y){const _=o.value[y];if((_==null?void 0:_.type)===xe.TEXT&&o.value.length===1){se([{..._,content:""}]),ge(()=>oe(0,0));return}const C=o.value.filter((P,J)=>J!==y);se(C),ge(()=>{var J;const P=Math.max(0,Math.min(y,C.length-1));((J=o.value[P])==null?void 0:J.type)===xe.TEXT&&oe(P,0)})}function ke(){se([X("")]),s.value=0,x.value={0:{start:0,end:0}},ge(()=>oe(0,0))}function qe(y="",_=180){return String(y).replace(/\s+/g," ").trim().slice(0,_)}function Ke(y=""){const _=String(y),C=_?_.split(`
215
+ `).length:0,P=_.length;return`${C} 行 · ${P} 字符`}function Qe(y,_,C={}){const{focusAfterInserted:P=!1}=C,J=[...o.value],k=J[y],S=x.value[y]||{start:k.content.length,end:k.content.length},h=Math.max(0,S.start??0),c=Math.max(h,S.end??h),m=k.content.slice(0,h),w=k.content.slice(c),I=[];m&&I.push({...k,content:m}),I.push(..._),w&&I.push(X(w)),J.splice(y,1,...I),se(J),ge(()=>{const W=P?y+I.length-(w?1:0):y,ve=o.value.findIndex((ce,Re)=>Re>=W&&ce.type===xe.TEXT);ve>=0&&(s.value=ve,oe(ve,0))})}function Ee(y,_={}){const{focusAfterInserted:C=!1}=_;if(!y.length)return;const P=Math.min(s.value??0,Math.max(o.value.length-1,0)),J=o.value[P];if(!J||J.type===xe.IMPORTED_TEXT){const k=[...o.value],S=P+1;k.splice(S,0,...y),se(k),C&&ge(()=>{const h=o.value.findIndex((c,m)=>m>=S+y.length&&c.type===xe.TEXT);h>=0&&(s.value=h,oe(h,0))});return}if(!L(J)){const k=[...o.value],S=k.length?P+1:0;k.splice(S,0,...y),se(k),C&&ge(()=>{const h=o.value.findIndex((c,m)=>m>=S+y.length&&c.type===xe.TEXT);h>=0&&(s.value=h,oe(h,0))});return}Qe(P,y,{focusAfterInserted:C})}function Xe(y){const _=String(y||"");if(!_)return;const C=Math.min(s.value??0,Math.max(o.value.length-1,0)),P=o.value[C];if(!P||!z(P)){Ee([X(_)]);return}const J=x.value[C]||{start:P.content.length,end:P.content.length},k=Math.max(0,J.start??0),S=Math.max(k,J.end??k),h=`${P.content.slice(0,k)}${_}${P.content.slice(S)}`,c=[...o.value];c.splice(C,1,{...P,content:h}),se(c),ge(()=>oe(C,k+_.length))}function Ae(y){Ee(y,{focusAfterInserted:!0})}function je(y){Ee(y,{focusAfterInserted:!0})}function et(y){Ee(y,{focusAfterInserted:!0})}function _e(y,_){const C=o.value[y],P=o.value[_];if(!z(C)||!z(P))return;const J=_<y?`${P.content}${C.content}`:`${C.content}${P.content}`,k=[...o.value],S=Math.min(y,_),h=Math.max(y,_);k.splice(S,1,{...k[S],content:J}),k.splice(h,1),se(k);const c=_<y?P.content.length:C.content.length;s.value=S,ge(()=>oe(S,c))}function Me(y,_,C=0){const P=o.value.filter((k,S)=>S!==_);se(P);const J=_<y?y-1:y;s.value=J,ge(()=>oe(J,C))}function Ge(y){const _=o.value.findIndex((C,P)=>P>y&&C.type===xe.TEXT);_>=0&&(s.value=_,ge(()=>oe(_,0)))}function $e(y){const _=String(y||"").trim();_&&(p.value=_)}function Oe(y){const _=[...y].filter(C=>C&&C.type.startsWith("image/"));_.length&&n("upload-files",_)}function Te(y){if(!y)return!1;const _=String(y.name||"").toLowerCase(),C=String(y.type||"").toLowerCase();return _.endsWith(".md")||_.endsWith(".markdown")||_.endsWith(".txt")||C.startsWith("text/")}function Je(y){if(!y)return!1;const _=String(y.name||"").toLowerCase(),C=String(y.type||"").toLowerCase();return _.endsWith(".pdf")||C==="application/pdf"}function fe(y){const _=[...y].filter(Boolean);return{imageFiles:_.filter(C=>C.type.startsWith("image/")),textFiles:_.filter(C=>Te(C)),pdfFiles:_.filter(C=>Je(C))}}function Pe(y){const _=[...y.clipboardData.items].filter(C=>C.kind==="file").map(C=>C.getAsFile()).filter(Boolean);_.length&&(y.preventDefault(),Oe(_))}function Be(y){y.preventDefault();const{imageFiles:_,textFiles:C,pdfFiles:P}=fe(y.dataTransfer.files);C.length&&n("import-text-files",C),P.length&&n("import-pdf-files",P),_.length&&Oe(_)}function Ue(y){const{imageFiles:_,textFiles:C,pdfFiles:P}=fe(y.target.files);C.length&&n("import-text-files",C),P.length&&n("import-pdf-files",P),_.length&&Oe(_),y.target.value=""}function We(){var y;(y=d.value)==null||y.click()}function E(y){var C;if(y.target!==l.value)return;$();const _=(C=[...o.value].map((P,J)=>({block:P,index:J})).filter(P=>P.block.type===xe.TEXT).at(-1))==null?void 0:C.index;typeof _=="number"&&(s.value=_,ge(()=>{var P;return oe(_,((P=a.value[_])==null?void 0:P.value.length)||0)}))}function ee(y,_){const C=D.value.open&&D.value.blockIndex===y;re(_.target,C?{allowShrink:!1,preserveViewport:!1,preserveSelection:!1}:void 0),D.value.open&&D.value.blockIndex===y||le(),G(y,_.target)}async function N(y,_){var S,h,c,m,w,I,W,ve,ce,Re,tt,$t;const C=o.value[y],P=_.target;if((_.metaKey||_.ctrlKey)&&_.shiftKey&&_.key==="Backspace"){_.preventDefault(),n("clear-request");return}if(!z(C))return;if((_.metaKey||_.ctrlKey)&&!_.shiftKey&&!_.altKey&&_.key.toLowerCase()==="k"&&q()){_.preventDefault();return}if(D.value.open&&D.value.blockIndex===y){if(_.key==="Escape"){_.preventDefault(),M();return}if(_.key==="ArrowDown"&&(h=(S=b.value)==null?void 0:S.moveActive)!=null&&h.call(S,1)){_.preventDefault();return}if(_.key==="ArrowUp"&&(m=(c=b.value)==null?void 0:c.moveActive)!=null&&m.call(c,-1)){_.preventDefault();return}if(_.key==="ArrowRight"&&await((I=(w=b.value)==null?void 0:w.expandActiveDirectory)==null?void 0:I.call(w))){_.preventDefault();return}if(_.key==="ArrowLeft"&&(ve=(W=b.value)==null?void 0:W.collapseActiveDirectory)!=null&&ve.call(W)){_.preventDefault();return}if(!_.altKey&&!_.metaKey&&!_.ctrlKey&&_.key==="Tab"&&(Re=(ce=b.value)==null?void 0:ce.switchTab)!=null&&Re.call(ce,_.shiftKey?-1:1)){_.preventDefault();return}if(!_.shiftKey&&!_.altKey&&!_.metaKey&&!_.ctrlKey&&_.key==="Enter"&&($t=(tt=b.value)==null?void 0:tt.confirmActive)!=null&&$t.call(tt)){_.preventDefault();return}}const J=P.selectionStart??0,k=P.selectionEnd??0;if(_.key==="Backspace"&&J===0&&k===0){const pt=o.value[y-1];if(!pt)return;if(_.preventDefault(),z(pt)){_e(y,y-1);return}Me(y,y-1,0);return}if(_.key==="Delete"&&J===C.content.length&&k===C.content.length){const pt=o.value[y+1];if(!pt)return;if(_.preventDefault(),z(pt)){_e(y,y+1);return}Me(y,y+1,C.content.length)}}function Y(){const y=o.value.findIndex(_=>_.type===xe.TEXT);y<0||(s.value=y,ge(()=>{var P;const _=a.value[y],C=(_==null?void 0:_.selectionStart)??((P=_==null?void 0:_.value)==null?void 0:P.length)??0;oe(y,C)}))}const Ze=ae(()=>o.value.map((y,_)=>{var C;return`${_}:${y.type}:${(C=y.meta)!=null&&C.collapsed?"1":"0"}`}).join("|"));return me(Ze,()=>{ge(()=>{K(),le()})},{immediate:!0}),me(()=>r.modelValue,y=>{const _=ne(y);Q(_,y)||n("update:modelValue",_)},{immediate:!0,deep:!0}),me(Ze,()=>{D.value.open&&ge(Z)}),t({clearContent:ke,focusEditor:Y,insertBlocks:je,insertImportedBlocks:et,insertTextAtSelection:Xe,insertUploadedBlocks:Ae,isImportedBlockActive:()=>{var y;return((y=o.value[s.value])==null?void 0:y.type)===xe.IMPORTED_TEXT},openFilePicker:We}),(y,_)=>(A(),R("section",{ref_key:"surfaceRef",ref:l,class:"panel relative flex h-full min-h-0 flex-col overflow-hidden",onClick:E,onDrop:Be,onDragover:_[1]||(_[1]=He(()=>{},["prevent"])),onPaste:Pe},[g("div",oc,[g("div",ic,[g("p",sc,[ue(v(uo),{class:"h-4 w-4"}),_[2]||(_[2]=g("span",null,"输入文本、图片或文件(md、pdf)",-1))]),g("div",ac,[Rt(y.$slots,"header-actions")])]),e.uploading?(A(),R("div",lc,[g("span",cc,[ue(v(Tt),{class:"h-3.5 w-3.5 animate-spin"}),_[3]||(_[3]=g("span",null,"正在处理文件...",-1))])])):de("",!0),g("input",{ref_key:"fileInputRef",ref:d,class:"hidden",type:"file",accept:"image/*,.md,.markdown,.txt,.pdf,text/plain,text/markdown,application/pdf",multiple:"",onChange:Ue},null,544)]),g("div",{ref_key:"contentRef",ref:f,class:"flex-1 overflow-y-auto px-5 py-5"},[g("div",dc,[(A(!0),R(ot,null,ft(o.value,(C,P)=>{var J,k,S,h;return A(),R(ot,{key:`${C.type}-${P}`},[C.type===v(xe).TEXT?(A(),R("div",fc,[g("textarea",{ref_for:!0,ref:c=>ye(c,P),rows:"1",value:C.content,class:"w-full resize-none border-0 bg-transparent p-0 pr-12 text-[15px] leading-8 text-[var(--theme-textPrimary)] outline-none placeholder:text-[var(--theme-textMuted)]",placeholder:P===0?"从这里开始写需求...":"继续输入...",onFocus:c=>v(B)(P),onInput:c=>{Fe(P,c.target.value),ee(P,c)},onKeydown:c=>N(P,c),onClick:c=>v(H)(P,c),onKeyup:c=>v(H)(P,c),onSelect:c=>v(H)(P,c)},null,40,pc),g("button",{type:"button",class:"tool-button theme-danger-text absolute right-0 top-1 inline-flex items-center gap-1.5 px-2 py-1 text-xs opacity-0 transition group-hover:opacity-100 focus:opacity-100",onClick:c=>he(P)},[ue(v(tu),{class:"h-3.5 w-3.5"}),_[4]||(_[4]=g("span",null,"删除",-1))],8,hc)])):C.type===v(xe).IMPORTED_TEXT?(A(),R("div",mc,[g("div",bc,[g("div",xc,[_[5]||(_[5]=g("p",{class:"theme-heading font-medium"},"导入文件",-1)),g("p",gc,te(((J=C.meta)==null?void 0:J.fileName)||"未命名文件"),1),g("p",vc,te(Ke(C.content)),1)]),g("div",yc,[g("button",{type:"button",class:"tool-button inline-flex items-center gap-1.5 px-2 py-1 text-xs",onClick:c=>Ce(P)},[ue(v(qt),{class:pe(["h-3.5 w-3.5",(k=C.meta)!=null&&k.collapsed?"rotate-180":""])},null,8,["class"]),g("span",null,te((S=C.meta)!=null&&S.collapsed?"展开":"折叠"),1)],8,kc),g("button",{type:"button",class:"tool-button inline-flex items-center gap-1.5 px-2 py-1 text-xs",onClick:c=>De(P)},[ue(v(Qr),{class:"h-3.5 w-3.5"}),_[6]||(_[6]=g("span",null,"转普通文本",-1))],8,_c),g("button",{type:"button",class:"tool-button theme-danger-text inline-flex items-center gap-1.5 px-2 py-1 text-xs",onClick:c=>he(P)},[ue(v(tu),{class:"h-3.5 w-3.5"}),_[7]||(_[7]=g("span",null,"删除",-1))],8,wc)])]),(h=C.meta)!=null&&h.collapsed?(A(),R("div",Sc,[Lr(te(qe(C.content)||"空内容"),1),C.content.length>180?(A(),R("span",Cc,"...")):de("",!0)])):(A(),R("textarea",{key:1,ref_for:!0,ref:c=>ye(c,P),rows:"1",value:C.content,class:"w-full resize-none border-0 bg-transparent px-4 py-4 text-[15px] leading-8 text-[var(--theme-textPrimary)] outline-none placeholder:text-[var(--theme-textMuted)]",placeholder:"导入内容为空",onFocus:c=>v(B)(P),onInput:c=>{Fe(P,c.target.value),ee(P,c)},onKeydown:c=>N(P,c),onClick:c=>v(H)(P,c),onKeyup:c=>v(H)(P,c),onSelect:c=>v(H)(P,c)},null,40,Dc))])):(A(),R("figure",Ec,[g("button",{type:"button",class:"tool-button theme-danger-text absolute right-3 top-3 z-10 inline-flex items-center gap-1.5 px-2 py-1 text-xs opacity-0 transition group-hover:opacity-100 focus:opacity-100",onClick:c=>he(P)},[ue(v(tu),{class:"h-3.5 w-3.5"}),_[8]||(_[8]=g("span",null,"删除",-1))],8,Ac),g("div",{class:"overflow-hidden rounded-sm border border-[var(--theme-borderDefault)] bg-[var(--theme-appPanelMuted)]",onClick:c=>Ge(P)},[g("div",Fc,[ue(v(eo),{class:"h-4 w-4"}),_[9]||(_[9]=g("span",null,"已插入图片",-1))]),g("div",Ic,[g("button",{type:"button",class:"inline-flex cursor-zoom-in justify-center",onClick:He(c=>$e(C.content),["stop"])},[g("img",{src:C.content,alt:"已插入图片",class:"max-h-[380px] w-auto max-w-full object-contain"},null,8,Mc)],8,Pc)])],8,Tc)]))],64)}),128))])],512),ue(Sl,{modelValue:p.value,"onUpdate:modelValue":_[0]||(_[0]=C=>p.value=C),images:U.value},null,8,["modelValue","images"]),ue(rc,{ref_key:"mentionPickerRef",ref:b,open:v(D).open&&!!v(T),"session-id":e.codexSessionId,query:v(D).query,"anchor-rect":v(T),onClose:v(M),onSelect:v(F)},null,8,["open","session-id","query","anchor-rect","onClose","onSelect"])],544))}},Bc={__name:"WorkbenchEditorActions",props:{isCurrentTaskSending:{type:Boolean,default:!1}},emits:["open-file-picker","clear-request","copy-request","send-request","stop-request"],setup(e,{emit:t}){const u=t;return(r,n)=>(A(),R(ot,null,[g("button",{type:"button",class:"tool-button inline-flex w-full items-center justify-center gap-1.5 px-2 py-2 text-xs sm:w-auto sm:gap-2 sm:px-3",onClick:n[0]||(n[0]=o=>u("open-file-picker"))},[ue(v(so),{class:"h-4 w-4"}),n[5]||(n[5]=g("span",null,"选文件",-1))]),g("button",{type:"button",class:"tool-button inline-flex w-full items-center justify-center gap-1.5 px-2 py-2 text-xs sm:w-auto sm:gap-2 sm:px-3",onClick:n[1]||(n[1]=o=>u("clear-request"))},[ue(v(ao),{class:"h-4 w-4"}),n[6]||(n[6]=g("span",null,"清空",-1))]),g("button",{type:"button",class:"tool-button hidden items-center justify-center gap-1.5 px-2 py-2 text-xs sm:inline-flex sm:w-auto sm:gap-2 sm:px-3",onClick:n[2]||(n[2]=o=>u("copy-request"))},[ue(v(Yr),{class:"h-4 w-4"}),n[7]||(n[7]=g("span",null,"复制",-1))]),e.isCurrentTaskSending?(A(),R("button",{key:1,type:"button",class:"tool-button inline-flex w-full items-center justify-center gap-1.5 px-2 py-2 text-xs sm:w-auto sm:gap-2 sm:px-3",onClick:n[4]||(n[4]=o=>u("stop-request"))},[ue(v(Wn),{class:"h-4 w-4"}),n[9]||(n[9]=g("span",null,"停止",-1))])):(A(),R("button",{key:0,type:"button",class:"tool-button inline-flex w-full items-center justify-center gap-1.5 px-2 py-2 text-xs sm:w-auto sm:gap-2 sm:px-3",onClick:n[3]||(n[3]=o=>u("send-request"))},[ue(v(ro),{class:"h-4 w-4"}),n[8]||(n[8]=g("span",null,"发送",-1))]))],64))}},Rc={key:0,class:"panel theme-muted-text flex h-full items-center px-5 py-4 text-sm"},zn={__name:"WorkbenchInputPanel",props:{modelValue:{type:Array,default:()=>[]},codexSessionId:{type:String,default:""},uploading:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},isCurrentTaskSending:{type:Boolean,default:!1}},emits:["update:modelValue","upload-files","import-text-files","import-pdf-files","clear-request","copy-request","send-request","stop-request"],setup(e,{expose:t,emit:u}){const r=e,n=u,o=O(null),i=ae({get:()=>r.modelValue,set:x=>n("update:modelValue",x)});function s(){var x,p;(p=(x=o.value)==null?void 0:x.openFilePicker)==null||p.call(x)}function a(){var x,p;(p=(x=o.value)==null?void 0:x.focusEditor)==null||p.call(x)}function l(x){var p,D;(D=(p=o.value)==null?void 0:p.insertBlocks)==null||D.call(p,x)}function f(x){var p,D;(D=(p=o.value)==null?void 0:p.insertImportedBlocks)==null||D.call(p,x)}function d(x){var p,D;(D=(p=o.value)==null?void 0:p.insertUploadedBlocks)==null||D.call(p,x)}function b(){var x,p;return((p=(x=o.value)==null?void 0:x.isImportedBlockActive)==null?void 0:p.call(x))||!1}return t({focusEditor:a,insertBlocks:l,insertImportedBlocks:f,insertUploadedBlocks:d,isImportedBlockActive:b,openFilePicker:s}),(x,p)=>e.loading&&!e.modelValue.length?(A(),R("section",Rc," 正在加载任务内容... ")):(A(),we($c,{key:1,ref_key:"blockEditorRef",ref:o,modelValue:i.value,"onUpdate:modelValue":p[4]||(p[4]=D=>i.value=D),"codex-session-id":e.codexSessionId,uploading:e.uploading,onUploadFiles:p[5]||(p[5]=D=>n("upload-files",D)),onImportTextFiles:p[6]||(p[6]=D=>n("import-text-files",D)),onImportPdfFiles:p[7]||(p[7]=D=>n("import-pdf-files",D)),onClearRequest:p[8]||(p[8]=D=>n("clear-request"))},{"header-actions":zt(()=>[ue(Bc,{"is-current-task-sending":e.isCurrentTaskSending,onOpenFilePicker:s,onClearRequest:p[0]||(p[0]=D=>n("clear-request")),onCopyRequest:p[1]||(p[1]=D=>n("copy-request")),onSendRequest:p[2]||(p[2]=D=>n("send-request")),onStopRequest:p[3]||(p[3]=D=>n("stop-request"))},null,8,["is-current-task-sending"])]),_:1},8,["modelValue","codex-session-id","uploading"]))}},Lc={class:"panel shrink-0 overflow-hidden"},zc={class:"theme-divider border-b px-4 py-3"},qc={class:"flex items-center gap-3"},Oc={class:"min-w-0 flex-1"},Nc=["value","placeholder"],jc=["disabled"],Vc={class:"truncate"},Hc={__name:"WorkbenchMobileDetailHeader",props:{currentTaskSlug:{type:String,default:""},editingTaskTitleSlug:{type:String,default:""},title:{type:String,default:""},titleInputValue:{type:String,default:""},currentTaskAutoTitle:{type:String,default:""}},emits:["back","begin-edit","title-blur","cancel-title-edit","update:titleInputValue"],setup(e,{emit:t}){const u=t;return(r,n)=>(A(),R("section",Lc,[g("div",zc,[g("div",qc,[g("button",{type:"button",class:"tool-button inline-flex shrink-0 items-center gap-1.5 px-3 py-2 text-xs",onClick:n[0]||(n[0]=o=>u("back"))},[ue(v(Wr),{class:"h-4 w-4"}),n[6]||(n[6]=g("span",null,"任务",-1))]),g("div",Oc,[e.currentTaskSlug&&e.editingTaskTitleSlug===e.currentTaskSlug?(A(),R("input",{key:0,value:e.titleInputValue,type:"text",maxlength:"140","data-task-title-input":"current",class:"block w-full appearance-none border-0 bg-transparent p-0 text-left text-sm font-semibold leading-6 outline-none placeholder:text-[var(--theme-textMuted)]",placeholder:e.currentTaskAutoTitle||"未命名任务",onInput:n[1]||(n[1]=o=>u("update:titleInputValue",o.target.value)),onKeydown:[n[2]||(n[2]=wt(He(o=>o.target.blur(),["prevent"]),["enter"])),n[3]||(n[3]=wt(He(o=>u("cancel-title-edit"),["prevent"]),["esc"]))],onBlur:n[4]||(n[4]=o=>u("title-blur"))},null,40,Nc)):(A(),R("button",{key:1,type:"button",class:"inline-flex w-full items-center gap-2 truncate bg-transparent p-0 text-left text-sm font-semibold leading-6",disabled:!e.currentTaskSlug,onClick:n[5]||(n[5]=o=>u("begin-edit"))},[g("span",Vc,te(e.title||"未命名任务"),1),ue(v(Un),{class:"h-3.5 w-3.5 shrink-0 opacity-50"})],8,jc))])])])]))}},Uc={class:"panel flex h-full min-h-0 flex-col overflow-hidden"},Wc={class:"theme-divider border-b px-4 py-4"},Zc={class:"flex items-center justify-between gap-3"},Kc={class:"flex min-h-8 items-center"},Xc={class:"theme-heading inline-flex items-center gap-2 text-sm font-medium"},Gc=["disabled"],Jc={class:"min-h-0 flex-1 overflow-y-auto px-3 py-3"},Yc={key:0,class:"theme-empty-state px-3 py-4 text-sm"},Qc={key:1,class:"space-y-2"},ed=["onClick"],td={key:0,class:"absolute inset-y-2 left-0 w-1 rounded-full bg-[var(--theme-accent)]"},ud={class:"flex items-start justify-between gap-3"},nd={class:"min-w-0 h-5 flex-1 overflow-hidden"},rd=["value","placeholder"],od=["onClick"],id={class:"flex shrink-0 items-center gap-1.5 text-[10px] uppercase tracking-[0.18em] opacity-80"},sd={class:"mt-2 truncate text-xs opacity-80"},ad={class:"mt-2 flex items-center justify-between gap-3"},ld={class:"min-w-0 text-[11px] opacity-70"},cd={class:"flex shrink-0 items-center gap-1.5 text-[10px] uppercase tracking-[0.18em] opacity-80"},dd={class:"theme-divider border-t px-3 py-3"},fd={key:0,class:"theme-danger-text mb-3 inline-flex min-w-0 items-start gap-2 text-xs"},pd={class:"min-w-0 break-words"},hd=["disabled"],qn={__name:"WorkbenchTaskListPanel",props:{loadingTasks:{type:Boolean,default:!1},tasks:{type:Array,default:()=>[]},currentTaskSlug:{type:String,default:""},editingTaskTitleSlug:{type:String,default:""},draftTitle:{type:String,default:""},currentTaskAutoTitle:{type:String,default:""},creatingTask:{type:Boolean,default:!1},loadingTask:{type:Boolean,default:!1},uploading:{type:Boolean,default:!1},error:{type:String,default:""},removingTask:{type:Boolean,default:!1},isCurrentTaskSending:{type:Boolean,default:!1},mobile:{type:Boolean,default:!1}},emits:["open-settings","create-task","select-task","title-click","title-blur","cancel-title-edit","update:draftTitle","delete-task"],setup(e,{emit:t}){const u=e,r=t;function n(s){return s.slug===u.currentTaskSlug?"border-[var(--theme-accent)] bg-[var(--theme-accentSoft)] text-[var(--theme-textPrimary)] shadow-md shadow-[color-mix(in_srgb,var(--theme-accent)_18%,transparent)]":s.sending?"border-[var(--theme-warning)] bg-[var(--theme-appPanelMuted)] hover:bg-[var(--theme-appPanelHover)]":"border-[var(--theme-borderDefault)] bg-[var(--theme-appPanelMuted)] hover:bg-[var(--theme-appPanelHover)]"}function o(){return"border-[var(--theme-warning)] bg-[var(--theme-warningSoft)] text-[var(--theme-warningText)]"}function i(s){return s.slug===u.currentTaskSlug?"border-[var(--theme-borderStrong)] bg-[var(--theme-appPanelStrong)] text-[var(--theme-textSecondary)]":"border-[var(--theme-borderDefault)] bg-[var(--theme-appPanelStrong)] text-[var(--theme-textMuted)]"}return(s,a)=>(A(),R("aside",Uc,[g("div",Wc,[g("div",Zc,[g("div",Kc,[g("div",Xc,[ue(v(Zr),{class:"h-4 w-4"}),a[8]||(a[8]=g("span",null,"PromptX 工作台",-1))])]),g("button",{type:"button",class:"tool-button inline-flex items-center gap-2 px-3 py-2 text-xs",onClick:a[0]||(a[0]=l=>r("open-settings"))},[ue(v(oo),{class:"h-4 w-4"}),g("span",{class:pe(e.mobile?"":"hidden sm:inline")},"设置",2)])]),g("button",{type:"button",class:"tool-button tool-button-primary mt-4 inline-flex w-full items-center justify-center gap-2 px-3 py-2 text-sm",disabled:e.creatingTask||e.loadingTask||e.uploading,onClick:a[1]||(a[1]=l=>r("create-task"))},[ue(v(to),{class:"h-4 w-4"}),g("span",null,te(e.creatingTask?"创建中...":"新建任务"),1)],8,Gc)]),g("div",Jc,[e.loadingTasks&&!e.tasks.length?(A(),R("div",Yc," 正在加载任务... ")):(A(),R("div",Qc,[(A(!0),R(ot,null,ft(e.tasks,l=>{var f,d,b;return A(),R("article",{key:l.slug,class:pe(["group relative cursor-default rounded-sm border px-3 py-3 transition",n(l)]),onClick:x=>r("select-task",l.slug)},[l.slug===e.currentTaskSlug?(A(),R("span",td)):de("",!0),g("div",ud,[g("div",nd,[l.slug===e.currentTaskSlug&&e.editingTaskTitleSlug===l.slug?(A(),R("input",{key:0,value:e.draftTitle,type:"text",maxlength:"140","data-task-title-input":"current",class:"block h-5 min-h-0 w-full appearance-none border-0 bg-transparent p-0 text-left text-sm font-semibold leading-5 outline-none placeholder:text-[var(--theme-textMuted)]",placeholder:e.currentTaskAutoTitle||"未命名任务",onClick:a[2]||(a[2]=He(()=>{},["stop"])),onInput:a[3]||(a[3]=x=>r("update:draftTitle",x.target.value)),onKeydown:[a[4]||(a[4]=wt(He(x=>x.target.blur(),["prevent"]),["enter"])),a[5]||(a[5]=wt(He(x=>r("cancel-title-edit"),["prevent"]),["esc"]))],onBlur:a[6]||(a[6]=x=>r("title-blur"))},null,40,rd)):(A(),R("button",{key:1,type:"button",class:pe(["block h-5 w-full cursor-pointer truncate bg-transparent p-0 text-left text-sm leading-5",l.slug===e.currentTaskSlug?"font-semibold":"font-medium"]),onClick:He(x=>r("title-click",l.slug),["stop"])},te(l.displayTitle),11,od))]),g("div",id,[l.sending?(A(),R("span",{key:0,class:pe(["inline-flex items-center gap-1.5 rounded-sm border border-dashed px-1.5 py-0.5",o()])},[...a[9]||(a[9]=[g("span",{class:"task-loading-dots","aria-hidden":"true"},[g("span",{class:"task-loading-dots__dot"}),g("span",{class:"task-loading-dots__dot"}),g("span",{class:"task-loading-dots__dot"})],-1),g("span",null,"运行中",-1)])],2)):de("",!0)])]),g("div",sd,te(l.lastPromptPreview||"还没有发送记录"),1),g("div",ad,[g("div",ld,te(new Date(l.updatedAt).toLocaleString("zh-CN")),1),g("div",cd,[(f=l.workspaceDiffSummary)!=null&&f.supported&&((d=l.workspaceDiffSummary)!=null&&d.fileCount)?(A(),R("span",{key:0,class:pe(["inline-flex items-center gap-1 rounded-sm border border-dashed px-1.5 py-0.5",i(l)])},[g("span",null,te((b=l.workspaceDiffSummary)==null?void 0:b.fileCount)+" 文件",1)],2)):de("",!0)])])],10,ed)}),128))]))]),g("div",dd,[e.error?(A(),R("div",fd,[ue(v(Hn),{class:"mt-0.5 h-4 w-4 shrink-0"}),g("span",pd,te(e.error),1)])):de("",!0),g("button",{type:"button",class:"tool-button theme-danger-text theme-danger-hover inline-flex w-full items-center justify-center gap-2 px-3 py-2 text-sm",disabled:!e.currentTaskSlug||e.removingTask||e.creatingTask||e.isCurrentTaskSending,onClick:a[7]||(a[7]=l=>r("delete-task"))},[ue(v(tu),{class:"h-4 w-4"}),g("span",null,te(e.removingTask?"删除中...":"删除当前任务"),1)],8,hd)])]))}},md={class:"pointer-events-none fixed inset-x-0 top-4 z-40 flex justify-center px-4"},bd={key:0,class:"theme-status-success flex max-w-md items-center gap-2 rounded-sm border px-4 py-2 text-sm shadow-[var(--theme-shadowPanel)] backdrop-blur"},xd={__name:"TopToast",props:{message:{type:String,default:""}},setup(e){return(t,u)=>(A(),we(Ut,{to:"body"},[g("div",md,[ue(zr,{"enter-active-class":"transform transition duration-200 ease-out","enter-from-class":"-translate-y-3 opacity-0","enter-to-class":"translate-y-0 opacity-100","leave-active-class":"transform transition duration-150 ease-in","leave-from-class":"translate-y-0 opacity-100","leave-to-class":"-translate-y-2 opacity-0"},{default:zt(()=>[e.message?(A(),R("div",bd,[ue(v(Jr),{class:"h-4 w-4 shrink-0"}),g("span",null,te(e.message),1)])):de("",!0)]),_:1})])]))}};function gd(e,t=!1){const u=O(!!t);let r=null,n=()=>{};function o(i){u.value=!!i}return Ct(()=>{if(typeof window>"u"||typeof window.matchMedia!="function")return;r=window.matchMedia(e),o(r.matches);const i=s=>{o(s.matches)};if(typeof r.addEventListener=="function"){r.addEventListener("change",i),n=()=>r==null?void 0:r.removeEventListener("change",i);return}typeof r.addListener=="function"&&(r.addListener(i),n=()=>r==null?void 0:r.removeListener(i))}),nt(()=>{n()}),{matches:u}}const vd="(max-width: 1023px)",iu="promptxWorkbenchMobileView";function Fu(e){return(e==null?void 0:e[iu])==="detail"}function yd({currentTaskSlug:e}){const{matches:t}=gd(vd),u=O("tasks"),r=O("activity");function n(d="tasks"){if(typeof window>"u")return;const b={...window.history.state||{}};d==="detail"?b[iu]="detail":delete b[iu],window.history.replaceState(b,"")}function o(){if(typeof window>"u")return;const d={...window.history.state||{},[iu]:"detail"};window.history.pushState(d,"")}function i(d=null){if(!t.value){u.value="detail";return}if(!e.value){u.value="tasks",n("tasks");return}u.value=Fu(d)?"detail":"tasks"}function s(d){t.value=!!d,i(typeof window>"u"?null:window.history.state)}function a(d={}){const{pushHistory:b=!0}=d;if(u.value="detail",!!t.value){if(b){o();return}n("detail")}}function l(d={}){const{useHistory:b=!0}=d;if(!t.value){u.value="tasks";return}if(b&&typeof window<"u"&&Fu(window.history.state)){window.history.back();return}u.value="tasks",n("tasks")}function f(d){t.value&&(u.value=Fu(d.state)&&e.value?"detail":"tasks")}return Ct(()=>{typeof window>"u"||window.addEventListener("popstate",f)}),nt(()=>{typeof window<"u"&&window.removeEventListener("popstate",f)}),me(t,d=>{s(d)},{immediate:!0}),me(e,()=>{typeof window>"u"||i(window.history.state)},{flush:"post"}),{enterMobileDetail:a,isMobileLayout:t,leaveMobileDetail:l,mobileDetailTab:r,mobileView:u}}const Ou="PromptX";function kd(e=""){const t=String(v(e)||"").trim();return t?`${Ou} (${t})`:Ou}function _d(e=""){qr(()=>{typeof document>"u"||(document.title=kd(e))}),nt(()=>{typeof document>"u"||(document.title=Ou)})}function wd(e=2200){const t=O("");let u=null;function r(){u&&(window.clearTimeout(u),u=null),t.value=""}function n(o,i=e){t.value=o,u&&window.clearTimeout(u),u=window.setTimeout(()=>{t.value="",u=null},i)}return nt(()=>{u&&window.clearTimeout(u)}),{toastMessage:t,flashToast:n,clearToast:r}}function Sd(e="",t=""){const u=String(e||"").trim();if(!u)return"";if(/^https?:\/\//i.test(u))return u;try{return new URL(u,t).toString()}catch{return u}}function Cd(e,t){const u=[];for(const[r,n]of((e==null?void 0:e.blocks)||[]).entries()){if(n.type===xe.TEXT||n.type===xe.IMPORTED_TEXT){const o=String(n.content||"").trim();o&&u.push(o,"");continue}if(n.type===xe.IMAGE){const o=Sd(n.content,t);o&&u.push(o,"")}}return u.join(`
216
+ `).trim()}function Dd(e,t){return Cd(e,t)}const Nu="promptx:active-task-slug",Ed=150;function $r(e=null){return!e||typeof e!="object"?null:{supported:!!e.supported,fileCount:Math.max(0,Number(e.fileCount)||0),additions:Math.max(0,Number(e.additions)||0),deletions:Math.max(0,Number(e.deletions)||0)}}function ju(e=[]){return(e||[]).map(t=>({...t,meta:t!=null&&t.meta?{...t.meta}:{}}))}function On(e={}){return{title:String(e.title||""),autoTitle:String(e.autoTitle||""),lastPromptPreview:String(e.lastPromptPreview||""),codexSessionId:String(e.codexSessionId||""),blocks:ju(e.blocks||[])}}function Vu(e=[],t=16){return vl(e,t)||""}function Ad(e=[],t=120){const u=e.find(r=>((r==null?void 0:r.type)==="text"||(r==null?void 0:r.type)==="imported_text")&&String(r.content||"").trim());return String((u==null?void 0:u.content)||"").replace(/\s+/g," ").trim().slice(0,t)}function Nn(e={},t=[]){const u=String((e==null?void 0:e.title)||"").trim();if(u)return u;const r=String((e==null?void 0:e.autoTitle)||"").trim();if(r)return r;const n=Vu(t);if(n)return n;const o=String((e==null?void 0:e.preview)||"").trim();return o?o.slice(0,16):"未命名任务"}function jn(e="",t=72){return String(e||"").replace(/\s+/g," ").trim().slice(0,t)}function Td(e=[]){return[...e].sort((t,u)=>{const r=Date.parse(String((u==null?void 0:u.updatedAt)||""))||0,n=Date.parse(String((t==null?void 0:t.updatedAt)||""))||0;return r-n})}function Qt(e){if(typeof window>"u")return;const t=String(e||"").trim();if(t){window.localStorage.setItem(Nu,t);return}window.localStorage.removeItem(Nu)}function Fd(){return typeof window>"u"?"":String(window.localStorage.getItem(Nu)||"").trim()}function Id(){if(typeof window>"u")return"";try{const e=new URL(window.location.href);return String(e.searchParams.get("task")||"").trim()}catch{return""}}function Pd(){if(!(typeof window>"u"))try{const e=new URL(window.location.href);if(!e.searchParams.has("task"))return;e.searchParams.delete("task");const t=`${e.pathname}${e.search}${e.hash}`;window.history.replaceState({},"",t||"/")}catch{}}function eu(e){const t={slug:e.slug,title:String(e.title||""),autoTitle:String(e.autoTitle||""),lastPromptPreview:String(e.lastPromptPreview||""),codexSessionId:String(e.codexSessionId||""),codexRunCount:Math.max(0,Number(e.codexRunCount)||0),running:!!e.running,preview:String(e.lastPromptPreview||""),updatedAt:e.updatedAt||e.createdAt||new Date().toISOString(),createdAt:e.createdAt||e.updatedAt||new Date().toISOString()};return Object.prototype.hasOwnProperty.call(e,"workspaceDiffSummary")&&(t.workspaceDiffSummary=$r(e.workspaceDiffSummary)),t}function Md(e={}){const{clearToast:t=()=>{},flashToast:u=()=>{},scrollCurrentPanelToBottom:r=()=>{}}=e,n=Uu(),o=tr(),i=O(null),s=O([]),a=O({}),l=O({}),f=O({}),d=O(""),b=O({title:"",autoTitle:"",lastPromptPreview:"",codexSessionId:"",blocks:[]}),x=O(!0),p=O(!1),D=O(!1),T=O(!1),F=O(!1),$=O(!1),M=O(""),B=O(!1),q=O("");let H=null,G=null,Z=0,U=null,L=0,z=null;const V=ae(()=>Vu(b.value.blocks)),X=ae(()=>Nn({title:b.value.title,autoTitle:b.value.autoTitle,preview:Ad(b.value.blocks)},b.value.blocks)),ne=ae(()=>l.value[d.value]||""),Q=ae(()=>!!f.value[d.value]),se=ae(()=>Object.values(f.value).some(Boolean)),ye=ae(()=>X.value||"未命名任务"),re=ae(()=>s.value.map(k=>De(k)));function K(k=""){return!k||!k.startsWith(n)?k:k.slice(n.length)}function le(k=[]){return k.map(S=>({...S,content:S.type==="image"?K(S.content):S.content}))}function oe(k=b.value.title,S=b.value.autoTitle,h=b.value.lastPromptPreview,c=b.value.codexSessionId,m=b.value.blocks){return JSON.stringify({title:String(k||""),autoTitle:String(S||""),lastPromptPreview:String(h||""),codexSessionId:String(c||""),blocks:le(m)})}function Fe(k){return s.value.find(S=>S.slug===k)||null}function Ce(k){return k&&a.value[k]||null}function De(k){const S=Ce(k.slug),h=k.slug===d.value?b.value.blocks:(S==null?void 0:S.blocks)||[],c=k.slug===d.value?b.value.title:(S==null?void 0:S.title)??k.title,m=k.slug===d.value?b.value.autoTitle:(S==null?void 0:S.autoTitle)??k.autoTitle,w=k.slug===d.value?b.value.lastPromptPreview||k.lastPromptPreview||"":(S==null?void 0:S.lastPromptPreview)||k.lastPromptPreview||"",I=k.slug===d.value?l.value[k.slug]||b.value.codexSessionId||k.codexSessionId||"":(S==null?void 0:S.codexSessionId)||k.codexSessionId||"";return{...k,title:c,autoTitle:m,preview:w,codexSessionId:I,sessionSelectionLocked:!!(I&&Number(k.codexRunCount||0)>0),sessionSelectionLockReason:I&&Number(k.codexRunCount||0)>0?"该任务已有项目历史,不能再切换项目;如需使用新项目,请新建任务。":"",displayTitle:Nn({title:c,autoTitle:m,preview:w},h),sending:!!(k.running||f.value[k.slug])}}function he(k,S={}){const{insertAtStart:h=!1}=S;if(!(k!=null&&k.slug))return;const c=[...s.value],m=c.findIndex(w=>w.slug===k.slug);if(m>=0){c.splice(m,1,{...c[m],...k}),s.value=c;return}h?c.unshift(k):c.push(k),s.value=c}function ke(k,S){k&&(a.value={...a.value,[k]:On(S)})}function qe(k){return k?`${n}/api/tasks/${k}/raw`:`${n}/api/tasks/`}function Ke(k,S){f.value={...f.value,[k]:!!S}}function Qe(k=s.value){const S={};(k||[]).forEach(h=>{h!=null&&h.slug&&(S[h.slug]=!!h.running)}),f.value=S}function Ee(k,S){k&&(l.value={...l.value,[k]:String(S||"").trim()})}async function Xe(k,S){const h=String(k||"").trim();if(!h)return;const c=String(S||"").trim(),m=Fe(h),w=l.value[h]||(m==null?void 0:m.codexSessionId)||"";if(!!(w&&Number((m==null?void 0:m.codexRunCount)||0)>0)&&c!==w){M.value="该任务已有项目历史,不能再切换项目;如需使用新项目,请新建任务。";return}Ee(h,c);const W=Ce(h);W&&ke(h,{...W,codexSessionId:c}),m&&he({...m,codexSessionId:c}),h===d.value&&(b.value={...b.value,codexSessionId:c});try{await ei(h,c)}catch(ve){Ee(h,w),W&&ke(h,{...W,codexSessionId:w}),m&&he({...m,codexSessionId:w}),h===d.value&&(b.value={...b.value,codexSessionId:w}),M.value=ve.message}}function Ae(){H&&(window.clearTimeout(H),H=null)}function je(){U&&(window.clearTimeout(U),U=null)}function et(){Ae(),!(p.value||!d.value)&&(H=window.setTimeout(()=>{Pe({auto:!0,silent:!0})},1500))}function _e(){if(!d.value)return;const k=Fe(d.value)||{slug:d.value,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};he({...k,title:String(b.value.title||""),autoTitle:String(b.value.autoTitle||""),lastPromptPreview:String(b.value.lastPromptPreview||""),codexSessionId:String(l.value[d.value]||b.value.codexSessionId||""),preview:String(b.value.lastPromptPreview||"")})}function Me(k=[]){const S=new Map((k||[]).map(h=>{const c=String((h==null?void 0:h.slug)||"").trim();return c?[c,$r(h.workspaceDiffSummary)]:null}).filter(Boolean));S.size&&(s.value=s.value.map(h=>S.has(h.slug)?{...h,workspaceDiffSummary:S.get(h.slug)}:h))}async function Ge(k=s.value){const S=Array.isArray(k)?k:[],h=S.filter(m=>String((m==null?void 0:m.codexSessionId)||"").trim()),c=++L;if(!h.length){s.value=S.map(m=>Object.prototype.hasOwnProperty.call(m,"workspaceDiffSummary")?m:{...m,workspaceDiffSummary:null});return}try{const m=await Oo(S.length||30);if(c!==L)return;Me(m.items||[])}catch{}}async function $e(k={}){const{silent:S=!1}=k;S||(x.value=!0,M.value="");try{const h=await qo(),c=Td((h.items||[]).map(eu));s.value=c,Qe(c),Ge(c)}catch(h){S||(M.value=h.message)}finally{S||(x.value=!1)}}async function Oe(k=""){const S=String(d.value||"").trim();if(!S)return;if(!s.value.some(c=>c.slug===S)){if(s.value.length){await fe(s.value[0].slug,{force:!0,skipIfDirtyOnApply:!0});return}d.value="",Qt(""),b.value={title:"",autoTitle:"",lastPromptPreview:"",codexSessionId:"",blocks:[]},q.value=oe("","","","",[]),B.value=!1;return}k&&k!==S||B.value||F.value||$.value||p.value||await fe(S,{force:!0,skipIfDirtyOnApply:!0})}function Te(k=""){const S=String(k||"").trim();z===null?z=S:z!==S&&(z=""),!U&&(U=window.setTimeout(async()=>{const h=z;z=null,U=null,await $e({silent:!0}),await Oe(h||"")},Ed))}async function Je(k){const S=await jo(k),h=(S.blocks||[]).map(m=>({...m,content:m.type==="image"?gu(m.content):m.content}));return{state:{title:String(S.title||""),autoTitle:String(S.autoTitle||""),lastPromptPreview:String(S.lastPromptPreview||""),codexSessionId:String(S.codexSessionId||""),blocks:h},summary:eu({...S,blocks:h})}}async function fe(k,S={}){const{focusEditor:h=!1,force:c=!1,skipIfDirtyOnApply:m=!1}=S,w=String(k||"").trim();if(!w)return!1;const I=++Z;p.value=!0,M.value="",t(),d.value=w,Qt(w);try{let W=c?null:Ce(w),ve=null;if(!W){const ce=await Je(w);W=(ce==null?void 0:ce.state)||null,ve=(ce==null?void 0:ce.summary)||null}return I!==Z||m&&w===d.value&&B.value?!1:(b.value=On(W),ke(w,W),ve&&he(ve),Ee(w,W.codexSessionId),q.value=oe(b.value.title,b.value.autoTitle,b.value.lastPromptPreview,b.value.codexSessionId,b.value.blocks),B.value=!1,h&&ge(()=>{var ce,Re;return(Re=(ce=i.value)==null?void 0:ce.focusEditor)==null?void 0:Re.call(ce)}),r(),!0)}catch(W){return I===Z&&(M.value=W.message),!1}finally{I===Z&&(p.value=!1)}}async function Pe(k={}){const{auto:S=!1,silent:h=!1}=k;return d.value?oe()===q.value?!0:G||(Ae(),F.value=!0,M.value="",G=(async()=>{try{const m=await Vo(d.value,{title:String(b.value.title||""),autoTitle:String(b.value.autoTitle||""),lastPromptPreview:String(b.value.lastPromptPreview||""),codexSessionId:String(l.value[d.value]||b.value.codexSessionId||""),expiry:"none",visibility:"private",blocks:le(b.value.blocks)}),w={title:String(m.title||""),autoTitle:String(m.autoTitle||""),lastPromptPreview:String(m.lastPromptPreview||""),codexSessionId:String(l.value[d.value]||m.codexSessionId||""),blocks:ju(b.value.blocks)};return ke(d.value,w),q.value=oe(w.title,w.autoTitle,w.lastPromptPreview,w.codexSessionId,w.blocks),B.value=!1,he(eu(m)),!S&&!h&&u("任务已保存"),!0}catch(m){return M.value=m.message,!1}finally{F.value=!1,G=null,oe()!==q.value&&(B.value=!0,et())}})(),G):!1}async function Be(){return $.value?(M.value="文件仍在处理中,请稍后再操作任务。",!1):G||(B.value?Pe({auto:!1,silent:!0}):!0)}async function Ue(){if(!await Be()&&d.value)return!1;D.value=!0,M.value="";try{const k=await No({title:"",expiry:"none",visibility:"private"}),S={title:String(k.title||""),autoTitle:String(k.autoTitle||""),lastPromptPreview:String(k.lastPromptPreview||""),codexSessionId:String(k.codexSessionId||""),blocks:ju(k.blocks||[])};return ke(k.slug,S),he(eu(k),{insertAtStart:!0}),await fe(k.slug,{focusEditor:!0}),u("已创建新任务"),!0}catch(k){return M.value=k.message,!1}finally{D.value=!1}}async function We(k){const S=String(k||"").trim();!S||S===d.value||!await Be()||await fe(S)}async function E(){if(d.value){T.value=!0,M.value="";try{const k=d.value;await Ho(k),s.value=s.value.filter(m=>m.slug!==k);const S={...a.value};delete S[k],a.value=S;const h={...l.value};delete h[k],l.value=h;const c={...f.value};delete c[k],f.value=c,s.value.length?await fe(s.value[0].slug,{focusEditor:!0}):(d.value="",Qt(""),b.value={title:"",autoTitle:"",lastPromptPreview:"",codexSessionId:"",blocks:[]},q.value=oe("","","","",[]),B.value=!1,await Ue())}catch(k){M.value=k.message}finally{T.value=!1}}}function ee(k={}){const{silent:S=!1}=k;d.value&&(b.value={...b.value,blocks:[{type:"text",content:"",meta:{}}]},ke(d.value,b.value),_e(),B.value=!0,ge(()=>{var h,c;(c=(h=i.value)==null?void 0:h.focusEditor)==null||c.call(h)}),S||u("已清空当前任务内容,稍后会自动保存"))}async function N(){if(await $e(),!s.value.length){await Ue();return}const k=Id();if(k){const c=await fe(k,{focusEditor:!0,force:!0});if(Pd(),c)return}const S=Fd(),h=s.value.some(c=>c.slug===S)?S:s.value[0].slug;await fe(h,{focusEditor:!0,force:!0})}async function Y(k){var S,h,c;$.value=!0,M.value="";try{const m=((h=(S=i.value)==null?void 0:S.isImportedBlockActive)==null?void 0:h.call(S))||!1,w=[];for(const I of k){const W=await Uo(I);w.push({type:"image",content:gu(W.url),meta:{}})}(c=i.value)==null||c.insertUploadedBlocks(w),u(m?`已把 ${w.length} 张图片插入到当前导入块后方,稍后会自动保存`:`已插入 ${w.length} 张图片,稍后会自动保存`)}catch(m){M.value=m.message}finally{$.value=!1}}async function Ze(k){var S,h,c;M.value="";try{const m=((h=(S=i.value)==null?void 0:S.isImportedBlockActive)==null?void 0:h.call(S))||!1,w=[];for(const I of k){const W=await I.text();W.trim()&&w.push({type:"imported_text",content:W,meta:{fileName:I.name||"未命名文件",collapsed:!0}})}if(!w.length){u("没有读取到可插入的文本内容");return}(c=i.value)==null||c.insertImportedBlocks(w),u(m?`已把 ${w.length} 个文件块插入到当前导入块后方,稍后会自动保存`:`已插入 ${w.length} 个文件块,稍后会自动保存`)}catch{M.value="文件读取失败,请确认使用 UTF-8 编码的 .md 或 .txt 文件。"}}async function y(k){var S;$.value=!0,M.value="";try{let h=0,c=0;for(const m of k){const w=await Wo(m),I=(w.blocks||[]).map(W=>({...W,content:W.type==="image"?gu(W.content):W.content}));I.length&&((S=i.value)==null||S.insertBlocks(I),h+=I.length,c+=Number(w.pageCount||0))}if(!h){u("没有从 PDF 中解析出可插入内容");return}u(`已插入 ${h} 个图文块${c?`,共 ${c} 页`:""},稍后会自动保存`)}catch(h){M.value=h.message||"PDF 解析失败,请确认文件不是扫描件,并且内容为单栏图文。"}finally{$.value=!1}}function _(k){const S=k===d.value?b.value:Ce(k);return S?Dd({title:String(S.title||""),blocks:le(S.blocks||[])},qe(k)):""}async function C(k){return $.value?(M.value="文件仍在处理中,请稍后再发送给 Codex。",!1):k!==d.value?!0:F.value&&G?G:B.value?Pe({auto:!1,silent:!0}):!0}async function P(k){return await C(k)?_(k):""}function J(k,S){const h=jn(S);!h||k!==d.value||(b.value.lastPromptPreview=h,ke(d.value,b.value),_e())}return me(b,()=>{if(p.value||!d.value)return;const k=Vu(b.value.blocks);!String(b.value.title||"").trim()&&k&&k!==b.value.autoTitle&&(b.value.autoTitle=k),ke(d.value,b.value),B.value=oe()!==q.value,_e(),B.value&&!F.value&&et()},{deep:!0}),me(d,k=>{k&&Qt(k)}),nt(()=>{Ae(),je()}),me(()=>o.listSyncVersion.value,()=>{Te(o.listSyncTaskSlug.value)}),{buildPromptForTask:_,buildPromptPreview:jn,clearCurrentTaskContent:ee,createTaskAndSelect:Ue,currentSelectedSessionId:ne,currentTaskAutoTitle:V,currentTaskDisplayTitle:X,currentTaskSlug:d,draft:b,editorRef:i,error:M,handleImportPdfFiles:y,handleImportTextFiles:Ze,handleTaskSendingChange:Ke,handleTaskSessionChange:Xe,handleUpload:Y,hasAnyTaskSending:se,hasUnsavedChanges:B,initializeWorkbench:N,isCurrentTaskSending:Q,loadingTask:p,loadingTasks:x,pageTitle:ye,prepareCodexPromptForTask:P,removeCurrentTask:E,removingTask:T,renderedTasks:re,refreshTaskList:$e,saveTask:Pe,saving:F,selectTask:We,selectedSessionMap:l,sendingTaskMap:f,taskDraftMap:a,tasks:s,updateLastPromptPreview:J,uploading:$,creatingTask:D}}const $d={class:"flex h-full min-h-0 flex-col overflow-hidden"},Bd={key:2,class:"grid min-h-0 flex-1 gap-4 lg:grid-cols-[260px_minmax(0,1fr)] lg:grid-rows-1"},Rd={class:"grid min-h-0 gap-4 overflow-hidden lg:grid-cols-2 lg:grid-rows-1"},Ld={class:"min-h-0 min-w-0 overflow-hidden"},zd={class:"min-h-0 min-w-0 overflow-hidden"},qd={key:3,class:"min-h-0 flex-1 overflow-hidden"},Od={key:1,class:"flex h-full min-h-0 flex-col gap-3 overflow-hidden"},Nd={class:"panel shrink-0 overflow-hidden"},jd={class:"theme-divider border-b px-3 py-3"},Vd={class:"grid grid-cols-2 gap-2"},Hd={class:"min-h-0 flex-1 overflow-hidden"},Ud={class:"h-full min-h-0"},Wd={class:"h-full min-h-0"},Zd={__name:"WorkbenchView",setup(e){const t=O(!1),u=O(!1),r=O(!1),n=O(!1),o=O(""),i=O(0),s=O("workspace"),a=O(""),{toastMessage:l,flashToast:f,clearToast:d}=wd(),b=Pu(()=>Mu(()=>import("./TaskDiffReviewDialog-BYcla0q4.js"),__vite__mapDeps([3,1,2]))),x=Pu(()=>Mu(()=>import("./WorkbenchSettingsDialog-C0uQRStP.js"),__vite__mapDeps([4,1,2]))),p=O(null);function D(j){return j?p.value:null}function T(){ge(()=>{var j,ie;(ie=(j=D(Z.value))==null?void 0:j.scrollToBottom)==null||ie.call(j)})}const{buildPromptForTask:F,clearCurrentTaskContent:$,createTaskAndSelect:M,creatingTask:B,currentSelectedSessionId:q,currentTaskAutoTitle:H,currentTaskDisplayTitle:G,currentTaskSlug:Z,draft:U,editorRef:L,error:z,handleImportPdfFiles:V,handleImportTextFiles:X,handleTaskSendingChange:ne,handleTaskSessionChange:Q,handleUpload:se,hasUnsavedChanges:ye,initializeWorkbench:re,isCurrentTaskSending:K,loadingTask:le,loadingTasks:oe,pageTitle:Fe,prepareCodexPromptForTask:Ce,removeCurrentTask:De,removingTask:he,renderedTasks:ke,saveTask:qe,saving:Ke,selectTask:Qe,updateLastPromptPreview:Ee,uploading:Xe}=Md({clearToast:d,flashToast:f,scrollCurrentPanelToBottom:T}),Ae=ae(()=>ke.value.find(j=>j.slug===Z.value)||null),je=ae(()=>{var j,ie;return!!((ie=(j=Ae.value)==null?void 0:j.workspaceDiffSummary)!=null&&ie.supported)}),et=ae(()=>{const j=Ae.value;return j?()=>Ce(j.slug):null}),_e=ae(()=>({creatingTask:B.value,currentTaskAutoTitle:U.value.autoTitle||H.value,currentTaskSlug:Z.value,draftTitle:U.value.title,editingTaskTitleSlug:o.value,error:z.value,isCurrentTaskSending:K.value,loadingTask:le.value,loadingTasks:oe.value,removingTask:he.value,tasks:ke.value,uploading:Xe.value})),Me=ae(()=>{var j,ie,Ve,ht;return{buildPrompt:et.value,diffSupported:je.value,selectedSessionId:((j=Ae.value)==null?void 0:j.codexSessionId)||"",sessionSelectionLockReason:((ie=Ae.value)==null?void 0:ie.sessionSelectionLockReason)||"",sessionSelectionLocked:!!((Ve=Ae.value)!=null&&Ve.sessionSelectionLocked),taskSlug:((ht=Ae.value)==null?void 0:ht.slug)||""}}),Ge=ae(()=>({codexSessionId:q.value,isCurrentTaskSending:K.value,loading:le.value,uploading:Xe.value})),$e=ae(()=>({currentTaskAutoTitle:U.value.autoTitle||H.value,currentTaskSlug:Z.value,editingTaskTitleSlug:o.value,title:G.value,titleInputValue:U.value.title})),{enterMobileDetail:Oe,isMobileLayout:Te,leaveMobileDetail:Je,mobileDetailTab:fe,mobileView:Pe}=yd({currentTaskSlug:Z});function Be(j){return j!=null&&j.sending||Number((j==null?void 0:j.codexRunCount)||0)>0?"activity":"input"}_d(Fe);function Ue(j="workspace",ie=""){s.value=j==="run"?"run":j==="task"?"task":"workspace",a.value=s.value==="run"?String(ie||""):"",r.value=!0,i.value+=1}function We(){r.value=!1}function E(){n.value=!0}function ee(){n.value=!1}function N(j){U.value.title=j}async function Y(){o.value="",ye.value&&await qe({auto:!1,silent:!0})}function Ze(j){j===Z.value&&(o.value=j,ge(()=>{var Ve,ht;const ie=document.querySelector('[data-task-title-input="current"]');(Ve=ie==null?void 0:ie.focus)==null||Ve.call(ie),(ht=ie==null?void 0:ie.select)==null||ht.call(ie)}))}async function y(j){if(Te.value){await I(j);return}if(j!==Z.value){await I(j);return}Ze(j)}function _(){u.value=!0}function C(){he.value||(u.value=!1)}async function P(){await De(),u.value=!1,Te.value&&Je({useHistory:!1})}function J(){t.value=!0}function k(){t.value=!1}function S(){t.value=!1,$()}function h(j){const ie=Ae.value;ie&&ne(ie.slug,j)}function c(j){const ie=Ae.value;ie&&Q(ie.slug,j)}async function m(){await navigator.clipboard.writeText(F(Z.value)),f("已复制给 Codex")}async function w(){await M()&&Te.value&&(fe.value="input",Oe())}async function I(j){const ie=String(j||"").trim();ie&&(ie!==Z.value&&await Qe(ie),Te.value&&Z.value===ie&&(fe.value=Be(Ae.value),Oe()))}async function W(){var Ve,ht;const j=Z.value;!j||(Ee(j,F(j)),!await((ht=(Ve=D(j))==null?void 0:Ve.send)==null?void 0:ht.call(Ve))||j!==Z.value)||(Te.value&&(fe.value="activity"),$({silent:!0}),await qe({auto:!1,silent:!0}))}function ve(){var j,ie;(ie=(j=D(Z.value))==null?void 0:j.stop)==null||ie.call(j)}function ce(j){!ye.value&&!Xe.value&&!Ke.value||(j.preventDefault(),j.returnValue="")}function Re(j){if(!j.metaKey&&!j.ctrlKey&&j.shiftKey&&j.key==="Enter"){j.preventDefault(),W();return}if(j.metaKey||j.ctrlKey){if(j.key.toLowerCase()==="s"){j.preventDefault(),qe({auto:!1});return}j.shiftKey&&j.key==="Backspace"&&(j.preventDefault(),J())}}Ct(()=>{re(),window.addEventListener("beforeunload",ce),window.addEventListener("keydown",Re)}),nt(()=>{window.removeEventListener("beforeunload",ce),window.removeEventListener("keydown",Re)});const tt={"update:draft-title":N,"cancel-title-edit":()=>{o.value=""},"create-task":w,"delete-task":_,"open-settings":E,"select-task":I,"title-blur":Y,"title-click":y},$t={"open-diff":({scope:j,runId:ie})=>Ue(j,ie),"selected-session-change":c,"sending-change":h},pt={"clear-request":J,"copy-request":m,"import-pdf-files":V,"import-text-files":X,"send-request":W,"stop-request":ve,"upload-files":se},Br={"begin-edit":()=>Ze(Z.value),back:Je,"cancel-title-edit":()=>{o.value=""},"title-blur":Y,"update:title-input-value":N};return(j,ie)=>(A(),R("div",$d,[ue(xd,{message:v(l)},null,8,["message"]),ue(an,{open:t.value,title:"确认清空当前任务?",description:"将清空右侧编辑区内容,但会保留当前任务本身。","confirm-text":"确认清空","cancel-text":"继续编辑",onCancel:k,onConfirm:S},null,8,["open"]),ue(an,{open:u.value,title:"确认删除当前任务?",description:`将删除「${v(G)}」,删除后无法恢复。`,"confirm-text":"确认删除","cancel-text":"先保留",loading:v(he),danger:"",onCancel:C,onConfirm:P},null,8,["open","description","loading"]),r.value?(A(),we(v(b),{key:0,open:r.value,"task-slug":v(Z),"task-title":v(G),"preferred-scope":s.value,"preferred-run-id":a.value,"focus-token":i.value,onClose:We},null,8,["open","task-slug","task-title","preferred-scope","preferred-run-id","focus-token"])):de("",!0),n.value?(A(),we(v(x),{key:1,open:n.value,onClose:ee},null,8,["open"])):de("",!0),v(Te)?(A(),R("div",qd,[v(Pe)==="tasks"?(A(),we(qn,yt({key:0},_e.value,{mobile:""},kt(tt)),null,16)):(A(),R("div",Od,[ue(Hc,yt($e.value,kt(Br)),null,16),g("section",Nd,[g("div",jd,[g("div",Vd,[g("button",{type:"button",class:pe(["tool-button px-3 py-2 text-sm",v(fe)==="activity"?"tool-button-primary":""]),onClick:ie[1]||(ie[1]=Ve=>fe.value="activity")}," 执行 ",2),g("button",{type:"button",class:pe(["tool-button px-3 py-2 text-sm",v(fe)==="input"?"tool-button-primary":""]),onClick:ie[2]||(ie[2]=Ve=>fe.value="input")}," 输入 ",2)])])]),g("div",Hd,[un(g("div",Ud,[ue(Ln,yt({ref_key:"codexPanelRef",ref:p},Me.value,{"empty-message":"请选择一个任务"},kt($t)),null,16)],512),[[nn,v(fe)==="activity"]]),un(g("div",Wd,[ue(zn,yt({ref_key:"editorRef",ref:L,modelValue:v(U).blocks,"onUpdate:modelValue":ie[3]||(ie[3]=Ve=>v(U).blocks=Ve)},Ge.value,kt(pt)),null,16,["modelValue"])],512),[[nn,v(fe)==="input"]])])]))])):(A(),R("div",Bd,[ue(qn,yt(_e.value,kt(tt)),null,16),g("div",Rd,[g("div",Ld,[Ae.value?(A(),we(Ln,yt({key:0,ref_key:"codexPanelRef",ref:p},Me.value,kt($t)),null,16)):de("",!0)]),g("div",zd,[ue(zn,yt({ref_key:"editorRef",ref:L,modelValue:v(U).blocks,"onUpdate:modelValue":ie[0]||(ie[0]=Ve=>v(U).blocks=Ve)},Ge.value,kt(pt)),null,16,["modelValue"])])])]))]))}},Yd=Object.freeze(Object.defineProperty({__proto__:null,default:Zd},Symbol.toStringTag,{value:"Module"}));export{Wr as A,Kr as B,bu as C,sn as F,Tt as L,to as P,no as S,tu as T,Yd as W,Zn as X,Eo as _,qt as a,gd as b,be as c,Xr as d,Hn as e,Gt as f,Jd as g,oo as h,Gr as i,Xd as j,an as k,ti as l,Un as m,Gd as s,tr as u};