@xdevops/issue-auto-finish 1.0.1 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/KnowledgeAnalyzer-EZSJT2MJ.js +13 -0
- package/dist/KnowledgeAnalyzer-EZSJT2MJ.js.map +1 -0
- package/dist/KnowledgeStore-4ROC6F56.js +10 -0
- package/dist/KnowledgeStore-4ROC6F56.js.map +1 -0
- package/dist/ai-runner/AIRunner.d.ts +2 -0
- package/dist/ai-runner/AIRunner.d.ts.map +1 -1
- package/dist/ai-runner/BaseAIRunner.d.ts +9 -0
- package/dist/ai-runner/BaseAIRunner.d.ts.map +1 -1
- package/dist/ai-runner-RGAJPOOW.js +16 -0
- package/dist/ai-runner-RGAJPOOW.js.map +1 -0
- package/dist/analyze-I7UOJB4F.js +72 -0
- package/dist/analyze-I7UOJB4F.js.map +1 -0
- package/dist/chunk-3JUHZGX5.js +171 -0
- package/dist/chunk-3JUHZGX5.js.map +1 -0
- package/dist/chunk-5JYCGAU3.js +318 -0
- package/dist/chunk-5JYCGAU3.js.map +1 -0
- package/dist/chunk-5VUB3UUK.js +643 -0
- package/dist/chunk-5VUB3UUK.js.map +1 -0
- package/dist/{chunk-IDUKWCC2.js → chunk-C6ZJVIPZ.js} +1151 -80
- package/dist/chunk-C6ZJVIPZ.js.map +1 -0
- package/dist/{chunk-OWVT3Z34.js → chunk-JFYAXNNS.js} +121 -31
- package/dist/chunk-JFYAXNNS.js.map +1 -0
- package/dist/chunk-KISVPNSV.js +188 -0
- package/dist/chunk-KISVPNSV.js.map +1 -0
- package/dist/{chunk-I3T573SU.js → chunk-LEQYGOMJ.js} +65 -2
- package/dist/chunk-LEQYGOMJ.js.map +1 -0
- package/dist/{chunk-TBIEB3JY.js → chunk-N5YK6YVI.js} +592 -767
- package/dist/chunk-N5YK6YVI.js.map +1 -0
- package/dist/{chunk-RIUI4ROA.js → chunk-PECYMYAK.js} +2 -2
- package/dist/chunk-SWG2Y7YX.js +410 -0
- package/dist/chunk-SWG2Y7YX.js.map +1 -0
- package/dist/chunk-TZ6C7HL5.js +59 -0
- package/dist/chunk-TZ6C7HL5.js.map +1 -0
- package/dist/cli/commands/analyze.d.ts +8 -0
- package/dist/cli/commands/analyze.d.ts.map +1 -0
- package/dist/cli.js +67 -3
- package/dist/cli.js.map +1 -1
- package/dist/clients/GongfengClient.d.ts +5 -0
- package/dist/clients/GongfengClient.d.ts.map +1 -1
- package/dist/config-RI7NLDXI.js +7 -0
- package/dist/config-RI7NLDXI.js.map +1 -0
- package/dist/config.d.ts +19 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/{doctor-B26Q6JWI.js → doctor-ZPGIBA5N.js} +3 -3
- package/dist/events/EventBus.d.ts +1 -1
- package/dist/events/EventBus.d.ts.map +1 -1
- package/dist/git/GitOperations.d.ts +12 -0
- package/dist/git/GitOperations.d.ts.map +1 -1
- package/dist/i18n/locales/en.d.ts.map +1 -1
- package/dist/i18n/locales/zh-CN.d.ts.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +11 -5
- package/dist/{init-L3VIWCOV.js → init-LZGCIHE7.js} +8 -4
- package/dist/{init-L3VIWCOV.js.map → init-LZGCIHE7.js.map} +1 -1
- package/dist/knowledge/KnowledgeAnalyzer.d.ts +31 -0
- package/dist/knowledge/KnowledgeAnalyzer.d.ts.map +1 -0
- package/dist/knowledge/KnowledgeDefaults.d.ts +7 -0
- package/dist/knowledge/KnowledgeDefaults.d.ts.map +1 -0
- package/dist/knowledge/KnowledgeEntry.d.ts +30 -0
- package/dist/knowledge/KnowledgeEntry.d.ts.map +1 -0
- package/dist/knowledge/KnowledgeLoader.d.ts +18 -0
- package/dist/knowledge/KnowledgeLoader.d.ts.map +1 -0
- package/dist/knowledge/KnowledgeStore.d.ts +35 -0
- package/dist/knowledge/KnowledgeStore.d.ts.map +1 -0
- package/dist/knowledge/ProjectKnowledge.d.ts +79 -0
- package/dist/knowledge/ProjectKnowledge.d.ts.map +1 -0
- package/dist/knowledge/analyze-prompt.d.ts +2 -0
- package/dist/knowledge/analyze-prompt.d.ts.map +1 -0
- package/dist/knowledge/importers/GongfengExtractor.d.ts +27 -0
- package/dist/knowledge/importers/GongfengExtractor.d.ts.map +1 -0
- package/dist/knowledge/importers/IwikiImporter.d.ts +21 -0
- package/dist/knowledge/importers/IwikiImporter.d.ts.map +1 -0
- package/dist/knowledge/index.d.ts +12 -0
- package/dist/knowledge/index.d.ts.map +1 -0
- package/dist/lib.js +19 -10
- package/dist/orchestrator/PipelineOrchestrator.d.ts +5 -1
- package/dist/orchestrator/PipelineOrchestrator.d.ts.map +1 -1
- package/dist/phases/BasePhase.d.ts.map +1 -1
- package/dist/poller/IssuePoller.d.ts +5 -0
- package/dist/poller/IssuePoller.d.ts.map +1 -1
- package/dist/prompts/chat-templates.d.ts +4 -0
- package/dist/prompts/chat-templates.d.ts.map +1 -0
- package/dist/prompts/templates.d.ts +11 -0
- package/dist/prompts/templates.d.ts.map +1 -1
- package/dist/rules/RuleResolver.d.ts +4 -0
- package/dist/rules/RuleResolver.d.ts.map +1 -1
- package/dist/run.js +11 -5
- package/dist/run.js.map +1 -1
- package/dist/services/ChatService.d.ts +39 -0
- package/dist/services/ChatService.d.ts.map +1 -0
- package/dist/shutdown/ShutdownSignal.d.ts +3 -0
- package/dist/shutdown/ShutdownSignal.d.ts.map +1 -0
- package/dist/{start-TVN4SS6E.js → start-NMQHUKGF.js} +1 -1
- package/dist/tracker/IssueState.d.ts +1 -0
- package/dist/tracker/IssueState.d.ts.map +1 -1
- package/dist/tracker/IssueTracker.d.ts +2 -0
- package/dist/tracker/IssueTracker.d.ts.map +1 -1
- package/dist/updater/AutoUpdater.d.ts +33 -0
- package/dist/updater/AutoUpdater.d.ts.map +1 -0
- package/dist/updater/UpdateExecutor.d.ts +7 -0
- package/dist/updater/UpdateExecutor.d.ts.map +1 -0
- package/dist/updater/VersionChecker.d.ts +22 -0
- package/dist/updater/VersionChecker.d.ts.map +1 -0
- package/dist/web/WebServer.d.ts +4 -0
- package/dist/web/WebServer.d.ts.map +1 -1
- package/dist/web/routes/api.d.ts +4 -0
- package/dist/web/routes/api.d.ts.map +1 -1
- package/dist/web/routes/chat.d.ts +7 -0
- package/dist/web/routes/chat.d.ts.map +1 -0
- package/dist/web/routes/knowledge.d.ts +13 -0
- package/dist/web/routes/knowledge.d.ts.map +1 -0
- package/dist/web/routes/setup.d.ts.map +1 -1
- package/dist/webhook/CommandExecutor.d.ts +4 -0
- package/dist/webhook/CommandExecutor.d.ts.map +1 -1
- package/dist/webhook/CommandParser.d.ts +2 -2
- package/dist/webhook/CommandParser.d.ts.map +1 -1
- package/dist/webhook/WebhookHandler.d.ts +8 -0
- package/dist/webhook/WebhookHandler.d.ts.map +1 -1
- package/dist/webhook/WebhookServer.d.ts +2 -0
- package/dist/webhook/WebhookServer.d.ts.map +1 -1
- package/package.json +4 -2
- package/src/web/frontend/dist/assets/index-AcJ0lPIv.js +67 -0
- package/src/web/frontend/dist/assets/index-BbRt5BAr.css +1 -0
- package/src/web/frontend/dist/index.html +2 -2
- package/dist/chunk-I3T573SU.js.map +0 -1
- package/dist/chunk-IDUKWCC2.js.map +0 -1
- package/dist/chunk-OWVT3Z34.js.map +0 -1
- package/dist/chunk-TBIEB3JY.js.map +0 -1
- package/src/web/frontend/dist/assets/index-CQdlU9PE.js +0 -65
- package/src/web/frontend/dist/assets/index-CgMEkyZJ.css +0 -1
- /package/dist/{chunk-RIUI4ROA.js.map → chunk-PECYMYAK.js.map} +0 -0
- /package/dist/{doctor-B26Q6JWI.js.map → doctor-ZPGIBA5N.js.map} +0 -0
- /package/dist/{start-TVN4SS6E.js.map → start-NMQHUKGF.js.map} +0 -0
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))n(r);new MutationObserver(r=>{for(const i of r)if(i.type==="childList")for(const o of i.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function s(r){const i={};return r.integrity&&(i.integrity=r.integrity),r.referrerPolicy&&(i.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?i.credentials="include":r.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function n(r){if(r.ep)return;r.ep=!0;const i=s(r);fetch(r.href,i)}})();function tr(e){const t=Object.create(null);for(const s of e.split(","))t[s]=1;return s=>s in t}const oe={},zt=[],rt=()=>{},Hi=()=>!1,nn=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),sr=e=>e.startsWith("onUpdate:"),ke=Object.assign,nr=(e,t)=>{const s=e.indexOf(t);s>-1&&e.splice(s,1)},ml=Object.prototype.hasOwnProperty,le=(e,t)=>ml.call(e,t),W=Array.isArray,qt=e=>_s(e)==="[object Map]",Zt=e=>_s(e)==="[object Set]",Mr=e=>_s(e)==="[object Date]",X=e=>typeof e=="function",ye=e=>typeof e=="string",it=e=>typeof e=="symbol",ue=e=>e!==null&&typeof e=="object",Vi=e=>(ue(e)||X(e))&&X(e.then)&&X(e.catch),zi=Object.prototype.toString,_s=e=>zi.call(e),bl=e=>_s(e).slice(8,-1),qi=e=>_s(e)==="[object Object]",rr=e=>ye(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,us=tr(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),rn=e=>{const t=Object.create(null);return(s=>t[s]||(t[s]=e(s)))},yl=/-\w/g,ht=rn(e=>e.replace(yl,t=>t.slice(1).toUpperCase())),vl=/\B([A-Z])/g,vt=rn(e=>e.replace(vl,"-$1").toLowerCase()),Gi=rn(e=>e.charAt(0).toUpperCase()+e.slice(1)),kn=rn(e=>e?`on${Gi(e)}`:""),je=(e,t)=>!Object.is(e,t),js=(e,...t)=>{for(let s=0;s<e.length;s++)e[s](...t)},Ki=(e,t,s,n=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:n,value:s})},on=e=>{const t=parseFloat(e);return isNaN(t)?e:t},xl=e=>{const t=ye(e)?Number(e):NaN;return isNaN(t)?e:t};let jr;const ln=()=>jr||(jr=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function ir(e){if(W(e)){const t={};for(let s=0;s<e.length;s++){const n=e[s],r=ye(n)?Sl(n):ir(n);if(r)for(const i in r)t[i]=r[i]}return t}else if(ye(e)||ue(e))return e}const wl=/;(?![^(]*\))/g,kl=/:([^]+)/,$l=/\/\*[^]*?\*\//g;function Sl(e){const t={};return e.replace($l,"").split(wl).forEach(s=>{if(s){const n=s.split(kl);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function ee(e){let t="";if(ye(e))t=e;else if(W(e))for(let s=0;s<e.length;s++){const n=ee(e[s]);n&&(t+=n+" ")}else if(ue(e))for(const s in e)e[s]&&(t+=s+" ");return t.trim()}const _l="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",Cl=tr(_l);function Wi(e){return!!e||e===""}function Il(e,t){if(e.length!==t.length)return!1;let s=!0;for(let n=0;s&&n<e.length;n++)s=Qt(e[n],t[n]);return s}function Qt(e,t){if(e===t)return!0;let s=Mr(e),n=Mr(t);if(s||n)return s&&n?e.getTime()===t.getTime():!1;if(s=it(e),n=it(t),s||n)return e===t;if(s=W(e),n=W(t),s||n)return s&&n?Il(e,t):!1;if(s=ue(e),n=ue(t),s||n){if(!s||!n)return!1;const r=Object.keys(e).length,i=Object.keys(t).length;if(r!==i)return!1;for(const o in e){const l=e.hasOwnProperty(o),a=t.hasOwnProperty(o);if(l&&!a||!l&&a||!Qt(e[o],t[o]))return!1}}return String(e)===String(t)}function or(e,t){return e.findIndex(s=>Qt(s,t))}const Ji=e=>!!(e&&e.__v_isRef===!0),g=e=>ye(e)?e:e==null?"":W(e)||ue(e)&&(e.toString===zi||!X(e.toString))?Ji(e)?g(e.value):JSON.stringify(e,Zi,2):String(e),Zi=(e,t)=>Ji(t)?Zi(e,t.value):qt(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((s,[n,r],i)=>(s[$n(n,i)+" =>"]=r,s),{})}:Zt(t)?{[`Set(${t.size})`]:[...t.values()].map(s=>$n(s))}:it(t)?$n(t):ue(t)&&!W(t)&&!qi(t)?String(t):t,$n=(e,t="")=>{var s;return it(e)?`Symbol(${(s=e.description)!=null?s:t})`:e};let Me;class Tl{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.__v_skip=!0,this.parent=Me,!t&&Me&&(this.index=(Me.scopes||(Me.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,s;if(this.scopes)for(t=0,s=this.scopes.length;t<s;t++)this.scopes[t].pause();for(t=0,s=this.effects.length;t<s;t++)this.effects[t].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let t,s;if(this.scopes)for(t=0,s=this.scopes.length;t<s;t++)this.scopes[t].resume();for(t=0,s=this.effects.length;t<s;t++)this.effects[t].resume()}}run(t){if(this._active){const s=Me;try{return Me=this,t()}finally{Me=s}}}on(){++this._on===1&&(this.prevScope=Me,Me=this)}off(){this._on>0&&--this._on===0&&(Me=this.prevScope,this.prevScope=void 0)}stop(t){if(this._active){this._active=!1;let s,n;for(s=0,n=this.effects.length;s<n;s++)this.effects[s].stop();for(this.effects.length=0,s=0,n=this.cleanups.length;s<n;s++)this.cleanups[s]();if(this.cleanups.length=0,this.scopes){for(s=0,n=this.scopes.length;s<n;s++)this.scopes[s].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!t){const r=this.parent.scopes.pop();r&&r!==this&&(this.parent.scopes[this.index]=r,r.index=this.index)}this.parent=void 0}}}function Pl(){return Me}let me;const Sn=new WeakSet;class Qi{constructor(t){this.fn=t,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,Me&&Me.active&&Me.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,Sn.has(this)&&(Sn.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||Xi(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,Or(this),eo(this);const t=me,s=Ge;me=this,Ge=!0;try{return this.fn()}finally{to(this),me=t,Ge=s,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)ur(t);this.deps=this.depsTail=void 0,Or(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?Sn.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){Mn(this)&&this.run()}get dirty(){return Mn(this)}}let Yi=0,cs,ds;function Xi(e,t=!1){if(e.flags|=8,t){e.next=ds,ds=e;return}e.next=cs,cs=e}function lr(){Yi++}function ar(){if(--Yi>0)return;if(ds){let t=ds;for(ds=void 0;t;){const s=t.next;t.next=void 0,t.flags&=-9,t=s}}let e;for(;cs;){let t=cs;for(cs=void 0;t;){const s=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(n){e||(e=n)}t=s}}if(e)throw e}function eo(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function to(e){let t,s=e.depsTail,n=s;for(;n;){const r=n.prevDep;n.version===-1?(n===s&&(s=r),ur(n),Rl(n)):t=n,n.dep.activeLink=n.prevActiveLink,n.prevActiveLink=void 0,n=r}e.deps=t,e.depsTail=s}function Mn(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(so(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function so(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===bs)||(e.globalVersion=bs,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!Mn(e))))return;e.flags|=2;const t=e.dep,s=me,n=Ge;me=e,Ge=!0;try{eo(e);const r=e.fn(e._value);(t.version===0||je(r,e._value))&&(e.flags|=128,e._value=r,t.version++)}catch(r){throw t.version++,r}finally{me=s,Ge=n,to(e),e.flags&=-3}}function ur(e,t=!1){const{dep:s,prevSub:n,nextSub:r}=e;if(n&&(n.nextSub=r,e.prevSub=void 0),r&&(r.prevSub=n,e.nextSub=void 0),s.subs===e&&(s.subs=n,!n&&s.computed)){s.computed.flags&=-5;for(let i=s.computed.deps;i;i=i.nextDep)ur(i,!0)}!t&&!--s.sc&&s.map&&s.map.delete(s.key)}function Rl(e){const{prevDep:t,nextDep:s}=e;t&&(t.nextDep=s,e.prevDep=void 0),s&&(s.prevDep=t,e.nextDep=void 0)}let Ge=!0;const no=[];function mt(){no.push(Ge),Ge=!1}function bt(){const e=no.pop();Ge=e===void 0?!0:e}function Or(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const s=me;me=void 0;try{t()}finally{me=s}}}let bs=0;class Al{constructor(t,s){this.sub=t,this.dep=s,this.version=s.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class an{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(t){if(!me||!Ge||me===this.computed)return;let s=this.activeLink;if(s===void 0||s.sub!==me)s=this.activeLink=new Al(me,this),me.deps?(s.prevDep=me.depsTail,me.depsTail.nextDep=s,me.depsTail=s):me.deps=me.depsTail=s,ro(s);else if(s.version===-1&&(s.version=this.version,s.nextDep)){const n=s.nextDep;n.prevDep=s.prevDep,s.prevDep&&(s.prevDep.nextDep=n),s.prevDep=me.depsTail,s.nextDep=void 0,me.depsTail.nextDep=s,me.depsTail=s,me.deps===s&&(me.deps=n)}return s}trigger(t){this.version++,bs++,this.notify(t)}notify(t){lr();try{for(let s=this.subs;s;s=s.prevSub)s.sub.notify()&&s.sub.dep.notify()}finally{ar()}}}function ro(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let n=t.deps;n;n=n.nextDep)ro(n)}const s=e.dep.subs;s!==e&&(e.prevSub=s,s&&(s.nextSub=e)),e.dep.subs=e}}const jn=new WeakMap,Ft=Symbol(""),On=Symbol(""),ys=Symbol("");function Ce(e,t,s){if(Ge&&me){let n=jn.get(e);n||jn.set(e,n=new Map);let r=n.get(s);r||(n.set(s,r=new an),r.map=n,r.key=s),r.track()}}function dt(e,t,s,n,r,i){const o=jn.get(e);if(!o){bs++;return}const l=a=>{a&&a.trigger()};if(lr(),t==="clear")o.forEach(l);else{const a=W(e),p=a&&rr(s);if(a&&s==="length"){const c=Number(n);o.forEach((d,b)=>{(b==="length"||b===ys||!it(b)&&b>=c)&&l(d)})}else switch((s!==void 0||o.has(void 0))&&l(o.get(s)),p&&l(o.get(ys)),t){case"add":a?p&&l(o.get("length")):(l(o.get(Ft)),qt(e)&&l(o.get(On)));break;case"delete":a||(l(o.get(Ft)),qt(e)&&l(o.get(On)));break;case"set":qt(e)&&l(o.get(Ft));break}}ar()}function Ht(e){const t=ie(e);return t===e?t:(Ce(t,"iterate",ys),Ve(e)?t:t.map(Ke))}function un(e){return Ce(e=ie(e),"iterate",ys),e}function kt(e,t){return yt(e)?Wt(Mt(e)?Ke(t):t):Ke(t)}const Dl={__proto__:null,[Symbol.iterator](){return _n(this,Symbol.iterator,e=>kt(this,e))},concat(...e){return Ht(this).concat(...e.map(t=>W(t)?Ht(t):t))},entries(){return _n(this,"entries",e=>(e[1]=kt(this,e[1]),e))},every(e,t){return lt(this,"every",e,t,void 0,arguments)},filter(e,t){return lt(this,"filter",e,t,s=>s.map(n=>kt(this,n)),arguments)},find(e,t){return lt(this,"find",e,t,s=>kt(this,s),arguments)},findIndex(e,t){return lt(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return lt(this,"findLast",e,t,s=>kt(this,s),arguments)},findLastIndex(e,t){return lt(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return lt(this,"forEach",e,t,void 0,arguments)},includes(...e){return Cn(this,"includes",e)},indexOf(...e){return Cn(this,"indexOf",e)},join(e){return Ht(this).join(e)},lastIndexOf(...e){return Cn(this,"lastIndexOf",e)},map(e,t){return lt(this,"map",e,t,void 0,arguments)},pop(){return ss(this,"pop")},push(...e){return ss(this,"push",e)},reduce(e,...t){return Nr(this,"reduce",e,t)},reduceRight(e,...t){return Nr(this,"reduceRight",e,t)},shift(){return ss(this,"shift")},some(e,t){return lt(this,"some",e,t,void 0,arguments)},splice(...e){return ss(this,"splice",e)},toReversed(){return Ht(this).toReversed()},toSorted(e){return Ht(this).toSorted(e)},toSpliced(...e){return Ht(this).toSpliced(...e)},unshift(...e){return ss(this,"unshift",e)},values(){return _n(this,"values",e=>kt(this,e))}};function _n(e,t,s){const n=un(e),r=n[t]();return n!==e&&!Ve(e)&&(r._next=r.next,r.next=()=>{const i=r._next();return i.done||(i.value=s(i.value)),i}),r}const Ll=Array.prototype;function lt(e,t,s,n,r,i){const o=un(e),l=o!==e&&!Ve(e),a=o[t];if(a!==Ll[t]){const d=a.apply(e,i);return l?Ke(d):d}let p=s;o!==e&&(l?p=function(d,b){return s.call(this,kt(e,d),b,e)}:s.length>2&&(p=function(d,b){return s.call(this,d,b,e)}));const c=a.call(o,p,n);return l&&r?r(c):c}function Nr(e,t,s,n){const r=un(e);let i=s;return r!==e&&(Ve(e)?s.length>3&&(i=function(o,l,a){return s.call(this,o,l,a,e)}):i=function(o,l,a){return s.call(this,o,kt(e,l),a,e)}),r[t](i,...n)}function Cn(e,t,s){const n=ie(e);Ce(n,"iterate",ys);const r=n[t](...s);return(r===-1||r===!1)&&pr(s[0])?(s[0]=ie(s[0]),n[t](...s)):r}function ss(e,t,s=[]){mt(),lr();const n=ie(e)[t].apply(e,s);return ar(),bt(),n}const El=tr("__proto__,__v_isRef,__isVue"),io=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(it));function Fl(e){it(e)||(e=String(e));const t=ie(this);return Ce(t,"has",e),t.hasOwnProperty(e)}class oo{constructor(t=!1,s=!1){this._isReadonly=t,this._isShallow=s}get(t,s,n){if(s==="__v_skip")return t.__v_skip;const r=this._isReadonly,i=this._isShallow;if(s==="__v_isReactive")return!r;if(s==="__v_isReadonly")return r;if(s==="__v_isShallow")return i;if(s==="__v_raw")return n===(r?i?ql:co:i?uo:ao).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(n)?t:void 0;const o=W(t);if(!r){let a;if(o&&(a=Dl[s]))return a;if(s==="hasOwnProperty")return Fl}const l=Reflect.get(t,s,Se(t)?t:n);if((it(s)?io.has(s):El(s))||(r||Ce(t,"get",s),i))return l;if(Se(l)){const a=o&&rr(s)?l:l.value;return r&&ue(a)?Bn(a):a}return ue(l)?r?Bn(l):cn(l):l}}class lo extends oo{constructor(t=!1){super(!1,t)}set(t,s,n,r){let i=t[s];const o=W(t)&&rr(s);if(!this._isShallow){const p=yt(i);if(!Ve(n)&&!yt(n)&&(i=ie(i),n=ie(n)),!o&&Se(i)&&!Se(n))return p||(i.value=n),!0}const l=o?Number(s)<t.length:le(t,s),a=Reflect.set(t,s,n,Se(t)?t:r);return t===ie(r)&&(l?je(n,i)&&dt(t,"set",s,n):dt(t,"add",s,n)),a}deleteProperty(t,s){const n=le(t,s);t[s];const r=Reflect.deleteProperty(t,s);return r&&n&&dt(t,"delete",s,void 0),r}has(t,s){const n=Reflect.has(t,s);return(!it(s)||!io.has(s))&&Ce(t,"has",s),n}ownKeys(t){return Ce(t,"iterate",W(t)?"length":Ft),Reflect.ownKeys(t)}}class Ml extends oo{constructor(t=!1){super(!0,t)}set(t,s){return!0}deleteProperty(t,s){return!0}}const jl=new lo,Ol=new Ml,Nl=new lo(!0);const Nn=e=>e,Ds=e=>Reflect.getPrototypeOf(e);function Bl(e,t,s){return function(...n){const r=this.__v_raw,i=ie(r),o=qt(i),l=e==="entries"||e===Symbol.iterator&&o,a=e==="keys"&&o,p=r[e](...n),c=s?Nn:t?Wt:Ke;return!t&&Ce(i,"iterate",a?On:Ft),ke(Object.create(p),{next(){const{value:d,done:b}=p.next();return b?{value:d,done:b}:{value:l?[c(d[0]),c(d[1])]:c(d),done:b}}})}}function Ls(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function Ul(e,t){const s={get(r){const i=this.__v_raw,o=ie(i),l=ie(r);e||(je(r,l)&&Ce(o,"get",r),Ce(o,"get",l));const{has:a}=Ds(o),p=t?Nn:e?Wt:Ke;if(a.call(o,r))return p(i.get(r));if(a.call(o,l))return p(i.get(l));i!==o&&i.get(r)},get size(){const r=this.__v_raw;return!e&&Ce(ie(r),"iterate",Ft),r.size},has(r){const i=this.__v_raw,o=ie(i),l=ie(r);return e||(je(r,l)&&Ce(o,"has",r),Ce(o,"has",l)),r===l?i.has(r):i.has(r)||i.has(l)},forEach(r,i){const o=this,l=o.__v_raw,a=ie(l),p=t?Nn:e?Wt:Ke;return!e&&Ce(a,"iterate",Ft),l.forEach((c,d)=>r.call(i,p(c),p(d),o))}};return ke(s,e?{add:Ls("add"),set:Ls("set"),delete:Ls("delete"),clear:Ls("clear")}:{add(r){!t&&!Ve(r)&&!yt(r)&&(r=ie(r));const i=ie(this);return Ds(i).has.call(i,r)||(i.add(r),dt(i,"add",r,r)),this},set(r,i){!t&&!Ve(i)&&!yt(i)&&(i=ie(i));const o=ie(this),{has:l,get:a}=Ds(o);let p=l.call(o,r);p||(r=ie(r),p=l.call(o,r));const c=a.call(o,r);return o.set(r,i),p?je(i,c)&&dt(o,"set",r,i):dt(o,"add",r,i),this},delete(r){const i=ie(this),{has:o,get:l}=Ds(i);let a=o.call(i,r);a||(r=ie(r),a=o.call(i,r)),l&&l.call(i,r);const p=i.delete(r);return a&&dt(i,"delete",r,void 0),p},clear(){const r=ie(this),i=r.size!==0,o=r.clear();return i&&dt(r,"clear",void 0,void 0),o}}),["keys","values","entries",Symbol.iterator].forEach(r=>{s[r]=Bl(r,e,t)}),s}function cr(e,t){const s=Ul(e,t);return(n,r,i)=>r==="__v_isReactive"?!e:r==="__v_isReadonly"?e:r==="__v_raw"?n:Reflect.get(le(s,r)&&r in n?s:n,r,i)}const Hl={get:cr(!1,!1)},Vl={get:cr(!1,!0)},zl={get:cr(!0,!1)};const ao=new WeakMap,uo=new WeakMap,co=new WeakMap,ql=new WeakMap;function Gl(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Kl(e){return e.__v_skip||!Object.isExtensible(e)?0:Gl(bl(e))}function cn(e){return yt(e)?e:dr(e,!1,jl,Hl,ao)}function Wl(e){return dr(e,!1,Nl,Vl,uo)}function Bn(e){return dr(e,!0,Ol,zl,co)}function dr(e,t,s,n,r){if(!ue(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const i=Kl(e);if(i===0)return e;const o=r.get(e);if(o)return o;const l=new Proxy(e,i===2?n:s);return r.set(e,l),l}function Mt(e){return yt(e)?Mt(e.__v_raw):!!(e&&e.__v_isReactive)}function yt(e){return!!(e&&e.__v_isReadonly)}function Ve(e){return!!(e&&e.__v_isShallow)}function pr(e){return e?!!e.__v_raw:!1}function ie(e){const t=e&&e.__v_raw;return t?ie(t):e}function Jl(e){return!le(e,"__v_skip")&&Object.isExtensible(e)&&Ki(e,"__v_skip",!0),e}const Ke=e=>ue(e)?cn(e):e,Wt=e=>ue(e)?Bn(e):e;function Se(e){return e?e.__v_isRef===!0:!1}function V(e){return Zl(e,!1)}function Zl(e,t){return Se(e)?e:new Ql(e,t)}class Ql{constructor(t,s){this.dep=new an,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=s?t:ie(t),this._value=s?t:Ke(t),this.__v_isShallow=s}get value(){return this.dep.track(),this._value}set value(t){const s=this._rawValue,n=this.__v_isShallow||Ve(t)||yt(t);t=n?t:ie(t),je(t,s)&&(this._rawValue=t,this._value=n?t:Ke(t),this.dep.trigger())}}function f(e){return Se(e)?e.value:e}const Yl={get:(e,t,s)=>t==="__v_raw"?e:f(Reflect.get(e,t,s)),set:(e,t,s,n)=>{const r=e[t];return Se(r)&&!Se(s)?(r.value=s,!0):Reflect.set(e,t,s,n)}};function po(e){return Mt(e)?e:new Proxy(e,Yl)}class Xl{constructor(t){this.__v_isRef=!0,this._value=void 0;const s=this.dep=new an,{get:n,set:r}=t(s.track.bind(s),s.trigger.bind(s));this._get=n,this._set=r}get value(){return this._value=this._get()}set value(t){this._set(t)}}function ea(e){return new Xl(e)}class ta{constructor(t,s,n){this.fn=t,this.setter=s,this._value=void 0,this.dep=new an(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=bs-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!s,this.isSSR=n}notify(){if(this.flags|=16,!(this.flags&8)&&me!==this)return Xi(this,!0),!0}get value(){const t=this.dep.track();return so(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function sa(e,t,s=!1){let n,r;return X(e)?n=e:(n=e.get,r=e.set),new ta(n,r,s)}const Es={},Hs=new WeakMap;let Dt;function na(e,t=!1,s=Dt){if(s){let n=Hs.get(s);n||Hs.set(s,n=[]),n.push(e)}}function ra(e,t,s=oe){const{immediate:n,deep:r,once:i,scheduler:o,augmentJob:l,call:a}=s,p=B=>r?B:Ve(B)||r===!1||r===0?pt(B,1):pt(B);let c,d,b,x,m=!1,$=!1;if(Se(e)?(d=()=>e.value,m=Ve(e)):Mt(e)?(d=()=>p(e),m=!0):W(e)?($=!0,m=e.some(B=>Mt(B)||Ve(B)),d=()=>e.map(B=>{if(Se(B))return B.value;if(Mt(B))return p(B);if(X(B))return a?a(B,2):B()})):X(e)?t?d=a?()=>a(e,2):e:d=()=>{if(b){mt();try{b()}finally{bt()}}const B=Dt;Dt=c;try{return a?a(e,3,[x]):e(x)}finally{Dt=B}}:d=rt,t&&r){const B=d,C=r===!0?1/0:r;d=()=>pt(B(),C)}const A=Pl(),R=()=>{c.stop(),A&&A.active&&nr(A.effects,c)};if(i&&t){const B=t;t=(...C)=>{B(...C),R()}}let I=$?new Array(e.length).fill(Es):Es;const N=B=>{if(!(!(c.flags&1)||!c.dirty&&!B))if(t){const C=c.run();if(r||m||($?C.some((w,_)=>je(w,I[_])):je(C,I))){b&&b();const w=Dt;Dt=c;try{const _=[C,I===Es?void 0:$&&I[0]===Es?[]:I,x];I=C,a?a(t,3,_):t(..._)}finally{Dt=w}}}else c.run()};return l&&l(N),c=new Qi(d),c.scheduler=o?()=>o(N,!1):N,x=B=>na(B,!1,c),b=c.onStop=()=>{const B=Hs.get(c);if(B){if(a)a(B,4);else for(const C of B)C();Hs.delete(c)}},t?n?N(!0):I=c.run():o?o(N.bind(null,!0),!0):c.run(),R.pause=c.pause.bind(c),R.resume=c.resume.bind(c),R.stop=R,R}function pt(e,t=1/0,s){if(t<=0||!ue(e)||e.__v_skip||(s=s||new Map,(s.get(e)||0)>=t))return e;if(s.set(e,t),t--,Se(e))pt(e.value,t,s);else if(W(e))for(let n=0;n<e.length;n++)pt(e[n],t,s);else if(Zt(e)||qt(e))e.forEach(n=>{pt(n,t,s)});else if(qi(e)){for(const n in e)pt(e[n],t,s);for(const n of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,n)&&pt(e[n],t,s)}return e}function Cs(e,t,s,n){try{return n?e(...n):e()}catch(r){dn(r,t,s)}}function We(e,t,s,n){if(X(e)){const r=Cs(e,t,s,n);return r&&Vi(r)&&r.catch(i=>{dn(i,t,s)}),r}if(W(e)){const r=[];for(let i=0;i<e.length;i++)r.push(We(e[i],t,s,n));return r}}function dn(e,t,s,n=!0){const r=t?t.vnode:null,{errorHandler:i,throwUnhandledErrorInProduction:o}=t&&t.appContext.config||oe;if(t){let l=t.parent;const a=t.proxy,p=`https://vuejs.org/error-reference/#runtime-${s}`;for(;l;){const c=l.ec;if(c){for(let d=0;d<c.length;d++)if(c[d](e,a,p)===!1)return}l=l.parent}if(i){mt(),Cs(i,null,10,[e,a,p]),bt();return}}ia(e,s,r,n,o)}function ia(e,t,s,n=!0,r=!1){if(r)throw e;console.error(e)}const Re=[];let tt=-1;const Gt=[];let $t=null,Vt=0;const fo=Promise.resolve();let Vs=null;function fr(e){const t=Vs||fo;return e?t.then(this?e.bind(this):e):t}function oa(e){let t=tt+1,s=Re.length;for(;t<s;){const n=t+s>>>1,r=Re[n],i=vs(r);i<e||i===e&&r.flags&2?t=n+1:s=n}return t}function gr(e){if(!(e.flags&1)){const t=vs(e),s=Re[Re.length-1];!s||!(e.flags&2)&&t>=vs(s)?Re.push(e):Re.splice(oa(t),0,e),e.flags|=1,go()}}function go(){Vs||(Vs=fo.then(mo))}function la(e){W(e)?Gt.push(...e):$t&&e.id===-1?$t.splice(Vt+1,0,e):e.flags&1||(Gt.push(e),e.flags|=1),go()}function Br(e,t,s=tt+1){for(;s<Re.length;s++){const n=Re[s];if(n&&n.flags&2){if(e&&n.id!==e.uid)continue;Re.splice(s,1),s--,n.flags&4&&(n.flags&=-2),n(),n.flags&4||(n.flags&=-2)}}}function ho(e){if(Gt.length){const t=[...new Set(Gt)].sort((s,n)=>vs(s)-vs(n));if(Gt.length=0,$t){$t.push(...t);return}for($t=t,Vt=0;Vt<$t.length;Vt++){const s=$t[Vt];s.flags&4&&(s.flags&=-2),s.flags&8||s(),s.flags&=-2}$t=null,Vt=0}}const vs=e=>e.id==null?e.flags&2?-1:1/0:e.id;function mo(e){try{for(tt=0;tt<Re.length;tt++){const t=Re[tt];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),Cs(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;tt<Re.length;tt++){const t=Re[tt];t&&(t.flags&=-2)}tt=-1,Re.length=0,ho(),Vs=null,(Re.length||Gt.length)&&mo()}}let He=null,bo=null;function zs(e){const t=He;return He=e,bo=e&&e.type.__scopeId||null,t}function pn(e,t=He,s){if(!t||e._n)return e;const n=(...r)=>{n._d&&Js(-1);const i=zs(t);let o;try{o=e(...r)}finally{zs(i),n._d&&Js(1)}return o};return n._n=!0,n._c=!0,n._d=!0,n}function he(e,t){if(He===null)return e;const s=bn(He),n=e.dirs||(e.dirs=[]);for(let r=0;r<t.length;r++){let[i,o,l,a=oe]=t[r];i&&(X(i)&&(i={mounted:i,updated:i}),i.deep&&pt(o),n.push({dir:i,instance:s,value:o,oldValue:void 0,arg:l,modifiers:a}))}return e}function Tt(e,t,s,n){const r=e.dirs,i=t&&t.dirs;for(let o=0;o<r.length;o++){const l=r[o];i&&(l.oldValue=i[o].value);let a=l.dir[n];a&&(mt(),We(a,s,8,[e.el,l,e,t]),bt())}}function aa(e,t){if(De){let s=De.provides;const n=De.parent&&De.parent.provides;n===s&&(s=De.provides=Object.create(n)),s[e]=t}}function Os(e,t,s=!1){const n=xr();if(n||Kt){let r=Kt?Kt._context.provides:n?n.parent==null||n.ce?n.vnode.appContext&&n.vnode.appContext.provides:n.parent.provides:void 0;if(r&&e in r)return r[e];if(arguments.length>1)return s&&X(t)?t.call(n&&n.proxy):t}}const ua=Symbol.for("v-scx"),ca=()=>Os(ua);function da(e,t){return hr(e,null,{flush:"sync"})}function jt(e,t,s){return hr(e,t,s)}function hr(e,t,s=oe){const{immediate:n,deep:r,flush:i,once:o}=s,l=ke({},s),a=t&&n||!t&&i!=="post";let p;if(ks){if(i==="sync"){const x=ca();p=x.__watcherHandles||(x.__watcherHandles=[])}else if(!a){const x=()=>{};return x.stop=rt,x.resume=rt,x.pause=rt,x}}const c=De;l.call=(x,m,$)=>We(x,c,m,$);let d=!1;i==="post"?l.scheduler=x=>{_e(x,c&&c.suspense)}:i!=="sync"&&(d=!0,l.scheduler=(x,m)=>{m?x():gr(x)}),l.augmentJob=x=>{t&&(x.flags|=4),d&&(x.flags|=2,c&&(x.id=c.uid,x.i=c))};const b=ra(e,t,l);return ks&&(p?p.push(b):a&&b()),b}function pa(e,t,s){const n=this.proxy,r=ye(e)?e.includes(".")?yo(n,e):()=>n[e]:e.bind(n,n);let i;X(t)?i=t:(i=t.handler,s=t);const o=Is(this),l=hr(r,i.bind(n),s);return o(),l}function yo(e,t){const s=t.split(".");return()=>{let n=e;for(let r=0;r<s.length&&n;r++)n=n[s[r]];return n}}const vo=Symbol("_vte"),xo=e=>e.__isTeleport,ps=e=>e&&(e.disabled||e.disabled===""),Ur=e=>e&&(e.defer||e.defer===""),Hr=e=>typeof SVGElement<"u"&&e instanceof SVGElement,Vr=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,Un=(e,t)=>{const s=e&&e.to;return ye(s)?t?t(s):null:s},wo={name:"Teleport",__isTeleport:!0,process(e,t,s,n,r,i,o,l,a,p){const{mc:c,pc:d,pbc:b,o:{insert:x,querySelector:m,createText:$,createComment:A}}=p,R=ps(t.props);let{shapeFlag:I,children:N,dynamicChildren:B}=t;if(e==null){const C=t.el=$(""),w=t.anchor=$("");x(C,s,n),x(w,s,n);const _=(S,K)=>{I&16&&c(N,S,K,r,i,o,l,a)},D=()=>{const S=t.target=Un(t.props,m),K=Hn(S,t,$,x);S&&(o!=="svg"&&Hr(S)?o="svg":o!=="mathml"&&Vr(S)&&(o="mathml"),r&&r.isCE&&(r.ce._teleportTargets||(r.ce._teleportTargets=new Set)).add(S),R||(_(S,K),Ns(t,!1)))};R&&(_(s,w),Ns(t,!0)),Ur(t.props)?(t.el.__isMounted=!1,_e(()=>{D(),delete t.el.__isMounted},i)):D()}else{if(Ur(t.props)&&e.el.__isMounted===!1){_e(()=>{wo.process(e,t,s,n,r,i,o,l,a,p)},i);return}t.el=e.el,t.targetStart=e.targetStart;const C=t.anchor=e.anchor,w=t.target=e.target,_=t.targetAnchor=e.targetAnchor,D=ps(e.props),S=D?s:w,K=D?C:_;if(o==="svg"||Hr(w)?o="svg":(o==="mathml"||Vr(w))&&(o="mathml"),B?(b(e.dynamicChildren,B,S,r,i,o,l),yr(e,t,!0)):a||d(e,t,S,K,r,i,o,l,!1),R)D?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):Fs(t,s,C,p,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const Z=t.target=Un(t.props,m);Z&&Fs(t,Z,null,p,0)}else D&&Fs(t,w,_,p,1);Ns(t,R)}},remove(e,t,s,{um:n,o:{remove:r}},i){const{shapeFlag:o,children:l,anchor:a,targetStart:p,targetAnchor:c,target:d,props:b}=e;if(d&&(r(p),r(c)),i&&r(a),o&16){const x=i||!ps(b);for(let m=0;m<l.length;m++){const $=l[m];n($,t,s,x,!!$.dynamicChildren)}}},move:Fs,hydrate:fa};function Fs(e,t,s,{o:{insert:n},m:r},i=2){i===0&&n(e.targetAnchor,t,s);const{el:o,anchor:l,shapeFlag:a,children:p,props:c}=e,d=i===2;if(d&&n(o,t,s),(!d||ps(c))&&a&16)for(let b=0;b<p.length;b++)r(p[b],t,s,2);d&&n(l,t,s)}function fa(e,t,s,n,r,i,{o:{nextSibling:o,parentNode:l,querySelector:a,insert:p,createText:c}},d){function b(A,R){let I=R;for(;I;){if(I&&I.nodeType===8){if(I.data==="teleport start anchor")t.targetStart=I;else if(I.data==="teleport anchor"){t.targetAnchor=I,A._lpa=t.targetAnchor&&o(t.targetAnchor);break}}I=o(I)}}function x(A,R){R.anchor=d(o(A),R,l(A),s,n,r,i)}const m=t.target=Un(t.props,a),$=ps(t.props);if(m){const A=m._lpa||m.firstChild;t.shapeFlag&16&&($?(x(e,t),b(m,A),t.targetAnchor||Hn(m,t,c,p,l(e)===m?e:null)):(t.anchor=o(e),b(m,A),t.targetAnchor||Hn(m,t,c,p),d(A&&o(A),t,m,s,n,r,i))),Ns(t,$)}else $&&t.shapeFlag&16&&(x(e,t),t.targetStart=e,t.targetAnchor=o(e));return t.anchor&&o(t.anchor)}const ga=wo;function Ns(e,t){const s=e.ctx;if(s&&s.ut){let n,r;for(t?(n=e.el,r=e.anchor):(n=e.targetStart,r=e.targetAnchor);n&&n!==r;)n.nodeType===1&&n.setAttribute("data-v-owner",s.uid),n=n.nextSibling;s.ut()}}function Hn(e,t,s,n,r=null){const i=t.targetStart=s(""),o=t.targetAnchor=s("");return i[vo]=o,e&&(n(i,e,r),n(o,e,r)),o}const st=Symbol("_leaveCb"),ns=Symbol("_enterCb");function ha(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return Nt(()=>{e.isMounted=!0}),Po(()=>{e.isUnmounting=!0}),e}const Ue=[Function,Array],ko={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Ue,onEnter:Ue,onAfterEnter:Ue,onEnterCancelled:Ue,onBeforeLeave:Ue,onLeave:Ue,onAfterLeave:Ue,onLeaveCancelled:Ue,onBeforeAppear:Ue,onAppear:Ue,onAfterAppear:Ue,onAppearCancelled:Ue},$o=e=>{const t=e.subTree;return t.component?$o(t.component):t},ma={name:"BaseTransition",props:ko,setup(e,{slots:t}){const s=xr(),n=ha();return()=>{const r=t.default&&Co(t.default(),!0);if(!r||!r.length)return;const i=So(r),o=ie(e),{mode:l}=o;if(n.isLeaving)return In(i);const a=zr(i);if(!a)return In(i);let p=Vn(a,o,n,s,d=>p=d);a.type!==Ae&&xs(a,p);let c=s.subTree&&zr(s.subTree);if(c&&c.type!==Ae&&!Lt(c,a)&&$o(s).type!==Ae){let d=Vn(c,o,n,s);if(xs(c,d),l==="out-in"&&a.type!==Ae)return n.isLeaving=!0,d.afterLeave=()=>{n.isLeaving=!1,s.job.flags&8||s.update(),delete d.afterLeave,c=void 0},In(i);l==="in-out"&&a.type!==Ae?d.delayLeave=(b,x,m)=>{const $=_o(n,c);$[String(c.key)]=c,b[st]=()=>{x(),b[st]=void 0,delete p.delayedLeave,c=void 0},p.delayedLeave=()=>{m(),delete p.delayedLeave,c=void 0}}:c=void 0}else c&&(c=void 0);return i}}};function So(e){let t=e[0];if(e.length>1){for(const s of e)if(s.type!==Ae){t=s;break}}return t}const ba=ma;function _o(e,t){const{leavingVNodes:s}=e;let n=s.get(t.type);return n||(n=Object.create(null),s.set(t.type,n)),n}function Vn(e,t,s,n,r){const{appear:i,mode:o,persisted:l=!1,onBeforeEnter:a,onEnter:p,onAfterEnter:c,onEnterCancelled:d,onBeforeLeave:b,onLeave:x,onAfterLeave:m,onLeaveCancelled:$,onBeforeAppear:A,onAppear:R,onAfterAppear:I,onAppearCancelled:N}=t,B=String(e.key),C=_o(s,e),w=(S,K)=>{S&&We(S,n,9,K)},_=(S,K)=>{const Z=K[1];w(S,K),W(S)?S.every(T=>T.length<=1)&&Z():S.length<=1&&Z()},D={mode:o,persisted:l,beforeEnter(S){let K=a;if(!s.isMounted)if(i)K=A||a;else return;S[st]&&S[st](!0);const Z=C[B];Z&&Lt(e,Z)&&Z.el[st]&&Z.el[st](),w(K,[S])},enter(S){if(C[B]===e)return;let K=p,Z=c,T=d;if(!s.isMounted)if(i)K=R||p,Z=I||c,T=N||d;else return;let O=!1;S[ns]=$e=>{O||(O=!0,$e?w(T,[S]):w(Z,[S]),D.delayedLeave&&D.delayedLeave(),S[ns]=void 0)};const L=S[ns].bind(null,!1);K?_(K,[S,L]):L()},leave(S,K){const Z=String(e.key);if(S[ns]&&S[ns](!0),s.isUnmounting)return K();w(b,[S]);let T=!1;S[st]=L=>{T||(T=!0,K(),L?w($,[S]):w(m,[S]),S[st]=void 0,C[Z]===e&&delete C[Z])};const O=S[st].bind(null,!1);C[Z]=e,x?_(x,[S,O]):O()},clone(S){const K=Vn(S,t,s,n,r);return r&&r(K),K}};return D}function In(e){if(fn(e))return e=_t(e),e.children=null,e}function zr(e){if(!fn(e))return xo(e.type)&&e.children?So(e.children):e;if(e.component)return e.component.subTree;const{shapeFlag:t,children:s}=e;if(s){if(t&16)return s[0];if(t&32&&X(s.default))return s.default()}}function xs(e,t){e.shapeFlag&6&&e.component?(e.transition=t,xs(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function Co(e,t=!1,s){let n=[],r=0;for(let i=0;i<e.length;i++){let o=e[i];const l=s==null?o.key:String(s)+String(o.key!=null?o.key:i);o.type===te?(o.patchFlag&128&&r++,n=n.concat(Co(o.children,t,l))):(t||o.type!==Ae)&&n.push(l!=null?_t(o,{key:l}):o)}if(r>1)for(let i=0;i<n.length;i++)n[i].patchFlag=-2;return n}function Te(e,t){return X(e)?ke({name:e.name},t,{setup:e}):e}function Io(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function qr(e,t){let s;return!!((s=Object.getOwnPropertyDescriptor(e,t))&&!s.configurable)}const qs=new WeakMap;function fs(e,t,s,n,r=!1){if(W(e)){e.forEach(($,A)=>fs($,t&&(W(t)?t[A]:t),s,n,r));return}if(gs(n)&&!r){n.shapeFlag&512&&n.type.__asyncResolved&&n.component.subTree.component&&fs(e,t,s,n.component.subTree);return}const i=n.shapeFlag&4?bn(n.component):n.el,o=r?null:i,{i:l,r:a}=e,p=t&&t.r,c=l.refs===oe?l.refs={}:l.refs,d=l.setupState,b=ie(d),x=d===oe?Hi:$=>qr(c,$)?!1:le(b,$),m=($,A)=>!(A&&qr(c,A));if(p!=null&&p!==a){if(Gr(t),ye(p))c[p]=null,x(p)&&(d[p]=null);else if(Se(p)){const $=t;m(p,$.k)&&(p.value=null),$.k&&(c[$.k]=null)}}if(X(a))Cs(a,l,12,[o,c]);else{const $=ye(a),A=Se(a);if($||A){const R=()=>{if(e.f){const I=$?x(a)?d[a]:c[a]:m()||!e.k?a.value:c[e.k];if(r)W(I)&&nr(I,i);else if(W(I))I.includes(i)||I.push(i);else if($)c[a]=[i],x(a)&&(d[a]=c[a]);else{const N=[i];m(a,e.k)&&(a.value=N),e.k&&(c[e.k]=N)}}else $?(c[a]=o,x(a)&&(d[a]=o)):A&&(m(a,e.k)&&(a.value=o),e.k&&(c[e.k]=o))};if(o){const I=()=>{R(),qs.delete(e)};I.id=-1,qs.set(e,I),_e(I,s)}else Gr(e),R()}}}function Gr(e){const t=qs.get(e);t&&(t.flags|=8,qs.delete(e))}ln().requestIdleCallback;ln().cancelIdleCallback;const gs=e=>!!e.type.__asyncLoader,fn=e=>e.type.__isKeepAlive;function ya(e,t){To(e,"a",t)}function va(e,t){To(e,"da",t)}function To(e,t,s=De){const n=e.__wdc||(e.__wdc=()=>{let r=s;for(;r;){if(r.isDeactivated)return;r=r.parent}return e()});if(gn(t,n,s),s){let r=s.parent;for(;r&&r.parent;)fn(r.parent.vnode)&&xa(n,t,s,r),r=r.parent}}function xa(e,t,s,n){const r=gn(t,e,n,!0);Bt(()=>{nr(n[t],r)},s)}function gn(e,t,s=De,n=!1){if(s){const r=s[e]||(s[e]=[]),i=t.__weh||(t.__weh=(...o)=>{mt();const l=Is(s),a=We(t,s,e,o);return l(),bt(),a});return n?r.unshift(i):r.push(i),i}}const xt=e=>(t,s=De)=>{(!ks||e==="sp")&&gn(e,(...n)=>t(...n),s)},wa=xt("bm"),Nt=xt("m"),ka=xt("bu"),$a=xt("u"),Po=xt("bum"),Bt=xt("um"),Sa=xt("sp"),_a=xt("rtg"),Ca=xt("rtc");function Ia(e,t=De){gn("ec",e,t)}const Ta=Symbol.for("v-ndc");function Ie(e,t,s,n){let r;const i=s,o=W(e);if(o||ye(e)){const l=o&&Mt(e);let a=!1,p=!1;l&&(a=!Ve(e),p=yt(e),e=un(e)),r=new Array(e.length);for(let c=0,d=e.length;c<d;c++)r[c]=t(a?p?Wt(Ke(e[c])):Ke(e[c]):e[c],c,void 0,i)}else if(typeof e=="number"){r=new Array(e);for(let l=0;l<e;l++)r[l]=t(l+1,l,void 0,i)}else if(ue(e))if(e[Symbol.iterator])r=Array.from(e,(l,a)=>t(l,a,void 0,i));else{const l=Object.keys(e);r=new Array(l.length);for(let a=0,p=l.length;a<p;a++){const c=l[a];r[a]=t(e[c],c,a,i)}}else r=[];return r}const zn=e=>e?Jo(e)?bn(e):zn(e.parent):null,hs=ke(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>zn(e.parent),$root:e=>zn(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Ao(e),$forceUpdate:e=>e.f||(e.f=()=>{gr(e.update)}),$nextTick:e=>e.n||(e.n=fr.bind(e.proxy)),$watch:e=>pa.bind(e)}),Tn=(e,t)=>e!==oe&&!e.__isScriptSetup&&le(e,t),Pa={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:s,setupState:n,data:r,props:i,accessCache:o,type:l,appContext:a}=e;if(t[0]!=="$"){const b=o[t];if(b!==void 0)switch(b){case 1:return n[t];case 2:return r[t];case 4:return s[t];case 3:return i[t]}else{if(Tn(n,t))return o[t]=1,n[t];if(r!==oe&&le(r,t))return o[t]=2,r[t];if(le(i,t))return o[t]=3,i[t];if(s!==oe&&le(s,t))return o[t]=4,s[t];qn&&(o[t]=0)}}const p=hs[t];let c,d;if(p)return t==="$attrs"&&Ce(e.attrs,"get",""),p(e);if((c=l.__cssModules)&&(c=c[t]))return c;if(s!==oe&&le(s,t))return o[t]=4,s[t];if(d=a.config.globalProperties,le(d,t))return d[t]},set({_:e},t,s){const{data:n,setupState:r,ctx:i}=e;return Tn(r,t)?(r[t]=s,!0):n!==oe&&le(n,t)?(n[t]=s,!0):le(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(i[t]=s,!0)},has({_:{data:e,setupState:t,accessCache:s,ctx:n,appContext:r,props:i,type:o}},l){let a;return!!(s[l]||e!==oe&&l[0]!=="$"&&le(e,l)||Tn(t,l)||le(i,l)||le(n,l)||le(hs,l)||le(r.config.globalProperties,l)||(a=o.__cssModules)&&a[l])},defineProperty(e,t,s){return s.get!=null?e._.accessCache[t]=0:le(s,"value")&&this.set(e,t,s.value,null),Reflect.defineProperty(e,t,s)}};function Gs(e){return W(e)?e.reduce((t,s)=>(t[s]=null,t),{}):e}function Ks(e,t){return!e||!t?e||t:W(e)&&W(t)?e.concat(t):ke({},Gs(e),Gs(t))}let qn=!0;function Ra(e){const t=Ao(e),s=e.proxy,n=e.ctx;qn=!1,t.beforeCreate&&Kr(t.beforeCreate,e,"bc");const{data:r,computed:i,methods:o,watch:l,provide:a,inject:p,created:c,beforeMount:d,mounted:b,beforeUpdate:x,updated:m,activated:$,deactivated:A,beforeDestroy:R,beforeUnmount:I,destroyed:N,unmounted:B,render:C,renderTracked:w,renderTriggered:_,errorCaptured:D,serverPrefetch:S,expose:K,inheritAttrs:Z,components:T,directives:O,filters:L}=t;if(p&&Aa(p,n,null),o)for(const de in o){const fe=o[de];X(fe)&&(n[de]=fe.bind(s))}if(r){const de=r.call(s,s);ue(de)&&(e.data=cn(de))}if(qn=!0,i)for(const de in i){const fe=i[de],Ct=X(fe)?fe.bind(s,s):X(fe.get)?fe.get.bind(s,s):rt,Rs=!X(fe)&&X(fe.set)?fe.set.bind(s):rt,It=we({get:Ct,set:Rs});Object.defineProperty(n,de,{enumerable:!0,configurable:!0,get:()=>It.value,set:Je=>It.value=Je})}if(l)for(const de in l)Ro(l[de],n,s,de);if(a){const de=X(a)?a.call(s):a;Reflect.ownKeys(de).forEach(fe=>{aa(fe,de[fe])})}c&&Kr(c,e,"c");function ve(de,fe){W(fe)?fe.forEach(Ct=>de(Ct.bind(s))):fe&&de(fe.bind(s))}if(ve(wa,d),ve(Nt,b),ve(ka,x),ve($a,m),ve(ya,$),ve(va,A),ve(Ia,D),ve(Ca,w),ve(_a,_),ve(Po,I),ve(Bt,B),ve(Sa,S),W(K))if(K.length){const de=e.exposed||(e.exposed={});K.forEach(fe=>{Object.defineProperty(de,fe,{get:()=>s[fe],set:Ct=>s[fe]=Ct,enumerable:!0})})}else e.exposed||(e.exposed={});C&&e.render===rt&&(e.render=C),Z!=null&&(e.inheritAttrs=Z),T&&(e.components=T),O&&(e.directives=O),S&&Io(e)}function Aa(e,t,s=rt){W(e)&&(e=Gn(e));for(const n in e){const r=e[n];let i;ue(r)?"default"in r?i=Os(r.from||n,r.default,!0):i=Os(r.from||n):i=Os(r),Se(i)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>i.value,set:o=>i.value=o}):t[n]=i}}function Kr(e,t,s){We(W(e)?e.map(n=>n.bind(t.proxy)):e.bind(t.proxy),t,s)}function Ro(e,t,s,n){let r=n.includes(".")?yo(s,n):()=>s[n];if(ye(e)){const i=t[e];X(i)&&jt(r,i)}else if(X(e))jt(r,e.bind(s));else if(ue(e))if(W(e))e.forEach(i=>Ro(i,t,s,n));else{const i=X(e.handler)?e.handler.bind(s):t[e.handler];X(i)&&jt(r,i,e)}}function Ao(e){const t=e.type,{mixins:s,extends:n}=t,{mixins:r,optionsCache:i,config:{optionMergeStrategies:o}}=e.appContext,l=i.get(t);let a;return l?a=l:!r.length&&!s&&!n?a=t:(a={},r.length&&r.forEach(p=>Ws(a,p,o,!0)),Ws(a,t,o)),ue(t)&&i.set(t,a),a}function Ws(e,t,s,n=!1){const{mixins:r,extends:i}=t;i&&Ws(e,i,s,!0),r&&r.forEach(o=>Ws(e,o,s,!0));for(const o in t)if(!(n&&o==="expose")){const l=Da[o]||s&&s[o];e[o]=l?l(e[o],t[o]):t[o]}return e}const Da={data:Wr,props:Jr,emits:Jr,methods:ls,computed:ls,beforeCreate:Pe,created:Pe,beforeMount:Pe,mounted:Pe,beforeUpdate:Pe,updated:Pe,beforeDestroy:Pe,beforeUnmount:Pe,destroyed:Pe,unmounted:Pe,activated:Pe,deactivated:Pe,errorCaptured:Pe,serverPrefetch:Pe,components:ls,directives:ls,watch:Ea,provide:Wr,inject:La};function Wr(e,t){return t?e?function(){return ke(X(e)?e.call(this,this):e,X(t)?t.call(this,this):t)}:t:e}function La(e,t){return ls(Gn(e),Gn(t))}function Gn(e){if(W(e)){const t={};for(let s=0;s<e.length;s++)t[e[s]]=e[s];return t}return e}function Pe(e,t){return e?[...new Set([].concat(e,t))]:t}function ls(e,t){return e?ke(Object.create(null),e,t):t}function Jr(e,t){return e?W(e)&&W(t)?[...new Set([...e,...t])]:ke(Object.create(null),Gs(e),Gs(t??{})):t}function Ea(e,t){if(!e)return t;if(!t)return e;const s=ke(Object.create(null),e);for(const n in t)s[n]=Pe(e[n],t[n]);return s}function Do(){return{app:null,config:{isNativeTag:Hi,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let Fa=0;function Ma(e,t){return function(n,r=null){X(n)||(n=ke({},n)),r!=null&&!ue(r)&&(r=null);const i=Do(),o=new WeakSet,l=[];let a=!1;const p=i.app={_uid:Fa++,_component:n,_props:r,_container:null,_context:i,_instance:null,version:fu,get config(){return i.config},set config(c){},use(c,...d){return o.has(c)||(c&&X(c.install)?(o.add(c),c.install(p,...d)):X(c)&&(o.add(c),c(p,...d))),p},mixin(c){return i.mixins.includes(c)||i.mixins.push(c),p},component(c,d){return d?(i.components[c]=d,p):i.components[c]},directive(c,d){return d?(i.directives[c]=d,p):i.directives[c]},mount(c,d,b){if(!a){const x=p._ceVNode||be(n,r);return x.appContext=i,b===!0?b="svg":b===!1&&(b=void 0),e(x,c,b),a=!0,p._container=c,c.__vue_app__=p,bn(x.component)}},onUnmount(c){l.push(c)},unmount(){a&&(We(l,p._instance,16),e(null,p._container),delete p._container.__vue_app__)},provide(c,d){return i.provides[c]=d,p},runWithContext(c){const d=Kt;Kt=p;try{return c()}finally{Kt=d}}};return p}}let Kt=null;function Kn(e,t,s=oe){const n=xr(),r=ht(t),i=vt(t),o=Lo(e,r),l=ea((a,p)=>{let c,d=oe,b;return da(()=>{const x=e[r];je(c,x)&&(c=x,p())}),{get(){return a(),s.get?s.get(c):c},set(x){const m=s.set?s.set(x):x;if(!je(m,c)&&!(d!==oe&&je(x,d)))return;const $=n.vnode.props;$&&(t in $||r in $||i in $)&&(`onUpdate:${t}`in $||`onUpdate:${r}`in $||`onUpdate:${i}`in $)||(c=x,p()),n.emit(`update:${t}`,m),je(x,m)&&je(x,d)&&!je(m,b)&&p(),d=x,b=m}}});return l[Symbol.iterator]=()=>{let a=0;return{next(){return a<2?{value:a++?o||oe:l,done:!1}:{done:!0}}}},l}const Lo=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${ht(t)}Modifiers`]||e[`${vt(t)}Modifiers`];function ja(e,t,...s){if(e.isUnmounted)return;const n=e.vnode.props||oe;let r=s;const i=t.startsWith("update:"),o=i&&Lo(n,t.slice(7));o&&(o.trim&&(r=s.map(c=>ye(c)?c.trim():c)),o.number&&(r=s.map(on)));let l,a=n[l=kn(t)]||n[l=kn(ht(t))];!a&&i&&(a=n[l=kn(vt(t))]),a&&We(a,e,6,r);const p=n[l+"Once"];if(p){if(!e.emitted)e.emitted={};else if(e.emitted[l])return;e.emitted[l]=!0,We(p,e,6,r)}}const Oa=new WeakMap;function Eo(e,t,s=!1){const n=s?Oa:t.emitsCache,r=n.get(e);if(r!==void 0)return r;const i=e.emits;let o={},l=!1;if(!X(e)){const a=p=>{const c=Eo(p,t,!0);c&&(l=!0,ke(o,c))};!s&&t.mixins.length&&t.mixins.forEach(a),e.extends&&a(e.extends),e.mixins&&e.mixins.forEach(a)}return!i&&!l?(ue(e)&&n.set(e,null),null):(W(i)?i.forEach(a=>o[a]=null):ke(o,i),ue(e)&&n.set(e,o),o)}function hn(e,t){return!e||!nn(t)?!1:(t=t.slice(2).replace(/Once$/,""),le(e,t[0].toLowerCase()+t.slice(1))||le(e,vt(t))||le(e,t))}function Zr(e){const{type:t,vnode:s,proxy:n,withProxy:r,propsOptions:[i],slots:o,attrs:l,emit:a,render:p,renderCache:c,props:d,data:b,setupState:x,ctx:m,inheritAttrs:$}=e,A=zs(e);let R,I;try{if(s.shapeFlag&4){const B=r||n,C=B;R=nt(p.call(C,B,c,d,x,b,m)),I=l}else{const B=t;R=nt(B.length>1?B(d,{attrs:l,slots:o,emit:a}):B(d,null)),I=t.props?l:Na(l)}}catch(B){ms.length=0,dn(B,e,1),R=be(Ae)}let N=R;if(I&&$!==!1){const B=Object.keys(I),{shapeFlag:C}=N;B.length&&C&7&&(i&&B.some(sr)&&(I=Ba(I,i)),N=_t(N,I,!1,!0))}return s.dirs&&(N=_t(N,null,!1,!0),N.dirs=N.dirs?N.dirs.concat(s.dirs):s.dirs),s.transition&&xs(N,s.transition),R=N,zs(A),R}const Na=e=>{let t;for(const s in e)(s==="class"||s==="style"||nn(s))&&((t||(t={}))[s]=e[s]);return t},Ba=(e,t)=>{const s={};for(const n in e)(!sr(n)||!(n.slice(9)in t))&&(s[n]=e[n]);return s};function Ua(e,t,s){const{props:n,children:r,component:i}=e,{props:o,children:l,patchFlag:a}=t,p=i.emitsOptions;if(t.dirs||t.transition)return!0;if(s&&a>=0){if(a&1024)return!0;if(a&16)return n?Qr(n,o,p):!!o;if(a&8){const c=t.dynamicProps;for(let d=0;d<c.length;d++){const b=c[d];if(Fo(o,n,b)&&!hn(p,b))return!0}}}else return(r||l)&&(!l||!l.$stable)?!0:n===o?!1:n?o?Qr(n,o,p):!0:!!o;return!1}function Qr(e,t,s){const n=Object.keys(t);if(n.length!==Object.keys(e).length)return!0;for(let r=0;r<n.length;r++){const i=n[r];if(Fo(t,e,i)&&!hn(s,i))return!0}return!1}function Fo(e,t,s){const n=e[s],r=t[s];return s==="style"&&ue(n)&&ue(r)?!Qt(n,r):n!==r}function Ha({vnode:e,parent:t},s){for(;t;){const n=t.subTree;if(n.suspense&&n.suspense.activeBranch===e&&(n.el=e.el),n===e)(e=t.vnode).el=s,t=t.parent;else break}}const Mo={},jo=()=>Object.create(Mo),Oo=e=>Object.getPrototypeOf(e)===Mo;function Va(e,t,s,n=!1){const r={},i=jo();e.propsDefaults=Object.create(null),No(e,t,r,i);for(const o in e.propsOptions[0])o in r||(r[o]=void 0);s?e.props=n?r:Wl(r):e.type.props?e.props=r:e.props=i,e.attrs=i}function za(e,t,s,n){const{props:r,attrs:i,vnode:{patchFlag:o}}=e,l=ie(r),[a]=e.propsOptions;let p=!1;if((n||o>0)&&!(o&16)){if(o&8){const c=e.vnode.dynamicProps;for(let d=0;d<c.length;d++){let b=c[d];if(hn(e.emitsOptions,b))continue;const x=t[b];if(a)if(le(i,b))x!==i[b]&&(i[b]=x,p=!0);else{const m=ht(b);r[m]=Wn(a,l,m,x,e,!1)}else x!==i[b]&&(i[b]=x,p=!0)}}}else{No(e,t,r,i)&&(p=!0);let c;for(const d in l)(!t||!le(t,d)&&((c=vt(d))===d||!le(t,c)))&&(a?s&&(s[d]!==void 0||s[c]!==void 0)&&(r[d]=Wn(a,l,d,void 0,e,!0)):delete r[d]);if(i!==l)for(const d in i)(!t||!le(t,d))&&(delete i[d],p=!0)}p&&dt(e.attrs,"set","")}function No(e,t,s,n){const[r,i]=e.propsOptions;let o=!1,l;if(t)for(let a in t){if(us(a))continue;const p=t[a];let c;r&&le(r,c=ht(a))?!i||!i.includes(c)?s[c]=p:(l||(l={}))[c]=p:hn(e.emitsOptions,a)||(!(a in n)||p!==n[a])&&(n[a]=p,o=!0)}if(i){const a=ie(s),p=l||oe;for(let c=0;c<i.length;c++){const d=i[c];s[d]=Wn(r,a,d,p[d],e,!le(p,d))}}return o}function Wn(e,t,s,n,r,i){const o=e[s];if(o!=null){const l=le(o,"default");if(l&&n===void 0){const a=o.default;if(o.type!==Function&&!o.skipFactory&&X(a)){const{propsDefaults:p}=r;if(s in p)n=p[s];else{const c=Is(r);n=p[s]=a.call(null,t),c()}}else n=a;r.ce&&r.ce._setProp(s,n)}o[0]&&(i&&!l?n=!1:o[1]&&(n===""||n===vt(s))&&(n=!0))}return n}const qa=new WeakMap;function Bo(e,t,s=!1){const n=s?qa:t.propsCache,r=n.get(e);if(r)return r;const i=e.props,o={},l=[];let a=!1;if(!X(e)){const c=d=>{a=!0;const[b,x]=Bo(d,t,!0);ke(o,b),x&&l.push(...x)};!s&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}if(!i&&!a)return ue(e)&&n.set(e,zt),zt;if(W(i))for(let c=0;c<i.length;c++){const d=ht(i[c]);Yr(d)&&(o[d]=oe)}else if(i)for(const c in i){const d=ht(c);if(Yr(d)){const b=i[c],x=o[d]=W(b)||X(b)?{type:b}:ke({},b),m=x.type;let $=!1,A=!0;if(W(m))for(let R=0;R<m.length;++R){const I=m[R],N=X(I)&&I.name;if(N==="Boolean"){$=!0;break}else N==="String"&&(A=!1)}else $=X(m)&&m.name==="Boolean";x[0]=$,x[1]=A,($||le(x,"default"))&&l.push(d)}}const p=[o,l];return ue(e)&&n.set(e,p),p}function Yr(e){return e[0]!=="$"&&!us(e)}const mr=e=>e==="_"||e==="_ctx"||e==="$stable",br=e=>W(e)?e.map(nt):[nt(e)],Ga=(e,t,s)=>{if(t._n)return t;const n=pn((...r)=>br(t(...r)),s);return n._c=!1,n},Uo=(e,t,s)=>{const n=e._ctx;for(const r in e){if(mr(r))continue;const i=e[r];if(X(i))t[r]=Ga(r,i,n);else if(i!=null){const o=br(i);t[r]=()=>o}}},Ho=(e,t)=>{const s=br(t);e.slots.default=()=>s},Vo=(e,t,s)=>{for(const n in t)(s||!mr(n))&&(e[n]=t[n])},Ka=(e,t,s)=>{const n=e.slots=jo();if(e.vnode.shapeFlag&32){const r=t._;r?(Vo(n,t,s),s&&Ki(n,"_",r,!0)):Uo(t,n)}else t&&Ho(e,t)},Wa=(e,t,s)=>{const{vnode:n,slots:r}=e;let i=!0,o=oe;if(n.shapeFlag&32){const l=t._;l?s&&l===1?i=!1:Vo(r,t,s):(i=!t.$stable,Uo(t,r)),o=t}else t&&(Ho(e,t),o={default:1});if(i)for(const l in r)!mr(l)&&o[l]==null&&delete r[l]},_e=Xa;function Ja(e){return Za(e)}function Za(e,t){const s=ln();s.__VUE__=!0;const{insert:n,remove:r,patchProp:i,createElement:o,createText:l,createComment:a,setText:p,setElementText:c,parentNode:d,nextSibling:b,setScopeId:x=rt,insertStaticContent:m}=e,$=(h,y,P,j=null,E=null,F=null,z=void 0,H=null,U=!!y.dynamicChildren)=>{if(h===y)return;h&&!Lt(h,y)&&(j=As(h),Je(h,E,F,!0),h=null),y.patchFlag===-2&&(U=!1,y.dynamicChildren=null);const{type:M,ref:Q,shapeFlag:G}=y;switch(M){case mn:A(h,y,P,j);break;case Ae:R(h,y,P,j);break;case Rn:h==null&&I(y,P,j,z);break;case te:T(h,y,P,j,E,F,z,H,U);break;default:G&1?C(h,y,P,j,E,F,z,H,U):G&6?O(h,y,P,j,E,F,z,H,U):(G&64||G&128)&&M.process(h,y,P,j,E,F,z,H,U,es)}Q!=null&&E?fs(Q,h&&h.ref,F,y||h,!y):Q==null&&h&&h.ref!=null&&fs(h.ref,null,F,h,!0)},A=(h,y,P,j)=>{if(h==null)n(y.el=l(y.children),P,j);else{const E=y.el=h.el;y.children!==h.children&&p(E,y.children)}},R=(h,y,P,j)=>{h==null?n(y.el=a(y.children||""),P,j):y.el=h.el},I=(h,y,P,j)=>{[h.el,h.anchor]=m(h.children,y,P,j,h.el,h.anchor)},N=({el:h,anchor:y},P,j)=>{let E;for(;h&&h!==y;)E=b(h),n(h,P,j),h=E;n(y,P,j)},B=({el:h,anchor:y})=>{let P;for(;h&&h!==y;)P=b(h),r(h),h=P;r(y)},C=(h,y,P,j,E,F,z,H,U)=>{if(y.type==="svg"?z="svg":y.type==="math"&&(z="mathml"),h==null)w(y,P,j,E,F,z,H,U);else{const M=h.el&&h.el._isVueCE?h.el:null;try{M&&M._beginPatch(),S(h,y,E,F,z,H,U)}finally{M&&M._endPatch()}}},w=(h,y,P,j,E,F,z,H)=>{let U,M;const{props:Q,shapeFlag:G,transition:J,dirs:Y}=h;if(U=h.el=o(h.type,F,Q&&Q.is,Q),G&8?c(U,h.children):G&16&&D(h.children,U,null,j,E,Pn(h,F),z,H),Y&&Tt(h,null,j,"created"),_(U,h,h.scopeId,z,j),Q){for(const ge in Q)ge!=="value"&&!us(ge)&&i(U,ge,null,Q[ge],F,j);"value"in Q&&i(U,"value",null,Q.value,F),(M=Q.onVnodeBeforeMount)&&Xe(M,j,h)}Y&&Tt(h,null,j,"beforeMount");const se=Qa(E,J);se&&J.beforeEnter(U),n(U,y,P),((M=Q&&Q.onVnodeMounted)||se||Y)&&_e(()=>{M&&Xe(M,j,h),se&&J.enter(U),Y&&Tt(h,null,j,"mounted")},E)},_=(h,y,P,j,E)=>{if(P&&x(h,P),j)for(let F=0;F<j.length;F++)x(h,j[F]);if(E){let F=E.subTree;if(y===F||Go(F.type)&&(F.ssContent===y||F.ssFallback===y)){const z=E.vnode;_(h,z,z.scopeId,z.slotScopeIds,E.parent)}}},D=(h,y,P,j,E,F,z,H,U=0)=>{for(let M=U;M<h.length;M++){const Q=h[M]=H?ct(h[M]):nt(h[M]);$(null,Q,y,P,j,E,F,z,H)}},S=(h,y,P,j,E,F,z)=>{const H=y.el=h.el;let{patchFlag:U,dynamicChildren:M,dirs:Q}=y;U|=h.patchFlag&16;const G=h.props||oe,J=y.props||oe;let Y;if(P&&Pt(P,!1),(Y=J.onVnodeBeforeUpdate)&&Xe(Y,P,y,h),Q&&Tt(y,h,P,"beforeUpdate"),P&&Pt(P,!0),(G.innerHTML&&J.innerHTML==null||G.textContent&&J.textContent==null)&&c(H,""),M?K(h.dynamicChildren,M,H,P,j,Pn(y,E),F):z||fe(h,y,H,null,P,j,Pn(y,E),F,!1),U>0){if(U&16)Z(H,G,J,P,E);else if(U&2&&G.class!==J.class&&i(H,"class",null,J.class,E),U&4&&i(H,"style",G.style,J.style,E),U&8){const se=y.dynamicProps;for(let ge=0;ge<se.length;ge++){const ce=se[ge],Ee=G[ce],Fe=J[ce];(Fe!==Ee||ce==="value")&&i(H,ce,Ee,Fe,E,P)}}U&1&&h.children!==y.children&&c(H,y.children)}else!z&&M==null&&Z(H,G,J,P,E);((Y=J.onVnodeUpdated)||Q)&&_e(()=>{Y&&Xe(Y,P,y,h),Q&&Tt(y,h,P,"updated")},j)},K=(h,y,P,j,E,F,z)=>{for(let H=0;H<y.length;H++){const U=h[H],M=y[H],Q=U.el&&(U.type===te||!Lt(U,M)||U.shapeFlag&198)?d(U.el):P;$(U,M,Q,null,j,E,F,z,!0)}},Z=(h,y,P,j,E)=>{if(y!==P){if(y!==oe)for(const F in y)!us(F)&&!(F in P)&&i(h,F,y[F],null,E,j);for(const F in P){if(us(F))continue;const z=P[F],H=y[F];z!==H&&F!=="value"&&i(h,F,H,z,E,j)}"value"in P&&i(h,"value",y.value,P.value,E)}},T=(h,y,P,j,E,F,z,H,U)=>{const M=y.el=h?h.el:l(""),Q=y.anchor=h?h.anchor:l("");let{patchFlag:G,dynamicChildren:J,slotScopeIds:Y}=y;Y&&(H=H?H.concat(Y):Y),h==null?(n(M,P,j),n(Q,P,j),D(y.children||[],P,Q,E,F,z,H,U)):G>0&&G&64&&J&&h.dynamicChildren&&h.dynamicChildren.length===J.length?(K(h.dynamicChildren,J,P,E,F,z,H),(y.key!=null||E&&y===E.subTree)&&yr(h,y,!0)):fe(h,y,P,Q,E,F,z,H,U)},O=(h,y,P,j,E,F,z,H,U)=>{y.slotScopeIds=H,h==null?y.shapeFlag&512?E.ctx.activate(y,P,j,z,U):L(y,P,j,E,F,z,U):$e(h,y,U)},L=(h,y,P,j,E,F,z)=>{const H=h.component=ou(h,j,E);if(fn(h)&&(H.ctx.renderer=es),lu(H,!1,z),H.asyncDep){if(E&&E.registerDep(H,ve,z),!h.el){const U=H.subTree=be(Ae);R(null,U,y,P),h.placeholder=U.el}}else ve(H,h,y,P,E,F,z)},$e=(h,y,P)=>{const j=y.component=h.component;if(Ua(h,y,P))if(j.asyncDep&&!j.asyncResolved){de(j,y,P);return}else j.next=y,j.update();else y.el=h.el,j.vnode=y},ve=(h,y,P,j,E,F,z)=>{const H=()=>{if(h.isMounted){let{next:G,bu:J,u:Y,parent:se,vnode:ge}=h;{const Qe=zo(h);if(Qe){G&&(G.el=ge.el,de(h,G,z)),Qe.asyncDep.then(()=>{_e(()=>{h.isUnmounted||M()},E)});return}}let ce=G,Ee;Pt(h,!1),G?(G.el=ge.el,de(h,G,z)):G=ge,J&&js(J),(Ee=G.props&&G.props.onVnodeBeforeUpdate)&&Xe(Ee,se,G,ge),Pt(h,!0);const Fe=Zr(h),Ze=h.subTree;h.subTree=Fe,$(Ze,Fe,d(Ze.el),As(Ze),h,E,F),G.el=Fe.el,ce===null&&Ha(h,Fe.el),Y&&_e(Y,E),(Ee=G.props&&G.props.onVnodeUpdated)&&_e(()=>Xe(Ee,se,G,ge),E)}else{let G;const{el:J,props:Y}=y,{bm:se,m:ge,parent:ce,root:Ee,type:Fe}=h,Ze=gs(y);Pt(h,!1),se&&js(se),!Ze&&(G=Y&&Y.onVnodeBeforeMount)&&Xe(G,ce,y),Pt(h,!0);{Ee.ce&&Ee.ce._hasShadowRoot()&&Ee.ce._injectChildStyle(Fe);const Qe=h.subTree=Zr(h);$(null,Qe,P,j,h,E,F),y.el=Qe.el}if(ge&&_e(ge,E),!Ze&&(G=Y&&Y.onVnodeMounted)){const Qe=y;_e(()=>Xe(G,ce,Qe),E)}(y.shapeFlag&256||ce&&gs(ce.vnode)&&ce.vnode.shapeFlag&256)&&h.a&&_e(h.a,E),h.isMounted=!0,y=P=j=null}};h.scope.on();const U=h.effect=new Qi(H);h.scope.off();const M=h.update=U.run.bind(U),Q=h.job=U.runIfDirty.bind(U);Q.i=h,Q.id=h.uid,U.scheduler=()=>gr(Q),Pt(h,!0),M()},de=(h,y,P)=>{y.component=h;const j=h.vnode.props;h.vnode=y,h.next=null,za(h,y.props,j,P),Wa(h,y.children,P),mt(),Br(h),bt()},fe=(h,y,P,j,E,F,z,H,U=!1)=>{const M=h&&h.children,Q=h?h.shapeFlag:0,G=y.children,{patchFlag:J,shapeFlag:Y}=y;if(J>0){if(J&128){Rs(M,G,P,j,E,F,z,H,U);return}else if(J&256){Ct(M,G,P,j,E,F,z,H,U);return}}Y&8?(Q&16&&Xt(M,E,F),G!==M&&c(P,G)):Q&16?Y&16?Rs(M,G,P,j,E,F,z,H,U):Xt(M,E,F,!0):(Q&8&&c(P,""),Y&16&&D(G,P,j,E,F,z,H,U))},Ct=(h,y,P,j,E,F,z,H,U)=>{h=h||zt,y=y||zt;const M=h.length,Q=y.length,G=Math.min(M,Q);let J;for(J=0;J<G;J++){const Y=y[J]=U?ct(y[J]):nt(y[J]);$(h[J],Y,P,null,E,F,z,H,U)}M>Q?Xt(h,E,F,!0,!1,G):D(y,P,j,E,F,z,H,U,G)},Rs=(h,y,P,j,E,F,z,H,U)=>{let M=0;const Q=y.length;let G=h.length-1,J=Q-1;for(;M<=G&&M<=J;){const Y=h[M],se=y[M]=U?ct(y[M]):nt(y[M]);if(Lt(Y,se))$(Y,se,P,null,E,F,z,H,U);else break;M++}for(;M<=G&&M<=J;){const Y=h[G],se=y[J]=U?ct(y[J]):nt(y[J]);if(Lt(Y,se))$(Y,se,P,null,E,F,z,H,U);else break;G--,J--}if(M>G){if(M<=J){const Y=J+1,se=Y<Q?y[Y].el:j;for(;M<=J;)$(null,y[M]=U?ct(y[M]):nt(y[M]),P,se,E,F,z,H,U),M++}}else if(M>J)for(;M<=G;)Je(h[M],E,F,!0),M++;else{const Y=M,se=M,ge=new Map;for(M=se;M<=J;M++){const Ne=y[M]=U?ct(y[M]):nt(y[M]);Ne.key!=null&&ge.set(Ne.key,M)}let ce,Ee=0;const Fe=J-se+1;let Ze=!1,Qe=0;const ts=new Array(Fe);for(M=0;M<Fe;M++)ts[M]=0;for(M=Y;M<=G;M++){const Ne=h[M];if(Ee>=Fe){Je(Ne,E,F,!0);continue}let Ye;if(Ne.key!=null)Ye=ge.get(Ne.key);else for(ce=se;ce<=J;ce++)if(ts[ce-se]===0&&Lt(Ne,y[ce])){Ye=ce;break}Ye===void 0?Je(Ne,E,F,!0):(ts[Ye-se]=M+1,Ye>=Qe?Qe=Ye:Ze=!0,$(Ne,y[Ye],P,null,E,F,z,H,U),Ee++)}const Lr=Ze?Ya(ts):zt;for(ce=Lr.length-1,M=Fe-1;M>=0;M--){const Ne=se+M,Ye=y[Ne],Er=y[Ne+1],Fr=Ne+1<Q?Er.el||qo(Er):j;ts[M]===0?$(null,Ye,P,Fr,E,F,z,H,U):Ze&&(ce<0||M!==Lr[ce]?It(Ye,P,Fr,2):ce--)}}},It=(h,y,P,j,E=null)=>{const{el:F,type:z,transition:H,children:U,shapeFlag:M}=h;if(M&6){It(h.component.subTree,y,P,j);return}if(M&128){h.suspense.move(y,P,j);return}if(M&64){z.move(h,y,P,es);return}if(z===te){n(F,y,P);for(let G=0;G<U.length;G++)It(U[G],y,P,j);n(h.anchor,y,P);return}if(z===Rn){N(h,y,P);return}if(j!==2&&M&1&&H)if(j===0)H.beforeEnter(F),n(F,y,P),_e(()=>H.enter(F),E);else{const{leave:G,delayLeave:J,afterLeave:Y}=H,se=()=>{h.ctx.isUnmounted?r(F):n(F,y,P)},ge=()=>{F._isLeaving&&F[st](!0),G(F,()=>{se(),Y&&Y()})};J?J(F,se,ge):ge()}else n(F,y,P)},Je=(h,y,P,j=!1,E=!1)=>{const{type:F,props:z,ref:H,children:U,dynamicChildren:M,shapeFlag:Q,patchFlag:G,dirs:J,cacheIndex:Y}=h;if(G===-2&&(E=!1),H!=null&&(mt(),fs(H,null,P,h,!0),bt()),Y!=null&&(y.renderCache[Y]=void 0),Q&256){y.ctx.deactivate(h);return}const se=Q&1&&J,ge=!gs(h);let ce;if(ge&&(ce=z&&z.onVnodeBeforeUnmount)&&Xe(ce,y,h),Q&6)hl(h.component,P,j);else{if(Q&128){h.suspense.unmount(P,j);return}se&&Tt(h,null,y,"beforeUnmount"),Q&64?h.type.remove(h,y,P,es,j):M&&!M.hasOnce&&(F!==te||G>0&&G&64)?Xt(M,y,P,!1,!0):(F===te&&G&384||!E&&Q&16)&&Xt(U,y,P),j&&Ar(h)}(ge&&(ce=z&&z.onVnodeUnmounted)||se)&&_e(()=>{ce&&Xe(ce,y,h),se&&Tt(h,null,y,"unmounted")},P)},Ar=h=>{const{type:y,el:P,anchor:j,transition:E}=h;if(y===te){gl(P,j);return}if(y===Rn){B(h);return}const F=()=>{r(P),E&&!E.persisted&&E.afterLeave&&E.afterLeave()};if(h.shapeFlag&1&&E&&!E.persisted){const{leave:z,delayLeave:H}=E,U=()=>z(P,F);H?H(h.el,F,U):U()}else F()},gl=(h,y)=>{let P;for(;h!==y;)P=b(h),r(h),h=P;r(y)},hl=(h,y,P)=>{const{bum:j,scope:E,job:F,subTree:z,um:H,m:U,a:M}=h;Xr(U),Xr(M),j&&js(j),E.stop(),F&&(F.flags|=8,Je(z,h,y,P)),H&&_e(H,y),_e(()=>{h.isUnmounted=!0},y)},Xt=(h,y,P,j=!1,E=!1,F=0)=>{for(let z=F;z<h.length;z++)Je(h[z],y,P,j,E)},As=h=>{if(h.shapeFlag&6)return As(h.component.subTree);if(h.shapeFlag&128)return h.suspense.next();const y=b(h.anchor||h.el),P=y&&y[vo];return P?b(P):y};let wn=!1;const Dr=(h,y,P)=>{let j;h==null?y._vnode&&(Je(y._vnode,null,null,!0),j=y._vnode.component):$(y._vnode||null,h,y,null,null,null,P),y._vnode=h,wn||(wn=!0,Br(j),ho(),wn=!1)},es={p:$,um:Je,m:It,r:Ar,mt:L,mc:D,pc:fe,pbc:K,n:As,o:e};return{render:Dr,hydrate:void 0,createApp:Ma(Dr)}}function Pn({type:e,props:t},s){return s==="svg"&&e==="foreignObject"||s==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:s}function Pt({effect:e,job:t},s){s?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function Qa(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function yr(e,t,s=!1){const n=e.children,r=t.children;if(W(n)&&W(r))for(let i=0;i<n.length;i++){const o=n[i];let l=r[i];l.shapeFlag&1&&!l.dynamicChildren&&((l.patchFlag<=0||l.patchFlag===32)&&(l=r[i]=ct(r[i]),l.el=o.el),!s&&l.patchFlag!==-2&&yr(o,l)),l.type===mn&&(l.patchFlag===-1&&(l=r[i]=ct(l)),l.el=o.el),l.type===Ae&&!l.el&&(l.el=o.el)}}function Ya(e){const t=e.slice(),s=[0];let n,r,i,o,l;const a=e.length;for(n=0;n<a;n++){const p=e[n];if(p!==0){if(r=s[s.length-1],e[r]<p){t[n]=r,s.push(n);continue}for(i=0,o=s.length-1;i<o;)l=i+o>>1,e[s[l]]<p?i=l+1:o=l;p<e[s[i]]&&(i>0&&(t[n]=s[i-1]),s[i]=n)}}for(i=s.length,o=s[i-1];i-- >0;)s[i]=o,o=t[o];return s}function zo(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:zo(t)}function Xr(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}function qo(e){if(e.placeholder)return e.placeholder;const t=e.component;return t?qo(t.subTree):null}const Go=e=>e.__isSuspense;function Xa(e,t){t&&t.pendingBranch?W(e)?t.effects.push(...e):t.effects.push(e):la(e)}const te=Symbol.for("v-fgt"),mn=Symbol.for("v-txt"),Ae=Symbol.for("v-cmt"),Rn=Symbol.for("v-stc"),ms=[];let Be=null;function v(e=!1){ms.push(Be=e?null:[])}function eu(){ms.pop(),Be=ms[ms.length-1]||null}let ws=1;function Js(e,t=!1){ws+=e,e<0&&Be&&t&&(Be.hasOnce=!0)}function Ko(e){return e.dynamicChildren=ws>0?Be||zt:null,eu(),ws>0&&Be&&Be.push(e),e}function k(e,t,s,n,r,i){return Ko(u(e,t,s,n,r,i,!0))}function ft(e,t,s,n,r){return Ko(be(e,t,s,n,r,!0))}function Zs(e){return e?e.__v_isVNode===!0:!1}function Lt(e,t){return e.type===t.type&&e.key===t.key}const Wo=({key:e})=>e??null,Bs=({ref:e,ref_key:t,ref_for:s})=>(typeof e=="number"&&(e=""+e),e!=null?ye(e)||Se(e)||X(e)?{i:He,r:e,k:t,f:!!s}:e:null);function u(e,t=null,s=null,n=0,r=null,i=e===te?0:1,o=!1,l=!1){const a={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Wo(t),ref:t&&Bs(t),scopeId:bo,slotScopeIds:null,children:s,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:i,patchFlag:n,dynamicProps:r,dynamicChildren:null,appContext:null,ctx:He};return l?(vr(a,s),i&128&&e.normalize(a)):s&&(a.shapeFlag|=ye(s)?8:16),ws>0&&!o&&Be&&(a.patchFlag>0||i&6)&&a.patchFlag!==32&&Be.push(a),a}const be=tu;function tu(e,t=null,s=null,n=0,r=null,i=!1){if((!e||e===Ta)&&(e=Ae),Zs(e)){const l=_t(e,t,!0);return s&&vr(l,s),ws>0&&!i&&Be&&(l.shapeFlag&6?Be[Be.indexOf(e)]=l:Be.push(l)),l.patchFlag=-2,l}if(du(e)&&(e=e.__vccOpts),t){t=su(t);let{class:l,style:a}=t;l&&!ye(l)&&(t.class=ee(l)),ue(a)&&(pr(a)&&!W(a)&&(a=ke({},a)),t.style=ir(a))}const o=ye(e)?1:Go(e)?128:xo(e)?64:ue(e)?4:X(e)?2:0;return u(e,t,s,n,r,o,i,!0)}function su(e){return e?pr(e)||Oo(e)?ke({},e):e:null}function _t(e,t,s=!1,n=!1){const{props:r,ref:i,patchFlag:o,children:l,transition:a}=e,p=t?nu(r||{},t):r,c={__v_isVNode:!0,__v_skip:!0,type:e.type,props:p,key:p&&Wo(p),ref:t&&t.ref?s&&i?W(i)?i.concat(Bs(t)):[i,Bs(t)]:Bs(t):i,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:l,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==te?o===-1?16:o|16:o,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:a,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&_t(e.ssContent),ssFallback:e.ssFallback&&_t(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return a&&n&&xs(c,a.clone(c)),c}function pe(e=" ",t=0){return be(mn,null,e,t)}function q(e="",t=!1){return t?(v(),ft(Ae,null,e)):be(Ae,null,e)}function nt(e){return e==null||typeof e=="boolean"?be(Ae):W(e)?be(te,null,e.slice()):Zs(e)?ct(e):be(mn,null,String(e))}function ct(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:_t(e)}function vr(e,t){let s=0;const{shapeFlag:n}=e;if(t==null)t=null;else if(W(t))s=16;else if(typeof t=="object")if(n&65){const r=t.default;r&&(r._c&&(r._d=!1),vr(e,r()),r._c&&(r._d=!0));return}else{s=32;const r=t._;!r&&!Oo(t)?t._ctx=He:r===3&&He&&(He.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else X(t)?(t={default:t,_ctx:He},s=32):(t=String(t),n&64?(s=16,t=[pe(t)]):s=8);e.children=t,e.shapeFlag|=s}function nu(...e){const t={};for(let s=0;s<e.length;s++){const n=e[s];for(const r in n)if(r==="class")t.class!==n.class&&(t.class=ee([t.class,n.class]));else if(r==="style")t.style=ir([t.style,n.style]);else if(nn(r)){const i=t[r],o=n[r];o&&i!==o&&!(W(i)&&i.includes(o))&&(t[r]=i?[].concat(i,o):o)}else r!==""&&(t[r]=n[r])}return t}function Xe(e,t,s,n=null){We(e,t,7,[s,n])}const ru=Do();let iu=0;function ou(e,t,s){const n=e.type,r=(t?t.appContext:e.appContext)||ru,i={uid:iu++,vnode:e,type:n,parent:t,appContext:r,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new Tl(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(r.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:Bo(n,r),emitsOptions:Eo(n,r),emit:null,emitted:null,propsDefaults:oe,inheritAttrs:n.inheritAttrs,ctx:oe,data:oe,props:oe,attrs:oe,slots:oe,refs:oe,setupState:oe,setupContext:null,suspense:s,suspenseId:s?s.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return i.ctx={_:i},i.root=t?t.root:i,i.emit=ja.bind(null,i),e.ce&&e.ce(i),i}let De=null;const xr=()=>De||He;let Qs,Jn;{const e=ln(),t=(s,n)=>{let r;return(r=e[s])||(r=e[s]=[]),r.push(n),i=>{r.length>1?r.forEach(o=>o(i)):r[0](i)}};Qs=t("__VUE_INSTANCE_SETTERS__",s=>De=s),Jn=t("__VUE_SSR_SETTERS__",s=>ks=s)}const Is=e=>{const t=De;return Qs(e),e.scope.on(),()=>{e.scope.off(),Qs(t)}},ei=()=>{De&&De.scope.off(),Qs(null)};function Jo(e){return e.vnode.shapeFlag&4}let ks=!1;function lu(e,t=!1,s=!1){t&&Jn(t);const{props:n,children:r}=e.vnode,i=Jo(e);Va(e,n,i,t),Ka(e,r,s||t);const o=i?au(e,t):void 0;return t&&Jn(!1),o}function au(e,t){const s=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Pa);const{setup:n}=s;if(n){mt();const r=e.setupContext=n.length>1?cu(e):null,i=Is(e),o=Cs(n,e,0,[e.props,r]),l=Vi(o);if(bt(),i(),(l||e.sp)&&!gs(e)&&Io(e),l){if(o.then(ei,ei),t)return o.then(a=>{ti(e,a)}).catch(a=>{dn(a,e,0)});e.asyncDep=o}else ti(e,o)}else Zo(e)}function ti(e,t,s){X(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:ue(t)&&(e.setupState=po(t)),Zo(e)}function Zo(e,t,s){const n=e.type;e.render||(e.render=n.render||rt);{const r=Is(e);mt();try{Ra(e)}finally{bt(),r()}}}const uu={get(e,t){return Ce(e,"get",""),e[t]}};function cu(e){const t=s=>{e.exposed=s||{}};return{attrs:new Proxy(e.attrs,uu),slots:e.slots,emit:e.emit,expose:t}}function bn(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(po(Jl(e.exposed)),{get(t,s){if(s in t)return t[s];if(s in hs)return hs[s](e)},has(t,s){return s in t||s in hs}})):e.proxy}function du(e){return X(e)&&"__vccOpts"in e}const we=(e,t)=>sa(e,t,ks);function pu(e,t,s){try{Js(-1);const n=arguments.length;return n===2?ue(t)&&!W(t)?Zs(t)?be(e,null,[t]):be(e,t):be(e,null,t):(n>3?s=Array.prototype.slice.call(arguments,2):n===3&&Zs(s)&&(s=[s]),be(e,t,s))}finally{Js(1)}}const fu="3.5.29";let Zn;const si=typeof window<"u"&&window.trustedTypes;if(si)try{Zn=si.createPolicy("vue",{createHTML:e=>e})}catch{}const Qo=Zn?e=>Zn.createHTML(e):e=>e,gu="http://www.w3.org/2000/svg",hu="http://www.w3.org/1998/Math/MathML",ut=typeof document<"u"?document:null,ni=ut&&ut.createElement("template"),mu={insert:(e,t,s)=>{t.insertBefore(e,s||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,s,n)=>{const r=t==="svg"?ut.createElementNS(gu,e):t==="mathml"?ut.createElementNS(hu,e):s?ut.createElement(e,{is:s}):ut.createElement(e);return e==="select"&&n&&n.multiple!=null&&r.setAttribute("multiple",n.multiple),r},createText:e=>ut.createTextNode(e),createComment:e=>ut.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>ut.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,s,n,r,i){const o=s?s.previousSibling:t.lastChild;if(r&&(r===i||r.nextSibling))for(;t.insertBefore(r.cloneNode(!0),s),!(r===i||!(r=r.nextSibling)););else{ni.innerHTML=Qo(n==="svg"?`<svg>${e}</svg>`:n==="mathml"?`<math>${e}</math>`:e);const l=ni.content;if(n==="svg"||n==="mathml"){const a=l.firstChild;for(;a.firstChild;)l.appendChild(a.firstChild);l.removeChild(a)}t.insertBefore(l,s)}return[o?o.nextSibling:t.firstChild,s?s.previousSibling:t.lastChild]}},wt="transition",rs="animation",$s=Symbol("_vtc"),Yo={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},bu=ke({},ko,Yo),yu=e=>(e.displayName="Transition",e.props=bu,e),wr=yu((e,{slots:t})=>pu(ba,vu(e),t)),Rt=(e,t=[])=>{W(e)?e.forEach(s=>s(...t)):e&&e(...t)},ri=e=>e?W(e)?e.some(t=>t.length>1):e.length>1:!1;function vu(e){const t={};for(const T in e)T in Yo||(t[T]=e[T]);if(e.css===!1)return t;const{name:s="v",type:n,duration:r,enterFromClass:i=`${s}-enter-from`,enterActiveClass:o=`${s}-enter-active`,enterToClass:l=`${s}-enter-to`,appearFromClass:a=i,appearActiveClass:p=o,appearToClass:c=l,leaveFromClass:d=`${s}-leave-from`,leaveActiveClass:b=`${s}-leave-active`,leaveToClass:x=`${s}-leave-to`}=e,m=xu(r),$=m&&m[0],A=m&&m[1],{onBeforeEnter:R,onEnter:I,onEnterCancelled:N,onLeave:B,onLeaveCancelled:C,onBeforeAppear:w=R,onAppear:_=I,onAppearCancelled:D=N}=t,S=(T,O,L,$e)=>{T._enterCancelled=$e,At(T,O?c:l),At(T,O?p:o),L&&L()},K=(T,O)=>{T._isLeaving=!1,At(T,d),At(T,x),At(T,b),O&&O()},Z=T=>(O,L)=>{const $e=T?_:I,ve=()=>S(O,T,L);Rt($e,[O,ve]),ii(()=>{At(O,T?a:i),at(O,T?c:l),ri($e)||oi(O,n,$,ve)})};return ke(t,{onBeforeEnter(T){Rt(R,[T]),at(T,i),at(T,o)},onBeforeAppear(T){Rt(w,[T]),at(T,a),at(T,p)},onEnter:Z(!1),onAppear:Z(!0),onLeave(T,O){T._isLeaving=!0;const L=()=>K(T,O);at(T,d),T._enterCancelled?(at(T,b),ui(T)):(ui(T),at(T,b)),ii(()=>{T._isLeaving&&(At(T,d),at(T,x),ri(B)||oi(T,n,A,L))}),Rt(B,[T,L])},onEnterCancelled(T){S(T,!1,void 0,!0),Rt(N,[T])},onAppearCancelled(T){S(T,!0,void 0,!0),Rt(D,[T])},onLeaveCancelled(T){K(T),Rt(C,[T])}})}function xu(e){if(e==null)return null;if(ue(e))return[An(e.enter),An(e.leave)];{const t=An(e);return[t,t]}}function An(e){return xl(e)}function at(e,t){t.split(/\s+/).forEach(s=>s&&e.classList.add(s)),(e[$s]||(e[$s]=new Set)).add(t)}function At(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.remove(n));const s=e[$s];s&&(s.delete(t),s.size||(e[$s]=void 0))}function ii(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let wu=0;function oi(e,t,s,n){const r=e._endId=++wu,i=()=>{r===e._endId&&n()};if(s!=null)return setTimeout(i,s);const{type:o,timeout:l,propCount:a}=ku(e,t);if(!o)return n();const p=o+"end";let c=0;const d=()=>{e.removeEventListener(p,b),i()},b=x=>{x.target===e&&++c>=a&&d()};setTimeout(()=>{c<a&&d()},l+1),e.addEventListener(p,b)}function ku(e,t){const s=window.getComputedStyle(e),n=m=>(s[m]||"").split(", "),r=n(`${wt}Delay`),i=n(`${wt}Duration`),o=li(r,i),l=n(`${rs}Delay`),a=n(`${rs}Duration`),p=li(l,a);let c=null,d=0,b=0;t===wt?o>0&&(c=wt,d=o,b=i.length):t===rs?p>0&&(c=rs,d=p,b=a.length):(d=Math.max(o,p),c=d>0?o>p?wt:rs:null,b=c?c===wt?i.length:a.length:0);const x=c===wt&&/\b(?:transform|all)(?:,|$)/.test(n(`${wt}Property`).toString());return{type:c,timeout:d,propCount:b,hasTransform:x}}function li(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((s,n)=>ai(s)+ai(e[n])))}function ai(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function ui(e){return(e?e.ownerDocument:document).body.offsetHeight}function $u(e,t,s){const n=e[$s];n&&(t=(t?[t,...n]:[...n]).join(" ")),t==null?e.removeAttribute("class"):s?e.setAttribute("class",t):e.className=t}const ci=Symbol("_vod"),Su=Symbol("_vsh"),_u=Symbol(""),Cu=/(?:^|;)\s*display\s*:/;function Iu(e,t,s){const n=e.style,r=ye(s);let i=!1;if(s&&!r){if(t)if(ye(t))for(const o of t.split(";")){const l=o.slice(0,o.indexOf(":")).trim();s[l]==null&&Us(n,l,"")}else for(const o in t)s[o]==null&&Us(n,o,"");for(const o in s)o==="display"&&(i=!0),Us(n,o,s[o])}else if(r){if(t!==s){const o=n[_u];o&&(s+=";"+o),n.cssText=s,i=Cu.test(s)}}else t&&e.removeAttribute("style");ci in e&&(e[ci]=i?n.display:"",e[Su]&&(n.display="none"))}const di=/\s*!important$/;function Us(e,t,s){if(W(s))s.forEach(n=>Us(e,t,n));else if(s==null&&(s=""),t.startsWith("--"))e.setProperty(t,s);else{const n=Tu(e,t);di.test(s)?e.setProperty(vt(n),s.replace(di,""),"important"):e[n]=s}}const pi=["Webkit","Moz","ms"],Dn={};function Tu(e,t){const s=Dn[t];if(s)return s;let n=ht(t);if(n!=="filter"&&n in e)return Dn[t]=n;n=Gi(n);for(let r=0;r<pi.length;r++){const i=pi[r]+n;if(i in e)return Dn[t]=i}return t}const fi="http://www.w3.org/1999/xlink";function gi(e,t,s,n,r,i=Cl(t)){n&&t.startsWith("xlink:")?s==null?e.removeAttributeNS(fi,t.slice(6,t.length)):e.setAttributeNS(fi,t,s):s==null||i&&!Wi(s)?e.removeAttribute(t):e.setAttribute(t,i?"":it(s)?String(s):s)}function hi(e,t,s,n,r){if(t==="innerHTML"||t==="textContent"){s!=null&&(e[t]=t==="innerHTML"?Qo(s):s);return}const i=e.tagName;if(t==="value"&&i!=="PROGRESS"&&!i.includes("-")){const l=i==="OPTION"?e.getAttribute("value")||"":e.value,a=s==null?e.type==="checkbox"?"on":"":String(s);(l!==a||!("_value"in e))&&(e.value=a),s==null&&e.removeAttribute(t),e._value=s;return}let o=!1;if(s===""||s==null){const l=typeof e[t];l==="boolean"?s=Wi(s):s==null&&l==="string"?(s="",o=!0):l==="number"&&(s=0,o=!0)}try{e[t]=s}catch{}o&&e.removeAttribute(r||t)}function St(e,t,s,n){e.addEventListener(t,s,n)}function Pu(e,t,s,n){e.removeEventListener(t,s,n)}const mi=Symbol("_vei");function Ru(e,t,s,n,r=null){const i=e[mi]||(e[mi]={}),o=i[t];if(n&&o)o.value=n;else{const[l,a]=Au(t);if(n){const p=i[t]=Eu(n,r);St(e,l,p,a)}else o&&(Pu(e,l,o,a),i[t]=void 0)}}const bi=/(?:Once|Passive|Capture)$/;function Au(e){let t;if(bi.test(e)){t={};let n;for(;n=e.match(bi);)e=e.slice(0,e.length-n[0].length),t[n[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):vt(e.slice(2)),t]}let Ln=0;const Du=Promise.resolve(),Lu=()=>Ln||(Du.then(()=>Ln=0),Ln=Date.now());function Eu(e,t){const s=n=>{if(!n._vts)n._vts=Date.now();else if(n._vts<=s.attached)return;We(Fu(n,s.value),t,5,[n])};return s.value=e,s.attached=Lu(),s}function Fu(e,t){if(W(t)){const s=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{s.call(e),e._stopped=!0},t.map(n=>r=>!r._stopped&&n&&n(r))}else return t}const yi=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Mu=(e,t,s,n,r,i)=>{const o=r==="svg";t==="class"?$u(e,n,o):t==="style"?Iu(e,s,n):nn(t)?sr(t)||Ru(e,t,s,n,i):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):ju(e,t,n,o))?(hi(e,t,n),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&gi(e,t,n,o,i,t!=="value")):e._isVueCE&&(/[A-Z]/.test(t)||!ye(n))?hi(e,ht(t),n,i,t):(t==="true-value"?e._trueValue=n:t==="false-value"&&(e._falseValue=n),gi(e,t,n,o))};function ju(e,t,s,n){if(n)return!!(t==="innerHTML"||t==="textContent"||t in e&&yi(t)&&X(s));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="sandbox"&&e.tagName==="IFRAME"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const r=e.tagName;if(r==="IMG"||r==="VIDEO"||r==="CANVAS"||r==="SOURCE")return!1}return yi(t)&&ye(s)?!1:t in e}const Jt=e=>{const t=e.props["onUpdate:modelValue"]||!1;return W(t)?s=>js(t,s):t};function Ou(e){e.target.composing=!0}function vi(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const gt=Symbol("_assign");function xi(e,t,s){return t&&(e=e.trim()),s&&(e=on(e)),e}const xe={created(e,{modifiers:{lazy:t,trim:s,number:n}},r){e[gt]=Jt(r);const i=n||r.props&&r.props.type==="number";St(e,t?"change":"input",o=>{o.target.composing||e[gt](xi(e.value,s,i))}),(s||i)&&St(e,"change",()=>{e.value=xi(e.value,s,i)}),t||(St(e,"compositionstart",Ou),St(e,"compositionend",vi),St(e,"change",vi))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:s,modifiers:{lazy:n,trim:r,number:i}},o){if(e[gt]=Jt(o),e.composing)return;const l=(i||e.type==="number")&&!/^0\d/.test(e.value)?on(e.value):e.value,a=t??"";l!==a&&(document.activeElement===e&&e.type!=="range"&&(n&&t===s||r&&e.value.trim()===a)||(e.value=a))}},Ys={deep:!0,created(e,t,s){e[gt]=Jt(s),St(e,"change",()=>{const n=e._modelValue,r=Ss(e),i=e.checked,o=e[gt];if(W(n)){const l=or(n,r),a=l!==-1;if(i&&!a)o(n.concat(r));else if(!i&&a){const p=[...n];p.splice(l,1),o(p)}}else if(Zt(n)){const l=new Set(n);i?l.add(r):l.delete(r),o(l)}else o(Xo(e,i))})},mounted:wi,beforeUpdate(e,t,s){e[gt]=Jt(s),wi(e,t,s)}};function wi(e,{value:t,oldValue:s},n){e._modelValue=t;let r;if(W(t))r=or(t,n.props.value)>-1;else if(Zt(t))r=t.has(n.props.value);else{if(t===s)return;r=Qt(t,Xo(e,!0))}e.checked!==r&&(e.checked=r)}const Nu={deep:!0,created(e,{value:t,modifiers:{number:s}},n){const r=Zt(t);St(e,"change",()=>{const i=Array.prototype.filter.call(e.options,o=>o.selected).map(o=>s?on(Ss(o)):Ss(o));e[gt](e.multiple?r?new Set(i):i:i[0]),e._assigning=!0,fr(()=>{e._assigning=!1})}),e[gt]=Jt(n)},mounted(e,{value:t}){ki(e,t)},beforeUpdate(e,t,s){e[gt]=Jt(s)},updated(e,{value:t}){e._assigning||ki(e,t)}};function ki(e,t){const s=e.multiple,n=W(t);if(!(s&&!n&&!Zt(t))){for(let r=0,i=e.options.length;r<i;r++){const o=e.options[r],l=Ss(o);if(s)if(n){const a=typeof l;a==="string"||a==="number"?o.selected=t.some(p=>String(p)===String(l)):o.selected=or(t,l)>-1}else o.selected=t.has(l);else if(Qt(Ss(o),t)){e.selectedIndex!==r&&(e.selectedIndex=r);return}}!s&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function Ss(e){return"_value"in e?e._value:e.value}function Xo(e,t){const s=t?"_trueValue":"_falseValue";return s in e?e[s]:t}const Bu=["ctrl","shift","alt","meta"],Uu={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>Bu.some(s=>e[`${s}Key`]&&!t.includes(s))},$i=(e,t)=>{if(!e)return e;const s=e._withMods||(e._withMods={}),n=t.join(".");return s[n]||(s[n]=((r,...i)=>{for(let o=0;o<t.length;o++){const l=Uu[t[o]];if(l&&l(r,t))return}return e(r,...i)}))},Hu={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},Vu=(e,t)=>{const s=e._withKeys||(e._withKeys={}),n=t.join(".");return s[n]||(s[n]=(r=>{if(!("key"in r))return;const i=vt(r.key);if(t.some(o=>o===i||Hu[o]===i))return e(r)}))},zu=ke({patchProp:Mu},mu);let Si;function qu(){return Si||(Si=Ja(zu))}const _i=((...e)=>{const t=qu().createApp(...e),{mount:s}=t;return t.mount=n=>{const r=Ku(n);if(!r)return;const i=t._component;!X(i)&&!i.render&&!i.template&&(i.template=r.innerHTML),r.nodeType===1&&(r.textContent="");const o=s(r,!1,Gu(r));return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),o},t});function Gu(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function Ku(e){return ye(e)?document.querySelector(e):e}async function Oe(e,t){const s=await fetch(e,t);if(!s.ok){const n=await s.json().catch(()=>({}));throw new Error(n.error||`HTTP ${s.status}`)}return s.json()}async function ot(e,t){return Oe(e,{method:"POST",headers:t?{"Content-Type":"application/json"}:void 0,body:t?JSON.stringify(t):void 0})}async function Wu(){return Oe("/api/issues")}async function Qn(e){return Oe(`/api/issues/${e}`)}async function Ju(e){return Oe(`/api/issues/${e}/logs`)}async function Zu(){return Oe("/api/system/status")}async function Qu(e){await ot(`/api/issues/${e}/retry`)}async function Yu(e){await ot(`/api/issues/${e}/cancel`)}async function Xu(e){await ot(`/api/issues/${e}/restart`)}async function Ci(e,t){await ot(`/api/issues/${e}/retry-from-phase`,{phase:t})}async function ec(e){await ot(`/api/issues/${e}/approve-plan`)}async function tc(e,t){await ot(`/api/issues/${e}/reject-plan`,{feedback:t})}async function sc(e){await ot(`/api/issues/${e}/skip-review`)}async function nc(e){return Oe(`/api/issues/${e}/review-history`)}async function Ii(e,t,s="html"){const n=s==="html"?`/api/issues/${e}/plans/${t}?format=html`:`/api/issues/${e}/plans/${t}`,r=await fetch(n);if(!r.ok){const i=await r.json().catch(()=>({}));throw new Error(i.error||"Failed to load")}return r.text()}async function rc(e,t,s){await Oe(`/api/issues/${e}/plans/${t}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:s})})}async function ic(e){return Oe(`/api/issues/${e}/supplement`)}async function oc(e,t){return Oe(`/api/issues/${e}/supplement`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)})}async function lc(e){const t=new URLSearchParams;return e.search&&t.set("search",e.search),t.set("page",String(e.page??1)),t.set("per_page",String(e.perPage)),Oe(`/api/gongfeng/issues?${t.toString()}`)}async function ac(e){return ot("/api/issues/start",e)}async function uc(e,t){return Oe(`/api/issues/${e}/note-sync`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({enabled:t})})}async function cc(e){return Oe("/api/system/note-sync",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({enabled:e})})}async function dc(e,t){return Oe(`/api/issues/${e}/e2e`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({enabled:t})})}async function pc(e){return ot("/api/brainstorm/sessions",{transcript:e})}async function fc(e){return Oe(`/api/brainstorm/sessions/${e}`)}function En(e,t,s){const n=new AbortController,r=`/api/brainstorm/sessions/${e}/${t}`;return{fetchResponse:fetch(r,{method:"POST",headers:{"Content-Type":"application/json"},body:s?JSON.stringify(s):"{}",signal:n.signal}),abort:()=>n.abort()}}async function gc(e,t,s=!0){return ot(`/api/brainstorm/sessions/${e}/create-issue`,{title:t,addAutoFinishLabel:s})}const hc={"app.trackedIssues":"已跟踪 Issue","app.browseIssues":"选择新 Issue","app.brainstorm":"脑暴工坊","header.connected":"已连接","header.disconnected":"未连接","header.discovery":"发现","header.drive":"驱动","header.uptime":"运行时间","header.syncOnTitle":"Issue 同步已开启(点击关闭)","header.syncOffTitle":"Issue 同步已关闭(点击开启)","header.syncOn":"Issue同步: 开","header.syncOff":"Issue同步: 关","header.langSwitch":"切换语言","stats.total":"总计","stats.active":"处理中","stats.completed":"已完成","stats.failed":"失败","table.filter":"筛选:","table.title":"标题","table.state":"状态","table.progress":"阶段进度","table.retries":"重试","table.updatedAt":"更新时间","table.actions":"操作","table.empty":"暂无 Issue 记录","table.viewInGongfeng":"在工蜂中查看","table.retry":"重试","table.restart":"重来","table.cancel":"取消","filter.all":"全部","filter.active":"处理中","filter.completed":"已完成","filter.failed":"失败","filter.review":"待审核","browse.searchPlaceholder":"搜索 Issue 标题...","browse.loading":"加载中...","browse.search":"搜索","browse.loadingList":"正在从工蜂加载 Issue 列表...","browse.title":"标题","browse.labels":"标签","browse.author":"作者","browse.createdAt":"创建时间","browse.actions":"操作","browse.empty":"暂无 Issue","browse.tracked":"已跟踪","browse.start":"开始处理","browse.pagination":"共 {total} 条,第 {page} / {totalPages} 页","browse.prevPage":"上一页","browse.nextPage":"下一页","start.title":"开始处理 Issue #{iid}","start.issueTitle":"标题","start.descPreview":"描述预览","start.supplement":"补充信息(可选)","start.requirements":"补充需求说明","start.requirementsPlaceholder":"对 Issue 描述的补充或澄清...","start.acceptance":"验收标准","start.acceptancePlaceholder":"完成后需要满足的验收标准...","start.scope":"变更范围","start.scopePlaceholder":"例: 仅后端、仅前端、前后端...","start.constraints":"约束条件","start.constraintsPlaceholder":"技术约束、兼容性要求等...","start.references":"参考链接","start.referencesPlaceholder":"相关文档、设计稿链接等...","start.freeText":"自由补充","start.freeTextPlaceholder":"其他任何需要 AI 知道的信息...","start.tapdId":"TAPD 单号","start.tapdIdPlaceholder":"如 12345678,用于 MR 关联 TAPD(可选)","start.cancel":"取消","start.processing":"处理中...","start.submit":"开始处理","detail.viewInGongfeng":"在工蜂中查看","detail.basicInfo":"基本信息","detail.title":"标题:","detail.branch":"分支:","detail.state":"状态:","detail.createdAt":"创建时间:","detail.retries":"重试次数:","detail.updatedAt":"更新时间:","detail.noteSync":"同步处理结果到 Issue","detail.enabled":"开启","detail.disabled":"关闭","detail.followSystem":"跟随系统","detail.e2eTitle":"E2E UI 自动验收","detail.mrLabel":"合并请求:","detail.errorInfo":"错误信息","detail.retry":"重试处理","detail.restart":"清理重来","detail.cancelTrack":"取消跟踪","pipeline.title":"流水线进度","pipeline.retryFrom":"从此重试","review.title":"Plan Review - 实施计划审核","review.description":"AI 已完成规划阶段,请审核实施计划后决定是否继续。","review.currentRound":"(当前为第 {round} 轮审核)","review.history":"审核历史","review.roundLabel":"{n} 轮","review.roundPrefix":"第 {round} 轮","review.approve":"通过计划","review.skip":"跳过审核","review.feedbackLabel":"审核反馈(拒绝时必填)","review.feedbackPlaceholder":"输入修改意见,AI 将根据反馈重新规划...","review.reject":"拒绝并重新规划","review.submitting":"处理中...","supplement.title":"补充信息","supplement.edit":"编辑","supplement.saving":"保存中...","supplement.save":"保存","supplement.cancel":"取消","supplement.loading":"加载中...","supplement.requirements":"补充需求:","supplement.acceptance":"验收标准:","supplement.scope":"变更范围:","supplement.constraints":"约束条件:","supplement.references":"参考链接:","supplement.freeText":"其他:","supplement.tapdId":"TAPD 单号:","supplement.empty":'暂无补充信息,点击"编辑"添加',"supplement.requirementsLabel":"补充需求说明","supplement.acceptanceLabel":"验收标准","supplement.scopeLabel":"变更范围","supplement.constraintsLabel":"约束条件","supplement.referencesLabel":"参考链接","supplement.freeTextLabel":"自由补充","supplement.tapdIdLabel":"TAPD 单号","supplement.tapdIdPlaceholder":"如 12345678,用于 MR 关联 TAPD(可选)","planDoc.title":"计划文档","planDoc.edit":"编辑","planDoc.saving":"保存中...","planDoc.save":"保存","planDoc.cancel":"取消","planDoc.fullscreen":"全屏查看","planDoc.expand":"展开","planDoc.loading":"加载中...","planDoc.editPlaceholder":"编辑文档内容...","planDoc.selectTab":"点击标签页查看文档","planDoc.closeFullscreen":"关闭全屏 (Esc)","planDoc.noReviewFeedback":"暂无审核反馈(计划未被拒绝过)","planDoc.verifyNotGenerated":"验证报告尚未生成","planDoc.fetchFailed":"获取原始文档失败:","planDoc.saveFailed":"保存失败:","agentLog.title":"Agent 实时输出","agentLog.autoScroll":"自动置顶","agentLog.clear":"清空","agentLog.ended":"任务已结束,无实时输出记录","agentLog.finalState":"最终状态:","agentLog.currentState":"当前状态:","agentLog.waiting":"等待 Agent 输出...","agentLog.count":"{count} 条记录","agentLog.type.assistant":"AI 回复","agentLog.type.tool_use":"工具调用","agentLog.type.tool_result":"工具结果","agentLog.type.result":"最终结果","agentLog.type.stderr":"日志","agentLog.type.raw":"输出","agentLog.type.system":"系统","agentLog.type.partial":"输出中","state.pending":"待处理","state.branch_created":"分支已创建","state.analyzing":"分析中","state.analysis_done":"分析完成","state.designing":"设计中","state.design_done":"设计完成","state.implementing":"实施中","state.implement_done":"实施完成","state.planning":"规划中","state.plan_done":"规划完成","state.waiting_for_review":"待审核","state.review_approved":"审核通过","state.building":"实施中","state.build_done":"实施完成","state.verifying":"验证中","state.completed":"已完成","state.failed":"失败","phase.analysis":"分析","phase.design":"设计","phase.implement":"实施","phase.verify":"验证","phase.plan":"规划","phase.review":"审核","phase.build":"实施","planFile.01-analysis.md":"需求分析","planFile.02-design.md":"系统设计","planFile.03-todolist.md":"实施清单","planFile.04-verify-report.md":"验证报告","planFile.01-plan.md":"实施计划","planFile.02-verify-report.md":"验证报告","planFile.review-feedback.md":"审核反馈","confirm.supplementSaved":"补充信息已保存。是否从分析阶段重新执行?","confirm.retry":"确定要重试 Issue #{iid} 吗?","confirm.cancel":"确定要取消跟踪 Issue #{iid} 吗?","confirm.restart":`确定要清理上下文并重来 Issue #{iid} 吗?
|
|
2
|
-
这将删除 worktree、分支,并将 issue 重置为待处理状态。`,"confirm.retryFromPhase":'确定要从"{phaseLabel}"阶段重试 Issue #{iid} 吗?',"confirm.approve":"确定要通过 Issue #{iid} 的实施计划吗?","confirm.reject.noFeedback":"请输入审核反馈","confirm.skip":"确定要跳过 Issue #{iid} 的审核吗?","alert.saveFailed":"保存失败: ","alert.retryFailed":"重试失败: ","alert.cancelFailed":"取消失败: ","alert.restartFailed":"重来失败: ","alert.retryFromPhaseFailed":"分阶段重试失败: ","alert.approveFailed":"审批失败: ","alert.rejectFailed":"拒绝失败: ","alert.skipFailed":"跳过失败: ","alert.startFailed":"启动失败: ","setup.title":"Issue Auto-Finish 初始化配置","setup.step.envCheck":"环境检查","setup.step.projectConfig":"项目配置","setup.step.gongfengConfig":"工蜂配置","setup.step.aiRunner":"AI Runner","setup.step.advancedOptions":"高级选项","setup.step.reviewConfirm":"确认配置","setup.complete.title":"配置完成","setup.complete.savedTo":"配置文件已保存到:","setup.complete.startHint":"使用以下命令启动服务:","setup.env.checking":"正在检查系统依赖...","setup.env.checkingShort":"检查中...","setup.env.install":"安装","setup.env.refresh":"刷新","setup.project.workDir":"项目工作目录 *","setup.project.workDirPlaceholder":"/path/to/your/project","setup.project.workDirHint":"项目代码所在的目录","setup.project.gitRootDir":"Git 根目录","setup.project.gitRootDirPlaceholder":"留空则使用工作目录","setup.project.gitRootDirHint":"Monorepo 场景: Git 仓库根目录","setup.project.baseBranch":"基础分支","setup.project.branchPrefix":"分支前缀","setup.project.worktreeBaseDir":"Worktree 基础目录","setup.project.projectSubDir":"项目子目录","setup.project.projectSubDirPlaceholder":"Monorepo: 从 Git 根到项目的相对路径","setup.gongfeng.apiUrl":"工蜂 API 地址 *","setup.gongfeng.privateToken":"私有令牌 *","setup.gongfeng.tokenPlaceholder":"输入你的私有令牌","setup.gongfeng.verify":"验证","setup.gongfeng.tokenValid":"Token 验证通过","setup.gongfeng.tokenInvalid":"Token 验证失败","setup.gongfeng.projectPath":"项目路径 *","setup.gongfeng.projectPathPlaceholder":"namespace/project","setup.gongfeng.repoFound":"仓库已找到","setup.gongfeng.repoNotFound":"仓库未找到","setup.ai.modeLabel":"AI Runner 模式","setup.ai.claudeInternal":"Claude Internal","setup.ai.claudeInternalDesc":"使用 claude-internal CLI","setup.ai.cursorAgent":"Cursor Agent","setup.ai.cursorAgentDesc":"使用 cursor agent CLI","setup.ai.codebuddy":"CodeBuddy","setup.ai.codebuddyDesc":"使用 codebuddy CLI","setup.ai.model":"AI 模型","setup.ai.cliStatus":"CLI 状态","setup.advanced.discoveryInterval":"发现间隔 (ms)","setup.advanced.driveInterval":"驱动间隔 (ms)","setup.advanced.maxRetries":"最大重试次数","setup.advanced.maxConcurrent":"最大并行 Issue 数","setup.advanced.webPort":"Web UI 端口","setup.advanced.pipelineMode":"流水线模式","setup.advanced.pipelineAuto":"自动","setup.advanced.pipelineClassic":"经典模式","setup.advanced.pipelinePlanMode":"计划模式","setup.advanced.enableReview":"启用审核关卡","setup.advanced.phaseTimeout":"阶段超时 (ms)","setup.advanced.phaseTimeoutHint":"默认: 1800000 (30分钟)","setup.confirm.reviewHint":"请确认将要生成的配置:","setup.nav.back":"上一步","setup.nav.next":"下一步","setup.nav.saving":"保存中...","setup.nav.complete":"完成配置","brainstorm.startRecording":"开始录音","brainstorm.stopRecording":"停止录音","brainstorm.voiceNotSupported":"当前浏览器不支持语音识别,请使用 Chrome 或 Edge,或直接输入文字","brainstorm.clear":"清空","brainstorm.recording":"录音中...","brainstorm.transcriptLabel":"想法描述","brainstorm.transcriptPlaceholder":"在这里输入或通过语音录入你的想法...乱的、不连贯的都没关系","brainstorm.startGenerate":"开始生成 SDD","brainstorm.step1":"倾倒想法","brainstorm.step2":"AI 精炼","brainstorm.step3":"创建 Issue","brainstorm.roundCount":"已完成 {count} 轮精炼","brainstorm.statusGenerating":"正在生成 SDD...","brainstorm.statusReviewing":"正在审查...","brainstorm.statusRefining":"正在精炼...","brainstorm.statusProcessing":"处理中...","brainstorm.abort":"中止","brainstorm.manualReview":"手动审查","brainstorm.manualRefine":"手动精炼","brainstorm.finishAndCreate":"完成并创建 Issue","brainstorm.sddTitle":"软件设计文档 (SDD)","brainstorm.sddEmpty":"SDD 尚未生成","brainstorm.questionsTitle":"审查问题","brainstorm.questionsEmpty":"尚未进行审查","brainstorm.roundHistory":"查看历史轮次","brainstorm.roundLabel":"第 {n} 轮","brainstorm.issueTitleLabel":"Issue 标题","brainstorm.issueTitlePlaceholder":"输入 Issue 标题(留空则自动从 SDD 提取)","brainstorm.addAutoFinishLabel":"添加 auto-finish 标签(系统将自动处理)","brainstorm.sddPreview":"SDD 预览","brainstorm.backToRefine":"返回精炼","brainstorm.createIssueOnly":"仅创建 Issue","brainstorm.createAndStart":"创建并启动处理","brainstorm.creating":"创建中...","brainstorm.issueCreated":"Issue 创建成功!","brainstorm.startNew":"开始新的脑暴"},mc={"app.trackedIssues":"Tracked Issues","app.browseIssues":"Browse Issues","app.brainstorm":"Brainstorm","header.connected":"Connected","header.disconnected":"Disconnected","header.discovery":"Discovery","header.drive":"Drive","header.uptime":"Uptime","header.syncOnTitle":"Issue sync is ON (click to disable)","header.syncOffTitle":"Issue sync is OFF (click to enable)","header.syncOn":"Sync: ON","header.syncOff":"Sync: OFF","header.langSwitch":"Switch Language","stats.total":"Total","stats.active":"Active","stats.completed":"Completed","stats.failed":"Failed","table.filter":"Filter:","table.title":"Title","table.state":"State","table.progress":"Phase Progress","table.retries":"Retries","table.updatedAt":"Updated","table.actions":"Actions","table.empty":"No issues tracked yet","table.viewInGongfeng":"View in Gongfeng","table.retry":"Retry","table.restart":"Restart","table.cancel":"Cancel","filter.all":"All","filter.active":"Active","filter.completed":"Completed","filter.failed":"Failed","filter.review":"In Review","browse.searchPlaceholder":"Search issue title...","browse.loading":"Loading...","browse.search":"Search","browse.loadingList":"Loading issues from Gongfeng...","browse.title":"Title","browse.labels":"Labels","browse.author":"Author","browse.createdAt":"Created","browse.actions":"Actions","browse.empty":"No issues found","browse.tracked":"Tracked","browse.start":"Start Processing","browse.pagination":"{total} total, page {page} / {totalPages}","browse.prevPage":"Previous","browse.nextPage":"Next","start.title":"Start Processing Issue #{iid}","start.issueTitle":"Title","start.descPreview":"Description Preview","start.supplement":"Supplement (Optional)","start.requirements":"Additional Requirements","start.requirementsPlaceholder":"Supplement or clarify the issue description...","start.acceptance":"Acceptance Criteria","start.acceptancePlaceholder":"Criteria to meet upon completion...","start.scope":"Change Scope","start.scopePlaceholder":"e.g. backend only, frontend only, full-stack...","start.constraints":"Constraints","start.constraintsPlaceholder":"Technical constraints, compatibility requirements...","start.references":"References","start.referencesPlaceholder":"Related docs, design mockup links...","start.freeText":"Additional Notes","start.freeTextPlaceholder":"Any other info for the AI...","start.tapdId":"TAPD ID","start.tapdIdPlaceholder":"e.g. 12345678, for MR TAPD association (optional)","start.cancel":"Cancel","start.processing":"Processing...","start.submit":"Start Processing","detail.viewInGongfeng":"View in Gongfeng","detail.basicInfo":"Basic Info","detail.title":"Title:","detail.branch":"Branch:","detail.state":"State:","detail.createdAt":"Created:","detail.retries":"Retries:","detail.updatedAt":"Updated:","detail.noteSync":"Sync results to Issue","detail.enabled":"On","detail.disabled":"Off","detail.followSystem":"Follow System","detail.e2eTitle":"E2E UI Auto-verification","detail.mrLabel":"Merge Request:","detail.errorInfo":"Error Info","detail.retry":"Retry","detail.restart":"Clean & Restart","detail.cancelTrack":"Untrack","pipeline.title":"Pipeline Progress","pipeline.retryFrom":"Retry from here","review.title":"Plan Review","review.description":"AI has completed the planning phase. Please review the implementation plan before proceeding.","review.currentRound":"(Currently round {round})","review.history":"Review History","review.roundLabel":"Round {n}","review.roundPrefix":"Round {round}","review.approve":"Approve Plan","review.skip":"Skip Review","review.feedbackLabel":"Review Feedback (required when rejecting)","review.feedbackPlaceholder":"Enter feedback, AI will re-plan based on it...","review.reject":"Reject & Re-plan","review.submitting":"Submitting...","supplement.title":"Supplement Info","supplement.edit":"Edit","supplement.saving":"Saving...","supplement.save":"Save","supplement.cancel":"Cancel","supplement.loading":"Loading...","supplement.requirements":"Requirements:","supplement.acceptance":"Acceptance:","supplement.scope":"Scope:","supplement.constraints":"Constraints:","supplement.references":"References:","supplement.freeText":"Other:","supplement.tapdId":"TAPD ID:","supplement.empty":'No supplement info. Click "Edit" to add.',"supplement.requirementsLabel":"Additional Requirements","supplement.acceptanceLabel":"Acceptance Criteria","supplement.scopeLabel":"Change Scope","supplement.constraintsLabel":"Constraints","supplement.referencesLabel":"References","supplement.freeTextLabel":"Additional Notes","supplement.tapdIdLabel":"TAPD ID","supplement.tapdIdPlaceholder":"e.g. 12345678, for MR TAPD association (optional)","planDoc.title":"Plan Documents","planDoc.edit":"Edit","planDoc.saving":"Saving...","planDoc.save":"Save","planDoc.cancel":"Cancel","planDoc.fullscreen":"Fullscreen","planDoc.expand":"Expand","planDoc.loading":"Loading...","planDoc.editPlaceholder":"Edit document content...","planDoc.selectTab":"Click a tab to view document","planDoc.closeFullscreen":"Close Fullscreen (Esc)","planDoc.noReviewFeedback":"No review feedback (plan was never rejected)","planDoc.verifyNotGenerated":"Verification report not yet generated","planDoc.fetchFailed":"Failed to fetch document:","planDoc.saveFailed":"Save failed:","agentLog.title":"Agent Live Output","agentLog.autoScroll":"Auto Scroll","agentLog.clear":"Clear","agentLog.ended":"Task ended, no live output","agentLog.finalState":"Final state:","agentLog.currentState":"Current state:","agentLog.waiting":"Waiting for Agent output...","agentLog.count":"{count} entries","agentLog.type.assistant":"AI Reply","agentLog.type.tool_use":"Tool Call","agentLog.type.tool_result":"Tool Result","agentLog.type.result":"Final Result","agentLog.type.stderr":"Log","agentLog.type.raw":"Output","agentLog.type.system":"System","agentLog.type.partial":"Streaming","state.pending":"Pending","state.branch_created":"Branch Created","state.analyzing":"Analyzing","state.analysis_done":"Analysis Done","state.designing":"Designing","state.design_done":"Design Done","state.implementing":"Implementing","state.implement_done":"Implementation Done","state.planning":"Planning","state.plan_done":"Plan Done","state.waiting_for_review":"Awaiting Review","state.review_approved":"Review Approved","state.building":"Building","state.build_done":"Build Done","state.verifying":"Verifying","state.completed":"Completed","state.failed":"Failed","phase.analysis":"Analysis","phase.design":"Design","phase.implement":"Implementation","phase.verify":"Verification","phase.plan":"Planning","phase.review":"Review","phase.build":"Build","planFile.01-analysis.md":"Requirements Analysis","planFile.02-design.md":"System Design","planFile.03-todolist.md":"Implementation Checklist","planFile.04-verify-report.md":"Verification Report","planFile.01-plan.md":"Implementation Plan","planFile.02-verify-report.md":"Verification Report","planFile.review-feedback.md":"Review Feedback","confirm.supplementSaved":"Supplement saved. Retry from analysis phase?","confirm.retry":"Retry Issue #{iid}?","confirm.cancel":"Untrack Issue #{iid}?","confirm.restart":`Clean and restart Issue #{iid}?
|
|
3
|
-
This will delete the worktree, branch, and reset the issue to pending.`,"confirm.retryFromPhase":'Retry Issue #{iid} from "{phaseLabel}" phase?',"confirm.approve":"Approve the implementation plan for Issue #{iid}?","confirm.reject.noFeedback":"Please enter review feedback","confirm.skip":"Skip review for Issue #{iid}?","alert.saveFailed":"Save failed: ","alert.retryFailed":"Retry failed: ","alert.cancelFailed":"Cancel failed: ","alert.restartFailed":"Restart failed: ","alert.retryFromPhaseFailed":"Phase retry failed: ","alert.approveFailed":"Approval failed: ","alert.rejectFailed":"Rejection failed: ","alert.skipFailed":"Skip failed: ","alert.startFailed":"Start failed: ","setup.title":"Issue Auto-Finish Setup","setup.step.envCheck":"Environment Check","setup.step.projectConfig":"Project Config","setup.step.gongfengConfig":"Gongfeng Config","setup.step.aiRunner":"AI Runner","setup.step.advancedOptions":"Advanced Options","setup.step.reviewConfirm":"Review & Confirm","setup.complete.title":"Setup Complete","setup.complete.savedTo":"Configuration saved to:","setup.complete.startHint":"Start the service with:","setup.env.checking":"Checking required system dependencies...","setup.env.checkingShort":"Checking...","setup.env.install":"Install","setup.env.refresh":"Refresh","setup.project.workDir":"Project Work Directory *","setup.project.workDirPlaceholder":"/path/to/your/project","setup.project.workDirHint":"The directory where your project code lives","setup.project.gitRootDir":"Git Root Directory","setup.project.gitRootDirPlaceholder":"Leave empty to use work dir","setup.project.gitRootDirHint":"For monorepo: the root of the git repository","setup.project.baseBranch":"Base Branch","setup.project.branchPrefix":"Branch Prefix","setup.project.worktreeBaseDir":"Worktree Base Directory","setup.project.projectSubDir":"Project Sub-directory","setup.project.projectSubDirPlaceholder":"For monorepo: relative path from git root","setup.gongfeng.apiUrl":"Gongfeng API URL *","setup.gongfeng.privateToken":"Private Token *","setup.gongfeng.tokenPlaceholder":"Enter your private token","setup.gongfeng.verify":"Verify","setup.gongfeng.tokenValid":"Token valid","setup.gongfeng.tokenInvalid":"Token invalid","setup.gongfeng.projectPath":"Project Path *","setup.gongfeng.projectPathPlaceholder":"namespace/project","setup.gongfeng.repoFound":"Repository found","setup.gongfeng.repoNotFound":"Repository not found","setup.ai.modeLabel":"AI Runner Mode","setup.ai.claudeInternal":"Claude Internal","setup.ai.claudeInternalDesc":"Use claude-internal CLI","setup.ai.cursorAgent":"Cursor Agent","setup.ai.cursorAgentDesc":"Use cursor agent CLI","setup.ai.codebuddy":"CodeBuddy","setup.ai.codebuddyDesc":"Use codebuddy CLI","setup.ai.model":"AI Model","setup.ai.cliStatus":"CLI Status","setup.advanced.discoveryInterval":"Discovery Interval (ms)","setup.advanced.driveInterval":"Drive Interval (ms)","setup.advanced.maxRetries":"Max Retries","setup.advanced.maxConcurrent":"Max Concurrent Issues","setup.advanced.webPort":"Web UI Port","setup.advanced.pipelineMode":"Pipeline Mode","setup.advanced.pipelineAuto":"Auto","setup.advanced.pipelineClassic":"Classic","setup.advanced.pipelinePlanMode":"Plan Mode","setup.advanced.enableReview":"Enable Review Gate","setup.advanced.phaseTimeout":"Phase Timeout (ms)","setup.advanced.phaseTimeoutHint":"Default: 1800000 (30 min)","setup.confirm.reviewHint":"Review the configuration that will be generated:","setup.nav.back":"Back","setup.nav.next":"Next","setup.nav.saving":"Saving...","setup.nav.complete":"Complete Setup","brainstorm.startRecording":"Start Recording","brainstorm.stopRecording":"Stop Recording","brainstorm.voiceNotSupported":"Voice input not supported. Please use Chrome/Edge, or type directly.","brainstorm.clear":"Clear","brainstorm.recording":"Recording...","brainstorm.transcriptLabel":"Your Ideas","brainstorm.transcriptPlaceholder":"Type or speak your ideas here... messy and incoherent is fine","brainstorm.startGenerate":"Generate SDD","brainstorm.step1":"Brain Dump","brainstorm.step2":"AI Refine","brainstorm.step3":"Create Issue","brainstorm.roundCount":"{count} refinement rounds completed","brainstorm.statusGenerating":"Generating SDD...","brainstorm.statusReviewing":"Reviewing...","brainstorm.statusRefining":"Refining...","brainstorm.statusProcessing":"Processing...","brainstorm.abort":"Abort","brainstorm.manualReview":"Manual Review","brainstorm.manualRefine":"Manual Refine","brainstorm.finishAndCreate":"Finish & Create Issue","brainstorm.sddTitle":"Software Design Document (SDD)","brainstorm.sddEmpty":"SDD not generated yet","brainstorm.questionsTitle":"Review Questions","brainstorm.questionsEmpty":"No review conducted yet","brainstorm.roundHistory":"View round history","brainstorm.roundLabel":"Round {n}","brainstorm.issueTitleLabel":"Issue Title","brainstorm.issueTitlePlaceholder":"Enter issue title (leave empty to auto-extract from SDD)","brainstorm.addAutoFinishLabel":"Add auto-finish label (system will process automatically)","brainstorm.sddPreview":"SDD Preview","brainstorm.backToRefine":"Back to Refine","brainstorm.createIssueOnly":"Create Issue Only","brainstorm.createAndStart":"Create & Start Processing","brainstorm.creating":"Creating...","brainstorm.issueCreated":"Issue Created Successfully!","brainstorm.startNew":"Start New Brainstorm"},Ti={"zh-CN":hc,en:mc},yn=V(localStorage.getItem("iaf-locale")||"zh-CN");function ne(e,t){const s=Ti[yn.value]?.[e]??Ti["zh-CN"]?.[e]??e;if(!t)return s;let n=s;for(const[r,i]of Object.entries(t))n=n.replaceAll(`{${r}}`,String(i));return n}function bc(e){yn.value=e,localStorage.setItem("iaf-locale",e)}function yc(){return yn.value}const Pi={install(e){e.config.globalProperties.$t=ne}};function Yt(){return{t:ne,locale:yn,setLocale:bc,getLocale:yc}}const Ri=["analysis","design","implement","verify"],Ai=["plan","review","build","verify"];function vc(){return[{file:"01-analysis.md",label:ne("planFile.01-analysis.md")},{file:"02-design.md",label:ne("planFile.02-design.md")},{file:"03-todolist.md",label:ne("planFile.03-todolist.md")},{file:"04-verify-report.md",label:ne("planFile.04-verify-report.md")}]}function xc(){return[{file:"01-plan.md",label:ne("planFile.01-plan.md")},{file:"02-verify-report.md",label:ne("planFile.02-verify-report.md")},{file:"review-feedback.md",label:ne("planFile.review-feedback.md")}]}const wc={pending:"bg-gray-100 text-gray-600",branch_created:"bg-blue-100 text-blue-600",analyzing:"bg-blue-100 text-blue-600",analysis_done:"bg-blue-100 text-blue-600",designing:"bg-blue-100 text-blue-600",design_done:"bg-blue-100 text-blue-600",implementing:"bg-blue-100 text-blue-600",implement_done:"bg-blue-100 text-blue-600",planning:"bg-blue-100 text-blue-600",plan_done:"bg-blue-100 text-blue-600",waiting_for_review:"bg-yellow-100 text-yellow-700",review_approved:"bg-green-100 text-green-600",building:"bg-blue-100 text-blue-600",build_done:"bg-blue-100 text-blue-600",verifying:"bg-blue-100 text-blue-600",completed:"bg-green-100 text-green-700",failed:"bg-red-100 text-red-600"},Di=new Set(["completed","failed"]),kc=new Set(["01-analysis.md","02-design.md","03-todolist.md","01-plan.md"]);function $c(e,t="classic"){const s={analyzing:{analysis:"in_progress"},analysis_done:{analysis:"completed"},designing:{analysis:"completed",design:"in_progress"},design_done:{analysis:"completed",design:"completed"},implementing:{analysis:"completed",design:"completed",implement:"in_progress"},implement_done:{analysis:"completed",design:"completed",implement:"completed"},verifying:{analysis:"completed",design:"completed",implement:"completed",verify:"in_progress"},completed:{analysis:"completed",design:"completed",implement:"completed",verify:"completed"}},n={planning:{plan:"in_progress"},plan_done:{plan:"completed"},waiting_for_review:{plan:"completed",review:"in_progress"},review_approved:{plan:"completed",review:"completed"},building:{plan:"completed",review:"completed",build:"in_progress"},build_done:{plan:"completed",review:"completed",build:"completed"},verifying:{plan:"completed",review:"completed",build:"completed",verify:"in_progress"},completed:{plan:"completed",review:"completed",build:"completed",verify:"completed"}};return t==="plan-mode"?n[e]??s[e]??{}:s[e]??n[e]??{}}function Ts(){const e=V("classic"),t=we(()=>e.value==="plan-mode"?[...Ai]:[...Ri]);function s(m){return(m?.pipelineMode??e.value)==="plan-mode"?xc():vc()}function n(m){return(m?.pipelineMode??e.value)==="plan-mode"?[...Ai]:[...Ri]}function r(m){return ne(`state.${m}`)||m}function i(m){return wc[m]??"bg-gray-100 text-gray-600"}function o(m){return ne(`phase.${m}`)||m}function l(m,$){if(m.progress?.phases?.[$])return m.progress.phases[$].status;const A=m.pipelineMode??e.value;return $c(m.state,A)[$]??"pending"}function a(m,$){const A=l(m,$);return A==="completed"?"bg-green-100 text-green-600":A==="in_progress"?"bg-blue-100 text-blue-600":A==="failed"?"bg-red-100 text-red-600":"bg-gray-100 text-gray-400"}function p(m){return m==="completed"?"bg-green-500 text-white":m==="in_progress"?"bg-blue-500 text-white":m==="failed"?"bg-red-500 text-white":"bg-gray-200 text-gray-500"}function c(m){return!Di.has(m)}function d(m){return Di.has(m)}function b(m){return kc.has(m)}function x(m,$){if(!$.value)return"#";const A=$.value.config.gongfengBaseUrl,R=$.value.config.projectPath;return`${A}/${R}/issues/${m}`}return{pipelineMode:e,phaseNames:t,getPlanDocs:s,getPhaseNames:n,stateLabel:r,stateClass:i,phaseLabel:o,phaseStatus:l,phaseIndicatorClass:a,phaseNodeClass:p,isActiveState:c,isTerminalState:d,isEditableDoc:b,issueUrl:x}}function Sc(e){const t=V(!1);let s=null;const n=["issue:stateChanged","issue:created","issue:failed","issue:deleted","issue:resetForRetry","issue:restarted","issue:retryFromPhase","review:requested","review:approved","review:rejected","agent:output","pipeline:progress"];function r(){s&&s.close(),s=new EventSource("/api/events"),s.addEventListener("connected",()=>{t.value=!0}),s.addEventListener("heartbeat",()=>{t.value=!0});for(const i of n)s.addEventListener(i,o=>{try{e(i,JSON.parse(o.data))}catch{}});s.onerror=()=>{t.value=!1,setTimeout(r,5e3)}}return Nt(r),Bt(()=>{s&&(s.close(),s=null)}),{connected:t}}const Li=new Set(["pending","branch_created","analyzing","analysis_done","designing","design_done","implementing","implement_done","planning","plan_done","waiting_for_review","review_approved","building","build_done","verifying"]);function _c(){return[{value:"all",label:ne("filter.all")},{value:"active",label:ne("filter.active")},{value:"completed",label:ne("filter.completed")},{value:"failed",label:ne("filter.failed")},{value:"review",label:ne("filter.review")}]}function Cc(){const e=V([]),t=V("all"),s=we(()=>e.value.filter(l=>Li.has(l.state)).length),n=we(()=>e.value.filter(l=>l.state==="completed").length),r=we(()=>e.value.filter(l=>l.state==="failed").length),i=we(()=>t.value==="all"?e.value:t.value==="active"?e.value.filter(l=>Li.has(l.state)):t.value==="completed"?e.value.filter(l=>l.state==="completed"):t.value==="failed"?e.value.filter(l=>l.state==="failed"):t.value==="review"?e.value.filter(l=>l.state==="waiting_for_review"):e.value);async function o(){try{e.value=await Wu()}catch(l){console.error("Fetch issues failed",l)}}return{issues:e,filter:t,filteredIssues:i,activeCount:s,completedCount:n,failedCount:r,refresh:o}}function Fn(){return{requirements:"",acceptanceCriteria:"",scope:"",constraints:"",references:"",freeText:"",tapdId:""}}function Ic(){const e=V(null),t=V(null),s=V(0),n=V(Fn()),r=V(Fn()),i=V(!1),o=V(!1),l=V(!1),a=V(""),p=V(!1),c=V([]);async function d(S,K){e.value=S,o.value=!1,n.value=Fn(),c.value=[],K.value=[];try{const[Z,T]=await Promise.all([Qn(S.issueIid),Ju(S.issueIid)]);e.value=Z,t.value=Z.progress??null,K.value=T.reverse()}catch(Z){console.error("Fetch detail failed",Z)}m(S.issueIid),x(S.issueIid)}async function b(){if(!e.value)return;const S=e.value.issueIid;try{const K=await Qn(S);e.value=K,t.value=K.progress??null,s.value++}catch(K){console.error("Refresh detail failed",K)}}async function x(S){try{c.value=await nc(S)}catch{}}async function m(S){i.value=!0;try{n.value=await ic(S)}catch{}finally{i.value=!1}}function $(){r.value={...n.value},o.value=!0}async function A(S){if(e.value){l.value=!0;try{const K=await oc(e.value.issueIid,r.value);n.value=K.data??r.value,o.value=!1,confirm(ne("confirm.supplementSaved"))&&(await Ci(e.value.issueIid,"analysis"),await S())}catch(K){alert(ne("alert.saveFailed")+K.message)}finally{l.value=!1}}}async function R(S,K){if(confirm(ne("confirm.retry",{iid:S})))try{await Qu(S),await K(),e.value?.issueIid===S&&await d(e.value,{value:[]})}catch(Z){alert(ne("alert.retryFailed")+Z.message)}}async function I(S,K){if(confirm(ne("confirm.cancel",{iid:S})))try{await Yu(S),e.value?.issueIid===S&&(e.value=null),await K()}catch(Z){alert(ne("alert.cancelFailed")+Z.message)}}async function N(S,K){if(confirm(ne("confirm.restart",{iid:S})))try{await Xu(S),await K(),e.value?.issueIid===S&&await d(e.value,{value:[]})}catch(Z){alert(ne("alert.restartFailed")+Z.message)}}async function B(S,K,Z,T){if(confirm(ne("confirm.retryFromPhase",{phaseLabel:Z,iid:S})))try{await Ci(S,K),await T(),e.value?.issueIid===S&&await d(e.value,{value:[]})}catch(O){alert(ne("alert.retryFromPhaseFailed")+O.message)}}async function C(S,K){if(confirm(ne("confirm.approve",{iid:S}))){p.value=!0;try{await ec(S),await K(),e.value?.issueIid===S&&await d(e.value,{value:[]})}catch(Z){alert(ne("alert.approveFailed")+Z.message)}finally{p.value=!1}}}async function w(S,K){if(!a.value.trim()){alert(ne("confirm.reject.noFeedback"));return}p.value=!0;try{await tc(S,a.value),a.value="",await K(),e.value?.issueIid===S&&await d(e.value,{value:[]})}catch(Z){alert(ne("alert.rejectFailed")+Z.message)}finally{p.value=!1}}async function _(S,K){if(confirm(ne("confirm.skip",{iid:S}))){p.value=!0;try{await sc(S),await K(),e.value?.issueIid===S&&await d(e.value,{value:[]})}catch(Z){alert(ne("alert.skipFailed")+Z.message)}finally{p.value=!1}}}function D(S){return S?!!(S.requirements||S.acceptanceCriteria||S.scope||S.constraints||S.references||S.freeText||S.tapdId):!1}return{selectedIssue:e,detailProgress:t,detailVersion:s,detailSupplement:n,detailSupplementForm:r,detailSupplementLoading:i,detailSupplementEditing:o,detailSupplementSaving:l,reviewFeedback:a,reviewSubmitting:p,reviewHistory:c,selectIssue:d,refreshDetail:b,enterSupplementEdit:$,saveDetailSupplement:A,doRetryIssue:R,doCancelIssue:I,doRestartIssue:N,doRetryFromPhase:B,doApprovePlan:C,doRejectPlan:w,doSkipReview:_,hasSupplementData:D}}const Ei=500,Tc=new Set(["assistant"]);function el(){const e=V([]),t=V(!0),s=V(!1),n=V(null),r=we(()=>s.value?e.value:e.value.filter(d=>Tc.has(d.type)));function i(d){return ne(`agentLog.type.${d}`)||d}function o(){t.value&&fr(()=>{const d=n.value;d&&(d.scrollTop=0)})}function l(d){e.value.unshift(d),e.value.length>Ei&&(e.value=e.value.slice(0,Ei)),o()}function a(d,b,x,m){b.value===d&&l({type:m.type??"raw",phase:x,timestamp:m.timestamp??new Date().toISOString(),summary:Pc(m)})}function p(d,b,x,m,$){b.value===d&&l({type:"system",phase:x,timestamp:$,summary:m})}function c(){e.value=[]}return{agentLogs:e,filteredLogs:r,agentAutoScroll:t,debugMode:s,agentLogContainer:n,agentLogLabel:i,pushLog:l,pushAgentStreamEvent:a,pushSystemLog:p,scrollToTop:o,clear:c}}function Pc(e){const t=e.content;if(!t||typeof t=="string")return String(t??"");if(e.type==="assistant"){const s=t.message??t;if(typeof s=="string")return s.slice(0,200);const n=s;return n.text?n.text.slice(0,200):n.content&&(Array.isArray(n.content)?n.content:[n.content]).filter(o=>o.type==="text").map(o=>o.text).join(" ").slice(0,200)||JSON.stringify(t).slice(0,150)}if(e.type==="tool_use"){const s=t,n=s.tool,r=n?.name??s.name??"?",i=n?.input??s.input??{},o=i.path??i.command??i.file_path??"";return r+(o?": "+o:"")}return e.type==="tool_result"?(typeof t.content=="string"?t.content:JSON.stringify(t.content??"")).slice(0,150):e.type==="result"?(t.result??JSON.stringify(t)).slice(0,200):JSON.stringify(t).slice(0,150)}function Fi(){return{requirements:"",acceptanceCriteria:"",scope:"",constraints:"",references:"",freeText:"",tapdId:""}}function Rc(e){const t=V(""),s=V([]),n=V(new Set),r=V(0),i=V(1),o=20,l=V(!1),a=V(""),p=V(null),c=V(Fi()),d=V(!1);async function b(){l.value=!0,a.value="";try{const A=await lc({search:t.value.trim()||void 0,page:i.value,perPage:o});s.value=A.issues,r.value=A.total,n.value=new Set(A.trackedIids)}catch(A){a.value=A.message}finally{l.value=!1}}function x(A){p.value=A,c.value=Fi(),d.value=!1}function m(A){return!!(A.requirements||A.acceptanceCriteria||A.scope||A.constraints||A.references||A.freeText)}async function $(A){if(p.value){d.value=!0;try{const R=p.value,I={issueId:R.id,issueIid:R.iid,issueTitle:R.title};m(c.value)&&(I.supplement=c.value),await ac(I),p.value=null,await e(),n.value.add(R.iid),A()}catch(R){alert(ne("alert.startFailed")+R.message)}finally{d.value=!1}}}return{browseSearch:t,browseIssues:s,browseTrackedIids:n,browseTotal:r,browsePage:i,browsePerPage:o,browseLoading:l,browseError:a,startDialogIssue:p,startSupplement:c,startProcessing:d,fetchGongfengIssues:b,openStartDialog:x,doStartProcessing:$,hasSupplementData:m}}function Ac(e){const{selectedIssueIid:t,onOpenIssue:s}=e;function n(){const l=new URLSearchParams(window.location.search).get("issue");if(!l)return;const a=Number(l);return Number.isFinite(a)&&a>0?a:void 0}function r(o){const l=new URL(window.location.href);o?l.searchParams.set("issue",String(o)):l.searchParams.delete("issue");const a=l.pathname+l.search,p=window.location.pathname+window.location.search;a!==p&&window.history.pushState({issueIid:o??null},"",a)}function i(o){const l=o.state?.issueIid??n();l?s(l):t.value&&(t.value=void 0)}return jt(t,o=>r(o)),Nt(()=>{window.addEventListener("popstate",i),window.history.replaceState({issueIid:n()??null},"",window.location.href)}),Bt(()=>{window.removeEventListener("popstate",i)}),{readIssueIidFromUrl:n}}function Xs(e){return e?new Date(e).toLocaleString("zh-CN",{month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}):"-"}function tl(e){if(!e||e<0)return"0s";const t=Math.floor(e/1e3);if(t<60)return t+"s";const s=Math.floor(t/60);return s<60?s+"m "+t%60+"s":Math.floor(s/60)+"h "+s%60+"m"}function Dc(e){return e?new Date(e).toLocaleTimeString("zh-CN",{hour:"2-digit",minute:"2-digit",second:"2-digit"}):""}const Lc={class:"bg-white shadow-sm border-b border-gray-200"},Ec={class:"max-w-7xl mx-auto px-4 py-3 flex items-center justify-between"},Fc={class:"flex items-center space-x-3"},Mc={class:"flex items-center space-x-4 text-sm text-gray-500"},jc={key:0},Oc={key:1},Nc={key:2},Bc=["disabled","title"],Uc=["title"],Hc=Te({__name:"HeaderBar",props:{connected:{type:Boolean},systemStatus:{}},setup(e){const{locale:t,setLocale:s}=Yt(),n=e,r=V(!0),i=V(!1);jt(()=>n.systemStatus,l=>{l&&(r.value=l.config.issueNoteSyncEnabled)},{immediate:!0});async function o(){const l=!r.value;i.value=!0;try{await cc(l),r.value=l}catch(a){console.error("Failed to toggle system note sync",a)}finally{i.value=!1}}return(l,a)=>(v(),k("header",Lc,[u("div",Ec,[u("div",Fc,[a[2]||(a[2]=u("h1",{class:"text-xl font-bold text-gray-800"},"Issue Auto-Finish",-1)),u("span",{class:ee(["flex items-center space-x-1 text-sm",e.connected?"text-green-600":"text-red-500"])},[u("span",{class:ee(["inline-block w-2 h-2 rounded-full",e.connected?"bg-green-500 pulse-dot":"bg-red-500"])},null,2),u("span",null,g(e.connected?l.$t("header.connected"):l.$t("header.disconnected")),1)],2)]),u("div",Mc,[e.systemStatus?(v(),k("span",jc,g(l.$t("header.discovery"))+": "+g((e.systemStatus.config.discoveryIntervalMs/1e3).toFixed(0))+"s / "+g(l.$t("header.drive"))+": "+g((e.systemStatus.config.driveIntervalMs/1e3).toFixed(0))+"s",1)):q("",!0),e.systemStatus?(v(),k("span",Oc,g(l.$t("header.uptime"))+": "+g(f(tl)(e.systemStatus.uptime)),1)):q("",!0),e.systemStatus?(v(),k("span",Nc,"AI: "+g(e.systemStatus.config.aiMode),1)):q("",!0),e.systemStatus?.config.pipelineMode?(v(),k("span",{key:3,class:ee(["px-2 py-0.5 rounded text-xs font-medium",e.systemStatus.config.pipelineMode==="plan-mode"?"bg-purple-100 text-purple-700":"bg-gray-100 text-gray-600"])},g(e.systemStatus.config.pipelineMode==="plan-mode"?l.$t("setup.advanced.pipelinePlanMode"):l.$t("setup.advanced.pipelineClassic")),3)):q("",!0),e.systemStatus?(v(),k("button",{key:4,class:ee(["px-2 py-0.5 rounded text-xs font-medium transition-colors",r.value?"bg-green-100 text-green-700 hover:bg-green-200":"bg-gray-100 text-gray-500 hover:bg-gray-200"]),disabled:i.value,title:r.value?l.$t("header.syncOnTitle"):l.$t("header.syncOffTitle"),onClick:a[0]||(a[0]=p=>o())},g(r.value?l.$t("header.syncOn"):l.$t("header.syncOff")),11,Bc)):q("",!0),u("button",{class:ee(["px-2 py-1 text-xs rounded",(f(t)==="zh-CN","bg-gray-200 text-gray-700")]),title:l.$t("header.langSwitch"),onClick:a[1]||(a[1]=p=>f(s)(f(t)==="zh-CN"?"en":"zh-CN"))},g(f(t)==="zh-CN"?"EN":"中文"),11,Uc)])])]))}}),Vc={class:"grid grid-cols-4 gap-4 mb-6"},zc={class:"bg-white rounded-lg shadow-sm p-4 border border-gray-200"},qc={class:"text-sm text-gray-500"},Gc={class:"text-2xl font-bold text-gray-800"},Kc={class:"bg-white rounded-lg shadow-sm p-4 border border-blue-200"},Wc={class:"text-sm text-blue-500"},Jc={class:"text-2xl font-bold text-blue-600"},Zc={class:"bg-white rounded-lg shadow-sm p-4 border border-green-200"},Qc={class:"text-sm text-green-500"},Yc={class:"text-2xl font-bold text-green-600"},Xc={class:"bg-white rounded-lg shadow-sm p-4 border border-red-200"},ed={class:"text-sm text-red-500"},td={class:"text-2xl font-bold text-red-600"},sd=Te({__name:"StatsCards",props:{total:{},active:{},completed:{},failed:{}},setup(e){return(t,s)=>(v(),k("div",Vc,[u("div",zc,[u("div",qc,g(t.$t("stats.total")),1),u("div",Gc,g(e.total),1)]),u("div",Kc,[u("div",Wc,g(t.$t("stats.active")),1),u("div",Jc,g(e.active),1)]),u("div",Zc,[u("div",Qc,g(t.$t("stats.completed")),1),u("div",Yc,g(e.completed),1)]),u("div",Xc,[u("div",ed,g(t.$t("stats.failed")),1),u("div",td,g(e.failed),1)])]))}}),nd={class:"mb-4 flex items-center space-x-2"},rd={class:"text-sm text-gray-600"},id=["onClick"],od={class:"bg-white rounded-lg shadow-sm border border-gray-200 overflow-hidden"},ld={class:"w-full"},ad={class:"bg-gray-50 border-b border-gray-200"},ud={key:0},cd={class:"px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase"},dd={key:0},pd={class:"px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase"},fd={key:0},gd={key:0},hd={class:"px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase"},md={class:"divide-y divide-gray-100"},bd={key:0},yd={colspan:"7",class:"px-4 py-8 text-center text-gray-400"},vd=["onClick"],xd={class:"px-4 py-3 text-sm font-mono text-gray-700"},wd=["href","title"],kd={class:"px-4 py-3 text-sm text-gray-800 max-w-xs truncate"},$d={class:"px-4 py-3"},Sd={class:"px-4 py-3"},_d={class:"flex items-center space-x-1"},Cd=["title"],Id={key:0},Td={key:1,class:"pulse-dot"},Pd={key:2},Rd={key:3},Ad={class:"px-4 py-3 text-sm text-gray-600"},Dd={class:"px-4 py-3 text-sm text-gray-500"},Ld={class:"px-4 py-3"},Ed=["onClick"],Fd=["onClick"],Md=["onClick"],jd=Te({__name:"IssueTable",props:{issues:{},filter:{},systemStatus:{}},emits:["update:filter","select","retry","restart","cancel"],setup(e,{emit:t}){const s=e,n=t,{getPhaseNames:r,stateLabel:i,stateClass:o,phaseStatus:l,phaseIndicatorClass:a,phaseLabel:p}=Ts(),c=V("updatedAt"),d=V("desc"),b=we(()=>{const m=[...s.issues],$=d.value==="asc"?1:-1;return m.sort((A,R)=>{const I=c.value;return I==="updatedAt"?$*(new Date(A.updatedAt).getTime()-new Date(R.updatedAt).getTime()):I==="issueIid"||I==="attempts"?$*(A[I]-R[I]):$*A.state.localeCompare(R.state)})});function x(m){c.value===m?d.value=d.value==="asc"?"desc":"asc":(c.value=m,d.value=m==="updatedAt"?"desc":"asc")}return(m,$)=>(v(),k("div",null,[u("div",nd,[u("span",rd,g(m.$t("table.filter")),1),(v(!0),k(te,null,Ie(f(_c)(),A=>(v(),k("button",{key:A.value,class:ee(["px-3 py-1 rounded-full text-xs font-medium transition-colors",e.filter===A.value?"bg-gray-800 text-white":"bg-gray-200 text-gray-600 hover:bg-gray-300"]),onClick:R=>n("update:filter",A.value)},g(A.label),11,id))),128))]),u("div",od,[u("table",ld,[u("thead",ad,[u("tr",null,[u("th",{class:"px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase cursor-pointer select-none hover:text-gray-700",onClick:$[0]||($[0]=A=>x("issueIid"))},[$[6]||($[6]=pe(" IID ",-1)),c.value==="issueIid"?(v(),k("span",ud,g(d.value==="asc"?"▲":"▼"),1)):q("",!0)]),u("th",cd,g(m.$t("table.title")),1),u("th",{class:"px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase cursor-pointer select-none hover:text-gray-700",onClick:$[1]||($[1]=A=>x("state"))},[pe(g(m.$t("table.state"))+" ",1),c.value==="state"?(v(),k("span",dd,g(d.value==="asc"?"▲":"▼"),1)):q("",!0)]),u("th",pd,g(m.$t("table.progress")),1),u("th",{class:"px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase cursor-pointer select-none hover:text-gray-700",onClick:$[2]||($[2]=A=>x("attempts"))},[pe(g(m.$t("table.retries"))+" ",1),c.value==="attempts"?(v(),k("span",fd,g(d.value==="asc"?"▲":"▼"),1)):q("",!0)]),u("th",{class:"px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase cursor-pointer select-none hover:text-gray-700",onClick:$[3]||($[3]=A=>x("updatedAt"))},[pe(g(m.$t("table.updatedAt"))+" ",1),c.value==="updatedAt"?(v(),k("span",gd,g(d.value==="asc"?"▲":"▼"),1)):q("",!0)]),u("th",hd,g(m.$t("table.actions")),1)])]),u("tbody",md,[b.value.length===0?(v(),k("tr",bd,[u("td",yd,g(m.$t("table.empty")),1)])):q("",!0),(v(!0),k(te,null,Ie(b.value,A=>(v(),k("tr",{key:A.issueIid,class:"hover:bg-gray-50 cursor-pointer transition-colors",onClick:R=>n("select",A)},[u("td",xd,[u("a",{href:e.systemStatus?`${e.systemStatus.config.gongfengBaseUrl}/${e.systemStatus.config.projectPath}/issues/${A.issueIid}`:"#",target:"_blank",rel:"noopener",class:"text-blue-600 hover:text-blue-800 hover:underline inline-flex items-center",onClick:$[4]||($[4]=$i(()=>{},["stop"])),title:m.$t("table.viewInGongfeng")},[pe(" #"+g(A.issueIid)+" ",1),$[7]||($[7]=u("svg",{class:"w-3 h-3 ml-0.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[u("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"})],-1))],8,wd)]),u("td",kd,g(A.issueTitle),1),u("td",$d,[u("span",{class:ee(["px-2 py-1 rounded-full text-xs font-medium",f(o)(A.state)])},g(f(i)(A.state)),3)]),u("td",Sd,[u("div",_d,[(v(!0),k(te,null,Ie(f(r)(A),R=>(v(),k("div",{key:R,class:ee(["w-6 h-6 rounded-full flex items-center justify-center text-xs",f(a)(A,R)]),title:f(p)(R)},[f(l)(A,R)==="completed"?(v(),k("span",Id,"✓")):f(l)(A,R)==="in_progress"?(v(),k("span",Td,"●")):f(l)(A,R)==="failed"?(v(),k("span",Pd,"✗")):(v(),k("span",Rd,"●"))],10,Cd))),128))])]),u("td",Ad,g(A.attempts),1),u("td",Dd,g(f(Xs)(A.updatedAt)),1),u("td",Ld,[u("div",{class:"flex space-x-2",onClick:$[5]||($[5]=$i(()=>{},["stop"]))},[A.state==="failed"?(v(),k("button",{key:0,class:"px-2 py-1 bg-blue-500 text-white text-xs rounded hover:bg-blue-600",onClick:R=>n("retry",A.issueIid)},g(m.$t("table.retry")),9,Ed)):q("",!0),u("button",{class:"px-2 py-1 bg-yellow-100 text-yellow-700 text-xs rounded hover:bg-yellow-200",onClick:R=>n("restart",A.issueIid)},g(m.$t("table.restart")),9,Fd),u("button",{class:"px-2 py-1 bg-red-100 text-red-600 text-xs rounded hover:bg-red-200",onClick:R=>n("cancel",A.issueIid)},g(m.$t("table.cancel")),9,Md)])])],8,vd))),128))])])])]))}}),Od={class:"mb-4 flex items-center space-x-3"},Nd={class:"relative flex-1 max-w-md"},Bd=["value","placeholder"],Ud=["disabled"],Hd={key:0,class:"py-12 text-center text-gray-400"},Vd={key:1,class:"py-8 text-center text-red-500"},zd={key:2},qd={class:"bg-white rounded-lg shadow-sm border border-gray-200 overflow-hidden"},Gd={class:"w-full"},Kd={class:"bg-gray-50 border-b border-gray-200"},Wd={class:"px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase"},Jd={class:"px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase"},Zd={class:"px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase"},Qd={class:"px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase"},Yd={class:"px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase"},Xd={class:"divide-y divide-gray-100"},ep={key:0},tp={colspan:"6",class:"px-4 py-8 text-center text-gray-400"},sp={class:"px-4 py-3 text-sm font-mono text-gray-700"},np=["href"],rp={class:"px-4 py-3 text-sm text-gray-800 max-w-sm truncate"},ip={class:"px-4 py-3"},op={class:"flex flex-wrap"},lp={class:"px-4 py-3 text-sm text-gray-600"},ap={class:"px-4 py-3 text-sm text-gray-500"},up={class:"px-4 py-3"},cp={key:0,class:"px-2 py-1 rounded-full text-xs font-medium bg-gray-100 text-gray-500"},dp=["onClick"],pp={key:0,class:"flex items-center justify-between mt-4"},fp={class:"text-sm text-gray-500"},gp={class:"flex space-x-2"},hp=["disabled"],mp=["disabled"],bp=Te({__name:"BrowsePanel",props:{issues:{},trackedIids:{},total:{},page:{},perPage:{},loading:{type:Boolean},error:{},search:{},systemStatus:{}},emits:["update:search","update:page","search","start"],setup(e,{emit:t}){const s=t;function n(r,i){return i?`${i.config.gongfengBaseUrl}/${i.config.projectPath}/issues/${r}`:"#"}return(r,i)=>(v(),k("div",null,[u("div",Od,[u("div",Nd,[u("input",{value:e.search,onInput:i[0]||(i[0]=o=>s("update:search",o.target.value)),type:"text",placeholder:r.$t("browse.searchPlaceholder"),class:"w-full pl-9 pr-4 py-2 border border-gray-300 rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-blue-400 focus:border-transparent",onKeyup:i[1]||(i[1]=Vu(o=>s("search"),["enter"]))},null,40,Bd),i[5]||(i[5]=u("svg",{class:"absolute left-3 top-2.5 w-4 h-4 text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[u("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})],-1))]),u("button",{class:"px-4 py-2 bg-gray-800 text-white text-sm rounded-lg hover:bg-gray-700",disabled:e.loading,onClick:i[2]||(i[2]=o=>s("search"))},g(e.loading?r.$t("browse.loading"):r.$t("browse.search")),9,Ud)]),e.loading?(v(),k("div",Hd,[i[6]||(i[6]=u("svg",{class:"animate-spin h-6 w-6 mx-auto mb-2 text-blue-400",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},[u("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}),u("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})],-1)),pe(" "+g(r.$t("browse.loadingList")),1)])):e.error?(v(),k("div",Vd,g(e.error),1)):(v(),k("div",zd,[u("div",qd,[u("table",Gd,[u("thead",Kd,[u("tr",null,[i[7]||(i[7]=u("th",{class:"px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase"},"IID",-1)),u("th",Wd,g(r.$t("browse.title")),1),u("th",Jd,g(r.$t("browse.labels")),1),u("th",Zd,g(r.$t("browse.author")),1),u("th",Qd,g(r.$t("browse.createdAt")),1),u("th",Yd,g(r.$t("browse.actions")),1)])]),u("tbody",Xd,[e.issues.length===0?(v(),k("tr",ep,[u("td",tp,g(r.$t("browse.empty")),1)])):q("",!0),(v(!0),k(te,null,Ie(e.issues,o=>(v(),k("tr",{key:o.iid,class:"hover:bg-gray-50 transition-colors"},[u("td",sp,[u("a",{href:n(o.iid,e.systemStatus),target:"_blank",rel:"noopener",class:"text-blue-600 hover:text-blue-800 hover:underline inline-flex items-center"},[pe(" #"+g(o.iid)+" ",1),i[8]||(i[8]=u("svg",{class:"w-3 h-3 ml-0.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[u("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"})],-1))],8,np)]),u("td",rp,g(o.title),1),u("td",ip,[u("div",op,[(v(!0),k(te,null,Ie(o.labels,l=>(v(),k("span",{key:l,class:"label-tag bg-blue-100 text-blue-700"},g(l),1))),128))])]),u("td",lp,g(o.author?.name||o.author?.username||"-"),1),u("td",ap,g(f(Xs)(o.created_at)),1),u("td",up,[e.trackedIids.has(o.iid)?(v(),k("span",cp,g(r.$t("browse.tracked")),1)):(v(),k("button",{key:1,class:"px-3 py-1 bg-green-500 text-white text-xs rounded-lg hover:bg-green-600 font-medium",onClick:l=>s("start",o)},g(r.$t("browse.start")),9,dp))])]))),128))])])]),e.total>e.perPage?(v(),k("div",pp,[u("div",fp,g(r.$t("browse.pagination",{total:e.total,page:e.page,totalPages:Math.ceil(e.total/e.perPage)})),1),u("div",gp,[u("button",{class:"px-3 py-1 text-sm bg-white border border-gray-300 rounded hover:bg-gray-50 disabled:opacity-40",disabled:e.page<=1,onClick:i[3]||(i[3]=o=>{s("update:page",e.page-1),s("search")})},g(r.$t("browse.prevPage")),9,hp),u("button",{class:"px-3 py-1 text-sm bg-white border border-gray-300 rounded hover:bg-gray-50 disabled:opacity-40",disabled:e.page>=Math.ceil(e.total/e.perPage),onClick:i[4]||(i[4]=o=>{s("update:page",e.page+1),s("search")})},g(r.$t("browse.nextPage")),9,mp)])])):q("",!0)]))]))}});function yp(){const e=V("input"),t=V(null),s=V(!1),n=V(""),r=V(""),i=V(null),o=V(null),l=we(()=>t.value?.currentSdd??""),a=we(()=>t.value?.rounds??[]),p=we(()=>t.value?.status??"idle"),c=we(()=>{const C=a.value;return C.length>0?C[C.length-1].questions:""});async function d(C){n.value="",s.value=!0;try{const w=await pc(C);t.value=w.session,e.value="refine",await b()}catch(w){n.value=w.message}finally{s.value=!1}}async function b(C){if(t.value){n.value="",s.value=!0,r.value="";try{const{fetchResponse:w,abort:_}=En(t.value.id,"auto-refine",C?{rounds:C}:void 0);o.value=_;const D=await w;if(!D.ok){const S=await D.json().catch(()=>({}));throw new Error(S.error||`HTTP ${D.status}`)}await $(D),await R()}catch(w){w.name!=="AbortError"&&(n.value=w.message)}finally{s.value=!1,o.value=null}}}async function x(){if(t.value){n.value="",s.value=!0,r.value="";try{const{fetchResponse:C,abort:w}=En(t.value.id,"review");o.value=w;const _=await C;if(!_.ok)throw new Error(`HTTP ${_.status}`);await $(_),await R()}catch(C){C.name!=="AbortError"&&(n.value=C.message)}finally{s.value=!1,o.value=null}}}async function m(){if(t.value){n.value="",s.value=!0,r.value="";try{const{fetchResponse:C,abort:w}=En(t.value.id,"refine");o.value=w;const _=await C;if(!_.ok)throw new Error(`HTTP ${_.status}`);await $(_),await R()}catch(C){C.name!=="AbortError"&&(n.value=C.message)}finally{s.value=!1,o.value=null}}}async function $(C){const w=C.body?.getReader();if(!w)return;const _=new TextDecoder;let D="";for(;;){const{done:S,value:K}=await w.read();if(S)break;D+=_.decode(K,{stream:!0});const Z=D.split(`
|
|
4
|
-
`);D=Z.pop()??"";for(const T of Z)if(T.startsWith("data: "))try{const O=JSON.parse(T.slice(6));A(O)}catch{}}}function A(C){if(C.type==="sdd:chunk"||C.type==="review:chunk"){const w=C.data;if(w?.content){const _=typeof w.content=="string"?w.content:JSON.stringify(w.content);r.value+=_+`
|
|
5
|
-
`}}if(C.type==="sdd:complete"){const w=C.data;w?.sdd&&t.value&&(t.value.currentSdd=w.sdd)}if(C.type==="review:complete"){const w=C.data;w&&t.value&&(t.value.rounds.find(D=>D.round===w.round)||t.value.rounds.push({round:w.round??t.value.rounds.length+1,questions:w.questions??"",refinedSdd:""}))}if(C.type==="round:complete"){const w=C.data;if(w?.sdd&&t.value){t.value.currentSdd=w.sdd;const _=t.value.rounds.find(D=>D.round===w.round);_&&(_.refinedSdd=w.sdd)}r.value=""}if(C.type==="round:start"&&(r.value=""),C.type==="error"){const w=C.data;n.value=w?.message??"Unknown error"}}async function R(){if(t.value)try{const C=await fc(t.value.id);t.value=C.session}catch{}}async function I(C,w){if(t.value){n.value="",s.value=!0;try{const _=await gc(t.value.id,C,w);i.value=_.issue,e.value="complete"}catch(_){n.value=_.message}finally{s.value=!1}}}function N(){o.value?.()}function B(){t.value=null,e.value="input",s.value=!1,n.value="",r.value="",i.value=null,o.value=null}return{step:e,session:t,loading:s,error:n,streamOutput:r,createdIssue:i,currentSdd:l,rounds:a,status:p,lastQuestions:c,startSession:d,runAutoRefine:b,runSingleReview:x,runSingleRefine:m,createIssue:I,abort:N,reset:B}}function vp(){const e=V(!1),t=V(""),s=V(""),n=V(!1),r=V("");let i=null;const o=window.SpeechRecognition||window.webkitSpeechRecognition;n.value=!!o;function l(d="zh-CN"){if(!o){r.value="当前浏览器不支持语音识别,请使用 Chrome 或 Edge";return}r.value="",i=new o,i.continuous=!0,i.interimResults=!0,i.lang=d,i.onresult=b=>{let x="",m="";for(let $=b.resultIndex;$<b.results.length;$++){const A=b.results[$];A.isFinal?x+=A[0].transcript:m+=A[0].transcript}x&&(t.value+=x),s.value=m},i.onerror=b=>{b.error!=="no-speech"&&b.error!=="aborted"&&(r.value=`语音识别错误: ${b.error}`),e.value=!1},i.onend=()=>{e.value=!1,s.value=""},i.start(),e.value=!0}function a(){i&&(i.stop(),i=null),e.value=!1}function p(d="zh-CN"){e.value?a():l(d)}function c(){t.value="",s.value=""}return Bt(()=>{i&&(i.abort(),i=null)}),{isRecording:e,transcript:t,interimText:s,isSupported:n,error:r,startRecording:l,stopRecording:a,toggleRecording:p,clearTranscript:c}}const xp={class:"space-y-4"},wp={class:"flex items-center gap-3"},kp={key:0,class:"w-4 h-4",fill:"currentColor",viewBox:"0 0 24 24"},$p={key:1,class:"w-4 h-4",fill:"currentColor",viewBox:"0 0 24 24"},Sp={key:1,class:"text-sm text-amber-600"},_p={key:0,class:"flex items-center gap-2 text-sm text-red-500"},Cp={key:0,class:"text-gray-400 italic ml-2 truncate max-w-md"},Ip={class:"block text-sm font-medium text-gray-700 mb-1"},Tp=["placeholder"],Pp={key:1,class:"text-sm text-red-500"},Rp={class:"flex justify-end"},Ap=["disabled"],Dp=Te({__name:"VoiceRecorder",emits:["submit"],setup(e,{emit:t}){const{t:s}=Yt(),n=t,{isRecording:r,transcript:i,interimText:o,isSupported:l,error:a,toggleRecording:p,clearTranscript:c}=vp();function d(){const b=i.value.trim();b&&n("submit",b)}return(b,x)=>(v(),k("div",xp,[u("div",wp,[f(l)?(v(),k("button",{key:0,class:ee(["inline-flex items-center gap-2 px-4 py-2.5 rounded-lg font-medium text-sm transition-all",f(r)?"bg-red-500 text-white hover:bg-red-600 animate-pulse":"bg-gray-800 text-white hover:bg-gray-700"]),onClick:x[0]||(x[0]=m=>f(p)())},[f(r)?(v(),k("svg",$p,[...x[4]||(x[4]=[u("rect",{x:"6",y:"6",width:"12",height:"12",rx:"2"},null,-1)])])):(v(),k("svg",kp,[...x[3]||(x[3]=[u("path",{d:"M12 14c1.66 0 3-1.34 3-3V5c0-1.66-1.34-3-3-3S9 3.34 9 5v6c0 1.66 1.34 3 3 3z"},null,-1),u("path",{d:"M17 11c0 2.76-2.24 5-5 5s-5-2.24-5-5H5c0 3.53 2.61 6.43 6 6.92V21h2v-3.08c3.39-.49 6-3.39 6-6.92h-2z"},null,-1)])])),pe(" "+g(f(r)?f(s)("brainstorm.stopRecording"):f(s)("brainstorm.startRecording")),1)],2)):q("",!0),f(l)?q("",!0):(v(),k("span",Sp,g(f(s)("brainstorm.voiceNotSupported")),1)),f(i).trim()?(v(),k("button",{key:2,class:"text-sm text-gray-500 hover:text-gray-700 underline",onClick:x[1]||(x[1]=m=>f(c)())},g(f(s)("brainstorm.clear")),1)):q("",!0)]),f(r)?(v(),k("div",_p,[x[5]||(x[5]=u("span",{class:"relative flex h-2.5 w-2.5"},[u("span",{class:"animate-ping absolute inline-flex h-full w-full rounded-full bg-red-400 opacity-75"}),u("span",{class:"relative inline-flex rounded-full h-2.5 w-2.5 bg-red-500"})],-1)),pe(" "+g(f(s)("brainstorm.recording"))+" ",1),f(o)?(v(),k("span",Cp,g(f(o)),1)):q("",!0)])):q("",!0),u("div",null,[u("label",Ip,g(f(s)("brainstorm.transcriptLabel")),1),he(u("textarea",{"onUpdate:modelValue":x[2]||(x[2]=m=>Se(i)?i.value=m:null),rows:"10",class:"w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:ring-2 focus:ring-gray-800 focus:border-transparent resize-y",placeholder:f(s)("brainstorm.transcriptPlaceholder")},null,8,Tp),[[xe,f(i)]])]),f(a)?(v(),k("div",Pp,g(f(a)),1)):q("",!0),u("div",Rp,[u("button",{class:"px-6 py-2.5 bg-gray-800 text-white rounded-lg text-sm font-medium hover:bg-gray-700 disabled:opacity-50 disabled:cursor-not-allowed transition-colors",disabled:!f(i).trim(),onClick:d},g(f(s)("brainstorm.startGenerate")),9,Ap)])]))}});function kr(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Ut=kr();function sl(e){Ut=e}var Et={exec:()=>null};function re(e,t=""){let s=typeof e=="string"?e:e.source,n={replace:(r,i)=>{let o=typeof i=="string"?i:i.source;return o=o.replace(Le.caret,"$1"),s=s.replace(r,o),n},getRegex:()=>new RegExp(s,t)};return n}var Lp=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),Le={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i"),blockquoteBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}>`)},Ep=/^(?:[ \t]*(?:\n|$))+/,Fp=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Mp=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Ps=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,jp=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,$r=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,nl=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,rl=re(nl).replace(/bull/g,$r).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),Op=re(nl).replace(/bull/g,$r).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Sr=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Np=/^[^\n]+/,_r=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Bp=re(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",_r).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Up=re(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,$r).getRegex(),vn="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|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Cr=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Hp=re("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Cr).replace("tag",vn).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),il=re(Sr).replace("hr",Ps).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",vn).getRegex(),Vp=re(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",il).getRegex(),Ir={blockquote:Vp,code:Fp,def:Bp,fences:Mp,heading:jp,hr:Ps,html:Hp,lheading:rl,list:Up,newline:Ep,paragraph:il,table:Et,text:Np},Mi=re("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Ps).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",vn).getRegex(),zp={...Ir,lheading:Op,table:Mi,paragraph:re(Sr).replace("hr",Ps).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Mi).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",vn).getRegex()},qp={...Ir,html:re(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Cr).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Et,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:re(Sr).replace("hr",Ps).replace("heading",` *#{1,6} *[^
|
|
6
|
-
]`).replace("lheading",rl).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Gp=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Kp=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,ol=/^( {2,}|\\)\n(?!\s*$)/,Wp=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,xn=/[\p{P}\p{S}]/u,Tr=/[\s\p{P}\p{S}]/u,ll=/[^\s\p{P}\p{S}]/u,Jp=re(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Tr).getRegex(),al=/(?!~)[\p{P}\p{S}]/u,Zp=/(?!~)[\s\p{P}\p{S}]/u,Qp=/(?:[^\s\p{P}\p{S}]|~)/u,ul=/(?![*_])[\p{P}\p{S}]/u,Yp=/(?![*_])[\s\p{P}\p{S}]/u,Xp=/(?:[^\s\p{P}\p{S}]|[*_])/u,ef=re(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",Lp?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),cl=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,tf=re(cl,"u").replace(/punct/g,xn).getRegex(),sf=re(cl,"u").replace(/punct/g,al).getRegex(),dl="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",nf=re(dl,"gu").replace(/notPunctSpace/g,ll).replace(/punctSpace/g,Tr).replace(/punct/g,xn).getRegex(),rf=re(dl,"gu").replace(/notPunctSpace/g,Qp).replace(/punctSpace/g,Zp).replace(/punct/g,al).getRegex(),of=re("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,ll).replace(/punctSpace/g,Tr).replace(/punct/g,xn).getRegex(),lf=re(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,ul).getRegex(),af="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",uf=re(af,"gu").replace(/notPunctSpace/g,Xp).replace(/punctSpace/g,Yp).replace(/punct/g,ul).getRegex(),cf=re(/\\(punct)/,"gu").replace(/punct/g,xn).getRegex(),df=re(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[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])?)+(?![-_])/).getRegex(),pf=re(Cr).replace("(?:-->|$)","-->").getRegex(),ff=re("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",pf).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),en=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,gf=re(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",en).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),pl=re(/^!?\[(label)\]\[(ref)\]/).replace("label",en).replace("ref",_r).getRegex(),fl=re(/^!?\[(ref)\](?:\[\])?/).replace("ref",_r).getRegex(),hf=re("reflink|nolink(?!\\()","g").replace("reflink",pl).replace("nolink",fl).getRegex(),ji=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Pr={_backpedal:Et,anyPunctuation:cf,autolink:df,blockSkip:ef,br:ol,code:Kp,del:Et,delLDelim:Et,delRDelim:Et,emStrongLDelim:tf,emStrongRDelimAst:nf,emStrongRDelimUnd:of,escape:Gp,link:gf,nolink:fl,punctuation:Jp,reflink:pl,reflinkSearch:hf,tag:ff,text:Wp,url:Et},mf={...Pr,link:re(/^!?\[(label)\]\((.*?)\)/).replace("label",en).getRegex(),reflink:re(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",en).getRegex()},Yn={...Pr,emStrongRDelimAst:rf,emStrongLDelim:sf,delLDelim:lf,delRDelim:uf,url:re(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",ji).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:re(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",ji).getRegex()},bf={...Yn,br:re(ol).replace("{2,}","*").getRegex(),text:re(Yn.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Ms={normal:Ir,gfm:zp,pedantic:qp},is={normal:Pr,gfm:Yn,breaks:bf,pedantic:mf},yf={"&":"&","<":"<",">":">",'"':""","'":"'"},Oi=e=>yf[e];function et(e,t){if(t){if(Le.escapeTest.test(e))return e.replace(Le.escapeReplace,Oi)}else if(Le.escapeTestNoEncode.test(e))return e.replace(Le.escapeReplaceNoEncode,Oi);return e}function Ni(e){try{e=encodeURI(e).replace(Le.percentDecode,"%")}catch{return null}return e}function Bi(e,t){let s=e.replace(Le.findPipe,(i,o,l)=>{let a=!1,p=o;for(;--p>=0&&l[p]==="\\";)a=!a;return a?"|":" |"}),n=s.split(Le.splitPipe),r=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length<t;)n.push("");for(;r<n.length;r++)n[r]=n[r].trim().replace(Le.slashPipe,"|");return n}function os(e,t,s){let n=e.length;if(n===0)return"";let r=0;for(;r<n&&e.charAt(n-r-1)===t;)r++;return e.slice(0,n-r)}function vf(e,t){if(e.indexOf(t[1])===-1)return-1;let s=0;for(let n=0;n<e.length;n++)if(e[n]==="\\")n++;else if(e[n]===t[0])s++;else if(e[n]===t[1]&&(s--,s<0))return n;return s>0?-2:-1}function xf(e,t=0){let s=t,n="";for(let r of e)if(r===" "){let i=4-s%4;n+=" ".repeat(i),s+=i}else n+=r,s++;return n}function Ui(e,t,s,n,r){let i=t.href,o=t.title||null,l=e[1].replace(r.other.outputLinkReplace,"$1");n.state.inLink=!0;let a={type:e[0].charAt(0)==="!"?"image":"link",raw:s,href:i,title:o,text:l,tokens:n.inlineTokens(l)};return n.state.inLink=!1,a}function wf(e,t,s){let n=e.match(s.other.indentCodeCompensation);if(n===null)return t;let r=n[1];return t.split(`
|
|
7
|
-
`).map(i=>{let o=i.match(s.other.beginningSpace);if(o===null)return i;let[l]=o;return l.length>=r.length?i.slice(r.length):i}).join(`
|
|
8
|
-
`)}var tn=class{options;rules;lexer;constructor(e){this.options=e||Ut}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let s=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?s:os(s,`
|
|
9
|
-
`)}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let s=t[0],n=wf(s,t[3]||"",this.rules);return{type:"code",raw:s,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:n}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let s=t[2].trim();if(this.rules.other.endingHash.test(s)){let n=os(s,"#");(this.options.pedantic||!n||this.rules.other.endingSpaceChar.test(n))&&(s=n.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:s,tokens:this.lexer.inline(s)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:os(t[0],`
|
|
10
|
-
`)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let s=os(t[0],`
|
|
11
|
-
`).split(`
|
|
12
|
-
`),n="",r="",i=[];for(;s.length>0;){let o=!1,l=[],a;for(a=0;a<s.length;a++)if(this.rules.other.blockquoteStart.test(s[a]))l.push(s[a]),o=!0;else if(!o)l.push(s[a]);else break;s=s.slice(a);let p=l.join(`
|
|
13
|
-
`),c=p.replace(this.rules.other.blockquoteSetextReplace,`
|
|
14
|
-
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");n=n?`${n}
|
|
15
|
-
${p}`:p,r=r?`${r}
|
|
16
|
-
${c}`:c;let d=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(c,i,!0),this.lexer.state.top=d,s.length===0)break;let b=i.at(-1);if(b?.type==="code")break;if(b?.type==="blockquote"){let x=b,m=x.raw+`
|
|
17
|
-
`+s.join(`
|
|
18
|
-
`),$=this.blockquote(m);i[i.length-1]=$,n=n.substring(0,n.length-x.raw.length)+$.raw,r=r.substring(0,r.length-x.text.length)+$.text;break}else if(b?.type==="list"){let x=b,m=x.raw+`
|
|
19
|
-
`+s.join(`
|
|
20
|
-
`),$=this.list(m);i[i.length-1]=$,n=n.substring(0,n.length-b.raw.length)+$.raw,r=r.substring(0,r.length-x.raw.length)+$.raw,s=m.substring(i.at(-1).raw.length).split(`
|
|
21
|
-
`);continue}}return{type:"blockquote",raw:n,tokens:i,text:r}}}list(e){let t=this.rules.block.list.exec(e);if(t){let s=t[1].trim(),n=s.length>1,r={type:"list",raw:"",ordered:n,start:n?+s.slice(0,-1):"",loose:!1,items:[]};s=n?`\\d{1,9}\\${s.slice(-1)}`:`\\${s}`,this.options.pedantic&&(s=n?s:"[*+-]");let i=this.rules.other.listItemRegex(s),o=!1;for(;e;){let a=!1,p="",c="";if(!(t=i.exec(e))||this.rules.block.hr.test(e))break;p=t[0],e=e.substring(p.length);let d=xf(t[2].split(`
|
|
22
|
-
`,1)[0],t[1].length),b=e.split(`
|
|
23
|
-
`,1)[0],x=!d.trim(),m=0;if(this.options.pedantic?(m=2,c=d.trimStart()):x?m=t[1].length+1:(m=d.search(this.rules.other.nonSpaceChar),m=m>4?1:m,c=d.slice(m),m+=t[1].length),x&&this.rules.other.blankLine.test(b)&&(p+=b+`
|
|
24
|
-
`,e=e.substring(b.length+1),a=!0),!a){let $=this.rules.other.nextBulletRegex(m),A=this.rules.other.hrRegex(m),R=this.rules.other.fencesBeginRegex(m),I=this.rules.other.headingBeginRegex(m),N=this.rules.other.htmlBeginRegex(m),B=this.rules.other.blockquoteBeginRegex(m);for(;e;){let C=e.split(`
|
|
25
|
-
`,1)[0],w;if(b=C,this.options.pedantic?(b=b.replace(this.rules.other.listReplaceNesting," "),w=b):w=b.replace(this.rules.other.tabCharGlobal," "),R.test(b)||I.test(b)||N.test(b)||B.test(b)||$.test(b)||A.test(b))break;if(w.search(this.rules.other.nonSpaceChar)>=m||!b.trim())c+=`
|
|
26
|
-
`+w.slice(m);else{if(x||d.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||R.test(d)||I.test(d)||A.test(d))break;c+=`
|
|
27
|
-
`+b}x=!b.trim(),p+=C+`
|
|
28
|
-
`,e=e.substring(C.length+1),d=w.slice(m)}}r.loose||(o?r.loose=!0:this.rules.other.doubleBlankLine.test(p)&&(o=!0)),r.items.push({type:"list_item",raw:p,task:!!this.options.gfm&&this.rules.other.listIsTask.test(c),loose:!1,text:c,tokens:[]}),r.raw+=p}let l=r.items.at(-1);if(l)l.raw=l.raw.trimEnd(),l.text=l.text.trimEnd();else return;r.raw=r.raw.trimEnd();for(let a of r.items){if(this.lexer.state.top=!1,a.tokens=this.lexer.blockTokens(a.text,[]),a.task){if(a.text=a.text.replace(this.rules.other.listReplaceTask,""),a.tokens[0]?.type==="text"||a.tokens[0]?.type==="paragraph"){a.tokens[0].raw=a.tokens[0].raw.replace(this.rules.other.listReplaceTask,""),a.tokens[0].text=a.tokens[0].text.replace(this.rules.other.listReplaceTask,"");for(let c=this.lexer.inlineQueue.length-1;c>=0;c--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[c].src)){this.lexer.inlineQueue[c].src=this.lexer.inlineQueue[c].src.replace(this.rules.other.listReplaceTask,"");break}}let p=this.rules.other.listTaskCheckbox.exec(a.raw);if(p){let c={type:"checkbox",raw:p[0]+" ",checked:p[0]!=="[ ]"};a.checked=c.checked,r.loose?a.tokens[0]&&["paragraph","text"].includes(a.tokens[0].type)&&"tokens"in a.tokens[0]&&a.tokens[0].tokens?(a.tokens[0].raw=c.raw+a.tokens[0].raw,a.tokens[0].text=c.raw+a.tokens[0].text,a.tokens[0].tokens.unshift(c)):a.tokens.unshift({type:"paragraph",raw:c.raw,text:c.raw,tokens:[c]}):a.tokens.unshift(c)}}if(!r.loose){let p=a.tokens.filter(d=>d.type==="space"),c=p.length>0&&p.some(d=>this.rules.other.anyLine.test(d.raw));r.loose=c}}if(r.loose)for(let a of r.items){a.loose=!0;for(let p of a.tokens)p.type==="text"&&(p.type="paragraph")}return r}}html(e){let t=this.rules.block.html.exec(e);if(t)return{type:"html",block:!0,raw:t[0],pre:t[1]==="pre"||t[1]==="script"||t[1]==="style",text:t[0]}}def(e){let t=this.rules.block.def.exec(e);if(t){let s=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),n=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",r=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:s,raw:t[0],href:n,title:r}}}table(e){let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let s=Bi(t[1]),n=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),r=t[3]?.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
29
|
-
`):[],i={type:"table",raw:t[0],header:[],align:[],rows:[]};if(s.length===n.length){for(let o of n)this.rules.other.tableAlignRight.test(o)?i.align.push("right"):this.rules.other.tableAlignCenter.test(o)?i.align.push("center"):this.rules.other.tableAlignLeft.test(o)?i.align.push("left"):i.align.push(null);for(let o=0;o<s.length;o++)i.header.push({text:s[o],tokens:this.lexer.inline(s[o]),header:!0,align:i.align[o]});for(let o of r)i.rows.push(Bi(o,i.header.length).map((l,a)=>({text:l,tokens:this.lexer.inline(l),header:!1,align:i.align[a]})));return i}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:t[2].charAt(0)==="="?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let s=t[1].charAt(t[1].length-1)===`
|
|
30
|
-
`?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:s,tokens:this.lexer.inline(s)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let s=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(s)){if(!this.rules.other.endAngleBracket.test(s))return;let i=os(s.slice(0,-1),"\\");if((s.length-i.length)%2===0)return}else{let i=vf(t[2],"()");if(i===-2)return;if(i>-1){let o=(t[0].indexOf("!")===0?5:4)+t[1].length+i;t[2]=t[2].substring(0,i),t[0]=t[0].substring(0,o).trim(),t[3]=""}}let n=t[2],r="";if(this.options.pedantic){let i=this.rules.other.pedanticHrefTitle.exec(n);i&&(n=i[1],r=i[3])}else r=t[3]?t[3].slice(1,-1):"";return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(s)?n=n.slice(1):n=n.slice(1,-1)),Ui(t,{href:n&&n.replace(this.rules.inline.anyPunctuation,"$1"),title:r&&r.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer,this.rules)}}reflink(e,t){let s;if((s=this.rules.inline.reflink.exec(e))||(s=this.rules.inline.nolink.exec(e))){let n=(s[2]||s[1]).replace(this.rules.other.multipleSpaceGlobal," "),r=t[n.toLowerCase()];if(!r){let i=s[0].charAt(0);return{type:"text",raw:i,text:i}}return Ui(s,r,s[0],this.lexer,this.rules)}}emStrong(e,t,s=""){let n=this.rules.inline.emStrongLDelim.exec(e);if(!(!n||n[3]&&s.match(this.rules.other.unicodeAlphaNumeric))&&(!(n[1]||n[2])||!s||this.rules.inline.punctuation.exec(s))){let r=[...n[0]].length-1,i,o,l=r,a=0,p=n[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(p.lastIndex=0,t=t.slice(-1*e.length+r);(n=p.exec(t))!=null;){if(i=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!i)continue;if(o=[...i].length,n[3]||n[4]){l+=o;continue}else if((n[5]||n[6])&&r%3&&!((r+o)%3)){a+=o;continue}if(l-=o,l>0)continue;o=Math.min(o,o+l+a);let c=[...n[0]][0].length,d=e.slice(0,r+n.index+c+o);if(Math.min(r,o)%2){let x=d.slice(1,-1);return{type:"em",raw:d,text:x,tokens:this.lexer.inlineTokens(x)}}let b=d.slice(2,-2);return{type:"strong",raw:d,text:b,tokens:this.lexer.inlineTokens(b)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let s=t[2].replace(this.rules.other.newLineCharGlobal," "),n=this.rules.other.nonSpaceChar.test(s),r=this.rules.other.startingSpaceChar.test(s)&&this.rules.other.endingSpaceChar.test(s);return n&&r&&(s=s.substring(1,s.length-1)),{type:"codespan",raw:t[0],text:s}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e,t,s=""){let n=this.rules.inline.delLDelim.exec(e);if(n&&(!n[1]||!s||this.rules.inline.punctuation.exec(s))){let r=[...n[0]].length-1,i,o,l=r,a=this.rules.inline.delRDelim;for(a.lastIndex=0,t=t.slice(-1*e.length+r);(n=a.exec(t))!=null;){if(i=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!i||(o=[...i].length,o!==r))continue;if(n[3]||n[4]){l+=o;continue}if(l-=o,l>0)continue;o=Math.min(o,o+l);let p=[...n[0]][0].length,c=e.slice(0,r+n.index+p+o),d=c.slice(r,-r);return{type:"del",raw:c,text:d,tokens:this.lexer.inlineTokens(d)}}}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let s,n;return t[2]==="@"?(s=t[1],n="mailto:"+s):(s=t[1],n=s),{type:"link",raw:t[0],text:s,href:n,tokens:[{type:"text",raw:s,text:s}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let s,n;if(t[2]==="@")s=t[0],n="mailto:"+s;else{let r;do r=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??"";while(r!==t[0]);s=t[0],t[1]==="www."?n="http://"+t[0]:n=t[0]}return{type:"link",raw:t[0],text:s,href:n,tokens:[{type:"text",raw:s,text:s}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let s=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:s}}}},ze=class Xn{tokens;options;state;inlineQueue;tokenizer;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||Ut,this.options.tokenizer=this.options.tokenizer||new tn,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let s={other:Le,block:Ms.normal,inline:is.normal};this.options.pedantic?(s.block=Ms.pedantic,s.inline=is.pedantic):this.options.gfm&&(s.block=Ms.gfm,this.options.breaks?s.inline=is.breaks:s.inline=is.gfm),this.tokenizer.rules=s}static get rules(){return{block:Ms,inline:is}}static lex(t,s){return new Xn(s).lex(t)}static lexInline(t,s){return new Xn(s).inlineTokens(t)}lex(t){t=t.replace(Le.carriageReturn,`
|
|
31
|
-
`),this.blockTokens(t,this.tokens);for(let s=0;s<this.inlineQueue.length;s++){let n=this.inlineQueue[s];this.inlineTokens(n.src,n.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,s=[],n=!1){for(this.options.pedantic&&(t=t.replace(Le.tabCharGlobal," ").replace(Le.spaceLine,""));t;){let r;if(this.options.extensions?.block?.some(o=>(r=o.call({lexer:this},t,s))?(t=t.substring(r.raw.length),s.push(r),!0):!1))continue;if(r=this.tokenizer.space(t)){t=t.substring(r.raw.length);let o=s.at(-1);r.raw.length===1&&o!==void 0?o.raw+=`
|
|
32
|
-
`:s.push(r);continue}if(r=this.tokenizer.code(t)){t=t.substring(r.raw.length);let o=s.at(-1);o?.type==="paragraph"||o?.type==="text"?(o.raw+=(o.raw.endsWith(`
|
|
33
|
-
`)?"":`
|
|
34
|
-
`)+r.raw,o.text+=`
|
|
35
|
-
`+r.text,this.inlineQueue.at(-1).src=o.text):s.push(r);continue}if(r=this.tokenizer.fences(t)){t=t.substring(r.raw.length),s.push(r);continue}if(r=this.tokenizer.heading(t)){t=t.substring(r.raw.length),s.push(r);continue}if(r=this.tokenizer.hr(t)){t=t.substring(r.raw.length),s.push(r);continue}if(r=this.tokenizer.blockquote(t)){t=t.substring(r.raw.length),s.push(r);continue}if(r=this.tokenizer.list(t)){t=t.substring(r.raw.length),s.push(r);continue}if(r=this.tokenizer.html(t)){t=t.substring(r.raw.length),s.push(r);continue}if(r=this.tokenizer.def(t)){t=t.substring(r.raw.length);let o=s.at(-1);o?.type==="paragraph"||o?.type==="text"?(o.raw+=(o.raw.endsWith(`
|
|
36
|
-
`)?"":`
|
|
37
|
-
`)+r.raw,o.text+=`
|
|
38
|
-
`+r.raw,this.inlineQueue.at(-1).src=o.text):this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title},s.push(r));continue}if(r=this.tokenizer.table(t)){t=t.substring(r.raw.length),s.push(r);continue}if(r=this.tokenizer.lheading(t)){t=t.substring(r.raw.length),s.push(r);continue}let i=t;if(this.options.extensions?.startBlock){let o=1/0,l=t.slice(1),a;this.options.extensions.startBlock.forEach(p=>{a=p.call({lexer:this},l),typeof a=="number"&&a>=0&&(o=Math.min(o,a))}),o<1/0&&o>=0&&(i=t.substring(0,o+1))}if(this.state.top&&(r=this.tokenizer.paragraph(i))){let o=s.at(-1);n&&o?.type==="paragraph"?(o.raw+=(o.raw.endsWith(`
|
|
39
|
-
`)?"":`
|
|
40
|
-
`)+r.raw,o.text+=`
|
|
41
|
-
`+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=o.text):s.push(r),n=i.length!==t.length,t=t.substring(r.raw.length);continue}if(r=this.tokenizer.text(t)){t=t.substring(r.raw.length);let o=s.at(-1);o?.type==="text"?(o.raw+=(o.raw.endsWith(`
|
|
42
|
-
`)?"":`
|
|
43
|
-
`)+r.raw,o.text+=`
|
|
44
|
-
`+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=o.text):s.push(r);continue}if(t){let o="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(o);break}else throw new Error(o)}}return this.state.top=!0,s}inline(t,s=[]){return this.inlineQueue.push({src:t,tokens:s}),s}inlineTokens(t,s=[]){let n=t,r=null;if(this.tokens.links){let a=Object.keys(this.tokens.links);if(a.length>0)for(;(r=this.tokenizer.rules.inline.reflinkSearch.exec(n))!=null;)a.includes(r[0].slice(r[0].lastIndexOf("[")+1,-1))&&(n=n.slice(0,r.index)+"["+"a".repeat(r[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(r=this.tokenizer.rules.inline.anyPunctuation.exec(n))!=null;)n=n.slice(0,r.index)+"++"+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let i;for(;(r=this.tokenizer.rules.inline.blockSkip.exec(n))!=null;)i=r[2]?r[2].length:0,n=n.slice(0,r.index+i)+"["+"a".repeat(r[0].length-i-2)+"]"+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);n=this.options.hooks?.emStrongMask?.call({lexer:this},n)??n;let o=!1,l="";for(;t;){o||(l=""),o=!1;let a;if(this.options.extensions?.inline?.some(c=>(a=c.call({lexer:this},t,s))?(t=t.substring(a.raw.length),s.push(a),!0):!1))continue;if(a=this.tokenizer.escape(t)){t=t.substring(a.raw.length),s.push(a);continue}if(a=this.tokenizer.tag(t)){t=t.substring(a.raw.length),s.push(a);continue}if(a=this.tokenizer.link(t)){t=t.substring(a.raw.length),s.push(a);continue}if(a=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(a.raw.length);let c=s.at(-1);a.type==="text"&&c?.type==="text"?(c.raw+=a.raw,c.text+=a.text):s.push(a);continue}if(a=this.tokenizer.emStrong(t,n,l)){t=t.substring(a.raw.length),s.push(a);continue}if(a=this.tokenizer.codespan(t)){t=t.substring(a.raw.length),s.push(a);continue}if(a=this.tokenizer.br(t)){t=t.substring(a.raw.length),s.push(a);continue}if(a=this.tokenizer.del(t,n,l)){t=t.substring(a.raw.length),s.push(a);continue}if(a=this.tokenizer.autolink(t)){t=t.substring(a.raw.length),s.push(a);continue}if(!this.state.inLink&&(a=this.tokenizer.url(t))){t=t.substring(a.raw.length),s.push(a);continue}let p=t;if(this.options.extensions?.startInline){let c=1/0,d=t.slice(1),b;this.options.extensions.startInline.forEach(x=>{b=x.call({lexer:this},d),typeof b=="number"&&b>=0&&(c=Math.min(c,b))}),c<1/0&&c>=0&&(p=t.substring(0,c+1))}if(a=this.tokenizer.inlineText(p)){t=t.substring(a.raw.length),a.raw.slice(-1)!=="_"&&(l=a.raw.slice(-1)),o=!0;let c=s.at(-1);c?.type==="text"?(c.raw+=a.raw,c.text+=a.text):s.push(a);continue}if(t){let c="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(c);break}else throw new Error(c)}}return s}},sn=class{options;parser;constructor(e){this.options=e||Ut}space(e){return""}code({text:e,lang:t,escaped:s}){let n=(t||"").match(Le.notSpaceStart)?.[0],r=e.replace(Le.endingNewline,"")+`
|
|
45
|
-
`;return n?'<pre><code class="language-'+et(n)+'">'+(s?r:et(r,!0))+`</code></pre>
|
|
46
|
-
`:"<pre><code>"+(s?r:et(r,!0))+`</code></pre>
|
|
47
|
-
`}blockquote({tokens:e}){return`<blockquote>
|
|
48
|
-
${this.parser.parse(e)}</blockquote>
|
|
49
|
-
`}html({text:e}){return e}def(e){return""}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>
|
|
50
|
-
`}hr(e){return`<hr>
|
|
51
|
-
`}list(e){let t=e.ordered,s=e.start,n="";for(let o=0;o<e.items.length;o++){let l=e.items[o];n+=this.listitem(l)}let r=t?"ol":"ul",i=t&&s!==1?' start="'+s+'"':"";return"<"+r+i+`>
|
|
52
|
-
`+n+"</"+r+`>
|
|
53
|
-
`}listitem(e){return`<li>${this.parser.parse(e.tokens)}</li>
|
|
54
|
-
`}checkbox({checked:e}){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>
|
|
55
|
-
`}table(e){let t="",s="";for(let r=0;r<e.header.length;r++)s+=this.tablecell(e.header[r]);t+=this.tablerow({text:s});let n="";for(let r=0;r<e.rows.length;r++){let i=e.rows[r];s="";for(let o=0;o<i.length;o++)s+=this.tablecell(i[o]);n+=this.tablerow({text:s})}return n&&(n=`<tbody>${n}</tbody>`),`<table>
|
|
56
|
-
<thead>
|
|
57
|
-
`+t+`</thead>
|
|
58
|
-
`+n+`</table>
|
|
59
|
-
`}tablerow({text:e}){return`<tr>
|
|
60
|
-
${e}</tr>
|
|
61
|
-
`}tablecell(e){let t=this.parser.parseInline(e.tokens),s=e.header?"th":"td";return(e.align?`<${s} align="${e.align}">`:`<${s}>`)+t+`</${s}>
|
|
62
|
-
`}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${et(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:s}){let n=this.parser.parseInline(s),r=Ni(e);if(r===null)return n;e=r;let i='<a href="'+e+'"';return t&&(i+=' title="'+et(t)+'"'),i+=">"+n+"</a>",i}image({href:e,title:t,text:s,tokens:n}){n&&(s=this.parser.parseInline(n,this.parser.textRenderer));let r=Ni(e);if(r===null)return et(s);e=r;let i=`<img src="${e}" alt="${et(s)}"`;return t&&(i+=` title="${et(t)}"`),i+=">",i}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:et(e.text)}},Rr=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}checkbox({raw:e}){return e}},qe=class er{options;renderer;textRenderer;constructor(t){this.options=t||Ut,this.options.renderer=this.options.renderer||new sn,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Rr}static parse(t,s){return new er(s).parse(t)}static parseInline(t,s){return new er(s).parseInline(t)}parse(t){let s="";for(let n=0;n<t.length;n++){let r=t[n];if(this.options.extensions?.renderers?.[r.type]){let o=r,l=this.options.extensions.renderers[o.type].call({parser:this},o);if(l!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(o.type)){s+=l||"";continue}}let i=r;switch(i.type){case"space":{s+=this.renderer.space(i);break}case"hr":{s+=this.renderer.hr(i);break}case"heading":{s+=this.renderer.heading(i);break}case"code":{s+=this.renderer.code(i);break}case"table":{s+=this.renderer.table(i);break}case"blockquote":{s+=this.renderer.blockquote(i);break}case"list":{s+=this.renderer.list(i);break}case"checkbox":{s+=this.renderer.checkbox(i);break}case"html":{s+=this.renderer.html(i);break}case"def":{s+=this.renderer.def(i);break}case"paragraph":{s+=this.renderer.paragraph(i);break}case"text":{s+=this.renderer.text(i);break}default:{let o='Token with "'+i.type+'" type was not found.';if(this.options.silent)return console.error(o),"";throw new Error(o)}}}return s}parseInline(t,s=this.renderer){let n="";for(let r=0;r<t.length;r++){let i=t[r];if(this.options.extensions?.renderers?.[i.type]){let l=this.options.extensions.renderers[i.type].call({parser:this},i);if(l!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(i.type)){n+=l||"";continue}}let o=i;switch(o.type){case"escape":{n+=s.text(o);break}case"html":{n+=s.html(o);break}case"link":{n+=s.link(o);break}case"image":{n+=s.image(o);break}case"checkbox":{n+=s.checkbox(o);break}case"strong":{n+=s.strong(o);break}case"em":{n+=s.em(o);break}case"codespan":{n+=s.codespan(o);break}case"br":{n+=s.br(o);break}case"del":{n+=s.del(o);break}case"text":{n+=s.text(o);break}default:{let l='Token with "'+o.type+'" type was not found.';if(this.options.silent)return console.error(l),"";throw new Error(l)}}}return n}},as=class{options;block;constructor(e){this.options=e||Ut}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(){return this.block?ze.lex:ze.lexInline}provideParser(){return this.block?qe.parse:qe.parseInline}},kf=class{defaults=kr();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=qe;Renderer=sn;TextRenderer=Rr;Lexer=ze;Tokenizer=tn;Hooks=as;constructor(...e){this.use(...e)}walkTokens(e,t){let s=[];for(let n of e)switch(s=s.concat(t.call(this,n)),n.type){case"table":{let r=n;for(let i of r.header)s=s.concat(this.walkTokens(i.tokens,t));for(let i of r.rows)for(let o of i)s=s.concat(this.walkTokens(o.tokens,t));break}case"list":{let r=n;s=s.concat(this.walkTokens(r.items,t));break}default:{let r=n;this.defaults.extensions?.childTokens?.[r.type]?this.defaults.extensions.childTokens[r.type].forEach(i=>{let o=r[i].flat(1/0);s=s.concat(this.walkTokens(o,t))}):r.tokens&&(s=s.concat(this.walkTokens(r.tokens,t)))}}return s}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(s=>{let n={...s};if(n.async=this.defaults.async||n.async||!1,s.extensions&&(s.extensions.forEach(r=>{if(!r.name)throw new Error("extension name required");if("renderer"in r){let i=t.renderers[r.name];i?t.renderers[r.name]=function(...o){let l=r.renderer.apply(this,o);return l===!1&&(l=i.apply(this,o)),l}:t.renderers[r.name]=r.renderer}if("tokenizer"in r){if(!r.level||r.level!=="block"&&r.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let i=t[r.level];i?i.unshift(r.tokenizer):t[r.level]=[r.tokenizer],r.start&&(r.level==="block"?t.startBlock?t.startBlock.push(r.start):t.startBlock=[r.start]:r.level==="inline"&&(t.startInline?t.startInline.push(r.start):t.startInline=[r.start]))}"childTokens"in r&&r.childTokens&&(t.childTokens[r.name]=r.childTokens)}),n.extensions=t),s.renderer){let r=this.defaults.renderer||new sn(this.defaults);for(let i in s.renderer){if(!(i in r))throw new Error(`renderer '${i}' does not exist`);if(["options","parser"].includes(i))continue;let o=i,l=s.renderer[o],a=r[o];r[o]=(...p)=>{let c=l.apply(r,p);return c===!1&&(c=a.apply(r,p)),c||""}}n.renderer=r}if(s.tokenizer){let r=this.defaults.tokenizer||new tn(this.defaults);for(let i in s.tokenizer){if(!(i in r))throw new Error(`tokenizer '${i}' does not exist`);if(["options","rules","lexer"].includes(i))continue;let o=i,l=s.tokenizer[o],a=r[o];r[o]=(...p)=>{let c=l.apply(r,p);return c===!1&&(c=a.apply(r,p)),c}}n.tokenizer=r}if(s.hooks){let r=this.defaults.hooks||new as;for(let i in s.hooks){if(!(i in r))throw new Error(`hook '${i}' does not exist`);if(["options","block"].includes(i))continue;let o=i,l=s.hooks[o],a=r[o];as.passThroughHooks.has(i)?r[o]=p=>{if(this.defaults.async&&as.passThroughHooksRespectAsync.has(i))return(async()=>{let d=await l.call(r,p);return a.call(r,d)})();let c=l.call(r,p);return a.call(r,c)}:r[o]=(...p)=>{if(this.defaults.async)return(async()=>{let d=await l.apply(r,p);return d===!1&&(d=await a.apply(r,p)),d})();let c=l.apply(r,p);return c===!1&&(c=a.apply(r,p)),c}}n.hooks=r}if(s.walkTokens){let r=this.defaults.walkTokens,i=s.walkTokens;n.walkTokens=function(o){let l=[];return l.push(i.call(this,o)),r&&(l=l.concat(r.call(this,o))),l}}this.defaults={...this.defaults,...n}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return ze.lex(e,t??this.defaults)}parser(e,t){return qe.parse(e,t??this.defaults)}parseMarkdown(e){return(t,s)=>{let n={...s},r={...this.defaults,...n},i=this.onError(!!r.silent,!!r.async);if(this.defaults.async===!0&&n.async===!1)return i(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof t>"u"||t===null)return i(new Error("marked(): input parameter is undefined or null"));if(typeof t!="string")return i(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));if(r.hooks&&(r.hooks.options=r,r.hooks.block=e),r.async)return(async()=>{let o=r.hooks?await r.hooks.preprocess(t):t,l=await(r.hooks?await r.hooks.provideLexer():e?ze.lex:ze.lexInline)(o,r),a=r.hooks?await r.hooks.processAllTokens(l):l;r.walkTokens&&await Promise.all(this.walkTokens(a,r.walkTokens));let p=await(r.hooks?await r.hooks.provideParser():e?qe.parse:qe.parseInline)(a,r);return r.hooks?await r.hooks.postprocess(p):p})().catch(i);try{r.hooks&&(t=r.hooks.preprocess(t));let o=(r.hooks?r.hooks.provideLexer():e?ze.lex:ze.lexInline)(t,r);r.hooks&&(o=r.hooks.processAllTokens(o)),r.walkTokens&&this.walkTokens(o,r.walkTokens);let l=(r.hooks?r.hooks.provideParser():e?qe.parse:qe.parseInline)(o,r);return r.hooks&&(l=r.hooks.postprocess(l)),l}catch(o){return i(o)}}}onError(e,t){return s=>{if(s.message+=`
|
|
63
|
-
Please report this to https://github.com/markedjs/marked.`,e){let n="<p>An error occurred:</p><pre>"+et(s.message+"",!0)+"</pre>";return t?Promise.resolve(n):n}if(t)return Promise.reject(s);throw s}}},Ot=new kf;function ae(e,t){return Ot.parse(e,t)}ae.options=ae.setOptions=function(e){return Ot.setOptions(e),ae.defaults=Ot.defaults,sl(ae.defaults),ae};ae.getDefaults=kr;ae.defaults=Ut;ae.use=function(...e){return Ot.use(...e),ae.defaults=Ot.defaults,sl(ae.defaults),ae};ae.walkTokens=function(e,t){return Ot.walkTokens(e,t)};ae.parseInline=Ot.parseInline;ae.Parser=qe;ae.parser=qe.parse;ae.Renderer=sn;ae.TextRenderer=Rr;ae.Lexer=ze;ae.lexer=ze.lex;ae.Tokenizer=tn;ae.Hooks=as;ae.parse=ae;ae.options;ae.setOptions;ae.use;ae.walkTokens;ae.parseInline;qe.parse;ze.lex;const $f={class:"space-y-4"},Sf={class:"flex items-center justify-between"},_f={class:"flex items-center gap-3"},Cf={class:"text-sm font-medium text-gray-700"},If={key:0,class:"inline-flex items-center gap-1.5 text-sm text-amber-600"},Tf={class:"flex gap-2"},Pf={class:"grid grid-cols-1 lg:grid-cols-5 gap-4"},Rf={class:"lg:col-span-3 border border-gray-200 rounded-lg overflow-hidden"},Af={class:"bg-gray-50 px-4 py-2 border-b border-gray-200"},Df={class:"text-sm font-medium text-gray-700"},Lf={class:"p-4 max-h-[600px] overflow-y-auto"},Ef=["innerHTML"],Ff={key:1,class:"text-sm text-gray-600 whitespace-pre-wrap font-mono"},Mf={key:2,class:"text-sm text-gray-400 italic"},jf={class:"lg:col-span-2 border border-gray-200 rounded-lg overflow-hidden"},Of={class:"bg-gray-50 px-4 py-2 border-b border-gray-200"},Nf={class:"text-sm font-medium text-gray-700"},Bf={class:"p-4 max-h-[600px] overflow-y-auto"},Uf=["innerHTML"],Hf={key:1,class:"text-sm text-gray-600 whitespace-pre-wrap font-mono"},Vf={key:2,class:"text-sm text-gray-400 italic"},zf={key:0},qf={class:"group"},Gf={class:"cursor-pointer text-sm text-gray-500 hover:text-gray-700"},Kf={class:"mt-2 space-y-2"},Wf={class:"text-xs font-medium text-gray-500 mb-1"},Jf={class:"text-xs text-gray-600 line-clamp-3"},Zf=Te({__name:"SddViewer",props:{sdd:{},rounds:{},streamOutput:{},loading:{type:Boolean},status:{}},emits:["runReview","runRefine","runAutoRefine","abort","finish"],setup(e,{emit:t}){const{t:s}=Yt(),n=e,r=t,i=we(()=>n.sdd?ae(n.sdd):""),o=we(()=>{const a=n.rounds;return a.length>0?a[a.length-1].questions:""}),l=we(()=>o.value?ae(o.value):"");return(a,p)=>(v(),k("div",$f,[u("div",Sf,[u("div",_f,[u("span",Cf,g(f(s)("brainstorm.roundCount",{count:e.rounds.length})),1),e.loading?(v(),k("span",If,[p[4]||(p[4]=u("svg",{class:"animate-spin h-3.5 w-3.5",fill:"none",viewBox:"0 0 24 24"},[u("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}),u("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})],-1)),pe(" "+g(e.status==="generating"?f(s)("brainstorm.statusGenerating"):e.status==="reviewing"?f(s)("brainstorm.statusReviewing"):e.status==="refining"?f(s)("brainstorm.statusRefining"):f(s)("brainstorm.statusProcessing")),1)])):q("",!0)]),u("div",Tf,[e.loading?(v(),k("button",{key:0,class:"px-3 py-1.5 text-sm text-red-600 border border-red-300 rounded-lg hover:bg-red-50",onClick:p[0]||(p[0]=c=>r("abort"))},g(f(s)("brainstorm.abort")),1)):q("",!0),!e.loading&&e.sdd&&e.status!=="done"?(v(),k("button",{key:1,class:"px-3 py-1.5 text-sm text-gray-700 border border-gray-300 rounded-lg hover:bg-gray-50",onClick:p[1]||(p[1]=c=>r("runReview"))},g(f(s)("brainstorm.manualReview")),1)):q("",!0),!e.loading&&e.rounds.length>0&&o.value&&!e.rounds[e.rounds.length-1].refinedSdd?(v(),k("button",{key:2,class:"px-3 py-1.5 text-sm text-gray-700 border border-gray-300 rounded-lg hover:bg-gray-50",onClick:p[2]||(p[2]=c=>r("runRefine"))},g(f(s)("brainstorm.manualRefine")),1)):q("",!0),!e.loading&&e.sdd?(v(),k("button",{key:3,class:"px-3 py-1.5 text-sm bg-gray-800 text-white rounded-lg hover:bg-gray-700",onClick:p[3]||(p[3]=c=>r("finish"))},g(f(s)("brainstorm.finishAndCreate")),1)):q("",!0)])]),u("div",Pf,[u("div",Rf,[u("div",Af,[u("h3",Df,g(f(s)("brainstorm.sddTitle")),1)]),u("div",Lf,[i.value?(v(),k("div",{key:0,class:"prose prose-sm max-w-none",innerHTML:i.value},null,8,Ef)):e.loading&&e.streamOutput?(v(),k("div",Ff,g(e.streamOutput),1)):(v(),k("div",Mf,g(f(s)("brainstorm.sddEmpty")),1))])]),u("div",jf,[u("div",Of,[u("h3",Nf,g(f(s)("brainstorm.questionsTitle")),1)]),u("div",Bf,[l.value?(v(),k("div",{key:0,class:"prose prose-sm max-w-none",innerHTML:l.value},null,8,Uf)):e.loading&&e.status==="reviewing"&&e.streamOutput?(v(),k("div",Hf,g(e.streamOutput),1)):(v(),k("div",Vf,g(f(s)("brainstorm.questionsEmpty")),1))])])]),e.rounds.length>1?(v(),k("div",zf,[u("details",qf,[u("summary",Gf,g(f(s)("brainstorm.roundHistory")),1),u("div",Kf,[(v(!0),k(te,null,Ie(e.rounds,c=>(v(),k("div",{key:c.round,class:"border border-gray-100 rounded-lg p-3"},[u("div",Wf,g(f(s)("brainstorm.roundLabel",{n:c.round})),1),u("div",Jf,g(c.questions.slice(0,200))+g(c.questions.length>200?"...":""),1)]))),128))])])])):q("",!0)]))}}),Qf={class:"space-y-6"},Yf={class:"flex items-center gap-2 text-sm"},Xf={key:0},eg={key:1},tg={key:2,class:"space-y-4"},sg={class:"block text-sm font-medium text-gray-700 mb-1"},ng=["placeholder"],rg={class:"flex items-center gap-2"},ig={for:"auto-finish-label",class:"text-sm text-gray-700"},og={class:"border border-gray-200 rounded-lg overflow-hidden"},lg={class:"bg-gray-50 px-4 py-2 border-b border-gray-200 flex items-center justify-between"},ag={class:"text-sm font-medium text-gray-700"},ug={class:"p-4 max-h-96 overflow-y-auto"},cg={class:"text-xs text-gray-700 whitespace-pre-wrap"},dg={class:"flex justify-end gap-3"},pg=["disabled"],fg=["disabled"],gg={key:1,class:"bg-green-50 border border-green-200 rounded-lg p-6 text-center"},hg={class:"text-lg font-medium text-green-800 mb-1"},mg={class:"text-sm text-green-600"},bg={class:"mt-4"},yg={key:3,class:"bg-red-50 border border-red-200 rounded-lg p-3 text-sm text-red-700"},vg=Te({__name:"BrainstormPanel",setup(e){const{t}=Yt(),{step:s,loading:n,error:r,streamOutput:i,createdIssue:o,currentSdd:l,rounds:a,status:p,startSession:c,runSingleReview:d,runSingleRefine:b,runAutoRefine:x,createIssue:m,abort:$,reset:A}=yp(),R=V(""),I=V(!0);function N(_){c(_)}function B(){s.value="complete"}async function C(_){await m(R.value,_?!0:I.value)}function w(){A(),R.value="",I.value=!0}return(_,D)=>(v(),k("div",Qf,[u("div",Yf,[u("span",{class:ee(["inline-flex items-center justify-center w-6 h-6 rounded-full text-xs font-medium",f(s)==="input"?"bg-gray-800 text-white":"bg-gray-200 text-gray-500"])},"1",2),u("span",{class:ee(f(s)==="input"?"text-gray-800 font-medium":"text-gray-400")},g(f(t)("brainstorm.step1")),3),D[6]||(D[6]=u("svg",{class:"w-4 h-4 text-gray-300",fill:"currentColor",viewBox:"0 0 20 20"},[u("path",{"fill-rule":"evenodd",d:"M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z","clip-rule":"evenodd"})],-1)),u("span",{class:ee(["inline-flex items-center justify-center w-6 h-6 rounded-full text-xs font-medium",f(s)==="refine"?"bg-gray-800 text-white":"bg-gray-200 text-gray-500"])},"2",2),u("span",{class:ee(f(s)==="refine"?"text-gray-800 font-medium":"text-gray-400")},g(f(t)("brainstorm.step2")),3),D[7]||(D[7]=u("svg",{class:"w-4 h-4 text-gray-300",fill:"currentColor",viewBox:"0 0 20 20"},[u("path",{"fill-rule":"evenodd",d:"M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z","clip-rule":"evenodd"})],-1)),u("span",{class:ee(["inline-flex items-center justify-center w-6 h-6 rounded-full text-xs font-medium",f(s)==="complete"?"bg-gray-800 text-white":"bg-gray-200 text-gray-500"])},"3",2),u("span",{class:ee(f(s)==="complete"?"text-gray-800 font-medium":"text-gray-400")},g(f(t)("brainstorm.step3")),3)]),f(s)==="input"?(v(),k("div",Xf,[be(Dp,{onSubmit:N})])):q("",!0),f(s)==="refine"?(v(),k("div",eg,[be(Zf,{sdd:f(l),rounds:f(a),"stream-output":f(i),loading:f(n),status:f(p),onRunReview:f(d),onRunRefine:f(b),onRunAutoRefine:D[0]||(D[0]=S=>f(x)()),onAbort:f($),onFinish:B},null,8,["sdd","rounds","stream-output","loading","status","onRunReview","onRunRefine","onAbort"])])):q("",!0),f(s)==="complete"?(v(),k("div",tg,[f(o)?(v(),k("div",gg,[D[8]||(D[8]=u("svg",{class:"w-12 h-12 mx-auto text-green-500 mb-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[u("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"})],-1)),u("h3",hg,g(f(t)("brainstorm.issueCreated")),1),u("p",mg," Issue #"+g(f(o).iid)+" — "+g(f(o).title),1),u("div",bg,[u("button",{class:"px-4 py-2 text-sm bg-gray-800 text-white rounded-lg hover:bg-gray-700",onClick:w},g(f(t)("brainstorm.startNew")),1)])])):(v(),k(te,{key:0},[u("div",null,[u("label",sg,g(f(t)("brainstorm.issueTitleLabel")),1),he(u("input",{"onUpdate:modelValue":D[1]||(D[1]=S=>R.value=S),type:"text",class:"w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:ring-2 focus:ring-gray-800 focus:border-transparent",placeholder:f(t)("brainstorm.issueTitlePlaceholder")},null,8,ng),[[xe,R.value]])]),u("div",rg,[he(u("input",{id:"auto-finish-label","onUpdate:modelValue":D[2]||(D[2]=S=>I.value=S),type:"checkbox",class:"rounded"},null,512),[[Ys,I.value]]),u("label",ig,g(f(t)("brainstorm.addAutoFinishLabel")),1)]),u("div",og,[u("div",lg,[u("h3",ag,g(f(t)("brainstorm.sddPreview")),1),u("button",{class:"text-sm text-gray-500 hover:text-gray-700",onClick:D[3]||(D[3]=S=>s.value="refine")},g(f(t)("brainstorm.backToRefine")),1)]),u("div",ug,[u("pre",cg,g(f(l)),1)])]),u("div",dg,[u("button",{class:"px-4 py-2 text-sm text-gray-700 border border-gray-300 rounded-lg hover:bg-gray-50",disabled:f(n),onClick:D[4]||(D[4]=S=>C(!1))},g(f(t)("brainstorm.createIssueOnly")),9,pg),u("button",{class:"px-4 py-2 text-sm bg-gray-800 text-white rounded-lg hover:bg-gray-700 disabled:opacity-50",disabled:f(n),onClick:D[5]||(D[5]=S=>C(!0))},g(f(n)?f(t)("brainstorm.creating"):f(t)("brainstorm.createAndStart")),9,fg)])],64))])):q("",!0),f(r)?(v(),k("div",yg,g(f(r)),1)):q("",!0)]))}}),xg={key:0,class:"fixed inset-0 z-50 flex items-center justify-center"},wg={class:"relative bg-white rounded-xl shadow-2xl w-full max-w-xl max-h-[90vh] overflow-y-auto"},kg={class:"sticky top-0 bg-white border-b border-gray-200 px-6 py-4 flex items-center justify-between z-10 rounded-t-xl"},$g={class:"text-lg font-bold text-gray-800"},Sg={class:"px-6 py-4 space-y-4"},_g={class:"text-sm text-gray-500 mb-1"},Cg={class:"text-sm font-medium text-gray-800"},Ig={key:0},Tg={class:"text-sm text-gray-500 mb-1"},Pg={class:"text-sm text-gray-600 bg-gray-50 rounded-lg p-3 max-h-32 overflow-y-auto whitespace-pre-wrap"},Rg={class:"border-t border-gray-200 pt-4"},Ag={class:"text-sm font-semibold text-gray-700 mb-3"},Dg={class:"space-y-3"},Lg={class:"block text-xs font-medium text-gray-600 mb-1"},Eg=["value","placeholder"],Fg={class:"block text-xs font-medium text-gray-600 mb-1"},Mg=["value","placeholder"],jg={class:"block text-xs font-medium text-gray-600 mb-1"},Og=["value","placeholder"],Ng={class:"block text-xs font-medium text-gray-600 mb-1"},Bg=["value","placeholder"],Ug={class:"block text-xs font-medium text-gray-600 mb-1"},Hg=["value","placeholder"],Vg={class:"block text-xs font-medium text-gray-600 mb-1"},zg=["value","placeholder"],qg={class:"block text-xs font-medium text-gray-600 mb-1"},Gg=["value","placeholder"],Kg={class:"sticky bottom-0 bg-white border-t border-gray-200 px-6 py-4 flex justify-end space-x-3 rounded-b-xl"},Wg=["disabled"],Jg=Te({__name:"StartDialog",props:{issue:{},supplement:{},processing:{type:Boolean}},emits:["close","start","update:supplement"],setup(e,{emit:t}){const s=e,n=t;function r(i,o){n("update:supplement",{...s.supplement,[i]:o})}return(i,o)=>(v(),ft(wr,{name:"fade"},{default:pn(()=>[e.issue?(v(),k("div",xg,[u("div",{class:"absolute inset-0 bg-black/30",onClick:o[0]||(o[0]=l=>n("close"))}),u("div",wg,[u("div",kg,[u("h2",$g,g(i.$t("start.title",{iid:e.issue.iid})),1),u("button",{class:"text-gray-400 hover:text-gray-600 text-2xl leading-none",onClick:o[1]||(o[1]=l=>n("close"))},"×")]),u("div",Sg,[u("div",null,[u("div",_g,g(i.$t("start.issueTitle")),1),u("div",Cg,g(e.issue.title),1)]),e.issue.description?(v(),k("div",Ig,[u("div",Tg,g(i.$t("start.descPreview")),1),u("div",Pg,g(e.issue.description?.slice(0,500))+g((e.issue.description?.length||0)>500?"...":""),1)])):q("",!0),u("div",Rg,[u("h3",Ag,g(i.$t("start.supplement")),1),u("div",Dg,[u("div",null,[u("label",Lg,g(i.$t("start.requirements")),1),u("textarea",{value:e.supplement.requirements,onInput:o[2]||(o[2]=l=>r("requirements",l.target.value)),rows:"2",class:"w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-blue-400",placeholder:i.$t("start.requirementsPlaceholder")},null,40,Eg)]),u("div",null,[u("label",Fg,g(i.$t("start.acceptance")),1),u("textarea",{value:e.supplement.acceptanceCriteria,onInput:o[3]||(o[3]=l=>r("acceptanceCriteria",l.target.value)),rows:"2",class:"w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-blue-400",placeholder:i.$t("start.acceptancePlaceholder")},null,40,Mg)]),u("div",null,[u("label",jg,g(i.$t("start.scope")),1),u("input",{value:e.supplement.scope,onInput:o[4]||(o[4]=l=>r("scope",l.target.value)),type:"text",class:"w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-blue-400",placeholder:i.$t("start.scopePlaceholder")},null,40,Og)]),u("div",null,[u("label",Ng,g(i.$t("start.constraints")),1),u("textarea",{value:e.supplement.constraints,onInput:o[5]||(o[5]=l=>r("constraints",l.target.value)),rows:"2",class:"w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-blue-400",placeholder:i.$t("start.constraintsPlaceholder")},null,40,Bg)]),u("div",null,[u("label",Ug,g(i.$t("start.references")),1),u("textarea",{value:e.supplement.references,onInput:o[6]||(o[6]=l=>r("references",l.target.value)),rows:"1",class:"w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-blue-400",placeholder:i.$t("start.referencesPlaceholder")},null,40,Hg)]),u("div",null,[u("label",Vg,g(i.$t("start.freeText")),1),u("textarea",{value:e.supplement.freeText,onInput:o[7]||(o[7]=l=>r("freeText",l.target.value)),rows:"2",class:"w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-blue-400",placeholder:i.$t("start.freeTextPlaceholder")},null,40,zg)]),u("div",null,[u("label",qg,g(i.$t("start.tapdId")),1),u("input",{value:e.supplement.tapdId,onInput:o[8]||(o[8]=l=>r("tapdId",l.target.value)),type:"text",class:"w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-blue-400",placeholder:i.$t("start.tapdIdPlaceholder")},null,40,Gg)])])])]),u("div",Kg,[u("button",{class:"px-4 py-2 text-sm text-gray-600 bg-gray-100 rounded-lg hover:bg-gray-200",onClick:o[9]||(o[9]=l=>n("close"))},g(i.$t("start.cancel")),1),u("button",{class:"px-4 py-2 text-sm text-white bg-green-500 rounded-lg hover:bg-green-600 font-medium disabled:opacity-50",disabled:e.processing,onClick:o[10]||(o[10]=l=>n("start"))},g(e.processing?i.$t("start.processing"):i.$t("start.submit")),9,Wg)])])])):q("",!0)]),_:1}))}}),Zg={class:"text-base font-semibold text-gray-700 mb-3"},Qg={class:"flex items-center justify-between"},Yg={class:"flex flex-col items-center space-y-1"},Xg={key:0},eh={key:1,class:"pulse-dot"},th={key:2},sh={key:3},nh={class:"text-xs text-gray-600"},rh={key:0,class:"text-xs text-gray-400"},ih=["onClick"],oh=Te({__name:"PipelineProgress",props:{issue:{},progress:{}},emits:["retryFromPhase"],setup(e,{emit:t}){const s=e,n=t,{getPhaseNames:r,phaseLabel:i,phaseNodeClass:o}=Ts();function l(p){return s.progress?.phases?.[p]?s.progress.phases[p].status:"pending"}function a(p){if(!s.progress?.phases)return"";const c=s.progress.phases[p];if(!c?.startedAt)return"";const d=new Date(c.startedAt),b=c.completedAt?new Date(c.completedAt):new Date;return tl(b.getTime()-d.getTime())}return(p,c)=>(v(),k("div",null,[u("h3",Zg,g(p.$t("pipeline.title")),1),u("div",Qg,[(v(!0),k(te,null,Ie(f(r)(e.issue),(d,b)=>(v(),k(te,{key:d},[u("div",Yg,[u("div",{class:ee(["w-10 h-10 rounded-full flex items-center justify-center text-sm font-bold",f(o)(l(d))])},[l(d)==="completed"?(v(),k("span",Xg,"✓")):l(d)==="in_progress"?(v(),k("span",eh,"●")):l(d)==="failed"?(v(),k("span",th,"✗")):(v(),k("span",sh,g(b+1),1))],2),u("span",nh,g(f(i)(d)),1),a(d)?(v(),k("span",rh,g(a(d)),1)):q("",!0),u("button",{class:"text-xs text-blue-500 hover:text-blue-700 hover:underline mt-0.5",onClick:x=>n("retryFromPhase",d)},g(p.$t("pipeline.retryFrom")),9,ih)]),b<f(r)(e.issue).length-1?(v(),k("div",{key:0,class:ee(["flex-1 h-0.5 mx-2",l(f(r)(e.issue)[b])==="completed"?"bg-green-400":"bg-gray-200"])},null,2)):q("",!0)],64))),128))])]))}}),lh={class:"bg-yellow-50 border-2 border-yellow-300 rounded-lg p-4"},ah={class:"text-base font-semibold text-yellow-800 mb-3"},uh={class:"text-sm text-yellow-700 mb-3"},ch={key:0,class:"text-yellow-600 font-medium"},dh={key:0,class:"mb-4"},ph={class:"flex items-center mb-2"},fh={class:"text-xs font-semibold text-yellow-700"},gh={class:"ml-2 px-1.5 py-0.5 text-xs bg-yellow-200 text-yellow-800 rounded-full"},hh={class:"space-y-2 max-h-48 overflow-y-auto border border-yellow-200 rounded-lg bg-white/60 p-3"},mh={class:"flex items-baseline space-x-2 mb-0.5"},bh={class:"text-xs font-semibold text-yellow-700"},yh={class:"text-xs text-gray-400"},vh={class:"text-sm text-gray-700 whitespace-pre-wrap break-words"},xh={class:"flex items-center space-x-3 mb-3"},wh=["disabled"],kh=["disabled"],$h={class:"space-y-2"},Sh={class:"block text-xs font-medium text-yellow-700"},_h=["placeholder"],Ch=["disabled"],Ih=Te({__name:"ReviewGatePanel",props:Ks({reviewSubmitting:{type:Boolean},reviewHistory:{}},{reviewFeedback:{required:!0},reviewFeedbackModifiers:{}}),emits:Ks(["approve","reject","skip"],["update:reviewFeedback"]),setup(e,{emit:t}){const s=Kn(e,"reviewFeedback"),n=t;function r(i){try{return new Date(i).toLocaleString("zh-CN",{month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"})}catch{return i}}return(i,o)=>(v(),k("div",lh,[u("h3",ah,g(i.$t("review.title")),1),u("p",uh,[pe(g(i.$t("review.description"))+" ",1),e.reviewHistory.length>0?(v(),k("span",ch,g(i.$t("review.currentRound",{round:e.reviewHistory.length+1})),1)):q("",!0)]),e.reviewHistory.length>0?(v(),k("div",dh,[u("div",ph,[u("span",fh,g(i.$t("review.history")),1),u("span",gh,g(i.$t("review.roundLabel",{n:e.reviewHistory.length})),1)]),u("div",hh,[(v(!0),k(te,null,Ie(e.reviewHistory,l=>(v(),k("div",{key:l.round,class:ee(["relative pl-5 pb-2 border-l-2",l.round===e.reviewHistory.length?"border-yellow-500":"border-yellow-200"])},[u("div",{class:ee(["absolute left-[-5px] top-1 w-2 h-2 rounded-full",l.round===e.reviewHistory.length?"bg-yellow-500":"bg-yellow-300"])},null,2),u("div",mh,[u("span",bh,g(i.$t("review.roundPrefix",{round:l.round})),1),u("span",yh,g(r(l.timestamp)),1)]),u("p",vh,g(l.feedback),1)],2))),128))])])):q("",!0),u("div",xh,[u("button",{class:"px-4 py-2 bg-green-500 text-white text-sm rounded-lg hover:bg-green-600 font-medium disabled:opacity-50",disabled:e.reviewSubmitting,onClick:o[0]||(o[0]=l=>n("approve"))},g(e.reviewSubmitting?i.$t("review.submitting"):i.$t("review.approve")),9,wh),u("button",{class:"px-4 py-2 bg-gray-400 text-white text-sm rounded-lg hover:bg-gray-500 font-medium disabled:opacity-50",disabled:e.reviewSubmitting,onClick:o[1]||(o[1]=l=>n("skip"))},g(i.$t("review.skip")),9,kh)]),u("div",$h,[u("label",Sh,g(i.$t("review.feedbackLabel")),1),he(u("textarea",{"onUpdate:modelValue":o[2]||(o[2]=l=>s.value=l),rows:"3",class:"w-full border border-yellow-300 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-yellow-400",placeholder:i.$t("review.feedbackPlaceholder")},null,8,_h),[[xe,s.value]]),u("button",{class:"px-4 py-2 bg-red-500 text-white text-sm rounded-lg hover:bg-red-600 font-medium disabled:opacity-50",disabled:e.reviewSubmitting||!s.value.trim(),onClick:o[3]||(o[3]=l=>n("reject"))},g(i.$t("review.reject")),9,Ch)])]))}}),Th={class:"flex items-center justify-between mb-2"},Ph={class:"text-base font-semibold text-gray-700"},Rh={class:"flex items-center space-x-2"},Ah=["disabled"],Dh={key:0,class:"py-4 text-center text-gray-400 text-sm"},Lh={key:1},Eh={key:0,class:"space-y-2 text-sm"},Fh={key:0},Mh={class:"text-gray-500 font-medium"},jh={class:"text-gray-700"},Oh={key:1},Nh={class:"text-gray-500 font-medium"},Bh={class:"text-gray-700"},Uh={key:2},Hh={class:"text-gray-500 font-medium"},Vh={class:"text-gray-700"},zh={key:3},qh={class:"text-gray-500 font-medium"},Gh={class:"text-gray-700"},Kh={key:4},Wh={class:"text-gray-500 font-medium"},Jh={class:"text-gray-700"},Zh={key:5},Qh={class:"text-gray-500 font-medium"},Yh={class:"text-gray-700"},Xh={key:6},em={class:"text-gray-500 font-medium"},tm={class:"text-gray-700"},sm={key:1,class:"py-4 text-center text-gray-400 text-sm"},nm={key:2,class:"space-y-3"},rm={class:"block text-xs font-medium text-gray-600 mb-1"},im=["value"],om={class:"block text-xs font-medium text-gray-600 mb-1"},lm=["value"],am={class:"block text-xs font-medium text-gray-600 mb-1"},um=["value"],cm={class:"block text-xs font-medium text-gray-600 mb-1"},dm=["value"],pm={class:"block text-xs font-medium text-gray-600 mb-1"},fm=["value"],gm={class:"block text-xs font-medium text-gray-600 mb-1"},hm=["value"],mm={class:"block text-xs font-medium text-gray-600 mb-1"},bm=["value","placeholder"],ym=Te({__name:"SupplementEditor",props:{supplement:{},supplementForm:{},loading:{type:Boolean},editing:{type:Boolean},saving:{type:Boolean},hasData:{type:Boolean}},emits:["edit","save","cancel","update:supplementForm"],setup(e,{emit:t}){const s=e,n=t;function r(i,o){n("update:supplementForm",{...s.supplementForm,[i]:o})}return(i,o)=>(v(),k("div",null,[u("div",Th,[u("h3",Ph,g(i.$t("supplement.title")),1),u("div",Rh,[e.editing?(v(),k(te,{key:1},[u("button",{class:"px-2 py-1 text-xs bg-green-500 text-white rounded hover:bg-green-600",disabled:e.saving,onClick:o[1]||(o[1]=l=>n("save"))},g(e.saving?i.$t("supplement.saving"):i.$t("supplement.save")),9,Ah),u("button",{class:"px-2 py-1 text-xs bg-gray-200 text-gray-600 rounded hover:bg-gray-300",onClick:o[2]||(o[2]=l=>n("cancel"))},g(i.$t("supplement.cancel")),1)],64)):(v(),k("button",{key:0,class:"px-2 py-1 text-xs bg-blue-100 text-blue-600 rounded hover:bg-blue-200",onClick:o[0]||(o[0]=l=>n("edit"))},g(i.$t("supplement.edit")),1))])]),e.loading?(v(),k("div",Dh,g(i.$t("supplement.loading")),1)):e.editing?(v(),k("div",nm,[u("div",null,[u("label",rm,g(i.$t("supplement.requirementsLabel")),1),u("textarea",{value:e.supplementForm.requirements,onInput:o[3]||(o[3]=l=>r("requirements",l.target.value)),rows:"2",class:"w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-blue-400"},null,40,im)]),u("div",null,[u("label",om,g(i.$t("supplement.acceptanceLabel")),1),u("textarea",{value:e.supplementForm.acceptanceCriteria,onInput:o[4]||(o[4]=l=>r("acceptanceCriteria",l.target.value)),rows:"2",class:"w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-blue-400"},null,40,lm)]),u("div",null,[u("label",am,g(i.$t("supplement.scopeLabel")),1),u("input",{value:e.supplementForm.scope,onInput:o[5]||(o[5]=l=>r("scope",l.target.value)),type:"text",class:"w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-blue-400"},null,40,um)]),u("div",null,[u("label",cm,g(i.$t("supplement.constraintsLabel")),1),u("textarea",{value:e.supplementForm.constraints,onInput:o[6]||(o[6]=l=>r("constraints",l.target.value)),rows:"2",class:"w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-blue-400"},null,40,dm)]),u("div",null,[u("label",pm,g(i.$t("supplement.referencesLabel")),1),u("textarea",{value:e.supplementForm.references,onInput:o[7]||(o[7]=l=>r("references",l.target.value)),rows:"1",class:"w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-blue-400"},null,40,fm)]),u("div",null,[u("label",gm,g(i.$t("supplement.freeTextLabel")),1),u("textarea",{value:e.supplementForm.freeText,onInput:o[8]||(o[8]=l=>r("freeText",l.target.value)),rows:"2",class:"w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-blue-400"},null,40,hm)]),u("div",null,[u("label",mm,g(i.$t("supplement.tapdIdLabel")),1),u("input",{value:e.supplementForm.tapdId,onInput:o[9]||(o[9]=l=>r("tapdId",l.target.value)),type:"text",placeholder:i.$t("supplement.tapdIdPlaceholder"),class:"w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-blue-400"},null,40,bm)])])):(v(),k("div",Lh,[e.hasData?(v(),k("div",Eh,[e.supplement.requirements?(v(),k("div",Fh,[u("span",Mh,g(i.$t("supplement.requirements")),1),o[10]||(o[10]=pe()),u("span",jh,g(e.supplement.requirements),1)])):q("",!0),e.supplement.acceptanceCriteria?(v(),k("div",Oh,[u("span",Nh,g(i.$t("supplement.acceptance")),1),o[11]||(o[11]=pe()),u("span",Bh,g(e.supplement.acceptanceCriteria),1)])):q("",!0),e.supplement.scope?(v(),k("div",Uh,[u("span",Hh,g(i.$t("supplement.scope")),1),o[12]||(o[12]=pe()),u("span",Vh,g(e.supplement.scope),1)])):q("",!0),e.supplement.constraints?(v(),k("div",zh,[u("span",qh,g(i.$t("supplement.constraints")),1),o[13]||(o[13]=pe()),u("span",Gh,g(e.supplement.constraints),1)])):q("",!0),e.supplement.references?(v(),k("div",Kh,[u("span",Wh,g(i.$t("supplement.references")),1),o[14]||(o[14]=pe()),u("span",Jh,g(e.supplement.references),1)])):q("",!0),e.supplement.freeText?(v(),k("div",Zh,[u("span",Qh,g(i.$t("supplement.freeText")),1),o[15]||(o[15]=pe()),u("span",Yh,g(e.supplement.freeText),1)])):q("",!0),e.supplement.tapdId?(v(),k("div",Xh,[u("span",em,g(i.$t("supplement.tapdId")),1),o[16]||(o[16]=pe()),u("span",tm,g(e.supplement.tapdId),1)])):q("",!0)])):(v(),k("div",sm,g(i.$t("supplement.empty")),1))]))]))}}),vm={class:"flex items-center justify-between mb-2"},xm={class:"text-base font-semibold text-gray-700"},wm={class:"flex items-center space-x-2"},km={class:"flex items-center space-x-1 text-xs text-gray-500 cursor-pointer"},$m={class:"flex items-center space-x-1 text-xs text-gray-500 cursor-pointer"},Sm={key:0,class:"border border-gray-200 rounded-lg p-6 text-center text-gray-400 text-sm"},_m={class:"text-xs mt-1"},Cm={key:0,class:"text-xs mt-1"},Im={class:"log-badge"},Tm={class:"text-gray-400 text-xs mr-1"},Pm={key:0,class:"text-gray-400 text-xs mr-1"},Rm={class:"text-gray-700 break-all"},Am={key:2,class:"text-xs text-gray-400 mt-1 text-right"},Dm=Te({__name:"AgentLogViewer",props:Ks({logs:{},issueState:{}},{autoScroll:{type:Boolean,default:!0},autoScrollModifiers:{},debugMode:{type:Boolean,default:!1},debugModeModifiers:{}}),emits:Ks(["clear"],["update:autoScroll","update:debugMode"]),setup(e,{emit:t}){const s=t,n=Kn(e,"autoScroll"),r=Kn(e,"debugMode"),{stateLabel:i,isTerminalState:o}=Ts(),{agentLogContainer:l,agentLogLabel:a}=el();return(p,c)=>(v(),k("div",null,[u("div",vm,[u("h3",xm,g(p.$t("agentLog.title")),1),u("div",wm,[u("label",km,[he(u("input",{type:"checkbox","onUpdate:modelValue":c[0]||(c[0]=d=>n.value=d),class:"rounded"},null,512),[[Ys,n.value]]),u("span",null,g(p.$t("agentLog.autoScroll")),1)]),u("label",$m,[he(u("input",{type:"checkbox","onUpdate:modelValue":c[1]||(c[1]=d=>r.value=d),class:"rounded"},null,512),[[Ys,r.value]]),c[3]||(c[3]=u("span",null,"Debug",-1))]),u("button",{class:"px-2 py-0.5 text-xs bg-gray-200 text-gray-600 rounded hover:bg-gray-300",onClick:c[2]||(c[2]=d=>s("clear"))},g(p.$t("agentLog.clear")),1)])]),e.logs.length===0?(v(),k("div",Sm,[e.issueState&&f(o)(e.issueState)?(v(),k(te,{key:0},[c[4]||(c[4]=u("svg",{class:"h-5 w-5 mx-auto mb-2 text-gray-300",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},[u("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M9 12h6m-3-3v6m-7 4h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z"})],-1)),u("div",null,g(p.$t("agentLog.ended")),1),u("div",_m,[pe(g(p.$t("agentLog.finalState"))+" ",1),u("span",{class:ee(e.issueState==="completed"?"text-green-500":"text-red-500")},g(f(i)(e.issueState)),3)])],64)):(v(),k(te,{key:1},[c[5]||(c[5]=u("svg",{class:"animate-spin h-5 w-5 mx-auto mb-2 text-blue-400",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},[u("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}),u("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})],-1)),u("div",null,g(p.$t("agentLog.waiting")),1),e.issueState?(v(),k("div",Cm,g(p.$t("agentLog.currentState"))+" "+g(f(i)(e.issueState)),1)):q("",!0)],64))])):(v(),k("div",{key:1,ref_key:"agentLogContainer",ref:l,class:"agent-log border border-gray-200 rounded-lg overflow-y-auto bg-white",style:{"max-height":"20rem"}},[(v(!0),k(te,null,Ie(e.logs,(d,b)=>(v(),k("div",{key:b,class:ee(["agent-log-item","log-"+d.type])},[u("span",Im,g(f(a)(d.type)),1),u("span",Tm,g(f(Dc)(d.timestamp)),1),d.phase?(v(),k("span",Pm,"["+g(d.phase)+"]",1)):q("",!0),u("span",Rm,g(d.summary),1)],2))),128))],512)),e.logs.length>0?(v(),k("div",Am,g(p.$t("agentLog.count",{count:e.logs.length})),1)):q("",!0)]))}}),Lm={class:"flex items-center justify-between mb-2"},Em={class:"text-base font-semibold text-gray-700"},Fm={class:"flex items-center space-x-2"},Mm=["disabled"],jm=["title"],Om={class:"flex space-x-1 mb-3 border-b border-gray-200"},Nm=["onClick"],Bm={key:0,class:"py-8 text-center text-gray-400"},Um={key:1,class:"py-8 text-center text-gray-400"},Hm={key:2},Vm=["placeholder"],zm=["innerHTML"],qm={key:4,class:"py-8 text-center text-gray-400"},Gm={key:0,class:"fullscreen-doc-overlay"},Km={class:"fullscreen-doc-container"},Wm={class:"flex items-center justify-between px-6 py-4 border-b border-gray-200 shrink-0"},Jm={class:"flex items-center space-x-3"},Zm={class:"text-lg font-bold text-gray-800"},Qm={class:"text-sm text-gray-400"},Ym={class:"flex items-center space-x-2"},Xm=["disabled"],e0=["title"],t0={class:"flex space-x-1 px-6 pt-3 border-b border-gray-200 shrink-0"},s0=["onClick"],n0={class:"flex-1 overflow-y-auto min-h-0"},r0={key:0,class:"flex items-center justify-center h-full text-gray-400"},i0={class:"text-base"},o0={key:1,class:"flex items-center justify-center h-full text-gray-400"},l0={class:"text-base"},a0={key:2,class:"h-full p-4"},u0=["placeholder"],c0=["innerHTML"],d0={key:4,class:"flex items-center justify-center h-full text-gray-400"},p0={class:"text-base"},f0=Te({__name:"PlanDocViewer",props:{issueIid:{},planDocs:{},isEditableDoc:{type:Function},detailVersion:{}},setup(e,{expose:t}){const s=e;jt(()=>s.detailVersion,()=>{n.value&&m(n.value)});const n=V(null),r=V(""),i=V(!1),o=V(""),l=V(!1),a=V(""),p=V(!1),c=V(!1),d=V(!1),{t:b}=Yt(),x={"review-feedback.md":()=>b("planDoc.noReviewFeedback"),"02-verify-report.md":()=>b("planDoc.verifyNotGenerated"),"04-verify-report.md":()=>b("planDoc.verifyNotGenerated")};async function m(C){n.value=C,l.value=!1,a.value="",i.value=!0,r.value="",o.value="",c.value=!1;try{r.value=await Ii(s.issueIid,C,"html")}catch(w){const _=w.message;_.includes("not found")&&C in x?(c.value=!0,o.value=x[C]()):o.value=_}finally{i.value=!1}}async function $(){if(n.value)try{a.value=await Ii(s.issueIid,n.value,"raw"),l.value=!0}catch(C){alert(b("planDoc.fetchFailed")+" "+C.message)}}function A(){l.value=!1,a.value="",n.value&&m(n.value)}async function R(){if(n.value){p.value=!0;try{await rc(s.issueIid,n.value,a.value),l.value=!1,a.value="",await m(n.value)}catch(C){alert(b("planDoc.saveFailed")+" "+C.message)}finally{p.value=!1}}}function I(){d.value=!0,document.body.style.overflow="hidden",!n.value&&s.planDocs.length>0&&m(s.planDocs[0].file)}function N(){d.value=!1,document.body.style.overflow=""}function B(C){C.key==="Escape"&&d.value&&N()}return Nt(()=>{document.addEventListener("keydown",B),s.planDocs.length>0&&m(s.planDocs[0].file)}),Bt(()=>{document.removeEventListener("keydown",B),document.body.style.overflow=""}),t({activeDoc:n}),(C,w)=>(v(),k("div",null,[u("div",Lm,[u("h3",Em,g(C.$t("planDoc.title")),1),u("div",Fm,[n.value&&e.isEditableDoc(n.value)&&!d.value?(v(),k(te,{key:0},[l.value?(v(),k(te,{key:1},[u("button",{class:"px-2 py-1 text-xs bg-green-500 text-white rounded hover:bg-green-600",disabled:p.value,onClick:w[1]||(w[1]=_=>R())},g(p.value?C.$t("planDoc.saving"):C.$t("planDoc.save")),9,Mm),u("button",{class:"px-2 py-1 text-xs bg-gray-200 text-gray-600 rounded hover:bg-gray-300",onClick:w[2]||(w[2]=_=>A())},g(C.$t("planDoc.cancel")),1)],64)):(v(),k("button",{key:0,class:"px-2 py-1 text-xs bg-blue-100 text-blue-600 rounded hover:bg-blue-200",onClick:w[0]||(w[0]=_=>$())},g(C.$t("planDoc.edit")),1))],64)):q("",!0),u("button",{class:"px-2 py-1 text-xs bg-gray-100 text-gray-600 rounded hover:bg-gray-200 inline-flex items-center space-x-1",title:C.$t("planDoc.fullscreen"),onClick:w[3]||(w[3]=_=>I())},[w[10]||(w[10]=u("svg",{class:"w-3.5 h-3.5",fill:"none",stroke:"currentColor","stroke-width":"2",viewBox:"0 0 24 24"},[u("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M3.75 3.75v4.5m0-4.5h4.5m-4.5 0L9 9M3.75 20.25v-4.5m0 4.5h4.5m-4.5 0L9 15M20.25 3.75h-4.5m4.5 0v4.5m0-4.5L15 9m5.25 11.25h-4.5m4.5 0v-4.5m0 4.5L15 15"})],-1)),u("span",null,g(C.$t("planDoc.expand")),1)],8,jm)])]),u("div",Om,[(v(!0),k(te,null,Ie(e.planDocs,_=>(v(),k("button",{key:_.file,class:ee(["px-3 py-2 text-sm font-medium border-b-2 transition-colors",n.value===_.file?"border-blue-500 text-blue-600":"border-transparent text-gray-500 hover:text-gray-700"]),onClick:D=>m(_.file)},g(_.label),11,Nm))),128))]),i.value?(v(),k("div",Bm,g(C.$t("planDoc.loading")),1)):o.value?(v(),k("div",Um,g(o.value),1)):l.value&&!d.value?(v(),k("div",Hm,[he(u("textarea",{"onUpdate:modelValue":w[4]||(w[4]=_=>a.value=_),class:"w-full h-96 border border-gray-300 rounded-lg p-3 text-sm font-mono text-gray-700 focus:outline-none focus:ring-2 focus:ring-blue-400",placeholder:C.$t("planDoc.editPlaceholder")},null,8,Vm),[[xe,a.value]])])):r.value&&!d.value?(v(),k("div",{key:3,class:"plan-doc text-sm text-gray-700 max-h-96 overflow-y-auto border border-gray-100 rounded-lg p-4",innerHTML:r.value},null,8,zm)):d.value?q("",!0):(v(),k("div",qm,g(C.$t("planDoc.selectTab")),1)),(v(),ft(ga,{to:"body"},[be(wr,{name:"fullscreen-fade"},{default:pn(()=>[d.value?(v(),k("div",Gm,[u("div",Km,[u("div",Wm,[u("div",Jm,[u("h2",Zm,g(C.$t("planDoc.title")),1),u("span",Qm,"Issue #"+g(e.issueIid),1)]),u("div",Ym,[n.value&&e.isEditableDoc(n.value)?(v(),k(te,{key:0},[l.value?(v(),k(te,{key:1},[u("button",{class:"px-3 py-1.5 text-sm bg-green-500 text-white rounded-lg hover:bg-green-600 transition-colors",disabled:p.value,onClick:w[6]||(w[6]=_=>R())},g(p.value?C.$t("planDoc.saving"):C.$t("planDoc.save")),9,Xm),u("button",{class:"px-3 py-1.5 text-sm bg-gray-200 text-gray-600 rounded-lg hover:bg-gray-300 transition-colors",onClick:w[7]||(w[7]=_=>A())},g(C.$t("planDoc.cancel")),1)],64)):(v(),k("button",{key:0,class:"px-3 py-1.5 text-sm bg-blue-500 text-white rounded-lg hover:bg-blue-600 transition-colors",onClick:w[5]||(w[5]=_=>$())},g(C.$t("planDoc.edit")),1))],64)):q("",!0),u("button",{class:"ml-2 p-2 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded-lg transition-colors",title:C.$t("planDoc.closeFullscreen"),onClick:w[8]||(w[8]=_=>N())},[...w[11]||(w[11]=[u("svg",{class:"w-5 h-5",fill:"none",stroke:"currentColor","stroke-width":"2",viewBox:"0 0 24 24"},[u("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18L18 6M6 6l12 12"})],-1)])],8,e0)])]),u("div",t0,[(v(!0),k(te,null,Ie(e.planDocs,_=>(v(),k("button",{key:"fs-"+_.file,class:ee(["px-4 py-2.5 text-sm font-medium border-b-2 transition-colors",n.value===_.file?"border-blue-500 text-blue-600":"border-transparent text-gray-500 hover:text-gray-700"]),onClick:D=>m(_.file)},g(_.label),11,s0))),128))]),u("div",n0,[i.value?(v(),k("div",r0,[u("span",i0,g(C.$t("planDoc.loading")),1)])):o.value?(v(),k("div",o0,[u("span",l0,g(o.value),1)])):l.value?(v(),k("div",a0,[he(u("textarea",{"onUpdate:modelValue":w[9]||(w[9]=_=>a.value=_),class:"w-full h-full border border-gray-300 rounded-lg p-4 text-sm font-mono text-gray-700 resize-none focus:outline-none focus:ring-2 focus:ring-blue-400",placeholder:C.$t("planDoc.editPlaceholder")},null,8,u0),[[xe,a.value]])])):r.value?(v(),k("div",{key:3,class:"plan-doc text-sm text-gray-700 p-6",innerHTML:r.value},null,8,c0)):(v(),k("div",d0,[u("span",p0,g(C.$t("planDoc.selectTab")),1)]))])])])):q("",!0)]),_:1})]))]))}}),g0={class:"fixed inset-0 z-50 flex"},h0={class:"relative ml-auto w-full max-w-2xl bg-white shadow-xl overflow-y-auto"},m0={class:"sticky top-0 bg-white border-b border-gray-200 px-6 py-4 flex items-center justify-between z-10"},b0={class:"flex items-center space-x-2"},y0={class:"text-lg font-bold text-gray-800"},v0=["href"],x0={class:"px-6 py-4 space-y-6"},w0={class:"text-base font-semibold text-gray-700 mb-2"},k0={class:"grid grid-cols-2 gap-3 text-sm"},$0={class:"text-gray-500"},S0={class:"text-gray-800"},_0={class:"text-gray-500"},C0={class:"text-xs bg-gray-100 px-1 py-0.5 rounded"},I0={class:"text-gray-500"},T0={class:"text-gray-500"},P0={class:"text-gray-500"},R0={class:"text-gray-500"},A0={class:"flex items-center justify-between text-sm bg-gray-50 rounded-lg px-4 py-2.5 border border-gray-200"},D0={class:"text-gray-600"},L0=["disabled"],E0={class:"flex items-center justify-between text-sm bg-gray-50 rounded-lg px-4 py-2.5 border border-gray-200"},F0={class:"text-gray-600"},M0=["disabled"],j0={key:0,class:"bg-green-50 border border-green-200 rounded-lg p-4 flex items-center space-x-2"},O0={class:"text-sm text-green-700 font-medium"},N0=["href"],B0={key:1,class:"bg-red-50 border border-red-200 rounded-lg p-4"},U0={class:"text-sm font-semibold text-red-700 mb-1"},H0={class:"text-sm text-red-600 whitespace-pre-wrap break-words"},V0={class:"flex space-x-3 pt-2 border-t border-gray-200"},z0=Te({__name:"DetailModal",props:{issue:{},progress:{},systemStatus:{},agentLogs:{},agentAutoScroll:{type:Boolean},agentDebugMode:{type:Boolean},supplement:{},supplementForm:{},supplementLoading:{type:Boolean},supplementEditing:{type:Boolean},supplementSaving:{type:Boolean},hasSupplementData:{type:Boolean},detailVersion:{},reviewFeedback:{},reviewSubmitting:{type:Boolean},reviewHistory:{}},emits:["close","retry","restart","cancel","retryFromPhase","approve","reject","skip","update:reviewFeedback","supplementEdit","supplementSave","supplementCancel","update:supplementForm","update:agentAutoScroll","update:agentDebugMode","clearLogs"],setup(e,{emit:t}){const s=e,n=t,{stateLabel:r,stateClass:i,getPlanDocs:o,isEditableDoc:l}=Ts();function a(){if(!s.systemStatus)return"#";const R=s.systemStatus.config.gongfengBaseUrl,I=s.systemStatus.config.projectPath;return`${R}/${I}/issues/${s.issue.issueIid}`}const p=V(s.issue.issueNoteSyncEnabled),c=V(!1),d=we(()=>p.value===!0?"on":p.value===!1?"off":"system");async function b(){const R=[void 0,!0,!1],I=R.indexOf(p.value),N=R[(I+1)%R.length];p.value=N,c.value=!0;try{await uc(s.issue.issueIid,N===void 0?null:N)}catch(B){console.error("Failed to toggle note sync",B)}finally{c.value=!1}}const x=V(s.issue.e2eEnabled),m=V(!1),$=we(()=>x.value===!0?"on":x.value===!1?"off":"system");async function A(){const R=[void 0,!0,!1],I=R.indexOf(x.value),N=R[(I+1)%R.length];x.value=N,m.value=!0;try{await dc(s.issue.issueIid,N===void 0?null:N)}catch(B){console.error("Failed to toggle e2e",B)}finally{m.value=!1}}return(R,I)=>(v(),ft(wr,{name:"fade"},{default:pn(()=>[u("div",g0,[u("div",{class:"absolute inset-0 bg-black/30",onClick:I[0]||(I[0]=N=>n("close"))}),u("div",h0,[u("div",m0,[u("div",b0,[u("h2",y0,"Issue #"+g(e.issue.issueIid),1),u("a",{href:a(),target:"_blank",rel:"noopener",class:"inline-flex items-center px-2 py-0.5 text-xs font-medium text-blue-600 bg-blue-50 rounded hover:bg-blue-100 hover:text-blue-800 transition-colors"},[pe(g(R.$t("detail.viewInGongfeng"))+" ",1),I[19]||(I[19]=u("svg",{class:"w-3 h-3 ml-1",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[u("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"})],-1))],8,v0)]),u("button",{class:"text-gray-400 hover:text-gray-600 text-2xl leading-none",onClick:I[1]||(I[1]=N=>n("close"))},"×")]),u("div",x0,[u("div",null,[u("h3",w0,g(R.$t("detail.basicInfo")),1),u("div",k0,[u("div",null,[u("span",$0,g(R.$t("detail.title")),1),I[20]||(I[20]=pe()),u("span",S0,g(e.issue.issueTitle),1)]),u("div",null,[u("span",_0,g(R.$t("detail.branch")),1),I[21]||(I[21]=pe()),u("code",C0,g(e.issue.branchName),1)]),u("div",null,[u("span",I0,g(R.$t("detail.state")),1),u("span",{class:ee(["px-2 py-0.5 rounded-full text-xs font-medium",f(i)(e.issue.state)])},g(f(r)(e.issue.state)),3)]),u("div",null,[u("span",T0,g(R.$t("detail.createdAt")),1),pe(" "+g(f(Xs)(e.issue.createdAt)),1)]),u("div",null,[u("span",P0,g(R.$t("detail.retries")),1),pe(" "+g(e.issue.attempts),1)]),u("div",null,[u("span",R0,g(R.$t("detail.updatedAt")),1),pe(" "+g(f(Xs)(e.issue.updatedAt)),1)])])]),u("div",A0,[u("span",D0,g(R.$t("detail.noteSync")),1),u("button",{class:ee(["px-3 py-1 rounded text-xs font-medium transition-colors",{"bg-green-100 text-green-700 hover:bg-green-200":d.value==="on","bg-red-100 text-red-600 hover:bg-red-200":d.value==="off","bg-gray-200 text-gray-600 hover:bg-gray-300":d.value==="system"}]),disabled:c.value,onClick:I[2]||(I[2]=N=>b())},g(d.value==="on"?R.$t("detail.enabled"):d.value==="off"?R.$t("detail.disabled"):R.$t("detail.followSystem")),11,L0)]),u("div",E0,[u("span",F0,g(R.$t("detail.e2eTitle")),1),u("button",{class:ee(["px-3 py-1 rounded text-xs font-medium transition-colors",{"bg-green-100 text-green-700 hover:bg-green-200":$.value==="on","bg-red-100 text-red-600 hover:bg-red-200":$.value==="off","bg-gray-200 text-gray-600 hover:bg-gray-300":$.value==="system"}]),disabled:m.value,onClick:I[3]||(I[3]=N=>A())},g($.value==="on"?R.$t("detail.enabled"):$.value==="off"?R.$t("detail.disabled"):R.$t("detail.followSystem")),11,M0)]),e.issue.mrUrl?(v(),k("div",j0,[u("span",O0,g(R.$t("detail.mrLabel")),1),u("a",{href:e.issue.mrUrl,target:"_blank",rel:"noopener",class:"text-sm text-green-600 hover:text-green-800 underline break-all"},g(e.issue.mrUrl),9,N0)])):q("",!0),e.issue.lastError?(v(),k("div",B0,[u("h3",U0,g(R.$t("detail.errorInfo")),1),u("p",H0,g(e.issue.lastError),1)])):q("",!0),be(oh,{issue:e.issue,progress:e.progress,onRetryFromPhase:I[4]||(I[4]=N=>n("retryFromPhase",e.issue.issueIid,N))},null,8,["issue","progress"]),e.issue.state==="waiting_for_review"?(v(),ft(Ih,{key:2,"review-submitting":e.reviewSubmitting,"review-feedback":e.reviewFeedback,"review-history":e.reviewHistory,"onUpdate:reviewFeedback":I[5]||(I[5]=N=>n("update:reviewFeedback",N)),onApprove:I[6]||(I[6]=N=>n("approve",e.issue.issueIid)),onReject:I[7]||(I[7]=N=>n("reject",e.issue.issueIid)),onSkip:I[8]||(I[8]=N=>n("skip",e.issue.issueIid))},null,8,["review-submitting","review-feedback","review-history"])):q("",!0),be(ym,{supplement:e.supplement,"supplement-form":e.supplementForm,loading:e.supplementLoading,editing:e.supplementEditing,saving:e.supplementSaving,"has-data":e.hasSupplementData,onEdit:I[9]||(I[9]=N=>n("supplementEdit")),onSave:I[10]||(I[10]=N=>n("supplementSave")),onCancel:I[11]||(I[11]=N=>n("supplementCancel")),"onUpdate:supplementForm":I[12]||(I[12]=N=>n("update:supplementForm",N))},null,8,["supplement","supplement-form","loading","editing","saving","has-data"]),be(f0,{"issue-iid":e.issue.issueIid,"plan-docs":f(o)(e.issue),"is-editable-doc":f(l),"detail-version":e.detailVersion},null,8,["issue-iid","plan-docs","is-editable-doc","detail-version"]),be(Dm,{logs:e.agentLogs,"issue-state":e.issue.state,"auto-scroll":e.agentAutoScroll,"debug-mode":e.agentDebugMode,"onUpdate:autoScroll":I[13]||(I[13]=N=>n("update:agentAutoScroll",N)),"onUpdate:debugMode":I[14]||(I[14]=N=>n("update:agentDebugMode",N)),onClear:I[15]||(I[15]=N=>n("clearLogs"))},null,8,["logs","issue-state","auto-scroll","debug-mode"]),u("div",V0,[e.issue.state==="failed"?(v(),k("button",{key:0,class:"px-4 py-2 bg-blue-500 text-white text-sm rounded-lg hover:bg-blue-600",onClick:I[16]||(I[16]=N=>n("retry",e.issue.issueIid))},g(R.$t("detail.retry")),1)):q("",!0),u("button",{class:"px-4 py-2 bg-yellow-100 text-yellow-700 text-sm rounded-lg hover:bg-yellow-200",onClick:I[17]||(I[17]=N=>n("restart",e.issue.issueIid))},g(R.$t("detail.restart")),1),u("button",{class:"px-4 py-2 bg-red-100 text-red-600 text-sm rounded-lg hover:bg-red-200",onClick:I[18]||(I[18]=N=>n("cancel",e.issue.issueIid))},g(R.$t("detail.cancelTrack")),1)])])])])]),_:1}))}}),q0={class:"max-w-7xl mx-auto px-4 py-6"},G0={class:"mb-4 flex items-center space-x-1 border-b border-gray-200"},K0=Te({__name:"App",setup(e){const t=V(null),s=V("tracked"),{pipelineMode:n}=Ts(),{issues:r,filter:i,filteredIssues:o,activeCount:l,completedCount:a,failedCount:p,refresh:c}=Cc(),d=Ic(),b=el(),x=Rc(c),m=we(()=>d.selectedIssue.value?.issueIid);async function $(C){let w=r.value;w.length===0&&(await c(),w=r.value);const _=w.find(D=>D.issueIid===C);if(_)d.selectIssue(_,b.agentLogs);else try{const D=await Qn(C);d.selectIssue(D,b.agentLogs)}catch{console.warn(`Issue #${C} not found, ignoring URL param`)}}const{readIssueIidFromUrl:A}=Ac({selectedIssueIid:m,onOpenIssue:$}),{connected:R}=Sc((C,w)=>{const _=w;if(C.startsWith("issue:")||C.startsWith("review:")){c();const D=_.data;D?.issueIid&&d.selectedIssue.value?.issueIid===D.issueIid&&d.refreshDetail()}if(C==="agent:output"){const D=_.data;D?.event&&b.pushAgentStreamEvent(D.issueIid,m,D.phase,D.event)}if(C==="pipeline:progress"){const D=_.data;D&&d.selectedIssue.value?.issueIid===D.issueIid&&b.pushSystemLog(D.issueIid,m,D.step,D.message??"",_.timestamp)}});async function I(){try{t.value=await Zu(),t.value?.config?.pipelineMode&&(n.value=t.value.config.pipelineMode)}catch(C){console.error("Fetch status failed",C)}}function N(){s.value="browse",x.browseIssues.value.length===0&&x.fetchGongfengIssues()}let B=null;return Nt(async()=>{await c(),I(),B=setInterval(I,1e4);const C=A();C&&$(C)}),Bt(()=>{B&&clearInterval(B)}),(C,w)=>(v(),k("div",null,[be(Hc,{connected:f(R),"system-status":t.value},null,8,["connected","system-status"]),u("main",q0,[be(sd,{total:f(r).length,active:f(l),completed:f(a),failed:f(p)},null,8,["total","active","completed","failed"]),u("div",G0,[u("button",{class:ee(["px-4 py-2 text-sm font-medium border-b-2 transition-colors",s.value==="tracked"?"border-gray-800 text-gray-800":"border-transparent text-gray-500 hover:text-gray-700"]),onClick:w[0]||(w[0]=_=>s.value="tracked")},g(C.$t("app.trackedIssues")),3),u("button",{class:ee(["px-4 py-2 text-sm font-medium border-b-2 transition-colors",s.value==="browse"?"border-gray-800 text-gray-800":"border-transparent text-gray-500 hover:text-gray-700"]),onClick:w[1]||(w[1]=_=>N())},g(C.$t("app.browseIssues")),3),u("button",{class:ee(["px-4 py-2 text-sm font-medium border-b-2 transition-colors",s.value==="brainstorm"?"border-gray-800 text-gray-800":"border-transparent text-gray-500 hover:text-gray-700"]),onClick:w[2]||(w[2]=_=>s.value="brainstorm")},g(C.$t("app.brainstorm")),3)]),s.value==="tracked"?(v(),ft(jd,{key:0,issues:f(o),filter:f(i),"system-status":t.value,"onUpdate:filter":w[3]||(w[3]=_=>i.value=_),onSelect:w[4]||(w[4]=_=>f(d).selectIssue(_,f(b).agentLogs)),onRetry:w[5]||(w[5]=_=>f(d).doRetryIssue(_,f(c))),onRestart:w[6]||(w[6]=_=>f(d).doRestartIssue(_,f(c))),onCancel:w[7]||(w[7]=_=>f(d).doCancelIssue(_,f(c)))},null,8,["issues","filter","system-status"])):q("",!0),s.value==="brainstorm"?(v(),ft(vg,{key:1})):q("",!0),s.value==="browse"?(v(),ft(bp,{key:2,issues:f(x).browseIssues.value,"tracked-iids":f(x).browseTrackedIids.value,total:f(x).browseTotal.value,page:f(x).browsePage.value,"per-page":f(x).browsePerPage,loading:f(x).browseLoading.value,error:f(x).browseError.value,search:f(x).browseSearch.value,"system-status":t.value,"onUpdate:search":w[8]||(w[8]=_=>f(x).browseSearch.value=_),"onUpdate:page":w[9]||(w[9]=_=>f(x).browsePage.value=_),onSearch:w[10]||(w[10]=_=>f(x).fetchGongfengIssues()),onStart:w[11]||(w[11]=_=>f(x).openStartDialog(_))},null,8,["issues","tracked-iids","total","page","per-page","loading","error","search","system-status"])):q("",!0)]),be(Jg,{issue:f(x).startDialogIssue.value,supplement:f(x).startSupplement.value,processing:f(x).startProcessing.value,onClose:w[12]||(w[12]=_=>f(x).startDialogIssue.value=null),"onUpdate:supplement":w[13]||(w[13]=_=>f(x).startSupplement.value=_),onStart:w[14]||(w[14]=_=>{f(x).doStartProcessing(()=>{s.value="tracked"})})},null,8,["issue","supplement","processing"]),f(d).selectedIssue.value?(v(),ft(z0,{key:0,issue:f(d).selectedIssue.value,progress:f(d).detailProgress.value,"system-status":t.value,"agent-logs":f(b).filteredLogs.value,"agent-auto-scroll":f(b).agentAutoScroll.value,"agent-debug-mode":f(b).debugMode.value,supplement:f(d).detailSupplement.value,"supplement-form":f(d).detailSupplementForm.value,"supplement-loading":f(d).detailSupplementLoading.value,"supplement-editing":f(d).detailSupplementEditing.value,"supplement-saving":f(d).detailSupplementSaving.value,"has-supplement-data":f(d).hasSupplementData(f(d).detailSupplement.value),"detail-version":f(d).detailVersion.value,"review-feedback":f(d).reviewFeedback.value,"review-submitting":f(d).reviewSubmitting.value,"review-history":f(d).reviewHistory.value,onClose:w[15]||(w[15]=_=>f(d).selectedIssue.value=null),onRetry:w[16]||(w[16]=_=>f(d).doRetryIssue(_,f(c))),onRestart:w[17]||(w[17]=_=>f(d).doRestartIssue(_,f(c))),onCancel:w[18]||(w[18]=_=>f(d).doCancelIssue(_,f(c))),onRetryFromPhase:w[19]||(w[19]=(_,D)=>f(d).doRetryFromPhase(_,D,D,f(c))),onApprove:w[20]||(w[20]=_=>f(d).doApprovePlan(_,f(c))),onReject:w[21]||(w[21]=_=>f(d).doRejectPlan(_,f(c))),onSkip:w[22]||(w[22]=_=>f(d).doSkipReview(_,f(c))),"onUpdate:reviewFeedback":w[23]||(w[23]=_=>f(d).reviewFeedback.value=_),onSupplementEdit:w[24]||(w[24]=_=>f(d).enterSupplementEdit()),onSupplementSave:w[25]||(w[25]=_=>f(d).saveDetailSupplement(f(c))),onSupplementCancel:w[26]||(w[26]=_=>f(d).detailSupplementEditing.value=!1),"onUpdate:supplementForm":w[27]||(w[27]=_=>f(d).detailSupplementForm.value=_),"onUpdate:agentAutoScroll":w[28]||(w[28]=_=>f(b).agentAutoScroll.value=_),"onUpdate:agentDebugMode":w[29]||(w[29]=_=>f(b).debugMode.value=_),onClearLogs:w[30]||(w[30]=_=>f(b).clear())},null,8,["issue","progress","system-status","agent-logs","agent-auto-scroll","agent-debug-mode","supplement","supplement-form","supplement-loading","supplement-editing","supplement-saving","has-supplement-data","detail-version","review-feedback","review-submitting","review-history"])):q("",!0)]))}});function W0(){const e=V(0),t=6,s=V(!1),n=V(""),r=V([]),i=V(null),o=V(null),l=V(null),a=V(null),p=V(""),c=V([]),d=V(!1),b=V(!1),x=V(""),m=cn({gongfeng:{apiUrl:"",privateToken:"",projectPath:""},project:{workDir:"",gitRootDir:"",baseBranch:"master",branchPrefix:"feat/issue",worktreeBaseDir:"",projectSubDir:""},ai:{mode:"claude-internal",model:"Claude-4.6-Opus",phaseTimeoutMs:18e5},poll:{discoveryIntervalMs:6e4,driveIntervalMs:15e3,maxRetries:3,maxConcurrent:3},web:{port:3e3},pipeline:{mode:"auto"},review:{enabled:!0}}),$=we(()=>{switch(e.value){case 0:{const D=r.value.filter(S=>S.required);return D.length>0&&D.every(S=>S.installed)}case 1:return m.project.workDir.trim()!=="";case 2:return m.gongfeng.apiUrl.trim()!==""&&m.gongfeng.privateToken.trim()!==""&&m.gongfeng.projectPath.trim()!==""&&i.value===!0&&l.value===!0;case 3:return r.value.filter(D=>D.name===m.ai.mode.replace("-","-")).every(D=>D.installed||!D.required);case 4:return!0;case 5:return p.value!=="";default:return!1}});async function A(){s.value=!0,n.value="";try{const S=await(await fetch(`/api/setup/check-env?aiMode=${m.ai.mode}`)).json();r.value=S.dependencies}catch(D){n.value=D.message}finally{s.value=!1}}async function R(){if(i.value=null,o.value=null,!(!m.gongfeng.apiUrl||!m.gongfeng.privateToken))try{const S=await(await fetch("/api/setup/validate-token",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({apiUrl:m.gongfeng.apiUrl,token:m.gongfeng.privateToken})})).json();i.value=S.valid,o.value=S.user??null,S.valid||(n.value=S.error??"Token validation failed")}catch(D){i.value=!1,n.value=D.message}}async function I(){if(l.value=null,a.value=null,!(!m.gongfeng.apiUrl||!m.gongfeng.privateToken||!m.gongfeng.projectPath))try{const S=await(await fetch("/api/setup/validate-repo",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({apiUrl:m.gongfeng.apiUrl,token:m.gongfeng.privateToken,projectPath:m.gongfeng.projectPath})})).json();l.value=S.valid,a.value=S.project??null,S.valid||(n.value=S.error??"Repository validation failed")}catch(D){l.value=!1,n.value=D.message}}async function N(D){d.value=!0,c.value=[];try{const K=(await fetch("/api/setup/install-dep",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:D})})).body?.getReader();if(!K)return;const Z=new TextDecoder;let T="";for(;;){const{done:O,value:L}=await K.read();if(O)break;T+=Z.decode(L,{stream:!0});const $e=T.split(`
|
|
64
|
-
|
|
65
|
-
`);T=$e.pop()??"";for(const ve of $e)if(ve.startsWith("data: "))try{const de=JSON.parse(ve.slice(6));de.line&&c.value.push(de.line),de.done&&await A()}catch{}}}catch(S){c.value.push(`Error: ${S.message}`)}finally{d.value=!1}}async function B(){try{const S=await(await fetch("/api/setup/generate-preview",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(m)})).json();p.value=S.preview}catch(D){n.value=D.message}}async function C(){s.value=!0,n.value="";try{const S=await(await fetch("/api/setup/complete",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({config:m})})).json();S.success?(b.value=!0,x.value=S.configPath??""):n.value=S.error??"Setup failed"}catch(D){n.value=D.message}finally{s.value=!1}}function w(){e.value<t-1&&(e.value++,n.value="",e.value===5&&B())}function _(){e.value>0&&(e.value--,n.value="")}return{currentStep:e,totalSteps:t,loading:s,error:n,form:m,dependencies:r,tokenValid:i,tokenUser:o,repoValid:l,repoInfo:a,configPreview:p,installLogs:c,installing:d,setupComplete:b,savedConfigPath:x,canProceed:$,checkEnv:A,validateToken:R,validateRepo:I,installDep:N,generatePreview:B,completeSetup:C,nextStep:w,prevStep:_}}const J0={class:"min-h-screen bg-gray-50 flex items-center justify-center p-4"},Z0={key:0,class:"bg-white rounded-2xl shadow-lg max-w-lg w-full p-10 text-center"},Q0={class:"text-2xl font-bold text-gray-900 mb-2"},Y0={class:"text-gray-600 mb-4"},X0={class:"block bg-gray-100 rounded-lg p-3 text-sm mb-6 break-all"},eb={class:"text-gray-600"},tb={key:1,class:"bg-white rounded-2xl shadow-lg max-w-3xl w-full overflow-hidden"},sb={class:"bg-gray-900 text-white px-8 py-6"},nb={class:"flex items-center justify-between"},rb={class:"text-xl font-bold"},ib={class:"text-gray-400 text-sm mt-1"},ob={class:"mt-4 flex gap-1"},lb={class:"p-8 min-h-[400px]"},ab={key:0,class:"mb-4 bg-red-50 border border-red-200 text-red-700 rounded-lg px-4 py-3 text-sm"},ub={key:1},cb={class:"text-gray-600 mb-6"},db={key:0,class:"flex items-center gap-2 text-gray-500"},pb={key:1,class:"space-y-3"},fb={class:"flex items-center gap-3"},gb={class:"text-lg"},hb={class:"font-medium text-gray-900"},mb={key:0,class:"text-xs text-gray-500"},bb=["disabled","onClick"],yb={key:1,class:"text-xs text-gray-500"},vb={key:2,class:"mt-4 bg-gray-900 text-gray-300 rounded-lg p-4 text-xs font-mono max-h-40 overflow-y-auto"},xb={key:2,class:"space-y-5"},wb={class:"block text-sm font-medium text-gray-700 mb-1"},kb=["placeholder"],$b={class:"mt-1 text-xs text-gray-500"},Sb={class:"block text-sm font-medium text-gray-700 mb-1"},_b=["placeholder"],Cb={class:"mt-1 text-xs text-gray-500"},Ib={class:"grid grid-cols-2 gap-4"},Tb={class:"block text-sm font-medium text-gray-700 mb-1"},Pb={class:"block text-sm font-medium text-gray-700 mb-1"},Rb={class:"block text-sm font-medium text-gray-700 mb-1"},Ab={class:"block text-sm font-medium text-gray-700 mb-1"},Db=["placeholder"],Lb={key:3,class:"space-y-5"},Eb={class:"block text-sm font-medium text-gray-700 mb-1"},Fb={class:"block text-sm font-medium text-gray-700 mb-1"},Mb={class:"flex gap-2"},jb=["placeholder"],Ob=["disabled"],Nb={key:0,class:"mt-1 text-xs text-green-600"},Bb={key:1,class:"mt-1 text-xs text-red-600"},Ub={class:"block text-sm font-medium text-gray-700 mb-1"},Hb={class:"flex gap-2"},Vb=["placeholder"],zb=["disabled"],qb={key:0,class:"mt-1 text-xs text-green-600"},Gb={key:1,class:"mt-1 text-xs text-red-600"},Kb={key:4,class:"space-y-5"},Wb={class:"block text-sm font-medium text-gray-700 mb-3"},Jb={class:"grid grid-cols-3 gap-3"},Zb={class:"font-medium"},Qb={class:"text-xs text-gray-500 mt-1"},Yb={class:"font-medium"},Xb={class:"text-xs text-gray-500 mt-1"},ey={class:"font-medium"},ty={class:"text-xs text-gray-500 mt-1"},sy={class:"block text-sm font-medium text-gray-700 mb-1"},ny={class:"space-y-2"},ry={class:"text-sm font-medium text-gray-700"},iy={class:"flex items-center gap-2"},oy={class:"text-sm"},ly={key:0,class:"text-xs text-gray-500"},ay=["disabled","onClick"],uy={key:0,class:"bg-gray-900 text-gray-300 rounded-lg p-4 text-xs font-mono max-h-32 overflow-y-auto"},cy={key:5,class:"space-y-5"},dy={class:"grid grid-cols-2 gap-4"},py={class:"block text-sm font-medium text-gray-700 mb-1"},fy={class:"block text-sm font-medium text-gray-700 mb-1"},gy={class:"grid grid-cols-2 gap-4"},hy={class:"block text-sm font-medium text-gray-700 mb-1"},my={class:"block text-sm font-medium text-gray-700 mb-1"},by={class:"grid grid-cols-2 gap-4"},yy={class:"block text-sm font-medium text-gray-700 mb-1"},vy={class:"block text-sm font-medium text-gray-700 mb-1"},xy={value:"auto"},wy={value:"classic"},ky={value:"plan-mode"},$y={class:"flex items-center gap-2"},Sy={for:"review-enabled",class:"text-sm text-gray-700"},_y={class:"block text-sm font-medium text-gray-700 mb-1"},Cy={class:"mt-1 text-xs text-gray-500"},Iy={key:6,class:"space-y-5"},Ty={class:"text-sm text-gray-600"},Py={class:"bg-gray-900 text-gray-300 rounded-lg p-4 text-xs font-mono max-h-80 overflow-y-auto whitespace-pre-wrap"},Ry={class:"px-8 py-4 bg-gray-50 border-t flex items-center justify-between"},Ay={key:1},Dy=["disabled"],Ly=["disabled"],Ey=Te({__name:"SetupWizard",setup(e){const{t,locale:s,setLocale:n}=Yt(),{currentStep:r,totalSteps:i,loading:o,error:l,form:a,dependencies:p,tokenValid:c,tokenUser:d,repoValid:b,repoInfo:x,configPreview:m,installLogs:$,installing:A,setupComplete:R,savedConfigPath:I,canProceed:N,checkEnv:B,validateToken:C,validateRepo:w,installDep:_,completeSetup:D,nextStep:S,prevStep:K}=W0(),Z=we(()=>[t("setup.step.envCheck"),t("setup.step.projectConfig"),t("setup.step.gongfengConfig"),t("setup.step.aiRunner"),t("setup.step.advancedOptions"),t("setup.step.reviewConfirm")]);return Nt(()=>{B()}),jt(()=>a.ai.mode,()=>{B()}),(T,O)=>(v(),k("div",J0,[f(R)?(v(),k("div",Z0,[O[28]||(O[28]=u("div",{class:"text-5xl mb-4"},"✅",-1)),u("h2",Q0,g(T.$t("setup.complete.title")),1),u("p",Y0,g(T.$t("setup.complete.savedTo")),1),u("code",X0,g(f(I)),1),u("p",eb,g(T.$t("setup.complete.startHint")),1),O[29]||(O[29]=u("code",{class:"block bg-gray-900 text-green-400 rounded-lg p-3 text-sm mt-2"}," issue-auto-finish start ",-1))])):(v(),k("div",tb,[u("div",sb,[u("div",nb,[u("h1",rb,g(T.$t("setup.title")),1),u("button",{class:ee(["px-3 py-1 text-sm rounded-lg transition-colors",(f(s)==="zh-CN","bg-gray-700 text-gray-200 hover:bg-gray-600")]),onClick:O[0]||(O[0]=L=>f(n)(f(s)==="zh-CN"?"en":"zh-CN"))},g(f(s)==="zh-CN"?"EN":"中文"),3)]),u("p",ib,g(Z.value[f(r)])+" ("+g(f(r)+1)+"/"+g(f(i))+")",1),u("div",ob,[(v(!0),k(te,null,Ie(f(i),L=>(v(),k("div",{key:L,class:ee(["h-1 flex-1 rounded-full transition-colors",L-1<=f(r)?"bg-blue-400":"bg-gray-700"])},null,2))),128))])]),u("div",lb,[f(l)?(v(),k("div",ab,g(f(l)),1)):q("",!0),f(r)===0?(v(),k("div",ub,[u("p",cb,g(T.$t("setup.env.checking")),1),f(o)?(v(),k("div",db,[O[30]||(O[30]=u("svg",{class:"animate-spin h-5 w-5",viewBox:"0 0 24 24"},[u("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4",fill:"none"}),u("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})],-1)),pe(" "+g(T.$t("setup.env.checkingShort")),1)])):(v(),k("div",pb,[(v(!0),k(te,null,Ie(f(p),L=>(v(),k("div",{key:L.name,class:ee(["flex items-center justify-between p-3 rounded-lg border",L.installed?"border-green-200 bg-green-50":L.required?"border-red-200 bg-red-50":"border-yellow-200 bg-yellow-50"])},[u("div",fb,[u("span",gb,g(L.installed?"✅":L.required?"❌":"⚠️"),1),u("div",null,[u("div",hb,g(L.displayName),1),L.version?(v(),k("div",mb,"v"+g(L.version),1)):q("",!0)])]),!L.installed&&L.installCommand?(v(),k("button",{key:0,class:"px-3 py-1 text-xs font-medium bg-blue-600 text-white rounded-lg hover:bg-blue-700 disabled:opacity-50",disabled:f(A),onClick:$e=>f(_)(L.name)},g(T.$t("setup.env.install")),9,bb)):L.installed?q("",!0):(v(),k("span",yb,g(L.installHint),1))],2))),128))])),f($).length?(v(),k("div",vb,[(v(!0),k(te,null,Ie(f($),(L,$e)=>(v(),k("div",{key:$e},g(L),1))),128))])):q("",!0),u("button",{class:"mt-4 text-sm text-blue-600 hover:underline",onClick:O[1]||(O[1]=(...L)=>f(B)&&f(B)(...L))},g(T.$t("setup.env.refresh")),1)])):q("",!0),f(r)===1?(v(),k("div",xb,[u("div",null,[u("label",wb,g(T.$t("setup.project.workDir")),1),he(u("input",{"onUpdate:modelValue":O[2]||(O[2]=L=>f(a).project.workDir=L),type:"text",class:"w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:ring-2 focus:ring-blue-500 focus:border-blue-500",placeholder:T.$t("setup.project.workDirPlaceholder")},null,8,kb),[[xe,f(a).project.workDir]]),u("p",$b,g(T.$t("setup.project.workDirHint")),1)]),u("div",null,[u("label",Sb,g(T.$t("setup.project.gitRootDir")),1),he(u("input",{"onUpdate:modelValue":O[3]||(O[3]=L=>f(a).project.gitRootDir=L),type:"text",class:"w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:ring-2 focus:ring-blue-500 focus:border-blue-500",placeholder:T.$t("setup.project.gitRootDirPlaceholder")},null,8,_b),[[xe,f(a).project.gitRootDir]]),u("p",Cb,g(T.$t("setup.project.gitRootDirHint")),1)]),u("div",Ib,[u("div",null,[u("label",Tb,g(T.$t("setup.project.baseBranch")),1),he(u("input",{"onUpdate:modelValue":O[4]||(O[4]=L=>f(a).project.baseBranch=L),type:"text",class:"w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:ring-2 focus:ring-blue-500 focus:border-blue-500"},null,512),[[xe,f(a).project.baseBranch]])]),u("div",null,[u("label",Pb,g(T.$t("setup.project.branchPrefix")),1),he(u("input",{"onUpdate:modelValue":O[5]||(O[5]=L=>f(a).project.branchPrefix=L),type:"text",class:"w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:ring-2 focus:ring-blue-500 focus:border-blue-500"},null,512),[[xe,f(a).project.branchPrefix]])])]),u("div",null,[u("label",Rb,g(T.$t("setup.project.worktreeBaseDir")),1),he(u("input",{"onUpdate:modelValue":O[6]||(O[6]=L=>f(a).project.worktreeBaseDir=L),type:"text",class:"w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:ring-2 focus:ring-blue-500 focus:border-blue-500",placeholder:"/tmp/issue-auto-finish-worktrees"},null,512),[[xe,f(a).project.worktreeBaseDir]])]),u("div",null,[u("label",Ab,g(T.$t("setup.project.projectSubDir")),1),he(u("input",{"onUpdate:modelValue":O[7]||(O[7]=L=>f(a).project.projectSubDir=L),type:"text",class:"w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:ring-2 focus:ring-blue-500 focus:border-blue-500",placeholder:T.$t("setup.project.projectSubDirPlaceholder")},null,8,Db),[[xe,f(a).project.projectSubDir]])])])):q("",!0),f(r)===2?(v(),k("div",Lb,[u("div",null,[u("label",Eb,g(T.$t("setup.gongfeng.apiUrl")),1),he(u("input",{"onUpdate:modelValue":O[8]||(O[8]=L=>f(a).gongfeng.apiUrl=L),type:"text",class:"w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:ring-2 focus:ring-blue-500 focus:border-blue-500",placeholder:"https://gitlab.example.com"},null,512),[[xe,f(a).gongfeng.apiUrl]])]),u("div",null,[u("label",Fb,g(T.$t("setup.gongfeng.privateToken")),1),u("div",Mb,[he(u("input",{"onUpdate:modelValue":O[9]||(O[9]=L=>f(a).gongfeng.privateToken=L),type:"password",class:"flex-1 border border-gray-300 rounded-lg px-3 py-2 text-sm focus:ring-2 focus:ring-blue-500 focus:border-blue-500",placeholder:T.$t("setup.gongfeng.tokenPlaceholder")},null,8,jb),[[xe,f(a).gongfeng.privateToken]]),u("button",{class:"px-4 py-2 text-sm font-medium bg-gray-800 text-white rounded-lg hover:bg-gray-700 disabled:opacity-50",disabled:!f(a).gongfeng.apiUrl||!f(a).gongfeng.privateToken,onClick:O[10]||(O[10]=(...L)=>f(C)&&f(C)(...L))},g(T.$t("setup.gongfeng.verify")),9,Ob)]),f(c)===!0?(v(),k("div",Nb," ✅ "+g(T.$t("setup.gongfeng.tokenValid"))+g(f(d)?.name?` (${f(d).name})`:""),1)):f(c)===!1?(v(),k("div",Bb," ❌ "+g(T.$t("setup.gongfeng.tokenInvalid")),1)):q("",!0)]),u("div",null,[u("label",Ub,g(T.$t("setup.gongfeng.projectPath")),1),u("div",Hb,[he(u("input",{"onUpdate:modelValue":O[11]||(O[11]=L=>f(a).gongfeng.projectPath=L),type:"text",class:"flex-1 border border-gray-300 rounded-lg px-3 py-2 text-sm focus:ring-2 focus:ring-blue-500 focus:border-blue-500",placeholder:T.$t("setup.gongfeng.projectPathPlaceholder")},null,8,Vb),[[xe,f(a).gongfeng.projectPath]]),u("button",{class:"px-4 py-2 text-sm font-medium bg-gray-800 text-white rounded-lg hover:bg-gray-700 disabled:opacity-50",disabled:!f(a).gongfeng.apiUrl||!f(a).gongfeng.privateToken||!f(a).gongfeng.projectPath,onClick:O[12]||(O[12]=(...L)=>f(w)&&f(w)(...L))},g(T.$t("setup.gongfeng.verify")),9,zb)]),f(b)===!0?(v(),k("div",qb," ✅ "+g(T.$t("setup.gongfeng.repoFound"))+g(f(x)?.name?`: ${f(x).name}`:""),1)):f(b)===!1?(v(),k("div",Gb," ❌ "+g(T.$t("setup.gongfeng.repoNotFound")),1)):q("",!0)])])):q("",!0),f(r)===3?(v(),k("div",Kb,[u("div",null,[u("label",Wb,g(T.$t("setup.ai.modeLabel")),1),u("div",Jb,[u("button",{class:ee(["p-4 rounded-lg border-2 text-left transition-colors",f(a).ai.mode==="claude-internal"?"border-blue-500 bg-blue-50":"border-gray-200 hover:border-gray-300"]),onClick:O[13]||(O[13]=L=>f(a).ai.mode="claude-internal")},[u("div",Zb,g(T.$t("setup.ai.claudeInternal")),1),u("div",Qb,g(T.$t("setup.ai.claudeInternalDesc")),1)],2),u("button",{class:ee(["p-4 rounded-lg border-2 text-left transition-colors",f(a).ai.mode==="cursor-agent"?"border-blue-500 bg-blue-50":"border-gray-200 hover:border-gray-300"]),onClick:O[14]||(O[14]=L=>f(a).ai.mode="cursor-agent")},[u("div",Yb,g(T.$t("setup.ai.cursorAgent")),1),u("div",Xb,g(T.$t("setup.ai.cursorAgentDesc")),1)],2),u("button",{class:ee(["p-4 rounded-lg border-2 text-left transition-colors",f(a).ai.mode==="codebuddy"?"border-blue-500 bg-blue-50":"border-gray-200 hover:border-gray-300"]),onClick:O[15]||(O[15]=L=>f(a).ai.mode="codebuddy")},[u("div",ey,g(T.$t("setup.ai.codebuddy")),1),u("div",ty,g(T.$t("setup.ai.codebuddyDesc")),1)],2)])]),u("div",null,[u("label",sy,g(T.$t("setup.ai.model")),1),he(u("input",{"onUpdate:modelValue":O[16]||(O[16]=L=>f(a).ai.model=L),type:"text",class:"w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:ring-2 focus:ring-blue-500 focus:border-blue-500"},null,512),[[xe,f(a).ai.model]])]),u("div",ny,[u("p",ry,g(T.$t("setup.ai.cliStatus")),1),(v(!0),k(te,null,Ie(f(p).filter(L=>L.name==="claude-internal"||L.name==="cursor"||L.name==="codebuddy"),L=>(v(),k("div",{key:L.name,class:ee(["flex items-center justify-between p-3 rounded-lg border",L.installed?"border-green-200 bg-green-50":"border-yellow-200 bg-yellow-50"])},[u("div",iy,[u("span",null,g(L.installed?"✅":"⚠️"),1),u("span",oy,g(L.displayName),1),L.version?(v(),k("span",ly,"v"+g(L.version),1)):q("",!0)]),!L.installed&&L.installCommand?(v(),k("button",{key:0,class:"px-3 py-1 text-xs font-medium bg-blue-600 text-white rounded-lg hover:bg-blue-700 disabled:opacity-50",disabled:f(A),onClick:$e=>f(_)(L.name)},g(T.$t("setup.env.install")),9,ay)):q("",!0)],2))),128))]),f($).length?(v(),k("div",uy,[(v(!0),k(te,null,Ie(f($),(L,$e)=>(v(),k("div",{key:$e},g(L),1))),128))])):q("",!0)])):q("",!0),f(r)===4?(v(),k("div",cy,[u("div",dy,[u("div",null,[u("label",py,g(T.$t("setup.advanced.discoveryInterval")),1),he(u("input",{"onUpdate:modelValue":O[17]||(O[17]=L=>f(a).poll.discoveryIntervalMs=L),type:"number",class:"w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:ring-2 focus:ring-blue-500 focus:border-blue-500"},null,512),[[xe,f(a).poll.discoveryIntervalMs,void 0,{number:!0}]])]),u("div",null,[u("label",fy,g(T.$t("setup.advanced.driveInterval")),1),he(u("input",{"onUpdate:modelValue":O[18]||(O[18]=L=>f(a).poll.driveIntervalMs=L),type:"number",class:"w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:ring-2 focus:ring-blue-500 focus:border-blue-500"},null,512),[[xe,f(a).poll.driveIntervalMs,void 0,{number:!0}]])])]),u("div",gy,[u("div",null,[u("label",hy,g(T.$t("setup.advanced.maxRetries")),1),he(u("input",{"onUpdate:modelValue":O[19]||(O[19]=L=>f(a).poll.maxRetries=L),type:"number",class:"w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:ring-2 focus:ring-blue-500 focus:border-blue-500"},null,512),[[xe,f(a).poll.maxRetries,void 0,{number:!0}]])]),u("div",null,[u("label",my,g(T.$t("setup.advanced.maxConcurrent")),1),he(u("input",{"onUpdate:modelValue":O[20]||(O[20]=L=>f(a).poll.maxConcurrent=L),type:"number",class:"w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:ring-2 focus:ring-blue-500 focus:border-blue-500"},null,512),[[xe,f(a).poll.maxConcurrent,void 0,{number:!0}]])])]),u("div",by,[u("div",null,[u("label",yy,g(T.$t("setup.advanced.webPort")),1),he(u("input",{"onUpdate:modelValue":O[21]||(O[21]=L=>f(a).web.port=L),type:"number",class:"w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:ring-2 focus:ring-blue-500 focus:border-blue-500"},null,512),[[xe,f(a).web.port,void 0,{number:!0}]])]),u("div",null,[u("label",vy,g(T.$t("setup.advanced.pipelineMode")),1),he(u("select",{"onUpdate:modelValue":O[22]||(O[22]=L=>f(a).pipeline.mode=L),class:"w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:ring-2 focus:ring-blue-500 focus:border-blue-500"},[u("option",xy,g(T.$t("setup.advanced.pipelineAuto")),1),u("option",wy,g(T.$t("setup.advanced.pipelineClassic")),1),u("option",ky,g(T.$t("setup.advanced.pipelinePlanMode")),1)],512),[[Nu,f(a).pipeline.mode]])])]),u("div",$y,[he(u("input",{id:"review-enabled","onUpdate:modelValue":O[23]||(O[23]=L=>f(a).review.enabled=L),type:"checkbox",class:"rounded border-gray-300"},null,512),[[Ys,f(a).review.enabled]]),u("label",Sy,g(T.$t("setup.advanced.enableReview")),1)]),u("div",null,[u("label",_y,g(T.$t("setup.advanced.phaseTimeout")),1),he(u("input",{"onUpdate:modelValue":O[24]||(O[24]=L=>f(a).ai.phaseTimeoutMs=L),type:"number",class:"w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:ring-2 focus:ring-blue-500 focus:border-blue-500"},null,512),[[xe,f(a).ai.phaseTimeoutMs,void 0,{number:!0}]]),u("p",Cy,g(T.$t("setup.advanced.phaseTimeoutHint")),1)])])):q("",!0),f(r)===5?(v(),k("div",Iy,[u("p",Ty,g(T.$t("setup.confirm.reviewHint")),1),u("pre",Py,g(f(m)),1)])):q("",!0)]),u("div",Ry,[f(r)>0?(v(),k("button",{key:0,class:"px-4 py-2 text-sm font-medium text-gray-700 bg-white border border-gray-300 rounded-lg hover:bg-gray-50",onClick:O[25]||(O[25]=(...L)=>f(K)&&f(K)(...L))},g(T.$t("setup.nav.back")),1)):(v(),k("div",Ay)),f(r)<f(i)-1?(v(),k("button",{key:2,class:"px-6 py-2 text-sm font-medium text-white bg-blue-600 rounded-lg hover:bg-blue-700 disabled:opacity-50",disabled:!f(N),onClick:O[26]||(O[26]=(...L)=>f(S)&&f(S)(...L))},g(T.$t("setup.nav.next")),9,Dy)):(v(),k("button",{key:3,class:"px-6 py-2 text-sm font-medium text-white bg-green-600 rounded-lg hover:bg-green-700 disabled:opacity-50",disabled:f(o),onClick:O[27]||(O[27]=(...L)=>f(D)&&f(D)(...L))},g(f(o)?T.$t("setup.nav.saving"):T.$t("setup.nav.complete")),9,Ly))])]))]))}});async function Fy(){try{const e=await fetch("/api/setup/status");if(e.ok&&!(await e.json()).initialized){_i(Ey).use(Pi).mount("#app");return}}catch{}_i(K0).use(Pi).mount("#app")}Fy();
|