@opentig/cli 0.1.3 → 0.1.5

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 (103) hide show
  1. package/README.md +73 -17
  2. package/dist/bin.mjs +2 -2
  3. package/dist/chunks/{cli-DaYybBfs.mjs → cli-D_aggpu2.mjs} +232 -57
  4. package/dist/chunks/service-manager-DkpSHxsP.mjs +394 -0
  5. package/dist/client/assets/App-CeDVj5Hh.js +118 -0
  6. package/dist/client/assets/{CreatePullRequestDialog-CGnY6nrw.js → CreatePullRequestDialog-DMHY_u8X.js} +2 -2
  7. package/dist/client/assets/{DiffWorkspace-1ZAh7eFX.js → DiffWorkspace-CeYQ0YtE.js} +1 -1
  8. package/dist/client/assets/{EditableFileViewer-DOnxE6ty.js → EditableFileViewer-BhwE-QMO.js} +1 -1
  9. package/dist/client/assets/{File-DM0fcPqi.js → File-C10_BxOu.js} +1 -1
  10. package/dist/client/assets/{FilesView-BuTZiUd4.js → FilesView-BT4eHbFo.js} +1 -1
  11. package/dist/client/assets/{GitHubAvatar-BIZ8KlZ9.js → GitHubAvatar-Ch_PaCv3.js} +1 -1
  12. package/dist/client/assets/{HistoryView-BTo2h2ee.js → HistoryView-CivGwdxV.js} +1 -1
  13. package/dist/client/assets/{HtmlFileViewer-tEtrcHdG.js → HtmlFileViewer-Cufzaec9.js} +1 -1
  14. package/dist/client/assets/{IconEdit-DtVD7NDP.js → IconEdit-RxH71_V-.js} +1 -1
  15. package/dist/client/assets/{IconFolderPlus-D5cPTAyD.js → IconFolderPlus-DSSB-ikf.js} +1 -1
  16. package/dist/client/assets/{ImageFileViewer-C56bQ88S.js → ImageFileViewer-CFUkcXLH.js} +1 -1
  17. package/dist/client/assets/{LocalRefsDialog-DwhpiSyu.js → LocalRefsDialog-B2jUCKTx.js} +1 -1
  18. package/dist/client/assets/{MarkdownFileViewer-BxQfoNnS.js → MarkdownFileViewer-BLfJ-Vof.js} +2 -2
  19. package/dist/client/assets/{PairingPage-Cu1KraeJ.js → PairingPage-C5Ggk-Z_.js} +1 -1
  20. package/dist/client/assets/{PierreDiffViewer-B9IrAdjM.js → PierreDiffViewer-DYj1ZThr.js} +1 -1
  21. package/dist/client/assets/{PierreEditBoundary-DDJlRbaP.js → PierreEditBoundary-UfvbKDbd.js} +1 -1
  22. package/dist/client/assets/{PierreWorkerPool-BJhmuZSy.js → PierreWorkerPool-7EVoquIB.js} +1 -1
  23. package/dist/client/assets/{PullRequestDiff-Di1_Wv1o.js → PullRequestDiff-DxLTcm6L.js} +1 -1
  24. package/dist/client/assets/{PullRequestViewer-CuH0Ze12.js → PullRequestViewer-CyW39MuF.js} +2 -2
  25. package/dist/client/assets/{PullRequestsView-DRKuy94k.js → PullRequestsView-BHcnarLS.js} +1 -1
  26. package/dist/client/assets/{QuickOpenDialog-DSdrgS2H.js → QuickOpenDialog-CasQU7pk.js} +1 -1
  27. package/dist/client/assets/{RepositoryProjectsDialog-CWcakQRC.js → RepositoryProjectsDialog-VAiZrDlA.js} +1 -1
  28. package/dist/client/assets/{SearchView-Btqv-BZZ.js → SearchView-Bv4bA4UJ.js} +1 -1
  29. package/dist/client/assets/{SettingsDialog-CV7hRbtK.js → SettingsDialog-D33V9Fry.js} +2 -2
  30. package/dist/client/assets/{Viewer-bchsRyMu.js → Viewer-I1lC_oJU.js} +2 -2
  31. package/dist/client/assets/{abnfDiagram-N423BO3Z-D6JAOs-X.js → abnfDiagram-N423BO3Z-DrlQwm7W.js} +1 -1
  32. package/dist/client/assets/{arc-YncG-7Bc.js → arc-B9cXI-QL.js} +1 -1
  33. package/dist/client/assets/{architectureDiagram-T3A2C74G-Ckf8dhax.js → architectureDiagram-T3A2C74G-DZz7ZXbI.js} +1 -1
  34. package/dist/client/assets/{blockDiagram-VBNYF7ZC-CGQa9zHO.js → blockDiagram-VBNYF7ZC-DZFMT63B.js} +1 -1
  35. package/dist/client/assets/{c4Diagram-5PPSVZJV-Ctgat2YZ.js → c4Diagram-5PPSVZJV-BnHIZMZp.js} +1 -1
  36. package/dist/client/assets/channel-CE-pdA-6.js +1 -0
  37. package/dist/client/assets/{checkbox-D5IGxs1d.js → checkbox-BpmQTxn7.js} +1 -1
  38. package/dist/client/assets/{chunk-2GRJ4B5K-CyDC0FQq.js → chunk-2GRJ4B5K-CJOlpI9g.js} +1 -1
  39. package/dist/client/assets/{chunk-2Q5K7J3B-DqYRVN1X.js → chunk-2Q5K7J3B-DhsnoUrJ.js} +1 -1
  40. package/dist/client/assets/{chunk-5RXB4S5H-BtrE-Jqe.js → chunk-5RXB4S5H-Nwsk3OIu.js} +1 -1
  41. package/dist/client/assets/{chunk-5VM5RSS4-CEVyxEEH.js → chunk-5VM5RSS4-Dk9FYU9b.js} +1 -1
  42. package/dist/client/assets/{chunk-6Q2QTUOP-CR_RRfTb.js → chunk-6Q2QTUOP-C8lX8T87.js} +1 -1
  43. package/dist/client/assets/{chunk-GF5L2VYU-Uoc_Vpub.js → chunk-GF5L2VYU-DWHvTG6c.js} +1 -1
  44. package/dist/client/assets/{chunk-JWPE2WC7-BAhDzsCx.js → chunk-JWPE2WC7-BLu2-FJl.js} +1 -1
  45. package/dist/client/assets/{chunk-KBJHAD2P-DkGEUlle.js → chunk-KBJHAD2P-CEOb10I1.js} +1 -1
  46. package/dist/client/assets/{chunk-RYQCIY6F-doFXXAJb.js → chunk-RYQCIY6F-BcdMrb_e.js} +1 -1
  47. package/dist/client/assets/{chunk-XXDRQBXY-B44pCuJx.js → chunk-XXDRQBXY-CzPimvfs.js} +1 -1
  48. package/dist/client/assets/classDiagram-JCYQIIEL-2elbt6qi.js +1 -0
  49. package/dist/client/assets/classDiagram-v2-OCEON4UE-2elbt6qi.js +1 -0
  50. package/dist/client/assets/{cose-bilkent-JH36ORCC-CymnJ1xN.js → cose-bilkent-JH36ORCC-BYfzHUkR.js} +1 -1
  51. package/dist/client/assets/{cynefin-VYW2F7L2-BT5dARHp.js → cynefin-VYW2F7L2-B4mEAleX.js} +1 -1
  52. package/dist/client/assets/{cynefinDiagram-MW4NZA55-DVrhZ1A4.js → cynefinDiagram-MW4NZA55-CioMvT6V.js} +1 -1
  53. package/dist/client/assets/{dagre-VZM6K2ZE-BET0T1KQ.js → dagre-VZM6K2ZE-DWPgHi5i.js} +1 -1
  54. package/dist/client/assets/{diagram-7IWD3JNH-mIl4bvgD.js → diagram-7IWD3JNH-94i9EwB_.js} +1 -1
  55. package/dist/client/assets/{diagram-B4RE2ZJO-DKSi3zok.js → diagram-B4RE2ZJO-BRgMOgy8.js} +1 -1
  56. package/dist/client/assets/{diagram-LBJQPF4R-DFzvqR_V.js → diagram-LBJQPF4R-DHaXTl1T.js} +1 -1
  57. package/dist/client/assets/{diagram-Q27KOJAE-C8UUiNSc.js → diagram-Q27KOJAE-DtLuyYm1.js} +1 -1
  58. package/dist/client/assets/{diagram-UB23O5K3-CYuQnggB.js → diagram-UB23O5K3-D8R3grCW.js} +1 -1
  59. package/dist/client/assets/{ebnfDiagram-BXEA7PRR-orsOZEt3.js → ebnfDiagram-BXEA7PRR-voe5GU7W.js} +1 -1
  60. package/dist/client/assets/{erDiagram-JOGREHBK-BPxNY3Or.js → erDiagram-JOGREHBK-BShMJhmY.js} +1 -1
  61. package/dist/client/assets/{flowDiagram-UKHOOZJN-Dj_tbpt_.js → flowDiagram-UKHOOZJN-DASXB2wV.js} +1 -1
  62. package/dist/client/assets/{ganttDiagram-PKOTCBZU-BhG_1m3O.js → ganttDiagram-PKOTCBZU-Da1ElnJN.js} +1 -1
  63. package/dist/client/assets/{gh-utils-CR5JRkW2.js → gh-utils-D00lyruw.js} +1 -1
  64. package/dist/client/assets/{gitGraphDiagram-DS77QQ5N-B6i118FC.js → gitGraphDiagram-DS77QQ5N-DoGRli0p.js} +1 -1
  65. package/dist/client/assets/{index-C_D1kOlX.js → index-BdjG_WtS.js} +2 -2
  66. package/dist/client/assets/{index-CE9Jcx4e.css → index-Uku28hIV.css} +1 -1
  67. package/dist/client/assets/{infoDiagram-6WML65LV-DhHBZSVb.js → infoDiagram-6WML65LV-CxkxF5pn.js} +1 -1
  68. package/dist/client/assets/{ishikawaDiagram-WSZJBQD7-6Vd6XOG_.js → ishikawaDiagram-WSZJBQD7-l6dk2-PS.js} +1 -1
  69. package/dist/client/assets/{journeyDiagram-NVQOT4AX-uH71A9mr.js → journeyDiagram-NVQOT4AX-wJY4ZF5o.js} +1 -1
  70. package/dist/client/assets/{kanban-definition-27J2QSJJ-DbxRwp0h.js → kanban-definition-27J2QSJJ-CIcwUmJo.js} +1 -1
  71. package/dist/client/assets/{linear-CFzmLtpp.js → linear-Tf-dXwQ9.js} +1 -1
  72. package/dist/client/assets/{mermaid.core-B_Mv_eHi.js → mermaid.core-DnaJSnLe.js} +4 -4
  73. package/dist/client/assets/{mindmap-definition-FAOFIHXS-DQf1s9U3.js → mindmap-definition-FAOFIHXS-jFdJ2bLh.js} +1 -1
  74. package/dist/client/assets/{pegDiagram-VL7TDLO6-BxFVTcDJ.js → pegDiagram-VL7TDLO6-vq0WE66k.js} +1 -1
  75. package/dist/client/assets/{pieDiagram-7S7Q4E2Y-CCNbxGSk.js → pieDiagram-7S7Q4E2Y-3edKDMpI.js} +1 -1
  76. package/dist/client/assets/{quadrantDiagram-CIZ2JOQS-BVhzcmm1.js → quadrantDiagram-CIZ2JOQS-B6M8U4XV.js} +1 -1
  77. package/dist/client/assets/{railroadDiagram-AXF67PYL-D3R2-3Og.js → railroadDiagram-AXF67PYL-C-d5-0YS.js} +1 -1
  78. package/dist/client/assets/{render-markdown-DcHo7ihS.js → render-markdown-GXIpf9CM.js} +1 -1
  79. package/dist/client/assets/{requirementDiagram-LRYGKXZP-B-NkzvnF.js → requirementDiagram-LRYGKXZP-FVzmEbFu.js} +1 -1
  80. package/dist/client/assets/{sankeyDiagram-W5VNT64P-BRpIzFiP.js → sankeyDiagram-W5VNT64P-B-qcUamt.js} +1 -1
  81. package/dist/client/assets/{sequenceDiagram-SI44F4Z6-B7cBRL6x.js → sequenceDiagram-SI44F4Z6-DgFXRLSt.js} +1 -1
  82. package/dist/client/assets/{sizeCapture-X5ZJPWSS-BZ6DbjJ6.js → sizeCapture-X5ZJPWSS-CWi_pMb2.js} +1 -1
  83. package/dist/client/assets/{stateDiagram-OKZ733FA-x8ChPNdG.js → stateDiagram-OKZ733FA-amQwzlgU.js} +1 -1
  84. package/dist/client/assets/{stateDiagram-v2-UEYNNEHI-BlYlvm69.js → stateDiagram-v2-UEYNNEHI-TdV8eIV2.js} +1 -1
  85. package/dist/client/assets/{swimlanes-SLNWSIFB-DR21moSS.js → swimlanes-SLNWSIFB-L88WlaUb.js} +2 -2
  86. package/dist/client/assets/swimlanesDiagram-ULZ7WXOC-AWimqvIC.js +8 -0
  87. package/dist/client/assets/{timeline-definition-Z64GVDOM-UlAkswoH.js → timeline-definition-Z64GVDOM-D4TJxxc3.js} +1 -1
  88. package/dist/client/assets/{vennDiagram-T6HMQDX7-91kBYEFr.js → vennDiagram-T6HMQDX7-ClJWOyzQ.js} +1 -1
  89. package/dist/client/assets/{viewer-tabs-BHvOJKLx.js → viewer-tabs-Cp_MC_J3.js} +1 -1
  90. package/dist/client/assets/{wardleyDiagram-T6FBY63Y-CqAHibOn.js → wardleyDiagram-T6FBY63Y-Cxfjpd6V.js} +1 -1
  91. package/dist/client/assets/{xychartDiagram-ELKLHX3M-BMFs9l78.js → xychartDiagram-ELKLHX3M-BYqbTvmt.js} +1 -1
  92. package/dist/client/index.html +2 -2
  93. package/dist/dev.mjs +4 -4
  94. package/dist/manifest.json +1 -1
  95. package/dist/server.mjs +5 -5
  96. package/dist/service-update.mjs +12 -10
  97. package/package.json +1 -1
  98. package/dist/chunks/cli-service-CDd3ZvGV.mjs +0 -237
  99. package/dist/client/assets/App-C7Yf3r-l.js +0 -118
  100. package/dist/client/assets/channel-B31JCSE_.js +0 -1
  101. package/dist/client/assets/classDiagram-JCYQIIEL-C6tU-sLq.js +0 -1
  102. package/dist/client/assets/classDiagram-v2-OCEON4UE-C6tU-sLq.js +0 -1
  103. package/dist/client/assets/swimlanesDiagram-ULZ7WXOC-DbXYPHRv.js +0 -8
