@staff0rd/assist 0.1190.2 → 0.1190.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/.build-files CHANGED
@@ -39,7 +39,6 @@ chunk-2RUGZQUD.js
39
39
  chunk-2RYBRXTJ.js
40
40
  chunk-2T5HRFWP.js
41
41
  chunk-2ZUJA3R6.js
42
- chunk-3AYLDTHV.js
43
42
  chunk-3HNTLFII.js
44
43
  chunk-3JXMQFUS.js
45
44
  chunk-3KLTYFPV.js
@@ -54,7 +53,6 @@ chunk-4JIXM5NT.js
54
53
  chunk-4L7TQE67.js
55
54
  chunk-4Y4ADPEK.js
56
55
  chunk-4YAIQN3S.js
57
- chunk-4YBU2KWW.js
58
56
  chunk-4YHDWC5E.js
59
57
  chunk-556BOFTS.js
60
58
  chunk-56USVTPP.js
@@ -83,7 +81,6 @@ chunk-7HNRCA3N.js
83
81
  chunk-7KDF6H4R.js
84
82
  chunk-7KVL2L7Z.js
85
83
  chunk-7NZOH4LN.js
86
- chunk-7PS3S6CV.js
87
84
  chunk-7SMQSAXT.js
88
85
  chunk-A2XSU5K6.js
89
86
  chunk-A7ONLVZD.js
@@ -96,7 +93,6 @@ chunk-AFQMD7AO.js
96
93
  chunk-AH7XVN5D.js
97
94
  chunk-ALAS5LZJ.js
98
95
  chunk-APZ6ZTDA.js
99
- chunk-ATYWOLXK.js
100
96
  chunk-AVLELL42.js
101
97
  chunk-AYZKB6AU.js
102
98
  chunk-B2XNGBON.js
@@ -132,6 +128,7 @@ chunk-DS2YJZZY.js
132
128
  chunk-DUNO7WBT.js
133
129
  chunk-DZGYHAE7.js
134
130
  chunk-E36L7ASL.js
131
+ chunk-E47YUHYL.js
135
132
  chunk-EEFDZ4FS.js
136
133
  chunk-EITOI7YF.js
137
134
  chunk-EM5TGZYD.js
@@ -150,23 +147,25 @@ chunk-F7QYFJB2.js
150
147
  chunk-FAYB2ZL6.js
151
148
  chunk-FCH7H3EL.js
152
149
  chunk-FGCGH2CT.js
150
+ chunk-FJSVCSF2.js
153
151
  chunk-FKM6PT3Q.js
154
152
  chunk-FLDRXYEM.js
155
153
  chunk-FOPR6LRY.js
156
154
  chunk-FPWL4VRC.js
157
155
  chunk-FQZ6D3OJ.js
156
+ chunk-FSXFCN77.js
158
157
  chunk-FVZP4ULO.js
159
158
  chunk-FYYZG4GY.js
160
159
  chunk-G3CJH2XK.js
161
160
  chunk-G3ROBZ4I.js
162
161
  chunk-G5GN2KBP.js
163
162
  chunk-G7UI2W7U.js
163
+ chunk-GHMXF3PZ.js
164
164
  chunk-GIHVMELY.js
165
165
  chunk-GL5GKF5A.js
166
166
  chunk-GNNMJOUE.js
167
167
  chunk-GQF23TWI.js
168
168
  chunk-GRXFWFGP.js
169
- chunk-GUGVH5LO.js
170
169
  chunk-GVI4JSG7.js
171
170
  chunk-GVVK5XFZ.js
172
171
  chunk-H2KHIEQF.js
@@ -217,6 +216,7 @@ chunk-JS2XXDJN.js
217
216
  chunk-JUVR4JSY.js
218
217
  chunk-JVG5AJA2.js
219
218
  chunk-JVTCXR7C.js
219
+ chunk-JW7RH6UO.js
220
220
  chunk-JWZXZBPN.js
221
221
  chunk-K45LIKCT.js
222
222
  chunk-K5JPUERO.js
@@ -307,6 +307,7 @@ chunk-S6XYTJU2.js
307
307
  chunk-SDMBTSYP.js
308
308
  chunk-SHWMHL7S.js
309
309
  chunk-SO3IBV6J.js
310
+ chunk-SQ32XJCS.js
310
311
  chunk-SQX66MN6.js
311
312
  chunk-SSKHLBQB.js
312
313
  chunk-SURCYYQ6.js
@@ -321,7 +322,6 @@ chunk-TJM6UIF2.js
321
322
  chunk-TSRTRJU4.js
322
323
  chunk-TUPSNHFZ.js
323
324
  chunk-TVQY3HPZ.js
324
- chunk-TYG43KXM.js
325
325
  chunk-TZ5PVDAR.js
326
326
  chunk-UC5YRU4P.js
327
327
  chunk-UE5PIMY2.js
@@ -474,7 +474,7 @@ deps-RSUOIZPE.js
474
474
  docsConfirm-AQGXUXUM.js
475
475
  docsScreenshots-VV5F5SK5.js
476
476
  docsUnlock-JTCIE32Q.js
477
- doctorNodes-RZHPZ6WN.js
477
+ doctorNodes-GTAW2T5A.js
478
478
  done-YSG44MAX.js
479
479
  drainDaemon-ZHP2VY7D.js
480
480
  dropRetiredTables-JBLALSG5.js
@@ -581,7 +581,7 @@ repos-HRCIMY6J.js
581
581
  resolveHarness-CRWWVE4U.js
582
582
  resolveModel-2I3SVZKR.js
583
583
  restartDaemon-Y7V2QF3N.js
584
- restartNode-FQDJNBXD.js
584
+ restartNode-JTMKMTB7.js
585
585
  restructure-S6KIV6TM.js
586
586
  review-Q2HDUBAA.js
587
587
  reviewPrComments-PX4MPOTQ.js
@@ -589,7 +589,7 @@ rewindPhase-TCQMOWKB.js
589
589
  rulesAdd-DR25M5KY.js
590
590
  run-D7UQIGJU.js
591
591
  run-DRGU5WNL.js
592
- runDaemon-5SK76CAA.js
592
+ runDaemon-ZTJ734QT.js
593
593
  runExtract-7H2MKKFQ.js
594
594
  runParallelPhase-6GQMW5NT.js
595
595
  runRefine-K764J34T.js
@@ -611,7 +611,7 @@ show-GUW62FKK.js
611
611
  show-IWLHTZEP.js
612
612
  showClaudeCodeIcon-E4SAM3GN.js
613
613
  showCodexIcon-YUAKV4NI.js
614
- signExtension-UDDHW7XN.js
614
+ signExtension-JLTUANO7.js
615
615
  simulateDivergence-VB4UL4UR.js
616
616
  skip-7Q3IVOBV.js
617
617
  slack-VILAGICW.js
@@ -639,7 +639,7 @@ unlinkNode-RKC44U2T.js
639
639
  unstar-YQDZUJV7.js
640
640
  update-FHGTCK6N.js
641
641
  update-W7ANHGDR.js
642
- updateNode-E3ZFQC5W.js
642
+ updateNode-ICDHHRSS.js
643
643
  updatePhase-JEVJRAOR.js
644
644
  updatePlan-QZVWDL2U.js
645
645
  version-5K75T67C.js
@@ -647,8 +647,8 @@ viewIssue-N6W53LSK.js
647
647
  watchLoop-MV7DVGC6.js
648
648
  watchReport-A4W7UOAJ.js
649
649
  watchWait-5Y2J5VQY.js
650
- web-5JW4TDMO.js
651
- web-OS6IBX7Z.js
650
+ web-QCFMGH4C.js
651
+ web-XHULOCAS.js
652
652
  withPool-LEJ76IOJ.js
653
653
  wontdo-XAQGHSR5.js
654
654
  wontfix-XV5XJADI.js
@@ -1 +1 @@
1
- 0.1190.2
1
+ 0.1190.3
@@ -10,7 +10,7 @@ import {
10
10
  } from "./chunk-JM57BCD6.js";
11
11
  import {
12
12
  firstBrokenHop
13
- } from "./chunk-GUGVH5LO.js";
13
+ } from "./chunk-SQ32XJCS.js";
14
14
  import {
15
15
  describePeerError,
16
16
  fetchPeerJson
@@ -47,7 +47,7 @@ import {
47
47
  import {
48
48
  ASSIST_VERSION,
49
49
  PROTOCOL_VERSION
50
- } from "./chunk-ATYWOLXK.js";
50
+ } from "./chunk-FJSVCSF2.js";
51
51
  import {
52
52
  findLinkSpec
53
53
  } from "./chunk-J2PPCMCR.js";
@@ -2754,20 +2754,20 @@ import { promisify as promisify4 } from "util";
2754
2754
 
2755
2755
  // src/commands/sessions/web/signedAttachmentUrl.ts
2756
2756
  var ASSET_ID = /^[0-9a-f]{8}(?:-[0-9a-f]{4}){3}-[0-9a-f]{12}$/i;
2757
- var RENDERED_HOSTS = /* @__PURE__ */ new Set([
2758
- "private-user-images.githubusercontent.com",
2759
- "github.com"
2760
- ]);
2757
+ var SIGNED_HOST = "private-user-images.githubusercontent.com";
2761
2758
  function isAttachmentAssetId(assetId) {
2762
2759
  return ASSET_ID.test(assetId);
2763
2760
  }
2764
2761
  function signedAttachmentUrl(bodyHtml, assetId) {
2762
+ let unsigned = null;
2765
2763
  for (const [, raw] of bodyHtml.matchAll(/\b(?:src|href)="(https:[^"]+)"/g)) {
2766
2764
  const url = raw.replace(/&/g, "&");
2767
2765
  if (!url.toLowerCase().includes(assetId.toLowerCase())) continue;
2768
- if (RENDERED_HOSTS.has(new URL(url).hostname)) return url;
2766
+ const { hostname } = new URL(url);
2767
+ if (hostname === SIGNED_HOST) return url;
2768
+ if (hostname === "github.com") unsigned ??= url;
2769
2769
  }
2770
- return null;
2770
+ return unsigned;
2771
2771
  }
2772
2772
 
2773
2773
  // src/commands/sessions/web/githubAttachment.ts
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-5CNDLMYO.js";
4
4
  import {
5
5
  package_default
6
- } from "./chunk-TYG43KXM.js";
6
+ } from "./chunk-GHMXF3PZ.js";
7
7
  import {
8
8
  loadConfig
9
9
  } from "./chunk-UFSOFNXQ.js";
@@ -14,7 +14,7 @@ import {
14
14
  isHello,
15
15
  linkVersionCheck,
16
16
  negotiateProtocol
17
- } from "./chunk-ATYWOLXK.js";
17
+ } from "./chunk-FJSVCSF2.js";
18
18
 
19
19
  // src/commands/sessions/nodes/probePeerHello.ts
20
20
  var HELLO_TIMEOUT_MS = 5e3;
@@ -1,7 +1,7 @@
1
1
  // package.json
2
2
  var package_default = {
3
3
  name: "@staff0rd/assist",
4
- version: "0.1190.2",
4
+ version: "0.1190.3",
5
5
  type: "module",
6
6
  main: "dist/index.js",
7
7
  bin: {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  firstBrokenHop
3
- } from "./chunk-GUGVH5LO.js";
3
+ } from "./chunk-SQ32XJCS.js";
4
4
  import {
5
5
  describePeerError
6
6
  } from "./chunk-VABNWHSE.js";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  buildDoctorProbes,
3
3
  diagnoseLink
4
- } from "./chunk-4YBU2KWW.js";
4
+ } from "./chunk-FSXFCN77.js";
5
5
  import {
6
6
  findLinkSpec
7
7
  } from "./chunk-J2PPCMCR.js";
@@ -4130,7 +4130,7 @@ ${l}
4130
4130
 
4131
4131
  Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let a of e.seen.entries()){let s=a[1];if(t===a[0]){i(a);continue}if(e.external){let u=e.external.registry.get(a[0])?.id;if(t!==a[0]&&u){i(a);continue}}if(e.metadataRegistry.get(a[0])?.id){i(a);continue}if(s.cycle){i(a);continue}s.count>1&&e.reused==="ref"&&i(a)}e.external&&(e.sharedDefsExtractedFor=e.external)}function _Vr(e){let t=e.anyOf;if(!Array.isArray(t)||t.length===0||e.type!==void 0)return;let r=[];for(let n of t){if(!n||typeof n!="object")return;_Vr(n);let o=Object.keys(n);if(o.length!==1||o[0]!=="type")return;let i=n.type;for(let a of Array.isArray(i)?i:[i]){if(typeof a!="string")return;r.includes(a)||r.push(a)}}delete e.anyOf,e.type=r.length===1?r[0]:r}var EVr=new Set(["type","properties","required","additionalProperties"]),CVr=["oneOf","anyOf"];function kVr(e){let t=e.additionalProperties;return t===void 0||t===!1||typeof t!="object"||t===null?null:Object.keys(t).length?t:null}function Lpt(e){let t=[];for(let i of e){if(typeof i!="object"||i.type!=="object")return null;for(let a in i)if(!EVr.has(a))return null;t.push(i)}let r={},n=new Set;for(let i of t){for(let a in i.properties){if(Object.prototype.hasOwnProperty.call(r,a))continue;let s=[];for(let u of t){let d=u.properties?.[a]??kVr(u);d!=null&&(s.some(f=>JSON.stringify(f)===JSON.stringify(d))||s.push(d))}let l=s.length===1?s[0]:Lpt(s)??{allOf:s};kd(r,a,l)}for(let a of i.required??[])n.add(a)}let o={type:"object",properties:r};if(n.size&&(o.required=[...n]),t.every(i=>i.additionalProperties===!1))o.additionalProperties=!1;else{let i=[];for(let a of t){let s=kVr(a);s&&!i.some(l=>JSON.stringify(l)===JSON.stringify(s))&&i.push(s)}i.length===1?o.additionalProperties=i[0]:i.length>1&&(o.additionalProperties={allOf:i})}return o}function UVo(e){let t=e.allOf;if(!Array.isArray(t)||t.length<2)return;for(let o of EVr)if(o in e)return;let r=t.filter(o=>CVr.some(i=>Array.isArray(o[i]))),n=null;if(!r.length)n=Lpt(t);else{let o=r[0],i=CVr.find(l=>Array.isArray(o[l]));if(Object.keys(o).length!==1)return;let a=t.filter(l=>l!==o),s=o[i].map(l=>Lpt([...a,l]));if(s.some(l=>!l))return;n={[i]:s}}n&&(delete e.allOf,Sse(e,n))}function v3(e,t){let r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");let n=s=>{let l=e.seen.get(s);if(l.ref===null)return;let u=l.def??l.schema,d={...u},f=l.ref;if(l.ref=null,f){n(f);let h=e.seen.get(f),m=h.schema;if(m.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(u.allOf=u.allOf??[],u.allOf.push(m)):Sse(u,m),Sse(u,d),s._zod.parent===f)for(let y in u)y==="$ref"||y==="allOf"||y in d||delete u[y];if(m.$ref&&h.def)for(let y in u)y==="$ref"||y==="allOf"||y in h.def&&JSON.stringify(u[y])===JSON.stringify(h.def[y])&&delete u[y]}let p=s._zod.parent;if(p&&p!==f){n(p);let h=e.seen.get(p);if(h?.schema.$ref&&(u.$ref=h.schema.$ref,h.def))for(let m in u)m==="$ref"||m==="allOf"||m in h.def&&JSON.stringify(u[m])===JSON.stringify(h.def[m])&&delete u[m]}e.override({zodSchema:s,jsonSchema:u,path:l.path??[]})};if(!e.external||e.sharedEmitDoneFor!==e.external){for(let s of[...e.seen.entries()].reverse())n(s[0]);if(e.target!=="openapi-3.0")for(let s of e.seen.entries())_Vr(s[1].def??s[1].schema);for(let s of e.deferred)s();if(e.intersections.length){let s=new Map;for(let l of e.seen.values())for(let u of[l.schema,l.def]){let d=u?.allOf;if(!Array.isArray(d))continue;let f=s.get(d);f?f.push(u):s.set(d,[u])}for(let l of e.intersections)for(let u of s.get(l)??[])UVo(u)}}let o={};if(e.target==="draft-2020-12"?o.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?o.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?o.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){let s=e.external.registry.get(t)?.id;if(!s)throw new Error("Schema is missing an `id` property");o.$id=e.external.uri(s)}Sse(o,r.defId?r.schema:r.def??r.schema);let i=e.metadataRegistry.get(t)?.id;i!==void 0&&o.id===i&&delete o.id;let a=e.external?.defs??{};if(!e.external||e.sharedEmitDoneFor!==e.external)for(let s of e.seen.entries()){let l=s[1];l.def&&l.defId&&(l.def.id===l.defId&&delete l.def.id,kd(a,l.defId,l.def))}e.external&&(e.sharedEmitDoneFor=e.external),e.external||Object.keys(a).length>0&&(e.target==="draft-2020-12"?o.$defs=a:o.definitions=a);try{let s=JSON.parse(JSON.stringify(o));return Object.defineProperty(s,"~standard",{value:{...t["~standard"],jsonSchema:{input:bj(t,"input",e.processors),output:bj(t,"output",e.processors)}},enumerable:!1,writable:!1}),s}catch{throw new Error("Error converting schema to JSON.")}}function wp(e,t){let r=t??{seen:new Set};if(r.seen.has(e))return!1;r.seen.add(e);let n=e._zod.def;if(n.type==="transform")return!0;if(n.type==="array")return wp(n.element,r);if(n.type==="set")return wp(n.valueType,r);if(n.type==="lazy")return wp(n.getter(),r);if(n.type==="promise"||n.type==="optional"||n.type==="nonoptional"||n.type==="nullable"||n.type==="readonly"||n.type==="default"||n.type==="prefault"||n.type==="catch")return wp(n.innerType,r);if(n.type==="intersection")return wp(n.left,r)||wp(n.right,r);if(n.type==="record"||n.type==="map")return wp(n.keyType,r)||wp(n.valueType,r);if(n.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:wp(n.in,r)||wp(n.out,r);if(n.type==="object"){for(let o in n.shape)if(wp(n.shape[o],r))return!0;return!1}if(n.type==="union"){for(let o of n.options)if(wp(o,r))return!0;return!1}if(n.type==="tuple"){for(let o of n.items)if(wp(o,r))return!0;return!!(n.rest&&wp(n.rest,r))}return!1}var Ipt=(e,t={})=>r=>{let n=g3({...r,processors:t});return ji(e,n),y3(n,e),v3(n,e)},bj=(e,t,r={})=>n=>{let{libraryOptions:o,target:i}=n??{},a=g3({...o??{},target:i,io:t,processors:r});return ji(e,a),y3(a,e),v3(a,e)};var xj=(e,t,r)=>{(e[t]===void 0||r>e[t])&&(e[t]=r)},Sj=(e,t,r)=>{(e[t]===void 0||r<e[t])&&(e[t]=r)},RVr=(e,t)=>{xj(e,"minimum",t),Sj(e,"maximum",t)},IVr=(e,t)=>{e.multipleOf??(e.multipleOf=[]),e.multipleOf.includes(t)||e.multipleOf.push(t)},DVr=(e,t)=>{e.patterns??(e.patterns=new Set),e.patterns.add(t)},MVr=(e,t)=>{e.mime=e.mime?e.mime.filter(r=>t.includes(r)):[...t]},NVr=(e,t)=>{e.format=t,t.includes("int")&&(e.isInt=!0)},PVr=(e,t)=>xj(e,"minimum",t.minimum),AVr=(e,t)=>Sj(e,"maximum",t.maximum),LVr=e=>(t,r)=>{NVr(t,r.format);let[n,o]=e[r.format];xj(t,"minimum",n),Sj(t,"maximum",o)},WVo={greater_than:(e,t)=>xj(e,t.inclusive?"minimum":"exclusiveMinimum",t.value),less_than:(e,t)=>Sj(e,t.inclusive?"maximum":"exclusiveMaximum",t.value),multiple_of:(e,t)=>IVr(e,t.value),number_format:LVr(Uae),bigint_format:LVr(Wae),min_length:PVr,max_length:AVr,length_equals:(e,t)=>RVr(e,t.length),min_size:PVr,max_size:AVr,size_equals:(e,t)=>RVr(e,t.size),string_format:(e,t)=>{NVr(e,t.format),t.pattern&&DVr(e,t.pattern),(t.format==="base64"||t.format==="base64url")&&(e.contentEncoding=t.format),(t.local||t.precision===-1)&&(e.laxFormat=!0)},mime_type:(e,t)=>MVr(e,t.mime)};function Wc(e){let t={},r=e._zod.def,n=e._zod.traits.has("$ZodCheck")?[e,...r.checks??[]]:r.checks??[];for(let i of n)WVo[i._zod.def.check]?.(t,i._zod.def);let o=e._zod.bag;o.minimum!==void 0&&xj(t,"minimum",o.minimum),o.exclusiveMinimum!==void 0&&xj(t,"exclusiveMinimum",o.exclusiveMinimum),o.maximum!==void 0&&Sj(t,"maximum",o.maximum),o.exclusiveMaximum!==void 0&&Sj(t,"exclusiveMaximum",o.exclusiveMaximum),o.multipleOf!==void 0&&IVr(t,o.multipleOf),o.format!==void 0&&(t.format??(t.format=o.format),o.format.includes("int")&&(t.isInt=!0)),o.mime&&MVr(t,o.mime);for(let i of o.patterns??[])DVr(t,i);return t}var VVo={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},GVo=new Map([[TRe,$ut],[ase,Fut]]),OVr=e=>GVo.get(e)??e,Npt=(e,t,r,n)=>{let o=r;o.type="string";let{minimum:i,maximum:a,format:s,patterns:l,contentEncoding:u,laxFormat:d}=Wc(e);if(typeof i=="number"&&(o.minLength=i),typeof a=="number"&&(o.maxLength=a),s&&(o.format=VVo[s]??s,o.format===""&&delete o.format,(s==="time"||d)&&delete o.format),u&&(o.contentEncoding=u),l&&l.size>0){let f=[...l].map(OVr);f.length===1?o.pattern=f[0].source:f.length>1&&(o.allOf=[...f.map(p=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:p.source}))])}},Opt=(e,t,r,n)=>{let o=r,{minimum:i,maximum:a,multipleOf:s,exclusiveMaximum:l,exclusiveMinimum:u,isInt:d}=Wc(e);o.type=d?"integer":"number";let f=typeof u=="number"&&u>=(i??Number.NEGATIVE_INFINITY),p=typeof l=="number"&&l<=(a??Number.POSITIVE_INFINITY),h=t.target==="draft-04"||t.target==="openapi-3.0";if(f?h?(o.minimum=u,o.exclusiveMinimum=!0):o.exclusiveMinimum=u:typeof i=="number"&&(o.minimum=i),p?h?(o.maximum=l,o.exclusiveMaximum=!0):o.exclusiveMaximum=l:typeof a=="number"&&(o.maximum=a),s){let m=new Set;for(let v of s)Number.isFinite(v)&&v!==0?m.add(Math.abs(v)):Uc(e,t,o,n,`A multipleOf divisor of ${v} cannot be represented in JSON Schema`);let[g,...y]=m;g!==void 0&&(o.multipleOf=g),y.length&&(o.allOf=[...o.allOf??[],...y.map(v=>({multipleOf:v}))])}},Bpt=(e,t,r,n)=>{r.type="boolean"},$pt=(e,t,r,n)=>{Uc(e,t,r,n,"BigInt cannot be represented in JSON Schema")},Fpt=(e,t,r,n)=>{Uc(e,t,r,n,"Symbols cannot be represented in JSON Schema")},zpt=(e,t,r,n)=>{t.target==="openapi-3.0"?(r.type="string",r.nullable=!0,r.enum=[null]):r.type="null"},Hpt=(e,t,r,n)=>{Uc(e,t,r,n,"Undefined cannot be represented in JSON Schema")},Upt=(e,t,r,n)=>{Uc(e,t,r,n,"Void cannot be represented in JSON Schema")},Wpt=(e,t,r,n)=>{r.not={}},Vpt=(e,t,r,n)=>{},Gpt=(e,t,r,n)=>{},qpt=(e,t,r,n)=>{Uc(e,t,r,n,"Date cannot be represented in JSON Schema")},jpt=(e,t,r,n)=>{let o=e._zod.def,i=Gq(o.entries);if(i.length===0){r.not={};return}i.every(a=>typeof a=="number")&&(r.type="number"),i.every(a=>typeof a=="string")&&(r.type="string"),r.enum=i},Ypt=(e,t,r,n)=>{let o=e._zod.def;if(o.values.length===0){r.not={};return}let i=[];for(let a of o.values)if(a===void 0){if(Uc(e,t,r,n,"Literal `undefined` cannot be represented in JSON Schema"))return}else if(typeof a=="bigint"){if(Uc(e,t,r,n,"BigInt literals cannot be represented in JSON Schema"))return;i.push(Number(a))}else i.push(a);if(i.length!==0)if(i.length===1){let a=i[0];r.type=a===null?"null":typeof a,t.target==="draft-04"||t.target==="openapi-3.0"?r.enum=[a]:r.const=a}else i.every(a=>typeof a=="number")&&(r.type="number"),i.every(a=>typeof a=="string")&&(r.type="string"),i.every(a=>typeof a=="boolean")&&(r.type="boolean"),i.every(a=>a===null)&&(r.type="null"),r.enum=i},Kpt=(e,t,r,n)=>{Uc(e,t,r,n,"NaN cannot be represented in JSON Schema")},Xpt=(e,t,r,n)=>{let o=r,i=e._zod.pattern;if(!i)throw new Error("Pattern not found in template literal");o.type="string",o.pattern=i.source},Zpt=(e,t,r,n)=>{let o=r;o.type="string",o.format="binary",o.contentEncoding="binary";let{minimum:i,maximum:a,mime:s}=Wc(e);i!==void 0&&(o.minLength=i),a!==void 0&&(o.maxLength=a),s&&(s.length===0?o.not={}:s.length===1?o.contentMediaType=s[0]:o.anyOf=s.map(l=>({contentMediaType:l})))},Qpt=(e,t,r,n)=>{r.type="boolean"},Jpt=(e,t,r,n)=>{Uc(e,t,r,n,"Custom types cannot be represented in JSON Schema")},eht=(e,t,r,n)=>{Uc(e,t,r,n,"Function types cannot be represented in JSON Schema")},tht=(e,t,r,n)=>{Uc(e,t,r,n,"Transforms cannot be represented in JSON Schema")},rht=(e,t,r,n)=>{Uc(e,t,r,n,"Map cannot be represented in JSON Schema")},nht=(e,t,r,n)=>{Uc(e,t,r,n,"Set cannot be represented in JSON Schema")},oht=(e,t,r,n)=>{let o=r,i=e._zod.def,{minimum:a,maximum:s}=Wc(e);typeof a=="number"&&(o.minItems=a),typeof s=="number"&&(o.maxItems=s),o.type="array",o.items=ji(i.element,t,{...n,path:[...n.path,"items"]})};function Tse(e){let t=e._zod.def;return t.type==="pipe"&&t.in._zod.traits.has("$ZodTransform")?Tse(t.out):t.type==="catch"?Tse(t.innerType):e._zod.optin}var iht=(e,t,r,n)=>{let o=r,i=e._zod.def,a=i.shape;if(Object.getOwnPropertySymbols(a).length&&Uc(e,t,o,n,"Symbol keys cannot be represented in JSON Schema"))return;o.type="object",o.properties={};for(let u in a)kd(o.properties,u,ji(a[u],t,{...n,path:[...n.path,"properties",u]}));let l=[];for(let u of Object.keys(a)){let d=i.shape[u];(t.io==="input"?Tse(d)===void 0:d._zod.optout===void 0)&&l.push(u)}l.length>0&&(o.required=l),i.catchall?._zod.def.type==="never"?o.additionalProperties=!1:i.catchall?i.catchall&&(o.additionalProperties=ji(i.catchall,t,{...n,path:[...n.path,"additionalProperties"]})):t.io==="output"&&(o.additionalProperties=!1)},b3e=(e,t,r,n)=>{let o=e._zod.def,i=o.inclusive===!1,a=o.options.map((s,l)=>ji(s,t,{...n,path:[...n.path,i?"oneOf":"anyOf",l]}));i?r.oneOf=a:r.anyOf=a},aht=(e,t,r,n)=>{let o=e._zod.def,i=ji(o.left,t,{...n,path:[...n.path,"allOf",0]}),a=ji(o.right,t,{...n,path:[...n.path,"allOf",1]}),s=u=>"allOf"in u&&Object.keys(u).length===1,l=[...s(i)?i.allOf:[i],...s(a)?a.allOf:[a]];r.allOf=l,t.intersections.push(l)},sht=(e,t,r,n)=>{let o=r,i=e._zod.def;o.type="array";let a=t.target==="draft-2020-12"?"prefixItems":"items",s=t.target==="draft-2020-12"||t.target==="openapi-3.0"?"items":"additionalItems",l=i.items.map((g,y)=>ji(g,t,{...n,path:[...n.path,a,y]})),u=i.rest?ji(i.rest,t,{...n,path:[...n.path,s,...t.target==="openapi-3.0"?[i.items.length]:[]]}):null,d=i.items.length;for(;d>0;){let g=i.items[d-1];if(!(t.io==="input"?Tse(g)!==void 0:g._zod.optout==="optional"))break;d--}let f=i.items.length,p=!i.rest;t.target==="draft-2020-12"?(o.prefixItems=l,p?o.items=!1:u&&(o.items=u),d>0&&(o.minItems=d),p&&(o.maxItems=f)):t.target==="openapi-3.0"?(o.items={anyOf:l},u&&o.items.anyOf.push(u),d>0&&(o.minItems=d),p&&(o.maxItems=f)):(o.items=l,p?o.additionalItems=!1:u&&(o.additionalItems=u),d>0&&(o.minItems=d),p&&(o.maxItems=f));let{minimum:h,maximum:m}=Wc(e);typeof h=="number"&&(o.minItems=h),typeof m=="number"&&(o.maxItems=m)};function Dpt(e,t,r){if(t.$ref){if(r.has(t))return t;r.add(t);let m=e.get(t)?.def;if(!m)return t;let g=Dpt(e,m,r);return g===m?t:g}for(let m of["anyOf","oneOf"]){let g=t[m];if(!Array.isArray(g))continue;let y=g.map(v=>Dpt(e,v,r));y.some((v,b)=>v!==g[b])&&(t={...t,[m]:y})}let n=Array.isArray(t.type)?t.type:[t.type],o=!n.includes("string")&&n.some(m=>m==="number"||m==="integer"),i=t.enum??(t.const!==void 0?[t.const]:void 0);if(!o&&!i?.some(m=>typeof m=="number"))return t;let{minimum:a,maximum:s,exclusiveMinimum:l,exclusiveMaximum:u,multipleOf:d,format:f,id:p,...h}=t;return h.enum?h.enum=h.enum.map(m=>typeof m=="number"?String(m):m):typeof h.const=="number"&&(h.const=String(h.const)),o&&(h.type="string",i||(h.pattern=(n.includes("number")?ek:Jae).source)),h}var Mpt=new WeakMap;function qVo(e){let t=new Map;for(let n of e.seen.values())n.def&&!t.has(n.schema)&&t.set(n.schema,n);let r=new Map;for(let n of Mpt.get(e)??[]){let o=e.seen.get(n),i=(o?.def??o?.schema)?.propertyNames;if(!i||i===!0||r.has(i))continue;let a=Dpt(t,i,new Set);a!==i&&r.set(i,a)}if(r.size)for(let n of e.seen.values())for(let o of[n.schema,n.def]){let i=o&&r.get(o.propertyNames);i&&(o.propertyNames=i)}}var lht=(e,t,r,n)=>{let o=r,i=e._zod.def;o.type="object";let a=i.keyType,s=Wc(a).patterns;if(i.mode==="loose"&&s&&s.size>0){let d=ji(i.valueType,t,{...n,path:[...n.path,"patternProperties","*"]});o.patternProperties={};for(let f of s)kd(o.patternProperties,OVr(f).source,d)}else{if(t.target==="draft-07"||t.target==="draft-2020-12"){o.propertyNames=ji(i.keyType,t,{...n,path:[...n.path,"propertyNames"]});let d=Mpt.get(t);d||(d=[],Mpt.set(t,d),t.deferred.push(()=>qVo(t))),d.push(e)}o.additionalProperties=ji(i.valueType,t,{...n,path:[...n.path,"additionalProperties"]})}let l=a._zod.values,u=t.io==="input"&&Tse(i.valueType)!==void 0;if(l&&!i.partial&&!u){let d=[...l].filter(f=>typeof f=="string"||typeof f=="number");d.length>0&&(o.required=d.map(String))}},cht=(e,t,r,n)=>{let o=e._zod.def,i=ji(o.innerType,t,n),a=t.seen.get(e);t.target==="openapi-3.0"?(a.ref=o.innerType,r.nullable=!0):r.anyOf=[i,{type:"null"}]},uht=(e,t,r,n)=>{let o=e._zod.def;ji(o.innerType,t,n);let i=t.seen.get(e);i.ref=o.innerType},dht=Symbol();function BVr(e,t,r,n,o){let i=!1,a=JSON.stringify(e,(s,l)=>typeof l!="bigint"?l:(i=!0,null));return i?(Uc(t,r,n,o,"BigInt defaults cannot be represented in JSON Schema"),dht):JSON.parse(a)}var fht=(e,t,r,n)=>{let o=e._zod.def;ji(o.innerType,t,n);let i=t.seen.get(e);i.ref=o.innerType;let a=BVr(o.defaultValue,e,t,r,n);a!==dht&&(r.default=a)},pht=(e,t,r,n)=>{let o=e._zod.def;ji(o.innerType,t,n);let i=t.seen.get(e);if(i.ref=o.innerType,t.io!=="input")return;let a=BVr(o.defaultValue,e,t,r,n);a!==dht&&(r._prefault=a)},hht=(e,t,r,n)=>{let o=e._zod.def;ji(o.innerType,t,n);let i=t.seen.get(e);i.ref=o.innerType;let a;try{a=o.catchValue(void 0)}catch{Uc(e,t,r,n,"Dynamic catch values are not supported in JSON Schema");return}r.default=a},mht=(e,t,r,n)=>{let o=e._zod.def,i=o.in._zod.traits.has("$ZodTransform"),a=t.io==="input"?i?o.out:o.in:o.out;ji(a,t,n);let s=t.seen.get(e);s.ref=a},ght=(e,t,r,n)=>{let o=e._zod.def;ji(o.innerType,t,n);let i=t.seen.get(e);i.ref=o.innerType,r.readOnly=!0},yht=(e,t,r,n)=>{let o=e._zod.def;ji(o.innerType,t,n);let i=t.seen.get(e);i.ref=o.innerType},x3e=(e,t,r,n)=>{let o=e._zod.def;ji(o.innerType,t,n);let i=t.seen.get(e);i.ref=o.innerType},vht=(e,t,r,n)=>{let o=e._zod.innerType;ji(o,t,n);let i=t.seen.get(e);i.ref=o},v3e={string:Npt,number:Opt,boolean:Bpt,bigint:$pt,symbol:Fpt,null:zpt,undefined:Hpt,void:Upt,never:Wpt,any:Vpt,unknown:Gpt,date:qpt,enum:jpt,literal:Ypt,nan:Kpt,template_literal:Xpt,file:Zpt,success:Qpt,custom:Jpt,function:eht,transform:tht,map:rht,set:nht,array:oht,object:iht,union:b3e,intersection:aht,tuple:sht,record:lht,nullable:cht,nonoptional:uht,default:fht,prefault:pht,catch:hht,pipe:mht,readonly:ght,promise:yht,optional:x3e,lazy:vht};function S3e(e,t){if("_idmap"in e){let n=e,o=g3({...t,processors:v3e}),i={};for(let l of n._idmap.entries()){let[u,d]=l;ji(d,o)}let a={},s={registry:n,uri:t?.uri,defs:i};o.external=s;for(let l of n._idmap.entries()){let[u,d]=l;y3(o,d),kd(a,u,v3(o,d))}if(Object.keys(i).length>0){let l=o.target==="draft-2020-12"?"$defs":"definitions";a.__shared={[l]:i}}return{schemas:a}}let r=g3({...t,processors:v3e});return ji(e,r),y3(r,e),v3(r,e)}var T3e=class{get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter(t){this.ctx.counter=t}get seen(){return this.ctx.seen}constructor(t){let r=t?.target??"draft-2020-12";r==="draft-4"&&(r="draft-04"),r==="draft-7"&&(r="draft-07"),this.ctx=g3({processors:v3e,target:r,...t?.metadata&&{metadata:t.metadata},...t?.unrepresentable&&{unrepresentable:t.unrepresentable},...t?.override&&{override:t.override},...t?.io&&{io:t.io}})}process(t,r={path:[],schemaPath:[]}){return ji(t,this.ctx,r)}emit(t,r){r&&(r.cycles&&(this.ctx.cycles=r.cycles),r.reused&&(this.ctx.reused=r.reused),r.external&&(this.ctx.external=r.external)),this.ctx.sharedDefsExtractedFor=void 0,this.ctx.sharedEmitDoneFor=void 0,y3(this.ctx,t);let n=v3(this.ctx,t),{"~standard":o,...i}=n;return i}};var $Vr={};var Pj={};Vr(Pj,{ZodAny:()=>zht,ZodArray:()=>Vht,ZodBase64:()=>H3e,ZodBase64URL:()=>U3e,ZodBigInt:()=>Ej,ZodBigIntFormat:()=>G3e,ZodBoolean:()=>_j,ZodCIDRv4:()=>F3e,ZodCIDRv6:()=>z3e,ZodCUID:()=>I3e,ZodCUID2:()=>D3e,ZodCatch:()=>dmt,ZodCodec:()=>Ise,ZodCreditCard:()=>Iht,ZodCustom:()=>Dse,ZodCustomStringFormat:()=>KM,ZodDate:()=>_se,ZodDefault:()=>imt,ZodDiscriminatedUnion:()=>qht,ZodE164:()=>W3e,ZodEmail:()=>R3e,ZodEmoji:()=>A3e,ZodEnum:()=>wj,ZodExactOptional:()=>K3e,ZodFile:()=>tmt,ZodFunction:()=>Smt,ZodGUID:()=>P3e,ZodIBAN:()=>Dht,ZodIPv4:()=>B3e,ZodIPv6:()=>$3e,ZodISODate:()=>x3,ZodISODateTime:()=>b3,ZodISODuration:()=>T3,ZodISOTime:()=>S3,ZodInstanceOf:()=>Cmt,ZodIntersection:()=>jht,ZodJWT:()=>V3e,ZodKSUID:()=>O3e,ZodLazy:()=>vmt,ZodLiteral:()=>emt,ZodMAC:()=>Lht,ZodMap:()=>Qht,ZodNaN:()=>pmt,ZodNanoID:()=>L3e,ZodNever:()=>Uht,ZodNonOptional:()=>X3e,ZodNull:()=>$ht,ZodNullable:()=>omt,ZodNumber:()=>kj,ZodNumberFormat:()=>XM,ZodObject:()=>Rse,ZodOptional:()=>Ase,ZodPipe:()=>Lse,ZodPrefault:()=>smt,ZodPreprocess:()=>hmt,ZodPromise:()=>xmt,ZodReadonly:()=>mmt,ZodRecord:()=>Tj,ZodSet:()=>Jht,ZodString:()=>Cj,ZodStringFormat:()=>oa,ZodSuccess:()=>umt,ZodSymbol:()=>Oht,ZodTemplateLiteral:()=>ymt,ZodTransform:()=>rmt,ZodTuple:()=>Kht,ZodType:()=>co,ZodULID:()=>M3e,ZodURL:()=>kse,ZodUUID:()=>kS,ZodUndefined:()=>Bht,ZodUnion:()=>Pse,ZodUnknown:()=>Hht,ZodVoid:()=>Wht,ZodXID:()=>N3e,ZodXor:()=>Ght,_ZodString:()=>E3e,_default:()=>amt,_function:()=>XGr,any:()=>EGr,array:()=>Ese,base64:()=>sGr,base64url:()=>lGr,bigint:()=>TGr,boolean:()=>Nht,catch:()=>fmt,check:()=>ZGr,cidrv4:()=>iGr,cidrv6:()=>aGr,codec:()=>qGr,creditCard:()=>uGr,cuid:()=>ZVr,cuid2:()=>QVr,currencyCode:()=>gGr,custom:()=>QGr,date:()=>PGr,describe:()=>JGr,discriminatedUnion:()=>NGr,e164:()=>cGr,email:()=>HVr,emoji:()=>KVr,enum:()=>j3e,exactOptional:()=>nmt,file:()=>UGr,float32:()=>vGr,float64:()=>bGr,function:()=>XGr,guid:()=>UVr,hash:()=>yGr,hex:()=>mGr,hostname:()=>hGr,httpUrl:()=>YVr,iban:()=>dGr,instanceof:()=>tqr,int:()=>k3e,int32:()=>xGr,int64:()=>wGr,intersection:()=>Yht,invertCodec:()=>jGr,ipv4:()=>rGr,ipv6:()=>oGr,json:()=>nqr,jwt:()=>fGr,keyof:()=>AGr,ksuid:()=>tGr,lazy:()=>bmt,literal:()=>HGr,looseObject:()=>DGr,looseRecord:()=>BGr,mac:()=>nGr,map:()=>$Gr,meta:()=>eqr,nan:()=>GGr,nanoid:()=>XVr,nativeEnum:()=>zGr,never:()=>q3e,nonoptional:()=>cmt,null:()=>Fht,nullable:()=>Cse,nullish:()=>WGr,number:()=>Mht,object:()=>LGr,optional:()=>jM,partialRecord:()=>OGr,pipe:()=>_3e,prefault:()=>lmt,preprocess:()=>oqr,promise:()=>KGr,readonly:()=>gmt,record:()=>Zht,refine:()=>Tmt,set:()=>FGr,strictObject:()=>IGr,string:()=>wse,stringFormat:()=>pGr,stringbool:()=>rqr,success:()=>VGr,superRefine:()=>wmt,symbol:()=>kGr,templateLiteral:()=>YGr,transform:()=>Y3e,tuple:()=>Xht,uint32:()=>SGr,uint64:()=>CGr,ulid:()=>JVr,undefined:()=>_Gr,union:()=>Rj,unknown:()=>qM,url:()=>jVr,uuid:()=>WVr,uuidv4:()=>VVr,uuidv6:()=>GVr,uuidv7:()=>qVr,void:()=>RGr,xid:()=>eGr,xor:()=>MGr});var w3e={};Vr(w3e,{endsWith:()=>dj,gt:()=>wS,gte:()=>ag,includes:()=>cj,length:()=>VM,lowercase:()=>sj,lt:()=>TS,lte:()=>ig,maxLength:()=>WM,maxSize:()=>m3,mime:()=>pj,minLength:()=>tk,minSize:()=>CS,multipleOf:()=>h3,negative:()=>h3e,nonnegative:()=>g3e,nonpositive:()=>m3e,normalize:()=>hj,overwrite:()=>r1,positive:()=>p3e,properties:()=>fj,property:()=>y3e,regex:()=>aj,size:()=>UM,slugify:()=>vj,startsWith:()=>uj,toLowerCase:()=>gj,toUpperCase:()=>yj,trim:()=>mj,uppercase:()=>lj});var FVr=new WeakSet([Object.prototype,Error.prototype]);function C3e(e,t,r){Object.defineProperty(e,t,{configurable:!0,enumerable:!1,get(){let n=r(this);return Object.defineProperty(this,t,{value:n,configurable:!0,writable:!0}),n},set(n){Object.defineProperty(this,t,{value:n,configurable:!0,writable:!0})}})}var zVr=(e,t)=>{vut.init(e,t),e.name="ZodError";let r=Object.getPrototypeOf(e);FVr.has(r)||(FVr.add(r),C3e(r,"format",n=>o=>Kae(n,o)),C3e(r,"flatten",n=>o=>Yae(n,o)),C3e(r,"addIssue",n=>o=>{n.issues.push(o),n.message=JSON.stringify(n.issues,qq,2)}),C3e(r,"addIssues",n=>o=>{n.issues.push(...o),n.message=JSON.stringify(n.issues,qq,2)}),Object.defineProperty(r,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}}))},YVo=dt("ZodError",zVr),Bh=dt("ZodError",zVr,void 0,{Parent:Error});var bht=Zq(Bh),xht=Qq(Bh),Sht=Jq(Bh),Tht=ej(Bh),wht=J5e(Bh),Cht=eRe(Bh),kht=tRe(Bh),_ht=rRe(Bh),Eht=nRe(Bh),Rht=oRe(Bh),Pht=iRe(Bh),Aht=aRe(Bh);function XVo(){Du.localeError||yl($Re())}function YM(){Du.memoizer||yl({memoizer:pse()})}var co=dt("ZodType",(e,t)=>(XVo(),Xn.init(e,t),e.def=t,e.type=t.type,e),{check(...e){let t=this.def;return this.clone($t.mergeDefs(t,{checks:[...t.checks??[],...e.map(r=>typeof r=="function"?{_zod:{check:r,def:{check:"custom"},onattach:[]}}:r)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return Gi(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(Tmt(e,t))},superRefine(e,t){return this.check(wmt(e,t))},overwrite(e){return this.check(r1(e))},optional(){return jM(this)},exactOptional(){return nmt(this)},nullable(){return Cse(this)},nullish(){return jM(Cse(this))},nonoptional(e){return cmt(this,e)},array(){return Ese(this)},or(e){return Rj([this,e])},and(e){return Yht(this,e)},transform(e){return _3e(this,Y3e(e))},default(e){return amt(this,e)},prefault(e){return lmt(this,e)},catch(e){return fmt(this,e)},pipe(e){return _3e(this,e)},readonly(){return gmt(this)},describe(e){let t=this.clone();return _d.add(t,{description:e}),t},meta(...e){if(e.length===0)return _d.get(this);let t=this.clone();return _d.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e,...t){return t.length===0?e(this):e(this,...t)},get"~standard"(){return $t.hide(this,"~standard",{...yRe(this),jsonSchema:{input:bj(this,"input"),output:bj(this,"output")}})},set"~standard"(e){$t.own(this,"~standard",e)},parse:function e(t,r){return bht(this,t,r,{callee:e})},parseAsync:async function e(t,r){return await xht(this,t,r,{callee:e})},safeParse(e,t){return Sht(this,e,t)},async safeParseAsync(e,t){return Tht(this,e,t)},get spa(){return this?.safeParseAsync},set spa(e){$t.own(this,"spa",e)},validate(e,t){return Xae(this,e,t)},validateAsync(e,t){return Zae(this,e,t)},encode:function e(t,r){return wht(this,t,r,{callee:e})},decode:function e(t,r){return Cht(this,t,r,{callee:e})},encodeAsync:async function e(t,r){return await kht(this,t,r,{callee:e})},decodeAsync:async function e(t,r){return await _ht(this,t,r,{callee:e})},safeEncode(e,t){return Eht(this,e,t)},safeDecode(e,t){return Rht(this,e,t)},async safeEncodeAsync(e,t){return Pht(this,e,t)},async safeDecodeAsync(e,t){return Aht(this,e,t)},toJSONSchema(e){return Ipt(this,{})(e)},get description(){return _d.get(this)?.description},get _def(){return this._zod.def}}),E3e=dt("_ZodString",(e,t)=>{$M.init(e,t),co.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Npt(e,r,n,o)},$t.derived({format:e=>Wc(e).format??null,minLength:e=>Wc(e).minimum??null,maxLength:e=>Wc(e).maximum??null},{regex(...e){return this.check(aj(...e))},includes(...e){return this.check(cj(...e))},startsWith(...e){return this.check(uj(...e))},endsWith(...e){return this.check(dj(...e))},min(...e){return this.check(tk(...e))},max(...e){return this.check(WM(...e))},length(...e){return this.check(VM(...e))},nonempty(...e){return this.check(tk(1,...e))},lowercase(e){return this.check(sj(e))},uppercase(e){return this.check(lj(e))},trim(){return this.check(mj())},normalize(...e){return this.check(hj(...e))},toLowerCase(){return this.check(gj())},toUpperCase(){return this.check(yj())},slugify(){return this.check(vj())}})),Cj=dt("ZodString",(e,t)=>{$M.init(e,t),E3e.init(e,t)},{email(e){return this.check(qRe(R3e,e))},url(e){return this.check(gse(kse,e))},jwt(e){return this.check(f3e(V3e,e))},emoji(e){return this.check(QRe(A3e,e))},guid(e){return this.check(jRe(P3e,e))},uuid(e){return this.check(YRe(kS,e))},uuidv4(e){return this.check(KRe(kS,e))},uuidv6(e){return this.check(XRe(kS,e))},uuidv7(e){return this.check(ZRe(kS,e))},nanoid(e){return this.check(JRe(L3e,e))},cuid(e){return this.check(e3e(I3e,e))},cuid2(e){return this.check(t3e(D3e,e))},ulid(e){return this.check(r3e(M3e,e))},base64(e){return this.check(c3e(H3e,e))},base64url(e){return this.check(u3e(U3e,e))},xid(e){return this.check(n3e(N3e,e))},ksuid(e){return this.check(o3e(O3e,e))},ipv4(e){return this.check(i3e(B3e,e))},ipv6(e){return this.check(a3e($3e,e))},cidrv4(e){return this.check(s3e(F3e,e))},cidrv6(e){return this.check(l3e(z3e,e))},e164(e){return this.check(d3e(W3e,e))},datetime(e){return this.check(yse(b3,e))},date(e){return this.check(vse(x3,e))},time(e){return this.check(bse(S3,e))},duration(e){return this.check(xse(T3,e))}});function wse(e){return Yft(Cj,e)}var oa=dt("ZodStringFormat",(e,t)=>{qi.init(e,t),E3e.init(e,t)}),b3=dt("ZodISODateTime",(e,t)=>{$dt.init(e,t),oa.init(e,t)}),x3=dt("ZodISODate",(e,t)=>{Fdt.init(e,t),oa.init(e,t)}),S3=dt("ZodISOTime",(e,t)=>{zdt.init(e,t),oa.init(e,t)}),T3=dt("ZodISODuration",(e,t)=>{Hdt.init(e,t),oa.init(e,t)}),R3e=dt("ZodEmail",(e,t)=>{Edt.init(e,t),oa.init(e,t)});function HVr(e){return qRe(R3e,e)}var P3e=dt("ZodGUID",(e,t)=>{kdt.init(e,t),oa.init(e,t)});function UVr(e){return jRe(P3e,e)}var kS=dt("ZodUUID",(e,t)=>{_dt.init(e,t),oa.init(e,t)});function WVr(e){return YRe(kS,e)}function VVr(e){return KRe(kS,e)}function GVr(e){return XRe(kS,e)}function qVr(e){return ZRe(kS,e)}var kse=dt("ZodURL",(e,t)=>{Adt.init(e,t),oa.init(e,t)});function jVr(e){return gse(kse,e)}function YVr(e){return gse(kse,{protocol:Qae,hostname:Hut,...$t.normalizeParams(e)})}var A3e=dt("ZodEmoji",(e,t)=>{Ldt.init(e,t),oa.init(e,t)});function KVr(e){return QRe(A3e,e)}var L3e=dt("ZodNanoID",(e,t)=>{Idt.init(e,t),oa.init(e,t)});function XVr(e){return JRe(L3e,e)}var I3e=dt("ZodCUID",(e,t)=>{Ddt.init(e,t),oa.init(e,t)});function ZVr(e){return e3e(I3e,e)}var D3e=dt("ZodCUID2",(e,t)=>{Mdt.init(e,t),oa.init(e,t)});function QVr(e){return t3e(D3e,e)}var M3e=dt("ZodULID",(e,t)=>{Ndt.init(e,t),oa.init(e,t)});function JVr(e){return r3e(M3e,e)}var N3e=dt("ZodXID",(e,t)=>{Odt.init(e,t),oa.init(e,t)});function eGr(e){return n3e(N3e,e)}var O3e=dt("ZodKSUID",(e,t)=>{Bdt.init(e,t),oa.init(e,t)});function tGr(e){return o3e(O3e,e)}var B3e=dt("ZodIPv4",(e,t)=>{Udt.init(e,t),oa.init(e,t)});function rGr(e){return i3e(B3e,e)}var Lht=dt("ZodMAC",(e,t)=>{Vdt.init(e,t),oa.init(e,t)});function nGr(e){return Xft(Lht,e)}var $3e=dt("ZodIPv6",(e,t)=>{Wdt.init(e,t),oa.init(e,t)});function oGr(e){return a3e($3e,e)}var F3e=dt("ZodCIDRv4",(e,t)=>{Gdt.init(e,t),oa.init(e,t)});function iGr(e){return s3e(F3e,e)}var z3e=dt("ZodCIDRv6",(e,t)=>{qdt.init(e,t),oa.init(e,t)});function aGr(e){return l3e(z3e,e)}var H3e=dt("ZodBase64",(e,t)=>{jdt.init(e,t),oa.init(e,t)});function sGr(e){return c3e(H3e,e)}var U3e=dt("ZodBase64URL",(e,t)=>{Ydt.init(e,t),oa.init(e,t)});function lGr(e){return u3e(U3e,e)}var W3e=dt("ZodE164",(e,t)=>{Kdt.init(e,t),oa.init(e,t)});function cGr(e){return d3e(W3e,e)}var Iht=dt("ZodCreditCard",(e,t)=>{Xdt.init(e,t),oa.init(e,t)});function uGr(e){return Zft(Iht,e)}var Dht=dt("ZodIBAN",(e,t)=>{Zdt.init(e,t),oa.init(e,t)});function dGr(e){return Qft(Dht,e)}var V3e=dt("ZodJWT",(e,t)=>{Qdt.init(e,t),oa.init(e,t)});function fGr(e){return f3e(V3e,e)}var KM=dt("ZodCustomStringFormat",(e,t)=>{Jdt.init(e,t),oa.init(e,t)});function pGr(e,t,r={}){return GM(KM,e,t,r)}function hGr(e){return GM(KM,"hostname",zut,e)}function mGr(e){return GM(KM,"hex",tdt,e)}function gGr(e){return GM(KM,"currency_code",Wut,e)}function yGr(e,t){let r=t?.enc??"hex",n=`${e}_${r}`,o=s0[n];if(!o)throw new Error(`Unrecognized hash format: ${n}`);return GM(KM,n,o,t)}var kj=dt("ZodNumber",(e,t)=>{ERe.init(e,t),co.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Opt(e,r,n,o),e.isFinite=!0},$t.derived({minValue:e=>{let{minimum:t,exclusiveMinimum:r}=Wc(e);return Math.max(t??Number.NEGATIVE_INFINITY,r??Number.NEGATIVE_INFINITY)},maxValue:e=>{let{maximum:t,exclusiveMaximum:r}=Wc(e);return Math.min(t??Number.POSITIVE_INFINITY,r??Number.POSITIVE_INFINITY)},isInt:e=>{let{isInt:t,multipleOf:r}=Wc(e);return!!t||!!r?.some(Number.isSafeInteger)},format:e=>Wc(e).format??null},{gt(e,t){return this.check(wS(e,t))},gte(e,t){return this.check(ag(e,t))},min(e,t){return this.check(ag(e,t))},lt(e,t){return this.check(TS(e,t))},lte(e,t){return this.check(ig(e,t))},max(e,t){return this.check(ig(e,t))},int(e){return this.check(k3e(e))},safe(e){return this.check(k3e(e))},positive(e){return this.check(wS(0,e))},nonnegative(e){return this.check(ag(0,e))},negative(e){return this.check(TS(0,e))},nonpositive(e){return this.check(ig(0,e))},multipleOf(e,t){return this.check(h3(e,t))},step(e,t){return this.check(h3(e,t))},finite(){return this}}));function Mht(e){return ept(kj,e)}var XM=dt("ZodNumberFormat",(e,t)=>{eft.init(e,t),kj.init(e,t)});function k3e(e){return rpt(XM,e)}function vGr(e){return npt(XM,e)}function bGr(e){return opt(XM,e)}function xGr(e){return ipt(XM,e)}function SGr(e){return apt(XM,e)}var _j=dt("ZodBoolean",(e,t)=>{sse.init(e,t),co.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Bpt(e,r,n,o)});function Nht(e){return spt(_j,e)}var Ej=dt("ZodBigInt",(e,t)=>{RRe.init(e,t),co.init(e,t),e._zod.processJSONSchema=(r,n,o)=>$pt(e,r,n,o)},$t.derived({minValue:e=>Wc(e).minimum??null,maxValue:e=>Wc(e).maximum??null,format:e=>Wc(e).format??null},{gte(e,t){return this.check(ag(e,t))},min(e,t){return this.check(ag(e,t))},gt(e,t){return this.check(wS(e,t))},lt(e,t){return this.check(TS(e,t))},lte(e,t){return this.check(ig(e,t))},max(e,t){return this.check(ig(e,t))},positive(e){return this.check(wS(BigInt(0),e))},negative(e){return this.check(TS(BigInt(0),e))},nonpositive(e){return this.check(ig(BigInt(0),e))},nonnegative(e){return this.check(ag(BigInt(0),e))},multipleOf(e,t){return this.check(h3(e,t))}}));function TGr(e){return cpt(Ej,e)}var G3e=dt("ZodBigIntFormat",(e,t)=>{tft.init(e,t),Ej.init(e,t)});function wGr(e){return dpt(G3e,e)}function CGr(e){return fpt(G3e,e)}var Oht=dt("ZodSymbol",(e,t)=>{rft.init(e,t),co.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Fpt(e,r,n,o)});function kGr(e){return ppt(Oht,e)}var Bht=dt("ZodUndefined",(e,t)=>{nft.init(e,t),co.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Hpt(e,r,n,o)});function _Gr(e){return hpt(Bht,e)}var $ht=dt("ZodNull",(e,t)=>{oft.init(e,t),co.init(e,t),e._zod.processJSONSchema=(r,n,o)=>zpt(e,r,n,o)});function Fht(e){return mpt($ht,e)}var zht=dt("ZodAny",(e,t)=>{ift.init(e,t),co.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Vpt(e,r,n,o)});function EGr(){return gpt(zht)}var Hht=dt("ZodUnknown",(e,t)=>{aft.init(e,t),co.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Gpt(e,r,n,o)});function qM(){return ypt(Hht)}var Uht=dt("ZodNever",(e,t)=>{sft.init(e,t),co.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Wpt(e,r,n,o)});function q3e(e){return vpt(Uht,e)}var Wht=dt("ZodVoid",(e,t)=>{lft.init(e,t),co.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Upt(e,r,n,o)});function RGr(e){return bpt(Wht,e)}var _se=dt("ZodDate",(e,t)=>{cft.init(e,t),co.init(e,t),e._zod.processJSONSchema=(r,n,o)=>qpt(e,r,n,o),e.min=(r,n)=>e.check(ag(r,n)),e.max=(r,n)=>e.check(ig(r,n))},$t.derived({minDate:e=>{let{minimum:t}=Wc(e);return t?new Date(t):null},maxDate:e=>{let{maximum:t}=Wc(e);return t?new Date(t):null}},{}));function PGr(e){return xpt(_se,e)}var Vht=dt("ZodArray",(e,t)=>{YM(),dft.init(e,t),co.init(e,t),e._zod.processJSONSchema=(r,n,o)=>oht(e,r,n,o),e.element=t.element},{min(e,t){return this.check(tk(e,t))},nonempty(e){return this.check(tk(1,e))},max(e,t){return this.check(WM(e,t))},length(e,t){return this.check(VM(e,t))},unwrap(){return this.element}});function Ese(e,t){return wpt(Vht,e,t)}function AGr(e){let t=e._zod.def.shape;return j3e(Object.keys(t))}var Rse=dt("ZodObject",(e,t)=>{YM(),fft.init(e,t),co.init(e,t),e._zod.processJSONSchema=(r,n,o)=>iht(e,r,n,o),$t.installLazyProp(e,"shape",r=>r._zod.def.shape,!1)},{keyof(){return j3e(Object.keys(this._zod.def.shape))},catchall(e){return this.clone($t.mergeDefs(this._zod.def,{catchall:e}))},passthrough(){return this.clone($t.mergeDefs(this._zod.def,{catchall:qM()}))},loose(){return this.clone($t.mergeDefs(this._zod.def,{catchall:qM()}))},strict(){return this.clone($t.mergeDefs(this._zod.def,{catchall:q3e()}))},strip(){return this.clone($t.mergeDefs(this._zod.def,{catchall:void 0}))},extend(e){return $t.extend(this,e)},safeExtend(e){return $t.safeExtend(this,e)},merge(e){return $t.merge(this,e)},pick(e){return $t.pick(this,e)},omit(e){return $t.omit(this,e)},partial(...e){return $t.partial(Ase,this,e[0])},exactPartial(...e){return $t.partial(K3e,this,e[0],"exactPartial")},required(...e){return $t.required(X3e,this,e[0])}});function LGr(e,t){let r={type:"object",shape:e??{},...$t.normalizeParams(t)};return new Rse(r)}function IGr(e,t){return new Rse({type:"object",shape:e,catchall:q3e(),...$t.normalizeParams(t)})}function DGr(e,t){return new Rse({type:"object",shape:e,catchall:qM(),...$t.normalizeParams(t)})}var Pse=dt("ZodUnion",(e,t)=>{lse.init(e,t),co.init(e,t),e._zod.processJSONSchema=(r,n,o)=>b3e(e,r,n,o),e.options=t.options});function Rj(e,t){return new Pse({type:"union",options:e,...$t.normalizeParams(t)})}var Ght=dt("ZodXor",(e,t)=>{Pse.init(e,t),pft.init(e,t),e._zod.processJSONSchema=(r,n,o)=>b3e(e,r,n,o),e.options=t.options});function MGr(e,t){return new Ght({type:"union",options:e,inclusive:!1,...$t.normalizeParams(t)})}var qht=dt("ZodDiscriminatedUnion",(e,t)=>{Pse.init(e,t),mft.init(e,t)});function NGr(e,t,r){return new qht({type:"union",options:t,discriminator:e,...$t.normalizeParams(r)})}var jht=dt("ZodIntersection",(e,t)=>{gft.init(e,t),co.init(e,t),e._zod.processJSONSchema=(r,n,o)=>aht(e,r,n,o)});function Yht(e,t){return new jht({type:"intersection",left:e,right:t})}var Kht=dt("ZodTuple",(e,t)=>{YM(),PRe.init(e,t),co.init(e,t),e._zod.processJSONSchema=(r,n,o)=>sht(e,r,n,o)},{rest(e){return this.clone({...this._zod.def,rest:e})},partial(){let e=this._zod.def;if(e.checks?.length)throw new Error(".partial() cannot be used on tuple schemas containing refinements");return this.clone({...e,items:e.items.map(t=>new Ase({type:"optional",innerType:t}))})}});function Xht(e,t,r){let n=t instanceof Xn,o=n?r:t,i=n?t:null;return new Kht({type:"tuple",items:e,rest:i,...$t.normalizeParams(o)})}var Tj=dt("ZodRecord",(e,t)=>{YM(),yft.init(e,t),co.init(e,t),e._zod.processJSONSchema=(r,n,o)=>lht(e,r,n,o),e.keyType=t.keyType,e.valueType=t.valueType});function Zht(e,t,r){return!t||!t._zod?new Tj({type:"record",keyType:wse(),valueType:e,...$t.normalizeParams(t)}):new Tj({type:"record",keyType:e,valueType:t,...$t.normalizeParams(r)})}function OGr(e,t,r){return new Tj({type:"record",keyType:e,valueType:t,...$t.normalizeParams(r),partial:!0})}function BGr(e,t,r){return new Tj({type:"record",keyType:e,valueType:t,mode:"loose",...$t.normalizeParams(r)})}var Qht=dt("ZodMap",(e,t)=>{YM(),vft.init(e,t),co.init(e,t),e._zod.processJSONSchema=(r,n,o)=>rht(e,r,n,o),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...r)=>e.check(CS(...r)),e.nonempty=r=>e.check(CS(1,r)),e.max=(...r)=>e.check(m3(...r)),e.size=(...r)=>e.check(UM(...r))});function $Gr(e,t,r){return new Qht({type:"map",keyType:e,valueType:t,...$t.normalizeParams(r)})}var Jht=dt("ZodSet",(e,t)=>{YM(),bft.init(e,t),co.init(e,t),e._zod.processJSONSchema=(r,n,o)=>nht(e,r,n,o),e.min=(...r)=>e.check(CS(...r)),e.nonempty=r=>e.check(CS(1,r)),e.max=(...r)=>e.check(m3(...r)),e.size=(...r)=>e.check(UM(...r))});function FGr(e,t){return new Jht({type:"set",valueType:e,...$t.normalizeParams(t)})}var wj=dt("ZodEnum",(e,t)=>{xft.init(e,t),co.init(e,t),e._zod.processJSONSchema=(n,o,i)=>jpt(e,n,o,i),e.enum=t.entries,e.options=[...e._zod.values];let r=new Set(Object.keys(t.entries));e.extract=(n,o)=>{let i={};for(let a of n)if(r.has(a))i[a]=t.entries[a];else throw new Error(`Key ${a} not found in enum`);return new wj({...t,checks:[],...$t.normalizeParams(o),entries:i})},e.exclude=(n,o)=>{let i={...t.entries};for(let a of n)if(r.has(a))delete i[a];else throw new Error(`Key ${a} not found in enum`);return new wj({...t,checks:[],...$t.normalizeParams(o),entries:i})}});function j3e(e,t){let r=Array.isArray(e)?Object.fromEntries(e.map(n=>[n,n])):e;return new wj({type:"enum",entries:r,...$t.normalizeParams(t)})}function zGr(e,t){return new wj({type:"enum",entries:e,...$t.normalizeParams(t)})}var emt=dt("ZodLiteral",(e,t)=>{Sft.init(e,t),co.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Ypt(e,r,n,o),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function HGr(e,t){return new emt({type:"literal",values:Array.isArray(e)?e:[e],...$t.normalizeParams(t)})}var tmt=dt("ZodFile",(e,t)=>{Tft.init(e,t),co.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Zpt(e,r,n,o),e.min=(r,n)=>e.check(CS(r,n)),e.max=(r,n)=>e.check(m3(r,n)),e.mime=(r,n)=>e.check(pj(Array.isArray(r)?r:[r],n))});function UGr(e){return Cpt(tmt,e)}var rmt=dt("ZodTransform",(e,t)=>{YM(),wft.init(e,t),co.init(e,t),e._zod.processJSONSchema=(r,n,o)=>tht(e,r,n,o),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new f3(e.constructor.name);r.addIssue=i=>{if(typeof i=="string")r.issues.push($t.issue(i,r.value,t));else{let a=i;a.fatal&&(a.continue=!1),a.code??(a.code="custom"),"input"in a||(a.input=r.value),a.inst??(a.inst=e),r.issues.push($t.issue(a))}};let o=t.transform(r.value,r);return o instanceof Promise?o.then(i=>(r.value=i,r)):(r.value=o,r)}});function Y3e(e){return new rmt({type:"transform",transform:e})}var Ase=dt("ZodOptional",(e,t)=>{ARe.init(e,t),co.init(e,t),e._zod.processJSONSchema=(r,n,o)=>x3e(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function jM(e){return new Ase({type:"optional",innerType:e})}var K3e=dt("ZodExactOptional",(e,t)=>{Cft.init(e,t),co.init(e,t),e._zod.processJSONSchema=(r,n,o)=>x3e(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function nmt(e){return new K3e({type:"optional",innerType:e})}var omt=dt("ZodNullable",(e,t)=>{kft.init(e,t),co.init(e,t),e._zod.processJSONSchema=(r,n,o)=>cht(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function Cse(e){return new omt({type:"nullable",innerType:e})}function WGr(e){return jM(Cse(e))}var imt=dt("ZodDefault",(e,t)=>{_ft.init(e,t),co.init(e,t),e._zod.processJSONSchema=(r,n,o)=>fht(e,r,n,o),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function amt(e,t){return new imt({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():$t.shallowClone(t)}})}var smt=dt("ZodPrefault",(e,t)=>{Eft.init(e,t),co.init(e,t),e._zod.processJSONSchema=(r,n,o)=>pht(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function lmt(e,t){return new smt({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():$t.shallowClone(t)}})}var X3e=dt("ZodNonOptional",(e,t)=>{Rft.init(e,t),co.init(e,t),e._zod.processJSONSchema=(r,n,o)=>uht(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function cmt(e,t){return new X3e({type:"nonoptional",innerType:e,...$t.normalizeParams(t)})}var umt=dt("ZodSuccess",(e,t)=>{Pft.init(e,t),co.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Qpt(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function VGr(e){return new umt({type:"success",innerType:e})}var dmt=dt("ZodCatch",(e,t)=>{Aft.init(e,t),co.init(e,t),e._zod.processJSONSchema=(r,n,o)=>hht(e,r,n,o),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function fmt(e,t){return new dmt({type:"catch",innerType:e,catchValue:typeof t=="function"?t:$t.constantCatch(t)})}var pmt=dt("ZodNaN",(e,t)=>{Lft.init(e,t),co.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Kpt(e,r,n,o)});function GGr(e){return Tpt(pmt,e)}var Lse=dt("ZodPipe",(e,t)=>{LRe.init(e,t),co.init(e,t),e._zod.processJSONSchema=(r,n,o)=>mht(e,r,n,o),e.in=t.in,e.out=t.out});function _3e(e,t){return new Lse({type:"pipe",in:e,out:t})}var Ise=dt("ZodCodec",(e,t)=>{Lse.init(e,t),cse.init(e,t)});function qGr(e,t,r){return new Ise({type:"pipe",in:e,out:t,transform:r.decode,reverseTransform:r.encode})}function jGr(e){let t=e._zod.def;return new Ise({type:"pipe",in:t.out,out:t.in,transform:t.reverseTransform,reverseTransform:t.transform})}var hmt=dt("ZodPreprocess",(e,t)=>{Lse.init(e,t),Ift.init(e,t)}),mmt=dt("ZodReadonly",(e,t)=>{Dft.init(e,t),co.init(e,t),e._zod.processJSONSchema=(r,n,o)=>ght(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function gmt(e){return new mmt({type:"readonly",innerType:e})}var ymt=dt("ZodTemplateLiteral",(e,t)=>{Mft.init(e,t),co.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Xpt(e,r,n,o)});function YGr(e,t){return new ymt({type:"template_literal",parts:e,...$t.normalizeParams(t)})}var vmt=dt("ZodLazy",(e,t)=>{use.init(e,t),co.init(e,t),e._zod.processJSONSchema=(r,n,o)=>vht(e,r,n,o),e.unwrap=()=>e._zod.def.getter()});function bmt(e){return new vmt({type:"lazy",getter:e})}var xmt=dt("ZodPromise",(e,t)=>{Oft.init(e,t),co.init(e,t),e._zod.processJSONSchema=(r,n,o)=>yht(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function KGr(e){return new xmt({type:"promise",innerType:e})}var Smt=dt("ZodFunction",(e,t)=>{Nft.init(e,t),co.init(e,t),e._zod.processJSONSchema=(r,n,o)=>eht(e,r,n,o)});function XGr(e){return new Smt({type:"function",input:Array.isArray(e?.input)?Xht(e?.input):e?.input??Ese(qM()),output:e?.output??qM()})}var Dse=dt("ZodCustom",(e,t)=>{Bft.init(e,t),co.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Jpt(e,r,n,o)});function ZGr(e){let t=new ya({check:"custom"});return t._zod.check=e,t}function QGr(e,t){return kpt(Dse,e??(()=>!0),t)}function Tmt(e,t={}){return _pt(Dse,e,t)}function wmt(e,t){return Ept(e,t)}var JGr=Rpt,eqr=Ppt,Cmt=dt("ZodInstanceOf",(e,t)=>{Dse.init(e,t)},{properties(e,t){return this.check(fj(e,t))}});function tqr(e,t={}){let r=new Cmt({type:"custom",check:"custom",fn:n=>n instanceof e,abort:!0,...$t.normalizeParams(t)});return r._zod.bag.Class=e,r._zod.check=n=>{n.value instanceof e||n.issues.push({code:"invalid_type",expected:e.name,input:n.value,inst:r,path:[...r._zod.def.path??[]]})},r}var rqr=(...e)=>Apt({Codec:Ise,Boolean:_j,String:Cj},...e);function nqr(e){let t=bmt(()=>Rj([wse(e),Mht(),Nht(),Fht(),Ese(t),Zht(wse(),t)]));return t}function oqr(e,t){return new hmt({type:"pipe",in:Y3e(e),out:t})}var ZVo={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"};function QVo(e){yl({customError:e})}function JVo(){return yl().customError}var kmt;kmt||(kmt={});var Mse={};Vr(Mse,{ZodISODate:()=>x3,ZodISODateTime:()=>b3,ZodISODuration:()=>T3,ZodISOTime:()=>S3,date:()=>tGo,datetime:()=>eGo,duration:()=>nGo,time:()=>rGo});function eGo(e){return yse(b3,e)}function tGo(e){return vse(x3,e)}function rGo(e){return bse(S3,e)}function nGo(e){return xse(T3,e)}var Ir={...Pj,...w3e,iso:Mse},oGo=new Set(["$schema","$ref","$defs","definitions","$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor","type","enum","const","anyOf","oneOf","allOf","not","properties","required","additionalProperties","patternProperties","propertyNames","minProperties","maxProperties","items","prefixItems","additionalItems","minItems","maxItems","uniqueItems","contains","minContains","maxContains","minLength","maxLength","pattern","format","minimum","maximum","exclusiveMinimum","exclusiveMaximum","multipleOf","description","default","contentEncoding","contentMediaType","contentSchema","unevaluatedItems","unevaluatedProperties","if","then","else","dependentSchemas","dependentRequired","nullable","readOnly"]);function iGo(e,t){let r=e.$schema;return r==="https://json-schema.org/draft/2020-12/schema"?"draft-2020-12":r==="http://json-schema.org/draft-07/schema#"?"draft-7":r==="http://json-schema.org/draft-04/schema#"?"draft-4":t??"draft-2020-12"}function iqr(e,t){return e.map((r,n)=>n<t?r:r.optional())}function aGo(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function sGo(e,t){if(!e.startsWith("#"))throw new Error("External $ref is not supported, only local refs (#/...) are allowed");let r=e.slice(1).split("/").filter(Boolean);if(r.length===0)return t.rootSchema;let n=t.version==="draft-2020-12"?"$defs":"definitions";if(r[0]===n){let o=r[1]===void 0?void 0:aGo(r[1]);if(!o||!t.defs[o])throw new Error(`Reference not found: ${e}`);return t.defs[o]}throw new Error(`Reference not found: ${e}`)}function lGo(e,t){return Ir.transform(n=>n).check(n=>{let o=n.value;if(typeof o!="object"||o===null||Array.isArray(o))return;let i=Object.getOwnPropertyNames(o);if(t.minProperties!==void 0&&i.length<t.minProperties&&n.issues.push({origin:"object",code:"too_small",minimum:t.minProperties,inclusive:!0,message:`Too small: expected object to have >=${t.minProperties} properties`,input:o,inst:e,continue:!0}),t.maxProperties!==void 0&&i.length>t.maxProperties&&n.issues.push({origin:"object",code:"too_big",maximum:t.maxProperties,inclusive:!0,message:`Too big: expected object to have <=${t.maxProperties} properties`,input:o,inst:e,continue:!0}),t.keySchema)for(let a of i){let s=t.keySchema.safeParse(a);s.success||n.issues.push({code:"invalid_key",origin:"record",issues:s.error.issues,input:a,path:[a],continue:!0})}}).pipe(e)}function _mt(e,t){if(e===null)return"z";let r=typeof e;if(r!=="object"){if(r==="number"&&Number.isNaN(e))return null;let n=String(e);return`${r[0]}${n.length}:${n}`}if(t.has(e))return null;t.add(e);try{if(Array.isArray(e)){let i=[];for(let a of e){let s=_mt(a,t);if(s===null)return null;i.push(s)}return`a${i.length}:[${i.join(",")}]`}let n=Object.keys(e).sort(),o=[];for(let i of n){let a=_mt(e[i],t);if(a===null)return null;o.push(`${i.length}:${i}=${a}`)}return`o${o.length}:{${o.join(",")}}`}finally{t.delete(e)}}var cGo=new Set(["items","prefixItems","additionalItems","additionalProperties","contains","propertyNames","not","if","then","else","allOf","anyOf","oneOf","unevaluatedItems","unevaluatedProperties","contentSchema"]),uGo=new Set(["properties","patternProperties","dependentSchemas","dependencies","$defs","definitions"]);function Nse(e){return typeof e!="object"||e===null?!1:Array.isArray(e)?e.some(Nse):typeof e.$ref=="string"?!0:Object.entries(e).some(([t,r])=>cGo.has(t)?Nse(r):!uGo.has(t)||typeof r!="object"||r===null?!1:Object.values(r).some(Nse))}function aqr(e){return e===1?"element":"elements"}function dGo(e,t){return Ir.transform(n=>n).check(n=>{let o=n.value;if(Array.isArray(o)){if(t.uniqueItems===!0){let i=new Map;for(let a=0;a<o.length;a++){let s=_mt(o[a],new Set);if(s===null)continue;let l=i.get(s);if(l===void 0){i.set(s,a);continue}n.issues.push({code:"custom",message:`Array items must be unique: element at index ${a} duplicates the one at index ${l}`,input:o,path:[a],continue:!0})}}if(t.containsSchema){let i=t.minContains??1,a=t.maxContains!==void 0?t.maxContains+1:Number.POSITIVE_INFINITY,s=0;for(let l of o)if(t.containsSchema.safeParse(l).success&&++s>=a)break;s<i&&n.issues.push({code:"custom",message:`Array must contain at least ${i} matching ${aqr(i)}; found ${s}`,input:o,continue:!0}),t.maxContains!==void 0&&s>t.maxContains&&n.issues.push({code:"custom",message:`Array must contain at most ${t.maxContains} matching ${aqr(t.maxContains)}`,input:o,continue:!0})}}}).pipe(e)}function sqr(e,t){if(e!==!1)return e===void 0||e===!0?Ir.any():Cp(e,t)}var fGo=/^(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|[+-](?:[01]\d|2[0-3]):[0-5]\d)$/;function lqr(e,t){if(e.not!==void 0){if(typeof e.not=="object"&&Object.keys(e.not).length===0)return Ir.never();throw new Error("not is not supported in Zod (except { not: {} } for never)")}if(e.unevaluatedItems!==void 0)throw new Error("unevaluatedItems is not supported");if(e.unevaluatedProperties!==void 0)throw new Error("unevaluatedProperties is not supported");if(e.if!==void 0||e.then!==void 0||e.else!==void 0)throw new Error("Conditional schemas (if/then/else) are not supported");if(e.dependentSchemas!==void 0||e.dependentRequired!==void 0)throw new Error("dependentSchemas and dependentRequired are not supported");if(e.$ref){let o=e.$ref;if(t.refs.has(o))return t.refs.get(o);if(t.processing.has(o))return Ir.lazy(()=>{if(!t.refs.has(o))throw new Error(`Circular reference not resolved: ${o}`);return t.refs.get(o)});t.processing.add(o);let i=sGo(o,t),a=Cp(i,t);return t.refs.set(o,a),t.processing.delete(o),a}if(e.enum!==void 0){let o=e.enum;if(t.version==="openapi-3.0"&&e.nullable===!0&&o.length===1&&o[0]===null)return Ir.null();if(o.length===0)return Ir.never();if(o.length===1)return Ir.literal(o[0]);if(o.every(a=>typeof a=="string"))return Ir.enum(o);let i=o.map(a=>Ir.literal(a));return i.length<2?i[0]:Ir.union([i[0],i[1],...i.slice(2)])}if(e.const!==void 0)return Ir.literal(e.const);let r=e.type;if(Array.isArray(r)){let o=r.map(i=>{let a={...e,type:i};return lqr(a,t)});return o.length===0?Ir.never():o.length===1?o[0]:Ir.union(o)}if(!r)return Ir.any();let n;switch(r){case"string":{let o=Ir.string();if(e.format){let i=e.format;i==="email"?o=o.check(Ir.email()):i==="uri"||i==="uri-reference"?o=o.check(Ir.url()):i==="uuid"||i==="guid"?o=o.check(Ir.uuid()):i==="date-time"?o=o.check(Ir.iso.datetime({offset:!0})):i==="date"?o=o.check(Ir.iso.date()):i==="time"?o=o.check(Ir.regex(fGo)):i==="duration"?o=o.check(Ir.iso.duration()):i==="hostname"?o=o.check(Ir.hostname()):i==="ipv4"?o=o.check(Ir.ipv4()):i==="ipv6"?o=o.check(Ir.ipv6()):i==="mac"?o=o.check(Ir.mac()):i==="cidr"?o=o.check(Ir.cidrv4()):i==="cidr-v6"?o=o.check(Ir.cidrv6()):i==="base64"?o=o.check(Ir.base64()):i==="base64url"?o=o.check(Ir.base64url()):i==="e164"?o=o.check(Ir.e164()):i==="credit_card"?o=o.check(Ir.creditCard()):i==="iban"?o=o.check(Ir.iban()):i==="jwt"?o=o.check(Ir.jwt()):i==="emoji"?o=o.check(Ir.emoji()):i==="nanoid"?o=o.check(Ir.nanoid()):i==="cuid"?o=o.check(Ir.cuid()):i==="cuid2"?o=o.check(Ir.cuid2()):i==="ulid"?o=o.check(Ir.ulid()):i==="xid"?o=o.check(Ir.xid()):i==="ksuid"&&(o=o.check(Ir.ksuid()))}typeof e.minLength=="number"&&(o=o.min(e.minLength)),typeof e.maxLength=="number"&&(o=o.max(e.maxLength)),e.pattern&&(o=o.regex(new RegExp(e.pattern))),n=o;break}case"number":case"integer":{let o=r==="integer"?Ir.number().int():Ir.number();typeof e.minimum=="number"&&e.exclusiveMinimum!==!0&&(o=o.min(e.minimum)),typeof e.maximum=="number"&&e.exclusiveMaximum!==!0&&(o=o.max(e.maximum)),typeof e.exclusiveMinimum=="number"?o=o.gt(e.exclusiveMinimum):e.exclusiveMinimum===!0&&typeof e.minimum=="number"&&(o=o.gt(e.minimum)),typeof e.exclusiveMaximum=="number"?o=o.lt(e.exclusiveMaximum):e.exclusiveMaximum===!0&&typeof e.maximum=="number"&&(o=o.lt(e.maximum)),typeof e.multipleOf=="number"&&(o=o.multipleOf(e.multipleOf)),n=o;break}case"boolean":{n=Ir.boolean();break}case"null":{n=Ir.null();break}case"object":{let o={},i=e.properties||{},a=new Set(e.required||[]),s=typeof e.additionalProperties=="object"?Cp(e.additionalProperties,t):void 0;for(let[f,p]of Object.entries(i)){let h=Cp(p,t);kd(o,f,a.has(f)?h:h.optional())}if(e.patternProperties){let f=e.patternProperties,p=Object.keys(f),h=[];for(let g of p){let y=Cp(f[g],t),v=Ir.string().regex(new RegExp(g));h.push(Ir.looseRecord(v,y))}let m=[];if(Object.keys(o).length>0&&m.push(Ir.object(o).passthrough()),m.push(...h),m.length===0)n=Ir.object({}).passthrough();else if(m.length===1)n=m[0];else{let g=Ir.intersection(m[0],m[1]);for(let y=2;y<m.length;y++)g=Ir.intersection(g,m[y]);n=g}if(e.additionalProperties===!1){let g=Object.keys(o),y=p.map(b=>new RegExp(b)),v=n;n=n.check(b=>{if(!i0(b.value))return;let x=[];for(let w of Object.keys(b.value))g.includes(w)||y.some(C=>C.test(w))||x.push(w);x.length&&b.issues.push({code:"unrecognized_keys",keys:x,input:b.value,inst:v})})}}else{let f=Ir.object(o);e.additionalProperties===!1?n=f.strict():s?n=f.catchall(s):n=f.passthrough()}let l=e.propertyNames!==void 0&&e.propertyNames!==!0,u=typeof e.minProperties=="number"?e.minProperties:void 0,d=typeof e.maxProperties=="number"?e.maxProperties:void 0;if(l||u!==void 0||d!==void 0){let f;if(l){let p=typeof e.propertyNames=="object"&&e.propertyNames.type===void 0?{type:"string",...e.propertyNames}:e.propertyNames;f=Cp(p,t)}n=lGo(n,{keySchema:f,minProperties:u,maxProperties:d})}break}case"array":{let o=e.prefixItems,i=e.items;if(o&&Array.isArray(o)){let a=typeof e.minItems=="number"?e.minItems:0,s=o.map(f=>Cp(f,t)),l=iqr(s,a),u=Array.isArray(i)?void 0:sqr(i,t),d=Ir.tuple(l);n=u?d.rest(u):d,typeof e.minItems=="number"&&(n=n.check(Ir.minLength(e.minItems))),typeof e.maxItems=="number"&&(n=n.check(Ir.maxLength(e.maxItems)))}else if(Array.isArray(i)){let a=typeof e.minItems=="number"?e.minItems:0,s=i.map(f=>Cp(f,t)),l=iqr(s,a),u=sqr(e.additionalItems,t),d=Ir.tuple(l);n=u?d.rest(u):d,typeof e.minItems=="number"&&(n=n.check(Ir.minLength(e.minItems))),typeof e.maxItems=="number"&&(n=n.check(Ir.maxLength(e.maxItems)))}else if(i!==void 0){let a=Cp(i,t),s=Ir.array(a);typeof e.minItems=="number"&&(s=s.min(e.minItems)),typeof e.maxItems=="number"&&(s=s.max(e.maxItems)),n=s}else n=Ir.array(Ir.any());(e.uniqueItems===!0||e.contains!==void 0)&&(n=dGo(n,{uniqueItems:e.uniqueItems===!0,containsSchema:e.contains!==void 0?Cp(e.contains,t):void 0,minContains:typeof e.minContains=="number"?e.minContains:void 0,maxContains:typeof e.maxContains=="number"?e.maxContains:void 0}));break}default:throw new Error(`Unsupported type: ${r}`)}return n}function Cp(e,t){if(typeof e=="boolean")return e?Ir.any():Ir.never();let r=lqr(e,t),n=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){let s=e.anyOf.map(u=>Cp(u,t)),l=Ir.union(s);r=n?Ir.intersection(r,l):l}if(e.oneOf&&Array.isArray(e.oneOf)){let s=e.oneOf.map(u=>Cp(u,t)),l=Ir.xor(s);r=n?Ir.intersection(r,l):l}if(e.allOf&&Array.isArray(e.allOf))if(e.allOf.length===0)r=n?r:Ir.any();else{let s=n?r:Cp(e.allOf[0],t),l=n?0:1;for(let u=l;u<e.allOf.length;u++)s=Ir.intersection(s,Cp(e.allOf[u],t));r=s}e.nullable===!0&&t.version==="openapi-3.0"&&(r=Ir.nullable(r)),e.readOnly===!0&&(r=Ir.readonly(r)),e.default!==void 0&&(r=r.default(e.default));let o={},i=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let s of i)s in e&&(o[s]=e[s]);let a=["contentEncoding","contentMediaType","contentSchema"];for(let s of a)s in e&&(o[s]=e[s]);if(e.type==="object"&&e.$ref===void 0){e.propertyNames!==void 0&&!Nse(e.propertyNames)&&(o.propertyNames=e.propertyNames);for(let s of["minProperties","maxProperties"])e[s]!==void 0&&(o[s]=e[s])}if(e.type==="array"&&e.$ref===void 0){e.contains!==void 0&&!Nse(e.contains)&&(o.contains=e.contains);for(let s of["uniqueItems","minContains","maxContains"])e[s]!==void 0&&(o[s]=e[s])}for(let s of Object.keys(e))oGo.has(s)||kd(o,s,e[s]);return Object.keys(o).length>0&&t.registry.add(r,o),e.description&&(r=r.describe(e.description)),r}function cqr(e,t){if(typeof e=="boolean")return e?Ir.any():Ir.never();let r;try{r=JSON.parse(JSON.stringify(e))}catch{throw new Error("fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas")}let n=iGo(r,t?.defaultTarget),o=r.$defs||r.definitions||{},i={version:n,defs:o,refs:new Map,processing:new Set,rootSchema:r,registry:t?.registry??_d};return Cp(r,i)}var uqr=Symbol("z.visit/resolving");function Ose(e,t){let r=typeof t=="function"?t:(a,s)=>{let l=t[a._zod.def.type];return l?l(a,s):a},n=new Map;function o(a){let s=n.get(a);if(s===uqr)return new use({type:"lazy",getter:()=>n.get(a)});if(s!==void 0)return s;n.set(a,uqr);let l=i(a),u=r(l,l!==a);return n.set(a,u),u}function i(a){let s=a._zod.def,l=s.type;switch(l){case"object":{let u=s.shape,d=Object.keys(u),f=!1,p={};for(let m of d){let g=o(u[m]);g!==u[m]&&(f=!0),p[m]=g}let h=s.catchall;return s.catchall&&(h=o(s.catchall),h!==s.catchall&&(f=!0)),f?Gi(a,{...s,shape:p,catchall:h}):a}case"array":{let u=o(s.element);return u===s.element?a:Gi(a,{...s,element:u})}case"tuple":{let u=s.items,d=!1,f=[];for(let h of u){let m=o(h);m!==h&&(d=!0),f.push(m)}let p=s.rest;return s.rest&&(p=o(s.rest),p!==s.rest&&(d=!0)),d?Gi(a,{...s,items:f,rest:p}):a}case"record":case"map":{let u=o(s.keyType),d=o(s.valueType);return u===s.keyType&&d===s.valueType?a:Gi(a,{...s,keyType:u,valueType:d})}case"set":{let u=o(s.valueType);return u===s.valueType?a:Gi(a,{...s,valueType:u})}case"union":{let u=s.options,d=!1,f=[];for(let p of u){let h=o(p);h!==p&&(d=!0),f.push(h)}return d?Gi(a,{...s,options:f}):a}case"intersection":{let u=o(s.left),d=o(s.right);return u===s.left&&d===s.right?a:Gi(a,{...s,left:u,right:d})}case"optional":case"nullable":case"default":case"prefault":case"catch":case"readonly":case"nonoptional":case"promise":case"success":{let u=o(s.innerType);return u===s.innerType?a:Gi(a,{...s,innerType:u})}case"pipe":{let u=o(s.in),d=o(s.out);return u===s.in&&d===s.out?a:Gi(a,{...s,in:u,out:d})}case"function":{let u=o(s.input),d=o(s.output);return u===s.input&&d===s.output?a:Gi(a,{...s,input:u,output:d})}case"lazy":{let u=s.getter,{_cachedInner:d,...f}=s;return Gi(a,{...f,getter:()=>o(u())})}case"template_literal":case"string":case"number":case"int":case"boolean":case"bigint":case"symbol":case"undefined":case"null":case"void":case"never":case"any":case"unknown":case"date":case"nan":case"enum":case"literal":case"file":case"transform":case"custom":return a;default:return a}}return o(e)}function dqr(e){return Ose(e,{object:t=>t.partial(),union:t=>{let r=t._zod.def;return r.discriminator===void 0?t:Rj(r.options)}})}function pGo(e,t){if(!t?.length)return e;let r=e._zod.def;return Gi(e,e1(r,{checks:[...r.checks??[],...t]}),{parent:!0})}function fqr(e){return pGo(e.out,e.checks)}function hGo(e){return e.in._zod.traits.has("$ZodTransform")?fqr(e):e.in}function pqr(e){return Ose(e,{pipe:t=>hGo(t._zod.def),default:(t,r)=>r?jM(t._zod.def.innerType):t,catch:(t,r)=>r?t._zod.def.innerType:t})}function hqr(e){return Ose(e,{pipe:t=>fqr(t._zod.def),prefault:(t,r)=>r?t._zod.def.innerType:t})}var Emt={};Vr(Emt,{bigint:()=>vGo,boolean:()=>yGo,date:()=>bGo,number:()=>gGo,string:()=>mGo});function mGo(e){return Kft(Cj,e)}function gGo(e){return tpt(kj,e)}function yGo(e){return lpt(_j,e)}function vGo(e){return upt(Ej,e)}function bGo(e){return Spt(_se,e)}var Z3e=ZM.string().trim().min(1),wVs=ZM.object({title:Z3e,steps:ZM.array(Z3e).min(1,"Give at least 1 step"),before:ZM.array(Z3e).optional(),changed:Z3e.optional()}),mqr="result",Q3e="note",gqr="phase";function Vc(e){return{comments:[],screenshots:[],reviewAfter:!1,announceAfter:!1,draft:!1,autoMerge:!1,...e?{selection:e}:{}}}function yqr(e,t,r){let n=t.trim();return{...Vc(),answers:{[mqr]:e,...n?{[Q3e]:n}:{},...r!==void 0?{[gqr]:String(r)}:{}}}}function vqr(e){let t=e.trim();return{...Vc(),...t?{answers:{[Q3e]:t}}:{}}}function J3e(e){return{onResult:(t,r,n)=>e("approve",yqr(t,r,n)),onDismiss:t=>e("reject",vqr(t))}}function bqr(e){return Array.isArray(e)?e.filter(t=>typeof t=="string"):[]}function xGo(e){return Array.isArray(e)?e.filter(t=>typeof t?.number=="number"&&typeof t?.name=="string"):[]}function ePe(e){try{let t=JSON.parse(e);return{title:typeof t?.title=="string"?t.title:"",steps:bqr(t?.steps),before:bqr(t?.before),...typeof t?.changed=="string"?{changed:t.changed}:{},laterPhases:xGo(t?.laterPhases)}}catch{return{title:"",steps:[],before:[],laterPhases:[]}}}var xqr=S(re(),1);function Aj(e,t){let[r,n]=(0,xqr.useState)(null),o=Hv(t?e:void 0),i=o.session;return{comments:{cwd:e?.cwd,onComment:i&&t?i_e(i,t,()=>n(i.name)):void 0,unavailable:o.unavailable},sentTo:r,clearSent:()=>n(null)}}var n1=S(_(),1);function Tqr({preview:e,session:t,sendInput:r,onDecision:n}){let o=(0,Sqr.useMemo)(()=>ePe(e.body),[e.body]),{comments:i,sentTo:a,clearSent:s}=Aj(t,r);return(0,n1.jsxs)(H,{sx:o0,children:[(0,n1.jsx)(Ih,{preview:e,draft:!1}),(0,n1.jsx)(qn,{}),(0,n1.jsx)(H,{sx:{flex:1,minHeight:0,overflowY:"auto"},children:(0,n1.jsx)(mUr,{check:o,comments:i,children:(0,n1.jsx)(dUr,{check:o})})}),(0,n1.jsx)(qn,{}),(0,n1.jsx)(iUr,{laterPhases:o.laterPhases,...J3e(n)}),(0,n1.jsx)(pf,{sessionName:a,subject:"Question",onClose:s})]})}var tPe="@container high-level-review (max-width: 720px)";var BPe=S(re(),1);var wqr={description:"Description",checks:"Checks",manual:"Manual testing",all:"All files",related:"Related PRs",structure:"Structure",tests:"Tests",critical:"Critical diffs"},SGo={manual:"manual-testing",related:"related-prs-linked",structure:"structure-sensible",tests:"tests-worth-having",critical:"critical-diffs-correct"};function Lj(e){return SGo[e]}function Cqr(e,t,r,n){let o=aR(t.join(`
4132
4132
  `),r);return o?{path:e,startLine:o.start,endLine:o.end,quote:r,note:n}:null}function kqr(e,t,r){let n=e.steps.map(o=>`${o.action}\u2192${o.expect}`);return Cqr("Manual testing step",n,t,r)??Cqr("Manual testing setup",e.setup,t,r)??{path:"Manual testing",startLine:1,endLine:1,quote:t,note:r}}var Bse=S(_(),1),_qr="Manual testing";function Eqr({manualTesting:e,comments:t,children:r}){let n=Vy();if(!t?.onComment&&!t?.onQueue&&!t?.unavailable)return(0,Bse.jsx)(Bse.Fragment,{children:r});let{add:o,queue:i}=sy({path:_qr,pending:n.pending,clear:n.clear,onComment:t.onComment,onQueue:t.onQueue,build:(a,s)=>kqr(e,a.quote,s)});return(0,Bse.jsx)(Ux,{selection:n,path:_qr,cwd:t.cwd,unavailable:t.unavailable,onAdd:o,onQueue:i,onAddRule:void 0,children:r})}var Ij=S(_(),1);function Rqr({steps:e,text:t}){return(0,Ij.jsx)(H,{component:"ol","aria-label":"Manual testing steps",sx:{m:0,pl:3,display:"flex",flexDirection:"column",gap:.75},children:e.map((r,n)=>(0,Ij.jsxs)(be,{component:"li",variant:"body2",children:[t(r.action),(0,Ij.jsx)(H,{component:"span",sx:{color:"text.secondary",mx:.75},children:"\u2192"}),(0,Ij.jsx)(H,{component:"span",sx:{color:"text.secondary"},children:t(r.expect)})]},`${n}:${r.action}`))})}var Aqr=S(re(),1);var TGo=/(https?:\/\/[^\s<>`]*[^\s<>`.,;:!?)'"])|(?<![\w./~:-])((?:[\w.-]+\/)+[\w-]+(?:\.[\w-]+)+)/g;function wGo(e,t,r){let n=[],o=0;for(let i of e.matchAll(TGo)){let[a,s,l]=i;i.index>o&&n.push({text:e.slice(o,i.index),code:t}),n.push({text:a,code:t,href:s??`${r}/${l}`}),o=i.index+a.length}return o<e.length&&n.push({text:e.slice(o),code:t}),n}function Pqr(e,t,r){let n=`https://github.com/${t}/blob/${r}`;return e.split("`").flatMap((o,i)=>o?wGo(o,i%2===1,n):[])}var rPe=S(_(),1);function Lqr({text:e,repo:t,headSha:r}){return(0,Aqr.useMemo)(()=>Pqr(e,t,r),[e,t,r]).map((o,i)=>{let a=`${i}:${o.text}`,s=o.href?(0,rPe.jsx)(Ur,{href:o.href,target:"_blank",rel:"noopener noreferrer",children:o.text}):o.text;return o.code?(0,rPe.jsx)(H,{component:"code",sx:{fontFamily:"fontFamilyMono",fontSize:"0.9em"},children:s},a):(0,rPe.jsx)("span",{children:s},a)})}var _S=S(_(),1);function nPe({manualTesting:e,repo:t,headSha:r,comments:n}){if(!e)return(0,_S.jsx)(be,{variant:"body2",sx:{color:"text.secondary"},children:"No manual testing steps \u2014 re-run with --force"});if(e.steps.length===0)return(0,_S.jsx)(be,{variant:"body2",sx:{color:"text.secondary"},children:"Nothing in this PR needs a human to exercise it"});let o=i=>(0,_S.jsx)(Lqr,{text:i,repo:t,headSha:r});return(0,_S.jsx)(Eqr,{manualTesting:e,comments:n,children:(0,_S.jsxs)(H,{sx:{display:"flex",flexDirection:"column",gap:1},children:[e.setup.length>0&&(0,_S.jsx)(H,{role:"group","aria-label":"Setup",sx:{display:"flex",flexWrap:"wrap",gap:.75},children:e.setup.map((i,a)=>(0,_S.jsx)(yn,{size:"small",variant:"outlined",label:o(i)},`${a}:${i}`))}),(0,_S.jsx)(Rqr,{steps:e.steps,text:o})]})})}var mYr=S(re(),1);var Iqr=S(_(),1);function oPe({structure:e}){return(0,Iqr.jsxs)(be,{variant:"caption",sx:{color:"text.secondary"},children:[e.added," added \xB7 ",e.removed," deleted \xB7"," ",e.modified," modified \xB7 +",e.additions," \u2212",e.deletions]})}var QM={minHeight:28,py:0,px:1,fontSize:12,textTransform:"none",whiteSpace:"nowrap","& .MuiButton-startIcon > *:nth-of-type(1)":{fontSize:16}};var l0=S(_(),1);function Dqr(e){return`${e} diff${e===1?"":"s"}`}function Mqr({count:e}){return(0,l0.jsx)(H,{component:"span","data-testid":"bulk-count",sx:{ml:.75,px:.5,minWidth:18,borderRadius:1,bgcolor:"action.selected",fontFamily:"fontFamilyMono",fontSize:11,lineHeight:"16px",textAlign:"center"},children:e})}function iPe({bulk:e}){return(0,l0.jsxs)(l0.Fragment,{children:[(0,l0.jsxs)(nt,{size:"small",color:"inherit",startIcon:(0,l0.jsx)(B$,{}),title:`Expand the ${Dqr(e.collapsed)} collapsed`,disabled:e.collapsed===0,onClick:e.expandAll,sx:QM,children:["Expand all",(0,l0.jsx)(Mqr,{count:e.collapsed})]}),(0,l0.jsxs)(nt,{size:"small",color:"inherit",startIcon:(0,l0.jsx)(zye,{}),title:`Collapse the ${Dqr(e.open)} open`,disabled:e.open===0,onClick:e.collapseAll,sx:QM,children:["Collapse all",(0,l0.jsx)(Mqr,{count:e.open})]})]})}var Nqr={display:"flex",alignItems:"center",height:28,flex:"1 1 180px",minWidth:0,maxWidth:320,border:1,borderColor:"divider",borderRadius:1,"&:focus-within":{borderColor:"primary.main",boxShadow:e=>`0 0 0 1px ${e.palette.primary.main}`}},Rmt={fontSize:11,color:"text.disabled",whiteSpace:"nowrap",px:1};var Dj=S(_(),1);function Oqr({glob:e,onChangeGlob:t,count:r,onSubmit:n}){return(0,Dj.jsxs)(H,{component:"label",sx:Nqr,children:[(0,Dj.jsx)(be,{component:"span",sx:Rmt,children:"Match"}),(0,Dj.jsx)(zi,{value:e,placeholder:"name or **/*.md",title:"File name (case-insensitive) or glob",onChange:o=>t(o.target.value),onKeyDown:o=>{o.key==="Enter"&&n?.(),o.key==="Escape"&&t("")},inputProps:{"aria-label":"Match changed files",spellCheck:!1,autoComplete:"off"},sx:{flex:1,minWidth:0,fontFamily:"fontFamilyMono",fontSize:12}}),e.trim()&&(0,Dj.jsxs)(be,{component:"span",sx:{...Rmt,color:"text.secondary"},children:[r," file",r===1?"":"s"]})]})}var $se=S(_(),1);function Bqr({globs:e,active:t,onSelect:r}){return(0,$se.jsxs)(H,{sx:{display:"flex",flexWrap:"wrap",alignItems:"center",gap:.5},children:[(0,$se.jsx)(be,{component:"span",sx:{fontSize:11,color:"text.disabled",mr:.25},children:"Quick"}),e.map(n=>{let o=n===t.trim();return(0,$se.jsx)(yn,{label:n,size:"small",clickable:!0,"aria-pressed":o,onClick:()=>r(n),sx:{height:20,fontFamily:"fontFamilyMono",fontSize:11,border:1,borderColor:o?"warning.main":"transparent",color:o?"text.primary":"text.secondary"}},n)})]})}var nk=S(_(),1);function $qr({glob:e,onChangeGlob:t,matches:r,quickGlobs:n,onShow:o,onHide:i}){let a=r.size===0,s={...QM,minWidth:0};return(0,nk.jsxs)(nk.Fragment,{children:[(0,nk.jsx)(Oqr,{glob:e,onChangeGlob:t,count:r.size,onSubmit:a?void 0:o}),(0,nk.jsx)(nt,{size:"small",variant:"outlined",color:"inherit",disabled:a,title:"Open the matching diffs and their folders",onClick:o,sx:s,children:"Show"}),(0,nk.jsx)(nt,{size:"small",variant:"outlined",color:"inherit",disabled:a,title:"Collapse the matching diffs",onClick:i,sx:s,children:"Hide"}),(0,nk.jsx)(Bqr,{globs:n,active:e,onSelect:l=>t(l===e?"":l)})]})}var Pmt=S(_(),1);function Fqr({changes:e,onReset:t}){return(0,Pmt.jsx)(nt,{size:"small",variant:"outlined",disabled:e===0,startIcon:(0,Pmt.jsx)(ST,{}),title:"Return to the review.highLevel.collapsedPaths defaults",onClick:t,sx:QM,children:e===0?"Defaults":`Reset ${e} change${e===1?"":"s"}`})}function Mj(e){return`high-level-check-${e}`}var Amt="--high-level-structure-toolbar-height",aPe=`calc(${40}px + var(${Amt}, 0px))`,zqr={position:"sticky",top:40,zIndex:3,bgcolor:"background.paper",py:1,mt:.5,display:"flex",flexDirection:"column",gap:.75,borderBottom:1,borderColor:"divider"},Fse={display:"flex",alignItems:"center",flexWrap:"wrap",gap:.75};var o1=S(_(),1);function Hqr({ref:e,bulk:t,viewType:r,onChangeViewType:n,matches:o,children:i,...a}){return(0,o1.jsxs)(H,{ref:e,role:"toolbar","aria-label":"Changed files controls",sx:zqr,children:[i,(0,o1.jsxs)(H,{sx:Fse,children:[(0,o1.jsx)(iPe,{bulk:t}),(0,o1.jsx)(qn,{orientation:"vertical",flexItem:!0}),(0,o1.jsx)(Fqr,{changes:t.changes,onReset:t.reset}),(0,o1.jsx)(H,{sx:{ml:"auto"},children:(0,o1.jsx)(V$,{viewType:r,onChange:n})})]}),(0,o1.jsx)(H,{sx:Fse,children:(0,o1.jsx)($qr,{...a,matches:o,onShow:()=>t.show(o),onHide:()=>t.hide(o)})})]})}var sPe=12,Uqr=e=>({bgcolor:Or(e.palette.primary.main,.08),"&:hover":{bgcolor:Or(e.palette.primary.main,.16)}}),lPe={width:"100%",minHeight:24},JM={display:"flex",alignItems:"center",gap:.75,minWidth:0,py:.15,borderRadius:1,"&:hover":{bgcolor:"action.hover"}},Nj={border:0,bgcolor:"transparent",cursor:"pointer",textAlign:"left",color:"inherit",font:"inherit"},ok={fontFamily:"fontFamilyMono",fontSize:12,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},Lmt={fontFamily:"fontFamilyMono",fontSize:11,flexShrink:0},Oj={added:"success.main",removed:"error.main",modified:"warning.main"},cPe={added:"A",removed:"D",modified:"M"},uPe=e=>({position:"relative","&::before":{content:'""',position:"absolute",left:0,top:4,bottom:4,width:3,borderRadius:1,bgcolor:e.palette.warning.main}});var dPe=S(_(),1);function c0({additions:e,deletions:t,inline:r=!1}){return(0,dPe.jsxs)(H,{sx:{display:"flex",gap:.5,ml:r?0:"auto",pl:1,flexShrink:0},children:[(0,dPe.jsxs)(be,{component:"span",sx:{...Lmt,color:"success.main"},children:["+",e]}),(0,dPe.jsxs)(be,{component:"span",sx:{...Lmt,color:"error.main"},children:["\u2212",t]})]})}var Wqr=S(_(),1),Vqr=ot((0,Wqr.jsx)("path",{d:"M10 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8z"}),"Folder");var Gqr=S(_(),1),qqr=ot((0,Gqr.jsx)("path",{d:"M20 6h-8l-2-2H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2m0 12H4V8h16z"}),"FolderOpen");var eN=S(_(),1);function jqr({collapsed:e,ignored:t}){return(0,eN.jsxs)(eN.Fragment,{children:[(0,eN.jsx)(e?zo:La,{sx:{fontSize:16,color:"text.secondary",flexShrink:0}}),(0,eN.jsx)(e?Vqr:qqr,{sx:{fontSize:16,color:e&&!t?"primary.main":"text.secondary",flexShrink:0}})]})}function $h(e){return e.flatMap(t=>t.kind==="file"?[t]:$h(t.children))}var Yqr=S(_(),1),Kqr=ot((0,Yqr.jsx)("path",{d:"M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7M2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2m4.31-.78 3.15 3.15.02-.16c0-1.66-1.34-3-3-3z"}),"VisibilityOff");var zse=S(_(),1);function fPe({label:e,globs:t}){return(0,zse.jsxs)(H,{component:"span",title:"Collapsed by review.highLevel.collapsedPaths",sx:{display:"inline-flex",alignItems:"center",gap:.5,fontSize:11,fontWeight:500,lineHeight:"18px",color:"text.primary",bgcolor:"action.selected",borderRadius:2.5,pl:.625,pr:.875,flexShrink:0,whiteSpace:"nowrap"},children:[(0,zse.jsx)(Kqr,{sx:{fontSize:12}}),e,(0,zse.jsx)(H,{component:"span",sx:{fontFamily:"fontFamilyMono",color:"text.secondary"},children:t.join(", ")})]})}var Zqr=S(_(),1);function Xqr({dir:e}){let t=$h(e.children).length;return(0,Zqr.jsxs)(be,{component:"span",variant:"caption",sx:{color:"text.secondary",flexShrink:0},children:[t," ",t===1?"file":"files"," hidden"]})}var Imt=S(_(),1);function Qqr({dir:e,collapsed:t,ignoredGlobs:r}){return r?(0,Imt.jsx)(fPe,{label:`${$h(e.children).length} ignored`,globs:r}):t?(0,Imt.jsx)(Xqr,{dir:e}):null}function Jqr(e,t){return[{...JM,...lPe,pl:e,...Nj},t&&uPe]}function ejr(e,t){return{...ok,fontWeight:600,color:t?"text.secondary":e?"primary.main":void 0}}var tN=S(_(),1);function tjr({dir:e,collapsed:t,matched:r,ignoredGlobs:n,indent:o,onToggle:i}){let a=n!==void 0;return(0,tN.jsxs)(H,{component:"button",type:"button",onClick:i,"aria-expanded":!t,"aria-label":e.path,"data-matched":r||void 0,sx:Jqr(o,r),children:[(0,tN.jsx)(jqr,{collapsed:t,ignored:a}),(0,tN.jsx)(be,{component:"span",sx:ejr(t,a),children:e.name}),(0,tN.jsx)(Qqr,{dir:e,collapsed:t,ignoredGlobs:n}),(0,tN.jsx)(c0,{additions:e.additions,deletions:e.deletions,inline:!0})]})}var rjr=S(_(),1);function u0({children:e}){return(0,rjr.jsx)(be,{variant:"caption",sx:{color:"text.secondary"},children:e})}var Dmt=S(re(),1);var njr="/dev/null";function ojr(e,t,r){let n=t==="added"?njr:`a/${e}`,o=t==="removed"?njr:`b/${e}`;return[`diff --git a/${e} b/${e}`,`--- ${n}`,`+++ ${o}`,r,""].join(`
4133
- `)}var CGo=[];function ijr(e,t,r){let n=(0,Dmt.useMemo)(()=>{if(r)try{return Uge(ojr(e,t,r))[0]}catch{return}},[e,t,r]),o=Hke(e,n?.hunks??CGo,t==="modified");return{file:(0,Dmt.useMemo)(()=>n&&{...n,hunks:o.hunks},[n,o.hunks]),expansion:o}}var rN=S(_(),1);function Bj({path:e,status:t,patch:r,truncated:n,viewType:o,comments:i,elsewhere:a}){let{file:s,expansion:l}=ijr(e,t,r);return s?(0,rN.jsxs)(H,{sx:[Rge,Pge,{pt:.5,minWidth:0}],children:[(0,rN.jsx)(Sye,{path:e,cwd:i?.cwd,hunks:s.hunks,onComment:i?.onComment,onQueue:i?.onQueue,unavailable:i?.unavailable,children:(0,rN.jsx)(Iye,{file:s,path:e,viewType:o,renderGap:wye(l,a)})}),n&&(0,rN.jsx)(u0,{children:"Truncated \u2014 the rest of this diff is on GitHub."})]}):(0,rN.jsx)(u0,{children:n?"Too large to show here \u2014 open it on GitHub.":"No diff available \u2014 open it on GitHub."})}var sjr=S(re(),1);function kGo(e,t){return e.getBoundingClientRect().top>t.getBoundingClientRect().top}function ajr(e){let t=e.parentElement;!t||!kGo(e,t)||t.scrollIntoView?.({block:"start"})}function pPe(e,t){let r=(0,sjr.useRef)(null);return{ref:r,toggle:()=>{e&&r.current&&ajr(r.current),t()}}}var ljr=e=>`linear-gradient(${e}, ${e})`;function _Go(e){return t=>{let r=Uqr(t),n=e?r.bgcolor:"transparent",o=e?r["&:hover"].bgcolor:t.palette.action.hover;return{position:"sticky",top:aPe,zIndex:2,bgcolor:"background.paper",backgroundImage:ljr(n),"&:hover":{bgcolor:"background.paper",backgroundImage:ljr(o)}}}}function cjr(e,t){return[{...JM,gap:0,cursor:"pointer"},t&&uPe,_Go(e)]}function ujr(e){return{...JM,minHeight:lPe.minHeight,"&:hover":void 0,minWidth:0,pl:e,...Nj}}var Mmt=S(_(),1);function djr({file:e}){return(0,Mmt.jsx)(Mt,{size:"small",href:e.diffUrl,target:"_blank",rel:"noreferrer","aria-label":`Open ${e.path} on GitHub`,onClick:t=>t.stopPropagation(),sx:{p:.25,flexShrink:0},children:(0,Mmt.jsx)(ume,{sx:{fontSize:14}})})}var pjr=S(_(),1);function fjr({open:e}){return(0,pjr.jsx)(e?La:zo,{sx:{fontSize:16,color:e?"primary.main":"text.secondary",flexShrink:0}})}var w3=S(_(),1);function hjr({file:e,muted:t=!1}){return(0,w3.jsxs)(w3.Fragment,{children:[(0,w3.jsx)(lr,{title:e.status,children:(0,w3.jsx)(be,{component:"span",sx:{...ok,flexShrink:0,fontWeight:700,color:Oj[e.status]},children:cPe[e.status]})}),(0,w3.jsx)(be,{component:"span",sx:{...ok,color:t?"text.secondary":void 0},title:e.path,children:e.name})]})}var mjr=S(_(),1),EGo={muted:{color:"text.secondary",bgcolor:"action.selected"},critical:e=>({color:e.palette.secondary.main,bgcolor:Or(e.palette.secondary.main,.14)})};function $j({label:e,title:t,tone:r="muted",onClick:n}){return(0,mjr.jsx)(H,{component:n?"button":"span",type:n?"button":void 0,title:t,onClick:n&&(o=>{o.stopPropagation(),n()}),sx:[{font:"inherit",fontSize:11,fontWeight:500,lineHeight:"18px",border:0,borderRadius:1,px:.75,flexShrink:0,whiteSpace:"nowrap",cursor:n?"pointer":"inherit"},EGo[r]],children:e})}var yjr=S(_(),1);function gjr({split:e}){return(0,yjr.jsx)($j,{label:`${e.hunks} of ${e.of} hunks`,title:"The rest of this file's hunks are in other slices"})}var C3=S(_(),1);function vjr({file:e,ignoredBy:t}){return(0,C3.jsxs)(C3.Fragment,{children:[t!==void 0&&(0,C3.jsx)(fPe,{label:"ignored",globs:[t]}),e.critical&&(0,C3.jsx)($j,{label:"critical",title:"Matches review.highLevel.criticalPaths",tone:"critical"}),e.split&&(0,C3.jsx)(gjr,{split:e.split})]})}var Nmt="assist:high-level-slice-select";function bjr(e){globalThis.dispatchEvent(new CustomEvent(Nmt,{detail:e}))}function xjr(e){let t=r=>e(r.detail);return globalThis.addEventListener(Nmt,t),()=>globalThis.removeEventListener(Nmt,t)}var Omt=S(_(),1);function Sjr({slices:e}){return!e||e.length===0?null:(0,Omt.jsx)(H,{sx:{display:"flex",gap:.5,flexShrink:0},children:e.map(({number:t,title:r})=>(0,Omt.jsx)($j,{label:`slice ${t}`,title:`Show slice ${t}: ${r}`,onClick:()=>bjr(t)},t))})}var RS=S(_(),1);function Tjr({file:e,indent:t,open:r,onToggle:n,glob:o,matched:i}){let a=!r&&o!==void 0,{ref:s,toggle:l}=pPe(r,n);return(0,RS.jsxs)(H,{ref:s,onClick:l,"data-matched":i||void 0,sx:cjr(r,i),children:[(0,RS.jsxs)(H,{component:"button",type:"button","aria-expanded":r,"aria-label":`${r?"Collapse":"Expand"} ${e.path}`,sx:ujr(t),children:[(0,RS.jsx)(fjr,{open:r}),(0,RS.jsx)(hjr,{file:e,muted:a}),(0,RS.jsx)(vjr,{file:e,ignoredBy:a?o:void 0}),(0,RS.jsx)(c0,{additions:e.additions,deletions:e.deletions,inline:!0})]}),(0,RS.jsx)(Sjr,{slices:e.slices}),(0,RS.jsx)(djr,{file:e})]})}var Fj=S(_(),1);function wjr({file:e,indent:t,open:r,onToggle:n,glob:o,matched:i,viewType:a,comments:s}){return(0,Fj.jsxs)(H,{sx:{minWidth:0,scrollMarginTop:aPe},children:[(0,Fj.jsx)(Tjr,{file:e,indent:t,open:r,onToggle:n,glob:o,matched:i}),r&&(0,Fj.jsx)(H,{sx:{mb:1,minWidth:0},children:(0,Fj.jsx)(Bj,{path:e.path,status:e.status,patch:e.patch??null,truncated:e.truncated===!0,viewType:a,comments:s,elsewhere:e.split?.elsewhere})})]})}function Cjr(e,t){let r=$h(e.children).map(n=>t.get(n.path));if(!(r.length===0||r.some(n=>n===void 0)))return[...new Set(r)]}function kjr(e,t){let r=t.collapsed.has(e.path);return r?{collapsed:r,matched:$h(e.children).some(n=>t.matches.has(n.path)),ignoredGlobs:Cjr(e,t.fileGlobs)}:{collapsed:r,matched:!1,ignoredGlobs:void 0}}var zj=S(_(),1);function Bmt(e){let{nodes:t,depth:r=0,collapsed:n,onToggleDir:o}=e,i=`${r*sPe}px`;return t.map(a=>a.kind==="file"?(0,zj.jsx)(wjr,{file:a,indent:i,open:!e.collapsedFiles.has(a.path),onToggle:()=>e.onToggleFile(a.path),glob:e.fileGlobs.get(a.path),matched:e.matches.has(a.path),viewType:e.viewType,comments:e.comments},a.path):(0,zj.jsxs)(H,{sx:{minWidth:0},children:[(0,zj.jsx)(tjr,{dir:a,...kjr(a,e),indent:i,onToggle:()=>o(a.path)}),!n.has(a.path)&&(0,zj.jsx)(Bmt,{...e,nodes:a.children,depth:r+1})]},a.path))}var _jr=S(re(),1);function $mt(e,t){return e.flatMap(r=>{if(r.kind==="file")return t.has(r.path)?[r]:[];let n=$mt(r.children,t);return n.length>0?[{...r,children:n}]:[]})}var RGo=new Set;function Ejr(e,t,r,n){let o=t.trim()!=="",i=(0,_jr.useMemo)(()=>o?$mt(e,r):e,[o,e,r]);return{nodes:i,collapsedDirs:o?RGo:n,noMatches:o&&i.length===0}}var Hse=S(_(),1);function Rjr({glob:e,...t}){let r=Ejr(t.nodes,e,t.matches,t.collapsed);return(0,Hse.jsxs)(H,{sx:{mt:.5},children:[r.noMatches&&(0,Hse.jsx)(be,{variant:"caption",sx:{color:"text.secondary"},children:"No files match."}),(0,Hse.jsx)(Bmt,{...t,nodes:r.nodes,collapsed:r.collapsedDirs})]})}var vPe=S(re(),1);var Ljr=S(re(),1);var Pjr="assist:high-level-tree:",PGo=new Set;function nN(e,t=PGo){let r=`${Pjr}${e}`,[n,o]=(0,Ljr.useState)(()=>(Vx(Pjr),new Set(dl(r)))),i=a=>{Il(r,[...a]),o(a)};return{collapsed:Ajr(t,n),overrides:n,onToggle:a=>i(Ajr(n,[a])),onSet:(a,s)=>{let l=new Set(n);for(let u of a)t.has(u)===s?l.delete(u):l.add(u);i(l)},onReset:a=>{if(!a)return i(new Set);let s=new Set(n);for(let l of a)s.delete(l);i(s)}}}function Ajr(e,t){let r=new Set(e);for(let n of t)r.delete(n)||r.add(n);return r}function Fmt(e,t,r,n=!1){let o={open:0,collapsed:0};for(let i of e){if(i.kind==="file"){n||r.has(i.path)?o.collapsed++:o.open++;continue}let a=Fmt(i.children,t,r,n||t.has(i.path));o.open+=a.open,o.collapsed+=a.collapsed}return o}function zmt(e){return e.flatMap(t=>t.kind==="file"?[]:[t.path,...zmt(t.children)])}var Hmt=(e,t,r)=>{let n=e instanceof RegExp?Ijr(e,r):e,o=t instanceof RegExp?Ijr(t,r):t,i=n!==null&&o!=null&&AGo(n,o,r);return i&&{start:i[0],end:i[1],pre:r.slice(0,i[0]),body:r.slice(i[0]+n.length,i[1]),post:r.slice(i[1]+o.length)}},Ijr=(e,t)=>{let r=t.match(e);return r?r[0]:null},AGo=(e,t,r)=>{let n,o,i,a,s,l=r.indexOf(e),u=r.indexOf(t,l+1),d=l;if(l>=0&&u>0){if(e===t)return[l,u];for(n=[],i=r.length;d>=0&&!s;){if(d===l)n.push(d),l=r.indexOf(e,d+1);else if(n.length===1){let f=n.pop();f!==void 0&&(s=[f,u])}else o=n.pop(),o!==void 0&&o<i&&(i=o,a=u),u=r.indexOf(t,d+1);d=l<u&&l>=0?l:u}n.length&&a!==void 0&&(s=[i,a])}return s};var Djr="\0SLASH"+Math.random()+"\0",Mjr="\0OPEN"+Math.random()+"\0",Gmt="\0CLOSE"+Math.random()+"\0",Njr="\0COMMA"+Math.random()+"\0",Ojr="\0PERIOD"+Math.random()+"\0",LGo=new RegExp(Djr,"g"),IGo=new RegExp(Mjr,"g"),DGo=new RegExp(Gmt,"g"),MGo=new RegExp(Njr,"g"),NGo=new RegExp(Ojr,"g"),OGo=/\\\\/g,BGo=/\\{/g,$Go=/\\}/g,FGo=/\\,/g,zGo=/\\\./g,HGo=1e5,UGo=4e6,WGo=1e3,VGo=1e3;function Umt(e){return isNaN(e)?e.charCodeAt(0):parseInt(e,10)}function GGo(e){return e.replace(OGo,Djr).replace(BGo,Mjr).replace($Go,Gmt).replace(FGo,Njr).replace(zGo,Ojr)}function qGo(e){return e.replace(LGo,"\\").replace(IGo,"{").replace(DGo,"}").replace(MGo,",").replace(NGo,".")}function Wmt(e,t){for(let r=0;r<t.length;r++)e.push(t[r])}function jGo(e){let t=[],r="";for(;;){let n=Hmt("{","}",e);if(!n){let l=e.split(",");return l[0]=r+l[0],Wmt(t,l),t}let{pre:o,body:i,post:a}=n,s=o.split(",");if(s[0]=r+s[0],s[s.length-1]+="{"+i+"}",!a.length)return Wmt(t,s),t;r=s.pop(),Wmt(t,s),e=a}}function Bjr(e,t={}){if(!e)return[];let{max:r=HGo,maxLength:n=UGo,maxDepth:o=WGo,maxRewrites:i=VGo}=t;return e.slice(0,2)==="{}"&&(e="\\{\\}"+e.slice(2)),Vmt(GGo(e),r,n,o,0,i,!0).map(qGo)}function YGo(e){return"{"+e+"}"}function KGo(e){return/^-?0\d/.test(e)}function XGo(e,t){return e<=t}function ZGo(e,t){return e>=t}function Use(e,t,r,n,o,i){let a=[],s=0;for(let l=0;l<e.length;l++)for(let u=0;u<r.length;u++){if(a.length>=n)return a;let d=e[l]+t+r[u];if(!(i&&!d)){if(s+d.length>o)return a;a.push(d),s+=d.length}}return a}function QGo(e,t,r,n){let o=e.split(/\.\./),i=[];if(o[0]===void 0||o[1]===void 0)return i;let a=Umt(o[0]),s=Umt(o[1]),l=Math.max(o[0].length,o[1].length),u=o.length===3&&o[2]!==void 0?Math.max(Math.abs(Umt(o[2])),1):1,d=XGo;s<a&&(u*=-1,d=ZGo);let p=o.some(KGo),h=0;for(let m=a;d(m,s)&&i.length<r;m+=u){let g;if(t)g=String.fromCharCode(m),g==="\\"&&(g="");else if(g=String(m),p){let y=l-g.length;if(y>0){let v=new Array(y+1).join("0");m<0?g="-"+v+g.slice(1):g=v+g}}if(h+g.length>n)break;i.push(g),h+=g.length}return i}function Vmt(e,t,r,n,o,i,a){if(o>n)return[e];let s=[""],l=0,u=!1,d=!0;for(;;){let f=Hmt("{","}",e);if(!f)return Use(s,e,[""],t,r,u);let p=f.pre;if(/\$$/.test(p)){if(s=Use(s,p+"{"+f.body+"}",[""],t,r,u&&!f.post.length),d=!1,!f.post.length)break;e=f.post;continue}let h=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(f.body),m=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(f.body),g=h||m,y=f.body.indexOf(",")>=0;if(!g&&!y){if(l<i&&f.post.match(/,(?!,).*\}/)){l++,e=f.pre+"{"+f.body+Gmt+f.post,a=!0;continue}return Use(s,p+"{"+f.body+"}"+f.post,[""],t,r,u)}d&&(u=a&&!g,d=!1);let v;if(g)v=QGo(f.body,m,t,r);else{let b=jGo(f.body);if(b.length===1&&b[0]!==void 0&&(b=Vmt(b[0],t,r,n,o+1,i,!1).map(YGo),b.length===1)){if(s=Use(s,p+b[0],[""],t,r,u&&!f.post.length),!f.post.length)break;e=f.post;continue}let x=u&&!f.post.length&&!p;for(let C=0;x&&C<s.length;C++)s[C]&&(x=!1);v=[];let w=0;e:for(let C=0;C<b.length;C++){let k=Vmt(b[C],t,r,n,o+1,i,!1);for(let E=0;E<k.length;E++){let R=k[E];if(!(x&&!R)){if(v.length>=t||w+R.length>r)break e;v.push(R),w+=R.length}}}}if(s=Use(s,p,v,t,r,u&&!f.post.length),!f.post.length)break;e=f.post}return s}var Wse=e=>{if(typeof e!="string")throw new TypeError("invalid pattern");if(e.length>65536)throw new TypeError("pattern is too long")};var JGo={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},Vse=e=>e.replace(/[[\]\\-]/g,"\\$&"),eqo=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),$jr=e=>e.join(""),Fjr=(e,t)=>{let r=t;if(e.charAt(r)!=="[")throw new Error("not in a brace expression");let n=[],o=[],i=r+1,a=!1,s=!1,l=!1,u=!1,d=r,f="";e:for(;i<e.length;){let g=e.charAt(i);if((g==="!"||g==="^")&&i===r+1){u=!0,i++;continue}if(g==="]"&&a&&!l){d=i+1;break}if(a=!0,g==="\\"&&!l){l=!0,i++;continue}if(g==="["&&!l){for(let[y,[v,b,x]]of Object.entries(JGo))if(e.startsWith(y,i)){if(f)return["$.",!1,e.length-r,!0];i+=y.length,x?o.push(v):n.push(v),s=s||b;continue e}}if(l=!1,f){g>f?n.push(Vse(f)+"-"+Vse(g)):g===f&&n.push(Vse(g)),f="",i++;continue}if(e.startsWith("-]",i+1)){n.push(Vse(g+"-")),i+=2;continue}if(e.startsWith("-",i+1)){f=g,i+=2;continue}n.push(Vse(g)),i++}if(d<i)return["",!1,0,!1];if(!n.length&&!o.length)return["$.",!1,e.length-r,!0];if(o.length===0&&n.length===1&&/^\\?.$/.test(n[0])&&!u){let g=n[0].length===2?n[0].slice(-1):n[0];return[eqo(g),!1,d-r,!1]}let p="["+(u?"^":"")+$jr(n)+"]",h="["+(u?"":"^")+$jr(o)+"]";return[n.length&&o.length?"("+p+"|"+h+")":n.length?p:h,s,d-r,!0]};var k3=(e,{windowsPathsNoEscape:t=!1,magicalBraces:r=!0}={})=>r?t?e.replace(/\[([^/\\])\]/g,"$1"):e.replace(/((?!\\).|^)\[([^/\\])\]/g,"$1$2").replace(/\\([^/])/g,"$1"):t?e.replace(/\[([^/\\{}])\]/g,"$1"):e.replace(/((?!\\).|^)\[([^/\\{}])\]/g,"$1$2").replace(/\\([^/{}])/g,"$1");var Fh,tqo=new Set(["!","?","+","*","@"]),qmt=e=>tqo.has(e),zjr=e=>qmt(e.type),rqo=new Map([["!",["@"]],["?",["?","@"]],["@",["@"]],["*",["*","+","?","@"]],["+",["+","@"]]]),nqo=new Map([["!",["?"]],["@",["?"]],["+",["?","*"]]]),oqo=new Map([["!",["?","@"]],["?",["?","@"]],["@",["?","@"]],["*",["*","+","?","@"]],["+",["+","@","?","*"]]]),Hjr=new Map([["!",new Map([["!","@"]])],["?",new Map([["*","*"],["+","*"]])],["@",new Map([["!","!"],["?","?"],["@","@"],["*","*"],["+","+"]])],["+",new Map([["?","*"],["*","*"]])]]),iqo="(?!(?:^|/)\\.\\.?(?:$|/))",hPe="(?!\\.)",aqo=new Set(["[","."]),sqo=new Set(["..","."]),lqo=new Set("().*{}+?[]^$\\!"),cqo=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Xmt="[^/]",Ujr=Xmt+"*?",Wjr=Xmt+"+?",uqo=0,cc,Mu,ik,Qn,Cs,_3,oN,E3,PS,AS,Hj,Oi,Vjr,P3,mPe,Gjr,jmt,gPe,qjr,Ymt,jjr,Yjr,Kjr,yPe,Kmt,Xjr,R3=class{constructor(t,r,n={}){Dd(this,Oi);yr(this,"type");Dd(this,cc);Dd(this,Mu);Dd(this,ik,!1);Dd(this,Qn,[]);Dd(this,Cs);Dd(this,_3);Dd(this,oN);Dd(this,E3,!1);Dd(this,PS);Dd(this,AS);Dd(this,Hj,!1);yr(this,"id",++uqo);this.type=t,t&&ia(this,Mu,!0),ia(this,Cs,r),ia(this,cc,rr(this,Cs)?rr(rr(this,Cs),cc):this),ia(this,PS,rr(this,cc)===this?n:rr(rr(this,cc),PS)),ia(this,oN,rr(this,cc)===this?[]:rr(rr(this,cc),oN)),t==="!"&&!rr(rr(this,cc),E3)&&rr(this,oN).push(this),ia(this,_3,rr(this,Cs)?rr(rr(this,Cs),Qn).length:0)}get depth(){return(rr(this,Cs)?.depth??-1)+1}[Symbol.for("nodejs.util.inspect.custom")](){return{"@@type":"AST",id:this.id,type:this.type,root:rr(this,cc).id,parent:rr(this,Cs)?.id,depth:this.depth,partsLength:rr(this,Qn).length,parts:rr(this,Qn)}}get hasMagic(){if(rr(this,Mu)!==void 0)return rr(this,Mu);for(let t of rr(this,Qn))if(typeof t!="string"&&(t.type||t.hasMagic))return ia(this,Mu,!0);return rr(this,Mu)}toString(){return rr(this,AS)!==void 0?rr(this,AS):this.type?ia(this,AS,this.type+"("+rr(this,Qn).map(t=>String(t)).join("|")+")"):ia(this,AS,rr(this,Qn).map(t=>String(t)).join(""))}push(...t){for(let r of t)if(r!==""){if(typeof r!="string"&&!(r instanceof Fh&&rr(r,Cs)===this))throw new Error("invalid part: "+r);rr(this,Qn).push(r)}}toJSON(){let t=this.type===null?rr(this,Qn).slice().map(r=>typeof r=="string"?r:r.toJSON()):[this.type,...rr(this,Qn).map(r=>r.toJSON())];return this.isStart()&&!this.type&&t.unshift([]),this.isEnd()&&(this===rr(this,cc)||rr(rr(this,cc),E3)&&rr(this,Cs)?.type==="!")&&t.push({}),t}isStart(){if(rr(this,cc)===this)return!0;if(!rr(this,Cs)?.isStart())return!1;if(rr(this,_3)===0)return!0;let t=rr(this,Cs);for(let r=0;r<rr(this,_3);r++){let n=rr(t,Qn)[r];if(!(n instanceof Fh&&n.type==="!"))return!1}return!0}isEnd(){if(rr(this,cc)===this||rr(this,Cs)?.type==="!")return!0;if(!rr(this,Cs)?.isEnd())return!1;if(!this.type)return rr(this,Cs)?.isEnd();let t=rr(this,Cs)?rr(rr(this,Cs),Qn).length:0;return rr(this,_3)===t-1}copyIn(t){typeof t=="string"?this.push(t):this.push(t.clone(this))}clone(t){let r=new Fh(this.type,t);for(let n of rr(this,Qn))r.copyIn(n);return r}static fromGlob(t,r={}){var o;let n=new Fh(null,void 0,r);return ui(o=Fh,P3,mPe).call(o,t,n,0,r,0),n}toMMPattern(){if(this!==rr(this,cc))return rr(this,cc).toMMPattern();let t=this.toString(),[r,n,o,i]=this.toRegExpSource();if(!(o||rr(this,Mu)||rr(this,PS).nocase&&!rr(this,PS).nocaseMagicOnly&&t.toUpperCase()!==t.toLowerCase()))return n;let s=(rr(this,PS).nocase?"i":"")+(i?"u":"");return Object.assign(new RegExp(`^${r}$`,s),{_src:r,_glob:t})}get options(){return rr(this,PS)}toRegExpSource(t){let r=t??!!rr(this,PS).dot;if(rr(this,cc)===this&&(ui(this,Oi,yPe).call(this),ui(this,Oi,Vjr).call(this)),!zjr(this)){let l=this.isStart()&&this.isEnd()&&!rr(this,Qn).some(h=>typeof h!="string"),u=rr(this,Qn).map(h=>{var b;let[m,g,y,v]=typeof h=="string"?ui(b=Fh,P3,Xjr).call(b,h,rr(this,Mu),l):h.toRegExpSource(t);return ia(this,Mu,rr(this,Mu)||y),ia(this,ik,rr(this,ik)||v),m}).join(""),d="";if(this.isStart()&&typeof rr(this,Qn)[0]=="string"&&!(rr(this,Qn).length===1&&sqo.has(rr(this,Qn)[0]))){let m=aqo,g=r&&m.has(u.charAt(0))||u.startsWith("\\.")&&m.has(u.charAt(2))||u.startsWith("\\.\\.")&&m.has(u.charAt(4)),y=!r&&!t&&m.has(u.charAt(0));d=g?iqo:y?hPe:""}let f="";return this.isEnd()&&rr(rr(this,cc),E3)&&rr(this,Cs)?.type==="!"&&(f="(?:$|\\/)"),[d+u+f,k3(u),ia(this,Mu,!!rr(this,Mu)),rr(this,ik)]}let n=this.type==="*"||this.type==="+",o=this.type==="!"?"(?:(?!(?:":"(?:",i=ui(this,Oi,Kmt).call(this,r);if(this.isStart()&&this.isEnd()&&!i&&this.type!=="!"){let l=this.toString(),u=this;return ia(u,Qn,[l]),u.type=null,ia(u,Mu,void 0),[l,k3(this.toString()),!1,!1]}let a=!n||t||r||!hPe?"":ui(this,Oi,Kmt).call(this,!0);a===i&&(a=""),a&&(i=`(?:${i})(?:${a})*?`);let s="";if(this.type==="!"&&rr(this,Hj))s=(this.isStart()&&!r?hPe:"")+Wjr;else{let l=this.type==="!"?"))"+(this.isStart()&&!r&&!t?hPe:"")+Ujr+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&a?")":this.type==="*"&&a?")?":`)${this.type}`;s=o+i+l}return[s,k3(i),ia(this,Mu,!!rr(this,Mu)),rr(this,ik)]}};cc=new WeakMap,Mu=new WeakMap,ik=new WeakMap,Qn=new WeakMap,Cs=new WeakMap,_3=new WeakMap,oN=new WeakMap,E3=new WeakMap,PS=new WeakMap,AS=new WeakMap,Hj=new WeakMap,Oi=new WeakSet,Vjr=function(){if(this!==rr(this,cc))throw new Error("should only call on root");if(rr(this,E3))return this;this.toString(),ia(this,E3,!0);let t;for(;t=rr(this,oN).pop();){if(t.type!=="!")continue;let r=t,n=rr(r,Cs);for(;n;){for(let o=rr(r,_3)+1;!n.type&&o<rr(n,Qn).length;o++)for(let i of rr(t,Qn)){if(typeof i=="string")throw new Error("string part in extglob AST??");i.copyIn(rr(n,Qn)[o])}r=n,n=rr(r,Cs)}}return this},P3=new WeakSet,mPe=function(t,r,n,o,i){var g,y,v,b;let a=o.maxExtglobRecursion??2,s=!1,l=!1,u=-1,d=!1;if(r.type===null){let x=n,w="";for(;x<t.length;){let C=t.charAt(x++);if(s||C==="\\"){s=!s,w+=C;continue}if(l){x===u+1?(C==="^"||C==="!")&&(d=!0):C==="]"&&!(x===u+2&&d)&&(l=!1),w+=C;continue}else if(C==="["){l=!0,u=x,d=!1,w+=C;continue}if(!o.noext&&qmt(C)&&t.charAt(x)==="("&&i<=a){r.push(w),w="";let E=new Fh(C,r);x=ui(g=Fh,P3,mPe).call(g,t,E,x,o,i+1),r.push(E);continue}w+=C}return r.push(w),x}let f=n+1,p=new Fh(null,r),h=[],m="";for(;f<t.length;){let x=t.charAt(f++);if(s||x==="\\"){s=!s,m+=x;continue}if(l){f===u+1?(x==="^"||x==="!")&&(d=!0):x==="]"&&!(f===u+2&&d)&&(l=!1),m+=x;continue}else if(x==="["){l=!0,u=f,d=!1,m+=x;continue}if(!o.noext&&qmt(x)&&t.charAt(f)==="("&&(i<=a||r&&ui(y=r,Oi,gPe).call(y,x))){let C=r&&ui(v=r,Oi,gPe).call(v,x)?0:1;p.push(m),m="";let k=new Fh(x,p);p.push(k),f=ui(b=Fh,P3,mPe).call(b,t,k,f,o,i+C);continue}if(x==="|"){p.push(m),m="",h.push(p),p=new Fh(null,r);continue}if(x===")")return m===""&&rr(r,Qn).length===0&&ia(r,Hj,!0),p.push(m),m="",r.push(...h,p),f;m+=x}return r.type=null,ia(r,Mu,void 0),ia(r,Qn,[t.substring(n-1)]),f},Gjr=function(t){return ui(this,Oi,jmt).call(this,t,nqo)},jmt=function(t,r=rqo){if(!t||typeof t!="object"||t.type!==null||rr(t,Qn).length!==1||this.type===null)return!1;let n=rr(t,Qn)[0];return!n||typeof n!="object"||n.type===null?!1:ui(this,Oi,gPe).call(this,n.type,r)},gPe=function(t,r=oqo){return!!r.get(this.type)?.includes(t)},qjr=function(t,r){let n=rr(t,Qn)[0],o=new Fh(null,n,this.options);rr(o,Qn).push(""),n.push(o),ui(this,Oi,Ymt).call(this,t,r)},Ymt=function(t,r){let n=rr(t,Qn)[0];rr(this,Qn).splice(r,1,...rr(n,Qn));for(let o of rr(n,Qn))typeof o=="object"&&ia(o,Cs,this);ia(this,AS,void 0)},jjr=function(t){return!!Hjr.get(this.type)?.has(t)},Yjr=function(t){if(!t||typeof t!="object"||t.type!==null||rr(t,Qn).length!==1||this.type===null||rr(this,Qn).length!==1)return!1;let r=rr(t,Qn)[0];return!r||typeof r!="object"||r.type===null?!1:ui(this,Oi,jjr).call(this,r.type)},Kjr=function(t){let r=Hjr.get(this.type),n=rr(t,Qn)[0],o=r?.get(n.type);if(!o)return!1;ia(this,Qn,rr(n,Qn));for(let i of rr(this,Qn))typeof i=="object"&&ia(i,Cs,this);this.type=o,ia(this,AS,void 0),ia(this,Hj,!1)},yPe=function(){var t,r;if(zjr(this)){let n=0,o=!1;do{o=!0;for(let i=0;i<rr(this,Qn).length;i++){let a=rr(this,Qn)[i];typeof a=="object"&&(ui(r=a,Oi,yPe).call(r),ui(this,Oi,jmt).call(this,a)?(o=!1,ui(this,Oi,Ymt).call(this,a,i)):ui(this,Oi,Gjr).call(this,a)?(o=!1,ui(this,Oi,qjr).call(this,a,i)):ui(this,Oi,Yjr).call(this,a)&&(o=!1,ui(this,Oi,Kjr).call(this,a)))}}while(!o&&++n<10)}else for(let n of rr(this,Qn))typeof n=="object"&&ui(t=n,Oi,yPe).call(t);ia(this,AS,void 0)},Kmt=function(t){return rr(this,Qn).map(r=>{if(typeof r=="string")throw new Error("string type in extglob ast??");let[n,o,i,a]=r.toRegExpSource(t);return ia(this,ik,rr(this,ik)||a),n}).filter(r=>!(this.isStart()&&this.isEnd())||!!r).join("|")},Xjr=function(t,r,n=!1){let o=!1,i="",a=!1,s=!1;for(let l=0;l<t.length;l++){let u=t.charAt(l);if(o){o=!1,i+=(lqo.has(u)?"\\":"")+u;continue}if(u==="*"){if(s)continue;s=!0,i+=n&&/^[*]+$/.test(t)?Wjr:Ujr,r=!0;continue}else s=!1;if(u==="\\"){l===t.length-1?i+="\\\\":o=!0;continue}if(u==="["){let[d,f,p,h]=Fjr(t,l);if(p){i+=d,a=a||f,l+=p-1,r=r||h;continue}}if(u==="?"){i+=Xmt,r=!0;continue}i+=cqo(u)}return[i,k3(t),!!r,a]},Dd(R3,P3);Fh=R3;var Zmt=(e,{windowsPathsNoEscape:t=!1,magicalBraces:r=!1}={})=>r?t?e.replace(/[?*()[\]{}]/g,"[$&]"):e.replace(/[?*()[\]\\{}]/g,"\\$&"):t?e.replace(/[?*()[\]]/g,"[$&]"):e.replace(/[?*()[\]\\]/g,"\\$&");var Gc=(e,t,r={})=>(Wse(t),!r.nocomment&&t.charAt(0)==="#"?!1:new Wj(t,r).match(e)),dqo=/^\*+([^+@!?*[(]*)$/,fqo=e=>t=>!t.startsWith(".")&&t.endsWith(e),pqo=e=>t=>t.endsWith(e),hqo=e=>(e=e.toLowerCase(),t=>!t.startsWith(".")&&t.toLowerCase().endsWith(e)),mqo=e=>(e=e.toLowerCase(),t=>t.toLowerCase().endsWith(e)),gqo=/^\*+\.\*+$/,yqo=e=>!e.startsWith(".")&&e.includes("."),vqo=e=>e!=="."&&e!==".."&&e.includes("."),bqo=/^\.\*+$/,xqo=e=>e!=="."&&e!==".."&&e.startsWith("."),Sqo=/^\*+$/,Tqo=e=>e.length!==0&&!e.startsWith("."),wqo=e=>e.length!==0&&e!=="."&&e!=="..",Cqo=/^\?+([^+@!?*[(]*)?$/,kqo=([e,t=""])=>{let r=Jjr([e]);return t?(t=t.toLowerCase(),n=>r(n)&&n.toLowerCase().endsWith(t)):r},_qo=([e,t=""])=>{let r=eYr([e]);return t?(t=t.toLowerCase(),n=>r(n)&&n.toLowerCase().endsWith(t)):r},Eqo=([e,t=""])=>{let r=eYr([e]);return t?n=>r(n)&&n.endsWith(t):r},Rqo=([e,t=""])=>{let r=Jjr([e]);return t?n=>r(n)&&n.endsWith(t):r},Jjr=([e])=>{let t=e.length;return r=>r.length===t&&!r.startsWith(".")},eYr=([e])=>{let t=e.length;return r=>r.length===t&&r!=="."&&r!==".."},tYr=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",Zjr={win32:{sep:"\\"},posix:{sep:"/"}},Pqo=tYr==="win32"?Zjr.win32.sep:Zjr.posix.sep;Gc.sep=Pqo;var vf=Symbol("globstar **");Gc.GLOBSTAR=vf;var Aqo="[^/]",Lqo=Aqo+"*?",Iqo="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",Dqo="(?:(?!(?:\\/|^)\\.).)*?",Mqo=(e,t={})=>r=>Gc(r,e,t);Gc.filter=Mqo;var d0=(e,t={})=>Object.assign({},e,t),Nqo=e=>{if(!e||typeof e!="object"||!Object.keys(e).length)return Gc;let t=Gc;return Object.assign((n,o,i={})=>t(n,o,d0(e,i)),{Minimatch:class extends t.Minimatch{constructor(o,i={}){super(o,d0(e,i))}static defaults(o){return t.defaults(d0(e,o)).Minimatch}},AST:class extends t.AST{constructor(o,i,a={}){super(o,i,d0(e,a))}static fromGlob(o,i={}){return t.AST.fromGlob(o,d0(e,i))}},unescape:(n,o={})=>t.unescape(n,d0(e,o)),escape:(n,o={})=>t.escape(n,d0(e,o)),filter:(n,o={})=>t.filter(n,d0(e,o)),defaults:n=>t.defaults(d0(e,n)),makeRe:(n,o={})=>t.makeRe(n,d0(e,o)),braceExpand:(n,o={})=>t.braceExpand(n,d0(e,o)),match:(n,o,i={})=>t.match(n,o,d0(e,i)),sep:t.sep,GLOBSTAR:vf})};Gc.defaults=Nqo;var rYr=(e,t={})=>(Wse(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:Bjr(e,{max:t.braceExpandMax}));Gc.braceExpand=rYr;var Oqo=(e,t={})=>new Wj(e,t).makeRe();Gc.makeRe=Oqo;var Bqo=(e,t,r={})=>{let n=new Wj(t,r);return e=e.filter(o=>n.match(o)),n.options.nonull&&!e.length&&e.push(t),e};Gc.match=Bqo;var Qjr=/[?*]|[+@!]\(.*?\)|\[|\]/,$qo=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),sg,nYr,Qmt,Uj,Wj=class{constructor(t,r={}){Dd(this,sg);yr(this,"options");yr(this,"set");yr(this,"pattern");yr(this,"windowsPathsNoEscape");yr(this,"nonegate");yr(this,"negate");yr(this,"comment");yr(this,"empty");yr(this,"preserveMultipleSlashes");yr(this,"partial");yr(this,"globSet");yr(this,"globParts");yr(this,"nocase");yr(this,"isWindows");yr(this,"platform");yr(this,"windowsNoMagicRoot");yr(this,"maxGlobstarRecursion");yr(this,"regexp");Wse(t),r=r||{},this.options=r,this.maxGlobstarRecursion=r.maxGlobstarRecursion??200,this.pattern=t,this.platform=r.platform||tYr,this.isWindows=this.platform==="win32";let n="allowWindowsEscape";this.windowsPathsNoEscape=!!r.windowsPathsNoEscape||r[n]===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!r.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!r.nonegate,this.comment=!1,this.empty=!1,this.partial=!!r.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=r.windowsNoMagicRoot!==void 0?r.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let t of this.set)for(let r of t)if(typeof r!="string")return!0;return!1}debug(...t){}make(){let t=this.pattern,r=this.options;if(!r.nocomment&&t.charAt(0)==="#"){this.comment=!0;return}if(!t){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],r.debug&&(this.debug=(...i)=>console.error(...i)),this.debug(this.pattern,this.globSet);let n=this.globSet.map(i=>this.slashSplit(i));this.globParts=this.preprocess(n),this.debug(this.pattern,this.globParts);let o=this.globParts.map((i,a,s)=>{if(this.isWindows&&this.windowsNoMagicRoot){let l=i[0]===""&&i[1]===""&&(i[2]==="?"||!Qjr.test(i[2]))&&!Qjr.test(i[3]),u=/^[a-z]:/i.test(i[0]);if(l)return[...i.slice(0,4),...i.slice(4).map(d=>this.parse(d))];if(u)return[i[0],...i.slice(1).map(d=>this.parse(d))]}return i.map(l=>this.parse(l))});if(this.debug(this.pattern,o),this.set=o.filter(i=>i.indexOf(!1)===-1),this.isWindows)for(let i=0;i<this.set.length;i++){let a=this.set[i];a[0]===""&&a[1]===""&&this.globParts[i][2]==="?"&&typeof a[3]=="string"&&/^[a-z]:$/i.test(a[3])&&(a[2]="?")}this.debug(this.pattern,this.set)}preprocess(t){if(this.options.noglobstar)for(let n of t)for(let o=0;o<n.length;o++)n[o]==="**"&&(n[o]="*");let{optimizationLevel:r=1}=this.options;return r>=2?(t=this.firstPhasePreProcess(t),t=this.secondPhasePreProcess(t)):r>=1?t=this.levelOneOptimize(t):t=this.adjascentGlobstarOptimize(t),t}adjascentGlobstarOptimize(t){return t.map(r=>{let n=-1;for(;(n=r.indexOf("**",n+1))!==-1;){let o=n;for(;r[o+1]==="**";)o++;o!==n&&r.splice(n,o-n)}return r})}levelOneOptimize(t){return t.map(r=>(r=r.reduce((n,o)=>{let i=n[n.length-1];return o==="**"&&i==="**"?n:o===".."&&i&&i!==".."&&i!=="."&&i!=="**"?(n.pop(),n):(n.push(o),n)},[]),r.length===0?[""]:r))}levelTwoFileOptimize(t){Array.isArray(t)||(t=this.slashSplit(t));let r=!1;do{if(r=!1,!this.preserveMultipleSlashes){for(let o=1;o<t.length-1;o++){let i=t[o];o===1&&i===""&&t[0]===""||(i==="."||i==="")&&(r=!0,t.splice(o,1),o--)}t[0]==="."&&t.length===2&&(t[1]==="."||t[1]==="")&&(r=!0,t.pop())}let n=0;for(;(n=t.indexOf("..",n+1))!==-1;){let o=t[n-1];o&&o!=="."&&o!==".."&&o!=="**"&&!(this.isWindows&&/^[a-z]:$/i.test(o))&&(r=!0,t.splice(n-1,2),n-=2)}}while(r);return t.length===0?[""]:t}firstPhasePreProcess(t){let r=!1;do{r=!1;for(let n of t){let o=-1;for(;(o=n.indexOf("**",o+1))!==-1;){let a=o;for(;n[a+1]==="**";)a++;a>o&&n.splice(o+1,a-o);let s=n[o+1],l=n[o+2],u=n[o+3];if(s!==".."||!l||l==="."||l===".."||!u||u==="."||u==="..")continue;r=!0,n.splice(o,1);let d=n.slice(0);d[o]="**",t.push(d),o--}if(!this.preserveMultipleSlashes){for(let a=1;a<n.length-1;a++){let s=n[a];a===1&&s===""&&n[0]===""||(s==="."||s==="")&&(r=!0,n.splice(a,1),a--)}n[0]==="."&&n.length===2&&(n[1]==="."||n[1]==="")&&(r=!0,n.pop())}let i=0;for(;(i=n.indexOf("..",i+1))!==-1;){let a=n[i-1];if(a&&a!=="."&&a!==".."&&a!=="**"){r=!0;let l=i===1&&n[i+1]==="**"?["."]:[];n.splice(i-1,2,...l),n.length===0&&n.push(""),i-=2}}}}while(r);return t}secondPhasePreProcess(t){for(let r=0;r<t.length-1;r++)for(let n=r+1;n<t.length;n++){let o=this.partsMatch(t[r],t[n],!this.preserveMultipleSlashes);if(o){t[r]=[],t[n]=o;break}}return t.filter(r=>r.length)}partsMatch(t,r,n=!1){let o=0,i=0,a=[],s="";for(;o<t.length&&i<r.length;)if(t[o]===r[i])a.push(s==="b"?r[i]:t[o]),o++,i++;else if(n&&t[o]==="**"&&r[i]===t[o+1])a.push(t[o]),o++;else if(n&&r[i]==="**"&&t[o]===r[i+1])a.push(r[i]),i++;else if(t[o]==="*"&&r[i]&&(this.options.dot||!r[i].startsWith("."))&&r[i]!=="**"){if(s==="b")return!1;s="a",a.push(t[o]),o++,i++}else if(r[i]==="*"&&t[o]&&(this.options.dot||!t[o].startsWith("."))&&t[o]!=="**"){if(s==="a")return!1;s="b",a.push(r[i]),o++,i++}else return!1;return t.length===r.length&&a}parseNegate(){if(this.nonegate)return;let t=this.pattern,r=!1,n=0;for(let o=0;o<t.length&&t.charAt(o)==="!";o++)r=!r,n++;n&&(this.pattern=t.slice(n)),this.negate=r}matchOne(t,r,n=!1){let o=0,i=0;if(this.isWindows){let s=typeof t[0]=="string"&&/^[a-z]:$/i.test(t[0]),l=!s&&t[0]===""&&t[1]===""&&t[2]==="?"&&/^[a-z]:$/i.test(t[3]),u=typeof r[0]=="string"&&/^[a-z]:$/i.test(r[0]),d=!u&&r[0]===""&&r[1]===""&&r[2]==="?"&&typeof r[3]=="string"&&/^[a-z]:$/i.test(r[3]),f=l?3:s?0:void 0,p=d?3:u?0:void 0;if(typeof f=="number"&&typeof p=="number"){let[h,m]=[t[f],r[p]];h.toLowerCase()===m.toLowerCase()&&(r[p]=h,i=p,o=f)}}let{optimizationLevel:a=1}=this.options;return a>=2&&(t=this.levelTwoFileOptimize(t)),r.includes(vf)?ui(this,sg,nYr).call(this,t,r,n,o,i):ui(this,sg,Uj).call(this,t,r,n,o,i)}braceExpand(){return rYr(this.pattern,this.options)}parse(t){Wse(t);let r=this.options;if(t==="**")return vf;if(t==="")return"";let n,o=null;(n=t.match(Sqo))?o=r.dot?wqo:Tqo:(n=t.match(dqo))?o=(r.nocase?r.dot?mqo:hqo:r.dot?pqo:fqo)(n[1]):(n=t.match(Cqo))?o=(r.nocase?r.dot?_qo:kqo:r.dot?Eqo:Rqo)(n):(n=t.match(gqo))?o=r.dot?vqo:yqo:(n=t.match(bqo))&&(o=xqo);let i=R3.fromGlob(t,this.options).toMMPattern();return o&&typeof i=="object"&&Reflect.defineProperty(i,"test",{value:o}),i}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let t=this.set;if(!t.length)return this.regexp=!1,this.regexp;let r=this.options,n=r.noglobstar?Lqo:r.dot?Iqo:Dqo,o=new Set(r.nocase?["i"]:[]),i=t.map(l=>{let u=l.map(f=>{if(f instanceof RegExp)for(let p of f.flags.split(""))o.add(p);return typeof f=="string"?$qo(f):f===vf?vf:f._src});u.forEach((f,p)=>{let h=u[p+1],m=u[p-1];f!==vf||m===vf||(m===void 0?h!==void 0&&h!==vf?u[p+1]="(?:\\/|"+n+"\\/)?"+h:u[p]=n:h===void 0?u[p-1]=m+"(?:\\/|\\/"+n+")?":h!==vf&&(u[p-1]=m+"(?:\\/|\\/"+n+"\\/)"+h,u[p+1]=vf))});let d=u.filter(f=>f!==vf);if(this.partial&&d.length>=1){let f=[];for(let p=1;p<=d.length;p++)f.push(d.slice(0,p).join("/"));return"(?:"+f.join("|")+")"}return d.join("/")}).join("|"),[a,s]=t.length>1?["(?:",")"]:["",""];i="^"+a+i+s+"$",this.partial&&(i="^(?:\\/|"+a+i.slice(1,-1)+s+")$"),this.negate&&(i="^(?!"+i+").+$");try{this.regexp=new RegExp(i,[...o].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(t){return this.preserveMultipleSlashes?t.split("/"):this.isWindows&&/^\/\/[^/]+/.test(t)?["",...t.split(/\/+/)]:t.split(/\/+/)}match(t,r=this.partial){if(this.debug("match",t,this.pattern),this.comment)return!1;if(this.empty)return t==="";if(t==="/"&&r)return!0;let n=this.options;this.isWindows&&(t=t.split("\\").join("/"));let o=this.slashSplit(t);this.debug(this.pattern,"split",o);let i=this.set;this.debug(this.pattern,"set",i);let a=o[o.length-1];if(!a)for(let s=o.length-2;!a&&s>=0;s--)a=o[s];for(let s of i){let l=o;if(n.matchBase&&s.length===1&&(l=[a]),this.matchOne(l,s,r))return n.flipNegate?!0:!this.negate}return n.flipNegate?!1:this.negate}static defaults(t){return Gc.defaults(t).Minimatch}};sg=new WeakSet,nYr=function(t,r,n,o,i){let a=r.indexOf(vf,i),s=r.lastIndexOf(vf),[l,u,d]=n?[r.slice(i,a),r.slice(a+1),[]]:[r.slice(i,a),r.slice(a+1,s),r.slice(s+1)];if(l.length){let b=t.slice(o,o+l.length);if(!ui(this,sg,Uj).call(this,b,l,n,0,0))return!1;o+=l.length,i+=l.length}let f=0;if(d.length){if(d.length+o>t.length)return!1;let b=t.length-d.length;if(ui(this,sg,Uj).call(this,t,d,n,b,0))f=d.length;else{if(t[t.length-1]!==""||o+d.length===t.length||(b--,!ui(this,sg,Uj).call(this,t,d,n,b,0)))return!1;f=d.length+1}}if(!u.length){let b=!!f;for(let x=o;x<t.length-f;x++){let w=String(t[x]);if(b=!0,w==="."||w===".."||!this.options.dot&&w.startsWith("."))return!1}return n||b}let p=[[[],0]],h=p[0],m=0,g=[0];for(let b of u)b===vf?(g.push(m),h=[[],0],p.push(h)):(h[0].push(b),m++);let y=p.length-1,v=t.length-f;for(let b of p)b[1]=v-(g[y--]+b[0].length);return!!ui(this,sg,Qmt).call(this,t,p,o,0,n,0,!!f)},Qmt=function(t,r,n,o,i,a,s){let l=r[o];if(!l){for(let f=n;f<t.length;f++){s=!0;let p=t[f];if(p==="."||p===".."||!this.options.dot&&p.startsWith("."))return!1}return s}let[u,d]=l;for(;n<=d;){if(ui(this,sg,Uj).call(this,t.slice(0,n+u.length),u,i,n,0)&&a<this.maxGlobstarRecursion){let h=ui(this,sg,Qmt).call(this,t,r,n+u.length,o+1,i,a+1,s);if(h!==!1)return h}let p=t[n];if(p==="."||p===".."||!this.options.dot&&p.startsWith("."))return!1;n++}return i||null},Uj=function(t,r,n,o,i){let a,s,l,u;for(a=o,s=i,u=t.length,l=r.length;a<u&&s<l;a++,s++){this.debug("matchOne loop");let d=r[s],f=t[a];if(this.debug(r,d,f),d===!1||d===vf)return!1;let p;if(typeof d=="string"?(p=f===d,this.debug("string match",d,f,p)):(p=d.test(f),this.debug("pattern match",d,f,p)),!p)return!1}if(a===u&&s===l)return!0;if(a===u)return n;if(s===l)return a===u-1&&t[a]==="";throw new Error("wtf?")};Gc.AST=R3;Gc.Minimatch=Wj;Gc.escape=Zmt;Gc.unescape=k3;function oYr(e,t){let r=new Set,n=new Map;for(let o of $h(e)){let i=t.find(a=>Gc(o.path,a));i&&n.set(o.path,i),(i||o.status==="removed")&&r.add(o.path)}return{dirs:iYr(e,n),files:r,fileGlobs:n}}function iYr(e,t){let r=new Set;for(let n of e){if(n.kind==="file")continue;let o=$h(n.children);o.length>0&&o.every(i=>t.has(i.path))&&r.add(n.path);for(let i of iYr(n.children,t))r.add(i)}return r}function sYr(e,t,r,n,o){return{...o,changes:aYr(e.overrides,r)+aYr(t.overrides,n),expandAll:()=>{e.onSet(r,!1),t.onSet(n,!1)},collapseAll:()=>t.onSet(n,!0),show:i=>{let a=[...i];e.onSet(r.filter(s=>a.some(l=>l.startsWith(`${s}/`))),!1),t.onSet(a,!1)},hide:i=>t.onSet(i,!0),reset:()=>{e.onReset(),t.onReset()}}}function aYr(e,t){return t.filter(r=>e.has(r)).length}function lYr(e,t,r){let n=(0,vPe.useMemo)(()=>oYr(t,r),[t,r]),o=(0,vPe.useMemo)(()=>$h(t).map(u=>u.path),[t]),i=(0,vPe.useMemo)(()=>zmt(t),[t]),a=nN(e,n.dirs),s=nN(`files:${e}`,n.files),l=sYr(a,s,i,o,Fmt(t,a.collapsed,s.collapsed));return{dirs:a,files:s,fileGlobs:n.fileGlobs,filePaths:o,bulk:l}}var Gse=S(re(),1);var Fqo=/[*?[{]/;function cYr(e,t){let r=t.trim();if(!r)return new Set;if(!Fqo.test(r)){let n=r.toLowerCase();return new Set(e.filter(o=>o.toLowerCase().includes(n)))}return new Set(e.filter(n=>Gc(n,r,{matchBase:!0})))}function uYr(e,t){let[r,n]=(0,Gse.useState)(""),o=(0,Gse.useMemo)(()=>cYr(e,r),[e,r]),i=(0,Gse.useMemo)(()=>[...new Set(["**/*.md",...t])],[t]);return{glob:r,onChangeGlob:n,matches:o,quickGlobs:i}}var qse=S(re(),1);function dYr(){let[e,t]=(0,qse.useState)(null),[r,n]=(0,qse.useState)(0);return(0,qse.useEffect)(()=>{if(!e||(n(e.offsetHeight),typeof ResizeObserver>"u"))return;let o=new ResizeObserver(()=>n(e.offsetHeight));return o.observe(e),()=>o.disconnect()},[e]),{toolbarRef:t,offsetSx:{[Amt]:`${r}px`}}}function fYr(e,t,r){let{dirs:n,files:o,fileGlobs:i,filePaths:a,bulk:s}=lYr(e,t,r),{viewType:l,onChange:u}=_G(),d=uYr(a,r),{toolbarRef:f,offsetSx:p}=dYr();return{offsetSx:p,toolbar:{ref:f,bulk:s,viewType:l,onChangeViewType:u,...d},tree:{glob:d.glob,nodes:t,collapsed:n.collapsed,onToggleDir:n.onToggle,collapsedFiles:o.collapsed,onToggleFile:o.onToggle,fileGlobs:i,matches:d.matches,viewType:l}}}var iN=S(_(),1);function Vj({structure:e,collapsedPaths:t,subject:r,comments:n,hideSummary:o=!1,toolbarChildren:i}){let{offsetSx:a,toolbar:s,tree:l}=fYr(r,e.tree,t);return e.tree.length===0?(0,iN.jsx)(be,{variant:"caption",sx:{color:"text.secondary"},children:"No changed files."}):(0,iN.jsxs)(H,{sx:{minWidth:0,...a},children:[!o&&(0,iN.jsx)(oPe,{structure:e}),(0,iN.jsx)(Hqr,{...s,children:i}),(0,iN.jsx)(Rjr,{...l,comments:n})]})}function Gj(e){return e.slice(0,e.lastIndexOf("#"))}function bPe(e){let t=new Map;return e.forEach((r,n)=>{let o={number:n+1,title:r.title};for(let i of new Set(r.hunks.map(Gj)))t.set(i,[...t.get(i)??[],o])}),t}function pYr(e,t,r){return e.map(n=>{if(n.kind==="dir")return{...n,children:pYr(n.children,t,r)};let o=t.get(n.path);return{...n,...o?{slices:o}:{},...r.has(n.path)?{critical:!0}:{}}})}function hYr(e,t,r){return{...e,tree:pYr(e.tree,bPe(t),r)}}var yYr=S(_(),1);function gYr({payload:e,subject:t,comments:r}){let n=(0,mYr.useMemo)(()=>hYr(e.structure,e.slices??[],new Set(e.criticalDiffs.map(o=>o.path))),[e]);return(0,yYr.jsx)(Vj,{structure:n,collapsedPaths:e.collapsedPaths,subject:t,comments:r})}var MYr=S(re(),1);var vYr=e=>({"& .section-mark":{ml:1,fontFamily:e.typography.fontFamilyMono,fontSize:e.typography.caption.fontSize,fontWeight:500,color:e.palette.success.main},"& .section-mark.optional":{color:e.palette.text.disabled},"& .section-mark.missing":{color:e.palette.error.main},"& .issue-ref":{fontFamily:e.typography.fontFamilyMono,px:.75,borderRadius:.5,bgcolor:e.tokens.color.wash.accent,outline:`1px solid ${Or(e.palette.primary.main,.35)}`}});var bYr=S(_(),1),xPe=ot((0,bYr.jsx)("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2m5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12z"}),"Cancel");var xYr=S(_(),1),qj=ot((0,xYr.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m-2 15-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8z"}),"CheckCircle");var Jmt={"description-what-why":"What & Why","description-word-cap":"Word cap","description-links-issue":"Linked issue"};function SPe(e){return e.filter(t=>t.id in Jmt)}var TPe=S(_(),1),zqo={height:"auto",py:.25,"& .MuiChip-label":{whiteSpace:"normal"}};function SYr({checks:e}){return e.length===0?null:(0,TPe.jsx)(H,{role:"list","aria-label":"Description checks",sx:{display:"flex",flexWrap:"wrap",gap:.75},children:e.map(t=>{let r=t.status==="pass";return(0,TPe.jsx)(yn,{role:"listitem",size:"small",variant:"tonal",color:r?"default":"error",icon:(0,TPe.jsx)(r?qj:xPe,{titleAccess:r?"pass":"fail",color:r?"success":"error"}),label:`${Jmt[t.id]}: ${t.reason}`,sx:zqo},t.id)})})}var Hqo=/https?:\/\/github\.com\/[\w.-]+\/[\w.-]+\/issues\/\d+/,Uqo=/\b[\w.-]+\/[\w.-]+#\d+/,Wqo=/(?<![\w/#-])#\d+\b/;function TYr(e){for(let t of[Hqo,Uqo,Wqo]){let r=e.match(t);if(r)return r[0]}return null}function wYr(e,t){let r=t.find(o=>o.id==="description-links-issue");if(r?.status!=="pass")return null;let n=TYr(e);return n&&r.reason===`links ${n}`?n:null}var Vqo=/^https:\/\/github\.com\/user-attachments\/assets\/([0-9a-f-]{36})(?:[?#].*)?$/i;function CYr(e,t){return r=>{let n=Vqo.exec(r)?.[1];if(n){let o=new URLSearchParams({repo:e,pr:String(t),asset:n});return rv(`/api/github-attachment?${o}`)}return/^https:\/\//i.test(r)?r:null}}function kYr(e){let t=[],r=null,n=()=>{r&&t.push({heading:r.heading,content:r.lines.join(`
4133
+ `)}var CGo=[];function ijr(e,t,r){let n=(0,Dmt.useMemo)(()=>{if(r)try{return Uge(ojr(e,t,r))[0]}catch{return}},[e,t,r]),o=Hke(e,n?.hunks??CGo,t==="modified");return{file:(0,Dmt.useMemo)(()=>n&&{...n,hunks:o.hunks},[n,o.hunks]),expansion:o}}var rN=S(_(),1);function Bj({path:e,status:t,patch:r,truncated:n,viewType:o,comments:i,elsewhere:a}){let{file:s,expansion:l}=ijr(e,t,r);return s?(0,rN.jsxs)(H,{sx:[Rge,Pge,{pt:.5,minWidth:0}],children:[(0,rN.jsx)(Sye,{path:e,cwd:i?.cwd,hunks:s.hunks,onComment:i?.onComment,onQueue:i?.onQueue,unavailable:i?.unavailable,children:(0,rN.jsx)(Iye,{file:s,path:e,viewType:o,renderGap:wye(l,a)})}),n&&(0,rN.jsx)(u0,{children:"Truncated \u2014 the rest of this diff is on GitHub."})]}):(0,rN.jsx)(u0,{children:n?"Too large to show here \u2014 open it on GitHub.":"No diff available \u2014 open it on GitHub."})}var sjr=S(re(),1);function kGo(e,t){return e.getBoundingClientRect().top>t.getBoundingClientRect().top}function ajr(e){let t=e.parentElement;!t||!kGo(e,t)||t.scrollIntoView?.({block:"start"})}function pPe(e,t){let r=(0,sjr.useRef)(null);return{ref:r,toggle:()=>{e&&r.current&&ajr(r.current),t()}}}var ljr=e=>`linear-gradient(${e}, ${e})`;function _Go(e){return t=>{let r=Uqr(t),n=e?r.bgcolor:"transparent",o=e?r["&:hover"].bgcolor:t.palette.action.hover;return{position:"sticky",top:aPe,zIndex:2,bgcolor:"background.paper",backgroundImage:ljr(n),"&:hover":{bgcolor:"background.paper",backgroundImage:ljr(o)}}}}function cjr(e,t){return[{...JM,gap:0,cursor:"pointer"},t&&uPe,_Go(e)]}function ujr(e){return{...JM,minHeight:lPe.minHeight,"&:hover":void 0,minWidth:0,pl:e,...Nj}}var Mmt=S(_(),1);function djr({file:e}){return(0,Mmt.jsx)(Mt,{size:"small",href:e.diffUrl,target:"_blank",rel:"noreferrer","aria-label":`Open ${e.path} on GitHub`,onClick:t=>t.stopPropagation(),sx:{p:.25,flexShrink:0},children:(0,Mmt.jsx)(ume,{sx:{fontSize:14}})})}var pjr=S(_(),1);function fjr({open:e}){return(0,pjr.jsx)(e?La:zo,{sx:{fontSize:16,color:e?"primary.main":"text.secondary",flexShrink:0}})}var w3=S(_(),1);function hjr({file:e,muted:t=!1}){return(0,w3.jsxs)(w3.Fragment,{children:[(0,w3.jsx)(lr,{title:e.status,children:(0,w3.jsx)(be,{component:"span",sx:{...ok,flexShrink:0,fontWeight:700,color:Oj[e.status]},children:cPe[e.status]})}),(0,w3.jsx)(be,{component:"span",sx:{...ok,color:t?"text.secondary":void 0},title:e.path,children:e.name})]})}var mjr=S(_(),1),EGo={muted:{color:"text.secondary",bgcolor:"action.selected"},critical:e=>({color:e.palette.secondary.main,bgcolor:Or(e.palette.secondary.main,.14)})};function $j({label:e,title:t,tone:r="muted",onClick:n}){return(0,mjr.jsx)(H,{component:n?"button":"span",type:n?"button":void 0,title:t,onClick:n&&(o=>{o.stopPropagation(),n()}),sx:[{font:"inherit",fontSize:11,fontWeight:500,lineHeight:"18px",border:0,borderRadius:1,px:.75,flexShrink:0,whiteSpace:"nowrap",cursor:n?"pointer":"inherit"},EGo[r]],children:e})}var yjr=S(_(),1);function gjr({split:e}){return(0,yjr.jsx)($j,{label:`${e.hunks} of ${e.of} hunks`,title:"The rest of this file's hunks are in other slices"})}var C3=S(_(),1);function vjr({file:e,ignoredBy:t}){return(0,C3.jsxs)(C3.Fragment,{children:[t!==void 0&&(0,C3.jsx)(fPe,{label:"ignored",globs:[t]}),e.critical&&(0,C3.jsx)($j,{label:"critical",title:"Matches review.highLevel.criticalPaths",tone:"critical"}),e.split&&(0,C3.jsx)(gjr,{split:e.split})]})}var Nmt="assist:high-level-slice-select";function bjr(e){globalThis.dispatchEvent(new CustomEvent(Nmt,{detail:e}))}function xjr(e){let t=r=>e(r.detail);return globalThis.addEventListener(Nmt,t),()=>globalThis.removeEventListener(Nmt,t)}var Omt=S(_(),1);function Sjr({slices:e}){return!e||e.length===0?null:(0,Omt.jsx)(H,{sx:{display:"flex",gap:.5,flexShrink:0},children:e.map(({number:t,title:r})=>(0,Omt.jsx)($j,{label:`slice ${t}`,title:`Show slice ${t}: ${r}`,onClick:()=>bjr(t)},t))})}var RS=S(_(),1);function Tjr({file:e,indent:t,open:r,onToggle:n,glob:o,matched:i}){let a=!r&&o!==void 0,{ref:s,toggle:l}=pPe(r,n);return(0,RS.jsxs)(H,{ref:s,onClick:l,"data-matched":i||void 0,sx:cjr(r,i),children:[(0,RS.jsxs)(H,{component:"button",type:"button","aria-expanded":r,"aria-label":`${r?"Collapse":"Expand"} ${e.path}`,sx:ujr(t),children:[(0,RS.jsx)(fjr,{open:r}),(0,RS.jsx)(hjr,{file:e,muted:a}),(0,RS.jsx)(vjr,{file:e,ignoredBy:a?o:void 0}),(0,RS.jsx)(c0,{additions:e.additions,deletions:e.deletions,inline:!0})]}),(0,RS.jsx)(Sjr,{slices:e.slices}),(0,RS.jsx)(djr,{file:e})]})}var Fj=S(_(),1);function wjr({file:e,indent:t,open:r,onToggle:n,glob:o,matched:i,viewType:a,comments:s}){return(0,Fj.jsxs)(H,{sx:{minWidth:0,scrollMarginTop:aPe},children:[(0,Fj.jsx)(Tjr,{file:e,indent:t,open:r,onToggle:n,glob:o,matched:i}),r&&(0,Fj.jsx)(H,{sx:{mb:1,minWidth:0},children:(0,Fj.jsx)(Bj,{path:e.path,status:e.status,patch:e.patch??null,truncated:e.truncated===!0,viewType:a,comments:s,elsewhere:e.split?.elsewhere})})]})}function Cjr(e,t){let r=$h(e.children).map(n=>t.get(n.path));if(!(r.length===0||r.some(n=>n===void 0)))return[...new Set(r)]}function kjr(e,t){let r=t.collapsed.has(e.path);return r?{collapsed:r,matched:$h(e.children).some(n=>t.matches.has(n.path)),ignoredGlobs:Cjr(e,t.fileGlobs)}:{collapsed:r,matched:!1,ignoredGlobs:void 0}}var zj=S(_(),1);function Bmt(e){let{nodes:t,depth:r=0,collapsed:n,onToggleDir:o}=e,i=`${r*sPe}px`;return t.map(a=>a.kind==="file"?(0,zj.jsx)(wjr,{file:a,indent:i,open:!e.collapsedFiles.has(a.path),onToggle:()=>e.onToggleFile(a.path),glob:e.fileGlobs.get(a.path),matched:e.matches.has(a.path),viewType:e.viewType,comments:e.comments},a.path):(0,zj.jsxs)(H,{sx:{minWidth:0},children:[(0,zj.jsx)(tjr,{dir:a,...kjr(a,e),indent:i,onToggle:()=>o(a.path)}),!n.has(a.path)&&(0,zj.jsx)(Bmt,{...e,nodes:a.children,depth:r+1})]},a.path))}var _jr=S(re(),1);function $mt(e,t){return e.flatMap(r=>{if(r.kind==="file")return t.has(r.path)?[r]:[];let n=$mt(r.children,t);return n.length>0?[{...r,children:n}]:[]})}var RGo=new Set;function Ejr(e,t,r,n){let o=t.trim()!=="",i=(0,_jr.useMemo)(()=>o?$mt(e,r):e,[o,e,r]);return{nodes:i,collapsedDirs:o?RGo:n,noMatches:o&&i.length===0}}var Hse=S(_(),1);function Rjr({glob:e,...t}){let r=Ejr(t.nodes,e,t.matches,t.collapsed);return(0,Hse.jsxs)(H,{sx:{mt:.5},children:[r.noMatches&&(0,Hse.jsx)(be,{variant:"caption",sx:{color:"text.secondary"},children:"No files match."}),(0,Hse.jsx)(Bmt,{...t,nodes:r.nodes,collapsed:r.collapsedDirs})]})}var vPe=S(re(),1);var Ljr=S(re(),1);var Pjr="assist:high-level-tree:",PGo=new Set;function nN(e,t=PGo){let r=`${Pjr}${e}`,[n,o]=(0,Ljr.useState)(()=>(Vx(Pjr),new Set(dl(r)))),i=a=>{Il(r,[...a]),o(a)};return{collapsed:Ajr(t,n),overrides:n,onToggle:a=>i(Ajr(n,[a])),onSet:(a,s)=>{let l=new Set(n);for(let u of a)t.has(u)===s?l.delete(u):l.add(u);i(l)},onReset:a=>{if(!a)return i(new Set);let s=new Set(n);for(let l of a)s.delete(l);i(s)}}}function Ajr(e,t){let r=new Set(e);for(let n of t)r.delete(n)||r.add(n);return r}function Fmt(e,t,r,n=!1){let o={open:0,collapsed:0};for(let i of e){if(i.kind==="file"){n||r.has(i.path)?o.collapsed++:o.open++;continue}let a=Fmt(i.children,t,r,n||t.has(i.path));o.open+=a.open,o.collapsed+=a.collapsed}return o}function zmt(e){return e.flatMap(t=>t.kind==="file"?[]:[t.path,...zmt(t.children)])}var Hmt=(e,t,r)=>{let n=e instanceof RegExp?Ijr(e,r):e,o=t instanceof RegExp?Ijr(t,r):t,i=n!==null&&o!=null&&AGo(n,o,r);return i&&{start:i[0],end:i[1],pre:r.slice(0,i[0]),body:r.slice(i[0]+n.length,i[1]),post:r.slice(i[1]+o.length)}},Ijr=(e,t)=>{let r=t.match(e);return r?r[0]:null},AGo=(e,t,r)=>{let n,o,i,a,s,l=r.indexOf(e),u=r.indexOf(t,l+1),d=l;if(l>=0&&u>0){if(e===t)return[l,u];for(n=[],i=r.length;d>=0&&!s;){if(d===l)n.push(d),l=r.indexOf(e,d+1);else if(n.length===1){let f=n.pop();f!==void 0&&(s=[f,u])}else o=n.pop(),o!==void 0&&o<i&&(i=o,a=u),u=r.indexOf(t,d+1);d=l<u&&l>=0?l:u}n.length&&a!==void 0&&(s=[i,a])}return s};var Djr="\0SLASH"+Math.random()+"\0",Mjr="\0OPEN"+Math.random()+"\0",Gmt="\0CLOSE"+Math.random()+"\0",Njr="\0COMMA"+Math.random()+"\0",Ojr="\0PERIOD"+Math.random()+"\0",LGo=new RegExp(Djr,"g"),IGo=new RegExp(Mjr,"g"),DGo=new RegExp(Gmt,"g"),MGo=new RegExp(Njr,"g"),NGo=new RegExp(Ojr,"g"),OGo=/\\\\/g,BGo=/\\{/g,$Go=/\\}/g,FGo=/\\,/g,zGo=/\\\./g,HGo=1e5,UGo=4e6,WGo=1e3,VGo=1e3;function Umt(e){return isNaN(e)?e.charCodeAt(0):parseInt(e,10)}function GGo(e){return e.replace(OGo,Djr).replace(BGo,Mjr).replace($Go,Gmt).replace(FGo,Njr).replace(zGo,Ojr)}function qGo(e){return e.replace(LGo,"\\").replace(IGo,"{").replace(DGo,"}").replace(MGo,",").replace(NGo,".")}function Wmt(e,t){for(let r=0;r<t.length;r++)e.push(t[r])}function jGo(e){let t=[],r="";for(;;){let n=Hmt("{","}",e);if(!n){let l=e.split(",");return l[0]=r+l[0],Wmt(t,l),t}let{pre:o,body:i,post:a}=n,s=o.split(",");if(s[0]=r+s[0],s[s.length-1]+="{"+i+"}",!a.length)return Wmt(t,s),t;r=s.pop(),Wmt(t,s),e=a}}function Bjr(e,t={}){if(!e)return[];let{max:r=HGo,maxLength:n=UGo,maxDepth:o=WGo,maxRewrites:i=VGo}=t;return e.slice(0,2)==="{}"&&(e="\\{\\}"+e.slice(2)),Vmt(GGo(e),r,n,o,0,i,!0).map(qGo)}function YGo(e){return"{"+e+"}"}function KGo(e){return/^-?0\d/.test(e)}function XGo(e,t){return e<=t}function ZGo(e,t){return e>=t}function Use(e,t,r,n,o,i){let a=[],s=0;for(let l=0;l<e.length;l++)for(let u=0;u<r.length;u++){if(a.length>=n)return a;let d=e[l]+t+r[u];if(!(i&&!d)){if(s+d.length>o)return a;a.push(d),s+=d.length}}return a}function QGo(e,t,r,n){let o=e.split(/\.\./),i=[];if(o[0]===void 0||o[1]===void 0)return i;let a=Umt(o[0]),s=Umt(o[1]),l=Math.max(o[0].length,o[1].length),u=o.length===3&&o[2]!==void 0?Math.max(Math.abs(Umt(o[2])),1):1,d=XGo;s<a&&(u*=-1,d=ZGo);let p=o.some(KGo),h=0;for(let m=a;d(m,s)&&i.length<r;m+=u){let g;if(t)g=String.fromCharCode(m),g==="\\"&&(g="");else if(g=String(m),p){let y=l-g.length;if(y>0){let v=new Array(y+1).join("0");m<0?g="-"+v+g.slice(1):g=v+g}}if(h+g.length>n)break;i.push(g),h+=g.length}return i}function Vmt(e,t,r,n,o,i,a){if(o>n)return[e];let s=[""],l=0,u=!1,d=!0;for(;;){let f=Hmt("{","}",e);if(!f)return Use(s,e,[""],t,r,u);let p=f.pre;if(/\$$/.test(p)){if(s=Use(s,p+"{"+f.body+"}",[""],t,r,u&&!f.post.length),d=!1,!f.post.length)break;e=f.post;continue}let h=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(f.body),m=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(f.body),g=h||m,y=f.body.indexOf(",")>=0;if(!g&&!y){if(l<i&&f.post.match(/,(?!,).*\}/)){l++,e=f.pre+"{"+f.body+Gmt+f.post,a=!0;continue}return Use(s,p+"{"+f.body+"}"+f.post,[""],t,r,u)}d&&(u=a&&!g,d=!1);let v;if(g)v=QGo(f.body,m,t,r);else{let b=jGo(f.body);if(b.length===1&&b[0]!==void 0&&(b=Vmt(b[0],t,r,n,o+1,i,!1).map(YGo),b.length===1)){if(s=Use(s,p+b[0],[""],t,r,u&&!f.post.length),!f.post.length)break;e=f.post;continue}let x=u&&!f.post.length&&!p;for(let C=0;x&&C<s.length;C++)s[C]&&(x=!1);v=[];let w=0;e:for(let C=0;C<b.length;C++){let k=Vmt(b[C],t,r,n,o+1,i,!1);for(let E=0;E<k.length;E++){let R=k[E];if(!(x&&!R)){if(v.length>=t||w+R.length>r)break e;v.push(R),w+=R.length}}}}if(s=Use(s,p,v,t,r,u&&!f.post.length),!f.post.length)break;e=f.post}return s}var Wse=e=>{if(typeof e!="string")throw new TypeError("invalid pattern");if(e.length>65536)throw new TypeError("pattern is too long")};var JGo={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},Vse=e=>e.replace(/[[\]\\-]/g,"\\$&"),eqo=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),$jr=e=>e.join(""),Fjr=(e,t)=>{let r=t;if(e.charAt(r)!=="[")throw new Error("not in a brace expression");let n=[],o=[],i=r+1,a=!1,s=!1,l=!1,u=!1,d=r,f="";e:for(;i<e.length;){let g=e.charAt(i);if((g==="!"||g==="^")&&i===r+1){u=!0,i++;continue}if(g==="]"&&a&&!l){d=i+1;break}if(a=!0,g==="\\"&&!l){l=!0,i++;continue}if(g==="["&&!l){for(let[y,[v,b,x]]of Object.entries(JGo))if(e.startsWith(y,i)){if(f)return["$.",!1,e.length-r,!0];i+=y.length,x?o.push(v):n.push(v),s=s||b;continue e}}if(l=!1,f){g>f?n.push(Vse(f)+"-"+Vse(g)):g===f&&n.push(Vse(g)),f="",i++;continue}if(e.startsWith("-]",i+1)){n.push(Vse(g+"-")),i+=2;continue}if(e.startsWith("-",i+1)){f=g,i+=2;continue}n.push(Vse(g)),i++}if(d<i)return["",!1,0,!1];if(!n.length&&!o.length)return["$.",!1,e.length-r,!0];if(o.length===0&&n.length===1&&/^\\?.$/.test(n[0])&&!u){let g=n[0].length===2?n[0].slice(-1):n[0];return[eqo(g),!1,d-r,!1]}let p="["+(u?"^":"")+$jr(n)+"]",h="["+(u?"":"^")+$jr(o)+"]";return[n.length&&o.length?"("+p+"|"+h+")":n.length?p:h,s,d-r,!0]};var k3=(e,{windowsPathsNoEscape:t=!1,magicalBraces:r=!0}={})=>r?t?e.replace(/\[([^/\\])\]/g,"$1"):e.replace(/((?!\\).|^)\[([^/\\])\]/g,"$1$2").replace(/\\([^/])/g,"$1"):t?e.replace(/\[([^/\\{}])\]/g,"$1"):e.replace(/((?!\\).|^)\[([^/\\{}])\]/g,"$1$2").replace(/\\([^/{}])/g,"$1");var Fh,tqo=new Set(["!","?","+","*","@"]),qmt=e=>tqo.has(e),zjr=e=>qmt(e.type),rqo=new Map([["!",["@"]],["?",["?","@"]],["@",["@"]],["*",["*","+","?","@"]],["+",["+","@"]]]),nqo=new Map([["!",["?"]],["@",["?"]],["+",["?","*"]]]),oqo=new Map([["!",["?","@"]],["?",["?","@"]],["@",["?","@"]],["*",["*","+","?","@"]],["+",["+","@","?","*"]]]),Hjr=new Map([["!",new Map([["!","@"]])],["?",new Map([["*","*"],["+","*"]])],["@",new Map([["!","!"],["?","?"],["@","@"],["*","*"],["+","+"]])],["+",new Map([["?","*"],["*","*"]])]]),iqo="(?!(?:^|/)\\.\\.?(?:$|/))",hPe="(?!\\.)",aqo=new Set(["[","."]),sqo=new Set(["..","."]),lqo=new Set("().*{}+?[]^$\\!"),cqo=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Xmt="[^/]",Ujr=Xmt+"*?",Wjr=Xmt+"+?",uqo=0,cc,Mu,ik,Qn,Cs,_3,oN,E3,PS,AS,Hj,Oi,Vjr,P3,mPe,Gjr,jmt,gPe,qjr,Ymt,jjr,Yjr,Kjr,yPe,Kmt,Xjr,R3=class{constructor(t,r,n={}){Dd(this,Oi);yr(this,"type");Dd(this,cc);Dd(this,Mu);Dd(this,ik,!1);Dd(this,Qn,[]);Dd(this,Cs);Dd(this,_3);Dd(this,oN);Dd(this,E3,!1);Dd(this,PS);Dd(this,AS);Dd(this,Hj,!1);yr(this,"id",++uqo);this.type=t,t&&ia(this,Mu,!0),ia(this,Cs,r),ia(this,cc,rr(this,Cs)?rr(rr(this,Cs),cc):this),ia(this,PS,rr(this,cc)===this?n:rr(rr(this,cc),PS)),ia(this,oN,rr(this,cc)===this?[]:rr(rr(this,cc),oN)),t==="!"&&!rr(rr(this,cc),E3)&&rr(this,oN).push(this),ia(this,_3,rr(this,Cs)?rr(rr(this,Cs),Qn).length:0)}get depth(){return(rr(this,Cs)?.depth??-1)+1}[Symbol.for("nodejs.util.inspect.custom")](){return{"@@type":"AST",id:this.id,type:this.type,root:rr(this,cc).id,parent:rr(this,Cs)?.id,depth:this.depth,partsLength:rr(this,Qn).length,parts:rr(this,Qn)}}get hasMagic(){if(rr(this,Mu)!==void 0)return rr(this,Mu);for(let t of rr(this,Qn))if(typeof t!="string"&&(t.type||t.hasMagic))return ia(this,Mu,!0);return rr(this,Mu)}toString(){return rr(this,AS)!==void 0?rr(this,AS):this.type?ia(this,AS,this.type+"("+rr(this,Qn).map(t=>String(t)).join("|")+")"):ia(this,AS,rr(this,Qn).map(t=>String(t)).join(""))}push(...t){for(let r of t)if(r!==""){if(typeof r!="string"&&!(r instanceof Fh&&rr(r,Cs)===this))throw new Error("invalid part: "+r);rr(this,Qn).push(r)}}toJSON(){let t=this.type===null?rr(this,Qn).slice().map(r=>typeof r=="string"?r:r.toJSON()):[this.type,...rr(this,Qn).map(r=>r.toJSON())];return this.isStart()&&!this.type&&t.unshift([]),this.isEnd()&&(this===rr(this,cc)||rr(rr(this,cc),E3)&&rr(this,Cs)?.type==="!")&&t.push({}),t}isStart(){if(rr(this,cc)===this)return!0;if(!rr(this,Cs)?.isStart())return!1;if(rr(this,_3)===0)return!0;let t=rr(this,Cs);for(let r=0;r<rr(this,_3);r++){let n=rr(t,Qn)[r];if(!(n instanceof Fh&&n.type==="!"))return!1}return!0}isEnd(){if(rr(this,cc)===this||rr(this,Cs)?.type==="!")return!0;if(!rr(this,Cs)?.isEnd())return!1;if(!this.type)return rr(this,Cs)?.isEnd();let t=rr(this,Cs)?rr(rr(this,Cs),Qn).length:0;return rr(this,_3)===t-1}copyIn(t){typeof t=="string"?this.push(t):this.push(t.clone(this))}clone(t){let r=new Fh(this.type,t);for(let n of rr(this,Qn))r.copyIn(n);return r}static fromGlob(t,r={}){var o;let n=new Fh(null,void 0,r);return ui(o=Fh,P3,mPe).call(o,t,n,0,r,0),n}toMMPattern(){if(this!==rr(this,cc))return rr(this,cc).toMMPattern();let t=this.toString(),[r,n,o,i]=this.toRegExpSource();if(!(o||rr(this,Mu)||rr(this,PS).nocase&&!rr(this,PS).nocaseMagicOnly&&t.toUpperCase()!==t.toLowerCase()))return n;let s=(rr(this,PS).nocase?"i":"")+(i?"u":"");return Object.assign(new RegExp(`^${r}$`,s),{_src:r,_glob:t})}get options(){return rr(this,PS)}toRegExpSource(t){let r=t??!!rr(this,PS).dot;if(rr(this,cc)===this&&(ui(this,Oi,yPe).call(this),ui(this,Oi,Vjr).call(this)),!zjr(this)){let l=this.isStart()&&this.isEnd()&&!rr(this,Qn).some(h=>typeof h!="string"),u=rr(this,Qn).map(h=>{var b;let[m,g,y,v]=typeof h=="string"?ui(b=Fh,P3,Xjr).call(b,h,rr(this,Mu),l):h.toRegExpSource(t);return ia(this,Mu,rr(this,Mu)||y),ia(this,ik,rr(this,ik)||v),m}).join(""),d="";if(this.isStart()&&typeof rr(this,Qn)[0]=="string"&&!(rr(this,Qn).length===1&&sqo.has(rr(this,Qn)[0]))){let m=aqo,g=r&&m.has(u.charAt(0))||u.startsWith("\\.")&&m.has(u.charAt(2))||u.startsWith("\\.\\.")&&m.has(u.charAt(4)),y=!r&&!t&&m.has(u.charAt(0));d=g?iqo:y?hPe:""}let f="";return this.isEnd()&&rr(rr(this,cc),E3)&&rr(this,Cs)?.type==="!"&&(f="(?:$|\\/)"),[d+u+f,k3(u),ia(this,Mu,!!rr(this,Mu)),rr(this,ik)]}let n=this.type==="*"||this.type==="+",o=this.type==="!"?"(?:(?!(?:":"(?:",i=ui(this,Oi,Kmt).call(this,r);if(this.isStart()&&this.isEnd()&&!i&&this.type!=="!"){let l=this.toString(),u=this;return ia(u,Qn,[l]),u.type=null,ia(u,Mu,void 0),[l,k3(this.toString()),!1,!1]}let a=!n||t||r||!hPe?"":ui(this,Oi,Kmt).call(this,!0);a===i&&(a=""),a&&(i=`(?:${i})(?:${a})*?`);let s="";if(this.type==="!"&&rr(this,Hj))s=(this.isStart()&&!r?hPe:"")+Wjr;else{let l=this.type==="!"?"))"+(this.isStart()&&!r&&!t?hPe:"")+Ujr+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&a?")":this.type==="*"&&a?")?":`)${this.type}`;s=o+i+l}return[s,k3(i),ia(this,Mu,!!rr(this,Mu)),rr(this,ik)]}};cc=new WeakMap,Mu=new WeakMap,ik=new WeakMap,Qn=new WeakMap,Cs=new WeakMap,_3=new WeakMap,oN=new WeakMap,E3=new WeakMap,PS=new WeakMap,AS=new WeakMap,Hj=new WeakMap,Oi=new WeakSet,Vjr=function(){if(this!==rr(this,cc))throw new Error("should only call on root");if(rr(this,E3))return this;this.toString(),ia(this,E3,!0);let t;for(;t=rr(this,oN).pop();){if(t.type!=="!")continue;let r=t,n=rr(r,Cs);for(;n;){for(let o=rr(r,_3)+1;!n.type&&o<rr(n,Qn).length;o++)for(let i of rr(t,Qn)){if(typeof i=="string")throw new Error("string part in extglob AST??");i.copyIn(rr(n,Qn)[o])}r=n,n=rr(r,Cs)}}return this},P3=new WeakSet,mPe=function(t,r,n,o,i){var g,y,v,b;let a=o.maxExtglobRecursion??2,s=!1,l=!1,u=-1,d=!1;if(r.type===null){let x=n,w="";for(;x<t.length;){let C=t.charAt(x++);if(s||C==="\\"){s=!s,w+=C;continue}if(l){x===u+1?(C==="^"||C==="!")&&(d=!0):C==="]"&&!(x===u+2&&d)&&(l=!1),w+=C;continue}else if(C==="["){l=!0,u=x,d=!1,w+=C;continue}if(!o.noext&&qmt(C)&&t.charAt(x)==="("&&i<=a){r.push(w),w="";let E=new Fh(C,r);x=ui(g=Fh,P3,mPe).call(g,t,E,x,o,i+1),r.push(E);continue}w+=C}return r.push(w),x}let f=n+1,p=new Fh(null,r),h=[],m="";for(;f<t.length;){let x=t.charAt(f++);if(s||x==="\\"){s=!s,m+=x;continue}if(l){f===u+1?(x==="^"||x==="!")&&(d=!0):x==="]"&&!(f===u+2&&d)&&(l=!1),m+=x;continue}else if(x==="["){l=!0,u=f,d=!1,m+=x;continue}if(!o.noext&&qmt(x)&&t.charAt(f)==="("&&(i<=a||r&&ui(y=r,Oi,gPe).call(y,x))){let C=r&&ui(v=r,Oi,gPe).call(v,x)?0:1;p.push(m),m="";let k=new Fh(x,p);p.push(k),f=ui(b=Fh,P3,mPe).call(b,t,k,f,o,i+C);continue}if(x==="|"){p.push(m),m="",h.push(p),p=new Fh(null,r);continue}if(x===")")return m===""&&rr(r,Qn).length===0&&ia(r,Hj,!0),p.push(m),m="",r.push(...h,p),f;m+=x}return r.type=null,ia(r,Mu,void 0),ia(r,Qn,[t.substring(n-1)]),f},Gjr=function(t){return ui(this,Oi,jmt).call(this,t,nqo)},jmt=function(t,r=rqo){if(!t||typeof t!="object"||t.type!==null||rr(t,Qn).length!==1||this.type===null)return!1;let n=rr(t,Qn)[0];return!n||typeof n!="object"||n.type===null?!1:ui(this,Oi,gPe).call(this,n.type,r)},gPe=function(t,r=oqo){return!!r.get(this.type)?.includes(t)},qjr=function(t,r){let n=rr(t,Qn)[0],o=new Fh(null,n,this.options);rr(o,Qn).push(""),n.push(o),ui(this,Oi,Ymt).call(this,t,r)},Ymt=function(t,r){let n=rr(t,Qn)[0];rr(this,Qn).splice(r,1,...rr(n,Qn));for(let o of rr(n,Qn))typeof o=="object"&&ia(o,Cs,this);ia(this,AS,void 0)},jjr=function(t){return!!Hjr.get(this.type)?.has(t)},Yjr=function(t){if(!t||typeof t!="object"||t.type!==null||rr(t,Qn).length!==1||this.type===null||rr(this,Qn).length!==1)return!1;let r=rr(t,Qn)[0];return!r||typeof r!="object"||r.type===null?!1:ui(this,Oi,jjr).call(this,r.type)},Kjr=function(t){let r=Hjr.get(this.type),n=rr(t,Qn)[0],o=r?.get(n.type);if(!o)return!1;ia(this,Qn,rr(n,Qn));for(let i of rr(this,Qn))typeof i=="object"&&ia(i,Cs,this);this.type=o,ia(this,AS,void 0),ia(this,Hj,!1)},yPe=function(){var t,r;if(zjr(this)){let n=0,o=!1;do{o=!0;for(let i=0;i<rr(this,Qn).length;i++){let a=rr(this,Qn)[i];typeof a=="object"&&(ui(r=a,Oi,yPe).call(r),ui(this,Oi,jmt).call(this,a)?(o=!1,ui(this,Oi,Ymt).call(this,a,i)):ui(this,Oi,Gjr).call(this,a)?(o=!1,ui(this,Oi,qjr).call(this,a,i)):ui(this,Oi,Yjr).call(this,a)&&(o=!1,ui(this,Oi,Kjr).call(this,a)))}}while(!o&&++n<10)}else for(let n of rr(this,Qn))typeof n=="object"&&ui(t=n,Oi,yPe).call(t);ia(this,AS,void 0)},Kmt=function(t){return rr(this,Qn).map(r=>{if(typeof r=="string")throw new Error("string type in extglob ast??");let[n,o,i,a]=r.toRegExpSource(t);return ia(this,ik,rr(this,ik)||a),n}).filter(r=>!(this.isStart()&&this.isEnd())||!!r).join("|")},Xjr=function(t,r,n=!1){let o=!1,i="",a=!1,s=!1;for(let l=0;l<t.length;l++){let u=t.charAt(l);if(o){o=!1,i+=(lqo.has(u)?"\\":"")+u;continue}if(u==="*"){if(s)continue;s=!0,i+=n&&/^[*]+$/.test(t)?Wjr:Ujr,r=!0;continue}else s=!1;if(u==="\\"){l===t.length-1?i+="\\\\":o=!0;continue}if(u==="["){let[d,f,p,h]=Fjr(t,l);if(p){i+=d,a=a||f,l+=p-1,r=r||h;continue}}if(u==="?"){i+=Xmt,r=!0;continue}i+=cqo(u)}return[i,k3(t),!!r,a]},Dd(R3,P3);Fh=R3;var Zmt=(e,{windowsPathsNoEscape:t=!1,magicalBraces:r=!1}={})=>r?t?e.replace(/[?*()[\]{}]/g,"[$&]"):e.replace(/[?*()[\]\\{}]/g,"\\$&"):t?e.replace(/[?*()[\]]/g,"[$&]"):e.replace(/[?*()[\]\\]/g,"\\$&");var Gc=(e,t,r={})=>(Wse(t),!r.nocomment&&t.charAt(0)==="#"?!1:new Wj(t,r).match(e)),dqo=/^\*+([^+@!?*[(]*)$/,fqo=e=>t=>!t.startsWith(".")&&t.endsWith(e),pqo=e=>t=>t.endsWith(e),hqo=e=>(e=e.toLowerCase(),t=>!t.startsWith(".")&&t.toLowerCase().endsWith(e)),mqo=e=>(e=e.toLowerCase(),t=>t.toLowerCase().endsWith(e)),gqo=/^\*+\.\*+$/,yqo=e=>!e.startsWith(".")&&e.includes("."),vqo=e=>e!=="."&&e!==".."&&e.includes("."),bqo=/^\.\*+$/,xqo=e=>e!=="."&&e!==".."&&e.startsWith("."),Sqo=/^\*+$/,Tqo=e=>e.length!==0&&!e.startsWith("."),wqo=e=>e.length!==0&&e!=="."&&e!=="..",Cqo=/^\?+([^+@!?*[(]*)?$/,kqo=([e,t=""])=>{let r=Jjr([e]);return t?(t=t.toLowerCase(),n=>r(n)&&n.toLowerCase().endsWith(t)):r},_qo=([e,t=""])=>{let r=eYr([e]);return t?(t=t.toLowerCase(),n=>r(n)&&n.toLowerCase().endsWith(t)):r},Eqo=([e,t=""])=>{let r=eYr([e]);return t?n=>r(n)&&n.endsWith(t):r},Rqo=([e,t=""])=>{let r=Jjr([e]);return t?n=>r(n)&&n.endsWith(t):r},Jjr=([e])=>{let t=e.length;return r=>r.length===t&&!r.startsWith(".")},eYr=([e])=>{let t=e.length;return r=>r.length===t&&r!=="."&&r!==".."},tYr=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",Zjr={win32:{sep:"\\"},posix:{sep:"/"}},Pqo=tYr==="win32"?Zjr.win32.sep:Zjr.posix.sep;Gc.sep=Pqo;var vf=Symbol("globstar **");Gc.GLOBSTAR=vf;var Aqo="[^/]",Lqo=Aqo+"*?",Iqo="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",Dqo="(?:(?!(?:\\/|^)\\.).)*?",Mqo=(e,t={})=>r=>Gc(r,e,t);Gc.filter=Mqo;var d0=(e,t={})=>Object.assign({},e,t),Nqo=e=>{if(!e||typeof e!="object"||!Object.keys(e).length)return Gc;let t=Gc;return Object.assign((n,o,i={})=>t(n,o,d0(e,i)),{Minimatch:class extends t.Minimatch{constructor(o,i={}){super(o,d0(e,i))}static defaults(o){return t.defaults(d0(e,o)).Minimatch}},AST:class extends t.AST{constructor(o,i,a={}){super(o,i,d0(e,a))}static fromGlob(o,i={}){return t.AST.fromGlob(o,d0(e,i))}},unescape:(n,o={})=>t.unescape(n,d0(e,o)),escape:(n,o={})=>t.escape(n,d0(e,o)),filter:(n,o={})=>t.filter(n,d0(e,o)),defaults:n=>t.defaults(d0(e,n)),makeRe:(n,o={})=>t.makeRe(n,d0(e,o)),braceExpand:(n,o={})=>t.braceExpand(n,d0(e,o)),match:(n,o,i={})=>t.match(n,o,d0(e,i)),sep:t.sep,GLOBSTAR:vf})};Gc.defaults=Nqo;var rYr=(e,t={})=>(Wse(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:Bjr(e,{max:t.braceExpandMax}));Gc.braceExpand=rYr;var Oqo=(e,t={})=>new Wj(e,t).makeRe();Gc.makeRe=Oqo;var Bqo=(e,t,r={})=>{let n=new Wj(t,r);return e=e.filter(o=>n.match(o)),n.options.nonull&&!e.length&&e.push(t),e};Gc.match=Bqo;var Qjr=/[?*]|[+@!]\(.*?\)|\[|\]/,$qo=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),sg,nYr,Qmt,Uj,Wj=class{constructor(t,r={}){Dd(this,sg);yr(this,"options");yr(this,"set");yr(this,"pattern");yr(this,"windowsPathsNoEscape");yr(this,"nonegate");yr(this,"negate");yr(this,"comment");yr(this,"empty");yr(this,"preserveMultipleSlashes");yr(this,"partial");yr(this,"globSet");yr(this,"globParts");yr(this,"nocase");yr(this,"isWindows");yr(this,"platform");yr(this,"windowsNoMagicRoot");yr(this,"maxGlobstarRecursion");yr(this,"regexp");Wse(t),r=r||{},this.options=r,this.maxGlobstarRecursion=r.maxGlobstarRecursion??200,this.pattern=t,this.platform=r.platform||tYr,this.isWindows=this.platform==="win32";let n="allowWindowsEscape";this.windowsPathsNoEscape=!!r.windowsPathsNoEscape||r[n]===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!r.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!r.nonegate,this.comment=!1,this.empty=!1,this.partial=!!r.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=r.windowsNoMagicRoot!==void 0?r.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let t of this.set)for(let r of t)if(typeof r!="string")return!0;return!1}debug(...t){}make(){let t=this.pattern,r=this.options;if(!r.nocomment&&t.charAt(0)==="#"){this.comment=!0;return}if(!t){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],r.debug&&(this.debug=(...i)=>console.error(...i)),this.debug(this.pattern,this.globSet);let n=this.globSet.map(i=>this.slashSplit(i));this.globParts=this.preprocess(n),this.debug(this.pattern,this.globParts);let o=this.globParts.map((i,a,s)=>{if(this.isWindows&&this.windowsNoMagicRoot){let l=i[0]===""&&i[1]===""&&(i[2]==="?"||!Qjr.test(i[2]))&&!Qjr.test(i[3]),u=/^[a-z]:/i.test(i[0]);if(l)return[...i.slice(0,4),...i.slice(4).map(d=>this.parse(d))];if(u)return[i[0],...i.slice(1).map(d=>this.parse(d))]}return i.map(l=>this.parse(l))});if(this.debug(this.pattern,o),this.set=o.filter(i=>i.indexOf(!1)===-1),this.isWindows)for(let i=0;i<this.set.length;i++){let a=this.set[i];a[0]===""&&a[1]===""&&this.globParts[i][2]==="?"&&typeof a[3]=="string"&&/^[a-z]:$/i.test(a[3])&&(a[2]="?")}this.debug(this.pattern,this.set)}preprocess(t){if(this.options.noglobstar)for(let n of t)for(let o=0;o<n.length;o++)n[o]==="**"&&(n[o]="*");let{optimizationLevel:r=1}=this.options;return r>=2?(t=this.firstPhasePreProcess(t),t=this.secondPhasePreProcess(t)):r>=1?t=this.levelOneOptimize(t):t=this.adjascentGlobstarOptimize(t),t}adjascentGlobstarOptimize(t){return t.map(r=>{let n=-1;for(;(n=r.indexOf("**",n+1))!==-1;){let o=n;for(;r[o+1]==="**";)o++;o!==n&&r.splice(n,o-n)}return r})}levelOneOptimize(t){return t.map(r=>(r=r.reduce((n,o)=>{let i=n[n.length-1];return o==="**"&&i==="**"?n:o===".."&&i&&i!==".."&&i!=="."&&i!=="**"?(n.pop(),n):(n.push(o),n)},[]),r.length===0?[""]:r))}levelTwoFileOptimize(t){Array.isArray(t)||(t=this.slashSplit(t));let r=!1;do{if(r=!1,!this.preserveMultipleSlashes){for(let o=1;o<t.length-1;o++){let i=t[o];o===1&&i===""&&t[0]===""||(i==="."||i==="")&&(r=!0,t.splice(o,1),o--)}t[0]==="."&&t.length===2&&(t[1]==="."||t[1]==="")&&(r=!0,t.pop())}let n=0;for(;(n=t.indexOf("..",n+1))!==-1;){let o=t[n-1];o&&o!=="."&&o!==".."&&o!=="**"&&!(this.isWindows&&/^[a-z]:$/i.test(o))&&(r=!0,t.splice(n-1,2),n-=2)}}while(r);return t.length===0?[""]:t}firstPhasePreProcess(t){let r=!1;do{r=!1;for(let n of t){let o=-1;for(;(o=n.indexOf("**",o+1))!==-1;){let a=o;for(;n[a+1]==="**";)a++;a>o&&n.splice(o+1,a-o);let s=n[o+1],l=n[o+2],u=n[o+3];if(s!==".."||!l||l==="."||l===".."||!u||u==="."||u==="..")continue;r=!0,n.splice(o,1);let d=n.slice(0);d[o]="**",t.push(d),o--}if(!this.preserveMultipleSlashes){for(let a=1;a<n.length-1;a++){let s=n[a];a===1&&s===""&&n[0]===""||(s==="."||s==="")&&(r=!0,n.splice(a,1),a--)}n[0]==="."&&n.length===2&&(n[1]==="."||n[1]==="")&&(r=!0,n.pop())}let i=0;for(;(i=n.indexOf("..",i+1))!==-1;){let a=n[i-1];if(a&&a!=="."&&a!==".."&&a!=="**"){r=!0;let l=i===1&&n[i+1]==="**"?["."]:[];n.splice(i-1,2,...l),n.length===0&&n.push(""),i-=2}}}}while(r);return t}secondPhasePreProcess(t){for(let r=0;r<t.length-1;r++)for(let n=r+1;n<t.length;n++){let o=this.partsMatch(t[r],t[n],!this.preserveMultipleSlashes);if(o){t[r]=[],t[n]=o;break}}return t.filter(r=>r.length)}partsMatch(t,r,n=!1){let o=0,i=0,a=[],s="";for(;o<t.length&&i<r.length;)if(t[o]===r[i])a.push(s==="b"?r[i]:t[o]),o++,i++;else if(n&&t[o]==="**"&&r[i]===t[o+1])a.push(t[o]),o++;else if(n&&r[i]==="**"&&t[o]===r[i+1])a.push(r[i]),i++;else if(t[o]==="*"&&r[i]&&(this.options.dot||!r[i].startsWith("."))&&r[i]!=="**"){if(s==="b")return!1;s="a",a.push(t[o]),o++,i++}else if(r[i]==="*"&&t[o]&&(this.options.dot||!t[o].startsWith("."))&&t[o]!=="**"){if(s==="a")return!1;s="b",a.push(r[i]),o++,i++}else return!1;return t.length===r.length&&a}parseNegate(){if(this.nonegate)return;let t=this.pattern,r=!1,n=0;for(let o=0;o<t.length&&t.charAt(o)==="!";o++)r=!r,n++;n&&(this.pattern=t.slice(n)),this.negate=r}matchOne(t,r,n=!1){let o=0,i=0;if(this.isWindows){let s=typeof t[0]=="string"&&/^[a-z]:$/i.test(t[0]),l=!s&&t[0]===""&&t[1]===""&&t[2]==="?"&&/^[a-z]:$/i.test(t[3]),u=typeof r[0]=="string"&&/^[a-z]:$/i.test(r[0]),d=!u&&r[0]===""&&r[1]===""&&r[2]==="?"&&typeof r[3]=="string"&&/^[a-z]:$/i.test(r[3]),f=l?3:s?0:void 0,p=d?3:u?0:void 0;if(typeof f=="number"&&typeof p=="number"){let[h,m]=[t[f],r[p]];h.toLowerCase()===m.toLowerCase()&&(r[p]=h,i=p,o=f)}}let{optimizationLevel:a=1}=this.options;return a>=2&&(t=this.levelTwoFileOptimize(t)),r.includes(vf)?ui(this,sg,nYr).call(this,t,r,n,o,i):ui(this,sg,Uj).call(this,t,r,n,o,i)}braceExpand(){return rYr(this.pattern,this.options)}parse(t){Wse(t);let r=this.options;if(t==="**")return vf;if(t==="")return"";let n,o=null;(n=t.match(Sqo))?o=r.dot?wqo:Tqo:(n=t.match(dqo))?o=(r.nocase?r.dot?mqo:hqo:r.dot?pqo:fqo)(n[1]):(n=t.match(Cqo))?o=(r.nocase?r.dot?_qo:kqo:r.dot?Eqo:Rqo)(n):(n=t.match(gqo))?o=r.dot?vqo:yqo:(n=t.match(bqo))&&(o=xqo);let i=R3.fromGlob(t,this.options).toMMPattern();return o&&typeof i=="object"&&Reflect.defineProperty(i,"test",{value:o}),i}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let t=this.set;if(!t.length)return this.regexp=!1,this.regexp;let r=this.options,n=r.noglobstar?Lqo:r.dot?Iqo:Dqo,o=new Set(r.nocase?["i"]:[]),i=t.map(l=>{let u=l.map(f=>{if(f instanceof RegExp)for(let p of f.flags.split(""))o.add(p);return typeof f=="string"?$qo(f):f===vf?vf:f._src});u.forEach((f,p)=>{let h=u[p+1],m=u[p-1];f!==vf||m===vf||(m===void 0?h!==void 0&&h!==vf?u[p+1]="(?:\\/|"+n+"\\/)?"+h:u[p]=n:h===void 0?u[p-1]=m+"(?:\\/|\\/"+n+")?":h!==vf&&(u[p-1]=m+"(?:\\/|\\/"+n+"\\/)"+h,u[p+1]=vf))});let d=u.filter(f=>f!==vf);if(this.partial&&d.length>=1){let f=[];for(let p=1;p<=d.length;p++)f.push(d.slice(0,p).join("/"));return"(?:"+f.join("|")+")"}return d.join("/")}).join("|"),[a,s]=t.length>1?["(?:",")"]:["",""];i="^"+a+i+s+"$",this.partial&&(i="^(?:\\/|"+a+i.slice(1,-1)+s+")$"),this.negate&&(i="^(?!"+i+").+$");try{this.regexp=new RegExp(i,[...o].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(t){return this.preserveMultipleSlashes?t.split("/"):this.isWindows&&/^\/\/[^/]+/.test(t)?["",...t.split(/\/+/)]:t.split(/\/+/)}match(t,r=this.partial){if(this.debug("match",t,this.pattern),this.comment)return!1;if(this.empty)return t==="";if(t==="/"&&r)return!0;let n=this.options;this.isWindows&&(t=t.split("\\").join("/"));let o=this.slashSplit(t);this.debug(this.pattern,"split",o);let i=this.set;this.debug(this.pattern,"set",i);let a=o[o.length-1];if(!a)for(let s=o.length-2;!a&&s>=0;s--)a=o[s];for(let s of i){let l=o;if(n.matchBase&&s.length===1&&(l=[a]),this.matchOne(l,s,r))return n.flipNegate?!0:!this.negate}return n.flipNegate?!1:this.negate}static defaults(t){return Gc.defaults(t).Minimatch}};sg=new WeakSet,nYr=function(t,r,n,o,i){let a=r.indexOf(vf,i),s=r.lastIndexOf(vf),[l,u,d]=n?[r.slice(i,a),r.slice(a+1),[]]:[r.slice(i,a),r.slice(a+1,s),r.slice(s+1)];if(l.length){let b=t.slice(o,o+l.length);if(!ui(this,sg,Uj).call(this,b,l,n,0,0))return!1;o+=l.length,i+=l.length}let f=0;if(d.length){if(d.length+o>t.length)return!1;let b=t.length-d.length;if(ui(this,sg,Uj).call(this,t,d,n,b,0))f=d.length;else{if(t[t.length-1]!==""||o+d.length===t.length||(b--,!ui(this,sg,Uj).call(this,t,d,n,b,0)))return!1;f=d.length+1}}if(!u.length){let b=!!f;for(let x=o;x<t.length-f;x++){let w=String(t[x]);if(b=!0,w==="."||w===".."||!this.options.dot&&w.startsWith("."))return!1}return n||b}let p=[[[],0]],h=p[0],m=0,g=[0];for(let b of u)b===vf?(g.push(m),h=[[],0],p.push(h)):(h[0].push(b),m++);let y=p.length-1,v=t.length-f;for(let b of p)b[1]=v-(g[y--]+b[0].length);return!!ui(this,sg,Qmt).call(this,t,p,o,0,n,0,!!f)},Qmt=function(t,r,n,o,i,a,s){let l=r[o];if(!l){for(let f=n;f<t.length;f++){s=!0;let p=t[f];if(p==="."||p===".."||!this.options.dot&&p.startsWith("."))return!1}return s}let[u,d]=l;for(;n<=d;){if(ui(this,sg,Uj).call(this,t.slice(0,n+u.length),u,i,n,0)&&a<this.maxGlobstarRecursion){let h=ui(this,sg,Qmt).call(this,t,r,n+u.length,o+1,i,a+1,s);if(h!==!1)return h}let p=t[n];if(p==="."||p===".."||!this.options.dot&&p.startsWith("."))return!1;n++}return i||null},Uj=function(t,r,n,o,i){let a,s,l,u;for(a=o,s=i,u=t.length,l=r.length;a<u&&s<l;a++,s++){this.debug("matchOne loop");let d=r[s],f=t[a];if(this.debug(r,d,f),d===!1||d===vf)return!1;let p;if(typeof d=="string"?(p=f===d,this.debug("string match",d,f,p)):(p=d.test(f),this.debug("pattern match",d,f,p)),!p)return!1}if(a===u&&s===l)return!0;if(a===u)return n;if(s===l)return a===u-1&&t[a]==="";throw new Error("wtf?")};Gc.AST=R3;Gc.Minimatch=Wj;Gc.escape=Zmt;Gc.unescape=k3;function oYr(e,t){let r=new Set,n=new Map;for(let o of $h(e)){let i=t.find(a=>Gc(o.path,a));i&&n.set(o.path,i),(i||o.status==="removed")&&r.add(o.path)}return{dirs:iYr(e,n),files:r,fileGlobs:n}}function iYr(e,t){let r=new Set;for(let n of e){if(n.kind==="file")continue;let o=$h(n.children);o.length>0&&o.every(i=>t.has(i.path))&&r.add(n.path);for(let i of iYr(n.children,t))r.add(i)}return r}function sYr(e,t,r,n,o){return{...o,changes:aYr(e.overrides,r)+aYr(t.overrides,n),expandAll:()=>{e.onSet(r,!1),t.onSet(n,!1)},collapseAll:()=>t.onSet(n,!0),show:i=>{let a=[...i];e.onSet(r.filter(s=>a.some(l=>l.startsWith(`${s}/`))),!1),t.onSet(a,!1)},hide:i=>t.onSet(i,!0),reset:()=>{e.onReset(),t.onReset()}}}function aYr(e,t){return t.filter(r=>e.has(r)).length}function lYr(e,t,r){let n=(0,vPe.useMemo)(()=>oYr(t,r),[t,r]),o=(0,vPe.useMemo)(()=>$h(t).map(u=>u.path),[t]),i=(0,vPe.useMemo)(()=>zmt(t),[t]),a=nN(e,n.dirs),s=nN(`files:${e}`,n.files),l=sYr(a,s,i,o,Fmt(t,a.collapsed,s.collapsed));return{dirs:a,files:s,fileGlobs:n.fileGlobs,filePaths:o,bulk:l}}var Gse=S(re(),1);var Fqo=/[*?[{]/;function cYr(e,t){let r=t.trim();if(!r)return new Set;if(!Fqo.test(r)){let n=r.toLowerCase();return new Set(e.filter(o=>o.toLowerCase().includes(n)))}return new Set(e.filter(n=>Gc(n,r,{matchBase:!0})))}function uYr(e,t){let[r,n]=(0,Gse.useState)(""),o=(0,Gse.useMemo)(()=>cYr(e,r),[e,r]),i=(0,Gse.useMemo)(()=>[...new Set(["**/*.md",...t])],[t]);return{glob:r,onChangeGlob:n,matches:o,quickGlobs:i}}var qse=S(re(),1);function dYr(){let[e,t]=(0,qse.useState)(null),[r,n]=(0,qse.useState)(0);return(0,qse.useEffect)(()=>{if(!e||(n(e.offsetHeight),typeof ResizeObserver>"u"))return;let o=new ResizeObserver(()=>n(e.offsetHeight));return o.observe(e),()=>o.disconnect()},[e]),{toolbarRef:t,offsetSx:{[Amt]:`${r}px`}}}function fYr(e,t,r){let{dirs:n,files:o,fileGlobs:i,filePaths:a,bulk:s}=lYr(e,t,r),{viewType:l,onChange:u}=_G(),d=uYr(a,r),{toolbarRef:f,offsetSx:p}=dYr();return{offsetSx:p,toolbar:{ref:f,bulk:s,viewType:l,onChangeViewType:u,...d},tree:{glob:d.glob,nodes:t,collapsed:n.collapsed,onToggleDir:n.onToggle,collapsedFiles:o.collapsed,onToggleFile:o.onToggle,fileGlobs:i,matches:d.matches,viewType:l}}}var iN=S(_(),1);function Vj({structure:e,collapsedPaths:t,subject:r,comments:n,hideSummary:o=!1,toolbarChildren:i}){let{offsetSx:a,toolbar:s,tree:l}=fYr(r,e.tree,t);return e.tree.length===0?(0,iN.jsx)(be,{variant:"caption",sx:{color:"text.secondary"},children:"No changed files."}):(0,iN.jsxs)(H,{sx:{minWidth:0,...a},children:[!o&&(0,iN.jsx)(oPe,{structure:e}),(0,iN.jsx)(Hqr,{...s,children:i}),(0,iN.jsx)(Rjr,{...l,comments:n})]})}function Gj(e){return e.slice(0,e.lastIndexOf("#"))}function bPe(e){let t=new Map;return e.forEach((r,n)=>{let o={number:n+1,title:r.title};for(let i of new Set(r.hunks.map(Gj)))t.set(i,[...t.get(i)??[],o])}),t}function pYr(e,t,r){return e.map(n=>{if(n.kind==="dir")return{...n,children:pYr(n.children,t,r)};let o=t.get(n.path);return{...n,...o?{slices:o}:{},...r.has(n.path)?{critical:!0}:{}}})}function hYr(e,t,r){return{...e,tree:pYr(e.tree,bPe(t),r)}}var yYr=S(_(),1);function gYr({payload:e,subject:t,comments:r}){let n=(0,mYr.useMemo)(()=>hYr(e.structure,e.slices??[],new Set(e.criticalDiffs.map(o=>o.path))),[e]);return(0,yYr.jsx)(Vj,{structure:n,collapsedPaths:e.collapsedPaths,subject:t,comments:r})}var MYr=S(re(),1);var vYr=e=>({"& .section-mark":{ml:1,fontFamily:e.typography.fontFamilyMono,fontSize:e.typography.caption.fontSize,fontWeight:500,color:e.palette.success.main},"& .section-mark.optional":{color:e.palette.text.disabled},"& .section-mark.missing":{color:e.palette.error.main},"& .issue-ref":{fontFamily:e.typography.fontFamilyMono,px:.75,borderRadius:.5,bgcolor:e.tokens.color.wash.accent,outline:`1px solid ${Or(e.palette.primary.main,.35)}`},"& img":{maxWidth:"100%",height:"auto"}});var bYr=S(_(),1),xPe=ot((0,bYr.jsx)("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2m5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12z"}),"Cancel");var xYr=S(_(),1),qj=ot((0,xYr.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m-2 15-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8z"}),"CheckCircle");var Jmt={"description-what-why":"What & Why","description-word-cap":"Word cap","description-links-issue":"Linked issue"};function SPe(e){return e.filter(t=>t.id in Jmt)}var TPe=S(_(),1),zqo={height:"auto",py:.25,"& .MuiChip-label":{whiteSpace:"normal"}};function SYr({checks:e}){return e.length===0?null:(0,TPe.jsx)(H,{role:"list","aria-label":"Description checks",sx:{display:"flex",flexWrap:"wrap",gap:.75},children:e.map(t=>{let r=t.status==="pass";return(0,TPe.jsx)(yn,{role:"listitem",size:"small",variant:"tonal",color:r?"default":"error",icon:(0,TPe.jsx)(r?qj:xPe,{titleAccess:r?"pass":"fail",color:r?"success":"error"}),label:`${Jmt[t.id]}: ${t.reason}`,sx:zqo},t.id)})})}var Hqo=/https?:\/\/github\.com\/[\w.-]+\/[\w.-]+\/issues\/\d+/,Uqo=/\b[\w.-]+\/[\w.-]+#\d+/,Wqo=/(?<![\w/#-])#\d+\b/;function TYr(e){for(let t of[Hqo,Uqo,Wqo]){let r=e.match(t);if(r)return r[0]}return null}function wYr(e,t){let r=t.find(o=>o.id==="description-links-issue");if(r?.status!=="pass")return null;let n=TYr(e);return n&&r.reason===`links ${n}`?n:null}var Vqo=/^https:\/\/github\.com\/user-attachments\/assets\/([0-9a-f-]{36})(?:[?#].*)?$/i;function CYr(e,t){return r=>{let n=Vqo.exec(r)?.[1];if(n){let o=new URLSearchParams({repo:e,pr:String(t),asset:n});return rv(`/api/github-attachment?${o}`)}return/^https:\/\//i.test(r)?r:null}}function kYr(e){let t=[],r=null,n=()=>{r&&t.push({heading:r.heading,content:r.lines.join(`
4134
4134
  `).trim()})};for(let o of e.split(`
4135
4135
  `)){let i=/^##\s+(.+?)\s*$/.exec(o);i?(n(),r={heading:i[1],lines:[]}):r&&r.lines.push(o)}return n(),t}var Gqo=new Set(["what","why"]);function _Yr(e,t){let r=e.trim().toLowerCase();return r==="how"?'<span class="section-mark optional">optional</span>':Gqo.has(r)?t.has(r)?'<span class="section-mark">\u2713 section</span>':'<span class="section-mark missing">\u2715 empty</span>':""}function zh(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}function EYr(e,t){let r=e.indexOf(t);return`${zh(e.slice(0,r))}<span class="issue-ref">${zh(t)}</span>${zh(e.slice(r+t.length))}`}var qqo=/^\d+%?$/;function wPe(e,t){let r=t(e.src.trim());if(!r)return null;let n=[`src="${zh(r)}"`];e.alt!==void 0&&n.push(`alt="${zh(e.alt)}"`);for(let o of["width","height"]){let i=e[o];i&&qqo.test(i)&&n.push(`${o}="${i}"`)}return`<img ${n.join(" ")}>`}var jqo=/<img\b((?:[^>"']|"[^"]*"|'[^']*')*)>/gi,Yqo=/([\w-]+)\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s"'>/]+))/g;function Kqo(e){return e.replace(/&quot;/g,'"').replace(/&#39;/g,"'").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&amp;/g,"&")}function Xqo(e,t){let r={};for(let[,n,o,i,a]of e.matchAll(Yqo))r[n.toLowerCase()]=Kqo(o??i??a??"");return r.src===void 0?null:wPe({src:r.src,alt:r.alt,width:r.width,height:r.height},t)}function RYr(e,t){let r="",n=0;for(let o of e.matchAll(jqo)){let i=Xqo(o[1]??"",t);i&&(r+=zh(e.slice(n,o.index))+i,n=o.index+o[0].length)}return r+zh(e.slice(n))}function PYr(e){return{html(t){return RYr(t.text,e)},image({href:t,text:r}){return wPe({src:t,alt:r},e)??zh(r)}}}function Zqo(e,t){return(e.type==="link"||e.type==="text"&&!e.tokens)&&e.text.includes(t)}function AYr(e,t,r){let n=new Set(kYr(e).filter(a=>a.content.trim()!=="").map(a=>a.heading.trim().toLowerCase())),o=!1;return new ND({walkTokens(a){o||!t||!Zqo(a,t)||(a.issueRef=t,o=!0)},renderer:{...PYr(r),heading({tokens:a,depth:s,text:l}){let u=s===2?_Yr(l,n):"";return u?`<h2>${this.parser.parseInline(a)} ${u}</h2>
4136
4136
  `:!1},text(a){let{issueRef:s}=a;return s?EYr(a.text,s):!1},link(a){let{issueRef:s}=a;return s?`<a class="issue-ref" href="${zh(a.href)}">${this.parser.parseInline(a.tokens)}</a>`:!1}}}).parse(e)}var LYr=S(_(),1),IYr=ot((0,LYr.jsx)("path",{d:"M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3z"}),"OpenInNew");var jse=S(_(),1);function DYr({repo:e,prNumber:t}){return(0,jse.jsx)(H,{sx:{borderTop:1,borderColor:"divider",pt:1},children:(0,jse.jsxs)(Ur,{href:`https://github.com/${e}/pull/${t}`,target:"_blank",rel:"noopener noreferrer",variant:"caption",sx:{display:"inline-flex",alignItems:"center",gap:.5},children:["View on GitHub",(0,jse.jsx)(IYr,{sx:{fontSize:12}})]})})}var aN=S(_(),1);function NYr({body:e,repo:t,prNumber:r,checks:n,showChecks:o}){let i=(0,MYr.useMemo)(()=>AYr(e,wYr(e,n),CYr(t,r)),[e,n,t,r]);return(0,aN.jsxs)(H,{sx:{display:"flex",flexDirection:"column",gap:1.5,minWidth:0},children:[o&&(0,aN.jsx)(SYr,{checks:SPe(n)}),e.trim()?(0,aN.jsx)(Xs,{className:"markdown",sx:[y4e,vYr],html:i}):(0,aN.jsx)(be,{variant:"body2",sx:{color:"text.secondary"},children:"No description"}),(0,aN.jsx)(DYr,{repo:t,prNumber:r})]})}var OYr={position:"sticky",top:40,zIndex:3,display:"flex",alignItems:"center",gap:1,minWidth:0,cursor:"pointer",borderRadius:.5,bgcolor:"background.paper","&:hover":{backgroundImage:({palette:e})=>`linear-gradient(${e.action.hover}, ${e.action.hover})`}};var egt=S(_(),1);function BYr({path:e,collapsed:t,onToggle:r}){let n=t?zo:La;return(0,egt.jsx)(Mt,{size:"small",onClick:o=>{o.stopPropagation(),r()},"aria-expanded":!t,"aria-label":`${t?"Expand":"Collapse"} ${e}`,sx:{p:.25,flexShrink:0},children:(0,egt.jsx)(n,{sx:{fontSize:16}})})}var sN=S(_(),1);function CPe({diff:e,collapsed:t,onToggle:r}){let{ref:n,toggle:o}=pPe(!t,r);return(0,sN.jsxs)(H,{ref:n,onClick:o,sx:OYr,children:[(0,sN.jsx)(BYr,{path:e.path,collapsed:t,onToggle:o}),(0,sN.jsx)(Ur,{href:e.diffUrl,target:"_blank",rel:"noreferrer",onClick:i=>i.stopPropagation(),sx:{...ok,fontWeight:600},title:e.path,children:e.path}),(0,sN.jsx)(be,{variant:"caption",sx:{flexShrink:0,color:Oj[e.status]},children:e.status}),(0,sN.jsx)(c0,{additions:e.additions,deletions:e.deletions})]})}var kPe={mb:1,minWidth:0,scrollMarginTop:`${40}px`};var Yse=S(_(),1);function $Yr({diff:e,collapsed:t,onToggle:r,viewType:n,comments:o}){return(0,Yse.jsxs)(H,{sx:kPe,children:[(0,Yse.jsx)(CPe,{diff:e,collapsed:t,onToggle:r}),!t&&(0,Yse.jsx)(Bj,{path:e.path,status:e.status,patch:e.patch,truncated:e.truncated===!0,viewType:n,comments:o})]})}var jj=S(_(),1);function FYr({bulk:e,viewType:t,onChangeViewType:r}){return(0,jj.jsxs)(H,{sx:Fse,children:[(0,jj.jsx)(iPe,{bulk:e}),(0,jj.jsx)(H,{sx:{ml:"auto"},children:(0,jj.jsx)(V$,{viewType:t,onChange:r})})]})}function zYr(e,t){let{collapsed:r,onToggle:n,onSet:o}=nN(`critical:${e}`),i=t.map(s=>s.path),a=i.filter(s=>r.has(s)).length;return{collapsed:r,onToggle:n,bulk:{open:i.length-a,collapsed:a,expandAll:()=>o(i,!1),collapseAll:()=>o(i,!0)}}}var Kse=S(_(),1);function HYr({diffs:e,subject:t,comments:r}){let{viewType:n,onChange:o}=_G(),{collapsed:i,onToggle:a,bulk:s}=zYr(t,e);return(0,Kse.jsxs)(H,{sx:{minWidth:0},children:[(0,Kse.jsx)(FYr,{bulk:s,viewType:n,onChangeViewType:o}),e.map(l=>(0,Kse.jsx)($Yr,{diff:l,collapsed:i.has(l.path),onToggle:()=>a(l.path),viewType:n,comments:r},l.path))]})}var _Pe=S(_(),1);function EPe({criticalPaths:e,...t}){return e.length===0?(0,_Pe.jsx)(u0,{children:"review.highLevel.criticalPaths is empty, so no diffs are shown here."}):t.diffs.length===0?(0,_Pe.jsx)(u0,{children:`No changed file matches ${e.join(", ")}.`}):(0,_Pe.jsx)(HYr,{...t})}function UYr(e){return e.reduce((t,r)=>t+(r.kind==="it"?1:UYr(r.children)),0)}function A3(e){return UYr(e.flatMap(t=>t.tests))}var jYr=S(re(),1);function WYr(e){return e.flatMap(({source:t,line:r})=>{let n=t.split(`
@@ -4140,7 +4140,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
4140
4140
  `)){let n=t[t.length-1];r.startsWith("@@")||n===void 0?t.push(r):t[t.length-1]=`${n}
4141
4141
  ${r}`}return t}function gXr(e){return mXr(e??"").filter(t=>t.startsWith("@@"))}function xjo(e){return Number(/^@@ -(\d+)/.exec(e)?.[1]??1)}function Sjo(e){return/^@@[^@]*@@/.exec(e)?.[0]??e.split(`
4142
4142
  `)[0]??""}function yXr(e,t){return e.reduce((r,n)=>r+hXr(n,t),0)}function vXr(e,t,r){let n=gXr(e.patch),o=[],i=[];return n.forEach((a,s)=>{let l=r.get(`${e.path}#${s}`)??[];l.includes(t)?o.push(a):i.push({oldStart:xjo(a),header:Sjo(a),slice:l[0]??0})}),o.length===0||i.length===0?e:{...e,patch:o.join(`
4143
- `),additions:yXr(o,"+"),deletions:yXr(o,"-"),split:{hunks:o.length,of:n.length,elsewhere:i}}}function bXr(e){return e.flatMap(t=>{if(t.kind==="dir")return bXr(t.children);let{kind:r,name:n,...o}=t;return[o]})}function Tjo(e){let t=new Map;return e.forEach((r,n)=>{for(let o of r.hunks)t.set(o,[...t.get(o)??[],n+1])}),t}function xXr(e,t,r=new Set,n=new Set){let o=bXr(e.tree).filter(a=>!r.has(a.path)).map(a=>n.has(a.path)?{...a,critical:!0}:a),i=Tjo(t);return t.map((a,s)=>{let l=new Set(a.hunks.map(Gj));return pXr(o.filter(u=>l.has(u.path)).map(u=>vXr(u,s+1,i)))})}function wjo(e,t){let r=-1,n=0;return t.forEach((o,i)=>{let a=o.hunks.filter(s=>Gj(s)===e).length;a>n&&(r=i,n=a)}),r}function SXr(e,t){let r=t.map(()=>[]);for(let n of e)r[wjo(n.path,t)]?.push(n);return r}function TXr(e,t){let r=xXr(e.structure,t,new Set(e.tests.map(i=>i.path)),new Set(e.criticalDiffs.map(i=>i.path))),n=SXr(e.tests,t),o=bPe(t);return t.map((i,a)=>{let s=a+1;return{number:s,slice:i,structure:r[a]??e.structure,tests:n[a]??[],critical:e.criticalDiffs.filter(l=>o.get(l.path)?.some(u=>u.number===s))}})}function wXr(e){if(!e.slices)return;let t=TXr(e,e.slices);return{entries:iXr(e,t),slicing:{count:t.length,noCritical:new Set(t.filter(r=>r.critical.length===0).map(r=>r.number))}}}function CXr(e){if(!(!e.repo||!e.headSha))return`${e.repo}#${e.prNumber}@${e.headSha}`}var pgt="assist:high-level-progress:",Cjo=`${pgt}head:`,kjo=720*60*60*1e3,sle=e=>`${pgt}${e}`,hgt=e=>`${Cjo}${e}`,fgt=e=>dl(e)[0];function _jo(e,t){let r=e?fgt(sle(e)):void 0;return e&&Uv(sle(e)),r??(t?fgt(hgt(t)):void 0)}function kXr(e,t,r){return Vx(pgt,kjo),fgt(sle(e))??_jo(t,r)}function _Xr(e,t,r){Il(sle(e),[r]),t&&Il(hgt(t),[r])}function EXr(e,t){Uv(sle(e)),t&&Uv(hgt(t))}function RXr(e){let t=e;return typeof t?.id=="string"&&typeof t.title=="string"&&typeof t.reason=="string"&&(t.kind==="deterministic"||t.kind==="manual")&&["pass","fail","manual"].includes(t.status)}function yN(e,t){return Array.isArray(e)?t?e.filter(t):e:[]}var mgt=e=>typeof e=="string"?e:"";function PXr(e){return{repo:mgt(e.repo),prNumber:typeof e.prNumber=="number"?e.prNumber:0,headSha:mgt(e.headSha),body:mgt(e.body)}}var ggt={repo:"",prNumber:0,headSha:"",body:"",checks:[],structure:{tree:[],added:0,removed:0,modified:0,additions:0,deletions:0},criticalDiffs:[],criticalPaths:[],tests:[],testPaths:[],collapsedPaths:[]};function AXr(e){let t;try{t=JSON.parse(e)}catch{return ggt}return typeof t!="object"||t===null?ggt:{...PXr(t),checks:yN(t.checks,RXr),structure:{...ggt.structure,...t.structure},criticalDiffs:yN(t.criticalDiffs),criticalPaths:yN(t.criticalPaths),tests:yN(t.tests),testPaths:yN(t.testPaths),collapsedPaths:yN(t.collapsedPaths),...Array.isArray(t.slices)?{slices:t.slices}:{},...t.manualTesting?{manualTesting:t.manualTesting}:{},...t.saved?{saved:t.saved}:{},...t.draft?{draft:t.draft}:{}}}function LXr(e){let t=(0,WPe.useMemo)(()=>AXr(e.body),[e.body]),r=(0,WPe.useMemo)(()=>wXr(t),[t]),n=CXr(t),o=(0,WPe.useMemo)(()=>kXr(e.requestId,e.supersedes,n)??t.draft??t.saved,[e.requestId,e.supersedes,n,t]);return{payload:t,sliced:r,progress:o,head:n}}var IXr=S(re(),1);function DXr(e){let[t,r]=(0,IXr.useState)(()=>e?.reviewComments??[]);return{queued:t,onQueue:n=>r(o=>[...o,n]),onRemove:n=>r(o=>o.filter((i,a)=>a!==n)),onEdit:(n,o)=>r(i=>i.map((a,s)=>s===n?{...a,note:o}:a))}}var MXr=S(re(),1);function NXr(e,t,r,n){(0,MXr.useEffect)(()=>{_Xr(e,t,{items:r,reviewComments:n})},[e,t,r,n])}function BXr(e,t,r){let{payload:n,sliced:o,progress:i,head:a}=LXr(e),s=nXr(n.checks,i,o?.slicing),l=DXr(i),u=jKr(o?.entries??[]),{comments:d,sentTo:f,clearSent:p}=Aj(t,r),h={...d,onQueue:l.onQueue};NXr(e.requestId,a,s.items,l.queued);let m=(0,OXr.useMemo)(()=>QKr(n),[n]);return{payload:n,checklist:s,queue:l,details:ZKr(n,h),counts:m,sentTo:f,clearSent:p,sliced:o,nav:u,diffComments:h,head:a}}var IS=S(_(),1);function $Xr({preview:e,session:t,sendInput:r,onDecision:n}){let o=BXr(e,t,r);return(0,IS.jsxs)(H,{sx:o0,children:[(0,IS.jsx)(Ih,{preview:e,draft:!1}),(0,IS.jsx)(eY,{items:e.metadata??[]}),(0,IS.jsx)(qn,{}),(0,IS.jsx)(IKr,{payload:o.payload,checklist:o.checklist,details:o.details,counts:o.counts,sliced:o.sliced,nav:o.nav,comments:o.diffComments}),(0,IS.jsx)(qn,{}),(0,IS.jsx)(GKr,{pane:o,onDecision:(i,a)=>{EXr(e.requestId,o.head),n(i,a)}}),(0,IS.jsx)(pf,{sessionName:o.sentTo,onClose:o.clearSent})]})}var qXr=S(re(),1);var vN=S(_(),1);function Ejo(e){return e.topLeft===null?"Click the top-left box":e.bottomRight===null?"Now click the bottom-right box":"Both anchors picked"}function FXr({selection:e,onConfirm:t,onReject:r}){let n=e.topLeft!==null&&e.bottomRight!==null;return(0,vN.jsxs)(St,{direction:"row",spacing:1,sx:{p:2,alignItems:"center",justifyContent:"flex-end"},children:[(0,vN.jsx)(be,{variant:"body2",sx:{flex:1,color:"text.secondary"},children:Ejo(e)}),(0,vN.jsx)(nt,{color:"error",variant:"outlined",onClick:r,children:"Cancel"}),(0,vN.jsx)(nt,{variant:"outlined",onClick:e.reset,children:"Start over"}),(0,vN.jsx)(nt,{color:"success",variant:"contained",disabled:!n,onClick:t,children:"Extract boxes"})]})}var Rjo={"top-left":oc.miro.topLeft,"bottom-right":oc.miro.bottomRight};function zXr(e,t){let r=e.right-e.left,n=e.bottom-e.top;return{width:r,height:n,fontSize:Math.max(6,Math.min(n*.3,r/6,28)),radius:Math.min(8,n/4),colour:t?Rjo[t]:oc.miro.box,opacity:t?.75:.35,strokeWidth:Math.max(1,r*.004)}}var lle=S(_(),1);function HXr({box:e,role:t,onSelect:r}){let n=zXr(e,t);return(0,lle.jsxs)("g",{role:"button",tabIndex:0,"aria-label":t?`${e.text} (${t})`:e.text,onClick:()=>r(e.id),onKeyDown:o=>{o.key==="Enter"&&r(e.id)},style:{cursor:"pointer"},children:[(0,lle.jsx)("rect",{x:e.left,y:e.top,width:n.width,height:n.height,rx:n.radius,fill:n.colour,fillOpacity:n.opacity,stroke:n.colour,strokeWidth:n.strokeWidth}),(0,lle.jsx)("text",{x:e.left+n.width/2,y:e.top+n.height/2,textAnchor:"middle",dominantBaseline:"central",fontSize:n.fontSize,fill:oc.miro.text,children:e.text})]})}function UXr(e){if(e.length===0)return"0 0 100 100";let t=Math.min(...e.map(a=>a.left)),r=Math.min(...e.map(a=>a.top)),n=Math.max(...e.map(a=>a.right))-t,o=Math.max(...e.map(a=>a.bottom))-r,i=Math.max(n*.02,8);return`${t-i} ${r-i} ${n+i*2} ${o+i*2}`}var VPe=S(_(),1);function WXr({boxes:e,selection:t}){return(0,VPe.jsx)(H,{sx:{flex:1,minHeight:0,overflow:"auto",p:2},children:(0,VPe.jsx)("svg",{role:"img","aria-label":"Miro board boxes",viewBox:UXr(e),preserveAspectRatio:"xMidYMid meet",style:{width:"100%",height:"100%"},children:e.map(r=>(0,VPe.jsx)(HXr,{box:r,role:t.roleOf(r.id),onSelect:t.choose},r.id))})})}function Pjo(e){return typeof e?.id=="string"&&typeof e.text=="string"&&[e.left,e.top,e.right,e.bottom].every(t=>typeof t=="number"&&Number.isFinite(t))}function VXr(e){try{let t=JSON.parse(e);return Array.isArray(t?.boxes)?t.boxes.filter(Pjo):[]}catch{return[]}}var ygt=S(re(),1);function GXr(){let[e,t]=(0,ygt.useState)(null),[r,n]=(0,ygt.useState)(null);return{topLeft:e,bottomRight:r,choose:s=>{if(e===null||r!==null){t(s),n(null);return}n(s)},reset:()=>{t(null),n(null)},roleOf:s=>s===e?"top-left":s===r?"bottom-right":null}}var O3=S(_(),1);function jXr({preview:e,onDecision:t}){let r=(0,qXr.useMemo)(()=>VXr(e.body),[e.body]),n=GXr();return(0,O3.jsxs)(H,{sx:o0,children:[(0,O3.jsx)(Ih,{preview:e,draft:!1}),(0,O3.jsx)(qn,{}),(0,O3.jsx)(WXr,{boxes:r,selection:n}),(0,O3.jsx)(qn,{}),(0,O3.jsx)(FXr,{selection:n,onConfirm:()=>{let{topLeft:i,bottomRight:a}=n;i===null||a===null||t("approve",Vc({topLeft:i,bottomRight:a}))},onReject:()=>t("reject",Vc())})]})}var CZr=S(re(),1);function YXr(e){let t=[];return e.map(r=>(t.length=r+1,t[r]=(t[r]??0)+1,t.map(n=>n??1).join(".")))}function GPe(e){return e*22}function KXr(e){return Math.round(e/22)}var XXr={display:"flex",alignItems:"flex-start",gap:.25,"& .criterion-action":{opacity:0,transition:"opacity 120ms"},"&:hover .criterion-action":{opacity:1},"&:focus-within .criterion-action":{opacity:1},"& .criterion-action:focus-visible":{opacity:1}},ZXr={p:.25,mt:"2px",color:"text.disabled",cursor:"grab",touchAction:"none","&:active":{cursor:"grabbing"}},QXr={fontFamily:"fontFamilyMono",fontSize:"0.8rem",color:"text.secondary",minWidth:32,pt:"5px",textAlign:"right",userSelect:"none",whiteSpace:"nowrap"},JXr={flex:1,fontSize:"inherit",lineHeight:1.5,px:.75,py:0,borderRadius:1,"&:hover":{bgcolor:"action.hover"},"&.Mui-focused":{bgcolor:"action.selected"}},vgt={p:.25,mt:"2px"},eZr={position:"absolute",right:8,height:2,borderRadius:1,bgcolor:"primary.main",pointerEvents:"none"};var rZr=S(_(),1),Ajo=8;function tZr({drag:e}){return e?(0,rZr.jsx)(H,{sx:eZr,style:{top:e.top-1,left:Ajo+GPe(e.depth)}}):null}var nZr=S(_(),1),oZr=ot((0,nZr.jsx)("path",{d:"M11 18c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2 2m-2-8c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0-6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m6 4c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2"}),"DragIndicator");var bgt=S(_(),1);function iZr({number:e,onGrip:t}){return(0,bgt.jsx)(Mt,{size:"small",className:"criterion-action",sx:ZXr,"aria-label":`Reorder criterion ${e}`,onPointerDown:t,children:(0,bgt.jsx)(oZr,{fontSize:"inherit"})})}var sk=S(_(),1);function aZr({number:e,onAdd:t,onDelete:r}){return(0,sk.jsxs)(sk.Fragment,{children:[(0,sk.jsx)(Mt,{size:"small",className:"criterion-action",sx:vgt,"aria-label":`Add criterion after ${e}`,onClick:t,children:(0,sk.jsx)(Kd,{fontSize:"inherit"})}),(0,sk.jsx)(Mt,{size:"small",className:"criterion-action",sx:vgt,"aria-label":`Delete criterion ${e}`,onClick:r,children:(0,sk.jsx)(_o,{fontSize:"inherit"})})]})}var qPe=S(re(),1);function sZr(e,t){return e==="start"?0:e==="end"?t:Math.min(Math.max(e,0),t)}function lZr(e){let t=(0,qPe.useRef)(null);return(0,qPe.useEffect)(()=>{let r=t.current;if(!e||!r)return;r.focus();let n=sZr(e.caret,r.value.length);r.setSelectionRange(n,n)},[e]),t}var bN=S(_(),1);function cZr({index:e,number:t,item:r,outline:n,dragging:o,onGrip:i}){let a=lZr(n.focus?.index===e?n.focus:null),s={marginLeft:GPe(r.depth),opacity:o?.4:1};return(0,bN.jsxs)(H,{sx:XXr,"data-criterion-row":!0,style:s,children:[(0,bN.jsx)(iZr,{number:t,onGrip:i}),(0,bN.jsx)(H,{component:"span",sx:QXr,"aria-hidden":"true",children:`${t}.`}),(0,bN.jsx)(zi,{multiline:!0,value:r.text,sx:JXr,inputRef:a,inputProps:{"aria-label":`Criterion ${t}`},onChange:l=>n.onText(e,l.target.value),onKeyDown:l=>n.onKeyDown(e,l)}),(0,bN.jsx)(aZr,{number:t,onAdd:()=>n.onAdd(e),onDelete:()=>n.onDelete(e)})]})}var gZr=S(re(),1);function uZr(e,t,{key:r,shift:n,alt:o,caret:i,text:a}){return o||n?null:r==="ArrowUp"&&i===0&&t>0?{kind:"focus",index:t-1}:r==="ArrowDown"&&i===a.length&&t<e.length-1?{kind:"focus",index:t+1}:null}function B3(e){if(e.length===0)return[{text:"",depth:0}];let t=-1;return e.map(r=>{let n=Math.min(Math.max(r.depth,0),t+1);return t=n,r.depth===n?r:{...r,depth:n}})}function jPe(e,t,r,n){let o=e[t]?.depth??0,i=e.map((a,s)=>s===t?{...a,text:r}:a);return{items:B3([...i.slice(0,t+1),{text:n,depth:o},...i.slice(t+1)]),index:t+1}}function cg(e,t){let r=t+1;for(;r<e.length&&e[r].depth>e[t].depth;)r+=1;return r}function YPe(e,t){let r=e[t].depth;for(let n=t-1;n>=0;n-=1){if(e[n].depth<r)return-1;if(e[n].depth===r)return n}return-1}function dZr(e,t){let r=cg(e,t);return r<e.length&&e[r].depth===e[t].depth?r:-1}function fZr(e,t,r){let n=r<0?YPe(e,t):dZr(e,t);if(n<0)return null;let o=cg(e,t),i=e.slice(t,o),a=[...e.slice(0,t),...e.slice(o)],s=r<0?n:cg(e,n)-(o-t);return{items:[...a.slice(0,s),...i,...a.slice(s)],index:s}}function KPe(e,t){let r=cg(e,t),n=e.map((o,i)=>i>t&&i<r?{...o,depth:o.depth-1}:o).filter((o,i)=>i!==t);return{items:B3(n),index:Math.max(0,t-1)}}function pZr(e,t,r){if(r<0&&e[t].depth===0||r>0&&YPe(e,t)<0)return null;let n=cg(e,t);return e.map((o,i)=>i>=t&&i<n?{...o,depth:o.depth+r}:o)}function XPe(e,t){return e?{kind:"edit",edit:e,caret:t}:null}function Ljo(e,t,{caret:r,text:n}){let o=n.slice(0,r);return XPe(jPe(e,t,o,n.slice(r)),"start")}function Ijo(e,t,{shift:r,caret:n}){let o=pZr(e,t,r?-1:1);return XPe(o?{items:o,index:t}:null,n)}function hZr(e,t,r){let{key:n,shift:o,alt:i,caret:a,text:s}=r;return n==="Enter"&&!o?Ljo(e,t,r):n==="Tab"?Ijo(e,t,r):i&&(n==="ArrowUp"||n==="ArrowDown")?XPe(fZr(e,t,n==="ArrowUp"?-1:1),a):n==="Backspace"&&a===0&&s===""?XPe(KPe(e,t),"end"):null}function mZr(e,t,r){return hZr(e,t,r)??uZr(e,t,r)}function yZr(e,t){let[r,n]=(0,gZr.useState)(null),o=(a,s)=>{a&&(t(a.items),n({index:a.index,caret:s}))};return{focus:r,onKeyDown:(a,s)=>{let l=s.currentTarget;(s.key==="Enter"||s.key==="Tab")&&s.preventDefault();let u=mZr(e,a,{key:s.key,shift:s.shiftKey,alt:s.altKey,caret:l.selectionStart??0,text:l.value});u&&(s.preventDefault(),u.kind==="focus"?n({index:u.index,caret:"end"}):o(u.edit,u.caret))},onDrop:a=>o(a,"end"),onText:(a,s)=>t(e.map((l,u)=>u===a?{...l,text:s}:l)),onAdd:a=>o(jPe(e,a,e[a].text,""),"start"),onDelete:a=>o(KPe(e,a),"end")}}var TZr=S(re(),1);function Djo(e,t,r,n){let o=t.length;for(let a=0;a<e.length;a+=1)if(n<e[a].top+e[a].height/2){o=a;break}let i=cg(t,r);return o>r&&o<i?r:o}function Mjo(e,t,r,n){let o=cg(e,t),i=r-1,a=i>=t&&i<o?t-1:i,s=a>=0?e[a].depth+1:0;return Math.max(0,Math.min(e[t].depth+KXr(n),s))}function Njo(e,t){if(t<e.length)return e[t].top;let r=e[e.length-1];return r?r.top+r.height:0}function vZr(e,t,r,n,o){let i=Djo(e,t,r,o);return{target:i,depth:Mjo(t,r,i,n),top:Njo(e,i)}}function Ojo(e){let t=e.getBoundingClientRect().top;return{boxes:Array.from(e.querySelectorAll("[data-criterion-row]")).map(n=>{let o=n.getBoundingClientRect();return{top:o.top-t,height:o.height}}),origin:t}}function bZr(e,t,r,n){return o=>{let{boxes:i,origin:a}=Ojo(t);return vZr(i,e,r,o.clientX-n,o.clientY-a)}}function xZr(e,t,r,n,o){let i=new AbortController,a=null,s=d=>{a=r(d),n(a)},l=()=>{i.abort(),a&&o(a)},u={signal:i.signal};return e.setPointerCapture(t),e.addEventListener("pointermove",s,u),e.addEventListener("pointerup",l,u),e.addEventListener("pointercancel",l,u),s}function SZr(e,t,r,n){let o=cg(e,t),i=n-e[t].depth,a=e.slice(t,o).map(u=>({...u,depth:Math.max(0,u.depth+i)})),s=[...e.slice(0,t),...e.slice(o)],l=r>t?r-a.length:r;return{items:B3([...s.slice(0,l),...a,...s.slice(l)]),index:l}}function wZr(e,t,r){let[n,o]=(0,TZr.useState)(null);return{drag:n,onGrip:a=>s=>{let l=t.current;if(!l||s.pointerType==="mouse"&&s.button!==0)return;s.preventDefault(),xZr(s.currentTarget,s.pointerId,bZr(e,l,a,s.clientX),d=>o({from:a,depth:d.depth,top:d.top}),d=>{o(null),r(SZr(e,a,d.target,d.depth))})(s)}}}var cle=S(_(),1),Bjo={my:1,px:1,py:.5,border:1,borderColor:"divider",borderRadius:1,position:"relative",userSelect:"text",cursor:"auto"},$jo=[{text:"",depth:0}];function kZr({items:e,onChange:t}){let r=(0,CZr.useRef)(null),n=e.length>0?e:$jo,o=yZr(n,t),{drag:i,onGrip:a}=wZr(n,r,o.onDrop),s=YXr(n.map(l=>l.depth));return(0,cle.jsxs)(H,{sx:Bjo,ref:r,"data-preview-skip":!0,"aria-label":"Acceptance criteria",children:[n.map((l,u)=>(0,cle.jsx)(cZr,{index:u,number:s[u],item:l,outline:o,dragging:i?.from===u,onGrip:a(u)},`criterion-${u}`)),(0,cle.jsx)(tZr,{drag:i})]})}var _Zr=S(_(),1),EZr=ot((0,_Zr.jsx)("path",{d:"M2 17h2v.5H3v1h1v.5H2v1h3v-4H2zm1-9h1V4H2v1h1zm-1 3h1.8L2 13.1v.9h3v-1H3.2L5 10.9V10H2zm5-6v2h14V5zm0 14h14v-2H7zm0-6h14v-2H7z"}),"FormatListNumbered");var ule=S(_(),1),Fjo={insert:"Add acceptance criteria",convert:"Convert to outline"};function RZr({kind:e,onClick:t}){return(0,ule.jsx)(H,{sx:{my:1},"data-preview-skip":!0,children:(0,ule.jsx)(nt,{size:"small",variant:"outlined",startIcon:e==="insert"?(0,ule.jsx)(Kd,{}):(0,ule.jsx)(EZr,{}),onClick:t,children:Fjo[e]})})}var dle=S(re(),1);function PZr(e,t,{color:r,pin:n}){let o=I6(e),i=[],a=o.nextNode();for(;a;){let u=a;if(t.intersectsNode(u)){let d=u===t.startContainer?t.startOffset:0,f=u===t.endContainer?t.endOffset:u.length;d<f&&i.push({node:u,start:d,end:f})}a=o.nextNode()}let l=i.map(u=>zjo(u.node,u.start,u.end,r)).at(-1);l&&n&&(l.dataset.pin=n)}function zjo(e,t,r,n){let o=document.createRange();o.setStart(e,t),o.setEnd(e,r);let i=document.createElement("mark");return i.className="pr-comment",i.style.backgroundColor=n,o.surroundContents(i),i}function AZr(e){for(let t of e.querySelectorAll("mark.pr-comment"))if(t.parentNode){for(;t.firstChild;)t.before(t.firstChild);t.remove()}}function LZr(e,t){for(let r of t){let n=cNt(e,r);n&&PZr(e,n,r)}}var fle=S(_(),1);function IZr({content:e,control:t,trailing:r,ranges:n,contentRef:o}){let i=(0,dle.useMemo)(()=>OD(e),[e]),a=(0,dle.useMemo)(()=>OD(r??""),[r]);return(0,dle.useLayoutEffect)(()=>{let s=o.current;s&&(AZr(s),LZr(s,n))},[i,a,n,o]),(0,fle.jsxs)(H,{ref:o,children:[(0,fle.jsx)(ID,{segments:i,skipDiagramText:!0}),t,t?(0,fle.jsx)(ID,{segments:a,skipDiagramText:!0}):null]})}var xN=e=>e.split(",").map(t=>`&& .markdown ${t.trim()}`).join(", ");function ZPe(e){let{color:t,radius:r}=e.tokens;return{px:2.5,py:2,fontSize:14,lineHeight:1.6,[xN("")]:{lineHeight:1.6},[xN("h1, h2, h3, h4, h5, h6")]:{fontSize:15,fontWeight:600,lineHeight:1.4,mt:2,mb:1},[xN("ul, ol")]:{pl:2.5,mb:2},[xN("li")]:{mb:"6px"},[xN("code")]:{fontFamily:e.typography.fontFamilyMono,fontSize:"0.86em",px:"5px",py:0,bgcolor:t.raised,border:1,borderColor:t.lineSoft,borderRadius:"4px"},[xN("pre")]:{bgcolor:t.raised,border:1,borderColor:t.lineSoft,borderRadius:`${r.sm}px`},[xN("pre code")]:{border:0,px:0,bgcolor:"transparent"}}}var DZr=e=>({flex:1,overflow:"auto",position:"relative",userSelect:"none",cursor:"text",wordBreak:"break-word","& .markdown":{...G$(e),maxWidth:"none"},"& a":{color:"primary.main"},"& mark.pr-comment":{color:"inherit",borderRadius:"2px"},...ZPe(e)});var rY=S(_(),1);function MZr({content:e,control:t,trailing:r,ranges:n,wrapperRef:o,contentRef:i,dragRects:a,dragColor:s,onMouseDown:l,footer:u}){return(0,rY.jsxs)(H,{ref:o,onMouseDown:l,sx:DZr,children:[(0,rY.jsx)(IZr,{content:e,control:t,trailing:r,ranges:n,contentRef:i}),u&&(0,rY.jsx)(H,{sx:{userSelect:"text"},children:u}),(0,rY.jsx)(N$,{rects:a,color:s})]})}function NZr(e){let t=new Map,r=[];for(let n of e){if(!n.group){r.push(n);continue}t.set(n.group,[...t.get(n.group)??[],n])}return{groups:[...t],ungrouped:r}}var QPe=S(re(),1),OZr=S(_(),1);function xgt({label:e,value:t,onCommit:r,listId:n}){let[o,i]=(0,QPe.useState)(t);return(0,QPe.useEffect)(()=>i(t),[t]),(0,OZr.jsx)(An,{size:"small",variant:"standard",fullWidth:!0,label:e,value:o,onChange:s=>i(s.target.value),onBlur:()=>{let s=o.trim();i(t),s!==t&&r(s)},onKeyDown:s=>{s.key==="Enter"&&s.target.blur()},onMouseDown:s=>s.stopPropagation(),slotProps:{htmlInput:{list:n}}})}var ple=S(_(),1),Sgt="screenshot-groups";function Hjo(e){return(e.split(/[\\/]/).pop()??e).replace(/\.[^.]+$/,"")}function BZr({screenshot:e,onUpdate:t}){return(0,ple.jsxs)(St,{direction:"row",spacing:1,sx:{mt:.5},children:[(0,ple.jsx)(xgt,{label:"Caption",value:e.alt,onCommit:r=>t(e.id,{alt:r||Hjo(e.path)})}),(0,ple.jsx)(xgt,{label:"Group",value:e.group??"",listId:Sgt,onCommit:r=>t(e.id,{group:r})})]})}var $3=S(_(),1),$Zr={display:"block",maxWidth:"100%",borderRadius:1,border:1,borderColor:"divider"},Ujo={position:"absolute",top:4,right:4,bgcolor:"background.paper","&:hover":{bgcolor:"background.paper"}};function FZr({screenshot:e,onRemove:t,onUpdate:r}){let n=e.contentType.startsWith("video/");return(0,$3.jsxs)(H,{sx:{position:"relative"},children:[n?(0,$3.jsx)(H,{component:"video",controls:!0,src:e.url,"aria-label":"screenshot",sx:$Zr}):(0,$3.jsx)(H,{component:"img",src:e.url,alt:"screenshot",sx:$Zr}),(0,$3.jsx)(Mt,{size:"small","aria-label":"Remove screenshot",sx:Ujo,onMouseDown:o=>o.stopPropagation(),onClick:()=>t(e.id),children:(0,$3.jsx)(_o,{fontSize:"small"})}),(0,$3.jsx)(BZr,{screenshot:e,onUpdate:r})]})}var f0=S(_(),1);function Wjo(){return(0,f0.jsxs)(St,{direction:"row",spacing:1,sx:{alignItems:"center"},children:[(0,f0.jsx)(io,{size:16}),(0,f0.jsx)(be,{variant:"caption",color:"text.secondary",children:"Attaching screenshot or video\u2026"})]})}function Vjo({error:e}){return(0,f0.jsx)(be,{variant:"caption",color:"error",sx:{wordBreak:"break-word"},children:e})}function zZr({uploads:e,empty:t}){return e.length>0?(0,f0.jsx)(f0.Fragment,{children:e.map(r=>r.error?(0,f0.jsx)(Vjo,{error:r.error},r.id):(0,f0.jsx)(Wjo,{},r.id))}):t?(0,f0.jsx)(be,{variant:"caption",color:"text.secondary",children:"Drop or paste an image or video to attach"}):null}var p0=S(_(),1),Gjo={display:"grid",gridTemplateColumns:"repeat(2, minmax(0, 1fr))",gap:1};function HZr({screenshots:e,uploads:t,onRemove:r,onUpdate:n}){let{groups:o,ungrouped:i}=NZr(e),a=s=>(0,p0.jsx)(FZr,{screenshot:s,onRemove:r,onUpdate:n},s.id);return(0,p0.jsxs)(H,{sx:{mt:3},children:[e.length>0&&(0,p0.jsx)(H,{component:"h2",children:"Screenshots"}),(0,p0.jsx)("datalist",{id:Sgt,children:o.map(([s])=>(0,p0.jsx)("option",{value:s},s))}),o.map(([s,l])=>(0,p0.jsxs)(H,{sx:{mb:2},children:[(0,p0.jsx)(H,{component:"h3",children:s}),(0,p0.jsx)(H,{sx:Gjo,children:l.map(a)})]},s)),(0,p0.jsxs)(St,{spacing:1,children:[i.map(a),(0,p0.jsx)(zZr,{uploads:t,empty:e.length===0})]})]})}var hle=S(_(),1);function qjo(e){let t=e.criteria;if(!t)return{content:e.body};let r={content:t.before,trailing:t.after};return t.kind==="outline"?{...r,control:(0,hle.jsx)(kZr,{items:t.items,onChange:e.onCriteriaChange})}:{...r,control:(0,hle.jsx)(RZr,{kind:t.kind,onClick:t.kind==="insert"?e.onCriteriaInsert:e.onCriteriaConvert})}}function JPe({pane:e,screenshots:t}){return(0,hle.jsx)(MZr,{...qjo(e),ranges:e.ranges,wrapperRef:e.wrapperRef,contentRef:e.contentRef,dragRects:e.dragRects,dragColor:e.dragColor,onMouseDown:e.onMouseDown,footer:t?(0,hle.jsx)(HZr,{screenshots:e.screenshots,uploads:e.uploads,onRemove:e.removeScreenshot,onUpdate:e.updateScreenshot}):void 0})}var UZr=e=>({display:"grid",gap:1,maxHeight:220,overflow:"auto",px:2,py:1.25,borderTop:1,borderColor:e.tokens.color.lineSoft}),WZr={fontSize:11,fontWeight:600,letterSpacing:"0.06em",textTransform:"uppercase",color:"text.secondary"},VZr=e=>({display:"grid",gridTemplateColumns:"minmax(0, 1fr) auto",gap:"4px 8px",px:1.25,py:1,borderRadius:`${e.tokens.radius.sm}px`,bgcolor:e.tokens.color.raised,border:1,borderColor:e.tokens.color.lineSoft,fontSize:12.5}),GZr={gridColumn:2,gridRow:1,width:20,height:20,color:"text.disabled","& .MuiSvgIcon-root":{fontSize:14}};var lk=S(_(),1);function qZr({comments:e,colors:t,onRemove:r}){return(0,lk.jsxs)(H,{sx:UZr,children:[(0,lk.jsxs)(be,{sx:WZr,children:["Comments (",e.length,")"]}),e.map((n,o)=>(0,lk.jsxs)(H,{sx:VZr,children:[(0,lk.jsx)(L$,{text:n.quote,sx:{gridColumn:1,borderLeft:2,pl:1,borderColor:t[o]}}),(0,lk.jsx)(H,{sx:{gridColumn:1,wordBreak:"break-word"},children:n.note}),(0,lk.jsx)(Mt,{"aria-label":"Remove comment",onClick:()=>r(n.id),sx:GZr,children:(0,lk.jsx)(_o,{})})]},n.id))]})}var YZr=S(_(),1);function jZr(e){return e.comments.length===0?null:(0,YZr.jsx)(qZr,{...e})}var KZr=S(_(),1),eAe=ot((0,KZr.jsx)("path",{d:"M20 18c1.1 0 1.99-.9 1.99-2L22 6c0-1.1-.9-2-2-2H4c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2H0v2h24v-2zM4 6h16v10H4z"}),"Computer");var tQr=S(re(),1);var XZr=S(_(),1),ZZr=ot((0,XZr.jsx)("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2"}),"Circle");var h0="0.1190.2";var jjo={connected:"success.main",connecting:"warning.main",disconnected:"error.main","version-blocked":"error.main"};function QZr(e){return e?jjo[e]:"success.main"}function JZr(e){return e.split("-")[0].split(".").map(Number)}function eQr(e,t){if(!e||!t||e===t)return;let r=JZr(e),n=JZr(t);for(let o=0;o<Math.max(r.length,n.length);o++){let i=(r[o]??0)-(n[o]??0);if(Number.isNaN(i))return;if(i!==0)return i<0?"behind":"ahead"}}var tAe=S(re(),1),Tgt=(0,tAe.createContext)(null);function rAe(){return(0,tAe.useContext)(Tgt)}var SN=S(_(),1),Yjo={height:16,fontSize:10},Kjo={opacity:.6,fontSize:"0.85em"};function Xjo(e,t){if(t===e.local)return"this machine";let r=e.links.find(n=>n.name===t);return r?r.error?`${r.state}: ${r.error}`:r.state:""}function F3({nodes:e,name:t,showVersion:r=!1}){let n=rAe()??h0,o=e.links.find(a=>a.name===t),i=eQr(o?.peerVersion,n);return(0,SN.jsx)(lr,{title:Xjo(e,t),placement:"right",children:(0,SN.jsxs)(H,{component:"span",sx:{display:"inline-flex",alignItems:"center",gap:.75},children:[(0,SN.jsx)(ZZr,{sx:{fontSize:8,color:QZr(o?.state)}}),t,r&&o?.peerVersion&&(0,SN.jsxs)(H,{component:"span",sx:Kjo,children:["v",o.peerVersion]}),i&&(0,SN.jsx)(yn,{label:i,size:"small",color:i==="behind"?"warning":"info",sx:Yjo})]})})}var m0=S(_(),1),Zjo={textTransform:"none"};function nAe({nodes:e,options:t,target:r,onPick:n}){let[o,i]=(0,tQr.useState)(null);return(0,m0.jsxs)(m0.Fragment,{children:[(0,m0.jsx)(nt,{size:"small",color:"inherit",startIcon:(0,m0.jsx)(eAe,{fontSize:"small"}),"aria-label":"Start on node","aria-haspopup":"menu",onClick:a=>i(a.currentTarget),sx:Zjo,children:(0,m0.jsx)(F3,{nodes:e,name:r.node})}),(0,m0.jsx)(fi,{anchorEl:o,open:!!o,onClose:()=>i(null),children:t.map(({name:a,cwd:s})=>(0,m0.jsx)(Br,{disabled:!s,selected:a===r.node,onClick:()=>{n(a),i(null)},children:(0,m0.jsx)(Vu,{primary:(0,m0.jsx)(F3,{nodes:e,name:a}),secondary:s?void 0:"no clone"})},a))})]})}var rQr=S(re(),1);function Qjo(e,t){return e?.toLowerCase()===t.toLowerCase()}function oAe(e,t){let{nodes:r,names:n,visible:o}=ds(),{repos:i,selectedCwd:a,selectedNode:s,cloneOn:l,originOf:u}=_n(),[d,f]=(0,rQr.useState)(),p=e&&u(e)?e:a,h=t?i.find(b=>Qjo(u(b),t)):p,m=n.map(b=>({name:b,cwd:h?l(h,b):void 0})),g=b=>m.find(x=>x.name===b&&x.cwd),y=g(d)??g(s??r?.local)??m.find(b=>b.cwd),v=o&&y?.cwd?{node:y.name,cwd:y.cwd}:void 0;return{nodes:r,visible:o,options:m,target:v,pick:f}}var z3=S(_(),1);function nQr({canStart:e,startOrigin:t,cwd:r,onApprove:n,onApproveAndStart:o}){let i=Qme(),a=oAe(r,t);return(0,z3.jsxs)(z3.Fragment,{children:[(0,z3.jsx)(nt,{color:"primary",variant:e?"tonal":"contained",onClick:n,...e?{}:i,children:"Approve"}),e&&a.nodes&&a.target&&(0,z3.jsx)(nAe,{nodes:a.nodes,options:a.options,target:a.target,onPick:a.pick}),e&&(0,z3.jsx)(nt,{color:"primary",variant:"contained",onClick:()=>o(a.target),...i,children:"Approve & start"})]})}var wgt=S(_(),1),Jjo={"& .MuiFormControlLabel-label":{fontSize:12}};function mle({label:e,title:t,checked:r,onChange:n}){return(0,wgt.jsx)($d,{control:(0,wgt.jsx)(Dp,{size:"small",checked:r,onChange:o=>n(o.target.checked)}),label:e,title:t,sx:Jjo})}var TN=S(_(),1);function iAe({chain:e,newPr:t,onChange:r}){return(0,TN.jsxs)(St,{direction:"row",sx:{mr:"auto"},children:[t&&(0,TN.jsx)(mle,{label:"Draft",title:"Create the PR as a draft rather than ready for review",checked:e.draft,onChange:n=>r({...e,draft:n,autoMerge:n?!1:e.autoMerge})}),(0,TN.jsx)(mle,{label:"Auto-merge (squash)",title:"Squash-merge the PR automatically once its required checks pass",checked:e.autoMerge,onChange:n=>r({...e,autoMerge:n,draft:n?!1:e.draft})}),(0,TN.jsx)(mle,{label:"Review PR",title:"After raising, run a review that posts its findings and then addresses them",checked:e.reviewAfter,onChange:n=>r({...e,reviewAfter:n})}),(0,TN.jsx)(mle,{label:"Post to Slack",title:"Announce the PR in Slack at the tail of the chain",checked:e.announceAfter,onChange:n=>r({...e,announceAfter:n})})]})}var wN=S(_(),1);function oQr({commentCount:e,chain:t,newPr:r,canStart:n,startOrigin:o,onChainChange:i,onApprove:a,cwd:s,onApproveAndStart:l,onReject:u,onRequestChanges:d}){return(0,wN.jsxs)(St,{direction:"row",spacing:1,sx:{px:2,py:1.5,alignItems:"center",justifyContent:"flex-end"},children:[t&&(0,wN.jsx)(iAe,{chain:t,newPr:r,onChange:i}),(0,wN.jsx)(nt,{color:"error",variant:"outlined",onClick:u,children:"Reject"}),e>0&&(0,wN.jsxs)(nt,{color:"warning",variant:"tonal",onClick:d,children:["Request changes (",e,")"]}),(0,wN.jsx)(nQr,{canStart:n,startOrigin:o,cwd:s,onApprove:a,onApproveAndStart:l})]})}var aQr=S(_(),1);function iQr({comments:e,cwd:t,onDecision:r,chain:n,newPr:o,canStart:i,startOrigin:a,onChainChange:s}){let l=()=>e.map(u=>({quote:u.quote,note:u.note}));return(0,aQr.jsx)(oQr,{commentCount:e.length,chain:n,newPr:o,canStart:i,startOrigin:a,onChainChange:s,onApprove:()=>r("approve",l()),cwd:t,onApproveAndStart:u=>r("approve",l(),u??!0),onReject:()=>r("reject",[]),onRequestChanges:()=>r("reject",l())})}var ck=S(_(),1);function sQr(e){let{comments:t,commentColors:r,pending:n,cwd:o,unavailable:i,onAdd:a,onQueue:s,onCite:l,onAddRule:u,onRemove:d,onCancel:f,onCollapse:p,editable:h}=e;return(0,ck.jsxs)(ck.Fragment,{children:[(0,ck.jsx)(jZr,{comments:t,colors:r,onRemove:d}),(0,ck.jsx)(qn,{}),(0,ck.jsx)(iQr,{...e}),(0,ck.jsx)(pye,{pending:n,editable:h,cwd:o,unavailable:i,onAdd:a,onQueue:s,onCite:l,onAddRule:u,onCancel:f,onCollapse:p})]})}var gle=S(_(),1),eYo={px:2,pb:2,display:"flex",alignItems:"center",gap:1.5,minWidth:0},tYo={color:"text.secondary",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"};function lQr({url:e}){return(0,gle.jsxs)(H,{sx:eYo,children:[(0,gle.jsx)(nt,{variant:"contained",href:e,target:"_blank",rel:"noopener noreferrer",sx:{flexShrink:0},children:"Open design \u2197"}),(0,gle.jsx)(be,{variant:"body2",sx:tYo,title:e,children:e})]})}var Cgt=S(_(),1);function cQr({preview:e}){let t=e.kind==="design"?e.metadata?.[0]?.url:void 0;return t?(0,Cgt.jsx)(lQr,{url:t}):(0,Cgt.jsx)(eY,{items:e.metadata??[]})}function uQr({preview:e,pane:t,cwd:r,isPr:n,editable:o,sender:i,onCite:a,onAddRule:s}){return{comments:t.comments,commentColors:t.commentColors,pending:t.pending,cwd:r,unavailable:i.unavailable,onAdd:i.onSend,onQueue:t.onAdd,onCite:a,onAddRule:s,onRemove:t.remove,onCancel:t.onCancel,onCollapse:t.onCollapse,onDecision:t.onDecide,chain:n?t.chain:void 0,editable:o,newPr:n&&e.prNumber===null,canStart:e.kind==="backlog-item"&&e.canStart===!0,startOrigin:e.startOrigin,onChainChange:t.setChain}}function nY(e){let t=e??"pr";return{isPr:t==="pr",screenshots:t==="pr"||t==="github-issue"||t==="github-issue-edit",editable:t==="github-issue-edit",closeOnly:t==="show"}}function dQr(e,t){return e?`${e}:${t??"pr"}`:void 0}function aAe(e,t,r,n){return{...nY(e.kind),requestId:e.requestId,supersedes:e.supersedes,sessionId:t,cwd:r,onDecision:n,screenshotScope:dQr(t,e.kind),seededScreenshots:e.screenshots??[],chainDefaults:{draft:e.draft===!0,reviewAfter:e.reviewAfter??!0},initialBody:e.body}}function fQr(e,t,r,n){if(!(!e||!t))return o=>{r!==void 0&&ul(t,e,t_e({quote:r,note:o})),n()}}function pQr(e,t,r,n){if(!(!e||!t))return o=>{r!==void 0&&ul(t,e,Wx(r,eye(o))),n()}}function sAe(e,t,r,n){return{onCite:pQr(e,t,r,n),onAddRule:fQr(e,t,r,n)}}function hQr(e){return{criteria:e.criteria,onCriteriaChange:e.writeCriteria,onCriteriaInsert:e.insertCriteria,onCriteriaConvert:e.convertCriteria}}var wQr=S(re(),1);var uk=S(re(),1);var mQr="assist:pr-preview-comments:",kgt=e=>`${mQr}${e}`;function _gt(e){return dl(kgt(e))}function yle(e,t){Il(kgt(e),t)}function lAe(e){Uv(kgt(e))}function gQr(){Vx(mQr)}function yQr(e){let t=I6(e),r="";for(let n=t.nextNode();n;n=t.nextNode())r+=n.textContent??"";return r}function rYo(e,t,r){let n=-1;for(let o=e.indexOf(t);o!==-1;o=e.indexOf(t,o+1))(n===-1||Math.abs(o-r)<Math.abs(n-r))&&(n=o);return n}function vQr(e,t){return e.flatMap(r=>{let n=rYo(t,r.quote,r.start);return n===-1?[]:[{...r,start:n,end:n+r.quote.length}]})}function bQr(e,t,r){let n=_gt(e);if(n.length>0||!t||!r)return n;let o=vQr(_gt(t),yQr(r));return yle(e,o),lAe(t),o}function xQr(e,t,r){let[n,o]=(0,uk.useState)([]),i=(0,uk.useRef)(0);(0,uk.useEffect)(()=>{gQr(),o(bQr(e,t,r.current).map(l=>({...l,id:i.current++})))},[e,t,r]);let a=(0,uk.useCallback)(l=>{o(u=>{let d=[...u,{...l,id:i.current++}];return yle(e,d),d})},[e]),s=(0,uk.useCallback)(l=>{o(u=>{let d=u.filter(f=>f.id!==l);return yle(e,d),d})},[e]);return{comments:n,add:a,remove:s}}function SQr(e,t){let r=e.map((i,a)=>mG(a).solid),n=mG(e.length).fill,o=e.map((i,a)=>({start:i.start,end:i.end,color:mG(a).fill,pin:String(a+1)}));return t&&o.push({start:t.start,end:t.end,color:n}),{commentColors:r,dragColor:n,ranges:o}}function TQr(e,t,r,n){return{onAdd:o=>{e&&t({quote:e.quote,note:o,start:e.start,end:e.end}),n()},onCollapse:()=>{e&&r(e.quote),n()}}}function CQr(e,t,r){let{wrapperRef:n,contentRef:o,pending:i,dragRects:a,onMouseDown:s,clear:l,select:u}=Vy(),{comments:d,add:f,remove:p}=xQr(e,t,o),{commentColors:h,dragColor:m,ranges:g}=(0,wQr.useMemo)(()=>SQr(d,i),[d,i]),{onAdd:y,onCollapse:v}=TQr(i,f,r,l);return{wrapperRef:n,contentRef:o,onMouseDown:s,comments:d,commentColors:h,remove:p,pending:i,ranges:g,dragRects:a,dragColor:m,onAdd:y,onCollapse:v,onCancel:l,onSelect:u}}var uAe=S(re(),1);var Egt="assist:preview-screenshots:",Rgt=e=>`${Egt}${e}`,cAe=e=>`${Egt}seeded:${e}`;function kQr(e){return e?(Vx(Egt),dl(Rgt(e)).filter(t=>typeof t.path=="string")):[]}function CN(e,t){e&&Il(Rgt(e),t.map(({path:r,alt:n,group:o,contentType:i,seeded:a})=>({path:r,alt:n,group:o,contentType:i,seeded:a})))}function _Qr(e){e&&(Uv(Rgt(e)),Uv(cAe(e)))}var kN=S(re(),1);var EQr={"image/png":"png","image/jpeg":"jpg","image/gif":"gif","image/webp":"webp","image/svg+xml":"svg","video/mp4":"mp4","video/webm":"webm","video/quicktime":"mov"};function nYo(e){let t=e.split(".").pop()?.toLowerCase();return Object.entries(EQr).find(([,n])=>n===t)?.[0]??"application/octet-stream"}function RQr(e){return e.map(t=>({...t,contentType:nYo(t.path),seeded:!0}))}function PQr(e,t,r){if(!e)return RQr(r);let n=kQr(e);if(dl(cAe(e))[0]===t)return n;let o=[...RQr(r),...n.filter(i=>!i.seeded)];return CN(e,o),Il(cAe(e),[t]),o}function AQr(e,t){let r=new URLSearchParams({path:e});return t&&r.set("node",t),rv(`/api/pr-preview/image?${r}`)}function LQr(e,t,r){let[n,o]=(0,kN.useState)([]),i=(0,kN.useRef)(0),a=ur(),s=(0,kN.useRef)(r);return s.current=r,(0,kN.useEffect)(()=>{o(PQr(e,t,s.current).map(l=>({...l,url:AQr(l.path,a),id:i.current++})))},[e,t,a]),{screenshots:n,setScreenshots:o,nextId:i}}var IQr=S(re(),1);function DQr(e,t){return(0,IQr.useCallback)((r,n)=>{t(o=>{let i=o.map(a=>a.id===r?{...a,...n}:a);return CN(e,i),i})},[e,t])}function MQr(e,t,r){let{screenshots:n,setScreenshots:o,nextId:i}=LQr(e,t,r),a=(0,uAe.useCallback)(d=>{o(f=>{let p=[...f,{...d,id:i.current++}];return CN(e,p),p})},[e,o,i]),s=(0,uAe.useCallback)(d=>{o(f=>{let p=f.find(m=>m.id===d);p?.url.startsWith("blob:")&&URL.revokeObjectURL(p.url);let h=f.filter(m=>m.id!==d);return CN(e,h),h})},[e,o]),l=DQr(e,o),u=(0,uAe.useCallback)(()=>_Qr(e),[e]);return{screenshots:n,add:a,remove:s,update:l,clearPersisted:u}}var oY=S(re(),1);async function NQr(e,t,r){let n=new URLSearchParams;t&&n.set("cwd",t),r&&n.set("node",r),e instanceof File&&e.name&&n.set("name",e.name);let o=await Ut(`/api/pr-preview/upload-image?${n}`,{method:"POST",headers:{"Content-Type":e.type||"application/octet-stream"},body:e,timeoutMs:12e4}),i=await o.json().catch(()=>null);if(!o.ok||!i?.path)throw new Error(i?.error??"Failed to attach file");return{path:i.path,alt:i.alt??"screenshot"}}var FQr=S(re(),1);function OQr(e){return e.startsWith("image/")||e.startsWith("video/")}function BQr(e){if(!e)return null;for(let t of e.items)if(t.kind==="file"&&OQr(t.type)){let r=t.getAsFile();if(r)return r}return null}function $Qr(e){return e?Array.from(e.files).find(t=>OQr(t.type))??null:null}function zQr(e,t){return(0,FQr.useEffect)(()=>{if(!t)return;let o=i=>{let a=BQr(i.clipboardData);a&&(i.preventDefault(),e(a))};return globalThis.addEventListener("paste",o),()=>globalThis.removeEventListener("paste",o)},[e,t]),t?{onDrop:o=>{let i=$Qr(o.dataTransfer);i&&(o.preventDefault(),e(i))},onDragOver:o=>{Array.from(o.dataTransfer.items).some(i=>i.kind==="file")&&o.preventDefault()}}:{onDrop:void 0,onDragOver:void 0}}function HQr(e,t,r){let[n,o]=(0,oY.useState)([]),i=(0,oY.useRef)(0),a=ur(),s=(0,oY.useCallback)(async d=>{let f=i.current++;o(p=>[...p.filter(h=>!h.error),{id:f}]);try{let p=await NQr(d,e,a);t({...p,url:URL.createObjectURL(d),contentType:d.type}),o(h=>h.filter(m=>m.id!==f))}catch(p){let h=p instanceof Error?p.message:"Failed to attach file";o(m=>m.map(g=>g.id===f?{id:f,error:h}:g))}},[e,a,t]),{onDrop:l,onDragOver:u}=zQr(s,r);return{uploads:n,onDrop:l,onDragOver:u}}function UQr({cwd:e,screenshots:t,screenshotScope:r,requestId:n,seededScreenshots:o}){let{screenshots:i,add:a,remove:s,update:l,clearPersisted:u}=MQr(t?r:void 0,n,t?o:[]),{uploads:d,onDrop:f,onDragOver:p}=HQr(e,a,t);return{screenshots:i,removeScreenshot:s,updateScreenshot:l,decision:{attachments:()=>i.map(({path:h,alt:m,group:g})=>g?{path:h,alt:m,group:g}:{path:h,alt:m}),clearPersisted:u},uploads:d,onDrop:f,onDragOver:p}}var ZQr=S(re(),1);var WQr="assist:pr-preview-chain:",Pgt=e=>`${WQr}${e}`;function VQr(e){if(e)return dl(Pgt(e))[0]}function GQr(e,t){e&&Il(Pgt(e),[t])}function qQr(e){e&&Uv(Pgt(e))}function jQr(){Vx(WQr)}function YQr(e,t,r){if(!e)return{reviewAfter:!1,announceAfter:!1,draft:!1,autoMerge:!1};jQr();let n=VQr(t);return{reviewAfter:n?.reviewAfter??r.reviewAfter,announceAfter:n?.announceAfter??!0,draft:n?.draft??r.draft,autoMerge:n?.autoMerge??!1}}function KQr(e,t,r,n,o){return{comments:t,screenshots:n,reviewAfter:e&&r.reviewAfter,announceAfter:e&&r.announceAfter,draft:r.draft,autoMerge:e&&r.autoMerge,...o===void 0?{}:{body:o}}}function XQr(e,t){return!e||t===!1?{}:t===!0?{autostart:!0}:{autostart:!0,startOn:t}}function QQr(e,t,r,n,o,i,a){let[s,l]=(0,ZQr.useState)(()=>YQr(n,t,o));return{chain:s,setChain:f=>{l(f),GQr(t,f)},onDecide:(f,p,h=!1)=>{let m=f==="approve";r(f,{...KQr(m,p,s,m?i.attachments():[],a()),...XQr(m,h)}),lAe(e),m&&(qQr(t),i.clearPersisted())}}}var lJr=S(re(),1);var oYo=/^ {0,3}#{1,6}[ \t]+acceptance criteria[ \t]*$/i,iYo=/^ {0,3}#{1,6}[ \t]/;function H3(e){let t=e.split(`
4143
+ `),additions:yXr(o,"+"),deletions:yXr(o,"-"),split:{hunks:o.length,of:n.length,elsewhere:i}}}function bXr(e){return e.flatMap(t=>{if(t.kind==="dir")return bXr(t.children);let{kind:r,name:n,...o}=t;return[o]})}function Tjo(e){let t=new Map;return e.forEach((r,n)=>{for(let o of r.hunks)t.set(o,[...t.get(o)??[],n+1])}),t}function xXr(e,t,r=new Set,n=new Set){let o=bXr(e.tree).filter(a=>!r.has(a.path)).map(a=>n.has(a.path)?{...a,critical:!0}:a),i=Tjo(t);return t.map((a,s)=>{let l=new Set(a.hunks.map(Gj));return pXr(o.filter(u=>l.has(u.path)).map(u=>vXr(u,s+1,i)))})}function wjo(e,t){let r=-1,n=0;return t.forEach((o,i)=>{let a=o.hunks.filter(s=>Gj(s)===e).length;a>n&&(r=i,n=a)}),r}function SXr(e,t){let r=t.map(()=>[]);for(let n of e)r[wjo(n.path,t)]?.push(n);return r}function TXr(e,t){let r=xXr(e.structure,t,new Set(e.tests.map(i=>i.path)),new Set(e.criticalDiffs.map(i=>i.path))),n=SXr(e.tests,t),o=bPe(t);return t.map((i,a)=>{let s=a+1;return{number:s,slice:i,structure:r[a]??e.structure,tests:n[a]??[],critical:e.criticalDiffs.filter(l=>o.get(l.path)?.some(u=>u.number===s))}})}function wXr(e){if(!e.slices)return;let t=TXr(e,e.slices);return{entries:iXr(e,t),slicing:{count:t.length,noCritical:new Set(t.filter(r=>r.critical.length===0).map(r=>r.number))}}}function CXr(e){if(!(!e.repo||!e.headSha))return`${e.repo}#${e.prNumber}@${e.headSha}`}var pgt="assist:high-level-progress:",Cjo=`${pgt}head:`,kjo=720*60*60*1e3,sle=e=>`${pgt}${e}`,hgt=e=>`${Cjo}${e}`,fgt=e=>dl(e)[0];function _jo(e,t){let r=e?fgt(sle(e)):void 0;return e&&Uv(sle(e)),r??(t?fgt(hgt(t)):void 0)}function kXr(e,t,r){return Vx(pgt,kjo),fgt(sle(e))??_jo(t,r)}function _Xr(e,t,r){Il(sle(e),[r]),t&&Il(hgt(t),[r])}function EXr(e,t){Uv(sle(e)),t&&Uv(hgt(t))}function RXr(e){let t=e;return typeof t?.id=="string"&&typeof t.title=="string"&&typeof t.reason=="string"&&(t.kind==="deterministic"||t.kind==="manual")&&["pass","fail","manual"].includes(t.status)}function yN(e,t){return Array.isArray(e)?t?e.filter(t):e:[]}var mgt=e=>typeof e=="string"?e:"";function PXr(e){return{repo:mgt(e.repo),prNumber:typeof e.prNumber=="number"?e.prNumber:0,headSha:mgt(e.headSha),body:mgt(e.body)}}var ggt={repo:"",prNumber:0,headSha:"",body:"",checks:[],structure:{tree:[],added:0,removed:0,modified:0,additions:0,deletions:0},criticalDiffs:[],criticalPaths:[],tests:[],testPaths:[],collapsedPaths:[]};function AXr(e){let t;try{t=JSON.parse(e)}catch{return ggt}return typeof t!="object"||t===null?ggt:{...PXr(t),checks:yN(t.checks,RXr),structure:{...ggt.structure,...t.structure},criticalDiffs:yN(t.criticalDiffs),criticalPaths:yN(t.criticalPaths),tests:yN(t.tests),testPaths:yN(t.testPaths),collapsedPaths:yN(t.collapsedPaths),...Array.isArray(t.slices)?{slices:t.slices}:{},...t.manualTesting?{manualTesting:t.manualTesting}:{},...t.saved?{saved:t.saved}:{},...t.draft?{draft:t.draft}:{}}}function LXr(e){let t=(0,WPe.useMemo)(()=>AXr(e.body),[e.body]),r=(0,WPe.useMemo)(()=>wXr(t),[t]),n=CXr(t),o=(0,WPe.useMemo)(()=>kXr(e.requestId,e.supersedes,n)??t.draft??t.saved,[e.requestId,e.supersedes,n,t]);return{payload:t,sliced:r,progress:o,head:n}}var IXr=S(re(),1);function DXr(e){let[t,r]=(0,IXr.useState)(()=>e?.reviewComments??[]);return{queued:t,onQueue:n=>r(o=>[...o,n]),onRemove:n=>r(o=>o.filter((i,a)=>a!==n)),onEdit:(n,o)=>r(i=>i.map((a,s)=>s===n?{...a,note:o}:a))}}var MXr=S(re(),1);function NXr(e,t,r,n){(0,MXr.useEffect)(()=>{_Xr(e,t,{items:r,reviewComments:n})},[e,t,r,n])}function BXr(e,t,r){let{payload:n,sliced:o,progress:i,head:a}=LXr(e),s=nXr(n.checks,i,o?.slicing),l=DXr(i),u=jKr(o?.entries??[]),{comments:d,sentTo:f,clearSent:p}=Aj(t,r),h={...d,onQueue:l.onQueue};NXr(e.requestId,a,s.items,l.queued);let m=(0,OXr.useMemo)(()=>QKr(n),[n]);return{payload:n,checklist:s,queue:l,details:ZKr(n,h),counts:m,sentTo:f,clearSent:p,sliced:o,nav:u,diffComments:h,head:a}}var IS=S(_(),1);function $Xr({preview:e,session:t,sendInput:r,onDecision:n}){let o=BXr(e,t,r);return(0,IS.jsxs)(H,{sx:o0,children:[(0,IS.jsx)(Ih,{preview:e,draft:!1}),(0,IS.jsx)(eY,{items:e.metadata??[]}),(0,IS.jsx)(qn,{}),(0,IS.jsx)(IKr,{payload:o.payload,checklist:o.checklist,details:o.details,counts:o.counts,sliced:o.sliced,nav:o.nav,comments:o.diffComments}),(0,IS.jsx)(qn,{}),(0,IS.jsx)(GKr,{pane:o,onDecision:(i,a)=>{EXr(e.requestId,o.head),n(i,a)}}),(0,IS.jsx)(pf,{sessionName:o.sentTo,onClose:o.clearSent})]})}var qXr=S(re(),1);var vN=S(_(),1);function Ejo(e){return e.topLeft===null?"Click the top-left box":e.bottomRight===null?"Now click the bottom-right box":"Both anchors picked"}function FXr({selection:e,onConfirm:t,onReject:r}){let n=e.topLeft!==null&&e.bottomRight!==null;return(0,vN.jsxs)(St,{direction:"row",spacing:1,sx:{p:2,alignItems:"center",justifyContent:"flex-end"},children:[(0,vN.jsx)(be,{variant:"body2",sx:{flex:1,color:"text.secondary"},children:Ejo(e)}),(0,vN.jsx)(nt,{color:"error",variant:"outlined",onClick:r,children:"Cancel"}),(0,vN.jsx)(nt,{variant:"outlined",onClick:e.reset,children:"Start over"}),(0,vN.jsx)(nt,{color:"success",variant:"contained",disabled:!n,onClick:t,children:"Extract boxes"})]})}var Rjo={"top-left":oc.miro.topLeft,"bottom-right":oc.miro.bottomRight};function zXr(e,t){let r=e.right-e.left,n=e.bottom-e.top;return{width:r,height:n,fontSize:Math.max(6,Math.min(n*.3,r/6,28)),radius:Math.min(8,n/4),colour:t?Rjo[t]:oc.miro.box,opacity:t?.75:.35,strokeWidth:Math.max(1,r*.004)}}var lle=S(_(),1);function HXr({box:e,role:t,onSelect:r}){let n=zXr(e,t);return(0,lle.jsxs)("g",{role:"button",tabIndex:0,"aria-label":t?`${e.text} (${t})`:e.text,onClick:()=>r(e.id),onKeyDown:o=>{o.key==="Enter"&&r(e.id)},style:{cursor:"pointer"},children:[(0,lle.jsx)("rect",{x:e.left,y:e.top,width:n.width,height:n.height,rx:n.radius,fill:n.colour,fillOpacity:n.opacity,stroke:n.colour,strokeWidth:n.strokeWidth}),(0,lle.jsx)("text",{x:e.left+n.width/2,y:e.top+n.height/2,textAnchor:"middle",dominantBaseline:"central",fontSize:n.fontSize,fill:oc.miro.text,children:e.text})]})}function UXr(e){if(e.length===0)return"0 0 100 100";let t=Math.min(...e.map(a=>a.left)),r=Math.min(...e.map(a=>a.top)),n=Math.max(...e.map(a=>a.right))-t,o=Math.max(...e.map(a=>a.bottom))-r,i=Math.max(n*.02,8);return`${t-i} ${r-i} ${n+i*2} ${o+i*2}`}var VPe=S(_(),1);function WXr({boxes:e,selection:t}){return(0,VPe.jsx)(H,{sx:{flex:1,minHeight:0,overflow:"auto",p:2},children:(0,VPe.jsx)("svg",{role:"img","aria-label":"Miro board boxes",viewBox:UXr(e),preserveAspectRatio:"xMidYMid meet",style:{width:"100%",height:"100%"},children:e.map(r=>(0,VPe.jsx)(HXr,{box:r,role:t.roleOf(r.id),onSelect:t.choose},r.id))})})}function Pjo(e){return typeof e?.id=="string"&&typeof e.text=="string"&&[e.left,e.top,e.right,e.bottom].every(t=>typeof t=="number"&&Number.isFinite(t))}function VXr(e){try{let t=JSON.parse(e);return Array.isArray(t?.boxes)?t.boxes.filter(Pjo):[]}catch{return[]}}var ygt=S(re(),1);function GXr(){let[e,t]=(0,ygt.useState)(null),[r,n]=(0,ygt.useState)(null);return{topLeft:e,bottomRight:r,choose:s=>{if(e===null||r!==null){t(s),n(null);return}n(s)},reset:()=>{t(null),n(null)},roleOf:s=>s===e?"top-left":s===r?"bottom-right":null}}var O3=S(_(),1);function jXr({preview:e,onDecision:t}){let r=(0,qXr.useMemo)(()=>VXr(e.body),[e.body]),n=GXr();return(0,O3.jsxs)(H,{sx:o0,children:[(0,O3.jsx)(Ih,{preview:e,draft:!1}),(0,O3.jsx)(qn,{}),(0,O3.jsx)(WXr,{boxes:r,selection:n}),(0,O3.jsx)(qn,{}),(0,O3.jsx)(FXr,{selection:n,onConfirm:()=>{let{topLeft:i,bottomRight:a}=n;i===null||a===null||t("approve",Vc({topLeft:i,bottomRight:a}))},onReject:()=>t("reject",Vc())})]})}var CZr=S(re(),1);function YXr(e){let t=[];return e.map(r=>(t.length=r+1,t[r]=(t[r]??0)+1,t.map(n=>n??1).join(".")))}function GPe(e){return e*22}function KXr(e){return Math.round(e/22)}var XXr={display:"flex",alignItems:"flex-start",gap:.25,"& .criterion-action":{opacity:0,transition:"opacity 120ms"},"&:hover .criterion-action":{opacity:1},"&:focus-within .criterion-action":{opacity:1},"& .criterion-action:focus-visible":{opacity:1}},ZXr={p:.25,mt:"2px",color:"text.disabled",cursor:"grab",touchAction:"none","&:active":{cursor:"grabbing"}},QXr={fontFamily:"fontFamilyMono",fontSize:"0.8rem",color:"text.secondary",minWidth:32,pt:"5px",textAlign:"right",userSelect:"none",whiteSpace:"nowrap"},JXr={flex:1,fontSize:"inherit",lineHeight:1.5,px:.75,py:0,borderRadius:1,"&:hover":{bgcolor:"action.hover"},"&.Mui-focused":{bgcolor:"action.selected"}},vgt={p:.25,mt:"2px"},eZr={position:"absolute",right:8,height:2,borderRadius:1,bgcolor:"primary.main",pointerEvents:"none"};var rZr=S(_(),1),Ajo=8;function tZr({drag:e}){return e?(0,rZr.jsx)(H,{sx:eZr,style:{top:e.top-1,left:Ajo+GPe(e.depth)}}):null}var nZr=S(_(),1),oZr=ot((0,nZr.jsx)("path",{d:"M11 18c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2 2m-2-8c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0-6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m6 4c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2"}),"DragIndicator");var bgt=S(_(),1);function iZr({number:e,onGrip:t}){return(0,bgt.jsx)(Mt,{size:"small",className:"criterion-action",sx:ZXr,"aria-label":`Reorder criterion ${e}`,onPointerDown:t,children:(0,bgt.jsx)(oZr,{fontSize:"inherit"})})}var sk=S(_(),1);function aZr({number:e,onAdd:t,onDelete:r}){return(0,sk.jsxs)(sk.Fragment,{children:[(0,sk.jsx)(Mt,{size:"small",className:"criterion-action",sx:vgt,"aria-label":`Add criterion after ${e}`,onClick:t,children:(0,sk.jsx)(Kd,{fontSize:"inherit"})}),(0,sk.jsx)(Mt,{size:"small",className:"criterion-action",sx:vgt,"aria-label":`Delete criterion ${e}`,onClick:r,children:(0,sk.jsx)(_o,{fontSize:"inherit"})})]})}var qPe=S(re(),1);function sZr(e,t){return e==="start"?0:e==="end"?t:Math.min(Math.max(e,0),t)}function lZr(e){let t=(0,qPe.useRef)(null);return(0,qPe.useEffect)(()=>{let r=t.current;if(!e||!r)return;r.focus();let n=sZr(e.caret,r.value.length);r.setSelectionRange(n,n)},[e]),t}var bN=S(_(),1);function cZr({index:e,number:t,item:r,outline:n,dragging:o,onGrip:i}){let a=lZr(n.focus?.index===e?n.focus:null),s={marginLeft:GPe(r.depth),opacity:o?.4:1};return(0,bN.jsxs)(H,{sx:XXr,"data-criterion-row":!0,style:s,children:[(0,bN.jsx)(iZr,{number:t,onGrip:i}),(0,bN.jsx)(H,{component:"span",sx:QXr,"aria-hidden":"true",children:`${t}.`}),(0,bN.jsx)(zi,{multiline:!0,value:r.text,sx:JXr,inputRef:a,inputProps:{"aria-label":`Criterion ${t}`},onChange:l=>n.onText(e,l.target.value),onKeyDown:l=>n.onKeyDown(e,l)}),(0,bN.jsx)(aZr,{number:t,onAdd:()=>n.onAdd(e),onDelete:()=>n.onDelete(e)})]})}var gZr=S(re(),1);function uZr(e,t,{key:r,shift:n,alt:o,caret:i,text:a}){return o||n?null:r==="ArrowUp"&&i===0&&t>0?{kind:"focus",index:t-1}:r==="ArrowDown"&&i===a.length&&t<e.length-1?{kind:"focus",index:t+1}:null}function B3(e){if(e.length===0)return[{text:"",depth:0}];let t=-1;return e.map(r=>{let n=Math.min(Math.max(r.depth,0),t+1);return t=n,r.depth===n?r:{...r,depth:n}})}function jPe(e,t,r,n){let o=e[t]?.depth??0,i=e.map((a,s)=>s===t?{...a,text:r}:a);return{items:B3([...i.slice(0,t+1),{text:n,depth:o},...i.slice(t+1)]),index:t+1}}function cg(e,t){let r=t+1;for(;r<e.length&&e[r].depth>e[t].depth;)r+=1;return r}function YPe(e,t){let r=e[t].depth;for(let n=t-1;n>=0;n-=1){if(e[n].depth<r)return-1;if(e[n].depth===r)return n}return-1}function dZr(e,t){let r=cg(e,t);return r<e.length&&e[r].depth===e[t].depth?r:-1}function fZr(e,t,r){let n=r<0?YPe(e,t):dZr(e,t);if(n<0)return null;let o=cg(e,t),i=e.slice(t,o),a=[...e.slice(0,t),...e.slice(o)],s=r<0?n:cg(e,n)-(o-t);return{items:[...a.slice(0,s),...i,...a.slice(s)],index:s}}function KPe(e,t){let r=cg(e,t),n=e.map((o,i)=>i>t&&i<r?{...o,depth:o.depth-1}:o).filter((o,i)=>i!==t);return{items:B3(n),index:Math.max(0,t-1)}}function pZr(e,t,r){if(r<0&&e[t].depth===0||r>0&&YPe(e,t)<0)return null;let n=cg(e,t);return e.map((o,i)=>i>=t&&i<n?{...o,depth:o.depth+r}:o)}function XPe(e,t){return e?{kind:"edit",edit:e,caret:t}:null}function Ljo(e,t,{caret:r,text:n}){let o=n.slice(0,r);return XPe(jPe(e,t,o,n.slice(r)),"start")}function Ijo(e,t,{shift:r,caret:n}){let o=pZr(e,t,r?-1:1);return XPe(o?{items:o,index:t}:null,n)}function hZr(e,t,r){let{key:n,shift:o,alt:i,caret:a,text:s}=r;return n==="Enter"&&!o?Ljo(e,t,r):n==="Tab"?Ijo(e,t,r):i&&(n==="ArrowUp"||n==="ArrowDown")?XPe(fZr(e,t,n==="ArrowUp"?-1:1),a):n==="Backspace"&&a===0&&s===""?XPe(KPe(e,t),"end"):null}function mZr(e,t,r){return hZr(e,t,r)??uZr(e,t,r)}function yZr(e,t){let[r,n]=(0,gZr.useState)(null),o=(a,s)=>{a&&(t(a.items),n({index:a.index,caret:s}))};return{focus:r,onKeyDown:(a,s)=>{let l=s.currentTarget;(s.key==="Enter"||s.key==="Tab")&&s.preventDefault();let u=mZr(e,a,{key:s.key,shift:s.shiftKey,alt:s.altKey,caret:l.selectionStart??0,text:l.value});u&&(s.preventDefault(),u.kind==="focus"?n({index:u.index,caret:"end"}):o(u.edit,u.caret))},onDrop:a=>o(a,"end"),onText:(a,s)=>t(e.map((l,u)=>u===a?{...l,text:s}:l)),onAdd:a=>o(jPe(e,a,e[a].text,""),"start"),onDelete:a=>o(KPe(e,a),"end")}}var TZr=S(re(),1);function Djo(e,t,r,n){let o=t.length;for(let a=0;a<e.length;a+=1)if(n<e[a].top+e[a].height/2){o=a;break}let i=cg(t,r);return o>r&&o<i?r:o}function Mjo(e,t,r,n){let o=cg(e,t),i=r-1,a=i>=t&&i<o?t-1:i,s=a>=0?e[a].depth+1:0;return Math.max(0,Math.min(e[t].depth+KXr(n),s))}function Njo(e,t){if(t<e.length)return e[t].top;let r=e[e.length-1];return r?r.top+r.height:0}function vZr(e,t,r,n,o){let i=Djo(e,t,r,o);return{target:i,depth:Mjo(t,r,i,n),top:Njo(e,i)}}function Ojo(e){let t=e.getBoundingClientRect().top;return{boxes:Array.from(e.querySelectorAll("[data-criterion-row]")).map(n=>{let o=n.getBoundingClientRect();return{top:o.top-t,height:o.height}}),origin:t}}function bZr(e,t,r,n){return o=>{let{boxes:i,origin:a}=Ojo(t);return vZr(i,e,r,o.clientX-n,o.clientY-a)}}function xZr(e,t,r,n,o){let i=new AbortController,a=null,s=d=>{a=r(d),n(a)},l=()=>{i.abort(),a&&o(a)},u={signal:i.signal};return e.setPointerCapture(t),e.addEventListener("pointermove",s,u),e.addEventListener("pointerup",l,u),e.addEventListener("pointercancel",l,u),s}function SZr(e,t,r,n){let o=cg(e,t),i=n-e[t].depth,a=e.slice(t,o).map(u=>({...u,depth:Math.max(0,u.depth+i)})),s=[...e.slice(0,t),...e.slice(o)],l=r>t?r-a.length:r;return{items:B3([...s.slice(0,l),...a,...s.slice(l)]),index:l}}function wZr(e,t,r){let[n,o]=(0,TZr.useState)(null);return{drag:n,onGrip:a=>s=>{let l=t.current;if(!l||s.pointerType==="mouse"&&s.button!==0)return;s.preventDefault(),xZr(s.currentTarget,s.pointerId,bZr(e,l,a,s.clientX),d=>o({from:a,depth:d.depth,top:d.top}),d=>{o(null),r(SZr(e,a,d.target,d.depth))})(s)}}}var cle=S(_(),1),Bjo={my:1,px:1,py:.5,border:1,borderColor:"divider",borderRadius:1,position:"relative",userSelect:"text",cursor:"auto"},$jo=[{text:"",depth:0}];function kZr({items:e,onChange:t}){let r=(0,CZr.useRef)(null),n=e.length>0?e:$jo,o=yZr(n,t),{drag:i,onGrip:a}=wZr(n,r,o.onDrop),s=YXr(n.map(l=>l.depth));return(0,cle.jsxs)(H,{sx:Bjo,ref:r,"data-preview-skip":!0,"aria-label":"Acceptance criteria",children:[n.map((l,u)=>(0,cle.jsx)(cZr,{index:u,number:s[u],item:l,outline:o,dragging:i?.from===u,onGrip:a(u)},`criterion-${u}`)),(0,cle.jsx)(tZr,{drag:i})]})}var _Zr=S(_(),1),EZr=ot((0,_Zr.jsx)("path",{d:"M2 17h2v.5H3v1h1v.5H2v1h3v-4H2zm1-9h1V4H2v1h1zm-1 3h1.8L2 13.1v.9h3v-1H3.2L5 10.9V10H2zm5-6v2h14V5zm0 14h14v-2H7zm0-6h14v-2H7z"}),"FormatListNumbered");var ule=S(_(),1),Fjo={insert:"Add acceptance criteria",convert:"Convert to outline"};function RZr({kind:e,onClick:t}){return(0,ule.jsx)(H,{sx:{my:1},"data-preview-skip":!0,children:(0,ule.jsx)(nt,{size:"small",variant:"outlined",startIcon:e==="insert"?(0,ule.jsx)(Kd,{}):(0,ule.jsx)(EZr,{}),onClick:t,children:Fjo[e]})})}var dle=S(re(),1);function PZr(e,t,{color:r,pin:n}){let o=I6(e),i=[],a=o.nextNode();for(;a;){let u=a;if(t.intersectsNode(u)){let d=u===t.startContainer?t.startOffset:0,f=u===t.endContainer?t.endOffset:u.length;d<f&&i.push({node:u,start:d,end:f})}a=o.nextNode()}let l=i.map(u=>zjo(u.node,u.start,u.end,r)).at(-1);l&&n&&(l.dataset.pin=n)}function zjo(e,t,r,n){let o=document.createRange();o.setStart(e,t),o.setEnd(e,r);let i=document.createElement("mark");return i.className="pr-comment",i.style.backgroundColor=n,o.surroundContents(i),i}function AZr(e){for(let t of e.querySelectorAll("mark.pr-comment"))if(t.parentNode){for(;t.firstChild;)t.before(t.firstChild);t.remove()}}function LZr(e,t){for(let r of t){let n=cNt(e,r);n&&PZr(e,n,r)}}var fle=S(_(),1);function IZr({content:e,control:t,trailing:r,ranges:n,contentRef:o}){let i=(0,dle.useMemo)(()=>OD(e),[e]),a=(0,dle.useMemo)(()=>OD(r??""),[r]);return(0,dle.useLayoutEffect)(()=>{let s=o.current;s&&(AZr(s),LZr(s,n))},[i,a,n,o]),(0,fle.jsxs)(H,{ref:o,children:[(0,fle.jsx)(ID,{segments:i,skipDiagramText:!0}),t,t?(0,fle.jsx)(ID,{segments:a,skipDiagramText:!0}):null]})}var xN=e=>e.split(",").map(t=>`&& .markdown ${t.trim()}`).join(", ");function ZPe(e){let{color:t,radius:r}=e.tokens;return{px:2.5,py:2,fontSize:14,lineHeight:1.6,[xN("")]:{lineHeight:1.6},[xN("h1, h2, h3, h4, h5, h6")]:{fontSize:15,fontWeight:600,lineHeight:1.4,mt:2,mb:1},[xN("ul, ol")]:{pl:2.5,mb:2},[xN("li")]:{mb:"6px"},[xN("code")]:{fontFamily:e.typography.fontFamilyMono,fontSize:"0.86em",px:"5px",py:0,bgcolor:t.raised,border:1,borderColor:t.lineSoft,borderRadius:"4px"},[xN("pre")]:{bgcolor:t.raised,border:1,borderColor:t.lineSoft,borderRadius:`${r.sm}px`},[xN("pre code")]:{border:0,px:0,bgcolor:"transparent"}}}var DZr=e=>({flex:1,overflow:"auto",position:"relative",userSelect:"none",cursor:"text",wordBreak:"break-word","& .markdown":{...G$(e),maxWidth:"none"},"& a":{color:"primary.main"},"& mark.pr-comment":{color:"inherit",borderRadius:"2px"},...ZPe(e)});var rY=S(_(),1);function MZr({content:e,control:t,trailing:r,ranges:n,wrapperRef:o,contentRef:i,dragRects:a,dragColor:s,onMouseDown:l,footer:u}){return(0,rY.jsxs)(H,{ref:o,onMouseDown:l,sx:DZr,children:[(0,rY.jsx)(IZr,{content:e,control:t,trailing:r,ranges:n,contentRef:i}),u&&(0,rY.jsx)(H,{sx:{userSelect:"text"},children:u}),(0,rY.jsx)(N$,{rects:a,color:s})]})}function NZr(e){let t=new Map,r=[];for(let n of e){if(!n.group){r.push(n);continue}t.set(n.group,[...t.get(n.group)??[],n])}return{groups:[...t],ungrouped:r}}var QPe=S(re(),1),OZr=S(_(),1);function xgt({label:e,value:t,onCommit:r,listId:n}){let[o,i]=(0,QPe.useState)(t);return(0,QPe.useEffect)(()=>i(t),[t]),(0,OZr.jsx)(An,{size:"small",variant:"standard",fullWidth:!0,label:e,value:o,onChange:s=>i(s.target.value),onBlur:()=>{let s=o.trim();i(t),s!==t&&r(s)},onKeyDown:s=>{s.key==="Enter"&&s.target.blur()},onMouseDown:s=>s.stopPropagation(),slotProps:{htmlInput:{list:n}}})}var ple=S(_(),1),Sgt="screenshot-groups";function Hjo(e){return(e.split(/[\\/]/).pop()??e).replace(/\.[^.]+$/,"")}function BZr({screenshot:e,onUpdate:t}){return(0,ple.jsxs)(St,{direction:"row",spacing:1,sx:{mt:.5},children:[(0,ple.jsx)(xgt,{label:"Caption",value:e.alt,onCommit:r=>t(e.id,{alt:r||Hjo(e.path)})}),(0,ple.jsx)(xgt,{label:"Group",value:e.group??"",listId:Sgt,onCommit:r=>t(e.id,{group:r})})]})}var $3=S(_(),1),$Zr={display:"block",maxWidth:"100%",borderRadius:1,border:1,borderColor:"divider"},Ujo={position:"absolute",top:4,right:4,bgcolor:"background.paper","&:hover":{bgcolor:"background.paper"}};function FZr({screenshot:e,onRemove:t,onUpdate:r}){let n=e.contentType.startsWith("video/");return(0,$3.jsxs)(H,{sx:{position:"relative"},children:[n?(0,$3.jsx)(H,{component:"video",controls:!0,src:e.url,"aria-label":"screenshot",sx:$Zr}):(0,$3.jsx)(H,{component:"img",src:e.url,alt:"screenshot",sx:$Zr}),(0,$3.jsx)(Mt,{size:"small","aria-label":"Remove screenshot",sx:Ujo,onMouseDown:o=>o.stopPropagation(),onClick:()=>t(e.id),children:(0,$3.jsx)(_o,{fontSize:"small"})}),(0,$3.jsx)(BZr,{screenshot:e,onUpdate:r})]})}var f0=S(_(),1);function Wjo(){return(0,f0.jsxs)(St,{direction:"row",spacing:1,sx:{alignItems:"center"},children:[(0,f0.jsx)(io,{size:16}),(0,f0.jsx)(be,{variant:"caption",color:"text.secondary",children:"Attaching screenshot or video\u2026"})]})}function Vjo({error:e}){return(0,f0.jsx)(be,{variant:"caption",color:"error",sx:{wordBreak:"break-word"},children:e})}function zZr({uploads:e,empty:t}){return e.length>0?(0,f0.jsx)(f0.Fragment,{children:e.map(r=>r.error?(0,f0.jsx)(Vjo,{error:r.error},r.id):(0,f0.jsx)(Wjo,{},r.id))}):t?(0,f0.jsx)(be,{variant:"caption",color:"text.secondary",children:"Drop or paste an image or video to attach"}):null}var p0=S(_(),1),Gjo={display:"grid",gridTemplateColumns:"repeat(2, minmax(0, 1fr))",gap:1};function HZr({screenshots:e,uploads:t,onRemove:r,onUpdate:n}){let{groups:o,ungrouped:i}=NZr(e),a=s=>(0,p0.jsx)(FZr,{screenshot:s,onRemove:r,onUpdate:n},s.id);return(0,p0.jsxs)(H,{sx:{mt:3},children:[e.length>0&&(0,p0.jsx)(H,{component:"h2",children:"Screenshots"}),(0,p0.jsx)("datalist",{id:Sgt,children:o.map(([s])=>(0,p0.jsx)("option",{value:s},s))}),o.map(([s,l])=>(0,p0.jsxs)(H,{sx:{mb:2},children:[(0,p0.jsx)(H,{component:"h3",children:s}),(0,p0.jsx)(H,{sx:Gjo,children:l.map(a)})]},s)),(0,p0.jsxs)(St,{spacing:1,children:[i.map(a),(0,p0.jsx)(zZr,{uploads:t,empty:e.length===0})]})]})}var hle=S(_(),1);function qjo(e){let t=e.criteria;if(!t)return{content:e.body};let r={content:t.before,trailing:t.after};return t.kind==="outline"?{...r,control:(0,hle.jsx)(kZr,{items:t.items,onChange:e.onCriteriaChange})}:{...r,control:(0,hle.jsx)(RZr,{kind:t.kind,onClick:t.kind==="insert"?e.onCriteriaInsert:e.onCriteriaConvert})}}function JPe({pane:e,screenshots:t}){return(0,hle.jsx)(MZr,{...qjo(e),ranges:e.ranges,wrapperRef:e.wrapperRef,contentRef:e.contentRef,dragRects:e.dragRects,dragColor:e.dragColor,onMouseDown:e.onMouseDown,footer:t?(0,hle.jsx)(HZr,{screenshots:e.screenshots,uploads:e.uploads,onRemove:e.removeScreenshot,onUpdate:e.updateScreenshot}):void 0})}var UZr=e=>({display:"grid",gap:1,maxHeight:220,overflow:"auto",px:2,py:1.25,borderTop:1,borderColor:e.tokens.color.lineSoft}),WZr={fontSize:11,fontWeight:600,letterSpacing:"0.06em",textTransform:"uppercase",color:"text.secondary"},VZr=e=>({display:"grid",gridTemplateColumns:"minmax(0, 1fr) auto",gap:"4px 8px",px:1.25,py:1,borderRadius:`${e.tokens.radius.sm}px`,bgcolor:e.tokens.color.raised,border:1,borderColor:e.tokens.color.lineSoft,fontSize:12.5}),GZr={gridColumn:2,gridRow:1,width:20,height:20,color:"text.disabled","& .MuiSvgIcon-root":{fontSize:14}};var lk=S(_(),1);function qZr({comments:e,colors:t,onRemove:r}){return(0,lk.jsxs)(H,{sx:UZr,children:[(0,lk.jsxs)(be,{sx:WZr,children:["Comments (",e.length,")"]}),e.map((n,o)=>(0,lk.jsxs)(H,{sx:VZr,children:[(0,lk.jsx)(L$,{text:n.quote,sx:{gridColumn:1,borderLeft:2,pl:1,borderColor:t[o]}}),(0,lk.jsx)(H,{sx:{gridColumn:1,wordBreak:"break-word"},children:n.note}),(0,lk.jsx)(Mt,{"aria-label":"Remove comment",onClick:()=>r(n.id),sx:GZr,children:(0,lk.jsx)(_o,{})})]},n.id))]})}var YZr=S(_(),1);function jZr(e){return e.comments.length===0?null:(0,YZr.jsx)(qZr,{...e})}var KZr=S(_(),1),eAe=ot((0,KZr.jsx)("path",{d:"M20 18c1.1 0 1.99-.9 1.99-2L22 6c0-1.1-.9-2-2-2H4c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2H0v2h24v-2zM4 6h16v10H4z"}),"Computer");var tQr=S(re(),1);var XZr=S(_(),1),ZZr=ot((0,XZr.jsx)("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2"}),"Circle");var h0="0.1190.3";var jjo={connected:"success.main",connecting:"warning.main",disconnected:"error.main","version-blocked":"error.main"};function QZr(e){return e?jjo[e]:"success.main"}function JZr(e){return e.split("-")[0].split(".").map(Number)}function eQr(e,t){if(!e||!t||e===t)return;let r=JZr(e),n=JZr(t);for(let o=0;o<Math.max(r.length,n.length);o++){let i=(r[o]??0)-(n[o]??0);if(Number.isNaN(i))return;if(i!==0)return i<0?"behind":"ahead"}}var tAe=S(re(),1),Tgt=(0,tAe.createContext)(null);function rAe(){return(0,tAe.useContext)(Tgt)}var SN=S(_(),1),Yjo={height:16,fontSize:10},Kjo={opacity:.6,fontSize:"0.85em"};function Xjo(e,t){if(t===e.local)return"this machine";let r=e.links.find(n=>n.name===t);return r?r.error?`${r.state}: ${r.error}`:r.state:""}function F3({nodes:e,name:t,showVersion:r=!1}){let n=rAe()??h0,o=e.links.find(a=>a.name===t),i=eQr(o?.peerVersion,n);return(0,SN.jsx)(lr,{title:Xjo(e,t),placement:"right",children:(0,SN.jsxs)(H,{component:"span",sx:{display:"inline-flex",alignItems:"center",gap:.75},children:[(0,SN.jsx)(ZZr,{sx:{fontSize:8,color:QZr(o?.state)}}),t,r&&o?.peerVersion&&(0,SN.jsxs)(H,{component:"span",sx:Kjo,children:["v",o.peerVersion]}),i&&(0,SN.jsx)(yn,{label:i,size:"small",color:i==="behind"?"warning":"info",sx:Yjo})]})})}var m0=S(_(),1),Zjo={textTransform:"none"};function nAe({nodes:e,options:t,target:r,onPick:n}){let[o,i]=(0,tQr.useState)(null);return(0,m0.jsxs)(m0.Fragment,{children:[(0,m0.jsx)(nt,{size:"small",color:"inherit",startIcon:(0,m0.jsx)(eAe,{fontSize:"small"}),"aria-label":"Start on node","aria-haspopup":"menu",onClick:a=>i(a.currentTarget),sx:Zjo,children:(0,m0.jsx)(F3,{nodes:e,name:r.node})}),(0,m0.jsx)(fi,{anchorEl:o,open:!!o,onClose:()=>i(null),children:t.map(({name:a,cwd:s})=>(0,m0.jsx)(Br,{disabled:!s,selected:a===r.node,onClick:()=>{n(a),i(null)},children:(0,m0.jsx)(Vu,{primary:(0,m0.jsx)(F3,{nodes:e,name:a}),secondary:s?void 0:"no clone"})},a))})]})}var rQr=S(re(),1);function Qjo(e,t){return e?.toLowerCase()===t.toLowerCase()}function oAe(e,t){let{nodes:r,names:n,visible:o}=ds(),{repos:i,selectedCwd:a,selectedNode:s,cloneOn:l,originOf:u}=_n(),[d,f]=(0,rQr.useState)(),p=e&&u(e)?e:a,h=t?i.find(b=>Qjo(u(b),t)):p,m=n.map(b=>({name:b,cwd:h?l(h,b):void 0})),g=b=>m.find(x=>x.name===b&&x.cwd),y=g(d)??g(s??r?.local)??m.find(b=>b.cwd),v=o&&y?.cwd?{node:y.name,cwd:y.cwd}:void 0;return{nodes:r,visible:o,options:m,target:v,pick:f}}var z3=S(_(),1);function nQr({canStart:e,startOrigin:t,cwd:r,onApprove:n,onApproveAndStart:o}){let i=Qme(),a=oAe(r,t);return(0,z3.jsxs)(z3.Fragment,{children:[(0,z3.jsx)(nt,{color:"primary",variant:e?"tonal":"contained",onClick:n,...e?{}:i,children:"Approve"}),e&&a.nodes&&a.target&&(0,z3.jsx)(nAe,{nodes:a.nodes,options:a.options,target:a.target,onPick:a.pick}),e&&(0,z3.jsx)(nt,{color:"primary",variant:"contained",onClick:()=>o(a.target),...i,children:"Approve & start"})]})}var wgt=S(_(),1),Jjo={"& .MuiFormControlLabel-label":{fontSize:12}};function mle({label:e,title:t,checked:r,onChange:n}){return(0,wgt.jsx)($d,{control:(0,wgt.jsx)(Dp,{size:"small",checked:r,onChange:o=>n(o.target.checked)}),label:e,title:t,sx:Jjo})}var TN=S(_(),1);function iAe({chain:e,newPr:t,onChange:r}){return(0,TN.jsxs)(St,{direction:"row",sx:{mr:"auto"},children:[t&&(0,TN.jsx)(mle,{label:"Draft",title:"Create the PR as a draft rather than ready for review",checked:e.draft,onChange:n=>r({...e,draft:n,autoMerge:n?!1:e.autoMerge})}),(0,TN.jsx)(mle,{label:"Auto-merge (squash)",title:"Squash-merge the PR automatically once its required checks pass",checked:e.autoMerge,onChange:n=>r({...e,autoMerge:n,draft:n?!1:e.draft})}),(0,TN.jsx)(mle,{label:"Review PR",title:"After raising, run a review that posts its findings and then addresses them",checked:e.reviewAfter,onChange:n=>r({...e,reviewAfter:n})}),(0,TN.jsx)(mle,{label:"Post to Slack",title:"Announce the PR in Slack at the tail of the chain",checked:e.announceAfter,onChange:n=>r({...e,announceAfter:n})})]})}var wN=S(_(),1);function oQr({commentCount:e,chain:t,newPr:r,canStart:n,startOrigin:o,onChainChange:i,onApprove:a,cwd:s,onApproveAndStart:l,onReject:u,onRequestChanges:d}){return(0,wN.jsxs)(St,{direction:"row",spacing:1,sx:{px:2,py:1.5,alignItems:"center",justifyContent:"flex-end"},children:[t&&(0,wN.jsx)(iAe,{chain:t,newPr:r,onChange:i}),(0,wN.jsx)(nt,{color:"error",variant:"outlined",onClick:u,children:"Reject"}),e>0&&(0,wN.jsxs)(nt,{color:"warning",variant:"tonal",onClick:d,children:["Request changes (",e,")"]}),(0,wN.jsx)(nQr,{canStart:n,startOrigin:o,cwd:s,onApprove:a,onApproveAndStart:l})]})}var aQr=S(_(),1);function iQr({comments:e,cwd:t,onDecision:r,chain:n,newPr:o,canStart:i,startOrigin:a,onChainChange:s}){let l=()=>e.map(u=>({quote:u.quote,note:u.note}));return(0,aQr.jsx)(oQr,{commentCount:e.length,chain:n,newPr:o,canStart:i,startOrigin:a,onChainChange:s,onApprove:()=>r("approve",l()),cwd:t,onApproveAndStart:u=>r("approve",l(),u??!0),onReject:()=>r("reject",[]),onRequestChanges:()=>r("reject",l())})}var ck=S(_(),1);function sQr(e){let{comments:t,commentColors:r,pending:n,cwd:o,unavailable:i,onAdd:a,onQueue:s,onCite:l,onAddRule:u,onRemove:d,onCancel:f,onCollapse:p,editable:h}=e;return(0,ck.jsxs)(ck.Fragment,{children:[(0,ck.jsx)(jZr,{comments:t,colors:r,onRemove:d}),(0,ck.jsx)(qn,{}),(0,ck.jsx)(iQr,{...e}),(0,ck.jsx)(pye,{pending:n,editable:h,cwd:o,unavailable:i,onAdd:a,onQueue:s,onCite:l,onAddRule:u,onCancel:f,onCollapse:p})]})}var gle=S(_(),1),eYo={px:2,pb:2,display:"flex",alignItems:"center",gap:1.5,minWidth:0},tYo={color:"text.secondary",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"};function lQr({url:e}){return(0,gle.jsxs)(H,{sx:eYo,children:[(0,gle.jsx)(nt,{variant:"contained",href:e,target:"_blank",rel:"noopener noreferrer",sx:{flexShrink:0},children:"Open design \u2197"}),(0,gle.jsx)(be,{variant:"body2",sx:tYo,title:e,children:e})]})}var Cgt=S(_(),1);function cQr({preview:e}){let t=e.kind==="design"?e.metadata?.[0]?.url:void 0;return t?(0,Cgt.jsx)(lQr,{url:t}):(0,Cgt.jsx)(eY,{items:e.metadata??[]})}function uQr({preview:e,pane:t,cwd:r,isPr:n,editable:o,sender:i,onCite:a,onAddRule:s}){return{comments:t.comments,commentColors:t.commentColors,pending:t.pending,cwd:r,unavailable:i.unavailable,onAdd:i.onSend,onQueue:t.onAdd,onCite:a,onAddRule:s,onRemove:t.remove,onCancel:t.onCancel,onCollapse:t.onCollapse,onDecision:t.onDecide,chain:n?t.chain:void 0,editable:o,newPr:n&&e.prNumber===null,canStart:e.kind==="backlog-item"&&e.canStart===!0,startOrigin:e.startOrigin,onChainChange:t.setChain}}function nY(e){let t=e??"pr";return{isPr:t==="pr",screenshots:t==="pr"||t==="github-issue"||t==="github-issue-edit",editable:t==="github-issue-edit",closeOnly:t==="show"}}function dQr(e,t){return e?`${e}:${t??"pr"}`:void 0}function aAe(e,t,r,n){return{...nY(e.kind),requestId:e.requestId,supersedes:e.supersedes,sessionId:t,cwd:r,onDecision:n,screenshotScope:dQr(t,e.kind),seededScreenshots:e.screenshots??[],chainDefaults:{draft:e.draft===!0,reviewAfter:e.reviewAfter??!0},initialBody:e.body}}function fQr(e,t,r,n){if(!(!e||!t))return o=>{r!==void 0&&ul(t,e,t_e({quote:r,note:o})),n()}}function pQr(e,t,r,n){if(!(!e||!t))return o=>{r!==void 0&&ul(t,e,Wx(r,eye(o))),n()}}function sAe(e,t,r,n){return{onCite:pQr(e,t,r,n),onAddRule:fQr(e,t,r,n)}}function hQr(e){return{criteria:e.criteria,onCriteriaChange:e.writeCriteria,onCriteriaInsert:e.insertCriteria,onCriteriaConvert:e.convertCriteria}}var wQr=S(re(),1);var uk=S(re(),1);var mQr="assist:pr-preview-comments:",kgt=e=>`${mQr}${e}`;function _gt(e){return dl(kgt(e))}function yle(e,t){Il(kgt(e),t)}function lAe(e){Uv(kgt(e))}function gQr(){Vx(mQr)}function yQr(e){let t=I6(e),r="";for(let n=t.nextNode();n;n=t.nextNode())r+=n.textContent??"";return r}function rYo(e,t,r){let n=-1;for(let o=e.indexOf(t);o!==-1;o=e.indexOf(t,o+1))(n===-1||Math.abs(o-r)<Math.abs(n-r))&&(n=o);return n}function vQr(e,t){return e.flatMap(r=>{let n=rYo(t,r.quote,r.start);return n===-1?[]:[{...r,start:n,end:n+r.quote.length}]})}function bQr(e,t,r){let n=_gt(e);if(n.length>0||!t||!r)return n;let o=vQr(_gt(t),yQr(r));return yle(e,o),lAe(t),o}function xQr(e,t,r){let[n,o]=(0,uk.useState)([]),i=(0,uk.useRef)(0);(0,uk.useEffect)(()=>{gQr(),o(bQr(e,t,r.current).map(l=>({...l,id:i.current++})))},[e,t,r]);let a=(0,uk.useCallback)(l=>{o(u=>{let d=[...u,{...l,id:i.current++}];return yle(e,d),d})},[e]),s=(0,uk.useCallback)(l=>{o(u=>{let d=u.filter(f=>f.id!==l);return yle(e,d),d})},[e]);return{comments:n,add:a,remove:s}}function SQr(e,t){let r=e.map((i,a)=>mG(a).solid),n=mG(e.length).fill,o=e.map((i,a)=>({start:i.start,end:i.end,color:mG(a).fill,pin:String(a+1)}));return t&&o.push({start:t.start,end:t.end,color:n}),{commentColors:r,dragColor:n,ranges:o}}function TQr(e,t,r,n){return{onAdd:o=>{e&&t({quote:e.quote,note:o,start:e.start,end:e.end}),n()},onCollapse:()=>{e&&r(e.quote),n()}}}function CQr(e,t,r){let{wrapperRef:n,contentRef:o,pending:i,dragRects:a,onMouseDown:s,clear:l,select:u}=Vy(),{comments:d,add:f,remove:p}=xQr(e,t,o),{commentColors:h,dragColor:m,ranges:g}=(0,wQr.useMemo)(()=>SQr(d,i),[d,i]),{onAdd:y,onCollapse:v}=TQr(i,f,r,l);return{wrapperRef:n,contentRef:o,onMouseDown:s,comments:d,commentColors:h,remove:p,pending:i,ranges:g,dragRects:a,dragColor:m,onAdd:y,onCollapse:v,onCancel:l,onSelect:u}}var uAe=S(re(),1);var Egt="assist:preview-screenshots:",Rgt=e=>`${Egt}${e}`,cAe=e=>`${Egt}seeded:${e}`;function kQr(e){return e?(Vx(Egt),dl(Rgt(e)).filter(t=>typeof t.path=="string")):[]}function CN(e,t){e&&Il(Rgt(e),t.map(({path:r,alt:n,group:o,contentType:i,seeded:a})=>({path:r,alt:n,group:o,contentType:i,seeded:a})))}function _Qr(e){e&&(Uv(Rgt(e)),Uv(cAe(e)))}var kN=S(re(),1);var EQr={"image/png":"png","image/jpeg":"jpg","image/gif":"gif","image/webp":"webp","image/svg+xml":"svg","video/mp4":"mp4","video/webm":"webm","video/quicktime":"mov"};function nYo(e){let t=e.split(".").pop()?.toLowerCase();return Object.entries(EQr).find(([,n])=>n===t)?.[0]??"application/octet-stream"}function RQr(e){return e.map(t=>({...t,contentType:nYo(t.path),seeded:!0}))}function PQr(e,t,r){if(!e)return RQr(r);let n=kQr(e);if(dl(cAe(e))[0]===t)return n;let o=[...RQr(r),...n.filter(i=>!i.seeded)];return CN(e,o),Il(cAe(e),[t]),o}function AQr(e,t){let r=new URLSearchParams({path:e});return t&&r.set("node",t),rv(`/api/pr-preview/image?${r}`)}function LQr(e,t,r){let[n,o]=(0,kN.useState)([]),i=(0,kN.useRef)(0),a=ur(),s=(0,kN.useRef)(r);return s.current=r,(0,kN.useEffect)(()=>{o(PQr(e,t,s.current).map(l=>({...l,url:AQr(l.path,a),id:i.current++})))},[e,t,a]),{screenshots:n,setScreenshots:o,nextId:i}}var IQr=S(re(),1);function DQr(e,t){return(0,IQr.useCallback)((r,n)=>{t(o=>{let i=o.map(a=>a.id===r?{...a,...n}:a);return CN(e,i),i})},[e,t])}function MQr(e,t,r){let{screenshots:n,setScreenshots:o,nextId:i}=LQr(e,t,r),a=(0,uAe.useCallback)(d=>{o(f=>{let p=[...f,{...d,id:i.current++}];return CN(e,p),p})},[e,o,i]),s=(0,uAe.useCallback)(d=>{o(f=>{let p=f.find(m=>m.id===d);p?.url.startsWith("blob:")&&URL.revokeObjectURL(p.url);let h=f.filter(m=>m.id!==d);return CN(e,h),h})},[e,o]),l=DQr(e,o),u=(0,uAe.useCallback)(()=>_Qr(e),[e]);return{screenshots:n,add:a,remove:s,update:l,clearPersisted:u}}var oY=S(re(),1);async function NQr(e,t,r){let n=new URLSearchParams;t&&n.set("cwd",t),r&&n.set("node",r),e instanceof File&&e.name&&n.set("name",e.name);let o=await Ut(`/api/pr-preview/upload-image?${n}`,{method:"POST",headers:{"Content-Type":e.type||"application/octet-stream"},body:e,timeoutMs:12e4}),i=await o.json().catch(()=>null);if(!o.ok||!i?.path)throw new Error(i?.error??"Failed to attach file");return{path:i.path,alt:i.alt??"screenshot"}}var FQr=S(re(),1);function OQr(e){return e.startsWith("image/")||e.startsWith("video/")}function BQr(e){if(!e)return null;for(let t of e.items)if(t.kind==="file"&&OQr(t.type)){let r=t.getAsFile();if(r)return r}return null}function $Qr(e){return e?Array.from(e.files).find(t=>OQr(t.type))??null:null}function zQr(e,t){return(0,FQr.useEffect)(()=>{if(!t)return;let o=i=>{let a=BQr(i.clipboardData);a&&(i.preventDefault(),e(a))};return globalThis.addEventListener("paste",o),()=>globalThis.removeEventListener("paste",o)},[e,t]),t?{onDrop:o=>{let i=$Qr(o.dataTransfer);i&&(o.preventDefault(),e(i))},onDragOver:o=>{Array.from(o.dataTransfer.items).some(i=>i.kind==="file")&&o.preventDefault()}}:{onDrop:void 0,onDragOver:void 0}}function HQr(e,t,r){let[n,o]=(0,oY.useState)([]),i=(0,oY.useRef)(0),a=ur(),s=(0,oY.useCallback)(async d=>{let f=i.current++;o(p=>[...p.filter(h=>!h.error),{id:f}]);try{let p=await NQr(d,e,a);t({...p,url:URL.createObjectURL(d),contentType:d.type}),o(h=>h.filter(m=>m.id!==f))}catch(p){let h=p instanceof Error?p.message:"Failed to attach file";o(m=>m.map(g=>g.id===f?{id:f,error:h}:g))}},[e,a,t]),{onDrop:l,onDragOver:u}=zQr(s,r);return{uploads:n,onDrop:l,onDragOver:u}}function UQr({cwd:e,screenshots:t,screenshotScope:r,requestId:n,seededScreenshots:o}){let{screenshots:i,add:a,remove:s,update:l,clearPersisted:u}=MQr(t?r:void 0,n,t?o:[]),{uploads:d,onDrop:f,onDragOver:p}=HQr(e,a,t);return{screenshots:i,removeScreenshot:s,updateScreenshot:l,decision:{attachments:()=>i.map(({path:h,alt:m,group:g})=>g?{path:h,alt:m,group:g}:{path:h,alt:m}),clearPersisted:u},uploads:d,onDrop:f,onDragOver:p}}var ZQr=S(re(),1);var WQr="assist:pr-preview-chain:",Pgt=e=>`${WQr}${e}`;function VQr(e){if(e)return dl(Pgt(e))[0]}function GQr(e,t){e&&Il(Pgt(e),[t])}function qQr(e){e&&Uv(Pgt(e))}function jQr(){Vx(WQr)}function YQr(e,t,r){if(!e)return{reviewAfter:!1,announceAfter:!1,draft:!1,autoMerge:!1};jQr();let n=VQr(t);return{reviewAfter:n?.reviewAfter??r.reviewAfter,announceAfter:n?.announceAfter??!0,draft:n?.draft??r.draft,autoMerge:n?.autoMerge??!1}}function KQr(e,t,r,n,o){return{comments:t,screenshots:n,reviewAfter:e&&r.reviewAfter,announceAfter:e&&r.announceAfter,draft:r.draft,autoMerge:e&&r.autoMerge,...o===void 0?{}:{body:o}}}function XQr(e,t){return!e||t===!1?{}:t===!0?{autostart:!0}:{autostart:!0,startOn:t}}function QQr(e,t,r,n,o,i,a){let[s,l]=(0,ZQr.useState)(()=>YQr(n,t,o));return{chain:s,setChain:f=>{l(f),GQr(t,f)},onDecide:(f,p,h=!1)=>{let m=f==="approve";r(f,{...KQr(m,p,s,m?i.attachments():[],a()),...XQr(m,h)}),lAe(e),m&&(qQr(t),i.clearPersisted())}}}var lJr=S(re(),1);var oYo=/^ {0,3}#{1,6}[ \t]+acceptance criteria[ \t]*$/i,iYo=/^ {0,3}#{1,6}[ \t]/;function H3(e){let t=e.split(`
4144
4144
  `),r=t.findIndex(a=>oYo.test(a));if(r===-1)return null;let n=r+1;for(;n<t.length&&!iYo.test(t[n]);)n+=1;let o=r+1;for(;o<n&&t[o].trim()==="";)o+=1;let i=n;for(;i>o&&t[i-1].trim()==="";)i-=1;return o===n&&(o=r+1,i=r+1),{before:t.slice(0,o),lines:t.slice(o,i),after:t.slice(i)}}function dAe(e){let t=0;for(let r of e)t+=r===" "?4:1;return t}function fAe(e){let t=[];return e.map(r=>{for(;t.length>0&&r<t[t.length-1];)t.pop();return(t.length===0||r>t[t.length-1])&&t.push(r),t.length-1})}var aYo=" ";function sYo({text:e,depth:t}){let r=`${aYo.repeat(t)}1.`;return e===""?r:`${r} ${e}`}function pAe(e,t){let r=H3(e);return r?[...r.before,...t.map(sYo),...r.after].join(`
4145
4145
  `):e}var lYo=/^([ \t]*)(?:[-*+]|\d+[.)])(?:[ \t]+(.*))?$/,cYo=/^\[[ xX]\][ \t]*/;function uYo(e){return e.slice(0,e.length-e.trimStart().length)}function JQr(e){let t=H3(e);if(!t)return e;let r=t.lines.filter(o=>o.trim()!=="").map(o=>{let i=lYo.exec(o);return{width:dAe(i?i[1]:uYo(o)),text:(i?i[2]??"":o.trim()).replace(cYo,"")}}),n=fAe(r.map(o=>o.width));return pAe(e,B3(r.map((o,i)=>({text:o.text,depth:n[i]}))))}var eJr=`## Acceptance criteria
4146
4146
 
@@ -9,10 +9,10 @@ import {
9
9
  import {
10
10
  buildDoctorProbes,
11
11
  diagnoseLink
12
- } from "./chunk-4YBU2KWW.js";
12
+ } from "./chunk-FSXFCN77.js";
13
13
  import "./chunk-VABNWHSE.js";
14
14
  import "./chunk-DS2YJZZY.js";
15
- import "./chunk-ATYWOLXK.js";
15
+ import "./chunk-FJSVCSF2.js";
16
16
  import {
17
17
  loadLinkSpecs
18
18
  } from "./chunk-J2PPCMCR.js";
@@ -30,7 +30,7 @@ import {
30
30
  detectPlatform
31
31
  } from "./chunk-E36L7ASL.js";
32
32
  import "./chunk-GIHVMELY.js";
33
- import "./chunk-TYG43KXM.js";
33
+ import "./chunk-GHMXF3PZ.js";
34
34
  import "./chunk-5QM5VR3J.js";
35
35
  import "./chunk-UFSOFNXQ.js";
36
36
  import "./chunk-FLDRXYEM.js";
package/dist/index.js CHANGED
@@ -17,7 +17,7 @@ import {
17
17
  } from "./chunk-TJGF3Z72.js";
18
18
  import {
19
19
  package_default
20
- } from "./chunk-TYG43KXM.js";
20
+ } from "./chunk-GHMXF3PZ.js";
21
21
  import {
22
22
  adviceConfigHelp,
23
23
  askQuestionConfigHelp,
@@ -92,7 +92,7 @@ import { Command } from "commander";
92
92
  // src/commands/registerRootAction.ts
93
93
  function registerRootAction(program) {
94
94
  program.option("--no-open", "Do not open a browser on startup").action(
95
- async (options) => (await import("./web-OS6IBX7Z.js")).web({
95
+ async (options) => (await import("./web-QCFMGH4C.js")).web({
96
96
  port: "3100",
97
97
  open: options.open
98
98
  })
@@ -645,7 +645,7 @@ function registerShowCommands(cmd) {
645
645
 
646
646
  // src/commands/registerBacklog.ts
647
647
  function registerWebCommand(cmd) {
648
- cmd.command("web").description("Open the backlog tab in the web dashboard").option("-p, --port <number>", "Port to listen on", "3100").option("--no-open", "Do not open a browser on startup").action(lazyAction(() => import("./web-5JW4TDMO.js"), "web"));
648
+ cmd.command("web").description("Open the backlog tab in the web dashboard").option("-p, --port <number>", "Port to listen on", "3100").option("--no-open", "Do not open a browser on startup").action(lazyAction(() => import("./web-XHULOCAS.js"), "web"));
649
649
  }
650
650
  var registrars = [
651
651
  registerItemCommands,
@@ -675,7 +675,7 @@ function registerBacklog(program) {
675
675
  const { setBacklogDir } = await import("./getBacklogDir-FJLWXTYN.js");
676
676
  setBacklogDir(thisCommand.opts().dir);
677
677
  }).action(
678
- async (options) => (await import("./web-5JW4TDMO.js")).web({ port: "3100", open: options.open })
678
+ async (options) => (await import("./web-XHULOCAS.js")).web({ port: "3100", open: options.open })
679
679
  );
680
680
  for (const register of registrars) {
681
681
  register(cmd);
@@ -988,7 +988,7 @@ function registerExtension(program) {
988
988
  ).action(async (options) => {
989
989
  const { extension } = await import("./extension-YYRD5EM6.js");
990
990
  const { printExtensionUrl } = await import("./printExtensionUrl-IW2WTSNS.js");
991
- const { signExtension } = await import("./signExtension-UDDHW7XN.js");
991
+ const { signExtension } = await import("./signExtension-JLTUANO7.js");
992
992
  if (options.url) return printExtensionUrl();
993
993
  return options.sign ? signExtension() : extension();
994
994
  });
@@ -2678,7 +2678,7 @@ function registerDaemon(program) {
2678
2678
  const cmd = program.command("daemon").description("Long-lived daemon that owns web session PTYs");
2679
2679
  cmd.command("run").description(
2680
2680
  "Run the sessions daemon in the foreground (auto-spawned by assist sessions)"
2681
- ).action(lazyAction(() => import("./runDaemon-5SK76CAA.js"), "runDaemon"));
2681
+ ).action(lazyAction(() => import("./runDaemon-ZTJ734QT.js"), "runDaemon"));
2682
2682
  cmd.command("status").description(
2683
2683
  "Show sessions daemon status, live sessions, and any stray daemon processes"
2684
2684
  ).action(lazyAction(() => import("./daemonStatus-EAZHBC6O.js"), "daemonStatus"));
@@ -2702,7 +2702,7 @@ function registerDiagnoseCommands(nodes, calledBy5) {
2702
2702
  nodes.command("doctor [name]").description(
2703
2703
  "Probe each hop of every link (or one) in order and stop at the first failure with a remediation"
2704
2704
  ).option("--json", "Output as JSON").action(
2705
- async (name, _options, command) => (await import("./doctorNodes-RZHPZ6WN.js")).doctorNodes(
2705
+ async (name, _options, command) => (await import("./doctorNodes-GTAW2T5A.js")).doctorNodes(
2706
2706
  name,
2707
2707
  command.optsWithGlobals()
2708
2708
  )
@@ -2732,14 +2732,14 @@ function registerPeerActionCommands(nodes, calledBy5) {
2732
2732
  internalCommand(
2733
2733
  nodes.command("restart <name>").description(
2734
2734
  "Restart a linked node's daemon and/or web server, wait for its link to reconnect and print its version"
2735
- ).option("--target <target>", "daemon, webserver or both", "both").action(lazyAction(() => import("./restartNode-FQDJNBXD.js"), "restartNode")),
2735
+ ).option("--target <target>", "daemon, webserver or both", "both").action(lazyAction(() => import("./restartNode-JTMKMTB7.js"), "restartNode")),
2736
2736
  calledBy5
2737
2737
  );
2738
2738
  internalCommand(
2739
2739
  nodes.command("update <name>").description(
2740
2740
  "Run assist update on a linked node, restart it, wait for its link to reconnect and print its version"
2741
2741
  ).action(
2742
- async (name) => (await import("./updateNode-E3ZFQC5W.js")).updateNode(name)
2742
+ async (name) => (await import("./updateNode-ICDHHRSS.js")).updateNode(name)
2743
2743
  ),
2744
2744
  calledBy5
2745
2745
  );
@@ -2802,7 +2802,7 @@ function registerSetStatusCommand(cmd) {
2802
2802
  // src/commands/sessions/registerSessionsWeb.ts
2803
2803
  function registerSessionsWeb(cmd) {
2804
2804
  const webCmd = cmd.command("web").description("Start the sessions web dashboard").option("-p, --port <number>", "Port to listen on", "3100").option("--no-open", "Do not open a browser on startup").action(
2805
- async (options, command) => (await import("./web-OS6IBX7Z.js")).web({
2805
+ async (options, command) => (await import("./web-QCFMGH4C.js")).web({
2806
2806
  ...options,
2807
2807
  open: command.optsWithGlobals().open
2808
2808
  })
@@ -2817,7 +2817,7 @@ function registerSessionsWeb(cmd) {
2817
2817
  // src/commands/sessions/registerSessions.ts
2818
2818
  function registerSessions(program) {
2819
2819
  const cmd = program.command("sessions").description("Web dashboard for coding agent sessions").option("--no-open", "Do not open a browser on startup").action(
2820
- async (_options, command) => (await import("./web-OS6IBX7Z.js")).web({
2820
+ async (_options, command) => (await import("./web-QCFMGH4C.js")).web({
2821
2821
  port: "3100",
2822
2822
  open: command.optsWithGlobals().open
2823
2823
  })
@@ -2,20 +2,20 @@ import {
2
2
  linkStatus,
3
3
  postToPeer,
4
4
  startPeerAction
5
- } from "./chunk-7PS3S6CV.js";
6
- import "./chunk-GUGVH5LO.js";
7
- import "./chunk-4YBU2KWW.js";
5
+ } from "./chunk-JW7RH6UO.js";
6
+ import "./chunk-SQ32XJCS.js";
7
+ import "./chunk-FSXFCN77.js";
8
8
  import "./chunk-VABNWHSE.js";
9
9
  import "./chunk-DS2YJZZY.js";
10
10
  import "./chunk-4HKB2TAG.js";
11
- import "./chunk-ATYWOLXK.js";
11
+ import "./chunk-FJSVCSF2.js";
12
12
  import "./chunk-J2PPCMCR.js";
13
13
  import "./chunk-5CNDLMYO.js";
14
14
  import "./chunk-B7VOTF5Q.js";
15
15
  import "./chunk-E36L7ASL.js";
16
16
  import "./chunk-5H7EHZ3J.js";
17
17
  import "./chunk-GIHVMELY.js";
18
- import "./chunk-TYG43KXM.js";
18
+ import "./chunk-GHMXF3PZ.js";
19
19
  import "./chunk-UFSOFNXQ.js";
20
20
  import "./chunk-FLDRXYEM.js";
21
21
  import "./chunk-GRXFWFGP.js";
@@ -128,7 +128,7 @@ import {
128
128
  isHello,
129
129
  linkVersionCheck,
130
130
  negotiateProtocol
131
- } from "./chunk-ATYWOLXK.js";
131
+ } from "./chunk-FJSVCSF2.js";
132
132
  import {
133
133
  loadLinkSpecs
134
134
  } from "./chunk-J2PPCMCR.js";
@@ -267,7 +267,7 @@ import {
267
267
  import "./chunk-APZ6ZTDA.js";
268
268
  import "./chunk-ZRIBI33P.js";
269
269
  import "./chunk-D7UZLH36.js";
270
- import "./chunk-TYG43KXM.js";
270
+ import "./chunk-GHMXF3PZ.js";
271
271
  import "./chunk-EW2ZM2PC.js";
272
272
  import "./chunk-MYH4MQX2.js";
273
273
  import {
@@ -9,7 +9,7 @@ import {
9
9
  } from "./chunk-W7TRZLEM.js";
10
10
  import {
11
11
  package_default
12
- } from "./chunk-TYG43KXM.js";
12
+ } from "./chunk-GHMXF3PZ.js";
13
13
 
14
14
  // src/commands/extension/signExtension.ts
15
15
  import { rm as rm2 } from "fs/promises";
@@ -2,13 +2,13 @@ import {
2
2
  linkStatus,
3
3
  postToPeer,
4
4
  startPeerAction
5
- } from "./chunk-7PS3S6CV.js";
6
- import "./chunk-GUGVH5LO.js";
7
- import "./chunk-4YBU2KWW.js";
5
+ } from "./chunk-JW7RH6UO.js";
6
+ import "./chunk-SQ32XJCS.js";
7
+ import "./chunk-FSXFCN77.js";
8
8
  import "./chunk-VABNWHSE.js";
9
9
  import "./chunk-DS2YJZZY.js";
10
10
  import "./chunk-4HKB2TAG.js";
11
- import "./chunk-ATYWOLXK.js";
11
+ import "./chunk-FJSVCSF2.js";
12
12
  import "./chunk-J2PPCMCR.js";
13
13
  import "./chunk-5CNDLMYO.js";
14
14
  import "./chunk-B7VOTF5Q.js";
@@ -19,7 +19,7 @@ import {
19
19
  } from "./chunk-A7ONLVZD.js";
20
20
  import "./chunk-GIHVMELY.js";
21
21
  import "./chunk-2EW62DM5.js";
22
- import "./chunk-TYG43KXM.js";
22
+ import "./chunk-GHMXF3PZ.js";
23
23
  import "./chunk-UFSOFNXQ.js";
24
24
  import "./chunk-FLDRXYEM.js";
25
25
  import "./chunk-GRXFWFGP.js";
@@ -1,17 +1,17 @@
1
1
  import {
2
2
  web
3
- } from "./chunk-3AYLDTHV.js";
3
+ } from "./chunk-E47YUHYL.js";
4
4
  import "./chunk-SURCYYQ6.js";
5
5
  import "./chunk-JNCFHWBK.js";
6
6
  import "./chunk-JM57BCD6.js";
7
- import "./chunk-GUGVH5LO.js";
8
- import "./chunk-4YBU2KWW.js";
7
+ import "./chunk-SQ32XJCS.js";
8
+ import "./chunk-FSXFCN77.js";
9
9
  import "./chunk-VABNWHSE.js";
10
10
  import "./chunk-DS2YJZZY.js";
11
11
  import "./chunk-2RUGZQUD.js";
12
12
  import "./chunk-5QXAQCAJ.js";
13
13
  import "./chunk-4HKB2TAG.js";
14
- import "./chunk-ATYWOLXK.js";
14
+ import "./chunk-FJSVCSF2.js";
15
15
  import "./chunk-J2PPCMCR.js";
16
16
  import "./chunk-5CNDLMYO.js";
17
17
  import "./chunk-B7VOTF5Q.js";
@@ -138,7 +138,7 @@ import "./chunk-RW6YKTIM.js";
138
138
  import "./chunk-APZ6ZTDA.js";
139
139
  import "./chunk-ZRIBI33P.js";
140
140
  import "./chunk-D7UZLH36.js";
141
- import "./chunk-TYG43KXM.js";
141
+ import "./chunk-GHMXF3PZ.js";
142
142
  import "./chunk-YUV5QBHU.js";
143
143
  import "./chunk-YVL3NXEB.js";
144
144
  import "./chunk-UEWARAPX.js";
@@ -1,17 +1,17 @@
1
1
  import {
2
2
  web
3
- } from "./chunk-3AYLDTHV.js";
3
+ } from "./chunk-E47YUHYL.js";
4
4
  import "./chunk-SURCYYQ6.js";
5
5
  import "./chunk-JNCFHWBK.js";
6
6
  import "./chunk-JM57BCD6.js";
7
- import "./chunk-GUGVH5LO.js";
8
- import "./chunk-4YBU2KWW.js";
7
+ import "./chunk-SQ32XJCS.js";
8
+ import "./chunk-FSXFCN77.js";
9
9
  import "./chunk-VABNWHSE.js";
10
10
  import "./chunk-DS2YJZZY.js";
11
11
  import "./chunk-2RUGZQUD.js";
12
12
  import "./chunk-5QXAQCAJ.js";
13
13
  import "./chunk-4HKB2TAG.js";
14
- import "./chunk-ATYWOLXK.js";
14
+ import "./chunk-FJSVCSF2.js";
15
15
  import "./chunk-J2PPCMCR.js";
16
16
  import "./chunk-5CNDLMYO.js";
17
17
  import "./chunk-B7VOTF5Q.js";
@@ -138,7 +138,7 @@ import "./chunk-RW6YKTIM.js";
138
138
  import "./chunk-APZ6ZTDA.js";
139
139
  import "./chunk-ZRIBI33P.js";
140
140
  import "./chunk-D7UZLH36.js";
141
- import "./chunk-TYG43KXM.js";
141
+ import "./chunk-GHMXF3PZ.js";
142
142
  import "./chunk-YUV5QBHU.js";
143
143
  import "./chunk-YVL3NXEB.js";
144
144
  import "./chunk-UEWARAPX.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@staff0rd/assist",
3
- "version": "0.1190.2",
3
+ "version": "0.1190.3",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "bin": {