@cline/cli-linux-arm64 3.0.60-nightly.1788265276 → 3.0.61

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 (113) hide show
  1. package/bin/cline +0 -0
  2. package/cline-hub/webview/assets/Chat-nhlJdFjI.js +342 -0
  3. package/cline-hub/webview/assets/abnfDiagram-N423BO3Z-CA3n4CVB.js +1 -0
  4. package/cline-hub/webview/assets/{architectureDiagram-T3A2C74G-Ct30gwqh.js → architectureDiagram-T3A2C74G-BGNrlwUL.js} +3 -3
  5. package/cline-hub/webview/assets/{blockDiagram-VBNYF7ZC-NvlexKKt.js → blockDiagram-VBNYF7ZC-CvIo5nET.js} +1 -1
  6. package/cline-hub/webview/assets/{c4Diagram-5PPSVZJV-B_5juPnU.js → c4Diagram-5PPSVZJV-B91Sv2Na.js} +1 -1
  7. package/cline-hub/webview/assets/channel-Cn9dB4WD.js +1 -0
  8. package/cline-hub/webview/assets/{chunk-2GRJ4B5K-Doyqdl7z.js → chunk-2GRJ4B5K-u4MGLwtv.js} +1 -1
  9. package/cline-hub/webview/assets/{chunk-4I5QYGJK-fWcc74jc.js → chunk-4I5QYGJK-0RNwvBrV.js} +1 -1
  10. package/cline-hub/webview/assets/{chunk-5RXB4S5H-iHQ-m63K.js → chunk-5RXB4S5H-BHjkdRhh.js} +1 -1
  11. package/cline-hub/webview/assets/{chunk-6Q2QTUOP-BV9jz5-g.js → chunk-6Q2QTUOP-CLgL8rxg.js} +1 -1
  12. package/cline-hub/webview/assets/{chunk-7Z6QIM7H-Be4Bkvd-.js → chunk-7Z6QIM7H-C6_Ywz3w.js} +1 -1
  13. package/cline-hub/webview/assets/{chunk-GF5L2VYU-D6YM0_6S.js → chunk-GF5L2VYU-iIVxDVKm.js} +1 -1
  14. package/cline-hub/webview/assets/{chunk-I66GZJ75-DxMOzPI3.js → chunk-I66GZJ75-DXqP3B91.js} +3 -3
  15. package/cline-hub/webview/assets/{chunk-JQJVKLGR-CrRa5suG.js → chunk-JQJVKLGR-CmK9TOTe.js} +2 -2
  16. package/cline-hub/webview/assets/{chunk-KBJHAD2P-TYlOQAMj.js → chunk-KBJHAD2P-L-89C026.js} +1 -1
  17. package/cline-hub/webview/assets/{chunk-NSK5VX7P-BHCOTpr9.js → chunk-NSK5VX7P-D5026Kzu.js} +1 -1
  18. package/cline-hub/webview/assets/{chunk-QR6OTTB3-3TYBQZA6.js → chunk-QR6OTTB3-DgKOIk7B.js} +1 -1
  19. package/cline-hub/webview/assets/{chunk-UBXNYLIW-DAcvCxc6.js → chunk-UBXNYLIW-DzzRI8B_.js} +1 -1
  20. package/cline-hub/webview/assets/{chunk-W5SLKNZC-BFjzRMq7.js → chunk-W5SLKNZC-jIqX_Eb5.js} +1 -1
  21. package/cline-hub/webview/assets/{chunk-WRU74C26-C9Ssi_aO.js → chunk-WRU74C26-BSENSjFs.js} +1 -1
  22. package/cline-hub/webview/assets/classDiagram-JCYQIIEL-BMEETwfQ.js +1 -0
  23. package/cline-hub/webview/assets/classDiagram-v2-OCEON4UE-BMEETwfQ.js +1 -0
  24. package/cline-hub/webview/assets/{cose-bilkent-JH36ORCC-0-dytQ64.js → cose-bilkent-JH36ORCC-DFv1GHTs.js} +1 -1
  25. package/cline-hub/webview/assets/cynefinDiagram-MW4NZA55-CIoeFR2b.js +62 -0
  26. package/cline-hub/webview/assets/{dagre-VZM6K2ZE-DvisTyMw.js → dagre-VZM6K2ZE-CXd9m4cA.js} +1 -1
  27. package/cline-hub/webview/assets/{diagram-7IWD3JNH-BX7frUcA.js → diagram-7IWD3JNH-CgiYOAGC.js} +3 -3
  28. package/cline-hub/webview/assets/{diagram-B4RE2ZJO-C_lx5j79.js → diagram-B4RE2ZJO-i1LZz3qn.js} +1 -1
  29. package/cline-hub/webview/assets/diagram-LBJQPF4R-GOvZ7wow.js +24 -0
  30. package/cline-hub/webview/assets/diagram-Q27KOJAE-C-x1hqFU.js +24 -0
  31. package/cline-hub/webview/assets/diagram-UB23O5K3-Ds1emBxU.js +41 -0
  32. package/cline-hub/webview/assets/ebnfDiagram-BXEA7PRR-Bmu-47tU.js +1 -0
  33. package/cline-hub/webview/assets/{erDiagram-JOGREHBK-vud-yc3w.js → erDiagram-JOGREHBK--TO8WYZl.js} +1 -1
  34. package/cline-hub/webview/assets/extensions-view-SuauWCKD.js +1 -0
  35. package/cline-hub/webview/assets/flowDiagram-UKHOOZJN-epuPN-mi.js +1 -0
  36. package/cline-hub/webview/assets/{ganttDiagram-PKOTCBZU-DCPEKF5o.js → ganttDiagram-PKOTCBZU-BJMCqdx8.js} +1 -1
  37. package/cline-hub/webview/assets/{gitGraphDiagram-DS77QQ5N-BgAe94Ht.js → gitGraphDiagram-DS77QQ5N-CFngxqjY.js} +1 -1
  38. package/cline-hub/webview/assets/highlighted-body-KPVGNVTW-C38puTq_.js +1 -0
  39. package/cline-hub/webview/assets/index-Lryt7pNP.js +10 -0
  40. package/cline-hub/webview/assets/infoDiagram-6WML65LV-HYF3E1dT.js +2 -0
  41. package/cline-hub/webview/assets/{ishikawaDiagram-WSZJBQD7-jwalpso3.js → ishikawaDiagram-WSZJBQD7-BXMe4UcZ.js} +2 -2
  42. package/cline-hub/webview/assets/{journeyDiagram-NVQOT4AX-Djs_pVcG.js → journeyDiagram-NVQOT4AX-CRKFmsae.js} +1 -1
  43. package/cline-hub/webview/assets/{kanban-definition-27J2QSJJ-jqw2qtWr.js → kanban-definition-27J2QSJJ-fGza5kV5.js} +4 -4
  44. package/cline-hub/webview/assets/{label-Dojvfj0S.js → label-CfYx7R2D.js} +2 -2
  45. package/cline-hub/webview/assets/{line-DWRCkzkd.js → line-BImJQVif.js} +1 -1
  46. package/cline-hub/webview/assets/mermaid-HWGCJPDP-B2eHIVs6.js +1 -0
  47. package/cline-hub/webview/assets/{mermaid-layout-C2x7inlt.js → mermaid-layout-CGd-uY3x.js} +1 -1
  48. package/cline-hub/webview/assets/mermaid-markup-D01n6Kcj.js +259 -0
  49. package/cline-hub/webview/assets/mermaid-parser-B74RvNk1.js +3 -0
  50. package/cline-hub/webview/assets/mermaid-parser-ByV-ZOdd.js +1 -0
  51. package/cline-hub/webview/assets/mermaid-parser-C2jETkNP.js +2 -0
  52. package/cline-hub/webview/assets/mermaid-parser-C3SJa12Y.js +1 -0
  53. package/cline-hub/webview/assets/mermaid-parser-CFqrADy2.js +4 -0
  54. package/cline-hub/webview/assets/mermaid-parser-CiEp2wH6.js +1 -0
  55. package/cline-hub/webview/assets/{mermaid-parser-BICK3FdT.js → mermaid-parser-DHwB1DNv.js} +2 -2
  56. package/cline-hub/webview/assets/mermaid-parser-DgB__rYs.js +1 -0
  57. package/cline-hub/webview/assets/mermaid.core-CNhdxt2h.js +42 -0
  58. package/cline-hub/webview/assets/{mindmap-definition-FAOFIHXS-DJoJ6ZWT.js → mindmap-definition-FAOFIHXS-CSIdPH6Q.js} +1 -1
  59. package/cline-hub/webview/assets/pegDiagram-VL7TDLO6-C6mMcz9U.js +1 -0
  60. package/cline-hub/webview/assets/{pieDiagram-7S7Q4E2Y-D-smG9_c.js → pieDiagram-7S7Q4E2Y-_Em6O_U1.js} +2 -2
  61. package/cline-hub/webview/assets/{quadrantDiagram-CIZ2JOQS-BAuvXv9c.js → quadrantDiagram-CIZ2JOQS-DAUZ-M5i.js} +1 -1
  62. package/cline-hub/webview/assets/railroadDiagram-AXF67PYL-D-nONgIY.js +1 -0
  63. package/cline-hub/webview/assets/{requirementDiagram-LRYGKXZP-BWfA4Q3b.js → requirementDiagram-LRYGKXZP--TyKFbQR.js} +1 -1
  64. package/cline-hub/webview/assets/{sankeyDiagram-W5VNT64P-YXqg5-S6.js → sankeyDiagram-W5VNT64P-D_L0wHGo.js} +1 -1
  65. package/cline-hub/webview/assets/{sequenceDiagram-SI44F4Z6-BTBoXj-p.js → sequenceDiagram-SI44F4Z6-DQZqzwJM.js} +2 -2
  66. package/cline-hub/webview/assets/settings-view-D6D49OyW.js +1 -0
  67. package/cline-hub/webview/assets/stateDiagram-OKZ733FA-CRrKMpks.js +1 -0
  68. package/cline-hub/webview/assets/stateDiagram-v2-UEYNNEHI-gzRtUcKB.js +1 -0
  69. package/cline-hub/webview/assets/{swimlanes-SLNWSIFB-DlHa4KH6.js → swimlanes-SLNWSIFB-z7E3j6mU.js} +1 -1
  70. package/cline-hub/webview/assets/swimlanesDiagram-ULZ7WXOC-eylwAnWt.js +8 -0
  71. package/cline-hub/webview/assets/{timeline-definition-Z64GVDOM-Cpb40e7F.js → timeline-definition-Z64GVDOM-s7-rEymV.js} +1 -1
  72. package/cline-hub/webview/assets/{vennDiagram-T6HMQDX7-C8y4XI2V.js → vennDiagram-T6HMQDX7-HuTwN2dY.js} +2 -2
  73. package/cline-hub/webview/assets/{wardleyDiagram-T6FBY63Y-C0kH69Fc.js → wardleyDiagram-T6FBY63Y-BG9WRwXn.js} +2 -2
  74. package/cline-hub/webview/assets/{xychartDiagram-ELKLHX3M-BYvFyyUe.js → xychartDiagram-ELKLHX3M-C0kPny3I.js} +3 -3
  75. package/cline-hub/webview/index.html +1 -2
  76. package/package.json +1 -1
  77. package/cline-hub/webview/assets/Chat-C-iFZNKw.js +0 -201
  78. package/cline-hub/webview/assets/DialogTitle-DhcSoJq2.js +0 -1
  79. package/cline-hub/webview/assets/abnfDiagram-N423BO3Z-BsGGIH1G.js +0 -1
  80. package/cline-hub/webview/assets/channel-BLuEVh7z.js +0 -1
  81. package/cline-hub/webview/assets/chunk-3NCLNEKW-D5OlNvSb.js +0 -1
  82. package/cline-hub/webview/assets/chunk-BO2N2NFS-BsZ82u-z.js +0 -131
  83. package/cline-hub/webview/assets/chunk-J7OUQ5F2-DriunbVn.js +0 -2
  84. package/cline-hub/webview/assets/chunk-ZIRB5QZD-O39ZBUk3.js +0 -32
  85. package/cline-hub/webview/assets/classDiagram-JCYQIIEL-B4xpuYlC.js +0 -1
  86. package/cline-hub/webview/assets/classDiagram-v2-OCEON4UE-B4xpuYlC.js +0 -1
  87. package/cline-hub/webview/assets/cynefinDiagram-MW4NZA55-CIdGoTyn.js +0 -62
  88. package/cline-hub/webview/assets/diagram-LBJQPF4R-bki5Aq2k.js +0 -24
  89. package/cline-hub/webview/assets/diagram-Q27KOJAE-DDvOMZ5O.js +0 -24
  90. package/cline-hub/webview/assets/diagram-UB23O5K3-DFxFQ4Ju.js +0 -41
  91. package/cline-hub/webview/assets/ebnfDiagram-BXEA7PRR-BQKM6CZ9.js +0 -1
  92. package/cline-hub/webview/assets/extensions-view-CaC-chM6.js +0 -1
  93. package/cline-hub/webview/assets/flowDiagram-UKHOOZJN-CwYfu9gW.js +0 -1
  94. package/cline-hub/webview/assets/highlighted-body-OFNGDK62-D1t0OvrR.js +0 -1
  95. package/cline-hub/webview/assets/index-CJJnmmFp.js +0 -10
  96. package/cline-hub/webview/assets/infoDiagram-6WML65LV-Caj14_ei.js +0 -2
  97. package/cline-hub/webview/assets/mermaid-GHXKKRXX-Ckyoy2Mi.js +0 -1
  98. package/cline-hub/webview/assets/mermaid-markup-4KnljNms.js +0 -259
  99. package/cline-hub/webview/assets/mermaid-parser-B5dtuYEh.js +0 -2
  100. package/cline-hub/webview/assets/mermaid-parser-BYr1RLu9.js +0 -3
  101. package/cline-hub/webview/assets/mermaid-parser-Bd5X_psc.js +0 -1
  102. package/cline-hub/webview/assets/mermaid-parser-CUdSKy0R.js +0 -1
  103. package/cline-hub/webview/assets/mermaid-parser-DL14msmj.js +0 -1
  104. package/cline-hub/webview/assets/mermaid-parser-DMx__WIl.js +0 -1
  105. package/cline-hub/webview/assets/mermaid-parser-Dp5WGUCu.js +0 -1
  106. package/cline-hub/webview/assets/mermaid-parser-u_Yu50JG.js +0 -4
  107. package/cline-hub/webview/assets/mermaid.core-CoWNmuz3.js +0 -11
  108. package/cline-hub/webview/assets/pegDiagram-VL7TDLO6-54D5Xa0g.js +0 -1
  109. package/cline-hub/webview/assets/railroadDiagram-AXF67PYL-FRxbp897.js +0 -1
  110. package/cline-hub/webview/assets/settings-view-DyGZslxZ.js +0 -1
  111. package/cline-hub/webview/assets/stateDiagram-OKZ733FA-DfSJdJlc.js +0 -1
  112. package/cline-hub/webview/assets/stateDiagram-v2-UEYNNEHI-Bgqiab1s.js +0 -1
  113. package/cline-hub/webview/assets/swimlanesDiagram-ULZ7WXOC-CbgcHovu.js +0 -8