@@ -1,4 +1,4 @@
1
- import{bf as on,bg as On,bh as cn,bi as un,bj as ln,bk as ue,bl as Hn,g as Nn,s as Pn,p as Vn,o as Rn,a as zn,b as qn,_ as d,c as Yt,d as Zt,e as Bn,bm as it,l as Tt,k as Zn,j as Xn,q as Gn,y as jn}from"./mermaid.core-B_Mv_eHi.js";import{g as oe}from"./react-rd22PHbN.js";import{b as Qn,t as Ne,c as Jn,a as Kn,l as tr}from"./linear-CFzmLtpp.js";import{i as er}from"./init-Gi6I4Gst.js";import"./index-C_D1kOlX.js";import"./tanstack-Bsd5UOY4.js";import"./base-ui-D4MeJpa3.js";import"./render-markdown-DcHo7ihS.js";import"./App-C7Yf3r-l.js";import"./one-light-CoLDteqg.js";import"./index-BgLrS_2D.js";import"./defaultLocale-DX6XiGOO.js";function nr(t,e){let n;if(e===void 0)for(const r of t)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let i of t)(i=e(i,++r,t))!=null&&(n<i||n===void 0&&i>=i)&&(n=i)}return n}function rr(t,e){let n;if(e===void 0)for(const r of t)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let i of t)(i=e(i,++r,t))!=null&&(n>i||n===void 0&&i>=i)&&(n=i)}return n}function ir(t){return t}var Gt=1,le=2,xe=3,Xt=4,Pe=1e-6;function sr(t){return"translate("+t+",0)"}function ar(t){return"translate(0,"+t+")"}function or(t){return e=>+t(e)}function cr(t,e){return e=Math.max(0,t.bandwidth()-e*2)/2,t.round()&&(e=Math.round(e)),n=>+t(n)+e}function ur(){return!this.__axis}function fn(t,e){var n=[],r=null,i=null,s=6,a=6,y=3,F=typeof window<"u"&&window.devicePixelRatio>1?0:.5,S=t===Gt||t===Xt?-1:1,w=t===Xt||t===le?"x":"y",P=t===Gt||t===xe?sr:ar;function _(Y){var X=r??(e.ticks?e.ticks.apply(e,n):e.domain()),B=i??(e.tickFormat?e.tickFormat.apply(e,n):ir),v=Math.max(s,0)+y,U=e.range(),R=+U[0]+F,E=+U[U.length-1]+F,z=(e.bandwidth?cr:or)(e.copy(),F),G=Y.selection?Y.selection():Y,T=G.selectAll(".domain").data([null]),k=G.selectAll(".tick").data(X,e).order(),p=k.exit(),L=k.enter().append("g").attr("class","tick"),x=k.select("line"),C=k.select("text");T=T.merge(T.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),k=k.merge(L),x=x.merge(L.append("line").attr("stroke","currentColor").attr(w+"2",S*s)),C=C.merge(L.append("text").attr("fill","currentColor").attr(w,S*v).attr("dy",t===Gt?"0em":t===xe?"0.71em":"0.32em")),Y!==G&&(T=T.transition(Y),k=k.transition(Y),x=x.transition(Y),C=C.transition(Y),p=p.transition(Y).attr("opacity",Pe).attr("transform",function(M){return isFinite(M=z(M))?P(M+F):this.getAttribute("transform")}),L.attr("opacity",Pe).attr("transform",function(M){var D=this.parentNode.__axis;return P((D&&isFinite(D=D(M))?D:z(M))+F)})),p.remove(),T.attr("d",t===Xt||t===le?a?"M"+S*a+","+R+"H"+F+"V"+E+"H"+S*a:"M"+F+","+R+"V"+E:a?"M"+R+","+S*a+"V"+F+"H"+E+"V"+S*a:"M"+R+","+F+"H"+E),k.attr("opacity",1).attr("transform",function(M){return P(z(M)+F)}),x.attr(w+"2",S*s),C.attr(w,S*v).text(B),G.filter(ur).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===le?"start":t===Xt?"end":"middle"),G.each(function(){this.__axis=z})}return _.scale=function(Y){return arguments.length?(e=Y,_):e},_.ticks=function(){return n=Array.from(arguments),_},_.tickArguments=function(Y){return arguments.length?(n=Y==null?[]:Array.from(Y),_):n.slice()},_.tickValues=function(Y){return arguments.length?(r=Y==null?null:Array.from(Y),_):r&&r.slice()},_.tickFormat=function(Y){return arguments.length?(i=Y,_):i},_.tickSize=function(Y){return arguments.length?(s=a=+Y,_):s},_.tickSizeInner=function(Y){return arguments.length?(s=+Y,_):s},_.tickSizeOuter=function(Y){return arguments.length?(a=+Y,_):a},_.tickPadding=function(Y){return arguments.length?(y=+Y,_):y},_.offset=function(Y){return arguments.length?(F=+Y,_):F},_}function lr(t){return fn(Gt,t)}function fr(t){return fn(xe,t)}const dr=Math.PI/180,hr=180/Math.PI,ne=18,dn=.96422,hn=1,mn=.82521,gn=4/29,Ft=6/29,yn=3*Ft*Ft,mr=Ft*Ft*Ft;function kn(t){if(t instanceof ft)return new ft(t.l,t.a,t.b,t.opacity);if(t instanceof ht)return pn(t);t instanceof on||(t=On(t));var e=me(t.r),n=me(t.g),r=me(t.b),i=fe((.2225045*e+.7168786*n+.0606169*r)/hn),s,a;return e===n&&n===r?s=a=i:(s=fe((.4360747*e+.3850649*n+.1430804*r)/dn),a=fe((.0139322*e+.0971045*n+.7141733*r)/mn)),new ft(116*i-16,500*(s-i),200*(i-a),t.opacity)}function gr(t,e,n,r){return arguments.length===1?kn(t):new ft(t,e,n,r??1)}function ft(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}cn(ft,gr,un(ln,{brighter(t){return new ft(this.l+ne*(t??1),this.a,this.b,this.opacity)},darker(t){return new ft(this.l-ne*(t??1),this.a,this.b,this.opacity)},rgb(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return e=dn*de(e),t=hn*de(t),n=mn*de(n),new on(he(3.1338561*e-1.6168667*t-.4906146*n),he(-.9787684*e+1.9161415*t+.033454*n),he(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}}));function fe(t){return t>mr?Math.pow(t,1/3):t/yn+gn}function de(t){return t>Ft?t*t*t:yn*(t-gn)}function he(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function me(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function yr(t){if(t instanceof ht)return new ht(t.h,t.c,t.l,t.opacity);if(t instanceof ft||(t=kn(t)),t.a===0&&t.b===0)return new ht(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*hr;return new ht(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function be(t,e,n,r){return arguments.length===1?yr(t):new ht(t,e,n,r??1)}function ht(t,e,n,r){this.h=+t,this.c=+e,this.l=+n,this.opacity=+r}function pn(t){if(isNaN(t.h))return new ft(t.l,0,0,t.opacity);var e=t.h*dr;return new ft(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}cn(ht,be,un(ln,{brighter(t){return new ht(this.h,this.c,this.l+ne*(t??1),this.opacity)},darker(t){return new ht(this.h,this.c,this.l-ne*(t??1),this.opacity)},rgb(){return pn(this).rgb()}}));function kr(t){return function(e,n){var r=t((e=be(e)).h,(n=be(n)).h),i=ue(e.c,n.c),s=ue(e.l,n.l),a=ue(e.opacity,n.opacity);return function(y){return e.h=r(y),e.c=i(y),e.l=s(y),e.opacity=a(y),e+""}}}const pr=kr(Hn);function vr(t,e){t=t.slice();var n=0,r=t.length-1,i=t[n],s=t[r],a;return s<i&&(a=n,n=r,r=a,a=i,i=s,s=a),t[n]=e.floor(i),t[r]=e.ceil(s),t}const ge=new Date,ye=new Date;function nt(t,e,n,r){function i(s){return t(s=arguments.length===0?new Date:new Date(+s)),s}return i.floor=s=>(t(s=new Date(+s)),s),i.ceil=s=>(t(s=new Date(s-1)),e(s,1),t(s),s),i.round=s=>{const a=i(s),y=i.ceil(s);return s-a<y-s?a:y},i.offset=(s,a)=>(e(s=new Date(+s),a==null?1:Math.floor(a)),s),i.range=(s,a,y)=>{const F=[];if(s=i.ceil(s),y=y==null?1:Math.floor(y),!(s<a)||!(y>0))return F;let S;do F.push(S=new Date(+s)),e(s,y),t(s);while(S<s&&s<a);return F},i.filter=s=>nt(a=>{if(a>=a)for(;t(a),!s(a);)a.setTime(a-1)},(a,y)=>{if(a>=a)if(y<0)for(;++y<=0;)for(;e(a,-1),!s(a););else for(;--y>=0;)for(;e(a,1),!s(a););}),n&&(i.count=(s,a)=>(ge.setTime(+s),ye.setTime(+a),t(ge),t(ye),Math.floor(n(ge,ye))),i.every=s=>(s=Math.floor(s),!isFinite(s)||!(s>0)?null:s>1?i.filter(r?a=>r(a)%s===0:a=>i.count(0,a)%s===0):i)),i}const Et=nt(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);Et.every=t=>(t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?nt(e=>{e.setTime(Math.floor(e/t)*t)},(e,n)=>{e.setTime(+e+n*t)},(e,n)=>(n-e)/t):Et);Et.range;const mt=1e3,ct=mt*60,gt=ct*60,yt=gt*24,Se=yt*7,Ve=yt*30,ke=yt*365,vt=nt(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*mt)},(t,e)=>(e-t)/mt,t=>t.getUTCSeconds());vt.range;const Nt=nt(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*mt)},(t,e)=>{t.setTime(+t+e*ct)},(t,e)=>(e-t)/ct,t=>t.getMinutes());Nt.range;const Tr=nt(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*ct)},(t,e)=>(e-t)/ct,t=>t.getUTCMinutes());Tr.range;const Pt=nt(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*mt-t.getMinutes()*ct)},(t,e)=>{t.setTime(+t+e*gt)},(t,e)=>(e-t)/gt,t=>t.getHours());Pt.range;const xr=nt(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*gt)},(t,e)=>(e-t)/gt,t=>t.getUTCHours());xr.range;const xt=nt(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*ct)/yt,t=>t.getDate()-1);xt.range;const _e=nt(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/yt,t=>t.getUTCDate()-1);_e.range;const br=nt(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/yt,t=>Math.floor(t/yt));br.range;function Dt(t){return nt(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(e,n)=>{e.setDate(e.getDate()+n*7)},(e,n)=>(n-e-(n.getTimezoneOffset()-e.getTimezoneOffset())*ct)/Se)}const zt=Dt(0),Vt=Dt(1),vn=Dt(2),Tn=Dt(3),bt=Dt(4),xn=Dt(5),bn=Dt(6);zt.range;Vt.range;vn.range;Tn.range;bt.range;xn.range;bn.range;function Mt(t){return nt(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCDate(e.getUTCDate()+n*7)},(e,n)=>(n-e)/Se)}const wn=Mt(0),re=Mt(1),wr=Mt(2),Dr=Mt(3),It=Mt(4),Mr=Mt(5),Cr=Mt(6);wn.range;re.range;wr.range;Dr.range;It.range;Mr.range;Cr.range;const Rt=nt(t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e)=>{t.setMonth(t.getMonth()+e)},(t,e)=>e.getMonth()-t.getMonth()+(e.getFullYear()-t.getFullYear())*12,t=>t.getMonth());Rt.range;const Sr=nt(t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)},(t,e)=>e.getUTCMonth()-t.getUTCMonth()+(e.getUTCFullYear()-t.getUTCFullYear())*12,t=>t.getUTCMonth());Sr.range;const kt=nt(t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e)=>{t.setFullYear(t.getFullYear()+e)},(t,e)=>e.getFullYear()-t.getFullYear(),t=>t.getFullYear());kt.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:nt(e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,n)=>{e.setFullYear(e.getFullYear()+n*t)});kt.range;const wt=nt(t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)},(t,e)=>e.getUTCFullYear()-t.getUTCFullYear(),t=>t.getUTCFullYear());wt.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:nt(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCFullYear(e.getUTCFullYear()+n*t)});wt.range;function _r(t,e,n,r,i,s){const a=[[vt,1,mt],[vt,5,5*mt],[vt,15,15*mt],[vt,30,30*mt],[s,1,ct],[s,5,5*ct],[s,15,15*ct],[s,30,30*ct],[i,1,gt],[i,3,3*gt],[i,6,6*gt],[i,12,12*gt],[r,1,yt],[r,2,2*yt],[n,1,Se],[e,1,Ve],[e,3,3*Ve],[t,1,ke]];function y(S,w,P){const _=w<S;_&&([S,w]=[w,S]);const Y=P&&typeof P.range=="function"?P:F(S,w,P),X=Y?Y.range(S,+w+1):[];return _?X.reverse():X}function F(S,w,P){const _=Math.abs(w-S)/P,Y=Qn(([,,v])=>v).right(a,_);if(Y===a.length)return t.every(Ne(S/ke,w/ke,P));if(Y===0)return Et.every(Math.max(Ne(S,w,P),1));const[X,B]=a[_/a[Y-1][2]<a[Y][2]/_?Y-1:Y];return X.every(B)}return[y,F]}const[Yr,Fr]=_r(kt,Rt,zt,xt,Pt,Nt);function pe(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function ve(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function $t(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}function Ur(t){var e=t.dateTime,n=t.date,r=t.time,i=t.periods,s=t.days,a=t.shortDays,y=t.months,F=t.shortMonths,S=Ot(i),w=Ht(i),P=Ot(s),_=Ht(s),Y=Ot(a),X=Ht(a),B=Ot(y),v=Ht(y),U=Ot(F),R=Ht(F),E={a:m,A:I,b:o,B:W,c:null,d:Xe,e:Xe,f:ti,g:li,G:di,H:Qr,I:Jr,j:Kr,L:Dn,m:ei,M:ni,p:u,q:K,Q:Qe,s:Je,S:ri,u:ii,U:si,V:ai,w:oi,W:ci,x:null,X:null,y:ui,Y:fi,Z:hi,"%":je},z={a:l,A:$,b:O,B:j,c:null,d:Ge,e:Ge,f:ki,g:Si,G:Yi,H:mi,I:gi,j:yi,L:Cn,m:pi,M:vi,p:H,q:J,Q:Qe,s:Je,S:Ti,u:xi,U:bi,V:wi,w:Di,W:Mi,x:null,X:null,y:Ci,Y:_i,Z:Fi,"%":je},G={a:x,A:C,b:M,B:D,c,d:Be,e:Be,f:Zr,g:qe,G:ze,H:Ze,I:Ze,j:Rr,L:Br,m:Vr,M:zr,p:L,q:Pr,Q:Gr,s:jr,S:qr,u:Wr,U:$r,V:Or,w:Ar,W:Hr,x:g,X:b,y:qe,Y:ze,Z:Nr,"%":Xr};E.x=T(n,E),E.X=T(r,E),E.c=T(e,E),z.x=T(n,z),z.X=T(r,z),z.c=T(e,z);function T(h,N){return function(V){var f=[],tt=-1,A=0,Q=h.length,Z,st,at;for(V instanceof Date||(V=new Date(+V));++tt<Q;)h.charCodeAt(tt)===37&&(f.push(h.slice(A,tt)),(st=Re[Z=h.charAt(++tt)])!=null?Z=h.charAt(++tt):st=Z==="e"?" ":"0",(at=N[Z])&&(Z=at(V,st)),f.push(Z),A=tt+1);return f.push(h.slice(A,tt)),f.join("")}}function k(h,N){return function(V){var f=$t(1900,void 0,1),tt=p(f,h,V+="",0),A,Q;if(tt!=V.length)return null;if("Q"in f)return new Date(f.Q);if("s"in f)return new Date(f.s*1e3+("L"in f?f.L:0));if(N&&!("Z"in f)&&(f.Z=0),"p"in f&&(f.H=f.H%12+f.p*12),f.m===void 0&&(f.m="q"in f?f.q:0),"V"in f){if(f.V<1||f.V>53)return null;"w"in f||(f.w=1),"Z"in f?(A=ve($t(f.y,0,1)),Q=A.getUTCDay(),A=Q>4||Q===0?re.ceil(A):re(A),A=_e.offset(A,(f.V-1)*7),f.y=A.getUTCFullYear(),f.m=A.getUTCMonth(),f.d=A.getUTCDate()+(f.w+6)%7):(A=pe($t(f.y,0,1)),Q=A.getDay(),A=Q>4||Q===0?Vt.ceil(A):Vt(A),A=xt.offset(A,(f.V-1)*7),f.y=A.getFullYear(),f.m=A.getMonth(),f.d=A.getDate()+(f.w+6)%7)}else("W"in f||"U"in f)&&("w"in f||(f.w="u"in f?f.u%7:"W"in f?1:0),Q="Z"in f?ve($t(f.y,0,1)).getUTCDay():pe($t(f.y,0,1)).getDay(),f.m=0,f.d="W"in f?(f.w+6)%7+f.W*7-(Q+5)%7:f.w+f.U*7-(Q+6)%7);return"Z"in f?(f.H+=f.Z/100|0,f.M+=f.Z%100,ve(f)):pe(f)}}function p(h,N,V,f){for(var tt=0,A=N.length,Q=V.length,Z,st;tt<A;){if(f>=Q)return-1;if(Z=N.charCodeAt(tt++),Z===37){if(Z=N.charAt(tt++),st=G[Z in Re?N.charAt(tt++):Z],!st||(f=st(h,V,f))<0)return-1}else if(Z!=V.charCodeAt(f++))return-1}return f}function L(h,N,V){var f=S.exec(N.slice(V));return f?(h.p=w.get(f[0].toLowerCase()),V+f[0].length):-1}function x(h,N,V){var f=Y.exec(N.slice(V));return f?(h.w=X.get(f[0].toLowerCase()),V+f[0].length):-1}function C(h,N,V){var f=P.exec(N.slice(V));return f?(h.w=_.get(f[0].toLowerCase()),V+f[0].length):-1}function M(h,N,V){var f=U.exec(N.slice(V));return f?(h.m=R.get(f[0].toLowerCase()),V+f[0].length):-1}function D(h,N,V){var f=B.exec(N.slice(V));return f?(h.m=v.get(f[0].toLowerCase()),V+f[0].length):-1}function c(h,N,V){return p(h,e,N,V)}function g(h,N,V){return p(h,n,N,V)}function b(h,N,V){return p(h,r,N,V)}function m(h){return a[h.getDay()]}function I(h){return s[h.getDay()]}function o(h){return F[h.getMonth()]}function W(h){return y[h.getMonth()]}function u(h){return i[+(h.getHours()>=12)]}function K(h){return 1+~~(h.getMonth()/3)}function l(h){return a[h.getUTCDay()]}function $(h){return s[h.getUTCDay()]}function O(h){return F[h.getUTCMonth()]}function j(h){return y[h.getUTCMonth()]}function H(h){return i[+(h.getUTCHours()>=12)]}function J(h){return 1+~~(h.getUTCMonth()/3)}return{format:function(h){var N=T(h+="",E);return N.toString=function(){return h},N},parse:function(h){var N=k(h+="",!1);return N.toString=function(){return h},N},utcFormat:function(h){var N=T(h+="",z);return N.toString=function(){return h},N},utcParse:function(h){var N=k(h+="",!0);return N.toString=function(){return h},N}}}var Re={"-":"",_:" ",0:"0"},rt=/^\s*\d+/,Er=/^%/,Ir=/[\\^$*+?|[\]().{}]/g;function q(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",s=i.length;return r+(s<n?new Array(n-s+1).join(e)+i:i)}function Lr(t){return t.replace(Ir,"\\$&")}function Ot(t){return new RegExp("^(?:"+t.map(Lr).join("|")+")","i")}function Ht(t){return new Map(t.map((e,n)=>[e.toLowerCase(),n]))}function Ar(t,e,n){var r=rt.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function Wr(t,e,n){var r=rt.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function $r(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function Or(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function Hr(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function ze(t,e,n){var r=rt.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function qe(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Nr(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function Pr(t,e,n){var r=rt.exec(e.slice(n,n+1));return r?(t.q=r[0]*3-3,n+r[0].length):-1}function Vr(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function Be(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function Rr(t,e,n){var r=rt.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function Ze(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function zr(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function qr(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function Br(t,e,n){var r=rt.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function Zr(t,e,n){var r=rt.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Xr(t,e,n){var r=Er.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function Gr(t,e,n){var r=rt.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function jr(t,e,n){var r=rt.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function Xe(t,e){return q(t.getDate(),e,2)}function Qr(t,e){return q(t.getHours(),e,2)}function Jr(t,e){return q(t.getHours()%12||12,e,2)}function Kr(t,e){return q(1+xt.count(kt(t),t),e,3)}function Dn(t,e){return q(t.getMilliseconds(),e,3)}function ti(t,e){return Dn(t,e)+"000"}function ei(t,e){return q(t.getMonth()+1,e,2)}function ni(t,e){return q(t.getMinutes(),e,2)}function ri(t,e){return q(t.getSeconds(),e,2)}function ii(t){var e=t.getDay();return e===0?7:e}function si(t,e){return q(zt.count(kt(t)-1,t),e,2)}function Mn(t){var e=t.getDay();return e>=4||e===0?bt(t):bt.ceil(t)}function ai(t,e){return t=Mn(t),q(bt.count(kt(t),t)+(kt(t).getDay()===4),e,2)}function oi(t){return t.getDay()}function ci(t,e){return q(Vt.count(kt(t)-1,t),e,2)}function ui(t,e){return q(t.getFullYear()%100,e,2)}function li(t,e){return t=Mn(t),q(t.getFullYear()%100,e,2)}function fi(t,e){return q(t.getFullYear()%1e4,e,4)}function di(t,e){var n=t.getDay();return t=n>=4||n===0?bt(t):bt.ceil(t),q(t.getFullYear()%1e4,e,4)}function hi(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+q(e/60|0,"0",2)+q(e%60,"0",2)}function Ge(t,e){return q(t.getUTCDate(),e,2)}function mi(t,e){return q(t.getUTCHours(),e,2)}function gi(t,e){return q(t.getUTCHours()%12||12,e,2)}function yi(t,e){return q(1+_e.count(wt(t),t),e,3)}function Cn(t,e){return q(t.getUTCMilliseconds(),e,3)}function ki(t,e){return Cn(t,e)+"000"}function pi(t,e){return q(t.getUTCMonth()+1,e,2)}function vi(t,e){return q(t.getUTCMinutes(),e,2)}function Ti(t,e){return q(t.getUTCSeconds(),e,2)}function xi(t){var e=t.getUTCDay();return e===0?7:e}function bi(t,e){return q(wn.count(wt(t)-1,t),e,2)}function Sn(t){var e=t.getUTCDay();return e>=4||e===0?It(t):It.ceil(t)}function wi(t,e){return t=Sn(t),q(It.count(wt(t),t)+(wt(t).getUTCDay()===4),e,2)}function Di(t){return t.getUTCDay()}function Mi(t,e){return q(re.count(wt(t)-1,t),e,2)}function Ci(t,e){return q(t.getUTCFullYear()%100,e,2)}function Si(t,e){return t=Sn(t),q(t.getUTCFullYear()%100,e,2)}function _i(t,e){return q(t.getUTCFullYear()%1e4,e,4)}function Yi(t,e){var n=t.getUTCDay();return t=n>=4||n===0?It(t):It.ceil(t),q(t.getUTCFullYear()%1e4,e,4)}function Fi(){return"+0000"}function je(){return"%"}function Qe(t){return+t}function Je(t){return Math.floor(+t/1e3)}var St,ie;Ui({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function Ui(t){return St=Ur(t),ie=St.format,St.parse,St.utcFormat,St.utcParse,St}function Ei(t){return new Date(t)}function Ii(t){return t instanceof Date?+t:+new Date(+t)}function _n(t,e,n,r,i,s,a,y,F,S){var w=Jn(),P=w.invert,_=w.domain,Y=S(".%L"),X=S(":%S"),B=S("%I:%M"),v=S("%I %p"),U=S("%a %d"),R=S("%b %d"),E=S("%B"),z=S("%Y");function G(T){return(F(T)<T?Y:y(T)<T?X:a(T)<T?B:s(T)<T?v:r(T)<T?i(T)<T?U:R:n(T)<T?E:z)(T)}return w.invert=function(T){return new Date(P(T))},w.domain=function(T){return arguments.length?_(Array.from(T,Ii)):_().map(Ei)},w.ticks=function(T){var k=_();return t(k[0],k[k.length-1],T??10)},w.tickFormat=function(T,k){return k==null?G:S(k)},w.nice=function(T){var k=_();return(!T||typeof T.range!="function")&&(T=e(k[0],k[k.length-1],T??10)),T?_(vr(k,T)):w},w.copy=function(){return Kn(w,_n(t,e,n,r,i,s,a,y,F,S))},w}function Li(){return er.apply(_n(Yr,Fr,kt,Rt,zt,xt,Pt,Nt,vt,ie).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}var jt={exports:{}},Ai=jt.exports,Ke;function Wi(){return Ke||(Ke=1,(function(t,e){(function(n,r){t.exports=r()})(Ai,(function(){var n="day";return function(r,i,s){var a=function(S){return S.add(4-S.isoWeekday(),n)},y=i.prototype;y.isoWeekYear=function(){return a(this).year()},y.isoWeek=function(S){if(!this.$utils().u(S))return this.add(7*(S-this.isoWeek()),n);var w,P,_,Y,X=a(this),B=(w=this.isoWeekYear(),P=this.$u,_=(P?s.utc:s)().year(w).startOf("year"),Y=4-_.isoWeekday(),_.isoWeekday()>4&&(Y+=7),_.add(Y,n));return X.diff(B,"week")+1},y.isoWeekday=function(S){return this.$utils().u(S)?this.day()||7:this.day(this.day()%7?S:S-7)};var F=y.startOf;y.startOf=function(S,w){var P=this.$utils(),_=!!P.u(w)||w;return P.p(S)==="isoweek"?_?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):F.bind(this)(S,w)}}}))})(jt)),jt.exports}var $i=Wi();const Oi=oe($i);var Qt={exports:{}},Hi=Qt.exports,tn;function Ni(){return tn||(tn=1,(function(t,e){(function(n,r){t.exports=r()})(Hi,(function(){var n={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},r=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,i=/\d/,s=/\d\d/,a=/\d\d?/,y=/\d*[^-_:/,()\s\d]+/,F={},S=function(v){return(v=+v)+(v>68?1900:2e3)},w=function(v){return function(U){this[v]=+U}},P=[/[+-]\d\d:?(\d\d)?|Z/,function(v){(this.zone||(this.zone={})).offset=(function(U){if(!U||U==="Z")return 0;var R=U.match(/([+-]|\d\d)/g),E=60*R[1]+(+R[2]||0);return E===0?0:R[0]==="+"?-E:E})(v)}],_=function(v){var U=F[v];return U&&(U.indexOf?U:U.s.concat(U.f))},Y=function(v,U){var R,E=F.meridiem;if(E){for(var z=1;z<=24;z+=1)if(v.indexOf(E(z,0,U))>-1){R=z>12;break}}else R=v===(U?"pm":"PM");return R},X={A:[y,function(v){this.afternoon=Y(v,!1)}],a:[y,function(v){this.afternoon=Y(v,!0)}],Q:[i,function(v){this.month=3*(v-1)+1}],S:[i,function(v){this.milliseconds=100*+v}],SS:[s,function(v){this.milliseconds=10*+v}],SSS:[/\d{3}/,function(v){this.milliseconds=+v}],s:[a,w("seconds")],ss:[a,w("seconds")],m:[a,w("minutes")],mm:[a,w("minutes")],H:[a,w("hours")],h:[a,w("hours")],HH:[a,w("hours")],hh:[a,w("hours")],D:[a,w("day")],DD:[s,w("day")],Do:[y,function(v){var U=F.ordinal,R=v.match(/\d+/);if(this.day=R[0],U)for(var E=1;E<=31;E+=1)U(E).replace(/\[|\]/g,"")===v&&(this.day=E)}],w:[a,w("week")],ww:[s,w("week")],M:[a,w("month")],MM:[s,w("month")],MMM:[y,function(v){var U=_("months"),R=(_("monthsShort")||U.map((function(E){return E.slice(0,3)}))).indexOf(v)+1;if(R<1)throw new Error;this.month=R%12||R}],MMMM:[y,function(v){var U=_("months").indexOf(v)+1;if(U<1)throw new Error;this.month=U%12||U}],Y:[/[+-]?\d+/,w("year")],YY:[s,function(v){this.year=S(v)}],YYYY:[/\d{4}/,w("year")],Z:P,ZZ:P};function B(v){var U,R;U=v,R=F&&F.formats;for(var E=(v=U.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(x,C,M){var D=M&&M.toUpperCase();return C||R[M]||n[M]||R[D].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(c,g,b){return g||b.slice(1)}))}))).match(r),z=E.length,G=0;G<z;G+=1){var T=E[G],k=X[T],p=k&&k[0],L=k&&k[1];E[G]=L?{regex:p,parser:L}:T.replace(/^\[|\]$/g,"")}return function(x){for(var C={},M=0,D=0;M<z;M+=1){var c=E[M];if(typeof c=="string")D+=c.length;else{var g=c.regex,b=c.parser,m=x.slice(D),I=g.exec(m)[0];b.call(C,I),x=x.replace(I,"")}}return(function(o){var W=o.afternoon;if(W!==void 0){var u=o.hours;W?u<12&&(o.hours+=12):u===12&&(o.hours=0),delete o.afternoon}})(C),C}}return function(v,U,R){R.p.customParseFormat=!0,v&&v.parseTwoDigitYear&&(S=v.parseTwoDigitYear);var E=U.prototype,z=E.parse;E.parse=function(G){var T=G.date,k=G.utc,p=G.args;this.$u=k;var L=p[1];if(typeof L=="string"){var x=p[2]===!0,C=p[3]===!0,M=x||C,D=p[2];C&&(D=p[2]),F=this.$locale(),!x&&D&&(F=R.Ls[D]),this.$d=(function(m,I,o,W){try{if(["x","X"].indexOf(I)>-1)return new Date((I==="X"?1e3:1)*m);var u=B(I)(m),K=u.year,l=u.month,$=u.day,O=u.hours,j=u.minutes,H=u.seconds,J=u.milliseconds,h=u.zone,N=u.week,V=new Date,f=$||(K||l?1:V.getDate()),tt=K||V.getFullYear(),A=0;K&&!l||(A=l>0?l-1:V.getMonth());var Q,Z=O||0,st=j||0,at=H||0,pt=J||0;return h?new Date(Date.UTC(tt,A,f,Z,st,at,pt+60*h.offset*1e3)):o?new Date(Date.UTC(tt,A,f,Z,st,at,pt)):(Q=new Date(tt,A,f,Z,st,at,pt),N&&(Q=W(Q).week(N).toDate()),Q)}catch{return new Date("")}})(T,L,k,R),this.init(),D&&D!==!0&&(this.$L=this.locale(D).$L),M&&T!=this.format(L)&&(this.$d=new Date("")),F={}}else if(L instanceof Array)for(var c=L.length,g=1;g<=c;g+=1){p[1]=L[g-1];var b=R.apply(this,p);if(b.isValid()){this.$d=b.$d,this.$L=b.$L,this.init();break}g===c&&(this.$d=new Date(""))}else z.call(this,G)}}}))})(Qt)),Qt.exports}var Pi=Ni();const Vi=oe(Pi);var Jt={exports:{}},Ri=Jt.exports,en;function zi(){return en||(en=1,(function(t,e){(function(n,r){t.exports=r()})(Ri,(function(){return function(n,r){var i=r.prototype,s=i.format;i.format=function(a){var y=this,F=this.$locale();if(!this.isValid())return s.bind(this)(a);var S=this.$utils(),w=(a||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,(function(P){switch(P){case"Q":return Math.ceil((y.$M+1)/3);case"Do":return F.ordinal(y.$D);case"gggg":return y.weekYear();case"GGGG":return y.isoWeekYear();case"wo":return F.ordinal(y.week(),"W");case"w":case"ww":return S.s(y.week(),P==="w"?1:2,"0");case"W":case"WW":return S.s(y.isoWeek(),P==="W"?1:2,"0");case"k":case"kk":return S.s(String(y.$H===0?24:y.$H),P==="k"?1:2,"0");case"X":return Math.floor(y.$d.getTime()/1e3);case"x":return y.$d.getTime();case"z":return"["+y.offsetName()+"]";case"zzz":return"["+y.offsetName("long")+"]";default:return P}}));return s.bind(this)(w)}}}))})(Jt)),Jt.exports}var qi=zi();const Bi=oe(qi);var Kt={exports:{}},Zi=Kt.exports,nn;function Xi(){return nn||(nn=1,(function(t,e){(function(n,r){t.exports=r()})(Zi,(function(){var n,r,i=1e3,s=6e4,a=36e5,y=864e5,F=31536e6,S=2628e6,w=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,P=/\[([^\]]+)]|YYYY|YY|Y|M{1,2}|D{1,2}|H{1,2}|m{1,2}|s{1,2}|SSS/g,_={years:F,months:S,days:y,hours:a,minutes:s,seconds:i,milliseconds:1,weeks:6048e5},Y=function(T){return T instanceof z},X=function(T,k,p){return new z(T,p,k.$l)},B=function(T){return r.p(T)+"s"},v=function(T){return T<0},U=function(T){return v(T)?Math.ceil(T):Math.floor(T)},R=function(T){return Math.abs(T)},E=function(T,k){return T?v(T)?{negative:!0,format:""+R(T)+k}:{negative:!1,format:""+T+k}:{negative:!1,format:""}},z=(function(){function T(p,L,x){var C=this;if(this.$d={},this.$l=x,p===void 0&&(this.$ms=0,this.parseFromMilliseconds()),L)return X(p*_[B(L)],this);if(typeof p=="number")return this.$ms=p,this.parseFromMilliseconds(),this;if(typeof p=="object")return Object.keys(p).forEach((function(c){C.$d[B(c)]=p[c]})),this.calMilliseconds(),this;if(typeof p=="string"){var M=p.match(w);if(M){var D=M.slice(2).map((function(c){return c!=null?Number(c):0}));return this.$d.years=D[0],this.$d.months=D[1],this.$d.weeks=D[2],this.$d.days=D[3],this.$d.hours=D[4],this.$d.minutes=D[5],this.$d.seconds=D[6],this.calMilliseconds(),this}}return this}var k=T.prototype;return k.calMilliseconds=function(){var p=this;this.$ms=Object.keys(this.$d).reduce((function(L,x){return L+(p.$d[x]||0)*_[x]}),0)},k.parseFromMilliseconds=function(){var p=this.$ms;this.$d.years=U(p/F),p%=F,this.$d.months=U(p/S),p%=S,this.$d.days=U(p/y),p%=y,this.$d.hours=U(p/a),p%=a,this.$d.minutes=U(p/s),p%=s,this.$d.seconds=U(p/i),p%=i,this.$d.milliseconds=p},k.toISOString=function(){var p=E(this.$d.years,"Y"),L=E(this.$d.months,"M"),x=+this.$d.days||0;this.$d.weeks&&(x+=7*this.$d.weeks);var C=E(x,"D"),M=E(this.$d.hours,"H"),D=E(this.$d.minutes,"M"),c=this.$d.seconds||0;this.$d.milliseconds&&(c+=this.$d.milliseconds/1e3,c=Math.round(1e3*c)/1e3);var g=E(c,"S"),b=p.negative||L.negative||C.negative||M.negative||D.negative||g.negative,m=M.format||D.format||g.format?"T":"",I=(b?"-":"")+"P"+p.format+L.format+C.format+m+M.format+D.format+g.format;return I==="P"||I==="-P"?"P0D":I},k.toJSON=function(){return this.toISOString()},k.format=function(p){var L=p||"YYYY-MM-DDTHH:mm:ss",x={Y:this.$d.years,YY:r.s(this.$d.years,2,"0"),YYYY:r.s(this.$d.years,4,"0"),M:this.$d.months,MM:r.s(this.$d.months,2,"0"),D:this.$d.days,DD:r.s(this.$d.days,2,"0"),H:this.$d.hours,HH:r.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:r.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:r.s(this.$d.seconds,2,"0"),SSS:r.s(this.$d.milliseconds,3,"0")};return L.replace(P,(function(C,M){return M||String(x[C])}))},k.as=function(p){return this.$ms/_[B(p)]},k.get=function(p){var L=this.$ms,x=B(p);return x==="milliseconds"?L%=1e3:L=x==="weeks"?U(L/_[x]):this.$d[x],L||0},k.add=function(p,L,x){var C;return C=L?p*_[B(L)]:Y(p)?p.$ms:X(p,this).$ms,X(this.$ms+C*(x?-1:1),this)},k.subtract=function(p,L){return this.add(p,L,!0)},k.locale=function(p){var L=this.clone();return L.$l=p,L},k.clone=function(){return X(this.$ms,this)},k.humanize=function(p){return n().add(this.$ms,"ms").locale(this.$l).fromNow(!p)},k.valueOf=function(){return this.asMilliseconds()},k.milliseconds=function(){return this.get("milliseconds")},k.asMilliseconds=function(){return this.as("milliseconds")},k.seconds=function(){return this.get("seconds")},k.asSeconds=function(){return this.as("seconds")},k.minutes=function(){return this.get("minutes")},k.asMinutes=function(){return this.as("minutes")},k.hours=function(){return this.get("hours")},k.asHours=function(){return this.as("hours")},k.days=function(){return this.get("days")},k.asDays=function(){return this.as("days")},k.weeks=function(){return this.get("weeks")},k.asWeeks=function(){return this.as("weeks")},k.months=function(){return this.get("months")},k.asMonths=function(){return this.as("months")},k.years=function(){return this.get("years")},k.asYears=function(){return this.as("years")},T})(),G=function(T,k,p){return T.add(k.years()*p,"y").add(k.months()*p,"M").add(k.days()*p,"d").add(k.hours()*p,"h").add(k.minutes()*p,"m").add(k.seconds()*p,"s").add(k.milliseconds()*p,"ms")};return function(T,k,p){n=p,r=p().$utils(),p.duration=function(C,M){var D=p.locale();return X(C,{$l:D},M)},p.isDuration=Y;var L=k.prototype.add,x=k.prototype.subtract;k.prototype.add=function(C,M){return Y(C)?G(this,C,1):L.bind(this)(C,M)},k.prototype.subtract=function(C,M){return Y(C)?G(this,C,-1):x.bind(this)(C,M)}}}))})(Kt)),Kt.exports}var Gi=Xi();const ji=oe(Gi);var we=(function(){var t=d(function(D,c,g,b){for(g=g||{},b=D.length;b--;g[D[b]]=c);return g},"o"),e=[6,8,10,12,13,14,15,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,33,35,36,38,40],n=[1,26],r=[1,27],i=[1,28],s=[1,29],a=[1,30],y=[1,31],F=[1,32],S=[1,33],w=[1,34],P=[1,9],_=[1,10],Y=[1,11],X=[1,12],B=[1,13],v=[1,14],U=[1,15],R=[1,16],E=[1,19],z=[1,20],G=[1,21],T=[1,22],k=[1,23],p=[1,25],L=[1,35],x={trace:d(function(){},"trace"),yy:{},symbols_:{error:2,start:3,gantt:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NL:10,weekday:11,weekday_monday:12,weekday_tuesday:13,weekday_wednesday:14,weekday_thursday:15,weekday_friday:16,weekday_saturday:17,weekday_sunday:18,weekend:19,weekend_friday:20,weekend_saturday:21,dateFormat:22,inclusiveEndDates:23,topAxis:24,axisFormat:25,tickInterval:26,excludes:27,includes:28,todayMarker:29,title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,section:36,clickStatement:37,taskTxt:38,taskData:39,click:40,callbackname:41,callbackargs:42,href:43,clickStatementDebug:44,$accept:0,$end:1},terminals_:{2:"error",4:"gantt",6:"EOF",8:"SPACE",10:"NL",12:"weekday_monday",13:"weekday_tuesday",14:"weekday_wednesday",15:"weekday_thursday",16:"weekday_friday",17:"weekday_saturday",18:"weekday_sunday",20:"weekend_friday",21:"weekend_saturday",22:"dateFormat",23:"inclusiveEndDates",24:"topAxis",25:"axisFormat",26:"tickInterval",27:"excludes",28:"includes",29:"todayMarker",30:"title",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",36:"section",38:"taskTxt",39:"taskData",40:"click",41:"callbackname",42:"callbackargs",43:"href"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[19,1],[19,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,2],[37,2],[37,3],[37,3],[37,4],[37,3],[37,4],[37,2],[44,2],[44,3],[44,3],[44,4],[44,3],[44,4],[44,2]],performAction:d(function(c,g,b,m,I,o,W){var u=o.length-1;switch(I){case 1:return o[u-1];case 2:this.$=[];break;case 3:o[u-1].push(o[u]),this.$=o[u-1];break;case 4:case 5:this.$=o[u];break;case 6:case 7:this.$=[];break;case 8:m.setWeekday("monday");break;case 9:m.setWeekday("tuesday");break;case 10:m.setWeekday("wednesday");break;case 11:m.setWeekday("thursday");break;case 12:m.setWeekday("friday");break;case 13:m.setWeekday("saturday");break;case 14:m.setWeekday("sunday");break;case 15:m.setWeekend("friday");break;case 16:m.setWeekend("saturday");break;case 17:m.setDateFormat(o[u].substr(11)),this.$=o[u].substr(11);break;case 18:m.enableInclusiveEndDates(),this.$=o[u].substr(18);break;case 19:m.TopAxis(),this.$=o[u].substr(8);break;case 20:m.setAxisFormat(o[u].substr(11)),this.$=o[u].substr(11);break;case 21:m.setTickInterval(o[u].substr(13)),this.$=o[u].substr(13);break;case 22:m.setExcludes(o[u].substr(9)),this.$=o[u].substr(9);break;case 23:m.setIncludes(o[u].substr(9)),this.$=o[u].substr(9);break;case 24:m.setTodayMarker(o[u].substr(12)),this.$=o[u].substr(12);break;case 27:m.setDiagramTitle(o[u].substr(6)),this.$=o[u].substr(6);break;case 28:this.$=o[u].trim(),m.setAccTitle(this.$);break;case 29:case 30:this.$=o[u].trim(),m.setAccDescription(this.$);break;case 31:m.addSection(o[u].substr(8)),this.$=o[u].substr(8);break;case 33:m.addTask(o[u-1],o[u]),this.$="task";break;case 34:this.$=o[u-1],m.setClickEvent(o[u-1],o[u],null);break;case 35:this.$=o[u-2],m.setClickEvent(o[u-2],o[u-1],o[u]);break;case 36:this.$=o[u-2],m.setClickEvent(o[u-2],o[u-1],null),m.setLink(o[u-2],o[u]);break;case 37:this.$=o[u-3],m.setClickEvent(o[u-3],o[u-2],o[u-1]),m.setLink(o[u-3],o[u]);break;case 38:this.$=o[u-2],m.setClickEvent(o[u-2],o[u],null),m.setLink(o[u-2],o[u-1]);break;case 39:this.$=o[u-3],m.setClickEvent(o[u-3],o[u-1],o[u]),m.setLink(o[u-3],o[u-2]);break;case 40:this.$=o[u-1],m.setLink(o[u-1],o[u]);break;case 41:case 47:this.$=o[u-1]+" "+o[u];break;case 42:case 43:case 45:this.$=o[u-2]+" "+o[u-1]+" "+o[u];break;case 44:case 46:this.$=o[u-3]+" "+o[u-2]+" "+o[u-1]+" "+o[u];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:17,12:n,13:r,14:i,15:s,16:a,17:y,18:F,19:18,20:S,21:w,22:P,23:_,24:Y,25:X,26:B,27:v,28:U,29:R,30:E,31:z,33:G,35:T,36:k,37:24,38:p,40:L},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:36,11:17,12:n,13:r,14:i,15:s,16:a,17:y,18:F,19:18,20:S,21:w,22:P,23:_,24:Y,25:X,26:B,27:v,28:U,29:R,30:E,31:z,33:G,35:T,36:k,37:24,38:p,40:L},t(e,[2,5]),t(e,[2,6]),t(e,[2,17]),t(e,[2,18]),t(e,[2,19]),t(e,[2,20]),t(e,[2,21]),t(e,[2,22]),t(e,[2,23]),t(e,[2,24]),t(e,[2,25]),t(e,[2,26]),t(e,[2,27]),{32:[1,37]},{34:[1,38]},t(e,[2,30]),t(e,[2,31]),t(e,[2,32]),{39:[1,39]},t(e,[2,8]),t(e,[2,9]),t(e,[2,10]),t(e,[2,11]),t(e,[2,12]),t(e,[2,13]),t(e,[2,14]),t(e,[2,15]),t(e,[2,16]),{41:[1,40],43:[1,41]},t(e,[2,4]),t(e,[2,28]),t(e,[2,29]),t(e,[2,33]),t(e,[2,34],{42:[1,42],43:[1,43]}),t(e,[2,40],{41:[1,44]}),t(e,[2,35],{43:[1,45]}),t(e,[2,36]),t(e,[2,38],{42:[1,46]}),t(e,[2,37]),t(e,[2,39])],defaultActions:{},parseError:d(function(c,g){if(g.recoverable)this.trace(c);else{var b=new Error(c);throw b.hash=g,b}},"parseError"),parse:d(function(c){var g=this,b=[0],m=[],I=[null],o=[],W=this.table,u="",K=0,l=0,$=2,O=1,j=o.slice.call(arguments,1),H=Object.create(this.lexer),J={yy:{}};for(var h in this.yy)Object.prototype.hasOwnProperty.call(this.yy,h)&&(J.yy[h]=this.yy[h]);H.setInput(c,J.yy),J.yy.lexer=H,J.yy.parser=this,typeof H.yylloc>"u"&&(H.yylloc={});var N=H.yylloc;o.push(N);var V=H.options&&H.options.ranges;typeof J.yy.parseError=="function"?this.parseError=J.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function f(ot){b.length=b.length-2*ot,I.length=I.length-ot,o.length=o.length-ot}d(f,"popStack");function tt(){var ot;return ot=m.pop()||H.lex()||O,typeof ot!="number"&&(ot instanceof Array&&(m=ot,ot=m.pop()),ot=g.symbols_[ot]||ot),ot}d(tt,"lex");for(var A,Q,Z,st,at={},pt,ut,He,Bt;;){if(Q=b[b.length-1],this.defaultActions[Q]?Z=this.defaultActions[Q]:((A===null||typeof A>"u")&&(A=tt()),Z=W[Q]&&W[Q][A]),typeof Z>"u"||!Z.length||!Z[0]){var ce="";Bt=[];for(pt in W[Q])this.terminals_[pt]&&pt>$&&Bt.push("'"+this.terminals_[pt]+"'");H.showPosition?ce="Parse error on line "+(K+1)+`:
1
+ import{bf as on,bg as On,bh as cn,bi as un,bj as ln,bk as ue,bl as Hn,g as Nn,s as Pn,p as Vn,o as Rn,a as zn,b as qn,_ as d,c as Yt,d as Zt,e as Bn,bm as it,l as Tt,k as Zn,j as Xn,q as Gn,y as jn}from"./mermaid.core-DnaJSnLe.js";import{g as oe}from"./react-rd22PHbN.js";import{b as Qn,t as Ne,c as Jn,a as Kn,l as tr}from"./linear-Tf-dXwQ9.js";import{i as er}from"./init-Gi6I4Gst.js";import"./index-BdjG_WtS.js";import"./tanstack-Bsd5UOY4.js";import"./base-ui-D4MeJpa3.js";import"./render-markdown-GXIpf9CM.js";import"./App-CeDVj5Hh.js";import"./one-light-CoLDteqg.js";import"./index-BgLrS_2D.js";import"./defaultLocale-DX6XiGOO.js";function nr(t,e){let n;if(e===void 0)for(const r of t)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let i of t)(i=e(i,++r,t))!=null&&(n<i||n===void 0&&i>=i)&&(n=i)}return n}function rr(t,e){let n;if(e===void 0)for(const r of t)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let i of t)(i=e(i,++r,t))!=null&&(n>i||n===void 0&&i>=i)&&(n=i)}return n}function ir(t){return t}var Gt=1,le=2,xe=3,Xt=4,Pe=1e-6;function sr(t){return"translate("+t+",0)"}function ar(t){return"translate(0,"+t+")"}function or(t){return e=>+t(e)}function cr(t,e){return e=Math.max(0,t.bandwidth()-e*2)/2,t.round()&&(e=Math.round(e)),n=>+t(n)+e}function ur(){return!this.__axis}function fn(t,e){var n=[],r=null,i=null,s=6,a=6,y=3,F=typeof window<"u"&&window.devicePixelRatio>1?0:.5,S=t===Gt||t===Xt?-1:1,w=t===Xt||t===le?"x":"y",P=t===Gt||t===xe?sr:ar;function _(Y){var X=r??(e.ticks?e.ticks.apply(e,n):e.domain()),B=i??(e.tickFormat?e.tickFormat.apply(e,n):ir),v=Math.max(s,0)+y,U=e.range(),R=+U[0]+F,E=+U[U.length-1]+F,z=(e.bandwidth?cr:or)(e.copy(),F),G=Y.selection?Y.selection():Y,T=G.selectAll(".domain").data([null]),k=G.selectAll(".tick").data(X,e).order(),p=k.exit(),L=k.enter().append("g").attr("class","tick"),x=k.select("line"),C=k.select("text");T=T.merge(T.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),k=k.merge(L),x=x.merge(L.append("line").attr("stroke","currentColor").attr(w+"2",S*s)),C=C.merge(L.append("text").attr("fill","currentColor").attr(w,S*v).attr("dy",t===Gt?"0em":t===xe?"0.71em":"0.32em")),Y!==G&&(T=T.transition(Y),k=k.transition(Y),x=x.transition(Y),C=C.transition(Y),p=p.transition(Y).attr("opacity",Pe).attr("transform",function(M){return isFinite(M=z(M))?P(M+F):this.getAttribute("transform")}),L.attr("opacity",Pe).attr("transform",function(M){var D=this.parentNode.__axis;return P((D&&isFinite(D=D(M))?D:z(M))+F)})),p.remove(),T.attr("d",t===Xt||t===le?a?"M"+S*a+","+R+"H"+F+"V"+E+"H"+S*a:"M"+F+","+R+"V"+E:a?"M"+R+","+S*a+"V"+F+"H"+E+"V"+S*a:"M"+R+","+F+"H"+E),k.attr("opacity",1).attr("transform",function(M){return P(z(M)+F)}),x.attr(w+"2",S*s),C.attr(w,S*v).text(B),G.filter(ur).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===le?"start":t===Xt?"end":"middle"),G.each(function(){this.__axis=z})}return _.scale=function(Y){return arguments.length?(e=Y,_):e},_.ticks=function(){return n=Array.from(arguments),_},_.tickArguments=function(Y){return arguments.length?(n=Y==null?[]:Array.from(Y),_):n.slice()},_.tickValues=function(Y){return arguments.length?(r=Y==null?null:Array.from(Y),_):r&&r.slice()},_.tickFormat=function(Y){return arguments.length?(i=Y,_):i},_.tickSize=function(Y){return arguments.length?(s=a=+Y,_):s},_.tickSizeInner=function(Y){return arguments.length?(s=+Y,_):s},_.tickSizeOuter=function(Y){return arguments.length?(a=+Y,_):a},_.tickPadding=function(Y){return arguments.length?(y=+Y,_):y},_.offset=function(Y){return arguments.length?(F=+Y,_):F},_}function lr(t){return fn(Gt,t)}function fr(t){return fn(xe,t)}const dr=Math.PI/180,hr=180/Math.PI,ne=18,dn=.96422,hn=1,mn=.82521,gn=4/29,Ft=6/29,yn=3*Ft*Ft,mr=Ft*Ft*Ft;function kn(t){if(t instanceof ft)return new ft(t.l,t.a,t.b,t.opacity);if(t instanceof ht)return pn(t);t instanceof on||(t=On(t));var e=me(t.r),n=me(t.g),r=me(t.b),i=fe((.2225045*e+.7168786*n+.0606169*r)/hn),s,a;return e===n&&n===r?s=a=i:(s=fe((.4360747*e+.3850649*n+.1430804*r)/dn),a=fe((.0139322*e+.0971045*n+.7141733*r)/mn)),new ft(116*i-16,500*(s-i),200*(i-a),t.opacity)}function gr(t,e,n,r){return arguments.length===1?kn(t):new ft(t,e,n,r??1)}function ft(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}cn(ft,gr,un(ln,{brighter(t){return new ft(this.l+ne*(t??1),this.a,this.b,this.opacity)},darker(t){return new ft(this.l-ne*(t??1),this.a,this.b,this.opacity)},rgb(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return e=dn*de(e),t=hn*de(t),n=mn*de(n),new on(he(3.1338561*e-1.6168667*t-.4906146*n),he(-.9787684*e+1.9161415*t+.033454*n),he(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}}));function fe(t){return t>mr?Math.pow(t,1/3):t/yn+gn}function de(t){return t>Ft?t*t*t:yn*(t-gn)}function he(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function me(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function yr(t){if(t instanceof ht)return new ht(t.h,t.c,t.l,t.opacity);if(t instanceof ft||(t=kn(t)),t.a===0&&t.b===0)return new ht(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*hr;return new ht(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function be(t,e,n,r){return arguments.length===1?yr(t):new ht(t,e,n,r??1)}function ht(t,e,n,r){this.h=+t,this.c=+e,this.l=+n,this.opacity=+r}function pn(t){if(isNaN(t.h))return new ft(t.l,0,0,t.opacity);var e=t.h*dr;return new ft(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}cn(ht,be,un(ln,{brighter(t){return new ht(this.h,this.c,this.l+ne*(t??1),this.opacity)},darker(t){return new ht(this.h,this.c,this.l-ne*(t??1),this.opacity)},rgb(){return pn(this).rgb()}}));function kr(t){return function(e,n){var r=t((e=be(e)).h,(n=be(n)).h),i=ue(e.c,n.c),s=ue(e.l,n.l),a=ue(e.opacity,n.opacity);return function(y){return e.h=r(y),e.c=i(y),e.l=s(y),e.opacity=a(y),e+""}}}const pr=kr(Hn);function vr(t,e){t=t.slice();var n=0,r=t.length-1,i=t[n],s=t[r],a;return s<i&&(a=n,n=r,r=a,a=i,i=s,s=a),t[n]=e.floor(i),t[r]=e.ceil(s),t}const ge=new Date,ye=new Date;function nt(t,e,n,r){function i(s){return t(s=arguments.length===0?new Date:new Date(+s)),s}return i.floor=s=>(t(s=new Date(+s)),s),i.ceil=s=>(t(s=new Date(s-1)),e(s,1),t(s),s),i.round=s=>{const a=i(s),y=i.ceil(s);return s-a<y-s?a:y},i.offset=(s,a)=>(e(s=new Date(+s),a==null?1:Math.floor(a)),s),i.range=(s,a,y)=>{const F=[];if(s=i.ceil(s),y=y==null?1:Math.floor(y),!(s<a)||!(y>0))return F;let S;do F.push(S=new Date(+s)),e(s,y),t(s);while(S<s&&s<a);return F},i.filter=s=>nt(a=>{if(a>=a)for(;t(a),!s(a);)a.setTime(a-1)},(a,y)=>{if(a>=a)if(y<0)for(;++y<=0;)for(;e(a,-1),!s(a););else for(;--y>=0;)for(;e(a,1),!s(a););}),n&&(i.count=(s,a)=>(ge.setTime(+s),ye.setTime(+a),t(ge),t(ye),Math.floor(n(ge,ye))),i.every=s=>(s=Math.floor(s),!isFinite(s)||!(s>0)?null:s>1?i.filter(r?a=>r(a)%s===0:a=>i.count(0,a)%s===0):i)),i}const Et=nt(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);Et.every=t=>(t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?nt(e=>{e.setTime(Math.floor(e/t)*t)},(e,n)=>{e.setTime(+e+n*t)},(e,n)=>(n-e)/t):Et);Et.range;const mt=1e3,ct=mt*60,gt=ct*60,yt=gt*24,Se=yt*7,Ve=yt*30,ke=yt*365,vt=nt(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*mt)},(t,e)=>(e-t)/mt,t=>t.getUTCSeconds());vt.range;const Nt=nt(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*mt)},(t,e)=>{t.setTime(+t+e*ct)},(t,e)=>(e-t)/ct,t=>t.getMinutes());Nt.range;const Tr=nt(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*ct)},(t,e)=>(e-t)/ct,t=>t.getUTCMinutes());Tr.range;const Pt=nt(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*mt-t.getMinutes()*ct)},(t,e)=>{t.setTime(+t+e*gt)},(t,e)=>(e-t)/gt,t=>t.getHours());Pt.range;const xr=nt(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*gt)},(t,e)=>(e-t)/gt,t=>t.getUTCHours());xr.range;const xt=nt(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*ct)/yt,t=>t.getDate()-1);xt.range;const _e=nt(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/yt,t=>t.getUTCDate()-1);_e.range;const br=nt(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/yt,t=>Math.floor(t/yt));br.range;function Dt(t){return nt(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(e,n)=>{e.setDate(e.getDate()+n*7)},(e,n)=>(n-e-(n.getTimezoneOffset()-e.getTimezoneOffset())*ct)/Se)}const zt=Dt(0),Vt=Dt(1),vn=Dt(2),Tn=Dt(3),bt=Dt(4),xn=Dt(5),bn=Dt(6);zt.range;Vt.range;vn.range;Tn.range;bt.range;xn.range;bn.range;function Mt(t){return nt(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCDate(e.getUTCDate()+n*7)},(e,n)=>(n-e)/Se)}const wn=Mt(0),re=Mt(1),wr=Mt(2),Dr=Mt(3),It=Mt(4),Mr=Mt(5),Cr=Mt(6);wn.range;re.range;wr.range;Dr.range;It.range;Mr.range;Cr.range;const Rt=nt(t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e)=>{t.setMonth(t.getMonth()+e)},(t,e)=>e.getMonth()-t.getMonth()+(e.getFullYear()-t.getFullYear())*12,t=>t.getMonth());Rt.range;const Sr=nt(t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)},(t,e)=>e.getUTCMonth()-t.getUTCMonth()+(e.getUTCFullYear()-t.getUTCFullYear())*12,t=>t.getUTCMonth());Sr.range;const kt=nt(t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e)=>{t.setFullYear(t.getFullYear()+e)},(t,e)=>e.getFullYear()-t.getFullYear(),t=>t.getFullYear());kt.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:nt(e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,n)=>{e.setFullYear(e.getFullYear()+n*t)});kt.range;const wt=nt(t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)},(t,e)=>e.getUTCFullYear()-t.getUTCFullYear(),t=>t.getUTCFullYear());wt.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:nt(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCFullYear(e.getUTCFullYear()+n*t)});wt.range;function _r(t,e,n,r,i,s){const a=[[vt,1,mt],[vt,5,5*mt],[vt,15,15*mt],[vt,30,30*mt],[s,1,ct],[s,5,5*ct],[s,15,15*ct],[s,30,30*ct],[i,1,gt],[i,3,3*gt],[i,6,6*gt],[i,12,12*gt],[r,1,yt],[r,2,2*yt],[n,1,Se],[e,1,Ve],[e,3,3*Ve],[t,1,ke]];function y(S,w,P){const _=w<S;_&&([S,w]=[w,S]);const Y=P&&typeof P.range=="function"?P:F(S,w,P),X=Y?Y.range(S,+w+1):[];return _?X.reverse():X}function F(S,w,P){const _=Math.abs(w-S)/P,Y=Qn(([,,v])=>v).right(a,_);if(Y===a.length)return t.every(Ne(S/ke,w/ke,P));if(Y===0)return Et.every(Math.max(Ne(S,w,P),1));const[X,B]=a[_/a[Y-1][2]<a[Y][2]/_?Y-1:Y];return X.every(B)}return[y,F]}const[Yr,Fr]=_r(kt,Rt,zt,xt,Pt,Nt);function pe(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function ve(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function $t(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}function Ur(t){var e=t.dateTime,n=t.date,r=t.time,i=t.periods,s=t.days,a=t.shortDays,y=t.months,F=t.shortMonths,S=Ot(i),w=Ht(i),P=Ot(s),_=Ht(s),Y=Ot(a),X=Ht(a),B=Ot(y),v=Ht(y),U=Ot(F),R=Ht(F),E={a:m,A:I,b:o,B:W,c:null,d:Xe,e:Xe,f:ti,g:li,G:di,H:Qr,I:Jr,j:Kr,L:Dn,m:ei,M:ni,p:u,q:K,Q:Qe,s:Je,S:ri,u:ii,U:si,V:ai,w:oi,W:ci,x:null,X:null,y:ui,Y:fi,Z:hi,"%":je},z={a:l,A:$,b:O,B:j,c:null,d:Ge,e:Ge,f:ki,g:Si,G:Yi,H:mi,I:gi,j:yi,L:Cn,m:pi,M:vi,p:H,q:J,Q:Qe,s:Je,S:Ti,u:xi,U:bi,V:wi,w:Di,W:Mi,x:null,X:null,y:Ci,Y:_i,Z:Fi,"%":je},G={a:x,A:C,b:M,B:D,c,d:Be,e:Be,f:Zr,g:qe,G:ze,H:Ze,I:Ze,j:Rr,L:Br,m:Vr,M:zr,p:L,q:Pr,Q:Gr,s:jr,S:qr,u:Wr,U:$r,V:Or,w:Ar,W:Hr,x:g,X:b,y:qe,Y:ze,Z:Nr,"%":Xr};E.x=T(n,E),E.X=T(r,E),E.c=T(e,E),z.x=T(n,z),z.X=T(r,z),z.c=T(e,z);function T(h,N){return function(V){var f=[],tt=-1,A=0,Q=h.length,Z,st,at;for(V instanceof Date||(V=new Date(+V));++tt<Q;)h.charCodeAt(tt)===37&&(f.push(h.slice(A,tt)),(st=Re[Z=h.charAt(++tt)])!=null?Z=h.charAt(++tt):st=Z==="e"?" ":"0",(at=N[Z])&&(Z=at(V,st)),f.push(Z),A=tt+1);return f.push(h.slice(A,tt)),f.join("")}}function k(h,N){return function(V){var f=$t(1900,void 0,1),tt=p(f,h,V+="",0),A,Q;if(tt!=V.length)return null;if("Q"in f)return new Date(f.Q);if("s"in f)return new Date(f.s*1e3+("L"in f?f.L:0));if(N&&!("Z"in f)&&(f.Z=0),"p"in f&&(f.H=f.H%12+f.p*12),f.m===void 0&&(f.m="q"in f?f.q:0),"V"in f){if(f.V<1||f.V>53)return null;"w"in f||(f.w=1),"Z"in f?(A=ve($t(f.y,0,1)),Q=A.getUTCDay(),A=Q>4||Q===0?re.ceil(A):re(A),A=_e.offset(A,(f.V-1)*7),f.y=A.getUTCFullYear(),f.m=A.getUTCMonth(),f.d=A.getUTCDate()+(f.w+6)%7):(A=pe($t(f.y,0,1)),Q=A.getDay(),A=Q>4||Q===0?Vt.ceil(A):Vt(A),A=xt.offset(A,(f.V-1)*7),f.y=A.getFullYear(),f.m=A.getMonth(),f.d=A.getDate()+(f.w+6)%7)}else("W"in f||"U"in f)&&("w"in f||(f.w="u"in f?f.u%7:"W"in f?1:0),Q="Z"in f?ve($t(f.y,0,1)).getUTCDay():pe($t(f.y,0,1)).getDay(),f.m=0,f.d="W"in f?(f.w+6)%7+f.W*7-(Q+5)%7:f.w+f.U*7-(Q+6)%7);return"Z"in f?(f.H+=f.Z/100|0,f.M+=f.Z%100,ve(f)):pe(f)}}function p(h,N,V,f){for(var tt=0,A=N.length,Q=V.length,Z,st;tt<A;){if(f>=Q)return-1;if(Z=N.charCodeAt(tt++),Z===37){if(Z=N.charAt(tt++),st=G[Z in Re?N.charAt(tt++):Z],!st||(f=st(h,V,f))<0)return-1}else if(Z!=V.charCodeAt(f++))return-1}return f}function L(h,N,V){var f=S.exec(N.slice(V));return f?(h.p=w.get(f[0].toLowerCase()),V+f[0].length):-1}function x(h,N,V){var f=Y.exec(N.slice(V));return f?(h.w=X.get(f[0].toLowerCase()),V+f[0].length):-1}function C(h,N,V){var f=P.exec(N.slice(V));return f?(h.w=_.get(f[0].toLowerCase()),V+f[0].length):-1}function M(h,N,V){var f=U.exec(N.slice(V));return f?(h.m=R.get(f[0].toLowerCase()),V+f[0].length):-1}function D(h,N,V){var f=B.exec(N.slice(V));return f?(h.m=v.get(f[0].toLowerCase()),V+f[0].length):-1}function c(h,N,V){return p(h,e,N,V)}function g(h,N,V){return p(h,n,N,V)}function b(h,N,V){return p(h,r,N,V)}function m(h){return a[h.getDay()]}function I(h){return s[h.getDay()]}function o(h){return F[h.getMonth()]}function W(h){return y[h.getMonth()]}function u(h){return i[+(h.getHours()>=12)]}function K(h){return 1+~~(h.getMonth()/3)}function l(h){return a[h.getUTCDay()]}function $(h){return s[h.getUTCDay()]}function O(h){return F[h.getUTCMonth()]}function j(h){return y[h.getUTCMonth()]}function H(h){return i[+(h.getUTCHours()>=12)]}function J(h){return 1+~~(h.getUTCMonth()/3)}return{format:function(h){var N=T(h+="",E);return N.toString=function(){return h},N},parse:function(h){var N=k(h+="",!1);return N.toString=function(){return h},N},utcFormat:function(h){var N=T(h+="",z);return N.toString=function(){return h},N},utcParse:function(h){var N=k(h+="",!0);return N.toString=function(){return h},N}}}var Re={"-":"",_:" ",0:"0"},rt=/^\s*\d+/,Er=/^%/,Ir=/[\\^$*+?|[\]().{}]/g;function q(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",s=i.length;return r+(s<n?new Array(n-s+1).join(e)+i:i)}function Lr(t){return t.replace(Ir,"\\$&")}function Ot(t){return new RegExp("^(?:"+t.map(Lr).join("|")+")","i")}function Ht(t){return new Map(t.map((e,n)=>[e.toLowerCase(),n]))}function Ar(t,e,n){var r=rt.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function Wr(t,e,n){var r=rt.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function $r(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function Or(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function Hr(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function ze(t,e,n){var r=rt.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function qe(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Nr(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function Pr(t,e,n){var r=rt.exec(e.slice(n,n+1));return r?(t.q=r[0]*3-3,n+r[0].length):-1}function Vr(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function Be(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function Rr(t,e,n){var r=rt.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function Ze(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function zr(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function qr(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function Br(t,e,n){var r=rt.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function Zr(t,e,n){var r=rt.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Xr(t,e,n){var r=Er.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function Gr(t,e,n){var r=rt.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function jr(t,e,n){var r=rt.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function Xe(t,e){return q(t.getDate(),e,2)}function Qr(t,e){return q(t.getHours(),e,2)}function Jr(t,e){return q(t.getHours()%12||12,e,2)}function Kr(t,e){return q(1+xt.count(kt(t),t),e,3)}function Dn(t,e){return q(t.getMilliseconds(),e,3)}function ti(t,e){return Dn(t,e)+"000"}function ei(t,e){return q(t.getMonth()+1,e,2)}function ni(t,e){return q(t.getMinutes(),e,2)}function ri(t,e){return q(t.getSeconds(),e,2)}function ii(t){var e=t.getDay();return e===0?7:e}function si(t,e){return q(zt.count(kt(t)-1,t),e,2)}function Mn(t){var e=t.getDay();return e>=4||e===0?bt(t):bt.ceil(t)}function ai(t,e){return t=Mn(t),q(bt.count(kt(t),t)+(kt(t).getDay()===4),e,2)}function oi(t){return t.getDay()}function ci(t,e){return q(Vt.count(kt(t)-1,t),e,2)}function ui(t,e){return q(t.getFullYear()%100,e,2)}function li(t,e){return t=Mn(t),q(t.getFullYear()%100,e,2)}function fi(t,e){return q(t.getFullYear()%1e4,e,4)}function di(t,e){var n=t.getDay();return t=n>=4||n===0?bt(t):bt.ceil(t),q(t.getFullYear()%1e4,e,4)}function hi(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+q(e/60|0,"0",2)+q(e%60,"0",2)}function Ge(t,e){return q(t.getUTCDate(),e,2)}function mi(t,e){return q(t.getUTCHours(),e,2)}function gi(t,e){return q(t.getUTCHours()%12||12,e,2)}function yi(t,e){return q(1+_e.count(wt(t),t),e,3)}function Cn(t,e){return q(t.getUTCMilliseconds(),e,3)}function ki(t,e){return Cn(t,e)+"000"}function pi(t,e){return q(t.getUTCMonth()+1,e,2)}function vi(t,e){return q(t.getUTCMinutes(),e,2)}function Ti(t,e){return q(t.getUTCSeconds(),e,2)}function xi(t){var e=t.getUTCDay();return e===0?7:e}function bi(t,e){return q(wn.count(wt(t)-1,t),e,2)}function Sn(t){var e=t.getUTCDay();return e>=4||e===0?It(t):It.ceil(t)}function wi(t,e){return t=Sn(t),q(It.count(wt(t),t)+(wt(t).getUTCDay()===4),e,2)}function Di(t){return t.getUTCDay()}function Mi(t,e){return q(re.count(wt(t)-1,t),e,2)}function Ci(t,e){return q(t.getUTCFullYear()%100,e,2)}function Si(t,e){return t=Sn(t),q(t.getUTCFullYear()%100,e,2)}function _i(t,e){return q(t.getUTCFullYear()%1e4,e,4)}function Yi(t,e){var n=t.getUTCDay();return t=n>=4||n===0?It(t):It.ceil(t),q(t.getUTCFullYear()%1e4,e,4)}function Fi(){return"+0000"}function je(){return"%"}function Qe(t){return+t}function Je(t){return Math.floor(+t/1e3)}var St,ie;Ui({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function Ui(t){return St=Ur(t),ie=St.format,St.parse,St.utcFormat,St.utcParse,St}function Ei(t){return new Date(t)}function Ii(t){return t instanceof Date?+t:+new Date(+t)}function _n(t,e,n,r,i,s,a,y,F,S){var w=Jn(),P=w.invert,_=w.domain,Y=S(".%L"),X=S(":%S"),B=S("%I:%M"),v=S("%I %p"),U=S("%a %d"),R=S("%b %d"),E=S("%B"),z=S("%Y");function G(T){return(F(T)<T?Y:y(T)<T?X:a(T)<T?B:s(T)<T?v:r(T)<T?i(T)<T?U:R:n(T)<T?E:z)(T)}return w.invert=function(T){return new Date(P(T))},w.domain=function(T){return arguments.length?_(Array.from(T,Ii)):_().map(Ei)},w.ticks=function(T){var k=_();return t(k[0],k[k.length-1],T??10)},w.tickFormat=function(T,k){return k==null?G:S(k)},w.nice=function(T){var k=_();return(!T||typeof T.range!="function")&&(T=e(k[0],k[k.length-1],T??10)),T?_(vr(k,T)):w},w.copy=function(){return Kn(w,_n(t,e,n,r,i,s,a,y,F,S))},w}function Li(){return er.apply(_n(Yr,Fr,kt,Rt,zt,xt,Pt,Nt,vt,ie).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}var jt={exports:{}},Ai=jt.exports,Ke;function Wi(){return Ke||(Ke=1,(function(t,e){(function(n,r){t.exports=r()})(Ai,(function(){var n="day";return function(r,i,s){var a=function(S){return S.add(4-S.isoWeekday(),n)},y=i.prototype;y.isoWeekYear=function(){return a(this).year()},y.isoWeek=function(S){if(!this.$utils().u(S))return this.add(7*(S-this.isoWeek()),n);var w,P,_,Y,X=a(this),B=(w=this.isoWeekYear(),P=this.$u,_=(P?s.utc:s)().year(w).startOf("year"),Y=4-_.isoWeekday(),_.isoWeekday()>4&&(Y+=7),_.add(Y,n));return X.diff(B,"week")+1},y.isoWeekday=function(S){return this.$utils().u(S)?this.day()||7:this.day(this.day()%7?S:S-7)};var F=y.startOf;y.startOf=function(S,w){var P=this.$utils(),_=!!P.u(w)||w;return P.p(S)==="isoweek"?_?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):F.bind(this)(S,w)}}}))})(jt)),jt.exports}var $i=Wi();const Oi=oe($i);var Qt={exports:{}},Hi=Qt.exports,tn;function Ni(){return tn||(tn=1,(function(t,e){(function(n,r){t.exports=r()})(Hi,(function(){var n={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},r=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,i=/\d/,s=/\d\d/,a=/\d\d?/,y=/\d*[^-_:/,()\s\d]+/,F={},S=function(v){return(v=+v)+(v>68?1900:2e3)},w=function(v){return function(U){this[v]=+U}},P=[/[+-]\d\d:?(\d\d)?|Z/,function(v){(this.zone||(this.zone={})).offset=(function(U){if(!U||U==="Z")return 0;var R=U.match(/([+-]|\d\d)/g),E=60*R[1]+(+R[2]||0);return E===0?0:R[0]==="+"?-E:E})(v)}],_=function(v){var U=F[v];return U&&(U.indexOf?U:U.s.concat(U.f))},Y=function(v,U){var R,E=F.meridiem;if(E){for(var z=1;z<=24;z+=1)if(v.indexOf(E(z,0,U))>-1){R=z>12;break}}else R=v===(U?"pm":"PM");return R},X={A:[y,function(v){this.afternoon=Y(v,!1)}],a:[y,function(v){this.afternoon=Y(v,!0)}],Q:[i,function(v){this.month=3*(v-1)+1}],S:[i,function(v){this.milliseconds=100*+v}],SS:[s,function(v){this.milliseconds=10*+v}],SSS:[/\d{3}/,function(v){this.milliseconds=+v}],s:[a,w("seconds")],ss:[a,w("seconds")],m:[a,w("minutes")],mm:[a,w("minutes")],H:[a,w("hours")],h:[a,w("hours")],HH:[a,w("hours")],hh:[a,w("hours")],D:[a,w("day")],DD:[s,w("day")],Do:[y,function(v){var U=F.ordinal,R=v.match(/\d+/);if(this.day=R[0],U)for(var E=1;E<=31;E+=1)U(E).replace(/\[|\]/g,"")===v&&(this.day=E)}],w:[a,w("week")],ww:[s,w("week")],M:[a,w("month")],MM:[s,w("month")],MMM:[y,function(v){var U=_("months"),R=(_("monthsShort")||U.map((function(E){return E.slice(0,3)}))).indexOf(v)+1;if(R<1)throw new Error;this.month=R%12||R}],MMMM:[y,function(v){var U=_("months").indexOf(v)+1;if(U<1)throw new Error;this.month=U%12||U}],Y:[/[+-]?\d+/,w("year")],YY:[s,function(v){this.year=S(v)}],YYYY:[/\d{4}/,w("year")],Z:P,ZZ:P};function B(v){var U,R;U=v,R=F&&F.formats;for(var E=(v=U.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(x,C,M){var D=M&&M.toUpperCase();return C||R[M]||n[M]||R[D].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(c,g,b){return g||b.slice(1)}))}))).match(r),z=E.length,G=0;G<z;G+=1){var T=E[G],k=X[T],p=k&&k[0],L=k&&k[1];E[G]=L?{regex:p,parser:L}:T.replace(/^\[|\]$/g,"")}return function(x){for(var C={},M=0,D=0;M<z;M+=1){var c=E[M];if(typeof c=="string")D+=c.length;else{var g=c.regex,b=c.parser,m=x.slice(D),I=g.exec(m)[0];b.call(C,I),x=x.replace(I,"")}}return(function(o){var W=o.afternoon;if(W!==void 0){var u=o.hours;W?u<12&&(o.hours+=12):u===12&&(o.hours=0),delete o.afternoon}})(C),C}}return function(v,U,R){R.p.customParseFormat=!0,v&&v.parseTwoDigitYear&&(S=v.parseTwoDigitYear);var E=U.prototype,z=E.parse;E.parse=function(G){var T=G.date,k=G.utc,p=G.args;this.$u=k;var L=p[1];if(typeof L=="string"){var x=p[2]===!0,C=p[3]===!0,M=x||C,D=p[2];C&&(D=p[2]),F=this.$locale(),!x&&D&&(F=R.Ls[D]),this.$d=(function(m,I,o,W){try{if(["x","X"].indexOf(I)>-1)return new Date((I==="X"?1e3:1)*m);var u=B(I)(m),K=u.year,l=u.month,$=u.day,O=u.hours,j=u.minutes,H=u.seconds,J=u.milliseconds,h=u.zone,N=u.week,V=new Date,f=$||(K||l?1:V.getDate()),tt=K||V.getFullYear(),A=0;K&&!l||(A=l>0?l-1:V.getMonth());var Q,Z=O||0,st=j||0,at=H||0,pt=J||0;return h?new Date(Date.UTC(tt,A,f,Z,st,at,pt+60*h.offset*1e3)):o?new Date(Date.UTC(tt,A,f,Z,st,at,pt)):(Q=new Date(tt,A,f,Z,st,at,pt),N&&(Q=W(Q).week(N).toDate()),Q)}catch{return new Date("")}})(T,L,k,R),this.init(),D&&D!==!0&&(this.$L=this.locale(D).$L),M&&T!=this.format(L)&&(this.$d=new Date("")),F={}}else if(L instanceof Array)for(var c=L.length,g=1;g<=c;g+=1){p[1]=L[g-1];var b=R.apply(this,p);if(b.isValid()){this.$d=b.$d,this.$L=b.$L,this.init();break}g===c&&(this.$d=new Date(""))}else z.call(this,G)}}}))})(Qt)),Qt.exports}var Pi=Ni();const Vi=oe(Pi);var Jt={exports:{}},Ri=Jt.exports,en;function zi(){return en||(en=1,(function(t,e){(function(n,r){t.exports=r()})(Ri,(function(){return function(n,r){var i=r.prototype,s=i.format;i.format=function(a){var y=this,F=this.$locale();if(!this.isValid())return s.bind(this)(a);var S=this.$utils(),w=(a||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,(function(P){switch(P){case"Q":return Math.ceil((y.$M+1)/3);case"Do":return F.ordinal(y.$D);case"gggg":return y.weekYear();case"GGGG":return y.isoWeekYear();case"wo":return F.ordinal(y.week(),"W");case"w":case"ww":return S.s(y.week(),P==="w"?1:2,"0");case"W":case"WW":return S.s(y.isoWeek(),P==="W"?1:2,"0");case"k":case"kk":return S.s(String(y.$H===0?24:y.$H),P==="k"?1:2,"0");case"X":return Math.floor(y.$d.getTime()/1e3);case"x":return y.$d.getTime();case"z":return"["+y.offsetName()+"]";case"zzz":return"["+y.offsetName("long")+"]";default:return P}}));return s.bind(this)(w)}}}))})(Jt)),Jt.exports}var qi=zi();const Bi=oe(qi);var Kt={exports:{}},Zi=Kt.exports,nn;function Xi(){return nn||(nn=1,(function(t,e){(function(n,r){t.exports=r()})(Zi,(function(){var n,r,i=1e3,s=6e4,a=36e5,y=864e5,F=31536e6,S=2628e6,w=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,P=/\[([^\]]+)]|YYYY|YY|Y|M{1,2}|D{1,2}|H{1,2}|m{1,2}|s{1,2}|SSS/g,_={years:F,months:S,days:y,hours:a,minutes:s,seconds:i,milliseconds:1,weeks:6048e5},Y=function(T){return T instanceof z},X=function(T,k,p){return new z(T,p,k.$l)},B=function(T){return r.p(T)+"s"},v=function(T){return T<0},U=function(T){return v(T)?Math.ceil(T):Math.floor(T)},R=function(T){return Math.abs(T)},E=function(T,k){return T?v(T)?{negative:!0,format:""+R(T)+k}:{negative:!1,format:""+T+k}:{negative:!1,format:""}},z=(function(){function T(p,L,x){var C=this;if(this.$d={},this.$l=x,p===void 0&&(this.$ms=0,this.parseFromMilliseconds()),L)return X(p*_[B(L)],this);if(typeof p=="number")return this.$ms=p,this.parseFromMilliseconds(),this;if(typeof p=="object")return Object.keys(p).forEach((function(c){C.$d[B(c)]=p[c]})),this.calMilliseconds(),this;if(typeof p=="string"){var M=p.match(w);if(M){var D=M.slice(2).map((function(c){return c!=null?Number(c):0}));return this.$d.years=D[0],this.$d.months=D[1],this.$d.weeks=D[2],this.$d.days=D[3],this.$d.hours=D[4],this.$d.minutes=D[5],this.$d.seconds=D[6],this.calMilliseconds(),this}}return this}var k=T.prototype;return k.calMilliseconds=function(){var p=this;this.$ms=Object.keys(this.$d).reduce((function(L,x){return L+(p.$d[x]||0)*_[x]}),0)},k.parseFromMilliseconds=function(){var p=this.$ms;this.$d.years=U(p/F),p%=F,this.$d.months=U(p/S),p%=S,this.$d.days=U(p/y),p%=y,this.$d.hours=U(p/a),p%=a,this.$d.minutes=U(p/s),p%=s,this.$d.seconds=U(p/i),p%=i,this.$d.milliseconds=p},k.toISOString=function(){var p=E(this.$d.years,"Y"),L=E(this.$d.months,"M"),x=+this.$d.days||0;this.$d.weeks&&(x+=7*this.$d.weeks);var C=E(x,"D"),M=E(this.$d.hours,"H"),D=E(this.$d.minutes,"M"),c=this.$d.seconds||0;this.$d.milliseconds&&(c+=this.$d.milliseconds/1e3,c=Math.round(1e3*c)/1e3);var g=E(c,"S"),b=p.negative||L.negative||C.negative||M.negative||D.negative||g.negative,m=M.format||D.format||g.format?"T":"",I=(b?"-":"")+"P"+p.format+L.format+C.format+m+M.format+D.format+g.format;return I==="P"||I==="-P"?"P0D":I},k.toJSON=function(){return this.toISOString()},k.format=function(p){var L=p||"YYYY-MM-DDTHH:mm:ss",x={Y:this.$d.years,YY:r.s(this.$d.years,2,"0"),YYYY:r.s(this.$d.years,4,"0"),M:this.$d.months,MM:r.s(this.$d.months,2,"0"),D:this.$d.days,DD:r.s(this.$d.days,2,"0"),H:this.$d.hours,HH:r.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:r.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:r.s(this.$d.seconds,2,"0"),SSS:r.s(this.$d.milliseconds,3,"0")};return L.replace(P,(function(C,M){return M||String(x[C])}))},k.as=function(p){return this.$ms/_[B(p)]},k.get=function(p){var L=this.$ms,x=B(p);return x==="milliseconds"?L%=1e3:L=x==="weeks"?U(L/_[x]):this.$d[x],L||0},k.add=function(p,L,x){var C;return C=L?p*_[B(L)]:Y(p)?p.$ms:X(p,this).$ms,X(this.$ms+C*(x?-1:1),this)},k.subtract=function(p,L){return this.add(p,L,!0)},k.locale=function(p){var L=this.clone();return L.$l=p,L},k.clone=function(){return X(this.$ms,this)},k.humanize=function(p){return n().add(this.$ms,"ms").locale(this.$l).fromNow(!p)},k.valueOf=function(){return this.asMilliseconds()},k.milliseconds=function(){return this.get("milliseconds")},k.asMilliseconds=function(){return this.as("milliseconds")},k.seconds=function(){return this.get("seconds")},k.asSeconds=function(){return this.as("seconds")},k.minutes=function(){return this.get("minutes")},k.asMinutes=function(){return this.as("minutes")},k.hours=function(){return this.get("hours")},k.asHours=function(){return this.as("hours")},k.days=function(){return this.get("days")},k.asDays=function(){return this.as("days")},k.weeks=function(){return this.get("weeks")},k.asWeeks=function(){return this.as("weeks")},k.months=function(){return this.get("months")},k.asMonths=function(){return this.as("months")},k.years=function(){return this.get("years")},k.asYears=function(){return this.as("years")},T})(),G=function(T,k,p){return T.add(k.years()*p,"y").add(k.months()*p,"M").add(k.days()*p,"d").add(k.hours()*p,"h").add(k.minutes()*p,"m").add(k.seconds()*p,"s").add(k.milliseconds()*p,"ms")};return function(T,k,p){n=p,r=p().$utils(),p.duration=function(C,M){var D=p.locale();return X(C,{$l:D},M)},p.isDuration=Y;var L=k.prototype.add,x=k.prototype.subtract;k.prototype.add=function(C,M){return Y(C)?G(this,C,1):L.bind(this)(C,M)},k.prototype.subtract=function(C,M){return Y(C)?G(this,C,-1):x.bind(this)(C,M)}}}))})(Kt)),Kt.exports}var Gi=Xi();const ji=oe(Gi);var we=(function(){var t=d(function(D,c,g,b){for(g=g||{},b=D.length;b--;g[D[b]]=c);return g},"o"),e=[6,8,10,12,13,14,15,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,33,35,36,38,40],n=[1,26],r=[1,27],i=[1,28],s=[1,29],a=[1,30],y=[1,31],F=[1,32],S=[1,33],w=[1,34],P=[1,9],_=[1,10],Y=[1,11],X=[1,12],B=[1,13],v=[1,14],U=[1,15],R=[1,16],E=[1,19],z=[1,20],G=[1,21],T=[1,22],k=[1,23],p=[1,25],L=[1,35],x={trace:d(function(){},"trace"),yy:{},symbols_:{error:2,start:3,gantt:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NL:10,weekday:11,weekday_monday:12,weekday_tuesday:13,weekday_wednesday:14,weekday_thursday:15,weekday_friday:16,weekday_saturday:17,weekday_sunday:18,weekend:19,weekend_friday:20,weekend_saturday:21,dateFormat:22,inclusiveEndDates:23,topAxis:24,axisFormat:25,tickInterval:26,excludes:27,includes:28,todayMarker:29,title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,section:36,clickStatement:37,taskTxt:38,taskData:39,click:40,callbackname:41,callbackargs:42,href:43,clickStatementDebug:44,$accept:0,$end:1},terminals_:{2:"error",4:"gantt",6:"EOF",8:"SPACE",10:"NL",12:"weekday_monday",13:"weekday_tuesday",14:"weekday_wednesday",15:"weekday_thursday",16:"weekday_friday",17:"weekday_saturday",18:"weekday_sunday",20:"weekend_friday",21:"weekend_saturday",22:"dateFormat",23:"inclusiveEndDates",24:"topAxis",25:"axisFormat",26:"tickInterval",27:"excludes",28:"includes",29:"todayMarker",30:"title",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",36:"section",38:"taskTxt",39:"taskData",40:"click",41:"callbackname",42:"callbackargs",43:"href"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[19,1],[19,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,2],[37,2],[37,3],[37,3],[37,4],[37,3],[37,4],[37,2],[44,2],[44,3],[44,3],[44,4],[44,3],[44,4],[44,2]],performAction:d(function(c,g,b,m,I,o,W){var u=o.length-1;switch(I){case 1:return o[u-1];case 2:this.$=[];break;case 3:o[u-1].push(o[u]),this.$=o[u-1];break;case 4:case 5:this.$=o[u];break;case 6:case 7:this.$=[];break;case 8:m.setWeekday("monday");break;case 9:m.setWeekday("tuesday");break;case 10:m.setWeekday("wednesday");break;case 11:m.setWeekday("thursday");break;case 12:m.setWeekday("friday");break;case 13:m.setWeekday("saturday");break;case 14:m.setWeekday("sunday");break;case 15:m.setWeekend("friday");break;case 16:m.setWeekend("saturday");break;case 17:m.setDateFormat(o[u].substr(11)),this.$=o[u].substr(11);break;case 18:m.enableInclusiveEndDates(),this.$=o[u].substr(18);break;case 19:m.TopAxis(),this.$=o[u].substr(8);break;case 20:m.setAxisFormat(o[u].substr(11)),this.$=o[u].substr(11);break;case 21:m.setTickInterval(o[u].substr(13)),this.$=o[u].substr(13);break;case 22:m.setExcludes(o[u].substr(9)),this.$=o[u].substr(9);break;case 23:m.setIncludes(o[u].substr(9)),this.$=o[u].substr(9);break;case 24:m.setTodayMarker(o[u].substr(12)),this.$=o[u].substr(12);break;case 27:m.setDiagramTitle(o[u].substr(6)),this.$=o[u].substr(6);break;case 28:this.$=o[u].trim(),m.setAccTitle(this.$);break;case 29:case 30:this.$=o[u].trim(),m.setAccDescription(this.$);break;case 31:m.addSection(o[u].substr(8)),this.$=o[u].substr(8);break;case 33:m.addTask(o[u-1],o[u]),this.$="task";break;case 34:this.$=o[u-1],m.setClickEvent(o[u-1],o[u],null);break;case 35:this.$=o[u-2],m.setClickEvent(o[u-2],o[u-1],o[u]);break;case 36:this.$=o[u-2],m.setClickEvent(o[u-2],o[u-1],null),m.setLink(o[u-2],o[u]);break;case 37:this.$=o[u-3],m.setClickEvent(o[u-3],o[u-2],o[u-1]),m.setLink(o[u-3],o[u]);break;case 38:this.$=o[u-2],m.setClickEvent(o[u-2],o[u],null),m.setLink(o[u-2],o[u-1]);break;case 39:this.$=o[u-3],m.setClickEvent(o[u-3],o[u-1],o[u]),m.setLink(o[u-3],o[u-2]);break;case 40:this.$=o[u-1],m.setLink(o[u-1],o[u]);break;case 41:case 47:this.$=o[u-1]+" "+o[u];break;case 42:case 43:case 45:this.$=o[u-2]+" "+o[u-1]+" "+o[u];break;case 44:case 46:this.$=o[u-3]+" "+o[u-2]+" "+o[u-1]+" "+o[u];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:17,12:n,13:r,14:i,15:s,16:a,17:y,18:F,19:18,20:S,21:w,22:P,23:_,24:Y,25:X,26:B,27:v,28:U,29:R,30:E,31:z,33:G,35:T,36:k,37:24,38:p,40:L},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:36,11:17,12:n,13:r,14:i,15:s,16:a,17:y,18:F,19:18,20:S,21:w,22:P,23:_,24:Y,25:X,26:B,27:v,28:U,29:R,30:E,31:z,33:G,35:T,36:k,37:24,38:p,40:L},t(e,[2,5]),t(e,[2,6]),t(e,[2,17]),t(e,[2,18]),t(e,[2,19]),t(e,[2,20]),t(e,[2,21]),t(e,[2,22]),t(e,[2,23]),t(e,[2,24]),t(e,[2,25]),t(e,[2,26]),t(e,[2,27]),{32:[1,37]},{34:[1,38]},t(e,[2,30]),t(e,[2,31]),t(e,[2,32]),{39:[1,39]},t(e,[2,8]),t(e,[2,9]),t(e,[2,10]),t(e,[2,11]),t(e,[2,12]),t(e,[2,13]),t(e,[2,14]),t(e,[2,15]),t(e,[2,16]),{41:[1,40],43:[1,41]},t(e,[2,4]),t(e,[2,28]),t(e,[2,29]),t(e,[2,33]),t(e,[2,34],{42:[1,42],43:[1,43]}),t(e,[2,40],{41:[1,44]}),t(e,[2,35],{43:[1,45]}),t(e,[2,36]),t(e,[2,38],{42:[1,46]}),t(e,[2,37]),t(e,[2,39])],defaultActions:{},parseError:d(function(c,g){if(g.recoverable)this.trace(c);else{var b=new Error(c);throw b.hash=g,b}},"parseError"),parse:d(function(c){var g=this,b=[0],m=[],I=[null],o=[],W=this.table,u="",K=0,l=0,$=2,O=1,j=o.slice.call(arguments,1),H=Object.create(this.lexer),J={yy:{}};for(var h in this.yy)Object.prototype.hasOwnProperty.call(this.yy,h)&&(J.yy[h]=this.yy[h]);H.setInput(c,J.yy),J.yy.lexer=H,J.yy.parser=this,typeof H.yylloc>"u"&&(H.yylloc={});var N=H.yylloc;o.push(N);var V=H.options&&H.options.ranges;typeof J.yy.parseError=="function"?this.parseError=J.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function f(ot){b.length=b.length-2*ot,I.length=I.length-ot,o.length=o.length-ot}d(f,"popStack");function tt(){var ot;return ot=m.pop()||H.lex()||O,typeof ot!="number"&&(ot instanceof Array&&(m=ot,ot=m.pop()),ot=g.symbols_[ot]||ot),ot}d(tt,"lex");for(var A,Q,Z,st,at={},pt,ut,He,Bt;;){if(Q=b[b.length-1],this.defaultActions[Q]?Z=this.defaultActions[Q]:((A===null||typeof A>"u")&&(A=tt()),Z=W[Q]&&W[Q][A]),typeof Z>"u"||!Z.length||!Z[0]){var ce="";Bt=[];for(pt in W[Q])this.terminals_[pt]&&pt>$&&Bt.push("'"+this.terminals_[pt]+"'");H.showPosition?ce="Parse error on line "+(K+1)+`:
2
2
  `+H.showPosition()+`
3
3
  Expecting `+Bt.join(", ")+", got '"+(this.terminals_[A]||A)+"'":ce="Parse error on line "+(K+1)+": Unexpected "+(A==O?"end of input":"'"+(this.terminals_[A]||A)+"'"),this.parseError(ce,{text:H.match,token:this.terminals_[A]||A,line:H.yylineno,loc:N,expected:Bt})}if(Z[0]instanceof Array&&Z.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Q+", token: "+A);switch(Z[0]){case 1:b.push(A),I.push(H.yytext),o.push(H.yylloc),b.push(Z[1]),A=null,l=H.yyleng,u=H.yytext,K=H.yylineno,N=H.yylloc;break;case 2:if(ut=this.productions_[Z[1]][1],at.$=I[I.length-ut],at._$={first_line:o[o.length-(ut||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(ut||1)].first_column,last_column:o[o.length-1].last_column},V&&(at._$.range=[o[o.length-(ut||1)].range[0],o[o.length-1].range[1]]),st=this.performAction.apply(at,[u,l,K,J.yy,Z[1],I,o].concat(j)),typeof st<"u")return st;ut&&(b=b.slice(0,-1*ut*2),I=I.slice(0,-1*ut),o=o.slice(0,-1*ut)),b.push(this.productions_[Z[1]][0]),I.push(at.$),o.push(at._$),He=W[b[b.length-2]][b[b.length-1]],b.push(He);break;case 3:return!0}}return!0},"parse")},C=(function(){var D={EOF:1,parseError:d(function(g,b){if(this.yy.parser)this.yy.parser.parseError(g,b);else throw new Error(g)},"parseError"),setInput:d(function(c,g){return this.yy=g||this.yy||{},this._input=c,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:d(function(){var c=this._input[0];this.yytext+=c,this.yyleng++,this.offset++,this.match+=c,this.matched+=c;var g=c.match(/(?:\r\n?|\n).*/g);return g?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),c},"input"),unput:d(function(c){var g=c.length,b=c.split(/(?:\r\n?|\n)/g);this._input=c+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-g),this.offset-=g;var m=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),b.length-1&&(this.yylineno-=b.length-1);var I=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:b?(b.length===m.length?this.yylloc.first_column:0)+m[m.length-b.length].length-b[0].length:this.yylloc.first_column-g},this.options.ranges&&(this.yylloc.range=[I[0],I[0]+this.yyleng-g]),this.yyleng=this.yytext.length,this},"unput"),more:d(function(){return this._more=!0,this},"more"),reject:d(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
4
  `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:d(function(c){this.unput(this.match.slice(c))},"less"),pastInput:d(function(){var c=this.matched.substr(0,this.matched.length-this.match.length);return(c.length>20?"...":"")+c.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:d(function(){var c=this.match;return c.length<20&&(c+=this._input.substr(0,20-c.length)),(c.substr(0,20)+(c.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:d(function(){var c=this.pastInput(),g=new Array(c.length+1).join("-");return c+this.upcomingInput()+`
@@ -1 +1 @@
1
- import{e as r}from"./index-C_D1kOlX.js";function i(t){if(!(t instanceof Error)||!("detail"in t)||!t.detail||typeof t.detail!="object")return null;const e=t.detail;return typeof e.code=="string"&&e.code.startsWith("GH_")&&typeof e.message=="string"?e:null}function o(t){return t?t.code==="GH_CLI_NOT_FOUND"?"GitHub CLI is not installed":t.code==="GH_AUTH_REQUIRED"?"Sign in to GitHub CLI":t.code==="GH_NOT_GITHUB_REPO"?"Not a GitHub repository":t.code==="GH_NO_UPSTREAM"?"Publish the branch first":t.code==="GH_RATE_LIMITED"?"GitHub rate limit reached":t.code==="GH_TIMEOUT"?"GitHub CLI took too long":t.code==="GH_INVALID_OUTPUT"?"Unexpected GitHub CLI response":"GitHub operation failed":"GitHub operation failed"}function u(t){return t.state==="OPEN"?t.isDraft?"Draft":"Open":t.state==="MERGED"?"Merged":"Closed"}function f(t){return t?t==="APPROVED"?"Approved":t==="CHANGES_REQUESTED"?"Changes requested":t==="REVIEW_REQUIRED"?"Review required":null:null}function a(t){try{r(t)}catch{}}export{o as a,i as g,a as o,u as p,f as r};
1
+ import{e as r}from"./index-BdjG_WtS.js";function i(t){if(!(t instanceof Error)||!("detail"in t)||!t.detail||typeof t.detail!="object")return null;const e=t.detail;return typeof e.code=="string"&&e.code.startsWith("GH_")&&typeof e.message=="string"?e:null}function o(t){return t?t.code==="GH_CLI_NOT_FOUND"?"GitHub CLI is not installed":t.code==="GH_AUTH_REQUIRED"?"Sign in to GitHub CLI":t.code==="GH_NOT_GITHUB_REPO"?"Not a GitHub repository":t.code==="GH_NO_UPSTREAM"?"Publish the branch first":t.code==="GH_RATE_LIMITED"?"GitHub rate limit reached":t.code==="GH_TIMEOUT"?"GitHub CLI took too long":t.code==="GH_INVALID_OUTPUT"?"Unexpected GitHub CLI response":"GitHub operation failed":"GitHub operation failed"}function u(t){return t.state==="OPEN"?t.isDraft?"Draft":"Open":t.state==="MERGED"?"Merged":"Closed"}function f(t){return t?t==="APPROVED"?"Approved":t==="CHANGES_REQUESTED"?"Changes requested":t==="REVIEW_REQUIRED"?"Review required":null:null}function a(t){try{r(t)}catch{}}export{o as a,i as g,a as o,u as p,f as r};
@@ -1,4 +1,4 @@
1
- import{I as lr}from"./chunk-2Q5K7J3B-DqYRVN1X.js";import{p as hr}from"./chunk-JWPE2WC7-BAhDzsCx.js";import{p as $r,o as fr,s as gr,g as ur,a as yr,b as xr,_ as h,z as J,l as w,d as mr,c as W,y as pr,A as br,q as wr,k as B,B as kr,D as vr,E as Cr}from"./mermaid.core-B_Mv_eHi.js";import{p as Er}from"./cynefin-VYW2F7L2-BT5dARHp.js";import"./index-C_D1kOlX.js";import"./react-rd22PHbN.js";import"./tanstack-Bsd5UOY4.js";import"./base-ui-D4MeJpa3.js";import"./render-markdown-DcHo7ihS.js";import"./App-C7Yf3r-l.js";import"./one-light-CoLDteqg.js";import"./index-BgLrS_2D.js";var m={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},Br=vr.gitGraph,S=h(()=>kr({...Br,...J().gitGraph}),"getConfig"),d=new lr(()=>{const r=S(),e=r.mainBranchName,t=r.mainBranchOrder;return{mainBranchName:e,commits:new Map,head:null,branchConfig:new Map([[e,{name:e,order:t}]]),branches:new Map([[e,null]]),currBranch:e,direction:"LR",seq:0,options:{}}});function Y(){return Cr({length:7})}h(Y,"getID");function tr(r,e){const t=Object.create(null);return r.reduce((s,o)=>{const i=e(o);return t[i]||(t[i]=!0,s.push(o)),s},[])}h(tr,"uniqBy");var Tr=h(function(r){d.records.direction=r},"setDirection"),Lr=h(function(r){w.debug("options str",r),r=r?.trim(),r=r||"{}";try{d.records.options=JSON.parse(r)}catch(e){w.error("error while parsing gitGraph options",e.message)}},"setOptions"),Mr=h(function(){return d.records.options},"getOptions"),Rr=h(function(r){let e=r.msg,t=r.id;const s=r.type;let o=r.tags;w.info("commit",e,t,s,o),w.debug("Entering commit:",e,t,s,o);const i=S();t=B.sanitizeText(t,i),e=B.sanitizeText(e,i),o=o?.map(a=>B.sanitizeText(a,i));const n={id:t||d.records.seq+"-"+Y(),message:e,seq:d.records.seq++,type:s??m.NORMAL,tags:o??[],parents:d.records.head==null?[]:[d.records.head.id],branch:d.records.currBranch};d.records.head=n,w.info("main branch",i.mainBranchName),d.records.commits.has(n.id)&&w.warn(`Commit ID ${n.id} already exists`),d.records.commits.set(n.id,n),d.records.branches.set(d.records.currBranch,n.id),w.debug("in pushCommit "+n.id)},"commit"),Ir=h(function(r){let e=r.name;const t=r.order;if(e=B.sanitizeText(e,S()),d.records.branches.has(e))throw new Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${e}")`);d.records.branches.set(e,d.records.head!=null?d.records.head.id:null),d.records.branchConfig.set(e,{name:e,order:t}),ar(e),w.debug("in createBranch")},"branch"),Or=h(r=>{let e=r.branch,t=r.id;const s=r.type,o=r.tags,i=S();e=B.sanitizeText(e,i),t&&(t=B.sanitizeText(t,i));const n=d.records.branches.get(d.records.currBranch),a=d.records.branches.get(e),l=n?d.records.commits.get(n):void 0,f=a?d.records.commits.get(a):void 0;if(l&&f&&l.branch===e)throw new Error(`Cannot merge branch '${e}' into itself.`);if(d.records.currBranch===e){const c=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw c.hash={text:`merge ${e}`,token:`merge ${e}`,expected:["branch abc"]},c}if(l===void 0||!l){const c=new Error(`Incorrect usage of "merge". Current branch (${d.records.currBranch})has no commits`);throw c.hash={text:`merge ${e}`,token:`merge ${e}`,expected:["commit"]},c}if(!d.records.branches.has(e)){const c=new Error('Incorrect usage of "merge". Branch to be merged ('+e+") does not exist");throw c.hash={text:`merge ${e}`,token:`merge ${e}`,expected:[`branch ${e}`]},c}if(f===void 0||!f){const c=new Error('Incorrect usage of "merge". Branch to be merged ('+e+") has no commits");throw c.hash={text:`merge ${e}`,token:`merge ${e}`,expected:['"commit"']},c}if(l===f){const c=new Error('Incorrect usage of "merge". Both branches have same head');throw c.hash={text:`merge ${e}`,token:`merge ${e}`,expected:["branch abc"]},c}if(t&&d.records.commits.has(t)){const c=new Error('Incorrect usage of "merge". Commit with id:'+t+" already exists, use different custom id");throw c.hash={text:`merge ${e} ${t} ${s} ${o?.join(" ")}`,token:`merge ${e} ${t} ${s} ${o?.join(" ")}`,expected:[`merge ${e} ${t}_UNIQUE ${s} ${o?.join(" ")}`]},c}const g=a||"",$={id:t||`${d.records.seq}-${Y()}`,message:`merged branch ${e} into ${d.records.currBranch}`,seq:d.records.seq++,parents:d.records.head==null?[]:[d.records.head.id,g],branch:d.records.currBranch,type:m.MERGE,customType:s,customId:!!t,tags:o??[]};d.records.head=$,d.records.commits.set($.id,$),d.records.branches.set(d.records.currBranch,$.id),w.debug(d.records.branches),w.debug("in mergeBranch")},"merge"),_r=h(function(r){let e=r.id,t=r.targetId,s=r.tags,o=r.parent;w.debug("Entering cherryPick:",e,t,s);const i=S();if(e=B.sanitizeText(e,i),t=B.sanitizeText(t,i),s=s?.map(l=>B.sanitizeText(l,i)),o=B.sanitizeText(o,i),!e||!d.records.commits.has(e)){const l=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw l.hash={text:`cherryPick ${e} ${t}`,token:`cherryPick ${e} ${t}`,expected:["cherry-pick abc"]},l}const n=d.records.commits.get(e);if(n===void 0||!n)throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(o&&!(Array.isArray(n.parents)&&n.parents.includes(o)))throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");const a=n.branch;if(n.type===m.MERGE&&!o)throw new Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.");if(!t||!d.records.commits.has(t)){if(a===d.records.currBranch){const $=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw $.hash={text:`cherryPick ${e} ${t}`,token:`cherryPick ${e} ${t}`,expected:["cherry-pick abc"]},$}const l=d.records.branches.get(d.records.currBranch);if(l===void 0||!l){const $=new Error(`Incorrect usage of "cherry-pick". Current branch (${d.records.currBranch})has no commits`);throw $.hash={text:`cherryPick ${e} ${t}`,token:`cherryPick ${e} ${t}`,expected:["cherry-pick abc"]},$}const f=d.records.commits.get(l);if(f===void 0||!f){const $=new Error(`Incorrect usage of "cherry-pick". Current branch (${d.records.currBranch})has no commits`);throw $.hash={text:`cherryPick ${e} ${t}`,token:`cherryPick ${e} ${t}`,expected:["cherry-pick abc"]},$}const g={id:d.records.seq+"-"+Y(),message:`cherry-picked ${n?.message} into ${d.records.currBranch}`,seq:d.records.seq++,parents:d.records.head==null?[]:[d.records.head.id,n.id],branch:d.records.currBranch,type:m.CHERRY_PICK,tags:s?s.filter(Boolean):[`cherry-pick:${n.id}${n.type===m.MERGE?`|parent:${o}`:""}`]};d.records.head=g,d.records.commits.set(g.id,g),d.records.branches.set(d.records.currBranch,g.id),w.debug(d.records.branches),w.debug("in cherryPick")}},"cherryPick"),ar=h(function(r){if(r=B.sanitizeText(r,S()),d.records.branches.has(r)){d.records.currBranch=r;const e=d.records.branches.get(d.records.currBranch);e===void 0||!e?d.records.head=null:d.records.head=d.records.commits.get(e)??null}else{const e=new Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${r}")`);throw e.hash={text:`checkout ${r}`,token:`checkout ${r}`,expected:[`branch ${r}`]},e}},"checkout");function V(r,e,t){const s=r.indexOf(e);s===-1?r.push(t):r.splice(s,1,t)}h(V,"upsert");function Q(r){const e=r.reduce((o,i)=>o.seq>i.seq?o:i,r[0]);let t="";r.forEach(function(o){o===e?t+=" *":t+=" |"});const s=[t,e.id,e.seq];for(const o in d.records.branches)d.records.branches.get(o)===e.id&&s.push(o);if(w.debug(s.join(" ")),e.parents&&e.parents.length==2&&e.parents[0]&&e.parents[1]){const o=d.records.commits.get(e.parents[0]);V(r,e,o),e.parents[1]&&r.push(d.records.commits.get(e.parents[1]))}else{if(e.parents.length==0)return;if(e.parents[0]){const o=d.records.commits.get(e.parents[0]);V(r,e,o)}}r=tr(r,o=>o.id),Q(r)}h(Q,"prettyPrintCommitHistory");var Gr=h(function(){w.debug(d.records.commits);const r=nr()[0];Q([r])},"prettyPrint"),Hr=h(function(){d.reset(),wr()},"clear"),Sr=h(function(){return[...d.records.branchConfig.values()].map((e,t)=>e.order!==null&&e.order!==void 0?e:{...e,order:parseFloat(`0.${t}`)}).sort((e,t)=>(e.order??0)-(t.order??0)).map(({name:e})=>({name:e}))},"getBranchesAsObjArray"),Ar=h(function(){return d.records.branches},"getBranches"),Dr=h(function(){return d.records.commits},"getCommits"),nr=h(function(){const r=[...d.records.commits.values()];return r.forEach(function(e){w.debug(e.id)}),r.sort((e,t)=>e.seq-t.seq),r},"getCommitsArray"),qr=h(function(){return d.records.currBranch},"getCurrentBranch"),Pr=h(function(){return d.records.direction},"getDirection"),Wr=h(function(){return d.records.head},"getHead"),sr={commitType:m,getConfig:S,setDirection:Tr,setOptions:Lr,getOptions:Mr,commit:Rr,branch:Ir,merge:Or,cherryPick:_r,checkout:ar,prettyPrint:Gr,clear:Hr,getBranchesAsObjArray:Sr,getBranches:Ar,getCommits:Dr,getCommitsArray:nr,getCurrentBranch:qr,getDirection:Pr,getHead:Wr,setAccTitle:xr,getAccTitle:yr,getAccDescription:ur,setAccDescription:gr,setDiagramTitle:fr,getDiagramTitle:$r},Nr=h((r,e)=>{hr(r,e),r.dir&&e.setDirection(r.dir);for(const t of r.statements)Fr(t,e)},"populate"),Fr=h((r,e)=>{const s={Commit:h(o=>e.commit(zr(o)),"Commit"),Branch:h(o=>e.branch(Yr(o)),"Branch"),Merge:h(o=>e.merge(jr(o)),"Merge"),Checkout:h(o=>e.checkout(Ur(o)),"Checkout"),CherryPicking:h(o=>e.cherryPick(Kr(o)),"CherryPicking")}[r.$type];s?s(r):w.error(`Unknown statement type: ${r.$type}`)},"parseStatement"),zr=h(r=>({id:r.id,msg:r.message??"",type:r.type!==void 0?m[r.type]:m.NORMAL,tags:r.tags??void 0}),"parseCommit"),Yr=h(r=>({name:r.name,order:r.order??0}),"parseBranch"),jr=h(r=>({branch:r.branch,id:r.id??"",type:r.type!==void 0?m[r.type]:void 0,tags:r.tags??void 0}),"parseMerge"),Ur=h(r=>r.branch,"parseCheckout"),Kr=h(r=>({id:r.id,targetId:"",tags:r.tags?.length===0?void 0:r.tags,parent:r.parent}),"parseCherryPicking"),Vr={parse:h(async r=>{const e=await Er("gitGraph",r);w.debug(e),Nr(e,sr)},"parse")},O=10,_=40,L=4,R=2,G=8,j=new Set(["redux","redux-dark","redux-color","redux-dark-color"]),X=12,Z=new Set(["redux-color","redux-dark-color"]),Xr=new Set(["dark","redux-dark","redux-dark-color","neo-dark"]),H=h((r,e,t=!1)=>t&&r>0?(r-1)%(e-1)+1:r%e,"calcColorIndex"),C=new Map,E=new Map,F=30,q=new Map,z=[],I=0,y="LR",Jr=h(()=>{C.clear(),E.clear(),q.clear(),I=0,z=[],y="LR"},"clear"),or=h(r=>{const e=document.createElementNS("http://www.w3.org/2000/svg","text");return(typeof r=="string"?r.split(/\\n|\n|<br\s*\/?>/gi):r).forEach(s=>{const o=document.createElementNS("http://www.w3.org/2000/svg","tspan");o.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),o.setAttribute("dy","1em"),o.setAttribute("x","0"),o.setAttribute("class","row"),o.textContent=s.trim(),e.appendChild(o)}),e},"drawText"),cr=h(r=>{let e,t,s;return y==="BT"?(t=h((o,i)=>o<=i,"comparisonFunc"),s=1/0):(t=h((o,i)=>o>=i,"comparisonFunc"),s=0),r.forEach(o=>{const i=y==="TB"||y=="BT"?E.get(o)?.y:E.get(o)?.x;i!==void 0&&t(i,s)&&(e=o,s=i)}),e},"findClosestParent"),Qr=h(r=>{let e="",t=1/0;return r.forEach(s=>{const o=E.get(s).y;o<=t&&(e=s,t=o)}),e||void 0},"findClosestParentBT"),Zr=h((r,e,t)=>{let s=t,o=t;const i=[];r.forEach(n=>{const a=e.get(n);if(!a)throw new Error(`Commit not found for key ${n}`);a.parents.length?(s=ee(a),o=Math.max(s,o)):i.push(a),te(a,s)}),s=o,i.forEach(n=>{ae(n,s,t)}),r.forEach(n=>{const a=e.get(n);if(a?.parents.length){const l=Qr(a.parents);s=E.get(l).y-_,s<=o&&(o=s);const f=C.get(a.branch).pos,g=s-O;E.set(a.id,{x:f,y:g})}})},"setParallelBTPos"),re=h(r=>{const e=cr(r.parents.filter(s=>s!==null));if(!e)throw new Error(`Closest parent not found for commit ${r.id}`);const t=E.get(e)?.y;if(t===void 0)throw new Error(`Closest parent position not found for commit ${r.id}`);return t},"findClosestParentPos"),ee=h(r=>re(r)+_,"calculateCommitPosition"),te=h((r,e)=>{const t=C.get(r.branch);if(!t)throw new Error(`Branch not found for commit ${r.id}`);const s=t.pos,o=e+O;return E.set(r.id,{x:s,y:o}),{x:s,y:o}},"setCommitPosition"),ae=h((r,e,t)=>{const s=C.get(r.branch);if(!s)throw new Error(`Branch not found for commit ${r.id}`);const o=e+t,i=s.pos;E.set(r.id,{x:i,y:o})},"setRootPosition"),ne=h((r,e,t,s,o,i)=>{const{theme:n}=W(),a=j.has(n??""),l=Z.has(n??""),f=Xr.has(n??"");if(i===m.HIGHLIGHT)r.append("rect").attr("x",t.x-10+(a?3:0)).attr("y",t.y-10+(a?3:0)).attr("width",a?14:20).attr("height",a?14:20).attr("class",`commit ${e.id} commit-highlight${H(o,G,l)} ${s}-outer`),r.append("rect").attr("x",t.x-6+(a?2:0)).attr("y",t.y-6+(a?2:0)).attr("width",a?8:12).attr("height",a?8:12).attr("class",`commit ${e.id} commit${H(o,G,l)} ${s}-inner`);else if(i===m.CHERRY_PICK)r.append("circle").attr("cx",t.x).attr("cy",t.y).attr("r",a?7:10).attr("class",`commit ${e.id} ${s}`),r.append("circle").attr("cx",t.x-3).attr("cy",t.y+2).attr("r",a?2.5:2.75).attr("fill",f?"#000000":"#fff").attr("class",`commit ${e.id} ${s}`),r.append("circle").attr("cx",t.x+3).attr("cy",t.y+2).attr("r",a?2.5:2.75).attr("fill",f?"#000000":"#fff").attr("class",`commit ${e.id} ${s}`),r.append("line").attr("x1",t.x+3).attr("y1",t.y+1).attr("x2",t.x).attr("y2",t.y-5).attr("stroke",f?"#000000":"#fff").attr("class",`commit ${e.id} ${s}`),r.append("line").attr("x1",t.x-3).attr("y1",t.y+1).attr("x2",t.x).attr("y2",t.y-5).attr("stroke",f?"#000000":"#fff").attr("class",`commit ${e.id} ${s}`);else{const g=r.append("circle");if(g.attr("cx",t.x),g.attr("cy",t.y),g.attr("r",a?7:10),g.attr("class",`commit ${e.id} commit${H(o,G,l)}`),i===m.MERGE){const $=r.append("circle");$.attr("cx",t.x),$.attr("cy",t.y),$.attr("r",a?5:6),$.attr("class",`commit ${s} ${e.id} commit${H(o,G,l)}`)}if(i===m.REVERSE){const $=r.append("path"),c=a?4:5;$.attr("d",`M ${t.x-c},${t.y-c}L${t.x+c},${t.y+c}M${t.x-c},${t.y+c}L${t.x+c},${t.y-c}`).attr("class",`commit ${s} ${e.id} commit${H(o,G,l)}`)}}},"drawCommitBullet"),se=h((r,e,t,s,o)=>{if(e.type!==m.CHERRY_PICK&&(e.customId&&e.type===m.MERGE||e.type!==m.MERGE)&&o.showCommitLabel){const i=r.append("g"),n=i.insert("rect").attr("class","commit-label-bkg"),a=i.append("text").attr("x",s).attr("y",t.y+25).attr("class","commit-label").text(e.id),l=a.node()?.getBBox();if(l&&(n.attr("x",t.posWithOffset-l.width/2-R).attr("y",t.y+13.5).attr("width",l.width+2*R).attr("height",l.height+2*R),y==="TB"||y==="BT"?(n.attr("x",t.x-(l.width+4*L+5)).attr("y",t.y-12),a.attr("x",t.x-(l.width+4*L)).attr("y",t.y+l.height-12)):a.attr("x",t.posWithOffset-l.width/2),o.rotateCommitLabel))if(y==="TB"||y==="BT")a.attr("transform","rotate(-45, "+t.x+", "+t.y+")"),n.attr("transform","rotate(-45, "+t.x+", "+t.y+")");else{const f=-7.5-(l.width+10)/25*9.5,g=10+l.width/25*8.5;i.attr("transform","translate("+f+", "+g+") rotate(-45, "+s+", "+t.y+")")}}},"drawCommitLabel"),oe=h((r,e,t,s)=>{if(e.tags.length>0){let o=0,i=0,n=0;const a=[];for(const l of e.tags.reverse()){const f=r.insert("polygon"),g=r.append("circle"),$=r.append("text").attr("y",t.y-16-o).attr("class","tag-label").text(l),c=$.node()?.getBBox();if(!c)throw new Error("Tag bbox not found");i=Math.max(i,c.width),n=Math.max(n,c.height),$.attr("x",t.posWithOffset-c.width/2),a.push({tag:$,hole:g,rect:f,yOffset:o}),o+=20}for(const{tag:l,hole:f,rect:g,yOffset:$}of a){const c=n/2,x=t.y-19.2-$;if(g.attr("class","tag-label-bkg").attr("points",`
1
+ import{I as lr}from"./chunk-2Q5K7J3B-DhsnoUrJ.js";import{p as hr}from"./chunk-JWPE2WC7-BLu2-FJl.js";import{p as $r,o as fr,s as gr,g as ur,a as yr,b as xr,_ as h,z as J,l as w,d as mr,c as W,y as pr,A as br,q as wr,k as B,B as kr,D as vr,E as Cr}from"./mermaid.core-DnaJSnLe.js";import{p as Er}from"./cynefin-VYW2F7L2-B4mEAleX.js";import"./index-BdjG_WtS.js";import"./react-rd22PHbN.js";import"./tanstack-Bsd5UOY4.js";import"./base-ui-D4MeJpa3.js";import"./render-markdown-GXIpf9CM.js";import"./App-CeDVj5Hh.js";import"./one-light-CoLDteqg.js";import"./index-BgLrS_2D.js";var m={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},Br=vr.gitGraph,S=h(()=>kr({...Br,...J().gitGraph}),"getConfig"),d=new lr(()=>{const r=S(),e=r.mainBranchName,t=r.mainBranchOrder;return{mainBranchName:e,commits:new Map,head:null,branchConfig:new Map([[e,{name:e,order:t}]]),branches:new Map([[e,null]]),currBranch:e,direction:"LR",seq:0,options:{}}});function Y(){return Cr({length:7})}h(Y,"getID");function tr(r,e){const t=Object.create(null);return r.reduce((s,o)=>{const i=e(o);return t[i]||(t[i]=!0,s.push(o)),s},[])}h(tr,"uniqBy");var Tr=h(function(r){d.records.direction=r},"setDirection"),Lr=h(function(r){w.debug("options str",r),r=r?.trim(),r=r||"{}";try{d.records.options=JSON.parse(r)}catch(e){w.error("error while parsing gitGraph options",e.message)}},"setOptions"),Mr=h(function(){return d.records.options},"getOptions"),Rr=h(function(r){let e=r.msg,t=r.id;const s=r.type;let o=r.tags;w.info("commit",e,t,s,o),w.debug("Entering commit:",e,t,s,o);const i=S();t=B.sanitizeText(t,i),e=B.sanitizeText(e,i),o=o?.map(a=>B.sanitizeText(a,i));const n={id:t||d.records.seq+"-"+Y(),message:e,seq:d.records.seq++,type:s??m.NORMAL,tags:o??[],parents:d.records.head==null?[]:[d.records.head.id],branch:d.records.currBranch};d.records.head=n,w.info("main branch",i.mainBranchName),d.records.commits.has(n.id)&&w.warn(`Commit ID ${n.id} already exists`),d.records.commits.set(n.id,n),d.records.branches.set(d.records.currBranch,n.id),w.debug("in pushCommit "+n.id)},"commit"),Ir=h(function(r){let e=r.name;const t=r.order;if(e=B.sanitizeText(e,S()),d.records.branches.has(e))throw new Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${e}")`);d.records.branches.set(e,d.records.head!=null?d.records.head.id:null),d.records.branchConfig.set(e,{name:e,order:t}),ar(e),w.debug("in createBranch")},"branch"),Or=h(r=>{let e=r.branch,t=r.id;const s=r.type,o=r.tags,i=S();e=B.sanitizeText(e,i),t&&(t=B.sanitizeText(t,i));const n=d.records.branches.get(d.records.currBranch),a=d.records.branches.get(e),l=n?d.records.commits.get(n):void 0,f=a?d.records.commits.get(a):void 0;if(l&&f&&l.branch===e)throw new Error(`Cannot merge branch '${e}' into itself.`);if(d.records.currBranch===e){const c=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw c.hash={text:`merge ${e}`,token:`merge ${e}`,expected:["branch abc"]},c}if(l===void 0||!l){const c=new Error(`Incorrect usage of "merge". Current branch (${d.records.currBranch})has no commits`);throw c.hash={text:`merge ${e}`,token:`merge ${e}`,expected:["commit"]},c}if(!d.records.branches.has(e)){const c=new Error('Incorrect usage of "merge". Branch to be merged ('+e+") does not exist");throw c.hash={text:`merge ${e}`,token:`merge ${e}`,expected:[`branch ${e}`]},c}if(f===void 0||!f){const c=new Error('Incorrect usage of "merge". Branch to be merged ('+e+") has no commits");throw c.hash={text:`merge ${e}`,token:`merge ${e}`,expected:['"commit"']},c}if(l===f){const c=new Error('Incorrect usage of "merge". Both branches have same head');throw c.hash={text:`merge ${e}`,token:`merge ${e}`,expected:["branch abc"]},c}if(t&&d.records.commits.has(t)){const c=new Error('Incorrect usage of "merge". Commit with id:'+t+" already exists, use different custom id");throw c.hash={text:`merge ${e} ${t} ${s} ${o?.join(" ")}`,token:`merge ${e} ${t} ${s} ${o?.join(" ")}`,expected:[`merge ${e} ${t}_UNIQUE ${s} ${o?.join(" ")}`]},c}const g=a||"",$={id:t||`${d.records.seq}-${Y()}`,message:`merged branch ${e} into ${d.records.currBranch}`,seq:d.records.seq++,parents:d.records.head==null?[]:[d.records.head.id,g],branch:d.records.currBranch,type:m.MERGE,customType:s,customId:!!t,tags:o??[]};d.records.head=$,d.records.commits.set($.id,$),d.records.branches.set(d.records.currBranch,$.id),w.debug(d.records.branches),w.debug("in mergeBranch")},"merge"),_r=h(function(r){let e=r.id,t=r.targetId,s=r.tags,o=r.parent;w.debug("Entering cherryPick:",e,t,s);const i=S();if(e=B.sanitizeText(e,i),t=B.sanitizeText(t,i),s=s?.map(l=>B.sanitizeText(l,i)),o=B.sanitizeText(o,i),!e||!d.records.commits.has(e)){const l=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw l.hash={text:`cherryPick ${e} ${t}`,token:`cherryPick ${e} ${t}`,expected:["cherry-pick abc"]},l}const n=d.records.commits.get(e);if(n===void 0||!n)throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(o&&!(Array.isArray(n.parents)&&n.parents.includes(o)))throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");const a=n.branch;if(n.type===m.MERGE&&!o)throw new Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.");if(!t||!d.records.commits.has(t)){if(a===d.records.currBranch){const $=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw $.hash={text:`cherryPick ${e} ${t}`,token:`cherryPick ${e} ${t}`,expected:["cherry-pick abc"]},$}const l=d.records.branches.get(d.records.currBranch);if(l===void 0||!l){const $=new Error(`Incorrect usage of "cherry-pick". Current branch (${d.records.currBranch})has no commits`);throw $.hash={text:`cherryPick ${e} ${t}`,token:`cherryPick ${e} ${t}`,expected:["cherry-pick abc"]},$}const f=d.records.commits.get(l);if(f===void 0||!f){const $=new Error(`Incorrect usage of "cherry-pick". Current branch (${d.records.currBranch})has no commits`);throw $.hash={text:`cherryPick ${e} ${t}`,token:`cherryPick ${e} ${t}`,expected:["cherry-pick abc"]},$}const g={id:d.records.seq+"-"+Y(),message:`cherry-picked ${n?.message} into ${d.records.currBranch}`,seq:d.records.seq++,parents:d.records.head==null?[]:[d.records.head.id,n.id],branch:d.records.currBranch,type:m.CHERRY_PICK,tags:s?s.filter(Boolean):[`cherry-pick:${n.id}${n.type===m.MERGE?`|parent:${o}`:""}`]};d.records.head=g,d.records.commits.set(g.id,g),d.records.branches.set(d.records.currBranch,g.id),w.debug(d.records.branches),w.debug("in cherryPick")}},"cherryPick"),ar=h(function(r){if(r=B.sanitizeText(r,S()),d.records.branches.has(r)){d.records.currBranch=r;const e=d.records.branches.get(d.records.currBranch);e===void 0||!e?d.records.head=null:d.records.head=d.records.commits.get(e)??null}else{const e=new Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${r}")`);throw e.hash={text:`checkout ${r}`,token:`checkout ${r}`,expected:[`branch ${r}`]},e}},"checkout");function V(r,e,t){const s=r.indexOf(e);s===-1?r.push(t):r.splice(s,1,t)}h(V,"upsert");function Q(r){const e=r.reduce((o,i)=>o.seq>i.seq?o:i,r[0]);let t="";r.forEach(function(o){o===e?t+=" *":t+=" |"});const s=[t,e.id,e.seq];for(const o in d.records.branches)d.records.branches.get(o)===e.id&&s.push(o);if(w.debug(s.join(" ")),e.parents&&e.parents.length==2&&e.parents[0]&&e.parents[1]){const o=d.records.commits.get(e.parents[0]);V(r,e,o),e.parents[1]&&r.push(d.records.commits.get(e.parents[1]))}else{if(e.parents.length==0)return;if(e.parents[0]){const o=d.records.commits.get(e.parents[0]);V(r,e,o)}}r=tr(r,o=>o.id),Q(r)}h(Q,"prettyPrintCommitHistory");var Gr=h(function(){w.debug(d.records.commits);const r=nr()[0];Q([r])},"prettyPrint"),Hr=h(function(){d.reset(),wr()},"clear"),Sr=h(function(){return[...d.records.branchConfig.values()].map((e,t)=>e.order!==null&&e.order!==void 0?e:{...e,order:parseFloat(`0.${t}`)}).sort((e,t)=>(e.order??0)-(t.order??0)).map(({name:e})=>({name:e}))},"getBranchesAsObjArray"),Ar=h(function(){return d.records.branches},"getBranches"),Dr=h(function(){return d.records.commits},"getCommits"),nr=h(function(){const r=[...d.records.commits.values()];return r.forEach(function(e){w.debug(e.id)}),r.sort((e,t)=>e.seq-t.seq),r},"getCommitsArray"),qr=h(function(){return d.records.currBranch},"getCurrentBranch"),Pr=h(function(){return d.records.direction},"getDirection"),Wr=h(function(){return d.records.head},"getHead"),sr={commitType:m,getConfig:S,setDirection:Tr,setOptions:Lr,getOptions:Mr,commit:Rr,branch:Ir,merge:Or,cherryPick:_r,checkout:ar,prettyPrint:Gr,clear:Hr,getBranchesAsObjArray:Sr,getBranches:Ar,getCommits:Dr,getCommitsArray:nr,getCurrentBranch:qr,getDirection:Pr,getHead:Wr,setAccTitle:xr,getAccTitle:yr,getAccDescription:ur,setAccDescription:gr,setDiagramTitle:fr,getDiagramTitle:$r},Nr=h((r,e)=>{hr(r,e),r.dir&&e.setDirection(r.dir);for(const t of r.statements)Fr(t,e)},"populate"),Fr=h((r,e)=>{const s={Commit:h(o=>e.commit(zr(o)),"Commit"),Branch:h(o=>e.branch(Yr(o)),"Branch"),Merge:h(o=>e.merge(jr(o)),"Merge"),Checkout:h(o=>e.checkout(Ur(o)),"Checkout"),CherryPicking:h(o=>e.cherryPick(Kr(o)),"CherryPicking")}[r.$type];s?s(r):w.error(`Unknown statement type: ${r.$type}`)},"parseStatement"),zr=h(r=>({id:r.id,msg:r.message??"",type:r.type!==void 0?m[r.type]:m.NORMAL,tags:r.tags??void 0}),"parseCommit"),Yr=h(r=>({name:r.name,order:r.order??0}),"parseBranch"),jr=h(r=>({branch:r.branch,id:r.id??"",type:r.type!==void 0?m[r.type]:void 0,tags:r.tags??void 0}),"parseMerge"),Ur=h(r=>r.branch,"parseCheckout"),Kr=h(r=>({id:r.id,targetId:"",tags:r.tags?.length===0?void 0:r.tags,parent:r.parent}),"parseCherryPicking"),Vr={parse:h(async r=>{const e=await Er("gitGraph",r);w.debug(e),Nr(e,sr)},"parse")},O=10,_=40,L=4,R=2,G=8,j=new Set(["redux","redux-dark","redux-color","redux-dark-color"]),X=12,Z=new Set(["redux-color","redux-dark-color"]),Xr=new Set(["dark","redux-dark","redux-dark-color","neo-dark"]),H=h((r,e,t=!1)=>t&&r>0?(r-1)%(e-1)+1:r%e,"calcColorIndex"),C=new Map,E=new Map,F=30,q=new Map,z=[],I=0,y="LR",Jr=h(()=>{C.clear(),E.clear(),q.clear(),I=0,z=[],y="LR"},"clear"),or=h(r=>{const e=document.createElementNS("http://www.w3.org/2000/svg","text");return(typeof r=="string"?r.split(/\\n|\n|<br\s*\/?>/gi):r).forEach(s=>{const o=document.createElementNS("http://www.w3.org/2000/svg","tspan");o.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),o.setAttribute("dy","1em"),o.setAttribute("x","0"),o.setAttribute("class","row"),o.textContent=s.trim(),e.appendChild(o)}),e},"drawText"),cr=h(r=>{let e,t,s;return y==="BT"?(t=h((o,i)=>o<=i,"comparisonFunc"),s=1/0):(t=h((o,i)=>o>=i,"comparisonFunc"),s=0),r.forEach(o=>{const i=y==="TB"||y=="BT"?E.get(o)?.y:E.get(o)?.x;i!==void 0&&t(i,s)&&(e=o,s=i)}),e},"findClosestParent"),Qr=h(r=>{let e="",t=1/0;return r.forEach(s=>{const o=E.get(s).y;o<=t&&(e=s,t=o)}),e||void 0},"findClosestParentBT"),Zr=h((r,e,t)=>{let s=t,o=t;const i=[];r.forEach(n=>{const a=e.get(n);if(!a)throw new Error(`Commit not found for key ${n}`);a.parents.length?(s=ee(a),o=Math.max(s,o)):i.push(a),te(a,s)}),s=o,i.forEach(n=>{ae(n,s,t)}),r.forEach(n=>{const a=e.get(n);if(a?.parents.length){const l=Qr(a.parents);s=E.get(l).y-_,s<=o&&(o=s);const f=C.get(a.branch).pos,g=s-O;E.set(a.id,{x:f,y:g})}})},"setParallelBTPos"),re=h(r=>{const e=cr(r.parents.filter(s=>s!==null));if(!e)throw new Error(`Closest parent not found for commit ${r.id}`);const t=E.get(e)?.y;if(t===void 0)throw new Error(`Closest parent position not found for commit ${r.id}`);return t},"findClosestParentPos"),ee=h(r=>re(r)+_,"calculateCommitPosition"),te=h((r,e)=>{const t=C.get(r.branch);if(!t)throw new Error(`Branch not found for commit ${r.id}`);const s=t.pos,o=e+O;return E.set(r.id,{x:s,y:o}),{x:s,y:o}},"setCommitPosition"),ae=h((r,e,t)=>{const s=C.get(r.branch);if(!s)throw new Error(`Branch not found for commit ${r.id}`);const o=e+t,i=s.pos;E.set(r.id,{x:i,y:o})},"setRootPosition"),ne=h((r,e,t,s,o,i)=>{const{theme:n}=W(),a=j.has(n??""),l=Z.has(n??""),f=Xr.has(n??"");if(i===m.HIGHLIGHT)r.append("rect").attr("x",t.x-10+(a?3:0)).attr("y",t.y-10+(a?3:0)).attr("width",a?14:20).attr("height",a?14:20).attr("class",`commit ${e.id} commit-highlight${H(o,G,l)} ${s}-outer`),r.append("rect").attr("x",t.x-6+(a?2:0)).attr("y",t.y-6+(a?2:0)).attr("width",a?8:12).attr("height",a?8:12).attr("class",`commit ${e.id} commit${H(o,G,l)} ${s}-inner`);else if(i===m.CHERRY_PICK)r.append("circle").attr("cx",t.x).attr("cy",t.y).attr("r",a?7:10).attr("class",`commit ${e.id} ${s}`),r.append("circle").attr("cx",t.x-3).attr("cy",t.y+2).attr("r",a?2.5:2.75).attr("fill",f?"#000000":"#fff").attr("class",`commit ${e.id} ${s}`),r.append("circle").attr("cx",t.x+3).attr("cy",t.y+2).attr("r",a?2.5:2.75).attr("fill",f?"#000000":"#fff").attr("class",`commit ${e.id} ${s}`),r.append("line").attr("x1",t.x+3).attr("y1",t.y+1).attr("x2",t.x).attr("y2",t.y-5).attr("stroke",f?"#000000":"#fff").attr("class",`commit ${e.id} ${s}`),r.append("line").attr("x1",t.x-3).attr("y1",t.y+1).attr("x2",t.x).attr("y2",t.y-5).attr("stroke",f?"#000000":"#fff").attr("class",`commit ${e.id} ${s}`);else{const g=r.append("circle");if(g.attr("cx",t.x),g.attr("cy",t.y),g.attr("r",a?7:10),g.attr("class",`commit ${e.id} commit${H(o,G,l)}`),i===m.MERGE){const $=r.append("circle");$.attr("cx",t.x),$.attr("cy",t.y),$.attr("r",a?5:6),$.attr("class",`commit ${s} ${e.id} commit${H(o,G,l)}`)}if(i===m.REVERSE){const $=r.append("path"),c=a?4:5;$.attr("d",`M ${t.x-c},${t.y-c}L${t.x+c},${t.y+c}M${t.x-c},${t.y+c}L${t.x+c},${t.y-c}`).attr("class",`commit ${s} ${e.id} commit${H(o,G,l)}`)}}},"drawCommitBullet"),se=h((r,e,t,s,o)=>{if(e.type!==m.CHERRY_PICK&&(e.customId&&e.type===m.MERGE||e.type!==m.MERGE)&&o.showCommitLabel){const i=r.append("g"),n=i.insert("rect").attr("class","commit-label-bkg"),a=i.append("text").attr("x",s).attr("y",t.y+25).attr("class","commit-label").text(e.id),l=a.node()?.getBBox();if(l&&(n.attr("x",t.posWithOffset-l.width/2-R).attr("y",t.y+13.5).attr("width",l.width+2*R).attr("height",l.height+2*R),y==="TB"||y==="BT"?(n.attr("x",t.x-(l.width+4*L+5)).attr("y",t.y-12),a.attr("x",t.x-(l.width+4*L)).attr("y",t.y+l.height-12)):a.attr("x",t.posWithOffset-l.width/2),o.rotateCommitLabel))if(y==="TB"||y==="BT")a.attr("transform","rotate(-45, "+t.x+", "+t.y+")"),n.attr("transform","rotate(-45, "+t.x+", "+t.y+")");else{const f=-7.5-(l.width+10)/25*9.5,g=10+l.width/25*8.5;i.attr("transform","translate("+f+", "+g+") rotate(-45, "+s+", "+t.y+")")}}},"drawCommitLabel"),oe=h((r,e,t,s)=>{if(e.tags.length>0){let o=0,i=0,n=0;const a=[];for(const l of e.tags.reverse()){const f=r.insert("polygon"),g=r.append("circle"),$=r.append("text").attr("y",t.y-16-o).attr("class","tag-label").text(l),c=$.node()?.getBBox();if(!c)throw new Error("Tag bbox not found");i=Math.max(i,c.width),n=Math.max(n,c.height),$.attr("x",t.posWithOffset-c.width/2),a.push({tag:$,hole:g,rect:f,yOffset:o}),o+=20}for(const{tag:l,hole:f,rect:g,yOffset:$}of a){const c=n/2,x=t.y-19.2-$;if(g.attr("class","tag-label-bkg").attr("points",`
2
2
  ${s-i/2-L/2},${x+R}
3
3
  ${s-i/2-L/2},${x-R}
4
4
  ${t.posWithOffset-i/2-L},${x-c-R}
@@ -1,3 +1,3 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/App-C7Yf3r-l.js","assets/react-rd22PHbN.js","assets/tanstack-Bsd5UOY4.js","assets/base-ui-D4MeJpa3.js","assets/PairingPage-Cu1KraeJ.js"])))=>i.map(i=>d[i]);
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/App-CeDVj5Hh.js","assets/react-rd22PHbN.js","assets/tanstack-Bsd5UOY4.js","assets/base-ui-D4MeJpa3.js","assets/PairingPage-C5Ggk-Z_.js"])))=>i.map(i=>d[i]);
2
2
  import{r as T,j as f,d as at}from"./react-rd22PHbN.js";import{Q as lt,e as ct}from"./tanstack-Bsd5UOY4.js";import{B as dt,r as ut,s as pt,t as mt,u as ft,v as ht,x as gt,y as bt}from"./base-ui-D4MeJpa3.js";(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))n(a);new MutationObserver(a=>{for(const l of a)if(l.type==="childList")for(const s of l.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&n(s)}).observe(document,{childList:!0,subtree:!0});function o(a){const l={};return a.integrity&&(l.integrity=a.integrity),a.referrerPolicy&&(l.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?l.credentials="include":a.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function n(a){if(a.ep)return;a.ep=!0;const l=o(a);fetch(a.href,l)}})();const Ge="opentig.theme";function yt(e){try{const t=e?.getItem(Ge);return t==="light"||t==="dark"||t==="system"?t:null}catch{return null}}function io(e,t=globalThis.localStorage){try{t?.setItem(Ge,e)}catch{}}function vt(e,t){return e==="light"?!1:e==="dark"?!0:t}function wt(e={}){const t=e.root??(typeof document>"u"?null:document.documentElement);if(!t)return!1;const o=e.storage??(typeof localStorage>"u"?null:localStorage),n=e.prefersDark??(typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").matches),a=vt(yt(o),n);return t.classList.toggle("dark",a),t.classList.toggle("light",!a),a}wt();const xt="modulepreload",kt=function(e){return"/"+e},Pe={},qe=function(t,o,n){let a=Promise.resolve();if(o&&o.length>0){let b=function(r){return Promise.all(r.map(i=>Promise.resolve(i).then(m=>({status:"fulfilled",value:m}),m=>({status:"rejected",reason:m}))))};document.getElementsByTagName("link");const s=document.querySelector("meta[property=csp-nonce]"),p=s?.nonce||s?.getAttribute("nonce");a=b(o.map(r=>{if(r=kt(r),r in Pe)return;Pe[r]=!0;const i=r.endsWith(".css"),m=i?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${r}"]${m}`))return;const y=document.createElement("link");if(y.rel=i?"stylesheet":xt,i||(y.as="script"),y.crossOrigin="",y.href=r,p&&y.setAttribute("nonce",p),document.head.appendChild(y),i)return new Promise((x,O)=>{y.addEventListener("load",x),y.addEventListener("error",()=>O(new Error(`Unable to preload CSS for ${r}`)))})}))}function l(s){const p=new Event("vite:preloadError",{cancelable:!0});if(p.payload=s,window.dispatchEvent(p),!p.defaultPrevented)throw s}return a.then(s=>{for(const p of s||[])p.status==="rejected"&&l(p.reason);return t().catch(l)})};function Ct(){return T.useEffect(()=>{const e=window.visualViewport;if(!e)return;const t=()=>{Math.abs(e.scale-1)>.01||(document.documentElement.style.setProperty("--mobile-viewport-height",`${e.height}px`),document.documentElement.style.setProperty("--mobile-viewport-top",`${e.offsetTop}px`))};return t(),e.addEventListener("resize",t),e.addEventListener("scroll",t),()=>{e.removeEventListener("resize",t),e.removeEventListener("scroll",t)}},[]),null}function St(){return f.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 117.9 128","aria-hidden":"true",children:[f.jsx("path",{fill:"currentColor",d:"m113.9 42.6c-3.7-11.3-10.8-21.2-20.1-28.6-7.4-5.7-16.1-10-25.4-11.5-6.5-0.9-9.4-1.1-15.9-0.3-7.4 0.9-14.3 3.4-20.7 7-15.4 9.1-27.6 26.2-29.8 44.5-0.3 2.9-0.4 5.8-0.2 8.7 0.7 15.5 9.7 33.2 27.2 44.1l3.9 2.2c1.5 1.3 2.9 1.8 5.1 1.3 3.5-0.9 5.1-6.1 0.1-8.6-7.3-3.5-13.7-8.7-18.1-14.6-5-7-9-15.8-9.3-26.9-0.2-10 3.5-21.4 11.6-31.3 4.5-5.2 10.5-9.8 16.4-12.7 10.1-4.9 20.5-6.6 31.2-3.8 13.2 3.5 25.6 13.1 32.3 26.5 2.3 4.9 4.2 10.7 4.9 17.4 0.9 9.9-1.4 19.2-6.9 27.4-4.3 6.5-9.2 11-16.1 15.8l-4.1 2.1c-4.4 2.4-3.2 9.4 2.8 9 1.2 0 2.5-0.8 3.6-1.4 3.9-2 7.5-4.3 10.8-7 9.4-8 17.6-20.3 19.1-36.8 0.6-7.4-0.4-15.6-2.4-22.5z"}),f.jsx("path",{fill:"#2266ea",d:"m88.1 42.8c-3.6 0.3-7.4 2.9-9 7.3-5.5 0.8-14.1 3.6-20.3 12-4.3-6.3-11.6-10.7-19.7-12-1.1-3.8-5-7.5-10.2-7.2-4.1 0.4-8.7 3.8-8.7 9.7 0.2 6 5.7 10.3 11.1 9.3 2.8-0.3 5.2-2 6.6-4.3 6.7 1 14.9 4.7 17.3 14.1v36.7c-3.2 1.5-5.5 4.7-5.5 8.4 0 4.8 3.7 9.3 9.4 9.3s9.5-4.5 9.4-9.1c0.1-3.6-2.3-7.3-5.8-8.7v-36.4c1-5.6 5.9-10.9 13.3-13.3l3.9-1c1.8 2.9 4.9 4.6 8.6 4.5 4.6-0.2 9.3-3.6 9.3-9.5 0-5.6-4.9-10-9.7-9.8z"})]})}function Tt({heading:e,detail:t,busy:o=!0}){return f.jsxs("div",{className:"splash",children:[f.jsx(St,{}),f.jsxs("div",{className:"splash-copy",children:[f.jsx("strong",{children:e}),f.jsx("span",{role:"status","aria-live":"polite",children:t??""})]}),o?f.jsx("div",{className:"splash-mark","aria-hidden":"true"}):null]})}function Be(e){var t,o,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(o=Be(e[t]))&&(n&&(n+=" "),n+=o)}else for(o in e)e[o]&&(n&&(n+=" "),n+=o);return n}function We(){for(var e,t,o=0,n="",a=arguments.length;o<a;o++)(e=arguments[o])&&(t=Be(e))&&(n&&(n+=" "),n+=t);return n}const Re=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,je=We,Et=(e,t)=>o=>{var n;if(t?.variants==null)return je(e,o?.class,o?.className);const{variants:a,defaultVariants:l}=t,s=Object.keys(a).map(r=>{const i=o?.[r],m=l?.[r];if(i===null)return null;const y=Re(i)||Re(m);return a[r][y]}),p=o&&Object.entries(o).reduce((r,i)=>{let[m,y]=i;return y===void 0||(r[m]=y),r},{}),b=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((r,i)=>{let{class:m,className:y,...x}=i;return Object.entries(x).every(O=>{let[S,E]=O;return Array.isArray(E)?E.includes({...l,...p}[S]):{...l,...p}[S]===E})?[...r,m,y]:r},[]);return je(e,s,b,o?.class,o?.className)},Pt=(e,t)=>{const o=new Array(e.length+t.length);for(let n=0;n<e.length;n++)o[n]=e[n];for(let n=0;n<t.length;n++)o[e.length+n]=t[n];return o},Rt=(e,t)=>({classGroupId:e,validator:t}),Ve=(e=new Map,t=null,o)=>({nextPart:e,validators:t,classGroupId:o}),ie="-",Ae=[],jt="arbitrary..",At=e=>{const t=zt(e),{conflictingClassGroups:o,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:s=>{if(s.startsWith("[")&&s.endsWith("]"))return Ot(s);const p=s.split(ie),b=p[0]===""&&p.length>1?1:0;return Ue(p,b,t)},getConflictingClassGroupIds:(s,p)=>{if(p){const b=n[s],r=o[s];return b?r?Pt(r,b):b:r||Ae}return o[s]||Ae}}},Ue=(e,t,o)=>{if(e.length-t===0)return o.classGroupId;const a=e[t],l=o.nextPart.get(a);if(l){const r=Ue(e,t+1,l);if(r)return r}const s=o.validators;if(s===null)return;const p=t===0?e.join(ie):e.slice(t).join(ie),b=s.length;for(let r=0;r<b;r++){const i=s[r];if(i.validator(p))return i.classGroupId}},Ot=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),o=t.indexOf(":"),n=t.slice(0,o);return n?jt+n:void 0})(),zt=e=>{const{theme:t,classGroups:o}=e;return Mt(o,t)},Mt=(e,t)=>{const o=Ve();for(const n in e){const a=e[n];be(a,o,n,t)}return o},be=(e,t,o,n)=>{const a=e.length;for(let l=0;l<a;l++){const s=e[l];Lt(s,t,o,n)}},Lt=(e,t,o,n)=>{if(typeof e=="string"){It(e,t,o);return}if(typeof e=="function"){Nt(e,t,o,n);return}Ft(e,t,o,n)},It=(e,t,o)=>{const n=e===""?t:$e(t,e);n.classGroupId=o},Nt=(e,t,o,n)=>{if(_t(e)){be(e(n),t,o,n);return}t.validators===null&&(t.validators=[]),t.validators.push(Rt(o,e))},Ft=(e,t,o,n)=>{const a=Object.entries(e),l=a.length;for(let s=0;s<l;s++){const[p,b]=a[s];be(b,$e(t,p),o,n)}},$e=(e,t)=>{let o=e;const n=t.split(ie),a=n.length;for(let l=0;l<a;l++){const s=n[l];let p=o.nextPart.get(s);p||(p=Ve(),o.nextPart.set(s,p)),o=p}return o},_t=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,Dt=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,o=Object.create(null),n=Object.create(null);const a=(l,s)=>{o[l]=s,t++,t>e&&(t=0,n=o,o=Object.create(null))};return{get(l){let s=o[l];if(s!==void 0)return s;if((s=n[l])!==void 0)return a(l,s),s},set(l,s){l in o?o[l]=s:a(l,s)}}},ge="!",Oe=":",Gt=[],ze=(e,t,o,n,a)=>({modifiers:e,hasImportantModifier:t,baseClassName:o,maybePostfixModifierPosition:n,isExternal:a}),qt=e=>{const{prefix:t,experimentalParseClassName:o}=e;let n=a=>{const l=[];let s=0,p=0,b=0,r;const i=a.length;for(let S=0;S<i;S++){const E=a[S];if(s===0&&p===0){if(E===Oe){l.push(a.slice(b,S)),b=S+1;continue}if(E==="/"){r=S;continue}}E==="["?s++:E==="]"?s--:E==="("?p++:E===")"&&p--}const m=l.length===0?a:a.slice(b);let y=m,x=!1;m.endsWith(ge)?(y=m.slice(0,-1),x=!0):m.startsWith(ge)&&(y=m.slice(1),x=!0);const O=r&&r>b?r-b:void 0;return ze(l,x,y,O)};if(t){const a=t+Oe,l=n;n=s=>s.startsWith(a)?l(s.slice(a.length)):ze(Gt,!1,s,void 0,!0)}if(o){const a=n;n=l=>o({className:l,parseClassName:a})}return n},Bt=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((o,n)=>{t.set(o,1e6+n)}),o=>{const n=[];let a=[];for(let l=0;l<o.length;l++){const s=o[l],p=s[0]==="[",b=t.has(s);p||b?(a.length>0&&(a.sort(),n.push(...a),a=[]),n.push(s)):a.push(s)}return a.length>0&&(a.sort(),n.push(...a)),n}},Wt=e=>({cache:Dt(e.cacheSize),parseClassName:qt(e),sortModifiers:Bt(e),postfixLookupClassGroupIds:Vt(e),...At(e)}),Vt=e=>{const t=Object.create(null),o=e.postfixLookupClassGroups;if(o)for(let n=0;n<o.length;n++)t[o[n]]=!0;return t},Ut=/\s+/,$t=(e,t)=>{const{parseClassName:o,getClassGroupId:n,getConflictingClassGroupIds:a,sortModifiers:l,postfixLookupClassGroupIds:s}=t,p=[],b=e.trim().split(Ut);let r="";for(let i=b.length-1;i>=0;i-=1){const m=b[i],{isExternal:y,modifiers:x,hasImportantModifier:O,baseClassName:S,maybePostfixModifierPosition:E}=o(m);if(y){r=m+(r.length>0?" "+r:r);continue}let _=!!E,j;if(_){const L=S.substring(0,E);j=n(L);const h=j&&s[j]?n(S):void 0;h&&h!==j&&(j=h,_=!1)}else j=n(S);if(!j){if(!_){r=m+(r.length>0?" "+r:r);continue}if(j=n(S),!j){r=m+(r.length>0?" "+r:r);continue}_=!1}const K=x.length===0?"":x.length===1?x[0]:l(x).join(":"),W=O?K+ge:K,V=W+j;if(p.indexOf(V)>-1)continue;p.push(V);const U=a(j,_);for(let L=0;L<U.length;++L){const h=U[L];p.push(W+h)}r=m+(r.length>0?" "+r:r)}return r},Ht=(...e)=>{let t=0,o,n,a="";for(;t<e.length;)(o=e[t++])&&(n=He(o))&&(a&&(a+=" "),a+=n);return a},He=e=>{if(typeof e=="string")return e;let t,o="";for(let n=0;n<e.length;n++)e[n]&&(t=He(e[n]))&&(o&&(o+=" "),o+=t);return o},Yt=(e,...t)=>{let o,n,a,l;const s=b=>{const r=t.reduce((i,m)=>m(i),e());return o=Wt(r),n=o.cache.get,a=o.cache.set,l=p,p(b)},p=b=>{const r=n(b);if(r)return r;const i=$t(b,o);return a(b,i),i};return l=s,(...b)=>l(Ht(...b))},Kt=[],w=e=>{const t=o=>o[e]||Kt;return t.isThemeGetter=!0,t},Ye=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Ke=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Qt=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Jt=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Xt=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Zt=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,er=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,tr=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,N=e=>Qt.test(e),v=e=>!!e&&!Number.isNaN(Number(e)),M=e=>!!e&&Number.isInteger(Number(e)),me=e=>e.endsWith("%")&&v(e.slice(0,-1)),I=e=>Jt.test(e),Qe=()=>!0,rr=e=>Xt.test(e)&&!Zt.test(e),ye=()=>!1,or=e=>er.test(e),sr=e=>tr.test(e),nr=e=>!d(e)&&!u(e),ir=e=>e.startsWith("@container")&&(e[10]==="/"&&e[11]!==void 0||e[11]==="s"&&e[16]!==void 0&&e.startsWith("-size/",10)||e[11]==="n"&&e[18]!==void 0&&e.startsWith("-normal/",10)),ar=e=>F(e,Ze,ye),d=e=>Ye.test(e),G=e=>F(e,et,rr),Me=e=>F(e,hr,v),lr=e=>F(e,rt,Qe),cr=e=>F(e,tt,ye),Le=e=>F(e,Je,ye),dr=e=>F(e,Xe,sr),re=e=>F(e,ot,or),u=e=>Ke.test(e),Q=e=>B(e,et),ur=e=>B(e,tt),Ie=e=>B(e,Je),pr=e=>B(e,Ze),mr=e=>B(e,Xe),oe=e=>B(e,ot,!0),fr=e=>B(e,rt,!0),F=(e,t,o)=>{const n=Ye.exec(e);return n?n[1]?t(n[1]):o(n[2]):!1},B=(e,t,o=!1)=>{const n=Ke.exec(e);return n?n[1]?t(n[1]):o:!1},Je=e=>e==="position"||e==="percentage",Xe=e=>e==="image"||e==="url",Ze=e=>e==="length"||e==="size"||e==="bg-size",et=e=>e==="length",hr=e=>e==="number",tt=e=>e==="family-name",rt=e=>e==="number"||e==="weight",ot=e=>e==="shadow",gr=()=>{const e=w("color"),t=w("font"),o=w("text"),n=w("font-weight"),a=w("tracking"),l=w("leading"),s=w("breakpoint"),p=w("container"),b=w("spacing"),r=w("radius"),i=w("shadow"),m=w("inset-shadow"),y=w("text-shadow"),x=w("drop-shadow"),O=w("blur"),S=w("perspective"),E=w("aspect"),_=w("ease"),j=w("animate"),K=()=>["auto","avoid","all","avoid-page","page","left","right","column"],W=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],V=()=>[...W(),u,d],U=()=>["auto","hidden","clip","visible","scroll"],L=()=>["auto","contain","none"],h=()=>[u,d,b],A=()=>[N,"full","auto",...h()],ve=()=>[M,"none","subgrid",u,d],we=()=>["auto",{span:["full",M,u,d]},M,u,d],J=()=>[M,"auto",u,d],xe=()=>["auto","min","max","fr",u,d],le=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],$=()=>["start","end","center","stretch","center-safe","end-safe"],z=()=>["auto",...h()],D=()=>[N,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...h()],ce=()=>[N,"screen","full","dvw","lvw","svw","min","max","fit",...h()],de=()=>[N,"screen","full","lh","dvh","lvh","svh","min","max","fit",...h()],g=()=>[e,u,d],ke=()=>[...W(),Ie,Le,{position:[u,d]}],Ce=()=>["no-repeat",{repeat:["","x","y","space","round"]}],Se=()=>["auto","cover","contain",pr,ar,{size:[u,d]}],ue=()=>[me,Q,G],P=()=>["","none","full",r,u,d],R=()=>["",v,Q,G],X=()=>["solid","dashed","dotted","double"],Te=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],k=()=>[v,me,Ie,Le],Ee=()=>["","none",O,u,d],Z=()=>["none",v,u,d],ee=()=>["none",v,u,d],pe=()=>[v,u,d],te=()=>[N,"full",...h()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[I],breakpoint:[I],color:[Qe],container:[I],"drop-shadow":[I],ease:["in","out","in-out"],font:[nr],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[I],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[I],shadow:[I],spacing:["px",v],text:[I],"text-shadow":[I],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",N,d,u,E]}],container:["container"],"container-type":[{"@container":["","normal","size",u,d]}],"container-named":[ir],columns:[{columns:[v,d,u,p]}],"break-after":[{"break-after":K()}],"break-before":[{"break-before":K()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:V()}],overflow:[{overflow:U()}],"overflow-x":[{"overflow-x":U()}],"overflow-y":[{"overflow-y":U()}],overscroll:[{overscroll:L()}],"overscroll-x":[{"overscroll-x":L()}],"overscroll-y":[{"overscroll-y":L()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:A()}],"inset-x":[{"inset-x":A()}],"inset-y":[{"inset-y":A()}],start:[{"inset-s":A(),start:A()}],end:[{"inset-e":A(),end:A()}],"inset-bs":[{"inset-bs":A()}],"inset-be":[{"inset-be":A()}],top:[{top:A()}],right:[{right:A()}],bottom:[{bottom:A()}],left:[{left:A()}],visibility:["visible","invisible","collapse"],z:[{z:[M,"auto",u,d]}],basis:[{basis:[N,"full","auto",p,...h()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[v,N,"auto","initial","none",d]}],grow:[{grow:["",v,u,d]}],shrink:[{shrink:["",v,u,d]}],order:[{order:[M,"first","last","none",u,d]}],"grid-cols":[{"grid-cols":ve()}],"col-start-end":[{col:we()}],"col-start":[{"col-start":J()}],"col-end":[{"col-end":J()}],"grid-rows":[{"grid-rows":ve()}],"row-start-end":[{row:we()}],"row-start":[{"row-start":J()}],"row-end":[{"row-end":J()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":xe()}],"auto-rows":[{"auto-rows":xe()}],gap:[{gap:h()}],"gap-x":[{"gap-x":h()}],"gap-y":[{"gap-y":h()}],"justify-content":[{justify:[...le(),"normal"]}],"justify-items":[{"justify-items":[...$(),"normal"]}],"justify-self":[{"justify-self":["auto",...$()]}],"align-content":[{content:["normal",...le()]}],"align-items":[{items:[...$(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...$(),{baseline:["","last"]}]}],"place-content":[{"place-content":le()}],"place-items":[{"place-items":[...$(),"baseline"]}],"place-self":[{"place-self":["auto",...$()]}],p:[{p:h()}],px:[{px:h()}],py:[{py:h()}],ps:[{ps:h()}],pe:[{pe:h()}],pbs:[{pbs:h()}],pbe:[{pbe:h()}],pt:[{pt:h()}],pr:[{pr:h()}],pb:[{pb:h()}],pl:[{pl:h()}],m:[{m:z()}],mx:[{mx:z()}],my:[{my:z()}],ms:[{ms:z()}],me:[{me:z()}],mbs:[{mbs:z()}],mbe:[{mbe:z()}],mt:[{mt:z()}],mr:[{mr:z()}],mb:[{mb:z()}],ml:[{ml:z()}],"space-x":[{"space-x":h()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":h()}],"space-y-reverse":["space-y-reverse"],size:[{size:D()}],"inline-size":[{inline:["auto",...ce()]}],"min-inline-size":[{"min-inline":["auto",...ce()]}],"max-inline-size":[{"max-inline":["none",...ce()]}],"block-size":[{block:["auto",...de()]}],"min-block-size":[{"min-block":["auto",...de()]}],"max-block-size":[{"max-block":["none",...de()]}],w:[{w:[p,"screen",...D()]}],"min-w":[{"min-w":[p,"screen","none",...D()]}],"max-w":[{"max-w":[p,"screen","none","prose",{screen:[s]},...D()]}],h:[{h:["screen","lh",...D()]}],"min-h":[{"min-h":["screen","lh","none",...D()]}],"max-h":[{"max-h":["screen","lh",...D()]}],"font-size":[{text:["base",o,Q,G]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,fr,lr]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",me,d]}],"font-family":[{font:[ur,cr,t]}],"font-features":[{"font-features":[d]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[a,u,d]}],"line-clamp":[{"line-clamp":[v,"none",u,Me]}],leading:[{leading:[l,...h()]}],"list-image":[{"list-image":["none",u,d]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",u,d]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:g()}],"text-color":[{text:g()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...X(),"wavy"]}],"text-decoration-thickness":[{decoration:[v,"from-font","auto",u,G]}],"text-decoration-color":[{decoration:g()}],"underline-offset":[{"underline-offset":[v,"auto",u,d]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:h()}],"tab-size":[{tab:[M,u,d]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",u,d]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",u,d]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:ke()}],"bg-repeat":[{bg:Ce()}],"bg-size":[{bg:Se()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},M,u,d],radial:["",u,d],conic:[M,u,d]},mr,dr]}],"bg-color":[{bg:g()}],"gradient-from-pos":[{from:ue()}],"gradient-via-pos":[{via:ue()}],"gradient-to-pos":[{to:ue()}],"gradient-from":[{from:g()}],"gradient-via":[{via:g()}],"gradient-to":[{to:g()}],rounded:[{rounded:P()}],"rounded-s":[{"rounded-s":P()}],"rounded-e":[{"rounded-e":P()}],"rounded-t":[{"rounded-t":P()}],"rounded-r":[{"rounded-r":P()}],"rounded-b":[{"rounded-b":P()}],"rounded-l":[{"rounded-l":P()}],"rounded-ss":[{"rounded-ss":P()}],"rounded-se":[{"rounded-se":P()}],"rounded-ee":[{"rounded-ee":P()}],"rounded-es":[{"rounded-es":P()}],"rounded-tl":[{"rounded-tl":P()}],"rounded-tr":[{"rounded-tr":P()}],"rounded-br":[{"rounded-br":P()}],"rounded-bl":[{"rounded-bl":P()}],"border-w":[{border:R()}],"border-w-x":[{"border-x":R()}],"border-w-y":[{"border-y":R()}],"border-w-s":[{"border-s":R()}],"border-w-e":[{"border-e":R()}],"border-w-bs":[{"border-bs":R()}],"border-w-be":[{"border-be":R()}],"border-w-t":[{"border-t":R()}],"border-w-r":[{"border-r":R()}],"border-w-b":[{"border-b":R()}],"border-w-l":[{"border-l":R()}],"divide-x":[{"divide-x":R()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":R()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...X(),"hidden","none"]}],"divide-style":[{divide:[...X(),"hidden","none"]}],"border-color":[{border:g()}],"border-color-x":[{"border-x":g()}],"border-color-y":[{"border-y":g()}],"border-color-s":[{"border-s":g()}],"border-color-e":[{"border-e":g()}],"border-color-bs":[{"border-bs":g()}],"border-color-be":[{"border-be":g()}],"border-color-t":[{"border-t":g()}],"border-color-r":[{"border-r":g()}],"border-color-b":[{"border-b":g()}],"border-color-l":[{"border-l":g()}],"divide-color":[{divide:g()}],"outline-style":[{outline:[...X(),"none","hidden"]}],"outline-offset":[{"outline-offset":[v,u,d]}],"outline-w":[{outline:["",v,Q,G]}],"outline-color":[{outline:g()}],shadow:[{shadow:["","none",i,oe,re]}],"shadow-color":[{shadow:g()}],"inset-shadow":[{"inset-shadow":["none",m,oe,re]}],"inset-shadow-color":[{"inset-shadow":g()}],"ring-w":[{ring:R()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:g()}],"ring-offset-w":[{"ring-offset":[v,G]}],"ring-offset-color":[{"ring-offset":g()}],"inset-ring-w":[{"inset-ring":R()}],"inset-ring-color":[{"inset-ring":g()}],"text-shadow":[{"text-shadow":["none",y,oe,re]}],"text-shadow-color":[{"text-shadow":g()}],opacity:[{opacity:[v,u,d]}],"mix-blend":[{"mix-blend":[...Te(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Te()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[v]}],"mask-image-linear-from-pos":[{"mask-linear-from":k()}],"mask-image-linear-to-pos":[{"mask-linear-to":k()}],"mask-image-linear-from-color":[{"mask-linear-from":g()}],"mask-image-linear-to-color":[{"mask-linear-to":g()}],"mask-image-t-from-pos":[{"mask-t-from":k()}],"mask-image-t-to-pos":[{"mask-t-to":k()}],"mask-image-t-from-color":[{"mask-t-from":g()}],"mask-image-t-to-color":[{"mask-t-to":g()}],"mask-image-r-from-pos":[{"mask-r-from":k()}],"mask-image-r-to-pos":[{"mask-r-to":k()}],"mask-image-r-from-color":[{"mask-r-from":g()}],"mask-image-r-to-color":[{"mask-r-to":g()}],"mask-image-b-from-pos":[{"mask-b-from":k()}],"mask-image-b-to-pos":[{"mask-b-to":k()}],"mask-image-b-from-color":[{"mask-b-from":g()}],"mask-image-b-to-color":[{"mask-b-to":g()}],"mask-image-l-from-pos":[{"mask-l-from":k()}],"mask-image-l-to-pos":[{"mask-l-to":k()}],"mask-image-l-from-color":[{"mask-l-from":g()}],"mask-image-l-to-color":[{"mask-l-to":g()}],"mask-image-x-from-pos":[{"mask-x-from":k()}],"mask-image-x-to-pos":[{"mask-x-to":k()}],"mask-image-x-from-color":[{"mask-x-from":g()}],"mask-image-x-to-color":[{"mask-x-to":g()}],"mask-image-y-from-pos":[{"mask-y-from":k()}],"mask-image-y-to-pos":[{"mask-y-to":k()}],"mask-image-y-from-color":[{"mask-y-from":g()}],"mask-image-y-to-color":[{"mask-y-to":g()}],"mask-image-radial":[{"mask-radial":[u,d]}],"mask-image-radial-from-pos":[{"mask-radial-from":k()}],"mask-image-radial-to-pos":[{"mask-radial-to":k()}],"mask-image-radial-from-color":[{"mask-radial-from":g()}],"mask-image-radial-to-color":[{"mask-radial-to":g()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":W()}],"mask-image-conic-pos":[{"mask-conic":[v]}],"mask-image-conic-from-pos":[{"mask-conic-from":k()}],"mask-image-conic-to-pos":[{"mask-conic-to":k()}],"mask-image-conic-from-color":[{"mask-conic-from":g()}],"mask-image-conic-to-color":[{"mask-conic-to":g()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:ke()}],"mask-repeat":[{mask:Ce()}],"mask-size":[{mask:Se()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",u,d]}],filter:[{filter:["","none",u,d]}],blur:[{blur:Ee()}],brightness:[{brightness:[v,u,d]}],contrast:[{contrast:[v,u,d]}],"drop-shadow":[{"drop-shadow":["","none",x,oe,re]}],"drop-shadow-color":[{"drop-shadow":g()}],grayscale:[{grayscale:["",v,u,d]}],"hue-rotate":[{"hue-rotate":[v,u,d]}],invert:[{invert:["",v,u,d]}],saturate:[{saturate:[v,u,d]}],sepia:[{sepia:["",v,u,d]}],"backdrop-filter":[{"backdrop-filter":["","none",u,d]}],"backdrop-blur":[{"backdrop-blur":Ee()}],"backdrop-brightness":[{"backdrop-brightness":[v,u,d]}],"backdrop-contrast":[{"backdrop-contrast":[v,u,d]}],"backdrop-grayscale":[{"backdrop-grayscale":["",v,u,d]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[v,u,d]}],"backdrop-invert":[{"backdrop-invert":["",v,u,d]}],"backdrop-opacity":[{"backdrop-opacity":[v,u,d]}],"backdrop-saturate":[{"backdrop-saturate":[v,u,d]}],"backdrop-sepia":[{"backdrop-sepia":["",v,u,d]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":h()}],"border-spacing-x":[{"border-spacing-x":h()}],"border-spacing-y":[{"border-spacing-y":h()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",u,d]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[v,"initial",u,d]}],ease:[{ease:["linear","initial",_,u,d]}],delay:[{delay:[v,u,d]}],animate:[{animate:["none",j,u,d]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[S,u,d]}],"perspective-origin":[{"perspective-origin":V()}],rotate:[{rotate:Z()}],"rotate-x":[{"rotate-x":Z()}],"rotate-y":[{"rotate-y":Z()}],"rotate-z":[{"rotate-z":Z()}],scale:[{scale:ee()}],"scale-x":[{"scale-x":ee()}],"scale-y":[{"scale-y":ee()}],"scale-z":[{"scale-z":ee()}],"scale-3d":["scale-3d"],skew:[{skew:pe()}],"skew-x":[{"skew-x":pe()}],"skew-y":[{"skew-y":pe()}],transform:[{transform:[u,d,"","none","gpu","cpu"]}],"transform-origin":[{origin:V()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:te()}],"translate-x":[{"translate-x":te()}],"translate-y":[{"translate-y":te()}],"translate-z":[{"translate-z":te()}],"translate-none":["translate-none"],zoom:[{zoom:[M,u,d]}],accent:[{accent:g()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:g()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",u,d]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":g()}],"scrollbar-track-color":[{"scrollbar-track":g()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":h()}],"scroll-mx":[{"scroll-mx":h()}],"scroll-my":[{"scroll-my":h()}],"scroll-ms":[{"scroll-ms":h()}],"scroll-me":[{"scroll-me":h()}],"scroll-mbs":[{"scroll-mbs":h()}],"scroll-mbe":[{"scroll-mbe":h()}],"scroll-mt":[{"scroll-mt":h()}],"scroll-mr":[{"scroll-mr":h()}],"scroll-mb":[{"scroll-mb":h()}],"scroll-ml":[{"scroll-ml":h()}],"scroll-p":[{"scroll-p":h()}],"scroll-px":[{"scroll-px":h()}],"scroll-py":[{"scroll-py":h()}],"scroll-ps":[{"scroll-ps":h()}],"scroll-pe":[{"scroll-pe":h()}],"scroll-pbs":[{"scroll-pbs":h()}],"scroll-pbe":[{"scroll-pbe":h()}],"scroll-pt":[{"scroll-pt":h()}],"scroll-pr":[{"scroll-pr":h()}],"scroll-pb":[{"scroll-pb":h()}],"scroll-pl":[{"scroll-pl":h()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",u,d]}],fill:[{fill:["none",...g()]}],"stroke-w":[{stroke:[v,Q,G,Me]}],stroke:[{stroke:["none",...g()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},br=Yt(gr);function st(...e){return br(We(e))}const yr=Et("group/button inline-flex cursor-pointer shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-semibold whitespace-nowrap transition-[background-color,border-color,color,box-shadow,opacity,transform] duration-150 outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/25 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-45 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-sm shadow-primary/15 hover:bg-primary/90 hover:shadow-md hover:shadow-primary/20",outline:"border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:bg-transparent dark:hover:bg-input/30",secondary:"bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",ghost:"hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",destructive:"bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 gap-1.5 px-3 has-data-[icon=inline-end]:pr-2.5 has-data-[icon=inline-start]:pl-2.5",xs:"h-6 gap-1 px-2.5 text-xs has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2 [&_svg:not([class*='size-'])]:size-3",sm:"h-8 gap-1 px-3 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",lg:"h-10 gap-1.5 px-4 has-data-[icon=inline-end]:pr-3 has-data-[icon=inline-start]:pl-3",icon:"size-9","icon-xs":"size-6 [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-8","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}});function vr({className:e,variant:t="default",size:o="default",...n}){return f.jsx(dt,{"data-slot":"button","data-size":o,className:st(yr({variant:t,size:o,className:e})),...n})}var wr={outline:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},filled:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"currentColor",stroke:"none"}};const xr=(e,t,o,n)=>{const a=T.forwardRef(({color:l="currentColor",size:s=24,stroke:p=2,title:b,className:r,children:i,...m},y)=>T.createElement("svg",{ref:y,...wr[e],width:s,height:s,className:["tabler-icon",`tabler-icon-${t}`,r].join(" "),...e==="filled"?{fill:l}:{strokeWidth:p,stroke:l},...m},[b&&T.createElement("title",{key:"svg-title"},b),...n.map(([x,O])=>T.createElement(x,O)),...Array.isArray(i)?i:[i]]));return a.displayName=`${o}`,a};const kr=[["path",{d:"M7 9.667a2.667 2.667 0 0 1 2.667 -2.667h8.666a2.667 2.667 0 0 1 2.667 2.667v8.666a2.667 2.667 0 0 1 -2.667 2.667h-8.666a2.667 2.667 0 0 1 -2.667 -2.667l0 -8.666",key:"svg-0"}],["path",{d:"M4.012 16.737a2.005 2.005 0 0 1 -1.012 -1.737v-10c0 -1.1 .9 -2 2 -2h10c.75 0 1.158 .385 1.5 1",key:"svg-1"}]],Cr=xr("outline","copy","Copy",kr),Sr=new Set(["https:","http:","mailto:"]);function Tr(e){const t=e.startsWith("//")?`https:${e}`:e;let o;try{o=new URL(t)}catch{return null}return Sr.has(o.protocol)?o.toString():null}let Y=null;async function ao(){if(!navigator.clipboard?.readText)throw new Error("Text clipboard access is unavailable.");return navigator.clipboard.readText()}async function Er(e){if(!navigator.clipboard?.writeText)throw new Error("Text clipboard access is unavailable.");await navigator.clipboard.writeText(e),Y=null}async function lo(e,t){if(!navigator.clipboard?.writeText)throw new Error("Text clipboard access is unavailable.");await navigator.clipboard.writeText(e.join(`\r
3
- `)),Y=t?{paths:[...e],transferId:t}:null}function co(e){return!Y||!Pr(Y.paths,e)?(Y=null,null):Y.transferId}function uo(e){const t=Tr(e);if(!t)throw new Error("Only web or mail links can be opened.");window.open(t,"_blank","noopener,noreferrer")}function Pr(e,t){return e.length===t.length&&e.every((o,n)=>o===t[n])}const Rr=600;function po({delay:e=Rr,...t}){return f.jsx(ut,{"data-slot":"tooltip-provider",delay:e,...t})}function jr({...e}){return f.jsx(pt,{"data-slot":"tooltip",...e})}function Ar({...e}){return f.jsx(mt,{"data-slot":"tooltip-trigger",...e})}function Or({className:e,side:t="top",sideOffset:o=4,align:n="center",alignOffset:a=0,anchor:l,children:s,...p}){return f.jsx(ft,{children:f.jsx(ht,{align:n,alignOffset:a,anchor:l,side:t,sideOffset:o,className:"isolate z-50",children:f.jsxs(gt,{"data-slot":"tooltip-content",className:st("z-50 inline-flex w-fit max-w-xs origin-(--transform-origin) items-center gap-1.5 rounded-xl bg-foreground px-3 py-1.5 text-xs text-background has-data-[slot=kbd]:pr-1.5 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-lg data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),...p,children:[s,f.jsx(bt,{className:"z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground data-[side=bottom]:top-1 data-[side=inline-end]:top-1/2! data-[side=inline-end]:-left-1 data-[side=inline-end]:translate-x-[1.5px] data-[side=inline-end]:-translate-y-1/2 data-[side=inline-start]:top-1/2! data-[side=inline-start]:-right-1 data-[side=inline-start]:translate-x-[-1.5px] data-[side=inline-start]:-translate-y-1/2 data-[side=left]:top-1/2! data-[side=left]:-right-1 data-[side=left]:translate-x-[-1.5px] data-[side=left]:-translate-y-1/2 data-[side=right]:top-1/2! data-[side=right]:-left-1 data-[side=right]:translate-x-[1.5px] data-[side=right]:-translate-y-1/2 data-[side=top]:-bottom-2.5"})]})})})}function zr({value:e,label:t="Copy",onCopied:o,onError:n}){const[a,l]=T.useState(!1);T.useEffect(()=>{if(!a)return;const p=window.setTimeout(()=>l(!1),2e3);return()=>window.clearTimeout(p)},[a]);const s=async()=>{try{await Er(e),l(!0),o?.()}catch{l(!1),n?.()}};return f.jsxs(f.Fragment,{children:[f.jsxs(jr,{children:[f.jsxs(Ar,{render:f.jsx("button",{type:"button",className:"copy-button","aria-label":a?"Copied":t,"data-copy-state":a?"copied":void 0,onClick:()=>{s()}}),children:[f.jsx(Cr,{className:"copy-button-icon","aria-hidden":"true"}),f.jsx("span",{className:"copy-button-check","aria-hidden":"true",children:"✓"})]}),f.jsx(Or,{children:a?"Copied":t})]}),f.jsx("span",{className:"sr-only",role:"status","aria-live":"polite",children:a?"Copied":""})]})}const nt=document.documentElement.dataset.opentigProfile==="dev",mo=nt?"OpenTig Dev":"OpenTig";function Mr(){const e=nt?"npm run pair:web:dev":"opentig pair",[t,o]=T.useState(!1);return f.jsxs("div",{className:"mt-3",children:[f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx("code",{className:"min-w-0 select-text break-words text-sm",children:e}),f.jsx(zr,{value:e,label:"Copy command",onCopied:()=>o(!1),onError:()=>o(!0)})]}),t&&f.jsx("p",{className:"mt-2 text-sm text-destructive",role:"alert",children:"Could not copy. Select and copy the command manually."})]})}const Lr=3600*1e3,Ir=60*1e3,Nr=10*1e3;function Fr({request:e=fetch,page:t=document,lifecycle:o=window}={}){let n=!1,a=null,l,s;const p=()=>{n||(l=setTimeout(()=>{b()},Ir))},b=async()=>{if(n||a||t.visibilityState!=="visible")return;clearTimeout(l);const m=new AbortController;a=m,s=setTimeout(()=>m.abort(),Nr);try{const y=await e("/api/auth/renew",{method:"POST",credentials:"include",cache:"no-store",signal:m.signal});!y.ok&&y.status!==401&&y.status!==403&&p()}catch{p()}finally{clearTimeout(s),a=null}},r=()=>{b()},i=setInterval(r,Lr);return t.addEventListener("visibilitychange",r),o.addEventListener("focus",r),o.addEventListener("online",r),r(),()=>{n=!0,clearInterval(i),clearTimeout(l),clearTimeout(s),a?.abort(),t.removeEventListener("visibilitychange",r),o.removeEventListener("focus",r),o.removeEventListener("online",r)}}const c={bootstrap:"app:bootstrap",capabilities:"app:capabilities",preferences:"app:preferences",filesTreeStateUpdate:"app:files-tree-state",openFilesStateUpdate:"app:open-files-state",projectCreate:"projects:create",projectRename:"projects:rename",projectRemove:"projects:remove",projectAssign:"projects:assign",repositoryOpenPath:"repository:open-path",repositoryBrowseDirectories:"repository:browse-directories",repositoryOpenRecent:"repository:open-recent",repositoryRelocateRecent:"repository:relocate-recent",repositoryForget:"repository:forget",repositoryStatus:"repository:status",repositoryFiles:"repository:files",repositoryDirectoryEntries:"repository:directory-entries",repositoryReadFile:"repository:read-file",repositoryGetFavicon:"repository:favicon",repositoryWriteFile:"repository:write-file",repositoryAbsolutePath:"repository:absolute-path",repositoryCopyEntries:"repository:copy-entries",repositoryCutEntries:"repository:cut-entries",repositoryPasteEntries:"repository:paste-entries",repositoryMoveEntry:"repository:move-entry",repositoryDeleteEntry:"repository:delete-entry",repositoryMoveEntries:"repository:move-entries",repositoryDeleteEntries:"repository:delete-entries",repositoryRenameEntry:"repository:rename-entry",repositoryCreateEntry:"repository:create-entry",repositoryFileHistoryState:"repository:file-history-state",repositoryUndoFileOperation:"repository:undo-file-operation",repositoryRedoFileOperation:"repository:redo-file-operation",repositorySearch:"repository:search",repositoryReplaceSearch:"repository:replace-search",diffGet:"diff:get",diffCommit:"diff:commit",diffCommitFile:"diff:commit-file",indexStage:"index:stage",indexUnstage:"index:unstage",indexDiscard:"index:discard",indexStageAll:"index:stage-all",indexUnstageAll:"index:unstage-all",indexPrepareCommitGroup:"index:prepare-commit-group",indexUpdateConflict:"index:update-conflict",indexResolveConflict:"index:resolve-conflict",commitCreate:"commit:create",commitUndoLatest:"commit:undo-latest",commitsList:"commits:list",commitsFiles:"commits:files",branchesList:"refs:branches",branchSwitch:"refs:switch",worktreesList:"refs:worktrees",worktreeSelect:"refs:select-worktree",refsPull:"refs:pull",refsPush:"refs:push",refsFetch:"refs:fetch",localRefsSnapshot:"refs:local-snapshot",branchDetails:"refs:branch-details",worktreeDetails:"refs:worktree-details",branchDelete:"refs:delete-branch",worktreeRemove:"refs:remove-worktree",aiStatuses:"ai:statuses",aiGenerateCommitMessage:"ai:generate-commit-message",aiCancelGeneration:"ai:cancel-generation",aiLog:"ai:log",aiClearLog:"ai:clear-log",diagnosticsList:"diagnostics:list",diagnosticsClear:"diagnostics:clear",diagnosticsRecord:"diagnostics:record",githubStatus:"github:status",githubRepositoryInfo:"github:repository-info",githubPrForBranch:"github:pr-for-branch",githubPrList:"github:pr-list",githubPrView:"github:pr-view",githubPrDiff:"github:pr-diff",githubPrCommitDiff:"github:pr-commit-diff",githubPrCreate:"github:pr-create",githubPrDraft:"github:pr-draft",githubPrDraftCancel:"github:pr-draft-cancel"},_r=9*6e4,Dr=_r+3e4,Ne=Dr+3e4,Gr=1,qr={protocolVersion:Gr},Br=qr.protocolVersion,fe=1;class ae extends Error{}class H extends ae{}class Fe extends ae{}class he extends ae{}class _e extends ae{}class Wr{url;createSocket;requestTimeoutMs;heartbeatMs;reconnectBaseMs;reconnectMaxMs;offlineAfterAttempts;random;pending=new Map;connectionWaiters=new Set;stateListeners=new Set;eventListeners=new Set;reconnectListeners=new Set;socket=null;state="connecting";requestSequence=0;socketGeneration=0;reconnectAttempts=0;reconnectTimer=null;heartbeatTimer=null;awaitingPong=!1;started=!1;stopped=!1;connectedBefore=!1;constructor(t={}){this.url=t.url??Ur(),this.createSocket=t.createSocket??(o=>new WebSocket(o)),this.requestTimeoutMs=t.requestTimeoutMs??3e4,this.heartbeatMs=t.heartbeatMs??2e4,this.reconnectBaseMs=t.reconnectBaseMs??250,this.reconnectMaxMs=t.reconnectMaxMs??5e3,this.offlineAfterAttempts=t.offlineAfterAttempts??5,this.random=t.random??Math.random}getState=()=>this.state;subscribeState=t=>(this.stateListeners.add(t),this.start(),()=>this.stateListeners.delete(t));onEvent(t){return this.eventListeners.add(t),this.start(),()=>this.eventListeners.delete(t)}onReconnect(t){return this.reconnectListeners.add(t),()=>this.reconnectListeners.delete(t)}async request(t,o,n={}){const a=n.timeoutMs??this.requestTimeoutMs,l=Date.now();if(this.start(),await this.waitForConnection(a,n.signal),n.signal?.aborted)throw se();const s=this.socket;if(!s||s.readyState!==fe)throw new H("OpenTig server disconnected.");const p=`${Date.now().toString(36)}-${(++this.requestSequence).toString(36)}`,b=Math.max(1,a-(Date.now()-l));return new Promise((r,i)=>{const m={resolve:r,reject:i,timer:setTimeout(()=>{this.finishPending(p),i(new _e(`Server request timed out: ${String(t)}`))},b),...n.signal?{signal:n.signal}:{}};n.signal&&(m.abort=()=>{this.finishPending(p),i(se())},n.signal.addEventListener("abort",m.abort,{once:!0})),this.pending.set(p,m);try{const y=[...o];for(;y.length>0&&y.at(-1)===void 0;)y.pop();s.send(JSON.stringify({type:"request",id:p,command:t,args:y}))}catch{this.finishPending(p),i(new H("Could not send request to the OpenTig server."))}})}markIncompatible(){this.stopped=!0,this.clearReconnect(),this.setState("incompatible-version"),this.rejectConnectionWaiters(new he("OpenTig server protocol is incompatible.")),this.rejectPending(new he("OpenTig server protocol is incompatible.")),this.socket?.close(1e3,"Incompatible protocol")}close(){this.stopped=!0,this.clearReconnect(),this.clearHeartbeat(),this.rejectConnectionWaiters(new H("OpenTig server connection closed.")),this.rejectPending(new H("OpenTig server connection closed.")),this.socket?.close(1e3,"Client closing"),this.socket=null}start(){this.started||this.stopped||(this.started=!0,this.connect())}connect(){if(this.stopped)return;this.clearReconnect();const t=++this.socketGeneration;let o;try{o=this.createSocket(this.url)}catch{this.disconnected(t,0);return}this.socket=o,o.onopen=()=>{if(t!==this.socketGeneration||this.stopped)return;const n=this.connectedBefore;if(this.connectedBefore=!0,this.reconnectAttempts=0,this.setState("connected"),this.resolveConnectionWaiters(),this.startHeartbeat(),n)for(const a of this.reconnectListeners)Promise.resolve(a()).catch(()=>{})},o.onmessage=n=>this.message(t,n.data),o.onerror=()=>{},o.onclose=n=>this.disconnected(t,n.code)}message(t,o){if(t!==this.socketGeneration||typeof o!="string")return;let n;try{n=JSON.parse(o)}catch{return}if(n.type==="pong"){this.awaitingPong=!1;return}if(n.type==="event"){for(const l of this.eventListeners)l(n.event);return}if(n.type!=="result")return;const a=this.pending.get(n.id);a&&(this.finishPending(n.id),Vr(a,n.result))}disconnected(t,o){if(t!==this.socketGeneration||(this.socket=null,this.clearHeartbeat(),this.rejectPending(new H("OpenTig server disconnected before the request completed.")),this.stopped))return;if(o===1008){this.stopped=!0,this.setState("auth-required"),this.rejectConnectionWaiters(new Fe("Authentication required."));return}this.reconnectAttempts+=1,this.setState(this.reconnectAttempts>=this.offlineAfterAttempts?"offline":"reconnecting");const n=Math.min(this.reconnectMaxMs,this.reconnectBaseMs*2**(this.reconnectAttempts-1)),a=Math.max(0,Math.round(n*(.5+this.random())));this.reconnectTimer=setTimeout(()=>this.connect(),a)}waitForConnection(t,o){return this.state==="connected"&&this.socket?.readyState===fe?Promise.resolve():this.state==="auth-required"?Promise.reject(new Fe("Authentication required.")):this.state==="incompatible-version"?Promise.reject(new he("OpenTig server protocol is incompatible.")):this.stopped?Promise.reject(new H("OpenTig server connection is closed.")):o?.aborted?Promise.reject(se()):new Promise((n,a)=>{const l={resolve:n,reject:a,timer:setTimeout(()=>{this.removeConnectionWaiter(l),a(new _e("Timed out waiting for the OpenTig server."))},t),...o?{signal:o}:{}};o&&(l.abort=()=>{this.removeConnectionWaiter(l),a(se())},o.addEventListener("abort",l.abort,{once:!0})),this.connectionWaiters.add(l)})}resolveConnectionWaiters(){for(const t of[...this.connectionWaiters])this.removeConnectionWaiter(t),t.resolve()}rejectConnectionWaiters(t){for(const o of[...this.connectionWaiters])this.removeConnectionWaiter(o),o.reject(t)}removeConnectionWaiter(t){clearTimeout(t.timer),t.signal&&t.abort&&t.signal.removeEventListener("abort",t.abort),this.connectionWaiters.delete(t)}finishPending(t){const o=this.pending.get(t);o&&(clearTimeout(o.timer),o.signal&&o.abort&&o.signal.removeEventListener("abort",o.abort),this.pending.delete(t))}rejectPending(t){for(const[o,n]of[...this.pending])this.finishPending(o),n.reject(t)}startHeartbeat(){this.clearHeartbeat(),this.heartbeatTimer=setInterval(()=>{const t=this.socket;if(!(!t||t.readyState!==fe)){if(this.awaitingPong){t.close(4e3,"Heartbeat timeout");return}this.awaitingPong=!0,t.send(JSON.stringify({type:"ping"}))}},this.heartbeatMs)}clearHeartbeat(){this.heartbeatTimer&&clearInterval(this.heartbeatTimer),this.heartbeatTimer=null,this.awaitingPong=!1}clearReconnect(){this.reconnectTimer&&clearTimeout(this.reconnectTimer),this.reconnectTimer=null}setState(t){if(this.state!==t){this.state=t;for(const o of this.stateListeners)o()}}}function Vr(e,t){if(t.ok){e.resolve(t.value);return}const o=new Error(t.error.message);o.detail=t.error,e.reject(o)}function Ur(){const e=new URL("/ws",window.location.href);return e.protocol=e.protocol==="https:"?"wss:":"ws:",e.href}function se(){return new DOMException("The request was cancelled.","AbortError")}function $r(e={}){const t=e.transport??new Wr,o=e.httpOrigin??globalThis.location?.origin??"http://127.0.0.1",n=e.fetch??fetch,a=new Set,l=new Set,s=(r,...i)=>t.request(r,i),b={app:{bootstrap:async()=>{const r=await t.request(c.bootstrap,[]);if(!r.server||r.server.protocolVersion!==Br)throw t.markIncompatible(),new Error("This OpenTig client is incompatible with the server.");return r},capabilities:()=>s(c.capabilities),setPreferences:r=>s(c.preferences,r),setFilesTreeExpandedPaths:(r,i)=>s(c.filesTreeStateUpdate,r,i),setOpenFilesState:(r,i,m,y)=>s(c.openFilesStateUpdate,r,i,m,y)},projects:{create:r=>s(c.projectCreate,r),rename:(r,i)=>s(c.projectRename,r,i),remove:r=>s(c.projectRemove,r),assign:(r,i)=>s(c.projectAssign,r,i)},repository:{openPath:r=>s(c.repositoryOpenPath,r),browseDirectories:r=>r===void 0?s(c.repositoryBrowseDirectories):s(c.repositoryBrowseDirectories,r),openRecent:r=>s(c.repositoryOpenRecent,r),forget:r=>s(c.repositoryForget,r),relocateRecent:(r,i)=>s(c.repositoryRelocateRecent,r,i),getStatus:(r,i)=>s(c.repositoryStatus,r,i),getFiles:r=>s(c.repositoryFiles,r),getDirectoryEntries:(r,i)=>s(c.repositoryDirectoryEntries,r,i),readFile:(r,i,m)=>s(c.repositoryReadFile,r,i,m),readImage:(r,i)=>Yr(n,o,r,i),getFavicon:r=>s(c.repositoryGetFavicon,r),writeFile:(r,i,m,y)=>s(c.repositoryWriteFile,r,i,m,y),getAbsolutePath:(r,i)=>s(c.repositoryAbsolutePath,r,i),copyEntries:(r,i)=>s(c.repositoryCopyEntries,r,i),cutEntries:(r,i)=>s(c.repositoryCutEntries,r,i),pasteEntries:(r,i,m,y,x)=>s(c.repositoryPasteEntries,r,i,m,y,x),moveEntry:(r,i,m)=>s(c.repositoryMoveEntry,r,i,m),moveEntries:(r,i,m)=>s(c.repositoryMoveEntries,r,i,m),deleteEntry:(r,i)=>s(c.repositoryDeleteEntry,r,i),deleteEntries:(r,i)=>s(c.repositoryDeleteEntries,r,i),renameEntry:(r,i,m)=>s(c.repositoryRenameEntry,r,i,m),createEntry:(r,i,m,y)=>s(c.repositoryCreateEntry,r,i,m,y),search:(r,i)=>s(c.repositorySearch,r,i),replaceSearch:(r,i)=>s(c.repositoryReplaceSearch,r,i),fileHistoryState:r=>s(c.repositoryFileHistoryState,r),undoFileOperation:r=>s(c.repositoryUndoFileOperation,r),redoFileOperation:r=>s(c.repositoryRedoFileOperation,r)},diff:{get:r=>s(c.diffGet,r),getCommit:(r,i)=>s(c.diffCommit,r,i),getCommitFile:(r,i,m,y)=>s(c.diffCommitFile,r,i,m,y)},index:{stage:(r,i)=>s(c.indexStage,r,i),unstage:(r,i)=>s(c.indexUnstage,r,i),discard:(r,i)=>s(c.indexDiscard,r,i),stageAll:r=>s(c.indexStageAll,r),unstageAll:r=>s(c.indexUnstageAll,r),prepareCommitGroup:r=>s(c.indexPrepareCommitGroup,r),updateConflict:(r,i,m)=>s(c.indexUpdateConflict,r,i,m),resolveConflict:(r,i,m)=>s(c.indexResolveConflict,r,i,m)},commits:{create:(r,i)=>s(c.commitCreate,r,i),undoLatest:(r,i)=>s(c.commitUndoLatest,r,i),list:(r,i)=>s(c.commitsList,r,i),files:(r,i)=>s(c.commitsFiles,r,i)},refs:{listBranches:r=>s(c.branchesList,r),switchBranch:(r,i,m)=>s(c.branchSwitch,r,i,m),listWorktrees:r=>s(c.worktreesList,r),selectWorktree:(r,i)=>s(c.worktreeSelect,r,i),pull:r=>s(c.refsPull,r),push:r=>s(c.refsPush,r),fetch:r=>s(c.refsFetch,r),localRefsSnapshot:r=>s(c.localRefsSnapshot,r),branchDetails:r=>s(c.branchDetails,r),worktreeDetails:r=>s(c.worktreeDetails,r),deleteBranch:r=>s(c.branchDelete,r),removeWorktree:r=>s(c.worktreeRemove,r)},ai:{statuses:r=>s(c.aiStatuses,r),generateCommitMessage:r=>t.request(c.aiGenerateCommitMessage,[r],{timeoutMs:Ne}),cancelGeneration:r=>s(c.aiCancelGeneration,r),log:()=>s(c.aiLog),clearLog:()=>s(c.aiClearLog)},github:{status:r=>s(c.githubStatus,r),repositoryInfo:r=>s(c.githubRepositoryInfo,r),findPullRequestForBranch:(r,i)=>s(c.githubPrForBranch,r,i),listPullRequests:(r,i)=>s(c.githubPrList,r,i),getPullRequest:(r,i)=>s(c.githubPrView,r,i),getPullRequestDiff:(r,i)=>s(c.githubPrDiff,r,i),getPullRequestCommitDiff:(r,i)=>s(c.githubPrCommitDiff,r,i),createPullRequest:r=>s(c.githubPrCreate,r),generateDraft:r=>t.request(c.githubPrDraft,[r],{timeoutMs:Ne}),cancelDraft:r=>s(c.githubPrDraftCancel,r)},diagnostics:{list:()=>s(c.diagnosticsList),clear:()=>s(c.diagnosticsClear),record:r=>s(c.diagnosticsRecord,r)},events:{onRepositoryChanged:r=>De(a,r),onActiveRepositoryChanged:r=>De(l,r)}};return t.onEvent(r=>Hr(r,a,l)),t.onReconnect(async()=>{const r=await b.app.bootstrap();if(r.activeRepository){for(const i of l)i(r.activeRepository);for(const i of a)i(r.activeRepository.id,"unknown")}}),{api:b,transport:t}}function De(e,t){return e.add(t),()=>e.delete(t)}function Hr(e,t,o){if(e.type==="repository.changed")for(const n of t)n(e.repositoryId,e.scope);else for(const n of o)n(e.repository)}async function Yr(e,t,o,n){const a=n.split("/").map(encodeURIComponent).join("/"),l=new URL(`/api/image/${encodeURIComponent(o)}/${a}`,t),s=await e(l,{credentials:"include"});if(s.status===413||s.status===415)return s.json();if(!s.ok)throw new Error(s.status===401?"Authentication required.":"Could not load image preview.");const p=s.headers.get("content-type");if(!p?.startsWith("image/"))throw new Error("Server returned an invalid image preview.");const b=new Uint8Array(await s.arrayBuffer());return{status:"ready",path:n,mimeType:p,data:b,size:Number(s.headers.get("content-length")??b.byteLength),mtimeMs:Number(s.headers.get("x-opentig-mtime-ms")??0)}}const ne=$r(),C=window.opentigDesktop,q=ne.api,fo={...q,app:{...q.app,bootstrap:async()=>{const e=await q.app.bootstrap();return await C?.app.preferencesChanged(e.preferences),e},capabilities:async()=>{const e=await q.app.capabilities();return{...e,runtimeMode:C?"desktop":e.runtimeMode,nativePicker:!!C,fileClipboard:!!C,revealInFileManager:!!C}},setPreferences:async e=>{const t=await q.app.setPreferences(e);return await C?.app.preferencesChanged(t),t},setZoomFactor:e=>{C?C.app.setZoomFactor(e):document.documentElement.style.zoom=String(Math.max(.8,Math.min(1.3,Number(e)||1)))},setTitleBarTheme:e=>C?.app.setTitleBarTheme(e)??Promise.resolve()},clipboard:{readFilePaths:()=>C?.clipboard.readFilePaths()??Promise.resolve([]),readImagePng:()=>C?.clipboard.readImagePng()??Promise.resolve(null)},repository:{...q.repository,select:async e=>C?C.repository.select(e):window.prompt(e??"Repository path on the OpenTig server")?.trim()||null,selectRelocation:async(e,t)=>C?C.repository.selectRelocation(e,t):window.prompt(`New server path for ${e}`,t)?.trim()||null,revealEntry:async(e,t)=>{if(!C)throw new Error("Reveal in file manager is available only in the desktop app.");const o=await q.repository.getAbsolutePath(e,t);await C.repository.revealEntry(o)}}},Kr={connecting:"Connecting to OpenTig server…",connected:"Server connected",reconnecting:"Reconnecting to OpenTig server…","auth-required":"Authentication required","incompatible-version":"Client and server versions are incompatible",offline:"OpenTig server is offline"};function Qr({children:e}){const t=T.useSyncExternalStore(ne.transport.subscribeState,ne.transport.getState,ne.transport.getState),[o,n]=T.useState(!1);if(T.useEffect(()=>{if(t==="connected"&&!window.opentigDesktop)return Fr()},[t]),T.useEffect(()=>(t==="connected"&&n(!0),document.documentElement.dataset.serverConnection=t,()=>{delete document.documentElement.dataset.serverConnection}),[t]),t==="auth-required"){const a=!!window.opentigDesktop;return f.jsx("main",{className:"access-page flex min-h-dvh items-center justify-center bg-background px-4 py-6 text-foreground",children:f.jsxs("section",{className:"w-full max-w-md rounded-xl border border-border bg-card p-6 shadow-sm",role:"status",children:[f.jsx("h1",{className:"text-lg font-semibold",children:"Authentication required"}),f.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:a?"Restart OpenTig to restore its private desktop session.":f.jsx(f.Fragment,{children:"Generate a pairing code with the command below on the server, or from Settings → Network access in the desktop app."})}),!a&&f.jsxs(f.Fragment,{children:[f.jsx(Mr,{}),f.jsx(vr,{className:"mt-5",nativeButton:!1,render:f.jsx("a",{href:"/pair"}),children:"Pair this browser"})]})]})})}return!o&&(t==="offline"||t==="incompatible-version")?f.jsx(Tt,{heading:t==="offline"?"OpenTig server is offline":"OpenTig cannot continue",detail:t==="offline"?"See the server log for details, then restart OpenTig.":"Client and server versions are incompatible.",busy:!1}):f.jsxs(f.Fragment,{children:[e,o&&t!=="connected"&&f.jsxs("div",{className:`server-connection-state ${t}`,role:"status","aria-live":"polite",children:[f.jsx("span",{className:"server-connection-dot","aria-hidden":"true"}),Kr[t]]})]})}function Jr(e,t){return e===t?e:e==="unknown"||t==="unknown"?"unknown":e==="worktree"&&t==="index"||e==="index"&&t==="worktree"?"index":"unknown"}function ho(e,t){return{scope:Jr(e.scope,t.scope),background:e.background&&t.background,view:t.view}}function go(e,t){return t!=="diff"&&t!=="conflict"?!1:e==="worktree"||e==="index"||e==="unknown"}function bo(e){return e==="worktree"||e==="index"||e==="unknown"}function Xr(e,t){const o=e==="unknown";return{status:!0,branches:o||e==="refs"||e==="worktrees",worktrees:o||e==="worktrees",files:t==="files"&&(o||e==="worktree"||e==="index"),history:t==="history"&&(o||e==="refs")}}const Zr=new lt({defaultOptions:{queries:{networkMode:"always",retry:!1,refetchOnWindowFocus:!1,refetchOnReconnect:!1,staleTime:0},mutations:{networkMode:"always",retry:!1}}}),yo={repository:e=>["repository",e],status:e=>["repository",e,"status"],branches:e=>["repository",e,"branches"],worktrees:e=>["repository",e,"worktrees"],files:e=>["repository",e,"files"],fileHistory:e=>["repository",e,"file-history"],history:e=>["repository",e,"history"],githubInfo:e=>["repository",e,"github-info"],pulls:(e,t)=>["repository",e,"pulls",...t],pullRequest:(e,t)=>["repository",e,"pull-request",t],pullRequestDiff:(e,t)=>["repository",e,"pull-request-diff",t],pullRequestCommitDiff:(e,t)=>["repository",e,"pull-request-commit-diff",t],search:(e,t)=>["repository",e,"search",t],localRefs:e=>["repository",e,"local-refs"],branchDetails:(e,t)=>["repository",e,"branch-details",t],branchPullRequest:(e,t)=>["repository",e,"branch-pull-request",t],worktreeDetails:(e,t)=>["repository",e,"worktree-details",t]};function vo(e,t){const o=Xr(e,t);return["status","branches","worktrees","files","history"].filter(n=>o[n])}const eo=T.lazy(()=>qe(()=>import("./App-C7Yf3r-l.js").then(e=>e.a_),__vite__mapDeps([0,1,2,3]))),to=T.lazy(()=>qe(()=>import("./PairingPage-Cu1KraeJ.js"),__vite__mapDeps([4,1,2,3])));function ro(){const e=window.location.pathname==="/pair"?f.jsx(to,{}):f.jsx(Qr,{children:f.jsx(eo,{})});return f.jsxs(f.Fragment,{children:[f.jsx(Ct,{}),f.jsx(ct,{client:Zr,children:f.jsx(T.Suspense,{fallback:null,children:e})})]})}const it=document.getElementById("root");if(!it)throw new Error("Root container not found.");at.createRoot(it).render(f.jsx(T.StrictMode,{children:f.jsx(ro,{})}));export{vr as B,Cr as I,St as O,Mr as P,Tt as S,jr as T,qe as _,Ar as a,Or as b,xr as c,st as d,uo as e,mo as f,Et as g,go as h,bo as i,po as j,Xr as k,vo as l,ho as m,lo as n,fo as o,io as p,yo as q,ao as r,ne as s,co as t,Er as w};
3
+ `)),Y=t?{paths:[...e],transferId:t}:null}function co(e){return!Y||!Pr(Y.paths,e)?(Y=null,null):Y.transferId}function uo(e){const t=Tr(e);if(!t)throw new Error("Only web or mail links can be opened.");window.open(t,"_blank","noopener,noreferrer")}function Pr(e,t){return e.length===t.length&&e.every((o,n)=>o===t[n])}const Rr=600;function po({delay:e=Rr,...t}){return f.jsx(ut,{"data-slot":"tooltip-provider",delay:e,...t})}function jr({...e}){return f.jsx(pt,{"data-slot":"tooltip",...e})}function Ar({...e}){return f.jsx(mt,{"data-slot":"tooltip-trigger",...e})}function Or({className:e,side:t="top",sideOffset:o=4,align:n="center",alignOffset:a=0,anchor:l,children:s,...p}){return f.jsx(ft,{children:f.jsx(ht,{align:n,alignOffset:a,anchor:l,side:t,sideOffset:o,className:"isolate z-50",children:f.jsxs(gt,{"data-slot":"tooltip-content",className:st("z-50 inline-flex w-fit max-w-xs origin-(--transform-origin) items-center gap-1.5 rounded-xl bg-foreground px-3 py-1.5 text-xs text-background has-data-[slot=kbd]:pr-1.5 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-lg data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),...p,children:[s,f.jsx(bt,{className:"z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground data-[side=bottom]:top-1 data-[side=inline-end]:top-1/2! data-[side=inline-end]:-left-1 data-[side=inline-end]:translate-x-[1.5px] data-[side=inline-end]:-translate-y-1/2 data-[side=inline-start]:top-1/2! data-[side=inline-start]:-right-1 data-[side=inline-start]:translate-x-[-1.5px] data-[side=inline-start]:-translate-y-1/2 data-[side=left]:top-1/2! data-[side=left]:-right-1 data-[side=left]:translate-x-[-1.5px] data-[side=left]:-translate-y-1/2 data-[side=right]:top-1/2! data-[side=right]:-left-1 data-[side=right]:translate-x-[1.5px] data-[side=right]:-translate-y-1/2 data-[side=top]:-bottom-2.5"})]})})})}function zr({value:e,label:t="Copy",onCopied:o,onError:n}){const[a,l]=T.useState(!1);T.useEffect(()=>{if(!a)return;const p=window.setTimeout(()=>l(!1),2e3);return()=>window.clearTimeout(p)},[a]);const s=async()=>{try{await Er(e),l(!0),o?.()}catch{l(!1),n?.()}};return f.jsxs(f.Fragment,{children:[f.jsxs(jr,{children:[f.jsxs(Ar,{render:f.jsx("button",{type:"button",className:"copy-button","aria-label":a?"Copied":t,"data-copy-state":a?"copied":void 0,onClick:()=>{s()}}),children:[f.jsx(Cr,{className:"copy-button-icon","aria-hidden":"true"}),f.jsx("span",{className:"copy-button-check","aria-hidden":"true",children:"✓"})]}),f.jsx(Or,{children:a?"Copied":t})]}),f.jsx("span",{className:"sr-only",role:"status","aria-live":"polite",children:a?"Copied":""})]})}const nt=document.documentElement.dataset.opentigProfile==="dev",mo=nt?"OpenTig Dev":"OpenTig";function Mr(){const e=nt?"npm run pair:web:dev":"opentig pair",[t,o]=T.useState(!1);return f.jsxs("div",{className:"mt-3",children:[f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx("code",{className:"min-w-0 select-text break-words text-sm",children:e}),f.jsx(zr,{value:e,label:"Copy command",onCopied:()=>o(!1),onError:()=>o(!0)})]}),t&&f.jsx("p",{className:"mt-2 text-sm text-destructive",role:"alert",children:"Could not copy. Select and copy the command manually."})]})}const Lr=3600*1e3,Ir=60*1e3,Nr=10*1e3;function Fr({request:e=fetch,page:t=document,lifecycle:o=window}={}){let n=!1,a=null,l,s;const p=()=>{n||(l=setTimeout(()=>{b()},Ir))},b=async()=>{if(n||a||t.visibilityState!=="visible")return;clearTimeout(l);const m=new AbortController;a=m,s=setTimeout(()=>m.abort(),Nr);try{const y=await e("/api/auth/renew",{method:"POST",credentials:"include",cache:"no-store",signal:m.signal});!y.ok&&y.status!==401&&y.status!==403&&p()}catch{p()}finally{clearTimeout(s),a=null}},r=()=>{b()},i=setInterval(r,Lr);return t.addEventListener("visibilitychange",r),o.addEventListener("focus",r),o.addEventListener("online",r),r(),()=>{n=!0,clearInterval(i),clearTimeout(l),clearTimeout(s),a?.abort(),t.removeEventListener("visibilitychange",r),o.removeEventListener("focus",r),o.removeEventListener("online",r)}}const c={bootstrap:"app:bootstrap",capabilities:"app:capabilities",preferences:"app:preferences",filesTreeStateUpdate:"app:files-tree-state",openFilesStateUpdate:"app:open-files-state",projectCreate:"projects:create",projectRename:"projects:rename",projectRemove:"projects:remove",projectAssign:"projects:assign",repositoryOpenPath:"repository:open-path",repositoryBrowseDirectories:"repository:browse-directories",repositoryOpenRecent:"repository:open-recent",repositoryRelocateRecent:"repository:relocate-recent",repositoryForget:"repository:forget",repositoryStatus:"repository:status",repositoryFiles:"repository:files",repositoryDirectoryEntries:"repository:directory-entries",repositoryReadFile:"repository:read-file",repositoryGetFavicon:"repository:favicon",repositoryWriteFile:"repository:write-file",repositoryAbsolutePath:"repository:absolute-path",repositoryCopyEntries:"repository:copy-entries",repositoryCutEntries:"repository:cut-entries",repositoryPasteEntries:"repository:paste-entries",repositoryMoveEntry:"repository:move-entry",repositoryDeleteEntry:"repository:delete-entry",repositoryMoveEntries:"repository:move-entries",repositoryDeleteEntries:"repository:delete-entries",repositoryRenameEntry:"repository:rename-entry",repositoryCreateEntry:"repository:create-entry",repositoryFileHistoryState:"repository:file-history-state",repositoryUndoFileOperation:"repository:undo-file-operation",repositoryRedoFileOperation:"repository:redo-file-operation",repositorySearch:"repository:search",repositoryReplaceSearch:"repository:replace-search",diffGet:"diff:get",diffCommit:"diff:commit",diffCommitFile:"diff:commit-file",indexStage:"index:stage",indexUnstage:"index:unstage",indexDiscard:"index:discard",indexStageAll:"index:stage-all",indexUnstageAll:"index:unstage-all",indexPrepareCommitGroup:"index:prepare-commit-group",indexUpdateConflict:"index:update-conflict",indexResolveConflict:"index:resolve-conflict",commitCreate:"commit:create",commitUndoLatest:"commit:undo-latest",commitsList:"commits:list",commitsFiles:"commits:files",branchesList:"refs:branches",branchSwitch:"refs:switch",worktreesList:"refs:worktrees",worktreeSelect:"refs:select-worktree",refsPull:"refs:pull",refsPush:"refs:push",refsFetch:"refs:fetch",localRefsSnapshot:"refs:local-snapshot",branchDetails:"refs:branch-details",worktreeDetails:"refs:worktree-details",branchDelete:"refs:delete-branch",worktreeRemove:"refs:remove-worktree",aiStatuses:"ai:statuses",aiGenerateCommitMessage:"ai:generate-commit-message",aiCancelGeneration:"ai:cancel-generation",aiLog:"ai:log",aiClearLog:"ai:clear-log",diagnosticsList:"diagnostics:list",diagnosticsClear:"diagnostics:clear",diagnosticsRecord:"diagnostics:record",githubStatus:"github:status",githubRepositoryInfo:"github:repository-info",githubPrForBranch:"github:pr-for-branch",githubPrList:"github:pr-list",githubPrView:"github:pr-view",githubPrDiff:"github:pr-diff",githubPrCommitDiff:"github:pr-commit-diff",githubPrCreate:"github:pr-create",githubPrDraft:"github:pr-draft",githubPrDraftCancel:"github:pr-draft-cancel"},_r=9*6e4,Dr=_r+3e4,Ne=Dr+3e4,Gr=1,qr={protocolVersion:Gr},Br=qr.protocolVersion,fe=1;class ae extends Error{}class H extends ae{}class Fe extends ae{}class he extends ae{}class _e extends ae{}class Wr{url;createSocket;requestTimeoutMs;heartbeatMs;reconnectBaseMs;reconnectMaxMs;offlineAfterAttempts;random;pending=new Map;connectionWaiters=new Set;stateListeners=new Set;eventListeners=new Set;reconnectListeners=new Set;socket=null;state="connecting";requestSequence=0;socketGeneration=0;reconnectAttempts=0;reconnectTimer=null;heartbeatTimer=null;awaitingPong=!1;started=!1;stopped=!1;connectedBefore=!1;constructor(t={}){this.url=t.url??Ur(),this.createSocket=t.createSocket??(o=>new WebSocket(o)),this.requestTimeoutMs=t.requestTimeoutMs??3e4,this.heartbeatMs=t.heartbeatMs??2e4,this.reconnectBaseMs=t.reconnectBaseMs??250,this.reconnectMaxMs=t.reconnectMaxMs??5e3,this.offlineAfterAttempts=t.offlineAfterAttempts??5,this.random=t.random??Math.random}getState=()=>this.state;subscribeState=t=>(this.stateListeners.add(t),this.start(),()=>this.stateListeners.delete(t));onEvent(t){return this.eventListeners.add(t),this.start(),()=>this.eventListeners.delete(t)}onReconnect(t){return this.reconnectListeners.add(t),()=>this.reconnectListeners.delete(t)}async request(t,o,n={}){const a=n.timeoutMs??this.requestTimeoutMs,l=Date.now();if(this.start(),await this.waitForConnection(a,n.signal),n.signal?.aborted)throw se();const s=this.socket;if(!s||s.readyState!==fe)throw new H("OpenTig server disconnected.");const p=`${Date.now().toString(36)}-${(++this.requestSequence).toString(36)}`,b=Math.max(1,a-(Date.now()-l));return new Promise((r,i)=>{const m={resolve:r,reject:i,timer:setTimeout(()=>{this.finishPending(p),i(new _e(`Server request timed out: ${String(t)}`))},b),...n.signal?{signal:n.signal}:{}};n.signal&&(m.abort=()=>{this.finishPending(p),i(se())},n.signal.addEventListener("abort",m.abort,{once:!0})),this.pending.set(p,m);try{const y=[...o];for(;y.length>0&&y.at(-1)===void 0;)y.pop();s.send(JSON.stringify({type:"request",id:p,command:t,args:y}))}catch{this.finishPending(p),i(new H("Could not send request to the OpenTig server."))}})}markIncompatible(){this.stopped=!0,this.clearReconnect(),this.setState("incompatible-version"),this.rejectConnectionWaiters(new he("OpenTig server protocol is incompatible.")),this.rejectPending(new he("OpenTig server protocol is incompatible.")),this.socket?.close(1e3,"Incompatible protocol")}close(){this.stopped=!0,this.clearReconnect(),this.clearHeartbeat(),this.rejectConnectionWaiters(new H("OpenTig server connection closed.")),this.rejectPending(new H("OpenTig server connection closed.")),this.socket?.close(1e3,"Client closing"),this.socket=null}start(){this.started||this.stopped||(this.started=!0,this.connect())}connect(){if(this.stopped)return;this.clearReconnect();const t=++this.socketGeneration;let o;try{o=this.createSocket(this.url)}catch{this.disconnected(t,0);return}this.socket=o,o.onopen=()=>{if(t!==this.socketGeneration||this.stopped)return;const n=this.connectedBefore;if(this.connectedBefore=!0,this.reconnectAttempts=0,this.setState("connected"),this.resolveConnectionWaiters(),this.startHeartbeat(),n)for(const a of this.reconnectListeners)Promise.resolve(a()).catch(()=>{})},o.onmessage=n=>this.message(t,n.data),o.onerror=()=>{},o.onclose=n=>this.disconnected(t,n.code)}message(t,o){if(t!==this.socketGeneration||typeof o!="string")return;let n;try{n=JSON.parse(o)}catch{return}if(n.type==="pong"){this.awaitingPong=!1;return}if(n.type==="event"){for(const l of this.eventListeners)l(n.event);return}if(n.type!=="result")return;const a=this.pending.get(n.id);a&&(this.finishPending(n.id),Vr(a,n.result))}disconnected(t,o){if(t!==this.socketGeneration||(this.socket=null,this.clearHeartbeat(),this.rejectPending(new H("OpenTig server disconnected before the request completed.")),this.stopped))return;if(o===1008){this.stopped=!0,this.setState("auth-required"),this.rejectConnectionWaiters(new Fe("Authentication required."));return}this.reconnectAttempts+=1,this.setState(this.reconnectAttempts>=this.offlineAfterAttempts?"offline":"reconnecting");const n=Math.min(this.reconnectMaxMs,this.reconnectBaseMs*2**(this.reconnectAttempts-1)),a=Math.max(0,Math.round(n*(.5+this.random())));this.reconnectTimer=setTimeout(()=>this.connect(),a)}waitForConnection(t,o){return this.state==="connected"&&this.socket?.readyState===fe?Promise.resolve():this.state==="auth-required"?Promise.reject(new Fe("Authentication required.")):this.state==="incompatible-version"?Promise.reject(new he("OpenTig server protocol is incompatible.")):this.stopped?Promise.reject(new H("OpenTig server connection is closed.")):o?.aborted?Promise.reject(se()):new Promise((n,a)=>{const l={resolve:n,reject:a,timer:setTimeout(()=>{this.removeConnectionWaiter(l),a(new _e("Timed out waiting for the OpenTig server."))},t),...o?{signal:o}:{}};o&&(l.abort=()=>{this.removeConnectionWaiter(l),a(se())},o.addEventListener("abort",l.abort,{once:!0})),this.connectionWaiters.add(l)})}resolveConnectionWaiters(){for(const t of[...this.connectionWaiters])this.removeConnectionWaiter(t),t.resolve()}rejectConnectionWaiters(t){for(const o of[...this.connectionWaiters])this.removeConnectionWaiter(o),o.reject(t)}removeConnectionWaiter(t){clearTimeout(t.timer),t.signal&&t.abort&&t.signal.removeEventListener("abort",t.abort),this.connectionWaiters.delete(t)}finishPending(t){const o=this.pending.get(t);o&&(clearTimeout(o.timer),o.signal&&o.abort&&o.signal.removeEventListener("abort",o.abort),this.pending.delete(t))}rejectPending(t){for(const[o,n]of[...this.pending])this.finishPending(o),n.reject(t)}startHeartbeat(){this.clearHeartbeat(),this.heartbeatTimer=setInterval(()=>{const t=this.socket;if(!(!t||t.readyState!==fe)){if(this.awaitingPong){t.close(4e3,"Heartbeat timeout");return}this.awaitingPong=!0,t.send(JSON.stringify({type:"ping"}))}},this.heartbeatMs)}clearHeartbeat(){this.heartbeatTimer&&clearInterval(this.heartbeatTimer),this.heartbeatTimer=null,this.awaitingPong=!1}clearReconnect(){this.reconnectTimer&&clearTimeout(this.reconnectTimer),this.reconnectTimer=null}setState(t){if(this.state!==t){this.state=t;for(const o of this.stateListeners)o()}}}function Vr(e,t){if(t.ok){e.resolve(t.value);return}const o=new Error(t.error.message);o.detail=t.error,e.reject(o)}function Ur(){const e=new URL("/ws",window.location.href);return e.protocol=e.protocol==="https:"?"wss:":"ws:",e.href}function se(){return new DOMException("The request was cancelled.","AbortError")}function $r(e={}){const t=e.transport??new Wr,o=e.httpOrigin??globalThis.location?.origin??"http://127.0.0.1",n=e.fetch??fetch,a=new Set,l=new Set,s=(r,...i)=>t.request(r,i),b={app:{bootstrap:async()=>{const r=await t.request(c.bootstrap,[]);if(!r.server||r.server.protocolVersion!==Br)throw t.markIncompatible(),new Error("This OpenTig client is incompatible with the server.");return r},capabilities:()=>s(c.capabilities),setPreferences:r=>s(c.preferences,r),setFilesTreeExpandedPaths:(r,i)=>s(c.filesTreeStateUpdate,r,i),setOpenFilesState:(r,i,m,y)=>s(c.openFilesStateUpdate,r,i,m,y)},projects:{create:r=>s(c.projectCreate,r),rename:(r,i)=>s(c.projectRename,r,i),remove:r=>s(c.projectRemove,r),assign:(r,i)=>s(c.projectAssign,r,i)},repository:{openPath:r=>s(c.repositoryOpenPath,r),browseDirectories:r=>r===void 0?s(c.repositoryBrowseDirectories):s(c.repositoryBrowseDirectories,r),openRecent:r=>s(c.repositoryOpenRecent,r),forget:r=>s(c.repositoryForget,r),relocateRecent:(r,i)=>s(c.repositoryRelocateRecent,r,i),getStatus:(r,i)=>s(c.repositoryStatus,r,i),getFiles:r=>s(c.repositoryFiles,r),getDirectoryEntries:(r,i)=>s(c.repositoryDirectoryEntries,r,i),readFile:(r,i,m)=>s(c.repositoryReadFile,r,i,m),readImage:(r,i)=>Yr(n,o,r,i),getFavicon:r=>s(c.repositoryGetFavicon,r),writeFile:(r,i,m,y)=>s(c.repositoryWriteFile,r,i,m,y),getAbsolutePath:(r,i)=>s(c.repositoryAbsolutePath,r,i),copyEntries:(r,i)=>s(c.repositoryCopyEntries,r,i),cutEntries:(r,i)=>s(c.repositoryCutEntries,r,i),pasteEntries:(r,i,m,y,x)=>s(c.repositoryPasteEntries,r,i,m,y,x),moveEntry:(r,i,m)=>s(c.repositoryMoveEntry,r,i,m),moveEntries:(r,i,m)=>s(c.repositoryMoveEntries,r,i,m),deleteEntry:(r,i)=>s(c.repositoryDeleteEntry,r,i),deleteEntries:(r,i)=>s(c.repositoryDeleteEntries,r,i),renameEntry:(r,i,m)=>s(c.repositoryRenameEntry,r,i,m),createEntry:(r,i,m,y)=>s(c.repositoryCreateEntry,r,i,m,y),search:(r,i)=>s(c.repositorySearch,r,i),replaceSearch:(r,i)=>s(c.repositoryReplaceSearch,r,i),fileHistoryState:r=>s(c.repositoryFileHistoryState,r),undoFileOperation:r=>s(c.repositoryUndoFileOperation,r),redoFileOperation:r=>s(c.repositoryRedoFileOperation,r)},diff:{get:r=>s(c.diffGet,r),getCommit:(r,i)=>s(c.diffCommit,r,i),getCommitFile:(r,i,m,y)=>s(c.diffCommitFile,r,i,m,y)},index:{stage:(r,i)=>s(c.indexStage,r,i),unstage:(r,i)=>s(c.indexUnstage,r,i),discard:(r,i)=>s(c.indexDiscard,r,i),stageAll:r=>s(c.indexStageAll,r),unstageAll:r=>s(c.indexUnstageAll,r),prepareCommitGroup:r=>s(c.indexPrepareCommitGroup,r),updateConflict:(r,i,m)=>s(c.indexUpdateConflict,r,i,m),resolveConflict:(r,i,m)=>s(c.indexResolveConflict,r,i,m)},commits:{create:(r,i)=>s(c.commitCreate,r,i),undoLatest:(r,i)=>s(c.commitUndoLatest,r,i),list:(r,i)=>s(c.commitsList,r,i),files:(r,i)=>s(c.commitsFiles,r,i)},refs:{listBranches:r=>s(c.branchesList,r),switchBranch:(r,i,m)=>s(c.branchSwitch,r,i,m),listWorktrees:r=>s(c.worktreesList,r),selectWorktree:(r,i)=>s(c.worktreeSelect,r,i),pull:r=>s(c.refsPull,r),push:r=>s(c.refsPush,r),fetch:r=>s(c.refsFetch,r),localRefsSnapshot:r=>s(c.localRefsSnapshot,r),branchDetails:r=>s(c.branchDetails,r),worktreeDetails:r=>s(c.worktreeDetails,r),deleteBranch:r=>s(c.branchDelete,r),removeWorktree:r=>s(c.worktreeRemove,r)},ai:{statuses:r=>s(c.aiStatuses,r),generateCommitMessage:r=>t.request(c.aiGenerateCommitMessage,[r],{timeoutMs:Ne}),cancelGeneration:r=>s(c.aiCancelGeneration,r),log:()=>s(c.aiLog),clearLog:()=>s(c.aiClearLog)},github:{status:r=>s(c.githubStatus,r),repositoryInfo:r=>s(c.githubRepositoryInfo,r),findPullRequestForBranch:(r,i)=>s(c.githubPrForBranch,r,i),listPullRequests:(r,i)=>s(c.githubPrList,r,i),getPullRequest:(r,i)=>s(c.githubPrView,r,i),getPullRequestDiff:(r,i)=>s(c.githubPrDiff,r,i),getPullRequestCommitDiff:(r,i)=>s(c.githubPrCommitDiff,r,i),createPullRequest:r=>s(c.githubPrCreate,r),generateDraft:r=>t.request(c.githubPrDraft,[r],{timeoutMs:Ne}),cancelDraft:r=>s(c.githubPrDraftCancel,r)},diagnostics:{list:()=>s(c.diagnosticsList),clear:()=>s(c.diagnosticsClear),record:r=>s(c.diagnosticsRecord,r)},events:{onRepositoryChanged:r=>De(a,r),onActiveRepositoryChanged:r=>De(l,r)}};return t.onEvent(r=>Hr(r,a,l)),t.onReconnect(async()=>{const r=await b.app.bootstrap();if(r.activeRepository){for(const i of l)i(r.activeRepository);for(const i of a)i(r.activeRepository.id,"unknown")}}),{api:b,transport:t}}function De(e,t){return e.add(t),()=>e.delete(t)}function Hr(e,t,o){if(e.type==="repository.changed")for(const n of t)n(e.repositoryId,e.scope);else for(const n of o)n(e.repository)}async function Yr(e,t,o,n){const a=n.split("/").map(encodeURIComponent).join("/"),l=new URL(`/api/image/${encodeURIComponent(o)}/${a}`,t),s=await e(l,{credentials:"include"});if(s.status===413||s.status===415)return s.json();if(!s.ok)throw new Error(s.status===401?"Authentication required.":"Could not load image preview.");const p=s.headers.get("content-type");if(!p?.startsWith("image/"))throw new Error("Server returned an invalid image preview.");const b=new Uint8Array(await s.arrayBuffer());return{status:"ready",path:n,mimeType:p,data:b,size:Number(s.headers.get("content-length")??b.byteLength),mtimeMs:Number(s.headers.get("x-opentig-mtime-ms")??0)}}const ne=$r(),C=window.opentigDesktop,q=ne.api,fo={...q,app:{...q.app,bootstrap:async()=>{const e=await q.app.bootstrap();return await C?.app.preferencesChanged(e.preferences),e},capabilities:async()=>{const e=await q.app.capabilities();return{...e,runtimeMode:C?"desktop":e.runtimeMode,nativePicker:!!C,fileClipboard:!!C,revealInFileManager:!!C}},setPreferences:async e=>{const t=await q.app.setPreferences(e);return await C?.app.preferencesChanged(t),t},setZoomFactor:e=>{C?C.app.setZoomFactor(e):document.documentElement.style.zoom=String(Math.max(.8,Math.min(1.3,Number(e)||1)))},setTitleBarTheme:e=>C?.app.setTitleBarTheme(e)??Promise.resolve()},clipboard:{readFilePaths:()=>C?.clipboard.readFilePaths()??Promise.resolve([]),readImagePng:()=>C?.clipboard.readImagePng()??Promise.resolve(null)},repository:{...q.repository,select:async e=>C?C.repository.select(e):window.prompt(e??"Repository path on the OpenTig server")?.trim()||null,selectRelocation:async(e,t)=>C?C.repository.selectRelocation(e,t):window.prompt(`New server path for ${e}`,t)?.trim()||null,revealEntry:async(e,t)=>{if(!C)throw new Error("Reveal in file manager is available only in the desktop app.");const o=await q.repository.getAbsolutePath(e,t);await C.repository.revealEntry(o)}}},Kr={connecting:"Connecting to OpenTig server…",connected:"Server connected",reconnecting:"Reconnecting to OpenTig server…","auth-required":"Authentication required","incompatible-version":"Client and server versions are incompatible",offline:"OpenTig server is offline"};function Qr({children:e}){const t=T.useSyncExternalStore(ne.transport.subscribeState,ne.transport.getState,ne.transport.getState),[o,n]=T.useState(!1);if(T.useEffect(()=>{if(t==="connected"&&!window.opentigDesktop)return Fr()},[t]),T.useEffect(()=>(t==="connected"&&n(!0),document.documentElement.dataset.serverConnection=t,()=>{delete document.documentElement.dataset.serverConnection}),[t]),t==="auth-required"){const a=!!window.opentigDesktop;return f.jsx("main",{className:"access-page flex min-h-dvh items-center justify-center bg-background px-4 py-6 text-foreground",children:f.jsxs("section",{className:"w-full max-w-md rounded-xl border border-border bg-card p-6 shadow-sm",role:"status",children:[f.jsx("h1",{className:"text-lg font-semibold",children:"Authentication required"}),f.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:a?"Restart OpenTig to restore its private desktop session.":f.jsx(f.Fragment,{children:"Generate a pairing code with the command below on the server, or from Settings → Network access in the desktop app."})}),!a&&f.jsxs(f.Fragment,{children:[f.jsx(Mr,{}),f.jsx(vr,{className:"mt-5",nativeButton:!1,render:f.jsx("a",{href:"/pair"}),children:"Pair this browser"})]})]})})}return!o&&(t==="offline"||t==="incompatible-version")?f.jsx(Tt,{heading:t==="offline"?"OpenTig server is offline":"OpenTig cannot continue",detail:t==="offline"?"See the server log for details, then restart OpenTig.":"Client and server versions are incompatible.",busy:!1}):f.jsxs(f.Fragment,{children:[e,o&&t!=="connected"&&f.jsxs("div",{className:`server-connection-state ${t}`,role:"status","aria-live":"polite",children:[f.jsx("span",{className:"server-connection-dot","aria-hidden":"true"}),Kr[t]]})]})}function Jr(e,t){return e===t?e:e==="unknown"||t==="unknown"?"unknown":e==="worktree"&&t==="index"||e==="index"&&t==="worktree"?"index":"unknown"}function ho(e,t){return{scope:Jr(e.scope,t.scope),background:e.background&&t.background,view:t.view}}function go(e,t){return t!=="diff"&&t!=="conflict"?!1:e==="worktree"||e==="index"||e==="unknown"}function bo(e){return e==="worktree"||e==="index"||e==="unknown"}function Xr(e,t){const o=e==="unknown";return{status:!0,branches:o||e==="refs"||e==="worktrees",worktrees:o||e==="worktrees",files:t==="files"&&(o||e==="worktree"||e==="index"),history:t==="history"&&(o||e==="refs")}}const Zr=new lt({defaultOptions:{queries:{networkMode:"always",retry:!1,refetchOnWindowFocus:!1,refetchOnReconnect:!1,staleTime:0},mutations:{networkMode:"always",retry:!1}}}),yo={repository:e=>["repository",e],status:e=>["repository",e,"status"],branches:e=>["repository",e,"branches"],worktrees:e=>["repository",e,"worktrees"],files:e=>["repository",e,"files"],fileHistory:e=>["repository",e,"file-history"],history:e=>["repository",e,"history"],githubInfo:e=>["repository",e,"github-info"],pulls:(e,t)=>["repository",e,"pulls",...t],pullRequest:(e,t)=>["repository",e,"pull-request",t],pullRequestDiff:(e,t)=>["repository",e,"pull-request-diff",t],pullRequestCommitDiff:(e,t)=>["repository",e,"pull-request-commit-diff",t],search:(e,t)=>["repository",e,"search",t],localRefs:e=>["repository",e,"local-refs"],branchDetails:(e,t)=>["repository",e,"branch-details",t],branchPullRequest:(e,t)=>["repository",e,"branch-pull-request",t],worktreeDetails:(e,t)=>["repository",e,"worktree-details",t]};function vo(e,t){const o=Xr(e,t);return["status","branches","worktrees","files","history"].filter(n=>o[n])}const eo=T.lazy(()=>qe(()=>import("./App-CeDVj5Hh.js").then(e=>e.a_),__vite__mapDeps([0,1,2,3]))),to=T.lazy(()=>qe(()=>import("./PairingPage-C5Ggk-Z_.js"),__vite__mapDeps([4,1,2,3])));function ro(){const e=window.location.pathname==="/pair"?f.jsx(to,{}):f.jsx(Qr,{children:f.jsx(eo,{})});return f.jsxs(f.Fragment,{children:[f.jsx(Ct,{}),f.jsx(ct,{client:Zr,children:f.jsx(T.Suspense,{fallback:null,children:e})})]})}const it=document.getElementById("root");if(!it)throw new Error("Root container not found.");at.createRoot(it).render(f.jsx(T.StrictMode,{children:f.jsx(ro,{})}));export{vr as B,Cr as I,St as O,Mr as P,Tt as S,jr as T,qe as _,Ar as a,Or as b,xr as c,st as d,uo as e,mo as f,Et as g,go as h,bo as i,po as j,Xr as k,vo as l,ho as m,lo as n,fo as o,io as p,yo as q,ao as r,ne as s,co as t,Er as w};