@tickernelz/paperclip-pro-server 2026.1012.1 → 2026.1012.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (116) hide show
  1. package/dist/build-info.json +1 -1
  2. package/dist/routes/issues.d.ts.map +1 -1
  3. package/dist/routes/issues.js +85 -2
  4. package/dist/routes/issues.js.map +1 -1
  5. package/dist/routes/openapi.d.ts.map +1 -1
  6. package/dist/routes/openapi.js +21 -1
  7. package/dist/routes/openapi.js.map +1 -1
  8. package/dist/services/chat-channels.d.ts.map +1 -1
  9. package/dist/services/chat-channels.js +9 -1
  10. package/dist/services/chat-channels.js.map +1 -1
  11. package/dist/services/execution-continuation.d.ts +1 -0
  12. package/dist/services/execution-continuation.d.ts.map +1 -1
  13. package/dist/services/execution-continuation.js +10 -6
  14. package/dist/services/execution-continuation.js.map +1 -1
  15. package/dist/services/execution-recovery-resolution.js +2 -2
  16. package/dist/services/execution-recovery-resolution.js.map +1 -1
  17. package/dist/services/explicit-native-continuation.d.ts +9 -0
  18. package/dist/services/explicit-native-continuation.d.ts.map +1 -1
  19. package/dist/services/explicit-native-continuation.js +3 -2
  20. package/dist/services/explicit-native-continuation.js.map +1 -1
  21. package/dist/services/heartbeat/queue.d.ts.map +1 -1
  22. package/dist/services/heartbeat/queue.js +2 -0
  23. package/dist/services/heartbeat/queue.js.map +1 -1
  24. package/dist/services/heartbeat/run-completion.d.ts.map +1 -1
  25. package/dist/services/heartbeat/run-completion.js +29 -18
  26. package/dist/services/heartbeat/run-completion.js.map +1 -1
  27. package/dist/services/heartbeat/run-completion.test.js +12 -0
  28. package/dist/services/heartbeat/run-completion.test.js.map +1 -1
  29. package/dist/services/heartbeat/run-preparation.d.ts +2 -0
  30. package/dist/services/heartbeat/run-preparation.d.ts.map +1 -1
  31. package/dist/services/heartbeat/run-preparation.js.map +1 -1
  32. package/dist/services/legacy-controller-lease.d.ts +6 -0
  33. package/dist/services/legacy-controller-lease.d.ts.map +1 -1
  34. package/dist/services/legacy-controller-lease.js +66 -16
  35. package/dist/services/legacy-controller-lease.js.map +1 -1
  36. package/dist/services/legacy-controller-lease.test.js +50 -1
  37. package/dist/services/legacy-controller-lease.test.js.map +1 -1
  38. package/dist/services/openwa/guidance.js +1 -1
  39. package/dist/services/openwa/guidance.js.map +1 -1
  40. package/dist/services/openwa/steering.d.ts.map +1 -1
  41. package/dist/services/openwa/steering.js +2 -0
  42. package/dist/services/openwa/steering.js.map +1 -1
  43. package/dist/services/owner-decision-relay.d.ts +7 -0
  44. package/dist/services/owner-decision-relay.d.ts.map +1 -1
  45. package/dist/services/owner-decision-relay.js +52 -3
  46. package/dist/services/owner-decision-relay.js.map +1 -1
  47. package/node_modules/bare-url/README.md +4 -0
  48. package/node_modules/bare-url/index.d.ts +3 -0
  49. package/node_modules/bare-url/index.js +42 -18
  50. package/node_modules/bare-url/lib/errors.js +4 -0
  51. package/node_modules/bare-url/package.json +1 -1
  52. package/node_modules/bare-url/prebuilds/android-arm/bare-url.bare +0 -0
  53. package/node_modules/bare-url/prebuilds/android-arm64/bare-url.bare +0 -0
  54. package/node_modules/bare-url/prebuilds/android-ia32/bare-url.bare +0 -0
  55. package/node_modules/bare-url/prebuilds/android-x64/bare-url.bare +0 -0
  56. package/node_modules/bare-url/prebuilds/darwin-arm64/bare-url.bare +0 -0
  57. package/node_modules/bare-url/prebuilds/darwin-x64/bare-url.bare +0 -0
  58. package/node_modules/bare-url/prebuilds/ios-arm64/bare-url.bare +0 -0
  59. package/node_modules/bare-url/prebuilds/ios-arm64-simulator/bare-url.bare +0 -0
  60. package/node_modules/bare-url/prebuilds/ios-x64-simulator/bare-url.bare +0 -0
  61. package/node_modules/bare-url/prebuilds/linux-arm64/bare-url.bare +0 -0
  62. package/node_modules/bare-url/prebuilds/linux-x64/bare-url.bare +0 -0
  63. package/node_modules/bare-url/prebuilds/win32-arm64/bare-url.bare +0 -0
  64. package/node_modules/bare-url/prebuilds/win32-x64/bare-url.bare +0 -0
  65. package/package.json +21 -21
  66. package/skills/openwa/SKILL.md +11 -0
  67. package/skills/paperclip/SKILL.md +1 -1
  68. package/ui-dist/assets/{AgentAvatar-DySHTTwq.js → AgentAvatar-J8HJgoSh.js} +1 -1
  69. package/ui-dist/assets/{Agents.production-CF5r1j38.js → Agents.production-DIwX4Fih.js} +2 -2
  70. package/ui-dist/assets/{BreadcrumbContext-C-JqFdLZ.js → BreadcrumbContext-k4_HOBKt.js} +1 -1
  71. package/ui-dist/assets/{CompanyActivity.production-BxAfcJub.js → CompanyActivity.production-oaHV25Eh.js} +1 -1
  72. package/ui-dist/assets/{CompanyExport-CEeoEcyJ.js → CompanyExport-Bkp2rXYE.js} +1 -1
  73. package/ui-dist/assets/{CompanySkills.production-DHEEarUk.js → CompanySkills.production-BTD5rJ5W.js} +1 -1
  74. package/ui-dist/assets/{EmptyState-fxPFhH-R.js → EmptyState-NmkkuFFc.js} +1 -1
  75. package/ui-dist/assets/{MarkdownBody-CEcIElD-.js → MarkdownBody-DZY1Poyt.js} +1 -1
  76. package/ui-dist/assets/{MarkdownEditor-B6kwxxZP.js → MarkdownEditor-BlZgaClg.js} +1 -1
  77. package/ui-dist/assets/{OrgChart.production-R4TqTezh.js → OrgChart.production-DTxUYwh4.js} +1 -1
  78. package/ui-dist/assets/{PageSkeleton-iVZWoLsF.js → PageSkeleton-Bk-YktL6.js} +1 -1
  79. package/ui-dist/assets/{RoutineDetail.production-RCCl99aO.js → RoutineDetail.production-BeN-WNpo.js} +1 -1
  80. package/ui-dist/assets/{RoutineRunVariablesDialog-BfaOkOdj.js → RoutineRunVariablesDialog-CMNeR6VZ.js} +1 -1
  81. package/ui-dist/assets/{Routines.production-i7GS-uxC.js → Routines.production-CD0naEc9.js} +1 -1
  82. package/ui-dist/assets/{StatusIcon-DxxLvme9.js → StatusIcon-fJLmzCDW.js} +1 -1
  83. package/ui-dist/assets/{ToastContext-BbzJdb2r.js → ToastContext-CIri5s-I.js} +1 -1
  84. package/ui-dist/assets/{agent-avatar-url-eBzFMwFS.js → agent-avatar-url-CVV7dJ4l.js} +3 -3
  85. package/ui-dist/assets/{alert-dialog-Ctnjtpv6.js → alert-dialog-DKXtvS0x.js} +1 -1
  86. package/ui-dist/assets/{arrow-right-DyKWA_SL.js → arrow-right-ELUE1rER.js} +1 -1
  87. package/ui-dist/assets/{badge-CUe24HAP.js → badge-Kf867ezN.js} +1 -1
  88. package/ui-dist/assets/{bot-wKcWfYKX.js → bot-CaRghtif.js} +1 -1
  89. package/ui-dist/assets/{card-GbQ9sLu8.js → card-BA46vwjn.js} +1 -1
  90. package/ui-dist/assets/{check-VcfFMsHr.js → check-CGphZTSp.js} +1 -1
  91. package/ui-dist/assets/{checkbox-Cm-PyDSt.js → checkbox-DekJl2RJ.js} +1 -1
  92. package/ui-dist/assets/{clipboard-CYFyFXxJ.js → clipboard-BftXMlFg.js} +1 -1
  93. package/ui-dist/assets/{company-members-CSVvQnvh.js → company-members-BmKruwkU.js} +1 -1
  94. package/ui-dist/assets/{definition-urW_HpEG.js → definition-BPS-VkpS.js} +1 -1
  95. package/ui-dist/assets/{dist-Dz68ZFqX.js → dist-3gGO9NXy.js} +1 -1
  96. package/ui-dist/assets/{dist-Z45aKkJm.js → dist-BLP096hU.js} +1 -1
  97. package/ui-dist/assets/{dist-CfR2_c4p.js → dist-C-3WyhwF.js} +1 -1
  98. package/ui-dist/assets/{environments-Cc8orNVy.js → environments-B0xY4RYs.js} +1 -1
  99. package/ui-dist/assets/{external-link-CAutrcht.js → external-link-CRVf_Q8M.js} +1 -1
  100. package/ui-dist/assets/{file-text-Dik8gyob.js → file-text-BKI87XaT.js} +1 -1
  101. package/ui-dist/assets/{health-D_DTw2-J.js → health-2HA6WpUS.js} +1 -1
  102. package/ui-dist/assets/{heartbeats-BgAe0g2m.js → heartbeats-D8FQfEVO.js} +1 -1
  103. package/ui-dist/assets/{index-st-IN4Gf.js → index-jeBYC7ui.js} +123 -123
  104. package/ui-dist/assets/{input-BARyUoy0.js → input-BXe2NHXn.js} +1 -1
  105. package/ui-dist/assets/{label-D4Q0SI3t.js → label-DQF_gQPD.js} +1 -1
  106. package/ui-dist/assets/{mention-chips-BEoxPZei.js → mention-chips-DvkvqPRN.js} +1 -1
  107. package/ui-dist/assets/{rotate-ccw-BT1r8zDE.js → rotate-ccw-ChQUphBj.js} +1 -1
  108. package/ui-dist/assets/{select-yD0r8C3i.js → select-D6aktlIu.js} +1 -1
  109. package/ui-dist/assets/{sheet-CAjfRCp9.js → sheet-C7Sbfc1a.js} +1 -1
  110. package/ui-dist/assets/{skeleton-BFMc3stE.js → skeleton-C4VrwCAM.js} +1 -1
  111. package/ui-dist/assets/{tabs-C1f963Rn.js → tabs-CFRGyc3-.js} +1 -1
  112. package/ui-dist/assets/{use-adapter-capabilities-CsKGmy5W.js → use-adapter-capabilities-1OSpmnRd.js} +1 -1
  113. package/ui-dist/assets/{use-copy-action-B-Azftuv.js → use-copy-action-C4qGxoRm.js} +1 -1
  114. package/ui-dist/assets/{useHiddenSettings-Uo-rfexH.js → useHiddenSettings-gzjlybPM.js} +1 -1
  115. package/ui-dist/index.html +39 -39
  116. package/ui-dist/sw.js +1 -1