@@ -0,0 +1,2 @@
1
+ import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as t}from"./src-BY_WSiz7.js";import{c as n}from"./chunk-I66GZJ75-DXqP3B91.js";import{n as r}from"./mermaid-parser-CFqrADy2.js";import{o as i}from"./mermaid.core-CNhdxt2h.js";var a={parse:e(async e=>{let n=await r(`info`,e);t.debug(n)},`parse`)},o={version:`11.16.1`},s={parser:a,db:{getVersion:e(()=>o.version,`getVersion`)},renderer:{draw:e((e,r,a)=>{t.debug(`rendering info diagram
2
+ `+e);let o=i(r);n(o,100,400,!0),o.append(`g`).append(`text`).attr(`x`,100).attr(`y`,40).attr(`class`,`version`).attr(`font-size`,32).style(`text-anchor`,`middle`).text(`v${a}`)},`draw`)}};export{s as diagram};
@@ -1,9 +1,9 @@
1
- import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import"./src-BY_WSiz7.js";import{H as t,K as n,U as r,a as i,c as a,s as o,v as s,w as c,x as l,y as u}from"./chunk-I66GZJ75-DxMOzPI3.js";import{p as d}from"./chunk-NSK5VX7P-BHCOTpr9.js";import{t as f}from"./chunk-3NCLNEKW-D5OlNvSb.js";import{t as p}from"./rough.esm-Dy-Kn_BL.js";var m=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,4],r=[1,14],i=[1,12],a=[1,13],o=[6,7,8],s=[1,20],c=[1,18],l=[1,19],u=[6,7,11],d=[1,6,13,14],f=[1,23],p=[1,24],m=[1,6,7,11,13,14],h={trace:e(function(){},`trace`),yy:{},symbols_:{error:2,start:3,ishikawa:4,spaceLines:5,SPACELINE:6,NL:7,ISHIKAWA:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,TEXT:14,$accept:0,$end:1},terminals_:{2:`error`,6:`SPACELINE`,7:`NL`,8:`ISHIKAWA`,11:`EOF`,13:`SPACELIST`,14:`TEXT`},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,1],[12,1],[12,1]],performAction:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 6:case 7:return r;case 15:r.addNode(a[s-1].length,a[s].trim());break;case 16:r.addNode(0,a[s].trim())}},`anonymous`),table:[{3:1,4:2,5:3,6:[1,5],8:n},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:n},{6:r,7:[1,10],9:9,12:11,13:i,14:a},t(o,[2,3]),{1:[2,2]},t(o,[2,4]),t(o,[2,5]),{1:[2,6],6:r,12:15,13:i,14:a},{6:r,9:16,12:11,13:i,14:a},{6:s,7:c,10:17,11:l},t(u,[2,18],{14:[1,21]}),t(u,[2,16]),t(u,[2,17]),{6:s,7:c,10:22,11:l},{1:[2,7],6:r,12:15,13:i,14:a},t(d,[2,14],{7:f,11:p}),t(m,[2,8]),t(m,[2,9]),t(m,[2,10]),t(u,[2,15]),t(d,[2,13],{7:f,11:p}),t(m,[2,11]),t(m,[2,12])],defaultActions:{2:[2,1],6:[2,2]},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(t,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;this.parseError=typeof g.yy.parseError==`function`?g.yy.parseError:Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}e(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`:
1
+ import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import"./src-BY_WSiz7.js";import{H as t,K as n,U as r,a as i,c as a,s as o,v as s,w as c,x as l,y as u}from"./chunk-I66GZJ75-DXqP3B91.js";import{p as d}from"./chunk-NSK5VX7P-D5026Kzu.js";import{t as f}from"./rough.esm-Dy-Kn_BL.js";import{o as p}from"./mermaid.core-CNhdxt2h.js";var m=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,4],r=[1,14],i=[1,12],a=[1,13],o=[6,7,8],s=[1,20],c=[1,18],l=[1,19],u=[6,7,11],d=[1,6,13,14],f=[1,23],p=[1,24],m=[1,6,7,11,13,14],h={trace:e(function(){},`trace`),yy:{},symbols_:{error:2,start:3,ishikawa:4,spaceLines:5,SPACELINE:6,NL:7,ISHIKAWA:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,TEXT:14,$accept:0,$end:1},terminals_:{2:`error`,6:`SPACELINE`,7:`NL`,8:`ISHIKAWA`,11:`EOF`,13:`SPACELIST`,14:`TEXT`},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,1],[12,1],[12,1]],performAction:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 6:case 7:return r;case 15:r.addNode(a[s-1].length,a[s].trim());break;case 16:r.addNode(0,a[s].trim())}},`anonymous`),table:[{3:1,4:2,5:3,6:[1,5],8:n},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:n},{6:r,7:[1,10],9:9,12:11,13:i,14:a},t(o,[2,3]),{1:[2,2]},t(o,[2,4]),t(o,[2,5]),{1:[2,6],6:r,12:15,13:i,14:a},{6:r,9:16,12:11,13:i,14:a},{6:s,7:c,10:17,11:l},t(u,[2,18],{14:[1,21]}),t(u,[2,16]),t(u,[2,17]),{6:s,7:c,10:22,11:l},{1:[2,7],6:r,12:15,13:i,14:a},t(d,[2,14],{7:f,11:p}),t(m,[2,8]),t(m,[2,9]),t(m,[2,10]),t(u,[2,15]),t(d,[2,13],{7:f,11:p}),t(m,[2,11]),t(m,[2,12])],defaultActions:{2:[2,1],6:[2,2]},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(t,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;this.parseError=typeof g.yy.parseError==`function`?g.yy.parseError:Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}e(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`:
2
2
  `+h.showPosition()+`
3
3
  Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),A=s[r[r.length-2]][r[r.length-1]],r.push(A);break;case 3:return!0}}return!0},`parse`)};h.lexer=(function(){return{EOF:1,parseError:e(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:e(function(e,t){return this.yy=t||this.yy||{},this._input=e,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:e(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:e(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=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),n.length-1&&(this.yylineno-=n.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:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:e(function(){return this._more=!0,this},`more`),reject:e(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:e(function(e){this.unput(this.match.slice(e))},`less`),pastInput:e(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:e(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:e(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+`
5
5
  `+t+`^`},`showPosition`),test_match:e(function(e,t){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),r=e[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},`test_match`),next:e(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r;this._more||(this.yytext=``,this.match=``);for(var i=this._currentRules(),a=0;a<i.length;a++)if(n=this._input.match(this.rules[i[a]]),n&&(!t||n[0].length>t[0].length)){if(t=n,r=a,this.options.backtrack_lexer){if(e=this.test_match(n,i[a]),e!==!1)return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?(e=this.test_match(t,i[r]),e!==!1&&e):this._input===``?this.EOF:this.parseError(`Lexical error on line `+(this.yylineno+1)+`. Unrecognized text.
6
- `+this.showPosition(),{text:``,token:null,line:this.yylineno})},`next`),lex:e(function(){return this.next()||this.lex()},`lex`),begin:e(function(e){this.conditionStack.push(e)},`begin`),popState:e(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules:e(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},`_currentRules`),topState:e(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:e(function(e){this.begin(e)},`pushState`),stateStackSize:e(function(){return this.conditionStack.length},`stateStackSize`),options:{"case-insensitive":!0},performAction:e(function(e,t,n,r){switch(n){case 0:return 6;case 1:return 8;case 2:return 8;case 3:return 6;case 4:return 7;case 5:return 13;case 6:return 14;case 7:return 11}},`anonymous`),rules:[/^(?:\s*%%.*)/i,/^(?:ishikawa-beta\b)/i,/^(?:ishikawa\b)/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:[^\n]+)/i,/^(?:$)/i],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7],inclusive:!0}}}})();function g(){this.yy={}}return e(g,`Parser`),g.prototype=h,h.Parser=g,new g})();m.parser=m;var h=m,g=class{constructor(){this.stack=[],this.clear=this.clear.bind(this),this.addNode=this.addNode.bind(this),this.getRoot=this.getRoot.bind(this)}static{e(this,`IshikawaDB`)}clear(){this.root=void 0,this.stack=[],this.baseLevel=void 0,i()}getRoot(){return this.root}addNode(e,t){let r=o.sanitizeText(t,l());if(!this.root){this.root={text:r,children:[]},this.stack=[{level:0,node:this.root}],n(r);return}this.baseLevel??=e;let i=e-this.baseLevel+1;for(i<=0&&(i=1);this.stack.length>1&&this.stack[this.stack.length-1].level>=i;)this.stack.pop();let a=this.stack[this.stack.length-1].node,s={text:r,children:[]};a.children.push(s),this.stack.push({level:i,node:s})}getAccTitle(){return u()}setAccTitle(e){r(e)}getAccDescription(){return s()}setAccDescription(e){t(e)}getDiagramTitle(){return c()}setDiagramTitle(e){n(e)}},_=14,v=250,y=30,b=60,x=5,S=82*Math.PI/180,C=Math.cos(S),w=Math.sin(S),T=e((e,t,n)=>{let r=e.node().getBBox(),i=r.width+t*2,o=r.height+t*2;a(e,o,i,n),e.attr(`viewBox`,`${r.x-t} ${r.y-t} ${i} ${o}`)},`applyPaddedViewBox`),E=e((e,t,n,r)=>{let i=r.db.getRoot();if(!i)return;let a=l(),{look:o,handDrawnSeed:s,themeVariables:c}=a,u=d(a.fontSize)[0]??_,m=o===`handDrawn`,h=i.children??[],g=a.ishikawa?.diagramPadding??20,y=a.ishikawa?.useMaxWidth??!1,b=f(t),x=b.append(`g`).attr(`class`,`ishikawa`),S=m?p.svg(b.node()):void 0,C=S?{roughSvg:S,seed:s??0,lineColor:c?.lineColor??`#333`,fillColor:c?.mainBkg??`#fff`}:void 0,w=`ishikawa-arrow-${t}`;m||x.append(`defs`).append(`marker`).attr(`id`,w).attr(`viewBox`,`0 0 10 10`).attr(`refX`,0).attr(`refY`,5).attr(`markerWidth`,6).attr(`markerHeight`,6).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 10 0 L 0 5 L 10 10 Z`).attr(`class`,`ishikawa-arrow`);let E=0,k=v,A=m?void 0:L(x,E,k,E,k,`ishikawa-spine`);if(O(x,E,k,i.text,u,C),!h.length){m&&L(x,E,k,E,k,`ishikawa-spine`,C),T(b,g,y);return}E-=20;let j=h.filter((e,t)=>t%2==0),N=h.filter((e,t)=>t%2==1),P=D(j),F=D(N),I=P.total+F.total,R=v,z=v;if(I>0){let e=v*2,t=v*.3;R=Math.max(t,e*(P.total/I)),z=Math.max(t,e*(F.total/I))}let B=u*2;R=Math.max(R,P.max*B),z=Math.max(z,F.max*B),k=Math.max(R,v),A&&A.attr(`y1`,k).attr(`y2`,k),x.select(`.ishikawa-head-group`).attr(`transform`,`translate(0,${k})`);let V=Math.ceil(h.length/2);for(let e=0;e<V;e++){let t=x.append(`g`).attr(`class`,`ishikawa-pair`);for(let[n,r,i]of[[h[e*2],-1,R],[h[e*2+1],1,z]])n&&M(t,n,E,k,r,i,u,C);E=t.selectAll(`text`).nodes().reduce((e,t)=>Math.min(e,t.getBBox().x),1/0)}if(m)L(x,E,k,0,k,`ishikawa-spine`,C);else{A.attr(`x1`,E);let e=`url(#${w})`;x.selectAll(`line.ishikawa-branch, line.ishikawa-sub-branch`).attr(`marker-start`,e)}T(b,g,y)},`draw`),D=e(t=>{let n=e(e=>e.children.reduce((e,t)=>e+1+n(t),0),`countDescendants`);return t.reduce((e,t)=>{let r=n(t);return e.total+=r,e.max=Math.max(e.max,r),e},{total:0,max:0})},`sideStats`),O=e((e,t,n,r,i,a)=>{let o=Math.max(6,Math.floor(110/(i*.6))),s=e.append(`g`).attr(`class`,`ishikawa-head-group`).attr(`transform`,`translate(${t},${n})`),c=F(s,P(r,o),0,0,`ishikawa-head-label`,`start`,i),l=c.node().getBBox(),u=Math.max(60,l.width+6),d=Math.max(40,l.height*2+40),f=`M 0 ${-d/2} L 0 ${d/2} Q ${u*2.4} 0 0 ${-d/2} Z`;if(a){let e=a.roughSvg.path(f,{roughness:1.5,seed:a.seed,fill:a.fillColor,fillStyle:`hachure`,fillWeight:2.5,hachureGap:5,stroke:a.lineColor,strokeWidth:2});s.insert(()=>e,`:first-child`).attr(`class`,`ishikawa-head`)}else s.insert(`path`,`:first-child`).attr(`class`,`ishikawa-head`).attr(`d`,f);c.attr(`transform`,`translate(${(u-l.width)/2-l.x+3},${-l.y-l.height/2})`)},`drawHead`),k=e((t,n)=>{let r=[],i=[],a=e((e,t,o)=>{let s=n===-1?[...e].reverse():e;for(let e of s){let n=r.length,s=e.children??[];r.push({depth:o,text:P(e.text,15),parentIndex:t,childCount:s.length}),o%2==0?(i.push(n),s.length&&a(s,n,o+1)):(s.length&&a(s,n,o+1),i.push(n))}},`walk`);return a(t,-1,2),{entries:r,yOrder:i}},`flattenTree`),A=e((e,t,n,r,i,a,o)=>{let s=e.append(`g`).attr(`class`,`ishikawa-label-group`),c=F(s,t,n,r+11*i,`ishikawa-label cause`,`middle`,a).node().getBBox();if(o){let e=o.roughSvg.rectangle(c.x-20,c.y-2,c.width+40,c.height+4,{roughness:1.5,seed:o.seed,fill:o.fillColor,fillStyle:`hachure`,fillWeight:2.5,hachureGap:5,stroke:o.lineColor,strokeWidth:2});s.insert(()=>e,`:first-child`).attr(`class`,`ishikawa-label-box`)}else s.insert(`rect`,`:first-child`).attr(`class`,`ishikawa-label-box`).attr(`x`,c.x-20).attr(`y`,c.y-2).attr(`width`,c.width+40).attr(`height`,c.height+4)},`drawCauseLabel`),j=e((e,t,n,r,i,a)=>{let o=Math.sqrt(r*r+i*i);if(o===0)return;let s=r/o,c=i/o,l=-c*6,u=s*6,d=t,f=n,p=`M ${d} ${f} L ${d-s*6*2+l} ${f-c*6*2+u} L ${d-s*6*2-l} ${f-c*6*2-u} Z`,m=a.roughSvg.path(p,{roughness:1,seed:a.seed,fill:a.lineColor,fillStyle:`solid`,stroke:a.lineColor,strokeWidth:1});e.append(()=>m)},`drawArrowMarker`),M=e((e,t,n,r,i,a,o,s)=>{let c=t.children??[],l=a*(c.length?1:.2),u=-C*l,d=w*l*i,f=n+u,p=r+d;if(L(e,n,r,f,p,`ishikawa-branch`,s),s&&j(e,n,r,n-f,r-p,s),A(e,t.text,f,p,i,o,s),!c.length)return;let{entries:m,yOrder:h}=k(c,i),g=m.length,_=Array(g);for(let[e,t]of h.entries())_[t]=r+d*((e+1)/(g+1));let v=new Map;v.set(-1,{x0:n,y0:r,x1:f,y1:p,childCount:c.length,childrenDrawn:0});let S=-C,T=w*i,E=i<0?`ishikawa-label up`:`ishikawa-label down`;for(let[t,n]of m.entries()){let r=_[t],i=v.get(n.parentIndex),a=e.append(`g`).attr(`class`,`ishikawa-sub-group`),c=0,l=0,u=0;if(n.depth%2==0){let e=i.y1-i.y0;c=I(i.x0,i.x1,e?(r-i.y0)/e:.5),l=r,u=c-(n.childCount>0?b+n.childCount*x:y),L(a,c,r,u,r,`ishikawa-sub-branch`,s),s&&j(a,c,r,1,0,s),F(a,n.text,u,r,`ishikawa-label align`,`end`,o)}else{let e=i.childrenDrawn++;c=I(i.x0,i.x1,(i.childCount-e)/(i.childCount+1)),l=i.y0,u=c+S*((r-l)/T),L(a,c,l,u,r,`ishikawa-sub-branch`,s),s&&j(a,c,l,c-u,l-r,s),F(a,n.text,u,r,E,`end`,o)}n.childCount>0&&v.set(t,{x0:c,y0:l,x1:u,y1:r,childCount:n.childCount,childrenDrawn:0})}},`drawBranch`),N=e(e=>e.split(/<br\s*\/?>|\n/),`splitLines`),P=e((e,t)=>{if(e.length<=t)return e;let n=[];for(let r of e.split(/\s+/)){let e=n.length-1;e>=0&&n[e].length+1+r.length<=t?n[e]+=` `+r:n.push(r)}return n.join(`
6
+ `+this.showPosition(),{text:``,token:null,line:this.yylineno})},`next`),lex:e(function(){return this.next()||this.lex()},`lex`),begin:e(function(e){this.conditionStack.push(e)},`begin`),popState:e(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules:e(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},`_currentRules`),topState:e(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:e(function(e){this.begin(e)},`pushState`),stateStackSize:e(function(){return this.conditionStack.length},`stateStackSize`),options:{"case-insensitive":!0},performAction:e(function(e,t,n,r){switch(n){case 0:return 6;case 1:return 8;case 2:return 8;case 3:return 6;case 4:return 7;case 5:return 13;case 6:return 14;case 7:return 11}},`anonymous`),rules:[/^(?:\s*%%.*)/i,/^(?:ishikawa-beta\b)/i,/^(?:ishikawa\b)/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:[^\n]+)/i,/^(?:$)/i],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7],inclusive:!0}}}})();function g(){this.yy={}}return e(g,`Parser`),g.prototype=h,h.Parser=g,new g})();m.parser=m;var h=m,g=class{constructor(){this.stack=[],this.clear=this.clear.bind(this),this.addNode=this.addNode.bind(this),this.getRoot=this.getRoot.bind(this)}static{e(this,`IshikawaDB`)}clear(){this.root=void 0,this.stack=[],this.baseLevel=void 0,i()}getRoot(){return this.root}addNode(e,t){let r=o.sanitizeText(t,l());if(!this.root){this.root={text:r,children:[]},this.stack=[{level:0,node:this.root}],n(r);return}this.baseLevel??=e;let i=e-this.baseLevel+1;for(i<=0&&(i=1);this.stack.length>1&&this.stack[this.stack.length-1].level>=i;)this.stack.pop();let a=this.stack[this.stack.length-1].node,s={text:r,children:[]};a.children.push(s),this.stack.push({level:i,node:s})}getAccTitle(){return u()}setAccTitle(e){r(e)}getAccDescription(){return s()}setAccDescription(e){t(e)}getDiagramTitle(){return c()}setDiagramTitle(e){n(e)}},_=14,v=250,y=30,b=60,x=5,S=82*Math.PI/180,C=Math.cos(S),w=Math.sin(S),T=e((e,t,n)=>{let r=e.node().getBBox(),i=r.width+t*2,o=r.height+t*2;a(e,o,i,n),e.attr(`viewBox`,`${r.x-t} ${r.y-t} ${i} ${o}`)},`applyPaddedViewBox`),E=e((e,t,n,r)=>{let i=r.db.getRoot();if(!i)return;let a=l(),{look:o,handDrawnSeed:s,themeVariables:c}=a,u=d(a.fontSize)[0]??_,m=o===`handDrawn`,h=i.children??[],g=a.ishikawa?.diagramPadding??20,y=a.ishikawa?.useMaxWidth??!1,b=p(t),x=b.append(`g`).attr(`class`,`ishikawa`),S=m?f.svg(b.node()):void 0,C=S?{roughSvg:S,seed:s??0,lineColor:c?.lineColor??`#333`,fillColor:c?.mainBkg??`#fff`}:void 0,w=`ishikawa-arrow-${t}`;m||x.append(`defs`).append(`marker`).attr(`id`,w).attr(`viewBox`,`0 0 10 10`).attr(`refX`,0).attr(`refY`,5).attr(`markerWidth`,6).attr(`markerHeight`,6).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 10 0 L 0 5 L 10 10 Z`).attr(`class`,`ishikawa-arrow`);let E=0,k=v,A=m?void 0:L(x,E,k,E,k,`ishikawa-spine`);if(O(x,E,k,i.text,u,C),!h.length){m&&L(x,E,k,E,k,`ishikawa-spine`,C),T(b,g,y);return}E-=20;let j=h.filter((e,t)=>t%2==0),N=h.filter((e,t)=>t%2==1),P=D(j),F=D(N),I=P.total+F.total,R=v,z=v;if(I>0){let e=v*2,t=v*.3;R=Math.max(t,e*(P.total/I)),z=Math.max(t,e*(F.total/I))}let B=u*2;R=Math.max(R,P.max*B),z=Math.max(z,F.max*B),k=Math.max(R,v),A&&A.attr(`y1`,k).attr(`y2`,k),x.select(`.ishikawa-head-group`).attr(`transform`,`translate(0,${k})`);let V=Math.ceil(h.length/2);for(let e=0;e<V;e++){let t=x.append(`g`).attr(`class`,`ishikawa-pair`);for(let[n,r,i]of[[h[e*2],-1,R],[h[e*2+1],1,z]])n&&M(t,n,E,k,r,i,u,C);E=t.selectAll(`text`).nodes().reduce((e,t)=>Math.min(e,t.getBBox().x),1/0)}if(m)L(x,E,k,0,k,`ishikawa-spine`,C);else{A.attr(`x1`,E);let e=`url(#${w})`;x.selectAll(`line.ishikawa-branch, line.ishikawa-sub-branch`).attr(`marker-start`,e)}T(b,g,y)},`draw`),D=e(t=>{let n=e(e=>e.children.reduce((e,t)=>e+1+n(t),0),`countDescendants`);return t.reduce((e,t)=>{let r=n(t);return e.total+=r,e.max=Math.max(e.max,r),e},{total:0,max:0})},`sideStats`),O=e((e,t,n,r,i,a)=>{let o=Math.max(6,Math.floor(110/(i*.6))),s=e.append(`g`).attr(`class`,`ishikawa-head-group`).attr(`transform`,`translate(${t},${n})`),c=F(s,P(r,o),0,0,`ishikawa-head-label`,`start`,i),l=c.node().getBBox(),u=Math.max(60,l.width+6),d=Math.max(40,l.height*2+40),f=`M 0 ${-d/2} L 0 ${d/2} Q ${u*2.4} 0 0 ${-d/2} Z`;if(a){let e=a.roughSvg.path(f,{roughness:1.5,seed:a.seed,fill:a.fillColor,fillStyle:`hachure`,fillWeight:2.5,hachureGap:5,stroke:a.lineColor,strokeWidth:2});s.insert(()=>e,`:first-child`).attr(`class`,`ishikawa-head`)}else s.insert(`path`,`:first-child`).attr(`class`,`ishikawa-head`).attr(`d`,f);c.attr(`transform`,`translate(${(u-l.width)/2-l.x+3},${-l.y-l.height/2})`)},`drawHead`),k=e((t,n)=>{let r=[],i=[],a=e((e,t,o)=>{let s=n===-1?[...e].reverse():e;for(let e of s){let n=r.length,s=e.children??[];r.push({depth:o,text:P(e.text,15),parentIndex:t,childCount:s.length}),o%2==0?(i.push(n),s.length&&a(s,n,o+1)):(s.length&&a(s,n,o+1),i.push(n))}},`walk`);return a(t,-1,2),{entries:r,yOrder:i}},`flattenTree`),A=e((e,t,n,r,i,a,o)=>{let s=e.append(`g`).attr(`class`,`ishikawa-label-group`),c=F(s,t,n,r+11*i,`ishikawa-label cause`,`middle`,a).node().getBBox();if(o){let e=o.roughSvg.rectangle(c.x-20,c.y-2,c.width+40,c.height+4,{roughness:1.5,seed:o.seed,fill:o.fillColor,fillStyle:`hachure`,fillWeight:2.5,hachureGap:5,stroke:o.lineColor,strokeWidth:2});s.insert(()=>e,`:first-child`).attr(`class`,`ishikawa-label-box`)}else s.insert(`rect`,`:first-child`).attr(`class`,`ishikawa-label-box`).attr(`x`,c.x-20).attr(`y`,c.y-2).attr(`width`,c.width+40).attr(`height`,c.height+4)},`drawCauseLabel`),j=e((e,t,n,r,i,a)=>{let o=Math.sqrt(r*r+i*i);if(o===0)return;let s=r/o,c=i/o,l=-c*6,u=s*6,d=t,f=n,p=`M ${d} ${f} L ${d-s*6*2+l} ${f-c*6*2+u} L ${d-s*6*2-l} ${f-c*6*2-u} Z`,m=a.roughSvg.path(p,{roughness:1,seed:a.seed,fill:a.lineColor,fillStyle:`solid`,stroke:a.lineColor,strokeWidth:1});e.append(()=>m)},`drawArrowMarker`),M=e((e,t,n,r,i,a,o,s)=>{let c=t.children??[],l=a*(c.length?1:.2),u=-C*l,d=w*l*i,f=n+u,p=r+d;if(L(e,n,r,f,p,`ishikawa-branch`,s),s&&j(e,n,r,n-f,r-p,s),A(e,t.text,f,p,i,o,s),!c.length)return;let{entries:m,yOrder:h}=k(c,i),g=m.length,_=Array(g);for(let[e,t]of h.entries())_[t]=r+d*((e+1)/(g+1));let v=new Map;v.set(-1,{x0:n,y0:r,x1:f,y1:p,childCount:c.length,childrenDrawn:0});let S=-C,T=w*i,E=i<0?`ishikawa-label up`:`ishikawa-label down`;for(let[t,n]of m.entries()){let r=_[t],i=v.get(n.parentIndex),a=e.append(`g`).attr(`class`,`ishikawa-sub-group`),c=0,l=0,u=0;if(n.depth%2==0){let e=i.y1-i.y0;c=I(i.x0,i.x1,e?(r-i.y0)/e:.5),l=r,u=c-(n.childCount>0?b+n.childCount*x:y),L(a,c,r,u,r,`ishikawa-sub-branch`,s),s&&j(a,c,r,1,0,s),F(a,n.text,u,r,`ishikawa-label align`,`end`,o)}else{let e=i.childrenDrawn++;c=I(i.x0,i.x1,(i.childCount-e)/(i.childCount+1)),l=i.y0,u=c+S*((r-l)/T),L(a,c,l,u,r,`ishikawa-sub-branch`,s),s&&j(a,c,l,c-u,l-r,s),F(a,n.text,u,r,E,`end`,o)}n.childCount>0&&v.set(t,{x0:c,y0:l,x1:u,y1:r,childCount:n.childCount,childrenDrawn:0})}},`drawBranch`),N=e(e=>e.split(/<br\s*\/?>|\n/),`splitLines`),P=e((e,t)=>{if(e.length<=t)return e;let n=[];for(let r of e.split(/\s+/)){let e=n.length-1;e>=0&&n[e].length+1+r.length<=t?n[e]+=` `+r:n.push(r)}return n.join(`
7
7
  `)},`wrapText`),F=e((e,t,n,r,i,a,o)=>{let s=N(t),c=o*1.05,l=e.append(`text`).attr(`class`,i).attr(`text-anchor`,a).attr(`x`,n).attr(`y`,r-(s.length-1)*c/2);for(let[e,t]of s.entries())l.append(`tspan`).attr(`x`,n).attr(`dy`,e===0?0:c).text(t);return l},`drawMultilineText`),I=e((e,t,n)=>e+(t-e)*n,`lerp`),L=e((e,t,n,r,i,a,o)=>{if(o){let s=o.roughSvg.line(t,n,r,i,{roughness:1.5,seed:o.seed,stroke:o.lineColor,strokeWidth:2});e.append(()=>s).attr(`class`,a);return}return e.append(`line`).attr(`class`,a).attr(`x1`,t).attr(`y1`,n).attr(`x2`,r).attr(`y2`,i)},`drawLine`),R={parser:h,get db(){return new g},renderer:{draw:E},styles:e(e=>`
8
8
  .ishikawa .ishikawa-spine,
9
9
  .ishikawa .ishikawa-branch,
@@ -1,4 +1,4 @@
1
- import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{p as t}from"./src-BY_WSiz7.js";import{H as n,K as r,U as i,a,c as o,v as s,w as c,x as l,y as u}from"./chunk-I66GZJ75-DxMOzPI3.js";import{t as d}from"./arc-3UKfLtkz.js";import{t as f}from"./chunk-5VM5RSS4-ZNzvKenW.js";import{a as p,n as m,o as h,s as g}from"./chunk-2GRJ4B5K-Doyqdl7z.js";var _=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[6,8,10,11,12,14,16,17,18],r=[1,9],i=[1,10],a=[1,11],o=[1,12],s=[1,13],c=[1,14],l={trace:e(function(){},`trace`),yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,taskName:18,taskData:19,$accept:0,$end:1},terminals_:{2:`error`,4:`journey`,6:`EOF`,8:`SPACE`,10:`NEWLINE`,11:`title`,12:`acc_title`,13:`acc_title_value`,14:`acc_descr`,15:`acc_descr_value`,16:`acc_descr_multiline_value`,17:`section`,18:`taskName`,19:`taskData`},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,2]],performAction:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 1:return a[s-1];case 2:this.$=[];break;case 3:a[s-1].push(a[s]),this.$=a[s-1];break;case 4:case 5:this.$=a[s];break;case 6:case 7:this.$=[];break;case 8:r.setDiagramTitle(a[s].substr(6)),this.$=a[s].substr(6);break;case 9:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 10:case 11:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 12:r.addSection(a[s].substr(8)),this.$=a[s].substr(8);break;case 13:r.addTask(a[s-1],a[s]),this.$=`task`}},`anonymous`),table:[{3:1,4:[1,2]},{1:[3]},t(n,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:r,12:i,14:a,16:o,17:s,18:c},t(n,[2,7],{1:[2,1]}),t(n,[2,3]),{9:15,11:r,12:i,14:a,16:o,17:s,18:c},t(n,[2,5]),t(n,[2,6]),t(n,[2,8]),{13:[1,16]},{15:[1,17]},t(n,[2,11]),t(n,[2,12]),{19:[1,18]},t(n,[2,4]),t(n,[2,9]),t(n,[2,10]),t(n,[2,13])],defaultActions:{},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(t,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;this.parseError=typeof g.yy.parseError==`function`?g.yy.parseError:Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}e(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`:
1
+ import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{p as t}from"./src-BY_WSiz7.js";import{H as n,K as r,U as i,a,c as o,v as s,w as c,x as l,y as u}from"./chunk-I66GZJ75-DXqP3B91.js";import{t as d}from"./arc-3UKfLtkz.js";import{t as f}from"./chunk-5VM5RSS4-ZNzvKenW.js";import{a as p,n as m,o as h,s as g}from"./chunk-2GRJ4B5K-u4MGLwtv.js";var _=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[6,8,10,11,12,14,16,17,18],r=[1,9],i=[1,10],a=[1,11],o=[1,12],s=[1,13],c=[1,14],l={trace:e(function(){},`trace`),yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,taskName:18,taskData:19,$accept:0,$end:1},terminals_:{2:`error`,4:`journey`,6:`EOF`,8:`SPACE`,10:`NEWLINE`,11:`title`,12:`acc_title`,13:`acc_title_value`,14:`acc_descr`,15:`acc_descr_value`,16:`acc_descr_multiline_value`,17:`section`,18:`taskName`,19:`taskData`},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,2]],performAction:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 1:return a[s-1];case 2:this.$=[];break;case 3:a[s-1].push(a[s]),this.$=a[s-1];break;case 4:case 5:this.$=a[s];break;case 6:case 7:this.$=[];break;case 8:r.setDiagramTitle(a[s].substr(6)),this.$=a[s].substr(6);break;case 9:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 10:case 11:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 12:r.addSection(a[s].substr(8)),this.$=a[s].substr(8);break;case 13:r.addTask(a[s-1],a[s]),this.$=`task`}},`anonymous`),table:[{3:1,4:[1,2]},{1:[3]},t(n,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:r,12:i,14:a,16:o,17:s,18:c},t(n,[2,7],{1:[2,1]}),t(n,[2,3]),{9:15,11:r,12:i,14:a,16:o,17:s,18:c},t(n,[2,5]),t(n,[2,6]),t(n,[2,8]),{13:[1,16]},{15:[1,17]},t(n,[2,11]),t(n,[2,12]),{19:[1,18]},t(n,[2,4]),t(n,[2,9]),t(n,[2,10]),t(n,[2,13])],defaultActions:{},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(t,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;this.parseError=typeof g.yy.parseError==`function`?g.yy.parseError:Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}e(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`:
2
2
  `+h.showPosition()+`
3
3
  Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),A=s[r[r.length-2]][r[r.length-1]],r.push(A);break;case 3:return!0}}return!0},`parse`)};l.lexer=(function(){return{EOF:1,parseError:e(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:e(function(e,t){return this.yy=t||this.yy||{},this._input=e,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:e(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:e(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=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),n.length-1&&(this.yylineno-=n.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:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:e(function(){return this._more=!0,this},`more`),reject:e(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:e(function(e){this.unput(this.match.slice(e))},`less`),pastInput:e(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:e(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:e(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+`
@@ -1,4 +1,4 @@
1
- import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as t}from"./src-BY_WSiz7.js";import{$ as n,J as r,et as i,f as a,nt as o,x as s,z as c}from"./chunk-I66GZJ75-DxMOzPI3.js";import"./chunk-NSK5VX7P-BHCOTpr9.js";import{t as l}from"./chunk-3NCLNEKW-D5OlNvSb.js";import"./chunk-4I5QYGJK-fWcc74jc.js";import"./chunk-WRU74C26-C9Ssi_aO.js";import{t as u}from"./chunk-5VM5RSS4-ZNzvKenW.js";import"./chunk-UBXNYLIW-DAcvCxc6.js";import"./chunk-W5SLKNZC-BFjzRMq7.js";import{a as d,c as f,i as p}from"./chunk-QR6OTTB3-3TYBQZA6.js";import{n as m,t as h}from"./chunk-ZIRB5QZD-O39ZBUk3.js";var g=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,4],r=[1,13],i=[1,12],a=[1,15],o=[1,16],s=[1,20],c=[1,19],l=[6,7,8],u=[1,26],d=[1,24],f=[1,25],p=[6,7,11],m=[1,31],h=[6,7,11,24],g=[1,6,13,16,17,20,23],_=[1,35],v=[1,36],y=[1,6,7,11,13,16,17,20,23],b=[1,38],x={trace:e(function(){},`trace`),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,KANBAN:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,shapeData:15,ICON:16,CLASS:17,nodeWithId:18,nodeWithoutId:19,NODE_DSTART:20,NODE_DESCR:21,NODE_DEND:22,NODE_ID:23,SHAPE_DATA:24,$accept:0,$end:1},terminals_:{2:`error`,6:`SPACELINE`,7:`NL`,8:`KANBAN`,11:`EOF`,13:`SPACELIST`,16:`ICON`,17:`CLASS`,20:`NODE_DSTART`,21:`NODE_DESCR`,22:`NODE_DEND`,23:`NODE_ID`,24:`SHAPE_DATA`},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,3],[12,2],[12,2],[12,2],[12,1],[12,2],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[19,3],[18,1],[18,4],[15,2],[15,1]],performAction:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 6:case 7:return r;case 8:r.getLogger().trace(`Stop NL `);break;case 9:r.getLogger().trace(`Stop EOF `);break;case 11:r.getLogger().trace(`Stop NL2 `);break;case 12:r.getLogger().trace(`Stop EOF2 `);break;case 15:r.getLogger().info(`Node: `,a[s-1].id),r.addNode(a[s-2].length,a[s-1].id,a[s-1].descr,a[s-1].type,a[s]);break;case 16:r.getLogger().info(`Node: `,a[s].id),r.addNode(a[s-1].length,a[s].id,a[s].descr,a[s].type);break;case 17:r.getLogger().trace(`Icon: `,a[s]),r.decorateNode({icon:a[s]});break;case 18:case 23:r.decorateNode({class:a[s]});break;case 19:r.getLogger().trace(`SPACELIST`);break;case 20:r.getLogger().trace(`Node: `,a[s-1].id),r.addNode(0,a[s-1].id,a[s-1].descr,a[s-1].type,a[s]);break;case 21:r.getLogger().trace(`Node: `,a[s].id),r.addNode(0,a[s].id,a[s].descr,a[s].type);break;case 22:r.decorateNode({icon:a[s]});break;case 27:r.getLogger().trace(`node found ..`,a[s-2]),this.$={id:a[s-1],descr:a[s-1],type:r.getType(a[s-2],a[s])};break;case 28:this.$={id:a[s],descr:a[s],type:0};break;case 29:r.getLogger().trace(`node found ..`,a[s-3]),this.$={id:a[s-3],descr:a[s-1],type:r.getType(a[s-2],a[s])};break;case 30:this.$=a[s-1]+a[s];break;case 31:this.$=a[s]}},`anonymous`),table:[{3:1,4:2,5:3,6:[1,5],8:n},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:n},{6:r,7:[1,10],9:9,12:11,13:i,14:14,16:a,17:o,18:17,19:18,20:s,23:c},t(l,[2,3]),{1:[2,2]},t(l,[2,4]),t(l,[2,5]),{1:[2,6],6:r,12:21,13:i,14:14,16:a,17:o,18:17,19:18,20:s,23:c},{6:r,9:22,12:11,13:i,14:14,16:a,17:o,18:17,19:18,20:s,23:c},{6:u,7:d,10:23,11:f},t(p,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:s,23:c}),t(p,[2,19]),t(p,[2,21],{15:30,24:m}),t(p,[2,22]),t(p,[2,23]),t(h,[2,25]),t(h,[2,26]),t(h,[2,28],{20:[1,32]}),{21:[1,33]},{6:u,7:d,10:34,11:f},{1:[2,7],6:r,12:21,13:i,14:14,16:a,17:o,18:17,19:18,20:s,23:c},t(g,[2,14],{7:_,11:v}),t(y,[2,8]),t(y,[2,9]),t(y,[2,10]),t(p,[2,16],{15:37,24:m}),t(p,[2,17]),t(p,[2,18]),t(p,[2,20],{24:b}),t(h,[2,31]),{21:[1,39]},{22:[1,40]},t(g,[2,13],{7:_,11:v}),t(y,[2,11]),t(y,[2,12]),t(p,[2,15],{24:b}),t(h,[2,30]),{22:[1,41]},t(h,[2,27]),t(h,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(t,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;this.parseError=typeof g.yy.parseError==`function`?g.yy.parseError:Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}e(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`:
1
+ import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as t}from"./src-BY_WSiz7.js";import{$ as n,J as r,et as i,f as a,nt as o,x as s,z as c}from"./chunk-I66GZJ75-DXqP3B91.js";import"./chunk-NSK5VX7P-D5026Kzu.js";import"./chunk-4I5QYGJK-0RNwvBrV.js";import"./chunk-WRU74C26-BSENSjFs.js";import{t as l}from"./chunk-5VM5RSS4-ZNzvKenW.js";import"./chunk-UBXNYLIW-DzzRI8B_.js";import"./chunk-W5SLKNZC-jIqX_Eb5.js";import{a as u,c as d,i as f}from"./chunk-QR6OTTB3-DgKOIk7B.js";import{n as p,o as m,r as h}from"./mermaid.core-CNhdxt2h.js";var g=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,4],r=[1,13],i=[1,12],a=[1,15],o=[1,16],s=[1,20],c=[1,19],l=[6,7,8],u=[1,26],d=[1,24],f=[1,25],p=[6,7,11],m=[1,31],h=[6,7,11,24],g=[1,6,13,16,17,20,23],_=[1,35],v=[1,36],y=[1,6,7,11,13,16,17,20,23],b=[1,38],x={trace:e(function(){},`trace`),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,KANBAN:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,shapeData:15,ICON:16,CLASS:17,nodeWithId:18,nodeWithoutId:19,NODE_DSTART:20,NODE_DESCR:21,NODE_DEND:22,NODE_ID:23,SHAPE_DATA:24,$accept:0,$end:1},terminals_:{2:`error`,6:`SPACELINE`,7:`NL`,8:`KANBAN`,11:`EOF`,13:`SPACELIST`,16:`ICON`,17:`CLASS`,20:`NODE_DSTART`,21:`NODE_DESCR`,22:`NODE_DEND`,23:`NODE_ID`,24:`SHAPE_DATA`},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,3],[12,2],[12,2],[12,2],[12,1],[12,2],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[19,3],[18,1],[18,4],[15,2],[15,1]],performAction:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 6:case 7:return r;case 8:r.getLogger().trace(`Stop NL `);break;case 9:r.getLogger().trace(`Stop EOF `);break;case 11:r.getLogger().trace(`Stop NL2 `);break;case 12:r.getLogger().trace(`Stop EOF2 `);break;case 15:r.getLogger().info(`Node: `,a[s-1].id),r.addNode(a[s-2].length,a[s-1].id,a[s-1].descr,a[s-1].type,a[s]);break;case 16:r.getLogger().info(`Node: `,a[s].id),r.addNode(a[s-1].length,a[s].id,a[s].descr,a[s].type);break;case 17:r.getLogger().trace(`Icon: `,a[s]),r.decorateNode({icon:a[s]});break;case 18:case 23:r.decorateNode({class:a[s]});break;case 19:r.getLogger().trace(`SPACELIST`);break;case 20:r.getLogger().trace(`Node: `,a[s-1].id),r.addNode(0,a[s-1].id,a[s-1].descr,a[s-1].type,a[s]);break;case 21:r.getLogger().trace(`Node: `,a[s].id),r.addNode(0,a[s].id,a[s].descr,a[s].type);break;case 22:r.decorateNode({icon:a[s]});break;case 27:r.getLogger().trace(`node found ..`,a[s-2]),this.$={id:a[s-1],descr:a[s-1],type:r.getType(a[s-2],a[s])};break;case 28:this.$={id:a[s],descr:a[s],type:0};break;case 29:r.getLogger().trace(`node found ..`,a[s-3]),this.$={id:a[s-3],descr:a[s-1],type:r.getType(a[s-2],a[s])};break;case 30:this.$=a[s-1]+a[s];break;case 31:this.$=a[s]}},`anonymous`),table:[{3:1,4:2,5:3,6:[1,5],8:n},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:n},{6:r,7:[1,10],9:9,12:11,13:i,14:14,16:a,17:o,18:17,19:18,20:s,23:c},t(l,[2,3]),{1:[2,2]},t(l,[2,4]),t(l,[2,5]),{1:[2,6],6:r,12:21,13:i,14:14,16:a,17:o,18:17,19:18,20:s,23:c},{6:r,9:22,12:11,13:i,14:14,16:a,17:o,18:17,19:18,20:s,23:c},{6:u,7:d,10:23,11:f},t(p,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:s,23:c}),t(p,[2,19]),t(p,[2,21],{15:30,24:m}),t(p,[2,22]),t(p,[2,23]),t(h,[2,25]),t(h,[2,26]),t(h,[2,28],{20:[1,32]}),{21:[1,33]},{6:u,7:d,10:34,11:f},{1:[2,7],6:r,12:21,13:i,14:14,16:a,17:o,18:17,19:18,20:s,23:c},t(g,[2,14],{7:_,11:v}),t(y,[2,8]),t(y,[2,9]),t(y,[2,10]),t(p,[2,16],{15:37,24:m}),t(p,[2,17]),t(p,[2,18]),t(p,[2,20],{24:b}),t(h,[2,31]),{21:[1,39]},{22:[1,40]},t(g,[2,13],{7:_,11:v}),t(y,[2,11]),t(y,[2,12]),t(p,[2,15],{24:b}),t(h,[2,30]),{22:[1,41]},t(h,[2,27]),t(h,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(t,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;this.parseError=typeof g.yy.parseError==`function`?g.yy.parseError:Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}e(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`:
2
2
  `+h.showPosition()+`
3
3
  Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),A=s[r[r.length-2]][r[r.length-1]],r.push(A);break;case 3:return!0}}return!0},`parse`)};x.lexer=(function(){return{EOF:1,parseError:e(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:e(function(e,t){return this.yy=t||this.yy||{},this._input=e,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:e(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:e(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=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),n.length-1&&(this.yylineno-=n.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:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:e(function(){return this._more=!0,this},`more`),reject:e(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:e(function(e){this.unput(this.match.slice(e))},`less`),pastInput:e(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:e(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:e(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+`
@@ -7,8 +7,8 @@ Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on l
7
7
  `)?i+`
8
8
  `:`{
9
9
  `+i+`
10
- }`;let t=m(e,{schema:h});if(t.shape&&(t.shape!==t.shape.toLowerCase()||t.shape.includes(`_`)))throw Error(`No such shape: ${t.shape}. Shape names should be lowercase.`);t?.shape&&t.shape===`kanbanItem`&&(u.shape=t?.shape),t?.label&&(u.label=t?.label),t?.icon&&(u.icon=t?.icon.toString()),t?.assigned&&(u.assigned=t?.assigned.toString()),t?.ticket&&(u.ticket=t?.ticket.toString()),t?.priority&&(u.priority=t?.priority)}let d=C(e);d?u.parentId=d.id||`kbn`+b++:y.push(u),v.push(u)},`addNode`),D={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},O={clear:S,addNode:E,getSections:w,getData:T,nodeType:D,getType:e((e,n)=>{switch(t.debug(`In get type`,e,n),e){case`[`:return D.RECT;case`(`:return n===`)`?D.ROUNDED_RECT:D.CLOUD;case`((`:return D.CIRCLE;case`)`:return D.CLOUD;case`))`:return D.BANG;case`{{`:return D.HEXAGON;default:return D.DEFAULT}},`getType`),setElementForId:e((e,t)=>{x[e]=t},`setElementForId`),decorateNode:e(e=>{if(!e)return;let t=s(),n=v[v.length-1];e.icon&&(n.icon=c(e.icon,t)),e.class&&(n.cssClasses=c(e.class,t))},`decorateNode`),type2Str:e(e=>{switch(e){case D.DEFAULT:return`no-border`;case D.RECT:return`rect`;case D.ROUNDED_RECT:return`rounded-rect`;case D.CIRCLE:return`circle`;case D.CLOUD:return`cloud`;case D.BANG:return`bang`;case D.HEXAGON:return`hexgon`;default:return`no-border`}},`type2Str`),getLogger:e(()=>t,`getLogger`),getElementById:e(e=>x[e],`getElementById`)},k={draw:e(async(e,n,i,o)=>{t.debug(`Rendering kanban diagram
11
- `+e);let c=o.db.getData(),u=s();u.htmlLabels=!1;let m=l(n);for(let e of c.nodes)e.domId=`${n}-${e.id}`;let h=m.append(`g`);h.attr(`class`,`sections`);let g=m.append(`g`);g.attr(`class`,`items`);let _=c.nodes.filter(e=>e.isGroup),v=0,y=[],b=25;for(let e of _){let t=u?.kanban?.sectionWidth||200;v+=1,e.x=t*v+(v-1)*10/2,e.width=t,e.y=0,e.height=t*3,e.rx=5,e.ry=5,e.cssClasses=e.cssClasses+` section-`+v;let n=await p(h,e);b=Math.max(b,n?.labelBBox?.height),y.push(n)}let x=0;for(let e of _){let t=y[x];x+=1;let n=u?.kanban?.sectionWidth||200,r=-n*3/2+b,i=r,a=c.nodes.filter(t=>t.parentId===e.id);for(let t of a){if(t.isGroup)throw Error(`Groups within groups are not allowed in Kanban diagrams`);t.x=e.x,t.width=n-15;let r=(await d(g,t,{config:u})).node().getBBox();t.y=i+r.height/2,await f(t),i=t.y+r.height/2+5}let o=t.cluster.select(`rect`),s=Math.max(i-r+30,50)+(b-25);o.attr(`height`,s)}r(void 0,m,u.mindmap?.padding??a.kanban.padding,u.mindmap?.useMaxWidth??a.kanban.useMaxWidth)},`draw`)},A=e(t=>{let r=``;for(let e=0;e<t.THEME_COLOR_LIMIT;e++)t[`lineColor`+e]=t[`lineColor`+e]||t[`cScaleInv`+e],o(t[`lineColor`+e])?t[`lineColor`+e]=i(t[`lineColor`+e],20):t[`lineColor`+e]=n(t[`lineColor`+e],20);let a=e((e,r)=>t.darkMode?n(e,r):i(e,r),`adjuster`);for(let e=0;e<t.THEME_COLOR_LIMIT;e++){let n=``+(17-3*e);r+=`
10
+ }`;let t=h(e,{schema:p});if(t.shape&&(t.shape!==t.shape.toLowerCase()||t.shape.includes(`_`)))throw Error(`No such shape: ${t.shape}. Shape names should be lowercase.`);t?.shape&&t.shape===`kanbanItem`&&(u.shape=t?.shape),t?.label&&(u.label=t?.label),t?.icon&&(u.icon=t?.icon.toString()),t?.assigned&&(u.assigned=t?.assigned.toString()),t?.ticket&&(u.ticket=t?.ticket.toString()),t?.priority&&(u.priority=t?.priority)}let d=C(e);d?u.parentId=d.id||`kbn`+b++:y.push(u),v.push(u)},`addNode`),D={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},O={clear:S,addNode:E,getSections:w,getData:T,nodeType:D,getType:e((e,n)=>{switch(t.debug(`In get type`,e,n),e){case`[`:return D.RECT;case`(`:return n===`)`?D.ROUNDED_RECT:D.CLOUD;case`((`:return D.CIRCLE;case`)`:return D.CLOUD;case`))`:return D.BANG;case`{{`:return D.HEXAGON;default:return D.DEFAULT}},`getType`),setElementForId:e((e,t)=>{x[e]=t},`setElementForId`),decorateNode:e(e=>{if(!e)return;let t=s(),n=v[v.length-1];e.icon&&(n.icon=c(e.icon,t)),e.class&&(n.cssClasses=c(e.class,t))},`decorateNode`),type2Str:e(e=>{switch(e){case D.DEFAULT:return`no-border`;case D.RECT:return`rect`;case D.ROUNDED_RECT:return`rounded-rect`;case D.CIRCLE:return`circle`;case D.CLOUD:return`cloud`;case D.BANG:return`bang`;case D.HEXAGON:return`hexgon`;default:return`no-border`}},`type2Str`),getLogger:e(()=>t,`getLogger`),getElementById:e(e=>x[e],`getElementById`)},k={draw:e(async(e,n,i,o)=>{t.debug(`Rendering kanban diagram
11
+ `+e);let c=o.db.getData(),l=s();l.htmlLabels=!1;let p=m(n);for(let e of c.nodes)e.domId=`${n}-${e.id}`;let h=p.append(`g`);h.attr(`class`,`sections`);let g=p.append(`g`);g.attr(`class`,`items`);let _=c.nodes.filter(e=>e.isGroup),v=0,y=[],b=25;for(let e of _){let t=l?.kanban?.sectionWidth||200;v+=1,e.x=t*v+(v-1)*10/2,e.width=t,e.y=0,e.height=t*3,e.rx=5,e.ry=5,e.cssClasses=e.cssClasses+` section-`+v;let n=await f(h,e);b=Math.max(b,n?.labelBBox?.height),y.push(n)}let x=0;for(let e of _){let t=y[x];x+=1;let n=l?.kanban?.sectionWidth||200,r=-n*3/2+b,i=r,a=c.nodes.filter(t=>t.parentId===e.id);for(let t of a){if(t.isGroup)throw Error(`Groups within groups are not allowed in Kanban diagrams`);t.x=e.x,t.width=n-15;let r=(await u(g,t,{config:l})).node().getBBox();t.y=i+r.height/2,await d(t),i=t.y+r.height/2+5}let o=t.cluster.select(`rect`),s=Math.max(i-r+30,50)+(b-25);o.attr(`height`,s)}r(void 0,p,l.mindmap?.padding??a.kanban.padding,l.mindmap?.useMaxWidth??a.kanban.useMaxWidth)},`draw`)},A=e(t=>{let r=``;for(let e=0;e<t.THEME_COLOR_LIMIT;e++)t[`lineColor`+e]=t[`lineColor`+e]||t[`cScaleInv`+e],o(t[`lineColor`+e])?t[`lineColor`+e]=i(t[`lineColor`+e],20):t[`lineColor`+e]=n(t[`lineColor`+e],20);let a=e((e,r)=>t.darkMode?n(e,r):i(e,r),`adjuster`);for(let e=0;e<t.THEME_COLOR_LIMIT;e++){let n=``+(17-3*e);r+=`
12
12
  .section-${e-1} rect, .section-${e-1} path, .section-${e-1} circle, .section-${e-1} polygon, .section-${e-1} path {
13
13
  fill: ${a(t[`cScale`+e],10)};
14
14
  stroke: ${a(t[`cScale`+e],10)};
@@ -85,5 +85,5 @@ Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on l
85
85
  dominant-baseline: middle;
86
86
  text-align: center;
87
87
  }
88
- ${u()}
88
+ ${l()}
89
89
  `,`getStyles`)};export{j as diagram};
@@ -1,4 +1,4 @@
1
- import{a as e,r as t}from"./rolldown-runtime-B0Z9INg1.js";import{a as n,r}from"./bundle-mjs-CyB9GzWm.js";import{$ as i,A as a,B as o,Bt as s,C as c,D as l,Dt as u,E as d,Et as f,Ft as p,G as m,Gn as ee,H as h,J as g,K as _,L as te,Lt as v,Mn as ne,Mt as re,Nn as ie,O as ae,Ot as y,Q as oe,Qn as se,Qt as b,R as x,Rt as ce,S as le,Sn as ue,St as de,T as fe,Tn as pe,Tt as me,U as he,Ut as ge,V as _e,Vt as ve,W as ye,Wn as be,Y as xe,Yn as S,Z as Se,_ as C,_t as Ce,a as w,an as we,ar as T,at as Te,b as Ee,c as De,cr as Oe,d as ke,en as Ae,et as je,f as Me,fn as Ne,fr as Pe,gt as Fe,h as Ie,i as Le,in as Re,it as ze,j as Be,k as Ve,l as He,ln as Ue,nn as We,o as Ge,on as Ke,or as qe,r as Je,rr as Ye,s as Xe,sn as Ze,sr as Qe,tn as $e,u as et,un as tt,v as nt,w as rt,wt as E,x as it,xt as at,y as ot,yt as st,z as D,zn as ct}from"./vscode-CFosRdBr.js";import{a as lt,c as ut,i as dt,n as ft,o as pt,r as mt,s as ht,t as gt}from"./DialogTitle-DhcSoJq2.js";function _t(e){let{open:t=!1,onOpenChange:n,elements:r={}}=e,i=ge(),a=re()!=null,o=Pe(()=>new at({open:t,transitionStatus:void 0,onOpenChange:n,referenceElement:r.reference??null,floatingElement:r.floating??null,triggerElements:new ze,floatingId:i,syncOnly:!1,nested:a})).current;return qe(()=>{let e={open:t,floatingId:i};r.reference!==void 0&&(e.referenceElement=r.reference,e.domReferenceElement=ee(r.reference)?r.reference:null),r.floating!==void 0&&(e.floatingElement=r.floating),o.update(e)},[t,i,r.reference,r.floating,o]),o.context.onOpenChange=n,o.context.nested=a,o}var O=e(n(),1);function vt(e){let[t,n]=O.useState({current:e,previous:null});return Object.is(e,t.current)||n({current:e,previous:t.current}),t.previous}var yt=x(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),bt=x(`chevron-up`,[[`path`,{d:`m18 15-6-6-6 6`,key:`153udz`}]]),xt=x(`circle`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]]),St=x(`image`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`,key:`1m3agn`}],[`circle`,{cx:`9`,cy:`9`,r:`2`,key:`af1f0g`}],[`path`,{d:`m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21`,key:`1xmnt7`}]]),Ct=x(`plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]),wt=x(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),Tt=O.forwardRef(function(e,t){let{render:n,className:r,style:i,disabled:a=!1,nativeButton:o=!0,id:c,payload:d,handle:f,...p}=e,ee=ut(!0),h=je(f)??ee;if(!h)throw Error(T(79));let g=m(c),_=h.useState(`floatingRootContext`),te=h.useState(`isOpenedByTrigger`,g),ne=h.useState(`triggerPopupId`,g),re=O.useRef(null),{registerTrigger:ie,isMountedByThisTrigger:ae}=Fe(g,re,h,{payload:d}),{getButtonProps:y,buttonRef:oe}=Be({disabled:a,native:o}),se=u(_),b=l(()=>h.select(`open`),e=>{h.set(`openMethod`,e)}),x={disabled:a,open:te},ce=h.useState(`triggerProps`,ae);return s(`button`,e,{state:x,ref:[oe,t,ie,re],props:[se.reference,ce,b,{[v]:``,id:g,"aria-haspopup":`dialog`,"aria-expanded":te,"aria-controls":ne},p,y],stateAttributesMapping:xe})});function Et(e){return e==null||e.hasAttribute(`disabled`)||e.getAttribute(`aria-disabled`)===`true`}var Dt,Ot=Object.freeze({status:`aborted`});function k(e,t,n){function r(n,r){if(n._zod||Object.defineProperty(n,"_zod",{value:{def:r,constr:o,traits:new Set},enumerable:!1}),n._zod.traits.has(e))return;n._zod.traits.add(e),t(n,r);let i=o.prototype,a=Object.keys(i);for(let e=0;e<a.length;e++){let t=a[e];t in n||(n[t]=i[t].bind(n))}}let i=n?.Parent??Object;class a extends i{}Object.defineProperty(a,"name",{value:e});function o(e){var t;let i=n?.Parent?new a:this;r(i,e),(t=i._zod).deferred??(t.deferred=[]);for(let e of i._zod.deferred)e();return i}return Object.defineProperty(o,"init",{value:r}),Object.defineProperty(o,Symbol.hasInstance,{value:t=>n?.Parent&&t instanceof n.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(o,"name",{value:e}),o}var kt=Symbol(`zod_brand`),At=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},jt=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}};(Dt=globalThis).__zod_globalConfig??(Dt.__zod_globalConfig={});var Mt=globalThis.__zod_globalConfig;function Nt(e){return e&&Object.assign(Mt,e),Mt}var Pt=t({BIGINT_FORMAT_RANGES:()=>_n,Class:()=>Bn,NUMBER_FORMAT_RANGES:()=>gn,aborted:()=>Tn,allowsEval:()=>an,assert:()=>zt,assertEqual:()=>Ft,assertIs:()=>Lt,assertNever:()=>Rt,assertNotEqual:()=>It,assignProp:()=>Jt,base64ToUint8Array:()=>Pn,base64urlToUint8Array:()=>In,cached:()=>Ht,captureStackTrace:()=>nn,cleanEnum:()=>Nn,cleanRegex:()=>Wt,clone:()=>pn,cloneDef:()=>Xt,createTransparentProxy:()=>mn,defineLazy:()=>j,esc:()=>en,escapeRegex:()=>fn,explicitlyAborted:()=>En,extend:()=>bn,finalizeIssue:()=>kn,floatSafeRemainder:()=>Gt,getElementAtPath:()=>Zt,getEnumValues:()=>Bt,getLengthableOrigin:()=>jn,getParsedType:()=>ln,getSizableOrigin:()=>An,hexToUint8Array:()=>Rn,isObject:()=>rn,isPlainObject:()=>on,issue:()=>Mn,joinValues:()=>A,jsonStringifyReplacer:()=>Vt,merge:()=>Sn,mergeDefs:()=>Yt,normalizeParams:()=>M,nullish:()=>Ut,numKeys:()=>cn,objectClone:()=>qt,omit:()=>yn,optionalKeys:()=>hn,parsedType:()=>P,partial:()=>Cn,pick:()=>vn,prefixIssues:()=>Dn,primitiveTypes:()=>dn,promiseAllObject:()=>Qt,propertyKeyTypes:()=>un,randomString:()=>$t,required:()=>wn,safeExtend:()=>xn,shallowClone:()=>sn,slugify:()=>tn,stringifyPrimitive:()=>N,uint8ArrayToBase64:()=>Fn,uint8ArrayToBase64url:()=>Ln,uint8ArrayToHex:()=>zn,unwrapMessage:()=>On});function Ft(e){return e}function It(e){return e}function Lt(e){}function Rt(e){throw Error(`Unexpected value in exhaustive check`)}function zt(e){}function Bt(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function A(e,t=`|`){return e.map(e=>N(e)).join(t)}function Vt(e,t){return typeof t==`bigint`?t.toString():t}function Ht(e){return{get value(){{let t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function Ut(e){return e==null}function Wt(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function Gt(e,t){let n=e/t,r=Math.round(n),i=2**-52*Math.max(Math.abs(n),1);return Math.abs(n-r)<i?0:n-r}var Kt=Symbol(`evaluating`);function j(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==Kt)return r===void 0&&(r=Kt,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function qt(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function Jt(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function Yt(...e){let t={};for(let n of e){let e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function Xt(e){return Yt(e._zod.def)}function Zt(e,t){return t?t.reduce((e,t)=>e?.[t],e):e}function Qt(e){let t=Object.keys(e),n=t.map(t=>e[t]);return Promise.all(n).then(e=>{let n={};for(let r=0;r<t.length;r++)n[t[r]]=e[r];return n})}function $t(e=10){let t=``;for(let n=0;n<e;n++)t+=`abcdefghijklmnopqrstuvwxyz`[Math.floor(Math.random()*26)];return t}function en(e){return JSON.stringify(e)}function tn(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}var nn=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function rn(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var an=Ht(()=>{if(Mt.jitless||typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function on(e){if(rn(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return rn(n)!==!1&&Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)!==!1}function sn(e){return on(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}function cn(e){let t=0;for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&t++;return t}var ln=e=>{let t=typeof e;switch(t){case`undefined`:return`undefined`;case`string`:return`string`;case`number`:return Number.isNaN(e)?`nan`:`number`;case`boolean`:return`boolean`;case`function`:return`function`;case`bigint`:return`bigint`;case`symbol`:return`symbol`;case`object`:return Array.isArray(e)?`array`:e===null?`null`:e.then&&typeof e.then==`function`&&e.catch&&typeof e.catch==`function`?`promise`:typeof Map<`u`&&e instanceof Map?`map`:typeof Set<`u`&&e instanceof Set?`set`:typeof Date<`u`&&e instanceof Date?`date`:typeof File<`u`&&e instanceof File?`file`:`object`;default:throw Error(`Unknown data type: ${t}`)}},un=new Set([`string`,`number`,`symbol`]),dn=new Set([`string`,`number`,`bigint`,`boolean`,`symbol`,`undefined`]);function fn(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function pn(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function M(e){let t=e;if(!t)return{};if(typeof t==`string`)return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function mn(e){let t;return new Proxy({},{get(n,r,i){return t??=e(),Reflect.get(t,r,i)},set(n,r,i,a){return t??=e(),Reflect.set(t,r,i,a)},has(n,r){return t??=e(),Reflect.has(t,r)},deleteProperty(n,r){return t??=e(),Reflect.deleteProperty(t,r)},ownKeys(n){return t??=e(),Reflect.ownKeys(t)},getOwnPropertyDescriptor(n,r){return t??=e(),Reflect.getOwnPropertyDescriptor(t,r)},defineProperty(n,r,i){return t??=e(),Reflect.defineProperty(t,r,i)}})}function N(e){return typeof e==`bigint`?e.toString()+`n`:typeof e==`string`?`"${e}"`:`${e}`}function hn(e){return Object.keys(e).filter(t=>e[t]._zod.optin===`optional`&&e[t]._zod.optout===`optional`)}var gn={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},_n={int64:[BigInt(`-9223372036854775808`),BigInt(`9223372036854775807`)],uint64:[BigInt(0),BigInt(`18446744073709551615`)]};function vn(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.pick() cannot be used on object schemas containing refinements`);return pn(e,Yt(e._zod.def,{get shape(){let e={};for(let r in t){if(!(r in n.shape))throw Error(`Unrecognized key: "${r}"`);t[r]&&(e[r]=n.shape[r])}return Jt(this,`shape`,e),e},checks:[]}))}function yn(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.omit() cannot be used on object schemas containing refinements`);return pn(e,Yt(e._zod.def,{get shape(){let r={...e._zod.def.shape};for(let e in t){if(!(e in n.shape))throw Error(`Unrecognized key: "${e}"`);t[e]&&delete r[e]}return Jt(this,`shape`,r),r},checks:[]}))}function bn(e,t){if(!on(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=e._zod.def.shape;for(let e in t)if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return pn(e,Yt(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return Jt(this,`shape`,n),n}}))}function xn(e,t){if(!on(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return pn(e,Yt(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return Jt(this,`shape`,n),n}}))}function Sn(e,t){if(e._zod.def.checks?.length)throw Error(`.merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.`);return pn(e,Yt(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return Jt(this,`shape`,n),n},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function Cn(e,t,n){let r=t._zod.def.checks;if(r&&r.length>0)throw Error(`.partial() cannot be used on object schemas containing refinements`);return pn(t,Yt(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in r))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t])}else for(let t in r)i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t];return Jt(this,`shape`,i),i},checks:[]}))}function wn(e,t,n){return pn(t,Yt(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in i))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=new e({type:`nonoptional`,innerType:r[t]}))}else for(let t in r)i[t]=new e({type:`nonoptional`,innerType:r[t]});return Jt(this,`shape`,i),i}}))}function Tn(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function En(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function Dn(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function On(e){return typeof e==`string`?e:e?.message}function kn(e,t,n){let r=e.message?e.message:On(e.inst?._zod.def?.error?.(e))??On(t?.error?.(e))??On(n.customError?.(e))??On(n.localeError?.(e))??`Invalid input`,{inst:i,continue:a,input:o,...s}=e;return s.path??=[],s.message=r,t?.reportInput&&(s.input=o),s}function An(e){return e instanceof Set?`set`:e instanceof Map?`map`:e instanceof File?`file`:`unknown`}function jn(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function P(e){let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`nan`:`number`;case`object`:{if(e===null)return`null`;if(Array.isArray(e))return`array`;let t=e;if(t&&Object.getPrototypeOf(t)!==Object.prototype&&`constructor`in t&&t.constructor)return t.constructor.name}}return t}function Mn(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}function Nn(e){return Object.entries(e).filter(([e,t])=>Number.isNaN(Number.parseInt(e,10))).map(e=>e[1])}function Pn(e){let t=atob(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);return n}function Fn(e){let t=``;for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return btoa(t)}function In(e){let t=e.replace(/-/g,`+`).replace(/_/g,`/`);return Pn(t+`=`.repeat((4-t.length%4)%4))}function Ln(e){return Fn(e).replace(/\+/g,`-`).replace(/\//g,`_`).replace(/=/g,``)}function Rn(e){let t=e.replace(/^0x/,``);if(t.length%2!=0)throw Error(`Invalid hex string length`);let n=new Uint8Array(t.length/2);for(let e=0;e<t.length;e+=2)n[e/2]=Number.parseInt(t.slice(e,e+2),16);return n}function zn(e){return Array.from(e).map(e=>e.toString(16).padStart(2,`0`)).join(``)}var Bn=class{constructor(...e){}},Vn=(e,t)=>{e.name=`$ZodError`,Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,Vt,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Hn=k(`$ZodError`,Vn),Un=k(`$ZodError`,Vn,{Parent:Error});function Wn(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}function Gn(e,t=e=>e.message){let n={_errors:[]},r=(e,i=[])=>{for(let a of e.issues)if(a.code===`invalid_union`&&a.errors.length)a.errors.map(e=>r({issues:e},[...i,...a.path]));else if(a.code===`invalid_key`)r({issues:a.issues},[...i,...a.path]);else if(a.code===`invalid_element`)r({issues:a.issues},[...i,...a.path]);else{let e=[...i,...a.path];if(e.length===0)n._errors.push(t(a));else{let r=n,i=0;for(;i<e.length;){let n=e[i];i===e.length-1?(r[n]=r[n]||{_errors:[]},r[n]._errors.push(t(a))):r[n]=r[n]||{_errors:[]},r=r[n],i++}}}};return r(e),n}function Kn(e,t=e=>e.message){let n={errors:[]},r=(e,i=[])=>{var a,o;for(let s of e.issues)if(s.code===`invalid_union`&&s.errors.length)s.errors.map(e=>r({issues:e},[...i,...s.path]));else if(s.code===`invalid_key`)r({issues:s.issues},[...i,...s.path]);else if(s.code===`invalid_element`)r({issues:s.issues},[...i,...s.path]);else{let e=[...i,...s.path];if(e.length===0){n.errors.push(t(s));continue}let r=n,c=0;for(;c<e.length;){let n=e[c],i=c===e.length-1;typeof n==`string`?(r.properties??(r.properties={}),(a=r.properties)[n]??(a[n]={errors:[]}),r=r.properties[n]):(r.items??(r.items=[]),(o=r.items)[n]??(o[n]={errors:[]}),r=r.items[n]),i&&r.errors.push(t(s)),c++}}};return r(e),n}function qn(e){let t=[],n=e.map(e=>typeof e==`object`?e.key:e);for(let e of n)typeof e==`number`?t.push(`[${e}]`):typeof e==`symbol`?t.push(`[${JSON.stringify(String(e))}]`):/[^\w$]/.test(e)?t.push(`[${JSON.stringify(e)}]`):(t.length&&t.push(`.`),t.push(e));return t.join(``)}function Jn(e){let t=[],n=[...e.issues].sort((e,t)=>(e.path??[]).length-(t.path??[]).length);for(let e of n)t.push(`✖ ${e.message}`),e.path?.length&&t.push(` → at ${qn(e.path)}`);return t.join(`
1
+ import{a as e,r as t}from"./rolldown-runtime-B0Z9INg1.js";import{a as n,r}from"./bundle-mjs-CyB9GzWm.js";import{$ as i,A as a,B as o,Bt as s,C as c,D as l,Dt as u,E as d,Et as f,Ft as p,G as m,Gn as ee,H as h,J as g,K as te,L as ne,Lt as _,Mn as re,Mt as ie,Nn as ae,O as oe,Ot as v,Q as se,Qn as ce,Qt as y,R as b,Rt as x,S as le,Sn as ue,St as de,T as fe,Tn as pe,Tt as me,U as he,Ut as ge,V as _e,Vt as ve,W as ye,Wn as be,Y as xe,Yn as S,Z as Se,_ as C,_t as Ce,a as w,an as we,ar as T,at as Te,b as Ee,c as De,cr as Oe,d as ke,en as Ae,et as je,f as Me,fn as Ne,fr as Pe,gt as Fe,h as Ie,i as Le,in as Re,it as ze,j as Be,k as Ve,l as He,ln as Ue,nn as We,o as Ge,on as Ke,or as qe,r as Je,rr as Ye,s as Xe,sn as Ze,sr as Qe,tn as $e,u as et,un as tt,v as nt,w as rt,wt as E,x as it,xt as at,y as ot,yt as st,z as D,zn as ct}from"./vscode-CFosRdBr.js";import{A as lt,C as ut,D as dt,E as ft,O as pt,T as mt,k as ht,w as gt}from"./index-Lryt7pNP.js";function _t(e){let{open:t=!1,onOpenChange:n,elements:r={}}=e,i=ge(),a=ie()!=null,o=Pe(()=>new at({open:t,transitionStatus:void 0,onOpenChange:n,referenceElement:r.reference??null,floatingElement:r.floating??null,triggerElements:new ze,floatingId:i,syncOnly:!1,nested:a})).current;return qe(()=>{let e={open:t,floatingId:i};r.reference!==void 0&&(e.referenceElement=r.reference,e.domReferenceElement=ee(r.reference)?r.reference:null),r.floating!==void 0&&(e.floatingElement=r.floating),o.update(e)},[t,i,r.reference,r.floating,o]),o.context.onOpenChange=n,o.context.nested=a,o}var O=e(n(),1);function vt(e){let[t,n]=O.useState({current:e,previous:null});return Object.is(e,t.current)||n({current:e,previous:t.current}),t.previous}var yt=b(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),bt=b(`chevron-up`,[[`path`,{d:`m18 15-6-6-6 6`,key:`153udz`}]]),xt=b(`circle`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]]),St=b(`image`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`,key:`1m3agn`}],[`circle`,{cx:`9`,cy:`9`,r:`2`,key:`af1f0g`}],[`path`,{d:`m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21`,key:`1xmnt7`}]]),Ct=b(`plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]),wt=b(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),Tt=O.forwardRef(function(e,t){let{render:n,className:r,style:i,disabled:a=!1,nativeButton:o=!0,id:c,payload:d,handle:f,...p}=e,ee=lt(!0),h=je(f)??ee;if(!h)throw Error(T(79));let g=m(c),te=h.useState(`floatingRootContext`),ne=h.useState(`isOpenedByTrigger`,g),re=h.useState(`triggerPopupId`,g),ie=O.useRef(null),{registerTrigger:ae,isMountedByThisTrigger:oe}=Fe(g,ie,h,{payload:d}),{getButtonProps:v,buttonRef:se}=Be({disabled:a,native:o}),ce=u(te),y=l(()=>h.select(`open`),e=>{h.set(`openMethod`,e)}),b={disabled:a,open:ne},x=h.useState(`triggerProps`,oe);return s(`button`,e,{state:b,ref:[se,t,ae,ie],props:[ce.reference,x,y,{[_]:``,id:g,"aria-haspopup":`dialog`,"aria-expanded":ne,"aria-controls":re},p,v],stateAttributesMapping:xe})});function Et(e){return e==null||e.hasAttribute(`disabled`)||e.getAttribute(`aria-disabled`)===`true`}var Dt,Ot=Object.freeze({status:`aborted`});function k(e,t,n){function r(n,r){if(n._zod||Object.defineProperty(n,"_zod",{value:{def:r,constr:o,traits:new Set},enumerable:!1}),n._zod.traits.has(e))return;n._zod.traits.add(e),t(n,r);let i=o.prototype,a=Object.keys(i);for(let e=0;e<a.length;e++){let t=a[e];t in n||(n[t]=i[t].bind(n))}}let i=n?.Parent??Object;class a extends i{}Object.defineProperty(a,"name",{value:e});function o(e){var t;let i=n?.Parent?new a:this;r(i,e),(t=i._zod).deferred??(t.deferred=[]);for(let e of i._zod.deferred)e();return i}return Object.defineProperty(o,"init",{value:r}),Object.defineProperty(o,Symbol.hasInstance,{value:t=>n?.Parent&&t instanceof n.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(o,"name",{value:e}),o}var kt=Symbol(`zod_brand`),At=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},jt=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}};(Dt=globalThis).__zod_globalConfig??(Dt.__zod_globalConfig={});var Mt=globalThis.__zod_globalConfig;function Nt(e){return e&&Object.assign(Mt,e),Mt}var Pt=t({BIGINT_FORMAT_RANGES:()=>_n,Class:()=>Bn,NUMBER_FORMAT_RANGES:()=>gn,aborted:()=>Tn,allowsEval:()=>an,assert:()=>zt,assertEqual:()=>Ft,assertIs:()=>Lt,assertNever:()=>Rt,assertNotEqual:()=>It,assignProp:()=>Jt,base64ToUint8Array:()=>Pn,base64urlToUint8Array:()=>In,cached:()=>Ht,captureStackTrace:()=>nn,cleanEnum:()=>Nn,cleanRegex:()=>Wt,clone:()=>pn,cloneDef:()=>Xt,createTransparentProxy:()=>mn,defineLazy:()=>j,esc:()=>en,escapeRegex:()=>fn,explicitlyAborted:()=>En,extend:()=>bn,finalizeIssue:()=>kn,floatSafeRemainder:()=>Gt,getElementAtPath:()=>Zt,getEnumValues:()=>Bt,getLengthableOrigin:()=>jn,getParsedType:()=>ln,getSizableOrigin:()=>An,hexToUint8Array:()=>Rn,isObject:()=>rn,isPlainObject:()=>on,issue:()=>Mn,joinValues:()=>A,jsonStringifyReplacer:()=>Vt,merge:()=>Sn,mergeDefs:()=>Yt,normalizeParams:()=>M,nullish:()=>Ut,numKeys:()=>cn,objectClone:()=>qt,omit:()=>yn,optionalKeys:()=>hn,parsedType:()=>P,partial:()=>Cn,pick:()=>vn,prefixIssues:()=>Dn,primitiveTypes:()=>dn,promiseAllObject:()=>Qt,propertyKeyTypes:()=>un,randomString:()=>$t,required:()=>wn,safeExtend:()=>xn,shallowClone:()=>sn,slugify:()=>tn,stringifyPrimitive:()=>N,uint8ArrayToBase64:()=>Fn,uint8ArrayToBase64url:()=>Ln,uint8ArrayToHex:()=>zn,unwrapMessage:()=>On});function Ft(e){return e}function It(e){return e}function Lt(e){}function Rt(e){throw Error(`Unexpected value in exhaustive check`)}function zt(e){}function Bt(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function A(e,t=`|`){return e.map(e=>N(e)).join(t)}function Vt(e,t){return typeof t==`bigint`?t.toString():t}function Ht(e){return{get value(){{let t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function Ut(e){return e==null}function Wt(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function Gt(e,t){let n=e/t,r=Math.round(n),i=2**-52*Math.max(Math.abs(n),1);return Math.abs(n-r)<i?0:n-r}var Kt=Symbol(`evaluating`);function j(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==Kt)return r===void 0&&(r=Kt,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function qt(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function Jt(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function Yt(...e){let t={};for(let n of e){let e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function Xt(e){return Yt(e._zod.def)}function Zt(e,t){return t?t.reduce((e,t)=>e?.[t],e):e}function Qt(e){let t=Object.keys(e),n=t.map(t=>e[t]);return Promise.all(n).then(e=>{let n={};for(let r=0;r<t.length;r++)n[t[r]]=e[r];return n})}function $t(e=10){let t=``;for(let n=0;n<e;n++)t+=`abcdefghijklmnopqrstuvwxyz`[Math.floor(Math.random()*26)];return t}function en(e){return JSON.stringify(e)}function tn(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}var nn=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function rn(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var an=Ht(()=>{if(Mt.jitless||typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function on(e){if(rn(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return rn(n)!==!1&&Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)!==!1}function sn(e){return on(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}function cn(e){let t=0;for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&t++;return t}var ln=e=>{let t=typeof e;switch(t){case`undefined`:return`undefined`;case`string`:return`string`;case`number`:return Number.isNaN(e)?`nan`:`number`;case`boolean`:return`boolean`;case`function`:return`function`;case`bigint`:return`bigint`;case`symbol`:return`symbol`;case`object`:return Array.isArray(e)?`array`:e===null?`null`:e.then&&typeof e.then==`function`&&e.catch&&typeof e.catch==`function`?`promise`:typeof Map<`u`&&e instanceof Map?`map`:typeof Set<`u`&&e instanceof Set?`set`:typeof Date<`u`&&e instanceof Date?`date`:typeof File<`u`&&e instanceof File?`file`:`object`;default:throw Error(`Unknown data type: ${t}`)}},un=new Set([`string`,`number`,`symbol`]),dn=new Set([`string`,`number`,`bigint`,`boolean`,`symbol`,`undefined`]);function fn(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function pn(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function M(e){let t=e;if(!t)return{};if(typeof t==`string`)return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function mn(e){let t;return new Proxy({},{get(n,r,i){return t??=e(),Reflect.get(t,r,i)},set(n,r,i,a){return t??=e(),Reflect.set(t,r,i,a)},has(n,r){return t??=e(),Reflect.has(t,r)},deleteProperty(n,r){return t??=e(),Reflect.deleteProperty(t,r)},ownKeys(n){return t??=e(),Reflect.ownKeys(t)},getOwnPropertyDescriptor(n,r){return t??=e(),Reflect.getOwnPropertyDescriptor(t,r)},defineProperty(n,r,i){return t??=e(),Reflect.defineProperty(t,r,i)}})}function N(e){return typeof e==`bigint`?e.toString()+`n`:typeof e==`string`?`"${e}"`:`${e}`}function hn(e){return Object.keys(e).filter(t=>e[t]._zod.optin===`optional`&&e[t]._zod.optout===`optional`)}var gn={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},_n={int64:[BigInt(`-9223372036854775808`),BigInt(`9223372036854775807`)],uint64:[BigInt(0),BigInt(`18446744073709551615`)]};function vn(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.pick() cannot be used on object schemas containing refinements`);return pn(e,Yt(e._zod.def,{get shape(){let e={};for(let r in t){if(!(r in n.shape))throw Error(`Unrecognized key: "${r}"`);t[r]&&(e[r]=n.shape[r])}return Jt(this,`shape`,e),e},checks:[]}))}function yn(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.omit() cannot be used on object schemas containing refinements`);return pn(e,Yt(e._zod.def,{get shape(){let r={...e._zod.def.shape};for(let e in t){if(!(e in n.shape))throw Error(`Unrecognized key: "${e}"`);t[e]&&delete r[e]}return Jt(this,`shape`,r),r},checks:[]}))}function bn(e,t){if(!on(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=e._zod.def.shape;for(let e in t)if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return pn(e,Yt(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return Jt(this,`shape`,n),n}}))}function xn(e,t){if(!on(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return pn(e,Yt(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return Jt(this,`shape`,n),n}}))}function Sn(e,t){if(e._zod.def.checks?.length)throw Error(`.merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.`);return pn(e,Yt(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return Jt(this,`shape`,n),n},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function Cn(e,t,n){let r=t._zod.def.checks;if(r&&r.length>0)throw Error(`.partial() cannot be used on object schemas containing refinements`);return pn(t,Yt(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in r))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t])}else for(let t in r)i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t];return Jt(this,`shape`,i),i},checks:[]}))}function wn(e,t,n){return pn(t,Yt(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in i))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=new e({type:`nonoptional`,innerType:r[t]}))}else for(let t in r)i[t]=new e({type:`nonoptional`,innerType:r[t]});return Jt(this,`shape`,i),i}}))}function Tn(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function En(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function Dn(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function On(e){return typeof e==`string`?e:e?.message}function kn(e,t,n){let r=e.message?e.message:On(e.inst?._zod.def?.error?.(e))??On(t?.error?.(e))??On(n.customError?.(e))??On(n.localeError?.(e))??`Invalid input`,{inst:i,continue:a,input:o,...s}=e;return s.path??=[],s.message=r,t?.reportInput&&(s.input=o),s}function An(e){return e instanceof Set?`set`:e instanceof Map?`map`:e instanceof File?`file`:`unknown`}function jn(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function P(e){let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`nan`:`number`;case`object`:{if(e===null)return`null`;if(Array.isArray(e))return`array`;let t=e;if(t&&Object.getPrototypeOf(t)!==Object.prototype&&`constructor`in t&&t.constructor)return t.constructor.name}}return t}function Mn(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}function Nn(e){return Object.entries(e).filter(([e,t])=>Number.isNaN(Number.parseInt(e,10))).map(e=>e[1])}function Pn(e){let t=atob(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);return n}function Fn(e){let t=``;for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return btoa(t)}function In(e){let t=e.replace(/-/g,`+`).replace(/_/g,`/`);return Pn(t+`=`.repeat((4-t.length%4)%4))}function Ln(e){return Fn(e).replace(/\+/g,`-`).replace(/\//g,`_`).replace(/=/g,``)}function Rn(e){let t=e.replace(/^0x/,``);if(t.length%2!=0)throw Error(`Invalid hex string length`);let n=new Uint8Array(t.length/2);for(let e=0;e<t.length;e+=2)n[e/2]=Number.parseInt(t.slice(e,e+2),16);return n}function zn(e){return Array.from(e).map(e=>e.toString(16).padStart(2,`0`)).join(``)}var Bn=class{constructor(...e){}},Vn=(e,t)=>{e.name=`$ZodError`,Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,Vt,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Hn=k(`$ZodError`,Vn),Un=k(`$ZodError`,Vn,{Parent:Error});function Wn(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}function Gn(e,t=e=>e.message){let n={_errors:[]},r=(e,i=[])=>{for(let a of e.issues)if(a.code===`invalid_union`&&a.errors.length)a.errors.map(e=>r({issues:e},[...i,...a.path]));else if(a.code===`invalid_key`)r({issues:a.issues},[...i,...a.path]);else if(a.code===`invalid_element`)r({issues:a.issues},[...i,...a.path]);else{let e=[...i,...a.path];if(e.length===0)n._errors.push(t(a));else{let r=n,i=0;for(;i<e.length;){let n=e[i];i===e.length-1?(r[n]=r[n]||{_errors:[]},r[n]._errors.push(t(a))):r[n]=r[n]||{_errors:[]},r=r[n],i++}}}};return r(e),n}function Kn(e,t=e=>e.message){let n={errors:[]},r=(e,i=[])=>{var a,o;for(let s of e.issues)if(s.code===`invalid_union`&&s.errors.length)s.errors.map(e=>r({issues:e},[...i,...s.path]));else if(s.code===`invalid_key`)r({issues:s.issues},[...i,...s.path]);else if(s.code===`invalid_element`)r({issues:s.issues},[...i,...s.path]);else{let e=[...i,...s.path];if(e.length===0){n.errors.push(t(s));continue}let r=n,c=0;for(;c<e.length;){let n=e[c],i=c===e.length-1;typeof n==`string`?(r.properties??(r.properties={}),(a=r.properties)[n]??(a[n]={errors:[]}),r=r.properties[n]):(r.items??(r.items=[]),(o=r.items)[n]??(o[n]={errors:[]}),r=r.items[n]),i&&r.errors.push(t(s)),c++}}};return r(e),n}function qn(e){let t=[],n=e.map(e=>typeof e==`object`?e.key:e);for(let e of n)typeof e==`number`?t.push(`[${e}]`):typeof e==`symbol`?t.push(`[${JSON.stringify(String(e))}]`):/[^\w$]/.test(e)?t.push(`[${JSON.stringify(e)}]`):(t.length&&t.push(`.`),t.push(e));return t.join(``)}function Jn(e){let t=[],n=[...e.issues].sort((e,t)=>(e.path??[]).length-(t.path??[]).length);for(let e of n)t.push(`✖ ${e.message}`),e.path?.length&&t.push(` → at ${qn(e.path)}`);return t.join(`
2
2
  `)}var Yn=e=>(t,n,r,i)=>{let a=r?{...r,async:!1}:{async:!1},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise)throw new At;if(o.issues.length){let t=new((i?.Err)??e)(o.issues.map(e=>kn(e,a,Nt())));throw nn(t,i?.callee),t}return o.value},Xn=Yn(Un),Zn=e=>async(t,n,r,i)=>{let a=r?{...r,async:!0}:{async:!0},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise&&(o=await o),o.issues.length){let t=new((i?.Err)??e)(o.issues.map(e=>kn(e,a,Nt())));throw nn(t,i?.callee),t}return o.value},Qn=Zn(Un),$n=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new At;return a.issues.length?{success:!1,error:new(e??Hn)(a.issues.map(e=>kn(e,i,Nt())))}:{success:!0,data:a.value}},er=$n(Un),tr=e=>async(t,n,r)=>{let i=r?{...r,async:!0}:{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(e=>kn(e,i,Nt())))}:{success:!0,data:a.value}},nr=tr(Un),rr=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return Yn(e)(t,n,i)},ir=rr(Un),ar=e=>(t,n,r)=>Yn(e)(t,n,r),or=ar(Un),sr=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return Zn(e)(t,n,i)},cr=sr(Un),lr=e=>async(t,n,r)=>Zn(e)(t,n,r),ur=lr(Un),dr=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return $n(e)(t,n,i)},fr=dr(Un),pr=e=>(t,n,r)=>$n(e)(t,n,r),mr=pr(Un),hr=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return tr(e)(t,n,i)},gr=hr(Un),_r=e=>async(t,n,r)=>tr(e)(t,n,r),vr=_r(Un),yr=t({base64:()=>Kr,base64url:()=>qr,bigint:()=>ii,boolean:()=>si,browserEmail:()=>Rr,cidrv4:()=>Wr,cidrv6:()=>Gr,cuid:()=>br,cuid2:()=>xr,date:()=>$r,datetime:()=>ni,domain:()=>Yr,duration:()=>Er,e164:()=>Zr,email:()=>Nr,emoji:()=>Br,extendedDuration:()=>Dr,guid:()=>Or,hex:()=>fi,hostname:()=>Jr,html5Email:()=>Pr,httpProtocol:()=>Xr,idnEmail:()=>Lr,integer:()=>ai,ipv4:()=>Vr,ipv6:()=>Hr,ksuid:()=>wr,lowercase:()=>ui,mac:()=>Ur,md5_base64:()=>gi,md5_base64url:()=>_i,md5_hex:()=>hi,nanoid:()=>Tr,null:()=>ci,number:()=>oi,rfc5322Email:()=>Fr,sha1_base64:()=>yi,sha1_base64url:()=>bi,sha1_hex:()=>vi,sha256_base64:()=>Si,sha256_base64url:()=>Ci,sha256_hex:()=>xi,sha384_base64:()=>Ti,sha384_base64url:()=>Ei,sha384_hex:()=>wi,sha512_base64:()=>Oi,sha512_base64url:()=>ki,sha512_hex:()=>Di,string:()=>ri,time:()=>ti,ulid:()=>Sr,undefined:()=>li,unicodeEmail:()=>Ir,uppercase:()=>di,uuid:()=>kr,uuid4:()=>Ar,uuid6:()=>jr,uuid7:()=>Mr,xid:()=>Cr}),br=/^[cC][0-9a-z]{6,}$/,xr=/^[0-9a-z]+$/,Sr=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Cr=/^[0-9a-vA-V]{20}$/,wr=/^[A-Za-z0-9]{27}$/,Tr=/^[a-zA-Z0-9_-]{21}$/,Er=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Dr=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Or=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,kr=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,Ar=kr(4),jr=kr(6),Mr=kr(7),Nr=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Pr=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,Fr=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,Ir=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,Lr=Ir,Rr=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,zr=`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`;function Br(){return new RegExp(zr,`u`)}var Vr=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Hr=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,Ur=e=>{let t=fn(e??`:`);return RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},Wr=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,Gr=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Kr=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,qr=/^[A-Za-z0-9_-]*$/,Jr=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,Yr=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,Xr=/^https?$/,Zr=/^\+[1-9]\d{6,14}$/,Qr=`(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`,$r=RegExp(`^${Qr}$`);function ei(e){let t=`(?:[01]\\d|2[0-3]):[0-5]\\d`;return typeof e.precision==`number`?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function ti(e){return RegExp(`^${ei(e)}$`)}function ni(e){let t=ei({precision:e.precision}),n=[`Z`];e.local&&n.push(``),e.offset&&n.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let r=`${t}(?:${n.join(`|`)})`;return RegExp(`^${Qr}T(?:${r})$`)}var ri=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??``}}`:`[\\s\\S]*`;return RegExp(`^${t}$`)},ii=/^-?\d+n?$/,ai=/^-?\d+$/,oi=/^-?\d+(?:\.\d+)?$/,si=/^(?:true|false)$/i,ci=/^null$/i,li=/^undefined$/i,ui=/^[^A-Z]*$/,di=/^[^a-z]*$/,fi=/^[0-9a-fA-F]*$/;function pi(e,t){return RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function mi(e){return RegExp(`^[A-Za-z0-9_-]{${e}}$`)}var hi=/^[0-9a-fA-F]{32}$/,gi=pi(22,`==`),_i=mi(22),vi=/^[0-9a-fA-F]{40}$/,yi=pi(27,`=`),bi=mi(27),xi=/^[0-9a-fA-F]{64}$/,Si=pi(43,`=`),Ci=mi(43),wi=/^[0-9a-fA-F]{96}$/,Ti=pi(64,``),Ei=mi(64),Di=/^[0-9a-fA-F]{128}$/,Oi=pi(86,`==`),ki=mi(86),F=k(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),Ai={number:`number`,bigint:`bigint`,object:`date`},ji=k(`$ZodCheckLessThan`,(e,t)=>{F.init(e,t);let n=Ai[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.maximum:n.exclusiveMaximum)??1/0;t.value<r&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:n,code:`too_big`,maximum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Mi=k(`$ZodCheckGreaterThan`,(e,t)=>{F.init(e,t);let n=Ai[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.minimum:n.exclusiveMinimum)??-1/0;t.value>r&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:n,code:`too_small`,minimum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Ni=k(`$ZodCheckMultipleOf`,(e,t)=>{F.init(e,t),e._zod.onattach.push(e=>{var n;(n=e._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw Error(`Cannot mix number and bigint in multiple_of check.`);(typeof n.value==`bigint`?n.value%t.value===BigInt(0):Gt(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:`not_multiple_of`,divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),Pi=k(`$ZodCheckNumberFormat`,(e,t)=>{F.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=gn[t.format];e._zod.onattach.push(e=>{let r=e._zod.bag;r.format=t.format,r.minimum=i,r.maximum=a,n&&(r.pattern=ai)}),e._zod.check=o=>{let s=o.value;if(n){if(!Number.isInteger(s)){o.issues.push({expected:r,format:t.format,code:`invalid_type`,continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?o.issues.push({input:s,code:`too_big`,maximum:2**53-1,note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort}):o.issues.push({input:s,code:`too_small`,minimum:-(2**53-1),note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}s<i&&o.issues.push({origin:`number`,input:s,code:`too_small`,minimum:i,inclusive:!0,inst:e,continue:!t.abort}),s>a&&o.issues.push({origin:`number`,input:s,code:`too_big`,maximum:a,inclusive:!0,inst:e,continue:!t.abort})}}),Fi=k(`$ZodCheckBigIntFormat`,(e,t)=>{F.init(e,t);let[n,r]=_n[t.format];e._zod.onattach.push(e=>{let i=e._zod.bag;i.format=t.format,i.minimum=n,i.maximum=r}),e._zod.check=i=>{let a=i.value;a<n&&i.issues.push({origin:`bigint`,input:a,code:`too_small`,minimum:n,inclusive:!0,inst:e,continue:!t.abort}),a>r&&i.issues.push({origin:`bigint`,input:a,code:`too_big`,maximum:r,inclusive:!0,inst:e,continue:!t.abort})}}),Ii=k(`$ZodCheckMaxSize`,(e,t)=>{var n;F.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!Ut(t)&&t.size!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.maximum??1/0;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{let r=n.value;r.size<=t.maximum||n.issues.push({origin:An(r),code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Li=k(`$ZodCheckMinSize`,(e,t)=>{var n;F.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!Ut(t)&&t.size!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.minimum??-1/0;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let r=n.value;r.size>=t.minimum||n.issues.push({origin:An(r),code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Ri=k(`$ZodCheckSizeEquals`,(e,t)=>{var n;F.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!Ut(t)&&t.size!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag;n.minimum=t.size,n.maximum=t.size,n.size=t.size}),e._zod.check=n=>{let r=n.value,i=r.size;if(i===t.size)return;let a=i>t.size;n.issues.push({origin:An(r),...a?{code:`too_big`,maximum:t.size}:{code:`too_small`,minimum:t.size},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),zi=k(`$ZodCheckMaxLength`,(e,t)=>{var n;F.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!Ut(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.maximum??1/0;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{let r=n.value;if(r.length<=t.maximum)return;let i=jn(r);n.issues.push({origin:i,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Bi=k(`$ZodCheckMinLength`,(e,t)=>{var n;F.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!Ut(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.minimum??-1/0;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let r=n.value;if(r.length>=t.minimum)return;let i=jn(r);n.issues.push({origin:i,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Vi=k(`$ZodCheckLengthEquals`,(e,t)=>{var n;F.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!Ut(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=n=>{let r=n.value,i=r.length;if(i===t.length)return;let a=jn(r),o=i>t.length;n.issues.push({origin:a,...o?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),Hi=k(`$ZodCheckStringFormat`,(e,t)=>{var n,r;F.init(e,t),e._zod.onattach.push(e=>{let n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??=new Set,n.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),Ui=k(`$ZodCheckRegex`,(e,t)=>{Hi.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:`regex`,input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),Wi=k(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=ui,Hi.init(e,t)}),Gi=k(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=di,Hi.init(e,t)}),Ki=k(`$ZodCheckIncludes`,(e,t)=>{F.init(e,t);let n=fn(t.includes),r=new RegExp(typeof t.position==`number`?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(r)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),qi=k(`$ZodCheckStartsWith`,(e,t)=>{F.init(e,t);let n=RegExp(`^${fn(t.prefix)}.*`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),Ji=k(`$ZodCheckEndsWith`,(e,t)=>{F.init(e,t);let n=RegExp(`.*${fn(t.suffix)}$`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}});function Yi(e,t,n){e.issues.length&&t.issues.push(...Dn(n,e.issues))}var Xi=k(`$ZodCheckProperty`,(e,t)=>{F.init(e,t),e._zod.check=e=>{let n=t.schema._zod.run({value:e.value[t.property],issues:[]},{});if(n instanceof Promise)return n.then(n=>Yi(n,e,t.property));Yi(n,e,t.property)}}),Zi=k(`$ZodCheckMimeType`,(e,t)=>{F.init(e,t);let n=new Set(t.mime);e._zod.onattach.push(e=>{e._zod.bag.mime=t.mime}),e._zod.check=r=>{n.has(r.value.type)||r.issues.push({code:`invalid_value`,values:t.mime,input:r.value.type,inst:e,continue:!t.abort})}}),Qi=k(`$ZodCheckOverwrite`,(e,t)=>{F.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}}),$i=class{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),--this.indent}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(`
3
3
  `).filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length)),r=t.map(e=>e.slice(n)).map(e=>` `.repeat(this.indent*2)+e);for(let e of r)this.content.push(e)}compile(){let e=Function,t=this?.args,n=[...(this?.content??[``]).map(e=>` ${e}`)];return new e(...t,n.join(`
4
4
  `))}},ea={major:4,minor:4,patch:3},I=k(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=ea;let r=[...e._zod.def.checks??[]];e._zod.traits.has(`$ZodCheck`)&&r.unshift(e);for(let t of r)for(let n of t._zod.onattach)n(e);if(r.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(e,t,n)=>{let r=Tn(e),i;for(let a of t){if(a._zod.def.when){if(En(e)||!a._zod.def.when(e))continue}else if(r)continue;let t=e.issues.length,o=a._zod.check(e);if(o instanceof Promise&&n?.async===!1)throw new At;if(i||o instanceof Promise)i=(i??Promise.resolve()).then(async()=>{await o,e.issues.length!==t&&(r||=Tn(e,t))});else{if(e.issues.length===t)continue;r||=Tn(e,t)}}return i?i.then(()=>e):e},n=(n,i,a)=>{if(Tn(n))return n.aborted=!0,n;let o=t(i,r,a);if(o instanceof Promise){if(a.async===!1)throw new At;return o.then(t=>e._zod.parse(t,a))}return e._zod.parse(o,a)};e._zod.run=(i,a)=>{if(a.skipChecks)return e._zod.parse(i,a);if(a.direction===`backward`){let t=e._zod.parse({value:i.value,issues:[]},{...a,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,i,a)):n(t,i,a)}let o=e._zod.parse(i,a);if(o instanceof Promise){if(a.async===!1)throw new At;return o.then(e=>t(e,r,a))}return t(o,r,a)}}j(e,`~standard`,()=>({validate:t=>{try{let n=er(e,t);return n.success?{value:n.data}:{issues:n.error?.issues}}catch{return nr(e,t).then(e=>e.success?{value:e.data}:{issues:e.error?.issues})}},vendor:`zod`,version:1}))}),ta=k(`$ZodString`,(e,t)=>{I.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??ri(e._zod.bag),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value==`string`||n.issues.push({expected:`string`,code:`invalid_type`,input:n.value,inst:e}),n}}),L=k(`$ZodStringFormat`,(e,t)=>{Hi.init(e,t),ta.init(e,t)}),na=k(`$ZodGUID`,(e,t)=>{t.pattern??=Or,L.init(e,t)}),ra=k(`$ZodUUID`,(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(e===void 0)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??=kr(e)}else t.pattern??=kr();L.init(e,t)}),ia=k(`$ZodEmail`,(e,t)=>{t.pattern??=Nr,L.init(e,t)}),aa=k(`$ZodURL`,(e,t)=>{L.init(e,t),e._zod.check=n=>{try{let r=n.value.trim();if(!t.normalize&&t.protocol?.source===Xr.source&&!/^https?:\/\//i.test(r)){n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid URL format`,input:n.value,inst:e,continue:!t.abort});return}let i=new URL(r);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(i.hostname)||n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid hostname`,pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(i.protocol.endsWith(`:`)?i.protocol.slice(0,-1):i.protocol)||n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid protocol`,pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),n.value=t.normalize?i.href:r;return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),oa=k(`$ZodEmoji`,(e,t)=>{t.pattern??=Br(),L.init(e,t)}),sa=k(`$ZodNanoID`,(e,t)=>{t.pattern??=Tr,L.init(e,t)}),ca=k(`$ZodCUID`,(e,t)=>{t.pattern??=br,L.init(e,t)}),la=k(`$ZodCUID2`,(e,t)=>{t.pattern??=xr,L.init(e,t)}),ua=k(`$ZodULID`,(e,t)=>{t.pattern??=Sr,L.init(e,t)}),da=k(`$ZodXID`,(e,t)=>{t.pattern??=Cr,L.init(e,t)}),fa=k(`$ZodKSUID`,(e,t)=>{t.pattern??=wr,L.init(e,t)}),pa=k(`$ZodISODateTime`,(e,t)=>{t.pattern??=ni(t),L.init(e,t)}),ma=k(`$ZodISODate`,(e,t)=>{t.pattern??=$r,L.init(e,t)}),ha=k(`$ZodISOTime`,(e,t)=>{t.pattern??=ti(t),L.init(e,t)}),ga=k(`$ZodISODuration`,(e,t)=>{t.pattern??=Er,L.init(e,t)}),_a=k(`$ZodIPv4`,(e,t)=>{t.pattern??=Vr,L.init(e,t),e._zod.bag.format=`ipv4`}),va=k(`$ZodIPv6`,(e,t)=>{t.pattern??=Hr,L.init(e,t),e._zod.bag.format=`ipv6`,e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:`invalid_format`,format:`ipv6`,input:n.value,inst:e,continue:!t.abort})}}}),ya=k(`$ZodMAC`,(e,t)=>{t.pattern??=Ur(t.delimiter),L.init(e,t),e._zod.bag.format=`mac`}),ba=k(`$ZodCIDRv4`,(e,t)=>{t.pattern??=Wr,L.init(e,t)}),xa=k(`$ZodCIDRv6`,(e,t)=>{t.pattern??=Gr,L.init(e,t),e._zod.check=n=>{let r=n.value.split(`/`);try{if(r.length!==2)throw Error();let[e,t]=r;if(!t)throw Error();let n=Number(t);if(`${n}`!==t||n<0||n>128)throw Error();new URL(`http://[${e}]`)}catch{n.issues.push({code:`invalid_format`,format:`cidrv6`,input:n.value,inst:e,continue:!t.abort})}}});function Sa(e){if(e===``)return!0;if(/\s/.test(e)||e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}var Ca=k(`$ZodBase64`,(e,t)=>{t.pattern??=Kr,L.init(e,t),e._zod.bag.contentEncoding=`base64`,e._zod.check=n=>{Sa(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}});function wa(e){if(!qr.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return Sa(t.padEnd(Math.ceil(t.length/4)*4,`=`))}var Ta=k(`$ZodBase64URL`,(e,t)=>{t.pattern??=qr,L.init(e,t),e._zod.bag.contentEncoding=`base64url`,e._zod.check=n=>{wa(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),Ea=k(`$ZodE164`,(e,t)=>{t.pattern??=Zr,L.init(e,t)});function Da(e,t=null){try{let n=e.split(`.`);if(n.length!==3)return!1;let[r]=n;if(!r)return!1;let i=JSON.parse(atob(r));return!(`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&(!(`alg`in i)||i.alg!==t))}catch{return!1}}var Oa=k(`$ZodJWT`,(e,t)=>{L.init(e,t),e._zod.check=n=>{Da(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),ka=k(`$ZodCustomStringFormat`,(e,t)=>{L.init(e,t),e._zod.check=n=>{t.fn(n.value)||n.issues.push({code:`invalid_format`,format:t.format,input:n.value,inst:e,continue:!t.abort})}}),Aa=k(`$ZodNumber`,(e,t)=>{I.init(e,t),e._zod.pattern=e._zod.bag.pattern??oi,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let i=n.value;if(typeof i==`number`&&!Number.isNaN(i)&&Number.isFinite(i))return n;let a=typeof i==`number`?Number.isNaN(i)?`NaN`:Number.isFinite(i)?void 0:`Infinity`:void 0;return n.issues.push({expected:`number`,code:`invalid_type`,input:i,inst:e,...a?{received:a}:{}}),n}}),ja=k(`$ZodNumberFormat`,(e,t)=>{Pi.init(e,t),Aa.init(e,t)}),Ma=k(`$ZodBoolean`,(e,t)=>{I.init(e,t),e._zod.pattern=si,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}let i=n.value;return typeof i==`boolean`||n.issues.push({expected:`boolean`,code:`invalid_type`,input:i,inst:e}),n}}),Na=k(`$ZodBigInt`,(e,t)=>{I.init(e,t),e._zod.pattern=ii,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=BigInt(n.value)}catch{}return typeof n.value==`bigint`||n.issues.push({expected:`bigint`,code:`invalid_type`,input:n.value,inst:e}),n}}),Pa=k(`$ZodBigIntFormat`,(e,t)=>{Fi.init(e,t),Na.init(e,t)}),Fa=k(`$ZodSymbol`,(e,t)=>{I.init(e,t),e._zod.parse=(t,n)=>{let r=t.value;return typeof r==`symbol`||t.issues.push({expected:`symbol`,code:`invalid_type`,input:r,inst:e}),t}}),Ia=k(`$ZodUndefined`,(e,t)=>{I.init(e,t),e._zod.pattern=li,e._zod.values=new Set([void 0]),e._zod.parse=(t,n)=>{let r=t.value;return r===void 0||t.issues.push({expected:`undefined`,code:`invalid_type`,input:r,inst:e}),t}}),La=k(`$ZodNull`,(e,t)=>{I.init(e,t),e._zod.pattern=ci,e._zod.values=new Set([null]),e._zod.parse=(t,n)=>{let r=t.value;return r===null||t.issues.push({expected:`null`,code:`invalid_type`,input:r,inst:e}),t}}),Ra=k(`$ZodAny`,(e,t)=>{I.init(e,t),e._zod.parse=e=>e}),za=k(`$ZodUnknown`,(e,t)=>{I.init(e,t),e._zod.parse=e=>e}),Ba=k(`$ZodNever`,(e,t)=>{I.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)}),Va=k(`$ZodVoid`,(e,t)=>{I.init(e,t),e._zod.parse=(t,n)=>{let r=t.value;return r===void 0||t.issues.push({expected:`void`,code:`invalid_type`,input:r,inst:e}),t}}),Ha=k(`$ZodDate`,(e,t)=>{I.init(e,t),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=new Date(n.value)}catch{}let i=n.value,a=i instanceof Date;return a&&!Number.isNaN(i.getTime())||n.issues.push({expected:`date`,code:`invalid_type`,input:i,...a?{received:`Invalid Date`}:{},inst:e}),n}});function Ua(e,t,n){e.issues.length&&t.issues.push(...Dn(n,e.issues)),t.value[n]=e.value}var Wa=k(`$ZodArray`,(e,t)=>{I.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!Array.isArray(i))return n.issues.push({expected:`array`,code:`invalid_type`,input:i,inst:e}),n;n.value=Array(i.length);let a=[];for(let e=0;e<i.length;e++){let o=i[e],s=t.element._zod.run({value:o,issues:[]},r);s instanceof Promise?a.push(s.then(t=>Ua(t,n,e))):Ua(s,n,e)}return a.length?Promise.all(a).then(()=>n):n}});function Ga(e,t,n,r,i,a){let o=n in r;if(e.issues.length){if(i&&a&&!o)return;t.issues.push(...Dn(n,e.issues))}if(!o&&!i){e.issues.length||t.issues.push({code:`invalid_type`,expected:`nonoptional`,input:void 0,path:[n]});return}e.value===void 0?o&&(t.value[n]=void 0):t.value[n]=e.value}function Ka(e){let t=Object.keys(e.shape);for(let n of t)if(!e.shape?.[n]?._zod?.traits?.has(`$ZodType`))throw Error(`Invalid element at key "${n}": expected a Zod schema`);let n=hn(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function qa(e,t,n,r,i,a){let o=[],s=i.keySet,c=i.catchall._zod,l=c.def.type,u=c.optin===`optional`,d=c.optout===`optional`;for(let i in t){if(i===`__proto__`||s.has(i))continue;if(l===`never`){o.push(i);continue}let a=c.run({value:t[i],issues:[]},r);a instanceof Promise?e.push(a.then(e=>Ga(e,n,i,t,u,d))):Ga(a,n,i,t,u,d)}return o.length&&n.issues.push({code:`unrecognized_keys`,keys:o,input:t,inst:a}),e.length?Promise.all(e).then(()=>n):n}var Ja=k(`$ZodObject`,(e,t)=>{if(I.init(e,t),!Object.getOwnPropertyDescriptor(t,`shape`)?.get){let e=t.shape;Object.defineProperty(t,"shape",{get:()=>{let n={...e};return Object.defineProperty(t,"shape",{value:n}),n}})}let n=Ht(()=>Ka(t));j(e._zod,`propValues`,()=>{let e=t.shape,n={};for(let t in e){let r=e[t]._zod;if(r.values){n[t]??(n[t]=new Set);for(let e of r.values)n[t].add(e)}}return n});let r=rn,i=t.catchall,a;e._zod.parse=(t,o)=>{a??=n.value;let s=t.value;if(!r(s))return t.issues.push({expected:`object`,code:`invalid_type`,input:s,inst:e}),t;t.value={};let c=[],l=a.shape;for(let e of a.keys){let n=l[e],r=n._zod.optin===`optional`,i=n._zod.optout===`optional`,a=n._zod.run({value:s[e],issues:[]},o);a instanceof Promise?c.push(a.then(n=>Ga(n,t,e,s,r,i))):Ga(a,t,e,s,r,i)}return i?qa(c,s,t,o,n.value,e):c.length?Promise.all(c).then(()=>t):t}}),Ya=k(`$ZodObjectJIT`,(e,t)=>{Ja.init(e,t);let n=e._zod.parse,r=Ht(()=>Ka(t)),i=e=>{let t=new $i([`shape`,`payload`,`ctx`]),n=r.value,i=e=>{let t=en(e);return`shape[${t}]._zod.run({ value: input[${t}], issues: [] }, ctx)`};t.write(`const input = payload.value;`);let a=Object.create(null),o=0;for(let e of n.keys)a[e]=`key_${o++}`;t.write(`const newResult = {};`);for(let r of n.keys){let n=a[r],o=en(r),s=e[r],c=s?._zod?.optin===`optional`,l=s?._zod?.optout===`optional`;t.write(`const ${n} = ${i(r)};`),c&&l?t.write(`
@@ -73,4 +73,4 @@ You are in Plan mode. Your role is to explore, analyze, and plan -- not to execu
73
73
  - Do NOT edit files, write code, run destructive commands, or make any changes
74
74
  - Do NOT implement anything -- focus on understanding and alignment first
75
75
 
76
- The run_commands tool remains available in plan mode strictly for read-only inspection -- listing files, searching (grep), reading configs, inspecting git history and diffs, checking tool versions, and the like. Never use it to change anything: no creating, modifying, or deleting files, no writing scripts that make changes, and no state-changing commands (installs, migrations, database or schema changes, container commands that mutate state, etc.). File-editing commands (rm/mv/cp, in-place edits like sed -i, output redirection to files outside /tmp, git commands that change the working tree, package installs) are hard-blocked in plan mode: they are not executed and return a tool error instead, so do not attempt them. If the task requires a mutation, put it in the plan; it happens only after the user switches to act mode.`;`${Og}`,`${Og}`;var kg=`anthropic/claude-sonnet-5`,Ag=K({models:G(K({id:B(),temperature:H().optional(),maxTokens:H().optional(),contextWindow:H().optional(),inputPrice:H().optional(),outputPrice:H().optional(),supportsImages:U().optional()})).optional(),openAiBaseUrl:B().optional(),openAiHeaders:q(B(),B()).optional(),azureApiVersion:B().optional(),azureIdentity:U().optional()}),jg=K({id:B(),thinkingBudgetTokens:H().optional()}),Mg=K({name:B(),baseModelId:B(),thinkingBudgetTokens:H().optional()}),Ng=K({models:G(jg).optional(),customModels:G(Mg).optional(),awsRegion:B().optional(),awsUseCrossRegionInference:U().optional(),awsUseGlobalInference:U().optional(),awsBedrockUsePromptCache:U().optional(),awsBedrockEndpoint:B().optional()}),Pg=K({models:G(K({id:B()})).optional()}),Fg=K({models:G(K({id:B(),thinkingBudgetTokens:H().optional()})).optional(),vertexProjectId:B().optional(),vertexRegion:B().optional()}),Ig=K({models:G(K({id:B(),thinkingBudgetTokens:H().optional(),promptCachingEnabled:U().optional()})).optional(),baseUrl:B().optional()}),Lg=K({models:G(K({id:B(),thinkingBudgetTokens:H().optional()})).optional(),baseUrl:B().optional()}),Rg=K({OpenAiCompatible:Ag.optional(),AwsBedrock:Ng.optional(),Cline:Pg.optional(),Vertex:Fg.optional(),LiteLLM:Ig.optional(),Anthropic:Lg.optional()}),zg=K({id:B()}),Bg=K({name:B(),url:B(),alwaysEnabled:U().optional(),headers:q(B(),B()).optional()}),Vg=K({alwaysEnabled:U(),name:B(),contents:B()}),Hg=K({bucket:B(),accessKeyId:B(),secretAccessKey:B(),region:B().optional(),endpoint:B().optional(),accountId:B().optional()}),Ug=K({promptUploading:K({enabled:U().optional(),type:sm([Y(`s3_access_keys`),Y(`r2_access_keys`),Y(`azure_access_keys`)]).optional(),s3AccessSettings:Hg.optional(),r2AccessSettings:Hg.optional(),azureAccessSettings:Hg.optional()}).optional()});K({version:B(),providerSettings:Rg.optional(),telemetryEnabled:U().optional(),kanbanEnabled:U().optional(),mcpMarketplaceEnabled:U().optional(),allowedMCPServers:G(zg).optional(),remoteMCPServers:G(Bg).optional(),blockPersonalRemoteMCPServers:U().optional(),yoloModeAllowed:U().optional(),openTelemetryEnabled:U().optional(),openTelemetryMetricsExporter:B().optional(),openTelemetryLogsExporter:B().optional(),openTelemetryOtlpProtocol:B().optional(),openTelemetryOtlpEndpoint:B().optional(),openTelemetryOtlpHeaders:q(B(),B()).optional(),openTelemetryOtlpMetricsProtocol:B().optional(),openTelemetryOtlpMetricsEndpoint:B().optional(),openTelemetryOtlpMetricsHeaders:q(B(),B()).optional(),openTelemetryOtlpLogsProtocol:B().optional(),openTelemetryOtlpLogsEndpoint:B().optional(),openTelemetryOtlpLogsHeaders:q(B(),B()).optional(),openTelemetryMetricExportInterval:H().optional(),openTelemetryOtlpInsecure:U().optional(),openTelemetryLogBatchSize:H().optional(),openTelemetryLogBatchTimeout:H().optional(),openTelemetryLogMaxQueueSize:H().optional(),enterpriseTelemetry:Ug.optional(),globalRules:G(Vg).optional(),globalWorkflows:G(Vg).optional()}),q(B(),B()),zh.enum([`reasoning`,`prompt-cache`,`tools`,`provider-tools`,`oauth`,`temperature`,`files`,`streaming`,`vision`,`computer-use`,`local-auth`,`popular`]),zh.enum([`anthropic`,`gemini`,`openai-chat`,`openai-responses`,`openai-r1`,`ai-sdk`]),zh.enum([`anthropic`,`ai-sdk`,`ai-sdk-community`,`openai`,`openai-compatible`,`openai-r1`,`gemini`,`bedrock`,`custom`,`fetch`,`vertex`]);var Wg=K({rootPath:B().min(1),hint:B().min(1).optional(),associatedRemoteUrls:G(B().min(1)).optional(),latestGitCommitHash:B().min(1).optional(),latestGitBranchName:B().min(1).optional()});K({currentWorkspacePath:B().min(1).optional(),workspaces:q(B().min(1),Wg)});var Gg=[`current_state`,`boundary_analysis`,`interface_proposal`],Kg=xh(e=>e instanceof Date?e.toISOString():e,B().datetime()),qg=J([`pending`,`in_progress`,`blocked`,`completed`]),Jg=J([`queued`,`running`,`completed`,`failed`,`cancelled`,`interrupted`]),Yg=J([`draft`,`in_review`,`finalized`]),Xg=K({agentId:B(),role:J([`lead`,`teammate`]),description:B().optional(),status:J([`idle`,`running`,`stopped`])});K({agentId:B(),rolePrompt:B(),modelId:B().optional(),maxIterations:H().optional()});function Z(e){return xh(e=>e===null?void 0:e,e.optional())}K({agentId:B().min(1).describe(`Teammate identifier`),rolePrompt:B().min(1).describe(`System prompt describing teammate role`)}).strict(),K({agentId:B().min(1).describe(`Teammate identifier`),reason:Z(B().min(1)).describe(`Optional shutdown reason`)}),K({});var Zg={create:[`title`,`description`],list:[],claim:[`taskId`],complete:[`taskId`,`summary`],block:[`taskId`,`reason`]};K({action:J([`create`,`list`,`claim`,`complete`,`block`]),title:Z(B().min(1)).describe(`Task title`),description:Z(B().min(1)).describe(`Task details`),dependsOn:Z(G(B().describe(`Dependency task ID`))).describe(`Array of dependency task IDs`),assignee:Z(B().min(1)).describe(`Optional assignee`),status:Z(J([`pending`,`in_progress`,`blocked`,`completed`])).describe(`Optional task status filter`),taskId:Z(B()).describe(`Task ID`),summary:Z(B().min(1)).describe(`Completion summary`),reason:Z(B().min(1)).describe(`Blocking reason`)}).superRefine((e,t)=>{for(let n of Zg[e.action])e[n]===void 0&&t.addIssue({code:`custom`,path:[n],message:`Field "${n}" is required when action=${e.action}`})}),K({agentId:B().describe(`Teammate agent ID`),task:B().min(1).describe(`Task instructions for the teammate`),taskId:Z(B()).describe(`Optional shared task list ID`),runMode:Z(J([`sync`,`async`])).describe(`Execution mode: 'sync' blocks until the teammate finishes and returns the result (default if omitted); 'async' queues the run and returns a runId immediately — use team_await_runs to collect results later.`),continueConversation:Z(U()).describe(`If true, continue the teammate conversation; otherwise start fresh`)}),K({status:Z(J([`queued`,`running`,`completed`,`failed`,`cancelled`,`interrupted`])).describe(`Optional run status filter. Omit to include all statuses.`),agentId:Z(B().min(1)).describe(`Optional teammate ID filter. Omit to include all teammates.`),includeCompleted:Z(U()).describe(`Include completed/failed runs (default true)`)}),K({runId:B().min(1).describe(`Run ID`),reason:Z(B().min(1)).describe(`Optional cancellation reason`)}),K({runId:Z(B().min(1)).describe(`Optional async run ID to await. Omit to wait for all active async runs.`)}).strict(),K({toAgentId:B().min(1).describe(`Recipient agent ID`),subject:B().min(1).describe(`Message subject`),body:B().min(1).describe(`Message body`),taskId:Z(B().min(1)).describe(`Optional task ID context`)}),K({subject:B().min(1).describe(`Message subject`),body:B().min(1).describe(`Message body`),taskId:Z(B().min(1)).describe(`Optional task ID context`)}),K({unreadOnly:Z(U()).describe(`Only unread messages for read action (default true)`)}),K({kind:J([`progress`,`handoff`,`blocked`,`decision`,`done`,`error`]),summary:B().min(1).describe(`Update summary`),taskId:Z(B().min(1)).describe(`Optional task ID context`),evidence:Z(G(B().min(1))).describe(`Optional evidence links/snippets`),nextAction:Z(B().min(1)).describe(`Planned next step`)}),K({}),K({title:B().describe(`Outcome title`),requiredSections:G(B()).default(Gg).describe(`Required sections for finalization gate (defaults to current_state,boundary_analysis,interface_proposal)`)}),K({outcomeId:B().describe(`Outcome ID`),section:B().describe(`Section name`),sourceRunId:Z(B()).describe(`Optional source run ID`),content:B().describe(`Section fragment content`)}),K({fragmentId:B().describe(`Fragment ID`),approved:U().describe(`Review decision`)}),K({outcomeId:B().describe(`Outcome ID`)}),K({}),K({teamId:B(),teamName:B(),members:G(Xg),taskCounts:q(qg,H()),unreadMessages:H(),missionLogEntries:H(),activeRuns:H(),queuedRuns:H(),outcomeCounts:q(Yg,H())});var Qg=K({id:B(),title:B(),description:B(),status:qg,createdAt:Kg,updatedAt:Kg,createdBy:B(),assignee:B().optional(),dependsOn:G(B()),summary:B().optional(),isReady:U(),blockedBy:G(B())});dm(`action`,[K({action:Y(`create`),taskId:B(),status:qg,ignoredFields:G(B()).optional(),note:B().optional()}),K({action:Y(`list`),tasks:G(Qg)}),K({action:Y(`claim`),taskId:B(),status:qg,nextStep:B()}),K({action:Y(`complete`),taskId:B(),status:qg}),K({action:Y(`block`),taskId:B(),status:qg})]),K({agentId:B(),mode:J([`sync`,`async`]),status:J([`dispatched`,`running`,`queued`,`joined`]),dispatched:U(),message:B(),deduped:U().optional(),runId:B().optional(),text:B().optional(),iterations:H().optional()});var $g=K({textPreview:B(),iterations:H(),finishReason:B(),durationMs:H(),usage:K({inputTokens:H(),outputTokens:H(),cacheReadTokens:H().optional(),cacheWriteTokens:H().optional(),totalCost:H().optional()})});K({id:B(),agentId:B(),taskId:B().optional(),status:Jg,messagePreview:B(),priority:H(),retryCount:H(),maxRetries:H(),nextAttemptAt:Kg.optional(),continueConversation:U().optional(),startedAt:Kg,endedAt:Kg.optional(),leaseOwner:B().optional(),heartbeatAt:Kg.optional(),lastProgressAt:Kg.optional(),lastProgressMessage:B().optional(),currentActivity:B().optional(),error:B().optional(),resultSummary:$g.optional()}),K({id:B(),teamId:B(),fromAgentId:B(),toAgentId:B(),subject:B(),body:B(),taskId:B().optional(),sentAt:Kg,readAt:Kg.optional()}),K({id:B(),teamId:B(),title:B(),status:Yg,requiredSections:G(B()),createdBy:B(),createdAt:Kg,finalizedAt:Kg.optional()}),K({outcomeId:B(),status:Yg,requiredSections:G(B())}),K({agentId:B(),status:B()}),K({runId:B(),status:Jg}),K({id:B(),toAgentId:B()}),K({delivered:H()}),K({id:B()}),K({status:B()}),K({fragmentId:B(),status:B()}),K({outcomeId:B(),status:Yg});var e_;(e=>{e.TaskStart=`task_start`,e.TaskEnd=`task_end`,e.AgentEvent=`agent_event`,e.TeammateSpawned=`teammate_spawned`,e.TeammateShutdown=`teammate_shutdown`,e.TeamTaskUpdated=`team_task_updated`,e.TeamMessage=`team_message`,e.TeamMissionLog=`team_mission_log`,e.TeamTaskCompleted=`team_task_completed`,e.RunStarted=`run_started`,e.RunQueued=`run_queued`,e.RunProgress=`run_progress`,e.RunCompleted=`run_completed`,e.RunFailed=`run_failed`,e.RunCancelled=`run_cancelled`,e.RunInterrupted=`run_interrupted`,e.OutcomeCreated=`outcome_created`,e.OutcomeFragmentAttached=`outcome_fragment_attached`,e.OutcomeFragmentReviewed=`outcome_fragment_reviewed`,e.OutcomeFinalized=`outcome_finalized`})(e_||={});function t_(e){let t=O.useRef(!0);t.current&&(t.current=!1,e())}var n_=O.createContext(null);function r_(){let e=O.useContext(n_);if(e===null)throw Error(T(60));return e}var i_=(e,t)=>Object.is(e,t);function a_(e,t,n){return e==null||t==null?Object.is(e,t):n(e,t)}function o_(e,t,n){return!e||e.length===0?!1:e.some(e=>e!==void 0&&a_(t,e,n))}function s_(e,t,n){return!e||e.length===0?-1:e.findIndex(e=>e!==void 0&&a_(e,t,n))}function c_(e,t,n,r){let i=s_(e,r&&Array.isArray(t)?t[t.length-1]:t,n);return i===-1?null:i}function l_(e,t,n){return e.filter(e=>!a_(t,e,n))}function u_(e){if(e==null)return``;if(typeof e==`string`)return e;try{return JSON.stringify(e)}catch{return String(e)}}var Q=r();function d_(e){return e!=null&&e.length>0&&typeof e[0]==`object`&&e[0]!=null&&`items`in e[0]}function f_(e){if(!Array.isArray(e))return e!=null&&`null`in e;let t=e;if(d_(t)){for(let e of t)for(let t of e.items)if(t&&t.value==null&&t.label!=null)return!0;return!1}for(let e of t)if(e&&e.value==null&&e.label!=null)return!0;return!1}function p_(e,t){if(t&&e!=null)return t(e)??``;if(e&&typeof e==`object`){if(`label`in e&&e.label!=null)return String(e.label);if(`value`in e)return String(e.value)}return u_(e)}function m_(e,t){return t&&e!=null?t(e)??``:e&&typeof e==`object`&&`value`in e&&`label`in e?u_(e.value):u_(e)}function h_(e,t,n){function r(){return p_(e,n)}if(n&&e!=null)return n(e);if(e&&typeof e==`object`&&`label`in e&&e.label!=null)return e.label;if(t&&!Array.isArray(t))return t[e]??r();if(Array.isArray(t)){let n=t,i=d_(n)?n.flatMap(e=>e.items):n;if(typeof e!=`object`||!e){let t=i.find(t=>t.value===e);return t&&t.label!=null?t.label:r()}if(`value`in e){let t=i.find(t=>t&&t.value===e.value);if(t&&t.label!=null)return t.label}}return r()}function g_(e,t,n){return e.reduce((e,r,i)=>(i>0&&e.push(`, `),e.push((0,Q.jsx)(O.Fragment,{children:h_(r,t,n)},i)),e),[])}var $={id:e=>e.id,labelId:e=>e.labelId,modal:e=>e.modal,items:e=>e.items,itemToStringLabel:e=>e.itemToStringLabel,isItemEqualToValue:e=>e.isItemEqualToValue,value:e=>e.value,hasSelectedValue:e=>{let{value:t,multiple:n,itemToStringValue:r}=e;return t==null?!1:n&&Array.isArray(t)?t.length>0:m_(t,r)!==``},hasNullItemLabel:(e,t)=>t?f_(e.items):!1,open:e=>e.open,mounted:e=>e.mounted,forceMount:e=>e.forceMount,transitionStatus:e=>e.transitionStatus,openMethod:e=>e.openMethod,activeIndex:e=>e.activeIndex,selectedIndex:e=>e.selectedIndex,isActive:(e,t)=>e.activeIndex===t,isSelected:(e,t)=>{let n=e.isItemEqualToValue,r=e.value;return e.multiple?Array.isArray(r)&&r.some(e=>a_(t,e,n)):a_(t,r,n)},isSelectedByFocus:(e,t)=>e.selectedIndex===t,popupProps:e=>e.popupProps,triggerProps:e=>e.triggerProps,triggerElement:e=>e.triggerElement,positionerElement:e=>e.positionerElement,listElement:e=>e.listElement,popupSide:e=>e.popupSide,scrollUpArrowVisible:e=>e.scrollUpArrowVisible,scrollDownArrowVisible:e=>e.scrollDownArrowVisible,hasScrollArrows:e=>e.hasScrollArrows};function __(e,t,n=(e,t)=>e===t){return e.length===t.length&&e.every((e,r)=>n(e,t[r]))}function v_(e){let{id:t,value:n,defaultValue:r=null,onValueChange:a,open:o,defaultOpen:s=!1,onOpenChange:l,name:p,form:m,autoComplete:ee,disabled:h=!1,readOnly:g=!1,required:_=!1,modal:te=!0,actionsRef:v,inputRef:ne,onOpenChangeComplete:re,items:ie,multiple:y=!1,itemToStringLabel:se,itemToStringValue:b,isItemEqualToValue:x=i_,highlightItemOnHover:ce=!0,children:le}=e,{clearErrors:ue}=Me(),{setDirty:fe,setTouched:me,setFocused:he,validityData:ge,setFilled:_e,name:ye,disabled:be,validation:xe,validationMode:S}=Ie(),Se=et({id:t}),C=be||h,w=ye??p,[T,Ee]=c({controlled:n,default:y?r??Qe:r,name:`Select`,state:`value`}),[De,ke]=c({controlled:o,default:s,name:`Select`,state:`open`}),je=O.useRef([]),Ne=O.useRef([]),Fe=O.useRef(null),Re=O.useRef(null),ze=O.useRef(0),Be=O.useRef(null),Ve=O.useRef([]),Ue=O.useRef(!1),We=O.useRef(null),Ge=O.useRef(null),Ye=O.useRef({allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0}),Xe=O.useRef(!1),{mounted:nt,setMounted:rt,transitionStatus:it}=st(De),{openMethod:at,triggerProps:ot}=d(De),D=Pe(()=>new de({id:Se,labelId:void 0,modal:te,multiple:y,itemToStringLabel:se,itemToStringValue:b,isItemEqualToValue:x,value:T,open:De,mounted:nt,transitionStatus:it,items:ie,forceMount:!1,openMethod:null,activeIndex:null,selectedIndex:null,popupProps:{},triggerProps:{},triggerElement:null,positionerElement:null,listElement:null,popupSide:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1,hasScrollArrows:!1})).current,ct=E(D,$.activeIndex),lt=E(D,$.selectedIndex),ut=E(D,$.triggerElement),dt=E(D,$.positionerElement),ft=vt(at),pt=at??ft,mt=O.useMemo(()=>y?``:m_(T,b),[y,T,b]),ht=O.useMemo(()=>y&&Array.isArray(T)?T.map(e=>m_(e,b)):m_(T,b),[y,T,b]),gt=Ke(ut),yt=we(()=>ht);He(gt,Se,T,yt,!C,p);let bt=O.useRef(T),xt=y?Array.isArray(T)&&T.length>0:T!=null&&mt!==``;qe(()=>{_e(xt)},[xt,_e]),qe(function(){let e=T,t=!1;if(y){let n=Array.isArray(T)?T:[];t=n.length===0,e=n[n.length-1]}let n=t?-1:s_(Ve.current,e,x),r=n===-1?null:n;r===null&&(Ge.current=null),!De&&D.set(`selectedIndex`,r)},[y,De,T,x,D]);function St(e){let t=ge.initialValue;return Array.isArray(e)&&Array.isArray(t)?!__(e,t,(e,t)=>a_(e,t,x)):e!==t}ae(T,()=>{ue(w),fe(St(T)),xe.change(T)});let Ct=we((e,t)=>{l?.(e,t),!t.isCanceled&&(ke(e),!e&&(t.reason===`focus-out`||t.reason===`outside-press`)&&(me(!0),he(!1),S===`onBlur`&&xe.commit(T)))}),wt=we(()=>{rt(!1),D.update({activeIndex:null,openMethod:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1}),re?.(!1)});Ce({enabled:!v,open:De,ref:Fe,onComplete(){De||wt()}}),O.useImperativeHandle(v,()=>({unmount:wt}),[wt]);let Tt=we((e,t)=>{a?.(e,t),!t.isCanceled&&Ee(e)}),Dt=we(e=>{let t=Je(e.scrollHeight,e.clientHeight),n=Le(e.scrollTop,t),r=n>0,i=n<t;D.set(`scrollUpArrowVisible`,r),D.set(`scrollDownArrowVisible`,i)}),Ot=_t({open:De,onOpenChange:Ct,elements:{reference:ut,floating:dt}}),k=u(Ot,{enabled:!g&&!C,event:`mousedown`}),kt=f(Ot),At=i(Ot,{enabled:!g&&!C,listRef:je,activeIndex:ct,selectedIndex:lt,disabledIndices:Qe,onNavigate(e){e===null&&!De||D.set(`activeIndex`,e)},focusItemOnHover:ce}),jt=oe(Ot,{enabled:!g&&!C&&(De||!y),listRef:Ne,activeIndex:ct,selectedIndex:lt,disabledIndices:e=>Et(je.current[e]),onMatch(e){De?D.set(`activeIndex`,e):Tt(Ve.current[e],tt(pe))},onTyping(e){Ue.current=e}}),Mt=O.useMemo(()=>ve(jt.reference,At.reference,kt.reference,k.reference,ot),[k.reference,jt.reference,At.reference,kt.reference,ot]),Nt=O.useMemo(()=>ve(Te,jt.floating,At.floating,kt.floating),[jt.floating,At.floating,kt.floating]),Pt=At.item??Oe;t_(()=>{D.update({popupProps:Nt,triggerProps:Mt})}),D.useSyncedValues({id:Se,modal:te,multiple:y,value:T,open:De,mounted:nt,transitionStatus:it,popupProps:Nt,triggerProps:Mt,items:ie,itemToStringLabel:se,itemToStringValue:b,isItemEqualToValue:x,openMethod:pt});let Ft=O.useMemo(()=>({store:D,floatingContext:Ot,required:_,disabled:C,readOnly:g,multiple:y,highlightItemOnHover:ce,setValue:Tt,setOpen:Ct,listRef:je,popupRef:Fe,scrollHandlerRef:Re,handleScrollArrowVisibility:Dt,scrollArrowsMountedCountRef:ze,itemProps:Pt,valueRef:Be,valuesRef:Ve,labelsRef:Ne,typingRef:Ue,selectionRef:Ye,firstItemTextRef:We,selectedItemTextRef:Ge,validation:xe,onOpenChangeComplete:re,alignItemWithTriggerActiveRef:Xe,initialValueRef:bt}),[D,Ot,_,C,g,y,ce,Tt,Ct,Pt,xe,re,Dt]),It=Ze(ne,xe.inputRef),Lt=y?void 0:w,Rt=O.useMemo(()=>!y||!Array.isArray(T)||!w?null:T.map(e=>{let t=m_(e,b);return(0,Q.jsx)(`input`,{type:`hidden`,form:m,name:w,value:t,disabled:C},t)}),[y,T,m,w,b,C]);return(0,Q.jsxs)(n_.Provider,{value:Ft,children:[le,(0,Q.jsx)(`input`,{...xe.getValidationProps(C,{onFocus(){D.state.triggerElement?.focus({focusVisible:!0})},onChange(e){if(e.nativeEvent.defaultPrevented||C||g)return;let t=e.currentTarget.value,n=tt(pe,e.nativeEvent);function r(){if(y)return;let e=t.toLowerCase(),r=Ve.current.findIndex(t=>m_(t,b).toLowerCase()===e||p_(t,se).toLowerCase()===e);r===-1&&(r=Ve.current.findIndex((t,n)=>{let r=Ne.current[n];return r!=null&&r.toLowerCase()===e}));let i=Ve.current[r];i!=null&&Tt(i,n)}D.set(`forceMount`,!0),queueMicrotask(r)}}),id:Se&&Lt==null?`${Se}-hidden-input`:void 0,form:m,name:Lt,autoComplete:ee,value:mt,disabled:C,required:_&&!(y&&xt),readOnly:g,ref:It,style:w?$e:Ae,tabIndex:-1,"aria-hidden":!0,suppressHydrationWarning:!0}),Rt]})}function y_(e,t){return e??t}var b_=400,x_={...g,...C,popupSide:e=>e?{"data-popup-side":e}:null,value:()=>null},S_=O.forwardRef(function(e,t){let{render:n,className:r,id:i,disabled:a=!1,nativeButton:o=!0,style:c,...l}=e,{setTouched:u,setFocused:d,validationMode:f,state:p,disabled:m}=Ie(),{labelId:ee}=ke(),{store:h,setOpen:g,selectionRef:_,validation:te,readOnly:v,required:ne,alignItemWithTriggerActiveRef:re,disabled:ae}=r_(),y=m||ae||a,oe=E(h,$.open),se=E(h,$.mounted),b=E(h,$.value),x=E(h,$.triggerProps),ce=E(h,$.positionerElement),le=E(h,$.listElement),ue=E(h,$.popupSide),de=E(h,$.id),fe=E(h,$.labelId),me=E(h,$.hasSelectedValue),he=se&&ce?ue:null,ge=i??de,_e=y_(ee,fe);et({id:ge});let ye=Ke(ce),be=O.useRef(null),{getButtonProps:xe,buttonRef:S}=Be({disabled:y,native:o}),Se=h.useStateSetter(`triggerElement`),C=Ye(),Ce=Ye(),w=Ye();O.useEffect(()=>{if(oe)return w.start(b_,()=>{_.current.allowUnselectedMouseUp=!0,_.current.allowSelectedMouseUp=!0}),()=>{w.clear()};_.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0},Ce.clear()},[oe,_,Ce,w]);let we=ve(x,{id:ge,role:`combobox`,"aria-expanded":oe,"aria-haspopup":`listbox`,"aria-controls":oe?le?.id??ie(ce)?.id:void 0,"aria-labelledby":_e,"aria-readonly":v||void 0,"aria-required":ne||void 0,tabIndex:y?-1:0,onFocus(e){d(!0),oe&&re.current&&g(!1,tt(pe,e.nativeEvent)),C.start(0,()=>{h.set(`forceMount`,!0)})},onBlur(e){ct(ce,e.relatedTarget)||(u(!0),d(!1),f===`onBlur`&&te.commit(b))},onMouseDown(e){if(oe)return;let t=We(e.currentTarget);function n(e){if(!be.current)return;let t=e.target;ct(be.current,t)||ct(ye.current,t)||nt(e,be.current)||g(!1,tt(Ne,e))}Ce.start(0,()=>{t.addEventListener(`mouseup`,n,{once:!0})})}},l,xe),T=te.getValidationProps(y,we);T.role=`combobox`;let Te={...p,open:oe,disabled:y,value:b,readOnly:v,popupSide:he,placeholder:!me};return s(`button`,e,{ref:[t,be,S,Se],state:Te,stateAttributesMapping:x_,props:T})}),C_={value:()=>null},w_=O.forwardRef(function(e,t){let{className:n,render:r,children:i,placeholder:a,style:o,...c}=e,{store:l,valueRef:u}=r_(),d=E(l,$.value),f=E(l,$.items),p=E(l,$.itemToStringLabel),m=E(l,$.hasSelectedValue),ee=!m&&a!=null&&i==null,h=E(l,$.hasNullItemLabel,ee),g={value:d,placeholder:!m},_=null;return _=typeof i==`function`?i(d):i??(ee&&!h?a:Array.isArray(d)?g_(d,f,p):h_(d,f,p)),s(`span`,e,{state:g,ref:[t,u],props:[{children:_},c],stateAttributesMapping:C_})}),T_=O.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{store:o}=r_(),c={open:E(o,$.open)};return s(`span`,e,{state:c,ref:t,props:[{"aria-hidden":!0,children:`▼`},a],stateAttributesMapping:xe})}),E_=O.forwardRef(function(e,t){let{store:n}=r_(),r=E(n,$.mounted),i=E(n,$.forceMount);return r||i?(0,Q.jsx)(p,{ref:t,...e}):null}),D_=O.createContext(void 0);function O_(){let e=O.useContext(D_);if(!e)throw Error(T(59));return e}function k_(e,t){e&&Object.assign(e.style,t)}var A_={position:`relative`,maxHeight:`100%`,overflowX:`hidden`,overflowY:`auto`},j_={position:`fixed`},M_=O.forwardRef(function(e,t){let{anchor:n,className:r,render:i,positionMethod:a,side:s,align:c,sideOffset:l,alignOffset:u,collisionBoundary:d=`clipping-ancestors`,collisionPadding:f,arrowPadding:p,sticky:m,disableAnchorTracking:ee,alignItemWithTrigger:h=!0,collisionAvoidance:g=ce,style:_,...te}=e,{store:v,listRef:ne,labelsRef:re,alignItemWithTriggerActiveRef:ie,selectedItemTextRef:ae,valuesRef:y,initialValueRef:oe,popupRef:se,setValue:b,floatingContext:x}=r_(),le=E(v,$.open),ue=E(v,$.mounted),de=E(v,$.modal),fe=E(v,$.value),me=E(v,$.openMethod),ge=E(v,$.positionerElement),ve=E(v,$.triggerElement),ye=E(v,$.isItemEqualToValue),be=E(v,$.transitionStatus),xe=O.useRef(null),S=O.useRef(null),[Se,C]=O.useState(h),Ce=ue&&Se&&me!==`touch`;!ue&&Se!==h&&C(h),O.useImperativeHandle(ie,()=>Ce),ot((Ce||de)&&le,me===`touch`,ge,ve);let w=he({anchor:n,floatingRootContext:x,positionMethod:a,mounted:ue,side:s,sideOffset:l,align:c,alignOffset:u,arrowPadding:p,collisionBoundary:d,collisionPadding:f,sticky:m,disableAnchorTracking:ee??Ce,collisionAvoidance:g,keepMounted:!0}),T=Ce?`none`:w.side,Te=Ce?j_:w.positionerStyles,De={open:le,side:T,align:w.align,anchorHidden:w.anchorHidden};qe(()=>{v.set(`popupSide`,w.side)},[v,w.side]);let Oe=v.useStateSetter(`positionerElement`),ke=_e(e,De,{styles:Te,transitionStatus:be,props:te,refs:[t,Oe],hidden:!ue,inert:!le}),Ae=O.useRef(0),je=we(e=>{if(y.current.length===0)return;let t=Ae.current;if(Ae.current=e.size,e.size===t)return;let n=tt(pe);if(t!==0&&!v.state.multiple&&fe!==null&&s_(y.current,fe,ye)===-1){let e=oe.current,t=e!=null&&s_(y.current,e,ye)!==-1?e:null;b(t,n),t===null&&(v.set(`selectedIndex`,null),ae.current=null)}if(t!==0&&v.state.multiple&&Array.isArray(fe)){let e=fe.filter(e=>s_(y.current,e,ye)!==-1);e.length!==fe.length&&(b(e,n),e.length===0&&(v.set(`selectedIndex`,null),ae.current=null))}if(le&&Ce){v.update({scrollUpArrowVisible:!1,scrollDownArrowVisible:!1});let e={height:``};k_(ge,e),k_(se.current,e)}}),Me=O.useMemo(()=>({...w,side:T,alignItemWithTriggerActive:Ce,setControlledAlignItemWithTrigger:C,scrollUpArrowRef:xe,scrollDownArrowRef:S}),[w,T,Ce,C]);return(0,Q.jsx)(Ee,{elementsRef:ne,labelsRef:re,onMapChange:je,children:(0,Q.jsxs)(D_.Provider,{value:Me,children:[ue&&de&&(0,Q.jsx)(Ve,{inert:o(!le),cutout:ve}),ke]})})}),N_={..._,...Se},P_=O.forwardRef(function(e,t){let{render:n,className:r,style:i,finalFocus:o,...c}=e,{store:l,popupRef:u,onOpenChangeComplete:d,setOpen:f,valueRef:p,firstItemTextRef:m,selectedItemTextRef:ee,multiple:g,handleScrollArrowVisibility:_,scrollHandlerRef:te,listRef:v,highlightItemOnHover:re,floatingContext:ie}=r_(),{side:ae,align:oe,alignItemWithTriggerActive:b,isPositioned:x,setControlledAlignItemWithTrigger:ce}=O_(),le=it(!0)!=null,ue=ye(),{nonce:de,disableStyleElements:fe}=Ge(),pe=E(l,$.id),me=E(l,$.open),he=E(l,$.openMethod),ge=E(l,$.mounted),_e=E(l,$.popupProps),ve=E(l,$.transitionStatus),xe=E(l,$.triggerElement),S=E(l,$.positionerElement),Se=E(l,$.listElement),C=O.useRef(!1),T=O.useRef(!1),Te=O.useRef({}),Ee=Re(),De=we(e=>{if(!S||!u.current||!T.current)return;let t=S.style.top===`0px`,n=S.style.bottom===`0px`;if(C.current||!b||!t&&!n){_(e);return}let r=L_(S),i=R_(S.getBoundingClientRect().height,`y`,r),a=We(S),o=be(S),s=o.getComputedStyle(S),c=parseFloat(s.marginTop),l=parseFloat(s.marginBottom),d=F_(o.getComputedStyle(u.current)),f=Math.min(a.documentElement.clientHeight-c-l,d),p=e.scrollTop,m=I_(e),ee=null,h=e=>{S.style.height=`${e}px`},g=t?m-p:p,te=Math.min(i+g,f);if(g<=1){let n=w(g,0,f-i);n>0&&h(i+n),e.scrollTop=t?m:0,f-(i+n)<=1&&(C.current=!0),_(e);return}f-te>1?ee=t?1/0:0:n&&p<m&&(ee=p-(g-(i+g-f)));let v=Math.ceil(te);if(v!==0&&h(v),ee!=null){let t=w(ee,0,I_(e));Math.abs(e.scrollTop-t)>1&&(e.scrollTop=t)}v>=f-1&&(C.current=!0),_(e)});O.useImperativeHandle(te,()=>De,[De]),Ce({open:me,ref:u,onComplete(){me&&d?.(!0)}});let Oe={open:me,transitionStatus:ve,side:ae,align:oe};qe(()=>{!S||!u.current||Object.keys(Te.current).length||(Te.current={top:S.style.top||`0`,left:S.style.left||`0`,right:S.style.right,height:S.style.height,bottom:S.style.bottom,minHeight:S.style.minHeight,maxHeight:S.style.maxHeight,marginTop:S.style.marginTop,marginBottom:S.style.marginBottom})},[u,S]),qe(()=>{me||b||(T.current=!1,C.current=!1,k_(S,Te.current))},[me,b,S,u]),qe(()=>{let e=u.current;if(!me||!xe||!S||!e||b&&!x||l.state.transitionStatus===`ending`)return;if(T.current=!0,e.style.removeProperty(`--transform-origin`),!b){Ee.request(()=>_(Se||e));return}let t=V_(e);try{let t=ee.current;t?.isConnected||(t=!$.hasSelectedValue(l.state)&&m.current?.isConnected?m.current:null);let n=p.current,r=be(S),i=r.getComputedStyle(S),a=r.getComputedStyle(e),o=We(xe),s=L_(xe),c=z_(xe.getBoundingClientRect(),s),u=z_(S.getBoundingClientRect(),s),d=c.height,f=Se||e,h=f.scrollHeight,g=parseFloat(a.borderBottomWidth),te=parseFloat(i.marginTop)||10,ne=parseFloat(i.marginBottom)||10,ie=parseFloat(i.minHeight)||100,ae=F_(a),y=o.documentElement.clientHeight-te-ne,oe=o.documentElement.clientWidth,b=y-c.bottom+d,x,le=ue===`rtl`?c.right-u.width:c.left,de=0;if(t&&n){let e=z_(n.getBoundingClientRect(),s);x=z_(t.getBoundingClientRect(),s),le=u.left+(ue===`rtl`?e.right-x.right:e.left-x.left);let r=e.top-c.top+e.height/2;de=x.top-u.top+x.height/2-r}let fe=b+de+ne+g,pe=Math.min(y,fe),me=y-te-ne,he=fe-pe,ge=oe-5;S.style.left=`${w(le,5,ge-u.width)}px`,S.style.height=`${pe}px`,S.style.maxHeight=`none`,S.style.marginTop=`${te}px`,S.style.marginBottom=`${ne}px`,e.style.height=`100%`;let _e=I_(f),ve=he>=_e-1;ve&&(pe=Math.min(y,u.height)-(he-_e));let ye=c.top<20||c.bottom>y-20||Math.ceil(pe)+1<Math.min(h,ie),Ce=(r.visualViewport?.scale??1)!==1&&se;if(ye||Ce){k_(S,Te.current),ce(!1);return}let we=Math.max(ie,pe);if(ve){let e=Math.max(0,y-fe);S.style.top=u.height>=me?`0`:`${e}px`,S.style.height=`${pe}px`,f.scrollTop=I_(f)}else S.style.bottom=`0`,f.scrollTop=he;if(x){let t=u.top,n=u.height,r=x.top+x.height/2,i=w(n>0?(r-t)/n*100:50,0,100);e.style.setProperty(`--transform-origin`,`50% ${i}%`)}(we===y||pe>=ae)&&(C.current=!0),_(f),re&&l.state.selectedIndex===null&&l.state.activeIndex===null&&v.current[0]!=null&&l.set(`activeIndex`,0)}finally{t()}},[l,me,S,xe,p,m,ee,u,_,b,ce,Ee,Se,v,re,ue,x]),O.useEffect(()=>{if(!b||!S||!me)return;let e=be(S);function t(e){f(!1,tt(ne,e))}return Ue(e,`resize`,t)},[f,b,S,me]);let ke={...Se?{role:`presentation`,"aria-orientation":void 0}:{role:`listbox`,"aria-multiselectable":g||void 0,id:`${pe}-list`},onKeyDown(e){le&&a.has(e.key)&&e.stopPropagation()},onScroll(e){Se||De(e.currentTarget)},...b&&{style:Se?{height:`100%`}:A_},className:!Se&&b?Xe.className:void 0},Ae=s(`div`,e,{ref:[t,u],state:Oe,stateAttributesMapping:N_,props:[_e,ke,h(ve),c]});return(0,Q.jsxs)(O.Fragment,{children:[!fe&&Xe.getElement(de),(0,Q.jsx)(y,{context:ie,modal:!1,disabled:!ge,openInteractionType:he,returnFocus:o,restoreFocus:!0,children:Ae})]})});function F_(e){let t=e.maxHeight;return t.endsWith(`px`)&&parseFloat(t)||1/0}function I_(e){return Je(e.scrollHeight,e.clientHeight)}function L_(e){return me.getScale(e)}function R_(e,t,n){return e/n[t]}function z_(e,t){return b({x:R_(e.x,`x`,t),y:R_(e.y,`y`,t),width:R_(e.width,`x`,t),height:R_(e.height,`y`,t)})}var B_=[[`transform`,`none`],[`scale`,`1`],[`translate`,`0 0`]];function V_(e){let{style:t}=e,n={};for(let[e,r]of B_)n[e]=t.getPropertyValue(e),t.setProperty(e,r,`important`);return()=>{for(let[e]of B_){let r=n[e];r?t.setProperty(e,r):t.removeProperty(e)}}}var H_=O.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{store:o,scrollHandlerRef:c,multiple:l}=r_(),{alignItemWithTriggerActive:u}=O_(),d=E(o,$.hasScrollArrows),f=E(o,$.openMethod),p={id:`${E(o,$.id)}-list`,role:`listbox`,"aria-multiselectable":l||void 0,onScroll(e){c.current?.(e.currentTarget)},...u&&{style:A_},className:d&&f!==`touch`?Xe.className:void 0},m=o.useStateSetter(`listElement`);return s(`div`,e,{ref:[t,m],props:[p,a]})}),U_=O.createContext(void 0);function W_(){let e=O.useContext(U_);if(!e)throw Error(T(57));return e}var G_=O.memo(O.forwardRef(function(e,t){let{render:n,className:r,style:i,value:a=null,label:o,disabled:c=!1,nativeButton:l=!1,...u}=e,d=O.useRef(null),f=le({guess:!0,label:o,textRef:d}),{store:p,itemProps:m,setOpen:ee,setValue:h,selectionRef:g,typingRef:_,valuesRef:te,multiple:v,selectedItemTextRef:ne,disabled:re,readOnly:ie}=r_(),ae=re||c,y=E(p,$.isActive,f.index),oe=E(p,$.open),se=E(p,$.isSelected,a),b=E(p,$.isSelectedByFocus,f.index),x=E(p,$.isItemEqualToValue),ce=f.index,de=O.useRef(null);qe(()=>{let e=te.current;return e[ce]=a,()=>{delete e[ce]}},[ce,a,te]),qe(()=>{let e=p.state.value,t=e;v&&Array.isArray(e)&&(t=e.length>0?e[e.length-1]:void 0),t!==void 0&&a_(a,t,x)&&(p.set(`selectedIndex`,ce),d.current&&(ne.current=d.current))},[ce,v,x,p,a,ne]);let fe=O.useRef(`mouse`),pe=O.useRef(!1),{getButtonProps:me,buttonRef:he}=Be({disabled:ae,focusableWhenDisabled:!0,native:l,composite:!0}),ge={disabled:ae,selected:se,highlighted:y};function _e(e){if(re||ie)return;let t=p.state.value;if(v){let n=Array.isArray(t)?t:[],r=se?l_(n,a,x):[...n,a];h(r,tt(ue,e))}else h(a,tt(ue,e)),ee(!1,tt(ue,e))}function ve(){g.current.dragY=0}let ye={role:`option`,"aria-selected":se,tabIndex:oe&&y?0:-1,onKeyDown(e){p.set(`activeIndex`,ce),e.key===` `&&_.current&&e.preventDefault()},onClick(e){let t=fe.current!==`touch`,n=e.nativeEvent.pointerType,r=t&&S(e.nativeEvent)&&(n!==void 0||y),i=t&&!r&&!pe.current;pe.current=!1,!(ae||i)&&_e(e.nativeEvent)},onPointerEnter(e){fe.current=e.pointerType},onPointerMove(e){if(e.pointerType===`mouse`&&e.buttons===1){let t=g.current;t.dragY+=e.movementY,t.dragY**2>=64&&(t.allowUnselectedMouseUp=!0)}},onPointerDown(e){fe.current=e.pointerType,pe.current=!0,ve()},onMouseUp(){if(ve(),ae||fe.current===`touch`||pe.current)return;let e=!g.current.allowSelectedMouseUp&&se,t=!g.current.allowUnselectedMouseUp&&!se;e||t||(pe.current=!0,de.current?.click(),pe.current=!1)}},be=s(`div`,e,{ref:[he,t,f.ref,de],state:ge,props:[m,ye,u,me]}),xe=O.useMemo(()=>({selected:se,index:ce,textRef:d,selectedByFocus:b}),[se,ce,d,b]);return(0,Q.jsx)(U_.Provider,{value:xe,children:be})})),K_=O.forwardRef(function(e,t){let{selected:n}=W_();return e.keepMounted||n?(0,Q.jsx)(q_,{...e,ref:t}):null}),q_=O.memo(O.forwardRef((e,t)=>{let{render:n,className:r,style:i,keepMounted:a,...o}=e,{selected:c}=W_(),l=O.useRef(null),{transitionStatus:u,setMounted:d}=st(c),f=s(`span`,e,{ref:[t,l],state:{selected:c,transitionStatus:u},props:[{"aria-hidden":!0,children:`✔️`},o],stateAttributesMapping:Se});return Ce({open:c,ref:l,onComplete(){c||d(!1)}}),f})),J_=O.memo(O.forwardRef(function(e,t){let{index:n,textRef:r,selectedByFocus:i}=W_(),{firstItemTextRef:a,selectedItemTextRef:o}=r_(),{render:c,className:l,style:u,...d}=e,f=O.useCallback(e=>{e&&(n===0&&(a.current=e),i&&(o.current=e))},[a,o,n,i]);return s(`div`,e,{ref:[f,t,r],props:d})})),Y_=O.forwardRef(function(e,t){let{render:n,className:r,style:i,direction:a,keepMounted:o,...c}=e,l=a===`up`,{store:u,popupRef:d,listRef:f,handleScrollArrowVisibility:p,scrollArrowsMountedCountRef:m}=r_(),{side:ee,scrollDownArrowRef:h,scrollUpArrowRef:g}=O_(),_=l?$.scrollUpArrowVisible:$.scrollDownArrowVisible,te=E(u,_),v=E(u,$.openMethod),ne=te&&v!==`touch`,re=Ye(),ie=l?g:h,{mounted:ae,transitionStatus:y,setMounted:oe}=st(ne);qe(()=>(m.current+=1,u.set(`hasScrollArrows`,!0),()=>{m.current=Math.max(0,m.current-1),m.current===0&&u.set(`hasScrollArrows`,!1)}),[u,m]),Ce({open:ne,ref:ie,onComplete(){ne||oe(!1)}});let se=s(`div`,e,{ref:[t,ie],state:{direction:a,visible:ne,side:ee,transitionStatus:y},props:[{"aria-hidden":!0,children:l?`▲`:`▼`,style:{position:`absolute`},onMouseMove(e){if(e.movementX===0&&e.movementY===0||re.isStarted())return;u.set(`activeIndex`,null);function t(){let e=u.state.listElement??d.current;if(!e)return;u.set(`activeIndex`,null),p(e);let n=Je(e.scrollHeight,e.clientHeight),r=Le(e.scrollTop,n),i=r===(l?0:n),a=f.current;if(r!==e.scrollTop&&(e.scrollTop=r),i){re.clear();return}if(a.length>0){let t=ie.current?.offsetHeight||0;e.scrollTop=X_(a,l,r,e.clientHeight,t,n)}re.start(40,t)}re.start(40,t)},onMouseLeave(){re.clear()}},c],stateAttributesMapping:Se});return ae||o?se:null});function X_(e,t,n,r,i,a){if(t){let t=0,r=n+i-1;for(let n=0;n<e.length;n+=1){let i=e[n];if(i&&i.offsetTop>=r){t=n;break}}let o=Math.max(0,t-1),s=e[o];return o<t&&s?Le(s.offsetTop-i,a):0}let o=e.length-1,s=n+r-i+1;for(let t=0;t<e.length;t+=1){let n=e[t];if(n&&n.offsetTop+n.offsetHeight>s){o=Math.max(0,t-1);break}}let c=Math.min(e.length-1,o+1),l=e[c];return c>o&&l?Le(l.offsetTop+l.offsetHeight-r+i,a):a}var Z_=O.forwardRef(function(e,t){return(0,Q.jsx)(Y_,{...e,ref:t,direction:`down`})}),Q_=O.forwardRef(function(e,t){return(0,Q.jsx)(Y_,{...e,ref:t,direction:`up`})}),$_=v_;function ev({className:e,...t}){return(0,Q.jsx)(w_,{"data-slot":`select-value`,className:D(`flex flex-1 text-left`,e),...t})}function tv({className:e,size:t=`default`,children:n,...r}){return(0,Q.jsxs)(S_,{"data-slot":`select-trigger`,"data-size":t,className:D(`flex w-fit cursor-pointer items-center justify-between gap-1.5 rounded-lg border border-input bg-transparent py-2 pr-2 pl-2.5 text-sm whitespace-nowrap transition-colors outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground data-[size=default]:h-8 data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)] *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:bg-input/30 dark:hover:bg-input/50 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`,e),...r,children:[n,(0,Q.jsx)(T_,{render:(0,Q.jsx)(yt,{className:`pointer-events-none size-4 text-muted-foreground`})})]})}function nv({className:e,children:t,side:n=`bottom`,sideOffset:r=4,align:i=`center`,alignOffset:a=0,alignItemWithTrigger:o=!0,...s}){return(0,Q.jsx)(E_,{children:(0,Q.jsx)(M_,{side:n,sideOffset:r,align:i,alignOffset:a,alignItemWithTrigger:o,className:`isolate z-50`,children:(0,Q.jsxs)(P_,{"data-slot":`select-content`,"data-align-trigger":o,className:D(`relative isolate z-50 max-h-(--available-height) w-(--anchor-width) min-w-36 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[align-trigger=true]:animate-none 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-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),...s,children:[(0,Q.jsx)(iv,{}),(0,Q.jsx)(H_,{children:t}),(0,Q.jsx)(av,{})]})})})}function rv({className:e,children:t,...n}){return(0,Q.jsxs)(G_,{"data-slot":`select-item`,className:D(`relative flex w-full cursor-pointer items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:cursor-not-allowed data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2`,e),...n,children:[(0,Q.jsx)(J_,{className:`flex flex-1 shrink-0 gap-2 whitespace-nowrap`,children:t}),(0,Q.jsx)(K_,{render:(0,Q.jsx)(`span`,{className:`pointer-events-none absolute right-2 flex size-4 items-center justify-center`}),children:(0,Q.jsx)(te,{className:`pointer-events-none`})})]})}function iv({className:e,...t}){return(0,Q.jsx)(Q_,{"data-slot":`select-scroll-up-button`,className:D(`top-0 z-10 flex w-full cursor-pointer items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4`,e),...t,children:(0,Q.jsx)(bt,{})})}function av({className:e,...t}){return(0,Q.jsx)(Z_,{"data-slot":`select-scroll-down-button`,className:D(`bottom-0 z-10 flex w-full cursor-pointer items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4`,e),...t,children:(0,Q.jsx)(yt,{})})}function ov(e){return ht(`dialog`,e)}function sv({...e}){return(0,Q.jsx)(ov,{"data-slot":`dialog`,...e})}function cv({...e}){return(0,Q.jsx)(Tt,{"data-slot":`dialog-trigger`,...e})}function lv({...e}){return(0,Q.jsx)(ft,{"data-slot":`dialog-portal`,...e})}function uv({className:e,...t}){return(0,Q.jsx)(pt,{"data-slot":`dialog-overlay`,className:D(`fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0`,e),...t})}function dv({className:e,children:t,showCloseButton:n=!0,...r}){return(0,Q.jsxs)(lv,{children:[(0,Q.jsx)(uv,{}),(0,Q.jsxs)(mt,{"data-slot":`dialog-content`,className:D(`fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-background p-4 text-sm ring-1 ring-foreground/10 duration-100 outline-none sm:max-w-sm 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),...r,children:[t,n&&(0,Q.jsxs)(lt,{"data-slot":`dialog-close`,render:(0,Q.jsx)(rt,{variant:`ghost`,className:`absolute top-2 right-2`,size:`icon-sm`}),children:[(0,Q.jsx)(wt,{}),(0,Q.jsx)(`span`,{className:`sr-only`,children:`Close`})]})]})]})}function fv({className:e,...t}){return(0,Q.jsx)(`div`,{"data-slot":`dialog-header`,className:D(`flex flex-col gap-2`,e),...t})}function pv({className:e,showCloseButton:t=!1,children:n,...r}){return(0,Q.jsxs)(`div`,{"data-slot":`dialog-footer`,className:D(`-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 sm:flex-row sm:justify-end`,e),...r,children:[n,t&&(0,Q.jsx)(lt,{render:(0,Q.jsx)(rt,{variant:`outline`}),children:`Close`})]})}function mv({className:e,...t}){return(0,Q.jsx)(gt,{"data-slot":`dialog-title`,className:D(`text-base leading-none font-medium`,e),...t})}function hv({className:e,...t}){return(0,Q.jsx)(dt,{"data-slot":`dialog-description`,className:D(`text-sm text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground`,e),...t})}function gv({className:e,...t}){return(0,Q.jsx)(`textarea`,{"data-slot":`textarea`,className:D(`flex field-sizing-content min-h-16 w-full rounded-lg border border-input bg-transparent px-2.5 py-2 text-base transition-colors outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40`,e),...t})}function _v({className:e,...t}){return(0,Q.jsx)(`div`,{"data-slot":`input-group`,role:`group`,className:D(`group/input-group relative flex h-8 w-full min-w-0 items-center rounded-lg border border-input transition-colors outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-disabled:bg-input/50 has-disabled:opacity-50 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:bg-input/30 dark:has-disabled:bg-input/80 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5`,e),...t})}var vv=fe(`flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4`,{variants:{align:{"inline-start":`order-first pl-2 has-[>button]:ml-[-0.3rem] has-[>kbd]:ml-[-0.15rem]`,"inline-end":`order-last pr-2 has-[>button]:mr-[-0.3rem] has-[>kbd]:mr-[-0.15rem]`,"block-start":`order-first w-full justify-start px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2`,"block-end":`order-last w-full justify-start px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2`}},defaultVariants:{align:`inline-start`}});function yv({className:e,align:t=`inline-start`,...n}){return(0,Q.jsx)(`div`,{role:`group`,"data-slot":`input-group-addon`,"data-align":t,className:D(vv({align:t}),e),onClick:e=>{e.target.closest(`button`)||e.currentTarget.parentElement?.querySelector(`input`)?.focus()},...n})}var bv=fe(`flex items-center gap-2 text-sm shadow-none`,{variants:{size:{xs:`h-6 gap-1 rounded-[calc(var(--radius)-3px)] px-1.5 [&>svg:not([class*='size-'])]:size-3.5`,sm:``,"icon-xs":`size-6 rounded-[calc(var(--radius)-3px)] p-0 has-[>svg]:p-0`,"icon-sm":`size-8 p-0 has-[>svg]:p-0`}},defaultVariants:{size:`xs`}});function xv({className:e,type:t=`button`,variant:n=`ghost`,size:r=`xs`,...i}){return(0,Q.jsx)(rt,{type:t,"data-size":r,variant:n,className:D(bv({size:r}),e),...i})}function Sv({className:e,...t}){return(0,Q.jsx)(De,{"data-slot":`input-group-control`,className:D(`flex-1 rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:ring-0 disabled:bg-transparent aria-invalid:ring-0 dark:bg-transparent dark:disabled:bg-transparent`,e),...t})}function Cv({className:e,...t}){return(0,Q.jsx)(gv,{"data-slot":`input-group-control`,className:D(`flex-1 resize-none rounded-none border-0 bg-transparent py-2 shadow-none ring-0 focus-visible:ring-0 disabled:bg-transparent aria-invalid:ring-0 dark:bg-transparent dark:disabled:bg-transparent`,e),...t})}function wv({className:e,...t}){return(0,Q.jsx)(`label`,{"data-slot":`label`,className:D(`flex items-center gap-2 text-base leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50`,e),...t})}export{l_ as A,wt as B,d_ as C,i_ as D,a_ as E,rg as F,_t as G,St as H,eg as I,Eg as L,t_ as M,wg as N,s_ as O,Cg as P,kg as R,f_ as S,m_ as T,xt as U,Ct as V,yt as W,rv as _,Sv as a,y_ as b,sv as c,pv as d,fv as f,nv as g,$_ as h,xv as i,o_ as j,c_ as k,dv as l,cv as m,_v as n,Cv as o,mv as p,yv as r,gv as s,wv as t,hv as u,tv as v,p_ as w,__ as x,ev as y,yg as z};
76
+ The run_commands tool remains available in plan mode strictly for read-only inspection -- listing files, searching (grep), reading configs, inspecting git history and diffs, checking tool versions, and the like. Never use it to change anything: no creating, modifying, or deleting files, no writing scripts that make changes, and no state-changing commands (installs, migrations, database or schema changes, container commands that mutate state, etc.). File-editing commands (rm/mv/cp, in-place edits like sed -i, output redirection to files outside /tmp, git commands that change the working tree, package installs) are hard-blocked in plan mode: they are not executed and return a tool error instead, so do not attempt them. If the task requires a mutation, put it in the plan; it happens only after the user switches to act mode.`;`${Og}`,`${Og}`;var kg=`anthropic/claude-sonnet-5`,Ag=K({models:G(K({id:B(),temperature:H().optional(),maxTokens:H().optional(),contextWindow:H().optional(),inputPrice:H().optional(),outputPrice:H().optional(),supportsImages:U().optional()})).optional(),openAiBaseUrl:B().optional(),openAiHeaders:q(B(),B()).optional(),azureApiVersion:B().optional(),azureIdentity:U().optional()}),jg=K({id:B(),thinkingBudgetTokens:H().optional()}),Mg=K({name:B(),baseModelId:B(),thinkingBudgetTokens:H().optional()}),Ng=K({models:G(jg).optional(),customModels:G(Mg).optional(),awsRegion:B().optional(),awsUseCrossRegionInference:U().optional(),awsUseGlobalInference:U().optional(),awsBedrockUsePromptCache:U().optional(),awsBedrockEndpoint:B().optional()}),Pg=K({models:G(K({id:B()})).optional()}),Fg=K({models:G(K({id:B(),thinkingBudgetTokens:H().optional()})).optional(),vertexProjectId:B().optional(),vertexRegion:B().optional()}),Ig=K({models:G(K({id:B(),thinkingBudgetTokens:H().optional(),promptCachingEnabled:U().optional()})).optional(),baseUrl:B().optional()}),Lg=K({models:G(K({id:B(),thinkingBudgetTokens:H().optional()})).optional(),baseUrl:B().optional()}),Rg=K({OpenAiCompatible:Ag.optional(),AwsBedrock:Ng.optional(),Cline:Pg.optional(),Vertex:Fg.optional(),LiteLLM:Ig.optional(),Anthropic:Lg.optional()}),zg=K({id:B()}),Bg=K({name:B(),url:B(),alwaysEnabled:U().optional(),headers:q(B(),B()).optional()}),Vg=K({alwaysEnabled:U(),name:B(),contents:B()}),Hg=K({bucket:B(),accessKeyId:B(),secretAccessKey:B(),region:B().optional(),endpoint:B().optional(),accountId:B().optional()}),Ug=K({promptUploading:K({enabled:U().optional(),type:sm([Y(`s3_access_keys`),Y(`r2_access_keys`),Y(`azure_access_keys`)]).optional(),s3AccessSettings:Hg.optional(),r2AccessSettings:Hg.optional(),azureAccessSettings:Hg.optional()}).optional()});K({version:B(),providerSettings:Rg.optional(),telemetryEnabled:U().optional(),kanbanEnabled:U().optional(),mcpMarketplaceEnabled:U().optional(),allowedMCPServers:G(zg).optional(),remoteMCPServers:G(Bg).optional(),blockPersonalRemoteMCPServers:U().optional(),yoloModeAllowed:U().optional(),openTelemetryEnabled:U().optional(),openTelemetryMetricsExporter:B().optional(),openTelemetryLogsExporter:B().optional(),openTelemetryOtlpProtocol:B().optional(),openTelemetryOtlpEndpoint:B().optional(),openTelemetryOtlpHeaders:q(B(),B()).optional(),openTelemetryOtlpMetricsProtocol:B().optional(),openTelemetryOtlpMetricsEndpoint:B().optional(),openTelemetryOtlpMetricsHeaders:q(B(),B()).optional(),openTelemetryOtlpLogsProtocol:B().optional(),openTelemetryOtlpLogsEndpoint:B().optional(),openTelemetryOtlpLogsHeaders:q(B(),B()).optional(),openTelemetryMetricExportInterval:H().optional(),openTelemetryOtlpInsecure:U().optional(),openTelemetryLogBatchSize:H().optional(),openTelemetryLogBatchTimeout:H().optional(),openTelemetryLogMaxQueueSize:H().optional(),enterpriseTelemetry:Ug.optional(),globalRules:G(Vg).optional(),globalWorkflows:G(Vg).optional()}),q(B(),B()),zh.enum([`reasoning`,`prompt-cache`,`tools`,`provider-tools`,`oauth`,`temperature`,`files`,`streaming`,`vision`,`computer-use`,`local-auth`,`popular`]),zh.enum([`anthropic`,`gemini`,`openai-chat`,`openai-responses`,`openai-r1`,`ai-sdk`]),zh.enum([`anthropic`,`ai-sdk`,`ai-sdk-community`,`openai`,`openai-compatible`,`openai-r1`,`gemini`,`bedrock`,`custom`,`fetch`,`vertex`]);var Wg=K({rootPath:B().min(1),hint:B().min(1).optional(),associatedRemoteUrls:G(B().min(1)).optional(),latestGitCommitHash:B().min(1).optional(),latestGitBranchName:B().min(1).optional()});K({currentWorkspacePath:B().min(1).optional(),workspaces:q(B().min(1),Wg)});var Gg=[`current_state`,`boundary_analysis`,`interface_proposal`],Kg=xh(e=>e instanceof Date?e.toISOString():e,B().datetime()),qg=J([`pending`,`in_progress`,`blocked`,`completed`]),Jg=J([`queued`,`running`,`completed`,`failed`,`cancelled`,`interrupted`]),Yg=J([`draft`,`in_review`,`finalized`]),Xg=K({agentId:B(),role:J([`lead`,`teammate`]),description:B().optional(),status:J([`idle`,`running`,`stopped`])});K({agentId:B(),rolePrompt:B(),modelId:B().optional(),maxIterations:H().optional()});function Z(e){return xh(e=>e===null?void 0:e,e.optional())}K({agentId:B().min(1).describe(`Teammate identifier`),rolePrompt:B().min(1).describe(`System prompt describing teammate role`)}).strict(),K({agentId:B().min(1).describe(`Teammate identifier`),reason:Z(B().min(1)).describe(`Optional shutdown reason`)}),K({});var Zg={create:[`title`,`description`],list:[],claim:[`taskId`],complete:[`taskId`,`summary`],block:[`taskId`,`reason`]};K({action:J([`create`,`list`,`claim`,`complete`,`block`]),title:Z(B().min(1)).describe(`Task title`),description:Z(B().min(1)).describe(`Task details`),dependsOn:Z(G(B().describe(`Dependency task ID`))).describe(`Array of dependency task IDs`),assignee:Z(B().min(1)).describe(`Optional assignee`),status:Z(J([`pending`,`in_progress`,`blocked`,`completed`])).describe(`Optional task status filter`),taskId:Z(B()).describe(`Task ID`),summary:Z(B().min(1)).describe(`Completion summary`),reason:Z(B().min(1)).describe(`Blocking reason`)}).superRefine((e,t)=>{for(let n of Zg[e.action])e[n]===void 0&&t.addIssue({code:`custom`,path:[n],message:`Field "${n}" is required when action=${e.action}`})}),K({agentId:B().describe(`Teammate agent ID`),task:B().min(1).describe(`Task instructions for the teammate`),taskId:Z(B()).describe(`Optional shared task list ID`),runMode:Z(J([`sync`,`async`])).describe(`Execution mode: 'sync' blocks until the teammate finishes and returns the result (default if omitted); 'async' queues the run and returns a runId immediately — use team_await_runs to collect results later.`),continueConversation:Z(U()).describe(`If true, continue the teammate conversation; otherwise start fresh`)}),K({status:Z(J([`queued`,`running`,`completed`,`failed`,`cancelled`,`interrupted`])).describe(`Optional run status filter. Omit to include all statuses.`),agentId:Z(B().min(1)).describe(`Optional teammate ID filter. Omit to include all teammates.`),includeCompleted:Z(U()).describe(`Include completed/failed runs (default true)`)}),K({runId:B().min(1).describe(`Run ID`),reason:Z(B().min(1)).describe(`Optional cancellation reason`)}),K({runId:Z(B().min(1)).describe(`Optional async run ID to await. Omit to wait for all active async runs.`)}).strict(),K({toAgentId:B().min(1).describe(`Recipient agent ID`),subject:B().min(1).describe(`Message subject`),body:B().min(1).describe(`Message body`),taskId:Z(B().min(1)).describe(`Optional task ID context`)}),K({subject:B().min(1).describe(`Message subject`),body:B().min(1).describe(`Message body`),taskId:Z(B().min(1)).describe(`Optional task ID context`)}),K({unreadOnly:Z(U()).describe(`Only unread messages for read action (default true)`)}),K({kind:J([`progress`,`handoff`,`blocked`,`decision`,`done`,`error`]),summary:B().min(1).describe(`Update summary`),taskId:Z(B().min(1)).describe(`Optional task ID context`),evidence:Z(G(B().min(1))).describe(`Optional evidence links/snippets`),nextAction:Z(B().min(1)).describe(`Planned next step`)}),K({}),K({title:B().describe(`Outcome title`),requiredSections:G(B()).default(Gg).describe(`Required sections for finalization gate (defaults to current_state,boundary_analysis,interface_proposal)`)}),K({outcomeId:B().describe(`Outcome ID`),section:B().describe(`Section name`),sourceRunId:Z(B()).describe(`Optional source run ID`),content:B().describe(`Section fragment content`)}),K({fragmentId:B().describe(`Fragment ID`),approved:U().describe(`Review decision`)}),K({outcomeId:B().describe(`Outcome ID`)}),K({}),K({teamId:B(),teamName:B(),members:G(Xg),taskCounts:q(qg,H()),unreadMessages:H(),missionLogEntries:H(),activeRuns:H(),queuedRuns:H(),outcomeCounts:q(Yg,H())});var Qg=K({id:B(),title:B(),description:B(),status:qg,createdAt:Kg,updatedAt:Kg,createdBy:B(),assignee:B().optional(),dependsOn:G(B()),summary:B().optional(),isReady:U(),blockedBy:G(B())});dm(`action`,[K({action:Y(`create`),taskId:B(),status:qg,ignoredFields:G(B()).optional(),note:B().optional()}),K({action:Y(`list`),tasks:G(Qg)}),K({action:Y(`claim`),taskId:B(),status:qg,nextStep:B()}),K({action:Y(`complete`),taskId:B(),status:qg}),K({action:Y(`block`),taskId:B(),status:qg})]),K({agentId:B(),mode:J([`sync`,`async`]),status:J([`dispatched`,`running`,`queued`,`joined`]),dispatched:U(),message:B(),deduped:U().optional(),runId:B().optional(),text:B().optional(),iterations:H().optional()});var $g=K({textPreview:B(),iterations:H(),finishReason:B(),durationMs:H(),usage:K({inputTokens:H(),outputTokens:H(),cacheReadTokens:H().optional(),cacheWriteTokens:H().optional(),totalCost:H().optional()})});K({id:B(),agentId:B(),taskId:B().optional(),status:Jg,messagePreview:B(),priority:H(),retryCount:H(),maxRetries:H(),nextAttemptAt:Kg.optional(),continueConversation:U().optional(),startedAt:Kg,endedAt:Kg.optional(),leaseOwner:B().optional(),heartbeatAt:Kg.optional(),lastProgressAt:Kg.optional(),lastProgressMessage:B().optional(),currentActivity:B().optional(),error:B().optional(),resultSummary:$g.optional()}),K({id:B(),teamId:B(),fromAgentId:B(),toAgentId:B(),subject:B(),body:B(),taskId:B().optional(),sentAt:Kg,readAt:Kg.optional()}),K({id:B(),teamId:B(),title:B(),status:Yg,requiredSections:G(B()),createdBy:B(),createdAt:Kg,finalizedAt:Kg.optional()}),K({outcomeId:B(),status:Yg,requiredSections:G(B())}),K({agentId:B(),status:B()}),K({runId:B(),status:Jg}),K({id:B(),toAgentId:B()}),K({delivered:H()}),K({id:B()}),K({status:B()}),K({fragmentId:B(),status:B()}),K({outcomeId:B(),status:Yg});var e_;(e=>{e.TaskStart=`task_start`,e.TaskEnd=`task_end`,e.AgentEvent=`agent_event`,e.TeammateSpawned=`teammate_spawned`,e.TeammateShutdown=`teammate_shutdown`,e.TeamTaskUpdated=`team_task_updated`,e.TeamMessage=`team_message`,e.TeamMissionLog=`team_mission_log`,e.TeamTaskCompleted=`team_task_completed`,e.RunStarted=`run_started`,e.RunQueued=`run_queued`,e.RunProgress=`run_progress`,e.RunCompleted=`run_completed`,e.RunFailed=`run_failed`,e.RunCancelled=`run_cancelled`,e.RunInterrupted=`run_interrupted`,e.OutcomeCreated=`outcome_created`,e.OutcomeFragmentAttached=`outcome_fragment_attached`,e.OutcomeFragmentReviewed=`outcome_fragment_reviewed`,e.OutcomeFinalized=`outcome_finalized`})(e_||={});function t_(e){let t=O.useRef(!0);t.current&&(t.current=!1,e())}var n_=O.createContext(null);function r_(){let e=O.useContext(n_);if(e===null)throw Error(T(60));return e}var i_=(e,t)=>Object.is(e,t);function a_(e,t,n){return e==null||t==null?Object.is(e,t):n(e,t)}function o_(e,t,n){return!e||e.length===0?!1:e.some(e=>e!==void 0&&a_(t,e,n))}function s_(e,t,n){return!e||e.length===0?-1:e.findIndex(e=>e!==void 0&&a_(e,t,n))}function c_(e,t,n,r){let i=s_(e,r&&Array.isArray(t)?t[t.length-1]:t,n);return i===-1?null:i}function l_(e,t,n){return e.filter(e=>!a_(t,e,n))}function u_(e){if(e==null)return``;if(typeof e==`string`)return e;try{return JSON.stringify(e)}catch{return String(e)}}var Q=r();function d_(e){return e!=null&&e.length>0&&typeof e[0]==`object`&&e[0]!=null&&`items`in e[0]}function f_(e){if(!Array.isArray(e))return e!=null&&`null`in e;let t=e;if(d_(t)){for(let e of t)for(let t of e.items)if(t&&t.value==null&&t.label!=null)return!0;return!1}for(let e of t)if(e&&e.value==null&&e.label!=null)return!0;return!1}function p_(e,t){if(t&&e!=null)return t(e)??``;if(e&&typeof e==`object`){if(`label`in e&&e.label!=null)return String(e.label);if(`value`in e)return String(e.value)}return u_(e)}function m_(e,t){return t&&e!=null?t(e)??``:e&&typeof e==`object`&&`value`in e&&`label`in e?u_(e.value):u_(e)}function h_(e,t,n){function r(){return p_(e,n)}if(n&&e!=null)return n(e);if(e&&typeof e==`object`&&`label`in e&&e.label!=null)return e.label;if(t&&!Array.isArray(t))return t[e]??r();if(Array.isArray(t)){let n=t,i=d_(n)?n.flatMap(e=>e.items):n;if(typeof e!=`object`||!e){let t=i.find(t=>t.value===e);return t&&t.label!=null?t.label:r()}if(`value`in e){let t=i.find(t=>t&&t.value===e.value);if(t&&t.label!=null)return t.label}}return r()}function g_(e,t,n){return e.reduce((e,r,i)=>(i>0&&e.push(`, `),e.push((0,Q.jsx)(O.Fragment,{children:h_(r,t,n)},i)),e),[])}var $={id:e=>e.id,labelId:e=>e.labelId,modal:e=>e.modal,items:e=>e.items,itemToStringLabel:e=>e.itemToStringLabel,isItemEqualToValue:e=>e.isItemEqualToValue,value:e=>e.value,hasSelectedValue:e=>{let{value:t,multiple:n,itemToStringValue:r}=e;return t==null?!1:n&&Array.isArray(t)?t.length>0:m_(t,r)!==``},hasNullItemLabel:(e,t)=>t?f_(e.items):!1,open:e=>e.open,mounted:e=>e.mounted,forceMount:e=>e.forceMount,transitionStatus:e=>e.transitionStatus,openMethod:e=>e.openMethod,activeIndex:e=>e.activeIndex,selectedIndex:e=>e.selectedIndex,isActive:(e,t)=>e.activeIndex===t,isSelected:(e,t)=>{let n=e.isItemEqualToValue,r=e.value;return e.multiple?Array.isArray(r)&&r.some(e=>a_(t,e,n)):a_(t,r,n)},isSelectedByFocus:(e,t)=>e.selectedIndex===t,popupProps:e=>e.popupProps,triggerProps:e=>e.triggerProps,triggerElement:e=>e.triggerElement,positionerElement:e=>e.positionerElement,listElement:e=>e.listElement,popupSide:e=>e.popupSide,scrollUpArrowVisible:e=>e.scrollUpArrowVisible,scrollDownArrowVisible:e=>e.scrollDownArrowVisible,hasScrollArrows:e=>e.hasScrollArrows};function __(e,t,n=(e,t)=>e===t){return e.length===t.length&&e.every((e,r)=>n(e,t[r]))}function v_(e){let{id:t,value:n,defaultValue:r=null,onValueChange:a,open:o,defaultOpen:s=!1,onOpenChange:l,name:p,form:m,autoComplete:ee,disabled:h=!1,readOnly:g=!1,required:te=!1,modal:ne=!0,actionsRef:_,inputRef:re,onOpenChangeComplete:ie,items:ae,multiple:v=!1,itemToStringLabel:ce,itemToStringValue:y,isItemEqualToValue:b=i_,highlightItemOnHover:x=!0,children:le}=e,{clearErrors:ue}=Me(),{setDirty:fe,setTouched:me,setFocused:he,validityData:ge,setFilled:_e,name:ye,disabled:be,validation:xe,validationMode:S}=Ie(),Se=et({id:t}),C=be||h,w=ye??p,[T,Ee]=c({controlled:n,default:v?r??Qe:r,name:`Select`,state:`value`}),[De,ke]=c({controlled:o,default:s,name:`Select`,state:`open`}),je=O.useRef([]),Ne=O.useRef([]),Fe=O.useRef(null),Re=O.useRef(null),ze=O.useRef(0),Be=O.useRef(null),Ve=O.useRef([]),Ue=O.useRef(!1),We=O.useRef(null),Ge=O.useRef(null),Ye=O.useRef({allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0}),Xe=O.useRef(!1),{mounted:nt,setMounted:rt,transitionStatus:it}=st(De),{openMethod:at,triggerProps:ot}=d(De),D=Pe(()=>new de({id:Se,labelId:void 0,modal:ne,multiple:v,itemToStringLabel:ce,itemToStringValue:y,isItemEqualToValue:b,value:T,open:De,mounted:nt,transitionStatus:it,items:ae,forceMount:!1,openMethod:null,activeIndex:null,selectedIndex:null,popupProps:{},triggerProps:{},triggerElement:null,positionerElement:null,listElement:null,popupSide:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1,hasScrollArrows:!1})).current,ct=E(D,$.activeIndex),lt=E(D,$.selectedIndex),ut=E(D,$.triggerElement),dt=E(D,$.positionerElement),ft=vt(at),pt=at??ft,mt=O.useMemo(()=>v?``:m_(T,y),[v,T,y]),ht=O.useMemo(()=>v&&Array.isArray(T)?T.map(e=>m_(e,y)):m_(T,y),[v,T,y]),gt=Ke(ut),yt=we(()=>ht);He(gt,Se,T,yt,!C,p);let bt=O.useRef(T),xt=v?Array.isArray(T)&&T.length>0:T!=null&&mt!==``;qe(()=>{_e(xt)},[xt,_e]),qe(function(){let e=T,t=!1;if(v){let n=Array.isArray(T)?T:[];t=n.length===0,e=n[n.length-1]}let n=t?-1:s_(Ve.current,e,b),r=n===-1?null:n;r===null&&(Ge.current=null),!De&&D.set(`selectedIndex`,r)},[v,De,T,b,D]);function St(e){let t=ge.initialValue;return Array.isArray(e)&&Array.isArray(t)?!__(e,t,(e,t)=>a_(e,t,b)):e!==t}oe(T,()=>{ue(w),fe(St(T)),xe.change(T)});let Ct=we((e,t)=>{l?.(e,t),!t.isCanceled&&(ke(e),!e&&(t.reason===`focus-out`||t.reason===`outside-press`)&&(me(!0),he(!1),S===`onBlur`&&xe.commit(T)))}),wt=we(()=>{rt(!1),D.update({activeIndex:null,openMethod:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1}),ie?.(!1)});Ce({enabled:!_,open:De,ref:Fe,onComplete(){De||wt()}}),O.useImperativeHandle(_,()=>({unmount:wt}),[wt]);let Tt=we((e,t)=>{a?.(e,t),!t.isCanceled&&Ee(e)}),Dt=we(e=>{let t=Je(e.scrollHeight,e.clientHeight),n=Le(e.scrollTop,t),r=n>0,i=n<t;D.set(`scrollUpArrowVisible`,r),D.set(`scrollDownArrowVisible`,i)}),Ot=_t({open:De,onOpenChange:Ct,elements:{reference:ut,floating:dt}}),k=u(Ot,{enabled:!g&&!C,event:`mousedown`}),kt=f(Ot),At=i(Ot,{enabled:!g&&!C,listRef:je,activeIndex:ct,selectedIndex:lt,disabledIndices:Qe,onNavigate(e){e===null&&!De||D.set(`activeIndex`,e)},focusItemOnHover:x}),jt=se(Ot,{enabled:!g&&!C&&(De||!v),listRef:Ne,activeIndex:ct,selectedIndex:lt,disabledIndices:e=>Et(je.current[e]),onMatch(e){De?D.set(`activeIndex`,e):Tt(Ve.current[e],tt(pe))},onTyping(e){Ue.current=e}}),Mt=O.useMemo(()=>ve(jt.reference,At.reference,kt.reference,k.reference,ot),[k.reference,jt.reference,At.reference,kt.reference,ot]),Nt=O.useMemo(()=>ve(Te,jt.floating,At.floating,kt.floating),[jt.floating,At.floating,kt.floating]),Pt=At.item??Oe;t_(()=>{D.update({popupProps:Nt,triggerProps:Mt})}),D.useSyncedValues({id:Se,modal:ne,multiple:v,value:T,open:De,mounted:nt,transitionStatus:it,popupProps:Nt,triggerProps:Mt,items:ae,itemToStringLabel:ce,itemToStringValue:y,isItemEqualToValue:b,openMethod:pt});let Ft=O.useMemo(()=>({store:D,floatingContext:Ot,required:te,disabled:C,readOnly:g,multiple:v,highlightItemOnHover:x,setValue:Tt,setOpen:Ct,listRef:je,popupRef:Fe,scrollHandlerRef:Re,handleScrollArrowVisibility:Dt,scrollArrowsMountedCountRef:ze,itemProps:Pt,valueRef:Be,valuesRef:Ve,labelsRef:Ne,typingRef:Ue,selectionRef:Ye,firstItemTextRef:We,selectedItemTextRef:Ge,validation:xe,onOpenChangeComplete:ie,alignItemWithTriggerActiveRef:Xe,initialValueRef:bt}),[D,Ot,te,C,g,v,x,Tt,Ct,Pt,xe,ie,Dt]),It=Ze(re,xe.inputRef),Lt=v?void 0:w,Rt=O.useMemo(()=>!v||!Array.isArray(T)||!w?null:T.map(e=>{let t=m_(e,y);return(0,Q.jsx)(`input`,{type:`hidden`,form:m,name:w,value:t,disabled:C},t)}),[v,T,m,w,y,C]);return(0,Q.jsxs)(n_.Provider,{value:Ft,children:[le,(0,Q.jsx)(`input`,{...xe.getValidationProps(C,{onFocus(){D.state.triggerElement?.focus({focusVisible:!0})},onChange(e){if(e.nativeEvent.defaultPrevented||C||g)return;let t=e.currentTarget.value,n=tt(pe,e.nativeEvent);function r(){if(v)return;let e=t.toLowerCase(),r=Ve.current.findIndex(t=>m_(t,y).toLowerCase()===e||p_(t,ce).toLowerCase()===e);r===-1&&(r=Ve.current.findIndex((t,n)=>{let r=Ne.current[n];return r!=null&&r.toLowerCase()===e}));let i=Ve.current[r];i!=null&&Tt(i,n)}D.set(`forceMount`,!0),queueMicrotask(r)}}),id:Se&&Lt==null?`${Se}-hidden-input`:void 0,form:m,name:Lt,autoComplete:ee,value:mt,disabled:C,required:te&&!(v&&xt),readOnly:g,ref:It,style:w?$e:Ae,tabIndex:-1,"aria-hidden":!0,suppressHydrationWarning:!0}),Rt]})}function y_(e,t){return e??t}var b_=400,x_={...g,...C,popupSide:e=>e?{"data-popup-side":e}:null,value:()=>null},S_=O.forwardRef(function(e,t){let{render:n,className:r,id:i,disabled:a=!1,nativeButton:o=!0,style:c,...l}=e,{setTouched:u,setFocused:d,validationMode:f,state:p,disabled:m}=Ie(),{labelId:ee}=ke(),{store:h,setOpen:g,selectionRef:te,validation:ne,readOnly:_,required:re,alignItemWithTriggerActiveRef:ie,disabled:oe}=r_(),v=m||oe||a,se=E(h,$.open),ce=E(h,$.mounted),y=E(h,$.value),b=E(h,$.triggerProps),x=E(h,$.positionerElement),le=E(h,$.listElement),ue=E(h,$.popupSide),de=E(h,$.id),fe=E(h,$.labelId),me=E(h,$.hasSelectedValue),he=ce&&x?ue:null,ge=i??de,_e=y_(ee,fe);et({id:ge});let ye=Ke(x),be=O.useRef(null),{getButtonProps:xe,buttonRef:S}=Be({disabled:v,native:o}),Se=h.useStateSetter(`triggerElement`),C=Ye(),Ce=Ye(),w=Ye();O.useEffect(()=>{if(se)return w.start(b_,()=>{te.current.allowUnselectedMouseUp=!0,te.current.allowSelectedMouseUp=!0}),()=>{w.clear()};te.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0},Ce.clear()},[se,te,Ce,w]);let we=ve(b,{id:ge,role:`combobox`,"aria-expanded":se,"aria-haspopup":`listbox`,"aria-controls":se?le?.id??ae(x)?.id:void 0,"aria-labelledby":_e,"aria-readonly":_||void 0,"aria-required":re||void 0,tabIndex:v?-1:0,onFocus(e){d(!0),se&&ie.current&&g(!1,tt(pe,e.nativeEvent)),C.start(0,()=>{h.set(`forceMount`,!0)})},onBlur(e){ct(x,e.relatedTarget)||(u(!0),d(!1),f===`onBlur`&&ne.commit(y))},onMouseDown(e){if(se)return;let t=We(e.currentTarget);function n(e){if(!be.current)return;let t=e.target;ct(be.current,t)||ct(ye.current,t)||nt(e,be.current)||g(!1,tt(Ne,e))}Ce.start(0,()=>{t.addEventListener(`mouseup`,n,{once:!0})})}},l,xe),T=ne.getValidationProps(v,we);T.role=`combobox`;let Te={...p,open:se,disabled:v,value:y,readOnly:_,popupSide:he,placeholder:!me};return s(`button`,e,{ref:[t,be,S,Se],state:Te,stateAttributesMapping:x_,props:T})}),C_={value:()=>null},w_=O.forwardRef(function(e,t){let{className:n,render:r,children:i,placeholder:a,style:o,...c}=e,{store:l,valueRef:u}=r_(),d=E(l,$.value),f=E(l,$.items),p=E(l,$.itemToStringLabel),m=E(l,$.hasSelectedValue),ee=!m&&a!=null&&i==null,h=E(l,$.hasNullItemLabel,ee),g={value:d,placeholder:!m},te=null;return te=typeof i==`function`?i(d):i??(ee&&!h?a:Array.isArray(d)?g_(d,f,p):h_(d,f,p)),s(`span`,e,{state:g,ref:[t,u],props:[{children:te},c],stateAttributesMapping:C_})}),T_=O.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{store:o}=r_(),c={open:E(o,$.open)};return s(`span`,e,{state:c,ref:t,props:[{"aria-hidden":!0,children:`▼`},a],stateAttributesMapping:xe})}),E_=O.forwardRef(function(e,t){let{store:n}=r_(),r=E(n,$.mounted),i=E(n,$.forceMount);return r||i?(0,Q.jsx)(p,{ref:t,...e}):null}),D_=O.createContext(void 0);function O_(){let e=O.useContext(D_);if(!e)throw Error(T(59));return e}function k_(e,t){e&&Object.assign(e.style,t)}var A_={position:`relative`,maxHeight:`100%`,overflowX:`hidden`,overflowY:`auto`},j_={position:`fixed`},M_=O.forwardRef(function(e,t){let{anchor:n,className:r,render:i,positionMethod:a,side:s,align:c,sideOffset:l,alignOffset:u,collisionBoundary:d=`clipping-ancestors`,collisionPadding:f,arrowPadding:p,sticky:m,disableAnchorTracking:ee,alignItemWithTrigger:h=!0,collisionAvoidance:g=x,style:te,...ne}=e,{store:_,listRef:re,labelsRef:ie,alignItemWithTriggerActiveRef:ae,selectedItemTextRef:oe,valuesRef:v,initialValueRef:se,popupRef:ce,setValue:y,floatingContext:b}=r_(),le=E(_,$.open),ue=E(_,$.mounted),de=E(_,$.modal),fe=E(_,$.value),me=E(_,$.openMethod),ge=E(_,$.positionerElement),ve=E(_,$.triggerElement),ye=E(_,$.isItemEqualToValue),be=E(_,$.transitionStatus),xe=O.useRef(null),S=O.useRef(null),[Se,C]=O.useState(h),Ce=ue&&Se&&me!==`touch`;!ue&&Se!==h&&C(h),O.useImperativeHandle(ae,()=>Ce),ot((Ce||de)&&le,me===`touch`,ge,ve);let w=he({anchor:n,floatingRootContext:b,positionMethod:a,mounted:ue,side:s,sideOffset:l,align:c,alignOffset:u,arrowPadding:p,collisionBoundary:d,collisionPadding:f,sticky:m,disableAnchorTracking:ee??Ce,collisionAvoidance:g,keepMounted:!0}),T=Ce?`none`:w.side,Te=Ce?j_:w.positionerStyles,De={open:le,side:T,align:w.align,anchorHidden:w.anchorHidden};qe(()=>{_.set(`popupSide`,w.side)},[_,w.side]);let Oe=_.useStateSetter(`positionerElement`),ke=_e(e,De,{styles:Te,transitionStatus:be,props:ne,refs:[t,Oe],hidden:!ue,inert:!le}),Ae=O.useRef(0),je=we(e=>{if(v.current.length===0)return;let t=Ae.current;if(Ae.current=e.size,e.size===t)return;let n=tt(pe);if(t!==0&&!_.state.multiple&&fe!==null&&s_(v.current,fe,ye)===-1){let e=se.current,t=e!=null&&s_(v.current,e,ye)!==-1?e:null;y(t,n),t===null&&(_.set(`selectedIndex`,null),oe.current=null)}if(t!==0&&_.state.multiple&&Array.isArray(fe)){let e=fe.filter(e=>s_(v.current,e,ye)!==-1);e.length!==fe.length&&(y(e,n),e.length===0&&(_.set(`selectedIndex`,null),oe.current=null))}if(le&&Ce){_.update({scrollUpArrowVisible:!1,scrollDownArrowVisible:!1});let e={height:``};k_(ge,e),k_(ce.current,e)}}),Me=O.useMemo(()=>({...w,side:T,alignItemWithTriggerActive:Ce,setControlledAlignItemWithTrigger:C,scrollUpArrowRef:xe,scrollDownArrowRef:S}),[w,T,Ce,C]);return(0,Q.jsx)(Ee,{elementsRef:re,labelsRef:ie,onMapChange:je,children:(0,Q.jsxs)(D_.Provider,{value:Me,children:[ue&&de&&(0,Q.jsx)(Ve,{inert:o(!le),cutout:ve}),ke]})})}),N_={...te,...Se},P_=O.forwardRef(function(e,t){let{render:n,className:r,style:i,finalFocus:o,...c}=e,{store:l,popupRef:u,onOpenChangeComplete:d,setOpen:f,valueRef:p,firstItemTextRef:m,selectedItemTextRef:ee,multiple:g,handleScrollArrowVisibility:te,scrollHandlerRef:ne,listRef:_,highlightItemOnHover:ie,floatingContext:ae}=r_(),{side:oe,align:se,alignItemWithTriggerActive:y,isPositioned:b,setControlledAlignItemWithTrigger:x}=O_(),le=it(!0)!=null,ue=ye(),{nonce:de,disableStyleElements:fe}=Ge(),pe=E(l,$.id),me=E(l,$.open),he=E(l,$.openMethod),ge=E(l,$.mounted),_e=E(l,$.popupProps),ve=E(l,$.transitionStatus),xe=E(l,$.triggerElement),S=E(l,$.positionerElement),Se=E(l,$.listElement),C=O.useRef(!1),T=O.useRef(!1),Te=O.useRef({}),Ee=Re(),De=we(e=>{if(!S||!u.current||!T.current)return;let t=S.style.top===`0px`,n=S.style.bottom===`0px`;if(C.current||!y||!t&&!n){te(e);return}let r=L_(S),i=R_(S.getBoundingClientRect().height,`y`,r),a=We(S),o=be(S),s=o.getComputedStyle(S),c=parseFloat(s.marginTop),l=parseFloat(s.marginBottom),d=F_(o.getComputedStyle(u.current)),f=Math.min(a.documentElement.clientHeight-c-l,d),p=e.scrollTop,m=I_(e),ee=null,h=e=>{S.style.height=`${e}px`},g=t?m-p:p,ne=Math.min(i+g,f);if(g<=1){let n=w(g,0,f-i);n>0&&h(i+n),e.scrollTop=t?m:0,f-(i+n)<=1&&(C.current=!0),te(e);return}f-ne>1?ee=t?1/0:0:n&&p<m&&(ee=p-(g-(i+g-f)));let _=Math.ceil(ne);if(_!==0&&h(_),ee!=null){let t=w(ee,0,I_(e));Math.abs(e.scrollTop-t)>1&&(e.scrollTop=t)}_>=f-1&&(C.current=!0),te(e)});O.useImperativeHandle(ne,()=>De,[De]),Ce({open:me,ref:u,onComplete(){me&&d?.(!0)}});let Oe={open:me,transitionStatus:ve,side:oe,align:se};qe(()=>{!S||!u.current||Object.keys(Te.current).length||(Te.current={top:S.style.top||`0`,left:S.style.left||`0`,right:S.style.right,height:S.style.height,bottom:S.style.bottom,minHeight:S.style.minHeight,maxHeight:S.style.maxHeight,marginTop:S.style.marginTop,marginBottom:S.style.marginBottom})},[u,S]),qe(()=>{me||y||(T.current=!1,C.current=!1,k_(S,Te.current))},[me,y,S,u]),qe(()=>{let e=u.current;if(!me||!xe||!S||!e||y&&!b||l.state.transitionStatus===`ending`)return;if(T.current=!0,e.style.removeProperty(`--transform-origin`),!y){Ee.request(()=>te(Se||e));return}let t=V_(e);try{let t=ee.current;t?.isConnected||(t=!$.hasSelectedValue(l.state)&&m.current?.isConnected?m.current:null);let n=p.current,r=be(S),i=r.getComputedStyle(S),a=r.getComputedStyle(e),o=We(xe),s=L_(xe),c=z_(xe.getBoundingClientRect(),s),u=z_(S.getBoundingClientRect(),s),d=c.height,f=Se||e,h=f.scrollHeight,g=parseFloat(a.borderBottomWidth),ne=parseFloat(i.marginTop)||10,re=parseFloat(i.marginBottom)||10,ae=parseFloat(i.minHeight)||100,oe=F_(a),v=o.documentElement.clientHeight-ne-re,se=o.documentElement.clientWidth,y=v-c.bottom+d,b,le=ue===`rtl`?c.right-u.width:c.left,de=0;if(t&&n){let e=z_(n.getBoundingClientRect(),s);b=z_(t.getBoundingClientRect(),s),le=u.left+(ue===`rtl`?e.right-b.right:e.left-b.left);let r=e.top-c.top+e.height/2;de=b.top-u.top+b.height/2-r}let fe=y+de+re+g,pe=Math.min(v,fe),me=v-ne-re,he=fe-pe,ge=se-5;S.style.left=`${w(le,5,ge-u.width)}px`,S.style.height=`${pe}px`,S.style.maxHeight=`none`,S.style.marginTop=`${ne}px`,S.style.marginBottom=`${re}px`,e.style.height=`100%`;let _e=I_(f),ve=he>=_e-1;ve&&(pe=Math.min(v,u.height)-(he-_e));let ye=c.top<20||c.bottom>v-20||Math.ceil(pe)+1<Math.min(h,ae),Ce=(r.visualViewport?.scale??1)!==1&&ce;if(ye||Ce){k_(S,Te.current),x(!1);return}let we=Math.max(ae,pe);if(ve){let e=Math.max(0,v-fe);S.style.top=u.height>=me?`0`:`${e}px`,S.style.height=`${pe}px`,f.scrollTop=I_(f)}else S.style.bottom=`0`,f.scrollTop=he;if(b){let t=u.top,n=u.height,r=b.top+b.height/2,i=w(n>0?(r-t)/n*100:50,0,100);e.style.setProperty(`--transform-origin`,`50% ${i}%`)}(we===v||pe>=oe)&&(C.current=!0),te(f),ie&&l.state.selectedIndex===null&&l.state.activeIndex===null&&_.current[0]!=null&&l.set(`activeIndex`,0)}finally{t()}},[l,me,S,xe,p,m,ee,u,te,y,x,Ee,Se,_,ie,ue,b]),O.useEffect(()=>{if(!y||!S||!me)return;let e=be(S);function t(e){f(!1,tt(re,e))}return Ue(e,`resize`,t)},[f,y,S,me]);let ke={...Se?{role:`presentation`,"aria-orientation":void 0}:{role:`listbox`,"aria-multiselectable":g||void 0,id:`${pe}-list`},onKeyDown(e){le&&a.has(e.key)&&e.stopPropagation()},onScroll(e){Se||De(e.currentTarget)},...y&&{style:Se?{height:`100%`}:A_},className:!Se&&y?Xe.className:void 0},Ae=s(`div`,e,{ref:[t,u],state:Oe,stateAttributesMapping:N_,props:[_e,ke,h(ve),c]});return(0,Q.jsxs)(O.Fragment,{children:[!fe&&Xe.getElement(de),(0,Q.jsx)(v,{context:ae,modal:!1,disabled:!ge,openInteractionType:he,returnFocus:o,restoreFocus:!0,children:Ae})]})});function F_(e){let t=e.maxHeight;return t.endsWith(`px`)&&parseFloat(t)||1/0}function I_(e){return Je(e.scrollHeight,e.clientHeight)}function L_(e){return me.getScale(e)}function R_(e,t,n){return e/n[t]}function z_(e,t){return y({x:R_(e.x,`x`,t),y:R_(e.y,`y`,t),width:R_(e.width,`x`,t),height:R_(e.height,`y`,t)})}var B_=[[`transform`,`none`],[`scale`,`1`],[`translate`,`0 0`]];function V_(e){let{style:t}=e,n={};for(let[e,r]of B_)n[e]=t.getPropertyValue(e),t.setProperty(e,r,`important`);return()=>{for(let[e]of B_){let r=n[e];r?t.setProperty(e,r):t.removeProperty(e)}}}var H_=O.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{store:o,scrollHandlerRef:c,multiple:l}=r_(),{alignItemWithTriggerActive:u}=O_(),d=E(o,$.hasScrollArrows),f=E(o,$.openMethod),p={id:`${E(o,$.id)}-list`,role:`listbox`,"aria-multiselectable":l||void 0,onScroll(e){c.current?.(e.currentTarget)},...u&&{style:A_},className:d&&f!==`touch`?Xe.className:void 0},m=o.useStateSetter(`listElement`);return s(`div`,e,{ref:[t,m],props:[p,a]})}),U_=O.createContext(void 0);function W_(){let e=O.useContext(U_);if(!e)throw Error(T(57));return e}var G_=O.memo(O.forwardRef(function(e,t){let{render:n,className:r,style:i,value:a=null,label:o,disabled:c=!1,nativeButton:l=!1,...u}=e,d=O.useRef(null),f=le({guess:!0,label:o,textRef:d}),{store:p,itemProps:m,setOpen:ee,setValue:h,selectionRef:g,typingRef:te,valuesRef:ne,multiple:_,selectedItemTextRef:re,disabled:ie,readOnly:ae}=r_(),oe=ie||c,v=E(p,$.isActive,f.index),se=E(p,$.open),ce=E(p,$.isSelected,a),y=E(p,$.isSelectedByFocus,f.index),b=E(p,$.isItemEqualToValue),x=f.index,de=O.useRef(null);qe(()=>{let e=ne.current;return e[x]=a,()=>{delete e[x]}},[x,a,ne]),qe(()=>{let e=p.state.value,t=e;_&&Array.isArray(e)&&(t=e.length>0?e[e.length-1]:void 0),t!==void 0&&a_(a,t,b)&&(p.set(`selectedIndex`,x),d.current&&(re.current=d.current))},[x,_,b,p,a,re]);let fe=O.useRef(`mouse`),pe=O.useRef(!1),{getButtonProps:me,buttonRef:he}=Be({disabled:oe,focusableWhenDisabled:!0,native:l,composite:!0}),ge={disabled:oe,selected:ce,highlighted:v};function _e(e){if(ie||ae)return;let t=p.state.value;if(_){let n=Array.isArray(t)?t:[],r=ce?l_(n,a,b):[...n,a];h(r,tt(ue,e))}else h(a,tt(ue,e)),ee(!1,tt(ue,e))}function ve(){g.current.dragY=0}let ye={role:`option`,"aria-selected":ce,tabIndex:se&&v?0:-1,onKeyDown(e){p.set(`activeIndex`,x),e.key===` `&&te.current&&e.preventDefault()},onClick(e){let t=fe.current!==`touch`,n=e.nativeEvent.pointerType,r=t&&S(e.nativeEvent)&&(n!==void 0||v),i=t&&!r&&!pe.current;pe.current=!1,!(oe||i)&&_e(e.nativeEvent)},onPointerEnter(e){fe.current=e.pointerType},onPointerMove(e){if(e.pointerType===`mouse`&&e.buttons===1){let t=g.current;t.dragY+=e.movementY,t.dragY**2>=64&&(t.allowUnselectedMouseUp=!0)}},onPointerDown(e){fe.current=e.pointerType,pe.current=!0,ve()},onMouseUp(){if(ve(),oe||fe.current===`touch`||pe.current)return;let e=!g.current.allowSelectedMouseUp&&ce,t=!g.current.allowUnselectedMouseUp&&!ce;e||t||(pe.current=!0,de.current?.click(),pe.current=!1)}},be=s(`div`,e,{ref:[he,t,f.ref,de],state:ge,props:[m,ye,u,me]}),xe=O.useMemo(()=>({selected:ce,index:x,textRef:d,selectedByFocus:y}),[ce,x,d,y]);return(0,Q.jsx)(U_.Provider,{value:xe,children:be})})),K_=O.forwardRef(function(e,t){let{selected:n}=W_();return e.keepMounted||n?(0,Q.jsx)(q_,{...e,ref:t}):null}),q_=O.memo(O.forwardRef((e,t)=>{let{render:n,className:r,style:i,keepMounted:a,...o}=e,{selected:c}=W_(),l=O.useRef(null),{transitionStatus:u,setMounted:d}=st(c),f=s(`span`,e,{ref:[t,l],state:{selected:c,transitionStatus:u},props:[{"aria-hidden":!0,children:`✔️`},o],stateAttributesMapping:Se});return Ce({open:c,ref:l,onComplete(){c||d(!1)}}),f})),J_=O.memo(O.forwardRef(function(e,t){let{index:n,textRef:r,selectedByFocus:i}=W_(),{firstItemTextRef:a,selectedItemTextRef:o}=r_(),{render:c,className:l,style:u,...d}=e,f=O.useCallback(e=>{e&&(n===0&&(a.current=e),i&&(o.current=e))},[a,o,n,i]);return s(`div`,e,{ref:[f,t,r],props:d})})),Y_=O.forwardRef(function(e,t){let{render:n,className:r,style:i,direction:a,keepMounted:o,...c}=e,l=a===`up`,{store:u,popupRef:d,listRef:f,handleScrollArrowVisibility:p,scrollArrowsMountedCountRef:m}=r_(),{side:ee,scrollDownArrowRef:h,scrollUpArrowRef:g}=O_(),te=l?$.scrollUpArrowVisible:$.scrollDownArrowVisible,ne=E(u,te),_=E(u,$.openMethod),re=ne&&_!==`touch`,ie=Ye(),ae=l?g:h,{mounted:oe,transitionStatus:v,setMounted:se}=st(re);qe(()=>(m.current+=1,u.set(`hasScrollArrows`,!0),()=>{m.current=Math.max(0,m.current-1),m.current===0&&u.set(`hasScrollArrows`,!1)}),[u,m]),Ce({open:re,ref:ae,onComplete(){re||se(!1)}});let ce=s(`div`,e,{ref:[t,ae],state:{direction:a,visible:re,side:ee,transitionStatus:v},props:[{"aria-hidden":!0,children:l?`▲`:`▼`,style:{position:`absolute`},onMouseMove(e){if(e.movementX===0&&e.movementY===0||ie.isStarted())return;u.set(`activeIndex`,null);function t(){let e=u.state.listElement??d.current;if(!e)return;u.set(`activeIndex`,null),p(e);let n=Je(e.scrollHeight,e.clientHeight),r=Le(e.scrollTop,n),i=r===(l?0:n),a=f.current;if(r!==e.scrollTop&&(e.scrollTop=r),i){ie.clear();return}if(a.length>0){let t=ae.current?.offsetHeight||0;e.scrollTop=X_(a,l,r,e.clientHeight,t,n)}ie.start(40,t)}ie.start(40,t)},onMouseLeave(){ie.clear()}},c],stateAttributesMapping:Se});return oe||o?ce:null});function X_(e,t,n,r,i,a){if(t){let t=0,r=n+i-1;for(let n=0;n<e.length;n+=1){let i=e[n];if(i&&i.offsetTop>=r){t=n;break}}let o=Math.max(0,t-1),s=e[o];return o<t&&s?Le(s.offsetTop-i,a):0}let o=e.length-1,s=n+r-i+1;for(let t=0;t<e.length;t+=1){let n=e[t];if(n&&n.offsetTop+n.offsetHeight>s){o=Math.max(0,t-1);break}}let c=Math.min(e.length-1,o+1),l=e[c];return c>o&&l?Le(l.offsetTop+l.offsetHeight-r+i,a):a}var Z_=O.forwardRef(function(e,t){return(0,Q.jsx)(Y_,{...e,ref:t,direction:`down`})}),Q_=O.forwardRef(function(e,t){return(0,Q.jsx)(Y_,{...e,ref:t,direction:`up`})}),$_=v_;function ev({className:e,...t}){return(0,Q.jsx)(w_,{"data-slot":`select-value`,className:D(`flex flex-1 text-left`,e),...t})}function tv({className:e,size:t=`default`,children:n,...r}){return(0,Q.jsxs)(S_,{"data-slot":`select-trigger`,"data-size":t,className:D(`flex w-fit cursor-pointer items-center justify-between gap-1.5 rounded-lg border border-input bg-transparent py-2 pr-2 pl-2.5 text-sm whitespace-nowrap transition-colors outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground data-[size=default]:h-8 data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)] *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:bg-input/30 dark:hover:bg-input/50 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`,e),...r,children:[n,(0,Q.jsx)(T_,{render:(0,Q.jsx)(yt,{className:`pointer-events-none size-4 text-muted-foreground`})})]})}function nv({className:e,children:t,side:n=`bottom`,sideOffset:r=4,align:i=`center`,alignOffset:a=0,alignItemWithTrigger:o=!0,...s}){return(0,Q.jsx)(E_,{children:(0,Q.jsx)(M_,{side:n,sideOffset:r,align:i,alignOffset:a,alignItemWithTrigger:o,className:`isolate z-50`,children:(0,Q.jsxs)(P_,{"data-slot":`select-content`,"data-align-trigger":o,className:D(`relative isolate z-50 max-h-(--available-height) w-(--anchor-width) min-w-36 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[align-trigger=true]:animate-none 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-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),...s,children:[(0,Q.jsx)(iv,{}),(0,Q.jsx)(H_,{children:t}),(0,Q.jsx)(av,{})]})})})}function rv({className:e,children:t,...n}){return(0,Q.jsxs)(G_,{"data-slot":`select-item`,className:D(`relative flex w-full cursor-pointer items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:cursor-not-allowed data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2`,e),...n,children:[(0,Q.jsx)(J_,{className:`flex flex-1 shrink-0 gap-2 whitespace-nowrap`,children:t}),(0,Q.jsx)(K_,{render:(0,Q.jsx)(`span`,{className:`pointer-events-none absolute right-2 flex size-4 items-center justify-center`}),children:(0,Q.jsx)(ne,{className:`pointer-events-none`})})]})}function iv({className:e,...t}){return(0,Q.jsx)(Q_,{"data-slot":`select-scroll-up-button`,className:D(`top-0 z-10 flex w-full cursor-pointer items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4`,e),...t,children:(0,Q.jsx)(bt,{})})}function av({className:e,...t}){return(0,Q.jsx)(Z_,{"data-slot":`select-scroll-down-button`,className:D(`bottom-0 z-10 flex w-full cursor-pointer items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4`,e),...t,children:(0,Q.jsx)(yt,{})})}function ov(e){return ht(`dialog`,e)}function sv({...e}){return(0,Q.jsx)(ov,{"data-slot":`dialog`,...e})}function cv({...e}){return(0,Q.jsx)(Tt,{"data-slot":`dialog-trigger`,...e})}function lv({...e}){return(0,Q.jsx)(gt,{"data-slot":`dialog-portal`,...e})}function uv({className:e,...t}){return(0,Q.jsx)(pt,{"data-slot":`dialog-overlay`,className:D(`fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0`,e),...t})}function dv({className:e,children:t,showCloseButton:n=!0,...r}){return(0,Q.jsxs)(lv,{children:[(0,Q.jsx)(uv,{}),(0,Q.jsxs)(mt,{"data-slot":`dialog-content`,className:D(`fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-background p-4 text-sm ring-1 ring-foreground/10 duration-100 outline-none sm:max-w-sm 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),...r,children:[t,n&&(0,Q.jsxs)(dt,{"data-slot":`dialog-close`,render:(0,Q.jsx)(rt,{variant:`ghost`,className:`absolute top-2 right-2`,size:`icon-sm`}),children:[(0,Q.jsx)(wt,{}),(0,Q.jsx)(`span`,{className:`sr-only`,children:`Close`})]})]})]})}function fv({className:e,...t}){return(0,Q.jsx)(`div`,{"data-slot":`dialog-header`,className:D(`flex flex-col gap-2`,e),...t})}function pv({className:e,showCloseButton:t=!1,children:n,...r}){return(0,Q.jsxs)(`div`,{"data-slot":`dialog-footer`,className:D(`-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 sm:flex-row sm:justify-end`,e),...r,children:[n,t&&(0,Q.jsx)(dt,{render:(0,Q.jsx)(rt,{variant:`outline`}),children:`Close`})]})}function mv({className:e,...t}){return(0,Q.jsx)(ut,{"data-slot":`dialog-title`,className:D(`text-base leading-none font-medium`,e),...t})}function hv({className:e,...t}){return(0,Q.jsx)(ft,{"data-slot":`dialog-description`,className:D(`text-sm text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground`,e),...t})}function gv({className:e,...t}){return(0,Q.jsx)(`textarea`,{"data-slot":`textarea`,className:D(`flex field-sizing-content min-h-16 w-full rounded-lg border border-input bg-transparent px-2.5 py-2 text-base transition-colors outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40`,e),...t})}function _v({className:e,...t}){return(0,Q.jsx)(`div`,{"data-slot":`input-group`,role:`group`,className:D(`group/input-group relative flex h-8 w-full min-w-0 items-center rounded-lg border border-input transition-colors outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-disabled:bg-input/50 has-disabled:opacity-50 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:bg-input/30 dark:has-disabled:bg-input/80 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5`,e),...t})}var vv=fe(`flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4`,{variants:{align:{"inline-start":`order-first pl-2 has-[>button]:ml-[-0.3rem] has-[>kbd]:ml-[-0.15rem]`,"inline-end":`order-last pr-2 has-[>button]:mr-[-0.3rem] has-[>kbd]:mr-[-0.15rem]`,"block-start":`order-first w-full justify-start px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2`,"block-end":`order-last w-full justify-start px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2`}},defaultVariants:{align:`inline-start`}});function yv({className:e,align:t=`inline-start`,...n}){return(0,Q.jsx)(`div`,{role:`group`,"data-slot":`input-group-addon`,"data-align":t,className:D(vv({align:t}),e),onClick:e=>{e.target.closest(`button`)||e.currentTarget.parentElement?.querySelector(`input`)?.focus()},...n})}var bv=fe(`flex items-center gap-2 text-sm shadow-none`,{variants:{size:{xs:`h-6 gap-1 rounded-[calc(var(--radius)-3px)] px-1.5 [&>svg:not([class*='size-'])]:size-3.5`,sm:``,"icon-xs":`size-6 rounded-[calc(var(--radius)-3px)] p-0 has-[>svg]:p-0`,"icon-sm":`size-8 p-0 has-[>svg]:p-0`}},defaultVariants:{size:`xs`}});function xv({className:e,type:t=`button`,variant:n=`ghost`,size:r=`xs`,...i}){return(0,Q.jsx)(rt,{type:t,"data-size":r,variant:n,className:D(bv({size:r}),e),...i})}function Sv({className:e,...t}){return(0,Q.jsx)(De,{"data-slot":`input-group-control`,className:D(`flex-1 rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:ring-0 disabled:bg-transparent aria-invalid:ring-0 dark:bg-transparent dark:disabled:bg-transparent`,e),...t})}function Cv({className:e,...t}){return(0,Q.jsx)(gv,{"data-slot":`input-group-control`,className:D(`flex-1 resize-none rounded-none border-0 bg-transparent py-2 shadow-none ring-0 focus-visible:ring-0 disabled:bg-transparent aria-invalid:ring-0 dark:bg-transparent dark:disabled:bg-transparent`,e),...t})}function wv({className:e,...t}){return(0,Q.jsx)(`label`,{"data-slot":`label`,className:D(`flex items-center gap-2 text-base leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50`,e),...t})}export{l_ as A,wt as B,d_ as C,i_ as D,a_ as E,rg as F,_t as G,St as H,eg as I,Eg as L,t_ as M,wg as N,s_ as O,Cg as P,kg as R,f_ as S,m_ as T,xt as U,Ct as V,yt as W,rv as _,Sv as a,y_ as b,sv as c,pv as d,fv as f,nv as g,$_ as h,xv as i,o_ as j,c_ as k,dv as l,cv as m,_v as n,Cv as o,mv as p,yv as r,gv as s,wv as t,hv as u,tv as v,p_ as w,__ as x,ev as y,yg as z};
@@ -1 +1 @@
1
- import{n as e,t}from"./path-fybaL0A-.js";import{t as n}from"./array-BifhSqXX.js";import{rt as r}from"./chunk-NSK5VX7P-BHCOTpr9.js";function i(e){return e[0]}function a(e){return e[1]}function o(o,s){var c=e(!0),l=null,u=r,d=null,f=t(p);o=typeof o==`function`?o:o===void 0?i:e(o),s=typeof s==`function`?s:s===void 0?a:e(s);function p(e){var t,r=(e=n(e)).length,i,a=!1,p;for(l??(d=u(p=f())),t=0;t<=r;++t)!(t<r&&c(i=e[t],t,e))===a&&((a=!a)?d.lineStart():d.lineEnd()),a&&d.point(+o(i,t,e),+s(i,t,e));if(p)return d=null,p+``||null}return p.x=function(t){return arguments.length?(o=typeof t==`function`?t:e(+t),p):o},p.y=function(t){return arguments.length?(s=typeof t==`function`?t:e(+t),p):s},p.defined=function(t){return arguments.length?(c=typeof t==`function`?t:e(!!t),p):c},p.curve=function(e){return arguments.length?(u=e,l!=null&&(d=u(l)),p):u},p.context=function(e){return arguments.length?(e==null?l=d=null:d=u(l=e),p):l},p}export{o as t};
1
+ import{n as e,t}from"./path-fybaL0A-.js";import{t as n}from"./array-BifhSqXX.js";import{rt as r}from"./chunk-NSK5VX7P-D5026Kzu.js";function i(e){return e[0]}function a(e){return e[1]}function o(o,s){var c=e(!0),l=null,u=r,d=null,f=t(p);o=typeof o==`function`?o:o===void 0?i:e(o),s=typeof s==`function`?s:s===void 0?a:e(s);function p(e){var t,r=(e=n(e)).length,i,a=!1,p;for(l??(d=u(p=f())),t=0;t<=r;++t)!(t<r&&c(i=e[t],t,e))===a&&((a=!a)?d.lineStart():d.lineEnd()),a&&d.point(+o(i,t,e),+s(i,t,e));if(p)return d=null,p+``||null}return p.x=function(t){return arguments.length?(o=typeof t==`function`?t:e(+t),p):o},p.y=function(t){return arguments.length?(s=typeof t==`function`?t:e(+t),p):s},p.defined=function(t){return arguments.length?(c=typeof t==`function`?t:e(!!t),p):c},p.curve=function(e){return arguments.length?(u=e,l!=null&&(d=u(l)),p):u},p.context=function(e){return arguments.length?(e==null?l=d=null:d=u(l=e),p):l},p}export{o as t};
@@ -0,0 +1 @@
1
+ import{i as e}from"./Chat-nhlJdFjI.js";export{e as Mermaid};