kanban-lite 1.0.26 → 1.0.28

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.
@@ -1,4 +1,4 @@
1
- var es=Object.defineProperty;var ts=(e,t,s)=>t in e?es(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s;var q=(e,t,s)=>ts(e,typeof t!="symbol"?t+"":t,s);import{r as f,R as Qe,F as cr,P as ht,C as Nt,a as fe,b as gt,T as Ce,c as $e,E as rs,d as Ct,X as ie,e as ss,f as ns,B as dr,I as ur,Q as pr,g as hr,L as gr,h as xr,i as fr,M as os,H as as,j as ls,k as xt,S as mr,U as br,l as St,Z as is,m as me,W as cs,n as ds,o as us,p as ps,q as hs,s as gs,t as xs}from"./icons-Bv4jE7zW.js";import{r as fs}from"./react-vendor-DTa8ZTpE.js";var vr={exports:{}},at={};/**
1
+ var ts=Object.defineProperty;var rs=(e,t,s)=>t in e?ts(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s;var q=(e,t,s)=>rs(e,typeof t!="symbol"?t+"":t,s);import{r as f,R as Qe,F as dr,P as ht,C as Nt,a as fe,b as gt,T as Ce,c as $e,E as ss,d as Ct,X as ie,e as ns,f as os,B as ur,I as pr,Q as hr,g as gr,L as xr,h as fr,i as mr,M as as,H as ls,j as is,k as xt,S as br,U as vr,l as St,Z as cs,m as me,W as ds,n as us,o as ps,p as hs,q as gs,s as xs,t as fs}from"./icons-Bv4jE7zW.js";import{r as ms}from"./react-vendor-DTa8ZTpE.js";var kr={exports:{}},at={};/**
2
2
  * @license React
3
3
  * react-jsx-runtime.production.min.js
4
4
  *
@@ -6,11 +6,11 @@ var es=Object.defineProperty;var ts=(e,t,s)=>t in e?es(e,t,{enumerable:!0,config
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */var ms=f,bs=Symbol.for("react.element"),vs=Symbol.for("react.fragment"),ks=Object.prototype.hasOwnProperty,ys=ms.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,ws={key:!0,ref:!0,__self:!0,__source:!0};function kr(e,t,s){var n,o={},i=null,l=null;s!==void 0&&(i=""+s),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(l=t.ref);for(n in t)ks.call(t,n)&&!ws.hasOwnProperty(n)&&(o[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps,t)o[n]===void 0&&(o[n]=t[n]);return{$$typeof:bs,type:e,key:i,ref:l,props:o,_owner:ys.current}}at.Fragment=vs;at.jsx=kr;at.jsxs=kr;vr.exports=at;var r=vr.exports;const Ue=new WebSocket(`ws://${window.location.host}/ws`),ft=[];let Dt=!1;Ue.addEventListener("open",()=>{Dt=!0;for(const e of ft)Ue.send(e);ft.length=0});Ue.addEventListener("message",e=>{try{const t=JSON.parse(e.data);window.postMessage(t,"*")}catch{}});Ue.addEventListener("close",()=>{Dt=!1});let mt=null;try{const e=sessionStorage.getItem("kanban-standalone-state");e&&(mt=JSON.parse(e))}catch{}function js(e){const t=document.createElement("input");t.type="file",t.multiple=!0,t.style.display="none",document.body.appendChild(t);const s=()=>{t.remove()};t.onchange=async()=>{if(!t.files||t.files.length===0){s();return}const n=[];for(const o of Array.from(t.files)){const i=await o.arrayBuffer(),l=new Uint8Array(i);let a="";for(let p=0;p<l.length;p++)a+=String.fromCharCode(l[p]);n.push({name:o.name,data:btoa(a)})}try{await fetch("/api/upload-attachment",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({featureId:e,files:n})})}catch(o){console.error("Failed to upload attachment:",o)}s()},t.click()}function zs(e,t){const s=`/api/attachment?featureId=${encodeURIComponent(e)}&filename=${encodeURIComponent(t)}`;window.open(s,"_blank")}window.acquireVsCodeApi=()=>({postMessage(e){const t=e;if(t.type==="addAttachment"){js(t.featureId);return}if(t.type==="openAttachment"){zs(t.featureId,t.attachment);return}if(t.type==="toggleTheme"){const n=document.body.classList.contains("vscode-dark");et(!n);return}const s=JSON.stringify(e);Dt?Ue.send(s):ft.push(s)},getState(){return mt},setState(e){mt=e;try{sessionStorage.setItem("kanban-standalone-state",JSON.stringify(e))}catch{}}});const bt=window.matchMedia("(prefers-color-scheme: dark)");function et(e){document.body.classList.toggle("vscode-dark",e),document.body.classList.toggle("vscode-light",!e)}bt.addEventListener("change",e=>et(e.matches));document.body?et(bt.matches):document.addEventListener("DOMContentLoaded",()=>et(bt.matches));var yr,_t=fs;yr=_t.createRoot,_t.hydrateRoot;const Ns="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";function Te(e,t,s){const n=s[0];if(t!=null&&e>=t)throw new Error(e+" >= "+t);if(e.slice(-1)===n||t&&t.slice(-1)===n)throw new Error("trailing zero");if(t){let l=0;for(;(e[l]||n)===t[l];)l++;if(l>0)return t.slice(0,l)+Te(e.slice(l),t.slice(l),s)}const o=e?s.indexOf(e[0]):0,i=t!=null?s.indexOf(t[0]):s.length;if(i-o>1){const l=Math.round(.5*(o+i));return s[l]}else return t&&t.length>1?t.slice(0,1):s[o]+Te(e.slice(1),null,s)}function wr(e){if(e.length!==jr(e[0]))throw new Error("invalid integer part of order key: "+e)}function jr(e){if(e>="a"&&e<="z")return e.charCodeAt(0)-97+2;if(e>="A"&&e<="Z")return 90-e.charCodeAt(0)+2;throw new Error("invalid order key head: "+e)}function Ze(e){const t=jr(e[0]);if(t>e.length)throw new Error("invalid order key: "+e);return e.slice(0,t)}function Kt(e,t){if(e==="A"+t[0].repeat(26))throw new Error("invalid order key: "+e);const s=Ze(e);if(e.slice(s.length).slice(-1)===t[0])throw new Error("invalid order key: "+e)}function Zt(e,t){wr(e);const[s,...n]=e.split("");let o=!0;for(let i=n.length-1;o&&i>=0;i--){const l=t.indexOf(n[i])+1;l===t.length?n[i]=t[0]:(n[i]=t[l],o=!1)}if(o){if(s==="Z")return"a"+t[0];if(s==="z")return null;const i=String.fromCharCode(s.charCodeAt(0)+1);return i>"a"?n.push(t[0]):n.pop(),i+n.join("")}else return s+n.join("")}function Cs(e,t){wr(e);const[s,...n]=e.split("");let o=!0;for(let i=n.length-1;o&&i>=0;i--){const l=t.indexOf(n[i])-1;l===-1?n[i]=t.slice(-1):(n[i]=t[l],o=!1)}if(o){if(s==="a")return"Z"+t.slice(-1);if(s==="A")return null;const i=String.fromCharCode(s.charCodeAt(0)-1);return i<"Z"?n.push(t.slice(-1)):n.pop(),i+n.join("")}else return s+n.join("")}function Ss(e,t,s=Ns){if(e!=null&&Kt(e,s),t!=null&&Kt(t,s),e!=null&&t!=null&&e>=t)throw new Error(e+" >= "+t);if(e==null){if(t==null)return"a"+s[0];const p=Ze(t),c=t.slice(p.length);if(p==="A"+s[0].repeat(26))return p+Te("",c,s);if(p<t)return p;const u=Cs(p,s);if(u==null)throw new Error("cannot decrement any more");return u}if(t==null){const p=Ze(e),c=e.slice(p.length),u=Zt(p,s);return u??p+Te(c,null,s)}const n=Ze(e),o=e.slice(n.length),i=Ze(t),l=t.slice(i.length);if(n===i)return n+Te(o,l,s);const a=Zt(n,s);if(a==null)throw new Error("cannot increment any more");return a<t?a:n+Te(o,null,s)}const qt=e=>{let t;const s=new Set,n=(c,u)=>{const g=typeof c=="function"?c(t):c;if(!Object.is(g,t)){const h=t;t=u??(typeof g!="object"||g===null)?g:Object.assign({},t,g),s.forEach(d=>d(t,h))}},o=()=>t,a={setState:n,getState:o,getInitialState:()=>p,subscribe:c=>(s.add(c),()=>s.delete(c))},p=t=e(n,o,a);return a},Ds=e=>e?qt(e):qt,Ms=e=>e;function Ts(e,t=Ms){const s=Qe.useSyncExternalStore(e.subscribe,Qe.useCallback(()=>t(e.getState()),[e,t]),Qe.useCallback(()=>t(e.getInitialState()),[e,t]));return Qe.useDebugValue(s),s}const Ut=e=>{const t=Ds(e),s=n=>Ts(t,n);return Object.assign(s,t),s},Es=e=>e?Ut(e):Ut,$s=()=>typeof document<"u"?document.body.classList.contains("vscode-dark")||document.body.classList.contains("vscode-high-contrast"):!1,As=e=>{const t=new Date;return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()},Ls=e=>{const t=new Date,s=new Date(t);s.setDate(t.getDate()-t.getDay()),s.setHours(0,0,0,0);const n=new Date(s);return n.setDate(s.getDate()+7),e>=s&&e<n},Rs=e=>{const t=new Date;return t.setHours(0,0,0,0),e<t};function Fs(e){const t={},s=e.replace(/meta\.([a-zA-Z0-9_.]+):\s*(\S+)/g,(n,o,i)=>(t[o]=i,"")).trim();return{metaFilter:t,plainText:s}}const _=Es((e,t)=>({features:[],columns:[],boards:[],currentBoard:"default",isDarkMode:$s(),searchQuery:"",priorityFilter:"all",assigneeFilter:"all",labelFilter:[],dueDateFilter:"all",columnSorts:{},layout:"horizontal",workspace:null,cardSettings:{showPriorityBadges:!0,showAssignee:!0,showDueDate:!0,showLabels:!0,showBuildWithAI:!0,showFileName:!1,compactMode:!1,markdownEditorMode:!1,showDeletedColumn:!1,defaultPriority:"medium",defaultStatus:"backlog",boardZoom:100,cardZoom:100},settingsOpen:!1,labelDefs:{},setWorkspace:s=>e({workspace:s}),setLabelDefs:s=>e({labelDefs:s}),setFeatures:s=>e({features:s}),setColumns:s=>e({columns:s}),setBoards:s=>e({boards:s}),setCurrentBoard:s=>e({currentBoard:s}),setIsDarkMode:s=>e({isDarkMode:s}),setCardSettings:s=>e(n=>({cardSettings:{...s,boardZoom:s.boardZoom??n.cardSettings.boardZoom,cardZoom:s.cardZoom??n.cardSettings.cardZoom}})),setSettingsOpen:s=>e({settingsOpen:s}),setSearchQuery:s=>e({searchQuery:s}),setPriorityFilter:s=>e({priorityFilter:s}),setAssigneeFilter:s=>e({assigneeFilter:s}),setLabelFilter:s=>e({labelFilter:s}),setDueDateFilter:s=>e({dueDateFilter:s}),setColumnSort:(s,n)=>e(o=>({columnSorts:n==="order"?Object.fromEntries(Object.entries(o.columnSorts).filter(([i])=>i!==s)):{...o.columnSorts,[s]:n}})),setLayout:s=>e({layout:s}),toggleLayout:()=>e(s=>({layout:s.layout==="horizontal"?"vertical":"horizontal"})),clearAllFilters:()=>e({searchQuery:"",priorityFilter:"all",assigneeFilter:"all",labelFilter:[],dueDateFilter:"all",columnSorts:{}}),addFeature:s=>e(n=>({features:[...n.features,s]})),updateFeature:(s,n)=>e(o=>({features:o.features.map(i=>i.id===s?{...i,...n}:i)})),removeFeature:s=>e(n=>({features:n.features.filter(o=>o.id!==s)})),getFeaturesByStatus:s=>{const{features:n}=t();return n.filter(o=>o.status===s).sort((o,i)=>o.order<i.order?-1:o.order>i.order?1:0)},getFilteredFeaturesByStatus:s=>{const{features:n,searchQuery:o,priorityFilter:i,assigneeFilter:l,labelFilter:a,dueDateFilter:p,columnSorts:c}=t(),u=c[s]||"order";return n.filter(g=>{var h;if(g.status!==s||i!=="all"&&g.priority!==i)return!1;if(l!=="all"){if(l==="unassigned"){if(g.assignee)return!1}else if(g.assignee!==l)return!1}if(a.length>0&&!g.labels.some(d=>a.includes(d)))return!1;if(p!=="all")if(p==="no-date"){if(g.dueDate)return!1}else if(g.dueDate){const d=new Date(g.dueDate);if(p==="overdue"&&!Rs(d)||p==="today"&&!As(d)||p==="this-week"&&!Ls(d))return!1}else return!1;if(o){const{metaFilter:d,plainText:x}=Fs(o);if(Object.keys(d).length>0&&!Object.entries(d).every(([v,k])=>{if(!g.metadata)return!1;const z=v.split(".").reduce((E,y)=>E!=null&&typeof E=="object"?E[y]:void 0,g.metadata);return z!=null&&String(z).toLowerCase().includes(k.toLowerCase())}))return!1;if(x){const m=x.toLowerCase();if(!(g.content.toLowerCase().includes(m)||g.id.toLowerCase().includes(m)||((h=g.assignee)==null?void 0:h.toLowerCase().includes(m))||g.labels.some(k=>k.toLowerCase().includes(m))))return!1}}return!0}).sort((g,h)=>u==="created:asc"?g.created.localeCompare(h.created):u==="created:desc"?h.created.localeCompare(g.created):u==="modified:asc"?g.modified.localeCompare(h.modified):u==="modified:desc"?h.modified.localeCompare(g.modified):g.order<h.order?-1:g.order>h.order?1:0)},getUniqueAssignees:()=>{const{features:s}=t(),n=new Set;return s.forEach(o=>{o.assignee&&n.add(o.assignee)}),Array.from(n).sort()},getUniqueLabels:()=>{const{features:s}=t(),n=new Set;return s.forEach(o=>{o.labels.forEach(i=>n.add(i))}),Array.from(n).sort()},hasActiveFilters:()=>{const{searchQuery:s,priorityFilter:n,assigneeFilter:o,labelFilter:i,dueDateFilter:l,columnSorts:a}=t();return s!==""||n!=="all"||o!=="all"||i.length>0||l!=="all"||Object.keys(a).length>0}}));function Mt(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var De=Mt();function zr(e){De=e}var Ne={exec:()=>null};function O(e,t=""){let s=typeof e=="string"?e:e.source,n={replace:(o,i)=>{let l=typeof i=="string"?i:i.source;return l=l.replace(ee.caret,"$1"),s=s.replace(o,l),n},getRegex:()=>new RegExp(s,t)};return n}var Bs=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),ee={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)}}>`)},Is=/^(?:[ \t]*(?:\n|$))+/,Ps=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Os=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,He=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,_s=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Tt=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,Nr=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Cr=O(Nr).replace(/bull/g,Tt).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(),Ks=O(Nr).replace(/bull/g,Tt).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(),Et=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Zs=/^[^\n]+/,$t=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,qs=O(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",$t).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Us=O(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Tt).getRegex(),lt="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",At=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Hs=O("^ {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",At).replace("tag",lt).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Sr=O(Et).replace("hr",He).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",lt).getRegex(),Gs=O(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Sr).getRegex(),Lt={blockquote:Gs,code:Ps,def:qs,fences:Os,heading:_s,hr:He,html:Hs,lheading:Cr,list:Us,newline:Is,paragraph:Sr,table:Ne,text:Zs},Ht=O("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",He).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",lt).getRegex(),Ws={...Lt,lheading:Ks,table:Ht,paragraph:O(Et).replace("hr",He).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Ht).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",lt).getRegex()},Vs={...Lt,html:O(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",At).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:Ne,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:O(Et).replace("hr",He).replace("heading",` *#{1,6} *[^
10
- ]`).replace("lheading",Cr).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Qs=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Ys=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Dr=/^( {2,}|\\)\n(?!\s*$)/,Js=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,it=/[\p{P}\p{S}]/u,Rt=/[\s\p{P}\p{S}]/u,Mr=/[^\s\p{P}\p{S}]/u,Xs=O(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Rt).getRegex(),Tr=/(?!~)[\p{P}\p{S}]/u,en=/(?!~)[\s\p{P}\p{S}]/u,tn=/(?:[^\s\p{P}\p{S}]|~)/u,Er=/(?![*_])[\p{P}\p{S}]/u,rn=/(?![*_])[\s\p{P}\p{S}]/u,sn=/(?:[^\s\p{P}\p{S}]|[*_])/u,nn=O(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",Bs?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),$r=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,on=O($r,"u").replace(/punct/g,it).getRegex(),an=O($r,"u").replace(/punct/g,Tr).getRegex(),Ar="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",ln=O(Ar,"gu").replace(/notPunctSpace/g,Mr).replace(/punctSpace/g,Rt).replace(/punct/g,it).getRegex(),cn=O(Ar,"gu").replace(/notPunctSpace/g,tn).replace(/punctSpace/g,en).replace(/punct/g,Tr).getRegex(),dn=O("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Mr).replace(/punctSpace/g,Rt).replace(/punct/g,it).getRegex(),un=O(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,Er).getRegex(),pn="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",hn=O(pn,"gu").replace(/notPunctSpace/g,sn).replace(/punctSpace/g,rn).replace(/punct/g,Er).getRegex(),gn=O(/\\(punct)/,"gu").replace(/punct/g,it).getRegex(),xn=O(/^<(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(),fn=O(At).replace("(?:-->|$)","-->").getRegex(),mn=O("^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",fn).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),tt=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,bn=O(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",tt).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Lr=O(/^!?\[(label)\]\[(ref)\]/).replace("label",tt).replace("ref",$t).getRegex(),Rr=O(/^!?\[(ref)\](?:\[\])?/).replace("ref",$t).getRegex(),vn=O("reflink|nolink(?!\\()","g").replace("reflink",Lr).replace("nolink",Rr).getRegex(),Gt=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Ft={_backpedal:Ne,anyPunctuation:gn,autolink:xn,blockSkip:nn,br:Dr,code:Ys,del:Ne,delLDelim:Ne,delRDelim:Ne,emStrongLDelim:on,emStrongRDelimAst:ln,emStrongRDelimUnd:dn,escape:Qs,link:bn,nolink:Rr,punctuation:Xs,reflink:Lr,reflinkSearch:vn,tag:mn,text:Js,url:Ne},kn={...Ft,link:O(/^!?\[(label)\]\((.*?)\)/).replace("label",tt).getRegex(),reflink:O(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",tt).getRegex()},vt={...Ft,emStrongRDelimAst:cn,emStrongLDelim:an,delLDelim:un,delRDelim:hn,url:O(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",Gt).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:O(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",Gt).getRegex()},yn={...vt,br:O(Dr).replace("{2,}","*").getRegex(),text:O(vt.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Ye={normal:Lt,gfm:Ws,pedantic:Vs},Be={normal:Ft,gfm:vt,breaks:yn,pedantic:kn},wn={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Wt=e=>wn[e];function le(e,t){if(t){if(ee.escapeTest.test(e))return e.replace(ee.escapeReplace,Wt)}else if(ee.escapeTestNoEncode.test(e))return e.replace(ee.escapeReplaceNoEncode,Wt);return e}function Vt(e){try{e=encodeURI(e).replace(ee.percentDecode,"%")}catch{return null}return e}function Qt(e,t){var i;let s=e.replace(ee.findPipe,(l,a,p)=>{let c=!1,u=a;for(;--u>=0&&p[u]==="\\";)c=!c;return c?"|":" |"}),n=s.split(ee.splitPipe),o=0;if(n[0].trim()||n.shift(),n.length>0&&!((i=n.at(-1))!=null&&i.trim())&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length<t;)n.push("");for(;o<n.length;o++)n[o]=n[o].trim().replace(ee.slashPipe,"|");return n}function Ie(e,t,s){let n=e.length;if(n===0)return"";let o=0;for(;o<n&&e.charAt(n-o-1)===t;)o++;return e.slice(0,n-o)}function jn(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 zn(e,t=0){let s=t,n="";for(let o of e)if(o===" "){let i=4-s%4;n+=" ".repeat(i),s+=i}else n+=o,s++;return n}function Yt(e,t,s,n,o){let i=t.href,l=t.title||null,a=e[1].replace(o.other.outputLinkReplace,"$1");n.state.inLink=!0;let p={type:e[0].charAt(0)==="!"?"image":"link",raw:s,href:i,title:l,text:a,tokens:n.inlineTokens(a)};return n.state.inLink=!1,p}function Nn(e,t,s){let n=e.match(s.other.indentCodeCompensation);if(n===null)return t;let o=n[1];return t.split(`
9
+ */var bs=f,vs=Symbol.for("react.element"),ks=Symbol.for("react.fragment"),ys=Object.prototype.hasOwnProperty,ws=bs.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,js={key:!0,ref:!0,__self:!0,__source:!0};function yr(e,t,s){var n,o={},i=null,l=null;s!==void 0&&(i=""+s),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(l=t.ref);for(n in t)ys.call(t,n)&&!js.hasOwnProperty(n)&&(o[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps,t)o[n]===void 0&&(o[n]=t[n]);return{$$typeof:vs,type:e,key:i,ref:l,props:o,_owner:ws.current}}at.Fragment=ks;at.jsx=yr;at.jsxs=yr;kr.exports=at;var r=kr.exports;const Ue=new WebSocket(`ws://${window.location.host}/ws`),ft=[];let Dt=!1;Ue.addEventListener("open",()=>{Dt=!0;for(const e of ft)Ue.send(e);ft.length=0});Ue.addEventListener("message",e=>{try{const t=JSON.parse(e.data);window.postMessage(t,"*")}catch{}});Ue.addEventListener("close",()=>{Dt=!1});let mt=null;try{const e=sessionStorage.getItem("kanban-standalone-state");e&&(mt=JSON.parse(e))}catch{}function zs(e){const t=document.createElement("input");t.type="file",t.multiple=!0,t.style.display="none",document.body.appendChild(t);const s=()=>{t.remove()};t.onchange=async()=>{if(!t.files||t.files.length===0){s();return}const n=[];for(const o of Array.from(t.files)){const i=await o.arrayBuffer(),l=new Uint8Array(i);let a="";for(let p=0;p<l.length;p++)a+=String.fromCharCode(l[p]);n.push({name:o.name,data:btoa(a)})}try{await fetch("/api/upload-attachment",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({featureId:e,files:n})})}catch(o){console.error("Failed to upload attachment:",o)}s()},t.click()}function Ns(e,t){const s=`/api/attachment?featureId=${encodeURIComponent(e)}&filename=${encodeURIComponent(t)}`;window.open(s,"_blank")}window.acquireVsCodeApi=()=>({postMessage(e){const t=e;if(t.type==="addAttachment"){zs(t.featureId);return}if(t.type==="openAttachment"){Ns(t.featureId,t.attachment);return}if(t.type==="toggleTheme"){const n=document.body.classList.contains("vscode-dark");et(!n);return}const s=JSON.stringify(e);Dt?Ue.send(s):ft.push(s)},getState(){return mt},setState(e){mt=e;try{sessionStorage.setItem("kanban-standalone-state",JSON.stringify(e))}catch{}}});const bt=window.matchMedia("(prefers-color-scheme: dark)");function et(e){document.body.classList.toggle("vscode-dark",e),document.body.classList.toggle("vscode-light",!e)}bt.addEventListener("change",e=>et(e.matches));document.body?et(bt.matches):document.addEventListener("DOMContentLoaded",()=>et(bt.matches));var wr,_t=ms;wr=_t.createRoot,_t.hydrateRoot;const Cs="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";function Te(e,t,s){const n=s[0];if(t!=null&&e>=t)throw new Error(e+" >= "+t);if(e.slice(-1)===n||t&&t.slice(-1)===n)throw new Error("trailing zero");if(t){let l=0;for(;(e[l]||n)===t[l];)l++;if(l>0)return t.slice(0,l)+Te(e.slice(l),t.slice(l),s)}const o=e?s.indexOf(e[0]):0,i=t!=null?s.indexOf(t[0]):s.length;if(i-o>1){const l=Math.round(.5*(o+i));return s[l]}else return t&&t.length>1?t.slice(0,1):s[o]+Te(e.slice(1),null,s)}function jr(e){if(e.length!==zr(e[0]))throw new Error("invalid integer part of order key: "+e)}function zr(e){if(e>="a"&&e<="z")return e.charCodeAt(0)-97+2;if(e>="A"&&e<="Z")return 90-e.charCodeAt(0)+2;throw new Error("invalid order key head: "+e)}function Ze(e){const t=zr(e[0]);if(t>e.length)throw new Error("invalid order key: "+e);return e.slice(0,t)}function Kt(e,t){if(e==="A"+t[0].repeat(26))throw new Error("invalid order key: "+e);const s=Ze(e);if(e.slice(s.length).slice(-1)===t[0])throw new Error("invalid order key: "+e)}function Zt(e,t){jr(e);const[s,...n]=e.split("");let o=!0;for(let i=n.length-1;o&&i>=0;i--){const l=t.indexOf(n[i])+1;l===t.length?n[i]=t[0]:(n[i]=t[l],o=!1)}if(o){if(s==="Z")return"a"+t[0];if(s==="z")return null;const i=String.fromCharCode(s.charCodeAt(0)+1);return i>"a"?n.push(t[0]):n.pop(),i+n.join("")}else return s+n.join("")}function Ss(e,t){jr(e);const[s,...n]=e.split("");let o=!0;for(let i=n.length-1;o&&i>=0;i--){const l=t.indexOf(n[i])-1;l===-1?n[i]=t.slice(-1):(n[i]=t[l],o=!1)}if(o){if(s==="a")return"Z"+t.slice(-1);if(s==="A")return null;const i=String.fromCharCode(s.charCodeAt(0)-1);return i<"Z"?n.push(t.slice(-1)):n.pop(),i+n.join("")}else return s+n.join("")}function Ds(e,t,s=Cs){if(e!=null&&Kt(e,s),t!=null&&Kt(t,s),e!=null&&t!=null&&e>=t)throw new Error(e+" >= "+t);if(e==null){if(t==null)return"a"+s[0];const p=Ze(t),c=t.slice(p.length);if(p==="A"+s[0].repeat(26))return p+Te("",c,s);if(p<t)return p;const u=Ss(p,s);if(u==null)throw new Error("cannot decrement any more");return u}if(t==null){const p=Ze(e),c=e.slice(p.length),u=Zt(p,s);return u??p+Te(c,null,s)}const n=Ze(e),o=e.slice(n.length),i=Ze(t),l=t.slice(i.length);if(n===i)return n+Te(o,l,s);const a=Zt(n,s);if(a==null)throw new Error("cannot increment any more");return a<t?a:n+Te(o,null,s)}const qt=e=>{let t;const s=new Set,n=(c,u)=>{const g=typeof c=="function"?c(t):c;if(!Object.is(g,t)){const h=t;t=u??(typeof g!="object"||g===null)?g:Object.assign({},t,g),s.forEach(d=>d(t,h))}},o=()=>t,a={setState:n,getState:o,getInitialState:()=>p,subscribe:c=>(s.add(c),()=>s.delete(c))},p=t=e(n,o,a);return a},Ms=e=>e?qt(e):qt,Ts=e=>e;function Es(e,t=Ts){const s=Qe.useSyncExternalStore(e.subscribe,Qe.useCallback(()=>t(e.getState()),[e,t]),Qe.useCallback(()=>t(e.getInitialState()),[e,t]));return Qe.useDebugValue(s),s}const Ut=e=>{const t=Ms(e),s=n=>Es(t,n);return Object.assign(s,t),s},$s=e=>e?Ut(e):Ut,As=()=>typeof document<"u"?document.body.classList.contains("vscode-dark")||document.body.classList.contains("vscode-high-contrast"):!1,Ls=e=>{const t=new Date;return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()},Rs=e=>{const t=new Date,s=new Date(t);s.setDate(t.getDate()-t.getDay()),s.setHours(0,0,0,0);const n=new Date(s);return n.setDate(s.getDate()+7),e>=s&&e<n},Fs=e=>{const t=new Date;return t.setHours(0,0,0,0),e<t};function Bs(e){const t={},s=e.replace(/meta\.([a-zA-Z0-9_.]+):\s*(\S+)/g,(n,o,i)=>(t[o]=i,"")).trim();return{metaFilter:t,plainText:s}}const _=$s((e,t)=>({features:[],columns:[],boards:[],currentBoard:"default",isDarkMode:As(),searchQuery:"",priorityFilter:"all",assigneeFilter:"all",labelFilter:[],dueDateFilter:"all",columnSorts:{},layout:"horizontal",workspace:null,cardSettings:{showPriorityBadges:!0,showAssignee:!0,showDueDate:!0,showLabels:!0,showBuildWithAI:!0,showFileName:!1,compactMode:!1,markdownEditorMode:!1,showDeletedColumn:!1,defaultPriority:"medium",defaultStatus:"backlog",boardZoom:100,cardZoom:100},settingsOpen:!1,labelDefs:{},setWorkspace:s=>e({workspace:s}),setLabelDefs:s=>e({labelDefs:s}),setFeatures:s=>e({features:s}),setColumns:s=>e({columns:s}),setBoards:s=>e({boards:s}),setCurrentBoard:s=>e({currentBoard:s}),setIsDarkMode:s=>e({isDarkMode:s}),setCardSettings:s=>e(n=>({cardSettings:{...s,boardZoom:s.boardZoom??n.cardSettings.boardZoom,cardZoom:s.cardZoom??n.cardSettings.cardZoom}})),setSettingsOpen:s=>e({settingsOpen:s}),setSearchQuery:s=>e({searchQuery:s}),setPriorityFilter:s=>e({priorityFilter:s}),setAssigneeFilter:s=>e({assigneeFilter:s}),setLabelFilter:s=>e({labelFilter:s}),setDueDateFilter:s=>e({dueDateFilter:s}),setColumnSort:(s,n)=>e(o=>({columnSorts:n==="order"?Object.fromEntries(Object.entries(o.columnSorts).filter(([i])=>i!==s)):{...o.columnSorts,[s]:n}})),setLayout:s=>e({layout:s}),toggleLayout:()=>e(s=>({layout:s.layout==="horizontal"?"vertical":"horizontal"})),clearAllFilters:()=>e({searchQuery:"",priorityFilter:"all",assigneeFilter:"all",labelFilter:[],dueDateFilter:"all",columnSorts:{}}),addFeature:s=>e(n=>({features:[...n.features,s]})),updateFeature:(s,n)=>e(o=>({features:o.features.map(i=>i.id===s?{...i,...n}:i)})),removeFeature:s=>e(n=>({features:n.features.filter(o=>o.id!==s)})),getFeaturesByStatus:s=>{const{features:n}=t();return n.filter(o=>o.status===s).sort((o,i)=>o.order<i.order?-1:o.order>i.order?1:0)},getFilteredFeaturesByStatus:s=>{const{features:n,searchQuery:o,priorityFilter:i,assigneeFilter:l,labelFilter:a,dueDateFilter:p,columnSorts:c}=t(),u=c[s]||"order";return n.filter(g=>{var h;if(g.status!==s||i!=="all"&&g.priority!==i)return!1;if(l!=="all"){if(l==="unassigned"){if(g.assignee)return!1}else if(g.assignee!==l)return!1}if(a.length>0&&!g.labels.some(d=>a.includes(d)))return!1;if(p!=="all")if(p==="no-date"){if(g.dueDate)return!1}else if(g.dueDate){const d=new Date(g.dueDate);if(p==="overdue"&&!Fs(d)||p==="today"&&!Ls(d)||p==="this-week"&&!Rs(d))return!1}else return!1;if(o){const{metaFilter:d,plainText:x}=Bs(o);if(Object.keys(d).length>0&&!Object.entries(d).every(([v,k])=>{if(!g.metadata)return!1;const z=v.split(".").reduce((E,y)=>E!=null&&typeof E=="object"?E[y]:void 0,g.metadata);return z!=null&&String(z).toLowerCase().includes(k.toLowerCase())}))return!1;if(x){const m=x.toLowerCase();if(!(g.content.toLowerCase().includes(m)||g.id.toLowerCase().includes(m)||((h=g.assignee)==null?void 0:h.toLowerCase().includes(m))||g.labels.some(k=>k.toLowerCase().includes(m))))return!1}}return!0}).sort((g,h)=>u==="created:asc"?g.created.localeCompare(h.created):u==="created:desc"?h.created.localeCompare(g.created):u==="modified:asc"?g.modified.localeCompare(h.modified):u==="modified:desc"?h.modified.localeCompare(g.modified):g.order<h.order?-1:g.order>h.order?1:0)},getUniqueAssignees:()=>{const{features:s}=t(),n=new Set;return s.forEach(o=>{o.assignee&&n.add(o.assignee)}),Array.from(n).sort()},getUniqueLabels:()=>{const{features:s}=t(),n=new Set;return s.forEach(o=>{o.labels.forEach(i=>n.add(i))}),Array.from(n).sort()},hasActiveFilters:()=>{const{searchQuery:s,priorityFilter:n,assigneeFilter:o,labelFilter:i,dueDateFilter:l,columnSorts:a}=t();return s!==""||n!=="all"||o!=="all"||i.length>0||l!=="all"||Object.keys(a).length>0}}));function Mt(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var De=Mt();function Nr(e){De=e}var Ne={exec:()=>null};function O(e,t=""){let s=typeof e=="string"?e:e.source,n={replace:(o,i)=>{let l=typeof i=="string"?i:i.source;return l=l.replace(ee.caret,"$1"),s=s.replace(o,l),n},getRegex:()=>new RegExp(s,t)};return n}var Is=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),ee={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)}}>`)},Ps=/^(?:[ \t]*(?:\n|$))+/,Os=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,_s=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,He=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Ks=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Tt=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,Cr=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Sr=O(Cr).replace(/bull/g,Tt).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(),Zs=O(Cr).replace(/bull/g,Tt).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(),Et=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,qs=/^[^\n]+/,$t=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Us=O(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",$t).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Hs=O(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Tt).getRegex(),lt="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",At=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Gs=O("^ {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",At).replace("tag",lt).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Dr=O(Et).replace("hr",He).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",lt).getRegex(),Ws=O(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Dr).getRegex(),Lt={blockquote:Ws,code:Os,def:Us,fences:_s,heading:Ks,hr:He,html:Gs,lheading:Sr,list:Hs,newline:Ps,paragraph:Dr,table:Ne,text:qs},Ht=O("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",He).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",lt).getRegex(),Vs={...Lt,lheading:Zs,table:Ht,paragraph:O(Et).replace("hr",He).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Ht).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",lt).getRegex()},Qs={...Lt,html:O(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",At).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:Ne,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:O(Et).replace("hr",He).replace("heading",` *#{1,6} *[^
10
+ ]`).replace("lheading",Sr).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Ys=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Js=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Mr=/^( {2,}|\\)\n(?!\s*$)/,Xs=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,it=/[\p{P}\p{S}]/u,Rt=/[\s\p{P}\p{S}]/u,Tr=/[^\s\p{P}\p{S}]/u,en=O(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Rt).getRegex(),Er=/(?!~)[\p{P}\p{S}]/u,tn=/(?!~)[\s\p{P}\p{S}]/u,rn=/(?:[^\s\p{P}\p{S}]|~)/u,$r=/(?![*_])[\p{P}\p{S}]/u,sn=/(?![*_])[\s\p{P}\p{S}]/u,nn=/(?:[^\s\p{P}\p{S}]|[*_])/u,on=O(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",Is?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),Ar=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,an=O(Ar,"u").replace(/punct/g,it).getRegex(),ln=O(Ar,"u").replace(/punct/g,Er).getRegex(),Lr="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",cn=O(Lr,"gu").replace(/notPunctSpace/g,Tr).replace(/punctSpace/g,Rt).replace(/punct/g,it).getRegex(),dn=O(Lr,"gu").replace(/notPunctSpace/g,rn).replace(/punctSpace/g,tn).replace(/punct/g,Er).getRegex(),un=O("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Tr).replace(/punctSpace/g,Rt).replace(/punct/g,it).getRegex(),pn=O(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,$r).getRegex(),hn="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",gn=O(hn,"gu").replace(/notPunctSpace/g,nn).replace(/punctSpace/g,sn).replace(/punct/g,$r).getRegex(),xn=O(/\\(punct)/,"gu").replace(/punct/g,it).getRegex(),fn=O(/^<(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(),mn=O(At).replace("(?:-->|$)","-->").getRegex(),bn=O("^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",mn).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),tt=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,vn=O(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",tt).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Rr=O(/^!?\[(label)\]\[(ref)\]/).replace("label",tt).replace("ref",$t).getRegex(),Fr=O(/^!?\[(ref)\](?:\[\])?/).replace("ref",$t).getRegex(),kn=O("reflink|nolink(?!\\()","g").replace("reflink",Rr).replace("nolink",Fr).getRegex(),Gt=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Ft={_backpedal:Ne,anyPunctuation:xn,autolink:fn,blockSkip:on,br:Mr,code:Js,del:Ne,delLDelim:Ne,delRDelim:Ne,emStrongLDelim:an,emStrongRDelimAst:cn,emStrongRDelimUnd:un,escape:Ys,link:vn,nolink:Fr,punctuation:en,reflink:Rr,reflinkSearch:kn,tag:bn,text:Xs,url:Ne},yn={...Ft,link:O(/^!?\[(label)\]\((.*?)\)/).replace("label",tt).getRegex(),reflink:O(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",tt).getRegex()},vt={...Ft,emStrongRDelimAst:dn,emStrongLDelim:ln,delLDelim:pn,delRDelim:gn,url:O(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",Gt).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:O(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",Gt).getRegex()},wn={...vt,br:O(Mr).replace("{2,}","*").getRegex(),text:O(vt.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Ye={normal:Lt,gfm:Vs,pedantic:Qs},Be={normal:Ft,gfm:vt,breaks:wn,pedantic:yn},jn={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Wt=e=>jn[e];function le(e,t){if(t){if(ee.escapeTest.test(e))return e.replace(ee.escapeReplace,Wt)}else if(ee.escapeTestNoEncode.test(e))return e.replace(ee.escapeReplaceNoEncode,Wt);return e}function Vt(e){try{e=encodeURI(e).replace(ee.percentDecode,"%")}catch{return null}return e}function Qt(e,t){var i;let s=e.replace(ee.findPipe,(l,a,p)=>{let c=!1,u=a;for(;--u>=0&&p[u]==="\\";)c=!c;return c?"|":" |"}),n=s.split(ee.splitPipe),o=0;if(n[0].trim()||n.shift(),n.length>0&&!((i=n.at(-1))!=null&&i.trim())&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length<t;)n.push("");for(;o<n.length;o++)n[o]=n[o].trim().replace(ee.slashPipe,"|");return n}function Ie(e,t,s){let n=e.length;if(n===0)return"";let o=0;for(;o<n&&e.charAt(n-o-1)===t;)o++;return e.slice(0,n-o)}function zn(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 Nn(e,t=0){let s=t,n="";for(let o of e)if(o===" "){let i=4-s%4;n+=" ".repeat(i),s+=i}else n+=o,s++;return n}function Yt(e,t,s,n,o){let i=t.href,l=t.title||null,a=e[1].replace(o.other.outputLinkReplace,"$1");n.state.inLink=!0;let p={type:e[0].charAt(0)==="!"?"image":"link",raw:s,href:i,title:l,text:a,tokens:n.inlineTokens(a)};return n.state.inLink=!1,p}function Cn(e,t,s){let n=e.match(s.other.indentCodeCompensation);if(n===null)return t;let o=n[1];return t.split(`
11
11
  `).map(i=>{let l=i.match(s.other.beginningSpace);if(l===null)return i;let[a]=l;return a.length>=o.length?i.slice(o.length):i}).join(`
12
12
  `)}var rt=class{constructor(e){q(this,"options");q(this,"rules");q(this,"lexer");this.options=e||De}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:Ie(s,`
13
- `)}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let s=t[0],n=Nn(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=Ie(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:Ie(t[0],`
13
+ `)}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let s=t[0],n=Cn(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=Ie(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:Ie(t[0],`
14
14
  `)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let s=Ie(t[0],`
15
15
  `).split(`
16
16
  `),n="",o="",i=[];for(;s.length>0;){let l=!1,a=[],p;for(p=0;p<s.length;p++)if(this.rules.other.blockquoteStart.test(s[p]))a.push(s[p]),l=!0;else if(!l)a.push(s[p]);else break;s=s.slice(p);let c=a.join(`
@@ -22,7 +22,7 @@ ${u}`:u;let g=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTo
22
22
  `),m=this.blockquote(x);i[i.length-1]=m,n=n.substring(0,n.length-d.raw.length)+m.raw,o=o.substring(0,o.length-d.text.length)+m.text;break}else if((h==null?void 0:h.type)==="list"){let d=h,x=d.raw+`
23
23
  `+s.join(`
24
24
  `),m=this.list(x);i[i.length-1]=m,n=n.substring(0,n.length-h.raw.length)+m.raw,o=o.substring(0,o.length-d.raw.length)+m.raw,s=x.substring(i.at(-1).raw.length).split(`
25
- `);continue}}return{type:"blockquote",raw:n,tokens:i,text:o}}}list(e){var s,n;let t=this.rules.block.list.exec(e);if(t){let o=t[1].trim(),i=o.length>1,l={type:"list",raw:"",ordered:i,start:i?+o.slice(0,-1):"",loose:!1,items:[]};o=i?`\\d{1,9}\\${o.slice(-1)}`:`\\${o}`,this.options.pedantic&&(o=i?o:"[*+-]");let a=this.rules.other.listItemRegex(o),p=!1;for(;e;){let u=!1,g="",h="";if(!(t=a.exec(e))||this.rules.block.hr.test(e))break;g=t[0],e=e.substring(g.length);let d=zn(t[2].split(`
25
+ `);continue}}return{type:"blockquote",raw:n,tokens:i,text:o}}}list(e){var s,n;let t=this.rules.block.list.exec(e);if(t){let o=t[1].trim(),i=o.length>1,l={type:"list",raw:"",ordered:i,start:i?+o.slice(0,-1):"",loose:!1,items:[]};o=i?`\\d{1,9}\\${o.slice(-1)}`:`\\${o}`,this.options.pedantic&&(o=i?o:"[*+-]");let a=this.rules.other.listItemRegex(o),p=!1;for(;e;){let u=!1,g="",h="";if(!(t=a.exec(e))||this.rules.block.hr.test(e))break;g=t[0],e=e.substring(g.length);let d=Nn(t[2].split(`
26
26
  `,1)[0],t[1].length),x=e.split(`
27
27
  `,1)[0],m=!d.trim(),v=0;if(this.options.pedantic?(v=2,h=d.trimStart()):m?v=t[1].length+1:(v=d.search(this.rules.other.nonSpaceChar),v=v>4?1:v,h=d.slice(v),v+=t[1].length),m&&this.rules.other.blankLine.test(x)&&(g+=x+`
28
28
  `,e=e.substring(x.length+1),u=!0),!u){let k=this.rules.other.nextBulletRegex(v),z=this.rules.other.hrRegex(v),E=this.rules.other.fencesBeginRegex(v),y=this.rules.other.headingBeginRegex(v),D=this.rules.other.htmlBeginRegex(v),N=this.rules.other.blockquoteBeginRegex(v);for(;e;){let B=e.split(`
@@ -31,7 +31,7 @@ ${u}`:u;let g=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTo
31
31
  `+x}m=!x.trim(),g+=B+`
32
32
  `,e=e.substring(B.length+1),d=I.slice(v)}}l.loose||(p?l.loose=!0:this.rules.other.doubleBlankLine.test(g)&&(p=!0)),l.items.push({type:"list_item",raw:g,task:!!this.options.gfm&&this.rules.other.listIsTask.test(h),loose:!1,text:h,tokens:[]}),l.raw+=g}let c=l.items.at(-1);if(c)c.raw=c.raw.trimEnd(),c.text=c.text.trimEnd();else return;l.raw=l.raw.trimEnd();for(let u of l.items){if(this.lexer.state.top=!1,u.tokens=this.lexer.blockTokens(u.text,[]),u.task){if(u.text=u.text.replace(this.rules.other.listReplaceTask,""),((s=u.tokens[0])==null?void 0:s.type)==="text"||((n=u.tokens[0])==null?void 0:n.type)==="paragraph"){u.tokens[0].raw=u.tokens[0].raw.replace(this.rules.other.listReplaceTask,""),u.tokens[0].text=u.tokens[0].text.replace(this.rules.other.listReplaceTask,"");for(let h=this.lexer.inlineQueue.length-1;h>=0;h--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[h].src)){this.lexer.inlineQueue[h].src=this.lexer.inlineQueue[h].src.replace(this.rules.other.listReplaceTask,"");break}}let g=this.rules.other.listTaskCheckbox.exec(u.raw);if(g){let h={type:"checkbox",raw:g[0]+" ",checked:g[0]!=="[ ]"};u.checked=h.checked,l.loose?u.tokens[0]&&["paragraph","text"].includes(u.tokens[0].type)&&"tokens"in u.tokens[0]&&u.tokens[0].tokens?(u.tokens[0].raw=h.raw+u.tokens[0].raw,u.tokens[0].text=h.raw+u.tokens[0].text,u.tokens[0].tokens.unshift(h)):u.tokens.unshift({type:"paragraph",raw:h.raw,text:h.raw,tokens:[h]}):u.tokens.unshift(h)}}if(!l.loose){let g=u.tokens.filter(d=>d.type==="space"),h=g.length>0&&g.some(d=>this.rules.other.anyLine.test(d.raw));l.loose=h}}if(l.loose)for(let u of l.items){u.loose=!0;for(let g of u.tokens)g.type==="text"&&(g.type="paragraph")}return l}}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"):"",o=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:o}}}table(e){var l;let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let s=Qt(t[1]),n=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),o=(l=t[3])!=null&&l.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split(`
33
33
  `):[],i={type:"table",raw:t[0],header:[],align:[],rows:[]};if(s.length===n.length){for(let a of n)this.rules.other.tableAlignRight.test(a)?i.align.push("right"):this.rules.other.tableAlignCenter.test(a)?i.align.push("center"):this.rules.other.tableAlignLeft.test(a)?i.align.push("left"):i.align.push(null);for(let a=0;a<s.length;a++)i.header.push({text:s[a],tokens:this.lexer.inline(s[a]),header:!0,align:i.align[a]});for(let a of o)i.rows.push(Qt(a,i.header.length).map((p,c)=>({text:p,tokens:this.lexer.inline(p),header:!1,align:i.align[c]})));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)===`
34
- `?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=Ie(s.slice(0,-1),"\\");if((s.length-i.length)%2===0)return}else{let i=jn(t[2],"()");if(i===-2)return;if(i>-1){let l=(t[0].indexOf("!")===0?5:4)+t[1].length+i;t[2]=t[2].substring(0,i),t[0]=t[0].substring(0,l).trim(),t[3]=""}}let n=t[2],o="";if(this.options.pedantic){let i=this.rules.other.pedanticHrefTitle.exec(n);i&&(n=i[1],o=i[3])}else o=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)),Yt(t,{href:n&&n.replace(this.rules.inline.anyPunctuation,"$1"),title:o&&o.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," "),o=t[n.toLowerCase()];if(!o){let i=s[0].charAt(0);return{type:"text",raw:i,text:i}}return Yt(s,o,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 o=[...n[0]].length-1,i,l,a=o,p=0,c=n[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(c.lastIndex=0,t=t.slice(-1*e.length+o);(n=c.exec(t))!=null;){if(i=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!i)continue;if(l=[...i].length,n[3]||n[4]){a+=l;continue}else if((n[5]||n[6])&&o%3&&!((o+l)%3)){p+=l;continue}if(a-=l,a>0)continue;l=Math.min(l,l+a+p);let u=[...n[0]][0].length,g=e.slice(0,o+n.index+u+l);if(Math.min(o,l)%2){let d=g.slice(1,-1);return{type:"em",raw:g,text:d,tokens:this.lexer.inlineTokens(d)}}let h=g.slice(2,-2);return{type:"strong",raw:g,text:h,tokens:this.lexer.inlineTokens(h)}}}}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),o=this.rules.other.startingSpaceChar.test(s)&&this.rules.other.endingSpaceChar.test(s);return n&&o&&(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 o=[...n[0]].length-1,i,l,a=o,p=this.rules.inline.delRDelim;for(p.lastIndex=0,t=t.slice(-1*e.length+o);(n=p.exec(t))!=null;){if(i=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!i||(l=[...i].length,l!==o))continue;if(n[3]||n[4]){a+=l;continue}if(a-=l,a>0)continue;l=Math.min(l,l+a);let c=[...n[0]][0].length,u=e.slice(0,o+n.index+c+l),g=u.slice(o,-o);return{type:"del",raw:u,text:g,tokens:this.lexer.inlineTokens(g)}}}}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){var s;let t;if(t=this.rules.inline.url.exec(e)){let n,o;if(t[2]==="@")n=t[0],o="mailto:"+n;else{let i;do i=t[0],t[0]=((s=this.rules.inline._backpedal.exec(t[0]))==null?void 0:s[0])??"";while(i!==t[0]);n=t[0],t[1]==="www."?o="http://"+t[0]:o=t[0]}return{type:"link",raw:t[0],text:n,href:o,tokens:[{type:"text",raw:n,text:n}]}}}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}}}},oe=class kt{constructor(t){q(this,"tokens");q(this,"options");q(this,"state");q(this,"inlineQueue");q(this,"tokenizer");this.tokens=[],this.tokens.links=Object.create(null),this.options=t||De,this.options.tokenizer=this.options.tokenizer||new rt,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:ee,block:Ye.normal,inline:Be.normal};this.options.pedantic?(s.block=Ye.pedantic,s.inline=Be.pedantic):this.options.gfm&&(s.block=Ye.gfm,this.options.breaks?s.inline=Be.breaks:s.inline=Be.gfm),this.tokenizer.rules=s}static get rules(){return{block:Ye,inline:Be}}static lex(t,s){return new kt(s).lex(t)}static lexInline(t,s){return new kt(s).inlineTokens(t)}lex(t){t=t.replace(ee.carriageReturn,`
34
+ `?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=Ie(s.slice(0,-1),"\\");if((s.length-i.length)%2===0)return}else{let i=zn(t[2],"()");if(i===-2)return;if(i>-1){let l=(t[0].indexOf("!")===0?5:4)+t[1].length+i;t[2]=t[2].substring(0,i),t[0]=t[0].substring(0,l).trim(),t[3]=""}}let n=t[2],o="";if(this.options.pedantic){let i=this.rules.other.pedanticHrefTitle.exec(n);i&&(n=i[1],o=i[3])}else o=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)),Yt(t,{href:n&&n.replace(this.rules.inline.anyPunctuation,"$1"),title:o&&o.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," "),o=t[n.toLowerCase()];if(!o){let i=s[0].charAt(0);return{type:"text",raw:i,text:i}}return Yt(s,o,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 o=[...n[0]].length-1,i,l,a=o,p=0,c=n[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(c.lastIndex=0,t=t.slice(-1*e.length+o);(n=c.exec(t))!=null;){if(i=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!i)continue;if(l=[...i].length,n[3]||n[4]){a+=l;continue}else if((n[5]||n[6])&&o%3&&!((o+l)%3)){p+=l;continue}if(a-=l,a>0)continue;l=Math.min(l,l+a+p);let u=[...n[0]][0].length,g=e.slice(0,o+n.index+u+l);if(Math.min(o,l)%2){let d=g.slice(1,-1);return{type:"em",raw:g,text:d,tokens:this.lexer.inlineTokens(d)}}let h=g.slice(2,-2);return{type:"strong",raw:g,text:h,tokens:this.lexer.inlineTokens(h)}}}}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),o=this.rules.other.startingSpaceChar.test(s)&&this.rules.other.endingSpaceChar.test(s);return n&&o&&(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 o=[...n[0]].length-1,i,l,a=o,p=this.rules.inline.delRDelim;for(p.lastIndex=0,t=t.slice(-1*e.length+o);(n=p.exec(t))!=null;){if(i=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!i||(l=[...i].length,l!==o))continue;if(n[3]||n[4]){a+=l;continue}if(a-=l,a>0)continue;l=Math.min(l,l+a);let c=[...n[0]][0].length,u=e.slice(0,o+n.index+c+l),g=u.slice(o,-o);return{type:"del",raw:u,text:g,tokens:this.lexer.inlineTokens(g)}}}}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){var s;let t;if(t=this.rules.inline.url.exec(e)){let n,o;if(t[2]==="@")n=t[0],o="mailto:"+n;else{let i;do i=t[0],t[0]=((s=this.rules.inline._backpedal.exec(t[0]))==null?void 0:s[0])??"";while(i!==t[0]);n=t[0],t[1]==="www."?o="http://"+t[0]:o=t[0]}return{type:"link",raw:t[0],text:n,href:o,tokens:[{type:"text",raw:n,text:n}]}}}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}}}},oe=class kt{constructor(t){q(this,"tokens");q(this,"options");q(this,"state");q(this,"inlineQueue");q(this,"tokenizer");this.tokens=[],this.tokens.links=Object.create(null),this.options=t||De,this.options.tokenizer=this.options.tokenizer||new rt,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:ee,block:Ye.normal,inline:Be.normal};this.options.pedantic?(s.block=Ye.pedantic,s.inline=Be.pedantic):this.options.gfm&&(s.block=Ye.gfm,this.options.breaks?s.inline=Be.breaks:s.inline=Be.gfm),this.tokenizer.rules=s}static get rules(){return{block:Ye,inline:Be}}static lex(t,s){return new kt(s).lex(t)}static lexInline(t,s){return new kt(s).inlineTokens(t)}lex(t){t=t.replace(ee.carriageReturn,`
35
35
  `),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){var o,i,l;for(this.options.pedantic&&(t=t.replace(ee.tabCharGlobal," ").replace(ee.spaceLine,""));t;){let a;if((i=(o=this.options.extensions)==null?void 0:o.block)!=null&&i.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.space(t)){t=t.substring(a.raw.length);let c=s.at(-1);a.raw.length===1&&c!==void 0?c.raw+=`
36
36
  `:s.push(a);continue}if(a=this.tokenizer.code(t)){t=t.substring(a.raw.length);let c=s.at(-1);(c==null?void 0:c.type)==="paragraph"||(c==null?void 0:c.type)==="text"?(c.raw+=(c.raw.endsWith(`
37
37
  `)?"":`
@@ -63,12 +63,12 @@ ${this.parser.parse(e)}</blockquote>
63
63
  `}tablerow({text:e}){return`<tr>
64
64
  ${e}</tr>
65
65
  `}tablecell(e){let t=this.parser.parseInline(e.tokens),s=e.header?"th":"td";return(e.align?`<${s} align="${e.align}">`:`<${s}>`)+t+`</${s}>
66
- `}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>${le(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),o=Vt(e);if(o===null)return n;e=o;let i='<a href="'+e+'"';return t&&(i+=' title="'+le(t)+'"'),i+=">"+n+"</a>",i}image({href:e,title:t,text:s,tokens:n}){n&&(s=this.parser.parseInline(n,this.parser.textRenderer));let o=Vt(e);if(o===null)return le(s);e=o;let i=`<img src="${e}" alt="${le(s)}"`;return t&&(i+=` title="${le(t)}"`),i+=">",i}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:le(e.text)}},Bt=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}},ae=class yt{constructor(t){q(this,"options");q(this,"renderer");q(this,"textRenderer");this.options=t||De,this.options.renderer=this.options.renderer||new st,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Bt}static parse(t,s){return new yt(s).parse(t)}static parseInline(t,s){return new yt(s).parseInline(t)}parse(t){var n,o;let s="";for(let i=0;i<t.length;i++){let l=t[i];if((o=(n=this.options.extensions)==null?void 0:n.renderers)!=null&&o[l.type]){let p=l,c=this.options.extensions.renderers[p.type].call({parser:this},p);if(c!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(p.type)){s+=c||"";continue}}let a=l;switch(a.type){case"space":{s+=this.renderer.space(a);break}case"hr":{s+=this.renderer.hr(a);break}case"heading":{s+=this.renderer.heading(a);break}case"code":{s+=this.renderer.code(a);break}case"table":{s+=this.renderer.table(a);break}case"blockquote":{s+=this.renderer.blockquote(a);break}case"list":{s+=this.renderer.list(a);break}case"checkbox":{s+=this.renderer.checkbox(a);break}case"html":{s+=this.renderer.html(a);break}case"def":{s+=this.renderer.def(a);break}case"paragraph":{s+=this.renderer.paragraph(a);break}case"text":{s+=this.renderer.text(a);break}default:{let p='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(p),"";throw new Error(p)}}}return s}parseInline(t,s=this.renderer){var o,i;let n="";for(let l=0;l<t.length;l++){let a=t[l];if((i=(o=this.options.extensions)==null?void 0:o.renderers)!=null&&i[a.type]){let c=this.options.extensions.renderers[a.type].call({parser:this},a);if(c!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(a.type)){n+=c||"";continue}}let p=a;switch(p.type){case"escape":{n+=s.text(p);break}case"html":{n+=s.html(p);break}case"link":{n+=s.link(p);break}case"image":{n+=s.image(p);break}case"checkbox":{n+=s.checkbox(p);break}case"strong":{n+=s.strong(p);break}case"em":{n+=s.em(p);break}case"codespan":{n+=s.codespan(p);break}case"br":{n+=s.br(p);break}case"del":{n+=s.del(p);break}case"text":{n+=s.text(p);break}default:{let c='Token with "'+p.type+'" type was not found.';if(this.options.silent)return console.error(c),"";throw new Error(c)}}}return n}},Xe,qe=(Xe=class{constructor(e){q(this,"options");q(this,"block");this.options=e||De}preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(){return this.block?oe.lex:oe.lexInline}provideParser(){return this.block?ae.parse:ae.parseInline}},q(Xe,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),q(Xe,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),Xe),Fr=class{constructor(...e){q(this,"defaults",Mt());q(this,"options",this.setOptions);q(this,"parse",this.parseMarkdown(!0));q(this,"parseInline",this.parseMarkdown(!1));q(this,"Parser",ae);q(this,"Renderer",st);q(this,"TextRenderer",Bt);q(this,"Lexer",oe);q(this,"Tokenizer",rt);q(this,"Hooks",qe);this.use(...e)}walkTokens(e,t){var n,o;let s=[];for(let i of e)switch(s=s.concat(t.call(this,i)),i.type){case"table":{let l=i;for(let a of l.header)s=s.concat(this.walkTokens(a.tokens,t));for(let a of l.rows)for(let p of a)s=s.concat(this.walkTokens(p.tokens,t));break}case"list":{let l=i;s=s.concat(this.walkTokens(l.items,t));break}default:{let l=i;(o=(n=this.defaults.extensions)==null?void 0:n.childTokens)!=null&&o[l.type]?this.defaults.extensions.childTokens[l.type].forEach(a=>{let p=l[a].flat(1/0);s=s.concat(this.walkTokens(p,t))}):l.tokens&&(s=s.concat(this.walkTokens(l.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(o=>{if(!o.name)throw new Error("extension name required");if("renderer"in o){let i=t.renderers[o.name];i?t.renderers[o.name]=function(...l){let a=o.renderer.apply(this,l);return a===!1&&(a=i.apply(this,l)),a}:t.renderers[o.name]=o.renderer}if("tokenizer"in o){if(!o.level||o.level!=="block"&&o.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let i=t[o.level];i?i.unshift(o.tokenizer):t[o.level]=[o.tokenizer],o.start&&(o.level==="block"?t.startBlock?t.startBlock.push(o.start):t.startBlock=[o.start]:o.level==="inline"&&(t.startInline?t.startInline.push(o.start):t.startInline=[o.start]))}"childTokens"in o&&o.childTokens&&(t.childTokens[o.name]=o.childTokens)}),n.extensions=t),s.renderer){let o=this.defaults.renderer||new st(this.defaults);for(let i in s.renderer){if(!(i in o))throw new Error(`renderer '${i}' does not exist`);if(["options","parser"].includes(i))continue;let l=i,a=s.renderer[l],p=o[l];o[l]=(...c)=>{let u=a.apply(o,c);return u===!1&&(u=p.apply(o,c)),u||""}}n.renderer=o}if(s.tokenizer){let o=this.defaults.tokenizer||new rt(this.defaults);for(let i in s.tokenizer){if(!(i in o))throw new Error(`tokenizer '${i}' does not exist`);if(["options","rules","lexer"].includes(i))continue;let l=i,a=s.tokenizer[l],p=o[l];o[l]=(...c)=>{let u=a.apply(o,c);return u===!1&&(u=p.apply(o,c)),u}}n.tokenizer=o}if(s.hooks){let o=this.defaults.hooks||new qe;for(let i in s.hooks){if(!(i in o))throw new Error(`hook '${i}' does not exist`);if(["options","block"].includes(i))continue;let l=i,a=s.hooks[l],p=o[l];qe.passThroughHooks.has(i)?o[l]=c=>{if(this.defaults.async&&qe.passThroughHooksRespectAsync.has(i))return(async()=>{let g=await a.call(o,c);return p.call(o,g)})();let u=a.call(o,c);return p.call(o,u)}:o[l]=(...c)=>{if(this.defaults.async)return(async()=>{let g=await a.apply(o,c);return g===!1&&(g=await p.apply(o,c)),g})();let u=a.apply(o,c);return u===!1&&(u=p.apply(o,c)),u}}n.hooks=o}if(s.walkTokens){let o=this.defaults.walkTokens,i=s.walkTokens;n.walkTokens=function(l){let a=[];return a.push(i.call(this,l)),o&&(a=a.concat(o.call(this,l))),a}}this.defaults={...this.defaults,...n}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return oe.lex(e,t??this.defaults)}parser(e,t){return ae.parse(e,t??this.defaults)}parseMarkdown(e){return(t,s)=>{let n={...s},o={...this.defaults,...n},i=this.onError(!!o.silent,!!o.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(o.hooks&&(o.hooks.options=o,o.hooks.block=e),o.async)return(async()=>{let l=o.hooks?await o.hooks.preprocess(t):t,a=await(o.hooks?await o.hooks.provideLexer():e?oe.lex:oe.lexInline)(l,o),p=o.hooks?await o.hooks.processAllTokens(a):a;o.walkTokens&&await Promise.all(this.walkTokens(p,o.walkTokens));let c=await(o.hooks?await o.hooks.provideParser():e?ae.parse:ae.parseInline)(p,o);return o.hooks?await o.hooks.postprocess(c):c})().catch(i);try{o.hooks&&(t=o.hooks.preprocess(t));let l=(o.hooks?o.hooks.provideLexer():e?oe.lex:oe.lexInline)(t,o);o.hooks&&(l=o.hooks.processAllTokens(l)),o.walkTokens&&this.walkTokens(l,o.walkTokens);let a=(o.hooks?o.hooks.provideParser():e?ae.parse:ae.parseInline)(l,o);return o.hooks&&(a=o.hooks.postprocess(a)),a}catch(l){return i(l)}}}onError(e,t){return s=>{if(s.message+=`
67
- Please report this to https://github.com/markedjs/marked.`,e){let n="<p>An error occurred:</p><pre>"+le(s.message+"",!0)+"</pre>";return t?Promise.resolve(n):n}if(t)return Promise.reject(s);throw s}}},Se=new Fr;function K(e,t){return Se.parse(e,t)}K.options=K.setOptions=function(e){return Se.setOptions(e),K.defaults=Se.defaults,zr(K.defaults),K};K.getDefaults=Mt;K.defaults=De;K.use=function(...e){return Se.use(...e),K.defaults=Se.defaults,zr(K.defaults),K};K.walkTokens=function(e,t){return Se.walkTokens(e,t)};K.parseInline=Se.parseInline;K.Parser=ae;K.parser=ae.parse;K.Renderer=st;K.TextRenderer=Bt;K.Lexer=oe;K.lexer=oe.lex;K.Tokenizer=rt;K.Hooks=qe;K.parse=K;K.options;K.setOptions;K.use;K.walkTokens;K.parseInline;ae.parse;oe.lex;function Br(e){const t=e.match(/^#\s+(.+)$/m);return t?t[1].trim():e.split(`
68
- `).map(n=>n.trim()).find(n=>n.length>0)||"Untitled"}const It="deleted",Pe={id:It,name:"Deleted",color:"#ef4444"},wt=[{name:"red",hex:"#e11d48"},{name:"orange",hex:"#ea580c"},{name:"amber",hex:"#d97706"},{name:"yellow",hex:"#ca8a04"},{name:"lime",hex:"#65a30d"},{name:"green",hex:"#16a34a"},{name:"teal",hex:"#0d9488"},{name:"cyan",hex:"#0891b2"},{name:"blue",hex:"#2563eb"},{name:"indigo",hex:"#4f46e5"},{name:"violet",hex:"#7c3aed"},{name:"pink",hex:"#db2777"}];function Ir(e){var t,s,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(s=Ir(e[t]))&&(n&&(n+=" "),n+=s)}else for(s in e)e[s]&&(n&&(n+=" "),n+=s);return n}function Cn(){for(var e,t,s=0,n="",o=arguments.length;s<o;s++)(e=arguments[s])&&(t=Ir(e))&&(n&&(n+=" "),n+=t);return n}const Pt="-",Sn=e=>{const t=Mn(e),{conflictingClassGroups:s,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:l=>{const a=l.split(Pt);return a[0]===""&&a.length!==1&&a.shift(),Pr(a,t)||Dn(l)},getConflictingClassGroupIds:(l,a)=>{const p=s[l]||[];return a&&n[l]?[...p,...n[l]]:p}}},Pr=(e,t)=>{var l;if(e.length===0)return t.classGroupId;const s=e[0],n=t.nextPart.get(s),o=n?Pr(e.slice(1),n):void 0;if(o)return o;if(t.validators.length===0)return;const i=e.join(Pt);return(l=t.validators.find(({validator:a})=>a(i)))==null?void 0:l.classGroupId},Jt=/^\[(.+)\]$/,Dn=e=>{if(Jt.test(e)){const t=Jt.exec(e)[1],s=t==null?void 0:t.substring(0,t.indexOf(":"));if(s)return"arbitrary.."+s}},Mn=e=>{const{theme:t,prefix:s}=e,n={nextPart:new Map,validators:[]};return En(Object.entries(e.classGroups),s).forEach(([i,l])=>{jt(l,n,i,t)}),n},jt=(e,t,s,n)=>{e.forEach(o=>{if(typeof o=="string"){const i=o===""?t:Xt(t,o);i.classGroupId=s;return}if(typeof o=="function"){if(Tn(o)){jt(o(n),t,s,n);return}t.validators.push({validator:o,classGroupId:s});return}Object.entries(o).forEach(([i,l])=>{jt(l,Xt(t,i),s,n)})})},Xt=(e,t)=>{let s=e;return t.split(Pt).forEach(n=>{s.nextPart.has(n)||s.nextPart.set(n,{nextPart:new Map,validators:[]}),s=s.nextPart.get(n)}),s},Tn=e=>e.isThemeGetter,En=(e,t)=>t?e.map(([s,n])=>{const o=n.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([l,a])=>[t+l,a])):i);return[s,o]}):e,$n=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,s=new Map,n=new Map;const o=(i,l)=>{s.set(i,l),t++,t>e&&(t=0,n=s,s=new Map)};return{get(i){let l=s.get(i);if(l!==void 0)return l;if((l=n.get(i))!==void 0)return o(i,l),l},set(i,l){s.has(i)?s.set(i,l):o(i,l)}}},Or="!",An=e=>{const{separator:t,experimentalParseClassName:s}=e,n=t.length===1,o=t[0],i=t.length,l=a=>{const p=[];let c=0,u=0,g;for(let v=0;v<a.length;v++){let k=a[v];if(c===0){if(k===o&&(n||a.slice(v,v+i)===t)){p.push(a.slice(u,v)),u=v+i;continue}if(k==="/"){g=v;continue}}k==="["?c++:k==="]"&&c--}const h=p.length===0?a:a.substring(u),d=h.startsWith(Or),x=d?h.substring(1):h,m=g&&g>u?g-u:void 0;return{modifiers:p,hasImportantModifier:d,baseClassName:x,maybePostfixModifierPosition:m}};return s?a=>s({className:a,parseClassName:l}):l},Ln=e=>{if(e.length<=1)return e;const t=[];let s=[];return e.forEach(n=>{n[0]==="["?(t.push(...s.sort(),n),s=[]):s.push(n)}),t.push(...s.sort()),t},Rn=e=>({cache:$n(e.cacheSize),parseClassName:An(e),...Sn(e)}),Fn=/\s+/,Bn=(e,t)=>{const{parseClassName:s,getClassGroupId:n,getConflictingClassGroupIds:o}=t,i=[],l=e.trim().split(Fn);let a="";for(let p=l.length-1;p>=0;p-=1){const c=l[p],{modifiers:u,hasImportantModifier:g,baseClassName:h,maybePostfixModifierPosition:d}=s(c);let x=!!d,m=n(x?h.substring(0,d):h);if(!m){if(!x){a=c+(a.length>0?" "+a:a);continue}if(m=n(h),!m){a=c+(a.length>0?" "+a:a);continue}x=!1}const v=Ln(u).join(":"),k=g?v+Or:v,z=k+m;if(i.includes(z))continue;i.push(z);const E=o(m,x);for(let y=0;y<E.length;++y){const D=E[y];i.push(k+D)}a=c+(a.length>0?" "+a:a)}return a};function In(){let e=0,t,s,n="";for(;e<arguments.length;)(t=arguments[e++])&&(s=_r(t))&&(n&&(n+=" "),n+=s);return n}const _r=e=>{if(typeof e=="string")return e;let t,s="";for(let n=0;n<e.length;n++)e[n]&&(t=_r(e[n]))&&(s&&(s+=" "),s+=t);return s};function Pn(e,...t){let s,n,o,i=l;function l(p){const c=t.reduce((u,g)=>g(u),e());return s=Rn(c),n=s.cache.get,o=s.cache.set,i=a,a(p)}function a(p){const c=n(p);if(c)return c;const u=Bn(p,s);return o(p,u),u}return function(){return i(In.apply(null,arguments))}}const V=e=>{const t=s=>s[e]||[];return t.isThemeGetter=!0,t},Kr=/^\[(?:([a-z-]+):)?(.+)\]$/i,On=/^\d+\/\d+$/,_n=new Set(["px","full","screen"]),Kn=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Zn=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,qn=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Un=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Hn=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,de=e=>Ee(e)||_n.has(e)||On.test(e),he=e=>Ae(e,"length",eo),Ee=e=>!!e&&!Number.isNaN(Number(e)),ut=e=>Ae(e,"number",Ee),Oe=e=>!!e&&Number.isInteger(Number(e)),Gn=e=>e.endsWith("%")&&Ee(e.slice(0,-1)),F=e=>Kr.test(e),ge=e=>Kn.test(e),Wn=new Set(["length","size","percentage"]),Vn=e=>Ae(e,Wn,Zr),Qn=e=>Ae(e,"position",Zr),Yn=new Set(["image","url"]),Jn=e=>Ae(e,Yn,ro),Xn=e=>Ae(e,"",to),_e=()=>!0,Ae=(e,t,s)=>{const n=Kr.exec(e);return n?n[1]?typeof t=="string"?n[1]===t:t.has(n[1]):s(n[2]):!1},eo=e=>Zn.test(e)&&!qn.test(e),Zr=()=>!1,to=e=>Un.test(e),ro=e=>Hn.test(e),so=()=>{const e=V("colors"),t=V("spacing"),s=V("blur"),n=V("brightness"),o=V("borderColor"),i=V("borderRadius"),l=V("borderSpacing"),a=V("borderWidth"),p=V("contrast"),c=V("grayscale"),u=V("hueRotate"),g=V("invert"),h=V("gap"),d=V("gradientColorStops"),x=V("gradientColorStopPositions"),m=V("inset"),v=V("margin"),k=V("opacity"),z=V("padding"),E=V("saturate"),y=V("scale"),D=V("sepia"),N=V("skew"),B=V("space"),I=V("translate"),b=()=>["auto","contain","none"],w=()=>["auto","hidden","clip","visible","scroll"],S=()=>["auto",F,t],C=()=>[F,t],$=()=>["",de,he],G=()=>["auto",Ee,F],W=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],Q=()=>["solid","dashed","dotted","double","none"],U=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],L=()=>["start","end","center","between","around","evenly","stretch"],H=()=>["","0",F],ne=()=>["auto","avoid","all","avoid-page","page","left","right","column"],X=()=>[Ee,F];return{cacheSize:500,separator:":",theme:{colors:[_e],spacing:[de,he],blur:["none","",ge,F],brightness:X(),borderColor:[e],borderRadius:["none","","full",ge,F],borderSpacing:C(),borderWidth:$(),contrast:X(),grayscale:H(),hueRotate:X(),invert:H(),gap:C(),gradientColorStops:[e],gradientColorStopPositions:[Gn,he],inset:S(),margin:S(),opacity:X(),padding:C(),saturate:X(),scale:X(),sepia:H(),skew:X(),space:C(),translate:C()},classGroups:{aspect:[{aspect:["auto","square","video",F]}],container:["container"],columns:[{columns:[ge]}],"break-after":[{"break-after":ne()}],"break-before":[{"break-before":ne()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...W(),F]}],overflow:[{overflow:w()}],"overflow-x":[{"overflow-x":w()}],"overflow-y":[{"overflow-y":w()}],overscroll:[{overscroll:b()}],"overscroll-x":[{"overscroll-x":b()}],"overscroll-y":[{"overscroll-y":b()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[m]}],"inset-x":[{"inset-x":[m]}],"inset-y":[{"inset-y":[m]}],start:[{start:[m]}],end:[{end:[m]}],top:[{top:[m]}],right:[{right:[m]}],bottom:[{bottom:[m]}],left:[{left:[m]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Oe,F]}],basis:[{basis:S()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",F]}],grow:[{grow:H()}],shrink:[{shrink:H()}],order:[{order:["first","last","none",Oe,F]}],"grid-cols":[{"grid-cols":[_e]}],"col-start-end":[{col:["auto",{span:["full",Oe,F]},F]}],"col-start":[{"col-start":G()}],"col-end":[{"col-end":G()}],"grid-rows":[{"grid-rows":[_e]}],"row-start-end":[{row:["auto",{span:[Oe,F]},F]}],"row-start":[{"row-start":G()}],"row-end":[{"row-end":G()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",F]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",F]}],gap:[{gap:[h]}],"gap-x":[{"gap-x":[h]}],"gap-y":[{"gap-y":[h]}],"justify-content":[{justify:["normal",...L()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...L(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...L(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[z]}],px:[{px:[z]}],py:[{py:[z]}],ps:[{ps:[z]}],pe:[{pe:[z]}],pt:[{pt:[z]}],pr:[{pr:[z]}],pb:[{pb:[z]}],pl:[{pl:[z]}],m:[{m:[v]}],mx:[{mx:[v]}],my:[{my:[v]}],ms:[{ms:[v]}],me:[{me:[v]}],mt:[{mt:[v]}],mr:[{mr:[v]}],mb:[{mb:[v]}],ml:[{ml:[v]}],"space-x":[{"space-x":[B]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[B]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",F,t]}],"min-w":[{"min-w":[F,t,"min","max","fit"]}],"max-w":[{"max-w":[F,t,"none","full","min","max","fit","prose",{screen:[ge]},ge]}],h:[{h:[F,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[F,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[F,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[F,t,"auto","min","max","fit"]}],"font-size":[{text:["base",ge,he]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",ut]}],"font-family":[{font:[_e]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",F]}],"line-clamp":[{"line-clamp":["none",Ee,ut]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",de,F]}],"list-image":[{"list-image":["none",F]}],"list-style-type":[{list:["none","disc","decimal",F]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[k]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[k]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Q(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",de,he]}],"underline-offset":[{"underline-offset":["auto",de,F]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:C()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",F]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",F]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[k]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...W(),Qn]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Vn]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Jn]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[x]}],"gradient-via-pos":[{via:[x]}],"gradient-to-pos":[{to:[x]}],"gradient-from":[{from:[d]}],"gradient-via":[{via:[d]}],"gradient-to":[{to:[d]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[k]}],"border-style":[{border:[...Q(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[k]}],"divide-style":[{divide:Q()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-s":[{"border-s":[o]}],"border-color-e":[{"border-e":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...Q()]}],"outline-offset":[{"outline-offset":[de,F]}],"outline-w":[{outline:[de,he]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:$()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[k]}],"ring-offset-w":[{"ring-offset":[de,he]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",ge,Xn]}],"shadow-color":[{shadow:[_e]}],opacity:[{opacity:[k]}],"mix-blend":[{"mix-blend":[...U(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":U()}],filter:[{filter:["","none"]}],blur:[{blur:[s]}],brightness:[{brightness:[n]}],contrast:[{contrast:[p]}],"drop-shadow":[{"drop-shadow":["","none",ge,F]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[g]}],saturate:[{saturate:[E]}],sepia:[{sepia:[D]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[s]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[p]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[g]}],"backdrop-opacity":[{"backdrop-opacity":[k]}],"backdrop-saturate":[{"backdrop-saturate":[E]}],"backdrop-sepia":[{"backdrop-sepia":[D]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[l]}],"border-spacing-x":[{"border-spacing-x":[l]}],"border-spacing-y":[{"border-spacing-y":[l]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",F]}],duration:[{duration:X()}],ease:[{ease:["linear","in","out","in-out",F]}],delay:[{delay:X()}],animate:[{animate:["none","spin","ping","pulse","bounce",F]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[y]}],"scale-x":[{"scale-x":[y]}],"scale-y":[{"scale-y":[y]}],rotate:[{rotate:[Oe,F]}],"translate-x":[{"translate-x":[I]}],"translate-y":[{"translate-y":[I]}],"skew-x":[{"skew-x":[N]}],"skew-y":[{"skew-y":[N]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",F]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",F]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":C()}],"scroll-mx":[{"scroll-mx":C()}],"scroll-my":[{"scroll-my":C()}],"scroll-ms":[{"scroll-ms":C()}],"scroll-me":[{"scroll-me":C()}],"scroll-mt":[{"scroll-mt":C()}],"scroll-mr":[{"scroll-mr":C()}],"scroll-mb":[{"scroll-mb":C()}],"scroll-ml":[{"scroll-ml":C()}],"scroll-p":[{"scroll-p":C()}],"scroll-px":[{"scroll-px":C()}],"scroll-py":[{"scroll-py":C()}],"scroll-ps":[{"scroll-ps":C()}],"scroll-pe":[{"scroll-pe":C()}],"scroll-pt":[{"scroll-pt":C()}],"scroll-pr":[{"scroll-pr":C()}],"scroll-pb":[{"scroll-pb":C()}],"scroll-pl":[{"scroll-pl":C()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",F]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[de,he,ut]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},no=Pn(so);function J(...e){return no(Cn(e))}function zt(e){if(!e)return"";const t=Date.now(),s=new Date(e).getTime();if(Number.isNaN(s))return"";let n=Math.max(0,Math.floor((t-s)/1e3));const o=Math.floor(n/(365*24*3600));n%=365*24*3600;const i=Math.floor(n/(30*24*3600));n%=30*24*3600;const l=Math.floor(n/(7*24*3600));n%=7*24*3600;const a=Math.floor(n/(24*3600));n%=24*3600;const p=Math.floor(n/3600);n%=3600;const c=Math.floor(n/60),u=n%60;return o>0?i>0?`${o}y${i}mo`:`${o}y`:i>0?`${i}mo`:l>0?a>0?`${l}w${a}d`:`${l}w`:a>0?p>0?`${a}d${p}h`:`${a}d`:p>0?c>0?`${p}h${c}m`:`${p}h`:c>0?u>0?`${c}m${u}s`:`${c}m`:`${u}s`}function nt(e){if(!e)return"";const t=new Date(e);if(Number.isNaN(t.getTime()))return"";const s=n=>String(n).padStart(2,"0");return`${t.getFullYear()}-${s(t.getMonth()+1)}-${s(t.getDate())} ${s(t.getHours())}:${s(t.getMinutes())}:${s(t.getSeconds())}`}function ot(e){if(!e)return"";const t=Date.now(),s=new Date(e).getTime();if(Number.isNaN(s))return"";let n=Math.max(0,Math.floor((t-s)/1e3));const o=Math.floor(n/(365*24*3600));n%=365*24*3600;const i=Math.floor(n/(30*24*3600));n%=30*24*3600;const l=Math.floor(n/(24*3600));n%=24*3600;const a=Math.floor(n/3600);n%=3600;const p=Math.floor(n/60),c=n%60,u=[];return o>0&&u.push(`${o} ${o===1?"year":"years"}`),i>0&&u.push(`${i} ${i===1?"month":"months"}`),l>0&&u.push(`${l} ${l===1?"day":"days"}`),a>0&&u.push(`${a} ${a===1?"hour":"hours"}`),p>0&&u.push(`${p} ${p===1?"min":"mins"}`),u.length===0?c>0?`${c} ${c===1?"sec":"secs"} ago`:"just now":`${u.slice(0,2).join(" ")} ago`}function oo(e,t){const s=[];return e&&s.push(`Created at: ${nt(e)} (${ot(e)})`),t&&s.push(`Modified at: ${nt(t)} (${ot(t)})`),s.join(`
69
- `)}const er={critical:"bg-red-100 text-red-700 dark:bg-red-900/30 dark:text-red-400",high:"bg-orange-100 text-orange-700 dark:bg-orange-900/30 dark:text-orange-400",medium:"bg-yellow-100 text-yellow-700 dark:bg-yellow-900/30 dark:text-yellow-400",low:"bg-green-100 text-green-700 dark:bg-green-900/30 dark:text-green-400"},tr={critical:"Critical",high:"High",medium:"Med",low:"Low"};function ao(e){const t=e.split(`
66
+ `}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>${le(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),o=Vt(e);if(o===null)return n;e=o;let i='<a href="'+e+'"';return t&&(i+=' title="'+le(t)+'"'),i+=">"+n+"</a>",i}image({href:e,title:t,text:s,tokens:n}){n&&(s=this.parser.parseInline(n,this.parser.textRenderer));let o=Vt(e);if(o===null)return le(s);e=o;let i=`<img src="${e}" alt="${le(s)}"`;return t&&(i+=` title="${le(t)}"`),i+=">",i}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:le(e.text)}},Bt=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}},ae=class yt{constructor(t){q(this,"options");q(this,"renderer");q(this,"textRenderer");this.options=t||De,this.options.renderer=this.options.renderer||new st,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Bt}static parse(t,s){return new yt(s).parse(t)}static parseInline(t,s){return new yt(s).parseInline(t)}parse(t){var n,o;let s="";for(let i=0;i<t.length;i++){let l=t[i];if((o=(n=this.options.extensions)==null?void 0:n.renderers)!=null&&o[l.type]){let p=l,c=this.options.extensions.renderers[p.type].call({parser:this},p);if(c!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(p.type)){s+=c||"";continue}}let a=l;switch(a.type){case"space":{s+=this.renderer.space(a);break}case"hr":{s+=this.renderer.hr(a);break}case"heading":{s+=this.renderer.heading(a);break}case"code":{s+=this.renderer.code(a);break}case"table":{s+=this.renderer.table(a);break}case"blockquote":{s+=this.renderer.blockquote(a);break}case"list":{s+=this.renderer.list(a);break}case"checkbox":{s+=this.renderer.checkbox(a);break}case"html":{s+=this.renderer.html(a);break}case"def":{s+=this.renderer.def(a);break}case"paragraph":{s+=this.renderer.paragraph(a);break}case"text":{s+=this.renderer.text(a);break}default:{let p='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(p),"";throw new Error(p)}}}return s}parseInline(t,s=this.renderer){var o,i;let n="";for(let l=0;l<t.length;l++){let a=t[l];if((i=(o=this.options.extensions)==null?void 0:o.renderers)!=null&&i[a.type]){let c=this.options.extensions.renderers[a.type].call({parser:this},a);if(c!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(a.type)){n+=c||"";continue}}let p=a;switch(p.type){case"escape":{n+=s.text(p);break}case"html":{n+=s.html(p);break}case"link":{n+=s.link(p);break}case"image":{n+=s.image(p);break}case"checkbox":{n+=s.checkbox(p);break}case"strong":{n+=s.strong(p);break}case"em":{n+=s.em(p);break}case"codespan":{n+=s.codespan(p);break}case"br":{n+=s.br(p);break}case"del":{n+=s.del(p);break}case"text":{n+=s.text(p);break}default:{let c='Token with "'+p.type+'" type was not found.';if(this.options.silent)return console.error(c),"";throw new Error(c)}}}return n}},Xe,qe=(Xe=class{constructor(e){q(this,"options");q(this,"block");this.options=e||De}preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(){return this.block?oe.lex:oe.lexInline}provideParser(){return this.block?ae.parse:ae.parseInline}},q(Xe,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),q(Xe,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),Xe),Br=class{constructor(...e){q(this,"defaults",Mt());q(this,"options",this.setOptions);q(this,"parse",this.parseMarkdown(!0));q(this,"parseInline",this.parseMarkdown(!1));q(this,"Parser",ae);q(this,"Renderer",st);q(this,"TextRenderer",Bt);q(this,"Lexer",oe);q(this,"Tokenizer",rt);q(this,"Hooks",qe);this.use(...e)}walkTokens(e,t){var n,o;let s=[];for(let i of e)switch(s=s.concat(t.call(this,i)),i.type){case"table":{let l=i;for(let a of l.header)s=s.concat(this.walkTokens(a.tokens,t));for(let a of l.rows)for(let p of a)s=s.concat(this.walkTokens(p.tokens,t));break}case"list":{let l=i;s=s.concat(this.walkTokens(l.items,t));break}default:{let l=i;(o=(n=this.defaults.extensions)==null?void 0:n.childTokens)!=null&&o[l.type]?this.defaults.extensions.childTokens[l.type].forEach(a=>{let p=l[a].flat(1/0);s=s.concat(this.walkTokens(p,t))}):l.tokens&&(s=s.concat(this.walkTokens(l.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(o=>{if(!o.name)throw new Error("extension name required");if("renderer"in o){let i=t.renderers[o.name];i?t.renderers[o.name]=function(...l){let a=o.renderer.apply(this,l);return a===!1&&(a=i.apply(this,l)),a}:t.renderers[o.name]=o.renderer}if("tokenizer"in o){if(!o.level||o.level!=="block"&&o.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let i=t[o.level];i?i.unshift(o.tokenizer):t[o.level]=[o.tokenizer],o.start&&(o.level==="block"?t.startBlock?t.startBlock.push(o.start):t.startBlock=[o.start]:o.level==="inline"&&(t.startInline?t.startInline.push(o.start):t.startInline=[o.start]))}"childTokens"in o&&o.childTokens&&(t.childTokens[o.name]=o.childTokens)}),n.extensions=t),s.renderer){let o=this.defaults.renderer||new st(this.defaults);for(let i in s.renderer){if(!(i in o))throw new Error(`renderer '${i}' does not exist`);if(["options","parser"].includes(i))continue;let l=i,a=s.renderer[l],p=o[l];o[l]=(...c)=>{let u=a.apply(o,c);return u===!1&&(u=p.apply(o,c)),u||""}}n.renderer=o}if(s.tokenizer){let o=this.defaults.tokenizer||new rt(this.defaults);for(let i in s.tokenizer){if(!(i in o))throw new Error(`tokenizer '${i}' does not exist`);if(["options","rules","lexer"].includes(i))continue;let l=i,a=s.tokenizer[l],p=o[l];o[l]=(...c)=>{let u=a.apply(o,c);return u===!1&&(u=p.apply(o,c)),u}}n.tokenizer=o}if(s.hooks){let o=this.defaults.hooks||new qe;for(let i in s.hooks){if(!(i in o))throw new Error(`hook '${i}' does not exist`);if(["options","block"].includes(i))continue;let l=i,a=s.hooks[l],p=o[l];qe.passThroughHooks.has(i)?o[l]=c=>{if(this.defaults.async&&qe.passThroughHooksRespectAsync.has(i))return(async()=>{let g=await a.call(o,c);return p.call(o,g)})();let u=a.call(o,c);return p.call(o,u)}:o[l]=(...c)=>{if(this.defaults.async)return(async()=>{let g=await a.apply(o,c);return g===!1&&(g=await p.apply(o,c)),g})();let u=a.apply(o,c);return u===!1&&(u=p.apply(o,c)),u}}n.hooks=o}if(s.walkTokens){let o=this.defaults.walkTokens,i=s.walkTokens;n.walkTokens=function(l){let a=[];return a.push(i.call(this,l)),o&&(a=a.concat(o.call(this,l))),a}}this.defaults={...this.defaults,...n}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return oe.lex(e,t??this.defaults)}parser(e,t){return ae.parse(e,t??this.defaults)}parseMarkdown(e){return(t,s)=>{let n={...s},o={...this.defaults,...n},i=this.onError(!!o.silent,!!o.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(o.hooks&&(o.hooks.options=o,o.hooks.block=e),o.async)return(async()=>{let l=o.hooks?await o.hooks.preprocess(t):t,a=await(o.hooks?await o.hooks.provideLexer():e?oe.lex:oe.lexInline)(l,o),p=o.hooks?await o.hooks.processAllTokens(a):a;o.walkTokens&&await Promise.all(this.walkTokens(p,o.walkTokens));let c=await(o.hooks?await o.hooks.provideParser():e?ae.parse:ae.parseInline)(p,o);return o.hooks?await o.hooks.postprocess(c):c})().catch(i);try{o.hooks&&(t=o.hooks.preprocess(t));let l=(o.hooks?o.hooks.provideLexer():e?oe.lex:oe.lexInline)(t,o);o.hooks&&(l=o.hooks.processAllTokens(l)),o.walkTokens&&this.walkTokens(l,o.walkTokens);let a=(o.hooks?o.hooks.provideParser():e?ae.parse:ae.parseInline)(l,o);return o.hooks&&(a=o.hooks.postprocess(a)),a}catch(l){return i(l)}}}onError(e,t){return s=>{if(s.message+=`
67
+ Please report this to https://github.com/markedjs/marked.`,e){let n="<p>An error occurred:</p><pre>"+le(s.message+"",!0)+"</pre>";return t?Promise.resolve(n):n}if(t)return Promise.reject(s);throw s}}},Se=new Br;function K(e,t){return Se.parse(e,t)}K.options=K.setOptions=function(e){return Se.setOptions(e),K.defaults=Se.defaults,Nr(K.defaults),K};K.getDefaults=Mt;K.defaults=De;K.use=function(...e){return Se.use(...e),K.defaults=Se.defaults,Nr(K.defaults),K};K.walkTokens=function(e,t){return Se.walkTokens(e,t)};K.parseInline=Se.parseInline;K.Parser=ae;K.parser=ae.parse;K.Renderer=st;K.TextRenderer=Bt;K.Lexer=oe;K.lexer=oe.lex;K.Tokenizer=rt;K.Hooks=qe;K.parse=K;K.options;K.setOptions;K.use;K.walkTokens;K.parseInline;ae.parse;oe.lex;function Ir(e){const t=e.match(/^#\s+(.+)$/m);return t?t[1].trim():e.split(`
68
+ `).map(n=>n.trim()).find(n=>n.length>0)||"Untitled"}const It="deleted",Pe={id:It,name:"Deleted",color:"#ef4444"},wt=[{name:"red",hex:"#e11d48"},{name:"orange",hex:"#ea580c"},{name:"amber",hex:"#d97706"},{name:"yellow",hex:"#ca8a04"},{name:"lime",hex:"#65a30d"},{name:"green",hex:"#16a34a"},{name:"teal",hex:"#0d9488"},{name:"cyan",hex:"#0891b2"},{name:"blue",hex:"#2563eb"},{name:"indigo",hex:"#4f46e5"},{name:"violet",hex:"#7c3aed"},{name:"pink",hex:"#db2777"}];function Pr(e){var t,s,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(s=Pr(e[t]))&&(n&&(n+=" "),n+=s)}else for(s in e)e[s]&&(n&&(n+=" "),n+=s);return n}function Sn(){for(var e,t,s=0,n="",o=arguments.length;s<o;s++)(e=arguments[s])&&(t=Pr(e))&&(n&&(n+=" "),n+=t);return n}const Pt="-",Dn=e=>{const t=Tn(e),{conflictingClassGroups:s,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:l=>{const a=l.split(Pt);return a[0]===""&&a.length!==1&&a.shift(),Or(a,t)||Mn(l)},getConflictingClassGroupIds:(l,a)=>{const p=s[l]||[];return a&&n[l]?[...p,...n[l]]:p}}},Or=(e,t)=>{var l;if(e.length===0)return t.classGroupId;const s=e[0],n=t.nextPart.get(s),o=n?Or(e.slice(1),n):void 0;if(o)return o;if(t.validators.length===0)return;const i=e.join(Pt);return(l=t.validators.find(({validator:a})=>a(i)))==null?void 0:l.classGroupId},Jt=/^\[(.+)\]$/,Mn=e=>{if(Jt.test(e)){const t=Jt.exec(e)[1],s=t==null?void 0:t.substring(0,t.indexOf(":"));if(s)return"arbitrary.."+s}},Tn=e=>{const{theme:t,prefix:s}=e,n={nextPart:new Map,validators:[]};return $n(Object.entries(e.classGroups),s).forEach(([i,l])=>{jt(l,n,i,t)}),n},jt=(e,t,s,n)=>{e.forEach(o=>{if(typeof o=="string"){const i=o===""?t:Xt(t,o);i.classGroupId=s;return}if(typeof o=="function"){if(En(o)){jt(o(n),t,s,n);return}t.validators.push({validator:o,classGroupId:s});return}Object.entries(o).forEach(([i,l])=>{jt(l,Xt(t,i),s,n)})})},Xt=(e,t)=>{let s=e;return t.split(Pt).forEach(n=>{s.nextPart.has(n)||s.nextPart.set(n,{nextPart:new Map,validators:[]}),s=s.nextPart.get(n)}),s},En=e=>e.isThemeGetter,$n=(e,t)=>t?e.map(([s,n])=>{const o=n.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([l,a])=>[t+l,a])):i);return[s,o]}):e,An=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,s=new Map,n=new Map;const o=(i,l)=>{s.set(i,l),t++,t>e&&(t=0,n=s,s=new Map)};return{get(i){let l=s.get(i);if(l!==void 0)return l;if((l=n.get(i))!==void 0)return o(i,l),l},set(i,l){s.has(i)?s.set(i,l):o(i,l)}}},_r="!",Ln=e=>{const{separator:t,experimentalParseClassName:s}=e,n=t.length===1,o=t[0],i=t.length,l=a=>{const p=[];let c=0,u=0,g;for(let v=0;v<a.length;v++){let k=a[v];if(c===0){if(k===o&&(n||a.slice(v,v+i)===t)){p.push(a.slice(u,v)),u=v+i;continue}if(k==="/"){g=v;continue}}k==="["?c++:k==="]"&&c--}const h=p.length===0?a:a.substring(u),d=h.startsWith(_r),x=d?h.substring(1):h,m=g&&g>u?g-u:void 0;return{modifiers:p,hasImportantModifier:d,baseClassName:x,maybePostfixModifierPosition:m}};return s?a=>s({className:a,parseClassName:l}):l},Rn=e=>{if(e.length<=1)return e;const t=[];let s=[];return e.forEach(n=>{n[0]==="["?(t.push(...s.sort(),n),s=[]):s.push(n)}),t.push(...s.sort()),t},Fn=e=>({cache:An(e.cacheSize),parseClassName:Ln(e),...Dn(e)}),Bn=/\s+/,In=(e,t)=>{const{parseClassName:s,getClassGroupId:n,getConflictingClassGroupIds:o}=t,i=[],l=e.trim().split(Bn);let a="";for(let p=l.length-1;p>=0;p-=1){const c=l[p],{modifiers:u,hasImportantModifier:g,baseClassName:h,maybePostfixModifierPosition:d}=s(c);let x=!!d,m=n(x?h.substring(0,d):h);if(!m){if(!x){a=c+(a.length>0?" "+a:a);continue}if(m=n(h),!m){a=c+(a.length>0?" "+a:a);continue}x=!1}const v=Rn(u).join(":"),k=g?v+_r:v,z=k+m;if(i.includes(z))continue;i.push(z);const E=o(m,x);for(let y=0;y<E.length;++y){const D=E[y];i.push(k+D)}a=c+(a.length>0?" "+a:a)}return a};function Pn(){let e=0,t,s,n="";for(;e<arguments.length;)(t=arguments[e++])&&(s=Kr(t))&&(n&&(n+=" "),n+=s);return n}const Kr=e=>{if(typeof e=="string")return e;let t,s="";for(let n=0;n<e.length;n++)e[n]&&(t=Kr(e[n]))&&(s&&(s+=" "),s+=t);return s};function On(e,...t){let s,n,o,i=l;function l(p){const c=t.reduce((u,g)=>g(u),e());return s=Fn(c),n=s.cache.get,o=s.cache.set,i=a,a(p)}function a(p){const c=n(p);if(c)return c;const u=In(p,s);return o(p,u),u}return function(){return i(Pn.apply(null,arguments))}}const V=e=>{const t=s=>s[e]||[];return t.isThemeGetter=!0,t},Zr=/^\[(?:([a-z-]+):)?(.+)\]$/i,_n=/^\d+\/\d+$/,Kn=new Set(["px","full","screen"]),Zn=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,qn=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Un=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Hn=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Gn=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,de=e=>Ee(e)||Kn.has(e)||_n.test(e),he=e=>Ae(e,"length",to),Ee=e=>!!e&&!Number.isNaN(Number(e)),ut=e=>Ae(e,"number",Ee),Oe=e=>!!e&&Number.isInteger(Number(e)),Wn=e=>e.endsWith("%")&&Ee(e.slice(0,-1)),F=e=>Zr.test(e),ge=e=>Zn.test(e),Vn=new Set(["length","size","percentage"]),Qn=e=>Ae(e,Vn,qr),Yn=e=>Ae(e,"position",qr),Jn=new Set(["image","url"]),Xn=e=>Ae(e,Jn,so),eo=e=>Ae(e,"",ro),_e=()=>!0,Ae=(e,t,s)=>{const n=Zr.exec(e);return n?n[1]?typeof t=="string"?n[1]===t:t.has(n[1]):s(n[2]):!1},to=e=>qn.test(e)&&!Un.test(e),qr=()=>!1,ro=e=>Hn.test(e),so=e=>Gn.test(e),no=()=>{const e=V("colors"),t=V("spacing"),s=V("blur"),n=V("brightness"),o=V("borderColor"),i=V("borderRadius"),l=V("borderSpacing"),a=V("borderWidth"),p=V("contrast"),c=V("grayscale"),u=V("hueRotate"),g=V("invert"),h=V("gap"),d=V("gradientColorStops"),x=V("gradientColorStopPositions"),m=V("inset"),v=V("margin"),k=V("opacity"),z=V("padding"),E=V("saturate"),y=V("scale"),D=V("sepia"),N=V("skew"),B=V("space"),I=V("translate"),b=()=>["auto","contain","none"],w=()=>["auto","hidden","clip","visible","scroll"],S=()=>["auto",F,t],C=()=>[F,t],$=()=>["",de,he],G=()=>["auto",Ee,F],W=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],Q=()=>["solid","dashed","dotted","double","none"],U=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],L=()=>["start","end","center","between","around","evenly","stretch"],H=()=>["","0",F],ne=()=>["auto","avoid","all","avoid-page","page","left","right","column"],X=()=>[Ee,F];return{cacheSize:500,separator:":",theme:{colors:[_e],spacing:[de,he],blur:["none","",ge,F],brightness:X(),borderColor:[e],borderRadius:["none","","full",ge,F],borderSpacing:C(),borderWidth:$(),contrast:X(),grayscale:H(),hueRotate:X(),invert:H(),gap:C(),gradientColorStops:[e],gradientColorStopPositions:[Wn,he],inset:S(),margin:S(),opacity:X(),padding:C(),saturate:X(),scale:X(),sepia:H(),skew:X(),space:C(),translate:C()},classGroups:{aspect:[{aspect:["auto","square","video",F]}],container:["container"],columns:[{columns:[ge]}],"break-after":[{"break-after":ne()}],"break-before":[{"break-before":ne()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...W(),F]}],overflow:[{overflow:w()}],"overflow-x":[{"overflow-x":w()}],"overflow-y":[{"overflow-y":w()}],overscroll:[{overscroll:b()}],"overscroll-x":[{"overscroll-x":b()}],"overscroll-y":[{"overscroll-y":b()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[m]}],"inset-x":[{"inset-x":[m]}],"inset-y":[{"inset-y":[m]}],start:[{start:[m]}],end:[{end:[m]}],top:[{top:[m]}],right:[{right:[m]}],bottom:[{bottom:[m]}],left:[{left:[m]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Oe,F]}],basis:[{basis:S()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",F]}],grow:[{grow:H()}],shrink:[{shrink:H()}],order:[{order:["first","last","none",Oe,F]}],"grid-cols":[{"grid-cols":[_e]}],"col-start-end":[{col:["auto",{span:["full",Oe,F]},F]}],"col-start":[{"col-start":G()}],"col-end":[{"col-end":G()}],"grid-rows":[{"grid-rows":[_e]}],"row-start-end":[{row:["auto",{span:[Oe,F]},F]}],"row-start":[{"row-start":G()}],"row-end":[{"row-end":G()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",F]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",F]}],gap:[{gap:[h]}],"gap-x":[{"gap-x":[h]}],"gap-y":[{"gap-y":[h]}],"justify-content":[{justify:["normal",...L()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...L(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...L(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[z]}],px:[{px:[z]}],py:[{py:[z]}],ps:[{ps:[z]}],pe:[{pe:[z]}],pt:[{pt:[z]}],pr:[{pr:[z]}],pb:[{pb:[z]}],pl:[{pl:[z]}],m:[{m:[v]}],mx:[{mx:[v]}],my:[{my:[v]}],ms:[{ms:[v]}],me:[{me:[v]}],mt:[{mt:[v]}],mr:[{mr:[v]}],mb:[{mb:[v]}],ml:[{ml:[v]}],"space-x":[{"space-x":[B]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[B]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",F,t]}],"min-w":[{"min-w":[F,t,"min","max","fit"]}],"max-w":[{"max-w":[F,t,"none","full","min","max","fit","prose",{screen:[ge]},ge]}],h:[{h:[F,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[F,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[F,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[F,t,"auto","min","max","fit"]}],"font-size":[{text:["base",ge,he]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",ut]}],"font-family":[{font:[_e]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",F]}],"line-clamp":[{"line-clamp":["none",Ee,ut]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",de,F]}],"list-image":[{"list-image":["none",F]}],"list-style-type":[{list:["none","disc","decimal",F]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[k]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[k]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Q(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",de,he]}],"underline-offset":[{"underline-offset":["auto",de,F]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:C()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",F]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",F]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[k]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...W(),Yn]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Qn]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Xn]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[x]}],"gradient-via-pos":[{via:[x]}],"gradient-to-pos":[{to:[x]}],"gradient-from":[{from:[d]}],"gradient-via":[{via:[d]}],"gradient-to":[{to:[d]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[k]}],"border-style":[{border:[...Q(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[k]}],"divide-style":[{divide:Q()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-s":[{"border-s":[o]}],"border-color-e":[{"border-e":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...Q()]}],"outline-offset":[{"outline-offset":[de,F]}],"outline-w":[{outline:[de,he]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:$()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[k]}],"ring-offset-w":[{"ring-offset":[de,he]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",ge,eo]}],"shadow-color":[{shadow:[_e]}],opacity:[{opacity:[k]}],"mix-blend":[{"mix-blend":[...U(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":U()}],filter:[{filter:["","none"]}],blur:[{blur:[s]}],brightness:[{brightness:[n]}],contrast:[{contrast:[p]}],"drop-shadow":[{"drop-shadow":["","none",ge,F]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[g]}],saturate:[{saturate:[E]}],sepia:[{sepia:[D]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[s]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[p]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[g]}],"backdrop-opacity":[{"backdrop-opacity":[k]}],"backdrop-saturate":[{"backdrop-saturate":[E]}],"backdrop-sepia":[{"backdrop-sepia":[D]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[l]}],"border-spacing-x":[{"border-spacing-x":[l]}],"border-spacing-y":[{"border-spacing-y":[l]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",F]}],duration:[{duration:X()}],ease:[{ease:["linear","in","out","in-out",F]}],delay:[{delay:X()}],animate:[{animate:["none","spin","ping","pulse","bounce",F]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[y]}],"scale-x":[{"scale-x":[y]}],"scale-y":[{"scale-y":[y]}],rotate:[{rotate:[Oe,F]}],"translate-x":[{"translate-x":[I]}],"translate-y":[{"translate-y":[I]}],"skew-x":[{"skew-x":[N]}],"skew-y":[{"skew-y":[N]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",F]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",F]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":C()}],"scroll-mx":[{"scroll-mx":C()}],"scroll-my":[{"scroll-my":C()}],"scroll-ms":[{"scroll-ms":C()}],"scroll-me":[{"scroll-me":C()}],"scroll-mt":[{"scroll-mt":C()}],"scroll-mr":[{"scroll-mr":C()}],"scroll-mb":[{"scroll-mb":C()}],"scroll-ml":[{"scroll-ml":C()}],"scroll-p":[{"scroll-p":C()}],"scroll-px":[{"scroll-px":C()}],"scroll-py":[{"scroll-py":C()}],"scroll-ps":[{"scroll-ps":C()}],"scroll-pe":[{"scroll-pe":C()}],"scroll-pt":[{"scroll-pt":C()}],"scroll-pr":[{"scroll-pr":C()}],"scroll-pb":[{"scroll-pb":C()}],"scroll-pl":[{"scroll-pl":C()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",F]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[de,he,ut]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},oo=On(no);function J(...e){return oo(Sn(e))}function zt(e){if(!e)return"";const t=Date.now(),s=new Date(e).getTime();if(Number.isNaN(s))return"";let n=Math.max(0,Math.floor((t-s)/1e3));const o=Math.floor(n/(365*24*3600));n%=365*24*3600;const i=Math.floor(n/(30*24*3600));n%=30*24*3600;const l=Math.floor(n/(7*24*3600));n%=7*24*3600;const a=Math.floor(n/(24*3600));n%=24*3600;const p=Math.floor(n/3600);n%=3600;const c=Math.floor(n/60),u=n%60;return o>0?i>0?`${o}y${i}mo`:`${o}y`:i>0?`${i}mo`:l>0?a>0?`${l}w${a}d`:`${l}w`:a>0?p>0?`${a}d${p}h`:`${a}d`:p>0?c>0?`${p}h${c}m`:`${p}h`:c>0?u>0?`${c}m${u}s`:`${c}m`:`${u}s`}function nt(e){if(!e)return"";const t=new Date(e);if(Number.isNaN(t.getTime()))return"";const s=n=>String(n).padStart(2,"0");return`${t.getFullYear()}-${s(t.getMonth()+1)}-${s(t.getDate())} ${s(t.getHours())}:${s(t.getMinutes())}:${s(t.getSeconds())}`}function ot(e){if(!e)return"";const t=Date.now(),s=new Date(e).getTime();if(Number.isNaN(s))return"";let n=Math.max(0,Math.floor((t-s)/1e3));const o=Math.floor(n/(365*24*3600));n%=365*24*3600;const i=Math.floor(n/(30*24*3600));n%=30*24*3600;const l=Math.floor(n/(24*3600));n%=24*3600;const a=Math.floor(n/3600);n%=3600;const p=Math.floor(n/60),c=n%60,u=[];return o>0&&u.push(`${o} ${o===1?"year":"years"}`),i>0&&u.push(`${i} ${i===1?"month":"months"}`),l>0&&u.push(`${l} ${l===1?"day":"days"}`),a>0&&u.push(`${a} ${a===1?"hour":"hours"}`),p>0&&u.push(`${p} ${p===1?"min":"mins"}`),u.length===0?c>0?`${c} ${c===1?"sec":"secs"} ago`:"just now":`${u.slice(0,2).join(" ")} ago`}function ao(e,t){const s=[];return e&&s.push(`Created at: ${nt(e)} (${ot(e)})`),t&&s.push(`Modified at: ${nt(t)} (${ot(t)})`),s.join(`
69
+ `)}const er={critical:"bg-red-100 text-red-700 dark:bg-red-900/30 dark:text-red-400",high:"bg-orange-100 text-orange-700 dark:bg-orange-900/30 dark:text-orange-400",medium:"bg-yellow-100 text-yellow-700 dark:bg-yellow-900/30 dark:text-yellow-400",low:"bg-green-100 text-green-700 dark:bg-green-900/30 dark:text-green-400"},tr={critical:"Critical",high:"High",medium:"Med",low:"Low"};function lo(e){const t=e.split(`
70
70
  `),s=t.findIndex(i=>/^#\s+/.test(i));return(s>=0?t.slice(s+1):t).join(`
71
- `).trim()}function lo(e){return K.parse(e,{async:!1,gfm:!0,breaks:!0})}function io({feature:e,onClick:t,isDragging:s,isSelected:n}){const{cardSettings:o}=_(),i=_(d=>d.labelDefs),l=Br(e.content),a=ao(e.content),p=e.filePath&&e.filePath.split("/").pop()||"",c=d=>{if(!d)return null;const x=new Date(d),m=new Date,v=x.getTime()-m.getTime(),k=Math.ceil(v/(1e3*60*60*24));return k<0?{text:"Overdue",className:"text-red-500"}:k===0?{text:"Today",className:"text-orange-500"}:k===1?{text:"Tomorrow",className:"text-yellow-600 dark:text-yellow-400"}:k<=7?{text:`${k}d`,className:"text-zinc-500 dark:text-zinc-400"}:{text:x.toLocaleDateString("en-US",{month:"short",day:"numeric"}),className:"text-zinc-500 dark:text-zinc-400"}},u=e.status==="done"?null:c(e.dueDate),g=d=>{if(!d)return null;const x=new Date(d),v=new Date().getTime()-x.getTime(),k=Math.floor(v/(1e3*60)),z=Math.floor(v/(1e3*60*60)),E=Math.floor(v/(1e3*60*60*24));return k<1?"Just now":k<60?`${k}m ago`:z<24?`${z}h ago`:E===1?"1d ago":E<30?`${E}d ago`:E<365?`${Math.floor(E/30)}mo ago`:`${Math.floor(E/365)}y ago`},h=e.status==="done"?g(e.completedAt):null;return r.jsxs("div",{onClick:t,className:`group relative flex flex-col bg-white dark:bg-zinc-800 rounded-lg border ${n?"border-blue-500 dark:border-blue-400 ring-1 ring-blue-500 dark:ring-blue-400":"border-zinc-200 dark:border-zinc-700"} ${o.compactMode?"p-2 min-h-[4.5rem]":"p-3 min-h-[7rem]"} cursor-pointer hover:shadow-md transition-shadow ${s?"shadow-lg opacity-90":""}`,children:[r.jsxs("div",{className:"flex-1",children:[o.showFileName&&p&&r.jsxs("div",{className:"flex items-center gap-1.5 mb-1",children:[r.jsx(cr,{size:10,className:"shrink-0 text-zinc-400 dark:text-zinc-500"}),r.jsx("span",{className:"text-[10px] font-mono text-zinc-400 dark:text-zinc-500 truncate flex-1",children:p}),o.showPriorityBadges&&r.jsx("span",{className:`text-[10px] font-medium px-1.5 py-0.5 rounded shrink-0 ${er[e.priority]}`,children:tr[e.priority]})]}),r.jsxs("div",{className:`flex items-start gap-2 ${a||o.compactMode?"mb-1":"mb-2"}`,children:[r.jsx("h3",{className:"text-sm font-medium text-zinc-900 dark:text-zinc-100 line-clamp-2 flex-1",children:l}),o.showPriorityBadges&&!(o.showFileName&&p)&&r.jsx("span",{className:`text-xs font-medium px-1.5 py-0.5 rounded shrink-0 ${er[e.priority]}`,children:tr[e.priority]})]}),a&&!o.compactMode&&r.jsx("div",{className:"text-xs text-zinc-500 dark:text-zinc-400 line-clamp-2 mb-2 card-inline-markdown",dangerouslySetInnerHTML:{__html:lo(a)}}),o.showLabels&&e.labels.length>0&&r.jsxs("div",{className:"flex flex-wrap gap-1 mb-2",children:[e.labels.slice(0,3).map(d=>{const x=i[d];return r.jsx("span",{className:`text-xs px-1.5 py-0.5 rounded ${x?"":"bg-zinc-100 text-zinc-600 dark:bg-zinc-700 dark:text-zinc-300"}`,style:x?{backgroundColor:`${x.color}20`,color:x.color}:void 0,children:d},d)}),e.labels.length>3&&r.jsxs("span",{className:"text-xs text-zinc-400",children:["+",e.labels.length-3]})]})]}),r.jsxs("div",{className:"flex items-center justify-between text-xs mt-auto",children:[r.jsx("div",{className:"flex items-center gap-1",children:o.showAssignee&&e.assignee&&e.assignee!=="null"&&r.jsxs("div",{className:"flex items-center gap-1.5 text-zinc-500 dark:text-zinc-400",children:[r.jsx("span",{className:"shrink-0 w-4 h-4 rounded-full flex items-center justify-center text-[8px] font-bold bg-zinc-200 dark:bg-zinc-600 text-zinc-700 dark:text-zinc-300",children:e.assignee.split(/\s+/).map(d=>d[0]).join("").toUpperCase().slice(0,2)}),r.jsx("span",{children:e.assignee})]})}),e.attachments.length>0&&r.jsxs("div",{className:"flex items-center gap-1 text-zinc-400 dark:text-zinc-500",children:[r.jsx(ht,{size:12}),r.jsx("span",{children:e.attachments.length})]}),e.metadata&&Object.keys(e.metadata).length>0&&r.jsx("div",{className:"flex items-center gap-1 text-zinc-400 dark:text-zinc-500",children:r.jsx("span",{className:"text-[10px] font-mono",children:`{${Object.keys(e.metadata).length}}`})}),o.showDueDate&&u&&r.jsxs("div",{className:`flex items-center gap-1 ${u.className}`,children:[r.jsx(Nt,{size:12}),r.jsx("span",{children:u.text})]}),h&&r.jsxs("div",{className:"flex items-center gap-1",style:{color:"var(--vscode-descriptionForeground)"},children:[r.jsx(fe,{size:12}),r.jsx("span",{children:h})]}),r.jsxs("div",{className:"flex items-center gap-1 text-zinc-400 dark:text-zinc-500",title:oo(e.created,e.modified),children:[r.jsx(gt,{size:12}),r.jsx("span",{children:zt(e.modified)})]})]})]})}const co=[{value:"order",label:"Board Order"},{value:"created:asc",label:"Created (oldest)"},{value:"created:desc",label:"Created (newest)"},{value:"modified:asc",label:"Modified (oldest)"},{value:"modified:desc",label:"Modified (newest)"}];function rr({column:e,features:t,onFeatureClick:s,onAddFeature:n,onEditColumn:o,onRemoveColumn:i,onCleanupColumn:l,onDragStart:a,onDragOver:p,onDragOverCard:c,onDrop:u,onDragEnd:g,draggedFeature:h,dropTarget:d,layout:x,isDeletedColumn:m,onPurgeColumn:v,selectedFeatureId:k,sort:z,onSortChange:E}){const y=x==="vertical",D=d&&d.columnId===e.id,[N,B]=f.useState(!1),I=f.useRef(null);return f.useEffect(()=>{if(!N)return;const b=w=>{I.current&&!I.current.contains(w.target)&&B(!1)};return document.addEventListener("mousedown",b),()=>document.removeEventListener("mousedown",b)},[N]),r.jsxs("div",{className:y?"flex flex-col bg-zinc-100 dark:bg-zinc-800 rounded-lg":"flex-shrink-0 w-72 h-full flex flex-col bg-zinc-100 dark:bg-zinc-800 rounded-lg",onDragOver:p,onDrop:b=>u(b,e.id),children:[r.jsxs("div",{className:"flex items-center justify-between w-full px-3 py-2 border-b border-zinc-200 dark:border-zinc-700",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("div",{className:"w-2 h-2 rounded-full",style:{backgroundColor:e.color}}),r.jsx("h3",{className:"text-sm font-medium text-zinc-900 dark:text-zinc-100",children:e.name}),r.jsx("span",{className:"text-xs text-zinc-500 dark:text-zinc-400 bg-zinc-200 dark:bg-zinc-700 px-1.5 py-0.5 rounded-full",children:t.length})]}),r.jsx("div",{className:"flex items-center gap-0.5",children:m?r.jsx("button",{type:"button",onClick:()=>{t.length!==0&&window.confirm(`Permanently delete all ${t.length} card${t.length===1?"":"s"} from disk?`)&&(v==null||v())},className:"p-1 rounded hover:bg-red-100 dark:hover:bg-red-900/30 transition-colors",title:"Permanently delete all cards",children:r.jsx(Ce,{size:16,className:"text-red-500"})}):r.jsxs(r.Fragment,{children:[r.jsx("button",{type:"button",onClick:()=>n(e.id),className:"p-1 rounded hover:bg-zinc-200/60 dark:hover:bg-zinc-700/60 transition-colors",title:`Add to ${e.name}`,children:r.jsx($e,{size:16,className:"text-zinc-500"})}),r.jsxs("div",{className:"relative",ref:I,children:[r.jsx("button",{type:"button",onClick:()=>B(!N),className:"p-1 rounded hover:bg-zinc-200/60 dark:hover:bg-zinc-700/60 transition-colors",title:"Column options",children:r.jsx(rs,{size:16,className:"text-zinc-500"})}),N&&r.jsxs("div",{className:"absolute right-0 top-full mt-1 z-50 bg-white dark:bg-zinc-800 border border-zinc-200 dark:border-zinc-600 rounded-md shadow-lg py-1 min-w-[170px]",children:[r.jsx("div",{className:"px-3 py-1 text-xs font-medium text-zinc-400 dark:text-zinc-500 uppercase tracking-wide",children:"Sort by"}),co.map(b=>r.jsxs("button",{type:"button",onClick:()=>{E(b.value)},className:"flex items-center gap-2 w-full px-3 py-1.5 text-sm text-zinc-700 dark:text-zinc-200 hover:bg-zinc-100 dark:hover:bg-zinc-700 transition-colors",children:[r.jsx(fe,{size:14,className:z===b.value?"text-blue-500":"invisible"}),b.label]},b.value)),r.jsx("div",{className:"border-t border-zinc-200 dark:border-zinc-600 my-1"}),r.jsxs("button",{type:"button",onClick:()=>{B(!1),o(e.id)},className:"flex items-center gap-2 w-full px-3 py-1.5 text-sm text-zinc-700 dark:text-zinc-200 hover:bg-zinc-100 dark:hover:bg-zinc-700 transition-colors",children:[r.jsx(Ct,{size:14}),"Edit List"]}),r.jsxs("button",{type:"button",onClick:()=>{B(!1),i(e.id)},className:"flex items-center gap-2 w-full px-3 py-1.5 text-sm text-red-600 dark:text-red-400 hover:bg-zinc-100 dark:hover:bg-zinc-700 transition-colors",children:[r.jsx(Ce,{size:14}),"Remove List"]}),r.jsxs("button",{type:"button",onClick:()=>{B(!1),l(e.id)},className:"flex items-center gap-2 w-full px-3 py-1.5 text-sm text-orange-600 dark:text-orange-400 hover:bg-zinc-100 dark:hover:bg-zinc-700 transition-colors",children:[r.jsx(Ce,{size:14}),"Cleanup List"]})]})]})]})})]}),r.jsxs("div",{className:y?"flex-1 p-2 flex flex-wrap gap-2":"flex-1 overflow-y-auto p-2 space-y-2 min-h-[200px]",children:[t.map((b,w)=>r.jsxs("div",{children:[D&&d.index===w&&r.jsx("div",{className:"h-0.5 bg-blue-500 rounded-full mx-1 mb-1"}),r.jsx("div",{draggable:!0,"data-card-id":b.id,onDragStart:S=>a(S,b),onDragOver:S=>c(S,e.id,w),onDragEnd:g,className:`${y?"w-64":""} ${(h==null?void 0:h.id)===b.id?"opacity-40":""}`,children:r.jsx(io,{feature:b,onClick:()=>s(b),isSelected:b.id===k})})]},b.id)),D&&d.index===t.length&&t.length>0&&r.jsx("div",{className:"h-0.5 bg-blue-500 rounded-full mx-1"}),t.length===0&&r.jsx("div",{className:y?"text-sm text-zinc-400 dark:text-zinc-500 py-4":"text-center py-8 text-sm text-zinc-400 dark:text-zinc-500",children:"No features"})]})]})}function uo({onFeatureClick:e,onAddFeature:t,onMoveFeature:s,onEditColumn:n,onRemoveColumn:o,onCleanupColumn:i,onPurgeDeletedCards:l,selectedFeatureId:a}){const p=f.useRef(null);f.useEffect(()=>{if(!a)return;const w=p.current;w&&requestAnimationFrame(()=>{const S=w.querySelector(`[data-card-id="${a}"]`);if(!S)return;const C=w.getBoundingClientRect(),$=S.getBoundingClientRect();if(!($.left>=C.left&&$.right<=C.right)){const W=$.right-C.right;w.scrollBy({left:W+10,behavior:"smooth"})}})},[a]);const c=_(w=>w.columns),u=_(w=>w.cardSettings),g=_(w=>w.getFilteredFeaturesByStatus),h=_(w=>w.getFeaturesByStatus),d=_(w=>w.layout),x=_(w=>w.columnSorts),m=_(w=>w.setColumnSort),[v,k]=f.useState(null),[z,E]=f.useState(null),y=f.useCallback((w,S)=>{k(S),w.dataTransfer.effectAllowed="move",w.dataTransfer.setData("text/plain",S.id)},[]),D=f.useCallback(w=>{w.preventDefault(),w.dataTransfer.dropEffect="move"},[]),N=f.useCallback((w,S,C)=>{w.preventDefault(),w.dataTransfer.dropEffect="move";const $=w.currentTarget.getBoundingClientRect(),G=$.top+$.height/2,W=w.clientY<G?C:C+1;E(Q=>Q&&Q.columnId===S&&Q.index===W?Q:{columnId:S,index:W})},[]),B=f.useCallback((w,S)=>{if(w.preventDefault(),!v)return;const C=g(S);let $;if(z&&z.columnId===S?$=z.index:$=C.length,v.status===S){const U=C.findIndex(L=>L.id===v.id);if(U!==-1&&$>U&&$--,U===$){k(null),E(null);return}}const G=h(S).filter(U=>U.id!==v.id),W=C.filter(U=>U.id!==v.id);let Q;if(W.length===0)Q=G.length;else if($>=W.length){const U=W[W.length-1];Q=G.findIndex(H=>H.id===U.id)+1}else{const U=W[$];Q=G.findIndex(L=>L.id===U.id)}s(v.id,S,Q),k(null),E(null)},[v,z,g,h,s]),I=f.useCallback(()=>{k(null),E(null)},[]),b=d==="vertical";return r.jsx("div",{ref:p,className:b?"h-full overflow-y-auto p-4":"h-full overflow-x-auto p-4",children:r.jsxs("div",{className:b?"flex flex-col gap-4":"flex gap-4 h-full min-w-max",children:[c.map(w=>r.jsx(rr,{column:w,features:g(w.id),onFeatureClick:e,onAddFeature:t,onEditColumn:n,onRemoveColumn:o,onCleanupColumn:i,onDragStart:y,onDragOver:D,onDragOverCard:N,onDrop:B,onDragEnd:I,draggedFeature:v,dropTarget:z,layout:d,selectedFeatureId:a,sort:x[w.id]||"order",onSortChange:S=>m(w.id,S)},w.id)),u.showDeletedColumn&&r.jsx(rr,{column:Pe,features:g(Pe.id),onFeatureClick:e,onAddFeature:t,onEditColumn:n,onRemoveColumn:o,onCleanupColumn:i,onDragStart:y,onDragOver:D,onDragOverCard:N,onDrop:B,onDragEnd:I,draggedFeature:v,dropTarget:z,layout:d,isDeletedColumn:!0,onPurgeColumn:l,selectedFeatureId:a,sort:x[Pe.id]||"order",onSortChange:w=>m(Pe.id,w)},Pe.id)]})})}const po=["Mo","Tu","We","Th","Fr","Sa","Su"],ho=["January","February","March","April","May","June","July","August","September","October","November","December"];function go({value:e,onChange:t,placeholder:s="Due date"}){const[n,o]=f.useState(!1),i=new Date,l=e?new Date(e+"T00:00:00"):null,[a,p]=f.useState((l==null?void 0:l.getFullYear())??i.getFullYear()),[c,u]=f.useState((l==null?void 0:l.getMonth())??i.getMonth()),g=new Date(a,c+1,0).getDate(),h=(new Date(a,c,1).getDay()+6)%7,d=Array(h).fill(null);for(let y=1;y<=g;y++)d.push(y);const x=()=>{c===0?(u(11),p(y=>y-1)):u(y=>y-1)},m=()=>{c===11?(u(0),p(y=>y+1)):u(y=>y+1)},v=y=>{const D=String(c+1).padStart(2,"0"),N=String(y).padStart(2,"0");t(`${a}-${D}-${N}`),o(!1)},k=y=>y===i.getDate()&&c===i.getMonth()&&a===i.getFullYear(),z=y=>l!==null&&y===l.getDate()&&c===l.getMonth()&&a===l.getFullYear(),E=y=>new Date(y+"T00:00:00").toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"});return r.jsxs("div",{className:"relative",children:[r.jsxs("button",{type:"button",onClick:()=>o(!n),className:"flex items-center gap-2 px-2 py-1 text-xs font-medium rounded transition-colors",style:{color:e?"var(--vscode-foreground)":"var(--vscode-descriptionForeground)"},onMouseEnter:y=>y.currentTarget.style.background="var(--vscode-list-hoverBackground)",onMouseLeave:y=>y.currentTarget.style.background="transparent",children:[r.jsx("span",{children:e?E(e):s}),e&&r.jsx("span",{role:"button",onClick:y=>{y.stopPropagation(),t(""),o(!1)},className:"ml-0.5 hover:text-red-500 transition-colors",children:r.jsx(ie,{size:12})})]}),n&&r.jsxs(r.Fragment,{children:[r.jsx("div",{className:"fixed inset-0 z-10",onClick:()=>o(!1)}),r.jsxs("div",{className:"absolute top-full left-0 mt-1 z-20 rounded-lg shadow-lg p-3 w-[252px]",style:{background:"var(--vscode-dropdown-background)",border:"1px solid var(--vscode-dropdown-border, var(--vscode-panel-border))"},children:[r.jsxs("div",{className:"flex items-center justify-between mb-2",children:[r.jsx("button",{type:"button",onClick:x,className:"p-1 rounded transition-colors",style:{color:"var(--vscode-descriptionForeground)"},onMouseEnter:y=>y.currentTarget.style.background="var(--vscode-list-hoverBackground)",onMouseLeave:y=>y.currentTarget.style.background="transparent",children:r.jsx(ss,{size:14})}),r.jsxs("span",{className:"text-xs font-medium",style:{color:"var(--vscode-foreground)"},children:[ho[c]," ",a]}),r.jsx("button",{type:"button",onClick:m,className:"p-1 rounded transition-colors",style:{color:"var(--vscode-descriptionForeground)"},onMouseEnter:y=>y.currentTarget.style.background="var(--vscode-list-hoverBackground)",onMouseLeave:y=>y.currentTarget.style.background="transparent",children:r.jsx(ns,{size:14})})]}),r.jsx("div",{className:"grid grid-cols-7 mb-1",children:po.map(y=>r.jsx("div",{className:"text-center text-[10px] font-medium py-1",style:{color:"var(--vscode-descriptionForeground)"},children:y},y))}),r.jsx("div",{className:"grid grid-cols-7",children:d.map((y,D)=>r.jsx("div",{className:"flex items-center justify-center",children:y?r.jsx("button",{type:"button",onClick:()=>v(y),className:J("w-7 h-7 rounded-md text-[11px] transition-colors font-medium"),style:{background:z(y)?"var(--vscode-focusBorder)":k(y)?"var(--vscode-editor-selectionBackground)":void 0,color:z(y)?"var(--vscode-editor-background)":(k(y),"var(--vscode-foreground)")},onMouseEnter:N=>{z(y)||(N.currentTarget.style.background="var(--vscode-list-hoverBackground)")},onMouseLeave:N=>{!z(y)&&!k(y)?N.currentTarget.style.background="transparent":k(y)&&!z(y)&&(N.currentTarget.style.background="var(--vscode-editor-selectionBackground)")},children:y}):r.jsx("div",{className:"w-7 h-7"})},D))}),r.jsx("div",{className:"mt-2 pt-2 flex justify-center",style:{borderTop:"1px solid var(--vscode-panel-border)"},children:r.jsx("button",{type:"button",onClick:()=>{const y=String(i.getMonth()+1).padStart(2,"0"),D=String(i.getDate()).padStart(2,"0");t(`${i.getFullYear()}-${y}-${D}`),o(!1)},className:"text-[11px] font-medium transition-colors",style:{color:"var(--vscode-textLink-foreground)"},onMouseEnter:y=>y.currentTarget.style.color="var(--vscode-textLink-activeForeground)",onMouseLeave:y=>y.currentTarget.style.color="var(--vscode-textLink-foreground)",children:"Today"})})]})]})]})}function qr(e,t,s,n){const o=e.selectionStart,i=e.selectionEnd,l=t.substring(o,i);let a=t.substring(0,o);const p=t.substring(i);let c=l,u=0;switch(n){case"heading":{const h=t.lastIndexOf(`
71
+ `).trim()}function io(e){return K.parse(e,{async:!1,gfm:!0,breaks:!0})}function co({feature:e,onClick:t,isDragging:s,isSelected:n}){const{cardSettings:o}=_(),i=_(d=>d.labelDefs),l=Ir(e.content),a=lo(e.content),p=e.filePath&&e.filePath.split("/").pop()||"",c=d=>{if(!d)return null;const x=new Date(d),m=new Date,v=x.getTime()-m.getTime(),k=Math.ceil(v/(1e3*60*60*24));return k<0?{text:"Overdue",className:"text-red-500"}:k===0?{text:"Today",className:"text-orange-500"}:k===1?{text:"Tomorrow",className:"text-yellow-600 dark:text-yellow-400"}:k<=7?{text:`${k}d`,className:"text-zinc-500 dark:text-zinc-400"}:{text:x.toLocaleDateString("en-US",{month:"short",day:"numeric"}),className:"text-zinc-500 dark:text-zinc-400"}},u=e.status==="done"?null:c(e.dueDate),g=d=>{if(!d)return null;const x=new Date(d),v=new Date().getTime()-x.getTime(),k=Math.floor(v/(1e3*60)),z=Math.floor(v/(1e3*60*60)),E=Math.floor(v/(1e3*60*60*24));return k<1?"Just now":k<60?`${k}m ago`:z<24?`${z}h ago`:E===1?"1d ago":E<30?`${E}d ago`:E<365?`${Math.floor(E/30)}mo ago`:`${Math.floor(E/365)}y ago`},h=e.status==="done"?g(e.completedAt):null;return r.jsxs("div",{onClick:t,className:`group relative flex flex-col bg-white dark:bg-zinc-800 rounded-lg border ${n?"border-blue-500 dark:border-blue-400 ring-1 ring-blue-500 dark:ring-blue-400":"border-zinc-200 dark:border-zinc-700"} ${o.compactMode?"p-2 min-h-[4.5rem]":"p-3 min-h-[7rem]"} cursor-pointer hover:shadow-md transition-shadow ${s?"shadow-lg opacity-90":""}`,children:[r.jsxs("div",{className:"flex-1",children:[o.showFileName&&p&&r.jsxs("div",{className:"flex items-center gap-1.5 mb-1",children:[r.jsx(dr,{size:10,className:"shrink-0 text-zinc-400 dark:text-zinc-500"}),r.jsx("span",{className:"text-[10px] font-mono text-zinc-400 dark:text-zinc-500 truncate flex-1",children:p}),o.showPriorityBadges&&r.jsx("span",{className:`text-[10px] font-medium px-1.5 py-0.5 rounded shrink-0 ${er[e.priority]}`,children:tr[e.priority]})]}),r.jsxs("div",{className:`flex items-start gap-2 ${a||o.compactMode?"mb-1":"mb-2"}`,children:[r.jsx("h3",{className:"text-sm font-medium text-zinc-900 dark:text-zinc-100 line-clamp-2 flex-1",children:l}),o.showPriorityBadges&&!(o.showFileName&&p)&&r.jsx("span",{className:`text-xs font-medium px-1.5 py-0.5 rounded shrink-0 ${er[e.priority]}`,children:tr[e.priority]})]}),a&&!o.compactMode&&r.jsx("div",{className:"text-xs text-zinc-500 dark:text-zinc-400 line-clamp-2 mb-2 card-inline-markdown",dangerouslySetInnerHTML:{__html:io(a)}}),o.showLabels&&e.labels.length>0&&r.jsxs("div",{className:"flex flex-wrap gap-1 mb-2",children:[e.labels.slice(0,3).map(d=>{const x=i[d];return r.jsx("span",{className:`text-xs px-1.5 py-0.5 rounded ${x?"":"bg-zinc-100 text-zinc-600 dark:bg-zinc-700 dark:text-zinc-300"}`,style:x?{backgroundColor:`${x.color}20`,color:x.color}:void 0,children:d},d)}),e.labels.length>3&&r.jsxs("span",{className:"text-xs text-zinc-400",children:["+",e.labels.length-3]})]})]}),r.jsxs("div",{className:"flex items-center justify-between text-xs mt-auto",children:[r.jsx("div",{className:"flex items-center gap-1",children:o.showAssignee&&e.assignee&&e.assignee!=="null"&&r.jsxs("div",{className:"flex items-center gap-1.5 text-zinc-500 dark:text-zinc-400",children:[r.jsx("span",{className:"shrink-0 w-4 h-4 rounded-full flex items-center justify-center text-[8px] font-bold bg-zinc-200 dark:bg-zinc-600 text-zinc-700 dark:text-zinc-300",children:e.assignee.split(/\s+/).map(d=>d[0]).join("").toUpperCase().slice(0,2)}),r.jsx("span",{children:e.assignee})]})}),e.attachments.length>0&&r.jsxs("div",{className:"flex items-center gap-1 text-zinc-400 dark:text-zinc-500",children:[r.jsx(ht,{size:12}),r.jsx("span",{children:e.attachments.length})]}),e.metadata&&Object.keys(e.metadata).length>0&&r.jsx("div",{className:"flex items-center gap-1 text-zinc-400 dark:text-zinc-500",children:r.jsx("span",{className:"text-[10px] font-mono",children:`{${Object.keys(e.metadata).length}}`})}),o.showDueDate&&u&&r.jsxs("div",{className:`flex items-center gap-1 ${u.className}`,children:[r.jsx(Nt,{size:12}),r.jsx("span",{children:u.text})]}),h&&r.jsxs("div",{className:"flex items-center gap-1",style:{color:"var(--vscode-descriptionForeground)"},children:[r.jsx(fe,{size:12}),r.jsx("span",{children:h})]}),r.jsxs("div",{className:"flex items-center gap-1 text-zinc-400 dark:text-zinc-500",title:ao(e.created,e.modified),children:[r.jsx(gt,{size:12}),r.jsx("span",{children:zt(e.modified)})]})]})]})}const uo=[{value:"order",label:"Board Order"},{value:"created:asc",label:"Created (oldest)"},{value:"created:desc",label:"Created (newest)"},{value:"modified:asc",label:"Modified (oldest)"},{value:"modified:desc",label:"Modified (newest)"}];function rr({column:e,features:t,onFeatureClick:s,onAddFeature:n,onEditColumn:o,onRemoveColumn:i,onCleanupColumn:l,onDragStart:a,onDragOver:p,onDragOverCard:c,onDrop:u,onDragEnd:g,draggedFeature:h,dropTarget:d,layout:x,isDeletedColumn:m,onPurgeColumn:v,selectedFeatureId:k,sort:z,onSortChange:E}){const y=x==="vertical",D=d&&d.columnId===e.id,[N,B]=f.useState(!1),I=f.useRef(null);return f.useEffect(()=>{if(!N)return;const b=w=>{I.current&&!I.current.contains(w.target)&&B(!1)};return document.addEventListener("mousedown",b),()=>document.removeEventListener("mousedown",b)},[N]),r.jsxs("div",{className:y?"flex flex-col bg-zinc-100 dark:bg-zinc-800 rounded-lg":"flex-shrink-0 w-72 h-full flex flex-col bg-zinc-100 dark:bg-zinc-800 rounded-lg",onDragOver:p,onDrop:b=>u(b,e.id),children:[r.jsxs("div",{className:"flex items-center justify-between w-full px-3 py-2 border-b border-zinc-200 dark:border-zinc-700",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("div",{className:"w-2 h-2 rounded-full",style:{backgroundColor:e.color}}),r.jsx("h3",{className:"text-sm font-medium text-zinc-900 dark:text-zinc-100",children:e.name}),r.jsx("span",{className:"text-xs text-zinc-500 dark:text-zinc-400 bg-zinc-200 dark:bg-zinc-700 px-1.5 py-0.5 rounded-full",children:t.length})]}),r.jsx("div",{className:"flex items-center gap-0.5",children:m?r.jsx("button",{type:"button",onClick:()=>{t.length!==0&&window.confirm(`Permanently delete all ${t.length} card${t.length===1?"":"s"} from disk?`)&&(v==null||v())},className:"p-1 rounded hover:bg-red-100 dark:hover:bg-red-900/30 transition-colors",title:"Permanently delete all cards",children:r.jsx(Ce,{size:16,className:"text-red-500"})}):r.jsxs(r.Fragment,{children:[r.jsx("button",{type:"button",onClick:()=>n(e.id),className:"p-1 rounded hover:bg-zinc-200/60 dark:hover:bg-zinc-700/60 transition-colors",title:`Add to ${e.name}`,children:r.jsx($e,{size:16,className:"text-zinc-500"})}),r.jsxs("div",{className:"relative",ref:I,children:[r.jsx("button",{type:"button",onClick:()=>B(!N),className:"p-1 rounded hover:bg-zinc-200/60 dark:hover:bg-zinc-700/60 transition-colors",title:"Column options",children:r.jsx(ss,{size:16,className:"text-zinc-500"})}),N&&r.jsxs("div",{className:"absolute right-0 top-full mt-1 z-50 bg-white dark:bg-zinc-800 border border-zinc-200 dark:border-zinc-600 rounded-md shadow-lg py-1 min-w-[170px]",children:[r.jsx("div",{className:"px-3 py-1 text-xs font-medium text-zinc-400 dark:text-zinc-500 uppercase tracking-wide",children:"Sort by"}),uo.map(b=>r.jsxs("button",{type:"button",onClick:()=>{E(b.value)},className:"flex items-center gap-2 w-full px-3 py-1.5 text-sm text-zinc-700 dark:text-zinc-200 hover:bg-zinc-100 dark:hover:bg-zinc-700 transition-colors",children:[r.jsx(fe,{size:14,className:z===b.value?"text-blue-500":"invisible"}),b.label]},b.value)),r.jsx("div",{className:"border-t border-zinc-200 dark:border-zinc-600 my-1"}),r.jsxs("button",{type:"button",onClick:()=>{B(!1),o(e.id)},className:"flex items-center gap-2 w-full px-3 py-1.5 text-sm text-zinc-700 dark:text-zinc-200 hover:bg-zinc-100 dark:hover:bg-zinc-700 transition-colors",children:[r.jsx(Ct,{size:14}),"Edit List"]}),r.jsxs("button",{type:"button",onClick:()=>{B(!1),i(e.id)},className:"flex items-center gap-2 w-full px-3 py-1.5 text-sm text-red-600 dark:text-red-400 hover:bg-zinc-100 dark:hover:bg-zinc-700 transition-colors",children:[r.jsx(Ce,{size:14}),"Remove List"]}),r.jsxs("button",{type:"button",onClick:()=>{B(!1),l(e.id)},className:"flex items-center gap-2 w-full px-3 py-1.5 text-sm text-orange-600 dark:text-orange-400 hover:bg-zinc-100 dark:hover:bg-zinc-700 transition-colors",children:[r.jsx(Ce,{size:14}),"Cleanup List"]})]})]})]})})]}),r.jsxs("div",{className:y?"flex-1 p-2 flex flex-wrap gap-2":"flex-1 overflow-y-auto p-2 space-y-2 min-h-[200px]",children:[t.map((b,w)=>r.jsxs("div",{children:[D&&d.index===w&&r.jsx("div",{className:"h-0.5 bg-blue-500 rounded-full mx-1 mb-1"}),r.jsx("div",{draggable:!0,"data-card-id":b.id,onDragStart:S=>a(S,b),onDragOver:S=>c(S,e.id,w),onDragEnd:g,className:`${y?"w-64":""} ${(h==null?void 0:h.id)===b.id?"opacity-40":""}`,children:r.jsx(co,{feature:b,onClick:()=>s(b),isSelected:b.id===k})})]},b.id)),D&&d.index===t.length&&t.length>0&&r.jsx("div",{className:"h-0.5 bg-blue-500 rounded-full mx-1"}),t.length===0&&r.jsx("div",{className:y?"text-sm text-zinc-400 dark:text-zinc-500 py-4":"text-center py-8 text-sm text-zinc-400 dark:text-zinc-500",children:"No features"})]})]})}function po({onFeatureClick:e,onAddFeature:t,onMoveFeature:s,onEditColumn:n,onRemoveColumn:o,onCleanupColumn:i,onPurgeDeletedCards:l,selectedFeatureId:a}){const p=f.useRef(null);f.useEffect(()=>{if(!a)return;const w=p.current;w&&requestAnimationFrame(()=>{const S=w.querySelector(`[data-card-id="${a}"]`);if(!S)return;const C=w.getBoundingClientRect(),$=S.getBoundingClientRect();if(!($.left>=C.left&&$.right<=C.right)){const W=$.right-C.right;w.scrollBy({left:W+10,behavior:"smooth"})}})},[a]);const c=_(w=>w.columns),u=_(w=>w.cardSettings),g=_(w=>w.getFilteredFeaturesByStatus),h=_(w=>w.getFeaturesByStatus),d=_(w=>w.layout),x=_(w=>w.columnSorts),m=_(w=>w.setColumnSort),[v,k]=f.useState(null),[z,E]=f.useState(null),y=f.useCallback((w,S)=>{k(S),w.dataTransfer.effectAllowed="move",w.dataTransfer.setData("text/plain",S.id)},[]),D=f.useCallback(w=>{w.preventDefault(),w.dataTransfer.dropEffect="move"},[]),N=f.useCallback((w,S,C)=>{w.preventDefault(),w.dataTransfer.dropEffect="move";const $=w.currentTarget.getBoundingClientRect(),G=$.top+$.height/2,W=w.clientY<G?C:C+1;E(Q=>Q&&Q.columnId===S&&Q.index===W?Q:{columnId:S,index:W})},[]),B=f.useCallback((w,S)=>{if(w.preventDefault(),!v)return;const C=g(S);let $;if(z&&z.columnId===S?$=z.index:$=C.length,v.status===S){const U=C.findIndex(L=>L.id===v.id);if(U!==-1&&$>U&&$--,U===$){k(null),E(null);return}}const G=h(S).filter(U=>U.id!==v.id),W=C.filter(U=>U.id!==v.id);let Q;if(W.length===0)Q=G.length;else if($>=W.length){const U=W[W.length-1];Q=G.findIndex(H=>H.id===U.id)+1}else{const U=W[$];Q=G.findIndex(L=>L.id===U.id)}s(v.id,S,Q),k(null),E(null)},[v,z,g,h,s]),I=f.useCallback(()=>{k(null),E(null)},[]),b=d==="vertical";return r.jsx("div",{ref:p,className:b?"h-full overflow-y-auto p-4":"h-full overflow-x-auto p-4",children:r.jsxs("div",{className:b?"flex flex-col gap-4":"flex gap-4 h-full min-w-max",children:[c.map(w=>r.jsx(rr,{column:w,features:g(w.id),onFeatureClick:e,onAddFeature:t,onEditColumn:n,onRemoveColumn:o,onCleanupColumn:i,onDragStart:y,onDragOver:D,onDragOverCard:N,onDrop:B,onDragEnd:I,draggedFeature:v,dropTarget:z,layout:d,selectedFeatureId:a,sort:x[w.id]||"order",onSortChange:S=>m(w.id,S)},w.id)),u.showDeletedColumn&&r.jsx(rr,{column:Pe,features:g(Pe.id),onFeatureClick:e,onAddFeature:t,onEditColumn:n,onRemoveColumn:o,onCleanupColumn:i,onDragStart:y,onDragOver:D,onDragOverCard:N,onDrop:B,onDragEnd:I,draggedFeature:v,dropTarget:z,layout:d,isDeletedColumn:!0,onPurgeColumn:l,selectedFeatureId:a,sort:x[Pe.id]||"order",onSortChange:w=>m(Pe.id,w)},Pe.id)]})})}const ho=["Mo","Tu","We","Th","Fr","Sa","Su"],go=["January","February","March","April","May","June","July","August","September","October","November","December"];function xo({value:e,onChange:t,placeholder:s="Due date"}){const[n,o]=f.useState(!1),i=new Date,l=e?new Date(e+"T00:00:00"):null,[a,p]=f.useState((l==null?void 0:l.getFullYear())??i.getFullYear()),[c,u]=f.useState((l==null?void 0:l.getMonth())??i.getMonth()),g=new Date(a,c+1,0).getDate(),h=(new Date(a,c,1).getDay()+6)%7,d=Array(h).fill(null);for(let y=1;y<=g;y++)d.push(y);const x=()=>{c===0?(u(11),p(y=>y-1)):u(y=>y-1)},m=()=>{c===11?(u(0),p(y=>y+1)):u(y=>y+1)},v=y=>{const D=String(c+1).padStart(2,"0"),N=String(y).padStart(2,"0");t(`${a}-${D}-${N}`),o(!1)},k=y=>y===i.getDate()&&c===i.getMonth()&&a===i.getFullYear(),z=y=>l!==null&&y===l.getDate()&&c===l.getMonth()&&a===l.getFullYear(),E=y=>new Date(y+"T00:00:00").toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"});return r.jsxs("div",{className:"relative",children:[r.jsxs("button",{type:"button",onClick:()=>o(!n),className:"flex items-center gap-2 px-2 py-1 text-xs font-medium rounded transition-colors",style:{color:e?"var(--vscode-foreground)":"var(--vscode-descriptionForeground)"},onMouseEnter:y=>y.currentTarget.style.background="var(--vscode-list-hoverBackground)",onMouseLeave:y=>y.currentTarget.style.background="transparent",children:[r.jsx("span",{children:e?E(e):s}),e&&r.jsx("span",{role:"button",onClick:y=>{y.stopPropagation(),t(""),o(!1)},className:"ml-0.5 hover:text-red-500 transition-colors",children:r.jsx(ie,{size:12})})]}),n&&r.jsxs(r.Fragment,{children:[r.jsx("div",{className:"fixed inset-0 z-10",onClick:()=>o(!1)}),r.jsxs("div",{className:"absolute top-full left-0 mt-1 z-20 rounded-lg shadow-lg p-3 w-[252px]",style:{background:"var(--vscode-dropdown-background)",border:"1px solid var(--vscode-dropdown-border, var(--vscode-panel-border))"},children:[r.jsxs("div",{className:"flex items-center justify-between mb-2",children:[r.jsx("button",{type:"button",onClick:x,className:"p-1 rounded transition-colors",style:{color:"var(--vscode-descriptionForeground)"},onMouseEnter:y=>y.currentTarget.style.background="var(--vscode-list-hoverBackground)",onMouseLeave:y=>y.currentTarget.style.background="transparent",children:r.jsx(ns,{size:14})}),r.jsxs("span",{className:"text-xs font-medium",style:{color:"var(--vscode-foreground)"},children:[go[c]," ",a]}),r.jsx("button",{type:"button",onClick:m,className:"p-1 rounded transition-colors",style:{color:"var(--vscode-descriptionForeground)"},onMouseEnter:y=>y.currentTarget.style.background="var(--vscode-list-hoverBackground)",onMouseLeave:y=>y.currentTarget.style.background="transparent",children:r.jsx(os,{size:14})})]}),r.jsx("div",{className:"grid grid-cols-7 mb-1",children:ho.map(y=>r.jsx("div",{className:"text-center text-[10px] font-medium py-1",style:{color:"var(--vscode-descriptionForeground)"},children:y},y))}),r.jsx("div",{className:"grid grid-cols-7",children:d.map((y,D)=>r.jsx("div",{className:"flex items-center justify-center",children:y?r.jsx("button",{type:"button",onClick:()=>v(y),className:J("w-7 h-7 rounded-md text-[11px] transition-colors font-medium"),style:{background:z(y)?"var(--vscode-focusBorder)":k(y)?"var(--vscode-editor-selectionBackground)":void 0,color:z(y)?"var(--vscode-editor-background)":(k(y),"var(--vscode-foreground)")},onMouseEnter:N=>{z(y)||(N.currentTarget.style.background="var(--vscode-list-hoverBackground)")},onMouseLeave:N=>{!z(y)&&!k(y)?N.currentTarget.style.background="transparent":k(y)&&!z(y)&&(N.currentTarget.style.background="var(--vscode-editor-selectionBackground)")},children:y}):r.jsx("div",{className:"w-7 h-7"})},D))}),r.jsx("div",{className:"mt-2 pt-2 flex justify-center",style:{borderTop:"1px solid var(--vscode-panel-border)"},children:r.jsx("button",{type:"button",onClick:()=>{const y=String(i.getMonth()+1).padStart(2,"0"),D=String(i.getDate()).padStart(2,"0");t(`${i.getFullYear()}-${y}-${D}`),o(!1)},className:"text-[11px] font-medium transition-colors",style:{color:"var(--vscode-textLink-foreground)"},onMouseEnter:y=>y.currentTarget.style.color="var(--vscode-textLink-activeForeground)",onMouseLeave:y=>y.currentTarget.style.color="var(--vscode-textLink-foreground)",children:"Today"})})]})]})]})}function Ur(e,t,s,n){const o=e.selectionStart,i=e.selectionEnd,l=t.substring(o,i);let a=t.substring(0,o);const p=t.substring(i);let c=l,u=0;switch(n){case"heading":{const h=t.lastIndexOf(`
72
72
  `,o-1)+1,d=t.substring(h,o);d.startsWith("### ")?(a=t.substring(0,h)+d.slice(4),c=l,u=-4):d.startsWith("## ")?(a=t.substring(0,h)+"### "+d.slice(3),c=l,u=1):d.startsWith("# ")?(a=t.substring(0,h)+"## "+d.slice(2),c=l,u=1):(a=t.substring(0,h)+"# "+d,c=l,u=2);break}case"bold":c=l?`**${l}**`:"**bold**",u=l?4:2;break;case"italic":c=l?`_${l}_`:"_italic_",u=l?2:1;break;case"quote":{c=l?l.split(`
73
73
  `).map(d=>`> ${d}`).join(`
74
74
  `):"> ",u=l?c.length-l.length:2;break}case"code":l.includes(`
@@ -80,7 +80,7 @@ ${l}
80
80
  `).map((d,x)=>`${x+1}. ${d}`).join(`
81
81
  `):"1. ",u=l?c.length-l.length:3;break}case"tasklist":{c=l?l.split(`
82
82
  `).map(d=>`- [ ] ${d}`).join(`
83
- `):"- [ ] ",u=l?c.length-l.length:6;break}}const g=a+c+p;s(g),requestAnimationFrame(()=>{e.focus();const h=o+(l?c.length:u);e.selectionStart=e.selectionEnd=h})}function Y({icon:e,title:t,onClick:s,separator:n}){return r.jsxs(r.Fragment,{children:[n&&r.jsx("div",{className:"w-px h-4 mx-1",style:{background:"var(--vscode-panel-border)"}}),r.jsx("button",{type:"button",onClick:s,title:t,className:"p-1 rounded transition-colors",style:{color:"var(--vscode-descriptionForeground)"},onMouseEnter:o=>o.currentTarget.style.background="var(--vscode-list-hoverBackground)",onMouseLeave:o=>o.currentTarget.style.background="transparent",children:e})]})}const xo=new Fr({gfm:!0,breaks:!0,renderer:{link({href:e,title:t,tokens:s}){const n=this.parser.parseInline(s),o=t?` title="${t}"`:"";return`<a href="${e}"${o} target="_blank" rel="noopener noreferrer">${n}</a>`}}});function Ur(e){const t=e.replace(new RegExp(`(?<!\\]\\(|"|'|<)(https?:\\/\\/[^\\s<>\\])"']+)`,"g"),"<$1>");return xo.parse(t,{async:!1})}const sr="kanban-comment-author";function nr({initialContent:e="",onSubmit:t,onCancel:s,submitLabel:n="Comment"}){const[o,i]=f.useState(()=>localStorage.getItem(sr)??""),[l,a]=f.useState(e),[p,c]=f.useState("write"),u=f.useRef(null),g=f.useRef(!0);f.useEffect(()=>{var k;if(g.current){g.current=!1;return}p==="write"&&((k=u.current)==null||k.focus())},[p]);const h=f.useMemo(()=>l.trim()?Ur(l):"",[l]),d=f.useCallback(k=>{u.current&&qr(u.current,l,a,k)},[l]),x=()=>{const k=o.trim(),z=l.trim();!k||!z||(localStorage.setItem(sr,k),t(k,z),e||(a(""),c("write")))},m=k=>{k.key==="Enter"&&(k.metaKey||k.ctrlKey)&&(k.preventDefault(),x()),(k.metaKey||k.ctrlKey)&&k.key==="b"&&(k.preventDefault(),d("bold")),(k.metaKey||k.ctrlKey)&&k.key==="i"&&(k.preventDefault(),d("italic")),(k.metaKey||k.ctrlKey)&&k.key==="k"&&(k.preventDefault(),d("link"))},v=o.trim().length>0&&l.trim().length>0;return r.jsxs("div",{className:"flex flex-col gap-1.5",children:[r.jsx("input",{type:"text",value:o,onChange:k=>i(k.target.value),placeholder:"Your name","aria-label":"Comment author name",className:"w-full rounded px-2 py-1 text-xs outline-none",style:{background:"var(--vscode-input-background)",color:"var(--vscode-foreground)",border:"1px solid var(--vscode-input-border, var(--vscode-panel-border))"}}),r.jsxs("div",{className:"flex flex-col rounded overflow-hidden",style:{border:"1px solid var(--vscode-input-border, var(--vscode-panel-border))"},children:[r.jsx("div",{className:"flex items-center",style:{borderBottom:"1px solid var(--vscode-panel-border)"},children:["write","preview"].map(k=>r.jsxs("button",{type:"button",onClick:()=>c(k),className:"px-3 py-1.5 text-xs font-medium transition-colors relative capitalize",style:{color:p===k?"var(--vscode-foreground)":"var(--vscode-descriptionForeground)",background:"transparent"},children:[k,p===k&&r.jsx("span",{className:"absolute bottom-0 left-0 right-0 h-[2px] rounded-t",style:{background:"var(--vscode-focusBorder)"}})]},k))}),p==="write"?r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"flex items-center px-1 py-0.5",style:{borderBottom:"1px solid var(--vscode-panel-border)"},children:[r.jsx(Y,{icon:r.jsx(dr,{size:12}),title:"Bold (Cmd+B)",onClick:()=>d("bold")}),r.jsx(Y,{icon:r.jsx(ur,{size:12}),title:"Italic (Cmd+I)",onClick:()=>d("italic")}),r.jsx(Y,{icon:r.jsx(pr,{size:12}),title:"Quote",onClick:()=>d("quote"),separator:!0}),r.jsx(Y,{icon:r.jsx(hr,{size:12}),title:"Code",onClick:()=>d("code")}),r.jsx(Y,{icon:r.jsx(gr,{size:12}),title:"Link (Cmd+K)",onClick:()=>d("link"),separator:!0}),r.jsx(Y,{icon:r.jsx(xr,{size:12}),title:"Unordered list",onClick:()=>d("ul"),separator:!0}),r.jsx(Y,{icon:r.jsx(fr,{size:12}),title:"Ordered list",onClick:()=>d("ol")})]}),r.jsx("textarea",{ref:u,value:l,onChange:k=>a(k.target.value),onKeyDown:m,placeholder:"Add a comment... (Markdown supported)",className:"w-full px-2 py-1.5 text-xs resize-none outline-none",style:{background:"var(--vscode-input-background)",color:"var(--vscode-foreground)",minHeight:"120px"},rows:5})]}):h?r.jsx("div",{className:"px-2 py-1.5 text-xs comment-markdown",style:{background:"var(--vscode-input-background)",color:"var(--vscode-foreground)",minHeight:"120px"},dangerouslySetInnerHTML:{__html:h}}):r.jsx("div",{className:"px-2 py-1.5 text-xs",style:{background:"var(--vscode-input-background)",color:"var(--vscode-descriptionForeground)",minHeight:"120px"},children:"Nothing to preview"})]}),r.jsxs("div",{className:"flex items-center justify-end gap-1.5",children:[s&&r.jsx("button",{type:"button",onClick:s,className:"px-2.5 py-1 text-xs rounded transition-colors",style:{color:"var(--vscode-descriptionForeground)"},onMouseEnter:k=>k.currentTarget.style.background="var(--vscode-list-hoverBackground)",onMouseLeave:k=>k.currentTarget.style.background="transparent",children:"Cancel"}),r.jsx("button",{type:"button",onClick:x,disabled:!v,className:"px-2.5 py-1 text-xs font-medium rounded transition-colors disabled:opacity-30",style:{background:"var(--vscode-button-background)",color:"var(--vscode-button-foreground)"},title:`${n} (Cmd+Enter)`,children:n})]})]})}function fo({content:e}){const t=f.useMemo(()=>Ur(e),[e]);return r.jsx("div",{className:"comment-markdown",style:{color:"var(--vscode-foreground)"},dangerouslySetInnerHTML:{__html:t}})}function mo(e){const t=Date.now(),s=new Date(e).getTime(),n=Math.floor((t-s)/1e3);if(n<60)return"just now";const o=Math.floor(n/60);if(o<60)return`${o}m ago`;const i=Math.floor(o/60);if(i<24)return`${i}h ago`;const l=Math.floor(i/24);return l<30?`${l}d ago`:new Date(e).toLocaleDateString()}function bo({comments:e,onAddComment:t,onUpdateComment:s,onDeleteComment:n}){const[o,i]=f.useState(null);return r.jsxs("div",{className:"flex flex-col",children:[e.length>0&&r.jsx("div",{className:"flex flex-col gap-2 px-4 py-3",children:e.map(l=>r.jsxs("div",{className:"rounded p-2 pl-3 text-xs group",style:{background:"var(--vscode-input-background)",borderLeft:"2px solid var(--vscode-textLink-foreground, #3b82f6)"},children:[r.jsxs("div",{className:"flex items-center justify-between mb-1",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("span",{className:"shrink-0 w-5 h-5 rounded-full flex items-center justify-center text-[9px] font-bold",style:{background:"var(--vscode-badge-background)",color:"var(--vscode-badge-foreground)"},children:l.author.split(/\s+/).filter(Boolean).map(a=>a[0]).join("").toUpperCase().slice(0,2)}),r.jsx("span",{className:"font-medium",style:{color:"var(--vscode-foreground)"},children:l.author}),r.jsx("span",{className:"text-[10px]",style:{color:"var(--vscode-descriptionForeground)"},children:mo(l.created)})]}),r.jsxs("div",{className:"flex items-center gap-1 opacity-0 group-hover:opacity-100 transition-opacity",children:[r.jsx("button",{onClick:()=>i(l.id),className:"p-0.5 rounded transition-colors vscode-hover-bg",style:{color:"var(--vscode-descriptionForeground)"},title:"Edit",children:r.jsx(Ct,{size:10})}),r.jsx("button",{onClick:()=>n(l.id),className:"p-0.5 rounded transition-colors hover:text-red-500",style:{color:"var(--vscode-descriptionForeground)"},title:"Delete",children:r.jsx(Ce,{size:10})})]})]}),o===l.id?r.jsx("div",{className:"mt-1",children:r.jsx(nr,{initialContent:l.content,submitLabel:"Save",onSubmit:(a,p)=>{s(l.id,p),i(null)},onCancel:()=>i(null)})}):r.jsx(fo,{content:l.content})]},l.id))}),r.jsx("div",{className:"px-4 pb-3",children:r.jsx(nr,{onSubmit:(l,a)=>t(l,a),submitLabel:"Comment"})})]})}function Hr({value:e,onChange:t,placeholder:s="Write markdown...",className:n,autoFocus:o,mode:i="create",comments:l,onAddComment:a,onUpdateComment:p,onDeleteComment:c}){const u=i==="edit",g=u?"Edit":"Write",[h,d]=f.useState(u?"preview":"write"),x=f.useRef(null),m=f.useMemo(()=>e.trim()?K.parse(e,{async:!1,gfm:!0,breaks:!0}):"",[e]);f.useEffect(()=>{h==="write"&&x.current&&x.current.focus()},[h]),f.useEffect(()=>{o&&x.current&&x.current.focus()},[o]);const v=f.useCallback(z=>{x.current&&qr(x.current,e,t,z)},[e,t]),k=z=>{if(z.key==="Tab"){z.preventDefault();const E=z.currentTarget,y=E.selectionStart,D=E.selectionEnd,N=e.substring(0,y)+" "+e.substring(D);t(N),requestAnimationFrame(()=>{E.selectionStart=E.selectionEnd=y+2})}(z.metaKey||z.ctrlKey)&&z.key==="b"&&(z.preventDefault(),z.stopPropagation(),v("bold")),(z.metaKey||z.ctrlKey)&&z.key==="i"&&(z.preventDefault(),v("italic")),(z.metaKey||z.ctrlKey)&&z.key==="k"&&(z.preventDefault(),v("link"))};return r.jsxs("div",{className:J("flex flex-col h-full",n),children:[r.jsxs("div",{className:"flex items-center shrink-0",style:{borderBottom:"1px solid var(--vscode-panel-border)"},children:[(u?["preview","write"]:["write","preview"]).map(z=>r.jsxs("button",{type:"button",onClick:()=>d(z),className:"px-3 py-2 text-xs font-medium transition-colors relative",style:{color:h===z?"var(--vscode-foreground)":"var(--vscode-descriptionForeground)"},children:[z==="write"?g:"Preview",h===z&&r.jsx("span",{className:"absolute bottom-0 left-0 right-0 h-[2px] rounded-t",style:{background:"var(--vscode-focusBorder)"}})]},z)),l&&r.jsxs("button",{type:"button",onClick:()=>d("comments"),className:"px-3 py-2 text-xs font-medium transition-colors relative flex items-center gap-1.5",style:{color:h==="comments"?"var(--vscode-foreground)":"var(--vscode-descriptionForeground)"},children:[r.jsx(os,{size:12}),"Comments",l.length>0&&r.jsx("span",{className:"text-[10px] px-1 rounded-full",style:{background:"var(--vscode-badge-background)",color:"var(--vscode-badge-foreground)"},children:l.length}),h==="comments"&&r.jsx("span",{className:"absolute bottom-0 left-0 right-0 h-[2px] rounded-t",style:{background:"var(--vscode-focusBorder)"}})]}),h==="write"&&r.jsxs("div",{className:"flex items-center ml-auto pr-2 gap-0.5",children:[r.jsx(Y,{icon:r.jsx(as,{size:14}),title:"Heading",onClick:()=>v("heading")}),r.jsx(Y,{icon:r.jsx(dr,{size:14}),title:"Bold (⌘B)",onClick:()=>v("bold")}),r.jsx(Y,{icon:r.jsx(ur,{size:14}),title:"Italic (⌘I)",onClick:()=>v("italic")}),r.jsx(Y,{icon:r.jsx(pr,{size:14}),title:"Quote",onClick:()=>v("quote"),separator:!0}),r.jsx(Y,{icon:r.jsx(hr,{size:14}),title:"Code",onClick:()=>v("code")}),r.jsx(Y,{icon:r.jsx(gr,{size:14}),title:"Link (⌘K)",onClick:()=>v("link")}),r.jsx(Y,{icon:r.jsx(xr,{size:14}),title:"Bulleted list",onClick:()=>v("ul"),separator:!0}),r.jsx(Y,{icon:r.jsx(fr,{size:14}),title:"Numbered list",onClick:()=>v("ol")}),r.jsx(Y,{icon:r.jsx(ls,{size:14}),title:"Task list",onClick:()=>v("tasklist")})]})]}),r.jsxs("div",{className:"flex-1 overflow-auto",children:[h==="write"&&r.jsx("textarea",{ref:x,value:e,onChange:z=>t(z.target.value),onKeyDown:k,placeholder:s,className:"markdown-editor-textarea",spellCheck:!1}),h==="preview"&&r.jsx("div",{className:"min-h-[200px]",children:m?r.jsx("div",{className:"prose prose-sm dark:prose-invert max-w-none p-4",dangerouslySetInnerHTML:{__html:m}}):r.jsx("p",{className:"p-4 text-sm italic",style:{color:"var(--vscode-descriptionForeground)"},children:"Nothing to preview"})}),h==="comments"&&l&&a&&p&&c&&r.jsx(bo,{comments:l,onAddComment:a,onUpdateComment:p,onDeleteComment:c})]})]})}const vo=[{value:"critical",label:"Critical",dot:"bg-red-500"},{value:"high",label:"High",dot:"bg-orange-500"},{value:"medium",label:"Medium",dot:"bg-yellow-500"},{value:"low",label:"Low",dot:"bg-green-500"}],ko=[{value:"backlog",label:"Backlog",dot:"bg-zinc-400"},{value:"todo",label:"To Do",dot:"bg-blue-400"},{value:"in-progress",label:"In Progress",dot:"bg-amber-400"},{value:"review",label:"Review",dot:"bg-purple-400"},{value:"done",label:"Done",dot:"bg-emerald-400"}];function or({value:e,options:t,onChange:s,className:n}){const[o,i]=f.useState(!1),l=t.find(a=>a.value===e);return r.jsxs("div",{className:J("relative",n),children:[r.jsxs("button",{type:"button",onClick:()=>i(!o),className:"flex items-center gap-2 px-2 py-1 text-xs font-medium rounded transition-colors",style:{color:"var(--vscode-foreground)"},onMouseEnter:a=>a.currentTarget.style.background="var(--vscode-list-hoverBackground)",onMouseLeave:a=>a.currentTarget.style.background="transparent",children:[(l==null?void 0:l.dot)&&r.jsx("span",{className:J("w-2 h-2 rounded-full shrink-0",l.dot)}),r.jsx("span",{children:l==null?void 0:l.label}),r.jsx(me,{size:12,style:{color:"var(--vscode-descriptionForeground)"},className:"ml-0.5"})]}),o&&r.jsxs(r.Fragment,{children:[r.jsx("div",{className:"fixed inset-0 z-10",onClick:()=>i(!1)}),r.jsx("div",{className:"absolute top-full left-0 mt-1 z-20 rounded-lg shadow-lg py-1 min-w-[140px]",style:{background:"var(--vscode-dropdown-background)",border:"1px solid var(--vscode-dropdown-border, var(--vscode-panel-border))"},children:t.map(a=>r.jsxs("button",{type:"button",onClick:()=>{s(a.value),i(!1)},className:"w-full flex items-center gap-2 px-3 py-1.5 text-xs transition-colors",style:{color:"var(--vscode-dropdown-foreground)",background:a.value===e?"var(--vscode-list-activeSelectionBackground)":void 0},onMouseEnter:p=>{a.value!==e&&(p.currentTarget.style.background="var(--vscode-list-hoverBackground)")},onMouseLeave:p=>{a.value!==e&&(p.currentTarget.style.background="transparent")},children:[a.dot&&r.jsx("span",{className:J("w-2 h-2 rounded-full shrink-0",a.dot)}),r.jsx("span",{className:"flex-1 text-left",children:a.label}),a.value===e&&r.jsx(fe,{size:12,style:{color:"var(--vscode-focusBorder)"},className:"shrink-0"})]},a.value))})]})]})}function yo({value:e,onChange:t}){const[s,n]=f.useState(!1),o=f.useRef(null),i=f.useRef(null),l=_(g=>g.features),a=f.useMemo(()=>{const g=new Set;return l.forEach(h=>{h.assignee&&g.add(h.assignee)}),Array.from(g).sort()},[l]),p=f.useMemo(()=>e.trim()?a.filter(g=>g.toLowerCase().includes(e.toLowerCase())&&g!==e):a,[e,a]),c=s&&p.length>0,u=e.trim()?e.trim().split(/\s+/).map(g=>g[0]).join("").toUpperCase().slice(0,2):null;return r.jsxs("div",{ref:i,className:"relative flex-1",children:[r.jsxs("div",{className:"flex items-center gap-2 cursor-text",onClick:()=>{var g;return(g=o.current)==null?void 0:g.focus()},children:[u&&r.jsx("span",{className:"shrink-0 w-4 h-4 rounded-full flex items-center justify-center text-[8px] font-bold",style:{background:"var(--vscode-badge-background)",color:"var(--vscode-badge-foreground)"},children:u}),r.jsx("input",{ref:o,type:"text",value:e,onChange:g=>t(g.target.value),onFocus:()=>n(!0),onBlur:()=>setTimeout(()=>n(!1),150),placeholder:"No assignee",className:"flex-1 bg-transparent border-none outline-none text-xs",style:{color:e?"var(--vscode-foreground)":"var(--vscode-descriptionForeground)"}})]}),c&&r.jsx("div",{className:"absolute top-full left-0 mt-1 z-20 rounded-lg shadow-lg py-1 max-h-[160px] overflow-auto min-w-[180px]",style:{background:"var(--vscode-dropdown-background)",border:"1px solid var(--vscode-dropdown-border, var(--vscode-panel-border))"},children:p.map(g=>r.jsxs("button",{type:"button",onMouseDown:h=>{h.preventDefault(),t(g)},className:"w-full flex items-center gap-2 px-3 py-1.5 text-xs transition-colors",style:{color:"var(--vscode-dropdown-foreground)"},onMouseEnter:h=>h.currentTarget.style.background="var(--vscode-list-hoverBackground)",onMouseLeave:h=>h.currentTarget.style.background="transparent",children:[r.jsx("span",{className:"shrink-0 w-4 h-4 rounded-full flex items-center justify-center text-[8px] font-bold",style:{background:"var(--vscode-badge-background)",color:"var(--vscode-badge-foreground)"},children:g.split(/\s+/).map(h=>h[0]).join("").toUpperCase().slice(0,2)}),r.jsx("span",{children:g})]},g))})]})}function wo({labels:e,onChange:t}){const[s,n]=f.useState(""),[o,i]=f.useState(!1),l=f.useRef(null),a=_(d=>d.features),p=_(d=>d.labelDefs),c=f.useMemo(()=>{const d=new Set;return a.forEach(x=>x.labels.forEach(m=>d.add(m))),Array.from(d).sort()},[a]),u=f.useMemo(()=>{const d=c.filter(x=>!e.includes(x));return s.trim()?d.filter(x=>x.toLowerCase().includes(s.toLowerCase())):d},[s,c,e]),g=o&&u.length>0,h=d=>{const x=(d||s).trim();x&&!e.includes(x)&&t([...e,x]),n("")};return r.jsxs("div",{className:"relative flex-1",children:[r.jsxs("div",{className:"flex items-center gap-1.5 flex-wrap cursor-text",onClick:()=>{var d;return(d=l.current)==null?void 0:d.focus()},children:[e.map(d=>{const x=p[d];return r.jsxs("span",{className:"inline-flex items-center gap-1 px-1.5 py-0.5 text-[10px] font-medium rounded",style:x?{backgroundColor:`${x.color}20`,color:x.color}:{background:"var(--vscode-badge-background)",color:"var(--vscode-badge-foreground)"},children:[d,r.jsx("button",{type:"button",onClick:m=>{m.stopPropagation(),t(e.filter(v=>v!==d))},className:"hover:text-red-500 transition-colors",children:r.jsx(ie,{size:9})})]},d)}),r.jsx("input",{ref:l,type:"text",value:s,onChange:d=>n(d.target.value),onFocus:()=>i(!0),onBlur:()=>setTimeout(()=>i(!1),150),onKeyDown:d=>{var x;d.key==="Enter"&&(d.preventDefault(),h()),d.key==="Backspace"&&!s&&e.length>0&&t(e.slice(0,-1)),d.key==="Escape"&&(n(""),(x=l.current)==null||x.blur())},placeholder:e.length===0?"Add labels...":"",className:"flex-1 min-w-[60px] bg-transparent border-none outline-none text-xs",style:{color:"var(--vscode-foreground)"}})]}),g&&r.jsx("div",{className:"absolute top-full left-0 mt-1 z-20 rounded-lg shadow-lg py-1 max-h-[160px] overflow-auto min-w-[180px]",style:{background:"var(--vscode-dropdown-background)",border:"1px solid var(--vscode-dropdown-border, var(--vscode-panel-border))"},children:u.map(d=>{const x=p[d];return r.jsx("button",{type:"button",onMouseDown:m=>{m.preventDefault(),h(d)},className:"w-full flex items-center gap-2 px-3 py-1.5 text-xs transition-colors",style:{color:"var(--vscode-dropdown-foreground)"},onMouseEnter:m=>m.currentTarget.style.background="var(--vscode-list-hoverBackground)",onMouseLeave:m=>m.currentTarget.style.background="transparent",children:r.jsx("span",{className:"inline-block px-1.5 py-0.5 text-[10px] font-medium rounded",style:x?{backgroundColor:`${x.color}20`,color:x.color}:{background:"var(--vscode-badge-background)",color:"var(--vscode-badge-foreground)"},children:d})},d)})})]})}function jo({actions:e,onChange:t}){const[s,n]=f.useState(""),o=f.useRef(null),i=l=>{const a=s.trim();a&&!e.includes(a)&&t([...e,a]),n("")};return r.jsx("div",{className:"relative flex-1",children:r.jsxs("label",{className:"flex items-center gap-1.5 flex-wrap cursor-text",children:[e.map(l=>r.jsxs("span",{className:"inline-flex items-center gap-1 px-1.5 py-0.5 text-[10px] font-medium rounded",style:{background:"var(--vscode-badge-background)",color:"var(--vscode-badge-foreground)"},children:[l,r.jsx("button",{type:"button",onClick:a=>{a.stopPropagation(),t(e.filter(p=>p!==l))},className:"hover:text-red-500 transition-colors",children:r.jsx(ie,{size:9})})]},l)),r.jsx("input",{ref:o,type:"text",value:s,onChange:l=>n(l.target.value),onKeyDown:l=>{var a;(l.key==="Enter"||l.key===",")&&(l.preventDefault(),i()),l.key==="Backspace"&&!s&&e.length>0&&t(e.slice(0,-1)),l.key==="Escape"&&(n(""),(a=o.current)==null||a.blur())},placeholder:e.length===0?"Add actions...":"",className:"flex-1 min-w-[60px] bg-transparent border-none outline-none text-xs",style:{color:"var(--vscode-foreground)"}})]})})}function Me({label:e,icon:t,children:s}){return r.jsxs("div",{className:"flex items-center gap-3 px-4 py-[5px] transition-colors",onMouseEnter:n=>n.currentTarget.style.background="var(--vscode-list-hoverBackground)",onMouseLeave:n=>n.currentTarget.style.background="transparent",children:[r.jsxs("div",{className:"flex items-center gap-2 w-[90px] shrink-0",children:[r.jsx("span",{style:{color:"var(--vscode-descriptionForeground)"},children:t}),r.jsx("span",{className:"text-[11px]",style:{color:"var(--vscode-descriptionForeground)"},children:e})]}),r.jsx("div",{className:"flex-1 min-w-0",children:s})]})}function zo({isOpen:e,...t}){return e?r.jsx(No,{isOpen:e,...t}):null}function No({isOpen:e,onClose:t,onCreate:s,initialStatus:n}){const{cardSettings:o}=_(),[i,l]=f.useState(""),[a,p]=f.useState(n??o.defaultStatus),[c,u]=f.useState(o.defaultPriority),[g,h]=f.useState(""),[d,x]=f.useState(""),[m,v]=f.useState([]),[k,z]=f.useState([]),[E,y]=f.useState(""),D=f.useRef(null);f.useEffect(()=>{const b=setTimeout(()=>{var w;return(w=D.current)==null?void 0:w.focus()},50);return()=>clearTimeout(b)},[]);const N=()=>{const b=E.trim(),w=i.trim(),S=w?`# ${w}${b?`
83
+ `):"- [ ] ",u=l?c.length-l.length:6;break}}const g=a+c+p;s(g),requestAnimationFrame(()=>{e.focus();const h=o+(l?c.length:u);e.selectionStart=e.selectionEnd=h})}function Y({icon:e,title:t,onClick:s,separator:n}){return r.jsxs(r.Fragment,{children:[n&&r.jsx("div",{className:"w-px h-4 mx-1",style:{background:"var(--vscode-panel-border)"}}),r.jsx("button",{type:"button",onClick:s,title:t,className:"p-1 rounded transition-colors",style:{color:"var(--vscode-descriptionForeground)"},onMouseEnter:o=>o.currentTarget.style.background="var(--vscode-list-hoverBackground)",onMouseLeave:o=>o.currentTarget.style.background="transparent",children:e})]})}const fo=new Br({gfm:!0,breaks:!0,renderer:{link({href:e,title:t,tokens:s}){const n=this.parser.parseInline(s),o=t?` title="${t}"`:"";return`<a href="${e}"${o} target="_blank" rel="noopener noreferrer">${n}</a>`}}});function Hr(e){const t=e.replace(new RegExp(`(?<!\\]\\(|"|'|<)(https?:\\/\\/[^\\s<>\\])"']+)`,"g"),"<$1>");return fo.parse(t,{async:!1})}const sr="kanban-comment-author";function nr({initialContent:e="",onSubmit:t,onCancel:s,submitLabel:n="Comment"}){const[o,i]=f.useState(()=>localStorage.getItem(sr)??""),[l,a]=f.useState(e),[p,c]=f.useState("write"),u=f.useRef(null),g=f.useRef(!0);f.useEffect(()=>{var k;if(g.current){g.current=!1;return}p==="write"&&((k=u.current)==null||k.focus())},[p]);const h=f.useMemo(()=>l.trim()?Hr(l):"",[l]),d=f.useCallback(k=>{u.current&&Ur(u.current,l,a,k)},[l]),x=()=>{const k=o.trim(),z=l.trim();!k||!z||(localStorage.setItem(sr,k),t(k,z),e||(a(""),c("write")))},m=k=>{k.key==="Enter"&&(k.metaKey||k.ctrlKey)&&(k.preventDefault(),x()),(k.metaKey||k.ctrlKey)&&k.key==="b"&&(k.preventDefault(),d("bold")),(k.metaKey||k.ctrlKey)&&k.key==="i"&&(k.preventDefault(),d("italic")),(k.metaKey||k.ctrlKey)&&k.key==="k"&&(k.preventDefault(),d("link"))},v=o.trim().length>0&&l.trim().length>0;return r.jsxs("div",{className:"flex flex-col gap-1.5",children:[r.jsx("input",{type:"text",value:o,onChange:k=>i(k.target.value),placeholder:"Your name","aria-label":"Comment author name",className:"w-full rounded px-2 py-1 text-xs outline-none",style:{background:"var(--vscode-input-background)",color:"var(--vscode-foreground)",border:"1px solid var(--vscode-input-border, var(--vscode-panel-border))"}}),r.jsxs("div",{className:"flex flex-col rounded overflow-hidden",style:{border:"1px solid var(--vscode-input-border, var(--vscode-panel-border))"},children:[r.jsx("div",{className:"flex items-center",style:{borderBottom:"1px solid var(--vscode-panel-border)"},children:["write","preview"].map(k=>r.jsxs("button",{type:"button",onClick:()=>c(k),className:"px-3 py-1.5 text-xs font-medium transition-colors relative capitalize",style:{color:p===k?"var(--vscode-foreground)":"var(--vscode-descriptionForeground)",background:"transparent"},children:[k,p===k&&r.jsx("span",{className:"absolute bottom-0 left-0 right-0 h-[2px] rounded-t",style:{background:"var(--vscode-focusBorder)"}})]},k))}),p==="write"?r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"flex items-center px-1 py-0.5",style:{borderBottom:"1px solid var(--vscode-panel-border)"},children:[r.jsx(Y,{icon:r.jsx(ur,{size:12}),title:"Bold (Cmd+B)",onClick:()=>d("bold")}),r.jsx(Y,{icon:r.jsx(pr,{size:12}),title:"Italic (Cmd+I)",onClick:()=>d("italic")}),r.jsx(Y,{icon:r.jsx(hr,{size:12}),title:"Quote",onClick:()=>d("quote"),separator:!0}),r.jsx(Y,{icon:r.jsx(gr,{size:12}),title:"Code",onClick:()=>d("code")}),r.jsx(Y,{icon:r.jsx(xr,{size:12}),title:"Link (Cmd+K)",onClick:()=>d("link"),separator:!0}),r.jsx(Y,{icon:r.jsx(fr,{size:12}),title:"Unordered list",onClick:()=>d("ul"),separator:!0}),r.jsx(Y,{icon:r.jsx(mr,{size:12}),title:"Ordered list",onClick:()=>d("ol")})]}),r.jsx("textarea",{ref:u,value:l,onChange:k=>a(k.target.value),onKeyDown:m,placeholder:"Add a comment... (Markdown supported)",className:"w-full px-2 py-1.5 text-xs resize-none outline-none",style:{background:"var(--vscode-input-background)",color:"var(--vscode-foreground)",minHeight:"120px"},rows:5})]}):h?r.jsx("div",{className:"px-2 py-1.5 text-xs comment-markdown",style:{background:"var(--vscode-input-background)",color:"var(--vscode-foreground)",minHeight:"120px"},dangerouslySetInnerHTML:{__html:h}}):r.jsx("div",{className:"px-2 py-1.5 text-xs",style:{background:"var(--vscode-input-background)",color:"var(--vscode-descriptionForeground)",minHeight:"120px"},children:"Nothing to preview"})]}),r.jsxs("div",{className:"flex items-center justify-end gap-1.5",children:[s&&r.jsx("button",{type:"button",onClick:s,className:"px-2.5 py-1 text-xs rounded transition-colors",style:{color:"var(--vscode-descriptionForeground)"},onMouseEnter:k=>k.currentTarget.style.background="var(--vscode-list-hoverBackground)",onMouseLeave:k=>k.currentTarget.style.background="transparent",children:"Cancel"}),r.jsx("button",{type:"button",onClick:x,disabled:!v,className:"px-2.5 py-1 text-xs font-medium rounded transition-colors disabled:opacity-30",style:{background:"var(--vscode-button-background)",color:"var(--vscode-button-foreground)"},title:`${n} (Cmd+Enter)`,children:n})]})]})}function mo({content:e}){const t=f.useMemo(()=>Hr(e),[e]);return r.jsx("div",{className:"comment-markdown",style:{color:"var(--vscode-foreground)"},dangerouslySetInnerHTML:{__html:t}})}function bo(e){const t=Date.now(),s=new Date(e).getTime(),n=Math.floor((t-s)/1e3);if(n<60)return"just now";const o=Math.floor(n/60);if(o<60)return`${o}m ago`;const i=Math.floor(o/60);if(i<24)return`${i}h ago`;const l=Math.floor(i/24);return l<30?`${l}d ago`:new Date(e).toLocaleDateString()}function vo({comments:e,onAddComment:t,onUpdateComment:s,onDeleteComment:n}){const[o,i]=f.useState(null);return r.jsxs("div",{className:"flex flex-col",children:[e.length>0&&r.jsx("div",{className:"flex flex-col gap-2 px-4 py-3",children:e.map(l=>r.jsxs("div",{className:"rounded p-2 pl-3 text-xs group",style:{background:"var(--vscode-input-background)",borderLeft:"2px solid var(--vscode-textLink-foreground, #3b82f6)"},children:[r.jsxs("div",{className:"flex items-center justify-between mb-1",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("span",{className:"shrink-0 w-5 h-5 rounded-full flex items-center justify-center text-[9px] font-bold",style:{background:"var(--vscode-badge-background)",color:"var(--vscode-badge-foreground)"},children:l.author.split(/\s+/).filter(Boolean).map(a=>a[0]).join("").toUpperCase().slice(0,2)}),r.jsx("span",{className:"font-medium",style:{color:"var(--vscode-foreground)"},children:l.author}),r.jsx("span",{className:"text-[10px]",style:{color:"var(--vscode-descriptionForeground)"},children:bo(l.created)})]}),r.jsxs("div",{className:"flex items-center gap-1 opacity-0 group-hover:opacity-100 transition-opacity",children:[r.jsx("button",{onClick:()=>i(l.id),className:"p-0.5 rounded transition-colors vscode-hover-bg",style:{color:"var(--vscode-descriptionForeground)"},title:"Edit",children:r.jsx(Ct,{size:10})}),r.jsx("button",{onClick:()=>n(l.id),className:"p-0.5 rounded transition-colors hover:text-red-500",style:{color:"var(--vscode-descriptionForeground)"},title:"Delete",children:r.jsx(Ce,{size:10})})]})]}),o===l.id?r.jsx("div",{className:"mt-1",children:r.jsx(nr,{initialContent:l.content,submitLabel:"Save",onSubmit:(a,p)=>{s(l.id,p),i(null)},onCancel:()=>i(null)})}):r.jsx(mo,{content:l.content})]},l.id))}),r.jsx("div",{className:"px-4 pb-3",children:r.jsx(nr,{onSubmit:(l,a)=>t(l,a),submitLabel:"Comment"})})]})}function Gr({value:e,onChange:t,placeholder:s="Write markdown...",className:n,autoFocus:o,mode:i="create",comments:l,onAddComment:a,onUpdateComment:p,onDeleteComment:c}){const u=i==="edit",g=u?"Edit":"Write",[h,d]=f.useState(u?"preview":"write"),x=f.useRef(null),m=f.useMemo(()=>e.trim()?K.parse(e,{async:!1,gfm:!0,breaks:!0}):"",[e]);f.useEffect(()=>{h==="write"&&x.current&&x.current.focus()},[h]),f.useEffect(()=>{o&&x.current&&x.current.focus()},[o]);const v=f.useCallback(z=>{x.current&&Ur(x.current,e,t,z)},[e,t]),k=z=>{if(z.key==="Tab"){z.preventDefault();const E=z.currentTarget,y=E.selectionStart,D=E.selectionEnd,N=e.substring(0,y)+" "+e.substring(D);t(N),requestAnimationFrame(()=>{E.selectionStart=E.selectionEnd=y+2})}(z.metaKey||z.ctrlKey)&&z.key==="b"&&(z.preventDefault(),z.stopPropagation(),v("bold")),(z.metaKey||z.ctrlKey)&&z.key==="i"&&(z.preventDefault(),v("italic")),(z.metaKey||z.ctrlKey)&&z.key==="k"&&(z.preventDefault(),v("link"))};return r.jsxs("div",{className:J("flex flex-col h-full",n),children:[r.jsxs("div",{className:"flex items-center shrink-0",style:{borderBottom:"1px solid var(--vscode-panel-border)"},children:[(u?["preview","write"]:["write","preview"]).map(z=>r.jsxs("button",{type:"button",onClick:()=>d(z),className:"px-3 py-2 text-xs font-medium transition-colors relative",style:{color:h===z?"var(--vscode-foreground)":"var(--vscode-descriptionForeground)"},children:[z==="write"?g:"Preview",h===z&&r.jsx("span",{className:"absolute bottom-0 left-0 right-0 h-[2px] rounded-t",style:{background:"var(--vscode-focusBorder)"}})]},z)),l&&r.jsxs("button",{type:"button",onClick:()=>d("comments"),className:"px-3 py-2 text-xs font-medium transition-colors relative flex items-center gap-1.5",style:{color:h==="comments"?"var(--vscode-foreground)":"var(--vscode-descriptionForeground)"},children:[r.jsx(as,{size:12}),"Comments",l.length>0&&r.jsx("span",{className:"text-[10px] px-1 rounded-full",style:{background:"var(--vscode-badge-background)",color:"var(--vscode-badge-foreground)"},children:l.length}),h==="comments"&&r.jsx("span",{className:"absolute bottom-0 left-0 right-0 h-[2px] rounded-t",style:{background:"var(--vscode-focusBorder)"}})]}),h==="write"&&r.jsxs("div",{className:"flex items-center ml-auto pr-2 gap-0.5",children:[r.jsx(Y,{icon:r.jsx(ls,{size:14}),title:"Heading",onClick:()=>v("heading")}),r.jsx(Y,{icon:r.jsx(ur,{size:14}),title:"Bold (⌘B)",onClick:()=>v("bold")}),r.jsx(Y,{icon:r.jsx(pr,{size:14}),title:"Italic (⌘I)",onClick:()=>v("italic")}),r.jsx(Y,{icon:r.jsx(hr,{size:14}),title:"Quote",onClick:()=>v("quote"),separator:!0}),r.jsx(Y,{icon:r.jsx(gr,{size:14}),title:"Code",onClick:()=>v("code")}),r.jsx(Y,{icon:r.jsx(xr,{size:14}),title:"Link (⌘K)",onClick:()=>v("link")}),r.jsx(Y,{icon:r.jsx(fr,{size:14}),title:"Bulleted list",onClick:()=>v("ul"),separator:!0}),r.jsx(Y,{icon:r.jsx(mr,{size:14}),title:"Numbered list",onClick:()=>v("ol")}),r.jsx(Y,{icon:r.jsx(is,{size:14}),title:"Task list",onClick:()=>v("tasklist")})]})]}),r.jsxs("div",{className:"flex-1 overflow-auto",children:[h==="write"&&r.jsx("textarea",{ref:x,value:e,onChange:z=>t(z.target.value),onKeyDown:k,placeholder:s,className:"markdown-editor-textarea",spellCheck:!1}),h==="preview"&&r.jsx("div",{className:"min-h-[200px]",children:m?r.jsx("div",{className:"prose prose-sm dark:prose-invert max-w-none p-4",dangerouslySetInnerHTML:{__html:m}}):r.jsx("p",{className:"p-4 text-sm italic",style:{color:"var(--vscode-descriptionForeground)"},children:"Nothing to preview"})}),h==="comments"&&l&&a&&p&&c&&r.jsx(vo,{comments:l,onAddComment:a,onUpdateComment:p,onDeleteComment:c})]})]})}const ko=[{value:"critical",label:"Critical",dot:"bg-red-500"},{value:"high",label:"High",dot:"bg-orange-500"},{value:"medium",label:"Medium",dot:"bg-yellow-500"},{value:"low",label:"Low",dot:"bg-green-500"}],yo=[{value:"backlog",label:"Backlog",dot:"bg-zinc-400"},{value:"todo",label:"To Do",dot:"bg-blue-400"},{value:"in-progress",label:"In Progress",dot:"bg-amber-400"},{value:"review",label:"Review",dot:"bg-purple-400"},{value:"done",label:"Done",dot:"bg-emerald-400"}];function or({value:e,options:t,onChange:s,className:n}){const[o,i]=f.useState(!1),l=t.find(a=>a.value===e);return r.jsxs("div",{className:J("relative",n),children:[r.jsxs("button",{type:"button",onClick:()=>i(!o),className:"flex items-center gap-2 px-2 py-1 text-xs font-medium rounded transition-colors",style:{color:"var(--vscode-foreground)"},onMouseEnter:a=>a.currentTarget.style.background="var(--vscode-list-hoverBackground)",onMouseLeave:a=>a.currentTarget.style.background="transparent",children:[(l==null?void 0:l.dot)&&r.jsx("span",{className:J("w-2 h-2 rounded-full shrink-0",l.dot)}),r.jsx("span",{children:l==null?void 0:l.label}),r.jsx(me,{size:12,style:{color:"var(--vscode-descriptionForeground)"},className:"ml-0.5"})]}),o&&r.jsxs(r.Fragment,{children:[r.jsx("div",{className:"fixed inset-0 z-10",onClick:()=>i(!1)}),r.jsx("div",{className:"absolute top-full left-0 mt-1 z-20 rounded-lg shadow-lg py-1 min-w-[140px]",style:{background:"var(--vscode-dropdown-background)",border:"1px solid var(--vscode-dropdown-border, var(--vscode-panel-border))"},children:t.map(a=>r.jsxs("button",{type:"button",onClick:()=>{s(a.value),i(!1)},className:"w-full flex items-center gap-2 px-3 py-1.5 text-xs transition-colors",style:{color:"var(--vscode-dropdown-foreground)",background:a.value===e?"var(--vscode-list-activeSelectionBackground)":void 0},onMouseEnter:p=>{a.value!==e&&(p.currentTarget.style.background="var(--vscode-list-hoverBackground)")},onMouseLeave:p=>{a.value!==e&&(p.currentTarget.style.background="transparent")},children:[a.dot&&r.jsx("span",{className:J("w-2 h-2 rounded-full shrink-0",a.dot)}),r.jsx("span",{className:"flex-1 text-left",children:a.label}),a.value===e&&r.jsx(fe,{size:12,style:{color:"var(--vscode-focusBorder)"},className:"shrink-0"})]},a.value))})]})]})}function wo({value:e,onChange:t}){const[s,n]=f.useState(!1),o=f.useRef(null),i=f.useRef(null),l=_(g=>g.features),a=f.useMemo(()=>{const g=new Set;return l.forEach(h=>{h.assignee&&g.add(h.assignee)}),Array.from(g).sort()},[l]),p=f.useMemo(()=>e.trim()?a.filter(g=>g.toLowerCase().includes(e.toLowerCase())&&g!==e):a,[e,a]),c=s&&p.length>0,u=e.trim()?e.trim().split(/\s+/).map(g=>g[0]).join("").toUpperCase().slice(0,2):null;return r.jsxs("div",{ref:i,className:"relative flex-1",children:[r.jsxs("div",{className:"flex items-center gap-2 cursor-text",onClick:()=>{var g;return(g=o.current)==null?void 0:g.focus()},children:[u&&r.jsx("span",{className:"shrink-0 w-4 h-4 rounded-full flex items-center justify-center text-[8px] font-bold",style:{background:"var(--vscode-badge-background)",color:"var(--vscode-badge-foreground)"},children:u}),r.jsx("input",{ref:o,type:"text",value:e,onChange:g=>t(g.target.value),onFocus:()=>n(!0),onBlur:()=>setTimeout(()=>n(!1),150),placeholder:"No assignee",className:"flex-1 bg-transparent border-none outline-none text-xs",style:{color:e?"var(--vscode-foreground)":"var(--vscode-descriptionForeground)"}})]}),c&&r.jsx("div",{className:"absolute top-full left-0 mt-1 z-20 rounded-lg shadow-lg py-1 max-h-[160px] overflow-auto min-w-[180px]",style:{background:"var(--vscode-dropdown-background)",border:"1px solid var(--vscode-dropdown-border, var(--vscode-panel-border))"},children:p.map(g=>r.jsxs("button",{type:"button",onMouseDown:h=>{h.preventDefault(),t(g)},className:"w-full flex items-center gap-2 px-3 py-1.5 text-xs transition-colors",style:{color:"var(--vscode-dropdown-foreground)"},onMouseEnter:h=>h.currentTarget.style.background="var(--vscode-list-hoverBackground)",onMouseLeave:h=>h.currentTarget.style.background="transparent",children:[r.jsx("span",{className:"shrink-0 w-4 h-4 rounded-full flex items-center justify-center text-[8px] font-bold",style:{background:"var(--vscode-badge-background)",color:"var(--vscode-badge-foreground)"},children:g.split(/\s+/).map(h=>h[0]).join("").toUpperCase().slice(0,2)}),r.jsx("span",{children:g})]},g))})]})}function jo({labels:e,onChange:t}){const[s,n]=f.useState(""),[o,i]=f.useState(!1),l=f.useRef(null),a=_(d=>d.features),p=_(d=>d.labelDefs),c=f.useMemo(()=>{const d=new Set;return a.forEach(x=>x.labels.forEach(m=>d.add(m))),Array.from(d).sort()},[a]),u=f.useMemo(()=>{const d=c.filter(x=>!e.includes(x));return s.trim()?d.filter(x=>x.toLowerCase().includes(s.toLowerCase())):d},[s,c,e]),g=o&&u.length>0,h=d=>{const x=(d||s).trim();x&&!e.includes(x)&&t([...e,x]),n("")};return r.jsxs("div",{className:"relative flex-1",children:[r.jsxs("div",{className:"flex items-center gap-1.5 flex-wrap cursor-text",onClick:()=>{var d;return(d=l.current)==null?void 0:d.focus()},children:[e.map(d=>{const x=p[d];return r.jsxs("span",{className:"inline-flex items-center gap-1 px-1.5 py-0.5 text-[10px] font-medium rounded",style:x?{backgroundColor:`${x.color}20`,color:x.color}:{background:"var(--vscode-badge-background)",color:"var(--vscode-badge-foreground)"},children:[d,r.jsx("button",{type:"button",onClick:m=>{m.stopPropagation(),t(e.filter(v=>v!==d))},className:"hover:text-red-500 transition-colors",children:r.jsx(ie,{size:9})})]},d)}),r.jsx("input",{ref:l,type:"text",value:s,onChange:d=>n(d.target.value),onFocus:()=>i(!0),onBlur:()=>setTimeout(()=>i(!1),150),onKeyDown:d=>{var x;d.key==="Enter"&&(d.preventDefault(),h()),d.key==="Backspace"&&!s&&e.length>0&&t(e.slice(0,-1)),d.key==="Escape"&&(n(""),(x=l.current)==null||x.blur())},placeholder:e.length===0?"Add labels...":"",className:"flex-1 min-w-[60px] bg-transparent border-none outline-none text-xs",style:{color:"var(--vscode-foreground)"}})]}),g&&r.jsx("div",{className:"absolute top-full left-0 mt-1 z-20 rounded-lg shadow-lg py-1 max-h-[160px] overflow-auto min-w-[180px]",style:{background:"var(--vscode-dropdown-background)",border:"1px solid var(--vscode-dropdown-border, var(--vscode-panel-border))"},children:u.map(d=>{const x=p[d];return r.jsx("button",{type:"button",onMouseDown:m=>{m.preventDefault(),h(d)},className:"w-full flex items-center gap-2 px-3 py-1.5 text-xs transition-colors",style:{color:"var(--vscode-dropdown-foreground)"},onMouseEnter:m=>m.currentTarget.style.background="var(--vscode-list-hoverBackground)",onMouseLeave:m=>m.currentTarget.style.background="transparent",children:r.jsx("span",{className:"inline-block px-1.5 py-0.5 text-[10px] font-medium rounded",style:x?{backgroundColor:`${x.color}20`,color:x.color}:{background:"var(--vscode-badge-background)",color:"var(--vscode-badge-foreground)"},children:d})},d)})})]})}function zo({actions:e,onChange:t}){const[s,n]=f.useState(""),o=f.useRef(null),i=l=>{const a=s.trim();a&&!e.includes(a)&&t([...e,a]),n("")};return r.jsx("div",{className:"relative flex-1",children:r.jsxs("label",{className:"flex items-center gap-1.5 flex-wrap cursor-text",children:[e.map(l=>r.jsxs("span",{className:"inline-flex items-center gap-1 px-1.5 py-0.5 text-[10px] font-medium rounded",style:{background:"var(--vscode-badge-background)",color:"var(--vscode-badge-foreground)"},children:[l,r.jsx("button",{type:"button",onClick:a=>{a.stopPropagation(),t(e.filter(p=>p!==l))},className:"hover:text-red-500 transition-colors",children:r.jsx(ie,{size:9})})]},l)),r.jsx("input",{ref:o,type:"text",value:s,onChange:l=>n(l.target.value),onKeyDown:l=>{var a;(l.key==="Enter"||l.key===",")&&(l.preventDefault(),i()),l.key==="Backspace"&&!s&&e.length>0&&t(e.slice(0,-1)),l.key==="Escape"&&(n(""),(a=o.current)==null||a.blur())},placeholder:e.length===0?"Add actions...":"",className:"flex-1 min-w-[60px] bg-transparent border-none outline-none text-xs",style:{color:"var(--vscode-foreground)"}})]})})}function Me({label:e,icon:t,children:s}){return r.jsxs("div",{className:"flex items-center gap-3 px-4 py-[5px] transition-colors",onMouseEnter:n=>n.currentTarget.style.background="var(--vscode-list-hoverBackground)",onMouseLeave:n=>n.currentTarget.style.background="transparent",children:[r.jsxs("div",{className:"flex items-center gap-2 w-[90px] shrink-0",children:[r.jsx("span",{style:{color:"var(--vscode-descriptionForeground)"},children:t}),r.jsx("span",{className:"text-[11px]",style:{color:"var(--vscode-descriptionForeground)"},children:e})]}),r.jsx("div",{className:"flex-1 min-w-0",children:s})]})}function No({isOpen:e,...t}){return e?r.jsx(Co,{isOpen:e,...t}):null}function Co({isOpen:e,onClose:t,onCreate:s,initialStatus:n}){const{cardSettings:o}=_(),[i,l]=f.useState(""),[a,p]=f.useState(n??o.defaultStatus),[c,u]=f.useState(o.defaultPriority),[g,h]=f.useState(""),[d,x]=f.useState(""),[m,v]=f.useState([]),[k,z]=f.useState([]),[E,y]=f.useState(""),D=f.useRef(null);f.useEffect(()=>{const b=setTimeout(()=>{var w;return(w=D.current)==null?void 0:w.focus()},50);return()=>clearTimeout(b)},[]);const N=()=>{const b=E.trim(),w=i.trim(),S=w?`# ${w}${b?`
84
84
 
85
- ${b}`:""}`:b;s({status:a,priority:c,content:S,assignee:g.trim()||null,dueDate:d||null,labels:m,actions:k})},B=()=>{N(),t()},I=()=>{t()};return f.useEffect(()=>{const b=w=>{w.key==="Escape"&&I(),(w.metaKey||w.ctrlKey)&&w.key==="Enter"&&B(),(w.metaKey||w.ctrlKey)&&w.key==="s"&&(w.preventDefault(),B())};if(e)return document.addEventListener("keydown",b),()=>document.removeEventListener("keydown",b)}),r.jsxs("div",{className:"fixed inset-0 z-50 flex justify-end",children:[r.jsx("div",{className:"absolute inset-0 bg-black/30",onClick:I}),r.jsxs("div",{className:"relative h-full w-1/2 shadow-xl flex flex-col animate-in slide-in-from-right duration-200",style:{background:"var(--vscode-editor-background)",borderLeft:"1px solid var(--vscode-panel-border)"},children:[r.jsxs("div",{className:"flex items-center justify-between px-4 py-3",style:{borderBottom:"1px solid var(--vscode-panel-border)"},children:[r.jsx("div",{className:"flex items-center gap-3",children:r.jsx("h2",{className:"font-medium",style:{color:"var(--vscode-foreground)"},children:"Create Feature"})}),r.jsx("button",{onClick:I,className:"p-1.5 rounded transition-colors",style:{color:"var(--vscode-descriptionForeground)"},onMouseEnter:b=>b.currentTarget.style.background="var(--vscode-list-hoverBackground)",onMouseLeave:b=>b.currentTarget.style.background="transparent",children:r.jsx(ie,{size:18})})]}),r.jsxs("div",{className:"flex flex-col py-0.5",style:{borderBottom:"1px solid var(--vscode-panel-border)"},children:[r.jsx(Me,{label:"Status",icon:r.jsx(xt,{size:13}),children:r.jsx(or,{value:a,options:ko.map(b=>({value:b.value,label:b.label,dot:b.dot})),onChange:b=>p(b)})}),o.showPriorityBadges&&r.jsx(Me,{label:"Priority",icon:r.jsx(mr,{size:13}),children:r.jsx(or,{value:c,options:vo.map(b=>({value:b.value,label:b.label,dot:b.dot})),onChange:b=>u(b)})}),o.showAssignee&&r.jsx(Me,{label:"Assignee",icon:r.jsx(br,{size:13}),children:r.jsx(yo,{value:g,onChange:h})}),o.showDueDate&&r.jsx(Me,{label:"Due date",icon:r.jsx(Nt,{size:13}),children:r.jsx(go,{value:d,onChange:x})}),o.showLabels&&r.jsx(Me,{label:"Labels",icon:r.jsx(St,{size:13}),children:r.jsx(wo,{labels:m,onChange:v})}),r.jsx(Me,{label:"Actions",icon:r.jsx(is,{size:13}),children:r.jsx(jo,{actions:k,onChange:z})})]}),r.jsxs("div",{className:"flex-1 overflow-auto p-4",children:[r.jsx("textarea",{ref:D,value:i,onChange:b=>l(b.target.value),placeholder:"Feature title...",className:"w-full text-lg font-medium bg-transparent border-none outline-none resize-none mb-4",style:{color:"var(--vscode-foreground)"},rows:1,onInput:b=>{const w=b.target;w.style.height="auto",w.style.height=w.scrollHeight+"px"},onKeyDown:b=>{b.key==="Enter"&&!b.shiftKey&&b.preventDefault()}}),r.jsx(Hr,{value:E,onChange:y,placeholder:"Add a description..."})]}),r.jsxs("div",{className:"flex items-center justify-between px-4 py-3",style:{borderTop:"1px solid var(--vscode-panel-border)",background:"var(--vscode-sideBar-background, var(--vscode-editor-background))"},children:[r.jsxs("p",{className:"text-xs",style:{color:"var(--vscode-descriptionForeground)"},children:[r.jsx("kbd",{className:"px-1.5 py-0.5 rounded text-[10px] font-mono",style:{background:"var(--vscode-keybindingLabel-background, var(--vscode-badge-background))",color:"var(--vscode-keybindingLabel-foreground, var(--vscode-foreground))",border:"1px solid var(--vscode-keybindingLabel-border, var(--vscode-panel-border))"},children:"Esc"})," ","cancel ·"," ",r.jsx("kbd",{className:"px-1.5 py-0.5 rounded text-[10px] font-mono",style:{background:"var(--vscode-keybindingLabel-background, var(--vscode-badge-background))",color:"var(--vscode-keybindingLabel-foreground, var(--vscode-foreground))",border:"1px solid var(--vscode-keybindingLabel-border, var(--vscode-panel-border))"},children:"⌘S"})," ","save"]}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("button",{type:"button",onClick:I,className:"px-3 py-1.5 text-xs font-medium rounded transition-colors",style:{color:"var(--vscode-foreground)",background:"transparent",border:"1px solid var(--vscode-panel-border)"},onMouseEnter:b=>b.currentTarget.style.background="var(--vscode-list-hoverBackground)",onMouseLeave:b=>b.currentTarget.style.background="transparent",children:"Cancel"}),r.jsx("button",{type:"button",onClick:B,className:"px-3 py-1.5 text-xs font-medium rounded transition-colors",style:{color:"var(--vscode-button-foreground)",background:"var(--vscode-button-background)"},onMouseEnter:b=>b.currentTarget.style.background="var(--vscode-button-hoverBackground)",onMouseLeave:b=>b.currentTarget.style.background="var(--vscode-button-background)",children:"Save"})]})]})]})]})}const Co={critical:"Critical",high:"High",medium:"Medium",low:"Low"},So=["critical","high","medium","low"],Do={critical:"bg-red-500",high:"bg-orange-500",medium:"bg-yellow-500",low:"bg-green-500"},Mo=[{agent:"claude",label:"Claude",color:"hover:bg-amber-100 dark:hover:bg-amber-900/30",activeColor:"bg-amber-700 text-white"},{agent:"codex",label:"Codex",color:"hover:bg-emerald-100 dark:hover:bg-emerald-900/30",activeColor:"bg-emerald-500 text-white"},{agent:"opencode",label:"OpenCode",color:"hover:bg-slate-100 dark:hover:bg-slate-700/30",activeColor:"bg-slate-500 text-white"}],To={claude:{bg:"bg-amber-700",hover:"hover:bg-amber-800",shadow:"shadow-sm",border:"border border-amber-800/50"},codex:{bg:"bg-emerald-600",hover:"hover:bg-emerald-700",shadow:"shadow-sm",border:"border border-emerald-700/50"},opencode:{bg:"bg-slate-600",hover:"hover:bg-slate-700",shadow:"shadow-sm",border:"border border-slate-700/50"}},Eo={claude:[{permissionMode:"default",label:"Default",description:"With confirmations"},{permissionMode:"plan",label:"Plan",description:"Creates a plan first"},{permissionMode:"acceptEdits",label:"Auto-edit",description:"Auto-accepts file edits"},{permissionMode:"bypassPermissions",label:"Full Auto",description:"Bypasses all prompts"}],codex:[{permissionMode:"default",label:"Suggest",description:"Suggests changes"},{permissionMode:"acceptEdits",label:"Auto-edit",description:"Auto-accepts edits"},{permissionMode:"bypassPermissions",label:"Full Auto",description:"Full automation"}],opencode:[{permissionMode:"default",label:"Default",description:"Standard mode"}]};function $o({value:e,options:t,onChange:s,className:n}){const[o,i]=f.useState(!1),l=t.find(a=>a.value===e);return r.jsxs("div",{className:J("relative",n),children:[r.jsxs("button",{onClick:()=>i(!o),className:"flex items-center gap-2 px-2 py-1 text-xs font-medium rounded transition-colors vscode-hover-bg",style:{color:"var(--vscode-foreground)"},children:[(l==null?void 0:l.dot)&&r.jsx("span",{className:J("w-2 h-2 rounded-full shrink-0",l.dot)}),r.jsx("span",{children:l==null?void 0:l.label}),r.jsx(me,{size:12,style:{color:"var(--vscode-descriptionForeground)"},className:"ml-0.5"})]}),o&&r.jsxs(r.Fragment,{children:[r.jsx("div",{className:"fixed inset-0 z-10",onClick:()=>i(!1)}),r.jsx("div",{className:"absolute top-full left-0 mt-1 z-20 rounded-lg shadow-lg py-1 min-w-[140px]",style:{background:"var(--vscode-dropdown-background)",border:"1px solid var(--vscode-dropdown-border, var(--vscode-panel-border))"},children:t.map(a=>r.jsxs("button",{onClick:()=>{s(a.value),i(!1)},className:"w-full flex items-center gap-2 px-3 py-1.5 text-xs transition-colors",style:{color:"var(--vscode-dropdown-foreground)",background:a.value===e?"var(--vscode-list-activeSelectionBackground)":void 0},onMouseEnter:p=>{a.value!==e&&(p.currentTarget.style.background="var(--vscode-list-hoverBackground)")},onMouseLeave:p=>{a.value!==e&&(p.currentTarget.style.background="transparent")},children:[a.dot&&r.jsx("span",{className:J("w-2 h-2 rounded-full shrink-0",a.dot)}),r.jsx("span",{className:"flex-1 text-left",children:a.label}),a.value===e&&r.jsx(fe,{size:12,style:{color:"var(--vscode-focusBorder)"},className:"shrink-0"})]},a.value))})]})]})}function Ao({value:e,onChange:t,onTransferToBoard:s}){const[n,o]=f.useState(!1),i=_(c=>c.columns),l=_(c=>c.boards),a=_(c=>c.currentBoard),p=l.filter(c=>c.id!==a);return r.jsxs("div",{className:"relative",children:[r.jsxs("button",{onClick:()=>o(!n),className:"flex items-center gap-2 px-2 py-1 text-xs font-medium rounded transition-colors vscode-hover-bg",style:{color:"var(--vscode-foreground)"},children:[(()=>{const c=i.find(u=>u.id===e);return c?r.jsxs(r.Fragment,{children:[r.jsx("span",{className:"w-2 h-2 rounded-full shrink-0",style:{backgroundColor:c.color}}),r.jsx("span",{children:c.name})]}):r.jsx("span",{children:e})})(),r.jsx(me,{size:12,style:{color:"var(--vscode-descriptionForeground)"},className:"ml-0.5"})]}),n&&r.jsxs(r.Fragment,{children:[r.jsx("div",{className:"fixed inset-0 z-10",onClick:()=>o(!1)}),r.jsxs("div",{className:"absolute top-full left-0 mt-1 z-20 rounded-lg shadow-lg py-1 min-w-[180px] max-h-[320px] overflow-y-auto",style:{background:"var(--vscode-dropdown-background)",border:"1px solid var(--vscode-dropdown-border, var(--vscode-panel-border))"},children:[i.map(c=>r.jsxs("button",{onClick:()=>{t(c.id),o(!1)},className:"w-full flex items-center gap-2 px-3 py-1.5 text-xs transition-colors",style:{color:"var(--vscode-dropdown-foreground)",background:c.id===e?"var(--vscode-list-activeSelectionBackground)":void 0},onMouseEnter:u=>{c.id!==e&&(u.currentTarget.style.background="var(--vscode-list-hoverBackground)")},onMouseLeave:u=>{c.id!==e&&(u.currentTarget.style.background="transparent")},children:[r.jsx("span",{className:"w-2 h-2 rounded-full shrink-0",style:{backgroundColor:c.color}}),r.jsx("span",{className:"flex-1 text-left",children:c.name}),c.id===e&&r.jsx(fe,{size:12,style:{color:"var(--vscode-focusBorder)"},className:"shrink-0"})]},c.id)),p.length>0&&r.jsxs(r.Fragment,{children:[r.jsx("div",{className:"mx-2 my-1",style:{borderTop:"1px solid var(--vscode-panel-border)"}}),r.jsx("div",{className:"px-3 py-1 text-[10px] font-medium uppercase tracking-wider",style:{color:"var(--vscode-descriptionForeground)"},children:"Move to..."}),p.map(c=>r.jsxs("div",{children:[r.jsx("div",{className:"px-3 py-1 text-[10px] font-semibold",style:{color:"var(--vscode-descriptionForeground)"},children:c.name}),(c.columns||[]).map(u=>r.jsxs("button",{onClick:()=>{s(c.id,u.id),o(!1)},className:"w-full flex items-center gap-2 pl-5 pr-3 py-1.5 text-xs transition-colors",style:{color:"var(--vscode-dropdown-foreground)"},onMouseEnter:g=>{g.currentTarget.style.background="var(--vscode-list-hoverBackground)"},onMouseLeave:g=>{g.currentTarget.style.background="transparent"},children:[r.jsx("span",{className:"w-2 h-2 rounded-full shrink-0",style:{backgroundColor:u.color}}),r.jsx("span",{className:"flex-1 text-left",children:u.name})]},`${c.id}-${u.id}`))]},c.id))]})]})]})]})}function xe({label:e,icon:t,children:s}){return r.jsxs("div",{className:"flex items-center gap-3 px-4 py-[5px] transition-colors vscode-hover-bg",children:[r.jsxs("div",{className:"flex items-center gap-2 w-[90px] shrink-0",children:[r.jsx("span",{style:{color:"var(--vscode-descriptionForeground)"},children:t}),r.jsx("span",{className:"text-[11px]",style:{color:"var(--vscode-descriptionForeground)"},children:e})]}),r.jsx("div",{className:"flex-1 min-w-0",children:s})]})}function Lo({onSelect:e}){const[t,s]=f.useState(!1),[n,o]=f.useState("claude"),i=Eo[n],l=To[n];return r.jsxs("div",{className:"relative",children:[r.jsxs("button",{onClick:()=>s(!t),className:J("flex items-center gap-1.5 px-2.5 py-1.5 text-xs font-medium text-white rounded-md transition-colors",l.bg,l.hover,l.shadow,l.border),children:[r.jsx(cs,{size:13}),r.jsx("span",{children:"Build with AI"}),r.jsx("kbd",{className:"ml-0.5 text-[9px] opacity-60 font-mono",children:"⌘B"}),r.jsx(me,{size:11,className:J("ml-0.5 opacity-60 transition-transform",t&&"rotate-180")})]}),t&&r.jsxs(r.Fragment,{children:[r.jsx("div",{className:"fixed inset-0 z-10",onClick:()=>s(!1)}),r.jsxs("div",{className:"absolute top-full right-0 mt-1 z-20 bg-white dark:bg-zinc-800 border border-zinc-200 dark:border-zinc-700 rounded-lg shadow-xl min-w-[260px] overflow-hidden",children:[r.jsx("div",{className:"flex",children:Mo.map(a=>r.jsx("button",{onClick:()=>o(a.agent),className:J("flex-1 px-3 py-2.5 text-xs font-medium transition-all",n===a.agent?a.activeColor:J("text-zinc-600 dark:text-zinc-400",a.color)),children:a.label},a.agent))}),r.jsx("div",{className:"p-2 space-y-1",children:i.map(a=>r.jsxs("button",{onClick:()=>{e(n,a.permissionMode),s(!1)},className:"w-full text-left px-3 py-2.5 rounded-md hover:bg-zinc-100 dark:hover:bg-zinc-700/50 transition-colors",children:[r.jsx("div",{className:"text-xs font-medium text-zinc-900 dark:text-zinc-100",children:a.label}),r.jsx("div",{className:"text-[10px] text-zinc-500 dark:text-zinc-400 mt-0.5",children:a.description})]},a.permissionMode))})]})]})]})}function Ro({actions:e,onTriggerAction:t}){const[s,n]=f.useState(!1);return r.jsxs("div",{className:"relative",children:[r.jsxs("button",{onClick:()=>n(!s),className:"flex items-center gap-1.5 px-2.5 py-1.5 text-xs font-medium rounded-md transition-colors vscode-hover-bg",style:{color:"var(--vscode-foreground)",border:"1px solid var(--vscode-widget-border, var(--vscode-contrastBorder, rgba(128,128,128,0.35)))"},children:[r.jsx("span",{children:"Run Action"}),r.jsx(me,{size:11,className:J("opacity-60 transition-transform",s&&"rotate-180")})]}),s&&r.jsxs(r.Fragment,{children:[r.jsx("button",{type:"button","aria-label":"Close actions menu",className:"fixed inset-0 z-10 cursor-default",onClick:()=>n(!1)}),r.jsx("div",{className:"absolute top-full right-0 mt-1 z-20 rounded-lg shadow-lg py-1 min-w-[160px]",style:{background:"var(--vscode-dropdown-background)",border:"1px solid var(--vscode-dropdown-border, var(--vscode-panel-border))"},children:e.map(o=>r.jsx("button",{type:"button",onClick:()=>{n(!1),t(o)},className:"w-full flex items-center gap-2 px-3 py-1.5 text-xs transition-colors",style:{color:"var(--vscode-dropdown-foreground)"},onMouseEnter:i=>{i.currentTarget.style.background="var(--vscode-list-hoverBackground)"},onMouseLeave:i=>{i.currentTarget.style.background="transparent"},children:o},o))})]})]})}function Fo({metadata:e}){const[t,s]=f.useState(!1);if(!e||Object.keys(e).length===0)return null;const n=Object.keys(e);return r.jsxs("div",{className:"mt-3",children:[r.jsxs("button",{onClick:()=>s(!t),className:"flex items-center gap-1.5 text-xs font-medium text-zinc-500 dark:text-zinc-400 hover:text-zinc-700 dark:hover:text-zinc-300",children:[r.jsx("span",{className:"text-[10px]",children:t?"▼":"▶"}),r.jsx("span",{children:"Metadata"}),r.jsxs("span",{className:"text-zinc-400 dark:text-zinc-500",children:["(",n.length,")"]})]}),!t&&r.jsx("div",{className:"flex flex-wrap gap-1 mt-1.5",children:n.map(o=>r.jsx("span",{className:"text-xs px-1.5 py-0.5 rounded bg-zinc-100 text-zinc-600 dark:bg-zinc-700 dark:text-zinc-300 font-mono",children:o},o))}),t&&r.jsx("div",{className:"mt-1.5 text-xs font-mono bg-zinc-50 dark:bg-zinc-900 rounded p-2 border border-zinc-200 dark:border-zinc-700",children:r.jsx(Gr,{data:e,depth:0})})]})}function Gr({data:e,depth:t}){return r.jsx("div",{style:{paddingLeft:t>0?12:0},children:Object.entries(e).map(([s,n])=>r.jsx("div",{className:"py-0.5",children:n&&typeof n=="object"&&!Array.isArray(n)?r.jsxs(r.Fragment,{children:[r.jsxs("span",{className:"text-zinc-500 dark:text-zinc-400",children:[s,":"]}),r.jsx(Gr,{data:n,depth:t+1})]}):Array.isArray(n)?r.jsxs("div",{children:[r.jsxs("span",{className:"text-zinc-500 dark:text-zinc-400",children:[s,": "]}),r.jsxs("span",{className:"text-zinc-700 dark:text-zinc-300",children:["[",n.join(", "),"]"]})]}):r.jsxs("div",{children:[r.jsxs("span",{className:"text-zinc-500 dark:text-zinc-400",children:[s,": "]}),r.jsx("span",{className:"text-zinc-700 dark:text-zinc-300",children:String(n)})]})},s))})}function Bo({labels:e,onChange:t}){const[s,n]=f.useState(""),[o,i]=f.useState(!1),l=f.useRef(null),a=_(x=>x.features),p=_(x=>x.labelDefs),c=f.useMemo(()=>{const x=new Set;return a.forEach(m=>m.labels.forEach(v=>x.add(v))),Array.from(x).sort()},[a]),u=f.useMemo(()=>{const x=c.filter(m=>!e.includes(m));return s.trim()?x.filter(m=>m.toLowerCase().includes(s.toLowerCase())):x},[s,c,e]),g=o&&u.length>0,h=x=>{const m=(x||s).trim();m&&!e.includes(m)&&t([...e,m]),n("")},d=x=>{t(e.filter(m=>m!==x))};return r.jsxs("div",{className:"relative flex items-center gap-1.5 flex-wrap",children:[e.map(x=>{const m=p[x];return r.jsxs("span",{className:"inline-flex items-center gap-1 px-1.5 py-0.5 text-[10px] font-medium rounded",style:m?{backgroundColor:`${m.color}20`,color:m.color}:{background:"var(--vscode-badge-background)",color:"var(--vscode-badge-foreground)"},children:[x,r.jsx("button",{type:"button",onClick:()=>d(x),className:"hover:text-red-500 transition-colors",children:r.jsx(ie,{size:9})})]},x)}),r.jsx("button",{onClick:()=>{i(!0),setTimeout(()=>{var x;return(x=l.current)==null?void 0:x.focus()},0)},className:"inline-flex items-center gap-0.5 px-1 py-0.5 text-[10px] rounded transition-colors vscode-hover-bg",style:{color:"var(--vscode-descriptionForeground)"},children:r.jsx($e,{size:10})}),r.jsx("input",{ref:l,type:"text",value:s,onChange:x=>n(x.target.value),onFocus:()=>i(!0),onBlur:()=>setTimeout(()=>i(!1),150),onKeyDown:x=>{var m;x.key==="Enter"&&(x.preventDefault(),h()),x.key==="Backspace"&&!s&&e.length>0&&t(e.slice(0,-1)),x.key==="Escape"&&(n(""),(m=l.current)==null||m.blur())},placeholder:e.length===0?"Add labels...":"",className:"flex-1 min-w-[60px] bg-transparent border-none outline-none text-xs",style:{color:"var(--vscode-foreground)",display:o||s?"block":"none"}}),g&&r.jsx("div",{className:"absolute top-full left-0 mt-1 z-20 rounded-lg shadow-lg py-1 max-h-[160px] overflow-auto min-w-[180px]",style:{background:"var(--vscode-dropdown-background)",border:"1px solid var(--vscode-dropdown-border, var(--vscode-panel-border))"},children:u.map(x=>{const m=p[x];return r.jsx("button",{type:"button",onMouseDown:v=>{v.preventDefault(),h(x)},className:"w-full flex items-center gap-2 px-3 py-1.5 text-xs transition-colors",style:{color:"var(--vscode-dropdown-foreground)"},onMouseEnter:v=>v.currentTarget.style.background="var(--vscode-list-hoverBackground)",onMouseLeave:v=>v.currentTarget.style.background="transparent",children:r.jsx("span",{className:"inline-block px-1.5 py-0.5 text-[10px] font-medium rounded",style:m?{backgroundColor:`${m.color}20`,color:m.color}:{background:"var(--vscode-badge-background)",color:"var(--vscode-badge-foreground)"},children:x})},x)})})]})}function Io({featureId:e,content:t,frontmatter:s,comments:n,contentVersion:o,onSave:i,onClose:l,onDelete:a,onPermanentDelete:p,onRestore:c,onOpenFile:u,onStartWithAI:g,onAddAttachment:h,onOpenAttachment:d,onRemoveAttachment:x,onAddComment:m,onUpdateComment:v,onDeleteComment:k,onTransferToBoard:z,onTriggerAction:E}){const{cardSettings:y}=_(),[D,N]=f.useState(s),[B,I]=f.useState(t),[b,w]=f.useState(!1),S=D.status===It,C=f.useRef(null),$=f.useRef(D),G=f.useRef(B);$.current=D,G.current=B;const W=f.useCallback(()=>{i(G.current,$.current)},[i]);f.useEffect(()=>()=>{C.current&&clearTimeout(C.current)},[]),f.useEffect(()=>{I(t)},[e,o]),f.useEffect(()=>{N(s)},[s]);const Q=f.useCallback(L=>{I(L),C.current&&clearTimeout(C.current),C.current=setTimeout(()=>{i(L,$.current)},800)},[i]),U=f.useCallback(L=>{N(H=>{const ne={...H,...L};return C.current&&clearTimeout(C.current),C.current=setTimeout(()=>{i(G.current,ne)},800),ne})},[i]);return f.useEffect(()=>{const L=H=>{(H.metaKey||H.ctrlKey)&&H.key==="s"&&(H.preventDefault(),C.current&&clearTimeout(C.current),W()),(H.metaKey||H.ctrlKey)&&H.key==="b"&&y.showBuildWithAI&&(H.preventDefault(),g("claude","default")),H.key==="Escape"&&(C.current&&(clearTimeout(C.current),W()),l())};return window.addEventListener("keydown",L),()=>window.removeEventListener("keydown",L)},[W,l,g,y.showBuildWithAI]),r.jsxs("div",{className:"h-full flex flex-col",style:{background:"var(--vscode-editor-background)",borderLeft:"1px solid var(--vscode-panel-border)"},children:[r.jsxs("div",{className:"flex items-center justify-between px-4 py-3",style:{borderBottom:"1px solid var(--vscode-panel-border)"},children:[r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsx("span",{className:"text-xs font-mono",style:{color:"var(--vscode-descriptionForeground)"},children:e}),S?b?r.jsxs("div",{className:"flex items-center gap-1.5",children:[r.jsx("span",{className:"text-xs",style:{color:"var(--vscode-errorForeground)"},children:"Permanently delete from disk?"}),r.jsx("button",{onClick:()=>{w(!1),p()},className:"px-2 py-1 text-xs font-medium rounded transition-colors text-white bg-red-600 hover:bg-red-700",children:"Yes"}),r.jsx("button",{onClick:()=>w(!1),className:"px-2 py-1 text-xs font-medium rounded transition-colors vscode-hover-bg",style:{color:"var(--vscode-foreground)"},children:"No"})]}):r.jsxs(r.Fragment,{children:[r.jsxs("button",{onClick:c,className:"p-1.5 px-2 rounded border transition-colors vscode-hover-bg flex items-center gap-1",style:{color:"var(--vscode-descriptionForeground)",borderColor:"var(--vscode-widget-border, var(--vscode-contrastBorder, rgba(128,128,128,0.35)))"},title:"Restore card",children:[r.jsx(xt,{size:16}),r.jsx("span",{className:"text-xs",children:"RESTORE"})]}),r.jsxs("button",{onClick:()=>w(!0),className:"p-1.5 px-2 rounded border transition-colors vscode-hover-bg flex items-center gap-1",style:{color:"var(--vscode-errorForeground)",borderColor:"var(--vscode-widget-border, var(--vscode-contrastBorder, rgba(128,128,128,0.35)))"},title:"Permanently delete from disk",children:[r.jsx(Ce,{size:16}),r.jsx("span",{className:"text-xs",children:"PERMANENT DELETE"})]})]}):r.jsxs(r.Fragment,{children:[r.jsxs("button",{onClick:()=>{u(),l()},className:"p-1.5 px-2 rounded border transition-colors vscode-hover-bg flex items-center gap-1",style:{color:"var(--vscode-descriptionForeground)",borderColor:"var(--vscode-widget-border, var(--vscode-contrastBorder, rgba(128,128,128,0.35)))"},title:"Open .md file",children:[r.jsx(cr,{size:16}),r.jsx("span",{className:"text-xs",children:"OPEN"})]}),r.jsxs("button",{onClick:a,className:"p-1.5 px-2 rounded border transition-colors vscode-hover-bg flex items-center gap-1",style:{color:"var(--vscode-descriptionForeground)",borderColor:"var(--vscode-widget-border, var(--vscode-contrastBorder, rgba(128,128,128,0.35)))"},title:"Move to deleted",children:[r.jsx(Ce,{size:16}),r.jsx("span",{className:"text-xs",children:"DELETE"})]})]})]}),r.jsxs("div",{className:"flex items-center gap-2",children:[D.actions&&D.actions.length>0&&E&&r.jsx(Ro,{actions:D.actions,onTriggerAction:E}),y.showBuildWithAI&&r.jsx(Lo,{onSelect:g}),r.jsx("button",{onClick:l,className:"p-1.5 rounded transition-colors vscode-hover-bg",style:{color:"var(--vscode-descriptionForeground)"},children:r.jsx(ie,{size:18})})]})]}),r.jsxs("div",{className:"flex flex-col py-0.5",style:{borderBottom:"1px solid var(--vscode-panel-border)"},children:[r.jsx(xe,{label:"Status",icon:r.jsx(xt,{size:13}),children:r.jsx(Ao,{value:D.status,onChange:L=>U({status:L}),onTransferToBoard:z})}),y.showPriorityBadges&&r.jsx(xe,{label:"Priority",icon:r.jsx(mr,{size:13}),children:r.jsx($o,{value:D.priority,options:So.map(L=>({value:L,label:Co[L],dot:Do[L]})),onChange:L=>U({priority:L})})}),y.showAssignee&&r.jsx(xe,{label:"Assignee",icon:r.jsx(br,{size:13}),children:r.jsxs("div",{className:"flex items-center gap-2",children:[D.assignee&&r.jsx("span",{className:"shrink-0 w-4 h-4 rounded-full flex items-center justify-center text-[8px] font-bold",style:{background:"var(--vscode-badge-background)",color:"var(--vscode-badge-foreground)"},children:D.assignee.split(/\s+/).filter(Boolean).map(L=>L[0]).join("").toUpperCase().slice(0,2)}),r.jsx("input",{type:"text",value:D.assignee||"",onChange:L=>U({assignee:L.target.value||null}),placeholder:"No assignee",className:"bg-transparent border-none outline-none text-xs w-32",style:{color:D.assignee?"var(--vscode-foreground)":"var(--vscode-descriptionForeground)"}})]})}),y.showDueDate&&r.jsx(xe,{label:"Due date",icon:r.jsx(Nt,{size:13}),children:r.jsx("input",{type:"date",value:D.dueDate||"",onChange:L=>U({dueDate:L.target.value||null}),className:"bg-transparent border-none outline-none text-xs",style:{color:D.dueDate?"var(--vscode-foreground)":"var(--vscode-descriptionForeground)"}})}),y.showLabels&&r.jsx(xe,{label:"Labels",icon:r.jsx(St,{size:13}),children:r.jsx(Bo,{labels:D.labels,onChange:L=>U({labels:L})})}),r.jsx(xe,{label:"Attachments",icon:r.jsx(ht,{size:13}),children:r.jsxs("div",{className:"flex items-center gap-1.5 flex-wrap",children:[D.attachments.map(L=>r.jsxs("span",{className:"inline-flex items-center gap-1 px-1.5 py-0.5 text-[10px] font-medium rounded",style:{background:"var(--vscode-badge-background)",color:"var(--vscode-badge-foreground)"},children:[r.jsxs("button",{type:"button",onClick:()=>d(L),className:"inline-flex items-center gap-1 hover:underline",title:L,children:[r.jsx(ht,{size:9}),L]}),r.jsx("button",{type:"button",onClick:()=>x(L),className:"hover:text-red-500 transition-colors",children:r.jsx(ie,{size:9})})]},L)),r.jsx("button",{type:"button",onClick:h,className:"inline-flex items-center gap-0.5 px-1 py-0.5 text-[10px] rounded transition-colors vscode-hover-bg",style:{color:"var(--vscode-descriptionForeground)"},children:r.jsx($e,{size:10})})]})}),r.jsx(xe,{label:"Created",icon:r.jsx(gt,{size:13}),children:r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("span",{className:"text-xs",style:{color:"var(--vscode-foreground)"},children:nt(D.created)}),r.jsx("span",{className:"text-[10px]",style:{color:"var(--vscode-descriptionForeground)"},title:ot(D.created),children:zt(D.created)})]})}),r.jsx(xe,{label:"Modified",icon:r.jsx(gt,{size:13}),children:r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("span",{className:"text-xs",style:{color:"var(--vscode-foreground)"},children:nt(D.modified)}),r.jsx("span",{className:"text-[10px]",style:{color:"var(--vscode-descriptionForeground)"},title:ot(D.modified),children:zt(D.modified)})]})}),r.jsx("div",{className:"px-4 pb-2",children:r.jsx(Fo,{metadata:D.metadata})})]}),r.jsx(Hr,{value:B,onChange:Q,placeholder:"Start writing...",className:"flex-1 min-h-0",mode:"edit",comments:n,onAddComment:m,onUpdateComment:v,onDeleteComment:k})]})}const Po=[{value:"all",label:"All Priorities"},{value:"critical",label:"Critical"},{value:"high",label:"High"},{value:"medium",label:"Medium"},{value:"low",label:"Low"}],Oo=[{value:"all",label:"All Dates"},{value:"overdue",label:"Overdue"},{value:"today",label:"Due Today"},{value:"this-week",label:"Due This Week"},{value:"no-date",label:"No Due Date"}],pt="text-sm bg-white dark:bg-zinc-800 border border-zinc-200 dark:border-zinc-600 rounded-md px-2 py-1.5 focus:outline-none focus:ring-2 focus:ring-blue-500 text-zinc-900 dark:text-zinc-100";function _o({onOpenSettings:e,onAddColumn:t,onToggleTheme:s,onSwitchBoard:n,onCreateBoard:o}){var Ve;const{searchQuery:i,setSearchQuery:l,priorityFilter:a,setPriorityFilter:p,assigneeFilter:c,setAssigneeFilter:u,labelFilter:g,setLabelFilter:h,dueDateFilter:d,setDueDateFilter:x,clearAllFilters:m,getUniqueAssignees:v,getUniqueLabels:k,hasActiveFilters:z,layout:E,toggleLayout:y,isDarkMode:D,cardSettings:N,boards:B,currentBoard:I}=_(),b=_(M=>M.labelDefs),w=v(),S=k(),C=z(),$=f.useMemo(()=>{const M={};return S.forEach(re=>{const te=b[re],se=(te==null?void 0:te.group)||"Other";M[se]||(M[se]=[]),M[se].push(re)}),M},[S,b]),[G,W]=f.useState(!1),[Q,U]=f.useState(!1),[L,H]=f.useState(""),ne=f.useRef(null),X=f.useRef(null),[be,Ge]=f.useState(!1),[ve,We]=f.useState(""),Le=f.useRef(null),Re=f.useMemo(()=>{if(!ve)return $;const M=ve.toLowerCase(),re={};return Object.entries($).forEach(([te,se])=>{const ue=se.filter(Fe=>Fe.toLowerCase().includes(M));ue.length>0&&(re[te]=ue)}),re},[$,ve]);f.useEffect(()=>{const M=re=>{ne.current&&!ne.current.contains(re.target)&&(W(!1),U(!1),H(""))};return G&&document.addEventListener("mousedown",M),()=>document.removeEventListener("mousedown",M)},[G]),f.useEffect(()=>{const M=re=>{Le.current&&!Le.current.contains(re.target)&&(Ge(!1),We(""))};return be&&document.addEventListener("mousedown",M),()=>document.removeEventListener("mousedown",M)},[be]),f.useEffect(()=>{Q&&X.current&&X.current.focus()},[Q]);const ct=((Ve=B.find(M=>M.id===I))==null?void 0:Ve.name)||I,dt=()=>{const M=L.trim();M&&(o(M),H(""),U(!1),W(!1))};return r.jsxs("div",{className:"flex items-center gap-2 px-4 py-2 border-b border-zinc-200 dark:border-zinc-700 bg-zinc-50 dark:bg-zinc-900/50 flex-wrap",children:[r.jsxs("div",{className:"relative",ref:ne,children:[r.jsxs("button",{type:"button",onClick:()=>W(!G),className:"flex items-center gap-1.5 px-2 py-1.5 text-sm bg-white dark:bg-zinc-800 border border-zinc-200 dark:border-zinc-600 rounded-md hover:bg-zinc-50 dark:hover:bg-zinc-700 text-zinc-900 dark:text-zinc-100 transition-colors",children:[r.jsx("span",{className:"max-w-[120px] truncate",children:ct}),r.jsx(me,{size:14,className:`text-zinc-400 transition-transform ${G?"rotate-180":""}`})]}),G&&r.jsxs("div",{className:"absolute top-full left-0 mt-1 min-w-[180px] bg-white dark:bg-zinc-800 border border-zinc-200 dark:border-zinc-600 rounded-md shadow-lg z-50 py-1",children:[B.map(M=>r.jsxs("button",{type:"button",onClick:()=>{n(M.id),W(!1)},className:"w-full flex items-center gap-2 px-3 py-1.5 text-sm text-left hover:bg-zinc-100 dark:hover:bg-zinc-700 text-zinc-900 dark:text-zinc-100 transition-colors",children:[r.jsx(fe,{size:14,className:M.id===I?"text-blue-500":"invisible"}),r.jsx("span",{className:"truncate",children:M.name})]},M.id)),r.jsx("div",{className:"border-t border-zinc-200 dark:border-zinc-600 my-1"}),Q?r.jsx("div",{className:"px-3 py-1.5",children:r.jsx("input",{ref:X,type:"text",value:L,onChange:M=>H(M.target.value),onKeyDown:M=>{M.key==="Enter"&&dt(),M.key==="Escape"&&(U(!1),H(""))},placeholder:"Board name...",className:"w-full px-2 py-1 text-sm bg-zinc-50 dark:bg-zinc-900 border border-zinc-300 dark:border-zinc-500 rounded focus:outline-none focus:ring-2 focus:ring-blue-500 text-zinc-900 dark:text-zinc-100 placeholder-zinc-400"})}):r.jsxs("button",{type:"button",onClick:()=>U(!0),className:"w-full flex items-center gap-2 px-3 py-1.5 text-sm text-left hover:bg-zinc-100 dark:hover:bg-zinc-700 text-blue-600 dark:text-blue-400 transition-colors",children:[r.jsx($e,{size:14}),r.jsx("span",{children:"New Board"})]})]})]}),r.jsxs("div",{className:"relative flex-1 min-w-[180px] max-w-xs",children:[r.jsx(ds,{size:14,className:"absolute left-2.5 top-1/2 -translate-y-1/2 text-zinc-400"}),r.jsx("input",{type:"text",value:i,onChange:M=>l(M.target.value),placeholder:"Search... (meta.field: value)",className:"w-full pl-8 pr-3 py-1.5 text-sm bg-white dark:bg-zinc-800 border border-zinc-200 dark:border-zinc-600 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 text-zinc-900 dark:text-zinc-100 placeholder-zinc-400"})]}),N.showPriorityBadges&&r.jsx("select",{value:a,onChange:M=>p(M.target.value),className:pt,children:Po.map(M=>r.jsx("option",{value:M.value,children:M.label},M.value))}),N.showAssignee&&r.jsxs("select",{value:c,onChange:M=>u(M.target.value),className:pt,children:[r.jsx("option",{value:"all",children:"All Assignees"}),r.jsx("option",{value:"unassigned",children:"Unassigned"}),w.map(M=>r.jsx("option",{value:M,children:M},M))]}),N.showLabels&&r.jsxs("div",{className:"relative",ref:Le,children:[r.jsxs("button",{type:"button",onClick:()=>Ge(!be),className:`flex items-center gap-1.5 text-sm bg-white dark:bg-zinc-800 border rounded-md px-2 py-1.5 focus:outline-none focus:ring-2 focus:ring-blue-500 text-zinc-900 dark:text-zinc-100 transition-colors ${g.length>0?"border-blue-500 dark:border-blue-400":"border-zinc-200 dark:border-zinc-600"}`,children:[r.jsx(St,{size:14,className:"text-zinc-400 shrink-0"}),r.jsx("span",{className:"max-w-[100px] truncate",children:g.length===0?"All Labels":g.length===1?g[0]:`${g.length} Labels`}),r.jsx(me,{size:14,className:`text-zinc-400 transition-transform ${be?"rotate-180":""}`})]}),be&&r.jsxs("div",{className:"absolute top-full left-0 mt-1 min-w-[200px] max-h-72 overflow-y-auto bg-white dark:bg-zinc-800 border border-zinc-200 dark:border-zinc-600 rounded-md shadow-lg z-50 py-1",children:[r.jsx("div",{className:"px-2 pb-1",children:r.jsx("input",{type:"text",value:ve,onChange:M=>We(M.target.value),placeholder:"Filter labels...",autoFocus:!0,className:"w-full px-2 py-1 text-sm bg-zinc-50 dark:bg-zinc-900 border border-zinc-300 dark:border-zinc-500 rounded focus:outline-none focus:ring-2 focus:ring-blue-500 text-zinc-900 dark:text-zinc-100 placeholder-zinc-400"})}),!ve&&r.jsxs("button",{type:"button",onClick:()=>h([]),className:`w-full flex items-center gap-2 px-3 py-1.5 text-sm text-left hover:bg-zinc-100 dark:hover:bg-zinc-700 transition-colors ${g.length===0?"text-blue-600 dark:text-blue-400 font-medium":"text-zinc-900 dark:text-zinc-100"}`,children:[r.jsx("div",{className:`w-3.5 h-3.5 rounded border flex items-center justify-center shrink-0 ${g.length===0?"border-blue-500 bg-blue-500":"border-zinc-300 dark:border-zinc-500"}`,children:g.length===0&&r.jsx(fe,{size:10,className:"text-white"})}),r.jsx("span",{children:"All Labels"})]}),Object.entries(Re).map(([M,re])=>r.jsxs("div",{children:[Object.keys(Re).length>1&&r.jsx("div",{className:"px-3 pt-1.5 pb-0.5 text-xs font-semibold text-zinc-400 dark:text-zinc-500 uppercase tracking-wide",children:M}),re.map(te=>{const se=b[te],ue=g.includes(te);return r.jsxs("button",{type:"button",onClick:()=>{h(ue?g.filter(Fe=>Fe!==te):[...g,te])},className:"w-full flex items-center gap-2 px-3 py-1.5 text-sm text-left hover:bg-zinc-100 dark:hover:bg-zinc-700 text-zinc-900 dark:text-zinc-100 transition-colors",children:[r.jsx("div",{className:`w-3.5 h-3.5 rounded border flex items-center justify-center shrink-0 ${ue?"border-blue-500 bg-blue-500":"border-zinc-300 dark:border-zinc-500"}`,children:ue&&r.jsx(fe,{size:10,className:"text-white"})}),(se==null?void 0:se.color)&&r.jsx("span",{className:"w-2.5 h-2.5 rounded-full shrink-0",style:{backgroundColor:se.color}}),r.jsx("span",{className:"truncate",children:te})]},te)})]},M)),Object.keys(Re).length===0&&r.jsx("div",{className:"px-3 py-2 text-sm text-zinc-400 dark:text-zinc-500",children:"No labels found"})]})]}),N.showDueDate&&r.jsx("select",{value:d,onChange:M=>x(M.target.value),className:pt,children:Oo.map(M=>r.jsx("option",{value:M.value,children:M.label},M.value))}),C&&r.jsxs("button",{onClick:m,className:"flex items-center gap-1 px-2 py-1.5 text-sm text-zinc-500 hover:text-zinc-700 dark:text-zinc-400 dark:hover:text-zinc-200 hover:bg-zinc-100 dark:hover:bg-zinc-800 rounded-md transition-colors",title:"Clear all filters",children:[r.jsx(ie,{size:14}),r.jsx("span",{children:"Clear"})]}),r.jsxs("button",{onClick:t,className:"flex items-center gap-1 px-2 py-1.5 text-sm text-zinc-500 hover:text-zinc-700 dark:text-zinc-400 dark:hover:text-zinc-200 hover:bg-zinc-100 dark:hover:bg-zinc-800 rounded-md transition-colors",title:"Add new list",children:[r.jsx($e,{size:16}),r.jsx("span",{children:"Add List"})]}),r.jsx("button",{onClick:y,className:"flex items-center gap-1 px-2 py-1.5 text-sm text-zinc-500 hover:text-zinc-700 dark:text-zinc-400 dark:hover:text-zinc-200 hover:bg-zinc-100 dark:hover:bg-zinc-800 rounded-md transition-colors",title:E==="horizontal"?"Switch to vertical layout":"Switch to horizontal layout",children:E==="horizontal"?r.jsx(us,{size:16}):r.jsx(ps,{size:16})}),r.jsx("button",{onClick:s,className:"flex items-center gap-1 px-2 py-1.5 text-sm text-zinc-500 hover:text-zinc-700 dark:text-zinc-400 dark:hover:text-zinc-200 hover:bg-zinc-100 dark:hover:bg-zinc-800 rounded-md transition-colors",title:D?"Switch to light theme":"Switch to dark theme",children:D?r.jsx(hs,{size:16}):r.jsx(gs,{size:16})}),r.jsx("button",{onClick:e,className:"flex items-center gap-1 px-2 py-1.5 text-sm text-zinc-500 hover:text-zinc-700 dark:text-zinc-400 dark:hover:text-zinc-200 hover:bg-zinc-100 dark:hover:bg-zinc-800 rounded-md transition-colors",title:"Open settings",children:r.jsx(xs,{size:16})}),r.jsxs("div",{className:"ml-auto text-xs text-zinc-400",children:["Press ",r.jsx("kbd",{className:"px-1.5 py-0.5 bg-zinc-200 dark:bg-zinc-700 rounded",children:"n"})," to add"]})]})}function Ko({message:e,onUndo:t,onExpire:s,duration:n,index:o}){const[i,l]=f.useState(100);return f.useEffect(()=>{const p=50/n*100,c=setInterval(()=>{l(u=>{const g=u-p;return g<=0?(clearInterval(c),0):g})},50);return()=>clearInterval(c)},[n]),f.useEffect(()=>{i<=0&&s()},[i,s]),r.jsxs("div",{className:"fixed right-4 z-50 flex flex-col min-w-[320px] max-w-[420px] shadow-[0_4px_16px_rgba(0,0,0,0.4)] transition-[bottom] duration-200 ease-out",style:{bottom:`${24+o*52}px`,background:"var(--vscode-notifications-background)",color:"var(--vscode-notifications-foreground)",border:"1px solid var(--vscode-notifications-border, var(--vscode-widget-border))"},children:[r.jsxs("div",{className:"flex items-center gap-3 px-3 py-2.5",children:[r.jsx("span",{className:"text-[13px] leading-snug flex-1 truncate",children:e}),r.jsx("button",{onClick:t,className:"text-[13px] px-2 py-0.5 shrink-0",style:{background:"var(--vscode-button-background)",color:"var(--vscode-button-foreground)"},onMouseEnter:a=>a.currentTarget.style.background="var(--vscode-button-hoverBackground)",onMouseLeave:a=>a.currentTarget.style.background="var(--vscode-button-background)",children:"Undo"})]}),r.jsx("div",{className:"h-[2px] w-full",style:{background:"var(--vscode-widget-border)"},children:r.jsx("div",{className:"h-full transition-none",style:{width:`${i}%`,background:"var(--vscode-progressBar-background)"}})})]})}const Zo=[{value:"critical",label:"Critical",dot:"bg-red-500"},{value:"high",label:"High",dot:"bg-orange-500"},{value:"medium",label:"Medium",dot:"bg-yellow-500"},{value:"low",label:"Low",dot:"bg-green-500"}],qo=[{value:"backlog",label:"Backlog",dot:"bg-zinc-400"},{value:"todo",label:"To Do",dot:"bg-blue-400"},{value:"in-progress",label:"In Progress",dot:"bg-amber-400"},{value:"review",label:"Review",dot:"bg-purple-400"},{value:"done",label:"Done",dot:"bg-emerald-400"}];function Uo({isOpen:e,settings:t,workspace:s,onClose:n,onSave:o,onSetLabel:i,onRenameLabel:l,onDeleteLabel:a}){return e?r.jsx(Wo,{settings:t,workspace:s,onClose:n,onSave:o,onSetLabel:i,onRenameLabel:l,onDeleteLabel:a}):null}function Ho({checked:e,onChange:t}){return r.jsx("button",{type:"button",onClick:()=>t(!e),className:J("relative inline-flex h-5 w-9 items-center rounded-full transition-colors shrink-0"),style:{background:e?"var(--vscode-button-background)":"var(--vscode-badge-background, #6b7280)"},children:r.jsx("span",{className:"inline-block h-3.5 w-3.5 rounded-full bg-white transition-transform",style:{transform:e?"translateX(18px)":"translateX(3px)"}})})}function Ke({title:e,children:t}){return r.jsxs("div",{className:"py-3",children:[r.jsx("h3",{className:"px-4 pb-2 text-xs font-semibold uppercase tracking-wider",style:{color:"var(--vscode-descriptionForeground)"},children:e}),r.jsx("div",{children:t})]})}function ze({label:e,description:t,checked:s,onChange:n}){return r.jsxs("div",{className:"flex items-center justify-between gap-4 px-4 py-2 transition-colors cursor-pointer",onClick:()=>n(!s),onMouseEnter:o=>o.currentTarget.style.background="var(--vscode-list-hoverBackground)",onMouseLeave:o=>o.currentTarget.style.background="transparent",children:[r.jsxs("div",{className:"flex-1 min-w-0",children:[r.jsx("div",{className:"text-sm",style:{color:"var(--vscode-foreground)"},children:e}),t&&r.jsx("div",{className:"text-xs mt-0.5",style:{color:"var(--vscode-descriptionForeground)"},children:t})]}),r.jsx(Ho,{checked:s,onChange:n})]})}function Je({label:e,value:t}){return r.jsxs("div",{className:"flex items-center justify-between gap-4 px-4 py-1.5",children:[r.jsx("div",{className:"text-sm",style:{color:"var(--vscode-descriptionForeground)"},children:e}),r.jsx("div",{className:"text-xs font-mono truncate max-w-[60%] text-right",style:{color:"var(--vscode-foreground)",opacity:.7},title:t,children:t})]})}function ar({label:e,value:t,options:s,onChange:n}){const[o,i]=f.useState(!1),l=s.find(a=>a.value===t);return r.jsxs("div",{className:"flex items-center justify-between gap-4 px-4 py-2 transition-colors",onMouseEnter:a=>a.currentTarget.style.background="var(--vscode-list-hoverBackground)",onMouseLeave:a=>a.currentTarget.style.background="transparent",children:[r.jsx("div",{className:"text-sm",style:{color:"var(--vscode-foreground)"},children:e}),r.jsxs("div",{className:"relative",children:[r.jsxs("button",{type:"button",onClick:()=>i(!o),className:"flex items-center gap-2 px-2 py-1 text-xs font-medium rounded transition-colors",style:{color:"var(--vscode-foreground)"},children:[(l==null?void 0:l.dot)&&r.jsx("span",{className:J("w-2 h-2 rounded-full shrink-0",l.dot)}),r.jsx("span",{children:l==null?void 0:l.label}),r.jsx(me,{size:12,style:{color:"var(--vscode-descriptionForeground)"}})]}),o&&r.jsxs(r.Fragment,{children:[r.jsx("div",{className:"fixed inset-0 z-10",onClick:()=>i(!1)}),r.jsx("div",{className:"absolute top-full right-0 mt-1 z-20 rounded-lg shadow-lg py-1 min-w-[140px]",style:{background:"var(--vscode-dropdown-background)",border:"1px solid var(--vscode-dropdown-border, var(--vscode-panel-border))"},children:s.map(a=>r.jsxs("button",{type:"button",onClick:()=>{n(a.value),i(!1)},className:"w-full flex items-center gap-2 px-3 py-1.5 text-xs transition-colors",style:{color:"var(--vscode-dropdown-foreground)",background:a.value===t?"var(--vscode-list-activeSelectionBackground)":void 0},onMouseEnter:p=>{a.value!==t&&(p.currentTarget.style.background="var(--vscode-list-hoverBackground)")},onMouseLeave:p=>{a.value!==t&&(p.currentTarget.style.background="transparent")},children:[a.dot&&r.jsx("span",{className:J("w-2 h-2 rounded-full shrink-0",a.dot)}),r.jsx("span",{className:"flex-1 text-left",children:a.label})]},a.value))})]})]})]})}function lr({label:e,description:t,value:s,min:n,max:o,step:i,unit:l,onChange:a}){const p=(s-n)/(o-n)*100;return r.jsxs("div",{className:"flex items-center justify-between gap-4 px-4 py-2 transition-colors",onMouseEnter:c=>c.currentTarget.style.background="var(--vscode-list-hoverBackground)",onMouseLeave:c=>c.currentTarget.style.background="transparent",children:[r.jsxs("div",{className:"flex-1 min-w-0",children:[r.jsx("div",{className:"text-sm",style:{color:"var(--vscode-foreground)"},children:e}),t&&r.jsx("div",{className:"text-xs mt-0.5",style:{color:"var(--vscode-descriptionForeground)"},children:t})]}),r.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[r.jsx("input",{type:"range",min:n,max:o,step:i,value:s,onChange:c=>a(Number(c.target.value)),className:"settings-slider",style:{background:`linear-gradient(to right, var(--vscode-button-background) ${p}%, var(--vscode-badge-background, #6b7280) ${p}%)`}}),r.jsxs("span",{className:"text-xs font-mono w-12 text-right tabular-nums",style:{color:"var(--vscode-foreground)"},children:[s,l||"%"]})]})]})}function ir({value:e,onChange:t}){const[s,n]=f.useState(!1),[o,i]=f.useState("");return r.jsxs("div",{className:"relative",children:[r.jsx("button",{type:"button",onClick:()=>n(!s),className:"w-5 h-5 rounded-full border border-white/20 cursor-pointer shrink-0",style:{backgroundColor:e}}),s&&r.jsxs(r.Fragment,{children:[r.jsx("div",{className:"fixed inset-0 z-10",onClick:()=>n(!1)}),r.jsxs("div",{className:"absolute top-full left-0 mt-1 z-20 rounded-lg shadow-lg p-2 min-w-[180px]",style:{background:"var(--vscode-dropdown-background)",border:"1px solid var(--vscode-dropdown-border, var(--vscode-panel-border))"},children:[r.jsx("div",{className:"grid grid-cols-6 gap-1.5 mb-2",children:wt.map(l=>r.jsx("button",{type:"button",onClick:()=>{t(l.hex),n(!1)},className:"w-6 h-6 rounded-full border-2 transition-transform hover:scale-110",style:{backgroundColor:l.hex,borderColor:e===l.hex?"white":"transparent"},title:l.name},l.name))}),r.jsxs("div",{className:"flex gap-1",children:[r.jsx("input",{type:"text",placeholder:"#hex",value:o,onChange:l=>i(l.target.value),className:"flex-1 px-2 py-1 text-xs rounded",style:{background:"var(--vscode-input-background)",color:"var(--vscode-input-foreground)",border:"1px solid var(--vscode-input-border, transparent)"}}),r.jsx("button",{type:"button",onClick:()=>{/^#[0-9a-fA-F]{6}$/.test(o)&&(t(o),n(!1),i(""))},className:"px-2 py-1 text-xs rounded",style:{background:"var(--vscode-button-background)",color:"var(--vscode-button-foreground)"},children:"OK"})]})]})]})]})}function Go({onSetLabel:e,onRenameLabel:t,onDeleteLabel:s}){const n=_(b=>b.labelDefs),o=_(b=>b.features),[i,l]=f.useState(""),[a,p]=f.useState(wt[0].hex),[c,u]=f.useState(""),[g,h]=f.useState(null),[d,x]=f.useState(""),[m,v]=f.useState(null),k=f.useMemo(()=>{const b=new Map;for(const[w,S]of Object.entries(n))b.set(w,S);for(const w of o)for(const S of w.labels)b.has(S)||b.set(S,void 0);return b},[n,o]),z=f.useMemo(()=>{const b={};return k.forEach((S,C)=>{const $=(S==null?void 0:S.group)||"Other";b[$]||(b[$]=[]),b[$].push({name:C,def:S})}),Object.entries(b).sort(([S],[C])=>S==="Other"?1:C==="Other"?-1:S.localeCompare(C))},[k]),E=f.useMemo(()=>{const b=new Set;return Object.values(n).forEach(w=>{w.group&&b.add(w.group)}),Array.from(b).sort()},[n]),y=b=>o.filter(w=>w.labels.includes(b)).length,D=()=>{const b=i.trim();b&&(e==null||e(b,{color:a,group:c||void 0}),l(""),p(wt[0].hex),u(""))},N=b=>{const w=d.trim();w&&w!==b&&(t==null||t(b,w)),h(null),x("")},B=b=>{s==null||s(b),v(null)},I={background:"var(--vscode-input-background)",color:"var(--vscode-input-foreground)",border:"1px solid var(--vscode-input-border, transparent)"};return r.jsxs("div",{className:"px-4 space-y-3",children:[z.map(([b,w])=>r.jsxs("div",{children:[r.jsx("div",{className:"text-[10px] font-semibold uppercase tracking-wider mb-1.5",style:{color:"var(--vscode-descriptionForeground)"},children:b}),r.jsx("div",{className:"space-y-1",children:w.map(({name:S,def:C})=>r.jsxs("div",{className:"flex items-center gap-2 px-2 py-1.5 rounded group/label transition-colors",onMouseEnter:$=>$.currentTarget.style.background="var(--vscode-list-hoverBackground)",onMouseLeave:$=>$.currentTarget.style.background="transparent",children:[r.jsx(ir,{value:(C==null?void 0:C.color)||"#6b7280",onChange:$=>e==null?void 0:e(S,{...C,color:$,group:C==null?void 0:C.group})}),g===S?r.jsx("input",{type:"text",value:d,onChange:$=>x($.target.value),onKeyDown:$=>{$.key==="Enter"&&N(S),$.key==="Escape"&&(h(null),x(""))},onBlur:()=>N(S),autoFocus:!0,className:"flex-1 px-1.5 py-0.5 text-xs rounded min-w-0",style:I}):r.jsx("span",{className:"flex-1 text-xs truncate",style:{color:"var(--vscode-foreground)"},children:S}),(C==null?void 0:C.group)&&g!==S&&r.jsx("span",{className:"text-[10px] px-1.5 py-0.5 rounded-full shrink-0",style:{background:"var(--vscode-badge-background)",color:"var(--vscode-badge-foreground)"},children:C.group}),m===S?r.jsxs("div",{className:"flex items-center gap-1 shrink-0",children:[r.jsxs("span",{className:"text-[10px]",style:{color:"var(--vscode-errorForeground, #f44)"},children:[y(S)," card",y(S)!==1?"s":""]}),r.jsx("button",{type:"button",onClick:()=>B(S),className:"px-1.5 py-0.5 text-[10px] rounded",style:{background:"var(--vscode-inputValidation-errorBackground, #5a1d1d)",color:"var(--vscode-errorForeground, #f44)"},children:"Delete"}),r.jsx("button",{type:"button",onClick:()=>v(null),className:"px-1.5 py-0.5 text-[10px] rounded",style:{color:"var(--vscode-descriptionForeground)"},children:"Cancel"})]}):r.jsxs("div",{className:"flex items-center gap-0.5 shrink-0 opacity-0 group-hover/label:opacity-100 transition-opacity",children:[r.jsx("button",{type:"button",onClick:()=>{h(S),x(S)},className:"p-1 rounded transition-colors",style:{color:"var(--vscode-descriptionForeground)"},onMouseEnter:$=>$.currentTarget.style.color="var(--vscode-foreground)",onMouseLeave:$=>$.currentTarget.style.color="var(--vscode-descriptionForeground)",title:"Rename label",children:r.jsx(Ct,{size:12})}),r.jsx("button",{type:"button",onClick:()=>v(S),className:"p-1 rounded transition-colors",style:{color:"var(--vscode-descriptionForeground)"},onMouseEnter:$=>$.currentTarget.style.color="var(--vscode-errorForeground, #f44)",onMouseLeave:$=>$.currentTarget.style.color="var(--vscode-descriptionForeground)",title:"Delete label",children:r.jsx(Ce,{size:12})})]})]},S))})]},b)),r.jsxs("div",{className:"rounded-lg p-2 space-y-2",style:{background:"var(--vscode-input-background)",border:"1px solid var(--vscode-input-border, transparent)"},children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(ir,{value:a,onChange:p}),r.jsx("input",{type:"text",placeholder:"New label name...",value:i,onChange:b=>l(b.target.value),onKeyDown:b=>{b.key==="Enter"&&D()},className:"flex-1 px-1.5 py-1 text-xs rounded bg-transparent min-w-0",style:{color:"var(--vscode-input-foreground)",outline:"none"}})]}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("input",{type:"text",placeholder:"Group (optional)",value:c,onChange:b=>u(b.target.value),onKeyDown:b=>{b.key==="Enter"&&D()},list:"label-groups",className:"flex-1 px-1.5 py-1 text-xs rounded",style:I}),r.jsx("datalist",{id:"label-groups",children:E.map(b=>r.jsx("option",{value:b},b))}),r.jsxs("button",{type:"button",onClick:D,disabled:!i.trim(),className:"flex items-center gap-1 px-2 py-1 text-xs rounded transition-colors disabled:opacity-40",style:{background:"var(--vscode-button-background)",color:"var(--vscode-button-foreground)"},children:[r.jsx($e,{size:12}),"Add"]})]})]})]})}function Wo({settings:e,workspace:t,onClose:s,onSave:n,onSetLabel:o,onRenameLabel:i,onDeleteLabel:l}){const[a,p]=f.useState(e),[c,u]=f.useState("general");f.useEffect(()=>{p(e)},[e]);const g=h=>{const d={...a,...h};p(d),n(d)};return f.useEffect(()=>{const h=d=>{d.key==="Escape"&&(d.stopPropagation(),s())};return document.addEventListener("keydown",h,!0),()=>document.removeEventListener("keydown",h,!0)},[s]),r.jsxs("div",{className:"fixed inset-0 z-50 flex justify-end",children:[r.jsx("div",{className:"absolute inset-0 bg-black/30",onClick:s}),r.jsxs("div",{className:"relative h-full w-1/2 max-w-lg shadow-xl flex flex-col animate-in slide-in-from-right duration-200",style:{background:"var(--vscode-editor-background)",borderLeft:"1px solid var(--vscode-panel-border)"},children:[r.jsxs("div",{className:"flex items-center justify-between px-4 py-3",style:{borderBottom:"1px solid var(--vscode-panel-border)"},children:[r.jsx("h2",{className:"font-medium",style:{color:"var(--vscode-foreground)"},children:"Settings"}),r.jsx("button",{onClick:s,className:"p-1.5 rounded transition-colors",style:{color:"var(--vscode-descriptionForeground)"},onMouseEnter:h=>h.currentTarget.style.background="var(--vscode-list-hoverBackground)",onMouseLeave:h=>h.currentTarget.style.background="transparent",children:r.jsx(ie,{size:18})})]}),r.jsx("div",{className:"flex",style:{borderBottom:"1px solid var(--vscode-panel-border)"},children:["general","defaults","labels"].map(h=>r.jsxs("button",{type:"button",onClick:()=>u(h),className:"px-4 py-2.5 text-xs font-medium transition-colors relative",style:{color:c===h?"var(--vscode-foreground)":"var(--vscode-descriptionForeground)",background:"transparent"},children:[h.charAt(0).toUpperCase()+h.slice(1),c===h&&r.jsx("span",{className:"absolute bottom-0 left-0 right-0 h-0.5",style:{background:"var(--vscode-button-background)"}})]},h))}),r.jsxs("div",{className:"flex-1 overflow-auto",children:[c==="general"&&r.jsxs(r.Fragment,{children:[t&&r.jsxs(r.Fragment,{children:[r.jsxs(Ke,{title:"Workspace",children:[r.jsx(Je,{label:"Project Path",value:t.projectPath}),r.jsx(Je,{label:"Features Directory",value:t.featuresDirectory}),r.jsx(Je,{label:"Server Port",value:String(t.port)}),r.jsx(Je,{label:"Config Version",value:String(t.configVersion)})]}),r.jsx("div",{style:{borderTop:"1px solid var(--vscode-panel-border)"}})]}),r.jsxs(Ke,{title:"Card Display",children:[r.jsx(ze,{label:"Show Priority Badges",description:"Display priority indicators on feature cards",checked:a.showPriorityBadges,onChange:h=>g({showPriorityBadges:h})}),r.jsx(ze,{label:"Show Assignee",description:"Display assigned person on feature cards",checked:a.showAssignee,onChange:h=>g({showAssignee:h})}),r.jsx(ze,{label:"Show Due Date",description:"Display due dates on feature cards",checked:a.showDueDate,onChange:h=>g({showDueDate:h})}),r.jsx(ze,{label:"Show Labels",description:"Display labels on feature cards and in editors",checked:a.showLabels,onChange:h=>g({showLabels:h})}),r.jsx(ze,{label:"Show Filename",description:"Display the source markdown filename on cards",checked:a.showFileName,onChange:h=>g({showFileName:h})}),r.jsx(ze,{label:"Compact Mode",description:"Use compact card layout to show more features",checked:a.compactMode,onChange:h=>g({compactMode:h})}),r.jsx(ze,{label:"Show Deleted Column",description:"Display the Deleted column to manage soft-deleted cards",checked:a.showDeletedColumn,onChange:h=>g({showDeletedColumn:h})})]}),r.jsx("div",{style:{borderTop:"1px solid var(--vscode-panel-border)"}}),r.jsxs(Ke,{title:"Zoom",children:[r.jsx(lr,{label:"Board Zoom",description:"Scale text size on the board view",value:a.boardZoom,min:75,max:150,step:5,onChange:h=>g({boardZoom:h})}),r.jsx(lr,{label:"Card Detail Zoom",description:"Scale text size in the card detail panel",value:a.cardZoom,min:75,max:150,step:5,onChange:h=>g({cardZoom:h})})]})]}),c==="defaults"&&r.jsxs(Ke,{title:"Defaults",children:[r.jsx(ar,{label:"Default Priority",value:a.defaultPriority,options:Zo,onChange:h=>g({defaultPriority:h})}),r.jsx(ar,{label:"Default Status",value:a.defaultStatus,options:qo,onChange:h=>g({defaultStatus:h})})]}),c==="labels"&&r.jsx(Ke,{title:"Labels",children:r.jsx(Go,{onSetLabel:o,onRenameLabel:i,onDeleteLabel:l})})]}),r.jsx("div",{className:"px-4 py-2",style:{borderTop:"1px solid var(--vscode-panel-border)"},children:r.jsx("p",{className:"text-xs",style:{color:"var(--vscode-descriptionForeground)"},children:"Settings are saved automatically and apply to all connected clients."})})]})]})}const Vo=["#6b7280","#3b82f6","#f59e0b","#8b5cf6","#22c55e","#ef4444","#ec4899","#14b8a6","#f97316","#06b6d4"];function Qo({isOpen:e,onClose:t,onSave:s,initial:n,title:o}){const[i,l]=f.useState((n==null?void 0:n.name)??""),[a,p]=f.useState((n==null?void 0:n.color)??"#3b82f6"),c=f.useRef(null);return f.useEffect(()=>{e&&(l((n==null?void 0:n.name)??""),p((n==null?void 0:n.color)??"#3b82f6"),setTimeout(()=>{var u;return(u=c.current)==null?void 0:u.focus()},50))},[e,n]),f.useEffect(()=>{if(!e)return;const u=g=>{g.key==="Escape"&&t(),g.key==="Enter"&&(g.ctrlKey||g.metaKey)&&i.trim()&&s({name:i.trim(),color:a})};return window.addEventListener("keydown",u),()=>window.removeEventListener("keydown",u)},[e,t,s,i,a]),e?r.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",children:[r.jsx("div",{className:"absolute inset-0 bg-black/50",onClick:t}),r.jsxs("div",{className:"relative bg-white dark:bg-zinc-800 rounded-lg shadow-xl w-full max-w-sm mx-4 border border-zinc-200 dark:border-zinc-600",children:[r.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-zinc-200 dark:border-zinc-700",children:[r.jsx("h2",{className:"text-sm font-semibold text-zinc-900 dark:text-zinc-100",children:o}),r.jsx("button",{type:"button",onClick:t,className:"p-1 rounded hover:bg-zinc-100 dark:hover:bg-zinc-700 transition-colors",children:r.jsx(ie,{size:16,className:"text-zinc-500"})})]}),r.jsxs("div",{className:"px-4 py-4 space-y-4",children:[r.jsxs("div",{children:[r.jsx("label",{className:"block text-xs font-medium text-zinc-600 dark:text-zinc-400 mb-1",children:"Name"}),r.jsx("input",{ref:c,type:"text",value:i,onChange:u=>l(u.target.value),placeholder:"List name...",className:"w-full px-3 py-1.5 text-sm bg-white dark:bg-zinc-700 border border-zinc-200 dark:border-zinc-600 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 text-zinc-900 dark:text-zinc-100 placeholder-zinc-400"})]}),r.jsxs("div",{children:[r.jsx("label",{className:"block text-xs font-medium text-zinc-600 dark:text-zinc-400 mb-1",children:"Color"}),r.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[Vo.map(u=>r.jsx("button",{type:"button",onClick:()=>p(u),className:`w-6 h-6 rounded-full border-2 transition-all ${a===u?"border-zinc-900 dark:border-white scale-110":"border-transparent hover:scale-110"}`,style:{backgroundColor:u},title:u},u)),r.jsx("input",{type:"color",value:a,onChange:u=>p(u.target.value),className:"w-6 h-6 rounded cursor-pointer border-0 p-0 bg-transparent",title:"Custom color"})]})]})]}),r.jsxs("div",{className:"flex items-center justify-end gap-2 px-4 py-3 border-t border-zinc-200 dark:border-zinc-700",children:[r.jsx("button",{type:"button",onClick:t,className:"px-3 py-1.5 text-sm rounded-md text-zinc-600 dark:text-zinc-400 hover:bg-zinc-100 dark:hover:bg-zinc-700 transition-colors",children:"Cancel"}),r.jsx("button",{type:"button",onClick:()=>{i.trim()&&s({name:i.trim(),color:a})},disabled:!i.trim(),className:"px-3 py-1.5 text-sm rounded-md bg-blue-600 text-white hover:bg-blue-700 disabled:opacity-50 disabled:cursor-not-allowed transition-colors",children:"Save"})]})]})]}):null}const P=acquireVsCodeApi();function Yo(){const{columns:e,workspace:t,cardSettings:s,settingsOpen:n,setFeatures:o,setColumns:i,setBoards:l,setCurrentBoard:a,setIsDarkMode:p,setWorkspace:c,setCardSettings:u,setSettingsOpen:g,setLabelDefs:h}=_(),[d,x]=f.useState(!1),[m,v]=f.useState("backlog"),[k,z]=f.useState(!1),[E,y]=f.useState(null),D=f.useRef(0),[N,B]=f.useState(null),[I,b]=f.useState([]),w=f.useRef(I);f.useEffect(()=>{w.current=I},[I]);const S=f.useRef(0),C=f.useCallback(j=>{const{features:T}=_.getState(),A=T.find(R=>R.id===j);if(!A)return;const Z=A.status;o(T.map(R=>R.id===j?{...R,status:It}:R)),(N==null?void 0:N.id)===j&&B(null);const ke=String(S.current++);b(R=>[...R,{id:ke,feature:A,originalStatus:Z}])},[N,o]),$=f.useCallback(j=>{const T=w.current.find(A=>A.id===j);T&&(P.postMessage({type:"deleteFeature",featureId:T.feature.id}),b(A=>A.filter(Z=>Z.id!==j)))},[]),G=f.useCallback(j=>{const T=w.current.find(Z=>Z.id===j);if(!T)return;const{features:A}=_.getState();o(A.map(Z=>Z.id===T.feature.id?{...Z,status:T.originalStatus}:Z)),b(Z=>Z.filter(ke=>ke.id!==j))},[o]),W=f.useCallback(()=>{const j=w.current;j.length!==0&&G(j[j.length-1].id)},[G]);f.useEffect(()=>{let j=!1,T=null;const A=R=>{if(R.key==="Alt"){j=!0,T&&clearTimeout(T),T=setTimeout(()=>{j=!1},1e3);return}if(R.altKey&&(j=!1,T&&(clearTimeout(T),T=null)),R.key==="z"&&(R.ctrlKey||R.metaKey)&&!R.shiftKey&&w.current.length>0){R.preventDefault(),W();return}if((R.key==="="||R.key==="+"||R.key==="-")&&(R.ctrlKey||R.metaKey)){R.preventDefault();const ye=R.key==="-"?-5:5,{cardSettings:pe}=_.getState();if(R.shiftKey){const we=Math.max(75,Math.min(150,pe.cardZoom+ye));if(we!==pe.cardZoom){const je={...pe,cardZoom:we};u(je),P.postMessage({type:"saveSettings",settings:je})}}else{const we=Math.max(75,Math.min(150,pe.boardZoom+ye));if(we!==pe.boardZoom){const je={...pe,boardZoom:we};u(je),P.postMessage({type:"saveSettings",settings:je})}}return}if(!(R.target instanceof HTMLInputElement||R.target instanceof HTMLTextAreaElement||R.target instanceof HTMLSelectElement||R.target instanceof HTMLElement&&R.target.isContentEditable))switch(R.key){case"n":if(R.ctrlKey||R.metaKey||R.altKey||R.shiftKey)return;R.preventDefault(),v("backlog"),x(!0);break;case"Escape":d&&x(!1);break}},Z=R=>{R.key==="Alt"&&j&&(j=!1,T&&(clearTimeout(T),T=null),P.postMessage({type:"focusMenuBar"}))},ke=()=>{j=!1};return window.addEventListener("keydown",A),window.addEventListener("keyup",Z),window.addEventListener("mousedown",ke),()=>{window.removeEventListener("keydown",A),window.removeEventListener("keyup",Z),window.removeEventListener("mousedown",ke),T&&clearTimeout(T)}},[d,W,u]),f.useEffect(()=>{const j=()=>{const A=document.body.classList.contains("vscode-dark")||document.body.classList.contains("vscode-high-contrast");p(A),A?document.documentElement.classList.add("dark"):document.documentElement.classList.remove("dark")};j();const T=new MutationObserver(j);return T.observe(document.body,{attributes:!0,attributeFilter:["class"]}),()=>T.disconnect()},[p]),f.useEffect(()=>{const j=document.documentElement;j.style.setProperty("--board-zoom",String(s.boardZoom/100)),j.style.setProperty("--card-zoom",String(s.cardZoom/100))},[s.boardZoom,s.cardZoom]),f.useEffect(()=>{const j=T=>{const A=T.data;if(!(!A||typeof A.type!="string"))switch(A.type){case"init":o(A.features),i(A.columns),A.boards&&l(A.boards),A.currentBoard&&a(A.currentBoard),A.workspace&&c(A.workspace),A.settings&&(A.settings.markdownEditorMode&&N&&B(null),u(A.settings)),A.labels&&h(A.labels);break;case"featuresUpdated":o(A.features);break;case"triggerCreateDialog":v("backlog"),x(!0);break;case"labelsUpdated":h(A.labels);break;case"showSettings":u(A.settings),g(!0);break;case"featureContent":{const{cardSettings:Z}=_.getState();if(Z.markdownEditorMode)break;D.current+=1,B({id:A.featureId,content:A.content,frontmatter:A.frontmatter,comments:A.comments||[],contentVersion:D.current});break}}};return window.addEventListener("message",j),P.postMessage({type:"ready"}),()=>window.removeEventListener("message",j)},[o,i,l,a,c,u,g,h]);const Q=j=>{P.postMessage({type:"openFeature",featureId:j.id})},U=(j,T)=>{N&&P.postMessage({type:"saveFeatureContent",featureId:N.id,content:j,frontmatter:T})},L=(j,T)=>{N&&(P.postMessage({type:"transferCard",featureId:N.id,toBoard:j,targetStatus:T}),B(null))},H=()=>{B(null),P.postMessage({type:"closeFeature"})},ne=()=>{N&&C(N.id)},X=()=>{N&&(P.postMessage({type:"permanentDeleteFeature",featureId:N.id}),B(null))},be=()=>{N&&(P.postMessage({type:"restoreFeature",featureId:N.id}),B(null))},Ge=()=>{P.postMessage({type:"purgeDeletedCards"})},ve=()=>{N&&P.postMessage({type:"openFile",featureId:N.id})},We=(j,T)=>{P.postMessage({type:"startWithAI",agent:j,permissionMode:T})},Le=()=>{N&&P.postMessage({type:"addAttachment",featureId:N.id})},Re=j=>{N&&P.postMessage({type:"openAttachment",featureId:N.id,attachment:j})},ct=j=>{N&&P.postMessage({type:"removeAttachment",featureId:N.id,attachment:j})},dt=(j,T)=>{N&&P.postMessage({type:"addComment",featureId:N.id,author:j,content:T})},Ve=(j,T)=>{N&&P.postMessage({type:"updateComment",featureId:N.id,commentId:j,content:T})},M=j=>{N&&P.postMessage({type:"deleteComment",featureId:N.id,commentId:j})},re=j=>{P.postMessage({type:"saveSettings",settings:j})},te=()=>{y(null),z(!0)},se=j=>{const T=e.find(A=>A.id===j);T&&(y(T),z(!0))},ue=j=>{!e.find(Z=>Z.id===j)||_.getState().features.filter(Z=>Z.status===j).length>0||P.postMessage({type:"removeColumn",columnId:j})},Fe=j=>{!e.find(Z=>Z.id===j)||_.getState().features.filter(Z=>Z.status===j).length===0||P.postMessage({type:"cleanupColumn",columnId:j})},Wr=j=>{E?P.postMessage({type:"editColumn",columnId:E.id,updates:j}):P.postMessage({type:"addColumn",column:j}),z(!1),y(null)},Vr=j=>{v(j),x(!0)},Qr=j=>{P.postMessage({type:"createFeature",data:j})},Yr=f.useCallback(j=>{if(!N)return;const T=`action-${Date.now()}`;P.postMessage({type:"triggerAction",featureId:N.id,action:j,callbackKey:T})},[N]),Jr=(j,T,A)=>{const{features:Z}=_.getState();if(Z.find(R=>R.id===j)){const R=Z.filter(ce=>ce.status===T&&ce.id!==j).sort((ce,Ot)=>ce.order<Ot.order?-1:ce.order>Ot.order?1:0),ye=Math.max(0,Math.min(A,R.length)),pe=ye>0?R[ye-1].order:null,we=ye<R.length?R[ye].order:null,je=Ss(pe,we),Xr=Z.map(ce=>ce.id===j?{...ce,status:T,order:je}:ce);o(Xr)}P.postMessage({type:"moveFeature",featureId:j,newStatus:T,newOrder:A})};return e.length===0?r.jsx("div",{className:"h-full w-full flex items-center justify-center bg-[var(--vscode-editor-background)]",children:r.jsx("div",{className:"text-[var(--vscode-foreground)] opacity-60",children:"Loading..."})}):r.jsxs("div",{className:"h-full w-full flex flex-col bg-[var(--vscode-editor-background)]",children:[r.jsx(_o,{onOpenSettings:()=>P.postMessage({type:"openSettings"}),onAddColumn:te,onToggleTheme:()=>P.postMessage({type:"toggleTheme"}),onSwitchBoard:j=>P.postMessage({type:"switchBoard",boardId:j}),onCreateBoard:j=>P.postMessage({type:"createBoard",name:j})}),r.jsxs("div",{className:"flex-1 flex overflow-hidden",children:[r.jsx("div",{className:`board-zoom-scope ${N?"w-1/2":"w-full"}`,children:r.jsx(uo,{onFeatureClick:Q,onAddFeature:Vr,onMoveFeature:Jr,onEditColumn:se,onRemoveColumn:ue,onCleanupColumn:Fe,onPurgeDeletedCards:Ge,selectedFeatureId:N==null?void 0:N.id})}),N&&r.jsx("div",{className:"w-1/2",style:{fontSize:"calc(1em * var(--card-zoom, 1))"},children:r.jsx(Io,{featureId:N.id,content:N.content,frontmatter:N.frontmatter,comments:N.comments,contentVersion:N.contentVersion,onSave:U,onClose:H,onDelete:ne,onPermanentDelete:X,onRestore:be,onOpenFile:ve,onStartWithAI:We,onAddAttachment:Le,onOpenAttachment:Re,onRemoveAttachment:ct,onAddComment:dt,onUpdateComment:Ve,onDeleteComment:M,onTransferToBoard:L,onTriggerAction:Yr})})]}),r.jsx(zo,{isOpen:d,onClose:()=>x(!1),onCreate:Qr,initialStatus:m}),r.jsx(Uo,{isOpen:n,settings:s,workspace:t,onClose:()=>g(!1),onSave:re,onSetLabel:(j,T)=>P.postMessage({type:"setLabel",name:j,definition:T}),onRenameLabel:(j,T)=>P.postMessage({type:"renameLabel",oldName:j,newName:T}),onDeleteLabel:j=>P.postMessage({type:"deleteLabel",name:j})}),r.jsx(Qo,{isOpen:k,onClose:()=>{z(!1),y(null)},onSave:Wr,initial:E?{name:E.name,color:E.color}:void 0,title:E?"Edit List":"Add List"}),I.map((j,T)=>r.jsx(Ko,{message:`Deleted "${Br(j.feature.content)}"`,onUndo:()=>G(j.id),onExpire:()=>$(j.id),duration:5e3,index:T},j.id))]})}yr(document.getElementById("root")).render(r.jsx(f.StrictMode,{children:r.jsx(Yo,{})}));
85
+ ${b}`:""}`:b;s({status:a,priority:c,content:S,assignee:g.trim()||null,dueDate:d||null,labels:m,actions:k})},B=()=>{N(),t()},I=()=>{t()};return f.useEffect(()=>{const b=w=>{w.key==="Escape"&&I(),(w.metaKey||w.ctrlKey)&&w.key==="Enter"&&B(),(w.metaKey||w.ctrlKey)&&w.key==="s"&&(w.preventDefault(),B())};if(e)return document.addEventListener("keydown",b),()=>document.removeEventListener("keydown",b)}),r.jsxs("div",{className:"fixed inset-0 z-50 flex justify-end",children:[r.jsx("div",{className:"absolute inset-0 bg-black/30",onClick:I}),r.jsxs("div",{className:"relative h-full w-1/2 shadow-xl flex flex-col animate-in slide-in-from-right duration-200",style:{background:"var(--vscode-editor-background)",borderLeft:"1px solid var(--vscode-panel-border)"},children:[r.jsxs("div",{className:"flex items-center justify-between px-4 py-3",style:{borderBottom:"1px solid var(--vscode-panel-border)"},children:[r.jsx("div",{className:"flex items-center gap-3",children:r.jsx("h2",{className:"font-medium",style:{color:"var(--vscode-foreground)"},children:"Create Feature"})}),r.jsx("button",{onClick:I,className:"p-1.5 rounded transition-colors",style:{color:"var(--vscode-descriptionForeground)"},onMouseEnter:b=>b.currentTarget.style.background="var(--vscode-list-hoverBackground)",onMouseLeave:b=>b.currentTarget.style.background="transparent",children:r.jsx(ie,{size:18})})]}),r.jsxs("div",{className:"flex flex-col py-0.5",style:{borderBottom:"1px solid var(--vscode-panel-border)"},children:[r.jsx(Me,{label:"Status",icon:r.jsx(xt,{size:13}),children:r.jsx(or,{value:a,options:yo.map(b=>({value:b.value,label:b.label,dot:b.dot})),onChange:b=>p(b)})}),o.showPriorityBadges&&r.jsx(Me,{label:"Priority",icon:r.jsx(br,{size:13}),children:r.jsx(or,{value:c,options:ko.map(b=>({value:b.value,label:b.label,dot:b.dot})),onChange:b=>u(b)})}),o.showAssignee&&r.jsx(Me,{label:"Assignee",icon:r.jsx(vr,{size:13}),children:r.jsx(wo,{value:g,onChange:h})}),o.showDueDate&&r.jsx(Me,{label:"Due date",icon:r.jsx(Nt,{size:13}),children:r.jsx(xo,{value:d,onChange:x})}),o.showLabels&&r.jsx(Me,{label:"Labels",icon:r.jsx(St,{size:13}),children:r.jsx(jo,{labels:m,onChange:v})}),r.jsx(Me,{label:"Actions",icon:r.jsx(cs,{size:13}),children:r.jsx(zo,{actions:k,onChange:z})})]}),r.jsxs("div",{className:"flex-1 overflow-auto p-4",children:[r.jsx("textarea",{ref:D,value:i,onChange:b=>l(b.target.value),placeholder:"Feature title...",className:"w-full text-lg font-medium bg-transparent border-none outline-none resize-none mb-4",style:{color:"var(--vscode-foreground)"},rows:1,onInput:b=>{const w=b.target;w.style.height="auto",w.style.height=w.scrollHeight+"px"},onKeyDown:b=>{b.key==="Enter"&&!b.shiftKey&&b.preventDefault()}}),r.jsx(Gr,{value:E,onChange:y,placeholder:"Add a description..."})]}),r.jsxs("div",{className:"flex items-center justify-between px-4 py-3",style:{borderTop:"1px solid var(--vscode-panel-border)",background:"var(--vscode-sideBar-background, var(--vscode-editor-background))"},children:[r.jsxs("p",{className:"text-xs",style:{color:"var(--vscode-descriptionForeground)"},children:[r.jsx("kbd",{className:"px-1.5 py-0.5 rounded text-[10px] font-mono",style:{background:"var(--vscode-keybindingLabel-background, var(--vscode-badge-background))",color:"var(--vscode-keybindingLabel-foreground, var(--vscode-foreground))",border:"1px solid var(--vscode-keybindingLabel-border, var(--vscode-panel-border))"},children:"Esc"})," ","cancel ·"," ",r.jsx("kbd",{className:"px-1.5 py-0.5 rounded text-[10px] font-mono",style:{background:"var(--vscode-keybindingLabel-background, var(--vscode-badge-background))",color:"var(--vscode-keybindingLabel-foreground, var(--vscode-foreground))",border:"1px solid var(--vscode-keybindingLabel-border, var(--vscode-panel-border))"},children:"⌘S"})," ","save"]}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("button",{type:"button",onClick:I,className:"px-3 py-1.5 text-xs font-medium rounded transition-colors",style:{color:"var(--vscode-foreground)",background:"transparent",border:"1px solid var(--vscode-panel-border)"},onMouseEnter:b=>b.currentTarget.style.background="var(--vscode-list-hoverBackground)",onMouseLeave:b=>b.currentTarget.style.background="transparent",children:"Cancel"}),r.jsx("button",{type:"button",onClick:B,className:"px-3 py-1.5 text-xs font-medium rounded transition-colors",style:{color:"var(--vscode-button-foreground)",background:"var(--vscode-button-background)"},onMouseEnter:b=>b.currentTarget.style.background="var(--vscode-button-hoverBackground)",onMouseLeave:b=>b.currentTarget.style.background="var(--vscode-button-background)",children:"Save"})]})]})]})]})}function ar({value:e}){const[t,s]=f.useState(!1),n=()=>{navigator.clipboard.writeText(e).then(()=>{s(!0),setTimeout(()=>s(!1),1500)})};return r.jsxs("span",{className:"group/val inline-flex items-center gap-1 cursor-pointer",onClick:n,title:"Click to copy",children:[r.jsx("span",{className:"text-zinc-700 dark:text-zinc-300",children:e}),r.jsx("span",{className:"opacity-0 group-hover/val:opacity-100 transition-opacity",children:t?r.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"11",height:"11",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",className:"text-green-500",children:r.jsx("polyline",{points:"20 6 9 17 4 12"})}):r.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"11",height:"11",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"text-zinc-400 hover:text-zinc-600 dark:hover:text-zinc-200",children:[r.jsx("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"}),r.jsx("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"})]})})]})}const So={critical:"Critical",high:"High",medium:"Medium",low:"Low"},Do=["critical","high","medium","low"],Mo={critical:"bg-red-500",high:"bg-orange-500",medium:"bg-yellow-500",low:"bg-green-500"},To=[{agent:"claude",label:"Claude",color:"hover:bg-amber-100 dark:hover:bg-amber-900/30",activeColor:"bg-amber-700 text-white"},{agent:"codex",label:"Codex",color:"hover:bg-emerald-100 dark:hover:bg-emerald-900/30",activeColor:"bg-emerald-500 text-white"},{agent:"opencode",label:"OpenCode",color:"hover:bg-slate-100 dark:hover:bg-slate-700/30",activeColor:"bg-slate-500 text-white"}],Eo={claude:{bg:"bg-amber-700",hover:"hover:bg-amber-800",shadow:"shadow-sm",border:"border border-amber-800/50"},codex:{bg:"bg-emerald-600",hover:"hover:bg-emerald-700",shadow:"shadow-sm",border:"border border-emerald-700/50"},opencode:{bg:"bg-slate-600",hover:"hover:bg-slate-700",shadow:"shadow-sm",border:"border border-slate-700/50"}},$o={claude:[{permissionMode:"default",label:"Default",description:"With confirmations"},{permissionMode:"plan",label:"Plan",description:"Creates a plan first"},{permissionMode:"acceptEdits",label:"Auto-edit",description:"Auto-accepts file edits"},{permissionMode:"bypassPermissions",label:"Full Auto",description:"Bypasses all prompts"}],codex:[{permissionMode:"default",label:"Suggest",description:"Suggests changes"},{permissionMode:"acceptEdits",label:"Auto-edit",description:"Auto-accepts edits"},{permissionMode:"bypassPermissions",label:"Full Auto",description:"Full automation"}],opencode:[{permissionMode:"default",label:"Default",description:"Standard mode"}]};function Ao({value:e,options:t,onChange:s,className:n}){const[o,i]=f.useState(!1),l=t.find(a=>a.value===e);return r.jsxs("div",{className:J("relative",n),children:[r.jsxs("button",{onClick:()=>i(!o),className:"flex items-center gap-2 px-2 py-1 text-xs font-medium rounded transition-colors vscode-hover-bg",style:{color:"var(--vscode-foreground)"},children:[(l==null?void 0:l.dot)&&r.jsx("span",{className:J("w-2 h-2 rounded-full shrink-0",l.dot)}),r.jsx("span",{children:l==null?void 0:l.label}),r.jsx(me,{size:12,style:{color:"var(--vscode-descriptionForeground)"},className:"ml-0.5"})]}),o&&r.jsxs(r.Fragment,{children:[r.jsx("div",{className:"fixed inset-0 z-10",onClick:()=>i(!1)}),r.jsx("div",{className:"absolute top-full left-0 mt-1 z-20 rounded-lg shadow-lg py-1 min-w-[140px]",style:{background:"var(--vscode-dropdown-background)",border:"1px solid var(--vscode-dropdown-border, var(--vscode-panel-border))"},children:t.map(a=>r.jsxs("button",{onClick:()=>{s(a.value),i(!1)},className:"w-full flex items-center gap-2 px-3 py-1.5 text-xs transition-colors",style:{color:"var(--vscode-dropdown-foreground)",background:a.value===e?"var(--vscode-list-activeSelectionBackground)":void 0},onMouseEnter:p=>{a.value!==e&&(p.currentTarget.style.background="var(--vscode-list-hoverBackground)")},onMouseLeave:p=>{a.value!==e&&(p.currentTarget.style.background="transparent")},children:[a.dot&&r.jsx("span",{className:J("w-2 h-2 rounded-full shrink-0",a.dot)}),r.jsx("span",{className:"flex-1 text-left",children:a.label}),a.value===e&&r.jsx(fe,{size:12,style:{color:"var(--vscode-focusBorder)"},className:"shrink-0"})]},a.value))})]})]})}function Lo({value:e,onChange:t,onTransferToBoard:s}){const[n,o]=f.useState(!1),i=_(c=>c.columns),l=_(c=>c.boards),a=_(c=>c.currentBoard),p=l.filter(c=>c.id!==a);return r.jsxs("div",{className:"relative",children:[r.jsxs("button",{onClick:()=>o(!n),className:"flex items-center gap-2 px-2 py-1 text-xs font-medium rounded transition-colors vscode-hover-bg",style:{color:"var(--vscode-foreground)"},children:[(()=>{const c=i.find(u=>u.id===e);return c?r.jsxs(r.Fragment,{children:[r.jsx("span",{className:"w-2 h-2 rounded-full shrink-0",style:{backgroundColor:c.color}}),r.jsx("span",{children:c.name})]}):r.jsx("span",{children:e})})(),r.jsx(me,{size:12,style:{color:"var(--vscode-descriptionForeground)"},className:"ml-0.5"})]}),n&&r.jsxs(r.Fragment,{children:[r.jsx("div",{className:"fixed inset-0 z-10",onClick:()=>o(!1)}),r.jsxs("div",{className:"absolute top-full left-0 mt-1 z-20 rounded-lg shadow-lg py-1 min-w-[180px] max-h-[320px] overflow-y-auto",style:{background:"var(--vscode-dropdown-background)",border:"1px solid var(--vscode-dropdown-border, var(--vscode-panel-border))"},children:[i.map(c=>r.jsxs("button",{onClick:()=>{t(c.id),o(!1)},className:"w-full flex items-center gap-2 px-3 py-1.5 text-xs transition-colors",style:{color:"var(--vscode-dropdown-foreground)",background:c.id===e?"var(--vscode-list-activeSelectionBackground)":void 0},onMouseEnter:u=>{c.id!==e&&(u.currentTarget.style.background="var(--vscode-list-hoverBackground)")},onMouseLeave:u=>{c.id!==e&&(u.currentTarget.style.background="transparent")},children:[r.jsx("span",{className:"w-2 h-2 rounded-full shrink-0",style:{backgroundColor:c.color}}),r.jsx("span",{className:"flex-1 text-left",children:c.name}),c.id===e&&r.jsx(fe,{size:12,style:{color:"var(--vscode-focusBorder)"},className:"shrink-0"})]},c.id)),p.length>0&&r.jsxs(r.Fragment,{children:[r.jsx("div",{className:"mx-2 my-1",style:{borderTop:"1px solid var(--vscode-panel-border)"}}),r.jsx("div",{className:"px-3 py-1 text-[10px] font-medium uppercase tracking-wider",style:{color:"var(--vscode-descriptionForeground)"},children:"Move to..."}),p.map(c=>r.jsxs("div",{children:[r.jsx("div",{className:"px-3 py-1 text-[10px] font-semibold",style:{color:"var(--vscode-descriptionForeground)"},children:c.name}),(c.columns||[]).map(u=>r.jsxs("button",{onClick:()=>{s(c.id,u.id),o(!1)},className:"w-full flex items-center gap-2 pl-5 pr-3 py-1.5 text-xs transition-colors",style:{color:"var(--vscode-dropdown-foreground)"},onMouseEnter:g=>{g.currentTarget.style.background="var(--vscode-list-hoverBackground)"},onMouseLeave:g=>{g.currentTarget.style.background="transparent"},children:[r.jsx("span",{className:"w-2 h-2 rounded-full shrink-0",style:{backgroundColor:u.color}}),r.jsx("span",{className:"flex-1 text-left",children:u.name})]},`${c.id}-${u.id}`))]},c.id))]})]})]})]})}function xe({label:e,icon:t,children:s}){return r.jsxs("div",{className:"flex items-center gap-3 px-4 py-[5px] transition-colors vscode-hover-bg",children:[r.jsxs("div",{className:"flex items-center gap-2 w-[90px] shrink-0",children:[r.jsx("span",{style:{color:"var(--vscode-descriptionForeground)"},children:t}),r.jsx("span",{className:"text-[11px]",style:{color:"var(--vscode-descriptionForeground)"},children:e})]}),r.jsx("div",{className:"flex-1 min-w-0",children:s})]})}function Ro({onSelect:e}){const[t,s]=f.useState(!1),[n,o]=f.useState("claude"),i=$o[n],l=Eo[n];return r.jsxs("div",{className:"relative",children:[r.jsxs("button",{onClick:()=>s(!t),className:J("flex items-center gap-1.5 px-2.5 py-1.5 text-xs font-medium text-white rounded-md transition-colors",l.bg,l.hover,l.shadow,l.border),children:[r.jsx(ds,{size:13}),r.jsx("span",{children:"Build with AI"}),r.jsx("kbd",{className:"ml-0.5 text-[9px] opacity-60 font-mono",children:"⌘B"}),r.jsx(me,{size:11,className:J("ml-0.5 opacity-60 transition-transform",t&&"rotate-180")})]}),t&&r.jsxs(r.Fragment,{children:[r.jsx("div",{className:"fixed inset-0 z-10",onClick:()=>s(!1)}),r.jsxs("div",{className:"absolute top-full right-0 mt-1 z-20 bg-white dark:bg-zinc-800 border border-zinc-200 dark:border-zinc-700 rounded-lg shadow-xl min-w-[260px] overflow-hidden",children:[r.jsx("div",{className:"flex",children:To.map(a=>r.jsx("button",{onClick:()=>o(a.agent),className:J("flex-1 px-3 py-2.5 text-xs font-medium transition-all",n===a.agent?a.activeColor:J("text-zinc-600 dark:text-zinc-400",a.color)),children:a.label},a.agent))}),r.jsx("div",{className:"p-2 space-y-1",children:i.map(a=>r.jsxs("button",{onClick:()=>{e(n,a.permissionMode),s(!1)},className:"w-full text-left px-3 py-2.5 rounded-md hover:bg-zinc-100 dark:hover:bg-zinc-700/50 transition-colors",children:[r.jsx("div",{className:"text-xs font-medium text-zinc-900 dark:text-zinc-100",children:a.label}),r.jsx("div",{className:"text-[10px] text-zinc-500 dark:text-zinc-400 mt-0.5",children:a.description})]},a.permissionMode))})]})]})]})}function Fo({actions:e,onTriggerAction:t}){const[s,n]=f.useState(!1);return r.jsxs("div",{className:"relative",children:[r.jsxs("button",{onClick:()=>n(!s),className:"flex items-center gap-1.5 px-2.5 py-1.5 text-xs font-medium rounded-md transition-colors vscode-hover-bg",style:{color:"var(--vscode-foreground)",border:"1px solid var(--vscode-widget-border, var(--vscode-contrastBorder, rgba(128,128,128,0.35)))"},children:[r.jsx("span",{children:"Run Action"}),r.jsx(me,{size:11,className:J("opacity-60 transition-transform",s&&"rotate-180")})]}),s&&r.jsxs(r.Fragment,{children:[r.jsx("button",{type:"button","aria-label":"Close actions menu",className:"fixed inset-0 z-10 cursor-default",onClick:()=>n(!1)}),r.jsx("div",{className:"absolute top-full right-0 mt-1 z-20 rounded-lg shadow-lg py-1 min-w-[160px]",style:{background:"var(--vscode-dropdown-background)",border:"1px solid var(--vscode-dropdown-border, var(--vscode-panel-border))"},children:e.map(o=>r.jsx("button",{type:"button",onClick:()=>{n(!1),t(o)},className:"w-full flex items-center gap-2 px-3 py-1.5 text-xs transition-colors",style:{color:"var(--vscode-dropdown-foreground)"},onMouseEnter:i=>{i.currentTarget.style.background="var(--vscode-list-hoverBackground)"},onMouseLeave:i=>{i.currentTarget.style.background="transparent"},children:o},o))})]})]})}function Bo({metadata:e}){const[t,s]=f.useState(!1);if(!e||Object.keys(e).length===0)return null;const n=Object.keys(e);return r.jsxs("div",{className:"mt-3",children:[r.jsxs("button",{onClick:()=>s(!t),className:"flex items-center gap-1.5 text-xs font-medium text-zinc-500 dark:text-zinc-400 hover:text-zinc-700 dark:hover:text-zinc-300",children:[r.jsx("span",{className:"text-[10px]",children:t?"▼":"▶"}),r.jsx("span",{children:"Metadata"}),r.jsxs("span",{className:"text-zinc-400 dark:text-zinc-500",children:["(",n.length,")"]})]}),!t&&r.jsx("div",{className:"flex flex-wrap gap-1 mt-1.5",children:n.map(o=>r.jsx("button",{onClick:()=>s(!0),className:"text-xs px-1.5 py-0.5 rounded bg-zinc-100 text-zinc-600 dark:bg-zinc-700 dark:text-zinc-300 font-mono hover:bg-zinc-200 dark:hover:bg-zinc-600 cursor-pointer",children:o},o))}),t&&r.jsx("div",{className:"mt-1.5 text-xs font-mono bg-zinc-50 dark:bg-zinc-900 rounded p-2 border border-zinc-200 dark:border-zinc-700",children:r.jsx(Wr,{data:e,depth:0})})]})}function Wr({data:e,depth:t}){return r.jsx("div",{style:{paddingLeft:t>0?12:0},children:Object.entries(e).map(([s,n])=>r.jsx("div",{className:"py-0.5",children:n&&typeof n=="object"&&!Array.isArray(n)?r.jsxs(r.Fragment,{children:[r.jsxs("span",{className:"text-zinc-500 dark:text-zinc-400",children:[s,":"]}),r.jsx(Wr,{data:n,depth:t+1})]}):Array.isArray(n)?r.jsxs("div",{className:"flex items-baseline gap-1",children:[r.jsxs("span",{className:"text-zinc-500 dark:text-zinc-400",children:[s,": "]}),r.jsx(ar,{value:`[${n.join(", ")}]`})]}):r.jsxs("div",{className:"flex items-baseline gap-1",children:[r.jsxs("span",{className:"text-zinc-500 dark:text-zinc-400",children:[s,": "]}),r.jsx(ar,{value:String(n)})]})},s))})}function Io({labels:e,onChange:t}){const[s,n]=f.useState(""),[o,i]=f.useState(!1),l=f.useRef(null),a=_(x=>x.features),p=_(x=>x.labelDefs),c=f.useMemo(()=>{const x=new Set;return a.forEach(m=>m.labels.forEach(v=>x.add(v))),Array.from(x).sort()},[a]),u=f.useMemo(()=>{const x=c.filter(m=>!e.includes(m));return s.trim()?x.filter(m=>m.toLowerCase().includes(s.toLowerCase())):x},[s,c,e]),g=o&&u.length>0,h=x=>{const m=(x||s).trim();m&&!e.includes(m)&&t([...e,m]),n("")},d=x=>{t(e.filter(m=>m!==x))};return r.jsxs("div",{className:"relative flex items-center gap-1.5 flex-wrap",children:[e.map(x=>{const m=p[x];return r.jsxs("span",{className:"inline-flex items-center gap-1 px-1.5 py-0.5 text-[10px] font-medium rounded",style:m?{backgroundColor:`${m.color}20`,color:m.color}:{background:"var(--vscode-badge-background)",color:"var(--vscode-badge-foreground)"},children:[x,r.jsx("button",{type:"button",onClick:()=>d(x),className:"hover:text-red-500 transition-colors",children:r.jsx(ie,{size:9})})]},x)}),r.jsx("button",{onClick:()=>{i(!0),setTimeout(()=>{var x;return(x=l.current)==null?void 0:x.focus()},0)},className:"inline-flex items-center gap-0.5 px-1 py-0.5 text-[10px] rounded transition-colors vscode-hover-bg",style:{color:"var(--vscode-descriptionForeground)"},children:r.jsx($e,{size:10})}),r.jsx("input",{ref:l,type:"text",value:s,onChange:x=>n(x.target.value),onFocus:()=>i(!0),onBlur:()=>setTimeout(()=>i(!1),150),onKeyDown:x=>{var m;x.key==="Enter"&&(x.preventDefault(),h()),x.key==="Backspace"&&!s&&e.length>0&&t(e.slice(0,-1)),x.key==="Escape"&&(n(""),(m=l.current)==null||m.blur())},placeholder:e.length===0?"Add labels...":"",className:"flex-1 min-w-[60px] bg-transparent border-none outline-none text-xs",style:{color:"var(--vscode-foreground)",display:o||s?"block":"none"}}),g&&r.jsx("div",{className:"absolute top-full left-0 mt-1 z-20 rounded-lg shadow-lg py-1 max-h-[160px] overflow-auto min-w-[180px]",style:{background:"var(--vscode-dropdown-background)",border:"1px solid var(--vscode-dropdown-border, var(--vscode-panel-border))"},children:u.map(x=>{const m=p[x];return r.jsx("button",{type:"button",onMouseDown:v=>{v.preventDefault(),h(x)},className:"w-full flex items-center gap-2 px-3 py-1.5 text-xs transition-colors",style:{color:"var(--vscode-dropdown-foreground)"},onMouseEnter:v=>v.currentTarget.style.background="var(--vscode-list-hoverBackground)",onMouseLeave:v=>v.currentTarget.style.background="transparent",children:r.jsx("span",{className:"inline-block px-1.5 py-0.5 text-[10px] font-medium rounded",style:m?{backgroundColor:`${m.color}20`,color:m.color}:{background:"var(--vscode-badge-background)",color:"var(--vscode-badge-foreground)"},children:x})},x)})})]})}function Po({featureId:e,content:t,frontmatter:s,comments:n,contentVersion:o,onSave:i,onClose:l,onDelete:a,onPermanentDelete:p,onRestore:c,onOpenFile:u,onStartWithAI:g,onAddAttachment:h,onOpenAttachment:d,onRemoveAttachment:x,onAddComment:m,onUpdateComment:v,onDeleteComment:k,onTransferToBoard:z,onTriggerAction:E}){const{cardSettings:y}=_(),[D,N]=f.useState(s),[B,I]=f.useState(t),[b,w]=f.useState(!1),S=D.status===It,C=f.useRef(null),$=f.useRef(D),G=f.useRef(B);$.current=D,G.current=B;const W=f.useCallback(()=>{i(G.current,$.current)},[i]);f.useEffect(()=>()=>{C.current&&clearTimeout(C.current)},[]),f.useEffect(()=>{I(t)},[e,o]),f.useEffect(()=>{N(s)},[s]);const Q=f.useCallback(L=>{I(L),C.current&&clearTimeout(C.current),C.current=setTimeout(()=>{i(L,$.current)},800)},[i]),U=f.useCallback(L=>{N(H=>{const ne={...H,...L};return C.current&&clearTimeout(C.current),C.current=setTimeout(()=>{i(G.current,ne)},800),ne})},[i]);return f.useEffect(()=>{const L=H=>{(H.metaKey||H.ctrlKey)&&H.key==="s"&&(H.preventDefault(),C.current&&clearTimeout(C.current),W()),(H.metaKey||H.ctrlKey)&&H.key==="b"&&y.showBuildWithAI&&(H.preventDefault(),g("claude","default")),H.key==="Escape"&&(C.current&&(clearTimeout(C.current),W()),l())};return window.addEventListener("keydown",L),()=>window.removeEventListener("keydown",L)},[W,l,g,y.showBuildWithAI]),r.jsxs("div",{className:"h-full flex flex-col",style:{background:"var(--vscode-editor-background)",borderLeft:"1px solid var(--vscode-panel-border)"},children:[r.jsxs("div",{className:"flex items-center justify-between px-4 py-3",style:{borderBottom:"1px solid var(--vscode-panel-border)"},children:[r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsx("span",{className:"text-xs font-mono",style:{color:"var(--vscode-descriptionForeground)"},children:e}),S?b?r.jsxs("div",{className:"flex items-center gap-1.5",children:[r.jsx("span",{className:"text-xs",style:{color:"var(--vscode-errorForeground)"},children:"Permanently delete from disk?"}),r.jsx("button",{onClick:()=>{w(!1),p()},className:"px-2 py-1 text-xs font-medium rounded transition-colors text-white bg-red-600 hover:bg-red-700",children:"Yes"}),r.jsx("button",{onClick:()=>w(!1),className:"px-2 py-1 text-xs font-medium rounded transition-colors vscode-hover-bg",style:{color:"var(--vscode-foreground)"},children:"No"})]}):r.jsxs(r.Fragment,{children:[r.jsxs("button",{onClick:c,className:"p-1.5 px-2 rounded border transition-colors vscode-hover-bg flex items-center gap-1",style:{color:"var(--vscode-descriptionForeground)",borderColor:"var(--vscode-widget-border, var(--vscode-contrastBorder, rgba(128,128,128,0.35)))"},title:"Restore card",children:[r.jsx(xt,{size:16}),r.jsx("span",{className:"text-xs",children:"RESTORE"})]}),r.jsxs("button",{onClick:()=>w(!0),className:"p-1.5 px-2 rounded border transition-colors vscode-hover-bg flex items-center gap-1",style:{color:"var(--vscode-errorForeground)",borderColor:"var(--vscode-widget-border, var(--vscode-contrastBorder, rgba(128,128,128,0.35)))"},title:"Permanently delete from disk",children:[r.jsx(Ce,{size:16}),r.jsx("span",{className:"text-xs",children:"PERMANENT DELETE"})]})]}):r.jsxs(r.Fragment,{children:[r.jsxs("button",{onClick:()=>{u(),l()},className:"p-1.5 px-2 rounded border transition-colors vscode-hover-bg flex items-center gap-1",style:{color:"var(--vscode-descriptionForeground)",borderColor:"var(--vscode-widget-border, var(--vscode-contrastBorder, rgba(128,128,128,0.35)))"},title:"Open .md file",children:[r.jsx(dr,{size:16}),r.jsx("span",{className:"text-xs",children:"OPEN"})]}),r.jsxs("button",{onClick:a,className:"p-1.5 px-2 rounded border transition-colors vscode-hover-bg flex items-center gap-1",style:{color:"var(--vscode-descriptionForeground)",borderColor:"var(--vscode-widget-border, var(--vscode-contrastBorder, rgba(128,128,128,0.35)))"},title:"Move to deleted",children:[r.jsx(Ce,{size:16}),r.jsx("span",{className:"text-xs",children:"DELETE"})]})]})]}),r.jsxs("div",{className:"flex items-center gap-2",children:[D.actions&&D.actions.length>0&&E&&r.jsx(Fo,{actions:D.actions,onTriggerAction:E}),y.showBuildWithAI&&r.jsx(Ro,{onSelect:g}),r.jsx("button",{onClick:l,className:"p-1.5 rounded transition-colors vscode-hover-bg",style:{color:"var(--vscode-descriptionForeground)"},children:r.jsx(ie,{size:18})})]})]}),r.jsxs("div",{className:"flex flex-col py-0.5",style:{borderBottom:"1px solid var(--vscode-panel-border)"},children:[r.jsx(xe,{label:"Status",icon:r.jsx(xt,{size:13}),children:r.jsx(Lo,{value:D.status,onChange:L=>U({status:L}),onTransferToBoard:z})}),y.showPriorityBadges&&r.jsx(xe,{label:"Priority",icon:r.jsx(br,{size:13}),children:r.jsx(Ao,{value:D.priority,options:Do.map(L=>({value:L,label:So[L],dot:Mo[L]})),onChange:L=>U({priority:L})})}),y.showAssignee&&r.jsx(xe,{label:"Assignee",icon:r.jsx(vr,{size:13}),children:r.jsxs("div",{className:"flex items-center gap-2",children:[D.assignee&&r.jsx("span",{className:"shrink-0 w-4 h-4 rounded-full flex items-center justify-center text-[8px] font-bold",style:{background:"var(--vscode-badge-background)",color:"var(--vscode-badge-foreground)"},children:D.assignee.split(/\s+/).filter(Boolean).map(L=>L[0]).join("").toUpperCase().slice(0,2)}),r.jsx("input",{type:"text",value:D.assignee||"",onChange:L=>U({assignee:L.target.value||null}),placeholder:"No assignee",className:"bg-transparent border-none outline-none text-xs w-32",style:{color:D.assignee?"var(--vscode-foreground)":"var(--vscode-descriptionForeground)"}})]})}),y.showDueDate&&r.jsx(xe,{label:"Due date",icon:r.jsx(Nt,{size:13}),children:r.jsx("input",{type:"date",value:D.dueDate||"",onChange:L=>U({dueDate:L.target.value||null}),className:"bg-transparent border-none outline-none text-xs",style:{color:D.dueDate?"var(--vscode-foreground)":"var(--vscode-descriptionForeground)"}})}),y.showLabels&&r.jsx(xe,{label:"Labels",icon:r.jsx(St,{size:13}),children:r.jsx(Io,{labels:D.labels,onChange:L=>U({labels:L})})}),r.jsx(xe,{label:"Attachments",icon:r.jsx(ht,{size:13}),children:r.jsxs("div",{className:"flex items-center gap-1.5 flex-wrap",children:[D.attachments.map(L=>r.jsxs("span",{className:"inline-flex items-center gap-1 px-1.5 py-0.5 text-[10px] font-medium rounded",style:{background:"var(--vscode-badge-background)",color:"var(--vscode-badge-foreground)"},children:[r.jsxs("button",{type:"button",onClick:()=>d(L),className:"inline-flex items-center gap-1 hover:underline",title:L,children:[r.jsx(ht,{size:9}),L]}),r.jsx("button",{type:"button",onClick:()=>x(L),className:"hover:text-red-500 transition-colors",children:r.jsx(ie,{size:9})})]},L)),r.jsx("button",{type:"button",onClick:h,className:"inline-flex items-center gap-0.5 px-1 py-0.5 text-[10px] rounded transition-colors vscode-hover-bg",style:{color:"var(--vscode-descriptionForeground)"},children:r.jsx($e,{size:10})})]})}),r.jsx(xe,{label:"Created",icon:r.jsx(gt,{size:13}),children:r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("span",{className:"text-xs",style:{color:"var(--vscode-foreground)"},children:nt(D.created)}),r.jsx("span",{className:"text-[10px]",style:{color:"var(--vscode-descriptionForeground)"},title:ot(D.created),children:zt(D.created)})]})}),r.jsx(xe,{label:"Modified",icon:r.jsx(gt,{size:13}),children:r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("span",{className:"text-xs",style:{color:"var(--vscode-foreground)"},children:nt(D.modified)}),r.jsx("span",{className:"text-[10px]",style:{color:"var(--vscode-descriptionForeground)"},title:ot(D.modified),children:zt(D.modified)})]})}),r.jsx("div",{className:"px-4 pb-2",children:r.jsx(Bo,{metadata:D.metadata})})]}),r.jsx(Gr,{value:B,onChange:Q,placeholder:"Start writing...",className:"flex-1 min-h-0",mode:"edit",comments:n,onAddComment:m,onUpdateComment:v,onDeleteComment:k})]})}const Oo=[{value:"all",label:"All Priorities"},{value:"critical",label:"Critical"},{value:"high",label:"High"},{value:"medium",label:"Medium"},{value:"low",label:"Low"}],_o=[{value:"all",label:"All Dates"},{value:"overdue",label:"Overdue"},{value:"today",label:"Due Today"},{value:"this-week",label:"Due This Week"},{value:"no-date",label:"No Due Date"}],pt="text-sm bg-white dark:bg-zinc-800 border border-zinc-200 dark:border-zinc-600 rounded-md px-2 py-1.5 focus:outline-none focus:ring-2 focus:ring-blue-500 text-zinc-900 dark:text-zinc-100";function Ko({onOpenSettings:e,onAddColumn:t,onToggleTheme:s,onSwitchBoard:n,onCreateBoard:o}){var Ve;const{searchQuery:i,setSearchQuery:l,priorityFilter:a,setPriorityFilter:p,assigneeFilter:c,setAssigneeFilter:u,labelFilter:g,setLabelFilter:h,dueDateFilter:d,setDueDateFilter:x,clearAllFilters:m,getUniqueAssignees:v,getUniqueLabels:k,hasActiveFilters:z,layout:E,toggleLayout:y,isDarkMode:D,cardSettings:N,boards:B,currentBoard:I}=_(),b=_(M=>M.labelDefs),w=v(),S=k(),C=z(),$=f.useMemo(()=>{const M={};return S.forEach(re=>{const te=b[re],se=(te==null?void 0:te.group)||"Other";M[se]||(M[se]=[]),M[se].push(re)}),M},[S,b]),[G,W]=f.useState(!1),[Q,U]=f.useState(!1),[L,H]=f.useState(""),ne=f.useRef(null),X=f.useRef(null),[be,Ge]=f.useState(!1),[ve,We]=f.useState(""),Le=f.useRef(null),Re=f.useMemo(()=>{if(!ve)return $;const M=ve.toLowerCase(),re={};return Object.entries($).forEach(([te,se])=>{const ue=se.filter(Fe=>Fe.toLowerCase().includes(M));ue.length>0&&(re[te]=ue)}),re},[$,ve]);f.useEffect(()=>{const M=re=>{ne.current&&!ne.current.contains(re.target)&&(W(!1),U(!1),H(""))};return G&&document.addEventListener("mousedown",M),()=>document.removeEventListener("mousedown",M)},[G]),f.useEffect(()=>{const M=re=>{Le.current&&!Le.current.contains(re.target)&&(Ge(!1),We(""))};return be&&document.addEventListener("mousedown",M),()=>document.removeEventListener("mousedown",M)},[be]),f.useEffect(()=>{Q&&X.current&&X.current.focus()},[Q]);const ct=((Ve=B.find(M=>M.id===I))==null?void 0:Ve.name)||I,dt=()=>{const M=L.trim();M&&(o(M),H(""),U(!1),W(!1))};return r.jsxs("div",{className:"flex items-center gap-2 px-4 py-2 border-b border-zinc-200 dark:border-zinc-700 bg-zinc-50 dark:bg-zinc-900/50 flex-wrap",children:[r.jsxs("div",{className:"relative",ref:ne,children:[r.jsxs("button",{type:"button",onClick:()=>W(!G),className:"flex items-center gap-1.5 px-2 py-1.5 text-sm bg-white dark:bg-zinc-800 border border-zinc-200 dark:border-zinc-600 rounded-md hover:bg-zinc-50 dark:hover:bg-zinc-700 text-zinc-900 dark:text-zinc-100 transition-colors",children:[r.jsx("span",{className:"max-w-[120px] truncate",children:ct}),r.jsx(me,{size:14,className:`text-zinc-400 transition-transform ${G?"rotate-180":""}`})]}),G&&r.jsxs("div",{className:"absolute top-full left-0 mt-1 min-w-[180px] bg-white dark:bg-zinc-800 border border-zinc-200 dark:border-zinc-600 rounded-md shadow-lg z-50 py-1",children:[B.map(M=>r.jsxs("button",{type:"button",onClick:()=>{n(M.id),W(!1)},className:"w-full flex items-center gap-2 px-3 py-1.5 text-sm text-left hover:bg-zinc-100 dark:hover:bg-zinc-700 text-zinc-900 dark:text-zinc-100 transition-colors",children:[r.jsx(fe,{size:14,className:M.id===I?"text-blue-500":"invisible"}),r.jsx("span",{className:"truncate",children:M.name})]},M.id)),r.jsx("div",{className:"border-t border-zinc-200 dark:border-zinc-600 my-1"}),Q?r.jsx("div",{className:"px-3 py-1.5",children:r.jsx("input",{ref:X,type:"text",value:L,onChange:M=>H(M.target.value),onKeyDown:M=>{M.key==="Enter"&&dt(),M.key==="Escape"&&(U(!1),H(""))},placeholder:"Board name...",className:"w-full px-2 py-1 text-sm bg-zinc-50 dark:bg-zinc-900 border border-zinc-300 dark:border-zinc-500 rounded focus:outline-none focus:ring-2 focus:ring-blue-500 text-zinc-900 dark:text-zinc-100 placeholder-zinc-400"})}):r.jsxs("button",{type:"button",onClick:()=>U(!0),className:"w-full flex items-center gap-2 px-3 py-1.5 text-sm text-left hover:bg-zinc-100 dark:hover:bg-zinc-700 text-blue-600 dark:text-blue-400 transition-colors",children:[r.jsx($e,{size:14}),r.jsx("span",{children:"New Board"})]})]})]}),r.jsxs("div",{className:"relative flex-1 min-w-[180px] max-w-xs",children:[r.jsx(us,{size:14,className:"absolute left-2.5 top-1/2 -translate-y-1/2 text-zinc-400"}),r.jsx("input",{type:"text",value:i,onChange:M=>l(M.target.value),placeholder:"Search... (meta.field: value)",className:"w-full pl-8 pr-3 py-1.5 text-sm bg-white dark:bg-zinc-800 border border-zinc-200 dark:border-zinc-600 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 text-zinc-900 dark:text-zinc-100 placeholder-zinc-400"})]}),N.showPriorityBadges&&r.jsx("select",{value:a,onChange:M=>p(M.target.value),className:pt,children:Oo.map(M=>r.jsx("option",{value:M.value,children:M.label},M.value))}),N.showAssignee&&r.jsxs("select",{value:c,onChange:M=>u(M.target.value),className:pt,children:[r.jsx("option",{value:"all",children:"All Assignees"}),r.jsx("option",{value:"unassigned",children:"Unassigned"}),w.map(M=>r.jsx("option",{value:M,children:M},M))]}),N.showLabels&&r.jsxs("div",{className:"relative",ref:Le,children:[r.jsxs("button",{type:"button",onClick:()=>Ge(!be),className:`flex items-center gap-1.5 text-sm bg-white dark:bg-zinc-800 border rounded-md px-2 py-1.5 focus:outline-none focus:ring-2 focus:ring-blue-500 text-zinc-900 dark:text-zinc-100 transition-colors ${g.length>0?"border-blue-500 dark:border-blue-400":"border-zinc-200 dark:border-zinc-600"}`,children:[r.jsx(St,{size:14,className:"text-zinc-400 shrink-0"}),r.jsx("span",{className:"max-w-[100px] truncate",children:g.length===0?"All Labels":g.length===1?g[0]:`${g.length} Labels`}),r.jsx(me,{size:14,className:`text-zinc-400 transition-transform ${be?"rotate-180":""}`})]}),be&&r.jsxs("div",{className:"absolute top-full left-0 mt-1 min-w-[200px] max-h-72 overflow-y-auto bg-white dark:bg-zinc-800 border border-zinc-200 dark:border-zinc-600 rounded-md shadow-lg z-50 py-1",children:[r.jsx("div",{className:"px-2 pb-1",children:r.jsx("input",{type:"text",value:ve,onChange:M=>We(M.target.value),placeholder:"Filter labels...",autoFocus:!0,className:"w-full px-2 py-1 text-sm bg-zinc-50 dark:bg-zinc-900 border border-zinc-300 dark:border-zinc-500 rounded focus:outline-none focus:ring-2 focus:ring-blue-500 text-zinc-900 dark:text-zinc-100 placeholder-zinc-400"})}),!ve&&r.jsxs("button",{type:"button",onClick:()=>h([]),className:`w-full flex items-center gap-2 px-3 py-1.5 text-sm text-left hover:bg-zinc-100 dark:hover:bg-zinc-700 transition-colors ${g.length===0?"text-blue-600 dark:text-blue-400 font-medium":"text-zinc-900 dark:text-zinc-100"}`,children:[r.jsx("div",{className:`w-3.5 h-3.5 rounded border flex items-center justify-center shrink-0 ${g.length===0?"border-blue-500 bg-blue-500":"border-zinc-300 dark:border-zinc-500"}`,children:g.length===0&&r.jsx(fe,{size:10,className:"text-white"})}),r.jsx("span",{children:"All Labels"})]}),Object.entries(Re).map(([M,re])=>r.jsxs("div",{children:[Object.keys(Re).length>1&&r.jsx("div",{className:"px-3 pt-1.5 pb-0.5 text-xs font-semibold text-zinc-400 dark:text-zinc-500 uppercase tracking-wide",children:M}),re.map(te=>{const se=b[te],ue=g.includes(te);return r.jsxs("button",{type:"button",onClick:()=>{h(ue?g.filter(Fe=>Fe!==te):[...g,te])},className:"w-full flex items-center gap-2 px-3 py-1.5 text-sm text-left hover:bg-zinc-100 dark:hover:bg-zinc-700 text-zinc-900 dark:text-zinc-100 transition-colors",children:[r.jsx("div",{className:`w-3.5 h-3.5 rounded border flex items-center justify-center shrink-0 ${ue?"border-blue-500 bg-blue-500":"border-zinc-300 dark:border-zinc-500"}`,children:ue&&r.jsx(fe,{size:10,className:"text-white"})}),(se==null?void 0:se.color)&&r.jsx("span",{className:"w-2.5 h-2.5 rounded-full shrink-0",style:{backgroundColor:se.color}}),r.jsx("span",{className:"truncate",children:te})]},te)})]},M)),Object.keys(Re).length===0&&r.jsx("div",{className:"px-3 py-2 text-sm text-zinc-400 dark:text-zinc-500",children:"No labels found"})]})]}),N.showDueDate&&r.jsx("select",{value:d,onChange:M=>x(M.target.value),className:pt,children:_o.map(M=>r.jsx("option",{value:M.value,children:M.label},M.value))}),C&&r.jsxs("button",{onClick:m,className:"flex items-center gap-1 px-2 py-1.5 text-sm text-zinc-500 hover:text-zinc-700 dark:text-zinc-400 dark:hover:text-zinc-200 hover:bg-zinc-100 dark:hover:bg-zinc-800 rounded-md transition-colors",title:"Clear all filters",children:[r.jsx(ie,{size:14}),r.jsx("span",{children:"Clear"})]}),r.jsxs("button",{onClick:t,className:"flex items-center gap-1 px-2 py-1.5 text-sm text-zinc-500 hover:text-zinc-700 dark:text-zinc-400 dark:hover:text-zinc-200 hover:bg-zinc-100 dark:hover:bg-zinc-800 rounded-md transition-colors",title:"Add new list",children:[r.jsx($e,{size:16}),r.jsx("span",{children:"Add List"})]}),r.jsx("button",{onClick:y,className:"flex items-center gap-1 px-2 py-1.5 text-sm text-zinc-500 hover:text-zinc-700 dark:text-zinc-400 dark:hover:text-zinc-200 hover:bg-zinc-100 dark:hover:bg-zinc-800 rounded-md transition-colors",title:E==="horizontal"?"Switch to vertical layout":"Switch to horizontal layout",children:E==="horizontal"?r.jsx(ps,{size:16}):r.jsx(hs,{size:16})}),r.jsx("button",{onClick:s,className:"flex items-center gap-1 px-2 py-1.5 text-sm text-zinc-500 hover:text-zinc-700 dark:text-zinc-400 dark:hover:text-zinc-200 hover:bg-zinc-100 dark:hover:bg-zinc-800 rounded-md transition-colors",title:D?"Switch to light theme":"Switch to dark theme",children:D?r.jsx(gs,{size:16}):r.jsx(xs,{size:16})}),r.jsx("button",{onClick:e,className:"flex items-center gap-1 px-2 py-1.5 text-sm text-zinc-500 hover:text-zinc-700 dark:text-zinc-400 dark:hover:text-zinc-200 hover:bg-zinc-100 dark:hover:bg-zinc-800 rounded-md transition-colors",title:"Open settings",children:r.jsx(fs,{size:16})}),r.jsxs("div",{className:"ml-auto text-xs text-zinc-400",children:["Press ",r.jsx("kbd",{className:"px-1.5 py-0.5 bg-zinc-200 dark:bg-zinc-700 rounded",children:"n"})," to add"]})]})}function Zo({message:e,onUndo:t,onExpire:s,duration:n,index:o}){const[i,l]=f.useState(100);return f.useEffect(()=>{const p=50/n*100,c=setInterval(()=>{l(u=>{const g=u-p;return g<=0?(clearInterval(c),0):g})},50);return()=>clearInterval(c)},[n]),f.useEffect(()=>{i<=0&&s()},[i,s]),r.jsxs("div",{className:"fixed right-4 z-50 flex flex-col min-w-[320px] max-w-[420px] shadow-[0_4px_16px_rgba(0,0,0,0.4)] transition-[bottom] duration-200 ease-out",style:{bottom:`${24+o*52}px`,background:"var(--vscode-notifications-background)",color:"var(--vscode-notifications-foreground)",border:"1px solid var(--vscode-notifications-border, var(--vscode-widget-border))"},children:[r.jsxs("div",{className:"flex items-center gap-3 px-3 py-2.5",children:[r.jsx("span",{className:"text-[13px] leading-snug flex-1 truncate",children:e}),r.jsx("button",{onClick:t,className:"text-[13px] px-2 py-0.5 shrink-0",style:{background:"var(--vscode-button-background)",color:"var(--vscode-button-foreground)"},onMouseEnter:a=>a.currentTarget.style.background="var(--vscode-button-hoverBackground)",onMouseLeave:a=>a.currentTarget.style.background="var(--vscode-button-background)",children:"Undo"})]}),r.jsx("div",{className:"h-[2px] w-full",style:{background:"var(--vscode-widget-border)"},children:r.jsx("div",{className:"h-full transition-none",style:{width:`${i}%`,background:"var(--vscode-progressBar-background)"}})})]})}const qo=[{value:"critical",label:"Critical",dot:"bg-red-500"},{value:"high",label:"High",dot:"bg-orange-500"},{value:"medium",label:"Medium",dot:"bg-yellow-500"},{value:"low",label:"Low",dot:"bg-green-500"}],Uo=[{value:"backlog",label:"Backlog",dot:"bg-zinc-400"},{value:"todo",label:"To Do",dot:"bg-blue-400"},{value:"in-progress",label:"In Progress",dot:"bg-amber-400"},{value:"review",label:"Review",dot:"bg-purple-400"},{value:"done",label:"Done",dot:"bg-emerald-400"}];function Ho({isOpen:e,settings:t,workspace:s,onClose:n,onSave:o,onSetLabel:i,onRenameLabel:l,onDeleteLabel:a}){return e?r.jsx(Vo,{settings:t,workspace:s,onClose:n,onSave:o,onSetLabel:i,onRenameLabel:l,onDeleteLabel:a}):null}function Go({checked:e,onChange:t}){return r.jsx("button",{type:"button",onClick:()=>t(!e),className:J("relative inline-flex h-5 w-9 items-center rounded-full transition-colors shrink-0"),style:{background:e?"var(--vscode-button-background)":"var(--vscode-badge-background, #6b7280)"},children:r.jsx("span",{className:"inline-block h-3.5 w-3.5 rounded-full bg-white transition-transform",style:{transform:e?"translateX(18px)":"translateX(3px)"}})})}function Ke({title:e,children:t}){return r.jsxs("div",{className:"py-3",children:[r.jsx("h3",{className:"px-4 pb-2 text-xs font-semibold uppercase tracking-wider",style:{color:"var(--vscode-descriptionForeground)"},children:e}),r.jsx("div",{children:t})]})}function ze({label:e,description:t,checked:s,onChange:n}){return r.jsxs("div",{className:"flex items-center justify-between gap-4 px-4 py-2 transition-colors cursor-pointer",onClick:()=>n(!s),onMouseEnter:o=>o.currentTarget.style.background="var(--vscode-list-hoverBackground)",onMouseLeave:o=>o.currentTarget.style.background="transparent",children:[r.jsxs("div",{className:"flex-1 min-w-0",children:[r.jsx("div",{className:"text-sm",style:{color:"var(--vscode-foreground)"},children:e}),t&&r.jsx("div",{className:"text-xs mt-0.5",style:{color:"var(--vscode-descriptionForeground)"},children:t})]}),r.jsx(Go,{checked:s,onChange:n})]})}function Je({label:e,value:t}){return r.jsxs("div",{className:"flex items-center justify-between gap-4 px-4 py-1.5",children:[r.jsx("div",{className:"text-sm",style:{color:"var(--vscode-descriptionForeground)"},children:e}),r.jsx("div",{className:"text-xs font-mono truncate max-w-[60%] text-right",style:{color:"var(--vscode-foreground)",opacity:.7},title:t,children:t})]})}function lr({label:e,value:t,options:s,onChange:n}){const[o,i]=f.useState(!1),l=s.find(a=>a.value===t);return r.jsxs("div",{className:"flex items-center justify-between gap-4 px-4 py-2 transition-colors",onMouseEnter:a=>a.currentTarget.style.background="var(--vscode-list-hoverBackground)",onMouseLeave:a=>a.currentTarget.style.background="transparent",children:[r.jsx("div",{className:"text-sm",style:{color:"var(--vscode-foreground)"},children:e}),r.jsxs("div",{className:"relative",children:[r.jsxs("button",{type:"button",onClick:()=>i(!o),className:"flex items-center gap-2 px-2 py-1 text-xs font-medium rounded transition-colors",style:{color:"var(--vscode-foreground)"},children:[(l==null?void 0:l.dot)&&r.jsx("span",{className:J("w-2 h-2 rounded-full shrink-0",l.dot)}),r.jsx("span",{children:l==null?void 0:l.label}),r.jsx(me,{size:12,style:{color:"var(--vscode-descriptionForeground)"}})]}),o&&r.jsxs(r.Fragment,{children:[r.jsx("div",{className:"fixed inset-0 z-10",onClick:()=>i(!1)}),r.jsx("div",{className:"absolute top-full right-0 mt-1 z-20 rounded-lg shadow-lg py-1 min-w-[140px]",style:{background:"var(--vscode-dropdown-background)",border:"1px solid var(--vscode-dropdown-border, var(--vscode-panel-border))"},children:s.map(a=>r.jsxs("button",{type:"button",onClick:()=>{n(a.value),i(!1)},className:"w-full flex items-center gap-2 px-3 py-1.5 text-xs transition-colors",style:{color:"var(--vscode-dropdown-foreground)",background:a.value===t?"var(--vscode-list-activeSelectionBackground)":void 0},onMouseEnter:p=>{a.value!==t&&(p.currentTarget.style.background="var(--vscode-list-hoverBackground)")},onMouseLeave:p=>{a.value!==t&&(p.currentTarget.style.background="transparent")},children:[a.dot&&r.jsx("span",{className:J("w-2 h-2 rounded-full shrink-0",a.dot)}),r.jsx("span",{className:"flex-1 text-left",children:a.label})]},a.value))})]})]})]})}function ir({label:e,description:t,value:s,min:n,max:o,step:i,unit:l,onChange:a}){const p=(s-n)/(o-n)*100;return r.jsxs("div",{className:"flex items-center justify-between gap-4 px-4 py-2 transition-colors",onMouseEnter:c=>c.currentTarget.style.background="var(--vscode-list-hoverBackground)",onMouseLeave:c=>c.currentTarget.style.background="transparent",children:[r.jsxs("div",{className:"flex-1 min-w-0",children:[r.jsx("div",{className:"text-sm",style:{color:"var(--vscode-foreground)"},children:e}),t&&r.jsx("div",{className:"text-xs mt-0.5",style:{color:"var(--vscode-descriptionForeground)"},children:t})]}),r.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[r.jsx("input",{type:"range",min:n,max:o,step:i,value:s,onChange:c=>a(Number(c.target.value)),className:"settings-slider",style:{background:`linear-gradient(to right, var(--vscode-button-background) ${p}%, var(--vscode-badge-background, #6b7280) ${p}%)`}}),r.jsxs("span",{className:"text-xs font-mono w-12 text-right tabular-nums",style:{color:"var(--vscode-foreground)"},children:[s,l||"%"]})]})]})}function cr({value:e,onChange:t}){const[s,n]=f.useState(!1),[o,i]=f.useState("");return r.jsxs("div",{className:"relative",children:[r.jsx("button",{type:"button",onClick:()=>n(!s),className:"w-5 h-5 rounded-full border border-white/20 cursor-pointer shrink-0",style:{backgroundColor:e}}),s&&r.jsxs(r.Fragment,{children:[r.jsx("div",{className:"fixed inset-0 z-10",onClick:()=>n(!1)}),r.jsxs("div",{className:"absolute top-full left-0 mt-1 z-20 rounded-lg shadow-lg p-2 min-w-[180px]",style:{background:"var(--vscode-dropdown-background)",border:"1px solid var(--vscode-dropdown-border, var(--vscode-panel-border))"},children:[r.jsx("div",{className:"grid grid-cols-6 gap-1.5 mb-2",children:wt.map(l=>r.jsx("button",{type:"button",onClick:()=>{t(l.hex),n(!1)},className:"w-6 h-6 rounded-full border-2 transition-transform hover:scale-110",style:{backgroundColor:l.hex,borderColor:e===l.hex?"white":"transparent"},title:l.name},l.name))}),r.jsxs("div",{className:"flex gap-1",children:[r.jsx("input",{type:"text",placeholder:"#hex",value:o,onChange:l=>i(l.target.value),className:"flex-1 px-2 py-1 text-xs rounded",style:{background:"var(--vscode-input-background)",color:"var(--vscode-input-foreground)",border:"1px solid var(--vscode-input-border, transparent)"}}),r.jsx("button",{type:"button",onClick:()=>{/^#[0-9a-fA-F]{6}$/.test(o)&&(t(o),n(!1),i(""))},className:"px-2 py-1 text-xs rounded",style:{background:"var(--vscode-button-background)",color:"var(--vscode-button-foreground)"},children:"OK"})]})]})]})]})}function Wo({onSetLabel:e,onRenameLabel:t,onDeleteLabel:s}){const n=_(b=>b.labelDefs),o=_(b=>b.features),[i,l]=f.useState(""),[a,p]=f.useState(wt[0].hex),[c,u]=f.useState(""),[g,h]=f.useState(null),[d,x]=f.useState(""),[m,v]=f.useState(null),k=f.useMemo(()=>{const b=new Map;for(const[w,S]of Object.entries(n))b.set(w,S);for(const w of o)for(const S of w.labels)b.has(S)||b.set(S,void 0);return b},[n,o]),z=f.useMemo(()=>{const b={};return k.forEach((S,C)=>{const $=(S==null?void 0:S.group)||"Other";b[$]||(b[$]=[]),b[$].push({name:C,def:S})}),Object.entries(b).sort(([S],[C])=>S==="Other"?1:C==="Other"?-1:S.localeCompare(C))},[k]),E=f.useMemo(()=>{const b=new Set;return Object.values(n).forEach(w=>{w.group&&b.add(w.group)}),Array.from(b).sort()},[n]),y=b=>o.filter(w=>w.labels.includes(b)).length,D=()=>{const b=i.trim();b&&(e==null||e(b,{color:a,group:c||void 0}),l(""),p(wt[0].hex),u(""))},N=b=>{const w=d.trim();w&&w!==b&&(t==null||t(b,w)),h(null),x("")},B=b=>{s==null||s(b),v(null)},I={background:"var(--vscode-input-background)",color:"var(--vscode-input-foreground)",border:"1px solid var(--vscode-input-border, transparent)"};return r.jsxs("div",{className:"px-4 space-y-3",children:[z.map(([b,w])=>r.jsxs("div",{children:[r.jsx("div",{className:"text-[10px] font-semibold uppercase tracking-wider mb-1.5",style:{color:"var(--vscode-descriptionForeground)"},children:b}),r.jsx("div",{className:"space-y-1",children:w.map(({name:S,def:C})=>r.jsxs("div",{className:"flex items-center gap-2 px-2 py-1.5 rounded group/label transition-colors",onMouseEnter:$=>$.currentTarget.style.background="var(--vscode-list-hoverBackground)",onMouseLeave:$=>$.currentTarget.style.background="transparent",children:[r.jsx(cr,{value:(C==null?void 0:C.color)||"#6b7280",onChange:$=>e==null?void 0:e(S,{...C,color:$,group:C==null?void 0:C.group})}),g===S?r.jsx("input",{type:"text",value:d,onChange:$=>x($.target.value),onKeyDown:$=>{$.key==="Enter"&&N(S),$.key==="Escape"&&(h(null),x(""))},onBlur:()=>N(S),autoFocus:!0,className:"flex-1 px-1.5 py-0.5 text-xs rounded min-w-0",style:I}):r.jsx("span",{className:"flex-1 text-xs truncate",style:{color:"var(--vscode-foreground)"},children:S}),(C==null?void 0:C.group)&&g!==S&&r.jsx("span",{className:"text-[10px] px-1.5 py-0.5 rounded-full shrink-0",style:{background:"var(--vscode-badge-background)",color:"var(--vscode-badge-foreground)"},children:C.group}),m===S?r.jsxs("div",{className:"flex items-center gap-1 shrink-0",children:[r.jsxs("span",{className:"text-[10px]",style:{color:"var(--vscode-errorForeground, #f44)"},children:[y(S)," card",y(S)!==1?"s":""]}),r.jsx("button",{type:"button",onClick:()=>B(S),className:"px-1.5 py-0.5 text-[10px] rounded",style:{background:"var(--vscode-inputValidation-errorBackground, #5a1d1d)",color:"var(--vscode-errorForeground, #f44)"},children:"Delete"}),r.jsx("button",{type:"button",onClick:()=>v(null),className:"px-1.5 py-0.5 text-[10px] rounded",style:{color:"var(--vscode-descriptionForeground)"},children:"Cancel"})]}):r.jsxs("div",{className:"flex items-center gap-0.5 shrink-0 opacity-0 group-hover/label:opacity-100 transition-opacity",children:[r.jsx("button",{type:"button",onClick:()=>{h(S),x(S)},className:"p-1 rounded transition-colors",style:{color:"var(--vscode-descriptionForeground)"},onMouseEnter:$=>$.currentTarget.style.color="var(--vscode-foreground)",onMouseLeave:$=>$.currentTarget.style.color="var(--vscode-descriptionForeground)",title:"Rename label",children:r.jsx(Ct,{size:12})}),r.jsx("button",{type:"button",onClick:()=>v(S),className:"p-1 rounded transition-colors",style:{color:"var(--vscode-descriptionForeground)"},onMouseEnter:$=>$.currentTarget.style.color="var(--vscode-errorForeground, #f44)",onMouseLeave:$=>$.currentTarget.style.color="var(--vscode-descriptionForeground)",title:"Delete label",children:r.jsx(Ce,{size:12})})]})]},S))})]},b)),r.jsxs("div",{className:"rounded-lg p-2 space-y-2",style:{background:"var(--vscode-input-background)",border:"1px solid var(--vscode-input-border, transparent)"},children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(cr,{value:a,onChange:p}),r.jsx("input",{type:"text",placeholder:"New label name...",value:i,onChange:b=>l(b.target.value),onKeyDown:b=>{b.key==="Enter"&&D()},className:"flex-1 px-1.5 py-1 text-xs rounded bg-transparent min-w-0",style:{color:"var(--vscode-input-foreground)",outline:"none"}})]}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("input",{type:"text",placeholder:"Group (optional)",value:c,onChange:b=>u(b.target.value),onKeyDown:b=>{b.key==="Enter"&&D()},list:"label-groups",className:"flex-1 px-1.5 py-1 text-xs rounded",style:I}),r.jsx("datalist",{id:"label-groups",children:E.map(b=>r.jsx("option",{value:b},b))}),r.jsxs("button",{type:"button",onClick:D,disabled:!i.trim(),className:"flex items-center gap-1 px-2 py-1 text-xs rounded transition-colors disabled:opacity-40",style:{background:"var(--vscode-button-background)",color:"var(--vscode-button-foreground)"},children:[r.jsx($e,{size:12}),"Add"]})]})]})]})}function Vo({settings:e,workspace:t,onClose:s,onSave:n,onSetLabel:o,onRenameLabel:i,onDeleteLabel:l}){const[a,p]=f.useState(e),[c,u]=f.useState("general");f.useEffect(()=>{p(e)},[e]);const g=h=>{const d={...a,...h};p(d),n(d)};return f.useEffect(()=>{const h=d=>{d.key==="Escape"&&(d.stopPropagation(),s())};return document.addEventListener("keydown",h,!0),()=>document.removeEventListener("keydown",h,!0)},[s]),r.jsxs("div",{className:"fixed inset-0 z-50 flex justify-end",children:[r.jsx("div",{className:"absolute inset-0 bg-black/30",onClick:s}),r.jsxs("div",{className:"relative h-full w-1/2 max-w-lg shadow-xl flex flex-col animate-in slide-in-from-right duration-200",style:{background:"var(--vscode-editor-background)",borderLeft:"1px solid var(--vscode-panel-border)"},children:[r.jsxs("div",{className:"flex items-center justify-between px-4 py-3",style:{borderBottom:"1px solid var(--vscode-panel-border)"},children:[r.jsx("h2",{className:"font-medium",style:{color:"var(--vscode-foreground)"},children:"Settings"}),r.jsx("button",{onClick:s,className:"p-1.5 rounded transition-colors",style:{color:"var(--vscode-descriptionForeground)"},onMouseEnter:h=>h.currentTarget.style.background="var(--vscode-list-hoverBackground)",onMouseLeave:h=>h.currentTarget.style.background="transparent",children:r.jsx(ie,{size:18})})]}),r.jsx("div",{className:"flex",style:{borderBottom:"1px solid var(--vscode-panel-border)"},children:["general","defaults","labels"].map(h=>r.jsxs("button",{type:"button",onClick:()=>u(h),className:"px-4 py-2.5 text-xs font-medium transition-colors relative",style:{color:c===h?"var(--vscode-foreground)":"var(--vscode-descriptionForeground)",background:"transparent"},children:[h.charAt(0).toUpperCase()+h.slice(1),c===h&&r.jsx("span",{className:"absolute bottom-0 left-0 right-0 h-0.5",style:{background:"var(--vscode-button-background)"}})]},h))}),r.jsxs("div",{className:"flex-1 overflow-auto",children:[c==="general"&&r.jsxs(r.Fragment,{children:[t&&r.jsxs(r.Fragment,{children:[r.jsxs(Ke,{title:"Workspace",children:[r.jsx(Je,{label:"Project Path",value:t.projectPath}),r.jsx(Je,{label:"Features Directory",value:t.featuresDirectory}),r.jsx(Je,{label:"Server Port",value:String(t.port)}),r.jsx(Je,{label:"Config Version",value:String(t.configVersion)})]}),r.jsx("div",{style:{borderTop:"1px solid var(--vscode-panel-border)"}})]}),r.jsxs(Ke,{title:"Card Display",children:[r.jsx(ze,{label:"Show Priority Badges",description:"Display priority indicators on feature cards",checked:a.showPriorityBadges,onChange:h=>g({showPriorityBadges:h})}),r.jsx(ze,{label:"Show Assignee",description:"Display assigned person on feature cards",checked:a.showAssignee,onChange:h=>g({showAssignee:h})}),r.jsx(ze,{label:"Show Due Date",description:"Display due dates on feature cards",checked:a.showDueDate,onChange:h=>g({showDueDate:h})}),r.jsx(ze,{label:"Show Labels",description:"Display labels on feature cards and in editors",checked:a.showLabels,onChange:h=>g({showLabels:h})}),r.jsx(ze,{label:"Show Filename",description:"Display the source markdown filename on cards",checked:a.showFileName,onChange:h=>g({showFileName:h})}),r.jsx(ze,{label:"Compact Mode",description:"Use compact card layout to show more features",checked:a.compactMode,onChange:h=>g({compactMode:h})}),r.jsx(ze,{label:"Show Deleted Column",description:"Display the Deleted column to manage soft-deleted cards",checked:a.showDeletedColumn,onChange:h=>g({showDeletedColumn:h})})]}),r.jsx("div",{style:{borderTop:"1px solid var(--vscode-panel-border)"}}),r.jsxs(Ke,{title:"Zoom",children:[r.jsx(ir,{label:"Board Zoom",description:"Scale text size on the board view",value:a.boardZoom,min:75,max:150,step:5,onChange:h=>g({boardZoom:h})}),r.jsx(ir,{label:"Card Detail Zoom",description:"Scale text size in the card detail panel",value:a.cardZoom,min:75,max:150,step:5,onChange:h=>g({cardZoom:h})})]})]}),c==="defaults"&&r.jsxs(Ke,{title:"Defaults",children:[r.jsx(lr,{label:"Default Priority",value:a.defaultPriority,options:qo,onChange:h=>g({defaultPriority:h})}),r.jsx(lr,{label:"Default Status",value:a.defaultStatus,options:Uo,onChange:h=>g({defaultStatus:h})})]}),c==="labels"&&r.jsx(Ke,{title:"Labels",children:r.jsx(Wo,{onSetLabel:o,onRenameLabel:i,onDeleteLabel:l})})]}),r.jsx("div",{className:"px-4 py-2",style:{borderTop:"1px solid var(--vscode-panel-border)"},children:r.jsx("p",{className:"text-xs",style:{color:"var(--vscode-descriptionForeground)"},children:"Settings are saved automatically and apply to all connected clients."})})]})]})}const Qo=["#6b7280","#3b82f6","#f59e0b","#8b5cf6","#22c55e","#ef4444","#ec4899","#14b8a6","#f97316","#06b6d4"];function Yo({isOpen:e,onClose:t,onSave:s,initial:n,title:o}){const[i,l]=f.useState((n==null?void 0:n.name)??""),[a,p]=f.useState((n==null?void 0:n.color)??"#3b82f6"),c=f.useRef(null);return f.useEffect(()=>{e&&(l((n==null?void 0:n.name)??""),p((n==null?void 0:n.color)??"#3b82f6"),setTimeout(()=>{var u;return(u=c.current)==null?void 0:u.focus()},50))},[e,n]),f.useEffect(()=>{if(!e)return;const u=g=>{g.key==="Escape"&&t(),g.key==="Enter"&&(g.ctrlKey||g.metaKey)&&i.trim()&&s({name:i.trim(),color:a})};return window.addEventListener("keydown",u),()=>window.removeEventListener("keydown",u)},[e,t,s,i,a]),e?r.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",children:[r.jsx("div",{className:"absolute inset-0 bg-black/50",onClick:t}),r.jsxs("div",{className:"relative bg-white dark:bg-zinc-800 rounded-lg shadow-xl w-full max-w-sm mx-4 border border-zinc-200 dark:border-zinc-600",children:[r.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-zinc-200 dark:border-zinc-700",children:[r.jsx("h2",{className:"text-sm font-semibold text-zinc-900 dark:text-zinc-100",children:o}),r.jsx("button",{type:"button",onClick:t,className:"p-1 rounded hover:bg-zinc-100 dark:hover:bg-zinc-700 transition-colors",children:r.jsx(ie,{size:16,className:"text-zinc-500"})})]}),r.jsxs("div",{className:"px-4 py-4 space-y-4",children:[r.jsxs("div",{children:[r.jsx("label",{className:"block text-xs font-medium text-zinc-600 dark:text-zinc-400 mb-1",children:"Name"}),r.jsx("input",{ref:c,type:"text",value:i,onChange:u=>l(u.target.value),placeholder:"List name...",className:"w-full px-3 py-1.5 text-sm bg-white dark:bg-zinc-700 border border-zinc-200 dark:border-zinc-600 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 text-zinc-900 dark:text-zinc-100 placeholder-zinc-400"})]}),r.jsxs("div",{children:[r.jsx("label",{className:"block text-xs font-medium text-zinc-600 dark:text-zinc-400 mb-1",children:"Color"}),r.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[Qo.map(u=>r.jsx("button",{type:"button",onClick:()=>p(u),className:`w-6 h-6 rounded-full border-2 transition-all ${a===u?"border-zinc-900 dark:border-white scale-110":"border-transparent hover:scale-110"}`,style:{backgroundColor:u},title:u},u)),r.jsx("input",{type:"color",value:a,onChange:u=>p(u.target.value),className:"w-6 h-6 rounded cursor-pointer border-0 p-0 bg-transparent",title:"Custom color"})]})]})]}),r.jsxs("div",{className:"flex items-center justify-end gap-2 px-4 py-3 border-t border-zinc-200 dark:border-zinc-700",children:[r.jsx("button",{type:"button",onClick:t,className:"px-3 py-1.5 text-sm rounded-md text-zinc-600 dark:text-zinc-400 hover:bg-zinc-100 dark:hover:bg-zinc-700 transition-colors",children:"Cancel"}),r.jsx("button",{type:"button",onClick:()=>{i.trim()&&s({name:i.trim(),color:a})},disabled:!i.trim(),className:"px-3 py-1.5 text-sm rounded-md bg-blue-600 text-white hover:bg-blue-700 disabled:opacity-50 disabled:cursor-not-allowed transition-colors",children:"Save"})]})]})]}):null}const P=acquireVsCodeApi();function Jo(){const{columns:e,workspace:t,cardSettings:s,settingsOpen:n,setFeatures:o,setColumns:i,setBoards:l,setCurrentBoard:a,setIsDarkMode:p,setWorkspace:c,setCardSettings:u,setSettingsOpen:g,setLabelDefs:h}=_(),[d,x]=f.useState(!1),[m,v]=f.useState("backlog"),[k,z]=f.useState(!1),[E,y]=f.useState(null),D=f.useRef(0),[N,B]=f.useState(null),[I,b]=f.useState([]),w=f.useRef(I);f.useEffect(()=>{w.current=I},[I]);const S=f.useRef(0),C=f.useCallback(j=>{const{features:T}=_.getState(),A=T.find(R=>R.id===j);if(!A)return;const Z=A.status;o(T.map(R=>R.id===j?{...R,status:It}:R)),(N==null?void 0:N.id)===j&&B(null);const ke=String(S.current++);b(R=>[...R,{id:ke,feature:A,originalStatus:Z}])},[N,o]),$=f.useCallback(j=>{const T=w.current.find(A=>A.id===j);T&&(P.postMessage({type:"deleteFeature",featureId:T.feature.id}),b(A=>A.filter(Z=>Z.id!==j)))},[]),G=f.useCallback(j=>{const T=w.current.find(Z=>Z.id===j);if(!T)return;const{features:A}=_.getState();o(A.map(Z=>Z.id===T.feature.id?{...Z,status:T.originalStatus}:Z)),b(Z=>Z.filter(ke=>ke.id!==j))},[o]),W=f.useCallback(()=>{const j=w.current;j.length!==0&&G(j[j.length-1].id)},[G]);f.useEffect(()=>{let j=!1,T=null;const A=R=>{if(R.key==="Alt"){j=!0,T&&clearTimeout(T),T=setTimeout(()=>{j=!1},1e3);return}if(R.altKey&&(j=!1,T&&(clearTimeout(T),T=null)),R.key==="z"&&(R.ctrlKey||R.metaKey)&&!R.shiftKey&&w.current.length>0){R.preventDefault(),W();return}if((R.key==="="||R.key==="+"||R.key==="-")&&(R.ctrlKey||R.metaKey)){R.preventDefault();const ye=R.key==="-"?-5:5,{cardSettings:pe}=_.getState();if(R.shiftKey){const we=Math.max(75,Math.min(150,pe.cardZoom+ye));if(we!==pe.cardZoom){const je={...pe,cardZoom:we};u(je),P.postMessage({type:"saveSettings",settings:je})}}else{const we=Math.max(75,Math.min(150,pe.boardZoom+ye));if(we!==pe.boardZoom){const je={...pe,boardZoom:we};u(je),P.postMessage({type:"saveSettings",settings:je})}}return}if(!(R.target instanceof HTMLInputElement||R.target instanceof HTMLTextAreaElement||R.target instanceof HTMLSelectElement||R.target instanceof HTMLElement&&R.target.isContentEditable))switch(R.key){case"n":if(R.ctrlKey||R.metaKey||R.altKey||R.shiftKey)return;R.preventDefault(),v("backlog"),x(!0);break;case"Escape":d&&x(!1);break}},Z=R=>{R.key==="Alt"&&j&&(j=!1,T&&(clearTimeout(T),T=null),P.postMessage({type:"focusMenuBar"}))},ke=()=>{j=!1};return window.addEventListener("keydown",A),window.addEventListener("keyup",Z),window.addEventListener("mousedown",ke),()=>{window.removeEventListener("keydown",A),window.removeEventListener("keyup",Z),window.removeEventListener("mousedown",ke),T&&clearTimeout(T)}},[d,W,u]),f.useEffect(()=>{const j=()=>{const A=document.body.classList.contains("vscode-dark")||document.body.classList.contains("vscode-high-contrast");p(A),A?document.documentElement.classList.add("dark"):document.documentElement.classList.remove("dark")};j();const T=new MutationObserver(j);return T.observe(document.body,{attributes:!0,attributeFilter:["class"]}),()=>T.disconnect()},[p]),f.useEffect(()=>{const j=document.documentElement;j.style.setProperty("--board-zoom",String(s.boardZoom/100)),j.style.setProperty("--card-zoom",String(s.cardZoom/100))},[s.boardZoom,s.cardZoom]),f.useEffect(()=>{const j=T=>{const A=T.data;if(!(!A||typeof A.type!="string"))switch(A.type){case"init":o(A.features),i(A.columns),A.boards&&l(A.boards),A.currentBoard&&a(A.currentBoard),A.workspace&&c(A.workspace),A.settings&&(A.settings.markdownEditorMode&&N&&B(null),u(A.settings)),A.labels&&h(A.labels);break;case"featuresUpdated":o(A.features);break;case"triggerCreateDialog":v("backlog"),x(!0);break;case"labelsUpdated":h(A.labels);break;case"showSettings":u(A.settings),g(!0);break;case"featureContent":{const{cardSettings:Z}=_.getState();if(Z.markdownEditorMode)break;D.current+=1,B({id:A.featureId,content:A.content,frontmatter:A.frontmatter,comments:A.comments||[],contentVersion:D.current});break}}};return window.addEventListener("message",j),P.postMessage({type:"ready"}),()=>window.removeEventListener("message",j)},[o,i,l,a,c,u,g,h]);const Q=j=>{P.postMessage({type:"openFeature",featureId:j.id})},U=(j,T)=>{N&&P.postMessage({type:"saveFeatureContent",featureId:N.id,content:j,frontmatter:T})},L=(j,T)=>{N&&(P.postMessage({type:"transferCard",featureId:N.id,toBoard:j,targetStatus:T}),B(null))},H=()=>{B(null),P.postMessage({type:"closeFeature"})},ne=()=>{N&&C(N.id)},X=()=>{N&&(P.postMessage({type:"permanentDeleteFeature",featureId:N.id}),B(null))},be=()=>{N&&(P.postMessage({type:"restoreFeature",featureId:N.id}),B(null))},Ge=()=>{P.postMessage({type:"purgeDeletedCards"})},ve=()=>{N&&P.postMessage({type:"openFile",featureId:N.id})},We=(j,T)=>{P.postMessage({type:"startWithAI",agent:j,permissionMode:T})},Le=()=>{N&&P.postMessage({type:"addAttachment",featureId:N.id})},Re=j=>{N&&P.postMessage({type:"openAttachment",featureId:N.id,attachment:j})},ct=j=>{N&&P.postMessage({type:"removeAttachment",featureId:N.id,attachment:j})},dt=(j,T)=>{N&&P.postMessage({type:"addComment",featureId:N.id,author:j,content:T})},Ve=(j,T)=>{N&&P.postMessage({type:"updateComment",featureId:N.id,commentId:j,content:T})},M=j=>{N&&P.postMessage({type:"deleteComment",featureId:N.id,commentId:j})},re=j=>{P.postMessage({type:"saveSettings",settings:j})},te=()=>{y(null),z(!0)},se=j=>{const T=e.find(A=>A.id===j);T&&(y(T),z(!0))},ue=j=>{!e.find(Z=>Z.id===j)||_.getState().features.filter(Z=>Z.status===j).length>0||P.postMessage({type:"removeColumn",columnId:j})},Fe=j=>{!e.find(Z=>Z.id===j)||_.getState().features.filter(Z=>Z.status===j).length===0||P.postMessage({type:"cleanupColumn",columnId:j})},Vr=j=>{E?P.postMessage({type:"editColumn",columnId:E.id,updates:j}):P.postMessage({type:"addColumn",column:j}),z(!1),y(null)},Qr=j=>{v(j),x(!0)},Yr=j=>{P.postMessage({type:"createFeature",data:j})},Jr=f.useCallback(j=>{if(!N)return;const T=`action-${Date.now()}`;P.postMessage({type:"triggerAction",featureId:N.id,action:j,callbackKey:T})},[N]),Xr=(j,T,A)=>{const{features:Z}=_.getState();if(Z.find(R=>R.id===j)){const R=Z.filter(ce=>ce.status===T&&ce.id!==j).sort((ce,Ot)=>ce.order<Ot.order?-1:ce.order>Ot.order?1:0),ye=Math.max(0,Math.min(A,R.length)),pe=ye>0?R[ye-1].order:null,we=ye<R.length?R[ye].order:null,je=Ds(pe,we),es=Z.map(ce=>ce.id===j?{...ce,status:T,order:je}:ce);o(es)}P.postMessage({type:"moveFeature",featureId:j,newStatus:T,newOrder:A})};return e.length===0?r.jsx("div",{className:"h-full w-full flex items-center justify-center bg-[var(--vscode-editor-background)]",children:r.jsx("div",{className:"text-[var(--vscode-foreground)] opacity-60",children:"Loading..."})}):r.jsxs("div",{className:"h-full w-full flex flex-col bg-[var(--vscode-editor-background)]",children:[r.jsx(Ko,{onOpenSettings:()=>P.postMessage({type:"openSettings"}),onAddColumn:te,onToggleTheme:()=>P.postMessage({type:"toggleTheme"}),onSwitchBoard:j=>P.postMessage({type:"switchBoard",boardId:j}),onCreateBoard:j=>P.postMessage({type:"createBoard",name:j})}),r.jsxs("div",{className:"flex-1 flex overflow-hidden",children:[r.jsx("div",{className:`board-zoom-scope ${N?"w-1/2":"w-full"}`,children:r.jsx(po,{onFeatureClick:Q,onAddFeature:Qr,onMoveFeature:Xr,onEditColumn:se,onRemoveColumn:ue,onCleanupColumn:Fe,onPurgeDeletedCards:Ge,selectedFeatureId:N==null?void 0:N.id})}),N&&r.jsx("div",{className:"w-1/2",style:{fontSize:"calc(1em * var(--card-zoom, 1))"},children:r.jsx(Po,{featureId:N.id,content:N.content,frontmatter:N.frontmatter,comments:N.comments,contentVersion:N.contentVersion,onSave:U,onClose:H,onDelete:ne,onPermanentDelete:X,onRestore:be,onOpenFile:ve,onStartWithAI:We,onAddAttachment:Le,onOpenAttachment:Re,onRemoveAttachment:ct,onAddComment:dt,onUpdateComment:Ve,onDeleteComment:M,onTransferToBoard:L,onTriggerAction:Jr})})]}),r.jsx(No,{isOpen:d,onClose:()=>x(!1),onCreate:Yr,initialStatus:m}),r.jsx(Ho,{isOpen:n,settings:s,workspace:t,onClose:()=>g(!1),onSave:re,onSetLabel:(j,T)=>P.postMessage({type:"setLabel",name:j,definition:T}),onRenameLabel:(j,T)=>P.postMessage({type:"renameLabel",oldName:j,newName:T}),onDeleteLabel:j=>P.postMessage({type:"deleteLabel",name:j})}),r.jsx(Yo,{isOpen:k,onClose:()=>{z(!1),y(null)},onSave:Vr,initial:E?{name:E.name,color:E.color}:void 0,title:E?"Edit List":"Add List"}),I.map((j,T)=>r.jsx(Zo,{message:`Deleted "${Ir(j.feature.content)}"`,onUndo:()=>G(j.id),onExpire:()=>$(j.id),duration:5e3,index:T},j.id))]})}wr(document.getElementById("root")).render(r.jsx(f.StrictMode,{children:r.jsx(Jo,{})}));
86
86
  //# sourceMappingURL=index.js.map