@wjarka/cezarion 0.18.0-dev.7661 → 0.18.0-dev.7675
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/package.json +2 -2
- package/web/dist/assets/activity-motion-D9kDOQdA.js +2 -0
- package/web/dist/assets/{activity-route--JtxzMg2.js → activity-route-CZsGE2kr.js} +1 -1
- package/web/dist/assets/attention-zJ-ho5os.js +1 -0
- package/web/dist/assets/{button-RJMdCnZw.js → button-C1fD-ZFr.js} +1 -1
- package/web/dist/assets/{centered-state-dmABwupF.js → centered-state-CiiA8Vgw.js} +1 -1
- package/web/dist/assets/{cez-idle-C7yy2Oqo.js → cez-idle-D1rXzVuh.js} +1 -1
- package/web/dist/assets/commit-diff-panel-BuON_M0j.js +1 -0
- package/web/dist/assets/{dialog-7Mg2IZCP.js → dialog-DSwzMeY3.js} +1 -1
- package/web/dist/assets/{diff-gHdx2Gyg.js → diff-Db5bcfH_.js} +2 -2
- package/web/dist/assets/diff-controls-C8aqhty4.js +1 -0
- package/web/dist/assets/{diff-view-CiJf2jAb.js → diff-view-DqlLiU5V.js} +1 -1
- package/web/dist/assets/{dist-FHKv_Ysh.js → dist-Du8mGhoH.js} +1 -1
- package/web/dist/assets/{dropdown-menu-Cr9RsmWG.js → dropdown-menu-DRFDwG2X.js} +1 -1
- package/web/dist/assets/{es2015-VrVcR1vD.js → es2015-Ch36azR0.js} +1 -1
- package/web/dist/assets/{file-preview-wO3fbdrM.js → file-preview-DSnLzP2A.js} +1 -1
- package/web/dist/assets/{git-toolbar-kNAK8kM_.js → git-toolbar-WHsIb3zj.js} +1 -1
- package/web/dist/assets/github-BZSy7bl0.js +1 -0
- package/web/dist/assets/{global-activity-route-DpAnt7mF.js → global-activity-route-BPvST6Do.js} +1 -1
- package/web/dist/assets/{image-preview-BmcpjY75.js → image-preview-2AnVvt0e.js} +1 -1
- package/web/dist/assets/{index-D6Jjh8b7.css → index-CSsMeh0Q.css} +1 -1
- package/web/dist/assets/index-DmUnZuj2.js +14 -0
- package/web/dist/assets/{live-protocol-CjfZMf1X.js → live-protocol-DKHlCFyG.js} +1 -1
- package/web/dist/assets/{markdown-CcWvWY7-.js → markdown-EqokmdNx.js} +1 -1
- package/web/dist/assets/{nav-row-styles-D4xk5Osn.js → nav-row-styles-CFjnD-9J.js} +1 -1
- package/web/dist/assets/picker-pill-DP8YY8yK.js +15 -0
- package/web/dist/assets/{preview-pane-connected-CqKhv4IY.js → preview-pane-connected-DePVzNAm.js} +3 -3
- package/web/dist/assets/{project-router-BNi9OCwj.js → project-router-LT30LjzY.js} +1 -1
- package/web/dist/assets/project-scope-context-DMCS5p-N.js +4 -0
- package/web/dist/assets/{prompt-template-menu-CSWQm6rc.js → prompt-template-menu-DhXONhoB.js} +1 -1
- package/web/dist/assets/queries-DHY6U3e_.js +1 -0
- package/web/dist/assets/reference-chip-BKeVxG_E.js +1 -0
- package/web/dist/assets/{repo-git-_YXOm-_R.js → repo-git-CWn2Z4Un.js} +1 -1
- package/web/dist/assets/{report-reader-BzjGkXqT.js → report-reader-RkXaRhiv.js} +1 -1
- package/web/dist/assets/reports-CiU1cLpn.js +1 -0
- package/web/dist/assets/run-header-z48y-i75.js +2 -0
- package/web/dist/assets/runners-C-sPUQye.js +1 -0
- package/web/dist/assets/{skills-DkGf6wZ1.js → skills-BeZ9naR_.js} +1 -1
- package/web/dist/assets/{tab-link-Bi9k8bF7.js → tab-link-C_0J92TF.js} +1 -1
- package/web/dist/assets/{task-changes-CA3AKPxL.js → task-changes-R9UrXbyp.js} +1 -1
- package/web/dist/assets/task-commits-BgwKBJPa.js +1 -0
- package/web/dist/assets/{task-files-Dnpis8EC.js → task-files-BuoYB5UQ.js} +1 -1
- package/web/dist/assets/{task-github-item-CeKxOrC7.js → task-github-item-DQ_suCNz.js} +1 -1
- package/web/dist/assets/task-thread-B7GO7yjQ.js +9 -0
- package/web/dist/assets/thread-state-DSb5VKd8.js +4 -0
- package/web/dist/assets/{toaster-BWMQArHJ.js → toaster-Cxgzn9ip.js} +1 -1
- package/web/dist/assets/{use-desktop-BIR3yp9r.js → use-desktop-EnHXg46f.js} +1 -1
- package/web/dist/assets/use-hand-to-agent-state-C6FNQ2e0.js +1 -0
- package/web/dist/assets/{useInfiniteQuery-BipmcFHn.js → useInfiniteQuery-CvdGA_PU.js} +1 -1
- package/web/dist/assets/useQuery-BJFZunTR.js +1 -0
- package/web/dist/assets/{workflows-CLahFvij.js → workflows-b6WsU1qg.js} +3 -3
- package/web/dist/assets/{ws-Q8U4J3aJ.js → ws-BxsIvFCG.js} +1 -1
- package/web/dist/assets/{zoomable-image-DefjK4q5.js → zoomable-image-DrDnCL4V.js} +1 -1
- package/web/dist/index.html +24 -24
- package/web/dist/live-worker.js +1 -1
- package/web/dist/assets/activity-motion-DolQZDpQ.js +0 -2
- package/web/dist/assets/attention-BKUao3ek.js +0 -1
- package/web/dist/assets/commit-diff-panel-B2gS1ZaB.js +0 -1
- package/web/dist/assets/diff-controls-BpQyN23g.js +0 -1
- package/web/dist/assets/github-CeD4m2El.js +0 -1
- package/web/dist/assets/index-O5OYjDqv.js +0 -14
- package/web/dist/assets/picker-pill-B2VxxL1D.js +0 -15
- package/web/dist/assets/project-scope-context-DE_iUInX.js +0 -4
- package/web/dist/assets/queries-BeaJJEJK.js +0 -1
- package/web/dist/assets/reference-chip-7zf-u89p.js +0 -1
- package/web/dist/assets/reports-DXNWZuef.js +0 -1
- package/web/dist/assets/run-header-B-u7ZdQI.js +0 -2
- package/web/dist/assets/runners-DGs5n2Tx.js +0 -1
- package/web/dist/assets/task-commits-Dh2HOS5_.js +0 -1
- package/web/dist/assets/task-thread-pDMc83WZ.js +0 -9
- package/web/dist/assets/thread-state-Dmdwd-NJ.js +0 -4
- package/web/dist/assets/use-hand-to-agent-state-C-K9FCmf.js +0 -1
- package/web/dist/assets/useQuery-BfRbMVIN.js +0 -1
|
@@ -61,4 +61,4 @@ var e={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInte
|
|
|
61
61
|
|
|
62
62
|
`)}t.write(`payload.value = newResult;`),t.write(`return payload;`);let s=t.compile();return(t,n)=>s(e,t,n)},a,o=_,s=!u.jitless,c=s&&ce.value,l=t.catchall,d;e._zod.parse=(u,f)=>{d??=r.value;let p=u.value;return o(p)?s&&c&&f?.async===!1&&f.jitless!==!0?(a||=i(t.shape),u=a(u,f),l?Cn([],p,u,f,d,e):u):n(u,f):(u.issues.push({expected:`object`,code:`invalid_type`,input:p,inst:e}),u)}});function En(e,t,n,r){for(let n of e)if(n.issues.length===0)return t.value=n.value,t;let i=e.filter(e=>!S(e));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>w(e,r,d())))}),t)}var Dn=s(`$ZodUnion`,(e,t)=>{D.init(e,t),m(e._zod,`optin`,()=>t.options.some(e=>e._zod.optin===`optional`)?`optional`:void 0),m(e._zod,`optout`,()=>t.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),m(e._zod,`values`,()=>{if(t.options.every(e=>e._zod.values))return new Set(t.options.flatMap(e=>Array.from(e._zod.values)))}),m(e._zod,`pattern`,()=>{if(t.options.every(e=>e._zod.pattern)){let e=t.options.map(e=>e._zod.pattern);return RegExp(`^(${e.map(e=>ne(e.source)).join(`|`)})$`)}});let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(r,i)=>{if(n)return n(r,i);let a=!1,o=[];for(let e of t.options){let t=e._zod.run({value:r.value,issues:[]},i);if(t instanceof Promise)o.push(t),a=!0;else{if(t.issues.length===0)return t;o.push(t)}}return a?Promise.all(o).then(t=>En(t,r,e,i)):En(o,r,e,i)}}),On=s(`$ZodDiscriminatedUnion`,(e,t)=>{t.inclusive=!1,Dn.init(e,t);let n=e._zod.parse;m(e._zod,`propValues`,()=>{let e={};for(let n of t.options){let r=n._zod.propValues;if(!r||Object.keys(r).length===0)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(n)}"`);for(let[t,n]of Object.entries(r)){e[t]||(e[t]=new Set);for(let r of n)e[t].add(r)}}return e});let r=ee(()=>{let e=t.options,n=new Map;for(let r of e){let e=r._zod.propValues?.[t.discriminator];if(!e||e.size===0)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(r)}"`);for(let t of e){if(n.has(t))throw Error(`Duplicate discriminator value "${String(t)}"`);n.set(t,r)}}return n});e._zod.parse=(i,a)=>{let o=i.value;if(!_(o))return i.issues.push({code:`invalid_type`,expected:`object`,input:o,inst:e}),i;let s=r.value.get(o?.[t.discriminator]);return s?s._zod.run(i,a):t.unionFallback||a.direction===`backward`?n(i,a):(i.issues.push({code:`invalid_union`,errors:[],note:`No matching discriminator`,discriminator:t.discriminator,options:Array.from(r.value.keys()),input:o,path:[t.discriminator],inst:e}),i)}}),kn=s(`$ZodIntersection`,(e,t)=>{D.init(e,t),e._zod.parse=(e,n)=>{let r=e.value,i=t.left._zod.run({value:r,issues:[]},n),a=t.right._zod.run({value:r,issues:[]},n);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([t,n])=>jn(e,t,n)):jn(e,i,a)}});function An(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(v(e)&&v(t)){let n=Object.keys(t),r=Object.keys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};for(let n of r){let r=An(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};i[n]=r.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let r=0;r<e.length;r++){let i=e[r],a=t[r],o=An(i,a);if(!o.valid)return{valid:!1,mergeErrorPath:[r,...o.mergeErrorPath]};n.push(o.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function jn(e,t,n){let r=new Map,i;for(let n of t.issues)if(n.code===`unrecognized_keys`){i??=n;for(let e of n.keys)r.has(e)||r.set(e,{}),r.get(e).l=!0}else e.issues.push(n);for(let t of n.issues)if(t.code===`unrecognized_keys`)for(let e of t.keys)r.has(e)||r.set(e,{}),r.get(e).r=!0;else e.issues.push(t);let a=[...r].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(a.length&&i&&e.issues.push({...i,keys:a}),S(e))return e;let o=An(t.value,n.value);if(!o.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);return e.value=o.data,e}var Mn=s(`$ZodRecord`,(e,t)=>{D.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!v(i))return n.issues.push({expected:`record`,code:`invalid_type`,input:i,inst:e}),n;let a=[],o=t.keyType._zod.values;if(o){n.value={};let s=new Set;for(let c of o)if(typeof c==`string`||typeof c==`number`||typeof c==`symbol`){s.add(typeof c==`number`?c.toString():c);let o=t.keyType._zod.run({value:c,issues:[]},r);if(o instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(o.issues.length){n.issues.push({code:`invalid_key`,origin:`record`,issues:o.issues.map(e=>w(e,r,d())),input:c,path:[c],inst:e});continue}let l=o.value,u=t.valueType._zod.run({value:i[c],issues:[]},r);u instanceof Promise?a.push(u.then(e=>{e.issues.length&&n.issues.push(...C(c,e.issues)),n.value[l]=e.value})):(u.issues.length&&n.issues.push(...C(c,u.issues)),n.value[l]=u.value)}let c;for(let e in i)s.has(e)||(c??=[],c.push(e));c&&c.length>0&&n.issues.push({code:`unrecognized_keys`,input:i,inst:e,keys:c})}else{n.value={};for(let o of Reflect.ownKeys(i)){if(o===`__proto__`||!Object.prototype.propertyIsEnumerable.call(i,o))continue;let s=t.keyType._zod.run({value:o,issues:[]},r);if(s instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(typeof o==`string`&&ht.test(o)&&s.issues.length){let e=t.keyType._zod.run({value:Number(o),issues:[]},r);if(e instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);e.issues.length===0&&(s=e)}if(s.issues.length){t.mode===`loose`?n.value[o]=i[o]:n.issues.push({code:`invalid_key`,origin:`record`,issues:s.issues.map(e=>w(e,r,d())),input:o,path:[o],inst:e});continue}let c=t.valueType._zod.run({value:i[o],issues:[]},r);c instanceof Promise?a.push(c.then(e=>{e.issues.length&&n.issues.push(...C(o,e.issues)),n.value[s.value]=e.value})):(c.issues.length&&n.issues.push(...C(o,c.issues)),n.value[s.value]=c.value)}}return a.length?Promise.all(a).then(()=>n):n}}),Nn=s(`$ZodEnum`,(e,t)=>{D.init(e,t);let n=f(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=RegExp(`^(${n.filter(e=>ue.has(typeof e)).map(e=>typeof e==`string`?y(e):e.toString()).join(`|`)})$`),e._zod.parse=(t,i)=>{let a=t.value;return r.has(a)||t.issues.push({code:`invalid_value`,values:n,input:a,inst:e}),t}}),Pn=s(`$ZodLiteral`,(e,t)=>{if(D.init(e,t),t.values.length===0)throw Error(`Cannot create literal schema with no valid values`);let n=new Set(t.values);e._zod.values=n,e._zod.pattern=RegExp(`^(${t.values.map(e=>typeof e==`string`?y(e):e?y(e.toString()):String(e)).join(`|`)})$`),e._zod.parse=(r,i)=>{let a=r.value;return n.has(a)||r.issues.push({code:`invalid_value`,values:t.values,input:a,inst:e}),r}}),Fn=s(`$ZodTransform`,(e,t)=>{D.init(e,t),e._zod.optin=`optional`,e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new l(e.constructor.name);let i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(e=>(n.value=e,n.fallback=!0,n));if(i instanceof Promise)throw new c;return n.value=i,n.fallback=!0,n}});function In(e,t){return t===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}var Ln=s(`$ZodOptional`,(e,t)=>{D.init(e,t),e._zod.optin=`optional`,e._zod.optout=`optional`,m(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),m(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${ne(e.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(t.innerType._zod.optin===`optional`){let r=e.value,i=t.innerType._zod.run(e,n);return i instanceof Promise?i.then(e=>In(e,r)):In(i,r)}return e.value===void 0?e:t.innerType._zod.run(e,n)}}),Rn=s(`$ZodExactOptional`,(e,t)=>{Ln.init(e,t),m(e._zod,`values`,()=>t.innerType._zod.values),m(e._zod,`pattern`,()=>t.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),zn=s(`$ZodNullable`,(e,t)=>{D.init(e,t),m(e._zod,`optin`,()=>t.innerType._zod.optin),m(e._zod,`optout`,()=>t.innerType._zod.optout),m(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${ne(e.source)}|null)$`):void 0}),m(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>e.value===null?e:t.innerType._zod.run(e,n)}),Bn=s(`$ZodDefault`,(e,t)=>{D.init(e,t),e._zod.optin=`optional`,m(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);if(e.value===void 0)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>Vn(e,t)):Vn(r,t)}});function Vn(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var Hn=s(`$ZodPrefault`,(e,t)=>{D.init(e,t),e._zod.optin=`optional`,m(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>(n.direction===`backward`||e.value===void 0&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),Un=s(`$ZodNonOptional`,(e,t)=>{D.init(e,t),m(e._zod,`values`,()=>{let e=t.innerType._zod.values;return e?new Set([...e].filter(e=>e!==void 0)):void 0}),e._zod.parse=(n,r)=>{let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(t=>Wn(t,e)):Wn(i,e)}});function Wn(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:`invalid_type`,expected:`nonoptional`,input:e.value,inst:t}),e}var Gn=s(`$ZodCatch`,(e,t)=>{D.init(e,t),e._zod.optin=`optional`,m(e._zod,`optout`,()=>t.innerType._zod.optout),m(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(r=>(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>w(e,n,d()))},input:e.value}),e.issues=[],e.fallback=!0),e)):(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>w(e,n,d()))},input:e.value}),e.issues=[],e.fallback=!0),e)}}),Kn=s(`$ZodPipe`,(e,t)=>{D.init(e,t),m(e._zod,`values`,()=>t.in._zod.values),m(e._zod,`optin`,()=>t.in._zod.optin),m(e._zod,`optout`,()=>t.out._zod.optout),m(e._zod,`propValues`,()=>t.in._zod.propValues),e._zod.parse=(e,n)=>{if(n.direction===`backward`){let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>qn(e,t.in,n)):qn(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>qn(e,t.out,n)):qn(r,t.out,n)}});function qn(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},n)}var Jn=s(`$ZodPreprocess`,(e,t)=>{Kn.init(e,t)}),Yn=s(`$ZodReadonly`,(e,t)=>{D.init(e,t),m(e._zod,`propValues`,()=>t.innerType._zod.propValues),m(e._zod,`values`,()=>t.innerType._zod.values),m(e._zod,`optin`,()=>t.innerType?._zod?.optin),m(e._zod,`optout`,()=>t.innerType?._zod?.optout),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(Xn):Xn(r)}});function Xn(e){return e.value=Object.freeze(e.value),e}var Zn=s(`$ZodCustom`,(e,t)=>{E.init(e,t),D.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{let r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(t=>Qn(t,n,r,e));Qn(i,n,r,e)}});function Qn(e,t,n,r){if(!e){let e={code:`custom`,input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(T(e))}}var $n,er=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let n=t[0];return this._map.set(e,n),n&&typeof n==`object`&&`id`in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&typeof t==`object`&&`id`in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};delete n.id;let r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function tr(){return new er}($n=globalThis).__zod_globalRegistry??($n.__zod_globalRegistry=tr());var k=globalThis.__zod_globalRegistry;function nr(e,t){return new e({type:`string`,...x(t)})}function rr(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...x(t)})}function ir(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...x(t)})}function ar(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...x(t)})}function or(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...x(t)})}function sr(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...x(t)})}function cr(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...x(t)})}function lr(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...x(t)})}function ur(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...x(t)})}function dr(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...x(t)})}function fr(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...x(t)})}function pr(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...x(t)})}function mr(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...x(t)})}function hr(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...x(t)})}function gr(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...x(t)})}function _r(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...x(t)})}function vr(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...x(t)})}function yr(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...x(t)})}function br(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...x(t)})}function xr(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...x(t)})}function Sr(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...x(t)})}function Cr(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...x(t)})}function wr(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...x(t)})}function Tr(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...x(t)})}function Er(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...x(t)})}function Dr(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...x(t)})}function Or(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...x(t)})}function kr(e,t){return new e({type:`number`,checks:[],...x(t)})}function Ar(e,t){return new e({type:`number`,coerce:!0,checks:[],...x(t)})}function jr(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`safeint`,...x(t)})}function Mr(e,t){return new e({type:`boolean`,...x(t)})}function Nr(e,t){return new e({type:`null`,...x(t)})}function Pr(e){return new e({type:`any`})}function Fr(e){return new e({type:`unknown`})}function Ir(e,t){return new e({type:`never`,...x(t)})}function Lr(e,t){return new xt({check:`less_than`,...x(t),value:e,inclusive:!1})}function Rr(e,t){return new xt({check:`less_than`,...x(t),value:e,inclusive:!0})}function zr(e,t){return new St({check:`greater_than`,...x(t),value:e,inclusive:!1})}function Br(e,t){return new St({check:`greater_than`,...x(t),value:e,inclusive:!0})}function Vr(e,t){return new Ct({check:`multiple_of`,...x(t),value:e})}function Hr(e,t){return new Tt({check:`max_length`,...x(t),maximum:e})}function Ur(e,t){return new Et({check:`min_length`,...x(t),minimum:e})}function Wr(e,t){return new Dt({check:`length_equals`,...x(t),length:e})}function Gr(e,t){return new kt({check:`string_format`,format:`regex`,...x(t),pattern:e})}function Kr(e){return new At({check:`string_format`,format:`lowercase`,...x(e)})}function qr(e){return new jt({check:`string_format`,format:`uppercase`,...x(e)})}function Jr(e,t){return new Mt({check:`string_format`,format:`includes`,...x(t),includes:e})}function Yr(e,t){return new Nt({check:`string_format`,format:`starts_with`,...x(t),prefix:e})}function Xr(e,t){return new Pt({check:`string_format`,format:`ends_with`,...x(t),suffix:e})}function A(e){return new Ft({check:`overwrite`,tx:e})}function Zr(e){return A(t=>t.normalize(e))}function Qr(){return A(e=>e.trim())}function $r(){return A(e=>e.toLowerCase())}function ei(){return A(e=>e.toUpperCase())}function ti(){return A(e=>oe(e))}function ni(e,t,n){return new e({type:`array`,element:t,...x(n)})}function ri(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...x(n)})}function ii(e,t){let n=ai(t=>(t.addIssue=e=>{if(typeof e==`string`)t.issues.push(T(e,t.value,n._zod.def));else{let r=e;r.fatal&&(r.continue=!1),r.code??=`custom`,r.input??=t.value,r.inst??=n,r.continue??=!n._zod.def.abort,t.issues.push(T(r))}},e(t.value,t)),t);return n}function ai(e,t){let n=new E({check:`custom`,...x(t)});return n._zod.check=e,n}function oi(e){let t=e?.target??`draft-2020-12`;return t===`draft-4`&&(t=`draft-04`),t===`draft-7`&&(t=`draft-07`),{processors:e.processors??{},metadataRegistry:e?.metadata??k,target:t,unrepresentable:e?.unrepresentable??`throw`,override:e?.override??(()=>{}),io:e?.io??`output`,counter:0,seen:new Map,cycles:e?.cycles??`ref`,reused:e?.reused??`inline`,external:e?.external??void 0}}function j(e,t,n={path:[],schemaPath:[]}){var r;let i=e._zod.def,a=t.seen.get(e);if(a)return a.count++,n.schemaPath.includes(e)&&(a.cycle=n.path),a.schema;let o={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,o);let s=e._zod.toJSONSchema?.();if(s)o.schema=s;else{let r={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,o.schema,r);else{let n=o.schema,a=t.processors[i.type];if(!a)throw Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);a(e,t,n,r)}let a=e._zod.parent;a&&(o.ref||=a,j(a,t,r),t.seen.get(a).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&Object.assign(o.schema,c),t.io===`input`&&M(e)&&(delete o.schema.examples,delete o.schema.default),t.io===`input`&&`_prefault`in o.schema&&((r=o.schema).default??(r.default=o.schema._prefault)),delete o.schema._prefault,t.seen.get(e).schema}function si(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=new Map;for(let t of e.seen.entries()){let n=e.metadataRegistry.get(t[0])?.id;if(n){let e=r.get(n);if(e&&e!==t[0])throw Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(n,t[0])}}let i=t=>{let r=e.target===`draft-2020-12`?`$defs`:`definitions`;if(e.external){let n=e.external.registry.get(t[0])?.id,i=e.external.uri??(e=>e);if(n)return{ref:i(n)};let a=t[1].defId??t[1].schema.id??`schema${e.counter++}`;return t[1].defId=a,{defId:a,ref:`${i(`__shared`)}#/${r}/${a}`}}if(t[1]===n)return{ref:`#`};let i=`#/${r}/`,a=t[1].schema.id??`__schema${e.counter++}`;return{defId:a,ref:i+a}},a=e=>{if(e[1].schema.$ref)return;let t=e[1],{ref:n,defId:r}=i(e);t.def={...t.schema},r&&(t.defId=r);let a=t.schema;for(let e in a)delete a[e];a.$ref=n};if(e.cycles===`throw`)for(let t of e.seen.entries()){let e=t[1];if(e.cycle)throw Error(`Cycle detected: #/${e.cycle?.join(`/`)}/<root>
|
|
63
63
|
|
|
64
|
-
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0]){a(n);continue}if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}if(e.metadataRegistry.get(n[0])?.id){a(n);continue}if(r.cycle){a(n);continue}if(r.count>1&&e.reused===`ref`){a(n);continue}}}function ci(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=t=>{let n=e.seen.get(t);if(n.ref===null)return;let i=n.def??n.schema,a={...i},o=n.ref;if(n.ref=null,o){r(o);let n=e.seen.get(o),s=n.schema;if(s.$ref&&(e.target===`draft-07`||e.target===`draft-04`||e.target===`openapi-3.0`)?(i.allOf=i.allOf??[],i.allOf.push(s)):Object.assign(i,s),Object.assign(i,a),t._zod.parent===o)for(let e in i)e===`$ref`||e===`allOf`||e in a||delete i[e];if(s.$ref&&n.def)for(let e in i)e===`$ref`||e===`allOf`||e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)e===`$ref`||e===`allOf`||e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};for(let t of[...e.seen.entries()].reverse())r(t[0]);let i={};if(e.target===`draft-2020-12`?i.$schema=`https://json-schema.org/draft/2020-12/schema`:e.target===`draft-07`?i.$schema=`http://json-schema.org/draft-07/schema#`:e.target===`draft-04`?i.$schema=`http://json-schema.org/draft-04/schema#`:e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}Object.assign(i,n.def??n.schema);let a=e.metadataRegistry.get(t)?.id;a!==void 0&&i.id===a&&delete i.id;let o=e.external?.defs??{};for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,o[e.defId]=e.def)}e.external||Object.keys(o).length>0&&(e.target===`draft-2020-12`?i.$defs=o:i.definitions=o);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,"~standard",{value:{...t[`~standard`],jsonSchema:{input:ui(t,`input`,e.processors),output:ui(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function M(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type===`transform`)return!0;if(r.type===`array`)return M(r.element,n);if(r.type===`set`)return M(r.valueType,n);if(r.type===`lazy`)return M(r.getter(),n);if(r.type===`promise`||r.type===`optional`||r.type===`nonoptional`||r.type===`nullable`||r.type===`readonly`||r.type==="default"||r.type===`prefault`)return M(r.innerType,n);if(r.type===`intersection`)return M(r.left,n)||M(r.right,n);if(r.type===`record`||r.type===`map`)return M(r.keyType,n)||M(r.valueType,n);if(r.type===`pipe`)return e._zod.traits.has(`$ZodCodec`)?!0:M(r.in,n)||M(r.out,n);if(r.type===`object`){for(let e in r.shape)if(M(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(M(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(M(e,n))return!0;return!!(r.rest&&M(r.rest,n))}return!1}var li=(e,t={})=>n=>{let r=oi({...n,processors:t});return j(e,r),si(r,e),ci(r,e)},ui=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=oi({...i??{},target:a,io:t,processors:n});return j(e,o),si(o,e),ci(o,e)},di={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},fi=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l}=e._zod.bag;if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=di[s]??s,i.format===``&&delete i.format,s===`time`&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c];e.length===1?i.pattern=e[0].source:e.length>1&&(i.allOf=[...e.map(e=>({...t.target===`draft-07`||t.target===`draft-04`||t.target===`openapi-3.0`?{type:`string`}:{},pattern:e.source}))])}},pi=(e,t,n,r)=>{let i=n,{minimum:a,maximum:o,format:s,multipleOf:c,exclusiveMaximum:l,exclusiveMinimum:u}=e._zod.bag;typeof s==`string`&&s.includes(`int`)?i.type=`integer`:i.type=`number`;let d=typeof u==`number`&&u>=(a??-1/0),f=typeof l==`number`&&l<=(o??1/0),p=t.target===`draft-04`||t.target===`openapi-3.0`;d?p?(i.minimum=u,i.exclusiveMinimum=!0):i.exclusiveMinimum=u:typeof a==`number`&&(i.minimum=a),f?p?(i.maximum=l,i.exclusiveMaximum=!0):i.exclusiveMaximum=l:typeof o==`number`&&(i.maximum=o),typeof c==`number`&&(i.multipleOf=c)},mi=(e,t,n,r)=>{n.type=`boolean`},hi=(e,t,n,r)=>{t.target===`openapi-3.0`?(n.type=`string`,n.nullable=!0,n.enum=[null]):n.type=`null`},gi=(e,t,n,r)=>{n.not={}},_i=(e,t,n,r)=>{let i=e._zod.def,a=f(i.entries);a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a},vi=(e,t,n,r)=>{let i=e._zod.def,a=[];for(let e of i.values)if(e===void 0){if(t.unrepresentable===`throw`)throw Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof e==`bigint`){if(t.unrepresentable===`throw`)throw Error(`BigInt literals cannot be represented in JSON Schema`);a.push(Number(e))}else a.push(e);if(a.length!==0)if(a.length===1){let e=a[0];n.type=e===null?`null`:typeof e,t.target===`draft-04`||t.target===`openapi-3.0`?n.enum=[e]:n.const=e}else a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),a.every(e=>typeof e==`boolean`)&&(n.type=`boolean`),a.every(e=>e===null)&&(n.type=`null`),n.enum=a},yi=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Custom types cannot be represented in JSON Schema`)},bi=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Transforms cannot be represented in JSON Schema`)},xi=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=e._zod.bag;typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=j(a.element,t,{...r,path:[...r.path,`items`]})},Si=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`,i.properties={};let o=a.shape;for(let e in o)i.properties[e]=j(o[e],t,{...r,path:[...r.path,`properties`,e]});let s=new Set(Object.keys(o)),c=new Set([...s].filter(e=>{let n=a.shape[e]._zod;return t.io===`input`?n.optin===void 0:n.optout===void 0}));c.size>0&&(i.required=Array.from(c)),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=j(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},Ci=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>j(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},wi=(e,t,n,r)=>{let i=e._zod.def,a=j(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=j(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1;n.allOf=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]]},Ti=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`;let o=a.keyType,s=o._zod.bag?.patterns;if(a.mode===`loose`&&s&&s.size>0){let e=j(a.valueType,t,{...r,path:[...r.path,`patternProperties`,`*`]});i.patternProperties={};for(let t of s)i.patternProperties[t.source]=e}else(t.target===`draft-07`||t.target===`draft-2020-12`)&&(i.propertyNames=j(a.keyType,t,{...r,path:[...r.path,`propertyNames`]})),i.additionalProperties=j(a.valueType,t,{...r,path:[...r.path,`additionalProperties`]});let c=o._zod.values;if(c){let e=[...c].filter(e=>typeof e==`string`||typeof e==`number`);e.length>0&&(i.required=e)}},Ei=(e,t,n,r)=>{let i=e._zod.def,a=j(i.innerType,t,r),o=t.seen.get(e);t.target===`openapi-3.0`?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:`null`}]},Di=(e,t,n,r)=>{let i=e._zod.def;j(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},Oi=(e,t,n,r)=>{let i=e._zod.def;j(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.default=JSON.parse(JSON.stringify(i.defaultValue))},ki=(e,t,n,r)=>{let i=e._zod.def;j(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,t.io===`input`&&(n._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},Ai=(e,t,n,r)=>{let i=e._zod.def;j(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{throw Error(`Dynamic catch values are not supported in JSON Schema`)}n.default=o},ji=(e,t,n,r)=>{let i=e._zod.def,a=i.in._zod.traits.has(`$ZodTransform`),o=t.io===`input`?a?i.out:i.in:i.out;j(o,t,r);let s=t.seen.get(e);s.ref=o},Mi=(e,t,n,r)=>{let i=e._zod.def;j(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},Ni=(e,t,n,r)=>{let i=e._zod.def;j(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},Pi=s(`ZodISODateTime`,(e,t)=>{Xt.init(e,t),R.init(e,t)});function N(e){return Tr(Pi,e)}var Fi=s(`ZodISODate`,(e,t)=>{Zt.init(e,t),R.init(e,t)});function Ii(e){return Er(Fi,e)}var Li=s(`ZodISOTime`,(e,t)=>{Qt.init(e,t),R.init(e,t)});function Ri(e){return Dr(Li,e)}var zi=s(`ZodISODuration`,(e,t)=>{$t.init(e,t),R.init(e,t)});function Bi(e){return Or(zi,e)}var P=s(`ZodError`,(e,t)=>{we.init(e,t),e.name=`ZodError`,Object.defineProperties(e,{format:{value:t=>De(e,t)},flatten:{value:t=>Ee(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,p,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,p,2)}},isEmpty:{get(){return e.issues.length===0}}})},{Parent:Error}),Vi=Oe(P),Hi=ke(P),Ui=Ae(P),Wi=Me(P),Gi=Pe(P),Ki=Fe(P),qi=Ie(P),Ji=Le(P),Yi=Re(P),Xi=ze(P),Zi=Be(P),Qi=Ve(P),$i=new WeakMap;function F(e,t,n){let r=Object.getPrototypeOf(e),i=$i.get(r);if(i||(i=new Set,$i.set(r,i)),!i.has(t)){i.add(t);for(let e in n){let t=n[e];Object.defineProperty(r,e,{configurable:!0,enumerable:!1,get(){let n=t.bind(this);return Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:n}),n},set(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:t})}})}}}var I=s(`ZodType`,(e,t)=>(D.init(e,t),Object.assign(e[`~standard`],{jsonSchema:{input:ui(e,`input`),output:ui(e,`output`)}}),e.toJSONSchema=li(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(t,n)=>Vi(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>Ui(e,t,n),e.parseAsync=async(t,n)=>Hi(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>Wi(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>Gi(e,t,n),e.decode=(t,n)=>Ki(e,t,n),e.encodeAsync=async(t,n)=>qi(e,t,n),e.decodeAsync=async(t,n)=>Ji(e,t,n),e.safeEncode=(t,n)=>Yi(e,t,n),e.safeDecode=(t,n)=>Xi(e,t,n),e.safeEncodeAsync=async(t,n)=>Zi(e,t,n),e.safeDecodeAsync=async(t,n)=>Qi(e,t,n),F(e,`ZodType`,{check(...e){let t=this.def;return this.clone(g(t,{checks:[...t.checks??[],...e.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return b(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(mo(e,t))},superRefine(e,t){return this.check(ho(e,t))},overwrite(e){return this.check(A(e))},optional(){return Ja(this)},exactOptional(){return Xa(this)},nullable(){return Qa(this)},nullish(){return Ja(Qa(this))},nonoptional(e){return io(this,e)},array(){return W(this)},or(e){return K([this,e])},and(e){return Ba(this,e)},transform(e){return co(this,Ka(e))},default(e){return eo(this,e)},prefault(e){return no(this,e)},catch(e){return oo(this,e)},pipe(e){return co(this,e)},readonly(){return fo(this)},describe(e){let t=this.clone();return k.add(t,{description:e}),t},meta(...e){if(e.length===0)return k.get(this);let t=this.clone();return k.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e){return e(this)}}),Object.defineProperty(e,"description",{get(){return k.get(e)?.description},configurable:!0}),e)),ea=s(`_ZodString`,(e,t)=>{Rt.init(e,t),I.init(e,t),e._zod.processJSONSchema=(t,n,r)=>fi(e,t,n,r);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,F(e,`_ZodString`,{regex(...e){return this.check(Gr(...e))},includes(...e){return this.check(Jr(...e))},startsWith(...e){return this.check(Yr(...e))},endsWith(...e){return this.check(Xr(...e))},min(...e){return this.check(Ur(...e))},max(...e){return this.check(Hr(...e))},length(...e){return this.check(Wr(...e))},nonempty(...e){return this.check(Ur(1,...e))},lowercase(e){return this.check(Kr(e))},uppercase(e){return this.check(qr(e))},trim(){return this.check(Qr())},normalize(...e){return this.check(Zr(...e))},toLowerCase(){return this.check($r())},toUpperCase(){return this.check(ei())},slugify(){return this.check(ti())}})}),ta=s(`ZodString`,(e,t)=>{Rt.init(e,t),ea.init(e,t),e.email=t=>e.check(rr(na,t)),e.url=t=>e.check(lr(ia,t)),e.jwt=t=>e.check(wr(ba,t)),e.emoji=t=>e.check(ur(oa,t)),e.guid=t=>e.check(ir(ra,t)),e.uuid=t=>e.check(ar(z,t)),e.uuidv4=t=>e.check(or(z,t)),e.uuidv6=t=>e.check(sr(z,t)),e.uuidv7=t=>e.check(cr(z,t)),e.nanoid=t=>e.check(dr(sa,t)),e.guid=t=>e.check(ir(ra,t)),e.cuid=t=>e.check(fr(ca,t)),e.cuid2=t=>e.check(pr(la,t)),e.ulid=t=>e.check(mr(ua,t)),e.base64=t=>e.check(xr(_a,t)),e.base64url=t=>e.check(Sr(va,t)),e.xid=t=>e.check(hr(da,t)),e.ksuid=t=>e.check(gr(fa,t)),e.ipv4=t=>e.check(_r(pa,t)),e.ipv6=t=>e.check(vr(ma,t)),e.cidrv4=t=>e.check(yr(ha,t)),e.cidrv6=t=>e.check(br(ga,t)),e.e164=t=>e.check(Cr(ya,t)),e.datetime=t=>e.check(N(t)),e.date=t=>e.check(Ii(t)),e.time=t=>e.check(Ri(t)),e.duration=t=>e.check(Bi(t))});function L(e){return nr(ta,e)}var R=s(`ZodStringFormat`,(e,t)=>{O.init(e,t),ea.init(e,t)}),na=s(`ZodEmail`,(e,t)=>{Vt.init(e,t),R.init(e,t)}),ra=s(`ZodGUID`,(e,t)=>{zt.init(e,t),R.init(e,t)}),z=s(`ZodUUID`,(e,t)=>{Bt.init(e,t),R.init(e,t)});function B(e){return ar(z,e)}var ia=s(`ZodURL`,(e,t)=>{Ht.init(e,t),R.init(e,t)});function aa(e){return lr(ia,e)}var oa=s(`ZodEmoji`,(e,t)=>{Ut.init(e,t),R.init(e,t)}),sa=s(`ZodNanoID`,(e,t)=>{Wt.init(e,t),R.init(e,t)}),ca=s(`ZodCUID`,(e,t)=>{Gt.init(e,t),R.init(e,t)}),la=s(`ZodCUID2`,(e,t)=>{Kt.init(e,t),R.init(e,t)}),ua=s(`ZodULID`,(e,t)=>{qt.init(e,t),R.init(e,t)}),da=s(`ZodXID`,(e,t)=>{Jt.init(e,t),R.init(e,t)}),fa=s(`ZodKSUID`,(e,t)=>{Yt.init(e,t),R.init(e,t)}),pa=s(`ZodIPv4`,(e,t)=>{en.init(e,t),R.init(e,t)}),ma=s(`ZodIPv6`,(e,t)=>{tn.init(e,t),R.init(e,t)}),ha=s(`ZodCIDRv4`,(e,t)=>{nn.init(e,t),R.init(e,t)}),ga=s(`ZodCIDRv6`,(e,t)=>{rn.init(e,t),R.init(e,t)}),_a=s(`ZodBase64`,(e,t)=>{on.init(e,t),R.init(e,t)}),va=s(`ZodBase64URL`,(e,t)=>{cn.init(e,t),R.init(e,t)}),ya=s(`ZodE164`,(e,t)=>{ln.init(e,t),R.init(e,t)}),ba=s(`ZodJWT`,(e,t)=>{dn.init(e,t),R.init(e,t)}),xa=s(`ZodNumber`,(e,t)=>{fn.init(e,t),I.init(e,t),e._zod.processJSONSchema=(t,n,r)=>pi(e,t,n,r),F(e,`ZodNumber`,{gt(e,t){return this.check(zr(e,t))},gte(e,t){return this.check(Br(e,t))},min(e,t){return this.check(Br(e,t))},lt(e,t){return this.check(Lr(e,t))},lte(e,t){return this.check(Rr(e,t))},max(e,t){return this.check(Rr(e,t))},int(e){return this.check(Ca(e))},safe(e){return this.check(Ca(e))},positive(e){return this.check(zr(0,e))},nonnegative(e){return this.check(Br(0,e))},negative(e){return this.check(Lr(0,e))},nonpositive(e){return this.check(Rr(0,e))},multipleOf(e,t){return this.check(Vr(e,t))},step(e,t){return this.check(Vr(e,t))},finite(){return this}});let n=e._zod.bag;e.minValue=Math.max(n.minimum??-1/0,n.exclusiveMinimum??-1/0)??null,e.maxValue=Math.min(n.maximum??1/0,n.exclusiveMaximum??1/0)??null,e.isInt=(n.format??``).includes(`int`)||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function V(e){return kr(xa,e)}var Sa=s(`ZodNumberFormat`,(e,t)=>{pn.init(e,t),xa.init(e,t)});function Ca(e){return jr(Sa,e)}var wa=s(`ZodBoolean`,(e,t)=>{mn.init(e,t),I.init(e,t),e._zod.processJSONSchema=(t,n,r)=>mi(e,t,n,r)});function H(e){return Mr(wa,e)}var Ta=s(`ZodNull`,(e,t)=>{hn.init(e,t),I.init(e,t),e._zod.processJSONSchema=(t,n,r)=>hi(e,t,n,r)});function Ea(e){return Nr(Ta,e)}var Da=s(`ZodAny`,(e,t)=>{gn.init(e,t),I.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function Oa(){return Pr(Da)}var ka=s(`ZodUnknown`,(e,t)=>{_n.init(e,t),I.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function U(){return Fr(ka)}var Aa=s(`ZodNever`,(e,t)=>{vn.init(e,t),I.init(e,t),e._zod.processJSONSchema=(t,n,r)=>gi(e,t,n,r)});function ja(e){return Ir(Aa,e)}var Ma=s(`ZodArray`,(e,t)=>{bn.init(e,t),I.init(e,t),e._zod.processJSONSchema=(t,n,r)=>xi(e,t,n,r),e.element=t.element,F(e,`ZodArray`,{min(e,t){return this.check(Ur(e,t))},nonempty(e){return this.check(Ur(1,e))},max(e,t){return this.check(Hr(e,t))},length(e,t){return this.check(Wr(e,t))},unwrap(){return this.element}})});function W(e,t){return ni(Ma,e,t)}var Na=s(`ZodObject`,(e,t)=>{Tn.init(e,t),I.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Si(e,t,n,r),m(e,`shape`,()=>t.shape),F(e,`ZodObject`,{keyof(){return q(Object.keys(this._zod.def.shape))},catchall(e){return this.clone({...this._zod.def,catchall:e})},passthrough(){return this.clone({...this._zod.def,catchall:U()})},loose(){return this.clone({...this._zod.def,catchall:U()})},strict(){return this.clone({...this._zod.def,catchall:ja()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(e){return he(this,e)},safeExtend(e){return ge(this,e)},merge(e){return _e(this,e)},pick(e){return pe(this,e)},omit(e){return me(this,e)},partial(...e){return ve(qa,this,e[0])},required(...e){return ye(ro,this,e[0])}})});function G(e,t){return new Na({type:`object`,shape:e??{},...x(t)})}function Pa(e,t){return new Na({type:`object`,shape:e,catchall:ja(),...x(t)})}function Fa(e,t){return new Na({type:`object`,shape:e,catchall:U(),...x(t)})}var Ia=s(`ZodUnion`,(e,t)=>{Dn.init(e,t),I.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ci(e,t,n,r),e.options=t.options});function K(e,t){return new Ia({type:`union`,options:e,...x(t)})}var La=s(`ZodDiscriminatedUnion`,(e,t)=>{Ia.init(e,t),On.init(e,t)});function Ra(e,t,n){return new La({type:`union`,options:t,discriminator:e,...x(n)})}var za=s(`ZodIntersection`,(e,t)=>{kn.init(e,t),I.init(e,t),e._zod.processJSONSchema=(t,n,r)=>wi(e,t,n,r)});function Ba(e,t){return new za({type:`intersection`,left:e,right:t})}var Va=s(`ZodRecord`,(e,t)=>{Mn.init(e,t),I.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ti(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType});function Ha(e,t,n){return!t||!t._zod?new Va({type:`record`,keyType:L(),valueType:e,...x(t)}):new Va({type:`record`,keyType:e,valueType:t,...x(n)})}var Ua=s(`ZodEnum`,(e,t)=>{Nn.init(e,t),I.init(e,t),e._zod.processJSONSchema=(t,n,r)=>_i(e,t,n,r),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new Ua({...t,checks:[],...x(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new Ua({...t,checks:[],...x(r),entries:i})}});function q(e,t){return new Ua({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...x(t)})}var Wa=s(`ZodLiteral`,(e,t)=>{Pn.init(e,t),I.init(e,t),e._zod.processJSONSchema=(t,n,r)=>vi(e,t,n,r),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function J(e,t){return new Wa({type:`literal`,values:Array.isArray(e)?e:[e],...x(t)})}var Ga=s(`ZodTransform`,(e,t)=>{Fn.init(e,t),I.init(e,t),e._zod.processJSONSchema=(t,n,r)=>bi(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new l(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(T(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,t.input??=n.value,t.inst??=e,n.issues.push(T(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n.fallback=!0,n)):(n.value=i,n.fallback=!0,n)}});function Ka(e){return new Ga({type:`transform`,transform:e})}var qa=s(`ZodOptional`,(e,t)=>{Ln.init(e,t),I.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ni(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Ja(e){return new qa({type:`optional`,innerType:e})}var Ya=s(`ZodExactOptional`,(e,t)=>{Rn.init(e,t),I.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ni(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Xa(e){return new Ya({type:`optional`,innerType:e})}var Za=s(`ZodNullable`,(e,t)=>{zn.init(e,t),I.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ei(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Qa(e){return new Za({type:`nullable`,innerType:e})}var $a=s(`ZodDefault`,(e,t)=>{Bn.init(e,t),I.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Oi(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function eo(e,t){return new $a({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():le(t)}})}var to=s(`ZodPrefault`,(e,t)=>{Hn.init(e,t),I.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ki(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function no(e,t){return new to({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():le(t)}})}var ro=s(`ZodNonOptional`,(e,t)=>{Un.init(e,t),I.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Di(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function io(e,t){return new ro({type:`nonoptional`,innerType:e,...x(t)})}var ao=s(`ZodCatch`,(e,t)=>{Gn.init(e,t),I.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ai(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function oo(e,t){return new ao({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:()=>t})}var so=s(`ZodPipe`,(e,t)=>{Kn.init(e,t),I.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ji(e,t,n,r),e.in=t.in,e.out=t.out});function co(e,t){return new so({type:`pipe`,in:e,out:t})}var lo=s(`ZodPreprocess`,(e,t)=>{so.init(e,t),Jn.init(e,t)}),uo=s(`ZodReadonly`,(e,t)=>{Yn.init(e,t),I.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Mi(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function fo(e){return new uo({type:`readonly`,innerType:e})}var po=s(`ZodCustom`,(e,t)=>{Zn.init(e,t),I.init(e,t),e._zod.processJSONSchema=(t,n,r)=>yi(e,t,n,r)});function mo(e,t={}){return ri(po,e,t)}function ho(e,t){return ii(e,t)}function go(e,t){return new lo({type:`pipe`,in:Ka(e),out:t})}function _o(e){return Ar(xa,e)}var Y={questions:4,id:64,header:12,question:400,minOptions:2,maxOptions:4,label:60,description:280,context:2e4},vo=L().min(1).max(Y.context),yo=G({label:L().min(1).max(Y.label),description:L().max(Y.description).optional()}).strict(),bo=G({id:L().min(1).max(Y.id).optional(),header:L().min(1).max(Y.header),question:L().min(1).max(Y.question),options:W(yo).min(Y.minOptions).max(Y.maxOptions).refine(e=>new Set(e.map(e=>e.label)).size===e.length,{message:`option labels must be unique within a question`}).optional(),multiSelect:H().optional()}).strict(),xo=G({context:vo.optional(),questions:W(bo).min(1).max(Y.questions).refine(e=>new Set(e.map(e=>e.question)).size===e.length,{message:`question texts must be unique`})}).strict(),So=q([`family`,`peer`]),Co=G({senderRunId:B(),recipientRunId:B(),kind:q([`request`,`progress`,`follow-up`,`reply`]),requestId:B().optional(),relationship:So.optional()}).strict(),X=Co.extend({id:B(),text:L().min(1).max(1e5),createdAt:N(),deadline:N().optional(),requestHash:L().regex(/^[0-9a-f]{64}$/),state:q([`accepted`,`continuation-required`,`destroyed`,`late`]),resumed:J(!0).optional(),instruction:L().max(2048).optional(),question:xo.optional()}),Z=G({requestId:B(),status:q([`replied`,`replied-late`,`completed-without-reply`,`failed`,`cancelled`,`destroyed`,`timed-out`,`sender-closed`,`human-fallback`,`deleted`]),observedAt:N(),replyId:B().optional()}).strict(),wo=G({messages:W(X).max(1024),outcomes:W(Z).max(1024)}).strict(),To=L().max(128).regex(/^(\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?Z)~([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})$/i,`Not a history cursor; pass nextBefore from an earlier page`);wo.extend({hint:L().optional(),nextBefore:To.optional()}),G({messages:W(X).max(32),outcomes:W(Z).max(32),receiptId:B().optional(),expiresAt:N().optional()}).strict().refine(e=>e.messages.length>0?e.receiptId!==void 0&&e.expiresAt!==void 0:e.receiptId===void 0&&e.expiresAt===void 0,{message:`A nonempty inbox batch requires a receipt and expiry`}),G({receiptId:B()}).strict(),G({receiptId:B(),status:q([`acknowledged`,`already-acknowledged`,`released`])}).strict(),G({id:B(),recipientRunId:B(),kind:Co.shape.kind,requestId:B().optional(),text:L().min(1).max(1e5).refine(e=>e.trim().length>0),timeoutSeconds:V().int().min(1).max(86400).default(600),resume:H().optional()}).strict().refine(e=>e.timeoutSeconds<=7200||e.resume===!0&&e.kind===`request`,{path:[`timeoutSeconds`],message:`Only --resume requests accept deadlines above 7200 seconds (maximum 86400)`}).refine(e=>(e.kind===`reply`||e.kind===`follow-up`)==(e.requestId!==void 0),{message:`Replies and follow-ups require a request ID; new messages must omit it`}).refine(e=>!e.resume||e.kind===`request`||e.kind===`progress`,{message:`--resume requires a new request or progress instruction`});var Eo=q([`applied`,`unchanged`,`refused`,`unknown`]);G({message:X,delivery:q([`queued`,`delivered`,`consumed`,`not-delivered`]),outcome:Z.optional(),effect:Eo.optional()}).strict(),G({recipientRunId:B(),before:To.optional()}).strict(),G({requestId:B()}).strict(),G({requestIds:W(B()).min(1).max(32).refine(e=>new Set(e).size===e.length),mode:q([`one`,`any`,`all`]).optional(),timeoutSeconds:V().int().min(1).max(7200).default(600)}).strict().refine(e=>e.mode!==`one`||e.requestIds.length===1,{message:`one requires exactly one request`});var Do=G({receiptId:B(),generation:B(),expiresAt:N(),acknowledgedAt:N().optional(),memberIds:W(B()).min(1).max(32).refine(e=>new Set(e).size===e.length).optional()}).strict(),Oo=G({conversation:Co.optional(),id:B(),source:q([`agent`,`lifecycle`]),parentRunId:B(),text:L().min(1).max(1e5),createdAt:N(),deliveredAt:N().optional(),consumedAt:N().optional(),awaitingRead:J(!0).optional(),inboxClaim:Do.optional(),purpose:q([`completion-refusal`,`undelivered-question`]).optional(),requestHash:L().regex(/^[0-9a-f]{64}$/).optional(),deadline:N().optional()}).strict(),ko=G({workerId:B(),status:q([`review`,`done`,`failed`,`cancelled`]),observedAt:N(),summary:L().max(4e3).optional(),revision:V().int().nonnegative().optional()}).strict(),Ao=q([`one`,`any`,`all`]),Q=Fa({seq:V(),ts:L(),stepId:L().optional(),type:L()}),jo=Q.extend({type:J(`conversation-message`),message:X,delivery:q([`queued`,`delivered`,`consumed`,`not-delivered`]),deliveredAt:N().optional(),consumedAt:N().optional()}),Mo=Q.extend({type:J(`request-outcome`),outcome:Z}),No=Q.extend({type:J(`agent-input`),input:Oo}),Po=Q.extend({type:J(`human-input-delivered`),askSeq:V().int().nonnegative(),source:q([`human`,`parent`,`cezar`]).optional()}),Fo=Q.extend({type:J(`human-ask-closed`),askSeq:V().int().nonnegative(),reason:q([`finish`,`superseded`,`parent-stopped`,`worker-stopped`,`undeliverable`])});Q.extend({type:J(`worker-question-routed`),askSeq:V().int().nonnegative(),messageId:B(),parentRunId:B()}),Q.extend({type:J(`worker-question-fallback`),askSeq:V().int().nonnegative(),reason:L().min(1).max(200)}),Q.extend({type:J(`worker-question-undelivered`),askSeq:V().int().nonnegative(),reason:L().min(1).max(200)}),Q.extend({type:J(`worker-outcome`),outcome:ko});var Io=G({id:L().min(1).max(128).regex(/^[A-Za-z0-9._-]+$/)}),$=L().min(1).max(2048);G({cursor:$.optional()}),G({cursor:$.optional(),afterSeq:_o().int().nonnegative().optional()});var Lo=G({seq:V(),ts:L(),stepId:L().optional(),type:L()}).catchall(Oa()),Ro=G({events:W(Lo),itemCount:V().int().min(0).max(100),olderCursor:$.optional(),newerCursor:$.optional(),liveCursor:$,asOfSeq:V().int().nonnegative(),hasOlder:H()}),zo=G({contextEvents:W(Lo),asOfSeq:V().int().nonnegative()}),Bo=G({checkoutId:L().optional(),name:L(),phase:q([`cloning`,`done`,`error`]),line:L().optional(),error:L().optional(),warning:L().optional()}),Vo=1024*1024,Ho=G({projectId:L().min(1).max(128).regex(/^[a-zA-Z0-9_-]+$/),runId:Io.shape.id,cursor:$.optional(),afterSeq:V().int().nonnegative().safe()});G({runs:W(Ho).min(1).max(32)}).refine(({runs:e})=>new Set(e.map(e=>`${e.projectId}/${e.runId}`)).size===e.length,{message:`duplicate run demand`});var Uo=Ho.pick({projectId:!0,runId:!0}),Wo=Uo.extend({type:q([`error`,`reset`]),status:K([J(400),J(404),J(409),J(413),J(503)]),error:L()}),Go=K([Uo.extend({type:J(`batch`),events:W(Lo).max(256),cursor:$,afterSeq:V().int().nonnegative(),hasMore:H()}),Wo]),Ko=G({generation:L(),results:W(Go)}),qo=K([G({type:J(`ready`),generation:L()}),G({type:J(`ping`)}),Uo.extend({type:J(`event`),name:q([`run-event`,`ui-event`]),event:Lo}),Wo]),Jo=`cezar-live-v3`,Yo=15e3,Xo=5e3;function Zo(e){return!e.startsWith(`/api/v1/`)||e.includes(`#`)||/[\\\r\n]/.test(e)?!1:/^\/api\/v1\/(?:workspace\/(?:runs-index|activity)|p\/[a-zA-Z0-9_-]+\/(?:reports\/state|runs\/[a-zA-Z0-9._-]+\/(?:changes|commits)|github(?:\/(?:checks|ref-status))?))(?:\?[^#]*)?$/.test(e)}var Qo=Ra(`kind`,[G({kind:J(`workspace`)}),Ho.extend({kind:J(`run`)}),G({kind:J(`topic`),topic:L().min(1).max(128)}),G({kind:J(`read`),path:L().max(4096).refine(Zo),intervalMs:V().int().min(1e3).max(2147483647)})]),$o=G({id:L().min(1).max(128),demand:Qo}),es=G({version:J(3),documentId:L().min(1).max(128),epoch:V().int().nonnegative()}),ts=Ra(`type`,[es.extend({type:J(`sync`),entries:W($o).max(64),workspaceReady:J(!0).optional()}).refine(e=>new Set(e.entries.map(e=>e.id)).size===e.entries.length),es.extend({type:J(`ack`),id:L(),seq:V().int().nonnegative()}),es.extend({type:J(`refresh`),id:L()})]),ns=G({event:L(),data:L(),id:L()}),rs=Ra(`type`,[G({type:J(`unavailable`),version:J(3),epoch:V(),reason:L()}),G({type:J(`hello`),version:J(3)}),G({type:J(`alive`),version:J(3),epoch:V()}),G({type:J(`frame`),version:J(3),epoch:V(),id:L(),frame:K([ns,qo])}),G({type:J(`value`),version:J(3),epoch:V(),id:L(),value:U(),error:L().optional()}),G({type:J(`reset`),version:J(3),epoch:V(),id:L(),reason:L()})]),is=e=>`${e.projectId}/${e.runId}`;export{W as A,Pa as B,wo as C,_o as D,xo as E,ja as F,B as G,K as H,V as I,t as J,N as K,G as L,Ra as M,J as N,q as O,Fa as P,go as R,Oo as S,vo as T,U,L as V,aa as W,Mo as _,Qo as a,ko as b,is as c,Vo as d,No as f,Po as g,Fo as h,Zo as i,H as j,Ea as k,Ko as l,jo as m,Jo as n,ts as o,Bo as p,a as q,Xo as r,rs as s,Yo as t,qo as u,zo as v,Z as w,Ao as x,Ro as y,Ha as z};
|
|
64
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0]){a(n);continue}if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}if(e.metadataRegistry.get(n[0])?.id){a(n);continue}if(r.cycle){a(n);continue}if(r.count>1&&e.reused===`ref`){a(n);continue}}}function ci(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=t=>{let n=e.seen.get(t);if(n.ref===null)return;let i=n.def??n.schema,a={...i},o=n.ref;if(n.ref=null,o){r(o);let n=e.seen.get(o),s=n.schema;if(s.$ref&&(e.target===`draft-07`||e.target===`draft-04`||e.target===`openapi-3.0`)?(i.allOf=i.allOf??[],i.allOf.push(s)):Object.assign(i,s),Object.assign(i,a),t._zod.parent===o)for(let e in i)e===`$ref`||e===`allOf`||e in a||delete i[e];if(s.$ref&&n.def)for(let e in i)e===`$ref`||e===`allOf`||e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)e===`$ref`||e===`allOf`||e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};for(let t of[...e.seen.entries()].reverse())r(t[0]);let i={};if(e.target===`draft-2020-12`?i.$schema=`https://json-schema.org/draft/2020-12/schema`:e.target===`draft-07`?i.$schema=`http://json-schema.org/draft-07/schema#`:e.target===`draft-04`?i.$schema=`http://json-schema.org/draft-04/schema#`:e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}Object.assign(i,n.def??n.schema);let a=e.metadataRegistry.get(t)?.id;a!==void 0&&i.id===a&&delete i.id;let o=e.external?.defs??{};for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,o[e.defId]=e.def)}e.external||Object.keys(o).length>0&&(e.target===`draft-2020-12`?i.$defs=o:i.definitions=o);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,"~standard",{value:{...t[`~standard`],jsonSchema:{input:ui(t,`input`,e.processors),output:ui(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function M(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type===`transform`)return!0;if(r.type===`array`)return M(r.element,n);if(r.type===`set`)return M(r.valueType,n);if(r.type===`lazy`)return M(r.getter(),n);if(r.type===`promise`||r.type===`optional`||r.type===`nonoptional`||r.type===`nullable`||r.type===`readonly`||r.type==="default"||r.type===`prefault`)return M(r.innerType,n);if(r.type===`intersection`)return M(r.left,n)||M(r.right,n);if(r.type===`record`||r.type===`map`)return M(r.keyType,n)||M(r.valueType,n);if(r.type===`pipe`)return e._zod.traits.has(`$ZodCodec`)?!0:M(r.in,n)||M(r.out,n);if(r.type===`object`){for(let e in r.shape)if(M(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(M(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(M(e,n))return!0;return!!(r.rest&&M(r.rest,n))}return!1}var li=(e,t={})=>n=>{let r=oi({...n,processors:t});return j(e,r),si(r,e),ci(r,e)},ui=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=oi({...i??{},target:a,io:t,processors:n});return j(e,o),si(o,e),ci(o,e)},di={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},fi=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l}=e._zod.bag;if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=di[s]??s,i.format===``&&delete i.format,s===`time`&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c];e.length===1?i.pattern=e[0].source:e.length>1&&(i.allOf=[...e.map(e=>({...t.target===`draft-07`||t.target===`draft-04`||t.target===`openapi-3.0`?{type:`string`}:{},pattern:e.source}))])}},pi=(e,t,n,r)=>{let i=n,{minimum:a,maximum:o,format:s,multipleOf:c,exclusiveMaximum:l,exclusiveMinimum:u}=e._zod.bag;typeof s==`string`&&s.includes(`int`)?i.type=`integer`:i.type=`number`;let d=typeof u==`number`&&u>=(a??-1/0),f=typeof l==`number`&&l<=(o??1/0),p=t.target===`draft-04`||t.target===`openapi-3.0`;d?p?(i.minimum=u,i.exclusiveMinimum=!0):i.exclusiveMinimum=u:typeof a==`number`&&(i.minimum=a),f?p?(i.maximum=l,i.exclusiveMaximum=!0):i.exclusiveMaximum=l:typeof o==`number`&&(i.maximum=o),typeof c==`number`&&(i.multipleOf=c)},mi=(e,t,n,r)=>{n.type=`boolean`},hi=(e,t,n,r)=>{t.target===`openapi-3.0`?(n.type=`string`,n.nullable=!0,n.enum=[null]):n.type=`null`},gi=(e,t,n,r)=>{n.not={}},_i=(e,t,n,r)=>{let i=e._zod.def,a=f(i.entries);a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a},vi=(e,t,n,r)=>{let i=e._zod.def,a=[];for(let e of i.values)if(e===void 0){if(t.unrepresentable===`throw`)throw Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof e==`bigint`){if(t.unrepresentable===`throw`)throw Error(`BigInt literals cannot be represented in JSON Schema`);a.push(Number(e))}else a.push(e);if(a.length!==0)if(a.length===1){let e=a[0];n.type=e===null?`null`:typeof e,t.target===`draft-04`||t.target===`openapi-3.0`?n.enum=[e]:n.const=e}else a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),a.every(e=>typeof e==`boolean`)&&(n.type=`boolean`),a.every(e=>e===null)&&(n.type=`null`),n.enum=a},yi=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Custom types cannot be represented in JSON Schema`)},bi=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Transforms cannot be represented in JSON Schema`)},xi=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=e._zod.bag;typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=j(a.element,t,{...r,path:[...r.path,`items`]})},Si=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`,i.properties={};let o=a.shape;for(let e in o)i.properties[e]=j(o[e],t,{...r,path:[...r.path,`properties`,e]});let s=new Set(Object.keys(o)),c=new Set([...s].filter(e=>{let n=a.shape[e]._zod;return t.io===`input`?n.optin===void 0:n.optout===void 0}));c.size>0&&(i.required=Array.from(c)),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=j(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},Ci=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>j(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},wi=(e,t,n,r)=>{let i=e._zod.def,a=j(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=j(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1;n.allOf=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]]},Ti=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`;let o=a.keyType,s=o._zod.bag?.patterns;if(a.mode===`loose`&&s&&s.size>0){let e=j(a.valueType,t,{...r,path:[...r.path,`patternProperties`,`*`]});i.patternProperties={};for(let t of s)i.patternProperties[t.source]=e}else(t.target===`draft-07`||t.target===`draft-2020-12`)&&(i.propertyNames=j(a.keyType,t,{...r,path:[...r.path,`propertyNames`]})),i.additionalProperties=j(a.valueType,t,{...r,path:[...r.path,`additionalProperties`]});let c=o._zod.values;if(c){let e=[...c].filter(e=>typeof e==`string`||typeof e==`number`);e.length>0&&(i.required=e)}},Ei=(e,t,n,r)=>{let i=e._zod.def,a=j(i.innerType,t,r),o=t.seen.get(e);t.target===`openapi-3.0`?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:`null`}]},Di=(e,t,n,r)=>{let i=e._zod.def;j(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},Oi=(e,t,n,r)=>{let i=e._zod.def;j(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.default=JSON.parse(JSON.stringify(i.defaultValue))},ki=(e,t,n,r)=>{let i=e._zod.def;j(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,t.io===`input`&&(n._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},Ai=(e,t,n,r)=>{let i=e._zod.def;j(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{throw Error(`Dynamic catch values are not supported in JSON Schema`)}n.default=o},ji=(e,t,n,r)=>{let i=e._zod.def,a=i.in._zod.traits.has(`$ZodTransform`),o=t.io===`input`?a?i.out:i.in:i.out;j(o,t,r);let s=t.seen.get(e);s.ref=o},Mi=(e,t,n,r)=>{let i=e._zod.def;j(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},Ni=(e,t,n,r)=>{let i=e._zod.def;j(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},Pi=s(`ZodISODateTime`,(e,t)=>{Xt.init(e,t),R.init(e,t)});function N(e){return Tr(Pi,e)}var Fi=s(`ZodISODate`,(e,t)=>{Zt.init(e,t),R.init(e,t)});function Ii(e){return Er(Fi,e)}var Li=s(`ZodISOTime`,(e,t)=>{Qt.init(e,t),R.init(e,t)});function Ri(e){return Dr(Li,e)}var zi=s(`ZodISODuration`,(e,t)=>{$t.init(e,t),R.init(e,t)});function Bi(e){return Or(zi,e)}var P=s(`ZodError`,(e,t)=>{we.init(e,t),e.name=`ZodError`,Object.defineProperties(e,{format:{value:t=>De(e,t)},flatten:{value:t=>Ee(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,p,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,p,2)}},isEmpty:{get(){return e.issues.length===0}}})},{Parent:Error}),Vi=Oe(P),Hi=ke(P),Ui=Ae(P),Wi=Me(P),Gi=Pe(P),Ki=Fe(P),qi=Ie(P),Ji=Le(P),Yi=Re(P),Xi=ze(P),Zi=Be(P),Qi=Ve(P),$i=new WeakMap;function F(e,t,n){let r=Object.getPrototypeOf(e),i=$i.get(r);if(i||(i=new Set,$i.set(r,i)),!i.has(t)){i.add(t);for(let e in n){let t=n[e];Object.defineProperty(r,e,{configurable:!0,enumerable:!1,get(){let n=t.bind(this);return Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:n}),n},set(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:t})}})}}}var I=s(`ZodType`,(e,t)=>(D.init(e,t),Object.assign(e[`~standard`],{jsonSchema:{input:ui(e,`input`),output:ui(e,`output`)}}),e.toJSONSchema=li(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(t,n)=>Vi(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>Ui(e,t,n),e.parseAsync=async(t,n)=>Hi(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>Wi(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>Gi(e,t,n),e.decode=(t,n)=>Ki(e,t,n),e.encodeAsync=async(t,n)=>qi(e,t,n),e.decodeAsync=async(t,n)=>Ji(e,t,n),e.safeEncode=(t,n)=>Yi(e,t,n),e.safeDecode=(t,n)=>Xi(e,t,n),e.safeEncodeAsync=async(t,n)=>Zi(e,t,n),e.safeDecodeAsync=async(t,n)=>Qi(e,t,n),F(e,`ZodType`,{check(...e){let t=this.def;return this.clone(g(t,{checks:[...t.checks??[],...e.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return b(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(mo(e,t))},superRefine(e,t){return this.check(ho(e,t))},overwrite(e){return this.check(A(e))},optional(){return Ja(this)},exactOptional(){return Xa(this)},nullable(){return Qa(this)},nullish(){return Ja(Qa(this))},nonoptional(e){return io(this,e)},array(){return W(this)},or(e){return K([this,e])},and(e){return Ba(this,e)},transform(e){return co(this,Ka(e))},default(e){return eo(this,e)},prefault(e){return no(this,e)},catch(e){return oo(this,e)},pipe(e){return co(this,e)},readonly(){return fo(this)},describe(e){let t=this.clone();return k.add(t,{description:e}),t},meta(...e){if(e.length===0)return k.get(this);let t=this.clone();return k.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e){return e(this)}}),Object.defineProperty(e,"description",{get(){return k.get(e)?.description},configurable:!0}),e)),ea=s(`_ZodString`,(e,t)=>{Rt.init(e,t),I.init(e,t),e._zod.processJSONSchema=(t,n,r)=>fi(e,t,n,r);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,F(e,`_ZodString`,{regex(...e){return this.check(Gr(...e))},includes(...e){return this.check(Jr(...e))},startsWith(...e){return this.check(Yr(...e))},endsWith(...e){return this.check(Xr(...e))},min(...e){return this.check(Ur(...e))},max(...e){return this.check(Hr(...e))},length(...e){return this.check(Wr(...e))},nonempty(...e){return this.check(Ur(1,...e))},lowercase(e){return this.check(Kr(e))},uppercase(e){return this.check(qr(e))},trim(){return this.check(Qr())},normalize(...e){return this.check(Zr(...e))},toLowerCase(){return this.check($r())},toUpperCase(){return this.check(ei())},slugify(){return this.check(ti())}})}),ta=s(`ZodString`,(e,t)=>{Rt.init(e,t),ea.init(e,t),e.email=t=>e.check(rr(na,t)),e.url=t=>e.check(lr(ia,t)),e.jwt=t=>e.check(wr(ba,t)),e.emoji=t=>e.check(ur(oa,t)),e.guid=t=>e.check(ir(ra,t)),e.uuid=t=>e.check(ar(z,t)),e.uuidv4=t=>e.check(or(z,t)),e.uuidv6=t=>e.check(sr(z,t)),e.uuidv7=t=>e.check(cr(z,t)),e.nanoid=t=>e.check(dr(sa,t)),e.guid=t=>e.check(ir(ra,t)),e.cuid=t=>e.check(fr(ca,t)),e.cuid2=t=>e.check(pr(la,t)),e.ulid=t=>e.check(mr(ua,t)),e.base64=t=>e.check(xr(_a,t)),e.base64url=t=>e.check(Sr(va,t)),e.xid=t=>e.check(hr(da,t)),e.ksuid=t=>e.check(gr(fa,t)),e.ipv4=t=>e.check(_r(pa,t)),e.ipv6=t=>e.check(vr(ma,t)),e.cidrv4=t=>e.check(yr(ha,t)),e.cidrv6=t=>e.check(br(ga,t)),e.e164=t=>e.check(Cr(ya,t)),e.datetime=t=>e.check(N(t)),e.date=t=>e.check(Ii(t)),e.time=t=>e.check(Ri(t)),e.duration=t=>e.check(Bi(t))});function L(e){return nr(ta,e)}var R=s(`ZodStringFormat`,(e,t)=>{O.init(e,t),ea.init(e,t)}),na=s(`ZodEmail`,(e,t)=>{Vt.init(e,t),R.init(e,t)}),ra=s(`ZodGUID`,(e,t)=>{zt.init(e,t),R.init(e,t)}),z=s(`ZodUUID`,(e,t)=>{Bt.init(e,t),R.init(e,t)});function B(e){return ar(z,e)}var ia=s(`ZodURL`,(e,t)=>{Ht.init(e,t),R.init(e,t)});function aa(e){return lr(ia,e)}var oa=s(`ZodEmoji`,(e,t)=>{Ut.init(e,t),R.init(e,t)}),sa=s(`ZodNanoID`,(e,t)=>{Wt.init(e,t),R.init(e,t)}),ca=s(`ZodCUID`,(e,t)=>{Gt.init(e,t),R.init(e,t)}),la=s(`ZodCUID2`,(e,t)=>{Kt.init(e,t),R.init(e,t)}),ua=s(`ZodULID`,(e,t)=>{qt.init(e,t),R.init(e,t)}),da=s(`ZodXID`,(e,t)=>{Jt.init(e,t),R.init(e,t)}),fa=s(`ZodKSUID`,(e,t)=>{Yt.init(e,t),R.init(e,t)}),pa=s(`ZodIPv4`,(e,t)=>{en.init(e,t),R.init(e,t)}),ma=s(`ZodIPv6`,(e,t)=>{tn.init(e,t),R.init(e,t)}),ha=s(`ZodCIDRv4`,(e,t)=>{nn.init(e,t),R.init(e,t)}),ga=s(`ZodCIDRv6`,(e,t)=>{rn.init(e,t),R.init(e,t)}),_a=s(`ZodBase64`,(e,t)=>{on.init(e,t),R.init(e,t)}),va=s(`ZodBase64URL`,(e,t)=>{cn.init(e,t),R.init(e,t)}),ya=s(`ZodE164`,(e,t)=>{ln.init(e,t),R.init(e,t)}),ba=s(`ZodJWT`,(e,t)=>{dn.init(e,t),R.init(e,t)}),xa=s(`ZodNumber`,(e,t)=>{fn.init(e,t),I.init(e,t),e._zod.processJSONSchema=(t,n,r)=>pi(e,t,n,r),F(e,`ZodNumber`,{gt(e,t){return this.check(zr(e,t))},gte(e,t){return this.check(Br(e,t))},min(e,t){return this.check(Br(e,t))},lt(e,t){return this.check(Lr(e,t))},lte(e,t){return this.check(Rr(e,t))},max(e,t){return this.check(Rr(e,t))},int(e){return this.check(Ca(e))},safe(e){return this.check(Ca(e))},positive(e){return this.check(zr(0,e))},nonnegative(e){return this.check(Br(0,e))},negative(e){return this.check(Lr(0,e))},nonpositive(e){return this.check(Rr(0,e))},multipleOf(e,t){return this.check(Vr(e,t))},step(e,t){return this.check(Vr(e,t))},finite(){return this}});let n=e._zod.bag;e.minValue=Math.max(n.minimum??-1/0,n.exclusiveMinimum??-1/0)??null,e.maxValue=Math.min(n.maximum??1/0,n.exclusiveMaximum??1/0)??null,e.isInt=(n.format??``).includes(`int`)||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function V(e){return kr(xa,e)}var Sa=s(`ZodNumberFormat`,(e,t)=>{pn.init(e,t),xa.init(e,t)});function Ca(e){return jr(Sa,e)}var wa=s(`ZodBoolean`,(e,t)=>{mn.init(e,t),I.init(e,t),e._zod.processJSONSchema=(t,n,r)=>mi(e,t,n,r)});function H(e){return Mr(wa,e)}var Ta=s(`ZodNull`,(e,t)=>{hn.init(e,t),I.init(e,t),e._zod.processJSONSchema=(t,n,r)=>hi(e,t,n,r)});function Ea(e){return Nr(Ta,e)}var Da=s(`ZodAny`,(e,t)=>{gn.init(e,t),I.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function Oa(){return Pr(Da)}var ka=s(`ZodUnknown`,(e,t)=>{_n.init(e,t),I.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function U(){return Fr(ka)}var Aa=s(`ZodNever`,(e,t)=>{vn.init(e,t),I.init(e,t),e._zod.processJSONSchema=(t,n,r)=>gi(e,t,n,r)});function ja(e){return Ir(Aa,e)}var Ma=s(`ZodArray`,(e,t)=>{bn.init(e,t),I.init(e,t),e._zod.processJSONSchema=(t,n,r)=>xi(e,t,n,r),e.element=t.element,F(e,`ZodArray`,{min(e,t){return this.check(Ur(e,t))},nonempty(e){return this.check(Ur(1,e))},max(e,t){return this.check(Hr(e,t))},length(e,t){return this.check(Wr(e,t))},unwrap(){return this.element}})});function W(e,t){return ni(Ma,e,t)}var Na=s(`ZodObject`,(e,t)=>{Tn.init(e,t),I.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Si(e,t,n,r),m(e,`shape`,()=>t.shape),F(e,`ZodObject`,{keyof(){return q(Object.keys(this._zod.def.shape))},catchall(e){return this.clone({...this._zod.def,catchall:e})},passthrough(){return this.clone({...this._zod.def,catchall:U()})},loose(){return this.clone({...this._zod.def,catchall:U()})},strict(){return this.clone({...this._zod.def,catchall:ja()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(e){return he(this,e)},safeExtend(e){return ge(this,e)},merge(e){return _e(this,e)},pick(e){return pe(this,e)},omit(e){return me(this,e)},partial(...e){return ve(qa,this,e[0])},required(...e){return ye(ro,this,e[0])}})});function G(e,t){return new Na({type:`object`,shape:e??{},...x(t)})}function Pa(e,t){return new Na({type:`object`,shape:e,catchall:ja(),...x(t)})}function Fa(e,t){return new Na({type:`object`,shape:e,catchall:U(),...x(t)})}var Ia=s(`ZodUnion`,(e,t)=>{Dn.init(e,t),I.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ci(e,t,n,r),e.options=t.options});function K(e,t){return new Ia({type:`union`,options:e,...x(t)})}var La=s(`ZodDiscriminatedUnion`,(e,t)=>{Ia.init(e,t),On.init(e,t)});function Ra(e,t,n){return new La({type:`union`,options:t,discriminator:e,...x(n)})}var za=s(`ZodIntersection`,(e,t)=>{kn.init(e,t),I.init(e,t),e._zod.processJSONSchema=(t,n,r)=>wi(e,t,n,r)});function Ba(e,t){return new za({type:`intersection`,left:e,right:t})}var Va=s(`ZodRecord`,(e,t)=>{Mn.init(e,t),I.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ti(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType});function Ha(e,t,n){return!t||!t._zod?new Va({type:`record`,keyType:L(),valueType:e,...x(t)}):new Va({type:`record`,keyType:e,valueType:t,...x(n)})}var Ua=s(`ZodEnum`,(e,t)=>{Nn.init(e,t),I.init(e,t),e._zod.processJSONSchema=(t,n,r)=>_i(e,t,n,r),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new Ua({...t,checks:[],...x(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new Ua({...t,checks:[],...x(r),entries:i})}});function q(e,t){return new Ua({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...x(t)})}var Wa=s(`ZodLiteral`,(e,t)=>{Pn.init(e,t),I.init(e,t),e._zod.processJSONSchema=(t,n,r)=>vi(e,t,n,r),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function J(e,t){return new Wa({type:`literal`,values:Array.isArray(e)?e:[e],...x(t)})}var Ga=s(`ZodTransform`,(e,t)=>{Fn.init(e,t),I.init(e,t),e._zod.processJSONSchema=(t,n,r)=>bi(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new l(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(T(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,t.input??=n.value,t.inst??=e,n.issues.push(T(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n.fallback=!0,n)):(n.value=i,n.fallback=!0,n)}});function Ka(e){return new Ga({type:`transform`,transform:e})}var qa=s(`ZodOptional`,(e,t)=>{Ln.init(e,t),I.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ni(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Ja(e){return new qa({type:`optional`,innerType:e})}var Ya=s(`ZodExactOptional`,(e,t)=>{Rn.init(e,t),I.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ni(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Xa(e){return new Ya({type:`optional`,innerType:e})}var Za=s(`ZodNullable`,(e,t)=>{zn.init(e,t),I.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ei(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Qa(e){return new Za({type:`nullable`,innerType:e})}var $a=s(`ZodDefault`,(e,t)=>{Bn.init(e,t),I.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Oi(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function eo(e,t){return new $a({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():le(t)}})}var to=s(`ZodPrefault`,(e,t)=>{Hn.init(e,t),I.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ki(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function no(e,t){return new to({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():le(t)}})}var ro=s(`ZodNonOptional`,(e,t)=>{Un.init(e,t),I.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Di(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function io(e,t){return new ro({type:`nonoptional`,innerType:e,...x(t)})}var ao=s(`ZodCatch`,(e,t)=>{Gn.init(e,t),I.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ai(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function oo(e,t){return new ao({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:()=>t})}var so=s(`ZodPipe`,(e,t)=>{Kn.init(e,t),I.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ji(e,t,n,r),e.in=t.in,e.out=t.out});function co(e,t){return new so({type:`pipe`,in:e,out:t})}var lo=s(`ZodPreprocess`,(e,t)=>{so.init(e,t),Jn.init(e,t)}),uo=s(`ZodReadonly`,(e,t)=>{Yn.init(e,t),I.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Mi(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function fo(e){return new uo({type:`readonly`,innerType:e})}var po=s(`ZodCustom`,(e,t)=>{Zn.init(e,t),I.init(e,t),e._zod.processJSONSchema=(t,n,r)=>yi(e,t,n,r)});function mo(e,t={}){return ri(po,e,t)}function ho(e,t){return ii(e,t)}function go(e,t){return new lo({type:`pipe`,in:Ka(e),out:t})}function _o(e){return Ar(xa,e)}var Y={questions:4,id:64,header:12,question:400,minOptions:2,maxOptions:4,label:60,description:280,context:2e4},vo=L().min(1).max(Y.context),yo=G({label:L().min(1).max(Y.label),description:L().max(Y.description).optional()}).strict(),bo=G({id:L().min(1).max(Y.id).optional(),header:L().min(1).max(Y.header),question:L().min(1).max(Y.question),options:W(yo).min(Y.minOptions).max(Y.maxOptions).refine(e=>new Set(e.map(e=>e.label)).size===e.length,{message:`option labels must be unique within a question`}).optional(),multiSelect:H().optional(),allowFreeText:H().optional()}).strict(),xo=G({context:vo.optional(),questions:W(bo).min(1).max(Y.questions).refine(e=>new Set(e.map(e=>e.question)).size===e.length,{message:`question texts must be unique`})}).strict(),So=q([`family`,`peer`]),Co=G({senderRunId:B(),recipientRunId:B(),kind:q([`request`,`progress`,`follow-up`,`reply`]),requestId:B().optional(),relationship:So.optional()}).strict(),X=Co.extend({id:B(),text:L().min(1).max(1e5),createdAt:N(),deadline:N().optional(),requestHash:L().regex(/^[0-9a-f]{64}$/),state:q([`accepted`,`continuation-required`,`destroyed`,`late`]),resumed:J(!0).optional(),instruction:L().max(2048).optional(),question:xo.optional()}),Z=G({requestId:B(),status:q([`replied`,`replied-late`,`completed-without-reply`,`failed`,`cancelled`,`destroyed`,`timed-out`,`sender-closed`,`human-fallback`,`deleted`]),observedAt:N(),replyId:B().optional()}).strict(),wo=G({messages:W(X).max(1024),outcomes:W(Z).max(1024)}).strict(),To=L().max(128).regex(/^(\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?Z)~([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})$/i,`Not a history cursor; pass nextBefore from an earlier page`);wo.extend({hint:L().optional(),nextBefore:To.optional()}),G({messages:W(X).max(32),outcomes:W(Z).max(32),receiptId:B().optional(),expiresAt:N().optional()}).strict().refine(e=>e.messages.length>0?e.receiptId!==void 0&&e.expiresAt!==void 0:e.receiptId===void 0&&e.expiresAt===void 0,{message:`A nonempty inbox batch requires a receipt and expiry`}),G({receiptId:B()}).strict(),G({receiptId:B(),status:q([`acknowledged`,`already-acknowledged`,`released`])}).strict(),G({id:B(),recipientRunId:B(),kind:Co.shape.kind,requestId:B().optional(),text:L().min(1).max(1e5).refine(e=>e.trim().length>0),timeoutSeconds:V().int().min(1).max(86400).default(600),resume:H().optional()}).strict().refine(e=>e.timeoutSeconds<=7200||e.resume===!0&&e.kind===`request`,{path:[`timeoutSeconds`],message:`Only --resume requests accept deadlines above 7200 seconds (maximum 86400)`}).refine(e=>(e.kind===`reply`||e.kind===`follow-up`)==(e.requestId!==void 0),{message:`Replies and follow-ups require a request ID; new messages must omit it`}).refine(e=>!e.resume||e.kind===`request`||e.kind===`progress`,{message:`--resume requires a new request or progress instruction`});var Eo=q([`applied`,`unchanged`,`refused`,`unknown`]);G({message:X,delivery:q([`queued`,`delivered`,`consumed`,`not-delivered`]),outcome:Z.optional(),effect:Eo.optional()}).strict(),G({recipientRunId:B(),before:To.optional()}).strict(),G({requestId:B()}).strict(),G({requestIds:W(B()).min(1).max(32).refine(e=>new Set(e).size===e.length),mode:q([`one`,`any`,`all`]).optional(),timeoutSeconds:V().int().min(1).max(7200).default(600)}).strict().refine(e=>e.mode!==`one`||e.requestIds.length===1,{message:`one requires exactly one request`});var Do=G({receiptId:B(),generation:B(),expiresAt:N(),acknowledgedAt:N().optional(),memberIds:W(B()).min(1).max(32).refine(e=>new Set(e).size===e.length).optional()}).strict(),Oo=G({conversation:Co.optional(),id:B(),source:q([`agent`,`lifecycle`]),parentRunId:B(),text:L().min(1).max(1e5),createdAt:N(),deliveredAt:N().optional(),consumedAt:N().optional(),awaitingRead:J(!0).optional(),inboxClaim:Do.optional(),purpose:q([`completion-refusal`,`undelivered-question`]).optional(),requestHash:L().regex(/^[0-9a-f]{64}$/).optional(),deadline:N().optional()}).strict(),ko=G({workerId:B(),status:q([`review`,`done`,`failed`,`cancelled`]),observedAt:N(),summary:L().max(4e3).optional(),revision:V().int().nonnegative().optional()}).strict(),Ao=q([`one`,`any`,`all`]),Q=Fa({seq:V(),ts:L(),stepId:L().optional(),type:L()}),jo=Q.extend({type:J(`conversation-message`),message:X,delivery:q([`queued`,`delivered`,`consumed`,`not-delivered`]),deliveredAt:N().optional(),consumedAt:N().optional()}),Mo=Q.extend({type:J(`request-outcome`),outcome:Z}),No=Q.extend({type:J(`agent-input`),input:Oo}),Po=Q.extend({type:J(`human-input-delivered`),askSeq:V().int().nonnegative(),source:q([`human`,`parent`,`cezar`]).optional()}),Fo=Q.extend({type:J(`human-ask-closed`),askSeq:V().int().nonnegative(),reason:q([`finish`,`superseded`,`parent-stopped`,`worker-stopped`,`undeliverable`])});Q.extend({type:J(`worker-question-routed`),askSeq:V().int().nonnegative(),messageId:B(),parentRunId:B()}),Q.extend({type:J(`worker-question-fallback`),askSeq:V().int().nonnegative(),reason:L().min(1).max(200)}),Q.extend({type:J(`worker-question-undelivered`),askSeq:V().int().nonnegative(),reason:L().min(1).max(200)}),Q.extend({type:J(`worker-outcome`),outcome:ko});var Io=G({id:L().min(1).max(128).regex(/^[A-Za-z0-9._-]+$/)}),$=L().min(1).max(2048);G({cursor:$.optional()}),G({cursor:$.optional(),afterSeq:_o().int().nonnegative().optional()});var Lo=G({seq:V(),ts:L(),stepId:L().optional(),type:L()}).catchall(Oa()),Ro=G({events:W(Lo),itemCount:V().int().min(0).max(100),olderCursor:$.optional(),newerCursor:$.optional(),liveCursor:$,asOfSeq:V().int().nonnegative(),hasOlder:H()}),zo=G({contextEvents:W(Lo),asOfSeq:V().int().nonnegative()}),Bo=G({checkoutId:L().optional(),name:L(),phase:q([`cloning`,`done`,`error`]),line:L().optional(),error:L().optional(),warning:L().optional()}),Vo=1024*1024,Ho=G({projectId:L().min(1).max(128).regex(/^[a-zA-Z0-9_-]+$/),runId:Io.shape.id,cursor:$.optional(),afterSeq:V().int().nonnegative().safe()});G({runs:W(Ho).min(1).max(32)}).refine(({runs:e})=>new Set(e.map(e=>`${e.projectId}/${e.runId}`)).size===e.length,{message:`duplicate run demand`});var Uo=Ho.pick({projectId:!0,runId:!0}),Wo=Uo.extend({type:q([`error`,`reset`]),status:K([J(400),J(404),J(409),J(413),J(503)]),error:L()}),Go=K([Uo.extend({type:J(`batch`),events:W(Lo).max(256),cursor:$,afterSeq:V().int().nonnegative(),hasMore:H()}),Wo]),Ko=G({generation:L(),results:W(Go)}),qo=K([G({type:J(`ready`),generation:L()}),G({type:J(`ping`)}),Uo.extend({type:J(`event`),name:q([`run-event`,`ui-event`]),event:Lo}),Wo]),Jo=`cezar-live-v3`,Yo=15e3,Xo=5e3;function Zo(e){return!e.startsWith(`/api/v1/`)||e.includes(`#`)||/[\\\r\n]/.test(e)?!1:/^\/api\/v1\/(?:workspace\/(?:runs-index|activity)|p\/[a-zA-Z0-9_-]+\/(?:reports\/state|runs\/[a-zA-Z0-9._-]+\/(?:changes|commits)|github(?:\/(?:checks|ref-status))?))(?:\?[^#]*)?$/.test(e)}var Qo=Ra(`kind`,[G({kind:J(`workspace`)}),Ho.extend({kind:J(`run`)}),G({kind:J(`topic`),topic:L().min(1).max(128)}),G({kind:J(`read`),path:L().max(4096).refine(Zo),intervalMs:V().int().min(1e3).max(2147483647)})]),$o=G({id:L().min(1).max(128),demand:Qo}),es=G({version:J(3),documentId:L().min(1).max(128),epoch:V().int().nonnegative()}),ts=Ra(`type`,[es.extend({type:J(`sync`),entries:W($o).max(64),workspaceReady:J(!0).optional()}).refine(e=>new Set(e.entries.map(e=>e.id)).size===e.entries.length),es.extend({type:J(`ack`),id:L(),seq:V().int().nonnegative()}),es.extend({type:J(`refresh`),id:L()})]),ns=G({event:L(),data:L(),id:L()}),rs=Ra(`type`,[G({type:J(`unavailable`),version:J(3),epoch:V(),reason:L()}),G({type:J(`hello`),version:J(3)}),G({type:J(`alive`),version:J(3),epoch:V()}),G({type:J(`frame`),version:J(3),epoch:V(),id:L(),frame:K([ns,qo])}),G({type:J(`value`),version:J(3),epoch:V(),id:L(),value:U(),error:L().optional()}),G({type:J(`reset`),version:J(3),epoch:V(),id:L(),reason:L()})]),is=e=>`${e.projectId}/${e.runId}`;export{W as A,Pa as B,wo as C,_o as D,xo as E,ja as F,B as G,K as H,V as I,t as J,N as K,G as L,Ra as M,J as N,q as O,Fa as P,go as R,Oo as S,vo as T,U,L as V,aa as W,Mo as _,Qo as a,ko as b,is as c,Vo as d,No as f,Po as g,Fo as h,Zo as i,H as j,Ea as k,Ko as l,jo as m,Jo as n,ts as o,Bo as p,a as q,Xo as r,rs as s,Yo as t,qo as u,zo as v,Z as w,Ao as x,Ro as y,Ha as z};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{i as t,t as n}from"./react-runtime-CCIEwYL0.js";import{C as r,S as i,
|
|
1
|
+
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{i as t,t as n}from"./react-runtime-CCIEwYL0.js";import{C as r,S as i,d as a,w as o}from"./button-C1fD-ZFr.js";import{i as s}from"./bundle-mjs-BT31bpU6.js";import{G as c,J as l,K as u,W as d,dt as f,ft as ee,gt as p,ht as m,lt as h,mt as g,pt as te,ut as ne}from"./index-DmUnZuj2.js";import{i as re,n as _}from"./chunk-BO2N2NFS-CM5F_Wdn.js";var v=e(t(),1),y=n();function b({isOpen:e,onClose:t,onConfirm:n,url:r}){return(0,y.jsx)(h,{open:e,onOpenChange:e=>{e||t()},children:(0,y.jsxs)(ee,{"data-slot":`link-safety-dialog`,children:[(0,y.jsxs)(m,{children:[(0,y.jsx)(p,{children:`Open this link?`}),(0,y.jsxs)(te,{children:[`It leaves Squawk in a new tab. The words of a link in a transcript are the agent's — the address below is where it actually goes.`,(0,y.jsx)(`span`,{"data-slot":`link-safety-url`,className:`mt-3 block wrap-anywhere rounded-md border border-border bg-muted px-3 py-2 font-mono text-xs text-foreground`,children:r})]})]}),(0,y.jsxs)(g,{children:[(0,y.jsx)(f,{children:`Cancel`}),(0,y.jsx)(ne,{onClick:n,children:`Open link`})]})]})})}var x=String.raw`https?:\/\/(?:cdn\.jsdelivr\.net\/npm|unpkg\.com)\/`,ie=[{id:`tailwind-v3`,script:/^https?:\/\/cdn\.tailwindcss\.com(?:\/[\d.]+)?\/?(?:[?#]|$)/i},{id:`tailwind`,script:new RegExp(String.raw`^${x}@tailwindcss\/browser@4(?:\.[.\d]*)?(?:\/dist\/index\.global(?:\.min)?\.js)?\/?(?:[?#]|$)`,`i`)},{id:`mermaid`,script:new RegExp(String.raw`^${x}mermaid@11(?:\.[.\d]*)?\/dist\/mermaid(?:\.esm)?(?:\.min)?\.m?js(?:[?#]|$)`,`i`)}],S=new RegExp(String.raw`(['"])(${x}mermaid@11(?:\.[.\d]*)?(?:\/dist\/mermaid(?:\.esm)?(?:\.min)?\.mjs|\/\+esm)?)\1`,`gi`);function C(e){let t=e.trim();return ie.find(e=>e.script.test(t))?.id??null}function w(e){let t=new DOMParser().parseFromString(e,`text/html`),n=new Set;for(let e of t.querySelectorAll(`script`)){let t=e.getAttribute(`src`),r=t===null?null:C(t);r&&n.add(r===`tailwind-v3`?`tailwind`:r).add(r),t===null&&e.getAttribute(`type`)===`module`&&(e.textContent??``).search(S)>=0&&n.add(`mermaid`),S.lastIndex=0}return[...n].sort()}var T={tailwind:async()=>(await s(()=>import(`./index.global-D3Ga_D3Y.js`),[])).default,"tailwind-v3":()=>Promise.resolve(se),mermaid:async()=>(await s(()=>import(`./mermaid.min-3O9YjB2l.js`),[])).default};async function E(e){let t=await Promise.all(e.map(e=>T[e]().then(t=>[e,t],()=>null)));return Object.fromEntries(t.filter(e=>e!==null))}function ae(){let e={colors:`color`,fontFamily:`font`,fontSize:`text`,fontWeight:`font-weight`,spacing:`spacing`,borderRadius:`radius`,boxShadow:`shadow`,dropShadow:`drop-shadow`,blur:`blur`,screens:`breakpoint`,letterSpacing:`tracking`,lineHeight:`leading`,maxWidth:`container`,animation:`animate`,aspectRatio:`aspect`},t=e=>typeof e==`object`&&!!e&&!Array.isArray(e),n=t=>Object.hasOwn(e,t)?e[t]:void 0,r=(e,n,i,a)=>{if(t(a)){for(let[t,o]of Object.entries(a))r(e,n,t===`DEFAULT`?i:i?`${i}-${t}`:t,o);return}let o=i?`--${n}-${i}`:`--${n}`;if(n===`text`&&Array.isArray(a)){e.push(`${o}: ${String(a[0])};`);let n=t(a[1])?a[1].lineHeight:a[1];typeof n==`string`&&e.push(`${o}--line-height: ${n};`);return}typeof a==`string`||typeof a==`number`?e.push(`${o}: ${a};`):Array.isArray(a)&&e.push(`${o}: ${a.join(`, `)};`)},i=e=>{let[t,n]=Array.isArray(e)?e:[e];if(t!==`class`&&t!==`selector`)return``;let r=typeof n==`string`?n:`.dark`;return`@custom-variant dark (&:where(${r}, ${r} *));\n`},a=e=>{let a=t(e)?e:{},o=t(a.theme)?a.theme:{},s=[];for(let[e,t]of Object.entries(o)){let i=n(e);i&&(s.push(`--${i}-*: initial;`),r(s,i,``,t))}for(let[e,i]of Object.entries(t(o.extend)?o.extend:{})){let t=n(e);t&&r(s,t,``,i)}return`${i(a.darkMode)}@theme {\n${s.join(`
|
|
2
2
|
`)}\n}`},o=document.createElement(`style`);o.setAttribute(`type`,`text/tailwindcss`),document.currentScript?.before(o);let s={};Object.defineProperty(globalThis,"tailwind",{configurable:!0,value:{get config(){return s},set config(e){s=e,o.textContent=a(e)}}})}var oe=`(${ae.toString()})()`,se=[`@import "tailwindcss/theme.css";@import "tailwindcss/preflight.css";@import "tailwindcss/utilities.css";`,`@theme{`,`--color-slate-50:#f8fafc;--color-slate-100:#f1f5f9;--color-slate-200:#e2e8f0;--color-slate-300:#cbd5e1;--color-slate-400:#94a3b8;--color-slate-500:#64748b;--color-slate-600:#475569;--color-slate-700:#334155;--color-slate-800:#1e293b;--color-slate-900:#0f172a;--color-slate-950:#020617;`,`--color-gray-50:#f9fafb;--color-gray-100:#f3f4f6;--color-gray-200:#e5e7eb;--color-gray-300:#d1d5db;--color-gray-400:#9ca3af;--color-gray-500:#6b7280;--color-gray-600:#4b5563;--color-gray-700:#374151;--color-gray-800:#1f2937;--color-gray-900:#111827;--color-gray-950:#030712;`,`--color-zinc-50:#fafafa;--color-zinc-100:#f4f4f5;--color-zinc-200:#e4e4e7;--color-zinc-300:#d4d4d8;--color-zinc-400:#a1a1aa;--color-zinc-500:#71717a;--color-zinc-600:#52525b;--color-zinc-700:#3f3f46;--color-zinc-800:#27272a;--color-zinc-900:#18181b;--color-zinc-950:#09090b;`,`--color-neutral-50:#fafafa;--color-neutral-100:#f5f5f5;--color-neutral-200:#e5e5e5;--color-neutral-300:#d4d4d4;--color-neutral-400:#a3a3a3;--color-neutral-500:#737373;--color-neutral-600:#525252;--color-neutral-700:#404040;--color-neutral-800:#262626;--color-neutral-900:#171717;--color-neutral-950:#0a0a0a;`,`--color-stone-50:#fafaf9;--color-stone-100:#f5f5f4;--color-stone-200:#e7e5e4;--color-stone-300:#d6d3d1;--color-stone-400:#a8a29e;--color-stone-500:#78716c;--color-stone-600:#57534e;--color-stone-700:#44403c;--color-stone-800:#292524;--color-stone-900:#1c1917;--color-stone-950:#0c0a09;`,`--color-red-50:#fef2f2;--color-red-100:#fee2e2;--color-red-200:#fecaca;--color-red-300:#fca5a5;--color-red-400:#f87171;--color-red-500:#ef4444;--color-red-600:#dc2626;--color-red-700:#b91c1c;--color-red-800:#991b1b;--color-red-900:#7f1d1d;--color-red-950:#450a0a;`,`--color-orange-50:#fff7ed;--color-orange-100:#ffedd5;--color-orange-200:#fed7aa;--color-orange-300:#fdba74;--color-orange-400:#fb923c;--color-orange-500:#f97316;--color-orange-600:#ea580c;--color-orange-700:#c2410c;--color-orange-800:#9a3412;--color-orange-900:#7c2d12;--color-orange-950:#431407;`,`--color-amber-50:#fffbeb;--color-amber-100:#fef3c7;--color-amber-200:#fde68a;--color-amber-300:#fcd34d;--color-amber-400:#fbbf24;--color-amber-500:#f59e0b;--color-amber-600:#d97706;--color-amber-700:#b45309;--color-amber-800:#92400e;--color-amber-900:#78350f;--color-amber-950:#451a03;`,`--color-yellow-50:#fefce8;--color-yellow-100:#fef9c3;--color-yellow-200:#fef08a;--color-yellow-300:#fde047;--color-yellow-400:#facc15;--color-yellow-500:#eab308;--color-yellow-600:#ca8a04;--color-yellow-700:#a16207;--color-yellow-800:#854d0e;--color-yellow-900:#713f12;--color-yellow-950:#422006;`,`--color-lime-50:#f7fee7;--color-lime-100:#ecfccb;--color-lime-200:#d9f99d;--color-lime-300:#bef264;--color-lime-400:#a3e635;--color-lime-500:#84cc16;--color-lime-600:#65a30d;--color-lime-700:#4d7c0f;--color-lime-800:#3f6212;--color-lime-900:#365314;--color-lime-950:#1a2e05;`,`--color-green-50:#f0fdf4;--color-green-100:#dcfce7;--color-green-200:#bbf7d0;--color-green-300:#86efac;--color-green-400:#4ade80;--color-green-500:#22c55e;--color-green-600:#16a34a;--color-green-700:#15803d;--color-green-800:#166534;--color-green-900:#14532d;--color-green-950:#052e16;`,`--color-emerald-50:#ecfdf5;--color-emerald-100:#d1fae5;--color-emerald-200:#a7f3d0;--color-emerald-300:#6ee7b7;--color-emerald-400:#34d399;--color-emerald-500:#10b981;--color-emerald-600:#059669;--color-emerald-700:#047857;--color-emerald-800:#065f46;--color-emerald-900:#064e3b;--color-emerald-950:#022c22;`,`--color-teal-50:#f0fdfa;--color-teal-100:#ccfbf1;--color-teal-200:#99f6e4;--color-teal-300:#5eead4;--color-teal-400:#2dd4bf;--color-teal-500:#14b8a6;--color-teal-600:#0d9488;--color-teal-700:#0f766e;--color-teal-800:#115e59;--color-teal-900:#134e4a;--color-teal-950:#042f2e;`,`--color-cyan-50:#ecfeff;--color-cyan-100:#cffafe;--color-cyan-200:#a5f3fc;--color-cyan-300:#67e8f9;--color-cyan-400:#22d3ee;--color-cyan-500:#06b6d4;--color-cyan-600:#0891b2;--color-cyan-700:#0e7490;--color-cyan-800:#155e75;--color-cyan-900:#164e63;--color-cyan-950:#083344;`,`--color-sky-50:#f0f9ff;--color-sky-100:#e0f2fe;--color-sky-200:#bae6fd;--color-sky-300:#7dd3fc;--color-sky-400:#38bdf8;--color-sky-500:#0ea5e9;--color-sky-600:#0284c7;--color-sky-700:#0369a1;--color-sky-800:#075985;--color-sky-900:#0c4a6e;--color-sky-950:#082f49;`,`--color-blue-50:#eff6ff;--color-blue-100:#dbeafe;--color-blue-200:#bfdbfe;--color-blue-300:#93c5fd;--color-blue-400:#60a5fa;--color-blue-500:#3b82f6;--color-blue-600:#2563eb;--color-blue-700:#1d4ed8;--color-blue-800:#1e40af;--color-blue-900:#1e3a8a;--color-blue-950:#172554;`,`--color-indigo-50:#eef2ff;--color-indigo-100:#e0e7ff;--color-indigo-200:#c7d2fe;--color-indigo-300:#a5b4fc;--color-indigo-400:#818cf8;--color-indigo-500:#6366f1;--color-indigo-600:#4f46e5;--color-indigo-700:#4338ca;--color-indigo-800:#3730a3;--color-indigo-900:#312e81;--color-indigo-950:#1e1b4b;`,`--color-violet-50:#f5f3ff;--color-violet-100:#ede9fe;--color-violet-200:#ddd6fe;--color-violet-300:#c4b5fd;--color-violet-400:#a78bfa;--color-violet-500:#8b5cf6;--color-violet-600:#7c3aed;--color-violet-700:#6d28d9;--color-violet-800:#5b21b6;--color-violet-900:#4c1d95;--color-violet-950:#2e1065;`,`--color-purple-50:#faf5ff;--color-purple-100:#f3e8ff;--color-purple-200:#e9d5ff;--color-purple-300:#d8b4fe;--color-purple-400:#c084fc;--color-purple-500:#a855f7;--color-purple-600:#9333ea;--color-purple-700:#7e22ce;--color-purple-800:#6b21a8;--color-purple-900:#581c87;--color-purple-950:#3b0764;`,`--color-fuchsia-50:#fdf4ff;--color-fuchsia-100:#fae8ff;--color-fuchsia-200:#f5d0fe;--color-fuchsia-300:#f0abfc;--color-fuchsia-400:#e879f9;--color-fuchsia-500:#d946ef;--color-fuchsia-600:#c026d3;--color-fuchsia-700:#a21caf;--color-fuchsia-800:#86198f;--color-fuchsia-900:#701a75;--color-fuchsia-950:#4a044e;`,`--color-pink-50:#fdf2f8;--color-pink-100:#fce7f3;--color-pink-200:#fbcfe8;--color-pink-300:#f9a8d4;--color-pink-400:#f472b6;--color-pink-500:#ec4899;--color-pink-600:#db2777;--color-pink-700:#be185d;--color-pink-800:#9d174d;--color-pink-900:#831843;--color-pink-950:#500724;`,`--color-rose-50:#fff1f2;--color-rose-100:#ffe4e6;--color-rose-200:#fecdd3;--color-rose-300:#fda4af;--color-rose-400:#fb7185;--color-rose-500:#f43f5e;--color-rose-600:#e11d48;--color-rose-700:#be123c;--color-rose-800:#9f1239;--color-rose-900:#881337;--color-rose-950:#4c0519;`,`--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";`,`--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;`,`--text-xs--line-height:1rem;--text-sm--line-height:1.25rem;--text-base--line-height:1.5rem;--text-lg--line-height:1.75rem;`,`--text-xl--line-height:1.75rem;--text-2xl--line-height:2rem;--text-3xl--line-height:2.25rem;--text-4xl--line-height:2.5rem;`,`--shadow-sm:0 1px 2px 0 rgb(0 0 0 / 0.05);--radius-sm:0.125rem;--blur-sm:4px;`,`}`,`body{line-height:inherit}`,`*,::after,::before,::backdrop,::file-selector-button{border-color:var(--color-gray-200,currentColor)}`,`input::placeholder,textarea::placeholder{color:var(--color-gray-400)}`,`button:not(:disabled),[role="button"]:not(:disabled){cursor:pointer}`].join(`
|
|
3
3
|
`),D=`default-src 'none'; script-src 'unsafe-inline' data:; img-src data:; media-src data:; font-src data:; style-src 'unsafe-inline' data:; form-action 'none'; base-uri 'none'`,ce=`${D}; frame-src 'none'`,O=`allow-scripts allow-popups allow-popups-to-escape-sandbox`,k=`clipboard-write`,A=`data:text/javascript,export%20default%20globalThis.mermaid`;function j(e){return/\.html?$/i.test(e)}var M=/^(?:https?:|mailto:)/i,N=/^data:/i,P=`http://www.w3.org/1999/xlink`,F=/^(?:[a-z][a-z\d+.-]*:|\/\/)/i,I=/url\(\s*(['"]?)([^'")]*)\1\s*\)|@import\s+(['"])([^'"]+)\3/gi,L=[`src`,`href`,`xlink:href`,`poster`,`background`],R=/(?:^|,)\s*(data:\S+|[^,\s]+)/gi,z=/\b(?:preconnect|dns-prefetch|prefetch|preload|modulepreload|prerender)\b/i;function B(e,t){let n=e.trim();!n||n.startsWith(`#`)||N.test(n)||(F.test(n)?t.remote++:t.relative++)}function V(e,t){for(let n of e.matchAll(I))B(n[2]??n[4]??``,t)}function H(e,t){let n=e.createElement(`script`);return n.textContent=t.replace(/<\/script/gi,`<\\/script`),n}function U(e,t){let n=e.createElement(`style`);return n.setAttribute(`type`,`text/tailwindcss`),n.textContent=t,n}var W=`http://www.w3.org/2000/svg`;function G(e){return e.namespaceURI===W?e.getAttribute(`href`)??e.getAttributeNS(P,`href`):e.getAttribute(`src`)}function le(e,t,n,r){let i=r===void 0?[]:[U(e,r),H(e,oe)],a=H(e,n),o=t.hasAttribute(`defer`)||t.hasAttribute(`async`)||t.getAttribute(`type`)===`module`;o&&e.body.append(a),t.replaceWith(...i,...o?[]:[a])}function K(e,t,n){let r=new Set,i=new Set;for(let a of[...e.querySelectorAll(`script`)]){let o=G(a);if(o!==null&&N.test(o.trim()))continue;if(o===null){if(a.getAttribute(`type`)===`module`)for(let e of(a.textContent??``).matchAll(S))i.add(e[2]);continue}let s=C(o),c=s===`tailwind-v3`?`tailwind`:s,l=c?n[c]:void 0;if(!c||l===void 0||s===`tailwind-v3`&&n[`tailwind-v3`]===void 0){t.scripts++,a.remove();continue}if(r.has(c)){a.remove();continue}r.add(c),le(e,a,l,s===`tailwind-v3`?n[`tailwind-v3`]:void 0)}if(!i.size)return;if(n.mermaid===void 0){t.scripts+=i.size;return}let a=e.createElement(`script`);a.setAttribute(`type`,`importmap`),a.textContent=JSON.stringify({imports:Object.fromEntries([...i].map(e=>[e,A]))}),e.head.prepend(a,...r.has(`mermaid`)?[]:[H(e,n.mermaid)])}function ue(e,t,n){let r=t=>{let n=[...e.querySelectorAll(t)];return n.forEach(e=>e.remove()),n.length};K(e,t,n),t.embeds=r(`iframe, frame, frameset, object, embed, portal`),r(`base, meta[http-equiv]`);for(let t of e.querySelectorAll(`link`))z.test(t.getAttribute(`rel`)??``)&&t.remove();for(let t of e.querySelectorAll(`[ping]`))t.removeAttribute(`ping`);for(let n of e.querySelectorAll(`form`))t.forms++,n.removeAttribute(`action`);for(let t of e.querySelectorAll(`[formaction]`))t.removeAttribute(`formaction`)}function de(e,t){for(let n of e.querySelectorAll(`a, area`)){let e=n.getAttribute(`href`)??n.getAttributeNS(P,`href`);if(e===null)continue;let r=e.trim();if(r.startsWith(`#`)){n.setAttribute(`href`,`about:srcdoc${r}`),n.removeAttributeNS(P,`href`),n.removeAttribute(`target`);continue}if(M.test(r)){n.setAttribute(`target`,`_blank`),n.setAttribute(`rel`,`noopener noreferrer`);continue}F.test(r)||t.relative++,n.removeAttribute(`href`),n.removeAttributeNS(P,`href`),n.removeAttribute(`target`)}}function fe(e,t){for(let n of e.querySelectorAll(`[style]`))V(n.getAttribute(`style`),t);for(let n of e.querySelectorAll(`style`))/^(?:text\/css)?$/i.test(n.getAttribute(`type`)?.trim()??``)&&V(n.textContent??``,t);for(let n of e.querySelectorAll(`link[href]`))B(n.getAttribute(`href`),t);for(let n of e.querySelectorAll(`img, source, video, audio, track, input, image, use, body, table, td`)){for(let e of L){let r=n.getAttribute(e);r!==null&&B(r,t)}for(let e of(n.getAttribute(`srcset`)??``).matchAll(R))B(e[1],t)}}function pe(e,t={}){let n=new DOMParser().parseFromString(e,`text/html`),r={scripts:0,remote:0,relative:0,forms:0,embeds:0};ue(n,r,t),de(n,r),fe(n,r);let i=n.createElement(`meta`);i.setAttribute(`http-equiv`,`Content-Security-Policy`),i.setAttribute(`content`,D);let a=n.createElement(`meta`);return a.setAttribute(`name`,`referrer`),a.setAttribute(`content`,`no-referrer`),n.head.prepend(i,a),{srcdoc:`<!DOCTYPE html>${n.documentElement.outerHTML}`,blocked:r}}var q=e=>e.replace(/&/g,`&`).replace(/"/g,`"`);function me(e,t){return`<!DOCTYPE html><html><head><meta http-equiv="Content-Security-Policy" content="${ce}"><meta name="referrer" content="no-referrer"><style>html,body{margin:0;height:100%;overflow:hidden}iframe{display:block;border:0;width:100%;height:100%}</style></head><body><iframe title="${q(t)}" sandbox="${O}" allow="${k}" referrerpolicy="no-referrer" srcdoc="${q(e)}"></iframe></body></html>`}var J=(0,v.createContext)(null),he=/^[0-9a-f-]{36}$/i,ge=/^(\/p\/[^/?#]+\/tasks\/[^/?#]+)\/files\?(artifact=[^&#]*)$/;function Y(e){let t=new URLSearchParams(e);return[...t.keys()].length===1&&he.test(t.get(`artifact`)??``)}function _e(e,t,n){if(e.startsWith(`${t}?artifact=`))return Y(e.slice(t.length+1))?n+e.slice(t.length):null;let r=ge.exec(e);return r&&Y(r[2])?`${r[1]}/report?${r[2]}`:void 0}var ve=/^\/(?:api|p|tasks|new|settings|skills|workflows|git|github|inbox|automations)(?:\/|[?#]|$)/;function ye(e,t){let n=/^[a-z]:[\\/]/i.test(e),r=/^file:/i.test(e);if(!n&&/^[a-z][a-z\d+.-]*:/i.test(e)&&!r)return null;let i=r?e:decodeURIComponent(e);if(/[\u0000-\u001f]/.test(i))return null;if(!t||i.startsWith(`/`)||n||r)return i;let a=t.replaceAll(`\\`,`/`);return a.slice(0,a.lastIndexOf(`/`)+1)+i}function X(e,t){if(!e||/[\u0000-\u001f]/.test(e)||e.startsWith(`#`)||e.startsWith(`//`))return null;let n=e.indexOf(`#`),r=n<0?e:e.slice(0,n),i=n<0?``:e.slice(n),a=t.projectId?`/p/${encodeURIComponent(t.projectId)}`:``,o=`/tasks/${encodeURIComponent(t.runId)}/files`,s=`/tasks/${encodeURIComponent(t.runId)}/report`,c=_e(r,o,a+s);if(c!==void 0)return c===null?null:c+i;if(ve.test(r))return null;let l=ye(r,t.basePath);return l===null?null:`${a}${j(l)?s:o}?path=${encodeURIComponent(l)}${i}`}var Z=`text-accent-text underline underline-offset-2`;function be({href:e,children:t,internal:n,...r}){let[a,o]=(0,v.useState)(!1),s=i();return e?n?s?(0,y.jsx)(xe,{...r,href:e,children:t}):(0,y.jsx)(`a`,{...r,href:e,"data-streamdown":`link`,className:Z,children:t}):(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(`a`,{...r,href:e,"data-streamdown":`link`,className:`cursor-pointer ${Z}`,onClick:e=>{e.preventDefault(),o(!0)},children:t}),(0,y.jsx)(b,{isOpen:a,url:e,onClose:()=>o(!1),onConfirm:()=>{window.open(e,`_blank`,`noreferrer`),o(!1)}})]}):(0,y.jsx)(`span`,{children:t})}function xe({href:e,children:t,...n}){let i=o(),a=r();return(0,y.jsx)(`a`,{...n,href:e,"data-streamdown":`link`,className:Z,onClick:t=>Q(t,i,e,a),children:t})}function Q(e,t,n,r){e.button!==0||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||(e.preventDefault(),t(n,{state:{readerFrom:r.pathname+r.search,filesRestoreKey:r.key}}))}var Se={name:`shiki`,type:`code-highlighter`,getThemes:()=>[d,d],getSupportedLanguages:()=>l(),supportsLanguage:e=>l().includes(String(e).toLowerCase()),highlight:({code:e,language:t},n)=>u(e,String(t))||(c(e,String(t)).then(e=>n?.(e)),null)};function Ce(){let e=t=>{if(!t.children)return;let n=[];for(let r of t.children)if(r.type===`text`&&r.value?.includes(`
|
|
4
4
|
`)){let e=r.value.split(/\r?\n/);e.forEach((t,r)=>{r>0&&!(t===``&&r===e.length-1)&&n.push({type:`break`}),t&&n.push({type:`text`,value:t})})}else e(r),n.push(r);t.children=n};return e}var $=[...Object.values(_),Ce],we=[`p`,`strong`,`em`,`del`,`code`,`a`],Te={p:`span`,a:`span`},Ee={enabled:!0,renderModal:e=>(0,y.jsx)(b,{...e})},De=`https://refused.invalid/`,Oe=0,ke=(0,v.memo)(function({children:e,breaks:t=!1,inline:n=!1,document:r=!1,imageSrc:i}){let o=(0,v.useContext)(J),s=(0,v.useMemo)(()=>{let e={instance:++Oe},n=new Set;function a(){let e=t=>{if((t.type===`link`||t.type===`definition`)&&t.url&&o){let e=X(t.url,o);e&&(t.url=e,n.add(e))}t.children?.forEach(e)};return e}let s=new Set;function c(){let e=t=>{if(t.type===`image`&&t.url&&i){let e=i(t.url);t.url=e?new URL(e,window.location.href).href:De,e&&s.add(t.url)}t.children?.forEach(e)};return e}let l=o?[[a,e]]:[],u=r&&i?[[c,e]]:[];return{remark:[...t?$:Object.values(_),...l,...u],components:{...o||r?{a:({href:e,children:t})=>r&&!o&&!/^(?:https?:|mailto:|#)/i.test(e??``)?(0,y.jsx)(`span`,{children:t}):(0,y.jsx)(be,{href:e,internal:n.has(e??``),children:t})}:{},...r?{img:({src:e,alt:t})=>typeof e==`string`&&s.has(e)?(0,y.jsx)(`img`,{src:e,alt:t??``,loading:`lazy`}):(0,y.jsxs)(`span`,{className:`text-muted-foreground`,children:[`[Image: `,t||`embedded image`,`]`]})}:{}}}},[o,t,r,i]);return(0,y.jsx)(re,{className:n?`thread-markdown thread-markdown-inline`:`thread-markdown`,plugins:{code:Se},shikiTheme:[d,d],...a({remarkPlugins:o||r&&i?s.remark:t?$:void 0,allowedElements:n?we:void 0,unwrapDisallowed:n||void 0,components:n?Te:o||r?s.components:void 0}),linkSafety:Ee,controls:{code:{copy:!0,download:!1},table:!1,mermaid:!1},lineNumbers:!1,children:e})});export{k as a,pe as c,E as d,X as i,me as l,Q as n,O as o,J as r,j as s,ke as t,w as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./button-
|
|
1
|
+
import"./button-C1fD-ZFr.js";import{t as e}from"./createLucideIcon-BHp8sXmF.js";var t=e(`circle-dashed`,[[`path`,{d:`M10.1 2.182a10 10 0 0 1 3.8 0`,key:`5ilxe3`}],[`path`,{d:`M13.9 21.818a10 10 0 0 1-3.8 0`,key:`11zvb9`}],[`path`,{d:`M17.609 3.721a10 10 0 0 1 2.69 2.7`,key:`1iw5b2`}],[`path`,{d:`M2.182 13.9a10 10 0 0 1 0-3.8`,key:`c0bmvh`}],[`path`,{d:`M20.279 17.609a10 10 0 0 1-2.7 2.69`,key:`1ruxm7`}],[`path`,{d:`M21.818 10.1a10 10 0 0 1 0 3.8`,key:`qkgqxc`}],[`path`,{d:`M3.721 6.391a10 10 0 0 1 2.7-2.69`,key:`1mcia2`}],[`path`,{d:`M6.391 20.279a10 10 0 0 1-2.69-2.7`,key:`1fvljs`}]]),n=`bg-sidebar-row-selected text-foreground font-medium hover:bg-sidebar-row-selected`,r=`bg-sidebar-row-selected text-foreground hover:bg-sidebar-row-selected`,i=`flex flex-col gap-[12px]`,a=`flex flex-col gap-px`,o=`flex flex-col gap-px`,s=`truncate px-[10px] pt-[2px] pb-[4px] text-[11px] font-medium text-soft-foreground`,c=`group flex h-[32px] items-center gap-[10px] rounded-[6px] px-[10px] text-[13px] text-muted-foreground focus-visible:outline-2 focus-visible:outline-ring`,l=`hover:bg-sidebar-row-hover hover:text-foreground`,u=`size-[15px] shrink-0 text-soft-foreground group-aria-[current=page]:text-foreground`,d=`ml-auto text-[11.5px] tabular-nums text-soft-foreground`,f=`flex min-h-full flex-col px-[14px] pt-[14px] pb-[calc(90px+env(safe-area-inset-bottom))]`,p=`px-[10px] text-[22px] leading-tight font-bold`,m=`mb-[16px] flex flex-col`,h=`px-[10px] pt-[2px] pb-[4px] text-[12px] font-medium text-soft-foreground`,g=`group flex h-[48px] items-center gap-[12px] rounded-[8px] px-[10px] text-[14px] text-foreground focus-visible:outline-2 focus-visible:outline-ring`,_=`size-[18px] shrink-0 text-soft-foreground group-aria-[current=page]:text-foreground`,v=`ml-auto text-[13px] tabular-nums text-soft-foreground`,y=`size-[15px] shrink-0 text-soft-foreground`;export{o as _,m as a,g as c,d,a as f,l as g,c as h,v as i,p as l,u as m,f as n,h as o,s as p,y as r,_ as s,r as t,i as u,n as v,t as y};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{i as t,t as n}from"./react-runtime-CCIEwYL0.js";import{d as r,l as i,o as a}from"./button-C1fD-ZFr.js";import"./project-scope-context-DMCS5p-N.js";import{a as o,i as s,n as c,r as l,s as u}from"./runners-C-sPUQye.js";import{X as d,l as f}from"./design-icons-B6-0w7Aw.js";import{h as p,l as m}from"./es2015-Ch36azR0.js";import{c as h,i as g,p as _,r as v,s as y,t as ee}from"./dropdown-menu-DRFDwG2X.js";import{a as b,o as x,r as S,t as C}from"./dist-Du8mGhoH.js";import{i as w,o as T,r as E,s as D,t as O}from"./dialog-DSwzMeY3.js";var k=e(t(),1),A=1,j=.9,M=.8,N=.17,P=.1,F=.999,I=.9999,L=.99,R=/[\\\/_+.#"@\[\(\{&]/,z=/[\\\/_+.#"@\[\(\{&]/g,te=/[\s-]/,ne=/[\s-]/g;function B(e,t,n,r,i,a,o){if(a===t.length)return i===e.length?A:L;var s=`${i},${a}`;if(o[s]!==void 0)return o[s];for(var c=r.charAt(a),l=n.indexOf(c,i),u=0,d,f,p,m;l>=0;)d=B(e,t,n,r,l+1,a+1,o),d>u&&(l===i?d*=A:R.test(e.charAt(l-1))?(d*=M,p=e.slice(i,l-1).match(z),p&&i>0&&(d*=F**+p.length)):te.test(e.charAt(l-1))?(d*=j,m=e.slice(i,l-1).match(ne),m&&i>0&&(d*=F**+m.length)):(d*=N,i>0&&(d*=F**+(l-i))),e.charAt(l)!==t.charAt(a)&&(d*=I)),(d<P&&n.charAt(l-1)===r.charAt(a+1)||r.charAt(a+1)===r.charAt(a)&&n.charAt(l-1)!==r.charAt(a))&&(f=B(e,t,n,r,l+1,a+2,o),f*P>d&&(d=f*P)),d>u&&(u=d),l=n.indexOf(c,l+1);return o[s]=u,u}function re(e){return e.toLowerCase().replace(ne,` `)}function ie(e,t,n){return e=n&&n.length>0?`${e+` `+n.join(` `)}`:e,B(e,t,re(e),re(t),0,0,{})}var V=`[cmdk-group=""]`,ae=`[cmdk-group-items=""]`,oe=`[cmdk-group-heading=""]`,se=`[cmdk-item=""]`,ce=`${se}:not([aria-disabled="true"])`,H=`cmdk-item-select`,U=`data-value`,le=(e,t,n)=>ie(e,t,n),ue=k.createContext(void 0),W=()=>k.useContext(ue),de=k.createContext(void 0),G=()=>k.useContext(de),fe=k.createContext(void 0),pe=k.forwardRef((e,t)=>{let n=J(()=>({search:``,value:e.value??e.defaultValue??``,selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}})),r=J(()=>new Set),i=J(()=>new Map),a=J(()=>new Map),o=J(()=>new Set),s=we(e),{label:c,children:l,value:u,onValueChange:d,filter:f,shouldFilter:h,loop:g,disablePointerSelection:_=!1,vimBindings:v=!0,...y}=e,ee=m(),b=m(),x=m(),S=k.useRef(null),C=Ee();q(()=>{if(u!==void 0){let e=u.trim();n.current.value=e,w.emit()}},[u]),q(()=>{C(6,j)},[]);let w=k.useMemo(()=>({subscribe:e=>(o.current.add(e),()=>o.current.delete(e)),snapshot:()=>n.current,setState:(e,t,r)=>{var i,a,o;if(!Object.is(n.current[e],t)){if(n.current[e]=t,e===`search`)A(),D(),C(1,O);else if(e===`value`){if(document.activeElement.hasAttribute(`cmdk-input`)||document.activeElement.hasAttribute(`cmdk-root`)){let e=document.getElementById(x);e?e.focus():(i=document.getElementById(ee))==null||i.focus()}if(C(7,()=>{n.current.selectedItemId=M()?.id,w.emit()}),r||C(5,j),s.current?.value!==void 0){let e=t??``;(o=(a=s.current).onValueChange)==null||o.call(a,e);return}}w.emit()}},emit:()=>{o.current.forEach(e=>e())}}),[]),T=k.useMemo(()=>({value:(e,t,r)=>{t!==a.current.get(e)?.value&&(a.current.set(e,{value:t,keywords:r}),n.current.filtered.items.set(e,E(t,r)),C(2,()=>{D(),w.emit()}))},item:(e,t)=>(r.current.add(e),t&&(i.current.has(t)?i.current.get(t).add(e):i.current.set(t,new Set([e]))),C(3,()=>{A(),D(),n.current.value||O(),w.emit()}),()=>{a.current.delete(e),r.current.delete(e),n.current.filtered.items.delete(e);let t=M();C(4,()=>{A(),t?.getAttribute(`id`)===e&&O(),w.emit()})}),group:e=>(i.current.has(e)||i.current.set(e,new Set),()=>{a.current.delete(e),i.current.delete(e)}),filter:()=>s.current.shouldFilter,label:c||e[`aria-label`],getDisablePointerSelection:()=>s.current.disablePointerSelection,listId:ee,inputId:x,labelId:b,listInnerRef:S}),[]);function E(e,t){let r=s.current?.filter??le;return e?r(e,n.current.search,t):0}function D(){if(!n.current.search||s.current.shouldFilter===!1)return;let e=n.current.filtered.items,t=[];n.current.filtered.groups.forEach(n=>{let r=i.current.get(n),a=0;r.forEach(t=>{let n=e.get(t);a=Math.max(n,a)}),t.push([n,a])});let r=S.current;N().sort((t,n)=>{let r=t.getAttribute(`id`),i=n.getAttribute(`id`);return(e.get(i)??0)-(e.get(r)??0)}).forEach(e=>{let t=e.closest(ae);t?t.appendChild(e.parentElement===t?e:e.closest(`${ae} > *`)):r.appendChild(e.parentElement===r?e:e.closest(`${ae} > *`))}),t.sort((e,t)=>t[1]-e[1]).forEach(e=>{let t=S.current?.querySelector(`${V}[${U}="${encodeURIComponent(e[0])}"]`);t?.parentElement.appendChild(t)})}function O(){let e=N().find(e=>e.getAttribute(`aria-disabled`)!==`true`)?.getAttribute(U);w.setState(`value`,e||void 0)}function A(){if(!n.current.search||s.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let e=0;for(let t of r.current){let r=E(a.current.get(t)?.value??``,a.current.get(t)?.keywords??[]);n.current.filtered.items.set(t,r),r>0&&e++}for(let[e,t]of i.current)for(let r of t)if(n.current.filtered.items.get(r)>0){n.current.filtered.groups.add(e);break}n.current.filtered.count=e}function j(){var e;let t=M();t&&(t.parentElement?.firstChild===t&&((e=t.closest(V)?.querySelector(oe))==null||e.scrollIntoView({block:`nearest`})),t.scrollIntoView({block:`nearest`}))}function M(){return S.current?.querySelector(`${se}[aria-selected="true"]`)}function N(){return Array.from(S.current?.querySelectorAll(ce)||[])}function P(e){let t=N()[e];t&&w.setState(`value`,t.getAttribute(U))}function F(e){var t;let n=M(),r=N(),i=r.findIndex(e=>e===n),a=r[i+e];(t=s.current)!=null&&t.loop&&(a=i+e<0?r[r.length-1]:i+e===r.length?r[0]:r[i+e]),a&&w.setState(`value`,a.getAttribute(U))}function I(e){let t=M()?.closest(V),n;for(;t&&!n;)t=e>0?Se(t,V):Ce(t,V),n=t?.querySelector(ce);n?w.setState(`value`,n.getAttribute(U)):F(e)}let L=()=>P(N().length-1),R=e=>{e.preventDefault(),e.metaKey?L():e.altKey?I(1):F(1)},z=e=>{e.preventDefault(),e.metaKey?P(0):e.altKey?I(-1):F(-1)};return k.createElement(p.div,{ref:t,tabIndex:-1,...y,"cmdk-root":``,onKeyDown:e=>{var t;(t=y.onKeyDown)==null||t.call(y,e);let n=e.nativeEvent.isComposing||e.keyCode===229;if(!(e.defaultPrevented||n))switch(e.key){case`n`:case`j`:v&&e.ctrlKey&&R(e);break;case`ArrowDown`:R(e);break;case`p`:case`k`:v&&e.ctrlKey&&z(e);break;case`ArrowUp`:z(e);break;case`Home`:e.preventDefault(),P(0);break;case`End`:e.preventDefault(),L();break;case`Enter`:{e.preventDefault();let t=M();if(t){let e=new Event(H);t.dispatchEvent(e)}}}}},k.createElement(`label`,{"cmdk-label":``,htmlFor:T.inputId,id:T.labelId,style:Oe},c),X(e,e=>k.createElement(de.Provider,{value:w},k.createElement(ue.Provider,{value:T},e))))}),me=k.forwardRef((e,t)=>{let n=m(),r=k.useRef(null),i=k.useContext(fe),o=W(),s=we(e),c=s.current?.forceMount??i?.forceMount;q(()=>{if(!c)return o.item(n,i?.id)},[c]);let l=Te(n,r,[e.value,e.children,r],e.keywords),u=G(),d=Y(e=>e.value&&e.value===l.current),f=Y(e=>c||o.filter()===!1?!0:!e.search||e.filtered.items.get(n)>0);k.useEffect(()=>{let t=r.current;if(!(!t||e.disabled))return t.addEventListener(H,h),()=>t.removeEventListener(H,h)},[f,e.onSelect,e.disabled]);function h(){var e,t;g(),(t=(e=s.current).onSelect)==null||t.call(e,l.current)}function g(){u.setState(`value`,l.current,!0)}if(!f)return null;let{disabled:_,value:v,onSelect:y,forceMount:ee,keywords:b,...x}=e;return k.createElement(p.div,{ref:a(r,t),...x,id:n,"cmdk-item":``,role:`option`,"aria-disabled":!!_,"aria-selected":!!d,"data-disabled":!!_,"data-selected":!!d,onPointerMove:_||o.getDisablePointerSelection()?void 0:g,onClick:_?void 0:h},e.children)}),he=k.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:i,...o}=e,s=m(),c=k.useRef(null),l=k.useRef(null),u=m(),d=W(),f=Y(e=>i||d.filter()===!1?!0:!e.search||e.filtered.groups.has(s));q(()=>d.group(s),[]),Te(s,c,[e.value,e.heading,l]);let h=k.useMemo(()=>({id:s,forceMount:i}),[i]);return k.createElement(p.div,{ref:a(c,t),...o,"cmdk-group":``,role:`presentation`,hidden:!f||void 0},n&&k.createElement(`div`,{ref:l,"cmdk-group-heading":``,"aria-hidden":!0,id:u},n),X(e,e=>k.createElement(`div`,{"cmdk-group-items":``,role:`group`,"aria-labelledby":n?u:void 0},k.createElement(fe.Provider,{value:h},e))))}),ge=k.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,i=k.useRef(null),o=Y(e=>!e.search);return!n&&!o?null:k.createElement(p.div,{ref:a(i,t),...r,"cmdk-separator":``,role:`separator`})}),_e=k.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,i=e.value!=null,a=G(),o=Y(e=>e.search),s=Y(e=>e.selectedItemId),c=W();return k.useEffect(()=>{e.value!=null&&a.setState(`search`,e.value)},[e.value]),k.createElement(p.input,{ref:t,...r,"cmdk-input":``,autoComplete:`off`,autoCorrect:`off`,spellCheck:!1,"aria-autocomplete":`list`,role:`combobox`,"aria-expanded":!0,"aria-controls":c.listId,"aria-labelledby":c.labelId,"aria-activedescendant":s,id:c.inputId,type:`text`,value:i?e.value:o,onChange:e=>{i||a.setState(`search`,e.target.value),n?.(e.target.value)}})}),ve=k.forwardRef((e,t)=>{let{children:n,label:r=`Suggestions`,...i}=e,o=k.useRef(null),s=k.useRef(null),c=Y(e=>e.selectedItemId),l=W();return k.useEffect(()=>{if(s.current&&o.current){let e=s.current,t=o.current,n,r=new ResizeObserver(()=>{n=requestAnimationFrame(()=>{let n=e.offsetHeight;t.style.setProperty(`--cmdk-list-height`,n.toFixed(1)+`px`)})});return r.observe(e),()=>{cancelAnimationFrame(n),r.unobserve(e)}}},[]),k.createElement(p.div,{ref:a(o,t),...i,"cmdk-list":``,role:`listbox`,tabIndex:-1,"aria-activedescendant":c,"aria-label":r,id:l.listId},X(e,e=>k.createElement(`div`,{ref:a(s,l.listInnerRef),"cmdk-list-sizer":``},e)))}),ye=k.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:i,contentClassName:a,container:o,...s}=e;return k.createElement(C,{open:n,onOpenChange:r},k.createElement(x,{container:o},k.createElement(b,{"cmdk-overlay":``,className:i}),k.createElement(S,{"aria-label":e.label,"cmdk-dialog":``,className:a},k.createElement(pe,{ref:t,...s}))))}),be=k.forwardRef((e,t)=>Y(e=>e.filtered.count===0)?k.createElement(p.div,{ref:t,...e,"cmdk-empty":``,role:`presentation`}):null),xe=k.forwardRef((e,t)=>{let{progress:n,children:r,label:i=`Loading...`,...a}=e;return k.createElement(p.div,{ref:t,...a,"cmdk-loading":``,role:`progressbar`,"aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":i},X(e,e=>k.createElement(`div`,{"aria-hidden":!0},e)))}),K=Object.assign(pe,{List:ve,Item:me,Input:_e,Group:he,Separator:ge,Dialog:ye,Empty:be,Loading:xe});function Se(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function Ce(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function we(e){let t=k.useRef(e);return q(()=>{t.current=e}),t}var q=typeof window>`u`?k.useEffect:k.useLayoutEffect;function J(e){let t=k.useRef();return t.current===void 0&&(t.current=e()),t}function Y(e){let t=G(),n=()=>e(t.snapshot());return k.useSyncExternalStore(t.subscribe,n,n)}function Te(e,t,n,r=[]){let i=k.useRef(),a=W();return q(()=>{var o;let s=(()=>{for(let e of n){if(typeof e==`string`)return e.trim();if(typeof e==`object`&&`current`in e)return e.current?e.current.textContent?.trim():i.current}})(),c=r.map(e=>e.trim());a.value(e,s,c),(o=t.current)==null||o.setAttribute(U,s),i.current=s}),i}var Ee=()=>{let[e,t]=k.useState(),n=J(()=>new Map);return q(()=>{n.current.forEach(e=>e()),n.current=new Map},[e]),(e,r)=>{n.current.set(e,r),t({})}};function De(e){let t=e.type;return typeof t==`function`?t(e.props):`render`in t?t.render(e.props):e}function X({asChild:e,children:t},n){return e&&k.isValidElement(t)?k.cloneElement(De(t),{ref:t.ref},n(t.props.children)):n(t)}var Oe={position:`absolute`,width:`1px`,height:`1px`,padding:`0`,margin:`-1px`,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,borderWidth:`0`},Z=n();function ke({className:e,...t}){return(0,Z.jsx)(K,{"data-slot":`command`,className:i(`flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground`,e),...t})}function Ae({title:e=`Command Palette`,description:t=`Search for a command to run...`,children:n,className:a,showCloseButton:o=!0,filter:s,...c}){return(0,Z.jsxs)(O,{...c,children:[(0,Z.jsxs)(T,{className:`sr-only`,children:[(0,Z.jsx)(D,{children:e}),(0,Z.jsx)(w,{children:t})]}),(0,Z.jsx)(E,{className:i(`overflow-hidden p-0`,a),showCloseButton:o,children:(0,Z.jsx)(ke,{...r({filter:s}),className:`**:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5`,children:n})})]})}function je({className:e,...t}){return(0,Z.jsxs)(`div`,{"data-slot":`command-input-wrapper`,className:`flex min-h-11 shrink-0 items-center gap-2 rounded-ss-[inherit] rounded-se-[inherit] border-b px-3`,children:[(0,Z.jsx)(d,{className:`size-4 shrink-0 opacity-50`}),(0,Z.jsx)(K.Input,{"data-slot":`command-input`,className:i(`flex h-11 min-w-0 flex-1 rounded-md bg-transparent py-3 text-base md:text-sm placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50`,e),...t})]})}function Me({className:e,onPointerMoveCapture:t,...n}){return(0,Z.jsx)(K.List,{"data-slot":`command-list`,onPointerMoveCapture:e=>{t?.(e),e.pointerType===`touch`&&e.stopPropagation()},className:i(`max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto`,e),...n})}function Ne({...e}){return(0,Z.jsx)(K.Empty,{"data-slot":`command-empty`,className:`py-6 text-center text-sm`,...e})}function Pe({className:e,...t}){return(0,Z.jsx)(K.Group,{"data-slot":`command-group`,className:i(`overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground`,e),...t})}function Fe({className:e,...t}){return(0,Z.jsx)(K.Separator,{"data-slot":`command-separator`,className:i(`-mx-1 h-px bg-border`,e),...t})}function Ie({className:e,...t}){return(0,Z.jsx)(K.Item,{"data-slot":`command-item`,className:i(`relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground`,e),...t})}function Le({className:e,...t}){return(0,Z.jsx)(`span`,{"data-slot":`command-shortcut`,className:i(`ml-auto text-xs tracking-widest text-muted-foreground`,e),...t})}var Re=`quick-task`;function ze(e,t,n=24){return[t,...(e??[]).filter(e=>!(e.source===t.source&&e.ref===t.ref))].slice(0,n)}function Be(e,t){return l(e,t)?.models.suggested}var Ve=[{value:``,label:`auto`,desc:`Harness default`},{value:`low`,label:`low`,desc:`Less reasoning, faster replies`},{value:`medium`,label:`medium`,desc:`Balanced reasoning`},{value:`high`,label:`high`,desc:`More reasoning for hard tasks`},{value:`xhigh`,label:`xhigh`,desc:`Extra-high reasoning`},{value:`max`,label:`max`,desc:`Maximum reasoning`}];function He(e,t){let n=Ve,r=t?.models.find(t=>t.id===e)?.effortLevels;if(!r?.length)return n;let i=[Ve[0]],a=new Set;for(let e of r){if(a.has(e))continue;let t=Ve.find(t=>t.value===e);t&&(a.add(e),i.push(t))}return i.length>1?i:n}function Ue(e,t){let n=e??``;return t.some(e=>e.value===n)?n:``}function We(e,t,n){if(!e||Be(n,t)?.some(t=>t.id===e))return!1;let r=(n?.runners??[]).filter(e=>e.id!==t);return r.some(t=>t.models.retired.includes(e))?!0:r.some(t=>t.modelIdScope!==`provider-spanning`&&t.models.suggested.some(t=>t.id!==``&&t.id===e))}function Ge(e,t,n,r=[]){let i=n?.runner===e?n.models:[],a=Be(t,e)??Be(t,`claude`)??[],o=[...i.length?a.slice(0,1):a],s=new Set(o.map(e=>e.id));for(let e of i)!e.id||s.has(e.id)||(s.add(e.id),o.push({id:e.id,label:e.label||e.id,desc:e.description}));for(let n of r)!n||s.has(n)||We(n,e,t)||(s.add(n),o.push({id:n,label:n,desc:`Custom or legacy model`}));return o}function Ke(e,t,n,r=!1,i=!1){let a=o(t,e);if(a!==void 0){if(n?.stale)return`Using cached ${a} model list`;if(r||n?.source===`unavailable`)return`Latest ${a} models unavailable`;if(i&&!n)return`Loading ${a} models…`}}function qe(e,t,n){return Ke(e,t,n?.data,n?.isError,n?.isFetching)}function Je(e,t){let n=s(t).filter(t=>e.some(e=>e.name===t&&e.available));return n.length>0?n:[`claude`]}function Ye(e,t,n){return e!==null&&t.includes(e)?e:t.includes(n)?n:t[0]??`claude`}function Xe(e,t,n=!1){return!n&&e===t?void 0:e}function Ze(e,t,n,r,i){let a=Ge(t,n,i,[e,r?.[t]]);if(e!==null&&a.some(t=>t.id===e))return e;let o=r?.[t];return o!==void 0&&a.some(e=>e.id===o)?o:``}function Qe(e,t,n){return e.source===`skill`?t.some(t=>t.id===e.ref&&(e.path===void 0||t.path===e.path)):n.some(t=>t.name===e.ref)}function $e(e,t,n,r=!1){return e?.source===`skill`&&(r||e.typed)||e&&Qe(e,t,n)?e:null}function et(e){let{task:t,source:n,model:r,modelsLocked:i,effort:a,runner:o,runnerExplicit:s,defaultRunner:c,agentProfile:l,images:u,worktree:d,autonomous:f,archiveWhenDone:p,autoMergePr:m,allowWorkers:h,allowMessaging:g}=e;return{task:t,...n?.source===`skill`?{steps:[{id:`task`,name:n.ref,skill:n.ref,...n.path===void 0?{}:{skillPath:n.path},prompt:`{{task}}`}]}:{workflow:n?.ref??`quick-task`},model:i?void 0:r||void 0,effort:i?void 0:a||void 0,runner:Xe(o,c,s),agentProfile:l||void 0,images:u.length>0?[...u]:void 0,worktree:d!==!1&&void 0,autonomous:f===!0||void 0,...tt({archiveWhenDone:p,autoMergePr:m,allowWorkers:h,allowMessaging:g})}}function tt(e){return{...e.archiveWhenDone?{archiveWhenDone:!0}:{},...e.autoMergePr?{autoMergePr:!0}:{},...e.allowWorkers===!1?{allowWorkers:!1}:{},...e.allowMessaging===!1?{allowMessaging:!1}:{}}}function nt(e,t){return t?{...e,notify:!0}:e}function rt(e){return`/tasks/${e.id}`}var it=80,at=2e3,ot=50,st=200,ct=50,lt=[{id:`add-tests`,label:`Add tests`,text:`Also add or update tests covering this change.`},{id:`explain-change`,label:`Explain the change`,text:`Explain what changed and why before finishing.`},{id:`keep-minimal`,label:`Keep it minimal`,text:`Keep the change as small and targeted as possible — no unrelated refactors.`},{id:`update-docs`,label:`Update docs`,text:`Also update any relevant documentation or comments.`},{id:`check-edge-cases`,label:`Double-check edge cases`,text:`Double-check edge cases and error handling before finishing.`}];function ut(e){return!!e&&typeof e==`object`}function dt(e){if(e===void 0||!Array.isArray(e))return lt.map(e=>({...e}));let t=new Set,n=[];for(let r of e){if(!ut(r))continue;let e=typeof r.id==`string`?r.id.trim():``;if(e===`create-automation`)continue;let i=typeof r.label==`string`?r.label.trim():``,a=typeof r.text==`string`?r.text.trim():``;if(!e||!i||!a||t.has(e))continue;t.add(e);let o=ft(r.skills);if(n.push({id:e,label:i.slice(0,it),text:a.slice(0,at),...o.length>0?{skills:o}:{}}),n.length>=ot)break}return n}function ft(e){if(!Array.isArray(e))return[];let t=new Set;for(let n of e){if(typeof n!=`string`)continue;let e=n.trim();if(!(!e||t.has(e))&&(t.add(e.slice(0,st)),t.size>=ct))break}return[...t]}function pt(e,t){if(t.length===0)return[];let n=new Set(t);return e.filter(e=>e.skills?.some(e=>n.has(e)))}function mt(e,t){return pt(e,t).map(e=>e.text).join(`
|
|
2
|
+
|
|
3
|
+
`)}function ht(e,t,n,r=``){if(e===``||e===r||e===t){let e=r&&n?`${r}\n\n${n}`:r||n;return{text:e,applied:n?e:``}}return{text:e,applied:t}}function gt(){return`tpl-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,8)}`}function _t(e,t,n){let r=Math.max(0,Math.min(t,e.length)),i=e.slice(0,r),a=e.slice(r),o=``;i.length>0&&(o=i.endsWith(`
|
|
4
|
+
|
|
5
|
+
`)?``:i.endsWith(`
|
|
6
|
+
`)?`
|
|
7
|
+
`:`
|
|
8
|
+
|
|
9
|
+
`);let s=a.replace(/^[ \t]+/,``),c=``;return s.length>0&&(c=s.startsWith(`
|
|
10
|
+
|
|
11
|
+
`)?``:s.startsWith(`
|
|
12
|
+
`)?`
|
|
13
|
+
`:`
|
|
14
|
+
|
|
15
|
+
`),{text:i+o+n+c+s,caret:i.length+o.length+n.length}}function vt({prompt:e,base:t,selectionStart:n,focused:r,remembered:i}){return e===t?e.length:r&&n!=null||n!=null&&n>0?n:i??e.length}var yt=`inline-flex h-[26px] min-w-0 max-w-full items-center gap-1.5 rounded-full border border-control-border bg-card px-2.5 text-xs font-medium text-muted-foreground transition-colors focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-link-foreground hover:bg-muted hover:text-foreground disabled:pointer-events-none disabled:border-dashed disabled:bg-muted`,bt=(0,Z.jsx)(f,{"aria-hidden":`true`,className:`size-2.5 shrink-0 text-supporting-foreground`}),xt=(0,k.createContext)(null),Q=e=>Number.parseFloat(e)||0;function St({pill:e,box:t,full:n}){let r=getComputedStyle(e),i=[...e.children].filter(e=>{if(e===t)return!1;let n=getComputedStyle(e);return n.display!==`none`&&n.position!==`absolute`});return i.reduce((e,t)=>e+t.getBoundingClientRect().width,0)+Q(r.columnGap)*i.length+n.getBoundingClientRect().width+Q(r.paddingLeft)+Q(r.paddingRight)+Q(r.borderLeftWidth)+Q(r.borderRightWidth)}function Ct(e){for(let t=e.parentElement;t;t=t.parentElement){if(t.dataset.slot===`picker-pill-disabled-wrapper`)continue;let e=getComputedStyle(t).display;if(e===`grid`||e===`flex`)return t}return e.parentElement}function wt(e){let t=new Map;for(let n of e){let e=Ct(n.pill),r=t.get(e)??new Map,i=Math.round(n.pill.getBoundingClientRect().top);r.set(i,[...r.get(i)??[],n]),t.set(e,r)}for(let[e,n]of t){let t=getComputedStyle(e),r=e.clientWidth-Q(t.paddingLeft)-Q(t.paddingRight);for(let e of n.values())if(e.reduce((e,t)=>e+St(t),0)+Q(t.columnGap)*(e.length-1)>r+.5)return!1}return!0}function Tt({children:e}){let t=(0,k.useRef)(new Map),n=(0,k.useRef)(null),[r,i]=(0,k.useState)(!0),a=(0,k.useCallback)(()=>i(wt([...t.current.values()])),[]),o=(0,k.useCallback)((e,r)=>{if(t.current.set(e,r),typeof ResizeObserver<`u`){n.current??=new ResizeObserver(a);for(let e of[r.box,r.full,Ct(r.pill)])n.current.observe(e)}return a(),()=>{if(t.current.delete(e),typeof ResizeObserver<`u`)for(let e of[r.box,r.full])n.current?.unobserve(e);a()}},[a]);(0,k.useLayoutEffect)(()=>()=>n.current?.disconnect(),[]);let s=(0,k.useMemo)(()=>({register:o,showPrefixes:r}),[o,r]);return(0,Z.jsx)(xt.Provider,{value:s,children:e})}function Et({field:e,children:t}){let n=(0,k.useRef)(null),r=(0,k.useRef)(null),a=(0,k.useContext)(xt),o=a?.register,s=(0,k.useId)(),[c,l]=(0,k.useState)(!0);(0,k.useLayoutEffect)(()=>{let e=n.current,t=r.current;if(o){let n=e.closest(`[data-slot$="pill"]`);return n?o(s,{pill:n,box:e,full:t}):void 0}let i=()=>l(t.getBoundingClientRect().width<=e.getBoundingClientRect().width+.5);if(i(),typeof ResizeObserver>`u`)return;let a=new ResizeObserver(i);return a.observe(e),a.observe(t),()=>a.disconnect()},[e,t,s,o]);let u=a!==null,d=u?a.showPrefixes:c,f=u&&!d;return(0,Z.jsxs)(`span`,{ref:n,className:`relative min-w-0 overflow-hidden`,"aria-hidden":`true`,children:[(0,Z.jsxs)(`span`,{ref:r,className:i(`invisible w-max whitespace-nowrap`,f?`absolute left-0 top-0`:`block`),children:[e,` · `,t]}),(0,Z.jsxs)(`span`,{"data-slot":`picker-label`,className:i(`block truncate`,f?`relative`:`absolute inset-0`),children:[d?(0,Z.jsxs)(`span`,{className:`text-muted-foreground`,children:[e,` · `]}):null,t]})]})}function Dt({fieldLabel:e,ariaLabel:t,label:n,options:r,value:i}){return e?`${t} · ${typeof n==`string`?n:r.find(e=>e.value===i)?.label??i}`:t}function Ot({readOnly:e,disabled:t,hint:n,disabledHint:r}){return e?r??n:t?r:n}function kt({fieldLabel:e,fullLabel:t,explanation:n}){return e?[t,n].filter(Boolean).join(` — `):n}function At({icon:e,fieldLabel:t,ariaLabel:n,label:r}){return(0,Z.jsxs)(Z.Fragment,{children:[e,t?(0,Z.jsx)(Et,{field:n,children:r}):(0,Z.jsx)(`span`,{className:`min-w-0 truncate`,title:typeof r==`string`?r:void 0,children:r})]})}function jt({slot:e,ariaLabel:t,label:n,value:r,options:a,onPick:o,disabled:s=!1,readOnly:c=!1,hint:l,disabledHint:u,status:p,searchPlaceholder:m,icon:b,fieldLabel:x=!1}){let[S,C]=(0,k.useState)(!1),[w,T]=(0,k.useState)(``),E=(0,k.useRef)(null),D=(0,k.useRef)(null),O=m?a.filter(e=>e.label.toLowerCase().includes(w.trim().toLowerCase())):a;(0,k.useEffect)(()=>{if(!S||!m)return;let e=window.setTimeout(()=>E.current?.focus());return()=>window.clearTimeout(e)},[S,m]);let A=e=>{E.current&&document.activeElement===E.current&&e.preventDefault()},j=b?` h-11 gap-2 rounded-lg border-border px-3 text-foreground`:``,M=Dt({fieldLabel:x,ariaLabel:t,label:n,options:a,value:r}),N=kt({fieldLabel:x,fullLabel:M,explanation:Ot({readOnly:c,disabled:s,hint:l,disabledHint:u})}),P=At({icon:b,fieldLabel:x,ariaLabel:t,label:n});if(c)return(0,Z.jsxs)(`span`,{"data-slot":e,"aria-label":M,title:N,className:i(yt,j,`cursor-default hover:bg-card hover:text-muted-foreground`),children:[P,x?(0,Z.jsx)(`span`,{className:`sr-only`,children:M}):null]});let F=(0,Z.jsxs)(`button`,{type:`button`,"data-slot":e,"aria-label":M,disabled:s,title:N,className:i(yt,j),children:[P,b?(0,Z.jsx)(f,{"aria-hidden":`true`,className:`size-[13px] shrink-0 text-muted-foreground`}):bt]});return s?(0,Z.jsx)(`span`,{"data-slot":`picker-pill-disabled-wrapper`,title:N,className:`inline-flex min-w-0 max-w-full`,children:F}):(0,Z.jsxs)(ee,{open:S,onOpenChange:e=>{C(e),e||T(``)},children:[(0,Z.jsx)(_,{asChild:!0,children:F}),(0,Z.jsxs)(v,{ref:D,align:`start`,"data-testid":`${e}-menu`,children:[m?(0,Z.jsxs)(`div`,{"data-slot":`picker-search`,className:`mbe-1 flex min-h-11 min-w-56 items-center gap-2 border-b border-border px-2`,children:[(0,Z.jsx)(d,{"aria-hidden":`true`,className:`size-3.5 shrink-0 text-muted-foreground`}),(0,Z.jsx)(`input`,{ref:E,type:`search`,"aria-label":m,placeholder:m,value:w,onChange:e=>T(e.target.value),onKeyDown:e=>{if(e.key===`ArrowDown`||e.key===`ArrowUp`){e.preventDefault(),e.stopPropagation();let t=D.current?.querySelectorAll(`[role="menuitemradio"]:not([data-disabled])`);(e.key===`ArrowDown`?t?.[0]:t?.[t.length-1])?.focus()}else e.key!==`Escape`&&e.stopPropagation()},className:`h-11 w-0 min-w-0 flex-1 bg-transparent text-sm placeholder:text-muted-foreground`})]}):null,(0,Z.jsx)(y,{value:r,onValueChange:o,children:O.map(e=>(0,Z.jsx)(h,{value:e.value,className:i(`gap-2.5`,m&&`min-h-11`),onPointerMove:A,onPointerLeave:A,onKeyDown:t=>{E.current&&(t.key===`ArrowUp`&&e===O[0]||t.key===`Tab`&&t.shiftKey)&&(t.preventDefault(),t.stopPropagation(),E.current.focus())},children:(0,Z.jsxs)(`span`,{className:`flex min-w-0 flex-col`,children:[(0,Z.jsx)(`span`,{className:`text-[13px] font-medium`,children:e.label}),e.desc?(0,Z.jsx)(`span`,{className:`text-[11px] text-muted-foreground`,children:e.desc}):null]})},e.value))}),m&&O.length===0?(0,Z.jsx)(`p`,{role:`status`,className:`px-2 py-5 text-center text-xs text-muted-foreground`,children:`No matches found.`}):null,p?(0,Z.jsx)(g,{disabled:!0,onPointerMove:A,onPointerLeave:A,className:`border-t border-border text-[11px] text-muted-foreground`,children:p}):null]})]})}var $=(e,t)=>t===null?e:`${e}:${t}`;function Mt({runners:e,value:t,onPick:n,disabled:r=!1,accounts:i=[],account:a=null,repoAccount:o,icon:s,fieldLabel:l}){let d=u().data,f=c(d).filter(t=>e.includes(t.id)).flatMap(e=>{let t=i.filter(t=>t.provider===e.id);return t.length<2?[{value:$(e.id,null),label:e.id,desc:e.pickerDescription}]:t.map(t=>({value:$(e.id,t.id),label:`${e.id} · ${t.label}`,desc:t.configDir}))}),p=a??o?.[t]??`default`,m=f.some(e=>e.value===$(t,p))?$(t,p):$(t,null);return(0,Z.jsx)(jt,{icon:s,fieldLabel:l,slot:`runner-pill`,ariaLabel:`Runner`,label:f.find(e=>e.value===m)?.label??t,value:m,disabled:r,onPick:e=>{let[t,r]=e.split(`:`);n(t,r??null)},options:f})}export{Ae as A,$e as C,tt as D,rt as E,Me as F,Fe as I,Le as L,Pe as M,je as N,nt as O,Ie as P,Ye as S,Qe as T,He as _,yt as a,Ue as b,_t as c,ht as d,vt as f,qe as g,et as h,bt as i,Ne as j,ke as k,gt as l,Je as m,Tt as n,lt as o,Re as p,Mt as r,mt as s,jt as t,dt as u,Ge as v,Xe as w,Ze as x,ze as y};
|