@@ -1,4 +1,4 @@
1
- var On=Object.defineProperty;var a=(e,t)=>On(e,"name",{value:t,configurable:!0});import{i as jt}from"./rolldown-runtime-ZpX3ckPj.js";import{Er as st,Fa as jn,G as K,Hi as d,Ia as Bn,P as Nn,Ra as zn,St as de,Tr as Fn,Ui as qn,Vi as Bt,Wi as Hn,a as Wn,c as Vn,ht as Kn,ji as Qn,l as Jn,n as k,na as Gn,pt as Yn,r as Zn,t as Xn,u as ea}from"./agent-avatar-url-eBzFMwFS.js";import{t as ta}from"./preload-helper-CceJXRIF.js";var l=jt(zn(),1),We=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,Nt=/^[\\/]{2}/;function ra(e,t){return t+e.replace(/\\/g,"/")}a(ra,"normalizeProtocolRelativeUrl");var it="popstate";function lt(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}a(lt,"isLocation");function na(e={}){function t(n,o){let s=o.state?.masked,{pathname:i,search:u,hash:c}=s||n.location;return Oe("",{pathname:i,search:u,hash:c},o.state&&o.state.usr||null,o.state&&o.state.key||"default",s?{pathname:n.location.pathname,search:n.location.search,hash:n.location.hash}:void 0)}a(t,"createBrowserLocation");function r(n,o){return typeof o=="string"?o:Q(o)}return a(r,"createBrowserHref"),oa(t,r,null,e)}a(na,"createBrowserHistory");function $(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}a($,"invariant");function M(e,t){if(!e)try{throw new Error(t)}catch{}}a(M,"warning");function aa(){return Math.random().toString(36).substring(2,10)}a(aa,"createKey");function ut(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}a(ut,"getHistoryState");function Oe(e,t,r=null,n,o){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?te(t):t,state:r,key:t&&t.key||n||aa(),mask:o}}a(Oe,"createLocation");function Q({pathname:e="/",search:t="",hash:r=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),r&&r!=="#"&&(e+=r.charAt(0)==="#"?r:"#"+r),e}a(Q,"createPath");function te(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substring(r),e=e.substring(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substring(n),e=e.substring(0,n)),e&&(t.pathname=e)}return t}a(te,"parsePath");function oa(e,t,r,n={}){let{window:o=document.defaultView,v5Compat:s=!1}=n,i=o.history,u="POP",c=null,m=p();m==null&&(m=0,i.replaceState({...i.state,idx:m},""));function p(){return(i.state||{idx:null}).idx}a(p,"getIndex");function f(){u="POP";let h=p(),x=h==null?null:h-m;m=h,c&&c({action:u,location:y.location,delta:x})}a(f,"handlePop");function g(h,x){u="PUSH";let w=lt(h)?h:Oe(y.location,h,x);r&&r(w,h),m=p()+1;let I=ut(w,m),_=y.createHref(w.mask||w);try{i.pushState(I,"",_)}catch(C){if(C instanceof DOMException&&C.name==="DataCloneError")throw C;o.location.assign(_)}s&&c&&c({action:u,location:y.location,delta:1})}a(g,"push");function b(h,x){u="REPLACE";let w=lt(h)?h:Oe(y.location,h,x);r&&r(w,h),m=p();let I=ut(w,m),_=y.createHref(w.mask||w);i.replaceState(I,"",_),s&&c&&c({action:u,location:y.location,delta:0})}a(b,"replace2");function v(h){return sa(o,h)}a(v,"createURL");let y={get action(){return u},get location(){return e(o,i)},listen(h){if(c)throw new Error("A history only accepts one active listener");return o.addEventListener(it,f),c=h,()=>{o.removeEventListener(it,f),c=null}},createHref(h){return t(o,h)},createURL:v,encodeLocation(h){let x=v(h);return{pathname:x.pathname,search:x.search,hash:x.hash}},push:g,replace:b,go(h){return i.go(h)}};return y}a(oa,"getUrlBasedHistory");function sa(e,t,r=!1){let n="http://localhost";e&&(n=e.location.origin!=="null"?e.location.origin:e.location.href),$(n,"No window.location.(origin|href) available to create URL");let o=typeof t=="string"?t:Q(t);return o=o.replace(/ $/,"%20"),!r&&Nt.test(o)&&(o=n+o),new URL(o,n)}a(sa,"createBrowserURLImpl");var ia;ia=new WeakMap;function zt(e,t,r="/"){return Ft(e,t,r,!1)}a(zt,"matchRoutes");function Ft(e,t,r,n,o){let s=q((typeof t=="string"?te(t):t).pathname||"/",r);if(s==null)return null;let i=o??ua(e),u=null,c=ka(s);for(let m=0;u==null&&m<i.length;++m)u=ba(i[m],c,n);return u}a(Ft,"matchRoutesImpl");function la(e,t){let{route:r,pathname:n,params:o}=e;return{id:r.id,pathname:n,params:o,data:t[r.id],loaderData:t[r.id],handle:r.handle}}a(la,"convertRouteMatchToUiMatch");function ua(e){let t=qt(e);return ca(t),t}a(ua,"flattenAndRankRoutes");function qt(e,t=[],r=[],n="",o=!1){let s=a((i,u,c=o,m)=>{let p={relativePath:m===void 0?i.path||"":m,caseSensitive:i.caseSensitive===!0,childrenIndex:u,route:i};if(p.relativePath.startsWith("/")){if(!p.relativePath.startsWith(n)&&c)return;$(p.relativePath.startsWith(n),`Absolute route path "${p.relativePath}" nested under path "${n}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),p.relativePath=p.relativePath.slice(n.length)}let f=B([n,p.relativePath]),g=r.concat(p);i.children&&i.children.length>0&&($(i.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${f}".`),qt(i.children,t,g,f,c)),!(i.path==null&&!i.index)&&t.push({path:f,score:ya(f,i.index),routesMeta:g.map((b,v)=>{let[y,h]=Vt(b.relativePath,b.caseSensitive,v===g.length-1);return{...b,matcher:y,compiledParams:h}})})},"flattenRoute");return e.forEach((i,u)=>{if(i.path===""||!i.path?.includes("?"))s(i,u);else for(let c of Ht(i.path))s(i,u,!0,c)}),t}a(qt,"flattenRoutes");function Ht(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,o=r.endsWith("?"),s=r.replace(/\?$/,"");if(n.length===0)return o?[s,""]:[s];let i=Ht(n.join("/")),u=[];return u.push(...i.map(c=>c===""?s:[s,c].join("/"))),o&&u.push(...i),u.map(c=>e.startsWith("/")&&c===""?"/":c)}a(Ht,"explodeOptionalSegments");function ca(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:va(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}a(ca,"rankRouteBranches");var da=/^:[\w-]+$/,ma=3,fa=2,pa=1,ha=10,ga=-2,ct=a(e=>e==="*","isSplat");function ya(e,t){let r=e.split("/"),n=r.length;return r.some(ct)&&(n+=ga),t&&(n+=fa),r.filter(o=>!ct(o)).reduce((o,s)=>o+(da.test(s)?ma:s===""?pa:ha),n)}a(ya,"computeScore");function va(e,t){return e.length===t.length&&e.slice(0,-1).every((r,n)=>r===t[n])?e[e.length-1]-t[t.length-1]:0}a(va,"compareIndexes");function ba(e,t,r=!1){let{routesMeta:n}=e,o={},s="/",i=[];for(let u=0;u<n.length;++u){let c=n[u],m=u===n.length-1,p=s==="/"?t:t.slice(s.length)||"/",f={path:c.relativePath,caseSensitive:c.caseSensitive,end:m},g=c.matcher&&c.compiledParams?Wt(f,p,c.matcher,c.compiledParams):xe(f,p),b=c.route;if(!g&&m&&r&&!n[n.length-1].route.index&&(g=xe({path:c.relativePath,caseSensitive:c.caseSensitive,end:!1},p)),!g)return null;Object.assign(o,g.params),i.push({params:o,pathname:B([s,g.pathname]),pathnameBase:Ia(B([s,g.pathnameBase])),route:b}),g.pathnameBase!=="/"&&(s=B([s,g.pathnameBase]))}return i}a(ba,"matchRouteBranch");function xe(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=Vt(e.path,e.caseSensitive,e.end);return Wt(e,t,r,n)}a(xe,"matchPath");function Wt(e,t,r,n){let o=t.match(r);if(!o)return null;let s=o[0],i=X(s,1),u=o.slice(1);return{params:n.reduce((c,{paramName:m,isOptional:p},f)=>{if(m==="*"){let b=u[f]||"";i=X(s.slice(0,s.length-b.length),1)}const g=u[f];return p&&!g?c[m]=void 0:c[m]=(g||"").replace(/%2F/g,"/"),c},{}),pathname:s,pathnameBase:i,pattern:e}}a(Wt,"matchPathImpl");function Vt(e,t=!1,r=!0){M(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let n=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(s,i,u,c,m)=>{if(n.push({paramName:i,isOptional:u!=null}),u){let p=m.charAt(c+s.length);return p&&p!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(n.push({paramName:"*"}),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),n]}a(Vt,"compilePath");function ka(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return M(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}a(ka,"decodePath");function q(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&n!=="/"?null:e.slice(r)||"/"}a(q,"stripBasename");function xa(e,t="/"){let{pathname:r,search:n="",hash:o=""}=typeof e=="string"?te(e):e,s;return r?(r=Kt(r),r.startsWith("/")||r.startsWith("\\")?s=dt(r.substring(1),"/"):s=dt(r,t)):s=t,{pathname:s,search:Sa(n),hash:Ra(o)}}a(xa,"resolvePath");function dt(e,t){let r=X(t).split("/");return e.split("/").forEach(n=>{n===".."?r.length>1&&r.pop():n!=="."&&r.push(n)}),r.length>1?r.join("/"):"/"}a(dt,"resolvePathname");function Le(e,t,r,n){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(n)}]. Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}a(Le,"getInvalidPathError");function wa(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}a(wa,"getPathContributingMatches");function Ve(e){let t=wa(e);return t.map((r,n)=>n===t.length-1?r.pathname:r.pathnameBase)}a(Ve,"getResolveToMatches");function Re(e,t,r,n=!1){let o;typeof e=="string"?o=te(e):(o={...e},$(!o.pathname||!o.pathname.includes("?"),Le("?","pathname","search",o)),$(!o.pathname||!o.pathname.includes("#"),Le("#","pathname","hash",o)),$(!o.search||!o.search.includes("#"),Le("#","search","hash",o)));let s=e===""||o.pathname==="",i=s?"/":o.pathname,u;if(i==null)u=r;else{let f=t.length-1;if(!n&&i.startsWith("..")){let g=i.split("/");for(;g[0]==="..";)g.shift(),f-=1;o.pathname=g.join("/")}u=f>=0?t[f]:"/"}let c=xa(o,u),m=i&&i!=="/"&&i.endsWith("/"),p=(s||i===".")&&r.endsWith("/");return!c.pathname.endsWith("/")&&(m||p)&&(c.pathname+="/"),c}a(Re,"resolveTo$1");var Kt=a(e=>e.replace(/[\\/]{2,}/g,"/"),"removeDoubleSlashes"),B=a(e=>Kt(e.join("/")),"joinPaths");function X(e,t=0){let r=e.length;for(;r>t&&e.charCodeAt(r-1)===47;)r--;return r===e.length?e:e.slice(0,r)}a(X,"removeTrailingSlash");var Ia=a(e=>X(e).replace(/^\/*/,"/"),"normalizePathname"),Sa=a(e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,"normalizeSearch"),Ra=a(e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,"normalizeHash"),Ca=class{static{a(this,"ErrorResponseImpl")}constructor(e,t,r,n=!1){this.status=e,this.statusText=t||"",this.internal=n,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}};function Qt(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}a(Qt,"isRouteErrorResponse");function Ea(e){return B(e.map(t=>t.route.path).filter(Boolean))||"/"}a(Ea,"getRoutePattern");var Jt=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Gt(e,t){let r=e;if(typeof r!="string"||!We.test(r))return{absoluteURL:void 0,isExternal:!1,to:r};let n=r,o=!1;if(Jt)try{let s=new URL(window.location.href),i=Nt.test(r)?new URL(ra(r,s.protocol)):new URL(r),u=q(i.pathname,t);i.origin===s.origin&&u!=null?r=u+i.search+i.hash:o=!0}catch{M(!1,`<Link to="${r}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:n,isExternal:o,to:r}}a(Gt,"parseToInfo");var Ji=Object.getOwnPropertyNames(Object.prototype).sort().join("\0"),mt=new URL("http://localhost");function Ke(e){if(e.createURL)return e.createURL("/");try{return new URL(e.createHref("/"),mt)}catch{return mt}}a(Ke,"getNavigatorCurrentUrl");function Me(e,t){return e.origin===t.origin&&(e.origin!=="null"||e.protocol===t.protocol&&e.host===t.host)}a(Me,"isSameOrigin");function $a(e,t){if(e.startsWith("//"))return!0;let r=t.protocol.toLowerCase();return e.toLowerCase().startsWith(r)?t.host===""||e.slice(r.length).startsWith("//"):!1}a($a,"isExplicitUrl");function Qe(e,t,r,n){let o=null;try{o=e==null?null:new URL(e,r)}catch{}let s=new URL(t,r),i=o!=null&&!Me(o,r),u=!Me(s,r);if(n==="reject"){if(i||u)throw new Error("External navigation is not allowed")}else if(u&&(o==null||!$a(e,o)||!Me(o,s)))throw new Error("External navigation is not allowed")}a(Qe,"validateNavigationTarget");var Yt=["POST","PUT","PATCH","DELETE"],Gi=new Set(Yt),_a=["GET",...Yt],Yi=new Set(_a),Aa,Da,Pa,La;Aa=new WeakMap;Da=new WeakMap;Pa=new WeakMap;La=new WeakMap;var Ma=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];function Ta(e){try{return Ma.includes(new URL(e).protocol)}catch{return!1}}a(Ta,"hasInvalidProtocol");var re=l.createContext(null);re.displayName="DataRouter";var me=l.createContext(null);me.displayName="DataRouterState";var Zt=l.createContext(!1);function Xt(){return l.useContext(Zt)}a(Xt,"useIsRSCRouterContext");var er=l.createContext({isTransitioning:!1});er.displayName="ViewTransition";var Ua=l.createContext(new Map);Ua.displayName="Fetchers";var je=l.createContext(null);je.displayName="Await";var P=l.createContext(null);P.displayName="Navigation";var ne=l.createContext(null);ne.displayName="Location";var O=l.createContext({outlet:null,matches:[],isDataRoute:!1});O.displayName="Route";var Je=l.createContext(null);Je.displayName="RouteError";var tr="REACT_ROUTER_ERROR",Oa="REDIRECT",ja="ROUTE_ERROR_RESPONSE";function Ba(e){if(e.startsWith(`${tr}:${Oa}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.location=="string"&&typeof t.reloadDocument=="boolean"&&typeof t.replace=="boolean")return t}catch{}}a(Ba,"decodeRedirectErrorDigest");function Na(e){if(e.startsWith(`${tr}:${ja}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new Ca(t.status,t.statusText,t.data)}catch{}}a(Na,"decodeRouteErrorResponseDigest");function za(e,{relative:t}={}){$(ae(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:n}=l.useContext(P),{hash:o,pathname:s,search:i}=fe(e,{relative:t}),u=s;return r!=="/"&&(u=s==="/"?r:B([r,s])),n.createHref({pathname:u,search:i,hash:o})}a(za,"useHref");function ae(){return l.useContext(ne)!=null}a(ae,"useInRouterContext");function T(){return $(ae(),"useLocation() may be used only in the context of a <Router> component."),l.useContext(ne).location}a(T,"useLocation");function Zi(){return l.useContext(ne).navigationType}a(Zi,"useNavigationType");var rr="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function nr(e){l.useContext(P).static||l.useLayoutEffect(e)}a(nr,"useIsomorphicLayoutEffect");function Ce(){let{isDataRoute:e}=l.useContext(O);return e?no():Fa()}a(Ce,"useNavigate$1");function Fa(){$(ae(),"useNavigate() may be used only in the context of a <Router> component.");let e=l.useContext(re),{basename:t,navigator:r}=l.useContext(P),{matches:n}=l.useContext(O),{pathname:o}=T(),s=JSON.stringify(Ve(n)),i=l.useRef(!1);return nr(()=>{i.current=!0}),l.useCallback((u,c={})=>{if(M(i.current,rr),!i.current)return;if(typeof u=="number"){r.go(u);return}let m=Re(u,JSON.parse(s),o,c.relative==="path");e==null&&t!=="/"&&(m.pathname=m.pathname==="/"?t:B([t,m.pathname])),Qe(typeof u=="string"?u:Q(u),r.createHref(m),Ke(r),"reject"),(c.replace?r.replace:r.push)(m,c.state,c)},[t,r,s,o,e])}a(Fa,"useNavigateUnstable");var qa=l.createContext(null);function Ha(e){let t=l.useContext(O).outlet;return l.useMemo(()=>t&&l.createElement(qa.Provider,{value:e},t),[t,e])}a(Ha,"useOutlet");function Wa(){let{matches:e}=l.useContext(O);return e[e.length-1]?.params??{}}a(Wa,"useParams");function fe(e,{relative:t}={}){let{matches:r}=l.useContext(O),{pathname:n}=T(),o=JSON.stringify(Ve(r));return l.useMemo(()=>Re(e,JSON.parse(o),n,t==="path"),[e,o,n,t])}a(fe,"useResolvedPath");function Va(e,t){return ar(e,t)}a(Va,"useRoutes");function ar(e,t,r){$(ae(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:n}=l.useContext(P),{matches:o}=l.useContext(O),s=o[o.length-1],i=s?s.params:{},u=s?s.pathname:"/",c=s?s.pathnameBase:"/",m=s&&s.route;{let h=m&&m.path||"";ir(u,!m||h.endsWith("*")||h.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${u}" (under <Route path="${h}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
1
+ var On=Object.defineProperty;var a=(e,t)=>On(e,"name",{value:t,configurable:!0});import{i as jt}from"./rolldown-runtime-ZpX3ckPj.js";import{Er as st,Fa as jn,G as K,Hi as d,Ia as Bn,P as Nn,Ra as zn,St as de,Tr as Fn,Ui as qn,Vi as Bt,Wi as Hn,a as Wn,c as Vn,ht as Kn,ji as Qn,l as Jn,n as k,na as Gn,pt as Yn,r as Zn,t as Xn,u as ea}from"./agent-avatar-url-CVV7dJ4l.js";import{t as ta}from"./preload-helper-CceJXRIF.js";var l=jt(zn(),1),We=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,Nt=/^[\\/]{2}/;function ra(e,t){return t+e.replace(/\\/g,"/")}a(ra,"normalizeProtocolRelativeUrl");var it="popstate";function lt(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}a(lt,"isLocation");function na(e={}){function t(n,o){let s=o.state?.masked,{pathname:i,search:u,hash:c}=s||n.location;return Oe("",{pathname:i,search:u,hash:c},o.state&&o.state.usr||null,o.state&&o.state.key||"default",s?{pathname:n.location.pathname,search:n.location.search,hash:n.location.hash}:void 0)}a(t,"createBrowserLocation");function r(n,o){return typeof o=="string"?o:Q(o)}return a(r,"createBrowserHref"),oa(t,r,null,e)}a(na,"createBrowserHistory");function $(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}a($,"invariant");function M(e,t){if(!e)try{throw new Error(t)}catch{}}a(M,"warning");function aa(){return Math.random().toString(36).substring(2,10)}a(aa,"createKey");function ut(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}a(ut,"getHistoryState");function Oe(e,t,r=null,n,o){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?te(t):t,state:r,key:t&&t.key||n||aa(),mask:o}}a(Oe,"createLocation");function Q({pathname:e="/",search:t="",hash:r=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),r&&r!=="#"&&(e+=r.charAt(0)==="#"?r:"#"+r),e}a(Q,"createPath");function te(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substring(r),e=e.substring(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substring(n),e=e.substring(0,n)),e&&(t.pathname=e)}return t}a(te,"parsePath");function oa(e,t,r,n={}){let{window:o=document.defaultView,v5Compat:s=!1}=n,i=o.history,u="POP",c=null,m=p();m==null&&(m=0,i.replaceState({...i.state,idx:m},""));function p(){return(i.state||{idx:null}).idx}a(p,"getIndex");function f(){u="POP";let h=p(),x=h==null?null:h-m;m=h,c&&c({action:u,location:y.location,delta:x})}a(f,"handlePop");function g(h,x){u="PUSH";let w=lt(h)?h:Oe(y.location,h,x);r&&r(w,h),m=p()+1;let I=ut(w,m),_=y.createHref(w.mask||w);try{i.pushState(I,"",_)}catch(C){if(C instanceof DOMException&&C.name==="DataCloneError")throw C;o.location.assign(_)}s&&c&&c({action:u,location:y.location,delta:1})}a(g,"push");function b(h,x){u="REPLACE";let w=lt(h)?h:Oe(y.location,h,x);r&&r(w,h),m=p();let I=ut(w,m),_=y.createHref(w.mask||w);i.replaceState(I,"",_),s&&c&&c({action:u,location:y.location,delta:0})}a(b,"replace2");function v(h){return sa(o,h)}a(v,"createURL");let y={get action(){return u},get location(){return e(o,i)},listen(h){if(c)throw new Error("A history only accepts one active listener");return o.addEventListener(it,f),c=h,()=>{o.removeEventListener(it,f),c=null}},createHref(h){return t(o,h)},createURL:v,encodeLocation(h){let x=v(h);return{pathname:x.pathname,search:x.search,hash:x.hash}},push:g,replace:b,go(h){return i.go(h)}};return y}a(oa,"getUrlBasedHistory");function sa(e,t,r=!1){let n="http://localhost";e&&(n=e.location.origin!=="null"?e.location.origin:e.location.href),$(n,"No window.location.(origin|href) available to create URL");let o=typeof t=="string"?t:Q(t);return o=o.replace(/ $/,"%20"),!r&&Nt.test(o)&&(o=n+o),new URL(o,n)}a(sa,"createBrowserURLImpl");var ia;ia=new WeakMap;function zt(e,t,r="/"){return Ft(e,t,r,!1)}a(zt,"matchRoutes");function Ft(e,t,r,n,o){let s=q((typeof t=="string"?te(t):t).pathname||"/",r);if(s==null)return null;let i=o??ua(e),u=null,c=ka(s);for(let m=0;u==null&&m<i.length;++m)u=ba(i[m],c,n);return u}a(Ft,"matchRoutesImpl");function la(e,t){let{route:r,pathname:n,params:o}=e;return{id:r.id,pathname:n,params:o,data:t[r.id],loaderData:t[r.id],handle:r.handle}}a(la,"convertRouteMatchToUiMatch");function ua(e){let t=qt(e);return ca(t),t}a(ua,"flattenAndRankRoutes");function qt(e,t=[],r=[],n="",o=!1){let s=a((i,u,c=o,m)=>{let p={relativePath:m===void 0?i.path||"":m,caseSensitive:i.caseSensitive===!0,childrenIndex:u,route:i};if(p.relativePath.startsWith("/")){if(!p.relativePath.startsWith(n)&&c)return;$(p.relativePath.startsWith(n),`Absolute route path "${p.relativePath}" nested under path "${n}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),p.relativePath=p.relativePath.slice(n.length)}let f=B([n,p.relativePath]),g=r.concat(p);i.children&&i.children.length>0&&($(i.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${f}".`),qt(i.children,t,g,f,c)),!(i.path==null&&!i.index)&&t.push({path:f,score:ya(f,i.index),routesMeta:g.map((b,v)=>{let[y,h]=Vt(b.relativePath,b.caseSensitive,v===g.length-1);return{...b,matcher:y,compiledParams:h}})})},"flattenRoute");return e.forEach((i,u)=>{if(i.path===""||!i.path?.includes("?"))s(i,u);else for(let c of Ht(i.path))s(i,u,!0,c)}),t}a(qt,"flattenRoutes");function Ht(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,o=r.endsWith("?"),s=r.replace(/\?$/,"");if(n.length===0)return o?[s,""]:[s];let i=Ht(n.join("/")),u=[];return u.push(...i.map(c=>c===""?s:[s,c].join("/"))),o&&u.push(...i),u.map(c=>e.startsWith("/")&&c===""?"/":c)}a(Ht,"explodeOptionalSegments");function ca(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:va(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}a(ca,"rankRouteBranches");var da=/^:[\w-]+$/,ma=3,fa=2,pa=1,ha=10,ga=-2,ct=a(e=>e==="*","isSplat");function ya(e,t){let r=e.split("/"),n=r.length;return r.some(ct)&&(n+=ga),t&&(n+=fa),r.filter(o=>!ct(o)).reduce((o,s)=>o+(da.test(s)?ma:s===""?pa:ha),n)}a(ya,"computeScore");function va(e,t){return e.length===t.length&&e.slice(0,-1).every((r,n)=>r===t[n])?e[e.length-1]-t[t.length-1]:0}a(va,"compareIndexes");function ba(e,t,r=!1){let{routesMeta:n}=e,o={},s="/",i=[];for(let u=0;u<n.length;++u){let c=n[u],m=u===n.length-1,p=s==="/"?t:t.slice(s.length)||"/",f={path:c.relativePath,caseSensitive:c.caseSensitive,end:m},g=c.matcher&&c.compiledParams?Wt(f,p,c.matcher,c.compiledParams):xe(f,p),b=c.route;if(!g&&m&&r&&!n[n.length-1].route.index&&(g=xe({path:c.relativePath,caseSensitive:c.caseSensitive,end:!1},p)),!g)return null;Object.assign(o,g.params),i.push({params:o,pathname:B([s,g.pathname]),pathnameBase:Ia(B([s,g.pathnameBase])),route:b}),g.pathnameBase!=="/"&&(s=B([s,g.pathnameBase]))}return i}a(ba,"matchRouteBranch");function xe(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=Vt(e.path,e.caseSensitive,e.end);return Wt(e,t,r,n)}a(xe,"matchPath");function Wt(e,t,r,n){let o=t.match(r);if(!o)return null;let s=o[0],i=X(s,1),u=o.slice(1);return{params:n.reduce((c,{paramName:m,isOptional:p},f)=>{if(m==="*"){let b=u[f]||"";i=X(s.slice(0,s.length-b.length),1)}const g=u[f];return p&&!g?c[m]=void 0:c[m]=(g||"").replace(/%2F/g,"/"),c},{}),pathname:s,pathnameBase:i,pattern:e}}a(Wt,"matchPathImpl");function Vt(e,t=!1,r=!0){M(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let n=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(s,i,u,c,m)=>{if(n.push({paramName:i,isOptional:u!=null}),u){let p=m.charAt(c+s.length);return p&&p!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(n.push({paramName:"*"}),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),n]}a(Vt,"compilePath");function ka(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return M(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}a(ka,"decodePath");function q(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&n!=="/"?null:e.slice(r)||"/"}a(q,"stripBasename");function xa(e,t="/"){let{pathname:r,search:n="",hash:o=""}=typeof e=="string"?te(e):e,s;return r?(r=Kt(r),r.startsWith("/")||r.startsWith("\\")?s=dt(r.substring(1),"/"):s=dt(r,t)):s=t,{pathname:s,search:Sa(n),hash:Ra(o)}}a(xa,"resolvePath");function dt(e,t){let r=X(t).split("/");return e.split("/").forEach(n=>{n===".."?r.length>1&&r.pop():n!=="."&&r.push(n)}),r.length>1?r.join("/"):"/"}a(dt,"resolvePathname");function Le(e,t,r,n){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(n)}]. Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}a(Le,"getInvalidPathError");function wa(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}a(wa,"getPathContributingMatches");function Ve(e){let t=wa(e);return t.map((r,n)=>n===t.length-1?r.pathname:r.pathnameBase)}a(Ve,"getResolveToMatches");function Re(e,t,r,n=!1){let o;typeof e=="string"?o=te(e):(o={...e},$(!o.pathname||!o.pathname.includes("?"),Le("?","pathname","search",o)),$(!o.pathname||!o.pathname.includes("#"),Le("#","pathname","hash",o)),$(!o.search||!o.search.includes("#"),Le("#","search","hash",o)));let s=e===""||o.pathname==="",i=s?"/":o.pathname,u;if(i==null)u=r;else{let f=t.length-1;if(!n&&i.startsWith("..")){let g=i.split("/");for(;g[0]==="..";)g.shift(),f-=1;o.pathname=g.join("/")}u=f>=0?t[f]:"/"}let c=xa(o,u),m=i&&i!=="/"&&i.endsWith("/"),p=(s||i===".")&&r.endsWith("/");return!c.pathname.endsWith("/")&&(m||p)&&(c.pathname+="/"),c}a(Re,"resolveTo$1");var Kt=a(e=>e.replace(/[\\/]{2,}/g,"/"),"removeDoubleSlashes"),B=a(e=>Kt(e.join("/")),"joinPaths");function X(e,t=0){let r=e.length;for(;r>t&&e.charCodeAt(r-1)===47;)r--;return r===e.length?e:e.slice(0,r)}a(X,"removeTrailingSlash");var Ia=a(e=>X(e).replace(/^\/*/,"/"),"normalizePathname"),Sa=a(e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,"normalizeSearch"),Ra=a(e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,"normalizeHash"),Ca=class{static{a(this,"ErrorResponseImpl")}constructor(e,t,r,n=!1){this.status=e,this.statusText=t||"",this.internal=n,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}};function Qt(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}a(Qt,"isRouteErrorResponse");function Ea(e){return B(e.map(t=>t.route.path).filter(Boolean))||"/"}a(Ea,"getRoutePattern");var Jt=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Gt(e,t){let r=e;if(typeof r!="string"||!We.test(r))return{absoluteURL:void 0,isExternal:!1,to:r};let n=r,o=!1;if(Jt)try{let s=new URL(window.location.href),i=Nt.test(r)?new URL(ra(r,s.protocol)):new URL(r),u=q(i.pathname,t);i.origin===s.origin&&u!=null?r=u+i.search+i.hash:o=!0}catch{M(!1,`<Link to="${r}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:n,isExternal:o,to:r}}a(Gt,"parseToInfo");var Ji=Object.getOwnPropertyNames(Object.prototype).sort().join("\0"),mt=new URL("http://localhost");function Ke(e){if(e.createURL)return e.createURL("/");try{return new URL(e.createHref("/"),mt)}catch{return mt}}a(Ke,"getNavigatorCurrentUrl");function Me(e,t){return e.origin===t.origin&&(e.origin!=="null"||e.protocol===t.protocol&&e.host===t.host)}a(Me,"isSameOrigin");function $a(e,t){if(e.startsWith("//"))return!0;let r=t.protocol.toLowerCase();return e.toLowerCase().startsWith(r)?t.host===""||e.slice(r.length).startsWith("//"):!1}a($a,"isExplicitUrl");function Qe(e,t,r,n){let o=null;try{o=e==null?null:new URL(e,r)}catch{}let s=new URL(t,r),i=o!=null&&!Me(o,r),u=!Me(s,r);if(n==="reject"){if(i||u)throw new Error("External navigation is not allowed")}else if(u&&(o==null||!$a(e,o)||!Me(o,s)))throw new Error("External navigation is not allowed")}a(Qe,"validateNavigationTarget");var Yt=["POST","PUT","PATCH","DELETE"],Gi=new Set(Yt),_a=["GET",...Yt],Yi=new Set(_a),Aa,Da,Pa,La;Aa=new WeakMap;Da=new WeakMap;Pa=new WeakMap;La=new WeakMap;var Ma=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];function Ta(e){try{return Ma.includes(new URL(e).protocol)}catch{return!1}}a(Ta,"hasInvalidProtocol");var re=l.createContext(null);re.displayName="DataRouter";var me=l.createContext(null);me.displayName="DataRouterState";var Zt=l.createContext(!1);function Xt(){return l.useContext(Zt)}a(Xt,"useIsRSCRouterContext");var er=l.createContext({isTransitioning:!1});er.displayName="ViewTransition";var Ua=l.createContext(new Map);Ua.displayName="Fetchers";var je=l.createContext(null);je.displayName="Await";var P=l.createContext(null);P.displayName="Navigation";var ne=l.createContext(null);ne.displayName="Location";var O=l.createContext({outlet:null,matches:[],isDataRoute:!1});O.displayName="Route";var Je=l.createContext(null);Je.displayName="RouteError";var tr="REACT_ROUTER_ERROR",Oa="REDIRECT",ja="ROUTE_ERROR_RESPONSE";function Ba(e){if(e.startsWith(`${tr}:${Oa}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.location=="string"&&typeof t.reloadDocument=="boolean"&&typeof t.replace=="boolean")return t}catch{}}a(Ba,"decodeRedirectErrorDigest");function Na(e){if(e.startsWith(`${tr}:${ja}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new Ca(t.status,t.statusText,t.data)}catch{}}a(Na,"decodeRouteErrorResponseDigest");function za(e,{relative:t}={}){$(ae(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:n}=l.useContext(P),{hash:o,pathname:s,search:i}=fe(e,{relative:t}),u=s;return r!=="/"&&(u=s==="/"?r:B([r,s])),n.createHref({pathname:u,search:i,hash:o})}a(za,"useHref");function ae(){return l.useContext(ne)!=null}a(ae,"useInRouterContext");function T(){return $(ae(),"useLocation() may be used only in the context of a <Router> component."),l.useContext(ne).location}a(T,"useLocation");function Zi(){return l.useContext(ne).navigationType}a(Zi,"useNavigationType");var rr="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function nr(e){l.useContext(P).static||l.useLayoutEffect(e)}a(nr,"useIsomorphicLayoutEffect");function Ce(){let{isDataRoute:e}=l.useContext(O);return e?no():Fa()}a(Ce,"useNavigate$1");function Fa(){$(ae(),"useNavigate() may be used only in the context of a <Router> component.");let e=l.useContext(re),{basename:t,navigator:r}=l.useContext(P),{matches:n}=l.useContext(O),{pathname:o}=T(),s=JSON.stringify(Ve(n)),i=l.useRef(!1);return nr(()=>{i.current=!0}),l.useCallback((u,c={})=>{if(M(i.current,rr),!i.current)return;if(typeof u=="number"){r.go(u);return}let m=Re(u,JSON.parse(s),o,c.relative==="path");e==null&&t!=="/"&&(m.pathname=m.pathname==="/"?t:B([t,m.pathname])),Qe(typeof u=="string"?u:Q(u),r.createHref(m),Ke(r),"reject"),(c.replace?r.replace:r.push)(m,c.state,c)},[t,r,s,o,e])}a(Fa,"useNavigateUnstable");var qa=l.createContext(null);function Ha(e){let t=l.useContext(O).outlet;return l.useMemo(()=>t&&l.createElement(qa.Provider,{value:e},t),[t,e])}a(Ha,"useOutlet");function Wa(){let{matches:e}=l.useContext(O);return e[e.length-1]?.params??{}}a(Wa,"useParams");function fe(e,{relative:t}={}){let{matches:r}=l.useContext(O),{pathname:n}=T(),o=JSON.stringify(Ve(r));return l.useMemo(()=>Re(e,JSON.parse(o),n,t==="path"),[e,o,n,t])}a(fe,"useResolvedPath");function Va(e,t){return ar(e,t)}a(Va,"useRoutes");function ar(e,t,r){$(ae(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:n}=l.useContext(P),{matches:o}=l.useContext(O),s=o[o.length-1],i=s?s.params:{},u=s?s.pathname:"/",c=s?s.pathnameBase:"/",m=s&&s.route;{let h=m&&m.path||"";ir(u,!m||h.endsWith("*")||h.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${u}" (under <Route path="${h}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
2
2
 
3
3
  Please change the parent <Route path="${h}"> to <Route path="${h==="/"?"*":`${h}/*`}">.`)}let p=T(),f;if(t){let h=typeof t=="string"?te(t):t;$(c==="/"||h.pathname?.startsWith(c),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${c}" but pathname "${h.pathname}" was given in the \`location\` prop.`),f=h}else f=p;let g=f.pathname||"/",b=g;if(c!=="/"){let h=c.replace(/^\//,"").split("/");b="/"+g.replace(/^\//,"").split("/").slice(h.length).join("/")}let v=r&&r.state.matches.length?r.state.matches.map(h=>Object.assign(h,{route:r.manifest[h.route.id]||h.route})):zt(e,{pathname:b});M(m||v!=null,`No routes matched location "${f.pathname}${f.search}${f.hash}" `),M(v==null||v[v.length-1].route.element!==void 0||v[v.length-1].route.Component!==void 0||v[v.length-1].route.lazy!==void 0,`Matched leaf route at location "${f.pathname}${f.search}${f.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let y=Ya(v&&v.map(h=>Object.assign({},h,{params:Object.assign({},i,h.params),pathname:B([c,n.encodeLocation?n.encodeLocation(h.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:h.pathname]),pathnameBase:h.pathnameBase==="/"?c:B([c,n.encodeLocation?n.encodeLocation(h.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:h.pathnameBase])})),o,r);return t&&y?l.createElement(ne.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,...f},navigationType:"POP"}},y):y}a(ar,"useRoutesImpl");function Ka(){let e=ro(),t=Qt(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,n="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:n},s={padding:"2px 4px",backgroundColor:n},i=null;return i=l.createElement(l.Fragment,null,l.createElement("p",null,"💿 Hey developer 👋"),l.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",l.createElement("code",{style:s},"ErrorBoundary")," or"," ",l.createElement("code",{style:s},"errorElement")," prop on your route.")),l.createElement(l.Fragment,null,l.createElement("h2",null,"Unexpected Application Error!"),l.createElement("h3",{style:{fontStyle:"italic"}},t),r?l.createElement("pre",{style:o},r):null,i)}a(Ka,"DefaultErrorComponent");var Qa=l.createElement(Ka,null),or=class extends l.Component{static{a(this,"RenderErrorBoundary")}constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError&&this.props.onError(e,t)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const r=Na(e.digest);r&&(e=r)}let t=e!==void 0?l.createElement(O.Provider,{value:this.props.routeContext},l.createElement(Je.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?l.createElement(Ja,{error:e},t):t}};or.contextType=Zt;var Te=new WeakMap;function Ja({children:e,error:t}){let{basename:r,navigator:n}=l.useContext(P);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let o=Ba(t.digest);if(o){let s=Te.get(t);if(s)throw s;let i=Gt(o.location,r),u=i.absoluteURL||i.to;if(Qe(o.location,u,Ke(n),"allow-explicit"),Ta(u))throw new Error("Invalid redirect location");if(Jt&&!Te.get(t))if(i.isExternal||o.reloadDocument)window.location.href=u;else{const c=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(i.to,{replace:o.replace}));throw Te.set(t,c),c}return l.createElement("meta",{httpEquiv:"refresh",content:`0;url=${u}`})}}return e}a(Ja,"RSCErrorHandler");function Ga({routeContext:e,match:t,children:r}){let n=l.useContext(re);return n&&n.static&&n.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(n.staticContext._deepestRenderedBoundaryId=t.route.id),l.createElement(O.Provider,{value:e},r)}a(Ga,"RenderedRoute");function Ya(e,t=[],r){let n=r?.state;if(e==null){if(!n)return null;if(n.errors)e=n.matches;else if(t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let o=e,s=n?.errors;if(s!=null){let p=o.findIndex(f=>f.route.id&&s?.[f.route.id]!==void 0);$(p>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(s).join(",")}`),o=o.slice(0,Math.min(o.length,p+1))}let i=!1,u=-1;if(r&&n){i=n.renderFallback;for(let p=0;p<o.length;p++){let f=o[p];if((f.route.HydrateFallback||f.route.hydrateFallbackElement)&&(u=p),f.route.id){let{loaderData:g,errors:b}=n,v=f.route.loader&&!g.hasOwnProperty(f.route.id)&&(!b||b[f.route.id]===void 0);if(f.route.lazy||v){r.isStatic&&(i=!0),u>=0?o=o.slice(0,u+1):o=[o[0]];break}}}}let c=r?.onError,m=n&&c?(p,f)=>{c(p,{location:n.location,params:n.matches?.[0]?.params??{},pattern:Ea(n.matches),errorInfo:f})}:void 0;return o.reduceRight((p,f,g)=>{let b,v=!1,y=null,h=null;n&&(b=s&&f.route.id?s[f.route.id]:void 0,y=f.route.errorElement||Qa,i&&(u<0&&g===0?(ir("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),v=!0,h=null):u===g&&(v=!0,h=f.route.hydrateFallbackElement||null)));let x=t.concat(o.slice(0,g+1)),w=a(()=>{let I;return b?I=y:v?I=h:f.route.Component?I=l.createElement(f.route.Component,null):f.route.element?I=f.route.element:I=p,l.createElement(Ga,{match:f,routeContext:{outlet:p,matches:x,isDataRoute:n!=null},children:I})},"getChildren");return n&&(f.route.ErrorBoundary||f.route.errorElement||g===0)?l.createElement(or,{location:n.location,revalidation:n.revalidation,component:y,error:b,children:w(),routeContext:{outlet:null,matches:x,isDataRoute:!0},onError:m}):w()},null)}a(Ya,"_renderMatches");function Ge(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}a(Ge,"getDataRouterConsoleError");function Za(e){let t=l.useContext(re);return $(t,Ge(e)),t}a(Za,"useDataRouterContext");function Ye(e){let t=l.useContext(me);return $(t,Ge(e)),t}a(Ye,"useDataRouterState");function Xa(e){let t=l.useContext(O);return $(t,Ge(e)),t}a(Xa,"useRouteContext");function Ze(e){let t=Xa(e),r=t.matches[t.matches.length-1];return $(r.route.id,`${e} can only be used on routes that contain a unique "id"`),r.route.id}a(Ze,"useCurrentRouteId");function eo(){return Ze("useRouteId")}a(eo,"useRouteId");function to(){let e=Ye("useNavigation");return l.useMemo(()=>{let{matches:t,historyAction:r,...n}=e.navigation;return n},[e.navigation])}a(to,"useNavigation");function sr(){let{matches:e,loaderData:t}=Ye("useMatches");return l.useMemo(()=>e.map(r=>la(r,t)),[e,t])}a(sr,"useMatches");function ro(){let e=l.useContext(Je),t=Ye("useRouteError"),r=Ze("useRouteError");return e!==void 0?e:t.errors?.[r]}a(ro,"useRouteError");function no(){let{router:e}=Za("useNavigate"),t=Ze("useNavigate"),r=l.useRef(!1);return nr(()=>{r.current=!0}),l.useCallback(async(n,o={})=>{M(r.current,rr),r.current&&(typeof n=="number"?await e.navigate(n):await e.navigate(n,{fromRouteId:t,...o}))},[e,t])}a(no,"useNavigateStable");var ft={};function ir(e,t,r){!t&&!ft[e]&&(ft[e]=!0,M(!1,r))}a(ir,"warningOnce");var pt={};function ao(e,t){!e&&!pt[t]&&(pt[t]=!0)}a(ao,"warnOnce");var Xi=l.memo(oo);function oo({routes:e,manifest:t,future:r,state:n,isStatic:o,onError:s}){return ar(e,void 0,{manifest:t,state:n,isStatic:o,onError:s,future:r})}a(oo,"DataRoutes2");function so({to:e,replace:t,state:r,relative:n}){$(ae(),"<Navigate> may be used only in the context of a <Router> component.");let{static:o,navigator:s}=l.useContext(P);M(!o,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:i}=l.useContext(O),{pathname:u}=T(),c=Ce(),m=Re(e,Ve(i),u,n==="path");Qe(typeof e=="string"?e:Q(e),s.createHref(m),Ke(s),"reject");let p=JSON.stringify(m);return l.useEffect(()=>{c(JSON.parse(p),{replace:t,state:r,relative:n})},[c,p,n,t,r]),null}a(so,"Navigate$1");function el(e){return Ha(e.context)}a(el,"Outlet");function io(e){$(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}a(io,"Route");function lr({basename:e="/",children:t=null,location:r,navigationType:n="POP",navigator:o,static:s=!1,useTransitions:i}){$(!ae(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let u=e.replace(/^\/*/,"/"),c=l.useMemo(()=>({basename:u,navigator:o,static:s,useTransitions:i,future:{}}),[u,o,s,i]);typeof r=="string"&&(r=te(r));let{pathname:m="/",search:p="",hash:f="",state:g=null,key:b="default",mask:v}=r,y=l.useMemo(()=>{let h=q(m,u);return h==null?null:{location:{pathname:h,search:p,hash:f,state:g,key:b,mask:v},navigationType:n}},[u,m,p,f,g,b,n,v]);return M(y!=null,`<Router basename="${u}"> is not able to match the URL "${m}${p}${f}" because it does not start with the basename, so the <Router> won't render anything.`),y==null?null:l.createElement(P.Provider,{value:c},l.createElement(ne.Provider,{children:t,value:y}))}a(lr,"Router");function tl({children:e,location:t}){return Va(Be(e),t)}a(tl,"Routes");var rl=class extends l.Component{static{a(this,"AwaitErrorBoundary")}constructor(e){super(e),this.state={error:null}}static getDerivedStateFromError(e){return{error:e}}componentDidCatch(e,t){this.props.onError&&this.props.onError(e,t)}render(){let{children:e,errorElement:t,resolve:r}=this.props,n=null,o=0;if(!(r instanceof Promise))o=1,n=Promise.resolve(),Object.defineProperty(n,"_tracked",{get:a(()=>!0,"get")}),Object.defineProperty(n,"_data",{get:a(()=>r,"get")});else if(this.state.error){o=2;let s=this.state.error;n=Promise.reject().catch(()=>{}),Object.defineProperty(n,"_tracked",{get:a(()=>!0,"get")}),Object.defineProperty(n,"_error",{get:a(()=>s,"get")})}else r._tracked?(n=r,o="_error"in n?2:"_data"in n?1:0):(o=0,Object.defineProperty(r,"_tracked",{get:a(()=>!0,"get")}),n=r.then(s=>Object.defineProperty(r,"_data",{get:a(()=>s,"get")}),s=>{this.props.onError?.(s),Object.defineProperty(r,"_error",{get:a(()=>s,"get")})}));if(o===2&&!t)throw n._error;if(o===2)return l.createElement(je.Provider,{value:n,children:t});if(o===1)return l.createElement(je.Provider,{value:n,children:e});throw n}};function Be(e,t=[]){let r=[];return l.Children.forEach(e,(n,o)=>{if(!l.isValidElement(n))return;let s=[...t,o];if(n.type===l.Fragment){r.push.apply(r,Be(n.props.children,s));return}$(n.type===io,`[${typeof n.type=="string"?n.type:n.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),$(!n.props.index||!n.props.children,"An index route cannot have child routes.");let i={id:n.props.id||s.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,middleware:n.props.middleware,loader:n.props.loader,action:n.props.action,hydrateFallbackElement:n.props.hydrateFallbackElement,HydrateFallback:n.props.HydrateFallback,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.hasErrorBoundary===!0||n.props.ErrorBoundary!=null||n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(i.children=Be(n.props.children,s)),r.push(i)}),r}a(Be,"createRoutesFromChildren");var be="get",ke="application/x-www-form-urlencoded";function Ee(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}a(Ee,"isHtmlElement");function lo(e){return Ee(e)&&e.tagName.toLowerCase()==="button"}a(lo,"isButtonElement");function uo(e){return Ee(e)&&e.tagName.toLowerCase()==="form"}a(uo,"isFormElement");function co(e){return Ee(e)&&e.tagName.toLowerCase()==="input"}a(co,"isInputElement");function mo(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}a(mo,"isModifiedEvent");function fo(e,t){return e.button===0&&(!t||t==="_self")&&!mo(e)}a(fo,"shouldProcessLinkClick");function Ne(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,r)=>{let n=e[r];return t.concat(Array.isArray(n)?n.map(o=>[r,o]):[[r,n]])},[]))}a(Ne,"createSearchParams");function po(e,t){let r=Ne(e);return t&&t.forEach((n,o)=>{r.has(o)||t.getAll(o).forEach(s=>{r.append(o,s)})}),r}a(po,"getSearchParamsForLocation");var ge=null;function ho(){if(ge===null)try{new FormData(document.createElement("form"),0),ge=!1}catch{ge=!0}return ge}a(ho,"isFormDataSubmitterSupported");var go=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Ue(e){return e!=null&&!go.has(e)?(M(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${ke}"`),null):e}a(Ue,"getFormEncType");function yo(e,t){let r,n,o,s,i;if(uo(e)){let u=e.getAttribute("action");n=u?q(u,t):null,r=e.getAttribute("method")||be,o=Ue(e.getAttribute("enctype"))||ke,s=new FormData(e)}else if(lo(e)||co(e)&&(e.type==="submit"||e.type==="image")){let u=e.form;if(u==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let c=e.getAttribute("formaction")||u.getAttribute("action");if(n=c?q(c,t):null,r=e.getAttribute("formmethod")||u.getAttribute("method")||be,o=Ue(e.getAttribute("formenctype"))||Ue(u.getAttribute("enctype"))||ke,s=new FormData(u,e),!ho()){let{name:m,type:p,value:f}=e;if(p==="image"){let g=m?`${m}.`:"";s.append(`${g}x`,"0"),s.append(`${g}y`,"0")}else m&&s.append(m,f)}}else{if(Ee(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=be,n=null,o=ke,i=e}return s&&o==="text/plain"&&(i=s,s=void 0),{action:n,method:r.toLowerCase(),encType:o,formData:s,body:i}}a(yo,"getFormSubmissionInfo");var nl=Object.getOwnPropertyNames(Object.prototype).sort().join("\0"),vo={"&":"\\u0026",">":"\\u003e","<":"\\u003c","\u2028":"\\u2028","\u2029":"\\u2029"},bo=/[&><\u2028\u2029]/g;function ht(e){return e.replace(bo,t=>vo[t])}a(ht,"escapeHtml");function $e(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}a($e,"invariant2");function ur(e,t,r,n){let o=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return r?o.pathname.endsWith("/")?o.pathname=`${o.pathname}_.${n}`:o.pathname=`${o.pathname}.${n}`:o.pathname==="/"?o.pathname=`_root.${n}`:t&&q(o.pathname,t)==="/"?o.pathname=`${X(t)}/_root.${n}`:o.pathname=`${X(o.pathname)}.${n}`,o}a(ur,"singleFetchUrl");async function ko(e,t){if(e.id in t)return t[e.id];try{let r=await ta(()=>import(e.module),[]);return t[e.id]=r,r}catch{return window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}a(ko,"loadRouteModule");function xo(e){return e!=null&&typeof e.page=="string"}a(xo,"isPageLinkDescriptor");function wo(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}a(wo,"isHtmlLinkDescriptor");async function Io(e,t,r){return Co((await Promise.all(e.map(async n=>{let o=t.routes[n.route.id];if(o){let s=await ko(o,r);return s.links?s.links():[]}return[]}))).flat(1).filter(wo).filter(n=>n.rel==="stylesheet"||n.rel==="preload").map(n=>n.rel==="stylesheet"?{...n,rel:"prefetch",as:"style"}:{...n,rel:"prefetch"}))}a(Io,"getKeyedPrefetchLinks");function gt(e,t,r,n,o,s){let i=a((c,m)=>r[m]?c.route.id!==r[m].route.id:!0,"isNew"),u=a((c,m)=>r[m].pathname!==c.pathname||r[m].route.path?.endsWith("*")&&r[m].params["*"]!==c.params["*"],"matchPathChanged");return s==="assets"?t.filter((c,m)=>i(c,m)||u(c,m)):s==="data"?t.filter((c,m)=>{let p=n.routes[c.route.id];if(!p||!p.hasLoader)return!1;if(i(c,m)||u(c,m))return!0;if(c.route.shouldRevalidate){let f=c.route.shouldRevalidate({currentUrl:new URL(o.pathname+o.search+o.hash,window.origin),currentParams:r[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:c.params,defaultShouldRevalidate:!0});if(typeof f=="boolean")return f}return!0}):[]}a(gt,"getNewMatchesForLinks");function cr(e,t,{includeHydrateFallback:r}={}){return So(e.map(n=>{let o=t.routes[n.route.id];if(!o)return[];let s=[o.module];return o.clientActionModule&&(s=s.concat(o.clientActionModule)),o.clientLoaderModule&&(s=s.concat(o.clientLoaderModule)),r&&o.hydrateFallbackModule&&(s=s.concat(o.hydrateFallbackModule)),o.imports&&(s=s.concat(o.imports)),s}).flat(1))}a(cr,"getModuleLinkHrefs");function So(e){return[...new Set(e)]}a(So,"dedupeHrefs");function Ro(e){let t={},r=Object.keys(e).sort();for(let n of r)t[n]=e[n];return t}a(Ro,"sortKeys");function Co(e,t){let r=new Set,n=new Set(t);return e.reduce((o,s)=>{if(t&&!xo(s)&&s.as==="script"&&s.href&&n.has(s.href))return o;let i=JSON.stringify(Ro(s));return r.has(i)||(r.add(i),o.push({key:i,link:s})),o},[])}a(Co,"dedupeLinkDescriptors");function Eo(e,t){return e.mode==="lazy"&&t===!0}a(Eo,"isFogOfWarEnabled");function $o({sri:e,...t},r){let n=new Set(r.state.matches.map(u=>u.route.id)),o=r.state.location.pathname.split("/").filter(Boolean),s=["/"];for(o.pop();o.length>0;)s.push(`/${o.join("/")}`),o.pop();s.forEach(u=>{let c=Ft(r.routes,u,r.basename||"/",!1,r.branches);c&&c.forEach(m=>n.add(m.route.id))});let i=[...n].reduce((u,c)=>Object.assign(u,{[c]:t.routes[c]}),{});return{...t,routes:i,sri:e?!0:void 0}}a($o,"getPartialManifest");function _e(){let e=l.useContext(re);return $e(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}a(_e,"useDataRouterContext2");function dr(){let e=l.useContext(me);return $e(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}a(dr,"useDataRouterStateContext");var Ae=l.createContext(void 0);Ae.displayName="FrameworkContext";function J(){let e=l.useContext(Ae);return $e(e,"You must render this element inside a <HydratedRouter> element"),e}a(J,"useFrameworkContext");function _o(e,t){let r=l.useContext(Ae),[n,o]=l.useState(!1),[s,i]=l.useState(!1),{onFocus:u,onBlur:c,onMouseEnter:m,onMouseLeave:p,onTouchStart:f}=t,g=l.useRef(null);l.useEffect(()=>{if(e==="render"&&i(!0),e==="viewport"){let y=a(x=>{x.forEach(w=>{i(w.isIntersecting)})},"callback"),h=new IntersectionObserver(y,{threshold:.5});return g.current&&h.observe(g.current),()=>{h.disconnect()}}},[e]),l.useEffect(()=>{if(n){let y=setTimeout(()=>{i(!0)},100);return()=>{clearTimeout(y)}}},[n]);let b=a(()=>{o(!0)},"setIntent"),v=a(()=>{o(!1),i(!1)},"cancelIntent");return r?e!=="intent"?[s,g,{}]:[s,g,{onFocus:ie(u,b),onBlur:ie(c,v),onMouseEnter:ie(m,b),onMouseLeave:ie(p,v),onTouchStart:ie(f,b)}]:[!1,g,{}]}a(_o,"usePrefetchBehavior");function ie(e,t){return r=>{e&&e(r),r.defaultPrevented||t(r)}}a(ie,"composeEventHandlers");function Ao(e,t,r){if(r&&!we)return[e[0]];if(t){let n=e.findIndex(o=>t[o.route.id]!==void 0);return e.slice(0,n+1)}return e}a(Ao,"getActiveMatches");function Do({page:e,...t}){let r=Xt(),{nonce:n}=J(),{router:o}=_e(),s=l.useMemo(()=>zt(o.routes,e,o.basename),[o.routes,e,o.basename]);return s?(t.nonce==null&&n&&(t={...t,nonce:n}),r?l.createElement(Lo,{page:e,matches:s,...t}):l.createElement(Mo,{page:e,matches:s,...t})):null}a(Do,"PrefetchPageLinks");function Po(e){let{manifest:t,routeModules:r}=J(),[n,o]=l.useState([]);return l.useEffect(()=>{let s=!1;return Io(e,t,r).then(i=>{s||o(i)}),()=>{s=!0}},[e,t,r]),n}a(Po,"useKeyedPrefetchLinks");function Lo({page:e,matches:t,...r}){let n=T(),{future:o}=J(),{basename:s}=_e(),i=l.useMemo(()=>{if(e===n.pathname+n.search+n.hash)return[];let u=ur(e,s,o.v8_trailingSlashAwareDataRequests,"rsc"),c=!1,m=[];for(let p of t)typeof p.route.shouldRevalidate=="function"?c=!0:m.push(p.route.id);return c&&m.length>0&&u.searchParams.set("_routes",m.join(",")),[u.pathname+u.search]},[s,o.v8_trailingSlashAwareDataRequests,e,n,t]);return l.createElement(l.Fragment,null,i.map(u=>l.createElement("link",{key:u,rel:"prefetch",as:"fetch",href:u,...r})))}a(Lo,"RSCPrefetchPageLinksImpl");function Mo({page:e,matches:t,...r}){let n=T(),{future:o,manifest:s,routeModules:i}=J(),{basename:u}=_e(),{loaderData:c,matches:m}=dr(),p=l.useMemo(()=>gt(e,t,m,s,n,"data"),[e,t,m,s,n]),f=l.useMemo(()=>gt(e,t,m,s,n,"assets"),[e,t,m,s,n]),g=l.useMemo(()=>{if(e===n.pathname+n.search+n.hash)return[];let y=new Set,h=!1;if(t.forEach(w=>{let I=s.routes[w.route.id];!I||!I.hasLoader||(!p.some(_=>_.route.id===w.route.id)&&w.route.id in c&&i[w.route.id]?.shouldRevalidate||I.hasClientLoader?h=!0:y.add(w.route.id))}),y.size===0)return[];let x=ur(e,u,o.v8_trailingSlashAwareDataRequests,"data");return h&&y.size>0&&x.searchParams.set("_routes",t.filter(w=>y.has(w.route.id)).map(w=>w.route.id).join(",")),[x.pathname+x.search]},[u,o.v8_trailingSlashAwareDataRequests,c,n,s,p,t,e,i]),b=l.useMemo(()=>cr(f,s),[f,s]),v=Po(f);return l.createElement(l.Fragment,null,g.map(y=>l.createElement("link",{key:y,rel:"prefetch",as:"fetch",href:y,...r})),b.map(y=>l.createElement("link",{key:y,rel:"modulepreload",href:y,...r})),v.map(({key:y,link:h})=>l.createElement("link",{key:y,nonce:r.nonce,...h,crossOrigin:h.crossOrigin??r.crossOrigin})))}a(Mo,"PrefetchPageLinksImpl");var we=!1;function To(){we=!0}a(To,"setIsHydrated");function Uo(e){let{manifest:t,serverHandoffString:r,isSpaMode:n,renderMeta:o,routeDiscovery:s,ssr:i,nonce:u}=J(),{router:c,static:m,staticContext:p}=_e(),{matches:f}=dr(),g=Xt(),b=Eo(s,i);e.nonce==null&&u&&(e={...e,nonce:u}),o&&(o.didRenderScripts=!0);let v=Ao(f,null,n);l.useEffect(()=>{To()},[]);let y=l.useMemo(()=>{if(g)return null;let w=p?`window.__reactRouterContext = ${r};window.__reactRouterContext.stream = new ReadableStream({start(controller){window.__reactRouterContext.streamController = controller;}}).pipeThrough(new TextEncoderStream());`:" ",I=m?`${t.hmr?.runtime?`import ${JSON.stringify(t.hmr.runtime)};`:""}${b?"":`import ${JSON.stringify(t.url)}`};
4
4
  ${v.map((_,C)=>{let A=`route${C}`,L=t.routes[_.route.id];$e(L,`Route ${_.route.id} not found in manifest`);let{clientActionModule:j,clientLoaderModule:D,clientMiddlewareModule:N,hydrateFallbackModule:G,module:U}=L,H=[...j?[{module:j,varName:`${A}_clientAction`}]:[],...D?[{module:D,varName:`${A}_clientLoader`}]:[],...N?[{module:N,varName:`${A}_clientMiddleware`}]:[],...G?[{module:G,varName:`${A}_HydrateFallback`}]:[],{module:U,varName:`${A}_main`}];return H.length===1?`import * as ${A} from ${JSON.stringify(U)};`:[H.map(z=>`import * as ${z.varName} from "${z.module}";`).join(`
@@ -1 +1 @@
1
- var xe=Object.defineProperty;var r=(t,a)=>xe(t,"name",{value:a,configurable:!0});import{i as ne}from"./rolldown-runtime-ZpX3ckPj.js";import{G as pe,Ia as he,Ra as ge,St as Y,Vi as W,ht as fe,na as X,ut as ye}from"./agent-avatar-url-eBzFMwFS.js";import{Vn as ve,i as T,n as je,r as be,s as re}from"./BreadcrumbContext-C-JqFdLZ.js";import{r as ee,t as Ne}from"./AgentAvatar-DySHTTwq.js";import{i as te,r as we,t as Ae}from"./tabs-C1f963Rn.js";import{a as Te}from"./ToastContext-BbzJdb2r.js";import{a as y,c as L,l as _,n as F,r as k}from"./select-yD0r8C3i.js";import{t as se}from"./input-BARyUoy0.js";import{o as Se,r as Ce}from"./company-members-CSVvQnvh.js";import{r as v,t as j}from"./card-GbQ9sLu8.js";import{t as Ee}from"./EmptyState-fxPFhH-R.js";import{Ot as Ie,b as ae,hn as Ue,in as Pe,rn as Re,tn as De,xn as Le}from"./index-st-IN4Gf.js";var l=ne(ge(),1),e=ne(he(),1),_e=50,n="__all",Fe=[{value:n,label:"All actions"},{value:"issue.",label:"Tasks"},{value:"agent.",label:"Agents"},{value:"heartbeat.",label:"Runs"},{value:"approval.",label:"Approvals"},{value:"project.",label:"Projects"},{value:"goal.",label:"Goals"},{value:"tool_gateway.",label:"Tools"},{value:"cost.",label:"Costs"},{value:"company.",label:"Company"}],ke=[{value:n,label:"All entities"},{value:"issue",label:"Task"},{value:"agent",label:"Agent"},{value:"project",label:"Project"},{value:"goal",label:"Goal"},{value:"company",label:"Company"}];function Be(t){if(!t)return;const a=new Date(`${t}T00:00:00.000Z`);return Number.isNaN(a.getTime())?void 0:a.toISOString()}r(Be,"toStartIso");function Ve(t){if(!t)return;const a=new Date(`${t}T23:59:59.999Z`);return Number.isNaN(a.getTime())?void 0:a.toISOString()}r(Ve,"toEndIso");function $e({record:t,agentMap:a,userProfileMap:d}){const u=t.agentId??(t.actorType==="agent"?t.actorId:null),c=u?a.get(u):null;if(c)return(0,e.jsxs)("span",{className:"inline-flex min-w-0 items-center gap-1.5",title:c.name,children:[(0,e.jsx)("span",{className:"flex h-5 w-5 shrink-0 items-center justify-center rounded-full bg-muted text-muted-foreground",children:(0,e.jsx)(Ne,{agent:c,size:16,className:"h-3 w-3"})}),(0,e.jsx)("span",{className:"truncate font-medium text-foreground",children:c.name})]});if(t.actorType==="user"&&t.actorId){const m=d.get(t.actorId);return(0,e.jsx)(ee,{name:m?.label??"User",avatarUrl:m?.image??null,size:"sm",className:"font-medium text-foreground"})}const h=t.actorType==="plugin"?"Plugin":t.actorType==="agent"?"Agent":t.actorType==="user"?"User":"System";return(0,e.jsx)(ee,{name:h,size:"sm",className:"font-medium text-foreground"})}r($e,"AuditActor");function qe({record:t}){const{issue:a,document:d}=t.entity,u=a?.identifier??a?.id??null;return u?(0,e.jsx)(re,{to:`/issues/${u}`,className:"font-medium text-primary hover:underline",children:a?.identifier?`${a.identifier}${a.title?` · ${a.title}`:""}`:"the task"}):d?(0,e.jsx)("span",{className:"font-medium text-foreground",children:d.key}):(0,e.jsx)("span",{className:"text-muted-foreground",children:t.entityType})}r(qe,"AuditEntityNode");function ze({record:t,agentMap:a,userProfileMap:d}){const u=Ie(t.action,t.details,{agentMap:a,userProfileMap:d}),c=t.responsibleUserId?d.get(t.responsibleUserId):null,h=!!(t.responsibleUserId&&!(t.actorType==="user"&&t.actorId===t.responsibleUserId)),m=c?.label??(t.responsibleUserId?"a user":null),g=t.entity.comment?.excerpt?.trim(),x=t.entity.issue&&t.entity.document?t.entity.document.key:null;return(0,e.jsx)("li",{className:"px-4 py-3 text-sm",children:(0,e.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,e.jsxs)("div",{className:"min-w-0 space-y-1",children:[(0,e.jsxs)("div",{className:"flex flex-wrap items-center gap-x-1.5 gap-y-1 text-foreground",children:[(0,e.jsx)($e,{record:t,agentMap:a,userProfileMap:d}),(0,e.jsx)("span",{className:"text-muted-foreground",children:u}),(0,e.jsx)(qe,{record:t})]}),g?(0,e.jsxs)("p",{className:"line-clamp-2 border-l-2 border-border pl-2 text-muted-foreground",children:["“",g,"”"]}):null,x?(0,e.jsxs)("p",{className:"text-xs text-muted-foreground",children:["Document ",(0,e.jsx)("span",{className:"font-mono text-(length:--text-micro)",children:x})]}):null,(0,e.jsxs)("div",{className:"flex flex-wrap items-center gap-2 text-xs text-muted-foreground",children:[h&&m?(0,e.jsxs)("span",{className:"inline-flex items-center rounded-full bg-muted px-2 py-0.5",children:["on behalf of ",m]}):null,t.runId&&t.agentId?(0,e.jsx)(re,{to:`/agents/${t.agentId}/runs/${t.runId}`,className:"text-primary hover:underline",children:"View run"}):null,(0,e.jsx)("span",{className:"font-mono text-(length:--text-micro) opacity-70",children:t.action})]})]}),(0,e.jsx)("time",{className:"shrink-0 whitespace-nowrap text-xs text-muted-foreground",dateTime:t.createdAt,title:new Date(t.createdAt).toLocaleString(),children:ye(t.createdAt)})]})})}r(ze,"AuditRow");function Me(){return(0,e.jsx)(j,{children:(0,e.jsxs)(v,{className:"flex flex-col items-center gap-3 py-14 text-center",children:[(0,e.jsx)(De,{className:"h-10 w-10 text-muted-foreground/50"}),(0,e.jsxs)("div",{children:[(0,e.jsx)("p",{className:"text-sm font-medium text-foreground",children:"Agent audit is a Paperclip Enterprise view"}),(0,e.jsxs)("p",{className:"mx-auto mt-1 max-w-md text-sm text-muted-foreground",children:["The agent audit log gives you a searchable, exportable record of everything your agents did — every comment, task change, approval, and run — with the responsible person for each action. Ask an administrator to grant you the"," ",(0,e.jsx)("span",{className:"font-mono text-(length:--text-micro)",children:"audit:view_agent_actions"})," ","permission to view it."]})]})]})})}r(Me,"AuditUpsell");function Oe({companyId:t,lockedAgentId:a,hideHeader:d,mode:u,onModeChange:c}){const{pushToast:h}=Te(),[m,g]=(0,l.useState)(n),[x,B]=(0,l.useState)(n),[S,V]=(0,l.useState)(n),[C,$]=(0,l.useState)(n),[E,q]=(0,l.useState)(""),[I,z]=(0,l.useState)(""),[Z,Q]=(0,l.useState)(!1),[U,H]=(0,l.useState)(!1),M=X({queryKey:Y.agents.list(t),queryFn:r(()=>be.list(t),"queryFn")}),O=X({queryKey:Y.access.companyUserDirectory(t),queryFn:r(()=>Se.listUserDirectory(t),"queryFn"),retry:!1}),ie=(0,l.useMemo)(()=>new Map((M.data??[]).map(s=>[s.id,s])),[M.data]),le=(0,l.useMemo)(()=>Ce(O.data?.users),[O.data]),f=a?"agents":u??"all",o={actorScope:f,agentId:a??(m===n?void 0:m),responsibleUserId:x===n?void 0:x,action:S===n?void 0:S,entityType:C===n?void 0:C,from:Be(E),to:Ve(I)},b=!!(!a&&m!==n||x!==n||S!==n||C!==n||E||I),i=Le({queryKey:Y.audit.agentActions(t,{actorScope:o.actorScope,agentId:o.agentId,responsibleUserId:o.responsibleUserId,action:o.action,entityType:o.entityType,from:o.from,to:o.to}),queryFn:r(({pageParam:s})=>ae.listAgentActions(t,{...o,limit:_e,cursor:s??void 0}),"queryFn"),initialPageParam:null,getNextPageParam:r(s=>s.nextCursor??void 0,"getNextPageParam"),retry:r((s,p)=>!(p instanceof W&&p.status===403)&&s<2,"retry")}),K=i.error instanceof W&&i.error.status===403,P=i.data?.pages.some(s=>s.accessTier==="basic")??!1,oe=i.data?.pages.some(s=>s.accessTier==="full")??!1,G=(0,l.useMemo)(()=>{const s=i.data?.pages??[];return(P?s.filter(p=>p.accessTier!=="full"):s).flatMap(p=>p.items)},[i.data,P]),R=P?"basic":i.data?.pages[0]?.accessTier,N=P&&oe,ce=a?!0:R==="full",de=!!(N&&U&&!i.isFetching),D=!!(!a&&!de&&(K&&b||N)),w=!!(K&&!a&&f==="agents"&&c),ue=!!(!a&&c&&!w&&(f==="agents"||R==="full"));(0,l.useEffect)(()=>{w&&c?.("all")},[w,c]),(0,l.useEffect)(()=>{!a&&(R==="basic"||D)&&(g(n),B(n),V(n),$(n),q(""),z(""))},[R,N,a,D]),(0,l.useEffect)(()=>{if(!N){U&&H(!1);return}U||(H(!0),i.refetch())},[U,i,N]);const J=r(()=>{g(n),B(n),V(n),$(n),q(""),z("")},"clearFilters"),me=r(async()=>{Q(!0);try{const s=await ae.exportAgentActionsCsv(t,{actorScope:o.actorScope,agentId:o.agentId,responsibleUserId:o.responsibleUserId,action:o.action,entityType:o.entityType,from:o.from,to:o.to}),p=URL.createObjectURL(s),A=document.createElement("a");A.href=p,A.download=`${f==="agents"?"agent-audit":"activity"}-${t}.csv`,document.body.appendChild(A),A.click(),A.remove(),window.setTimeout(()=>URL.revokeObjectURL(p),5e3),h({title:"Audit exported",body:"Your CSV download has started.",tone:"success"})}catch(s){h({title:"Export failed",body:s instanceof Error?s.message:"Could not export the audit log.",tone:"error"})}finally{Q(!1)}},"handleExport");return K&&!D&&!w?(0,e.jsx)(Me,{}):(0,e.jsxs)("div",{className:"space-y-4",children:[d?null:(0,e.jsx)("div",{className:"flex flex-wrap items-start justify-between gap-3",children:(0,e.jsxs)("div",{children:[(0,e.jsx)("h1",{className:"text-lg font-semibold text-foreground",children:"Activity"}),(0,e.jsx)("p",{className:"mt-1 max-w-2xl text-sm text-muted-foreground",children:f==="agents"?"Every recorded agent action, newest first — with the responsible person and run behind each one.":"Everything happening in your company, newest first — people, agents, and the system. Each line is one recorded action."})]})}),ue?(0,e.jsx)(Ae,{value:f,onValueChange:r(s=>c?.(s),"onValueChange"),children:(0,e.jsxs)(we,{"aria-label":"Activity scope",children:[(0,e.jsx)(te,{value:"all",children:"All activity"}),(0,e.jsx)(te,{value:"agents",children:"Agent actions"})]})}):null,ce?(0,e.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[a?null:(0,e.jsxs)(F,{value:m,onValueChange:g,children:[(0,e.jsx)(L,{className:"w-40",children:(0,e.jsx)(_,{placeholder:"Agent"})}),(0,e.jsxs)(k,{children:[(0,e.jsx)(y,{value:n,children:"All agents"}),(M.data??[]).map(s=>(0,e.jsx)(y,{value:s.id,children:s.name},s.id))]})]}),(0,e.jsxs)(F,{value:x,onValueChange:B,children:[(0,e.jsx)(L,{className:"w-52",children:(0,e.jsx)(_,{placeholder:"Responsible user"})}),(0,e.jsxs)(k,{children:[(0,e.jsx)(y,{value:n,children:"All responsible users"}),(O.data?.users??[]).map(s=>(0,e.jsx)(y,{value:s.principalId,children:s.user?.name??s.user?.email??s.principalId.slice(0,8)},s.principalId))]})]}),(0,e.jsxs)(F,{value:S,onValueChange:V,children:[(0,e.jsx)(L,{className:"w-36",children:(0,e.jsx)(_,{placeholder:"Action"})}),(0,e.jsx)(k,{children:Fe.map(s=>(0,e.jsx)(y,{value:s.value,children:s.label},s.value))})]}),(0,e.jsxs)(F,{value:C,onValueChange:$,children:[(0,e.jsx)(L,{className:"w-36",children:(0,e.jsx)(_,{placeholder:"Entity"})}),(0,e.jsx)(k,{children:ke.map(s=>(0,e.jsx)(y,{value:s.value,children:s.label},s.value))})]}),(0,e.jsx)(se,{type:"date","aria-label":"From date",value:E,max:I||void 0,onChange:r(s=>q(s.target.value),"onChange"),className:"w-36"}),(0,e.jsx)(se,{type:"date","aria-label":"To date",value:I,min:E||void 0,onChange:r(s=>z(s.target.value),"onChange"),className:"w-36"}),b?(0,e.jsx)(T,{variant:"ghost",size:"sm",onClick:J,children:"Clear filters"}):null,(0,e.jsxs)(T,{variant:"outline",size:"sm",className:"ml-auto",onClick:me,disabled:Z||i.isLoading||G.length===0,children:[(0,e.jsx)(Ue,{className:"mr-1.5 h-4 w-4"}),Z?"Exporting…":"Export CSV"]})]}):null,D||w?(0,e.jsx)(j,{children:(0,e.jsx)(v,{className:"py-14 text-center text-sm text-muted-foreground",children:"Refreshing audit access…"})}):i.isLoading?(0,e.jsx)(j,{children:(0,e.jsx)(v,{className:"py-14 text-center text-sm text-muted-foreground",children:"Loading…"})}):i.error?(0,e.jsx)(j,{children:(0,e.jsxs)(v,{className:"flex flex-col items-center gap-3 py-14 text-center",children:[(0,e.jsx)("p",{className:"text-sm text-muted-foreground",children:i.error instanceof Error?i.error.message:"Failed to load the audit log."}),(0,e.jsx)(T,{variant:"outline",size:"sm",onClick:r(()=>i.refetch(),"onClick"),children:"Try again"})]})}):G.length===0?(0,e.jsx)(j,{children:(0,e.jsxs)(v,{className:"flex flex-col items-center gap-3 py-14 text-center",children:[(0,e.jsx)(Re,{className:"h-10 w-10 text-muted-foreground/40"}),(0,e.jsxs)("div",{children:[(0,e.jsx)("p",{className:"text-sm font-medium text-foreground",children:b?"No actions match these filters":"Nothing here yet"}),(0,e.jsx)("p",{className:"mt-1 max-w-md text-sm text-muted-foreground",children:b?"Try a wider date range or different filters.":f==="agents"?"As soon as your agents start doing things, their actions show up here.":"As soon as anyone in your company does something, it shows up here."})]}),b?(0,e.jsx)(T,{variant:"outline",size:"sm",onClick:J,children:"Clear filters"}):null]})}):(0,e.jsx)(j,{children:(0,e.jsx)(v,{className:"px-0 py-0",children:(0,e.jsx)("ul",{className:pe("divide-y divide-border"),children:G.map(s=>(0,e.jsx)(ze,{record:s,agentMap:ie,userProfileMap:le},s.id))})})}),i.hasNextPage?(0,e.jsx)("div",{className:"flex justify-center",children:(0,e.jsx)(T,{variant:"outline",size:"sm",onClick:r(()=>i.fetchNextPage(),"onClick"),disabled:i.isFetchingNextPage,children:i.isFetchingNextPage?"Loading…":"Load more"})}):null,(0,e.jsx)("p",{className:"text-xs text-muted-foreground",children:"Recorded by Paperclip — entries can't be edited. Sensitive values are never stored."})]})}r(Oe,"AuditFeed");function nt(){const{selectedCompanyId:t}=fe(),{setBreadcrumbs:a}=je(),[d,u]=ve(),c=d.get("mode")==="agents"?"agents":"all";(0,l.useEffect)(()=>{a([{label:"Activity"}])},[a]);const h=(0,l.useCallback)(m=>{u(g=>{const x=new URLSearchParams(g);return m==="agents"?x.set("mode","agents"):x.delete("mode"),x},{replace:!0})},[u]);return t?(0,e.jsx)(Oe,{companyId:t,mode:c,onModeChange:h}):(0,e.jsx)(Ee,{icon:Pe,message:"Select a company to view activity."})}r(nt,"CompanyActivity");export{nt as CompanyActivity};
1
+ var xe=Object.defineProperty;var r=(t,a)=>xe(t,"name",{value:a,configurable:!0});import{i as ne}from"./rolldown-runtime-ZpX3ckPj.js";import{G as pe,Ia as he,Ra as ge,St as Y,Vi as W,ht as fe,na as X,ut as ye}from"./agent-avatar-url-CVV7dJ4l.js";import{Vn as ve,i as T,n as je,r as be,s as re}from"./BreadcrumbContext-k4_HOBKt.js";import{r as ee,t as Ne}from"./AgentAvatar-J8HJgoSh.js";import{i as te,r as we,t as Ae}from"./tabs-CFRGyc3-.js";import{a as Te}from"./ToastContext-CIri5s-I.js";import{a as y,c as L,l as _,n as F,r as k}from"./select-D6aktlIu.js";import{t as se}from"./input-BXe2NHXn.js";import{o as Se,r as Ce}from"./company-members-BmKruwkU.js";import{r as v,t as j}from"./card-BA46vwjn.js";import{t as Ee}from"./EmptyState-NmkkuFFc.js";import{Ot as Ie,b as ae,hn as Ue,in as Pe,rn as Re,tn as De,xn as Le}from"./index-jeBYC7ui.js";var l=ne(ge(),1),e=ne(he(),1),_e=50,n="__all",Fe=[{value:n,label:"All actions"},{value:"issue.",label:"Tasks"},{value:"agent.",label:"Agents"},{value:"heartbeat.",label:"Runs"},{value:"approval.",label:"Approvals"},{value:"project.",label:"Projects"},{value:"goal.",label:"Goals"},{value:"tool_gateway.",label:"Tools"},{value:"cost.",label:"Costs"},{value:"company.",label:"Company"}],ke=[{value:n,label:"All entities"},{value:"issue",label:"Task"},{value:"agent",label:"Agent"},{value:"project",label:"Project"},{value:"goal",label:"Goal"},{value:"company",label:"Company"}];function Be(t){if(!t)return;const a=new Date(`${t}T00:00:00.000Z`);return Number.isNaN(a.getTime())?void 0:a.toISOString()}r(Be,"toStartIso");function Ve(t){if(!t)return;const a=new Date(`${t}T23:59:59.999Z`);return Number.isNaN(a.getTime())?void 0:a.toISOString()}r(Ve,"toEndIso");function $e({record:t,agentMap:a,userProfileMap:d}){const u=t.agentId??(t.actorType==="agent"?t.actorId:null),c=u?a.get(u):null;if(c)return(0,e.jsxs)("span",{className:"inline-flex min-w-0 items-center gap-1.5",title:c.name,children:[(0,e.jsx)("span",{className:"flex h-5 w-5 shrink-0 items-center justify-center rounded-full bg-muted text-muted-foreground",children:(0,e.jsx)(Ne,{agent:c,size:16,className:"h-3 w-3"})}),(0,e.jsx)("span",{className:"truncate font-medium text-foreground",children:c.name})]});if(t.actorType==="user"&&t.actorId){const m=d.get(t.actorId);return(0,e.jsx)(ee,{name:m?.label??"User",avatarUrl:m?.image??null,size:"sm",className:"font-medium text-foreground"})}const h=t.actorType==="plugin"?"Plugin":t.actorType==="agent"?"Agent":t.actorType==="user"?"User":"System";return(0,e.jsx)(ee,{name:h,size:"sm",className:"font-medium text-foreground"})}r($e,"AuditActor");function qe({record:t}){const{issue:a,document:d}=t.entity,u=a?.identifier??a?.id??null;return u?(0,e.jsx)(re,{to:`/issues/${u}`,className:"font-medium text-primary hover:underline",children:a?.identifier?`${a.identifier}${a.title?` · ${a.title}`:""}`:"the task"}):d?(0,e.jsx)("span",{className:"font-medium text-foreground",children:d.key}):(0,e.jsx)("span",{className:"text-muted-foreground",children:t.entityType})}r(qe,"AuditEntityNode");function ze({record:t,agentMap:a,userProfileMap:d}){const u=Ie(t.action,t.details,{agentMap:a,userProfileMap:d}),c=t.responsibleUserId?d.get(t.responsibleUserId):null,h=!!(t.responsibleUserId&&!(t.actorType==="user"&&t.actorId===t.responsibleUserId)),m=c?.label??(t.responsibleUserId?"a user":null),g=t.entity.comment?.excerpt?.trim(),x=t.entity.issue&&t.entity.document?t.entity.document.key:null;return(0,e.jsx)("li",{className:"px-4 py-3 text-sm",children:(0,e.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,e.jsxs)("div",{className:"min-w-0 space-y-1",children:[(0,e.jsxs)("div",{className:"flex flex-wrap items-center gap-x-1.5 gap-y-1 text-foreground",children:[(0,e.jsx)($e,{record:t,agentMap:a,userProfileMap:d}),(0,e.jsx)("span",{className:"text-muted-foreground",children:u}),(0,e.jsx)(qe,{record:t})]}),g?(0,e.jsxs)("p",{className:"line-clamp-2 border-l-2 border-border pl-2 text-muted-foreground",children:["“",g,"”"]}):null,x?(0,e.jsxs)("p",{className:"text-xs text-muted-foreground",children:["Document ",(0,e.jsx)("span",{className:"font-mono text-(length:--text-micro)",children:x})]}):null,(0,e.jsxs)("div",{className:"flex flex-wrap items-center gap-2 text-xs text-muted-foreground",children:[h&&m?(0,e.jsxs)("span",{className:"inline-flex items-center rounded-full bg-muted px-2 py-0.5",children:["on behalf of ",m]}):null,t.runId&&t.agentId?(0,e.jsx)(re,{to:`/agents/${t.agentId}/runs/${t.runId}`,className:"text-primary hover:underline",children:"View run"}):null,(0,e.jsx)("span",{className:"font-mono text-(length:--text-micro) opacity-70",children:t.action})]})]}),(0,e.jsx)("time",{className:"shrink-0 whitespace-nowrap text-xs text-muted-foreground",dateTime:t.createdAt,title:new Date(t.createdAt).toLocaleString(),children:ye(t.createdAt)})]})})}r(ze,"AuditRow");function Me(){return(0,e.jsx)(j,{children:(0,e.jsxs)(v,{className:"flex flex-col items-center gap-3 py-14 text-center",children:[(0,e.jsx)(De,{className:"h-10 w-10 text-muted-foreground/50"}),(0,e.jsxs)("div",{children:[(0,e.jsx)("p",{className:"text-sm font-medium text-foreground",children:"Agent audit is a Paperclip Enterprise view"}),(0,e.jsxs)("p",{className:"mx-auto mt-1 max-w-md text-sm text-muted-foreground",children:["The agent audit log gives you a searchable, exportable record of everything your agents did — every comment, task change, approval, and run — with the responsible person for each action. Ask an administrator to grant you the"," ",(0,e.jsx)("span",{className:"font-mono text-(length:--text-micro)",children:"audit:view_agent_actions"})," ","permission to view it."]})]})]})})}r(Me,"AuditUpsell");function Oe({companyId:t,lockedAgentId:a,hideHeader:d,mode:u,onModeChange:c}){const{pushToast:h}=Te(),[m,g]=(0,l.useState)(n),[x,B]=(0,l.useState)(n),[S,V]=(0,l.useState)(n),[C,$]=(0,l.useState)(n),[E,q]=(0,l.useState)(""),[I,z]=(0,l.useState)(""),[Z,Q]=(0,l.useState)(!1),[U,H]=(0,l.useState)(!1),M=X({queryKey:Y.agents.list(t),queryFn:r(()=>be.list(t),"queryFn")}),O=X({queryKey:Y.access.companyUserDirectory(t),queryFn:r(()=>Se.listUserDirectory(t),"queryFn"),retry:!1}),ie=(0,l.useMemo)(()=>new Map((M.data??[]).map(s=>[s.id,s])),[M.data]),le=(0,l.useMemo)(()=>Ce(O.data?.users),[O.data]),f=a?"agents":u??"all",o={actorScope:f,agentId:a??(m===n?void 0:m),responsibleUserId:x===n?void 0:x,action:S===n?void 0:S,entityType:C===n?void 0:C,from:Be(E),to:Ve(I)},b=!!(!a&&m!==n||x!==n||S!==n||C!==n||E||I),i=Le({queryKey:Y.audit.agentActions(t,{actorScope:o.actorScope,agentId:o.agentId,responsibleUserId:o.responsibleUserId,action:o.action,entityType:o.entityType,from:o.from,to:o.to}),queryFn:r(({pageParam:s})=>ae.listAgentActions(t,{...o,limit:_e,cursor:s??void 0}),"queryFn"),initialPageParam:null,getNextPageParam:r(s=>s.nextCursor??void 0,"getNextPageParam"),retry:r((s,p)=>!(p instanceof W&&p.status===403)&&s<2,"retry")}),K=i.error instanceof W&&i.error.status===403,P=i.data?.pages.some(s=>s.accessTier==="basic")??!1,oe=i.data?.pages.some(s=>s.accessTier==="full")??!1,G=(0,l.useMemo)(()=>{const s=i.data?.pages??[];return(P?s.filter(p=>p.accessTier!=="full"):s).flatMap(p=>p.items)},[i.data,P]),R=P?"basic":i.data?.pages[0]?.accessTier,N=P&&oe,ce=a?!0:R==="full",de=!!(N&&U&&!i.isFetching),D=!!(!a&&!de&&(K&&b||N)),w=!!(K&&!a&&f==="agents"&&c),ue=!!(!a&&c&&!w&&(f==="agents"||R==="full"));(0,l.useEffect)(()=>{w&&c?.("all")},[w,c]),(0,l.useEffect)(()=>{!a&&(R==="basic"||D)&&(g(n),B(n),V(n),$(n),q(""),z(""))},[R,N,a,D]),(0,l.useEffect)(()=>{if(!N){U&&H(!1);return}U||(H(!0),i.refetch())},[U,i,N]);const J=r(()=>{g(n),B(n),V(n),$(n),q(""),z("")},"clearFilters"),me=r(async()=>{Q(!0);try{const s=await ae.exportAgentActionsCsv(t,{actorScope:o.actorScope,agentId:o.agentId,responsibleUserId:o.responsibleUserId,action:o.action,entityType:o.entityType,from:o.from,to:o.to}),p=URL.createObjectURL(s),A=document.createElement("a");A.href=p,A.download=`${f==="agents"?"agent-audit":"activity"}-${t}.csv`,document.body.appendChild(A),A.click(),A.remove(),window.setTimeout(()=>URL.revokeObjectURL(p),5e3),h({title:"Audit exported",body:"Your CSV download has started.",tone:"success"})}catch(s){h({title:"Export failed",body:s instanceof Error?s.message:"Could not export the audit log.",tone:"error"})}finally{Q(!1)}},"handleExport");return K&&!D&&!w?(0,e.jsx)(Me,{}):(0,e.jsxs)("div",{className:"space-y-4",children:[d?null:(0,e.jsx)("div",{className:"flex flex-wrap items-start justify-between gap-3",children:(0,e.jsxs)("div",{children:[(0,e.jsx)("h1",{className:"text-lg font-semibold text-foreground",children:"Activity"}),(0,e.jsx)("p",{className:"mt-1 max-w-2xl text-sm text-muted-foreground",children:f==="agents"?"Every recorded agent action, newest first — with the responsible person and run behind each one.":"Everything happening in your company, newest first — people, agents, and the system. Each line is one recorded action."})]})}),ue?(0,e.jsx)(Ae,{value:f,onValueChange:r(s=>c?.(s),"onValueChange"),children:(0,e.jsxs)(we,{"aria-label":"Activity scope",children:[(0,e.jsx)(te,{value:"all",children:"All activity"}),(0,e.jsx)(te,{value:"agents",children:"Agent actions"})]})}):null,ce?(0,e.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[a?null:(0,e.jsxs)(F,{value:m,onValueChange:g,children:[(0,e.jsx)(L,{className:"w-40",children:(0,e.jsx)(_,{placeholder:"Agent"})}),(0,e.jsxs)(k,{children:[(0,e.jsx)(y,{value:n,children:"All agents"}),(M.data??[]).map(s=>(0,e.jsx)(y,{value:s.id,children:s.name},s.id))]})]}),(0,e.jsxs)(F,{value:x,onValueChange:B,children:[(0,e.jsx)(L,{className:"w-52",children:(0,e.jsx)(_,{placeholder:"Responsible user"})}),(0,e.jsxs)(k,{children:[(0,e.jsx)(y,{value:n,children:"All responsible users"}),(O.data?.users??[]).map(s=>(0,e.jsx)(y,{value:s.principalId,children:s.user?.name??s.user?.email??s.principalId.slice(0,8)},s.principalId))]})]}),(0,e.jsxs)(F,{value:S,onValueChange:V,children:[(0,e.jsx)(L,{className:"w-36",children:(0,e.jsx)(_,{placeholder:"Action"})}),(0,e.jsx)(k,{children:Fe.map(s=>(0,e.jsx)(y,{value:s.value,children:s.label},s.value))})]}),(0,e.jsxs)(F,{value:C,onValueChange:$,children:[(0,e.jsx)(L,{className:"w-36",children:(0,e.jsx)(_,{placeholder:"Entity"})}),(0,e.jsx)(k,{children:ke.map(s=>(0,e.jsx)(y,{value:s.value,children:s.label},s.value))})]}),(0,e.jsx)(se,{type:"date","aria-label":"From date",value:E,max:I||void 0,onChange:r(s=>q(s.target.value),"onChange"),className:"w-36"}),(0,e.jsx)(se,{type:"date","aria-label":"To date",value:I,min:E||void 0,onChange:r(s=>z(s.target.value),"onChange"),className:"w-36"}),b?(0,e.jsx)(T,{variant:"ghost",size:"sm",onClick:J,children:"Clear filters"}):null,(0,e.jsxs)(T,{variant:"outline",size:"sm",className:"ml-auto",onClick:me,disabled:Z||i.isLoading||G.length===0,children:[(0,e.jsx)(Ue,{className:"mr-1.5 h-4 w-4"}),Z?"Exporting…":"Export CSV"]})]}):null,D||w?(0,e.jsx)(j,{children:(0,e.jsx)(v,{className:"py-14 text-center text-sm text-muted-foreground",children:"Refreshing audit access…"})}):i.isLoading?(0,e.jsx)(j,{children:(0,e.jsx)(v,{className:"py-14 text-center text-sm text-muted-foreground",children:"Loading…"})}):i.error?(0,e.jsx)(j,{children:(0,e.jsxs)(v,{className:"flex flex-col items-center gap-3 py-14 text-center",children:[(0,e.jsx)("p",{className:"text-sm text-muted-foreground",children:i.error instanceof Error?i.error.message:"Failed to load the audit log."}),(0,e.jsx)(T,{variant:"outline",size:"sm",onClick:r(()=>i.refetch(),"onClick"),children:"Try again"})]})}):G.length===0?(0,e.jsx)(j,{children:(0,e.jsxs)(v,{className:"flex flex-col items-center gap-3 py-14 text-center",children:[(0,e.jsx)(Re,{className:"h-10 w-10 text-muted-foreground/40"}),(0,e.jsxs)("div",{children:[(0,e.jsx)("p",{className:"text-sm font-medium text-foreground",children:b?"No actions match these filters":"Nothing here yet"}),(0,e.jsx)("p",{className:"mt-1 max-w-md text-sm text-muted-foreground",children:b?"Try a wider date range or different filters.":f==="agents"?"As soon as your agents start doing things, their actions show up here.":"As soon as anyone in your company does something, it shows up here."})]}),b?(0,e.jsx)(T,{variant:"outline",size:"sm",onClick:J,children:"Clear filters"}):null]})}):(0,e.jsx)(j,{children:(0,e.jsx)(v,{className:"px-0 py-0",children:(0,e.jsx)("ul",{className:pe("divide-y divide-border"),children:G.map(s=>(0,e.jsx)(ze,{record:s,agentMap:ie,userProfileMap:le},s.id))})})}),i.hasNextPage?(0,e.jsx)("div",{className:"flex justify-center",children:(0,e.jsx)(T,{variant:"outline",size:"sm",onClick:r(()=>i.fetchNextPage(),"onClick"),disabled:i.isFetchingNextPage,children:i.isFetchingNextPage?"Loading…":"Load more"})}):null,(0,e.jsx)("p",{className:"text-xs text-muted-foreground",children:"Recorded by Paperclip — entries can't be edited. Sensitive values are never stored."})]})}r(Oe,"AuditFeed");function nt(){const{selectedCompanyId:t}=fe(),{setBreadcrumbs:a}=je(),[d,u]=ve(),c=d.get("mode")==="agents"?"agents":"all";(0,l.useEffect)(()=>{a([{label:"Activity"}])},[a]);const h=(0,l.useCallback)(m=>{u(g=>{const x=new URLSearchParams(g);return m==="agents"?x.set("mode","agents"):x.delete("mode"),x},{replace:!0})},[u]);return t?(0,e.jsx)(Oe,{companyId:t,mode:c,onModeChange:h}):(0,e.jsx)(Ee,{icon:Pe,message:"Select a company to view activity."})}r(nt,"CompanyActivity");export{nt as CompanyActivity};
@@ -1,4 +1,4 @@
1
- var ze=Object.defineProperty;var d=(e,r)=>ze(e,"name",{value:r,configurable:!0});import{i as we}from"./rolldown-runtime-ZpX3ckPj.js";import{$t as De,Bi as te,Ct as _e,Er as Ue,G as ne,Ia as We,Ra as qe,St as G,ht as Ke,na as X,ta as pe}from"./agent-avatar-url-eBzFMwFS.js";import{Ln as Ye,f as Ze,i as H,it as Ge,lt as z,n as Xe,r as He,y as Je}from"./BreadcrumbContext-C-JqFdLZ.js";import{Z as Ve}from"./mention-chips-BEoxPZei.js";import{h as Qe}from"./StatusIcon-DxxLvme9.js";import{a as et}from"./ToastContext-BbzJdb2r.js";import{t as fe}from"./MarkdownBody-CEcIElD-.js";import{r as tt}from"./badge-CUe24HAP.js";import{t as me}from"./rotate-ccw-BT1r8zDE.js";import{t as D}from"./EmptyState-fxPFhH-R.js";import{t as st}from"./PageSkeleton-iVZWoLsF.js";import{Jt as nt,Pt as rt,Ut as ot,a as at,dt as it,ft as he,hn as ct,ht as lt,i as dt,mt as ut,n as pt,pt as ft,r as mt,t as je,ut as ht}from"./index-st-IN4Gf.js";var h=we(qe(),1),xt=["agents","projects","skills","routines","tasks","attachments"],gt={agents:"Agents",projects:"Projects",skills:"Skills",routines:"Routines",tasks:"Tasks",attachments:"Attachments"};function bt(){return{agents:!0,projects:!0,skills:!0,routines:!0,tasks:!0,attachments:!0}}d(bt,"buildDefaultExportCategorySelection");function ye(e){return e.tasks||e.routines}d(ye,"isAttachmentsCategoryEnabled");function ve(e){const r=new Set;for(const a of e){if(!a.recurring)continue;const n=a.path.trim();if(!n)continue;r.add(n);const o=n.lastIndexOf("/");o>=0&&r.add(`${n.slice(0,o+1)}`)}return r}d(ve,"buildRecurringTaskPrefixes");function wt(e,r){for(const a of r)if(e===a||e.startsWith(a))return!0;return!1}d(wt,"isRecurringTaskFile");function jt(e){const r=new Set,a=new Set;for(const n of e)for(const o of n.attachments??[]){const c=o.sha256.trim().toLowerCase();c&&(n.recurring?r:a).add(c)}return{recurring:r,oneOff:a}}d(jt,"buildAttachmentShaOwnership");var yt=new Set(["agents","projects","skills","routines","tasks"]);function vt(e){const r=new Map;for(const a of e){const n=a.sha256.trim().toLowerCase();if(!n)continue;const o=r.get(n)??new Set,c=a.ownedBy&&a.ownedBy.length>0?a.ownedBy:["always"];for(const p of c)o.add(p);r.set(n,o)}return r}d(vt,"buildEmbeddedAssetShaOwnership");function kt(e,r){for(const a of e)if(!yt.has(a)||r[a])return!0;return!1}d(kt,"isEmbeddedAssetBlobIncluded");function ke(e,r){return e.startsWith("agents/")?"agents":e.startsWith("projects/")?"projects":e.startsWith("skills/")?"skills":e.startsWith("tasks/")?wt(e,r)?"routines":"tasks":e.startsWith("blobs/")?"attachments":null}d(ke,"categorizeExportFile");function St(e,r){const a=ve(r),n={agents:0,projects:0,skills:0,routines:0,tasks:0,attachments:0};for(const o of e){const c=ke(o,a);c&&(n[c]+=1)}return n}d(St,"countExportFilesByCategory");function Ct(e){const{filePaths:r,issues:a,categories:n}=e,o=ve(a),c=jt(a),p=vt(e.embeddedAssets??[]),f=n.attachments&&ye(n),x=new Set;for(const l of r){const b=ke(l,o);if(b===null){x.add(l);continue}if(b==="attachments"){const i=l.slice(6).trim().toLowerCase(),g=p.get(i);if(g&&kt(g,n)){x.add(l);continue}if(!f)continue;const j=c.recurring.has(i),y=c.oneOff.has(i);!j&&!y?g||x.add(l):(y&&n.tasks||j&&n.routines)&&x.add(l);continue}n[b]&&x.add(l)}return x}d(Ct,"buildExportCheckedFiles");function Se(e,r){if(!r.has(e))return r.add(e),e;let a=2;for(;;){const n=`${e}-${a}`;if(!r.has(n))return r.add(n),n;a+=1}}d(Se,"uniqueSlug");function Et(e){const r=new Set,a=new Map,n=[...e].sort((o,c)=>o.name.localeCompare(c.name));for(const o of n){const c=Ue(o.name)??"agent";a.set(o.id,Se(c,r))}return a}d(Et,"buildPortableAgentSlugMap");function Nt(e){const r=new Set,a=new Map,n=[...e].sort((o,c)=>o.name.localeCompare(c.name));for(const o of n){const c=De(o.name,o.name);a.set(o.id,Se(c,r))}return a}d(Nt,"buildPortableProjectSlugMap");function At(e){const r=Et(e.agents),a=Nt(e.projects),n={agents:e.orderedAgents.map(o=>r.get(o.id)).filter(o=>!!o),projects:e.orderedProjects.map(o=>a.get(o.id)).filter(o=>!!o)};return n.agents.length>0||n.projects.length>0?n:void 0}d(At,"buildPortableSidebarOrder");var t=we(We(),1);function Ce(e){const r=new Set,a=new Set,n=new Set;for(const o of e){const c=o.match(/^agents\/([^/]+)\//);c&&r.add(c[1]);const p=o.match(/^projects\/([^/]+)\//);p&&a.add(p[1]);const f=o.match(/^tasks\/([^/]+)\//);f&&n.add(f[1])}return{agents:r,projects:a,tasks:n,routines:new Set(n)}}d(Ce,"checkedSlugs");function Pt(e,r){const a=Ce(r),n=e.split(`
1
+ var ze=Object.defineProperty;var d=(e,r)=>ze(e,"name",{value:r,configurable:!0});import{i as we}from"./rolldown-runtime-ZpX3ckPj.js";import{$t as De,Bi as te,Ct as _e,Er as Ue,G as ne,Ia as We,Ra as qe,St as G,ht as Ke,na as X,ta as pe}from"./agent-avatar-url-CVV7dJ4l.js";import{Ln as Ye,f as Ze,i as H,it as Ge,lt as z,n as Xe,r as He,y as Je}from"./BreadcrumbContext-k4_HOBKt.js";import{Z as Ve}from"./mention-chips-DvkvqPRN.js";import{h as Qe}from"./StatusIcon-fJLmzCDW.js";import{a as et}from"./ToastContext-CIri5s-I.js";import{t as fe}from"./MarkdownBody-DZY1Poyt.js";import{r as tt}from"./badge-Kf867ezN.js";import{t as me}from"./rotate-ccw-ChQUphBj.js";import{t as D}from"./EmptyState-NmkkuFFc.js";import{t as st}from"./PageSkeleton-Bk-YktL6.js";import{Jt as nt,Pt as rt,Ut as ot,a as at,dt as it,ft as he,hn as ct,ht as lt,i as dt,mt as ut,n as pt,pt as ft,r as mt,t as je,ut as ht}from"./index-jeBYC7ui.js";var h=we(qe(),1),xt=["agents","projects","skills","routines","tasks","attachments"],gt={agents:"Agents",projects:"Projects",skills:"Skills",routines:"Routines",tasks:"Tasks",attachments:"Attachments"};function bt(){return{agents:!0,projects:!0,skills:!0,routines:!0,tasks:!0,attachments:!0}}d(bt,"buildDefaultExportCategorySelection");function ye(e){return e.tasks||e.routines}d(ye,"isAttachmentsCategoryEnabled");function ve(e){const r=new Set;for(const a of e){if(!a.recurring)continue;const n=a.path.trim();if(!n)continue;r.add(n);const o=n.lastIndexOf("/");o>=0&&r.add(`${n.slice(0,o+1)}`)}return r}d(ve,"buildRecurringTaskPrefixes");function wt(e,r){for(const a of r)if(e===a||e.startsWith(a))return!0;return!1}d(wt,"isRecurringTaskFile");function jt(e){const r=new Set,a=new Set;for(const n of e)for(const o of n.attachments??[]){const c=o.sha256.trim().toLowerCase();c&&(n.recurring?r:a).add(c)}return{recurring:r,oneOff:a}}d(jt,"buildAttachmentShaOwnership");var yt=new Set(["agents","projects","skills","routines","tasks"]);function vt(e){const r=new Map;for(const a of e){const n=a.sha256.trim().toLowerCase();if(!n)continue;const o=r.get(n)??new Set,c=a.ownedBy&&a.ownedBy.length>0?a.ownedBy:["always"];for(const p of c)o.add(p);r.set(n,o)}return r}d(vt,"buildEmbeddedAssetShaOwnership");function kt(e,r){for(const a of e)if(!yt.has(a)||r[a])return!0;return!1}d(kt,"isEmbeddedAssetBlobIncluded");function ke(e,r){return e.startsWith("agents/")?"agents":e.startsWith("projects/")?"projects":e.startsWith("skills/")?"skills":e.startsWith("tasks/")?wt(e,r)?"routines":"tasks":e.startsWith("blobs/")?"attachments":null}d(ke,"categorizeExportFile");function St(e,r){const a=ve(r),n={agents:0,projects:0,skills:0,routines:0,tasks:0,attachments:0};for(const o of e){const c=ke(o,a);c&&(n[c]+=1)}return n}d(St,"countExportFilesByCategory");function Ct(e){const{filePaths:r,issues:a,categories:n}=e,o=ve(a),c=jt(a),p=vt(e.embeddedAssets??[]),f=n.attachments&&ye(n),x=new Set;for(const l of r){const b=ke(l,o);if(b===null){x.add(l);continue}if(b==="attachments"){const i=l.slice(6).trim().toLowerCase(),g=p.get(i);if(g&&kt(g,n)){x.add(l);continue}if(!f)continue;const j=c.recurring.has(i),y=c.oneOff.has(i);!j&&!y?g||x.add(l):(y&&n.tasks||j&&n.routines)&&x.add(l);continue}n[b]&&x.add(l)}return x}d(Ct,"buildExportCheckedFiles");function Se(e,r){if(!r.has(e))return r.add(e),e;let a=2;for(;;){const n=`${e}-${a}`;if(!r.has(n))return r.add(n),n;a+=1}}d(Se,"uniqueSlug");function Et(e){const r=new Set,a=new Map,n=[...e].sort((o,c)=>o.name.localeCompare(c.name));for(const o of n){const c=Ue(o.name)??"agent";a.set(o.id,Se(c,r))}return a}d(Et,"buildPortableAgentSlugMap");function Nt(e){const r=new Set,a=new Map,n=[...e].sort((o,c)=>o.name.localeCompare(c.name));for(const o of n){const c=De(o.name,o.name);a.set(o.id,Se(c,r))}return a}d(Nt,"buildPortableProjectSlugMap");function At(e){const r=Et(e.agents),a=Nt(e.projects),n={agents:e.orderedAgents.map(o=>r.get(o.id)).filter(o=>!!o),projects:e.orderedProjects.map(o=>a.get(o.id)).filter(o=>!!o)};return n.agents.length>0||n.projects.length>0?n:void 0}d(At,"buildPortableSidebarOrder");var t=we(We(),1);function Ce(e){const r=new Set,a=new Set,n=new Set;for(const o of e){const c=o.match(/^agents\/([^/]+)\//);c&&r.add(c[1]);const p=o.match(/^projects\/([^/]+)\//);p&&a.add(p[1]);const f=o.match(/^tasks\/([^/]+)\//);f&&n.add(f[1])}return{agents:r,projects:a,tasks:n,routines:new Set(n)}}d(Ce,"checkedSlugs");function Pt(e,r){const a=Ce(r),n=e.split(`
2
2
  `),o=[],c=new Set(["agents","projects","tasks","routines"]),p=new Set(["agents","projects"]);let f=null,x=null,l=!0,b=null,i=null,g=[],j=null,y=[];function T(){i!==null&&g.length>0&&(y.push(i),y.push(...g)),i=null,g=[]}d(T,"flushSidebarSection");function N(){T(),j!==null&&y.length>0&&(o.push(j),o.push(...y)),j=null,y=[]}d(N,"flushSection");for(const w of n){const U=w.match(/^([a-zA-Z_][\w-]*):\s*(.*)$/);if(U&&!w.startsWith(" ")){N(),x=null,l=!0;const E=U[0].split(":")[0];if(c.has(E)){f=E,j=w;continue}else if(E==="sidebar"){f=E,b=null,j=w;continue}else{f=null,o.push(w);continue}}if(f==="sidebar"){const E=w.match(/^ ([\w-]+):\s*$/);if(E&&!w.startsWith(" ")){T();const A=E[1];b=A&&p.has(A)?A:null,i=b?w:null;continue}const L=w.match(/^ - ["']?([^"'\n]+)["']?\s*$/);if(L&&b){const A=L[1],W=a[b];A&&W.has(A)&&g.push(w);continue}if(b){g.push(w);continue}}if(f&&c.has(f)){const E=w.match(/^ ([\w][\w-]*):\s*(.*)$/);if(E&&!w.startsWith(" ")){const L=E[1];x=L,l=a[f].has(L),l&&y.push(w);continue}if(x!==null){l&&y.push(w);continue}y.push(w);continue}o.push(w)}N();let C=o.join(`
3
3
  `);const _=C.match(/^\s{2}logoPath:\s*["']?([^"'\n]+)["']?\s*$/m);return _&&!r.has(_[1])&&(C=C.replace(/^\s{2}logoPath:\s*["']?([^"'\n]+)["']?\s*\n?/m,"")),C}d(Pt,"filterPaperclipYaml");function Ee(e,r){if(!r)return e;const a=r.toLowerCase();return e.map(n=>{if(n.kind==="file")return n.name.toLowerCase().includes(a)||n.path.toLowerCase().includes(a)?n:null;const o=Ee(n.children,r);return o.length>0?{...n,children:o}:null}).filter(n=>n!==null)}d(Ee,"filterTree");function Rt(e,r){const a=new Set,n=r.toLowerCase();function o(c,p){if(c.kind==="file"){if(c.name.toLowerCase().includes(n)||c.path.toLowerCase().includes(n))for(const f of p)a.add(f)}else for(const f of c.children)o(f,[...p,c.path])}d(o,"walk");for(const c of e)o(c,[]);return a}d(Rt,"collectMatchedParentDirs");var xe=10;function Tt(e,r,a,n){let o=0,c=0;return{nodes:e.map(p=>{if(p.kind==="dir"&&p.name==="tasks"){o=p.children.length;const f=[],x=[],l=a.toLowerCase();for(const g of p.children){const j=ft([g],"file"),y=n!==null&&j.has(n),T=a&&(g.name.toLowerCase().includes(l)||g.path.toLowerCase().includes(l)||[...j].some(N=>N.toLowerCase().includes(l)));y||T?f.push(g):x.push(g)}const b=Math.max(0,r-f.length),i=[...f,...x.slice(0,b)];return c=i.length,{...p,children:i}}return p}),totalTaskChildren:o,visibleTaskChildren:c}}d(Tt,"paginateTaskNodes");function Ne(e,r,a){const n={};for(const o of Object.keys(e))r.has(o)&&(n[o]=a[o]??e[o]);return n}d(Ne,"filterExportForDownload");function Lt(e,r,a){const n=Ne(e.files,r,a),o=dt(n,e.rootPath),c=new ArrayBuffer(o.byteLength);new Uint8Array(c).set(o);const p=new Blob([c],{type:"application/zip"}),f=URL.createObjectURL(p),x=document.createElement("a");x.href=f,x.download=`${e.rootPath}.zip`,document.body.appendChild(x),x.click(),x.remove(),window.setTimeout(()=>URL.revokeObjectURL(f),1e3)}d(Lt,"downloadZip");function Ot({data:e,onSkillClick:r}){return(0,t.jsx)("div",{className:"rounded-md border border-border bg-accent/20 px-4 py-3 mb-4",children:(0,t.jsx)("dl",{className:"grid grid-cols-(--gtc-5) gap-x-4 gap-y-1.5 text-sm",children:Object.entries(e).map(([a,n])=>(0,t.jsxs)("div",{className:"contents",children:[(0,t.jsx)("dt",{className:"text-muted-foreground whitespace-nowrap py-0.5",children:ht[a]??a}),(0,t.jsx)("dd",{className:"py-0.5",children:Array.isArray(n)?(0,t.jsx)("div",{className:"flex flex-wrap gap-1.5",children:n.map(o=>(0,t.jsx)("button",{type:"button",className:ne("inline-flex items-center rounded-md border border-border bg-background px-2 py-0.5 text-xs",a==="skills"&&r&&"cursor-pointer hover:bg-accent/50 hover:border-foreground/30 transition-colors"),onClick:d(()=>a==="skills"&&r?.(o),"onClick"),children:o},o))}):(0,t.jsx)("span",{children:n})})]},a))})})}d(Ot,"FrontmatterCard");var Mt={ceo:"CEO",cto:"CTO",cmo:"CMO",cfo:"CFO",coo:"COO",vp:"VP",manager:"Manager",engineer:"Engineer",agent:"Agent"};function Ft(e,r,a,n){const o=Ce(r),c=e.agents.filter(i=>o.agents.has(i.slug)),p=e.projects.filter(i=>o.projects.has(i.slug)),f=e.issues.filter(i=>o.tasks.has(i.slug)),x=e.skills.filter(i=>[...r].some(g=>g.startsWith(`skills/${i.key}/`)||g.startsWith("skills/")&&g.includes(`/${i.slug}/`))),l=[];l.push(`# ${a}`),l.push(""),n&&(l.push(`> ${n}`),l.push("")),c.length>0&&(l.push("![Org Chart](images/org-chart.png)"),l.push("")),l.push("## What's Inside"),l.push(""),l.push("This is an [Agent Company](https://paperclip.ing) package."),l.push("");const b=[];if(c.length>0&&b.push(["Agents",c.length]),p.length>0&&b.push(["Projects",p.length]),x.length>0&&b.push(["Skills",x.length]),f.length>0&&b.push(["Tasks",f.length]),b.length>0){l.push("| Content | Count |"),l.push("|---------|-------|");for(const[i,g]of b)l.push(`| ${i} | ${g} |`);l.push("")}if(c.length>0){l.push("### Agents"),l.push(""),l.push("| Agent | Role | Reports To |"),l.push("|-------|------|------------|");for(const i of c){const g=Mt[i.role]??i.role,j=i.reportsToSlug??"—";l.push(`| ${i.name} | ${g} | ${j} |`)}l.push("")}if(p.length>0){l.push("### Projects"),l.push("");for(const i of p){const g=i.description?` — ${i.description}`:"";l.push(`- **${i.name}**${g}`)}l.push("")}return l.push("## Getting Started"),l.push(""),l.push("```bash"),l.push("npx @tickernelz/paperclip-pro company import this-github-url-or-folder"),l.push("```"),l.push(""),l.push("See [Paperclip](https://paperclip.ing) for more information."),l.push(""),l.push("---"),l.push(`Exported from [Paperclip](https://paperclip.ing) on ${new Date().toISOString().split("T")[0]}`),l.push(""),l.join(`
4
4
  `)}d(Ft,"generateReadmeFromSelection");function It(e){const{src:r,selectedFile:a,allFiles:n,orgChartPreviewUrl:o}=e;if(/^(?:https?:|data:)/i.test(r))return null;if(r.replace(/^\.\//,"")==="images/org-chart.png"&&o)return o;const c=(a.includes("/")?a.slice(0,a.lastIndexOf("/")+1):"")+r,p=n[c]??n[r];return p?je(c in n?c:r,p):null}d(It,"resolveExportPreviewImageSrc");function $t({selectedFile:e,content:r,allFiles:a,orgChartPreviewUrl:n,onSkillClick:o}){if(!e||r===null)return(0,t.jsx)(D,{icon:z,message:"Select a file to preview its contents."});const c=pt(r),p=e.endsWith(".md")&&c!==null,f=p&&c?lt(c):null,x=mt(e,r)?je(e,r):null,l=p?b=>It({src:b,selectedFile:e,allFiles:a,orgChartPreviewUrl:n}):void 0;return(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsx)("div",{className:"border-b border-border px-5 py-3",children:(0,t.jsx)("div",{className:"truncate font-mono text-sm",children:e})}),(0,t.jsx)("div",{className:"min-h-(--sz-560px) px-5 py-5",children:f?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(Ot,{data:f.data,onSkillClick:o}),f.body.trim()&&(0,t.jsx)(fe,{resolveImageSrc:l,softBreaks:!1,linkIssueReferences:!1,children:f.body})]}):p?(0,t.jsx)(fe,{resolveImageSrc:l,softBreaks:!1,linkIssueReferences:!1,children:c??""}):x?(0,t.jsx)("div",{className:"flex min-h-(--sz-520px) items-center justify-center rounded-lg border border-border bg-accent/10 p-6",children:(0,t.jsx)("img",{src:x,alt:e,className:"max-h-(--sz-480px) max-w-full object-contain"})}):c!==null?(0,t.jsx)("pre",{className:"overflow-x-auto whitespace-pre-wrap break-words border-0 bg-transparent p-0 font-mono text-sm text-foreground",children:(0,t.jsx)("code",{children:c})}):(0,t.jsx)("div",{className:"rounded-lg border border-border bg-accent/10 px-4 py-3 text-sm text-muted-foreground",children:"Binary asset preview is not available for this file type."})})]})}d($t,"ExportPreviewPane");function ge(e){const r="/company/export/files/",a=Je(e),n=a.indexOf(r);return n===-1?null:decodeURIComponent(a.slice(n+22))||null}d(ge,"filePathFromLocation");function be(e){const r=e.split("/").slice(0,-1),a=[];let n="";for(const o of r)n=n?`${n}/${o}`:o,a.push(n);return a}d(be,"expandAncestors");function Bt(e){return(e instanceof DOMException||e instanceof Error)&&e.name==="AbortError"}d(Bt,"isAbortError");function se(e){return e instanceof Error?e.message:"Failed to load export data."}d(se,"previewErrorMessage");function Vt(){const{selectedCompanyId:e,selectedCompany:r}=Ke(),{setBreadcrumbs:a}=Xe(),{pushToast:n}=et(),o=Ze(),c=Ye(),p=(0,h.useRef)(ge(c.pathname)),{data:f}=X({queryKey:G.auth.session,queryFn:d(()=>_e.getSession(),"queryFn")}),{data:x=[]}=X({queryKey:G.agents.list(e),queryFn:d(()=>He.list(e),"queryFn"),enabled:!!e}),{data:l=[]}=X({queryKey:G.projects.list(e),queryFn:d(()=>Qe.list(e),"queryFn"),enabled:!!e}),{data:b}=X({queryKey:G.companies.exportFidelity(e),queryFn:d(()=>te.exportFidelity(e),"queryFn"),enabled:!!e}),[i,g]=(0,h.useState)(null),[j,y]=(0,h.useState)(null),[T,N]=(0,h.useState)(new Set),[C,_]=(0,h.useState)(()=>({...bt(),tasks:!1,routines:!1,attachments:!1})),[w,U]=(0,h.useState)(""),[E,L]=(0,h.useState)(xe),[A,W]=(0,h.useState)(!1),q=(0,h.useRef)(null),I=(0,h.useRef)(null),M=(0,h.useRef)(0),re=(0,h.useRef)(null),oe=f?.user?.id??f?.session?.userId??null,J=(0,h.useMemo)(()=>x.filter(s=>s.status!=="terminated"),[x]),V=(0,h.useMemo)(()=>l,[l]),{orderedAgents:ae}=nt({agents:J,companyId:e,userId:oe}),{orderedProjects:ie}=ot({projects:V,companyId:e,userId:oe}),ce=(0,h.useMemo)(()=>At({agents:J,orderedAgents:ae,projects:V,orderedProjects:ie}),[ae,ie,J,V]),Q=C.tasks||C.routines,ee=(0,h.useCallback)((s,u=!1)=>{y(s),s?o(`/company/export/files/${encodeURI(s)}`,{replace:u}):o("/company/export",{replace:u})},[o]);(0,h.useEffect)(()=>{if(!i)return;const s=ge(c.pathname);s&&s in i.files&&s!==j?(y(s),N(u=>{const m=new Set(u);for(const v of be(s))m.add(v);return m})):!s&&j&&y(null)},[c.pathname,i]),(0,h.useEffect)(()=>{a([{label:r?.name??"Organization",href:"/dashboard"},{label:"Settings",href:"/company/settings"},{label:"Export"}])},[r?.name,a]);const P=pe({mutationFn:d(({includeIssues:s,includeSkills:u,signal:m})=>te.exportPreview(e,{include:{company:!0,agents:!0,projects:!0,issues:s,skills:u},sidebarOrder:ce},{signal:m}),"mutationFn"),onSuccess:d((s,u)=>{if(u.requestId!==M.current)return;g(s);const m=he(s.files),v=new Set;for(const k of m)k.kind==="dir"&&k.name!=="tasks"&&v.add(k.path);const S=p.current;if(S&&S in s.files){y(S);const k=be(S);N(new Set([...v,...k]))}else{const k="README.md"in s.files?"README.md":Object.keys(s.files)[0];k&&ee(k,!0),N(v)}},"onSuccess"),onError:d((s,u)=>{u.requestId!==M.current||Bt(s)||n({tone:"error",title:"Export failed",body:se(s)})},"onError")});function F(){if(!e)return;I.current?.abort();const s=new AbortController,u=M.current+1;M.current=u,I.current=s,W(!1),P.mutate({includeIssues:Q,includeSkills:C.skills,requestId:u,signal:s.signal})}d(F,"startPreviewRequest");const K=pe({mutationFn:d(()=>te.exportBundle(e,{include:{company:!0,agents:!0,projects:!0,issues:Q,skills:C.skills},selectedFiles:Array.from(R).sort(),sidebarOrder:ce}),"mutationFn"),onSuccess:d(s=>{const u=new Set(Object.keys(s.files));Lt(s,u,s.files),n({tone:"success",title:"Export downloaded",body:`${u.size} file${u.size===1?"":"s"} exported as ${s.rootPath}.zip`})},"onSuccess"),onError:d(s=>{n({tone:"error",title:"Export failed",body:s instanceof Error?s.message:"Failed to build export package."})},"onError")});(0,h.useEffect)(()=>{e&&(re.current!==e&&(re.current=e,g(null),y(null)),F())},[e,Q,C.skills]),(0,h.useEffect)(()=>()=>{M.current+=1,I.current?.abort()},[]);const O=(0,h.useMemo)(()=>i?he(i.files):[],[i]),R=(0,h.useMemo)(()=>i?Ct({filePaths:Object.keys(i.files),issues:i.manifest.issues,categories:C,embeddedAssets:i.manifest.embeddedAssets??[]}):new Set,[i,C]),Ae=(0,h.useMemo)(()=>i?St(Object.keys(i.files),i.manifest.issues):null,[i]),{displayTree:Pe,totalTaskChildren:le,visibleTaskChildren:de}=(0,h.useMemo)(()=>{let s=O;w&&(s=Ee(s,w));const u=Tt(s,E,w,j);return{displayTree:u.nodes,totalTaskChildren:u.totalTaskChildren,visibleTaskChildren:u.visibleTaskChildren}},[O,w,E,j]),Re=(0,h.useMemo)(()=>{const s={};function u(m){if(m.kind==="file"){const S=R.has(m.path);return S||(s[m.path]="muted"),S}let v=!1;for(const S of m.children)u(S)&&(v=!0);return v||(s[m.path]="muted"),v}d(u,"walk");for(const m of O)u(m);return s},[O,R]),Y=(0,h.useMemo)(()=>{if(!i)return{};const s={...i.files},u=i.paperclipExtensionPath;if(u&&typeof i.files[u]=="string"&&(s[u]=Pt(i.files[u],R)),typeof i.files["README.md"]=="string"){const m=i.manifest.company?.name??r?.name??"Company",v=i.manifest.company?.description??null;s["README.md"]=Ft(i.manifest,R,m,v)}return s},[i,R,r?.name]),Te=(0,h.useMemo)(()=>i?at(Ne(i.files,R,Y),i.rootPath):0,[i,R,Y]),ue=(0,h.useMemo)(()=>ut(O),[O]),$=R.size,B=(0,h.useMemo)(()=>i?i.warnings.filter(s=>!/terminated agent/i.test(s)):[],[i]);function Le(s){N(u=>{const m=new Set(u);return m.has(s)?m.delete(s):m.add(s),m})}d(Le,"handleToggleDir");function Oe(s){_(u=>({...u,[s]:!u[s]}))}d(Oe,"handleToggleCategory");function Me(s){const u=w.length>0,m=s.length>0;if(m&&!u&&(q.current=new Set(T)),U(s),m){const v=Rt(O,s);N(S=>{const k=new Set(S);for(const Z of v)k.add(Z);return k})}else u&&q.current&&(N(q.current),q.current=null)}d(Me,"handleSearchChange");function Fe(s){if(!i)return;const u=i.manifest.skills.find(m=>m.key===s||m.slug===s)?.path??`skills/${s}/SKILL.md`;u in i.files&&(ee(u),N(m=>{const v=new Set(m);v.add("skills");const S=u.split("/").slice(0,-1);let k="";for(const Z of S)k=k?`${k}/${Z}`:Z,v.add(k);return v}))}d(Fe,"handleSkillClick");function Ie(){!i||R.size===0||K.isPending||K.mutate()}d(Ie,"handleDownload");function $e(){M.current+=1,I.current?.abort(),I.current=null,P.reset(),W(!0)}if(d($e,"handleCancelPreview"),!e)return(0,t.jsx)(D,{icon:z,message:"Select an organization to export."});if(P.isPending&&!i)return(0,t.jsx)(st,{variant:"detail"});if(A&&!i)return(0,t.jsx)(D,{icon:z,title:"Export preview cancelled",message:"The preview request was cancelled. Your export settings are unchanged.",action:"Retry preview",onAction:F,hideActionIcon:!0});if(P.isError&&!i)return(0,t.jsx)(D,{icon:z,title:"Export preview failed",message:se(P.error),description:"Retry the preview. You do not need to reload this page.",action:"Retry preview",onAction:F,hideActionIcon:!0});if(!i)return(0,t.jsx)(D,{icon:z,title:"Export preview unavailable",message:"No export preview is loaded.",action:"Load preview",onAction:F,hideActionIcon:!0});const Be=j?Y[j]??null:null;return(0,t.jsxs)("div",{className:"max-w-6xl",children:[(0,t.jsx)("div",{className:"sticky top-0 z-10 border-b border-border bg-background px-5 py-3",children:(0,t.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-4 text-sm",children:[(0,t.jsxs)("span",{className:"font-medium",children:[r?.name??"Organization"," export"]}),(0,t.jsxs)("span",{className:"text-muted-foreground",children:["Exporting ",$.toLocaleString()," of ",ue.toLocaleString()," file",ue===1?"":"s",$>0&&` (~${rt(Te)})`]}),B.length>0&&(0,t.jsxs)("span",{className:"text-amber-500",children:[B.length," warning",B.length===1?"":"s"]})]}),(0,t.jsxs)(H,{size:"sm",onClick:Ie,disabled:$===0||K.isPending||P.isPending||P.isError||A,children:[(0,t.jsx)(ct,{className:"mr-1.5 h-3.5 w-3.5"}),K.isPending?"Building export...":`Export ${$.toLocaleString()} file${$===1?"":"s"}`]})]})}),B.length>0&&(0,t.jsx)("div",{className:"mx-5 mt-3 rounded-md border border-amber-500/30 bg-amber-500/5 px-4 py-3",children:B.map(s=>(0,t.jsx)("div",{className:"text-xs text-amber-500",children:s},s))}),b&&b.warnings.length>0&&(0,t.jsxs)("div",{className:"mx-5 mt-3 rounded-md border border-amber-500/30 bg-amber-500/5 px-4 py-3",children:[(0,t.jsx)("h3",{className:"mb-1.5 text-xs font-medium",children:"Not included in this export"}),b.warnings.map(s=>(0,t.jsx)("div",{className:ne("text-xs",s.severity==="blocker"?"font-medium text-destructive":"text-amber-500"),children:s.message},s.code))]}),(0,t.jsxs)("div",{className:"grid gap-4 xl:h-(--sz-calc-30) xl:grid-cols-(--gtc-25) xl:gap-0",children:[(0,t.jsxs)("aside",{className:"flex max-h-(--sz-24rem) flex-col overflow-hidden border-b border-border xl:max-h-none xl:border-b-0 xl:border-r",children:[(0,t.jsx)("div",{className:"border-b border-border px-4 py-3 shrink-0",children:(0,t.jsx)("h2",{className:"text-base font-semibold",children:"Package files"})}),(0,t.jsxs)("div",{className:"border-b border-border px-4 py-3 shrink-0",children:[(0,t.jsx)("h3",{className:"mb-2 text-xs font-medium text-muted-foreground",children:"What to include"}),(0,t.jsx)("div",{className:"grid grid-cols-2 gap-x-4 gap-y-1.5",role:"group","aria-label":"What to include",children:xt.map(s=>{const u=s==="attachments"&&!ye(C),m=C[s]&&!u,v=Ae?.[s]??0,S=i.manifest.includes.issues||s!=="tasks"&&s!=="routines"&&s!=="attachments";return(0,t.jsxs)("label",{className:ne("flex items-center gap-2 text-sm",u?"cursor-not-allowed opacity-50":"cursor-pointer"),title:u?"Attachments travel with tasks and routines; re-enable one of them to include attachments.":void 0,children:[(0,t.jsx)("input",{type:"checkbox",checked:m,disabled:u,onChange:d(()=>Oe(s),"onChange"),className:"accent-foreground","data-export-category":s}),(0,t.jsx)("span",{className:"min-w-0 truncate",children:gt[s]}),(0,t.jsx)("span",{className:"text-xs text-muted-foreground",children:S?v.toLocaleString():"—"})]},s)})}),(0,t.jsx)("p",{className:"mt-2 text-xs text-muted-foreground",children:"Task and routine history is opt-in because it can be large."})]}),(0,t.jsx)("div",{className:"border-b border-border px-3 py-2 shrink-0",children:(0,t.jsxs)("div",{className:"flex items-center gap-2 rounded-md border border-border px-2 py-1",children:[(0,t.jsx)(Ge,{className:"h-3.5 w-3.5 text-muted-foreground shrink-0"}),(0,t.jsx)("input",{type:"text",value:w,onChange:d(s=>Me(s.target.value),"onChange"),placeholder:"Search files...",className:"w-full bg-transparent text-sm outline-none placeholder:text-muted-foreground","data-page-search-target":"true"})]})}),(0,t.jsxs)("div",{className:"flex-1 overflow-y-auto",children:[(0,t.jsx)(it,{nodes:Pe,selectedFile:j,expandedDirs:T,onToggleDir:Le,onSelectFile:ee,fileTones:Re,showCheckboxes:!1,wrapLabels:!1}),le>de&&!w&&(0,t.jsx)("div",{className:"px-4 py-2",children:(0,t.jsxs)("button",{type:"button",onClick:d(()=>L(s=>s+xe),"onClick"),className:"w-full rounded-md border border-border px-3 py-1.5 text-xs text-muted-foreground hover:bg-accent/30 hover:text-foreground transition-colors",children:["Show more tasks (",de," of ",le,")"]})})]})]}),(0,t.jsxs)("div",{className:"relative min-w-0 overflow-y-auto xl:pl-6",children:[(0,t.jsx)($t,{selectedFile:j,content:Be,allFiles:Y,orgChartPreviewUrl:`/api/companies/${encodeURIComponent(e)}/org.svg`,onSkillClick:Fe}),P.isPending?(0,t.jsx)("div",{className:"absolute inset-0 z-10 flex min-h-(--sz-520px) items-center justify-center bg-background/90 px-6 text-center",role:"status","aria-live":"polite","aria-busy":"true","data-export-preview-state":"loading",children:(0,t.jsxs)("div",{className:"flex max-w-md flex-col items-center gap-3",children:[(0,t.jsx)(tt,{className:"h-6 w-6 animate-spin text-muted-foreground"}),(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-sm font-medium",children:"Updating export preview…"}),(0,t.jsx)("p",{className:"mt-1 text-xs text-muted-foreground",children:"Large task histories can take a minute. You can untick Tasks or cancel this update."})]}),(0,t.jsxs)(H,{type:"button",variant:"outline",size:"sm",onClick:$e,children:[(0,t.jsx)(Ve,{}),"Cancel update"]})]})}):A?(0,t.jsx)("div",{className:"absolute inset-0 z-10 flex min-h-(--sz-520px) items-center justify-center bg-background/90 px-6 text-center","data-export-preview-state":"cancelled",children:(0,t.jsxs)("div",{className:"flex max-w-md flex-col items-center gap-3",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-sm font-medium",children:"Preview update cancelled"}),(0,t.jsx)("p",{className:"mt-1 text-xs text-muted-foreground",children:"The previous preview remains available. Retry when you are ready."})]}),(0,t.jsxs)(H,{type:"button",variant:"outline",size:"sm",onClick:F,children:[(0,t.jsx)(me,{}),"Retry preview"]})]})}):P.isError?(0,t.jsx)("div",{className:"absolute inset-0 z-10 flex min-h-(--sz-520px) items-center justify-center bg-background/90 px-6 text-center",role:"alert","data-export-preview-state":"error",children:(0,t.jsxs)("div",{className:"flex max-w-md flex-col items-center gap-3",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-sm font-medium text-destructive",children:"Export preview failed"}),(0,t.jsx)("p",{className:"mt-1 text-xs text-muted-foreground",children:se(P.error)})]}),(0,t.jsxs)(H,{type:"button",variant:"outline",size:"sm",onClick:F,children:[(0,t.jsx)(me,{}),"Retry preview"]})]})}):null]})]})]})}d(Vt,"CompanyExport");export{Vt as CompanyExport};
@@ -1,4 +1,4 @@
1
- var gr=Object.defineProperty;var n=(t,l)=>gr(t,"name",{value:l,configurable:!0});import{i as yn}from"./rolldown-runtime-ZpX3ckPj.js";import{Fa as fr,G as M,Ia as br,Ra as jr,St as f,ht as vr,na as xe,t as ge,ta as Y,ut as yr}from"./agent-avatar-url-eBzFMwFS.js";import{Bn as kr,Vn as Nr,ct as jt,f as wr,ft as Sr,i as y,it as Cr,n as Fr,r as Hs,s as pe,tt as kn,vt as Ir,xt as Ft}from"./BreadcrumbContext-C-JqFdLZ.js";import{Z as Dr}from"./mention-chips-BEoxPZei.js";import{d as qe,m as Nn,p as $e,u as ze}from"./alert-dialog-Ctnjtpv6.js";import{t as rn}from"./AgentAvatar-DySHTTwq.js";import{D as Lr,E as Ws,O as Br,T as Pr,_ as xt,a as bs,c as js,f as Bs,h as Ze,m as Ps,n as vt,o as As,r as vs,s as yt,t as Er,u as ys,v as Ls,w as Es,y as Tr}from"./checkbox-Cm-PyDSt.js";import{c as _,f as Ar,t as Kr}from"./MarkdownEditor-B6kwxxZP.js";import{i as Ts,r as wn,t as Sn}from"./tabs-C1f963Rn.js";import{p as It}from"./StatusIcon-DxxLvme9.js";import{l as Cn,o as Mr,r as Fn,s as Rr,t as qr}from"./use-adapter-capabilities-CsKGmy5W.js";import{t as In}from"./check-VcfFMsHr.js";import{a as $r,s as gs}from"./ToastContext-BbzJdb2r.js";import{a as Dn,i as Dt,s as Ln}from"./clipboard-CYFyFXxJ.js";import{r as ht,t as zr}from"./use-copy-action-B-Azftuv.js";import{n as _r,t as fs}from"./external-link-CAutrcht.js";import{E as Ur,t as kt}from"./MarkdownBody-CEcIElD-.js";import{t as Lt}from"./file-text-Dik8gyob.js";import{d as Vr,u as Bn}from"./sheet-CAjfRCp9.js";import{t as le}from"./badge-CUe24HAP.js";import{t as Re}from"./input-BARyUoy0.js";import{t as es}from"./EmptyState-fxPFhH-R.js";import{t as Be}from"./PageSkeleton-iVZWoLsF.js";import{$t as Or,Ct as pt,Et as Pn,G as Qr,H as Hr,J as Gr,K as Wr,Q as Yr,St as Gs,Tt as En,U as Xr,W as Zr,X as Jr,Y as ea,Z as sa,_ as ta,an as na,at as an,bt as gt,c as ra,cn as aa,d as la,et as ia,f as Ks,fn as oa,g as da,gn as ca,h as ua,hn as Nt,in as Tn,it as An,jt as ma,kt as xa,l as ha,ln as pa,lt as he,m as Kn,mn as Mn,nn as ga,nt as fa,o as ba,ot as Je,p as ft,pn as ks,rt as ja,s as va,sn as wt,tt as ya,u as ka,v as Na,vn as St,vt as Bt,wt as wa,xt as Sa,y as Ca,yn as ln,yt as Fa}from"./index-st-IN4Gf.js";var c=yn(jr(),1),e=yn(br(),1),on=16,dn=24,cn="min-h-9";function un(t){return(0,e.jsx)("svg",{viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",...t,children:(0,e.jsx)("path",{d:"M12 4 21 19H3z"})})}n(un,"VercelMark");function Rn(t){const l=t.replace(/\r\n/g,`
1
+ var gr=Object.defineProperty;var n=(t,l)=>gr(t,"name",{value:l,configurable:!0});import{i as yn}from"./rolldown-runtime-ZpX3ckPj.js";import{Fa as fr,G as M,Ia as br,Ra as jr,St as f,ht as vr,na as xe,t as ge,ta as Y,ut as yr}from"./agent-avatar-url-CVV7dJ4l.js";import{Bn as kr,Vn as Nr,ct as jt,f as wr,ft as Sr,i as y,it as Cr,n as Fr,r as Hs,s as pe,tt as kn,vt as Ir,xt as Ft}from"./BreadcrumbContext-k4_HOBKt.js";import{Z as Dr}from"./mention-chips-DvkvqPRN.js";import{d as qe,m as Nn,p as $e,u as ze}from"./alert-dialog-DKXtvS0x.js";import{t as rn}from"./AgentAvatar-J8HJgoSh.js";import{D as Lr,E as Ws,O as Br,T as Pr,_ as xt,a as bs,c as js,f as Bs,h as Ze,m as Ps,n as vt,o as As,r as vs,s as yt,t as Er,u as ys,v as Ls,w as Es,y as Tr}from"./checkbox-DekJl2RJ.js";import{c as _,f as Ar,t as Kr}from"./MarkdownEditor-BlZgaClg.js";import{i as Ts,r as wn,t as Sn}from"./tabs-CFRGyc3-.js";import{p as It}from"./StatusIcon-fJLmzCDW.js";import{l as Cn,o as Mr,r as Fn,s as Rr,t as qr}from"./use-adapter-capabilities-1OSpmnRd.js";import{t as In}from"./check-CGphZTSp.js";import{a as $r,s as gs}from"./ToastContext-CIri5s-I.js";import{a as Dn,i as Dt,s as Ln}from"./clipboard-BftXMlFg.js";import{r as ht,t as zr}from"./use-copy-action-C4qGxoRm.js";import{n as _r,t as fs}from"./external-link-CRVf_Q8M.js";import{E as Ur,t as kt}from"./MarkdownBody-DZY1Poyt.js";import{t as Lt}from"./file-text-BKI87XaT.js";import{d as Vr,u as Bn}from"./sheet-C7Sbfc1a.js";import{t as le}from"./badge-Kf867ezN.js";import{t as Re}from"./input-BXe2NHXn.js";import{t as es}from"./EmptyState-NmkkuFFc.js";import{t as Be}from"./PageSkeleton-Bk-YktL6.js";import{$t as Or,Ct as pt,Et as Pn,G as Qr,H as Hr,J as Gr,K as Wr,Q as Yr,St as Gs,Tt as En,U as Xr,W as Zr,X as Jr,Y as ea,Z as sa,_ as ta,an as na,at as an,bt as gt,c as ra,cn as aa,d as la,et as ia,f as Ks,fn as oa,g as da,gn as ca,h as ua,hn as Nt,in as Tn,it as An,jt as ma,kt as xa,l as ha,ln as pa,lt as he,m as Kn,mn as Mn,nn as ga,nt as fa,o as ba,ot as Je,p as ft,pn as ks,rt as ja,s as va,sn as wt,tt as ya,u as ka,v as Na,vn as St,vt as Bt,wt as wa,xt as Sa,y as Ca,yn as ln,yt as Fa}from"./index-jeBYC7ui.js";var c=yn(jr(),1),e=yn(br(),1),on=16,dn=24,cn="min-h-9";function un(t){return(0,e.jsx)("svg",{viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",...t,children:(0,e.jsx)("path",{d:"M12 4 21 19H3z"})})}n(un,"VercelMark");function Rn(t){const l=t.replace(/\r\n/g,`
2
2
  `);if(!l.startsWith(`---
3
3
  `))return l.trim();const a=l.indexOf(`
4
4
  ---
@@ -1 +1 @@
1
- var l=Object.defineProperty;var n=(s,t)=>l(s,"name",{value:t,configurable:!0});import{i as o}from"./rolldown-runtime-ZpX3ckPj.js";import{Ia as c}from"./agent-avatar-url-eBzFMwFS.js";import{ct as i,i as u}from"./BreadcrumbContext-C-JqFdLZ.js";var e=o(c(),1);function b({icon:s,title:t,message:m,description:r,action:a,onAction:x,hideActionIcon:d=!1}){return(0,e.jsxs)("div",{className:"flex flex-col items-center justify-center py-16 text-center",children:[(0,e.jsx)("div",{className:"bg-muted/50 p-4 mb-4",children:(0,e.jsx)(s,{className:"h-10 w-10 text-muted-foreground/50"})}),t?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("p",{className:"text-base font-semibold text-foreground mb-1.5",children:t}),(0,e.jsx)("p",{className:"text-sm text-muted-foreground mb-4 max-w-md",children:m})]}):(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("p",{className:"text-sm font-medium text-foreground mb-1",children:m}),r&&(0,e.jsx)("p",{className:"max-w-md text-sm text-muted-foreground mb-4",children:r})]}),a&&x&&(0,e.jsxs)(u,{onClick:x,children:[!d&&(0,e.jsx)(i,{className:"h-4 w-4 mr-1.5"}),a]})]})}n(b,"EmptyState");export{b as t};
1
+ var l=Object.defineProperty;var n=(s,t)=>l(s,"name",{value:t,configurable:!0});import{i as o}from"./rolldown-runtime-ZpX3ckPj.js";import{Ia as c}from"./agent-avatar-url-CVV7dJ4l.js";import{ct as i,i as u}from"./BreadcrumbContext-k4_HOBKt.js";var e=o(c(),1);function b({icon:s,title:t,message:m,description:r,action:a,onAction:x,hideActionIcon:d=!1}){return(0,e.jsxs)("div",{className:"flex flex-col items-center justify-center py-16 text-center",children:[(0,e.jsx)("div",{className:"bg-muted/50 p-4 mb-4",children:(0,e.jsx)(s,{className:"h-10 w-10 text-muted-foreground/50"})}),t?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("p",{className:"text-base font-semibold text-foreground mb-1.5",children:t}),(0,e.jsx)("p",{className:"text-sm text-muted-foreground mb-4 max-w-md",children:m})]}):(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("p",{className:"text-sm font-medium text-foreground mb-1",children:m}),r&&(0,e.jsx)("p",{className:"max-w-md text-sm text-muted-foreground mb-4",children:r})]}),a&&x&&(0,e.jsxs)(u,{onClick:x,children:[!d&&(0,e.jsx)(i,{className:"h-4 w-4 mr-1.5"}),a]})]})}n(b,"EmptyState");export{b as t};
@@ -1,5 +1,5 @@
1
1
  const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/mermaid.core-Be3XJK9z.js","assets/preload-helper-CceJXRIF.js","assets/chunk-Y2CYZVJY-OvsAdhaO.js","assets/src-Bssc388C.js","assets/rolldown-runtime-ZpX3ckPj.js","assets/chunk-DU6HZSFF-mLZ_DAj9.js","assets/chunk-75Z2AOVW-CTyOxDW3.js","assets/dist-Cj4C2HPs.js","assets/chunk-PWAF6VOD-DHqPPKbd.js","assets/chunk-GMAD6QVW-Vk29EsOn.js","assets/chunk-P2QGCYS3-DD1uZyrA.js","assets/chunk-4HAMMTFA-Duh1dbZg.js","assets/rough.esm-DnC5Tr1g.js","assets/chunk-GVQU2GXP-D5bNpR4K.js","assets/chunk-OSK3NFVY-BfvIkdmA.js","assets/line-Dk_ouzM8.js","assets/path-D6mommQw.js","assets/array-CL5Tisss.js","assets/graphlib-DHhK3saS.js","assets/chunk-L3NEJ4N5-GADujcju.js"])))=>i.map(i=>d[i]);
2
- var tr=Object.defineProperty;var i=(e,t)=>tr(e,"name",{value:t,configurable:!0});import{i as ve,n as nr,t as pe}from"./rolldown-runtime-ZpX3ckPj.js";import{Fa as Ze,G as $,Hi as ge,Ia as rr,Na as or,Ra as ir,Sa as lr,St as ee,Tr as ur,Vi as gt,gt as Je,n as Vt,na as Qe}from"./agent-avatar-url-eBzFMwFS.js";import{t as ar}from"./preload-helper-CceJXRIF.js";import{I as sr,Kt as cr,Ln as qt,d as pr,f as fr,ft as dr,m as hr,p as mr,r as gr,s as et,un as Xt}from"./BreadcrumbContext-C-JqFdLZ.js";import{$ as Dr,C as yr,D as Gt,F as $e,H as ae,I as Dt,J as tt,K,L as Fr,P as T,R as wr,S as Cr,U as se,W as kr,Y as re,_ as Er,c as Ar,d as br,et as vr,f as xr,g as fe,h as Sr,i as Yt,j as nt,k as yt,l as Ir,m as Br,p as Pr,r as Zt,u as Lr,x as rt,z as Rr}from"./mention-chips-BEoxPZei.js";import{c as jr,l as Jt,m as Ft,p as _r,r as Qt,s as Tr,t as Nr,u as Mr}from"./StatusIcon-DxxLvme9.js";import{t as Or}from"./check-VcfFMsHr.js";import{a as zr,i as Ur,n as $r,o as Hr,t as Wr}from"./clipboard-CYFyFXxJ.js";import{n as Kr,t as Vr}from"./external-link-CAutrcht.js";var en={name:"file-code-corner",size:24,node:[["path",{d:"M4 12.15V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2h-3.35",key:"1wthlu"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"m5 16-3 3 3 3",key:"331omg"}],["path",{d:"m9 22 3-3-3-3",key:"lsp7cz"}]],aliases:["file-code-2"]};en.node;var qr=Vt(en),tn={name:"text-wrap",size:24,node:[["path",{d:"m16 16-3 3 3 3",key:"117b85"}],["path",{d:"M3 12h14.5a1 1 0 0 1 0 7H13",key:"18xa6z"}],["path",{d:"M3 19h6",key:"1ygdsz"}],["path",{d:"M3 5h18",key:"1u36vt"}]],aliases:["wrap-text"]};tn.node;var Xr=Vt(tn);function ie(e){const t=[];let n=-1,r=0,o=0;for(;++n<e.length;){const u=e.charCodeAt(n);let l="";if(u===37&&se(e.charCodeAt(n+1))&&se(e.charCodeAt(n+2)))o=2;else if(u<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(u))||(l=String.fromCharCode(u));else if(u>55295&&u<57344){const a=e.charCodeAt(n+1);u<56320&&a>56319&&a<57344?(l=String.fromCharCode(u,a),o=1):l="�"}else l=String.fromCharCode(u);l&&(t.push(e.slice(r,n),encodeURIComponent(l)),r=n+o+1,l=""),o&&(n+=o,o=0)}return t.join("")+e.slice(r)}i(ie,"normalizeUri");var y=ve(ir(),1),D=ve(rr(),1);function Gr(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}i(Gr,"escapeStringRegexp");var nn="paperclip.theme",Yr="#18181b",Zr="#ffffff",rn=(0,y.createContext)(void 0);function Jr(){return typeof document>"u"||document.documentElement.classList.contains("dark")?"dark":"light"}i(Jr,"resolveThemeFromDocument");function Qr(){if(typeof window>"u")return!1;try{const e=window.localStorage.getItem(nn);return e==="light"||e==="dark"}catch{return!1}}i(Qr,"hasStoredTheme");function eo(e){if(typeof document>"u")return;const t=e==="dark",n=document.documentElement;n.classList.toggle("dark",t),n.style.colorScheme=t?"dark":"light";const r=document.querySelector('meta[name="theme-color"]');r instanceof HTMLMetaElement&&r.setAttribute("content",t?Yr:Zr)}i(eo,"applyTheme");function as({children:e}){const[t,n]=(0,y.useState)(()=>Jr()),[r,o]=(0,y.useState)(()=>Qr()),u=(0,y.useCallback)(s=>{o(!0),n(s)},[]),l=(0,y.useCallback)(()=>{o(!0),n(s=>s==="dark"?"light":"dark")},[]);(0,y.useEffect)(()=>{if(eo(t),!!r)try{localStorage.setItem(nn,t)}catch{}},[t,r]),(0,y.useEffect)(()=>{if(r||typeof window>"u"||typeof window.matchMedia!="function")return;const s=window.matchMedia("(prefers-color-scheme: dark)"),p=i(f=>{n(f.matches?"dark":"light")},"handleChange");return s.addEventListener("change",p),()=>s.removeEventListener("change",p)},[r]);const a=(0,y.useMemo)(()=>({theme:t,setTheme:u,toggleTheme:l}),[t,u,l]);return(0,D.jsx)(rn.Provider,{value:a,children:e})}i(as,"ThemeProvider");function to(){const e=(0,y.useContext)(rn);if(!e)throw new Error("useTheme must be used within ThemeProvider");return e}i(to,"useTheme");function no(e,t){const n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}i(no,"stringify$1");var ro=/[ \t\n\f\r]/g;function oo(e){return typeof e=="object"?e.type==="text"?wt(e.value):!1:wt(e)}i(oo,"whitespace");function wt(e){return e.replace(ro,"")===""}i(wt,"empty");var de=class{static{i(this,"Schema")}constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};de.prototype.normal={};de.prototype.property={};de.prototype.space=void 0;function on(e,t){const n={},r={};for(const o of e)Object.assign(n,o.property),Object.assign(r,o.normal);return new de(n,r,t)}i(on,"merge");function He(e){return e.toLowerCase()}i(He,"normalize$1");var M=class{static{i(this,"Info")}constructor(e,t){this.attribute=t,this.property=e}};M.prototype.attribute="";M.prototype.booleanish=!1;M.prototype.boolean=!1;M.prototype.commaOrSpaceSeparated=!1;M.prototype.commaSeparated=!1;M.prototype.defined=!1;M.prototype.mustUseProperty=!1;M.prototype.number=!1;M.prototype.overloadedBoolean=!1;M.prototype.property="";M.prototype.spaceSeparated=!1;M.prototype.space=void 0;var We=nr({boolean:i(()=>b,"boolean"),booleanish:i(()=>_,"booleanish"),commaOrSpaceSeparated:i(()=>z,"commaOrSpaceSeparated"),commaSeparated:i(()=>Q,"commaSeparated"),number:i(()=>m,"number"),overloadedBoolean:i(()=>Ke,"overloadedBoolean"),spaceSeparated:i(()=>R,"spaceSeparated")}),io=0,b=te(),_=te(),Ke=te(),m=te(),R=te(),Q=te(),z=te();function te(){return 2**++io}i(te,"increment");var Se=Object.keys(We),ot=class extends M{static{i(this,"DefinedInfo")}constructor(e,t,n,r){let o=-1;if(super(e,t),Ct(this,"space",r),typeof n=="number")for(;++o<Se.length;){const u=Se[o];Ct(this,Se[o],(n&We[u])===We[u])}}};ot.prototype.defined=!0;function Ct(e,t,n){n&&(e[t]=n)}i(Ct,"mark");function le(e){const t={},n={};for(const[r,o]of Object.entries(e.properties)){const u=new ot(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(u.mustUseProperty=!0),t[r]=u,n[He(r)]=r,n[He(u.attribute)]=r}return new de(t,n,e.space)}i(le,"create");var ln=le({properties:{ariaActiveDescendant:null,ariaAtomic:_,ariaAutoComplete:null,ariaBusy:_,ariaChecked:_,ariaColCount:m,ariaColIndex:m,ariaColSpan:m,ariaControls:R,ariaCurrent:null,ariaDescribedBy:R,ariaDetails:null,ariaDisabled:_,ariaDropEffect:R,ariaErrorMessage:null,ariaExpanded:_,ariaFlowTo:R,ariaGrabbed:_,ariaHasPopup:null,ariaHidden:_,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:R,ariaLevel:m,ariaLive:null,ariaModal:_,ariaMultiLine:_,ariaMultiSelectable:_,ariaOrientation:null,ariaOwns:R,ariaPlaceholder:null,ariaPosInSet:m,ariaPressed:_,ariaReadOnly:_,ariaRelevant:null,ariaRequired:_,ariaRoleDescription:R,ariaRowCount:m,ariaRowIndex:m,ariaRowSpan:m,ariaSelected:_,ariaSetSize:m,ariaSort:null,ariaValueMax:m,ariaValueMin:m,ariaValueNow:m,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function un(e,t){return t in e?e[t]:t}i(un,"caseSensitiveTransform");function an(e,t){return un(e,t.toLowerCase())}i(an,"caseInsensitiveTransform");var lo=le({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Q,acceptCharset:R,accessKey:R,action:null,allow:null,allowFullScreen:b,allowPaymentRequest:b,allowUserMedia:b,alpha:b,alt:null,as:null,async:b,autoCapitalize:null,autoComplete:R,autoFocus:b,autoPlay:b,blocking:R,capture:null,charSet:null,checked:b,cite:null,className:R,closedBy:null,colorSpace:null,cols:m,colSpan:m,command:null,commandFor:null,content:null,contentEditable:_,controls:b,controlsList:R,coords:m|Q,crossOrigin:null,data:null,dateTime:null,decoding:null,default:b,defer:b,dir:null,dirName:null,disabled:b,download:Ke,draggable:_,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:b,formTarget:null,headers:R,height:m,hidden:Ke,high:m,href:null,hrefLang:null,htmlFor:R,httpEquiv:R,id:null,imageSizes:null,imageSrcSet:null,inert:b,inputMode:null,integrity:null,is:null,isMap:b,itemId:null,itemProp:R,itemRef:R,itemScope:b,itemType:R,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:b,low:m,manifest:null,max:null,maxLength:m,media:null,method:null,min:null,minLength:m,multiple:b,muted:b,name:null,nonce:null,noModule:b,noValidate:b,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:b,optimum:m,pattern:null,ping:R,placeholder:null,playsInline:b,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:b,referrerPolicy:null,rel:R,required:b,reversed:b,rows:m,rowSpan:m,sandbox:R,scope:null,scoped:b,seamless:b,selected:b,shadowRootClonable:b,shadowRootCustomElementRegistry:b,shadowRootDelegatesFocus:b,shadowRootMode:null,shadowRootSerializable:b,shape:null,size:m,sizes:null,slot:null,span:m,spellCheck:_,src:null,srcDoc:null,srcLang:null,srcSet:null,start:m,step:null,style:null,tabIndex:m,target:null,title:null,translate:null,type:null,typeMustMatch:b,useMap:null,value:_,width:m,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:R,axis:null,background:null,bgColor:null,border:m,borderColor:null,bottomMargin:m,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:b,declare:b,event:null,face:null,frame:null,frameBorder:null,hSpace:m,leftMargin:m,link:null,longDesc:null,lowSrc:null,marginHeight:m,marginWidth:m,noResize:b,noHref:b,noShade:b,noWrap:b,object:null,profile:null,prompt:null,rev:null,rightMargin:m,rules:null,scheme:null,scrolling:_,standby:null,summary:null,text:null,topMargin:m,valueType:null,version:null,vAlign:null,vLink:null,vSpace:m,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:b,disablePictureInPicture:b,disableRemotePlayback:b,exportParts:Q,part:R,prefix:null,property:null,results:m,security:null,unselectable:null},space:"html",transform:an}),uo=le({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",maskType:"mask-type",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:z,accentHeight:m,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:m,amplitude:m,arabicForm:null,ascent:m,attributeName:null,attributeType:null,azimuth:m,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:m,by:null,calcMode:null,capHeight:m,className:R,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:m,diffuseConstant:m,direction:null,display:null,dur:null,divisor:m,dominantBaseline:null,download:b,dx:null,dy:null,edgeMode:null,editable:null,elevation:m,enableBackground:null,end:null,event:null,exponent:m,externalResourcesRequired:null,fill:null,fillOpacity:m,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Q,g2:Q,glyphName:Q,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:m,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:m,horizOriginX:m,horizOriginY:m,id:null,ideographic:m,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:m,k:m,k1:m,k2:m,k3:m,k4:m,kernelMatrix:z,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:m,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:m,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:m,overlineThickness:m,paintOrder:null,panose1:null,path:null,pathLength:m,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:R,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:m,pointsAtY:m,pointsAtZ:m,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:z,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:z,rev:z,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:z,requiredFeatures:z,requiredFonts:z,requiredFormats:z,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:m,specularExponent:m,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:m,strikethroughThickness:m,string:null,stroke:null,strokeDashArray:z,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:m,strokeOpacity:m,strokeWidth:null,style:null,surfaceScale:m,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:z,tabIndex:m,tableValues:null,target:null,targetX:m,targetY:m,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:z,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:m,underlineThickness:m,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:m,values:null,vAlphabetic:m,vMathematical:m,vectorEffect:null,vHanging:m,vIdeographic:m,version:null,vertAdvY:m,vertOriginX:m,vertOriginY:m,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:m,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:un}),sn=le({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),cn=le({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:an}),pn=le({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),ao={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},so=/[A-Z]/g,kt=/-[a-z]/g,co=/^data[-\w.:]+$/i;function po(e,t){const n=He(t);let r=t,o=M;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&co.test(t)){if(t.charAt(4)==="-"){const u=t.slice(5).replace(kt,ho);r="data"+u.charAt(0).toUpperCase()+u.slice(1)}else{const u=t.slice(4);if(!kt.test(u)){let l=u.replace(so,fo);l.charAt(0)!=="-"&&(l="-"+l),t="data"+l}}o=ot}return new o(r,t)}i(po,"find");function fo(e){return"-"+e.toLowerCase()}i(fo,"kebab");function ho(e){return e.charAt(1).toUpperCase()}i(ho,"camelcase");var mo=on([ln,lo,sn,cn,pn],"html"),it=on([ln,uo,sn,cn,pn],"svg");function go(e){return e.join(" ").trim()}i(go,"stringify");var Do=pe(((e,t)=>{var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,o=/^\s*/,u=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,l=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,s=/^[;\s]*/,p=/^\s+|\s+$/g,f=`
2
+ var tr=Object.defineProperty;var i=(e,t)=>tr(e,"name",{value:t,configurable:!0});import{i as ve,n as nr,t as pe}from"./rolldown-runtime-ZpX3ckPj.js";import{Fa as Ze,G as $,Hi as ge,Ia as rr,Na as or,Ra as ir,Sa as lr,St as ee,Tr as ur,Vi as gt,gt as Je,n as Vt,na as Qe}from"./agent-avatar-url-CVV7dJ4l.js";import{t as ar}from"./preload-helper-CceJXRIF.js";import{I as sr,Kt as cr,Ln as qt,d as pr,f as fr,ft as dr,m as hr,p as mr,r as gr,s as et,un as Xt}from"./BreadcrumbContext-k4_HOBKt.js";import{$ as Dr,C as yr,D as Gt,F as $e,H as ae,I as Dt,J as tt,K,L as Fr,P as T,R as wr,S as Cr,U as se,W as kr,Y as re,_ as Er,c as Ar,d as br,et as vr,f as xr,g as fe,h as Sr,i as Yt,j as nt,k as yt,l as Ir,m as Br,p as Pr,r as Zt,u as Lr,x as rt,z as Rr}from"./mention-chips-DvkvqPRN.js";import{c as jr,l as Jt,m as Ft,p as _r,r as Qt,s as Tr,t as Nr,u as Mr}from"./StatusIcon-fJLmzCDW.js";import{t as Or}from"./check-CGphZTSp.js";import{a as zr,i as Ur,n as $r,o as Hr,t as Wr}from"./clipboard-BftXMlFg.js";import{n as Kr,t as Vr}from"./external-link-CRVf_Q8M.js";var en={name:"file-code-corner",size:24,node:[["path",{d:"M4 12.15V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2h-3.35",key:"1wthlu"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"m5 16-3 3 3 3",key:"331omg"}],["path",{d:"m9 22 3-3-3-3",key:"lsp7cz"}]],aliases:["file-code-2"]};en.node;var qr=Vt(en),tn={name:"text-wrap",size:24,node:[["path",{d:"m16 16-3 3 3 3",key:"117b85"}],["path",{d:"M3 12h14.5a1 1 0 0 1 0 7H13",key:"18xa6z"}],["path",{d:"M3 19h6",key:"1ygdsz"}],["path",{d:"M3 5h18",key:"1u36vt"}]],aliases:["wrap-text"]};tn.node;var Xr=Vt(tn);function ie(e){const t=[];let n=-1,r=0,o=0;for(;++n<e.length;){const u=e.charCodeAt(n);let l="";if(u===37&&se(e.charCodeAt(n+1))&&se(e.charCodeAt(n+2)))o=2;else if(u<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(u))||(l=String.fromCharCode(u));else if(u>55295&&u<57344){const a=e.charCodeAt(n+1);u<56320&&a>56319&&a<57344?(l=String.fromCharCode(u,a),o=1):l="�"}else l=String.fromCharCode(u);l&&(t.push(e.slice(r,n),encodeURIComponent(l)),r=n+o+1,l=""),o&&(n+=o,o=0)}return t.join("")+e.slice(r)}i(ie,"normalizeUri");var y=ve(ir(),1),D=ve(rr(),1);function Gr(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}i(Gr,"escapeStringRegexp");var nn="paperclip.theme",Yr="#18181b",Zr="#ffffff",rn=(0,y.createContext)(void 0);function Jr(){return typeof document>"u"||document.documentElement.classList.contains("dark")?"dark":"light"}i(Jr,"resolveThemeFromDocument");function Qr(){if(typeof window>"u")return!1;try{const e=window.localStorage.getItem(nn);return e==="light"||e==="dark"}catch{return!1}}i(Qr,"hasStoredTheme");function eo(e){if(typeof document>"u")return;const t=e==="dark",n=document.documentElement;n.classList.toggle("dark",t),n.style.colorScheme=t?"dark":"light";const r=document.querySelector('meta[name="theme-color"]');r instanceof HTMLMetaElement&&r.setAttribute("content",t?Yr:Zr)}i(eo,"applyTheme");function as({children:e}){const[t,n]=(0,y.useState)(()=>Jr()),[r,o]=(0,y.useState)(()=>Qr()),u=(0,y.useCallback)(s=>{o(!0),n(s)},[]),l=(0,y.useCallback)(()=>{o(!0),n(s=>s==="dark"?"light":"dark")},[]);(0,y.useEffect)(()=>{if(eo(t),!!r)try{localStorage.setItem(nn,t)}catch{}},[t,r]),(0,y.useEffect)(()=>{if(r||typeof window>"u"||typeof window.matchMedia!="function")return;const s=window.matchMedia("(prefers-color-scheme: dark)"),p=i(f=>{n(f.matches?"dark":"light")},"handleChange");return s.addEventListener("change",p),()=>s.removeEventListener("change",p)},[r]);const a=(0,y.useMemo)(()=>({theme:t,setTheme:u,toggleTheme:l}),[t,u,l]);return(0,D.jsx)(rn.Provider,{value:a,children:e})}i(as,"ThemeProvider");function to(){const e=(0,y.useContext)(rn);if(!e)throw new Error("useTheme must be used within ThemeProvider");return e}i(to,"useTheme");function no(e,t){const n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}i(no,"stringify$1");var ro=/[ \t\n\f\r]/g;function oo(e){return typeof e=="object"?e.type==="text"?wt(e.value):!1:wt(e)}i(oo,"whitespace");function wt(e){return e.replace(ro,"")===""}i(wt,"empty");var de=class{static{i(this,"Schema")}constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};de.prototype.normal={};de.prototype.property={};de.prototype.space=void 0;function on(e,t){const n={},r={};for(const o of e)Object.assign(n,o.property),Object.assign(r,o.normal);return new de(n,r,t)}i(on,"merge");function He(e){return e.toLowerCase()}i(He,"normalize$1");var M=class{static{i(this,"Info")}constructor(e,t){this.attribute=t,this.property=e}};M.prototype.attribute="";M.prototype.booleanish=!1;M.prototype.boolean=!1;M.prototype.commaOrSpaceSeparated=!1;M.prototype.commaSeparated=!1;M.prototype.defined=!1;M.prototype.mustUseProperty=!1;M.prototype.number=!1;M.prototype.overloadedBoolean=!1;M.prototype.property="";M.prototype.spaceSeparated=!1;M.prototype.space=void 0;var We=nr({boolean:i(()=>b,"boolean"),booleanish:i(()=>_,"booleanish"),commaOrSpaceSeparated:i(()=>z,"commaOrSpaceSeparated"),commaSeparated:i(()=>Q,"commaSeparated"),number:i(()=>m,"number"),overloadedBoolean:i(()=>Ke,"overloadedBoolean"),spaceSeparated:i(()=>R,"spaceSeparated")}),io=0,b=te(),_=te(),Ke=te(),m=te(),R=te(),Q=te(),z=te();function te(){return 2**++io}i(te,"increment");var Se=Object.keys(We),ot=class extends M{static{i(this,"DefinedInfo")}constructor(e,t,n,r){let o=-1;if(super(e,t),Ct(this,"space",r),typeof n=="number")for(;++o<Se.length;){const u=Se[o];Ct(this,Se[o],(n&We[u])===We[u])}}};ot.prototype.defined=!0;function Ct(e,t,n){n&&(e[t]=n)}i(Ct,"mark");function le(e){const t={},n={};for(const[r,o]of Object.entries(e.properties)){const u=new ot(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(u.mustUseProperty=!0),t[r]=u,n[He(r)]=r,n[He(u.attribute)]=r}return new de(t,n,e.space)}i(le,"create");var ln=le({properties:{ariaActiveDescendant:null,ariaAtomic:_,ariaAutoComplete:null,ariaBusy:_,ariaChecked:_,ariaColCount:m,ariaColIndex:m,ariaColSpan:m,ariaControls:R,ariaCurrent:null,ariaDescribedBy:R,ariaDetails:null,ariaDisabled:_,ariaDropEffect:R,ariaErrorMessage:null,ariaExpanded:_,ariaFlowTo:R,ariaGrabbed:_,ariaHasPopup:null,ariaHidden:_,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:R,ariaLevel:m,ariaLive:null,ariaModal:_,ariaMultiLine:_,ariaMultiSelectable:_,ariaOrientation:null,ariaOwns:R,ariaPlaceholder:null,ariaPosInSet:m,ariaPressed:_,ariaReadOnly:_,ariaRelevant:null,ariaRequired:_,ariaRoleDescription:R,ariaRowCount:m,ariaRowIndex:m,ariaRowSpan:m,ariaSelected:_,ariaSetSize:m,ariaSort:null,ariaValueMax:m,ariaValueMin:m,ariaValueNow:m,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function un(e,t){return t in e?e[t]:t}i(un,"caseSensitiveTransform");function an(e,t){return un(e,t.toLowerCase())}i(an,"caseInsensitiveTransform");var lo=le({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Q,acceptCharset:R,accessKey:R,action:null,allow:null,allowFullScreen:b,allowPaymentRequest:b,allowUserMedia:b,alpha:b,alt:null,as:null,async:b,autoCapitalize:null,autoComplete:R,autoFocus:b,autoPlay:b,blocking:R,capture:null,charSet:null,checked:b,cite:null,className:R,closedBy:null,colorSpace:null,cols:m,colSpan:m,command:null,commandFor:null,content:null,contentEditable:_,controls:b,controlsList:R,coords:m|Q,crossOrigin:null,data:null,dateTime:null,decoding:null,default:b,defer:b,dir:null,dirName:null,disabled:b,download:Ke,draggable:_,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:b,formTarget:null,headers:R,height:m,hidden:Ke,high:m,href:null,hrefLang:null,htmlFor:R,httpEquiv:R,id:null,imageSizes:null,imageSrcSet:null,inert:b,inputMode:null,integrity:null,is:null,isMap:b,itemId:null,itemProp:R,itemRef:R,itemScope:b,itemType:R,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:b,low:m,manifest:null,max:null,maxLength:m,media:null,method:null,min:null,minLength:m,multiple:b,muted:b,name:null,nonce:null,noModule:b,noValidate:b,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:b,optimum:m,pattern:null,ping:R,placeholder:null,playsInline:b,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:b,referrerPolicy:null,rel:R,required:b,reversed:b,rows:m,rowSpan:m,sandbox:R,scope:null,scoped:b,seamless:b,selected:b,shadowRootClonable:b,shadowRootCustomElementRegistry:b,shadowRootDelegatesFocus:b,shadowRootMode:null,shadowRootSerializable:b,shape:null,size:m,sizes:null,slot:null,span:m,spellCheck:_,src:null,srcDoc:null,srcLang:null,srcSet:null,start:m,step:null,style:null,tabIndex:m,target:null,title:null,translate:null,type:null,typeMustMatch:b,useMap:null,value:_,width:m,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:R,axis:null,background:null,bgColor:null,border:m,borderColor:null,bottomMargin:m,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:b,declare:b,event:null,face:null,frame:null,frameBorder:null,hSpace:m,leftMargin:m,link:null,longDesc:null,lowSrc:null,marginHeight:m,marginWidth:m,noResize:b,noHref:b,noShade:b,noWrap:b,object:null,profile:null,prompt:null,rev:null,rightMargin:m,rules:null,scheme:null,scrolling:_,standby:null,summary:null,text:null,topMargin:m,valueType:null,version:null,vAlign:null,vLink:null,vSpace:m,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:b,disablePictureInPicture:b,disableRemotePlayback:b,exportParts:Q,part:R,prefix:null,property:null,results:m,security:null,unselectable:null},space:"html",transform:an}),uo=le({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",maskType:"mask-type",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:z,accentHeight:m,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:m,amplitude:m,arabicForm:null,ascent:m,attributeName:null,attributeType:null,azimuth:m,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:m,by:null,calcMode:null,capHeight:m,className:R,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:m,diffuseConstant:m,direction:null,display:null,dur:null,divisor:m,dominantBaseline:null,download:b,dx:null,dy:null,edgeMode:null,editable:null,elevation:m,enableBackground:null,end:null,event:null,exponent:m,externalResourcesRequired:null,fill:null,fillOpacity:m,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Q,g2:Q,glyphName:Q,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:m,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:m,horizOriginX:m,horizOriginY:m,id:null,ideographic:m,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:m,k:m,k1:m,k2:m,k3:m,k4:m,kernelMatrix:z,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:m,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:m,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:m,overlineThickness:m,paintOrder:null,panose1:null,path:null,pathLength:m,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:R,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:m,pointsAtY:m,pointsAtZ:m,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:z,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:z,rev:z,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:z,requiredFeatures:z,requiredFonts:z,requiredFormats:z,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:m,specularExponent:m,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:m,strikethroughThickness:m,string:null,stroke:null,strokeDashArray:z,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:m,strokeOpacity:m,strokeWidth:null,style:null,surfaceScale:m,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:z,tabIndex:m,tableValues:null,target:null,targetX:m,targetY:m,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:z,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:m,underlineThickness:m,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:m,values:null,vAlphabetic:m,vMathematical:m,vectorEffect:null,vHanging:m,vIdeographic:m,version:null,vertAdvY:m,vertOriginX:m,vertOriginY:m,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:m,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:un}),sn=le({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),cn=le({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:an}),pn=le({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),ao={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},so=/[A-Z]/g,kt=/-[a-z]/g,co=/^data[-\w.:]+$/i;function po(e,t){const n=He(t);let r=t,o=M;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&co.test(t)){if(t.charAt(4)==="-"){const u=t.slice(5).replace(kt,ho);r="data"+u.charAt(0).toUpperCase()+u.slice(1)}else{const u=t.slice(4);if(!kt.test(u)){let l=u.replace(so,fo);l.charAt(0)!=="-"&&(l="-"+l),t="data"+l}}o=ot}return new o(r,t)}i(po,"find");function fo(e){return"-"+e.toLowerCase()}i(fo,"kebab");function ho(e){return e.charAt(1).toUpperCase()}i(ho,"camelcase");var mo=on([ln,lo,sn,cn,pn],"html"),it=on([ln,uo,sn,cn,pn],"svg");function go(e){return e.join(" ").trim()}i(go,"stringify");var Do=pe(((e,t)=>{var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,o=/^\s*/,u=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,l=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,s=/^[;\s]*/,p=/^\s+|\s+$/g,f=`
3
3
  `,c="/",d="*",h="",g="comment",F="declaration";function w(C,v){if(typeof C!="string")throw new TypeError("First argument must be a string");if(!C)return[];v=v||{};var x=1,P=1;function q(B){var k=B.match(r);k&&(x+=k.length);var N=B.lastIndexOf(f);P=~N?B.length-N:P+B.length}i(q,"updatePosition");function O(){var B={line:x,column:P};return function(k){return k.position=new j(B),I(),k}}i(O,"position");function j(B){this.start=B,this.end={line:x,column:P},this.source=v.source}i(j,"Position"),j.prototype.content=C;function L(B){var k=new Error(v.source+":"+x+":"+P+": "+B);if(k.reason=B,k.filename=v.source,k.line=x,k.column=P,k.source=C,!v.silent)throw k}i(L,"error");function A(B){var k=B.exec(C);if(k){var N=k[0];return q(N),C=C.slice(N.length),k}}i(A,"match");function I(){A(o)}i(I,"whitespace");function S(B){var k;for(B=B||[];k=U();)k!==!1&&B.push(k);return B}i(S,"comments");function U(){var B=O();if(!(c!=C.charAt(0)||d!=C.charAt(1))){for(var k=2;h!=C.charAt(k)&&(d!=C.charAt(k)||c!=C.charAt(k+1));)++k;if(k+=2,h===C.charAt(k-1))return L("End of comment missing");var N=C.slice(2,k-2);return P+=2,q(N),C=C.slice(k),P+=2,B({type:g,comment:N})}}i(U,"comment");function G(){var B=O(),k=A(u);if(k){if(U(),!A(l))return L("property missing ':'");var N=A(a),me=B({type:F,property:E(k[0].replace(n,h)),value:N?E(N[0].replace(n,h)):h});return A(s),me}}i(G,"declaration");function Y(){var B=[];S(B);for(var k;k=G();)k!==!1&&(B.push(k),S(B));return B}return i(Y,"declarations"),I(),Y()}i(w,"index");function E(C){return C?C.replace(p,h):h}i(E,"trim"),t.exports=w})),yo=pe((e=>{var t=e&&e.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(e,"__esModule",{value:!0}),e.default=r;var n=t(Do());function r(o,u){let l=null;if(!o||typeof o!="string")return l;const a=(0,n.default)(o),s=typeof u=="function";return a.forEach(p=>{if(p.type!=="declaration")return;const{property:f,value:c}=p;s?u(f,c,p):c&&(l=l||{},l[f]=c)}),l}i(r,"StyleToObject")})),Fo=pe((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,r=/^[^-]+$/,o=/^-(webkit|moz|ms|o|khtml)-/,u=/^-(ms)-/,l=i(function(f){return!f||r.test(f)||t.test(f)},"skipCamelCase"),a=i(function(f,c){return c.toUpperCase()},"capitalize"),s=i(function(f,c){return"".concat(c,"-")},"trimHyphen"),p=i(function(f,c){return c===void 0&&(c={}),l(f)?f:(f=f.toLowerCase(),c.reactCompat?f=f.replace(u,s):f=f.replace(o,s),f.replace(n,a))},"camelCase");e.camelCase=p})),wo=pe(((e,t)=>{var n=(e&&e.__importDefault||function(u){return u&&u.__esModule?u:{default:u}})(yo()),r=Fo();function o(u,l){var a={};return!u||typeof u!="string"||(0,n.default)(u,function(s,p){s&&p&&(a[(0,r.camelCase)(s,l)]=p)}),a}i(o,"StyleToJS"),o.default=o,t.exports=o})),fn=dn("end"),lt=dn("start");function dn(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}i(dn,"point");function Co(e){const t=lt(e),n=fn(e);if(t&&n)return{start:t,end:n}}i(Co,"position");var ko=ve(wo(),1),ut={}.hasOwnProperty,Eo=new Map,Ao=/[A-Z]/g,bo=new Set(["table","tbody","thead","tfoot","tr"]),vo=new Set(["td","th"]),hn="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function xo(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=_o(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=jo(n,t.jsx,t.jsxs)}const o={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?it:mo,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},u=mn(o,e,void 0);return u&&typeof u!="string"?u:o.create(e,o.Fragment,{children:u||void 0},void 0)}i(xo,"toJsxRuntime");function mn(e,t,n){if(t.type==="element")return So(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return Io(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return Po(e,t,n);if(t.type==="mdxjsEsm")return Bo(e,t);if(t.type==="root")return Lo(e,t,n);if(t.type==="text")return Ro(e,t)}i(mn,"one$1");function So(e,t,n){const r=e.schema;let o=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(o=it,e.schema=o),e.ancestors.push(t);const u=Dn(e,t.tagName,!1),l=To(e,t);let a=st(e,t);return bo.has(t.tagName)&&(a=a.filter(function(s){return typeof s=="string"?!oo(s):!0})),gn(e,l,u,t),at(l,a),e.ancestors.pop(),e.schema=r,e.create(t,u,l,n)}i(So,"element");function Io(e,t){if(t.data&&t.data.estree&&e.evaluater){const n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}ce(e,t.position)}i(Io,"mdxExpression");function Bo(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);ce(e,t.position)}i(Bo,"mdxEsm");function Po(e,t,n){const r=e.schema;let o=r;t.name==="svg"&&r.space==="html"&&(o=it,e.schema=o),e.ancestors.push(t);const u=t.name===null?e.Fragment:Dn(e,t.name,!0),l=No(e,t),a=st(e,t);return gn(e,l,u,t),at(l,a),e.ancestors.pop(),e.schema=r,e.create(t,u,l,n)}i(Po,"mdxJsxElement");function Lo(e,t,n){const r={};return at(r,st(e,t)),e.create(t,e.Fragment,r,n)}i(Lo,"root$1");function Ro(e,t){return t.value}i(Ro,"text$2");function gn(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}i(gn,"addNode");function at(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}i(at,"addChildren");function jo(e,t,n){return r;function r(o,u,l,a){const s=Array.isArray(l.children)?n:t;return a?s(u,l,a):s(u,l)}}i(jo,"productionCreate");function _o(e,t){return n;function n(r,o,u,l){const a=Array.isArray(u.children),s=lt(r);return t(o,u,l,a,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}i(_o,"developmentCreate");function To(e,t){const n={};let r,o;for(o in t.properties)if(o!=="children"&&ut.call(t.properties,o)){const u=Mo(e,o,t.properties[o]);if(u){const[l,a]=u;e.tableCellAlignToStyle&&l==="align"&&typeof a=="string"&&vo.has(t.tagName)?r=a:n[l]=a}}if(r){const u=n.style||(n.style={});u[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}i(To,"createElementProps");function No(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const o=r.data.estree.body[0];o.type;const u=o.expression;u.type;const l=u.properties[0];l.type,Object.assign(n,e.evaluater.evaluateExpression(l.argument))}else ce(e,t.position);else{const o=r.name;let u;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const l=r.value.data.estree.body[0];l.type,u=e.evaluater.evaluateExpression(l.expression)}else ce(e,t.position);else u=r.value===null?!0:r.value;n[o]=u}return n}i(No,"createJsxElementProps");function st(e,t){const n=[];let r=-1;const o=e.passKeys?new Map:Eo;for(;++r<t.children.length;){const u=t.children[r];let l;if(e.passKeys){const s=u.type==="element"?u.tagName:u.type==="mdxJsxFlowElement"||u.type==="mdxJsxTextElement"?u.name:void 0;if(s){const p=o.get(s)||0;l=s+"-"+p,o.set(s,p+1)}}const a=mn(e,u,l);a!==void 0&&n.push(a)}return n}i(st,"createChildren");function Mo(e,t,n){const r=po(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?no(n):go(n)),r.property==="style"){let o=typeof n=="object"?n:Oo(e,String(n));return e.stylePropertyNameCase==="css"&&(o=zo(o)),["style",o]}return[e.elementAttributeNameCase==="react"&&r.space?ao[r.property]||r.property:r.attribute,n]}}i(Mo,"createProperty");function Oo(e,t){try{return(0,ko.default)(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,o=new nt("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw o.file=e.filePath||void 0,o.url=hn+"#cannot-parse-style-attribute",o}}i(Oo,"parseStyle");function Dn(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const o=t.split(".");let u=-1,l;for(;++u<o.length;){const a=yt(o[u])?{type:"Identifier",name:o[u]}:{type:"Literal",value:o[u]};l=l?{type:"MemberExpression",object:l,property:a,computed:!!(u&&a.type==="Literal"),optional:!1}:a}r=l}else r=yt(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const o=r.value;return ut.call(e.components,o)?e.components[o]:o}if(e.evaluater)return e.evaluater.evaluateExpression(r);ce(e)}i(Dn,"findComponentFromName");function ce(e,t){const n=new nt("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=hn+"#cannot-handle-mdx-estrees-without-createevaluater",n}i(ce,"crashEstree");function zo(e){const t={};let n;for(n in e)ut.call(e,n)&&(t[Uo(n)]=e[n]);return t}i(zo,"transformStylesToCssCasing");function Uo(e){let t=e.replace(Ao,$o);return t.slice(0,3)==="ms-"&&(t="-"+t),t}i(Uo,"transformStyleToCssCasing");function $o(e){return"-"+e.toLowerCase()}i($o,"toDash");var Ie={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]};function Ho(e){const t=this;t.parser=n;function n(r){return Br(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}i(n,"parser")}i(Ho,"remarkParse");function Wo(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}i(Wo,"blockquote");function Ko(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
4
4
  `}]}i(Ko,"hardBreak");function Vo(e,t){const n=t.value?t.value+`
5
5
  `:"",r={},o=t.lang?t.lang.split(/\s+/):[];o.length>0&&(r.className=["language-"+o[0]]);let u={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(u.data={meta:t.meta}),e.patch(t,u),u=e.applyData(t,u),u={type:"element",tagName:"pre",properties:{},children:[u]},e.patch(t,u),u}i(Vo,"code$1");function qo(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}i(qo,"strikethrough");function Xo(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}i(Xo,"emphasis");function Go(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),o=ie(r.toLowerCase()),u=e.footnoteOrder.indexOf(r);let l,a=e.footnoteCounts.get(r);a===void 0?(a=0,e.footnoteOrder.push(r),l=e.footnoteOrder.length):l=u+1,a+=1,e.footnoteCounts.set(r,a);const s={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+o,id:n+"fnref-"+o+(a>1?"-"+a:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(l)}]};e.patch(t,s);const p={type:"element",tagName:"sup",properties:{},children:[s]};return e.patch(t,p),e.applyData(t,p)}i(Go,"footnoteReference$1");function Yo(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}i(Yo,"heading");function Zo(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}i(Zo,"html");function yn(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const o=e.all(t),u=o[0];u&&u.type==="text"?u.value="["+u.value:o.unshift({type:"text",value:"["});const l=o[o.length-1];return l&&l.type==="text"?l.value+=r:o.push({type:"text",value:r}),o}i(yn,"revert");function Jo(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return yn(e,t);const o={src:ie(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(o.title=r.title);const u={type:"element",tagName:"img",properties:o,children:[]};return e.patch(t,u),e.applyData(t,u)}i(Jo,"imageReference");function Qo(e,t){const n={src:ie(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}i(Qo,"image");function ei(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}i(ei,"inlineCode");function ti(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return yn(e,t);const o={href:ie(r.url||"")};r.title!==null&&r.title!==void 0&&(o.title=r.title);const u={type:"element",tagName:"a",properties:o,children:e.all(t)};return e.patch(t,u),e.applyData(t,u)}i(ti,"linkReference");function ni(e,t){const n={href:ie(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}i(ni,"link");function ri(e,t,n){const r=e.all(t),o=n?oi(n):Fn(t),u={},l=[];if(typeof t.checked=="boolean"){const f=r[0];let c;f&&f.type==="element"&&f.tagName==="p"?c=f:(c={type:"element",tagName:"p",properties:{},children:[]},r.unshift(c)),c.children.length>0&&c.children.unshift({type:"text",value:" "}),c.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),u.className=["task-list-item"]}let a=-1;for(;++a<r.length;){const f=r[a];(o||a!==0||f.type!=="element"||f.tagName!=="p")&&l.push({type:"text",value:`