@fabiofiorita/porcelain 0.86.0 → 0.87.0
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/README.md +1 -1
- package/package.json +1 -1
- package/server/src/cli/main.mjs +18260 -15246
- package/web/dist/assets/_paired-BAeC6s5u.css +1 -0
- package/web/dist/assets/_paired-ZqQMB38g.js +1 -0
- package/web/dist/assets/_paired-adOps7b6.js +2 -0
- package/web/dist/assets/{_section-CSYz6Oeh.js → _section-BIcfL8dP.js} +1 -1
- package/web/dist/assets/_section-C-ubW0di.js +2 -0
- package/web/dist/assets/access-_gVZfZwG.js +27 -0
- package/web/dist/assets/confirmed-read-DHK9_uTM.js +184 -0
- package/web/dist/assets/{core-N5FOhKMV.js → core-C9VsdEg4.js} +1 -1
- package/web/dist/assets/{core-A9QwCfgd.js → core-nsSEMkdR.js} +1 -1
- package/web/dist/assets/edit-file-CINgRIqd.js +139 -0
- package/web/dist/assets/file-editor-Dwcj8Ajp.js +67 -0
- package/web/dist/assets/{hastToHtml-BsCNgOhQ.js → hastToHtml-BMGZcuTk.js} +1 -1
- package/web/dist/assets/{highlights-DG24bC71.js → highlights-HGlbOF9z.js} +1 -1
- package/web/dist/assets/index-CMEpIZ84.css +2 -0
- package/web/dist/assets/index-D57Ctkfa.js +10 -0
- package/web/dist/assets/lazyRouteComponent-CH-emk-1.js +1 -0
- package/web/dist/assets/lib-DcUAKKEz.js +1 -0
- package/web/dist/assets/pair-B5f8pA1O.js +1 -0
- package/web/dist/assets/pair-Mi9PlJP-.js +2 -0
- package/web/dist/assets/pair-ZqQMB38g.js +1 -0
- package/web/dist/assets/{resolveLanguages-Bslf79RJ.js → resolveLanguages-DEcuv43Y.js} +1 -1
- package/web/dist/assets/settings-page-COU_hsXm.js +13 -0
- package/web/dist/assets/{shiki-CWuLmvwE.js → shiki-BEnL9EcY.js} +1 -1
- package/web/dist/assets/{stream-tokenizer-BWL5OWTA.js → stream-tokenizer-CjS9-LFG.js} +1 -1
- package/web/dist/assets/themeResolver-XCfnoFxi.js +2 -0
- package/web/dist/assets/themes-cX3BdCD4.js +2 -0
- package/web/dist/assets/useMatch-BcFiDpwl.js +1 -0
- package/web/dist/assets/workspace-error-Afry6cwW.js +1 -0
- package/web/dist/assets/workspace-pending-B5GdvEpa.js +1345 -0
- package/web/dist/index.html +15 -15
- package/web/dist/assets/_paired-Bg35kFp1.css +0 -1
- package/web/dist/assets/_paired-Bvfav40c.js +0 -1
- package/web/dist/assets/_paired-d5PXo1sB.js +0 -40
- package/web/dist/assets/_section-BJGYxFqw.js +0 -2
- package/web/dist/assets/access-eccLSfi_.js +0 -26
- package/web/dist/assets/cloneFileDiffMetadata-Cmt5VYmb.js +0 -1
- package/web/dist/assets/confirmed-read-7exEnrey.js +0 -133
- package/web/dist/assets/edit-file-DnKfwF-q.js +0 -139
- package/web/dist/assets/file-editor-DmcXimvv.js +0 -67
- package/web/dist/assets/index-DDdKfnOr.css +0 -2
- package/web/dist/assets/index-DXIE4nD7.js +0 -10
- package/web/dist/assets/lazyRouteComponent-8_52WjPQ.js +0 -1
- package/web/dist/assets/lib-BKZ5ZaMU.js +0 -1
- package/web/dist/assets/pair-B_O6rPVP.js +0 -1
- package/web/dist/assets/pair-Bvfav40c.js +0 -1
- package/web/dist/assets/pair-C-2BSIoY.js +0 -2
- package/web/dist/assets/rolldown-runtime-XKyaHtl9.js +0 -1
- package/web/dist/assets/search-D8TAbIxv.js +0 -1298
- package/web/dist/assets/settings-page-DTHetAW7.js +0 -13
- package/web/dist/assets/themeResolver-DTzvXWEv.js +0 -2
- package/web/dist/assets/themes-CHgfTR2s.js +0 -2
- package/web/dist/assets/useMatch-CEGDklCl.js +0 -1
- package/web/dist/assets/workspace-error-B8Itqdu-.js +0 -1
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
import{f as e}from"./lib-DcUAKKEz.js";import{$r as t,$s as n,$u as r,Aa as i,Ac as a,Ad as o,Ao as s,Au as c,Bc as l,Bl as u,Bs as d,Ca as f,Cc as p,Cu as m,Da as h,Dc as g,Du as _,Ec as v,Eu as y,Fc as b,G as x,Gc as S,Gi as C,Go as w,Gt as T,Gu as E,Hc as D,Ho as ee,Ia as te,Ic as O,Il as k,In as ne,It as A,J as j,Jo as M,Jr as N,K as P,Kr as F,Kt as I,Lc as L,Ls as R,Lt as re,Mc as ie,Mo as ae,Mu as oe,Nc as se,Nl as ce,Nn as le,Nt as ue,Oc as z,Oi as de,Pa as fe,Pc as pe,Pl as me,Pt as he,Qr as ge,Qs as _e,Qt as ve,Ra as ye,Rc as be,Rl as xe,Rs as Se,Rt as Ce,Sa as we,Sc as Te,Sd as Ee,So as De,Su as Oe,Tc as ke,Td as Ae,To as je,U as Me,Uc as Ne,Ul as Pe,Us as Fe,Ut as Ie,V as Le,Vc as Re,Vs as ze,W as Be,Wl as Ve,Wo as He,Wt as Ue,X as We,Xc as Ge,Xl as Ke,Xt as qe,Y as Je,Yo as Ye,Yt as Xe,Yu as Ze,Zt as Qe,_n as $e,ao as et,bc as tt,bd as nt,bi as rt,bn as it,bo as at,cd as ot,cs as st,cu as ct,do as lt,ec as ut,el as dt,en as ft,fa as pt,fc as mt,hc as ht,in as gt,iu as _t,ja as vt,jc as yt,jl as bt,jr as xt,jt as St,ln as Ct,mc as wt,mu as Tt,nn as Et,no as Dt,oc as Ot,oo as kt,ou as At,pc as jt,qo as Mt,qu as Nt,rc as Pt,rn as Ft,sd as It,sn as Lt,so as Rt,ss as zt,tc as Bt,tn as Vt,ui as Ht,uo as Ut,uu as Wt,vc as Gt,vu as Kt,wa as qt,wd as Jt,wu as Yt,xa as Xt,xn as Zt,xo as Qt,xu as $t,yd as en,yn as tn,zc as B,zl as nn,zs as rn}from"./access-_gVZfZwG.js";import{b as an,d as on}from"./sides-711aNttp.js";import{n as sn}from"./themeResolver-XCfnoFxi.js";import{t as cn}from"./formatCSSVariablePrefix-KRh9vnZf.js";var V=e(bt(),1),ln=(0,V.createContext)(null),un={};function dn({children:e,defaultOptions:t=un}){let n=(0,V.useMemo)(()=>({defaultOptions:t}),[t]);return V.createElement(ln.Provider,{value:n},e)}function fn(){return(0,V.useContext)(ln)?.defaultOptions??{}}function pn(e){return typeof e==`object`&&!!e&&`current`in e}function mn(e,t=B()){let n=e.split(`+`),r=new Set,i=``;for(let e=0;e<n.length;e++){let a=n[e].trim();if(e===n.length-1)i=Re(a);else{let e=pe[a]??pe[a.toLowerCase()];if(e){let n=D(e,t);r.add(n)}else n.length===1&&(i=Re(a))}}return!i&&n.length>0&&(i=Re(n[n.length-1].trim())),{key:i,ctrl:r.has(`Control`),shift:r.has(`Shift`),alt:r.has(`Alt`),meta:r.has(`Meta`),modifiers:b.filter(e=>r.has(e))}}function hn(e,t=B()){let n=e.ctrl??!1,r=e.shift??!1,i=e.alt??!1,a=e.meta??!1;e.mod&&(D(`Mod`,t)===`Control`?n=!0:a=!0);let o=b.filter(e=>{switch(e){case`Control`:return n;case`Shift`:return r;case`Alt`:return i;case`Meta`:return a;default:return!1}});return{key:e.key,ctrl:n,shift:r,alt:i,meta:a,modifiers:o}}function gn(e,t){let n=t===`mac`?e.meta&&!e.ctrl:e.ctrl&&!e.meta,r=[];if(n)r.push(`Mod`),e.alt&&r.push(`Alt`),e.shift&&r.push(`Shift`);else for(let t of b)e.modifiers.includes(t)&&r.push(t);return r.push(Re(e.key)),r.join(`+`)}function _n(e,t=B()){return gn(mn(e,t),t)}function vn(e,t=B()){return gn(e,t)}function yn(e,t=B()){return typeof e==`string`?_n(e,t):vn(hn(e,t),t)}function bn(e){return e in pe||e.toLowerCase()in pe}function xn(e){let t=[];for(let n of b)e.modifiers.includes(n)&&t.push(n);return t.push(e.key),t.join(`+`)}function Sn(e,t={}){let n=t.platform??B(),r=t.useSymbols??!0,i=t.separatorToken??(n===`mac`&&r?` `:`+`);return yn(e,n).split(`+`).map(e=>{if(bn(e)){let t=pe[e]??pe[e.toLowerCase()];return n===`mac`?r?se[t]:ie[t]:n===`windows`?be[t]:yt[t]}return r&&a[e]||!r&&L[e]||e}).join(i)}function Cn(e,t,n=B()){let r=typeof t==`string`?mn(t,n):t;if(e.ctrlKey!==r.ctrl||e.shiftKey!==r.shift||e.altKey!==r.alt||e.metaKey!==r.meta)return!1;let i=Re(e.key),a=r.key;if(i!==`Dead`&&i.length===1&&a.length===1){if(i.toUpperCase()===a.toUpperCase())return!0;if(l(i)&&(/^[A-Za-z]$/.test(i)||!e.altKey))return!1}if(e.code&&(i===`Dead`||i.length===1&&a.length===1)){if(e.code.startsWith(`Key`)){let t=e.code.slice(3);if(t.length===1&&/^[A-Za-z]$/.test(t))return t.toUpperCase()===a.toUpperCase()}if(e.code.startsWith(`Digit`)){let t=e.code.slice(5);if(t.length===1&&/^[0-9]$/.test(t))return t===a}return e.code in O&&O[e.code]===a}return i===a}var wn={preventDefault:!0,stopPropagation:!0,eventType:`keydown`,enabled:!0,ignoreInputs:!0,conflictBehavior:`warn`};function Tn(e){return!(e.ctrl||e.meta||e.key===`Escape`)}function En(e){if(!e)return!1;if(e instanceof HTMLInputElement){let t=e.type.toLowerCase();return t!==`button`&&t!==`submit`&&t!==`reset`}return!!(e instanceof HTMLTextAreaElement||e instanceof HTMLSelectElement||e instanceof HTMLElement&&e.isContentEditable)}function Dn(e){return typeof document>`u`?null:typeof Document<`u`&&e instanceof Document||typeof Node<`u`&&e.nodeType===Node.DOCUMENT_NODE?e.activeElement:typeof HTMLElement<`u`&&e instanceof HTMLElement?e.ownerDocument.activeElement??null:e.document.activeElement??null}function On(e,t,n){let r=Dn(t);return r&&En(r)&&r!==n||e.composedPath().some(e=>En(e)&&e!==n)?!0:En(e.target)&&e.target!==n}function kn(e,t){return t===document||t===window?e.currentTarget===t||e.currentTarget===document.documentElement:t===window?e.currentTarget===window||e.currentTarget===document||e.currentTarget===document.documentElement:!!(t instanceof HTMLElement&&(e.currentTarget===t||e.target instanceof Node&&t.contains(e.target)))}function An(e,t,n,r){if(n!==`allow`){if(n===`warn`)console.warn(`'${t}' is already registered. Multiple handlers will be triggered. Use conflictBehavior: 'replace' to replace the existing handler, or conflictBehavior: 'allow' to suppress this warning.`);else{if(n===`error`)throw Error(`'${t}' is already registered. Use conflictBehavior: 'replace' to replace the existing handler, or conflictBehavior: 'allow' to allow multiple registrations.`);r(e)}}}function jn({update:e,notify:t,unwatched:n}){return{link:r,unlink:i,propagate:a,checkDirty:o,shallowPropagate:s};function r(e,t,n){let r=t.depsTail;if(r!==void 0&&r.dep===e)return;let i=r===void 0?t.deps:r.nextDep;if(i!==void 0&&i.dep===e){i.version=n,t.depsTail=i;return}let a=e.subsTail;if(a!==void 0&&a.version===n&&a.sub===t)return;let o=t.depsTail=e.subsTail={version:n,dep:e,sub:t,prevDep:r,nextDep:i,prevSub:a,nextSub:void 0};i!==void 0&&(i.prevDep=o),r===void 0?t.deps=o:r.nextDep=o,a===void 0?e.subs=o:a.nextSub=o}function i(e,t=e.sub){let r=e.dep,i=e.prevDep,a=e.nextDep,o=e.nextSub,s=e.prevSub;return a===void 0?t.depsTail=i:a.prevDep=i,i===void 0?t.deps=a:i.nextDep=a,o===void 0?r.subsTail=s:o.prevSub=s,s===void 0?(r.subs=o)===void 0&&n(r):s.nextSub=o,a}function a(e){let n=e.nextSub,r;top:do{let i=e.sub,a=i.flags;if(a&60?a&12?a&4?!(a&48)&&c(e,i)?(i.flags=a|40,a&=1):a=0:i.flags=a&-9|32:a=0:i.flags=a|32,a&2&&t(i),a&1){let t=i.subs;if(t!==void 0){let i=(e=t).nextSub;i!==void 0&&(r={value:n,prev:r},n=i);continue}}if((e=n)!==void 0)n=e.nextSub;else{for(;r!==void 0;)if(e=r.value,r=r.prev,e!==void 0){n=e.nextSub;continue top}break}}while(1)}function o(t,n){let r,i=0,a=!1;top:do{let o=t.dep,c=o.flags;if(n.flags&16)a=!0;else if((c&17)==17){if(e(o)){let e=o.subs;e.nextSub!==void 0&&s(e),a=!0}}else if((c&33)==33){(t.nextSub!==void 0||t.prevSub!==void 0)&&(r={value:t,prev:r}),t=o.deps,n=o,++i;continue}if(!a){let e=t.nextDep;if(e!==void 0){t=e;continue}}for(;i--;){let i=n.subs,o=i.nextSub!==void 0;if(o?(t=r.value,r=r.prev):t=i,a){if(e(n)){o&&s(i),n=t.sub;continue}a=!1}else n.flags&=-33;n=t.sub;let c=t.nextDep;if(c!==void 0){t=c;continue top}}return a}while(1)}function s(e){do{let n=e.sub,r=n.flags;(r&48)==32&&(n.flags=r|16,(r&6)==2&&t(n))}while((e=e.nextSub)!==void 0)}function c(e,t){let n=t.depsTail;for(;n!==void 0;){if(n===e)return!0;n=n.prevDep}return!1}}function Mn(e,t,n){let r=typeof e==`object`,i=r?e:void 0;return{next:(r?e.next:e)?.bind(i),error:(r?e.error:t)?.bind(i),complete:(r?e.complete:n)?.bind(i)}}var Nn=[],Pn=0,{link:Fn,unlink:In,propagate:Ln,checkDirty:Rn,shallowPropagate:zn}=jn({update(e){return e._update()},notify(e){Nn[Vn++]=e,e.flags&=-3},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=17,Un(e))}}),Bn=0,Vn=0,H,Hn=0;function U(e){try{++Hn,e()}finally{--Hn||Wn()}}function Un(e){let t=e.depsTail,n=t===void 0?e.deps:t.nextDep;for(;n!==void 0;)n=In(n,e)}function Wn(){if(!(Hn>0)){for(;Bn<Vn;){let e=Nn[Bn];Nn[Bn++]=void 0,e.notify()}Bn=0,Vn=0}}function Gn(e,t){let n=typeof e==`function`,r=e,i={_snapshot:n?void 0:e,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:+!n,get(){return H!==void 0&&Fn(i,H,Pn),i._snapshot},subscribe(e){let t=Mn(e),n={current:!1},r=Kn(()=>{i.get(),n.current?t.next?.(i._snapshot):n.current=!0});return{unsubscribe:()=>{r.stop()}}},_update(e){let a=H,o=t?.compare??Object.is;if(n)H=i,++Pn,i.depsTail=void 0;else if(e===void 0)return!1;n&&(i.flags=5);try{let t=i._snapshot,a=typeof e==`function`?e(t):e===void 0&&n?r(t):e;return t===void 0||!o(t,a)?(i._snapshot=a,!0):!1}finally{H=a,n&&(i.flags&=-5),Un(i)}}};return n?(i.flags=17,i.get=function(){let e=i.flags;if(e&16||e&32&&Rn(i.deps,i)){if(i._update()){let e=i.subs;e!==void 0&&zn(e)}}else e&32&&(i.flags=e&-33);return H!==void 0&&Fn(i,H,Pn),i._snapshot}):i.set=function(e){if(i._update(e)){let e=i.subs;e!==void 0&&(Ln(e),zn(e),Wn())}},i}function Kn(e){let t=()=>{let t=H;H=n,++Pn,n.depsTail=void 0,n.flags=6;try{return e()}finally{H=t,n.flags&=-5,Un(n)}},n={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:6,notify(){let e=this.flags;e&16||e&32&&Rn(this.deps,this)?t():this.flags=2},stop(){this.flags=0,this.depsTail=void 0,Un(this)}};return t(),n}var qn=class{constructor(e,t){this.atom=Gn(e),this.get=this.get.bind(this),this.setState=this.setState.bind(this),this.subscribe=this.subscribe.bind(this),t&&(this.actions=t(this))}setState(e){this.atom.set(e)}get state(){return this.atom.get()}get(){return this.state}subscribe(e){return this.atom.subscribe(Mn(e))}},Jn=class{constructor(e){this.atom=Gn(e)}get state(){return this.atom.get()}get(){return this.state}subscribe(e){return this.atom.subscribe(Mn(e))}};function Yn(e,t){return typeof e==`function`?new Jn(e):t?new qn(e,t):new qn(e)}var Xn=0;function Zn(){return`hotkey_${++Xn}`}var Qn=class e{static#e=null;#t;#n=new Map;#r=new Map;constructor(){this.registrations=new qn(new Map),this.#t=B()}static getInstance(){return e.#e||=new e,e.#e}static resetInstance(){e.#e&&=(e.#e.destroy(),null)}register(e,t,n={}){if(typeof document>`u`&&!n.target){let e=t;return{id:Zn(),unregister:()=>{},get callback(){return e},set callback(t){e=t},setOptions:()=>{},get isActive(){return!1}}}let r=Zn(),i=n.platform??this.#t,a=typeof e==`string`?mn(e,i):hn(e,i),o=typeof e==`string`?e:xn(a),s=n.target??document,c=n.conflictBehavior??`warn`,l=this.#d(o,s);l&&An(l.id,o,c,e=>this.#i(e));let u=n.ignoreInputs??Tn(a),d={id:r,hotkey:o,parsedHotkey:a,callback:t,options:{...wn,requireReset:!1,...n,platform:i,ignoreInputs:u},hasFired:!1,triggerCount:0,target:s};this.registrations.setState(e=>new Map(e).set(r,d)),this.#r.has(s)||this.#r.set(s,new Set),this.#r.get(s).add(r),this.#a(s);let f=this;return{get id(){return r},unregister:()=>{f.#i(r)},get callback(){return f.registrations.state.get(r)?.callback??t},set callback(e){let t=f.registrations.state.get(r);t&&(t.callback=e)},setOptions:e=>{f.registrations.setState(t=>{let n=t.get(r);if(n){let i=new Map(t);return i.set(r,{...n,options:{...n.options,...e}}),i}return t})},get isActive(){return f.registrations.state.has(r)}}}#i(e){let t=this.registrations.state.get(e);if(!t)return;let n=t.target;this.registrations.setState(t=>{let n=new Map(t);return n.delete(e),n});let r=this.#r.get(n);r&&(r.delete(e),r.size===0&&this.#o(n))}#a(e){if(typeof document>`u`||this.#n.has(e))return;let t=this.#l(e),n=this.#u(e);e.addEventListener(`keydown`,t),e.addEventListener(`keyup`,n),this.#n.set(e,{keydown:t,keyup:n})}#o(e){if(typeof document>`u`)return;let t=this.#n.get(e);t&&(e.removeEventListener(`keydown`,t.keydown),e.removeEventListener(`keyup`,t.keyup),this.#n.delete(e),this.#r.delete(e))}#s(e,t,n){let r=this.#r.get(t);if(r)for(let i of r){let r=this.registrations.state.get(i);if(r&&kn(e,t)&&r.options.enabled&&!(r.options.ignoreInputs!==!1&&On(e,t,r.target))){if(n===`keydown`){if(r.options.eventType!==`keydown`)continue;Cn(e,r.parsedHotkey,r.options.platform)&&(r.options.preventDefault&&e.preventDefault(),r.options.stopPropagation&&e.stopPropagation(),r.options.requireReset&&r.hasFired||(this.#c(r,e),r.options.requireReset&&(r.hasFired=!0)))}else r.options.eventType===`keyup`&&Cn(e,r.parsedHotkey,r.options.platform)&&this.#c(r,e),r.options.requireReset&&r.hasFired&&this.#f(r,e)&&(r.hasFired=!1)}}}#c(e,t){e.options.preventDefault&&t.preventDefault(),e.options.stopPropagation&&t.stopPropagation(),e.triggerCount++,this.registrations.setState(e=>new Map(e));let n={hotkey:e.hotkey,parsedHotkey:e.parsedHotkey};e.callback(t,n)}#l(e){return t=>{this.#s(t,e,`keydown`)}}#u(e){return t=>{this.#s(t,e,`keyup`)}}#d(e,t){for(let n of this.registrations.state.values())if(n.hotkey===e&&n.target===t)return n;return null}#f(e,t){let n=e.parsedHotkey,r=Re(t.key),i=n.key.length===1?n.key.toUpperCase():n.key;return!!((r.length===1?r.toUpperCase():r)===i||n.ctrl&&r===`Control`||n.shift&&r===`Shift`||n.alt&&r===`Alt`||n.meta&&r===`Meta`)}triggerRegistration(e){let t=this.registrations.state.get(e);if(!t)return!1;let n=t.parsedHotkey,r=new KeyboardEvent(t.options.eventType??`keydown`,{key:n.key,ctrlKey:n.ctrl,shiftKey:n.shift,altKey:n.alt,metaKey:n.meta,bubbles:!0,cancelable:!0});return t.triggerCount++,this.registrations.setState(e=>new Map(e)),t.callback(r,{hotkey:t.hotkey,parsedHotkey:t.parsedHotkey}),!0}getRegistrationCount(){return this.registrations.state.size}isRegistered(e,t){for(let n of this.registrations.state.values())if(n.hotkey===e&&(t===void 0||n.target===t))return!0;return!1}destroy(){for(let e of this.#n.keys())this.#o(e);this.registrations.setState(()=>new Map),this.#n.clear(),this.#r.clear()}};function $n(){return Qn.getInstance()}function er(e,t,n={}){let r={...fn().hotkey,...n},i=$n(),a=(0,V.useRef)(null),o=(0,V.useRef)(t),s=(0,V.useRef)(r),c=(0,V.useRef)(i);o.current=t,s.current=r,c.current=i;let l=(0,V.useRef)(null),u=(0,V.useRef)(null),d=yn(e,r.platform??B()),{target:f,...p}=r;(0,V.useEffect)(()=>{let e=pn(s.current.target)?s.current.target.current:s.current.target??(typeof document<`u`?document:null);if(!e){a.current?.isActive&&(a.current.unregister(),a.current=null),l.current=null,u.current=null;return}let t=l.current!==null&&l.current!==e,n=u.current!==null&&u.current!==d;return a.current?.isActive&&(t||n)&&(a.current.unregister(),a.current=null),a.current&&a.current.isActive||(a.current=c.current.register(d,o.current,{...s.current,target:e})),l.current=e,u.current=d,()=>{a.current?.isActive&&(a.current.unregister(),a.current=null)}},[d]),a.current?.isActive&&(a.current.callback=t,a.current.setOptions(p))}var tr=Ge();function nr(e,t){return e===t}function W(e,t=e=>e,n){let r=n?.compare??nr,i=(0,V.useCallback)(t=>{let{unsubscribe:n}=e.subscribe(t);return n},[e]),a=(0,V.useCallback)(()=>e.get(),[e]);return(0,tr.useSyncExternalStoreWithSelector)(i,a,a,t,r)}var G=dt(),K=Ne(),rr=new WeakMap;function ir(e,t){let n=rr.get(e);return n||rr.set(e,n={}),n[t]=(n[t]??0)+1,n[t]===1&&e.setAttribute(t,``),()=>{n[t]--,n[t]===0&&e.removeAttribute(t)}}function ar(e){an(e,`ui-sdk-mirror`,`@layer ui-sdk{:where([data-mirror][aria-hidden]){display:inline-block}:where([data-mirror][aria-hidden]:dir(rtl)){scale:-1 1}}`)}function or(e,t,n,r){let i,a,o,s=!0,c=()=>{let n=e.parentElement?.closest(t.item);if(!n)return!1;if(i||(i=ir(n,`data-has-icon`),r(n)),!t.list)return!0;let o=n.parentElement?.closest(t.list);return o&&(a=ir(o,`data-has-icons`)),!!o},l=()=>{c()&&(o?.(),o=void 0)};return c()||queueMicrotask(()=>{s&&!c()&&(o=n(l))}),()=>{s=!1,o?.(),i?.(),a?.()}}function sr(e){return{props:{mirror:`boolean`,id:`id`,item:{kind:`string`,from:`item.value`}},state:(e,{props:t})=>({mirror:!!t.mirror}),attrs:(e,{props:t})=>({"aria-hidden":`true`,"data-mirror":t.mirror?``:void 0}),bind(t,{api:n,props:r,id:i,store:a}){ar(t.ownerDocument);let o=or(t,e,a.subscribe,e=>!1),s=e.register?.(t,{api:n,props:r});return()=>{o(),s?.()}}}}var cr={item:`[role="option"]`,list:`[role="listbox"]`},lr={name:`rotate-ccw`,size:24,node:[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}]]};lr.node;var ur=He(lr),dr=Ke(()=>globalThis.localStorage);function fr(){let e;return(t,n)=>(e===void 0&&n&&(e=t),e===t)}function pr(e,t){let{store:n}=e,r=t.key,i=t.remember??!0,a=Bt(),o=fr(),s=null,c=!1,l=e=>{c=!0,n.set({[r]:e}),c=!1},u=null,d=null,f=()=>t.orientation?.()??`vertical`,p=e=>t.disabled?.(e)??!1,m=e=>t.focusable?.(e)??!0,h=e=>t.preferred?.(e)??!1;function g(e=h){let t=a.list();if(!t.length||u&&!t.some(({part:e})=>e.key===u.key&&m(e)))return;let n=t.map(({part:t})=>({key:t.key,disabled:p(t),focusable:m(t),preferred:e(t)}));return rn(n,s)}function _(){let e=g();e!==void 0&&l(e)}let v=!1,y=!1;function b(e){y||=e,v||(v=!0,Gt(()=>{v=!1,_(),C(),y&&t.onItemsChange?.(),y=!1}))}function x(e,t){let n=u={key:e,from:t},r=s;i&&(s=e),l(e),setTimeout(()=>{C(),u===n&&(u=null,s===e&&(s=r),b(!1))})}let S=e=>(e.focus(),e.ownerDocument.activeElement===e);function C(){if(!u)return;let e=a.list().find(({part:e})=>e.key===u.key);if(!e||!m(e.part))return;let t=e.el.ownerDocument.activeElement;(t!==u.from&&t!==null&&t!==e.el.ownerDocument.body||S(e.el))&&(u=null)}let w=n.get()[r];e.onDestroy(n.subscribe(()=>{let e=w;w=n.get()[r],w===null&&e!==null&&!c&&(s=null),w===e&&a.size()&&b(!1)}));function T(){return a.list().filter(({part:e})=>m(e)).map(({part:e,el:t})=>({key:e.key,props:e.props,el:t}))}let E={bind(e,t){let o=a.add({key:t.key,el:e,part:t});if(u?.left&&u.from===e){let i=u.key;u.key=t.key,s===i&&(s=t.key),n.get()[r]===i&&l(t.key),e.ownerDocument.activeElement===e&&(d=e)}let c=()=>{d=e,i&&E.remember(t.key)},f=()=>{d===e&&(d=null)};e.addEventListener(`focus`,c),e.addEventListener(`blur`,f);let m=p(t),g=h(t),_=jt(t,()=>{(p(t)!==m||h(t)!==g)&&(m=p(t),g=h(t),b(!1))});return b(!0),()=>{_(),e.removeEventListener(`focus`,c),e.removeEventListener(`blur`,f);let i=e.ownerDocument,a=!!i&&(i.activeElement===e||d===e&&i.activeElement===i.body);if(d===e&&(d=null),o(),a&&!u&&n.get()[r]===t.key){let n=u={key:t.key,from:e,left:!0};setTimeout(()=>{u===n&&(u=null,b(!1))})}b(!0)}},tabIndex(e,n){let i=e[r]??null;if(i!==null)return i===n.key?`0`:`-1`;let a=t.claims?t.claims(e,n):!p(n)&&m(n);return o(n.key,a)?`0`:`-1`},keydown(e,n){if(e.defaultPrevented||e.altKey)return;let r=T(),i=r.find(e=>e.el===n);if(!i)return;let a=on(n),o;if(t.move)o=t.move(e,{from:i,items:r,rtl:a});else if(!e.ctrlKey&&!e.metaKey){let n=ze(e.key,f(),a);n!==void 0&&(o=r[R(r.indexOf(i),n,r.length,t.loop?.()??!1)]?.key)}if(o===void 0)return;e.preventDefault();let s=r.find(e=>e.key===o);return(!s||s!==i&&!S(s.el))&&x(o,n),{key:o,from:i.key,shift:e.shiftKey}},items:T,focus(e){if(e!==void 0){let t=a.list().find(({part:t})=>t.key===e);if(t&&m(t.part)&&S(t.el))return;x(e,typeof document>`u`?null:document.activeElement);return}let t=a.list();(t.find(e=>e.key===w)??t[0])?.el.focus()},remember(e){i&&(s=e,l(e))},check:_,stopFor:e=>a.list().some(({part:t})=>e(t))?g(e):void 0};return E}var mr=new Intl.Collator,hr=(e,t)=>mr.compare(e,t);function gr(e){let t=e.path?`${e.path}/`:``;return e.entries.map(e=>({path:`${t}${e.name}${e.kind===`directory`?`/`:``}`,kind:e.kind,...e.ignored?{ignored:!0}:{},...e.target===void 0?{}:{target:e.target}}))}var _r=e=>e.replace(/\/$/,``);function vr(e){if(e.omitted)return`${e.path===``?`This worktree`:e.path}: ${e.omitted.toLocaleString(`en-US`)} more not shown; search to find them.`}function yr(e,t){let n=_r(t),r=_r(e);return r===n||r.startsWith(`${n}/`)}function br(e,t,n){let r=_r(t);return yr(e,r)?`${_r(n)}${e.slice(r.length)}`:e}function xr(e){let t=e.split(`/`).filter(Boolean);return t.slice(0,-1).map((e,n)=>t.slice(0,n+1).join(`/`))}function Sr(e,t,n){let r=e=>e.replace(/\/$/,``),i=new Set([...t].map(r)),a=new Set([...n].map(r)),o=e.filter(e=>e.kind===`directory`).map(e=>r(e.path)).sort(hr),s=new Set(o.filter(e=>i.has(e))),c=new Map;for(let t of e){let e=xr(t.path).at(-1);e&&c.set(e,(c.get(e)??0)+1)}for(let e of o){let t=xr(e).at(-1);!a.has(e)&&t&&s.has(t)&&c.get(t)===1&&s.add(e)}return[...s].filter(e=>xr(e).every(e=>s.has(e)))}function Cr(e){let t=new Map(e.map(e=>[e.path,e])),n=new Map,r=t.has(``)?[``]:[];for(let e of r){let i=t.get(e);if(i){for(let e of gr(i))if(n.set(e.path,e),e.kind===`directory`){let n=e.path.replace(/\/$/,``);t.has(n)&&r.push(n)}}}return[...n.values()].sort((e,t)=>hr(e.path,t.path))}function wr(e,t,n){if(n===``||e.some(e=>e.path===n))return e;let r=xr(n).at(-1)??``;return t.find(e=>e.path===r)?.omitted?[...e,{path:n,kind:`file`}]:e}function Tr(e){let t=e.trim();if(!t.includes(`/`)&&!t.startsWith(`.`))return null;let n=_(at)(t);return n._tag===`Some`?n.value:null}function Er(e,t){return Dr(e,t).slice(0,50)}function Dr(e,t){let n=t.trim().toLowerCase();return e.filter(e=>e.toLowerCase().includes(n)).map(e=>{let t=e.slice(e.lastIndexOf(`/`)+1).toLowerCase();return{path:e,rank:t===n?0:t.startsWith(n)?1:t.includes(n)?2:3}}).sort((e,t)=>e.rank-t.rank||e.path.length-t.path.length||(e.path<t.path?-1:+(e.path>t.path))).map(({path:e})=>e)}var Or={added:{letter:`A`,label:`Added`},modified:{letter:`M`,label:`Modified`},deleted:{letter:`D`,label:`Deleted`},renamed:{letter:`R`,label:`Renamed`},untracked:{letter:`U`,label:`Untracked`}};function kr(e){return e.scope===`untracked`?`untracked`:e.scope===`unmerged`||e.kind===`type-changed`?`modified`:e.kind}function Ar(e){return e.status===`type-changed`?`modified`:e.status}function jr(e){let t=new Map;for(let n of e)t.has(n.path)||t.set(n.path,n.status);let n=new Map(e.map(({path:e,status:t})=>[e,t]));return{files:t,folders:new Set([...n].filter(([,e])=>e!==`deleted`).flatMap(([e])=>xr(e)))}}function Mr(e){return jr(e.flatMap(e=>e.comparisons.map(t=>({path:e.path,status:kr(t)}))))}function Nr(e){return[...new Set(e.filter(e=>e.pinned).flatMap(e=>xr(e.path)))]}function Pr(e,t){let n=new Map(t.map(e=>[e.path,e])),r=e=>{let t=xr(e).at(-1)??``,i=n.get(t);if(!i||i.status!==`loaded`){if(!i&&t){let n=r(t);if(n.state!==`resolved`)return{path:e,state:n.state};if(n.entry.kind!==`directory`)return{path:e,state:`missing`}}return{path:e,state:i?.status??`loading`}}let a=i.entries.find(t=>t.name===xt(e));return a?{path:e,state:`resolved`,entry:{kind:a.kind,path:`${e}${a.kind===`directory`?`/`:``}`,...a.ignored===void 0?{}:{ignored:a.ignored},...a.target===void 0?{}:{target:a.target}}}:i.omitted?{path:e,state:`resolved`,entry:{kind:`file`,path:e}}:{path:e,state:`missing`}};return e.map(e=>r(Fr(e)))}function Fr(e){return e.endsWith(`/`)?e.slice(0,-1):e}function Ir(e,t){if(t.has(e))return e;for(let n of t)if(e.startsWith(`${n}/`))return n;return null}function Lr(e,t,n){return n?e:e.filter(e=>Ir(e,t)===null)}function Rr(e,t){let n=[...e].map(t),r=n.every(e=>e===`directory`)?`folder`:n.every(e=>e===`file`)?`file`:`item`;return`${e.size} hidden ${r}${e.size===1?``:`s`}`}var zr={names:{".babelrc":`babel`,".babelrc.json":`babel`,".bash_profile":`bash`,".bashrc":`bash`,".browserslistrc":`browserslist`,".dockerignore":`docker`,".eslintignore":`eslint`,".eslintrc":`eslint`,".eslintrc.cjs":`eslint`,".eslintrc.js":`eslint`,".eslintrc.json":`eslint`,".eslintrc.yaml":`eslint`,".eslintrc.yml":`eslint`,".gitattributes":`git`,".gitignore":`git`,".gitkeep":`git`,".gitmodules":`git`,".oxlintrc.json":`oxc`,".postcssrc":`postcss`,".postcssrc.json":`postcss`,".postcssrc.yaml":`postcss`,".postcssrc.yml":`postcss`,".prettierignore":`prettier`,".prettierrc":`prettier`,".prettierrc.cjs":`prettier`,".prettierrc.js":`prettier`,".prettierrc.json":`prettier`,".prettierrc.mjs":`prettier`,".prettierrc.toml":`prettier`,".prettierrc.yaml":`prettier`,".prettierrc.yml":`prettier`,".stylelintignore":`stylelint`,".stylelintrc":`stylelint`,".stylelintrc.cjs":`stylelint`,".stylelintrc.js":`stylelint`,".stylelintrc.json":`stylelint`,".stylelintrc.mjs":`stylelint`,".stylelintrc.yaml":`stylelint`,".stylelintrc.yml":`stylelint`,".terraform.lock.hcl":`terraform`,".zprofile":`bash`,".zshenv":`bash`,".zshrc":`bash`,"babel.config.cjs":`babel`,"babel.config.js":`babel`,"babel.config.json":`babel`,"babel.config.mjs":`babel`,"biome.json":`biome`,"biome.jsonc":`biome`,"bootstrap.bundle.js":`bootstrap`,"bootstrap.bundle.min.js":`bootstrap`,"bootstrap.css":`bootstrap`,"bootstrap.js":`bootstrap`,"bootstrap.min.css":`bootstrap`,"bootstrap.min.js":`bootstrap`,"bun.lock":`bun`,"bun.lockb":`bun`,"bunfig.toml":`bun`,"claude.md":`claude`,"compose.yaml":`docker`,"compose.yml":`docker`,"docker-compose.override.yml":`docker`,"docker-compose.yaml":`docker`,"docker-compose.yml":`docker`,dockerfile:`docker`,"eslint.config.cjs":`eslint`,"eslint.config.js":`eslint`,"eslint.config.mjs":`eslint`,"eslint.config.mts":`eslint`,"eslint.config.ts":`eslint`,gemfile:`ruby`,"next.config.js":`nextjs`,"next.config.mjs":`nextjs`,"next.config.mts":`nextjs`,"next.config.ts":`nextjs`,"postcss.config.cjs":`postcss`,"postcss.config.js":`postcss`,"postcss.config.mjs":`postcss`,"postcss.config.ts":`postcss`,"prettier.config.cjs":`prettier`,"prettier.config.js":`prettier`,"prettier.config.mjs":`prettier`,rakefile:`ruby`,"readme.md":`markdown`,"stylelint.config.cjs":`stylelint`,"stylelint.config.js":`stylelint`,"stylelint.config.mjs":`stylelint`,"svgo.config.cjs":`svgo`,"svgo.config.js":`svgo`,"svgo.config.mjs":`svgo`,"svgo.config.ts":`svgo`,"tailwind.config.cjs":`tailwind`,"tailwind.config.js":`tailwind`,"tailwind.config.mjs":`tailwind`,"tailwind.config.ts":`tailwind`,"vite.config.js":`vite`,"vite.config.mjs":`vite`,"vite.config.mts":`vite`,"vite.config.ts":`vite`,"webpack.config.babel.js":`webpack`,"webpack.config.cjs":`webpack`,"webpack.config.js":`webpack`,"webpack.config.mjs":`webpack`,"webpack.config.ts":`webpack`},extensions:{"7z":`zip`,astro:`astro`,authors:`text`,avif:`image`,bash:`bash`,bmp:`image`,bz2:`zip`,c:`c`,cc:`cpp`,cfg:`text`,changelog:`text`,cjs:`javascript`,"code-workspace":`vscode`,conf:`text`,contributors:`text`,cpp:`cpp`,csh:`bash`,css:`css`,csv:`table`,cts:`typescript`,cxx:`cpp`,db:`database`,editorconfig:`text`,env:`text`,"env.development":`text`,"env.local":`text`,"env.production":`text`,eot:`font`,erb:`ruby`,fish:`bash`,gemspec:`ruby`,gif:`image`,go:`go`,gql:`graphql`,graphql:`graphql`,gz:`zip`,h:`c`,hh:`cpp`,hpp:`cpp`,htm:`html`,html:`html`,hxx:`cpp`,icns:`image`,ico:`image`,ini:`text`,inl:`cpp`,jar:`zip`,jpeg:`image`,jpg:`image`,js:`javascript`,json:`json`,json5:`json`,jsonc:`json`,jsonl:`json`,jsx:`react`,ksh:`bash`,less:`css`,license:`text`,log:`text`,markdown:`markdown`,mcp:`mcp`,md:`markdown`,mdx:`markdown`,"mdx.tsx":`markdown`,mjs:`javascript`,mm:`cpp`,mts:`typescript`,ods:`table`,otf:`font`,png:`image`,postcss:`css`,py:`python`,pyi:`python`,pyw:`python`,pyx:`python`,rake:`ruby`,rar:`zip`,rb:`ruby`,rs:`rust`,rst:`text`,rtf:`text`,sass:`sass`,scss:`sass`,sh:`bash`,sql:`database`,sqlite:`database`,sqlite3:`database`,styl:`css`,svelte:`svelte`,svg:`svg`,swift:`swift`,tar:`zip`,tf:`terraform`,tfstate:`terraform`,tfvars:`terraform`,tgz:`zip`,tif:`image`,tiff:`image`,ts:`typescript`,tsv:`table`,tsx:`react`,ttf:`font`,txt:`text`,vue:`vue`,war:`zip`,wasm:`wasm`,wast:`wasm`,wat:`wasm`,webp:`image`,woff:`font`,woff2:`font`,xhtml:`html`,xls:`table`,xlsx:`table`,xz:`zip`,yaml:`yml`,yml:`yml`,zig:`zig`,zip:`zip`,zsh:`bash`},symbols:JSON.parse(`{"bash":"<svg viewBox=\\"0 0 16 16\\">\\n <path fill=\\"currentColor\\" d=\\"M8 1C2.24 1 1 2.24 1 8s1.24 7 7 7 7-1.24 7-7-1.24-7-7-7\\" class=\\"bg\\" opacity=\\".2\\"/>\\n <path fill=\\"currentColor\\" d=\\"M11.5 11a.5.5 0 0 1 0 1h-3a.5.5 0 0 1 0-1zM7 6.75C7 6.42 6.64 6 6 6s-1 .42-1 .75q-.01.25.22.41.26.21.89.35.74.14 1.28.53c.37.29.61.7.61 1.21 0 .87-.68 1.5-1.5 1.7v.55a.5.5 0 0 1-1 0v-.56c-.82-.18-1.5-.82-1.5-1.69a.5.5 0 0 1 1 0c0 .33.36.75 1 .75s1-.42 1-.75q.01-.25-.22-.41a2 2 0 0 0-.89-.35q-.74-.14-1.28-.53A1.5 1.5 0 0 1 4 6.75c0-.87.68-1.5 1.5-1.7V4.5a.5.5 0 0 1 1 0v.56c.82.18 1.5.82 1.5 1.69a.5.5 0 0 1-1 0\\" class=\\"fg-stroke\\"/>\\n</svg>","c":"<svg viewBox=\\"0 0 16 16\\">\\n <path fill=\\"currentColor\\" fill-rule=\\"evenodd\\" d=\\"M8 1q.084 0 .166.021.098.023.186.075c1.055.624 4.22 2.486 5.277 3.11.085.05.15.112.209.192h-.002l.028.037a.5.5 0 0 1 .103.21q.031.102.033.21v6.29a.71.71 0 0 1-.347.616l-5.307 3.144a.68.68 0 0 1-.693 0l-5.307-3.144A.72.72 0 0 1 2 11.145V4.832a.71.71 0 0 1 .346-.612l5.288-3.126A.7.7 0 0 1 7.992 1zm2.901 4.349a3.75 3.75 0 1 0 0 5.302l-1.06-1.06a2.25 2.25 0 1 1 0-3.182z\\" clip-rule=\\"evenodd\\"/>\\n</svg>","cpp":"<svg viewBox=\\"0 0 16 16\\">\\n <path fill=\\"currentColor\\" fill-rule=\\"evenodd\\" d=\\"M8 1q.084 0 .166.021.098.023.186.075c1.055.624 4.22 2.486 5.277 3.11.085.05.15.112.209.192h-.002l.028.037a.5.5 0 0 1 .103.21q.031.102.033.21v6.29a.71.71 0 0 1-.347.616l-5.307 3.144a.68.68 0 0 1-.693 0l-5.307-3.144A.72.72 0 0 1 2 11.145V4.832a.71.71 0 0 1 .346-.612l5.288-3.126A.7.7 0 0 1 7.992 1zm2.901 4.349a3.75 3.75 0 1 0 0 5.302l-1.06-1.06a2.25 2.25 0 1 1 0-3.182z\\" clip-rule=\\"evenodd\\"/>\\n</svg>","css":"<svg viewBox=\\"0 0 16 16\\">\\n <path fill=\\"currentColor\\" d=\\"M8 15c-5.76 0-7-1.24-7-7V2a1 1 0 0 1 1-1h6c5.77 0 7 1.24 7 7s-1.24 7-7 7\\" class=\\"vector\\" opacity=\\".2\\"/>\\n <path fill=\\"currentColor\\" d=\\"M10.1 9.19h.73c.03.49.22.6 1 .6.76 0 .93-.12.93-.68 0-.52-.17-.67-.94-.85-1.38-.3-1.68-.56-1.68-1.47 0-1.05.3-1.29 1.67-1.29 1.29 0 1.57.2 1.6 1.13h-.74c-.01-.34-.17-.42-.85-.42-.77 0-.94.1-.94.58 0 .42.17.55.96.73 1.36.3 1.66.58 1.66 1.59 0 1.14-.31 1.39-1.73 1.39-1.39 0-1.69-.24-1.67-1.31m-3.9 0h.74c.03.49.21.6.99.6.76 0 .93-.12.93-.68 0-.52-.17-.67-.93-.85-1.39-.3-1.69-.56-1.69-1.47 0-1.05.3-1.29 1.67-1.29 1.3 0 1.58.2 1.6 1.13h-.73c-.02-.34-.18-.42-.85-.42-.78 0-.95.1-.95.58 0 .42.17.55.96.73 1.37.3 1.67.58 1.67 1.59 0 1.14-.32 1.39-1.74 1.39-1.38 0-1.68-.24-1.66-1.31m-1.22 0h.75c-.09 1.07-.37 1.31-1.56 1.31-1.37 0-1.68-.45-1.68-2.5 0-1.96.36-2.5 1.68-2.5 1.16 0 1.44.25 1.52 1.35h-.76c-.08-.52-.22-.64-.76-.64-.74 0-.9.33-.9 1.78 0 1.47.16 1.8.9 1.8.58 0 .74-.11.8-.6\\"/>\\n</svg>","database":"<svg viewBox=\\"0 0 16 16\\">\\n <path fill=\\"currentColor\\" d=\\"M14.953 9.733a12.4 12.4 0 0 1-.244 1.936c-.207.933-.532 1.58-.996 2.044s-1.11.789-2.044.996C10.73 14.918 9.533 15 8 15s-2.73-.082-3.669-.291c-.933-.207-1.58-.532-2.044-.996s-.789-1.11-.996-2.044c-.122-.547-.2-1.182-.244-1.92q.23.364.532.667c.64.639 1.482 1.031 2.533 1.265 1.046.232 2.33.315 3.884.315 1.555 0 2.838-.083 3.884-.315 1.051-.234 1.893-.626 2.532-1.265a4 4 0 0 0 .541-.683\\"/>\\n <path fill=\\"currentColor\\" d=\\"M14.93 5.924c-.046.663-.118 1.24-.23 1.743-.207.932-.532 1.579-.995 2.042s-1.11.789-2.042.996c-.938.209-2.135.291-3.667.291-1.531 0-2.729-.082-3.667-.29-.932-.208-1.579-.534-2.042-.997s-.789-1.11-.996-2.042a12 12 0 0 1-.227-1.683l.016-.188a4 4 0 0 0 .5.62c.638.639 1.48 1.031 2.532 1.265 1.046.232 2.33.315 3.884.315 1.555 0 2.838-.083 3.884-.315 1.051-.234 1.893-.626 2.532-1.265.192-.192.357-.404.506-.633z\\"/>\\n <path fill=\\"currentColor\\" d=\\"M8 1c1.533 0 2.73.082 3.669.291.933.207 1.58.533 2.044.996.403.404.904.944.91 1.695.004.764-.509 1.318-.918 1.727-.463.463-1.11.789-2.042.996-.938.209-2.135.291-3.667.291-1.531 0-2.729-.082-3.667-.29-.932-.208-1.579-.534-2.042-.997-.406-.406-.915-.953-.915-1.71 0-.758.509-1.305.915-1.712.464-.463 1.11-.789 2.044-.996C5.27 1.082 6.467 1 8 1\\"/>\\n</svg>","default":"<svg viewBox=\\"0 0 16 16\\">\\n <path fill=\\"currentColor\\" d=\\"M8 1v3a3 3 0 0 0 3 3h3v5.5a2.5 2.5 0 0 1-2.5 2.5h-7A2.5 2.5 0 0 1 2 12.5v-9A2.5 2.5 0 0 1 4.5 1z\\" class=\\"bg\\" opacity=\\".4\\"/>\\n <path fill=\\"currentColor\\" d=\\"M9.5 1a.5.5 0 0 1 .354.146l4 4A.5.5 0 0 1 14 5.5V6h-3a2 2 0 0 1-2-2V1z\\" class=\\"fg\\"/>\\n</svg>","font":"<svg viewBox=\\"0 0 16 16\\">\\n <path fill=\\"currentColor\\" d=\\"M12.3 13c-1.59 0-2.68-.99-2.68-2.5 0-1.43 1-2.34 2.88-2.35h2.16v-.83c0-1.08-.62-1.68-1.73-1.68-1.05 0-1.66.54-1.73 1.36H9.93c.09-1.43 1.06-2.48 3.05-2.48 1.75 0 3.02.95 3.02 2.68v5.66h-1.29v-1.02h-.04c-.41.66-1.16 1.16-2.37 1.16m.36-1.12c1.14 0 2-.72 2-1.74v-.96H12.6c-1.12 0-1.6.54-1.6 1.28 0 .97.8 1.42 1.66 1.42m-11.24.98H0L3.8 2h1.39l3.8 10.86H7.54l-1.08-3.2H2.5zm3.09-9.25h-.04l-1.6 4.95H6.1z\\"/>\\n</svg>","git":"<svg viewBox=\\"0 0 16 16\\">\\n <path fill=\\"currentColor\\" d=\\"M14.74 7.38 8.62 1.26a.9.9 0 0 0-1.27 0L6.08 2.53l1.61 1.61a1.07 1.07 0 0 1 1.36 1.37l1.55 1.55a1.07 1.07 0 0 1 1.1 1.77 1.07 1.07 0 0 1-1.74-1.16L8.5 6.22v3.8a1.07 1.07 0 1 1-.89-.02V6.15a1.07 1.07 0 0 1-.58-1.4l-1.58-1.6-4.2 4.2a.9.9 0 0 0 0 1.27l6.12 6.12a.9.9 0 0 0 1.27 0l6.09-6.09a.9.9 0 0 0 0-1.27\\"/>\\n</svg>","go":"<svg viewBox=\\"0 0 16 16\\">\\n <path fill=\\"currentColor\\" fill-rule=\\"evenodd\\" d=\\"M4.41 4.57A3.2 3.2 0 0 1 6.87 5q.74.49 1.08 1.29.08.12-.1.16l-1.55.4c-.14.03-.15.04-.27-.1a1 1 0 0 0-.44-.34 1.6 1.6 0 0 0-1.68.14q-.95.61-.94 1.73c0 .73.52 1.33 1.25 1.43q.95.1 1.58-.6l.25-.34h-1.8c-.19 0-.24-.12-.17-.27.12-.28.34-.76.47-1a.3.3 0 0 1 .24-.14h2.98a4 4 0 0 1 .64-1.19 4 4 0 0 1 2.6-1.52 3.5 3.5 0 0 1 2.64.46q1.13.73 1.31 2.04a3.5 3.5 0 0 1-1.06 3.09q-.93.92-2.23 1.17l-.74.08a3.5 3.5 0 0 1-2.27-.8 3 3 0 0 1-.93-1.42 4 4 0 0 1-.39.61 4 4 0 0 1-2.64 1.56 3.3 3.3 0 0 1-2.5-.6 3 3 0 0 1-1.18-2.03 3.5 3.5 0 0 1 .8-2.67 4 4 0 0 1 2.6-1.58M13.1 7.5a1.53 1.53 0 0 0-1.9-1.21q-1.3.3-1.62 1.59a1.5 1.5 0 0 0 .85 1.72q.77.33 1.52-.05a2 2 0 0 0 1.18-1.74q0-.17-.03-.3\\" clip-rule=\\"evenodd\\"/>\\n</svg>","html":"<svg viewBox=\\"0 0 16 16\\">\\n <path fill=\\"currentColor\\" d=\\"M8 1C2.24 1 1 2.24 1 8s1.24 7 7 7 7-1.24 7-7-1.24-7-7-7\\" class=\\"bg\\" opacity=\\".2\\"/>\\n <path fill=\\"currentColor\\" d=\\"M10.48 3.76a.5.5 0 0 1 .4.58L10.6 5.8h1.14a.5.5 0 0 1 0 1h-1.32L10 9.2h1.08a.5.5 0 0 1 0 1H9.8l-.3 1.64a.5.5 0 1 1-.98-.18l.27-1.46H6.4l-.3 1.64a.5.5 0 1 1-.98-.18l.27-1.46H4.25a.5.5 0 0 1 0-1h1.32L6 6.8H4.93a.5.5 0 0 1 0-1H6.2l.3-1.64a.5.5 0 1 1 .98.18L7.2 5.8h2.4l.3-1.64a.5.5 0 0 1 .58-.4M6.58 9.2h2.4l.44-2.4h-2.4z\\" class=\\"fg\\"/>\\n</svg>","image":"<svg viewBox=\\"0 0 16 16\\">\\n <path fill=\\"currentColor\\" d=\\"M12.5 2A2.5 2.5 0 0 1 15 4.5v4.67l-4.05-3.54-4.08 4.08-3-2L1 10.6V4.5A2.5 2.5 0 0 1 3.5 2z\\" opacity=\\".3\\"/>\\n <path fill=\\"currentColor\\" d=\\"M15 10.5v1a2.5 2.5 0 0 1-2.5 2.5h-9a2.5 2.5 0 0 1-2.46-2.04L4 9l3 2 4-4zm-7-5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0\\"/>\\n</svg>","javascript":"<svg viewBox=\\"0 0 16 16\\">\\n <path fill=\\"currentColor\\" d=\\"M8 1C2.24 1 1 2.24 1 8s1.24 7 7 7 7-1.24 7-7-1.24-7-7-7\\" class=\\"bg\\" opacity=\\".2\\"/>\\n <path fill=\\"currentColor\\" d=\\"M8.1 9.64h.95c.04.62.28.76 1.28.76s1.2-.14 1.2-.85c0-.66-.2-.85-1.2-1.07-1.79-.38-2.18-.7-2.18-1.86C8.15 5.3 8.54 5 10.31 5c1.67 0 2.04.26 2.07 1.42h-.95c-.02-.43-.23-.53-1.1-.53-1 0-1.22.14-1.22.74 0 .52.22.7 1.24.92 1.76.38 2.15.73 2.15 2 0 1.44-.4 1.75-2.24 1.75-1.8 0-2.18-.3-2.15-1.66M3.5 9.5h.98c0 .76.15.92.85.92.77 0 .94-.18.94-1.02V5.1h1v4.34c0 1.54-.35 1.87-1.92 1.87-1.55 0-1.89-.32-1.86-1.8\\"/>\\n</svg>","json":"<svg viewBox=\\"0 0 16 16\\">\\n <path fill=\\"currentColor\\" d=\\"M13.25 11.5V9.75a.5.5 0 0 1 .36-.48l.55-.15a1.16 1.16 0 0 0 0-2.24l-.55-.15a.5.5 0 0 1-.36-.48V4.5a2.5 2.5 0 0 0-2.5-2.5h-.25a.5.5 0 0 0 0 1h.25a1.5 1.5 0 0 1 1.5 1.5v1.75a1.5 1.5 0 0 0 1.09 1.44l.54.15a.16.16 0 0 1 0 .32l-.54.15a1.5 1.5 0 0 0-1.09 1.44v1.75a1.5 1.5 0 0 1-1.5 1.5h-.25a.5.5 0 0 0 0 1h.25a2.5 2.5 0 0 0 2.5-2.5m-10.5 0V9.75a.5.5 0 0 0-.36-.48l-.55-.15a1.16 1.16 0 0 1 0-2.24l.55-.15a.5.5 0 0 0 .36-.48V4.5A2.5 2.5 0 0 1 5.25 2h.25a.5.5 0 0 1 0 1h-.25a1.5 1.5 0 0 0-1.5 1.5v1.75a1.5 1.5 0 0 1-1.09 1.44l-.54.15a.16.16 0 0 0 0 .32l.54.15a1.5 1.5 0 0 1 1.09 1.45v1.74a1.5 1.5 0 0 0 1.5 1.5h.25a.5.5 0 0 1 0 1h-.25a2.5 2.5 0 0 1-2.5-2.5\\"/>\\n</svg>","markdown":"<svg viewBox=\\"0 0 16 16\\">\\n <path fill=\\"currentColor\\" d=\\"M1 12V4h2l2 2.5L7 4h2v8H7V7.5l-2 2-2-2V12zm9-3 3 3.5L16 9h-2V4h-2v5z\\"/>\\n</svg>","mcp":"<svg viewBox=\\"0 0 16 16\\">\\n <path fill=\\"currentColor\\" d=\\"M9.26-.04a3 3 0 0 1 2 .82 2.8 2.8 0 0 1 .8 2.35 2.9 2.9 0 0 1 2.41.8l.03.02a2.74 2.74 0 0 1 0 3.94l-5.8 5.69-.04.06-.02.07q0 .04.02.07.01.04.04.06l1.2 1.17a.55.55 0 0 1 0 .79.6.6 0 0 1-.81 0l-1.2-1.17a1.3 1.3 0 0 1 0-1.84L13.7 7.1a1.65 1.65 0 0 0 .37-1.82 2 2 0 0 0-.37-.54l-.03-.03a1.73 1.73 0 0 0-2.4 0L6.47 9.4l-.07.06a.58.58 0 0 1-.92-.18.6.6 0 0 1 .12-.6l4.85-4.76a1.65 1.65 0 0 0 0-2.36 1.73 1.73 0 0 0-2.4 0l-6.43 6.3a.6.6 0 0 1-.8 0 .55.55 0 0 1 0-.8L7.25.79a3 3 0 0 1 2-.82\\"/>\\n <path fill=\\"currentColor\\" d=\\"M9.26 2.19a.6.6 0 0 1 .52.34.6.6 0 0 1 0 .43l-.12.18L4.9 7.79a1.65 1.65 0 0 0 0 2.36 1.73 1.73 0 0 0 2.4 0l4.75-4.66a.58.58 0 0 1 .93.18.6.6 0 0 1-.12.61l-4.75 4.66a2.9 2.9 0 0 1-4.01 0 2.75 2.75 0 0 1-.62-3.04A3 3 0 0 1 4.1 7l4.74-4.65a.6.6 0 0 1 .4-.16\\"/>\\n</svg>","python":"<svg viewBox=\\"0 0 16 16\\">\\n <path fill=\\"currentColor\\" d=\\"M8.33 8.4H10c1.16 0 1.9-.73 1.9-1.86V5.08q0-.24.25-.24h.74c.75 0 1.33.32 1.66.97q.4.73.41 1.46c.09.9.09 1.78-.24 2.67-.25.73-.75 1.3-1.58 1.46h-4.8c-.08 0-.25 0-.25.08v.4s.17.09.25.09h2.82q.34-.02.33.32v1.06c0 .56-.25.97-.75 1.13-.41.16-.83.33-1.24.4a7 7 0 0 1-2.98-.07 3 3 0 0 1-1.16-.49c-.33-.32-.58-.65-.5-1.14v-2.91c0-1.13.67-1.78 1.82-1.78q.89-.1 1.66-.08m2.32 4.86a.65.65 0 0 0-.66-.65c-.34 0-.67.33-.67.65s.33.57.67.65a.65.65 0 0 0 .66-.65\\" class=\\"bg\\" opacity=\\".8\\"/>\\n <path fill=\\"currentColor\\" d=\\"M7.67 7.6H6c-1.16 0-1.9.73-1.9 1.86v1.46q0 .24-.25.24h-.74c-.75 0-1.33-.32-1.66-.97a3 3 0 0 1-.41-1.46 6 6 0 0 1 .24-2.67c.25-.73.75-1.3 1.58-1.46h4.8c.08 0 .25 0 .25-.08v-.4s-.17-.09-.25-.09H4.85c-.24 0-.33-.08-.33-.32V2.65c0-.56.25-.97.75-1.13.41-.16.83-.33 1.24-.4a7 7 0 0 1 2.98.07c.41.09.83.25 1.16.49.33.32.58.65.5 1.13v2.92c0 1.14-.67 1.78-1.82 1.78-.58.08-1.16.08-1.66.08M5.35 2.73c0 .33.25.65.66.65.33 0 .66-.32.66-.65 0-.32-.33-.56-.66-.64a.65.65 0 0 0-.66.64\\" class=\\"fg\\"/>\\n</svg>","ruby":"<svg viewBox=\\"0 0 16 16\\">\\n <path fill=\\"currentColor\\" fill-rule=\\"evenodd\\" d=\\"M11.04 2c.48 0 .92.23 1.18.6l2.54 3.65c.37.52.3 1.23-.15 1.69l-5.58 5.64a1.47 1.47 0 0 1-2.06 0L1.39 7.94a1.3 1.3 0 0 1-.15-1.7l2.54-3.63q.2-.3.5-.45.33-.16.68-.16zm.84 2.17a.5.5 0 0 0-.7-.05L8 6.84 4.83 4.12a.5.5 0 0 0-.65.76L6.65 7H3.5a.5.5 0 0 0 0 1h9a.5.5 0 0 0 0-1H9.35l2.48-2.12a.5.5 0 0 0 .05-.7\\" clip-rule=\\"evenodd\\"/>\\n</svg>","rust":"<svg viewBox=\\"0 0 16 16\\">\\n <path fill=\\"currentColor\\" fill-rule=\\"evenodd\\" d=\\"M8 .8a.2.2 0 0 1 .18.1l.38.6.16.02.5-.53.01-.01a.2.2 0 0 1 .33.08l.25.68.16.05.59-.43h.02a.2.2 0 0 1 .3.14l.12.71.15.08.65-.3a.2.2 0 0 1 .2.02.2.2 0 0 1 .1.18l-.03.72.12.1.71-.16a.2.2 0 0 1 .25.25l-.17.7q.06.06.1.13l.73-.03A.2.2 0 0 1 14 4a.2.2 0 0 1 .02.2l-.3.66.08.14.71.12a.2.2 0 0 1 .14.32l-.43.59.05.16.68.25a.2.2 0 0 1 .07.35l-.53.49.01.16.62.38a.2.2 0 0 1 0 .36l-.62.38-.01.16.53.5a.2.2 0 0 1-.07.34l-.68.25-.05.16.43.59a.2.2 0 0 1-.14.32l-.72.12-.07.15.3.65a.2.2 0 0 1-.02.2.2.2 0 0 1-.18.1l-.72-.03-.1.13.16.7a.2.2 0 0 1-.25.25l-.7-.17-.13.1.03.73a.2.2 0 0 1-.1.18.2.2 0 0 1-.2.02l-.66-.3-.14.08-.12.71a.2.2 0 0 1-.32.14l-.59-.43-.16.05-.25.68a.2.2 0 0 1-.34.07l-.5-.53-.16.01-.38.62a.2.2 0 0 1-.36 0l-.38-.62-.16-.01-.5.53a.2.2 0 0 1-.34-.07l-.25-.68-.16-.05-.59.43a.2.2 0 0 1-.32-.14L5 13.78l-.15-.07-.65.3a.2.2 0 0 1-.2-.02.2.2 0 0 1-.1-.18l.03-.72-.13-.1-.7.16a.2.2 0 0 1-.25-.25l.17-.7-.1-.13-.73.03a.2.2 0 0 1-.2-.3l.3-.66-.08-.14-.71-.12a.2.2 0 0 1-.14-.32l.43-.59-.05-.16-.68-.25A.2.2 0 0 1 1 9.22l.53-.5-.02-.16-.6-.38A.2.2 0 0 1 .8 8a.2.2 0 0 1 .1-.18l.6-.38.02-.16-.53-.5a.2.2 0 0 1 .07-.34l.68-.25.05-.16-.43-.59a.2.2 0 0 1 .14-.32L2.2 5l.08-.15L2 4.2a.2.2 0 0 1 .2-.3l.72.03.1-.13-.16-.7a.2.2 0 0 1 .25-.25l.7.16.13-.1-.03-.72A.2.2 0 0 1 4 2a.2.2 0 0 1 .2-.02l.65.3L5 2.2l.12-.71v-.03a.2.2 0 0 1 .32-.1l.59.41.16-.04.25-.68.01-.02A.2.2 0 0 1 6.8.99l.49.53.16-.02.38-.61.02-.02A.2.2 0 0 1 8 .79M6.8 9.45h1.26l.06.01q.03.01.03.05v1.52q0 .07-.09.06h-4.5A5.4 5.4 0 0 0 8 13.42a5.4 5.4 0 0 0 4.45-2.33h-2.42c-.36 0-.68-.5-.77-.75-.08-.22-.2-.91-.25-1.12-.15-.61-.59-.71-.78-.73H6.8zM8 2.58a5.4 5.4 0 0 0-4.07 1.85h5.74l.17.02c.23.03.6.12.96.35.34.23.83.68.83 1.4 0 .66-.55 1.16-1.08 1.5.42.33.7.53.86 1.44.04.17.34.32.62.29.29-.03.62-.16.62-.75v-.24q0-.1.07-.1h.68A5.43 5.43 0 0 0 8 2.59M2.96 6.03a5.4 5.4 0 0 0-.19 3.37h1.66V6.03zM6.8 7.06h1.66c.35 0 .77-.12.77-.47 0-.42-.55-.53-.65-.53H6.8z\\" clip-rule=\\"evenodd\\"/>\\n</svg>","swift":"<svg viewBox=\\"0 0 16 16\\">\\n <path fill=\\"currentColor\\" d=\\"M9.63 1c6.15 4.35 4.16 9.15 4.16 9.15s1.75 2.05 1.04 3.85c0 0-.72-1.26-1.93-1.26-1.17 0-1.85 1.26-4.2 1.26C3.47 14 1 9.46 1 9.46c4.71 3.22 7.93.94 7.93.94C6.8 9.12 2.29 3 2.29 3c3.93 3.47 5.63 4.39 5.63 4.39-1.01-.87-3.86-5.13-3.86-5.13C6.34 4.66 10.86 8 10.86 8c1.28-3.7-1.23-7-1.23-7\\"/>\\n</svg>","table":"<svg viewBox=\\"0 0 16 16\\">\\n <path fill=\\"currentColor\\" d=\\"M8 4a3 3 0 0 0 3 3h3v5.5a2.5 2.5 0 0 1-2.5 2.5h-7A2.5 2.5 0 0 1 2 12.5v-9A2.5 2.5 0 0 1 4.5 1H8z\\" class=\\"bg\\" opacity=\\".4\\"/>\\n <path fill=\\"currentColor\\" d=\\"M11.5 8a.5.5 0 0 1 .5.5v4a.5.5 0 0 1-.5.5h-7a.5.5 0 0 1-.5-.5v-4a.5.5 0 0 1 .5-.5zM5 12h2.5v-1H5zm3.5 0H11v-1H8.5zM5 10h2.5V9H5zm3.5 0H11V9H8.5zm1-9a.5.5 0 0 1 .354.146l4 4A.5.5 0 0 1 14 5.5V6h-3a2 2 0 0 1-2-2V1z\\" class=\\"fg\\"/>\\n</svg>","text":"<svg viewBox=\\"0 0 16 16\\">\\n <path fill=\\"currentColor\\" fill-rule=\\"evenodd\\" d=\\"M8 4a3 3 0 0 0 3 3h3v5.5a2.5 2.5 0 0 1-2.5 2.5h-7A2.5 2.5 0 0 1 2 12.5v-9A2.5 2.5 0 0 1 4.5 1H8z\\" class=\\"bg\\" clip-rule=\\"evenodd\\" opacity=\\".4\\"/>\\n <path fill=\\"currentColor\\" d=\\"M8.5 11a.5.5 0 0 1 0 1h-3a.5.5 0 0 1 0-1zm2-2a.5.5 0 0 1 0 1h-5a.5.5 0 0 1 0-1zm-1-8a.5.5 0 0 1 .354.146l4 4A.5.5 0 0 1 14 5.5V6h-3a2 2 0 0 1-2-2V1z\\"/>\\n</svg>","typescript":"<svg viewBox=\\"0 0 16 16\\">\\n <path fill=\\"currentColor\\" d=\\"M8 1C2.24 1 1 2.24 1 8s1.24 7 7 7 7-1.24 7-7-1.24-7-7-7\\" class=\\"bg\\" opacity=\\".2\\"/>\\n <path fill=\\"currentColor\\" d=\\"M8.1 9.64h.95c.04.62.28.76 1.28.76s1.2-.14 1.2-.85c0-.66-.2-.85-1.2-1.07-1.79-.38-2.18-.7-2.18-1.86C8.15 5.3 8.54 5 10.31 5c1.67 0 2.04.26 2.07 1.42h-.95c-.02-.43-.23-.53-1.1-.53-1 0-1.22.14-1.22.74 0 .52.22.7 1.24.92 1.76.38 2.15.73 2.15 2 0 1.44-.4 1.75-2.24 1.75-1.8 0-2.18-.3-2.15-1.66m-3 1.57V5.99H3.5v-.9h4.21v.9H6.1v5.22z\\"/>\\n</svg>","zip":"<svg viewBox=\\"0 0 16 16\\">\\n <path fill=\\"currentColor\\" d=\\"M4.585 2a2 2 0 0 1 1.028.285l1.788 1.072a1 1 0 0 0 .514.143H12A2 2 0 0 1 13.935 5H0V4a2 2 0 0 1 2-2z\\" class=\\"bg\\" opacity=\\".5\\"/>\\n <path fill=\\"currentColor\\" fill-rule=\\"evenodd\\" d=\\"M14 12a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2v-1.25h1v-1H0V6h14zM9.9 8.25c-.883 0-1.9.5-1.9.5H7v1h1v1s1.017.5 1.9.5c.884 0 1.6-.672 1.6-1.5s-.716-1.5-1.6-1.5M2 9.75v1h1v-1zm2 0v1h1v-1zm2 0v1h1v-1zm-5-1v1h1v-1zm2 0v1h1v-1zm2 0v1h1v-1z\\" class=\\"fg\\" clip-rule=\\"evenodd\\"/>\\n</svg>","astro":"<svg viewBox=\\"0 0 16 16\\">\\n <path fill=\\"currentColor\\" d=\\"M6.08 13.92c-.63-.57-.81-1.79-.55-2.67.45.56 1.08.73 1.73.83 1 .15 1.99.1 2.92-.37l.32-.19q.13.38.08.78a2.1 2.1 0 0 1-.9 1.5q-.3.24-.61.43c-.64.44-.81.95-.57 1.69l.02.08a1.7 1.7 0 0 1-.74-.64 2 2 0 0 1-.3-.98q0-.27-.02-.52-.07-.61-.61-.62a.7.7 0 0 0-.75.6z\\" class=\\"bg\\" opacity=\\".6\\"/>\\n <path fill=\\"currentColor\\" d=\\"M2.5 11.1s1.86-.9 3.72-.9l1.4-4.39c.05-.21.2-.36.38-.36s.33.15.38.36l1.4 4.38c2.2 0 3.72.92 3.72.92l-3.16-8.69q-.13-.4-.45-.42H6.11q-.3.02-.45.42z\\" class=\\"fg\\"/>\\n</svg>","babel":"<svg viewBox=\\"0 0 16 16\\">\\n <path fill=\\"currentColor\\" fill-rule=\\"evenodd\\" d=\\"M9.49.5q1.92.05 2.66.54 1.27.6 1.35 1.52v.23a4 4 0 0 1-.53 1.9l-1.38 1.24q-.74.38-.72.63c.77.82 1.33 1.29.85 2.42q-.47 1.1-2.04 2.28c-.5.32-1.88 1.35-2.96 1.86-1.64.77-3.1 1.4-4.65 1.89-.51.16-1.5.16-1.5.16L.5 15A76 76 0 0 0 5.76 3.49q-.1-.08-.1-.2.1 0 .32-.35l-.03-.09q-1.17.39-2.38 1.3l-.13.03q0-.1-.21-.16-.46.31-.82.7l-.13-.19.16-.06-.03-.16-.34.29L2 4.5q.36-.48.72-.54l.04-.1V3.8q.16 0 .15-.06l.13-.06a6 6 0 0 0 1.13-.9v-.03H4.1l-.12.07q0-.1-.1-.1l-.15.07-.04-.1q.93-.52 1.63-1.05Q7.89.65 9.5.5M8.46 7.83l-.32.04c-1.31.54-2.31.82-2.91.88a71 71 0 0 0-2.2 4.54h.07q.58-.04 3.04-1.42.13 0 1.66-1.05L9.18 9.7v.03q.45-.2.81-1.3v-.2q-.5-.46-1.53-.4m.28-5.75c-.5.1-.75.19-.72.38l-1.16 2.6q-.17.1-.34.95-.3.48-.25.77v.1l.22.05A15 15 0 0 1 8.86 6c1.1-.71 2.12-1.38 2.8-2.54q.24-.33.21-.54-.02-.33-.4-.54c-.54 0-1.07-.34-1.63-.28l-.94-.03z\\" clip-rule=\\"evenodd\\"/>\\n</svg>","biome":"<svg viewBox=\\"0 0 16 16\\">\\n <path fill=\\"currentColor\\" d=\\"M8 2 4.88 7.35a7 7 0 0 1 3.7-.13l1.04.25-.99 4.16-1.05-.25a2.7 2.7 0 0 0-3.07 1.45l-.98-.47a4 4 0 0 1 1.07-1.31 3.8 3.8 0 0 1 3.23-.71l.5-2.08a6 6 0 0 0-5.07 1.12A5.9 5.9 0 0 0 1 14h14z\\"/>\\n</svg>","bootstrap":"<svg viewBox=\\"0 0 16 16\\">\\n <path fill=\\"currentColor\\" fill-rule=\\"evenodd\\" d=\\"M11.72 1.5A2.5 2.5 0 0 1 14.2 4q.02 1.08.3 2.09c.22.73.56 1.24 1.08 1.45.22.08.4.27.4.5s-.18.43-.4.51q-.76.34-1.08 1.45c-.2.65-.27 1.32-.3 2a2.5 2.5 0 0 1-2.48 2.5H4.25A2.6 2.6 0 0 1 1.7 12c-.04-.85-.1-1.68-.22-2.04C1.26 9.23.92 8.7.4 8.5.18 8.42 0 8.23 0 8s.18-.42.4-.5q.77-.35 1.09-1.46c.1-.36.17-1.19.2-2.04a2.6 2.6 0 0 1 2.56-2.5z\\" class=\\"bg\\" clip-rule=\\"evenodd\\" opacity=\\".2\\"/>\\n <path fill=\\"currentColor\\" fill-rule=\\"evenodd\\" d=\\"M8.47 4.54c1.23 0 2.04.68 2.04 1.73 0 .73-.55 1.39-1.24 1.5v.04c.94.1 1.58.77 1.58 1.7 0 1.2-.9 1.95-2.37 1.95H5.97a.3.3 0 0 1-.2-.08.3.3 0 0 1-.08-.2V4.82a.3.3 0 0 1 .08-.2.3.3 0 0 1 .2-.08zm-1.7 6.04h1.49q1.47-.01 1.49-1.15Q9.74 8.31 8.2 8.3H6.77zm0-5.16v2.06h1.21c.93 0 1.45-.38 1.45-1.06 0-.65-.44-1-1.22-1z\\" class=\\"fg\\" clip-rule=\\"evenodd\\"/>\\n</svg>","browserslist":"<svg viewBox=\\"0 0 16 16\\">\\n <path fill=\\"currentColor\\" d=\\"M8.88 6.96c0 3.82 3.72 4.7 5.7 3.74-.23.9-1.04 1.67-2.35 1.93-.02.4.42 1.28.82 1.63-.9.35-1.94-.12-2.51-.48a5 5 0 0 0-.32 1.87c-.68 0-1.57-1-1.8-1.37-.3.18-.85 1.15-.96 1.72a2.4 2.4 0 0 1-.81-.86 2.4 2.4 0 0 1-.3-1.15c-.38.27-1.48.95-1.99 1.18-.25-.58-.15-1.3 0-2.06-.21.12-1.8.27-2.43.12.32-.36.75-1.19.94-1.57A4.5 4.5 0 0 1 .44 10.6c.48-.22.97-.53 1.49-1.06C1.26 9.17.24 8.64 0 7.7a6 6 0 0 0 1.79-.32C1.28 7.08.44 6.15.6 5.01c.42.21 1.3.37 1.73.3a3.4 3.4 0 0 1-.25-2.75 5 5 0 0 0 1.48 1c-.08-.8.3-2.31.8-2.71.2.46.73 1.21 1.08 1.4.09-.61.87-2.06 1.57-2.25 0 .5.27 1.4.5 1.67.51-.54 2.25-1.44 3.64-1.13-.43.45-.75.61-.86.98 1.05 0 2.78.34 4.27 1.93-2.34-.89-5.69.56-5.69 3.5\\" class=\\"bg\\" opacity=\\".5\\"/>\\n <path fill=\\"currentColor\\" d=\\"M11.21 3.59a4.1 4.1 0 0 0 2.47 2.89c.24-.22.61-.38.95-.19.76.44.2 1.26-.34 1.66l-.07.06a13 13 0 0 1-4.49 1.61l-.3-.43a10.5 10.5 0 0 0 4.13-1.31 1 1 0 0 0 .23-.25.5.5 0 0 0-.21-.69l-.15-.06a4.5 4.5 0 0 1-1.77-1.31 4.5 4.5 0 0 1-.88-1.77q.2-.12.43-.21\\"/>\\n <path fill=\\"currentColor\\" d=\\"M10.36 5.18a.4.4 0 0 0-.03.38c.09.2.3.3.46.23s.24-.3.15-.5l-.01-.02q.23.13.34.39a.83.83 0 0 1-.43 1.08.8.8 0 0 1-1.08-.43.83.83 0 0 1 .6-1.13\\"/>\\n</svg>","bun":"<svg viewBox=\\"0 0 16 16\\">\\n <path fill=\\"currentColor\\" d=\\"M8 14c3.87 0 7-2.46 7-5.49 0-1.88-1.2-3.53-3.04-4.52q-1.1-.61-1.84-1.07C9.2 2.35 8.64 2 8 2s-1.36.45-2.31 1.03A29 29 0 0 1 4.04 4C2.2 4.98 1 6.63 1 8.51 1 11.54 4.13 14 8 14M7.18 3.88q.3-.66.3-1.37c0-.08.11-.1.13-.01.38 1.57-.53 2.35-1.2 2.61-.08.03-.12-.07-.06-.12a3 3 0 0 0 .83-1.12m1.2-.05a3 3 0 0 0-.45-1.3V2.5c-.04-.07.05-.15.1-.1 1.15 1.2.77 2.3.33 2.87-.05.05-.13 0-.11-.08q.21-.67.13-1.37m1.04-.32a3 3 0 0 0-.94-1.02v-.01c-.06-.05-.01-.16.07-.12 1.51.61 1.61 1.8 1.43 2.5l-.03.03a.07.07 0 0 1-.1-.06 3 3 0 0 0-.43-1.32m-2.97.32c-.36.3-.74.43-1.2.56q-.11 0-.1-.1a3.5 3.5 0 0 0 1.76-1.57s.09-.07.1.04c0 .18-.2.76-.56 1.07m2.89 6.36q-.13.52-.55.88a1.3 1.3 0 0 1-.75.35 1.3 1.3 0 0 1-.77-.35 1.7 1.7 0 0 1-.54-.88.13.13 0 0 1 .15-.15h2.31a.14.14 0 0 1 .15.15M6.15 8.95a1.1 1.1 0 0 1-1.39-.14A1.1 1.1 0 0 1 5.12 7a1.1 1.1 0 0 1 1.2.25 1.1 1.1 0 0 1-.17 1.69m4.96 0a1.1 1.1 0 0 1-1.4-.14 1.1 1.1 0 0 1 .37-1.8 1.1 1.1 0 0 1 1.2.25 1.1 1.1 0 0 1 .24 1.2 1 1 0 0 1-.41.5\\"/>\\n</svg>","claude":"<svg viewBox=\\"0 0 16 16\\">\\n <path fill=\\"currentColor\\" d=\\"M3.75 10.31 6.5 8.77l.04-.14-.04-.07h-.14l-.46-.03-1.57-.04-1.38-.07-1.33-.07-.34-.07L1 7.86l.03-.21.28-.18.4.03.89.07 1.33.08.97.06 1.43.16h.22l.03-.1-.07-.05-.06-.06-1.39-.92-1.48-.98-.79-.57-.42-.28-.2-.28-.1-.6.39-.41.52.04.12.03.52.4 1.12.86L6.2 6.04l.2.17.09-.06.01-.04-.1-.15-.76-1.46-.85-1.46-.37-.6-.1-.36a1 1 0 0 1-.06-.42l.42-.59.25-.07.6.08.22.2.36.84.58 1.3.9 1.77.29.53.14.47.04.14h.1v-.07l.07-1 .14-1.22.14-1.57.04-.45.23-.53.42-.28.36.15.28.41-.04.25-.16 1.08-.36 1.7-.21 1.14h.12l.14-.15.58-.76.97-1.2.42-.5.5-.51.32-.25h.6l.44.66-.2.68-.61.79-.52.65-.74 1-.45.8.04.05h.1l1.68-.36.9-.16 1.06-.18.5.23.05.22-.2.48-1.15.28-1.34.28-2 .46-.04.01.03.04.9.09.4.03h.94l1.77.14.46.28.27.37-.04.28-.72.37-.95-.23-2.24-.53-.76-.18h-.11v.06l.64.63L12 10.86l1.48 1.35.07.34-.18.28-.2-.03-1.29-.98-.5-.42-1.12-.95h-.07v.1l.25.38 1.37 2.05.07.63-.1.2-.36.14-.38-.08-.8-1.12-.85-1.26-.66-1.15-.07.05-.4 4.23-.19.21-.42.17-.35-.28-.2-.42.2-.87.23-1.12.18-.9.17-1.1.1-.36v-.03h-.1l-.84 1.16-1.27 1.72-1 1.07-.24.1-.42-.22.04-.39.22-.32 1.4-1.8.84-1.1.57-.64-.02-.07h-.04l-3.7 2.4-.66.09-.28-.28.03-.42.14-.14 1.12-.77z\\"/>\\n</svg>","docker":"<svg viewBox=\\"0 0 16 16\\">\\n <path fill=\\"currentColor\\" d=\\"M15.85 6.54c-.05-.04-.45-.36-1.31-.36q-.34 0-.68.06a2.7 2.7 0 0 0-1.14-1.79l-.23-.14-.15.23a3 3 0 0 0-.4 1q-.24 1.01.26 1.84c-.4.24-1.03.3-1.17.3H.5a.5.5 0 0 0-.5.52q-.01 1.46.46 2.83.55 1.5 1.6 2.18c.79.5 2.08.79 3.54.79q.96 0 1.94-.18a8 8 0 0 0 2.55-.97 7 7 0 0 0 1.73-1.5 10 10 0 0 0 1.7-3.06h.15a2.4 2.4 0 0 0 1.8-.7 2 2 0 0 0 .47-.74l.06-.2z\\"/>\\n <path fill=\\"currentColor\\" d=\\"M1.48 7.36h1.4a.14.14 0 0 0 .14-.13V5.91q-.01-.12-.13-.14H1.48a.13.13 0 0 0-.13.14v1.32q.02.13.13.13m1.94 0h1.41a.14.14 0 0 0 .13-.13V5.91q-.01-.12-.13-.14h-1.4a.13.13 0 0 0-.13.14v1.32q0 .13.12.13m1.98 0h1.4q.13 0 .14-.13V5.91a.13.13 0 0 0-.14-.14H5.4q-.1.01-.12.14v1.32q0 .13.12.13m1.95 0h1.42q.1 0 .12-.13V5.91q0-.12-.12-.14H7.35q-.1.01-.12.14v1.32q.01.13.12.13M3.42 5.5h1.41c.07 0 .13-.08.13-.15V4.03a.13.13 0 0 0-.13-.14h-1.4q-.12 0-.13.14v1.31q0 .13.12.15m1.98 0h1.4c.08 0 .14-.08.14-.15V4.03q0-.13-.14-.14H5.4q-.1 0-.12.14v1.31q0 .13.12.15m1.95 0h1.42c.06 0 .12-.08.12-.15V4.03q-.01-.13-.12-.14H7.35q-.1 0-.12.14v1.31q.01.13.12.15m0-1.9h1.42q.1-.02.12-.14v-1.3Q8.88 2 8.77 2H7.35q-.1 0-.12.14v1.3q.01.13.12.14m1.97 3.78h1.4a.13.13 0 0 0 .14-.13V5.91q-.01-.12-.13-.14H9.32q-.1.01-.12.14v1.32q.01.13.12.13\\" opacity=\\".5\\"/>\\n</svg>","eslint":"<svg viewBox=\\"0 0 16 16\\">\\n <path fill=\\"currentColor\\" d=\\"M11.16 6.1 8.12 4.35a.3.3 0 0 0-.24 0L4.84 6.1a.3.3 0 0 0-.12.2v3.5q0 .14.12.22l3.04 1.74q.12.08.24 0l3.04-1.74a.2.2 0 0 0 .13-.22V6.3a.3.3 0 0 0-.13-.2\\" opacity=\\".5\\"/>\\n <path fill=\\"currentColor\\" d=\\"m.1 7.69 3.63-6.3A.8.8 0 0 1 4.37 1h7.26c.26 0 .5.17.64.4l3.63 6.27a.8.8 0 0 1 0 .75l-3.63 6.24a.7.7 0 0 1-.64.34H4.37a.7.7 0 0 1-.64-.34L.1 8.41a.7.7 0 0 1 0-.72m3 3.02q.01.15.14.23l4.63 2.66q.13.06.26 0l4.63-2.66a.3.3 0 0 0 .14-.23V5.4a.3.3 0 0 0-.14-.23L8.13 2.52a.3.3 0 0 0-.26 0L3.24 5.17a.3.3 0 0 0-.14.23z\\"/>\\n</svg>","graphql":"<svg viewBox=\\"0 0 16 16\\">\\n <path fill=\\"currentColor\\" fill-rule=\\"evenodd\\" d=\\"M8 1a1.25 1.25 0 0 1 1.18 1.65l2.8 1.61q.33-.25.77-.26a1.25 1.25 0 0 1 .48 2.4v3.2a1.25 1.25 0 1 1-1.25 2.13l-2.8 1.62A1.25 1.25 0 0 1 8 15a1.25 1.25 0 0 1-1.18-1.65l-2.8-1.62q-.33.26-.77.27a1.25 1.25 0 0 1-.48-2.4V6.4a1.25 1.25 0 1 1 1.25-2.14l2.8-1.61A1.25 1.25 0 0 1 8 1M4.44 11.14l-.06.13 2.75 1.58a1.25 1.25 0 0 1 1.74 0l2.74-1.58-.05-.13zm3.89-7.68a1.3 1.3 0 0 1-.66 0L4.03 9.77q.37.3.45.78h7.04q.08-.48.45-.78zM4.38 4.73a1.24 1.24 0 0 1-1.02 1.76v3.02l.13.01 3.67-6.35-.03-.02zm4.46-1.56 3.67 6.35.13-.01V6.49a1.25 1.25 0 0 1-1.03-1.76L8.87 3.15z\\" clip-rule=\\"evenodd\\"/>\\n</svg>","nextjs":"<svg viewBox=\\"0 0 16 16\\">\\n <defs>\\n <linearGradient id=\\"a\\" x1=\\"4.522\\" x2=\\"14\\" y1=\\"3.943\\" y2=\\"16\\" gradientUnits=\\"userSpaceOnUse\\">\\n <stop stop-color=\\"currentColor\\"/>\\n <stop offset=\\"1\\" stop-color=\\"currentColor\\" stop-opacity=\\"0\\"/>\\n </linearGradient>\\n </defs>\\n <path fill=\\"currentColor\\" d=\\"M3 2h1.522v9.09H3z\\"/>\\n <path fill=\\"url(#a)\\" d=\\"M4.903 2 15 15.075q-.565.5-1.195.925L4.522 3.943z\\"/>\\n <path fill=\\"currentColor\\" d=\\"M12.172 2h-1.508v9.094h1.508z\\"/>\\n</svg>","npm":"<svg viewBox=\\"0 0 16 16\\">\\n <path fill=\\"currentColor\\" d=\\"M2 1a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V2a1 1 0 0 0-1-1z\\" class=\\"vector\\" opacity=\\".2\\"/>\\n <path fill=\\"currentColor\\" d=\\"M10.5 13H13V3H3v10h5V5.5h2.5z\\"/>\\n</svg>","oxc":"<svg viewBox=\\"0 0 16 16\\">\\n <path fill=\\"currentColor\\" d=\\"M9.5 1a.5.5 0 0 1 .5.5V3h3.5a.5.5 0 0 1 .38.83L10.5 7.69v1.44q.41.04.95-.16a4 4 0 0 0 .72-.35l.04-.03h.01a.5.5 0 0 1 .67.1l2 2.5a.5.5 0 0 1 0 .62c-.76.96-3.14 2.69-6.89 2.69s-6.13-1.73-6.89-2.69a.5.5 0 0 1 0-.62l2-2.5a.5.5 0 0 1 .67-.1l.05.03.16.09q.22.13.56.26.54.2.95.16V7.69L2.12 3.83A.5.5 0 0 1 2.5 3H6V1.5a.5.5 0 0 1 .5-.5zM7 3.5a.5.5 0 0 1-.5.5H3.6l2.78 3.17a.5.5 0 0 1 .12.33v2a.5.5 0 0 1-.28.45c-.7.35-1.5.15-2.02-.05a5 5 0 0 1-.58-.26l-1.46 1.84c.82.78 2.8 2.02 5.84 2.02s5.02-1.24 5.84-2.02l-1.46-1.83a5 5 0 0 1-.58.26c-.52.2-1.33.39-2.02.04a.5.5 0 0 1-.28-.45v-2a.5.5 0 0 1 .12-.33L12.4 4H9.5a.5.5 0 0 1-.5-.5V2H7z\\"/>\\n</svg>","postcss":"<svg viewBox=\\"0 0 16 16\\">\\n <path fill=\\"currentColor\\" d=\\"M14.5 8a6.5 6.5 0 0 0-5.9-6.47l5.42 8.93A7 7 0 0 0 14.5 8M2.88 12A6.5 6.5 0 0 0 8 14.5c2.08 0 3.93-.98 5.12-2.5zm8.62-1h1.68L11.5 8.24zm-1-.55a4 4 0 0 1-.7.55h.7zM8 5.5a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5M5.5 11h.7a4 4 0 0 1-.7-.55zm-2.68 0H4.5V8.24zm3.76-6.2A4 4 0 0 1 8 4.5q.76 0 1.42.3L8 2.46zM1.5 8q0 1.31.48 2.46L7.4 1.53A6.5 6.5 0 0 0 1.5 8m14 0a7.5 7.5 0 0 1-.99 3.72l-.01.03-.02.03A7.5 7.5 0 0 1 8 15.5a7.5 7.5 0 0 1-6.5-3.75l-.01-.03A7.5 7.5 0 1 1 15.5 8\\"/>\\n</svg>","prettier":"<svg viewBox=\\"0 0 16 16\\">\\n <path fill=\\"currentColor\\" d=\\"M6 12v1H4.93v-1zm1-2v1H2v-1zm6-4v1h-3V6zm-1-4v1H9V2z\\"/>\\n <path fill=\\"currentColor\\" d=\\"M11.5 10v1H8v-1zM5 6v1H2V6zm5-2v1H9V4z\\" opacity=\\".8\\"/>\\n <path fill=\\"currentColor\\" d=\\"M6 14v1H2v-1zm-.5-6v1H2V8zM13 4v1h-3V4zM4.93 2v1H2V2z\\" opacity=\\".6\\"/>\\n <path fill=\\"currentColor\\" d=\\"M4.93 12v1H2v-1zM13 8v1H9V8zM5.5 4v1H2V4zM9 2v1H4.93V2z\\" opacity=\\".4\\"/>\\n</svg>","react":"<svg viewBox=\\"0 0 16 16\\">\\n <path fill=\\"currentColor\\" d=\\"M8 6.65c.73 0 1.31.6 1.31 1.35S8.73 9.35 8 9.35 6.69 8.75 6.69 8 7.27 6.65 8 6.65\\"/>\\n <path fill=\\"currentColor\\" fill-rule=\\"evenodd\\" d=\\"M8 2.55c1.3-.99 2.59-1.34 3.5-.8.92.55 1.27 1.87 1.08 3.53C14.06 5.94 15 6.9 15 8s-.94 2.06-2.42 2.72c.19 1.65-.16 2.98-1.08 3.52-.91.55-2.2.2-3.5-.8-1.3 1-2.58 1.35-3.5.8-.91-.54-1.27-1.87-1.08-3.52C1.94 10.06 1 9.1 1 8s.94-2.06 2.42-2.72c-.19-1.66.17-2.98 1.08-3.52s2.2-.2 3.5.8M4.26 11.2c-.08 1.34.28 2.03.68 2.26s1.15.22 2.25-.52l.11-.09a12 12 0 0 1-1.24-1.39 11 11 0 0 1-1.8-.41zm7.47-.15q-.83.27-1.79.41-.6.8-1.24 1.4l.11.08c1.1.74 1.86.76 2.25.52.4-.23.76-.92.68-2.26zm-3.04.54a14 14 0 0 1-1.38 0q.34.38.69.7.35-.32.7-.7M8 5.29q-.76 0-1.47.1A13 13 0 0 0 5.07 8a14 14 0 0 0 1.46 2.62 13 13 0 0 0 2.94 0A13 13 0 0 0 10.93 8a14 14 0 0 0-1.46-2.62A13 13 0 0 0 8 5.3M4.64 9.18q-.15.5-.25.96.44.16.94.27a15 15 0 0 1-.7-1.23m6.73 0a15 15 0 0 1-.7 1.23q.5-.11.95-.27a10 10 0 0 0-.25-.96M3.44 6.26C2.27 6.86 1.87 7.53 1.87 8s.4 1.14 1.57 1.74l.13.07q.18-.88.55-1.81a12 12 0 0 1-.55-1.8q-.07.02-.13.06m8.99-.07A12 12 0 0 1 11.88 8q.36.94.55 1.8l.13-.06c1.17-.6 1.56-1.27 1.56-1.74s-.39-1.14-1.56-1.74zm-7.1-.6q-.5.11-.94.27.1.46.25.96a15 15 0 0 1 .69-1.23m5.34 0a15 15 0 0 1 .7 1.23q.14-.5.24-.96-.44-.15-.94-.27M7.18 3.06c-1.09-.74-1.85-.76-2.24-.52s-.76.92-.69 2.26l.01.15a11 11 0 0 1 1.8-.41q.6-.8 1.24-1.4zm3.88-.52c-.4-.24-1.15-.22-2.25.52l-.12.08q.65.6 1.25 1.4.96.15 1.8.41v-.14c.08-1.35-.28-2.04-.68-2.27M8 3.7a10 10 0 0 0-.7.7 14 14 0 0 1 1.4 0 10 10 0 0 0-.7-.7\\" clip-rule=\\"evenodd\\"/>\\n</svg>","sass":"<svg viewBox=\\"0 0 16 16\\">\\n <path fill=\\"currentColor\\" fill-rule=\\"evenodd\\" d=\\"M8.08 1.44c2.41-.91 4.96-.37 5.35 1.27.39 1.62-.92 3.56-2.6 4.25a5 5 0 0 1-3.26.35c-.58-.2-.92-.62-1-.85-.03-.09-.09-.24 0-.3.05-.03.08-.02.22.15s.7.6 1.75.48c2.78-.34 4.45-2.64 3.92-3.88-.37-.87-2.5-1.26-5.18.16C4.03 4.81 3.85 6.24 3.82 6.8c-.08 1.5 1.73 2.28 2.7 3.4q.04.03.07.08c.3-.12.7-.19 1.35-.2 1.58-.03 2.47 1.08 2.43 2.08-.03.78-.7 1.1-.82 1.13-.1.01-.14.02-.15-.06q-.03-.06.13-.15c.16-.09.42-.3.48-.72.05-.43-.24-1.44-1.76-1.63a3 3 0 0 0-1.33.08c.27.62.32 1.87-.29 2.83-.63 1-1.8 1.61-2.93 1.27-.37-.1-.93-.92-.45-2.05.46-1.07 2.4-2.12 2.66-2.26-.9-.83-3.08-1.95-3.4-3.65-.08-.49.13-1.65 1.46-2.98a12 12 0 0 1 4.11-2.52m-1.88 9.7c-.01.01-.9.47-1.52 1.17-.59.66-.75 1.48-.43 1.69.3.18 1-.04 1.51-.62a3 3 0 0 0 .5-.9q.2-.64.02-1.39z\\" clip-rule=\\"evenodd\\"/>\\n</svg>","stylelint":"<svg viewBox=\\"0 0 16 16\\">\\n <path fill=\\"currentColor\\" d=\\"M4 3v3.5l1.5-1L7 15 .5 6l1-1.5L0 3l2.5-2h1zm12 0-1.5 1.5 1 1.5L9 15l1.5-9.5 1.5 1V3l.5-2h1zm-8 8.5a.5.5 0 1 1 0 1 .5.5 0 0 1 0-1m0-3a.5.5 0 1 1 0 1 .5.5 0 0 1 0-1m0-3a.5.5 0 1 1 0 1 .5.5 0 0 1 0-1\\"/>\\n <path fill=\\"currentColor\\" d=\\"M6.5 2.5V4l-2 1.5v-4zm5 3L9.5 4V2.5l2-1zM9 4H7V2.5h2z\\"/>\\n</svg>","svelte":"<svg viewBox=\\"0 0 16 16\\">\\n <path fill=\\"currentColor\\" d=\\"m3.98 3.7 3.36-2.08a4.5 4.5 0 0 1 5.9 1.23 4 4 0 0 1 .7 3.02q-.16.75-.58 1.4c.42.77.56 1.66.4 2.52a3.7 3.7 0 0 1-1.57 2.4l-.17.1-3.36 2.09a4.5 4.5 0 0 1-5.9-1.23 4 4 0 0 1-.66-1.44 4 4 0 0 1-.04-1.58 4 4 0 0 1 .58-1.4 4 4 0 0 1-.4-2.52 3.7 3.7 0 0 1 1.57-2.4zl3.36-2.08zm7.87 0a2.7 2.7 0 0 0-1.26-.95 2.7 2.7 0 0 0-1.6-.07 3 3 0 0 0-.52.2l-.16.09-3.36 2.08a2 2 0 0 0-.69.64 2 2 0 0 0-.36.86 2.3 2.3 0 0 0 .42 1.81A2.7 2.7 0 0 0 7.18 9.4q.28-.06.53-.2l.16-.09 1.28-.79.2-.09a.8.8 0 0 1 .87.31.7.7 0 0 1 .13.55.7.7 0 0 1-.24.4l-.08.05-3.36 2.08-.2.09a1 1 0 0 1-.49-.02 1 1 0 0 1-.38-.3 1 1 0 0 1-.13-.37v-.1l.01-.13-.13-.03a4 4 0 0 1-1.1-.5l-.2-.14-.18-.12-.07.18-.08.3a2.3 2.3 0 0 0 .43 1.82q.45.64 1.19.93.73.28 1.51.14l.16-.04q.27-.07.52-.2l.16-.09 3.36-2.08q.4-.25.69-.64.27-.4.36-.86a2.3 2.3 0 0 0-.42-1.82 2.7 2.7 0 0 0-1.27-.95 2.7 2.7 0 0 0-1.6-.08q-.27.07-.52.2l-.16.1-1.28.79-.2.09a1 1 0 0 1-.49-.03 1 1 0 0 1-.38-.29.7.7 0 0 1-.13-.54.7.7 0 0 1 .24-.4l.08-.06L9.33 4.4l.2-.1a.8.8 0 0 1 .87.32 1 1 0 0 1 .13.38v.22l.11.04q.6.18 1.12.5l.2.14.17.12.06-.19.08-.3a2.3 2.3 0 0 0-.42-1.81z\\"/>\\n</svg>","svg":"<svg viewBox=\\"0 0 16 16\\">\\n <path fill=\\"currentColor\\" d=\\"M5 7a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v6a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2z\\"/>\\n <path fill=\\"currentColor\\" d=\\"M6 1a5 5 0 0 1 4.58 3H7a3 3 0 0 0-3 3v3.58A5 5 0 0 1 6 1\\" opacity=\\".5\\"/>\\n</svg>","svgo":"<svg viewBox=\\"0 0 16 16\\">\\n <path fill=\\"currentColor\\" d=\\"M9.43 4.8A.6.6 0 1 1 9.19 6l-.56.96a1.2 1.2 0 0 1 .32 1.58l.7.53a.89.89 0 1 1-.17.22l-.7-.52a1.2 1.2 0 0 1-1.4.25l-.56.87a.75.75 0 1 1-.57-.2 1 1 0 0 1 .32.05l.56-.87a1.2 1.2 0 0 1-.4-1.24l-1.2-.47a.56.56 0 1 1 .1-.28v.02l1.2.47a1.2 1.2 0 0 1 1.56-.55l.56-.97a.6.6 0 0 1-.15-.64.6.6 0 0 1 .63-.4\\"/>\\n <path fill=\\"currentColor\\" fill-rule=\\"evenodd\\" d=\\"M9.17 1q.16.63.27 1.26a6 6 0 0 1 1.61.67q.52-.38 1.08-.71l1.65 1.64q-.32.56-.68 1.05.48.78.72 1.67.6.09 1.18.25v2.32q-.55.15-1.11.24a6 6 0 0 1-.7 1.82q.31.44.59.91l-1.65 1.65-.85-.55a6 6 0 0 1-1.9.83q-.08.47-.2.95H6.84q-.12-.46-.2-.93a6 6 0 0 1-1.96-.81q-.39.27-.8.51l-1.65-1.65q.25-.43.53-.84a6 6 0 0 1-.75-1.9L1 9.16V6.83q.54-.14 1.09-.24a6 6 0 0 1 .77-1.74q-.33-.47-.63-.98l1.65-1.65q.54.32 1.03.68a6 6 0 0 1 1.66-.66q.1-.61.26-1.24zM7.96 3.73a4 4 0 0 0-1.74.36 4.5 4.5 0 0 0-2.3 2.3 4.4 4.4 0 0 0-.1 3.29l.03.06a4.4 4.4 0 0 0 2.4 2.47 4.4 4.4 0 0 0 3.48-.02l.03-.02a4.4 4.4 0 0 0 2.3-2.42l.06-.14a4.4 4.4 0 0 0-.2-3.4 4.4 4.4 0 0 0-2.13-2.07L9.47 4a4 4 0 0 0-1.51-.27\\" clip-rule=\\"evenodd\\"/>\\n</svg>","tailwind":"<svg viewBox=\\"0 0 16 16\\">\\n <path fill=\\"currentColor\\" fill-rule=\\"evenodd\\" d=\\"M8 4Q5.2 4 4.5 6.67q1.05-1.34 2.45-1c.53.12.91.5 1.33.9C8.98 7.23 9.77 8 11.5 8q2.8 0 3.5-2.67-1.05 1.34-2.45 1c-.53-.12-.91-.5-1.33-.9C10.52 4.77 9.73 4 8 4M4.5 8Q1.7 8 1 10.67q1.05-1.34 2.45-1c.53.12.91.5 1.33.9C5.48 11.23 6.26 12 8 12q2.8 0 3.5-2.67-1.05 1.34-2.45 1c-.53-.12-.91-.5-1.33-.9C7.02 8.77 6.24 8 4.5 8\\" clip-rule=\\"evenodd\\"/>\\n</svg>","terraform":"<svg viewBox=\\"0 0 16 16\\">\\n <path fill=\\"currentColor\\" d=\\"M1 0v5.05l4.35 2.53V2.53zm9.18 5.34L5.83 2.82v5.05l4.35 2.53zm.47 5.06V5.34L15 2.82v5.05zm-.48 5.6-4.35-2.53V8.42l4.35 2.53z\\"/>\\n</svg>","vite":"<svg viewBox=\\"0 0 16 16\\">\\n <path fill=\\"currentColor\\" d=\\"M8.57 14.87c-.18.26-.55.11-.55-.22v-3.18l-.05-.27-.13-.22-.2-.15-.24-.06H4.29c-.26 0-.4-.32-.26-.55L6.08 7c.3-.46 0-1.1-.5-1.1H1.8c-.25 0-.4-.32-.25-.56l2.65-4.2A.3.3 0 0 1 4.46 1h7.9c.26 0 .4.32.26.55l-2.05 3.23c-.29.46 0 1.1.5 1.1h3.12c.26 0 .4.34.24.57z\\"/>\\n</svg>","vscode":"<svg viewBox=\\"0 0 16 16\\">\\n <path fill=\\"currentColor\\" d=\\"m5.11 9.68-2.4 1.84a.6.6 0 0 1-.75-.04l-.77-.7a.6.6 0 0 1 0-.87L3.28 8zm5.52-8.42a.51.51 0 0 1 .87.36V4.8L7.32 8 5.1 6.32z\\" opacity=\\".75\\"/>\\n <path fill=\\"currentColor\\" d=\\"M11.1 14.99h.03zM1.96 4.52a.6.6 0 0 1 .75-.04l8.8 6.71v3.19a.51.51 0 0 1-.88.36L1.19 6.1a.6.6 0 0 1 0-.87z\\" opacity=\\".65\\"/>\\n <path fill=\\"currentColor\\" d=\\"M11.62 14.91a.9.9 0 0 1-1-.17.51.51 0 0 0 .88-.36V1.62a.51.51 0 0 0-.87-.36.9.9 0 0 1 1-.17l2.87 1.39a.9.9 0 0 1 .5.8v9.44a.9.9 0 0 1-.5.8z\\"/>\\n</svg>","vue":"<svg viewBox=\\"0 0 16 16\\">\\n <path fill=\\"currentColor\\" d=\\"M9.62 2.25 8 5.02 6.38 2.25H1l7 12 7-12z\\" opacity=\\".5\\"/>\\n <path fill=\\"currentColor\\" d=\\"M9.54 2.25 8 4.95l-1.54-2.7H4l4 7 4-7z\\"/>\\n</svg>","wasm":"<svg viewBox=\\"0 0 16 16\\">\\n <path fill=\\"currentColor\\" d=\\"M13 1a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V3a2 2 0 0 1 2-2h3a2 2 0 1 0 4 0z\\" class=\\"subtract\\" opacity=\\".2\\"/>\\n <path fill=\\"currentColor\\" d=\\"M4.64 11.4h.02l.8-3.4h.91l.73 3.45L7.88 8h.96l-1.25 5h-.97L5.9 9.6 5.1 13h-1L3 8h.98z\\"/>\\n <path fill=\\"currentColor\\" fill-rule=\\"evenodd\\" d=\\"M13 13h-1.02l-.33-1.11H9.9L9.64 13h-.97l1.26-5h1.54zm-2.49-3.77-.42 1.84h1.32l-.49-1.84z\\" clip-rule=\\"evenodd\\"/>\\n</svg>","webpack":"<svg viewBox=\\"0 0 16 16\\">\\n <path fill=\\"currentColor\\" d=\\"M14.1 11.79 8.26 15v-2.5l3.64-1.94zm.4-.35V4.73l-2.14 1.2v4.3zm-12.6.35L7.74 15v-2.5L4.1 10.56zm-.4-.35V4.73l2.14 1.2v4.3zm.25-7.15 6-3.29v2.42L3.9 5.47l-.03.01zm12.5 0L8.25 1v2.42l3.85 2.05.03.01z\\" class=\\"bg\\" opacity=\\".4\\"/>\\n <path fill=\\"currentColor\\" d=\\"m7.74 11.93-3.59-1.92v-3.8l3.6 2.02zm.52 0 3.59-1.92v-3.8l-3.6 2.02zM4.4 5.77 8 3.85l3.6 1.93L8 7.8z\\" class=\\"fg\\"/>\\n</svg>","yml":"<svg viewBox=\\"0 0 16 16\\">\\n <path fill=\\"currentColor\\" d=\\"M7.5 2A1.5 1.5 0 0 1 9 3.5v3A1.5 1.5 0 0 1 7.5 8h-2v2A1.5 1.5 0 0 0 7 11.5v-1A1.5 1.5 0 0 1 8.5 9h5a1.5 1.5 0 0 1 1.5 1.5v3a1.5 1.5 0 0 1-1.5 1.5h-5A1.5 1.5 0 0 1 7 13.5v-1A2.5 2.5 0 0 1 4.5 10V8h-2A1.5 1.5 0 0 1 1 6.5v-3A1.5 1.5 0 0 1 2.5 2zm1 8a.5.5 0 0 0-.5.5v3a.5.5 0 0 0 .5.5h5a.5.5 0 0 0 .5-.5v-3a.5.5 0 0 0-.5-.5zm-6-7a.5.5 0 0 0-.5.5v3a.5.5 0 0 0 .5.5h5a.5.5 0 0 0 .5-.5v-3a.5.5 0 0 0-.5-.5z\\"/>\\n</svg>","zig":"<svg viewBox=\\"0 0 16 16\\">\\n <path fill=\\"currentColor\\" d=\\"m14.73 1.5-7.29 8.82h4.17l-1.73 2.04H5.76L1.27 14.5l7.3-8.91H4.39l1.73-2.05h4.12z\\"/>\\n <path fill=\\"currentColor\\" d=\\"M5.21 3.54 3.56 5.6h-.55v4.73h.83L2.1 12.36H1V3.54zm9.79 0v8.82h-4.3l1.74-2.04h.55V5.68h-.83l1.74-2.14z\\"/>\\n</svg>"}`),colors:{default:{light:`#84848a`,dark:`#adadb1`},astro:{light:`#a631be`,dark:`#d568ea`},babel:{light:`#d5a910`,dark:`#ffd452`},bash:{light:`#199f43`,dark:`#5ecc71`},biome:{light:`#1a85d4`,dark:`#69b1ff`},bootstrap:{light:`#693acf`,dark:`#9d6afb`},browserslist:{light:`#d5a910`,dark:`#ffd452`},bun:{light:`#594c5b`,dark:`#79697b`},c:{light:`#1a85d4`,dark:`#69b1ff`},cpp:{light:`#1a85d4`,dark:`#69b1ff`},claude:{light:`#d47628`,dark:`#ffa359`},css:{light:`#693acf`,dark:`#9d6afb`},database:{light:`#a631be`,dark:`#d568ea`},docker:{light:`#1a85d4`,dark:`#69b1ff`},eslint:{light:`#693acf`,dark:`#9d6afb`},git:{light:`#ff8c5b`,dark:`#d5512f`},go:{light:`#1ca1c7`,dark:`#68cdf2`},graphql:{light:`#d32a61`,dark:`#ff678d`},html:{light:`#d47628`,dark:`#ffa359`},image:{light:`#d32a61`,dark:`#ff678d`},javascript:{light:`#d5a910`,dark:`#ffd452`},json:{light:`#d47628`,dark:`#ffa359`},markdown:{light:`#199f43`,dark:`#5ecc71`},mcp:{light:`#17a5af`,dark:`#64d1db`},npm:{light:`#d52c36`,dark:`#ff6762`},oxc:{light:`#1ca1c7`,dark:`#68cdf2`},postcss:{light:`#d52c36`,dark:`#ff6762`},prettier:{light:`#17a5af`,dark:`#64d1db`},python:{light:`#1a85d4`,dark:`#69b1ff`},react:{light:`#1ca1c7`,dark:`#68cdf2`},ruby:{light:`#d52c36`,dark:`#ff6762`},rust:{light:`#d47628`,dark:`#ffa359`},sass:{light:`#d32a61`,dark:`#ff678d`},svg:{light:`#d47628`,dark:`#ffa359`},svelte:{light:`#d52c36`,dark:`#ff6762`},svgo:{light:`#199f43`,dark:`#5ecc71`},swift:{light:`#d47628`,dark:`#ffa359`},table:{light:`#17a5af`,dark:`#64d1db`},text:{light:`#84848a`,dark:`#adadb1`},tailwind:{light:`#1ca1c7`,dark:`#68cdf2`},terraform:{light:`#693acf`,dark:`#9d6afb`},typescript:{light:`#1a85d4`,dark:`#69b1ff`},vite:{light:`#a631be`,dark:`#d568ea`},vscode:{light:`#1a85d4`,dark:`#69b1ff`},vue:{light:`#199f43`,dark:`#5ecc71`},wasm:{light:`#693acf`,dark:`#9d6afb`},webpack:{light:`#1a85d4`,dark:`#69b1ff`},yml:{light:`#d52c36`,dark:`#ff6762`},zig:{light:`#d47628`,dark:`#ffa359`},zip:{light:`#d47628`,dark:`#ffa359`},stylelint:{light:`#84848a`,dark:`#adadb1`},nextjs:{light:`#84848a`,dark:`#adadb1`},font:{light:`#84848a`,dark:`#adadb1`}}},Br={byFileName:Object.fromEntries(Object.entries(zr.names).map(([e,t])=>[e,{name:`file-tree-builtin-${t}`,token:t}])),byFileExtension:Object.fromEntries(Object.entries(zr.extensions).map(([e,t])=>[e,{name:`file-tree-builtin-${t}`,token:t}]))};new Map(Object.entries(zr.names)),new Map(Object.entries(zr.extensions)),zr.symbols;var Vr=zr.colors,Hr=`diffs-container`,Ur=(()=>{try{return!1}catch{return!1}})(),Wr=/(?=^From [a-f0-9]+ .+$)/m,Gr=/(?=^diff --git)/gm,Kr=/(?<=\n)/,qr=/^(---|\+\+\+)\s+([^\t\r\n]+)/,Jr=/^index ([0-9a-f]+)\.\.([0-9a-f]+)(?: (\d+))?$/i,Yr=`header-prefix`,Xr=`header-filename-suffix`,Zr=`header-metadata`,Qr=`header-custom`,$r={dark:`pierre-dark`,light:`pierre-light`},ei=`data-theme-css`,ti=`data-unsafe-css`,ni=`data-diffs-scrollbar-measure`,ri=`data-diffs-code-view-header`,ii=`data-diffs-code-view-footer`,ai=`--diffs-scrollbar-gutter-measured`,oi=1e5,si={hunkLineCount:50,lineHeight:20,diffHeaderHeight:44,spacing:8},ci={...si,hunkLineCount:1},li={paddingTop:8,paddingBottom:8,gap:8},ui={omega:.015,positionEpsilon:.5,velocityEpsilon:.05},di=Object.freeze({fromStart:0,fromEnd:0}),fi={startingLine:0,totalLines:1/0,bufferBefore:0,bufferAfter:0},pi=Object.freeze([]),mi={startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:0};function hi({name:e=`css-variables`,variablePrefix:t=`--diffs-`,variableDefaults:n={},fontStyle:r=!0}={}){let i=e=>{let r=n[e];return`var(${t}${e}${r!=null&&r!==``?`, ${r}`:``})`},a=i(`foreground`),o=i(`background`),s={"editor.foreground":a,"editor.background":o};for(let e of[`black`,`red`,`green`,`yellow`,`blue`,`magenta`,`cyan`,`white`]){let t=e[0].toUpperCase()+e.slice(1);s[`terminal.ansi${t}`]=i(`ansi-${e}`),s[`terminal.ansiBright${t}`]=i(`ansi-bright-${e}`)}let c={comment:`token-comment`,string:`token-string-expression`,"string.escape":`token-constant`,"text.literal":`token-string`,keyword:`token-keyword`,operator:`token-keyword`,preproc:`token-keyword`,boolean:`token-constant`,number:`token-constant`,constant:`token-constant`,property:`token-constant`,"property.json_key":`token-keyword`,"variable.special":`token-constant`,"variable.parameter":`token-parameter`,function:`token-function`,constructor:`token-function`,type:`token-function`,attribute:`token-function`,tag:`token-string-expression`,punctuation:`token-punctuation`,link_text:`token-link`,link_uri:`token-link`,"diff.plus":`token-inserted`,"diff.minus":`token-deleted`};return r&&(c.emphasis={font_style:`italic`},c[`emphasis.strong`]={font_weight:700},c.title={font_weight:700}),{name:e,type:`dark`,fg:a,bg:o,colors:s,cssVariables:{name:e,variablePrefix:t,variableDefaults:n,fontStyle:r},zed:{name:e,appearance:`dark`,cssVariables:{prefix:t,defaults:n},style:{"editor.foreground":`foreground`,"editor.background":`background`,syntax:c}}}}function gi(e,t,n=`textmate`){let r=sn.get(e)??{};r[n]==null?(r[n]=t,sn.set(e,r)):console.error(`SharedHighlight.registerCustomTheme: theme name and type already registered`,e,n)}function _i(e,t,n=!1){let r=hi({name:e,variablePrefix:cn(`global`),variableDefaults:t,fontStyle:n});gi(e,()=>Promise.resolve(r),`diffs`)}function vi(){try{return new WebAssembly.Module(Uint8Array.of(0,97,115,109,1,0,0,0)),`highlights`}catch{return`shiki-js`}}var yi=vi(),bi=`porcelain-review`;_i(bi,{});var xi={light:bi,dark:bi},Si=`
|
|
2
|
+
[data-diffs-header] {
|
|
3
|
+
min-height: calc(var(--spacing) * 10);
|
|
4
|
+
padding-inline: calc(var(--spacing) * 2) calc(var(--spacing) * 1.5);
|
|
5
|
+
border: 1px solid var(--border);
|
|
6
|
+
border-radius: var(--radius-lg) var(--radius-lg) 0 0;
|
|
7
|
+
background: var(--muted);
|
|
8
|
+
}
|
|
9
|
+
[data-diffs-header] [data-change-icon] {
|
|
10
|
+
display: none;
|
|
11
|
+
}
|
|
12
|
+
[data-diffs-header] [data-title] {
|
|
13
|
+
font-family: var(--font-mono);
|
|
14
|
+
font-size: var(--text-caption);
|
|
15
|
+
font-weight: 500;
|
|
16
|
+
line-height: calc(var(--spacing) * 4);
|
|
17
|
+
color: var(--foreground);
|
|
18
|
+
}
|
|
19
|
+
[data-diffs-header] [data-deletions-count],
|
|
20
|
+
[data-diffs-header] [data-additions-count] {
|
|
21
|
+
font-family: var(--font-mono);
|
|
22
|
+
font-size: var(--text-xs);
|
|
23
|
+
font-weight: 500;
|
|
24
|
+
line-height: calc(var(--spacing) * 4);
|
|
25
|
+
}
|
|
26
|
+
[data-diffs-header] [data-deletions-count] {
|
|
27
|
+
color: var(--del-fg);
|
|
28
|
+
}
|
|
29
|
+
[data-diffs-header] [data-additions-count] {
|
|
30
|
+
color: var(--add-fg);
|
|
31
|
+
}
|
|
32
|
+
pre {
|
|
33
|
+
border: 1px solid var(--border);
|
|
34
|
+
border-top: 0;
|
|
35
|
+
border-radius: 0 0 var(--radius-lg) var(--radius-lg);
|
|
36
|
+
}
|
|
37
|
+
`,Ci=`
|
|
38
|
+
:host {
|
|
39
|
+
--diffs-font-size: var(--text-caption);
|
|
40
|
+
--diffs-line-height: calc(var(--spacing) * 5.5);
|
|
41
|
+
--diffs-fg-number-addition-override: var(--muted-foreground);
|
|
42
|
+
--diffs-fg-number-deletion-override: var(--muted-foreground);
|
|
43
|
+
--diffs-min-number-column-width: calc(var(--spacing) * 4.5);
|
|
44
|
+
--diffs-gap-style: calc(var(--spacing) * .5) solid transparent;
|
|
45
|
+
}
|
|
46
|
+
[data-diffs-header] [data-deletions-count],
|
|
47
|
+
[data-diffs-header] [data-additions-count] {
|
|
48
|
+
display: none;
|
|
49
|
+
}
|
|
50
|
+
[data-code] {
|
|
51
|
+
padding-block: 0;
|
|
52
|
+
scrollbar-gutter: auto;
|
|
53
|
+
}
|
|
54
|
+
pre {
|
|
55
|
+
overflow: hidden;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
[data-diffs-header] {
|
|
59
|
+
min-height: calc(var(--spacing) * 10.25);
|
|
60
|
+
padding-inline: calc(var(--spacing) * 2);
|
|
61
|
+
}
|
|
62
|
+
[data-diffs-header] [data-change-icon] {
|
|
63
|
+
display: none;
|
|
64
|
+
}
|
|
65
|
+
[data-diffs-header] [data-title] {
|
|
66
|
+
font-family: var(--font-mono);
|
|
67
|
+
font-size: var(--text-caption);
|
|
68
|
+
font-weight: 500;
|
|
69
|
+
line-height: calc(var(--spacing) * 4);
|
|
70
|
+
color: var(--foreground);
|
|
71
|
+
}
|
|
72
|
+
[data-diffs-header] [data-deletions-count],
|
|
73
|
+
[data-diffs-header] [data-additions-count] {
|
|
74
|
+
font-family: var(--font-mono);
|
|
75
|
+
font-size: var(--text-xs);
|
|
76
|
+
font-weight: 500;
|
|
77
|
+
line-height: calc(var(--spacing) * 4);
|
|
78
|
+
}
|
|
79
|
+
[data-diffs-header] [data-deletions-count] {
|
|
80
|
+
color: var(--del-fg);
|
|
81
|
+
}
|
|
82
|
+
[data-diffs-header] [data-additions-count] {
|
|
83
|
+
color: var(--add-fg);
|
|
84
|
+
}
|
|
85
|
+
`,wi=`
|
|
86
|
+
@media (max-width: 720px) {
|
|
87
|
+
[data-header-content] {
|
|
88
|
+
flex: 1 1 auto;
|
|
89
|
+
min-width: 6rem;
|
|
90
|
+
overflow: hidden;
|
|
91
|
+
}
|
|
92
|
+
[data-metadata] {
|
|
93
|
+
flex: 0 1 auto;
|
|
94
|
+
min-width: 0;
|
|
95
|
+
overflow: hidden;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
`,Ti=`
|
|
99
|
+
[data-diffs-header] {
|
|
100
|
+
padding-inline: calc(var(--spacing) * 4);
|
|
101
|
+
}
|
|
102
|
+
pre {
|
|
103
|
+
margin-inline: calc(var(--spacing) * 4);
|
|
104
|
+
border-radius: var(--radius-md);
|
|
105
|
+
}
|
|
106
|
+
`,Ei=`
|
|
107
|
+
:host {
|
|
108
|
+
--diffs-light-bg: var(--card) !important;
|
|
109
|
+
--diffs-dark-bg: var(--card) !important;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
[data-line-type='change-addition'] {
|
|
113
|
+
--diffs-computed-diff-line-bg: var(--add-bg);
|
|
114
|
+
}
|
|
115
|
+
[data-line-type='change-deletion'] {
|
|
116
|
+
--diffs-computed-diff-line-bg: var(--del-bg);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
::selection {
|
|
120
|
+
background: color-mix(in oklab, var(--foreground) 14%, transparent);
|
|
121
|
+
color: inherit;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
* {
|
|
125
|
+
scrollbar-width: thin;
|
|
126
|
+
scrollbar-color: var(--border) transparent;
|
|
127
|
+
}
|
|
128
|
+
`;function Di(e,t={}){return{preferredHighlighter:yi,theme:xi,themeType:e,overflow:t.overflow??`scroll`,disableFileHeader:!0,unsafeCSS:Ei}}function Oi(e){let n=ge;for(let r=0;r<e.length;r+=1)n^=e.charCodeAt(r),n=Math.imul(n,t);return n>>>1}var ki=`
|
|
129
|
+
[data-gutter] {
|
|
130
|
+
min-width: calc(var(--spacing) * 12);
|
|
131
|
+
}
|
|
132
|
+
[data-column-number] {
|
|
133
|
+
min-width: calc(var(--spacing) * 12);
|
|
134
|
+
padding-inline: 0 calc(var(--spacing) * 5);
|
|
135
|
+
}
|
|
136
|
+
[data-column-number] [data-line-number-content] {
|
|
137
|
+
margin-inline-end: 0;
|
|
138
|
+
}
|
|
139
|
+
[data-code] [data-line] {
|
|
140
|
+
padding-inline-start: calc(var(--spacing) * 2);
|
|
141
|
+
}
|
|
142
|
+
[data-code] {
|
|
143
|
+
padding-top: var(--spacing) !important;
|
|
144
|
+
}
|
|
145
|
+
`,Ai=`
|
|
146
|
+
[data-overflow='wrap'] [data-line] {
|
|
147
|
+
padding-inline-start: calc(0.5rem + 4ch);
|
|
148
|
+
text-indent: -4ch;
|
|
149
|
+
}
|
|
150
|
+
[data-overflow='wrap'] [data-line] > span {
|
|
151
|
+
display: inline-block;
|
|
152
|
+
max-width: 100%;
|
|
153
|
+
text-indent: 0;
|
|
154
|
+
overflow-wrap: anywhere;
|
|
155
|
+
}
|
|
156
|
+
`,ji=`
|
|
157
|
+
[data-line-number-content] { margin-inline-end: 18px; }
|
|
158
|
+
[data-utility-button] {
|
|
159
|
+
width: 16px;
|
|
160
|
+
height: 16px;
|
|
161
|
+
margin: 0;
|
|
162
|
+
border-radius: 4px;
|
|
163
|
+
background-color: var(--card);
|
|
164
|
+
color: var(--muted-foreground);
|
|
165
|
+
box-shadow: inset 0 0 0 1px var(--border);
|
|
166
|
+
}
|
|
167
|
+
[data-utility-button]:hover {
|
|
168
|
+
background-color: var(--accent);
|
|
169
|
+
color: var(--foreground);
|
|
170
|
+
}
|
|
171
|
+
[data-utility-button]:focus-visible {
|
|
172
|
+
outline: 2px solid var(--ring);
|
|
173
|
+
outline-offset: 1px;
|
|
174
|
+
}
|
|
175
|
+
@media (hover: hover) {
|
|
176
|
+
:host(:not(:hover)) [data-utility-button]:not(:focus-visible) {
|
|
177
|
+
opacity: 0;
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
`,Mi=Pe(dr),Ni=[`system`,`light`,`dark`],Pi=Kt(Ni);function Fi(e,t){return e===`system`?t?`dark`:`light`:e}function Ii(e){return Ni[(Ni.indexOf(e)+1)%Ni.length]??`system`}var Li={pullStrategy:`merge`,collapseSpecs:!1,archiveDeleteWorktree:!0,archiveDeleteLocalBranch:!0,archiveDeleteRemoteBranch:!1},Ri=`Changes & Git settings could not be read.`;function zi(e){return e instanceof Error&&(e.name===`ConnectionError`||e.name===`RequestError`)?`${Ri} ${e.message}`:Ri}function Bi(e){return e instanceof Error&&e.name===`RequestError`&&`status`in e&&e.status===404}function Vi(e){let{confirmed:t,failure:n}=e;return t===void 0?n===void 0?{kind:`reading`}:Bi(n.error)?{kind:`unsupported`}:{kind:`unreadable`,message:zi(n.error)}:t.kind===`unconfigured`?n===void 0?{kind:`unconfigured`}:{kind:`unreadable`,message:zi(n.error)}:{kind:`configured`,settings:t.settings,revision:t.revision,unreadable:n===void 0?void 0:zi(n.error)}}function Hi(e){return e.kind===`configured`&&e.unreadable===void 0?e.settings:void 0}function Ui(e){return e.kind===`unconfigured`?Li.pullStrategy:Hi(e)?.pullStrategy}function Wi(e,t){switch(e.kind){case`configured`:return e.settings;case`unconfigured`:return t;case`reading`:case`unsupported`:case`unreadable`:return}}function Gi(e,t){return e.pullStrategy!==t.pullStrategy||e.collapseSpecs!==t.collapseSpecs||e.archiveDeleteWorktree!==t.archiveDeleteWorktree||e.archiveDeleteLocalBranch!==t.archiveDeleteLocalBranch||e.archiveDeleteRemoteBranch!==t.archiveDeleteRemoteBranch}function Ki(e){return`${e} already had settings; yours weren’t used.`}function qi(e){return e===void 0?`Device trust could not be confirmed. Check again before changing Changes & Git settings.`:e?void 0:`An owner must trust this device on the computer that runs Porcelain before it can change Changes & Git settings.`}function Ji(e){return e.kind===`configured`&&e.settings.collapseSpecs}function Yi(e){switch(e.kind){case`reading`:return`Reading Changes & Git settings for this computer…`;case`unsupported`:return`Update Porcelain on this computer to use its Changes & Git settings.`;case`unreadable`:return e.message;case`unconfigured`:return`Choose Changes & Git settings for this computer in Settings first.`;case`configured`:return e.unreadable}}function Xi(e){return e instanceof Error&&e.message.length>0?e.message:`Changes & Git settings could not be saved. Try again.`}var Zi=m({commitModel:Oe.check(c(160)),appearance:Pi,diffStyle:Kt([`unified`,`split`]),lineOverflow:Kt([`scroll`,`wrap`]),documentsDefault:Kt([`rendered`,`source`]),reviewGitSettingsImportCandidate:Qt}),Qi={commitModel:``,appearance:`system`,diffStyle:`unified`,lineOverflow:`scroll`,documentsDefault:`rendered`,reviewGitSettingsImportCandidate:Li};function $i(e){let t=Qt.fields;return{pullStrategy:q(t.pullStrategy,e.pullStrategy,Li.pullStrategy),collapseSpecs:q(t.collapseSpecs,e.collapseSpecs,Li.collapseSpecs),archiveDeleteWorktree:q(t.archiveDeleteWorktree,e.archiveDeleteWorktree,Li.archiveDeleteWorktree),archiveDeleteLocalBranch:q(t.archiveDeleteLocalBranch,e.archiveDeleteLocalBranch,Li.archiveDeleteLocalBranch),archiveDeleteRemoteBranch:q(t.archiveDeleteRemoteBranch,e.archiveDeleteRemoteBranch,Li.archiveDeleteRemoteBranch)}}function q(e,t,n){return Ee(_(e)(t),()=>n)}var ea=Yt.pipe(y(Zi,oe({decode:e=>{let t=Ee(_($t(Oe,Yt))(e),()=>({}));return{commitModel:q(Zi.fields.commitModel,t.commitModel,Qi.commitModel),appearance:q(Zi.fields.appearance,`appearance`in t?t.appearance:t.theme,Qi.appearance),diffStyle:q(Zi.fields.diffStyle,t.diffStyle,Qi.diffStyle),lineOverflow:q(Zi.fields.lineOverflow,`lineOverflow`in t?t.lineOverflow:typeof t.wrapLongLines==`boolean`?t.wrapLongLines?`wrap`:`scroll`:void 0,Qi.lineOverflow),documentsDefault:q(Zi.fields.documentsDefault,t.documentsDefault,t.markdownDefault===`source`||t.htmlDefault===`source`?`source`:Qi.documentsDefault),reviewGitSettingsImportCandidate:Ee(_(Qt)(t.reviewGitSettingsImportCandidate),()=>$i(t))}},encode:e=>e}))),ta=E(`ReviewGitSettingsState.resource`)(function*(e){let t=yield*lt(e);return yield*et(e,kt.reviewGitSettings(e.environmentId),t.request(e=>e.reviewGitSettings.readReviewGitSettings()))}),na=class e extends nt()(`@porcelain/client/ReviewGitSettingsState`){static layer(t){return It(e,ta(t))}},ra=me(e=>e.atoms(t=>ot(na.layer(e),t(Ut(e).layer)))),ia=me(e=>ra(e).atom(_t(Ze(na,e=>e.stream))).pipe(u(e=>At(e,e=>e)),Ve(0),pt)),aa=me(e=>u(ia(e),e=>Vi({confirmed:Jt(Tt(e)),failure:ct(e)?{error:en(e.cause)}:void 0}))),oa=me(e=>nn(t=>{if(t(aa(e)).kind!==`unconfigured`)return;let n=t(Rt(e));return qi(Wt(n)?n.value.canUpdate:void 0)})),sa=me(e=>k((t,n)=>n.refresh(Rt(e)))),ca=me(e=>ra(e).fn(t=>Nt(function*(){let n=yield*lt(e),r=yield*(yield*na).confirm(n.request(e=>(t.kind,e.reviewGitSettings.saveReviewGitSettings({payload:t}))),(e,t)=>o(t));return{answer:r,kept:t.kind===`initialize`&&Gi(t.settings,r.settings)}}),{concurrent:!0})),la=me(e=>ra(e).fn(t=>Nt(function*(){let t=yield*lt(e);yield*(yield*na).refresh(t.request(e=>e.reviewGitSettings.readReviewGitSettings()))}),{concurrent:!0})),ua=me(e=>u(ca(e),e=>({saving:e.waiting,kept:Wt(e)&&e.value.kept,failure:ct(e)?Xi(en(e.cause)):void 0}))),da=class extends nt()(`@porcelain/client/PreferenceStorage`){};(class e extends nt()(`@porcelain/client/PreferencesStore`){static layer=It(e,Nt(function*(){let e=yield*da,t=yield*je({initial:{preferences:Qi},read:()=>Ze(e.read(),e=>({preferences:e})),write:({preferences:t})=>e.write(t),messages:{beforeRead:`Saved preferences must be read before changing them.`,readFailed:`Saved preferences could not be read. Try reading them again.`,writeFailed:`Preferences could not be saved. Read them again before changing them.`}});return{state:t.state,load:t.load,change:E(`PreferencesStore.change`)(e=>t.write(({preferences:t})=>r({preferences:{...t,...e}})))}}))});var fa=xe({runtime:Mi,key:`porcelain.prototype.preferences`,schema:ea,defaultValue:()=>Qi}),pa=nn(e=>{if(typeof window>`u`)return!1;let t=window.matchMedia(`(prefers-color-scheme: dark)`),n=()=>e.setSelf(t.matches);return t.addEventListener(`change`,n),e.addFinalizer(()=>t.removeEventListener(`change`,n)),t.matches});function ma(){let e=(0,K.c)(9),t=z(fa),n=v(fa),r=z(pa),i;e[0]===n?i=e[1]:(i=(e,t)=>n(n=>({...n,[e]:t})),e[0]=n,e[1]=i);let a;e[2]!==r||e[3]!==t.appearance?(a=Fi(t.appearance,r),e[2]=r,e[3]=t.appearance,e[4]=a):a=e[4];let o;return e[5]!==i||e[6]!==a||e[7]!==t?(o={preferences:t,setPreference:i,resolvedTheme:a},e[5]=i,e[6]=a,e[7]=t,e[8]=o):o=e[8],o}function ha(){let e=(0,K.c)(2),{resolvedTheme:t}=ma(),n=t===`dark`,r;return e[0]===n?r=e[1]:(r={dark:n},e[0]=n,e[1]=r),r}var ga=nn(e=>{e.addFinalizer(F());let t=document.documentElement,n=t.classList.contains(`dark`),r=()=>{let n=e.once(fa);N(n.appearance),t.classList.toggle(`dark`,Fi(n.appearance,e.once(pa))===`dark`)};e.subscribe(fa,r),e.subscribe(pa,r),r(),e.addFinalizer(()=>{t.classList.toggle(`dark`,n)})}),_a=nn(e=>Fi(e(fa).appearance,e(pa))),J={saveFile:`Mod+S`,toggleNavigator:`Mod+B`,toggleSidebar:`Alt+Shift+R`,cycleAppearance:`Alt+Shift+D`,openSettings:`Alt+Shift+S`,closeSettings:`Escape`,openShortcuts:`Mod+/`,surfaceFiles:`Alt+1`,surfaceChanges:`Alt+2`,surfaceHistory:`Alt+3`,nextFile:`J`,previousFile:`K`,toggleReviewed:`R`,comment:`C`,findInFile:`Mod+F`,duplicateFile:`Mod+D`,nextTab:`Alt+ArrowRight`,previousTab:`Alt+ArrowLeft`,closeTab:`Alt+W`,openToSide:`Alt+\\`},va=[{title:`Workspace`,items:[{keys:J.toggleNavigator,label:`Show or hide projects`},{keys:J.toggleSidebar,label:`Show or hide the side panel`},{keys:J.surfaceFiles,label:`Go to Files`},{keys:J.surfaceChanges,label:`Go to Changes`},{keys:J.surfaceHistory,label:`Go to History`},{keys:J.openSettings,label:`Settings`},{keys:J.closeSettings,label:`Close Settings`},{keys:J.cycleAppearance,label:`Cycle appearance`},{keys:J.openShortcuts,label:`Keyboard shortcuts`}]},{title:`Code review`,items:[{keys:J.nextFile,label:`Next file`},{keys:J.previousFile,label:`Previous file`},{keys:J.toggleReviewed,label:`Toggle reviewed`},{keys:J.comment,label:`Comment on the selected lines or the current step`},{keys:J.findInFile,label:`Find in file`},{keys:J.saveFile,label:`Save file edits`},{keys:J.duplicateFile,label:`Duplicate the open file (Files panel open)`}]},{title:`Tabs`,items:[{keys:J.nextTab,label:`Next tab`},{keys:J.previousTab,label:`Previous tab`},{keys:J.closeTab,label:`Close tab`},{keys:J.openToSide,label:`Open the tab to the side`}]}];function ya(e){let t=(0,K.c)(9),{children:n}=e,{preferences:r,setPreference:i,resolvedTheme:a}=ma();p(ga);let o;t[0]!==r.appearance||t[1]!==i?(o=()=>i(`appearance`,Ii(r.appearance)),t[0]=r.appearance,t[1]=i,t[2]=o):o=t[2];let s;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(s={ignoreInputs:!0},t[3]=s):s=t[3],er(J.cycleAppearance,o,s);let c=a===`dark`&&`dark`,l;t[4]===c?l=t[5]:(l=M(`min-h-svh bg-background text-foreground`,c),t[4]=c,t[5]=l);let u;return t[6]!==n||t[7]!==l?(u=(0,G.jsx)(`div`,{className:l,children:n}),t[6]=n,t[7]=l,t[8]=u):u=t[8],u}var ba=[{key:`archiveDeleteWorktree`,label:`Delete local worktree`,description:`Removes the branch’s folder. The main checkout is never deleted.`},{key:`archiveDeleteLocalBranch`,label:`Delete local branch`,description:`Deletes the pull request branch from this clone.`},{key:`archiveDeleteRemoteBranch`,label:`Delete remote branch`,description:`Deletes the branch on origin if it still exists.`}];function xa(e){return{deleteWorktree:e.archiveDeleteWorktree,deleteLocalBranch:e.archiveDeleteLocalBranch,deleteRemoteBranch:e.archiveDeleteRemoteBranch}}var Sa=[{key:`deleteWorktree`,label:ba[0].label},{key:`deleteLocalBranch`,label:ba[1].label},{key:`deleteRemoteBranch`,label:ba[2].label}];function Ca(e,t){return{...xa(e),deleteLocalBranch:!t&&e.archiveDeleteLocalBranch,deleteRemoteBranch:!t&&e.archiveDeleteRemoteBranch}}function wa(e,t,n){return e.filter(e=>!e.remote).map(e=>({...e,current:t.some(t=>t.id===n&&t.branch===e.name),inUse:t.some(t=>t.id!==n&&t.branch===e.name)}))}function Ta(e){return[e.mainCheckout?`The project’s main checkout and its branches are protected. Nothing will be deleted.`:void 0,e.worktreePath?`Delete worktree: ${e.worktreePath}`:void 0,e.worktreePath?`The entire worktree folder will be permanently deleted, including ignored files such as .env and local build output.`:void 0,e.detachWorktreePath?`Keep worktree detached from its branch: ${e.detachWorktreePath}`:void 0,e.localBranch?`Delete local branch: ${e.localBranch}`:void 0,e.remoteBranch?`Delete remote branch: ${e.remoteBranch}`:void 0,e.remoteBranchNote,!e.mainCheckout&&!e.worktreePath&&!e.localBranch&&!e.remoteBranch?`Nothing will be deleted with the current settings.`:void 0,e.dirty?`Warning: this worktree has uncommitted changes. Deleting the worktree permanently discards them.`:void 0,e.unpushed?`Warning: this branch has commits not confirmed on its remote. Deleting branches may lose those commits.`:void 0].filter(Boolean).join(`
|
|
181
|
+
|
|
182
|
+
`)}function Ea(e){return e instanceof Error?e.message:`Deletion could not be completed. Prepare the deletion again.`}function Da(e){return[Ta(e)].join(`
|
|
183
|
+
|
|
184
|
+
`)}function Oa(e){return e instanceof Error?e.message:`Archiving failed. Try preparing the archive again.`}function ka(e){return e.state===`open`&&e.draft?`draft`:e.state}var Aa={open:`Open`,draft:`Draft`,merged:`Merged`,closed:`Closed`};function ja(e){return Aa[ka(e)]}var Ma=new Set([`FAILURE`,`ERROR`,`CANCELLED`,`TIMED_OUT`,`ACTION_REQUIRED`,`STARTUP_FAILURE`,`STALE`]),Na=new Set([`QUEUED`,`IN_PROGRESS`,`PENDING`,`EXPECTED`,`WAITING`,`REQUESTED`]);function Pa(e){return e===`SUCCESS`?`passed`:Ma.has(e)?`failed`:Na.has(e)?`running`:`none`}var Fa={passed:`Passed`,failed:`Failed`,running:`Running`,none:void 0};function Ia(e){if(e===`SUCCESS`)return`Passed`;if(e===`FAILURE`||e===`ERROR`)return`Failed`;if(e===`IN_PROGRESS`)return`Running`;let t=e.toLowerCase().replaceAll(`_`,` `);return`${t.charAt(0).toUpperCase()}${t.slice(1)}`}var La={passed:`Passing when written`,failed:`Failing when written`,running:`Running when written`,none:`Checks when written`};function Ra(e){let t=Ka(e.state),n=e.headOid.slice(0,7);return{label:t.tone===`none`?`Checks at ${n}`:`${t.label} at ${n}`,whenWritten:`${La[t.tone]}, at ${n}`,more:e.checksTruncated,results:e.results.map(({name:e,status:t})=>{let n=Pa(t),r=Ia(t);return{name:e,tone:n,label:r,detail:r===Fa[n]?void 0:r}})}}function za(e){return e.status!==`COMPLETED`||e.conclusion===`EXPECTED`?`running`:Ma.has(e.conclusion??``)?`failed`:`passed`}function Ba(e,t,n){let r=`${e.length}${t?`+`:``}`;if(t){let e=Ka(n);return e.tone===`none`?{tone:`none`,label:`${r} checks listed · result incomplete`,short:`Checks incomplete`}:{tone:e.tone,label:e.label,short:e.label}}if(e.length===0)return{tone:`none`,label:`No checks`,short:`No checks`};let i=`${e.length} ${e.length===1?`check`:`checks`}`,a=e.filter(e=>za(e)===`failed`);if(a.length>0)return{tone:`failed`,label:`${a.length} of ${i} failed`,short:`${a.length} failed`};let o=e.filter(e=>za(e)===`running`);return o.length>0?{tone:`running`,label:`${o.length} of ${i} running`,short:`${o.length} running`}:{tone:`passed`,label:`${i} passed`,short:i}}function Va(e,t){if(!t||t.headSha!==e.headOid)return;let{tone:n}=Ba(t.checks,t.checksTruncated,t.checksSummary);if(n===`none`&&(t.checksTruncated||t.checksSummary!==void 0))return;let r=Ka(e.state).tone,i=t.checks.filter(t=>{let n=e.results.find(e=>e.name===t.name);return n!==void 0&&Pa(n.status)!==za(t)});if(n===r&&i.length===0)return;let a={failed:`Failing now`,passed:`Passing now`,running:`Running now`,none:`No checks now`},o=t.checks.filter(e=>za(e)===n).map(e=>e.name);return{tone:n,label:a[n],names:o,changed:i.map(e=>({name:e.name,tone:za(e),label:a[za(e)]}))}}function Ha(e,t){let n=t?.changed.find(t=>t.name===e.name);return n?{tone:n.tone,label:n.label,detail:`${n.label} · ${e.label.toLowerCase()} when written`}:{tone:e.tone,label:e.label,detail:e.detail??e.label}}function Ua(e,t){let n=Ra(e),r=Va(e,t);return r?{tone:r.tone,label:r.label,names:r.names,note:n.whenWritten}:{tone:Ka(e.state).tone,label:n.label,names:[],note:void 0}}function Wa(e,t){let n=e.map(e=>({...e,live:Va(e.checks,t)})),r=e=>{let t=Ka(e.checks.state).tone;return!e.live&&t!==`failed`&&t!==`running`};return{changed:n.filter(e=>!r(e)),unchanged:n.filter(r).map(({live:e,...t})=>t)}}function Ga(e,t){return t?{...e,state:t.state,draft:t.draft,headSha:t.headSha,mergeable:t.mergeable,checks:t.checks,checksTruncated:t.checksTruncated,checksSummary:t.checksSummary}:e}function Ka(e){return e===`SUCCESS`?{tone:`passed`,label:`Checks passing`}:e===`FAILURE`||e===`ERROR`?{tone:`failed`,label:`Checks failing`}:e===`PENDING`||e===`EXPECTED`?{tone:`running`,label:`Checks running`}:{tone:`none`,label:`No checks`}}function qa(e){switch(e){case`no-access`:return{description:`The chosen or detected GitHub account cannot open this repository. Choose another account or reset the choice in Settings › Changes & Git.`,action:{kind:`settings`,label:`Choose an account`}};case`gh-not-installed`:return{description:`The GitHub CLI (gh) is not installed on this computer.`,action:{kind:`install`,label:`How to install`,url:`https://cli.github.com`}};case`no-accounts`:return{description:`No GitHub account is signed in. Run gh auth login on this computer.`,action:{kind:`copy`,label:`Copy gh auth login`,text:`gh auth login`}};case`rate-limited`:return{description:`GitHub rate limit reached.`,action:{kind:`retry`,label:`Try again`}};case`offline`:return{description:`GitHub can’t be reached.`,action:{kind:`retry`,label:`Try again`}};case`invalid-response`:return{description:`GitHub’s answer was unreadable.`,action:{kind:`retry`,label:`Try again`}};case`pull-request-not-found`:return{description:`GitHub could not find this pull request. It may have been removed or become unavailable to this account. You can still read local changes.`,action:{kind:`retry`,label:`Try again`}};case`not-github`:return{description:`This repository has no GitHub remote.`,action:{kind:`retry`,label:`Try again`}}}}function Ja(e){return e===`MERGEABLE`?{label:`No conflicts`,tone:`passed`}:e===`CONFLICTING`?{label:`Conflicts`,tone:`failed`}:{label:`Not known yet`,tone:`none`}}var Ya={merge:`Create a merge commit`,squash:`Squash and merge`,rebase:`Rebase and merge`};function Xa(e){return(e.mergeMethods??[`merge`,`squash`,`rebase`]).map(e=>({method:e,label:Ya[e]}))}function Za(e){return e instanceof Error&&e.message?e.message:`The merge could not be completed. Check the pull request before trying again.`}function Qa(e,t){if(e.state===`merged`)return`Already merged.`;if(e.state===`closed`)return`This pull request is closed.`;if(e.draft)return`It is a draft. Mark it ready for review on GitHub.`;if(e.mergeMethods?.length===0)return`This repository allows no merge method.`;if(e.mergeable===`CONFLICTING`)return`It conflicts with ${e.baseBranch}.`;let n=Ba(e.checks,e.checksTruncated,e.checksSummary);if(n.tone===`failed`||n.tone===`running`)return n.tone===`failed`?`${n.label.replace(/^Checks failing$/,`Checks are failing`)}.`:`${n.label.replace(/^Checks running$/,`Checks are still running`)}.`;if(!t||t.headOid!==e.headSha)return;if(t.undecidedCallStep===`reading`)return`Reading your decisions on the calls.`;if(t.undecidedCallStep===`unreadable`)return`Your decisions on the calls could not be read.`;if(t.undecidedCallStep!==void 0)return`Your call in step ${t.undecidedCallStep} is not decided yet.`;let r=t.callsNeedingCommit?.[0];if(r!==void 0)return`Your call in step ${r} needs a new commit.`}function $a(e){if(e===`APPROVED`)return{label:`Approved`,tone:`passed`};if(e===`CHANGES_REQUESTED`)return{label:`Changes requested`,tone:`failed`};if(e===`DISMISSED`)return{label:`Dismissed`,tone:`none`}}function eo(e){return/^https:\/\/github\.com\/([^/]+\/[^/]+)\/pull\//.exec(e)?.[1]}function to(e){let t=new Set(e.filter(e=>e.kind===`review`).map(e=>e.id));return e.filter(e=>e.kind!==`review-comment`||e.reviewId===void 0||!t.has(e.reviewId)).map(t=>({item:t,comments:t.kind===`review`?e.filter(e=>e.kind===`review-comment`&&e.reviewId===t.id):[]}))}function no(e,t,n){let r=e.find(e=>e.id===t&&e.available)?.worktrees.find(e=>e.available&&e.branch===n);return r?{projectId:t,worktreeId:r.id}:void 0}function ro(e){return e instanceof Error&&e.message?e.message:`GitHub did not take the request. Try again.`}var io=e=>`${e.charAt(0).toLowerCase()}${e.slice(1)}`.replace(/\.$/,``);function ao(e,t,n,r){let i=de(e,t,n);if(i.length>0)return i.map(e=>({text:io(e.text),blocksMerge:!1,failed:e.tone===`failed`}));let a=Qa({...e,baseBranch:t,mergeMethods:void 0},r);return a===void 0?[]:[{text:io(a),blocksMerge:!0,failed:!1}]}var oo=(e,t,n)=>`${e} ${e===1?t:n}`;function so(e,t,n){let r=[];n?.length===0&&r.push({text:`no merge method allowed`,blocksMerge:!0,failed:!1}),e.draft&&r.push({text:`draft`,blocksMerge:!0,failed:!1}),e.mergeable===`CONFLICTING`?r.push({text:`conflicts with ${t}`,blocksMerge:!0,failed:!0}):e.mergeState===`BEHIND`&&r.push({text:`behind ${t}`,blocksMerge:!1,failed:!1});let i=e.checks.filter(e=>rt(e)===`failed`).length;i>0&&r.push({text:`${oo(i,`check`,`checks`)} failing`,blocksMerge:!0,failed:!0});let a=e.checks.filter(e=>rt(e)===`running`).length;return a>0&&r.push({text:`${oo(a,`check`,`checks`)} running`,blocksMerge:!0,failed:!1}),e.reviewDecision===`CHANGES_REQUESTED`?r.push({text:`changes requested`,blocksMerge:!0,failed:!0}):e.reviewDecision===`REVIEW_REQUIRED`&&r.push({text:`review required`,blocksMerge:!0,failed:!1}),r.length===0&&e.mergeState===`BLOCKED`&&r.push({text:`a branch rule on GitHub blocks it`,blocksMerge:!1,failed:!1}),r}function co(e,t){if(!t)return[];if(t.headOid!==e.headSha)return[{text:`the Walkthrough is for another commit`,blocksMerge:!1,failed:!1}];if(t.undecidedCallStep===`reading`)return[{text:`reading your calls`,blocksMerge:!0,failed:!1}];if(t.undecidedCallStep===`unreadable`)return[{text:`your calls could not be read`,blocksMerge:!0,failed:!1}];let n=[];if(t.undecidedCallStep!==void 0){let e=Math.max(t.undecidedCalls??1,1);n.push({text:`${oo(e,`call`,`calls`)} open`,blocksMerge:!0,failed:!1})}let r=t.callsNeedingCommit?.length??0;return r>0&&n.push({text:`${oo(r,`call needs`,`calls need`)} a new commit`,blocksMerge:!0,failed:!1}),n}function lo({status:e,baseBranch:t,mergeMethods:n,review:r}){if(!e)return{tone:`unknown`,label:`Reading the merge status`,reasons:[],waitsFor:void 0};if(e.state===`merged`)return{tone:`merged`,label:`Merged`,reasons:[],waitsFor:void 0};if(e.state===`closed`)return{tone:`closed`,label:`Closed without merging`,reasons:[],waitsFor:void 0};let i=[...so(e,t,n),...co(e,r)],a=i.length>0?i:ao(e,t,n,r),o=a.filter(e=>e.blocksMerge).length===0?void 0:`Merge waits for: ${a.map(e=>e.text).join(`, `)}.`;if(a.length===0)return{tone:`ready`,label:`Ready to merge`,reasons:a,waitsFor:o};let s=a.some(e=>e.text===`reading your calls`);return{tone:a.some(e=>e.failed)?`failed`:s?`unknown`:`waiting`,label:`Not ready to merge: ${a.map(e=>e.text).join(`, `)}`,reasons:a,waitsFor:o}}var uo={ready:`passed`,failed:`failed`,waiting:`none`,unknown:`running`,merged:`passed`,closed:`none`};function fo(e){let t=e.status??e.detail;if(t)return t.state===`open`?t.draft?`Draft`:`Open`:t.state===`merged`?`Merged`:`Closed`}function po({pull:e,review:t}){let n=t&&typeof t.undecidedCallStep==`number`?Math.max(t.undecidedCalls??1,1):0,r=e&&!e.statusUnread?lo({status:e.status,baseBranch:e.detail?.baseBranch??`the base branch`,mergeMethods:e.detail?.mergeMethods,review:t}):void 0,i=r?.label??(n>0?`${oo(n,`call`,`calls`)} open`:void 0);if(i||e)return{label:i,icon:r?uo[r.tone]:`none`,quiet:r?.tone===`unknown`,pullState:e&&r?.tone!==`merged`&&r?.tone!==`closed`?fo(e):void 0}}function mo(e,t){return t??e}function ho(e){let t=(0,K.c)(2),n;return t[0]===e?n=t[1]:(n=aa(e),t[0]=e,t[1]=n),z(n)}function go(e){let t=(0,K.c)(2),n=ho(e),r;return t[0]===n?r=t[1]:(r=Ji(n),t[0]=n,t[1]=r),r}function _o(e){let t=(0,K.c)(2),n;return t[0]===e?n=t[1]:(n=oa(e),t[0]=e,t[1]=n),z(n)}function vo(e){let t=(0,K.c)(10),n;t[0]===e?n=t[1]:(n=Dt(e),t[0]=e,t[1]=n);let r=n,i=z(r),a;t[2]===i?a=t[3]:(a=Jt(Tt(i))?.projects,t[2]=i,t[3]=a);let o;t[4]===i?o=t[5]:(o=ct(i),t[4]=i,t[5]=o);let s=ke(r),c;return t[6]!==a||t[7]!==o||t[8]!==s?(c={projects:a,failed:o,retry:s},t[6]=a,t[7]=o,t[8]=s,t[9]=c):c=t[9],c}function yo(e){let t=(0,K.c)(15),n;t[0]===e?n=t[1]:(n=sa(e),t[0]=e,t[1]=n);let r=v(n),i;t[2]===e?i=t[3]:(i=ua(e),t[2]=e,t[3]=i);let a=z(i),o;t[4]===e?o=t[5]:(o=ca(e),t[4]=e,t[5]=o);let s=v(o),c;t[6]===e?c=t[7]:(c=la(e),t[6]=e,t[7]=c);let l=v(c),u;t[8]===r?u=t[9]:(u=()=>r(void 0),t[8]=r,t[9]=u);let d;return t[10]!==a||t[11]!==s||t[12]!==l||t[13]!==u?(d={...a,save:s,readAgain:l,checkTrustAgain:u},t[10]=a,t[11]=s,t[12]=l,t[13]=u,t[14]=d):d=t[14],d}var bo=e=>e.transform!==`none`||e.translate!==`none`||e.scale!==`none`||e.rotate!==`none`;function xo(e,t){for(let n=e;n&&n!==t;){if(n!==e&&(n.scrollLeft||n.scrollTop)||bo(getComputedStyle(n)))return!0;n=n.parentElement}return!1}function So(e,t){let n={x:e.offsetLeft+t.clientLeft,y:e.offsetTop+t.clientTop};if(t===e.ownerDocument.body||xo(e,t))return n;let r=e.getBoundingClientRect(),i=t.getBoundingClientRect(),a=wo(t),o=(r.left-i.left)*a.width/i.width+t.scrollLeft,s=(r.top-i.top)*a.height/i.height+t.scrollTop;return{x:Math.abs(o-n.x)<1?o:n.x,y:Math.abs(s-n.y)<1?s:n.y}}function Co(e){let t=0,n=0;for(let r=e;r;r=r.offsetParent){let e=r.offsetParent;if(!e){t+=r.offsetLeft,n+=r.offsetTop;continue}let i=So(r,e);t+=i.x,n+=i.y}return{x:t,y:n}}function wo(e){let t=getComputedStyle(e),n=(...e)=>e.reduce((e,n)=>e+(parseFloat(t.getPropertyValue(n))||0),0),r=t.boxSizing!==`border-box`,i=parseFloat(t.width)+(r?n(`padding-left`,`padding-right`,`border-left-width`,`border-right-width`):0),a=parseFloat(t.height)+(r?n(`padding-top`,`padding-bottom`,`border-top-width`,`border-bottom-width`):0);return{width:Number.isFinite(i)?i:e.offsetWidth,height:Number.isFinite(a)?a:e.offsetHeight}}function To(e,t){let n=Co(e),r=Co(t),i=n.x-r.x-t.clientLeft,a=n.y-r.y-t.clientTop,{width:o,height:s}=wo(e),c={width:t.scrollWidth,height:t.scrollHeight};return{left:i,top:a,width:o,height:s,right:c.width-(i+o),bottom:c.height-(a+s)}}function Eo(e){let t=()=>{let t=e.list(),n=e.active();e.write(n&&t?To(n,t):void 0)},n=typeof ResizeObserver>`u`?void 0:new ResizeObserver(t),r=new Set,i=()=>{let i=e.list(),a=new Set(i?[i,...i.querySelectorAll(e.itemSelector)]:[]);for(let e of r)a.has(e)||(r.delete(e),n?.unobserve(e));for(let e of a)r.has(e)||(r.add(e),n?.observe(e));t()},a=e.subscribe(i);return queueMicrotask(i),()=>{a(),n?.disconnect()}}function Do(e,t,n){if(!e||!t)return`none`;let[r,i]=n===`vertical`?[e.top,t.top]:[e.left,t.left];return i===r?`none`:n===`vertical`?i>r?`down`:`up`:i>r?`right`:`left`}var Oo=[`left`,`right`,`top`,`bottom`,`width`,`height`];function ko(e,t){for(let n of Oo)t?e.style.setProperty(`--active-tab-${n}`,`${t[n]}px`):e.style.removeProperty(`--active-tab-${n}`)}function Ao(e){let{id:t,store:n,options:r,element:i,props:a}=e,o=Fe(e),s=new Set,c=!1,l=!1,u=r().defaultValue??null,f=null,p=new Set,m=()=>n.get().orientation,h=()=>r().value!==void 0,g=e=>!e.props?.disabled,_=pr(e,{slot:`tab`,key:`stop`,orientation:m,loop:()=>r().loop??!0,remember:!1,disabled:e=>!g(e),preferred:e=>n.get().value===e.key,claims:(e,t)=>e.value===null?g(t):e.value===t.key,onItemsChange:b}),v,y=_.items;function b(){let e=y();if(e.length){let r=!l;l=!0;let i=t=>e.some(e=>e.key===t),{value:a}=n.get();if(h()&&(u=null),u!==null&&i(u)){let e=a;a=u,u=f=null,e!==a&&n.set({value:a})}let s=u!==null&&a===u&&!!e[0].el.ownerDocument.getElementById(`${t}-tab-${Ot(u)}`);if(!h()&&!i(a)&&!s){let t=e.find(g);t&&r?(f=u===null?null:t.key,n.set({value:t.key})):t&&o(`value`,t.key,{reason:`item-removed`})}}for(let e of p)e()}function x(e,t){if(l||e.value!==null||h())return e.value===t;let n=a(`tab`,t);return!!n&&_.tabIndex(e,{key:t,props:n})===`0`}function S(e){let t=i(`list`),n=e===null?void 0:i(`tab`,e);if(!t||!n||t.scrollWidth<=t.clientWidth&&t.scrollHeight<=t.clientHeight)return;let r=To(n,t),a=on(t),o=d(a?-t.scrollLeft:t.scrollLeft,t.clientWidth,a?t.clientWidth-r.left-r.width:r.left,r.width);t.scrollLeft=a?-o:o,t.scrollTop=d(t.scrollTop,t.clientHeight,r.top,r.height)}function C(e,t){let n=e.value,r=e=>e===null?void 0:i(`tab`,e)?.getBoundingClientRect();return{direction:Do(r(n),r(t),e.orientation),exiting:[...e.exiting.filter(e=>e!==t),...n!==null&&s.has(n)&&!e.exiting.includes(n)?[n]:[]]}}tt(e,[`direction`,`exiting`,`stop`],(e,t)=>{if(!(`value`in e)||e.value===t.value)return;let n=e.value??null,r=_.stopFor(e=>e.key===n);return{...C(t,n),...r!==void 0&&{stop:r}}});let w=n.get().value;n.subscribe(()=>{let e=n.get();if(e.value===w)return;let t=w;w=e.value,e.value!==f&&(u=null),c=!0,n.set(C({...e,value:t},e.value)),_.check(),S(e.value)});function T(e,{reason:t=`imperative`,event:n}={}){return e!==null&&a(`tab`,e)?.disabled?!1:o(`value`,e,{reason:t,event:n})}return{getValue:()=>n.get().value,setValue:T,select:T,focus:()=>_.focus(),internal:{id:t,options:r,orientation:m,shows:x,isChanged:()=>c,listElement:()=>i(`list`),tabElement:e=>i(`tab`,e),onTabsChange(e){return p.add(e),()=>p.delete(e)},roving:_,registerPanel(e){return s.add(e),n.set({panels:[...s]}),()=>{s.delete(e);let{exiting:t}=n.get();n.set({panels:[...s],exiting:t.filter(t=>t!==e)})}},setElement(e,t){let r=zt(t),{elements:i}=n.get();(i[e]??`button`)!==r&&n.set({elements:{...i,[e]:r}})},finishExit(e){n.set({exiting:n.get().exiting.filter(t=>t!==e)})},pressDetails:e=>v?{reason:`list-navigation`,event:v}:{reason:`item-press`,event:e},onKeyDown(e){if(e.defaultPrevented||e.altKey||e.ctrlKey||e.metaKey||e.shiftKey)return;let t=y().find(t=>t.el===e.target);if(!t)return;let n=t.el;if(e.key===`Enter`||e.key===` `){if(n.tagName===`BUTTON`||e.key===`Enter`&&n.matches(`a[href]`))return;e.preventDefault(),n.matches(`a[href]`)?n.click():g(t)&&T(t.key,{reason:`item-press`,event:e});return}let i=_.keydown(e,n),a=i&&i.key!==i.from?y().find(e=>e.key===i.key):void 0;if(a&&r().activation!==`manual`&&g(a)){if(a.el.matches(`a[href]`)){v=e;try{a.el.click()}finally{v=void 0}}else T(a.key,{reason:`list-navigation`,event:e})}}}}}var jo=Ao,Mo=(e,t)=>t.hiddenUntilFound??e.hiddenUntilFound,No=Ye(mt({name:`tabs`,options:{value:`string`,defaultValue:`string`,onValueChange:`callback`,orientation:`string`,activation:`string`,loop:`boolean`,hiddenUntilFound:`boolean`,controller:`value`},state:e=>({value:e.defaultValue??null,orientation:Se(e.orientation,`horizontal`),hiddenUntilFound:e.hiddenUntilFound??!1,direction:`none`,exiting:[],stop:null,panels:[],elements:{}}),live:[`panels`],sync:e=>({orientation:Se(e.orientation,`horizontal`),hiddenUntilFound:e.hiddenUntilFound??!1,...e.value===void 0?{}:{value:e.value}}),api:jo,slots:e=>({root:e({state:(e,{api:t})=>({value:e.value,orientation:t.internal.orientation(),direction:e.direction}),attrs:(e,{api:t})=>({"data-orientation":t.internal.orientation(),"data-activation-direction":e.direction})}),list:e({role:`tablist`,keys:e=>[...e.orientation===`vertical`?[`ArrowUp`,`ArrowDown`]:[`ArrowLeft`,`ArrowRight`],`Home`,`End`,`Enter`,` `],state:(e,{api:t})=>({orientation:t.internal.orientation()}),attrs:(e,{api:t})=>({"aria-orientation":t.internal.orientation()===`vertical`?`vertical`:void 0,"data-orientation":t.internal.orientation(),"data-activation-direction":e.direction}),on:{keydown:(e,{api:t})=>t.internal.onKeyDown(e)}}),tab:e({role:`tab`,focus:`roving`,props:{value:`string`,disabled:`boolean`},selects:ht({value:({key:e})=>[e,null],stop:({key:e})=>[e,null],exiting:[],panels:({key:e})=>[e],elements:({key:e})=>[e]}),state:(e,{key:t,props:n,api:r})=>({selected:r.internal.shows(e,t),disabled:!!n.disabled}),attrs:(e,{id:t,key:n,props:r,api:i})=>{let a=i.internal.shows(e,n);return{id:`${t}-tab-${Ot(n)}`,type:(e.elements[n]??`button`)===`button`?`button`:void 0,tabindex:i.internal.roving.tabIndex(e,{key:n,props:r}),"aria-selected":String(a),"aria-disabled":r.disabled?`true`:void 0,"data-selected":a?``:void 0,"data-disabled":r.disabled?``:void 0,"data-orientation":i.internal.orientation(),"data-activation-direction":e.direction}},live:Pt((e,{id:t,key:n})=>({"aria-controls":e.panels.includes(n)?`${t}-panel-${Ot(n)}`:void 0})),press({api:e,el:t,key:n,props:r},i){r.disabled?i?.preventDefault():st(i,t)||(t&&document.activeElement!==t&&t.focus({preventScroll:!0}),e.select(n,e.internal.pressDetails(i)))},bind(e,t){return t.api.internal.setElement(t.key,e),t.api.internal.roving.bind(e,t)}}),"tab-icon":e(sr({component:`tabs`,item:`[role="tab"]`,list:`[role="tablist"]`})),indicator:e({role:`presentation`,state:(e,{api:t})=>({orientation:t.internal.orientation(),direction:e.direction}),attrs:(e,{api:t})=>({"data-orientation":t.internal.orientation(),"data-activation-direction":e.direction}),bind(e,{api:t,store:n}){let r=n.get().value;return Eo({list:()=>t.internal.listElement()??e.parentElement,active:()=>{let{value:e}=n.get();return e===null?void 0:t.internal.tabElement(e)},itemSelector:`[role="tab"]`,subscribe(i){let a=n.subscribe(()=>{n.get().value!==r&&(r=n.get().value,e.setAttribute(`data-activation-direction`,n.get().direction),i())}),o=t.internal.onTabsChange(i);return()=>{a(),o()}},write:t=>ko(e,t)})}}),panel:e({role:`tabpanel`,props:{value:`string`,keepMounted:`boolean`,hiddenUntilFound:`boolean`},selects:ht({value:({key:e})=>[e,null],stop:[],exiting:({key:e})=>[e],panels:[],elements:[]}),present:(e,{key:t,props:n,api:r})=>!!n.keepMounted||Mo(e,n)||r.internal.shows(e,t)||e.exiting.includes(t),state:(e,{key:t,api:n})=>({selected:n.internal.shows(e,t)}),attrs:(e,{id:t,key:n,props:r,api:i})=>({id:`${t}-panel-${Ot(n)}`,"aria-labelledby":`${t}-tab-${Ot(n)}`,...Ue(i.internal.shows(e,n)||e.exiting.includes(n),Mo(e,r)),"data-selected":i.internal.shows(e,n)?``:void 0,"data-orientation":i.internal.orientation(),"data-activation-direction":e.direction}),bind(e,t){let{api:r,key:i,store:a}=t,o=[r.internal.registerPanel(i)],s=Ie(e,{shown:()=>r.internal.shows(a.get(),i)||a.get().exiting.includes(i),findable:()=>Mo(a.get(),t.props),reveal:e=>r.select(i,{reason:`find-in-page`,event:e})});o.push(s,wt(t,s.check),jt(t,s.check));let c=ut(e,()=>!0);o.push(c.stop);let l,u=r.internal.shows(a.get(),i);return u&&r.internal.isChanged()&&(l=_e(e)),o.push(wt(t,()=>{let{exiting:t}=a.get();r.internal.shows(a.get(),i)!==u&&(u=!u,l?.(),l=void 0,e.toggleAttribute(`data-selected`,u),u?l=_e(e):t.includes(i)&&(l=n(e,()=>{l=void 0,r.internal.finishExit(i)})))})),o.push(()=>l?.()),()=>o.forEach(e=>e())}})}),agent:{actions:[`setValue`],closed:!0,reveals:!0}}),{root:`div`,list:`div`,tab:`button`,"tab-icon":`span`,indicator:`span`,panel:`div`}),Po=No.Root,Fo=No.List,Io=No.Tab;No.TabIcon,No.Indicator;var Lo=No.Panel;function Ro({className:e,orientation:t=`horizontal`,activation:n=`manual`,...r}){return(0,G.jsx)(Po,{activation:n,"data-slot":`tabs`,"data-orientation":t,className:M(`group/tabs flex gap-2 data-horizontal:flex-col`,e),...r})}var zo=Mt(`group/tabs-list inline-flex w-fit items-center justify-center rounded-lg p-[3px] text-muted-foreground group-data-horizontal/tabs:h-8 group-data-vertical/tabs:h-fit group-data-vertical/tabs:flex-col data-[variant=line]:rounded-none`,{variants:{variant:{default:`bg-muted`,line:`gap-1 bg-transparent`}},defaultVariants:{variant:`default`}});function Bo({className:e,variant:t=`default`,...n}){return(0,G.jsx)(Fo,{"data-slot":`tabs-list`,"data-variant":t,className:M(zo({variant:t}),e),...n})}function Vo({className:e,...t}){return(0,G.jsx)(Io,{"data-slot":`tabs-trigger`,className:M(`relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-1.5 py-0.5 text-xs font-medium whitespace-nowrap text-muted-foreground transition-all group-data-vertical/tabs:w-full group-data-vertical/tabs:justify-start group-data-vertical/tabs:py-[calc(--spacing(1.25))] hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 has-data-[icon=inline-end]:pr-1 has-data-[icon=inline-start]:pl-1 aria-disabled:pointer-events-none aria-disabled:opacity-50 dark:text-muted-foreground dark:hover:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5`,`group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-[selected]:bg-transparent dark:group-data-[variant=line]/tabs-list:data-[selected]:border-transparent dark:group-data-[variant=line]/tabs-list:data-[selected]:bg-transparent`,`data-[selected]:bg-background data-[selected]:text-foreground dark:data-[selected]:border-input dark:data-[selected]:bg-input/30 dark:data-[selected]:text-foreground`,`after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-horizontal/tabs:after:inset-x-0 group-data-horizontal/tabs:after:bottom-[-5px] group-data-horizontal/tabs:after:h-0.5 group-data-vertical/tabs:after:inset-y-0 group-data-vertical/tabs:after:-right-1 group-data-vertical/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-[selected]:after:opacity-100`,e),...t})}function Ho({className:e,...t}){return(0,G.jsx)(Lo,{tabIndex:0,"data-slot":`tabs-content`,className:M(`flex-1 text-xs/relaxed outline-none`,e),...t})}var Uo=class{constructor(e,t){this.fn=e,this.options=t,this.lastExecutionTime=0,this.isPending=!1,this.maybeExecute=(...e)=>{let t=Date.now()-this.lastExecutionTime;if(this.options.leading&&t>=this.options.wait)this.execute(...e);else if(this.lastArgs=e,!this.timeoutId&&this.options.trailing){let e=this.options.wait-t;this.isPending=!0,this.timeoutId=setTimeout(()=>{this.lastArgs!==void 0&&this.execute(...this.lastArgs)},e)}},this.execute=(...e)=>{this.fn(...e),this.options.onExecute?.(e,this),this.lastExecutionTime=Date.now(),this.clearTimeout(),this.lastArgs=void 0,this.isPending=!1},this.flush=()=>{this.isPending&&this.lastArgs&&this.execute(...this.lastArgs)},this.cancel=()=>{this.clearTimeout(),this.lastArgs=void 0,this.isPending=!1},this.clearTimeout=()=>{this.timeoutId&&=(clearTimeout(this.timeoutId),void 0)},this.options.leading===void 0&&this.options.trailing===void 0&&(this.options.leading=!0,this.options.trailing=!0)}};function Wo(e,t){return new Uo(e,t).maybeExecute}var Go=class{#e=!0;#t;#n;#r;#i;#a;#o;#s;#c=0;#l=5;#u=!1;#d=!1;#f=null;#p=()=>{this.debugLog(`Connected to event bus`),this.#a=!0,this.#u=!1,this.debugLog(`Emitting queued events`,this.#i),this.#i.forEach(e=>this.emitEventToBus(e)),this.#i=[],this.stopConnectLoop(),this.#n().removeEventListener(`tanstack-connect-success`,this.#p)};#m=()=>{this.#c<this.#l?(this.#c++,this.dispatchCustomEvent(`tanstack-connect`,{})):(this.#n().removeEventListener(`tanstack-connect`,this.#m),this.#d=!0,this.debugLog(`Max retries reached, giving up on connection`),this.stopConnectLoop())};#h=()=>{this.#u||(this.#u=!0,this.#n().addEventListener(`tanstack-connect-success`,this.#p),this.#m())};constructor({pluginId:e,debug:t=!1,enabled:n=!0,reconnectEveryMs:r=300}){this.#t=e,this.#e=n,this.#n=this.getGlobalTarget,this.#r=t,this.debugLog(` Initializing event subscription for plugin`,this.#t),this.#i=[],this.#a=!1,this.#d=!1,this.#o=null,this.#s=r}startConnectLoop(){this.#o!==null||this.#a||(this.debugLog(`Starting connect loop (every ${this.#s}ms)`),this.#o=setInterval(this.#m,this.#s))}stopConnectLoop(){this.#u=!1,this.#o!==null&&(clearInterval(this.#o),this.#o=null,this.#i=[],this.debugLog(`Stopped connect loop`))}debugLog(...e){this.#r&&console.log(`🌴 [tanstack-devtools:${this.#t}-plugin]`,...e)}getGlobalTarget(){if(typeof globalThis<`u`&&globalThis.__TANSTACK_EVENT_TARGET__)return this.debugLog(`Using global event target`),globalThis.__TANSTACK_EVENT_TARGET__;if(typeof window<`u`&&window.addEventListener!==void 0)return this.debugLog(`Using window as event target`),window;let e=typeof EventTarget<`u`?new EventTarget:void 0;return e===void 0||e.addEventListener===void 0?(this.debugLog(`No event mechanism available, running in non-web environment`),{addEventListener:()=>{},removeEventListener:()=>{},dispatchEvent:()=>!1}):(this.debugLog(`Using new EventTarget as fallback`),e)}getPluginId(){return this.#t}dispatchCustomEventShim(e,t){try{let n=new Event(e,{detail:t});this.#n().dispatchEvent(n)}catch{this.debugLog(`Failed to dispatch shim event`)}}dispatchCustomEvent(e,t){try{this.#n().dispatchEvent(new CustomEvent(e,{detail:t}))}catch{this.dispatchCustomEventShim(e,t)}}emitEventToBus(e){this.debugLog(`Emitting event to client bus`,e),this.dispatchCustomEvent(`tanstack-dispatch-event`,e)}createEventPayload(e,t){return{type:`${this.#t}:${e}`,payload:t,pluginId:this.#t}}emit(e,t){if(!this.#e)this.debugLog(`Event bus client is disabled, not emitting event`,e,t);else if(this.#f&&(this.debugLog(`Emitting event to internal event target`,e,t),this.#f.dispatchEvent(new CustomEvent(`${this.#t}:${e}`,{detail:this.createEventPayload(e,t)}))),this.#d)this.debugLog(`Previously failed to connect, not emitting to bus`);else if(!this.#a)this.debugLog(`Bus not available, will be pushed as soon as connected`),this.#i.push(this.createEventPayload(e,t)),typeof CustomEvent<`u`&&!this.#u&&(this.#h(),this.startConnectLoop());else return this.emitEventToBus(this.createEventPayload(e,t))}on(e,t,n){let r=n?.withEventTarget??!1,i=`${this.#t}:${e}`;if(r&&(this.#f||=new EventTarget,this.#f.addEventListener(i,e=>{t(e.detail)})),!this.#e)return this.debugLog(`Event bus client is disabled, not registering event`,i),()=>{};let a=e=>{this.debugLog(`Received event from bus`,e.detail),t(e.detail)};return this.#n().addEventListener(i,a),this.debugLog(`Registered event to bus`,i),()=>{r&&this.#f?.removeEventListener(i,a),this.#n().removeEventListener(i,a)}}onAll(e){if(!this.#e)return this.debugLog(`Event bus client is disabled, not registering event`),()=>{};let t=t=>{let n=t.detail;e(n)};return this.#n().addEventListener(`tanstack-devtools-global`,t),()=>this.#n().removeEventListener(`tanstack-devtools-global`,t)}onAllPluginEvents(e){if(!this.#e)return this.debugLog(`Event bus client is disabled, not registering event`),()=>{};let t=t=>{let n=t.detail;this.#t&&n.pluginId!==this.#t||e(n)};return this.#n().addEventListener(`tanstack-devtools-global`,t),()=>this.#n().removeEventListener(`tanstack-devtools-global`,t)}},Y=new class extends Go{constructor(){super({pluginId:`form-devtools`,reconnectEveryMs:1e3})}};function Ko(e,t){return typeof e==`function`?e(t):e}function qo(e,t){return ts(t).reduce((e,t)=>{if(e===null)return null;if(e!==void 0)return e[t]},e)}function Jo(e,t,n){let r=ts(t);function i(e){if(!r.length)return Ko(n,e);let t=r.shift();if(typeof t==`string`||typeof t==`number`&&!Array.isArray(e))return typeof e==`object`?(e===null&&(e={}),{...e,[t]:i(e[t])}):{[t]:i()};if(Array.isArray(e)&&typeof t==`number`){let n=e.slice(0,t);return[...n.length?n:Array(t),i(e[t]),...e.slice(t+1)]}return[...Array(t),i()]}return i(e)}function Yo(e,t){let n=ts(t);function r(e){if(!e)return;if(n.length===1){let t=n[0];if(Array.isArray(e)&&typeof t==`number`)return e.filter((e,n)=>n!==t);let{[t]:r,...i}=e;return i}let t=n.shift();if((typeof t==`string`||typeof t==`number`&&!Array.isArray(e))&&typeof e==`object`)return{...e,[t]:r(e[t])};if(typeof t==`number`&&Array.isArray(e)){if(t>=e.length)return e;let n=e.slice(0,t);return[...n.length?n:Array(t),r(e[t]),...e.slice(t+1)]}throw Error(`It seems we have created an infinite loop in deleteBy. `)}return r(e)}var Xo=46,Zo=91,Qo=93,$o=48,es=57;function ts(e){if(Array.isArray(e))return[...e];if(typeof e!=`string`)throw Error(`Path must be a string.`);let t=e.length,n=[],r=+(t>0&&e.charCodeAt(0)===Zo),i=!0,a=-1;for(let o=r;o<=t;o++){let s=o<t?e.charCodeAt(o):-1;if(o===t||s===Xo||s===Zo||s===Qo){let t=o-r;if(t>0){let a=i&&(t===1||e.charCodeAt(r)!==$o),s=e.slice(r,o);if(a){let e=parseInt(s,10);t<=15||String(e)===s?n.push(e):n.push(s)}else n.push(s)}else a!==Qo&&(a!==-1||s!==Qo)&&(a!==s||s!==Xo&&s!==Zo)&&n.push(``);r=o+1,i=!0}else(s<$o||s>es)&&(i=!1);a=s}return n.length||n.push(``),n}function ns(e){return!(Array.isArray(e)&&e.length===0)}function rs(e,t){return t.validationLogic({form:t.form,group:t.group,validators:t.validators,event:{type:e,fieldName:t.fieldName,async:!1},runValidation:e=>e.validators.filter(Boolean).map(e=>({cause:e.cause,validate:e.fn}))})}function is(e,t){let{asyncDebounceMs:n}=t,{onBlurAsyncDebounceMs:r,onChangeAsyncDebounceMs:i,onDynamicAsyncDebounceMs:a}=t.validators||{},o=n??0;return t.validationLogic({form:t.form,group:t.group,validators:t.validators,event:{type:e,fieldName:t.fieldName,async:!0},runValidation:t=>t.validators.filter(Boolean).map(t=>{let n=t?.cause||e,s=o;switch(n){case`change`:s=i??o;break;case`blur`:s=r??o;break;case`dynamic`:s=a??o;break;case`submit`:s=0}return e===`submit`&&(s=0),{cause:n,validate:t.fn,debounceMs:s}})})}var as=e=>!!e&&typeof e==`object`&&`fields`in e;function X(e,t){if(Object.is(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(let[n,r]of e)if(!t.has(n)||!Object.is(r,t.get(n)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length||n.length===0&&!Array.isArray(e)&&!Array.isArray(t)&&(Object.getPrototypeOf(e)!==Object.prototype||Object.getPrototypeOf(t)!==Object.prototype))return!1;for(let i of n)if(!r.includes(i)||!X(e[i],t[i]))return!1;return!0}var os=({newFormValidatorError:e,isPreviousErrorFromFormValidator:t,previousErrorValue:n})=>e?{newErrorValue:e,newSource:`form`}:t?{newErrorValue:void 0,newSource:void 0}:n?{newErrorValue:n,newSource:`field`}:{newErrorValue:void 0,newSource:void 0},ss=({formLevelError:e,fieldLevelError:t})=>t?{newErrorValue:t,newSource:`field`}:e?{newErrorValue:e,newSource:`form`}:{newErrorValue:void 0,newSource:void 0};function Z(e,t){return e==null?t:{...e,...t}}for(var cs=256,ls=[],us;cs--;)ls[cs]=(cs+256).toString(16).substring(1);function ds(){let e=0,t,n=``;if(!us||cs+16>256){for(us=Array(256),e=256;e--;)us[e]=256*Math.random()|0;e=0,cs=0}for(;e<16;e++)t=us[cs+e],n+=e===6?ls[t&15|64]:e===8?ls[t&63|128]:ls[t],e&1&&e>1&&e<11&&(n+=`-`);return cs++,n}var fs=Wo(e=>Y.emit(`form-state`,{id:e.formId,state:e.store.state}),{wait:300});function ps(e){if(typeof e!=`object`||!e)return e;if(e instanceof Date)return new Date(e.getTime());if(Array.isArray(e)){let t=[];for(let n=0;n<e.length;n++)t[n]=ps(e[n]);return t}if(e instanceof Map){let t=new Map;return e.forEach((e,n)=>{t.set(n,ps(e))}),t}if(e instanceof Set){let t=new Set;return e.forEach(e=>{t.add(ps(e))}),t}let t={};for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=ps(e[n]));return t}function ms(e,t){return t===e||t.startsWith(`${e}.`)||t.startsWith(`${e}[`)}var Q=e=>{if(!e.validators)return e.runValidation({validators:[],form:e.form});let t=e.event.async,n=t?void 0:{fn:e.validators.onMount,cause:`mount`},r={fn:t?e.validators.onChangeAsync:e.validators.onChange,cause:`change`},i={fn:t?e.validators.onBlurAsync:e.validators.onBlur,cause:`blur`},a={fn:t?e.validators.onSubmitAsync:e.validators.onSubmit,cause:`submit`},o=t?void 0:{fn:()=>void 0,cause:`server`};switch(e.event.type){case`mount`:return e.runValidation({validators:[n],form:e.form});case`submit`:return e.runValidation({validators:[r,i,a,o],form:e.form});case`server`:return e.runValidation({validators:[],form:e.form});case`blur`:return e.runValidation({validators:[i,o],form:e.form});case`change`:return e.runValidation({validators:[r,o],form:e.form});default:throw Error(`Unknown validation event type: ${e.event.type}`)}};function hs(e,t){let n=new Map;for(let r of e){let e=r.path??[],i=t,a=``;for(let t=0;t<e.length;t++){let n=e[t];if(n===void 0)continue;let r=typeof n==`object`?n.key:n,o=Number(r);a+=Array.isArray(i)&&!Number.isNaN(o)?`[${o}]`:(t>0?`.`:``)+String(r),i=typeof i==`object`&&i?i[r]:void 0}n.set(a,(n.get(a)??[]).concat(r))}return Object.fromEntries(n)}var gs=(e,t)=>{let n=hs(e,t);return{form:n,fields:n}},_s={validate({value:e,validationSource:t},n){let r=n[`~standard`].validate(e);if(r instanceof Promise)throw Error(`async function passed to sync validator`);if(r.issues)return t===`field`?r.issues:gs(r.issues,e)},async validateAsync({value:e,validationSource:t},n){let r=await n[`~standard`].validate(e);if(r.issues)return t===`field`?r.issues:gs(r.issues,e)}},vs=e=>!!e&&`~standard`in e,$={isValidating:!1,isTouched:!1,isBlurred:!1,isDirty:!1,isPristine:!0,isValid:!0,isDefaultValue:!0,errors:[],errorMap:{},errorSourceMap:{},_arrayVersion:0,_pendingValidationsCount:0};function ys(e){function t(t){let n=e.getFieldMeta(t)??$;e.setFieldMeta(t,{...n,_arrayVersion:(n._arrayVersion||0)+1})}function n(n,r,i){t(n);let a=s(n,r,`move`,i),c=Math.min(r,i),u=Math.max(r,i);for(let e=c;e<=u;e++)a.push(o(n,e));let d=Object.keys(e.fieldInfo).reduce((t,i)=>(i.startsWith(o(n,r))&&t.set(i,e.getFieldMeta(i)),t),new Map);l(a,r<i?`up`:`down`),Object.keys(e.fieldInfo).filter(e=>e.startsWith(o(n,i))).forEach(t=>{let a=t.replace(o(n,i),o(n,r)),s=d.get(a);s&&e.setFieldMeta(t,s)})}function r(e,n){t(e),l(s(e,n,`remove`),`up`)}function i(n,r,i){t(n),s(n,r,`swap`,i).forEach(t=>{if(!t.toString().startsWith(o(n,r)))return;let a=t.toString().replace(o(n,r),o(n,i)),[s,c]=[e.getFieldMeta(t),e.getFieldMeta(a)];s&&e.setFieldMeta(a,s),c&&e.setFieldMeta(t,c)})}function a(n,r){t(n);let i=s(n,r,`insert`);l(i,`down`),i.forEach(t=>{t.toString().startsWith(o(n,r))&&e.setFieldMeta(t,u())})}function o(e,t){return`${e}[${t}]`}function s(t,n,r,i){let a=[o(t,n)];switch(r){case`swap`:a.push(o(t,i));break;case`move`:{let[e,r]=[Math.min(n,i),Math.max(n,i)];for(let n=e;n<=r;n++)a.push(o(t,n));break}default:{let r=e.getFieldValue(t),i=Array.isArray(r)?r.length:0;for(let e=n+1;e<i;e++)a.push(o(t,e));break}}return Object.keys(e.fieldInfo).filter(e=>a.some(t=>e.startsWith(t)))}function c(e,t){return e.replace(/\[(\d+)\]/,(e,n)=>{let r=parseInt(n,10);return`[${t===`up`?r+1:Math.max(0,r-1)}]`})}function l(t,n){(n===`up`?t:[...t].reverse()).forEach(t=>{let r=c(t.toString(),n),i=e.getFieldMeta(r);i?e.setFieldMeta(t,i):e.setFieldMeta(t,u())})}let u=()=>$;return{bumpArrayVersion:t,handleArrayMove:n,handleArrayRemove:r,handleArraySwap:i,handleArrayInsert:a}}function bs(e){return{values:e.values??{},errorMap:e.errorMap??{},fieldMetaBase:e.fieldMetaBase??{},formGroupStateBase:e.formGroupStateBase??{},isSubmitted:e.isSubmitted??!1,isSubmitting:e.isSubmitting??!1,isValidating:e.isValidating??!1,submissionAttempts:e.submissionAttempts??0,isSubmitSuccessful:e.isSubmitSuccessful??!1,validationMetaMap:e.validationMetaMap??{onChange:void 0,onBlur:void 0,onSubmit:void 0,onMount:void 0,onServer:void 0,onDynamic:void 0}}}var xs=class{constructor(e){this.options={},this.fieldInfo={},this.formGroupApis=new Set,this.mount=()=>{let e=this.store.subscribe(()=>{fs(this)}),t=Y.on(`request-form-state`,e=>{e.payload.id===this._formId&&Y.emit(`form-api`,{id:this._formId,state:this.store.state,options:this.options})}),n=Y.on(`request-form-reset`,e=>{e.payload.id===this._formId&&this.reset()}),r=Y.on(`request-form-force-submit`,e=>{e.payload.id===this._formId&&(this._devtoolsSubmissionOverride=!0,this.handleSubmit(),this._devtoolsSubmissionOverride=!1)}),i=()=>{r(),n(),t(),e.unsubscribe(),Y.emit(`form-unmounted`,{id:this._formId})};this.options.listeners?.onMount?.({formApi:this});let{onMount:a}=this.options.validators||{};return Y.emit(`form-api`,{id:this._formId,state:this.store.state,options:this.options}),a&&this.validateSync(`mount`),i},this.update=e=>{if(!e)return;let t=this.options;this.options=e;let n=e.defaultValues&&!X(e.defaultValues,t.defaultValues)&&!this.state.isTouched,r=!X(e.defaultState,t.defaultState)&&!this.state.isTouched;if(n||r){if(U(()=>{this.baseStore.setState(()=>bs(Object.assign({},this.state,r?e.defaultState:{},n?{values:e.defaultValues}:{})))}),n){let e=ys(this);for(let t of Object.keys(this.fieldInfo))Array.isArray(this.getFieldValue(t))&&e.bumpArrayVersion(t)}Y.emit(`form-api`,{id:this._formId,state:this.store.state,options:this.options})}},this.reset=(e,t)=>{let{fieldMeta:n}=this.state,r=this.resetFieldMeta(n);e&&!t?.keepDefaultValues&&(this.options={...this.options,defaultValues:e}),this.baseStore.setState(()=>{let t=e??this.options.defaultValues??this.options.defaultState?.values;return e||Object.values(this.fieldInfo).forEach(e=>{e.instance&&e.instance.options.defaultValue!==void 0&&(t=Jo(t,e.instance.name,e.instance.options.defaultValue))}),bs({...this.options.defaultState,values:t,fieldMetaBase:r})})},this.validateAllFields=async e=>{let t=[];return U(()=>{Object.values(this.fieldInfo).forEach(n=>{if(!n.instance)return;let r=n.instance;t.push(Promise.resolve().then(()=>r.validate(e,{skipFormValidation:!0,skipGroupValidation:!0}))),n.instance.store.state.meta.isTouched||n.instance.setMeta(e=>({...e,isTouched:!0}))})}),(await Promise.all(t)).flat()},this.validateArrayFieldsStartingFrom=async(e,t,n)=>{let r=this.getFieldValue(e),i=Array.isArray(r)?Math.max(r.length-1,0):null,a=[`${e}[${t}]`];for(let n=t+1;n<=(i??0);n++)a.push(`${e}[${n}]`);let o=Object.keys(this.fieldInfo).filter(e=>a.some(t=>e.startsWith(t))),s=[];return U(()=>{o.forEach(e=>{s.push(Promise.resolve().then(()=>this.validateField(e,n)))})}),(await Promise.all(s)).flat()},this.validateField=(e,t)=>{let n=this.fieldInfo[e]?.instance;if(!n){let{hasErrored:n}=this.validateSync(t);return n&&!this.options.asyncAlways?this.getFieldMeta(e)?.errors??[]:this.validateAsync(t).then(()=>this.getFieldMeta(e)?.errors??[])}return n.store.state.meta.isTouched||n.setMeta(e=>({...e,isTouched:!0})),n.validate(t)},this.validateSync=(e,t)=>{let n=rs(e,{...this.options,form:this,group:t?.group,validationLogic:this.options.validationLogic||Q}),r=!1,i={};return U(()=>{for(let e of n){if(!e.validate)continue;let{formError:n,fieldErrors:a}=Ss(this.runValidator({validate:e.validate,value:{value:this.state.values,formApi:this,validationSource:`form`},type:`validate`})),o=Cs(e.cause),s=new Set([...Object.keys(this.state.fieldMeta),...Object.keys(a||{})]);t?.filterFieldNames&&(s=new Set([...s].filter(t.filterFieldNames)));for(let e of s){if(this.baseStore.state.fieldMetaBase[e]===void 0&&!a?.[e])continue;let{errorMap:t,errorSourceMap:n}=this.getFieldMeta(e)??$,r=a?.[e],{newErrorValue:s,newSource:c}=os({newFormValidatorError:r,isPreviousErrorFromFormValidator:n?.[o]===`form`,previousErrorValue:t?.[o]});c===`form`&&(i[e]={...i[e],[o]:r}),t?.[o]!==s&&this.setFieldMeta(e,(e=$)=>({...e,errorMap:{...e.errorMap,[o]:s},errorSourceMap:{...e.errorSourceMap,[o]:c}}))}t?.dontUpdateFormErrorMap||this.state.errorMap?.[o]!==n&&this.baseStore.setState(e=>({...e,errorMap:{...e.errorMap,[o]:n}})),(n||a)&&(r=!0)}if(t?.dontUpdateFormErrorMap)return;let a=Cs(`submit`);this.state.errorMap?.[a]&&e!==`submit`&&!r&&this.baseStore.setState(e=>({...e,errorMap:{...e.errorMap,[a]:void 0}}));let o=Cs(`server`);this.state.errorMap?.[o]&&e!==`server`&&!r&&this.baseStore.setState(e=>({...e,errorMap:{...e.errorMap,[o]:void 0}}))}),{hasErrored:r,fieldsErrorMap:i}},this.validateAsync=async(e,t)=>{let n=is(e,{...this.options,form:this,group:t?.group,validationLogic:this.options.validationLogic||Q});this.state.isFormValidating||this.baseStore.setState(e=>({...e,isFormValidating:!0}));let r=[],i;for(let e of n){if(!e.validate)continue;let n=Cs(e.cause);this.state.validationMetaMap[n]?.lastAbortController.abort();let a=new AbortController;this.state.validationMetaMap[n]={lastAbortController:a},r.push(new Promise(async n=>{let r;try{r=await new Promise((t,n)=>{setTimeout(async()=>{if(a.signal.aborted)return t(void 0);try{t(await this.runValidator({validate:e.validate,value:{value:this.state.values,formApi:this,validationSource:`form`,signal:a.signal},type:`validateAsync`}))}catch(e){n(e)}},e.debounceMs)})}catch(e){r=e}let{formError:o,fieldErrors:s}=Ss(r);s&&(i=i?{...i,...s}:s);let c=Cs(e.cause),l=new Set([...Object.keys(this.state.fieldMeta),...Object.keys(i||{})]),u=Array.from(l);t?.filterFieldNames&&(u=u.filter(t.filterFieldNames));for(let e of u){if(this.baseStore.state.fieldMetaBase[e]===void 0&&!i?.[e])continue;let{errorMap:t,errorSourceMap:n}=this.getFieldMeta(e)??$,r=i?.[e],{newErrorValue:a,newSource:o}=os({newFormValidatorError:r,isPreviousErrorFromFormValidator:n?.[c]===`form`,previousErrorValue:t?.[c]});t?.[c]!==a&&this.setFieldMeta(e,(e=$)=>({...e,errorMap:{...e.errorMap,[c]:a},errorSourceMap:{...e.errorSourceMap,[c]:o}}))}t?.dontUpdateFormErrorMap||this.baseStore.setState(e=>({...e,errorMap:{...e.errorMap,[c]:o}})),n(i?{fieldErrors:i,errorMapKey:c}:void 0)}))}let a=[],o={};if(r.length){a=await Promise.all(r);for(let e of a)if(e?.fieldErrors){let{errorMapKey:t}=e;for(let[n,r]of Object.entries(e.fieldErrors))o[n]={...o[n]||{},[t]:r}}}return this.baseStore.setState(e=>({...e,isFormValidating:!1})),o},this.validate=(e,t)=>{let{hasErrored:n,fieldsErrorMap:r}=this.validateSync(e,t);return n&&!this.options.asyncAlways?r:this.validateAsync(e,t)},this._handleSubmit=async e=>{this.baseStore.setState(e=>({...e,isSubmitted:!1,submissionAttempts:e.submissionAttempts+1,isSubmitSuccessful:!1})),U(()=>{Object.values(this.fieldInfo).forEach(e=>{e.instance&&(e.instance.store.state.meta.isTouched||e.instance.setMeta(e=>({...e,isTouched:!0})))})});let t=e??this.options.onSubmitMeta;if(!this.state.canSubmit&&!this._devtoolsSubmissionOverride&&this.baseStore.state.submissionAttempts<=1){this.options.onSubmitInvalid?.({value:this.state.values,formApi:this,meta:t});return}this.baseStore.setState(e=>({...e,isSubmitting:!0}));let n=()=>{this.baseStore.setState(e=>({...e,isSubmitting:!1}))};if(await this.validateAllFields(`submit`),!this.state.isFieldsValid)n(),this.options.onSubmitInvalid?.({value:this.state.values,formApi:this,meta:t}),Y.emit(`form-submission`,{id:this._formId,submissionAttempt:this.state.submissionAttempts,successful:!1,stage:`validateAllFields`,errors:Object.values(this.state.fieldMeta).map(e=>e.errors).flat()});else if(await this.validate(`submit`),!this.state.isValid)n(),this.options.onSubmitInvalid?.({value:this.state.values,formApi:this,meta:t}),Y.emit(`form-submission`,{id:this._formId,submissionAttempt:this.state.submissionAttempts,successful:!1,stage:`validate`,errors:this.state.errors});else{U(()=>{Object.values(this.fieldInfo).forEach(e=>{e.instance?.triggerOnSubmitListener()})}),this.options.listeners?.onSubmit?.({formApi:this,meta:t});try{await this.options.onSubmit?.({value:this.state.values,formApi:this,meta:t}),U(()=>{this.baseStore.setState(e=>({...e,isSubmitted:!0,isSubmitSuccessful:!0})),Y.emit(`form-submission`,{id:this._formId,submissionAttempt:this.state.submissionAttempts,successful:!0}),n()})}catch(e){throw this.baseStore.setState(e=>({...e,isSubmitSuccessful:!1})),Y.emit(`form-submission`,{id:this._formId,submissionAttempt:this.state.submissionAttempts,successful:!1,stage:`inflight`,onError:e}),n(),e}}},this.getFieldValue=e=>qo(this.state.values,e),this.getFieldMeta=e=>this.state.fieldMeta[e],this.getFormGroupMeta=e=>this.formGroupMetaDerived.state[e],this.getFieldInfo=e=>this.fieldInfo[e]||={instance:null,validationMetaMap:{onChange:void 0,onBlur:void 0,onSubmit:void 0,onMount:void 0,onServer:void 0,onDynamic:void 0}},this.setFieldMeta=(e,t)=>{this.baseStore.setState(n=>({...n,fieldMetaBase:{...n.fieldMetaBase,[e]:Ko(t,n.fieldMetaBase[e])}}))},this.resetFieldMeta=e=>Object.keys(e).reduce((e,t)=>{let n=t;return e[n]=$,e},{}),this.setFieldValue=(e,t,n)=>{let r=n?.dontUpdateMeta??!1,i=n?.dontRunListeners??!1,a=n?.dontValidate??!1;U(()=>{r||this.setFieldMeta(e,e=>({...e,isTouched:!0,isDirty:!0,errorMap:{...e?.errorMap,onMount:void 0}})),this.baseStore.setState(n=>({...n,values:Jo(n.values,e,t)}))}),i||this.getFieldInfo(e).instance?.triggerOnChangeListener(),a||this.validateField(e,`change`)},this.deleteField=e=>{let t=[...Object.keys(this.fieldInfo).filter(t=>{let n=e.toString();return t.startsWith(`${n}.`)||t.startsWith(`${n}[`)}),e];this.baseStore.setState(e=>{let n={...e};return t.forEach(e=>{n.values=Yo(n.values,e),delete this.fieldInfo[e],delete n.fieldMetaBase[e]}),n})},this.pushFieldValue=(e,t,n)=>{this.setFieldValue(e,e=>[...Array.isArray(e)?e:[],t],n),ys(this).bumpArrayVersion(e)},this.insertFieldValue=async(e,t,n,r)=>{this.setFieldValue(e,e=>[...e.slice(0,t),n,...e.slice(t)],Z(r,{dontValidate:!0}));let i=r?.dontValidate??!1;i||await this.validateField(e,`change`),ys(this).handleArrayInsert(e,t),i||await this.validateArrayFieldsStartingFrom(e,t,`change`)},this.replaceFieldValue=async(e,t,n,r)=>{this.setFieldValue(e,e=>e.map((e,r)=>r===t?n:e),Z(r,{dontValidate:!0})),ys(this).bumpArrayVersion(e),(r?.dontValidate??!1)||(await this.validateField(e,`change`),await this.validateArrayFieldsStartingFrom(e,t,`change`))},this.removeFieldValue=async(e,t,n)=>{let r=this.getFieldValue(e),i=Array.isArray(r)?Math.max(r.length-1,0):null;if(this.setFieldValue(e,e=>e.filter((e,n)=>n!==t),Z(n,{dontValidate:!0})),ys(this).handleArrayRemove(e,t),i!==null){let t=`${e}[${i}]`;this.deleteField(t)}(n?.dontValidate??!1)||(await this.validateField(e,`change`),await this.validateArrayFieldsStartingFrom(e,t,`change`))},this.swapFieldValues=(e,t,n,r)=>{this.setFieldValue(e,e=>{let r=e[t],i=e[n];return Jo(Jo(e,`${t}`,i),`${n}`,r)},Z(r,{dontValidate:!0})),ys(this).handleArraySwap(e,t,n),(r?.dontValidate??!1)||(this.validateField(e,`change`),this.validateField(`${e}[${t}]`,`change`),this.validateField(`${e}[${n}]`,`change`))},this.moveFieldValues=(e,t,n,r)=>{this.setFieldValue(e,e=>{let r=[...e];return r.splice(n,0,r.splice(t,1)[0]),r},Z(r,{dontValidate:!0})),ys(this).handleArrayMove(e,t,n),(r?.dontValidate??!1)||(this.validateField(e,`change`),this.validateField(`${e}[${t}]`,`change`),this.validateField(`${e}[${n}]`,`change`))},this.clearFieldValues=(e,t)=>{let n=this.getFieldValue(e),r=Array.isArray(n)?Math.max(n.length-1,0):null;if(this.setFieldValue(e,[],Z(t,{dontValidate:!0})),ys(this).bumpArrayVersion(e),r!==null)for(let t=0;t<=r;t++){let n=`${e}[${t}]`;this.deleteField(n)}(t?.dontValidate??!1)||this.validateField(e,`change`)},this.resetField=e=>{this.baseStore.setState(t=>{let n=this.getFieldInfo(e).instance?.options.defaultValue,r=qo(this.options.defaultValues,e),i=n??r;return{...t,fieldMetaBase:{...t.fieldMetaBase,[e]:$},values:i===void 0?t.values:Jo(t.values,e,i)}})},this.setErrorMap=e=>{U(()=>{Object.entries(e).forEach(([e,t])=>{let n=e;if(as(t)){let{formError:e,fieldErrors:r}=Ss(t);for(let e of Object.keys(this.fieldInfo))this.getFieldMeta(e)&&this.setFieldMeta(e,t=>({...t,errorMap:{...t.errorMap,[n]:r?.[e]},errorSourceMap:{...t.errorSourceMap,[n]:`form`}}));this.baseStore.setState(t=>({...t,errorMap:{...t.errorMap,[n]:e}}))}else this.baseStore.setState(e=>({...e,errorMap:{...e.errorMap,[n]:t}}))})})},this.getAllErrors=()=>({form:{errors:this.state.errors,errorMap:this.state.errorMap},fields:Object.entries(this.state.fieldMeta).reduce((e,[t,n])=>(Object.keys(n).length&&n.errors.length&&(e[t]={errors:n.errors,errorMap:n.errorMap}),e),{})}),this.parseValuesWithSchema=e=>_s.validate({value:this.state.values,validationSource:`form`},e),this.parseValuesWithSchemaAsync=e=>_s.validateAsync({value:this.state.values,validationSource:`form`},e),this.timeoutIds={validations:{},listeners:{},formListeners:{}},this._formId=e?.formId??ds(),this._devtoolsSubmissionOverride=!1;let t=bs({...e?.defaultState,values:e?.defaultValues??e?.defaultState?.values});if(e?.transform){t=e.transform({state:t}).state;for(let e of Object.keys(t.errorMap)){let n=t.errorMap[e];if(n!==void 0&&as(n))for(let r of Object.keys(n.fields)){let i=n.fields[r];if(i===void 0)continue;let a=t.fieldMetaBase[r];t.fieldMetaBase[r]={isTouched:!1,isValidating:!1,isBlurred:!1,isDirty:!1,_arrayVersion:0,_pendingValidationsCount:0,...a??{},errorSourceMap:{...a?.errorSourceMap??{},onChange:`form`},errorMap:{...a?.errorMap??{},[e]:i}}}}}this.baseStore=Yn(t);let n;this.fieldMetaDerived=Yn(e=>{let t=this.baseStore.get(),r=0,i={};for(let a of Object.keys(t.fieldMetaBase)){let o=t.fieldMetaBase[a],s=n?.fieldMetaBase[a],c=e?.[a],l=qo(t.values,a),u=c?.errors;if(!s||o.errorMap!==s.errorMap){u=Object.values(o.errorMap??{}).filter(e=>e!==void 0);let e=this.getFieldInfo(a)?.instance;e&&e.options.disableErrorFlat||(u=u.flat(1))}let d=!ns(u),f=!o.isDirty,p=X(l,this.getFieldInfo(a)?.instance?.options.defaultValue??qo(this.options.defaultValues,a));c&&c.isPristine===f&&c.isValid===d&&c.isDefaultValue===p&&c.errors===u&&o===s?(i[a]=c,r++):i[a]={...o,errors:u??[],isPristine:f,isValid:d,isDefaultValue:p}}return Object.keys(t.fieldMetaBase).length?e&&r===Object.keys(t.fieldMetaBase).length?e:(n=this.baseStore.get(),i):i}),this.formGroupMetaDerived=Yn(e=>{let t=this.baseStore.get(),n=this.fieldMetaDerived.get(),r={};for(let i of this.formGroupApis){let a=i.name,o=t.formGroupStateBase[a]??{isSubmitted:!1,isSubmitting:!1,isValidating:!1,submissionAttempts:0,isSubmitSuccessful:!1},s=n[a],c=!1,l=!0,u=!1,d=!1,f=!0,p=!1;for(let e in n){if(e===a||!ms(a,e))continue;let t=n[e];t&&(t.isValidating&&(c=!0),t.isValid||(l=!1),t.isTouched&&(u=!0),t.isBlurred&&(d=!0),t.isDefaultValue||(f=!1),t.isDirty&&(p=!0))}let m=!p,h=!!c||o.isValidating,g=s?.errorMap??{},_=s?.errorSourceMap??{},v=!!(g.onMount||Object.entries(n).some(([e,t])=>t&&e!==a&&ms(a,e)&&t.errorMap.onMount)),y=e?.[a],b=y?.errors??[];y&&y.__srcErrorMap===g||(b=Object.values(g).reduce((e,t)=>{if(t===void 0)return e;if(t&&typeof t==`object`&&`fields`in t){let n=t.group;return n!==void 0&&e.push(n),e}return e.push(t),e},[]));let x=b.length===0,S=l&&x,C=i.options.canSubmitWhenInvalid??!1,w=o.submissionAttempts===0&&!u&&!v||!h&&!o.isSubmitting&&S||C;if(y&&y.errorMap===g&&y.errorSourceMap===_&&y.errors===b&&y.isFieldsValidating===c&&y.isFieldsValid===l&&y.isGroupValid===x&&y.isValid===S&&y.canSubmit===w&&y.isTouched===u&&y.isBlurred===d&&y.isPristine===m&&y.isDefaultValue===f&&y.isDirty===p&&y.isValidating===h&&y.isSubmitting===o.isSubmitting&&y.isSubmitted===o.isSubmitted&&y.submissionAttempts===o.submissionAttempts&&y.isSubmitSuccessful===o.isSubmitSuccessful){r[a]=y;continue}let T={...o,errorMap:g,errorSourceMap:_,_arrayVersion:s?._arrayVersion??0,isTouched:u,isBlurred:d,isDirty:p,isPristine:m,isDefaultValue:f,isValid:S,errors:b,isValidating:h,isFieldsValidating:c,isFieldsValid:l,isGroupValid:x,canSubmit:w};Object.defineProperty(T,"__srcErrorMap",{value:g,enumerable:!1,configurable:!0}),r[a]=T}return r});let r;this.store=Yn(e=>{let t=this.baseStore.get(),n=this.fieldMetaDerived.get(),i=Object.values(n).filter(Boolean),a=i.some(e=>e.isValidating),o=i.every(e=>e.isValid),s=i.some(e=>e.isTouched),c=i.some(e=>e.isBlurred),l=i.every(e=>e.isDefaultValue),u=s&&t.errorMap?.onMount,d=i.some(e=>e.isDirty),f=!d,p=!!(t.errorMap?.onMount||i.some(e=>e?.errorMap?.onMount)),m=!!a,h=e?.errors??[];r&&t.errorMap===r.errorMap||(h=Object.values(t.errorMap).reduce((e,t)=>t===void 0?e:t&&as(t)?(e.push(t.form),e):(e.push(t),e),[]));let g=h.length===0,_=o&&g,v=this.options.canSubmitWhenInvalid??!1,y=t.submissionAttempts===0&&!s&&!p||!m&&!t.isSubmitting&&_||v,b=t.errorMap;if(u&&(h=h.filter(e=>e!==t.errorMap.onMount),b=Object.assign(b,{onMount:void 0})),e&&r&&e.errorMap===b&&e.fieldMeta===this.fieldMetaDerived.state&&e.errors===h&&e.isFieldsValidating===a&&e.isFieldsValid===o&&e.isFormValid===g&&e.isValid===_&&e.canSubmit===y&&e.isTouched===s&&e.isBlurred===c&&e.isPristine===f&&e.isDefaultValue===l&&e.isDirty===d&&X(r,t))return e;let x={...t,errorMap:b,fieldMeta:this.fieldMetaDerived.state,errors:h,isFieldsValidating:a,isFieldsValid:o,isFormValid:g,isValid:_,canSubmit:y,isTouched:s,isBlurred:c,isPristine:f,isDefaultValue:l,isDirty:d};return r=this.baseStore.get(),x}),this.handleSubmit=this.handleSubmit.bind(this),this.update(e||{})}get state(){return this.store.state}get formId(){return this._formId}runValidator(e){return vs(e.validate)?_s[e.type](e.value,e.validate):e.validate(e.value)}handleSubmit(e){return this._handleSubmit(e)}};function Ss(e){return e?as(e)?{formError:Ss(e.form).formError,fieldErrors:e.fields}:{formError:e}:{formError:void 0}}function Cs(e){switch(e){case`submit`:return`onSubmit`;case`blur`:return`onBlur`;case`mount`:return`onMount`;case`server`:return`onServer`;case`dynamic`:return`onDynamic`;default:return`onChange`}}var ws=class e{constructor(t){this.options={},this.mount=()=>{this.options.defaultValue!==void 0&&!this.getMeta().isTouched&&this.form.setFieldValue(this.name,this.options.defaultValue,{dontUpdateMeta:!0});let e=this.getInfo();e.instance=this,this.update(this.options);let{onMount:t}=this.options.validators||{};if(t){let e=this.runValidator({validate:t,value:{value:this.state.value,fieldApi:this,validationSource:`field`},type:`validate`});e&&this.setMeta(t=>({...t,errorMap:{...t?.errorMap,onMount:e},errorSourceMap:{...t?.errorSourceMap,onMount:`field`}}))}return this.options.listeners?.onMount?.({value:this.state.value,fieldApi:this}),()=>{for(let[e,t]of Object.entries(this.timeoutIds.validations))t&&(clearTimeout(t),this.timeoutIds.validations[e]=null);for(let[e,t]of Object.entries(this.timeoutIds.listeners))t&&(clearTimeout(t),this.timeoutIds.listeners[e]=null);for(let[e,t]of Object.entries(this.timeoutIds.formListeners))t&&(clearTimeout(t),this.timeoutIds.formListeners[e]=null);let e=this.form.fieldInfo[this.name];if(e&&e.instance===this){for(let[t,n]of Object.entries(e.validationMetaMap))n?.lastAbortController.abort(),e.validationMetaMap[t]=void 0;this.form.baseStore.setState(e=>({...e,fieldMetaBase:{...e.fieldMetaBase,[this.name]:{...$,isTouched:e.fieldMetaBase[this.name]?.isTouched??$.isTouched,isBlurred:e.fieldMetaBase[this.name]?.isBlurred??$.isBlurred,isDirty:e.fieldMetaBase[this.name]?.isDirty??$.isDirty}}})),e.instance=null,this.options.listeners?.onUnmount?.({value:this.state.value,fieldApi:this}),this.form.options.listeners?.onFieldUnmount?.({formApi:this.form,fieldApi:this})}}},this.update=e=>{this.options=e,this.name=e.name,this.state.meta.isTouched||this.options.defaultValue===void 0||X(this.form.getFieldValue(this.name),e.defaultValue)||this.form.setFieldValue(this.name,e.defaultValue,{dontUpdateMeta:!0,dontValidate:!0,dontRunListeners:!0}),this.form.getFieldMeta(this.name)||this.form.setFieldMeta(this.name,this.state.meta)},this.getValue=()=>this.form.getFieldValue(this.name),this.setValue=(e,t)=>{this.form.setFieldValue(this.name,e,Z(t,{dontRunListeners:!0,dontValidate:!0})),t?.dontRunListeners||this.triggerOnChangeListener(),t?.dontValidate||this.validate(`change`)},this.getMeta=()=>this.store.state.meta,this.setMeta=e=>this.form.setFieldMeta(this.name,e),this.getInfo=()=>this.form.getFieldInfo(this.name),this.pushValue=(e,t)=>{this.form.pushFieldValue(this.name,e,Z(t,{dontRunListeners:!0})),t?.dontRunListeners||this.triggerOnChangeListener()},this.insertValue=(e,t,n)=>{this.form.insertFieldValue(this.name,e,t,Z(n,{dontRunListeners:!0})),n?.dontRunListeners||this.triggerOnChangeListener()},this.replaceValue=(e,t,n)=>{this.form.replaceFieldValue(this.name,e,t,Z(n,{dontRunListeners:!0})),n?.dontRunListeners||this.triggerOnChangeListener()},this.removeValue=(e,t)=>{this.form.removeFieldValue(this.name,e,Z(t,{dontRunListeners:!0})),t?.dontRunListeners||this.triggerOnChangeListener()},this.swapValues=(e,t,n)=>{this.form.swapFieldValues(this.name,e,t,Z(n,{dontRunListeners:!0})),n?.dontRunListeners||this.triggerOnChangeListener()},this.moveValue=(e,t,n)=>{this.form.moveFieldValues(this.name,e,t,Z(n,{dontRunListeners:!0})),n?.dontRunListeners||this.triggerOnChangeListener()},this.clearValues=e=>{this.form.clearFieldValues(this.name,Z(e,{dontRunListeners:!0})),e?.dontRunListeners||this.triggerOnChangeListener()},this.getLinkedFields=t=>{let n=Object.values(this.form.fieldInfo),r=[];for(let i of n){if(!i.instance||!(i.instance instanceof e))continue;let{onChangeListenTo:n,onBlurListenTo:a}=i.instance.options.validators||{};t===`change`&&n?.includes(this.name)&&r.push(i.instance),t===`blur`&&a?.includes(this.name)&&r.push(i.instance)}return r},this.validateSync=(e,t)=>{let n=rs(e,{...this.options,form:this.form,fieldName:this.name,validationLogic:this.form.options.validationLogic||Q}),r=this.getLinkedFields(e).reduce((t,n)=>{let r=rs(e,{...n.options,form:n.form,fieldName:n.name,validationLogic:n.form.options.validationLogic||Q});return r.forEach(e=>{e.field=n}),t.concat(r)},[]),i=!1;U(()=>{let e=(e,n)=>{let r=Es(n.cause),a=n.validate?Ts(e.runValidator({validate:n.validate,value:{value:e.store.state.value,validationSource:`field`,fieldApi:e},type:`validate`})):void 0,o=t[r],{newErrorValue:s,newSource:c}=ss({formLevelError:o,fieldLevelError:a});e.state.meta.errorMap?.[r]!==s&&e.setMeta(e=>({...e,errorMap:{...e.errorMap,[r]:s},errorSourceMap:{...e.errorSourceMap,[r]:c}})),s&&(i=!0)};for(let t of n)e(this,t);for(let t of r)t.validate&&e(t.field,t)});let a=Es(`submit`);return this.state.meta.errorMap?.[a]&&e!==`submit`&&!i&&this.setMeta(e=>({...e,errorMap:{...e.errorMap,[a]:void 0},errorSourceMap:{...e.errorSourceMap,[a]:void 0}})),{hasErrored:i}},this.validateAsync=async(e,t)=>{let n=is(e,{...this.options,form:this.form,fieldName:this.name,validationLogic:this.form.options.validationLogic||Q}),r=await t,i=this.getLinkedFields(e).reduce((t,n)=>{let r=is(e,{...n.options,form:n.form,fieldName:n.name,validationLogic:n.form.options.validationLogic||Q});return r.forEach(e=>{e.field=n}),t.concat(r)},[]),a=[],o=[],s=n.some(e=>e.validate),c=Array.from(new Set(i.filter(e=>e.validate).map(e=>e.field)));U(()=>{s&&this.startValidation();for(let e of c)e.startValidation()});let l=(e,t,n)=>{let i=Es(t.cause),a=e.getInfo();a.validationMetaMap[i]?.lastAbortController.abort();let o=new AbortController;a.validationMetaMap[i]={lastAbortController:o},n.push(new Promise(async n=>{let a;try{a=await new Promise((n,r)=>{e.timeoutIds.validations[t.cause]&&(clearTimeout(e.timeoutIds.validations[t.cause]),e.endValidation()),e.timeoutIds.validations[t.cause]=setTimeout(async()=>{if(o.signal.aborted)return n(void 0);try{n(await this.runValidator({validate:t.validate,value:{value:e.store.state.value,fieldApi:e,signal:o.signal,validationSource:`field`},type:`validateAsync`}))}catch(e){r(e)}},t.debounceMs)})}catch(e){a=e}if(o.signal.aborted)return n(void 0);let s=Ts(a),c=r[e.name]?.[i],{newErrorValue:l,newSource:u}=ss({formLevelError:c,fieldLevelError:s});if(e.getInfo().instance!==e)return n(void 0);e.setMeta(e=>({...e,errorMap:{...e?.errorMap,[i]:l},errorSourceMap:{...e.errorSourceMap,[i]:u}})),n(l)}))};for(let e of n)e.validate&&l(this,e,a);for(let e of i)e.validate&&l(e.field,e,o);let u=[];return(a.length||o.length)&&(u=await Promise.all(a),await Promise.all(o)),U(()=>{s&&this.endValidation();for(let e of c)e.endValidation()}),u.filter(Boolean)},this.validate=(e,t)=>{if(!this.state.meta.isTouched)return[];let n=t?.skipGroupValidation?[]:Array.from(this.form.formGroupApis).filter(e=>this.name.startsWith(e.name)),r=(t?.skipFormValidation?{fieldsErrorMap:{}}:this.form.validateSync(e)).fieldsErrorMap[this.name]??{};if(!t?.skipFormValidation)for(let t of n){if(t.state.meta.submissionAttempts===0)continue;let{fieldsErrorMap:n}=this.form.validateSync(e,{group:t,dontUpdateFormErrorMap:!0,filterFieldNames:e=>ms(t.name,e)});r={...r,...n[this.name]??{}}}let{hasErrored:i}=this.validateSync(e,r),a=new WeakMap;for(let t of n){let{hasErrored:n}=t.validateSync(e,{},{skipRelatedFieldValidation:!0});a.set(t,n)}if(i&&!this.options.asyncAlways){this.getInfo().validationMetaMap[Es(e)]?.lastAbortController.abort();let t=[];for(let r of n)r.getInfo().validationMetaMap[Es(e)]?.lastAbortController.abort(),t.push(r.state.meta.errors);return[...this.state.meta.errors,...t.flat()]}let o=t?.skipFormValidation?Promise.resolve({}):this.form.validateAsync(e),s=this.validateAsync(e,o),c=[];for(let t of n)(!a.get(t)||t.options.asyncAlways)&&c.push(t.validateAsync(e,o,{skipRelatedFieldValidation:!0}));return c.length===0?s:Promise.all([s,...c]).then(e=>e.flat())},this.handleChange=e=>{this.setValue(e)},this.handleBlur=()=>{this.state.meta.isTouched||this.setMeta(e=>({...e,isTouched:!0})),this.state.meta.isBlurred||this.setMeta(e=>({...e,isBlurred:!0})),this.validate(`blur`),this.triggerOnBlurListener()},this.setErrorMap=e=>{this.setMeta(t=>({...t,errorMap:{...t.errorMap,...e}}))},this.parseValueWithSchema=e=>_s.validate({value:this.state.value,validationSource:`field`},e),this.parseValueWithSchemaAsync=e=>_s.validateAsync({value:this.state.value,validationSource:`field`},e),this.triggerOnBlurListener=()=>{let e=this.form.options.listeners?.onBlurDebounceMs;e&&e>0?(this.timeoutIds.formListeners.blur&&clearTimeout(this.timeoutIds.formListeners.blur),this.timeoutIds.formListeners.blur=setTimeout(()=>{this.form.options.listeners?.onBlur?.({formApi:this.form,fieldApi:this})},e)):this.form.options.listeners?.onBlur?.({formApi:this.form,fieldApi:this});let t=this.options.listeners?.onBlurDebounceMs;t&&t>0?(this.timeoutIds.listeners.blur&&clearTimeout(this.timeoutIds.listeners.blur),this.timeoutIds.listeners.blur=setTimeout(()=>{this.options.listeners?.onBlur?.({value:this.state.value,fieldApi:this})},t)):this.options.listeners?.onBlur?.({value:this.state.value,fieldApi:this})},this.triggerOnChangeListener=()=>{let e=this.form.options.listeners?.onChangeDebounceMs;e&&e>0?(this.timeoutIds.formListeners.change&&clearTimeout(this.timeoutIds.formListeners.change),this.timeoutIds.formListeners.change=setTimeout(()=>{this.form.options.listeners?.onChange?.({formApi:this.form,fieldApi:this})},e)):this.form.options.listeners?.onChange?.({formApi:this.form,fieldApi:this});let t=this.options.listeners?.onChangeDebounceMs;t&&t>0?(this.timeoutIds.listeners.change&&clearTimeout(this.timeoutIds.listeners.change),this.timeoutIds.listeners.change=setTimeout(()=>{this.options.listeners?.onChange?.({value:this.state.value,fieldApi:this})},t)):this.options.listeners?.onChange?.({value:this.state.value,fieldApi:this});for(let e of this.form.formGroupApis)ms(e.name,this.name)&&e.triggerOnChangeListener()},this.triggerOnSubmitListener=()=>{this.options.listeners?.onSubmit?.({value:this.state.value,fieldApi:this})},this.form=t.form,this.name=t.name,this.options=t,this.timeoutIds={validations:{},listeners:{},formListeners:{}},this.store=Yn(e=>{this.form.store.get();let n=this.form.getFieldMeta(this.name)??{...$,...t.defaultMeta},r=this.form.getFieldValue(this.name);return!n.isTouched&&r===void 0&&this.options.defaultValue!==void 0&&!X(r,this.options.defaultValue)&&(r=this.options.defaultValue),e&&e.value===r&&e.meta===n?e:{value:r,meta:n}})}get state(){return this.store.state}runValidator(e){return vs(e.validate)?_s[e.type](e.value,e.validate):e.validate(e.value)}startValidation(){this.setMeta(e=>{let t=e._pendingValidationsCount+1;return{...e,_pendingValidationsCount:t,isValidating:t>0&&!e.isValidating||e.isValidating}})}endValidation(){this.setMeta(e=>{let t=Math.max(0,e._pendingValidationsCount-1);return{...e,_pendingValidationsCount:t,isValidating:t===0&&e.isValidating?!1:e.isValidating}})}};function Ts(e){if(e)return e}function Es(e){switch(e){case`submit`:return`onSubmit`;case`blur`:return`onBlur`;case`mount`:return`onMount`;case`server`:return`onServer`;case`dynamic`:return`onDynamic`;default:return`onChange`}}function Ds(e){return{isSubmitted:e.isSubmitted??!1,isSubmitting:e.isSubmitting??!1,isValidating:e.isValidating??!1,submissionAttempts:e.submissionAttempts??0,isSubmitSuccessful:e.isSubmitSuccessful??!1}}function Os(e){return{...$,...e,errors:[],isPristine:!0,isValid:!0,isDefaultValue:!0,isFieldsValidating:!1,isFieldsValid:!0,isGroupValid:!0,canSubmit:!0,isSubmitting:!1,isSubmitted:!1,isValidating:!1,submissionAttempts:0,isSubmitSuccessful:!1}}var ks=class e{constructor(t){this.options={},this.setFormGroupState=e=>{this.form.baseStore.setState(t=>{let n=t.formGroupStateBase[this.name]??Ds({});return{...t,formGroupStateBase:{...t.formGroupStateBase,[this.name]:e(n)}}})},this._lastDistributedFieldNames={},this.update=e=>{this.options=e,this.name=e.name,this.state.meta.isTouched||this.options.defaultValue===void 0||X(this.form.getFieldValue(this.name),e.defaultValue)||this.form.setFieldValue(this.name,e.defaultValue,{dontUpdateMeta:!0,dontValidate:!0,dontRunListeners:!0}),this.form.getFieldMeta(this.name)||this.form.setFieldMeta(this.name,{...$,...this.options.defaultMeta})},this.mount=()=>{this.update(this.options),this.form.formGroupApis.add(this),this.fieldInfo.instance=this,this.form.baseStore.setState(e=>({...e,formGroupStateBase:{...e.formGroupStateBase,[this.name]:e.formGroupStateBase[this.name]??Ds({...this.options.defaultState})}}));let{onMount:e}=this.options.validators||{};if(e){let t=this.runValidator({validate:e,value:{value:this.state.value,groupApi:this,validationSource:`form`},type:`validate`}),n=t,r;js(t)&&(n=t.group,r=t.fields);let i=As(n);i&&this.setMeta(e=>({...e,errorMap:{...e.errorMap,onMount:i},errorSourceMap:{...e.errorSourceMap,onMount:`field`}})),this.distributeFieldErrors(`onMount`,r)}return this.options.listeners?.onMount?.({value:this.state.value,groupApi:this}),()=>{for(let[e,t]of Object.entries(this.timeoutIds.validations))t&&(clearTimeout(t),this.timeoutIds.validations[e]=null);for(let[e,t]of Object.entries(this.timeoutIds.listeners))t&&(clearTimeout(t),this.timeoutIds.listeners[e]=null);for(let[e,t]of Object.entries(this.timeoutIds.formListeners))t&&(clearTimeout(t),this.timeoutIds.formListeners[e]=null);if(this.fieldInfo.instance===this){for(let[e,t]of Object.entries(this.fieldInfo.validationMetaMap))t?.lastAbortController.abort(),this.fieldInfo.validationMetaMap[e]=void 0;this.form.formGroupApis.delete(this),this.form.baseStore.setState(e=>({...e,formGroupStateBase:{...e.formGroupStateBase,[this.name]:Ds({})}})),this.fieldInfo.instance=null,this.options.listeners?.onUnmount?.({value:this.state.value,groupApi:this})}}},this.setValue=(e,t)=>{this.form.setFieldValue(this.name,e,Z(t,{dontRunListeners:!0,dontValidate:!0})),t?.dontRunListeners||this.triggerOnChangeListener(),t?.dontValidate||this.validate(`change`)},this.getMeta=()=>this.store.state.meta,this.setMeta=e=>this.form.setFieldMeta(this.name,e),this.getInfo=()=>this.fieldInfo,this.getRelatedFields=()=>{let e=Object.values(this.form.fieldInfo),t=[];for(let n of e)n.instance&&n.instance instanceof ws&&n.instance.name.startsWith(this.name)&&t.push(n.instance);return t},this.getRelatedFieldMetasDerived=()=>{let e=Object.entries(this.form.fieldMetaDerived.state),t=[];for(let[n,r]of e)n!==this.name&&ms(this.name,n)&&t.push({...r,name:n});return t},this.buildChildFieldName=e=>e===``?this.name:e.startsWith(`[`)?`${this.name}${e}`:`${this.name}.${e}`,this.distributeFieldErrors=(e,t)=>{let n=this._lastDistributedFieldNames[e]??new Set,r=new Set;if(t)for(let[e,n]of Object.entries(t))n!=null&&n!==!1&&r.add(this.buildChildFieldName(e));let i=new Set([...n,...r]),a=!1;for(let n of i){let r=n.startsWith(this.name+`[`)?n.slice(this.name.length):n.slice(this.name.length+1),i=t?.[r],o=this.form.getFieldMeta(n);if(!o&&!i)continue;let s=o?.errorMap[e],{newErrorValue:c,newSource:l}=os({newFormValidatorError:i,isPreviousErrorFromFormValidator:o?.errorSourceMap[e]===`form`,previousErrorValue:s});c&&(a=!0),(s!==c||o?.errorSourceMap[e]!==l)&&this.form.setFieldMeta(n,(t=$)=>({...t,errorMap:{...t.errorMap,[e]:c},errorSourceMap:{...t.errorSourceMap,[e]:l}}))}return this._lastDistributedFieldNames[e]=r,a},this.validateSync=(t,n,r={})=>{let i=rs(t,{...this.options,form:this.form,group:this,validationLogic:this.options.validationLogic||this.form.options.validationLogic||Q}),a=(r.skipRelatedFieldValidation?[]:this.getRelatedFields()).reduce((e,n)=>{let r=rs(t,{...n.options,form:n.form,validationLogic:n.form.options.validationLogic||Q});return r.forEach(e=>{e.field=n}),e.concat(r)},[]),o=!1;U(()=>{let t=(t,r)=>{let i=Ns(r.cause),a=t===this,s;r.validate&&(s=t.runValidator({validate:r.validate,value:{value:t.store.state.value,validationSource:a?`form`:`field`,...t instanceof e?{groupApi:t}:{fieldApi:t}},type:`validate`}));let c=s,l;a&&js(s)&&(c=s.group,l=s.fields);let u=As(c),d=n[i],{newErrorValue:f,newSource:p}=ss({formLevelError:d,fieldLevelError:u});t.state.meta.errorMap?.[i]!==f&&t.setMeta(e=>({...e,errorMap:{...e.errorMap,[i]:f},errorSourceMap:{...e.errorSourceMap,[i]:p}})),f&&(o=!0),a&&this.distributeFieldErrors(i,l)&&(o=!0)};for(let e of i)t(this,e);for(let e of a)e.validate&&t(e.field,e)});let s=Ns(`submit`);return this.state.meta.errorMap?.[s]&&t!==`submit`&&!o&&this.setMeta(e=>({...e,errorMap:{...e.errorMap,[s]:void 0},errorSourceMap:{...e.errorSourceMap,[s]:void 0}})),{hasErrored:o}},this.validateAsync=async(t,n,r={})=>{let i=is(t,{...this.options,form:this.form,group:this,validationLogic:this.options.validationLogic||this.form.options.validationLogic||Q}),a=await n,o=r.skipRelatedFieldValidation?[]:this.getRelatedFields(),s=o.reduce((e,n)=>{let r=is(t,{...n.options,form:n.form,validationLogic:n.form.options.validationLogic||Q});return r.forEach(e=>{e.field=n}),e.concat(r)},[]),c=[],l=[],u=i.some(e=>e.validate)||s.some(e=>e.validate);if(u){this.state.meta.isValidating||this.setMeta(e=>({...e,isValidating:!0}));for(let e of o)e.setMeta(e=>({...e,isValidating:!0}))}let d=(t,n,r)=>{let i=Ns(n.cause),o=t.getInfo();o.validationMetaMap[i]?.lastAbortController.abort();let s=new AbortController;o.validationMetaMap[i]={lastAbortController:s};let c=t===this;r.push(new Promise(async r=>{let o;try{o=await new Promise((r,i)=>{t.timeoutIds.validations[n.cause]&&clearTimeout(t.timeoutIds.validations[n.cause]),t.timeoutIds.validations[n.cause]=setTimeout(async()=>{if(s.signal.aborted)return r(void 0);try{r(await this.runValidator({validate:n.validate,value:{value:t.store.state.value,signal:s.signal,validationSource:c?`form`:`field`,...t instanceof e?{groupApi:t}:{fieldApi:t}},type:`validateAsync`}))}catch(e){i(e)}},n.debounceMs)})}catch(e){o=e}if(s.signal.aborted)return r(void 0);let l=o,u;c&&js(o)&&(l=o.group,u=o.fields);let d=As(l),f=a[t.name]?.[i],{newErrorValue:p,newSource:m}=ss({formLevelError:f,fieldLevelError:d});if(t.getInfo().instance!==t)return r(void 0);t.setMeta(e=>({...e,errorMap:{...e?.errorMap,[i]:p},errorSourceMap:{...e.errorSourceMap,[i]:m}})),c&&this.distributeFieldErrors(i,u),r(p)}))};for(let e of i)e.validate&&d(this,e,c);for(let e of s)e.validate&&d(e.field,e,l);let f=[];if((c.length||l.length)&&(f=await Promise.all(c),await Promise.all(l)),u){this.setMeta(e=>({...e,isValidating:!1}));for(let e of o)e.setMeta(e=>({...e,isValidating:!1}))}return f.filter(Boolean)},this.validateAllFields=async e=>{let t=[];return U(()=>{Object.values(this.getRelatedFields()).forEach(n=>{t.push(Promise.resolve().then(()=>n.validate(e,{skipFormValidation:!0,skipGroupValidation:!0}))),n.store.state.meta.isTouched||n.setMeta(e=>({...e,isTouched:!0}))})}),(await Promise.all(t)).flat()},this.validateArrayFieldsStartingFrom=(e,t,n)=>this.form.validateArrayFieldsStartingFrom(e,t,n),this.validateField=(e,t)=>this.form.validateField(e,t),this.getFieldValue=e=>this.form.getFieldValue(e),this.getFieldMeta=e=>this.form.getFieldMeta(e),this.setFieldMeta=(e,t)=>this.form.setFieldMeta(e,t),this.setFieldValue=(e,t)=>this.form.setFieldValue(e,t),this.deleteField=e=>this.form.deleteField(e),this.pushFieldValue=(e,t)=>this.form.pushFieldValue(e,t),this.insertFieldValue=(e,t,n)=>this.form.insertFieldValue(e,t,n),this.replaceFieldValue=(e,t,n)=>this.form.replaceFieldValue(e,t,n),this.swapFieldValues=(e,t,n)=>this.form.swapFieldValues(e,t,n),this.moveFieldValues=(e,t,n)=>this.form.moveFieldValues(e,t,n),this.clearFieldValues=e=>this.form.clearFieldValues(e),this.resetField=e=>this.form.resetField(e),this.removeFieldValue=(e,t)=>this.form.removeFieldValue(e,t),this.areRelatedFieldsValid=()=>Object.values(this.getRelatedFields()).every(e=>e.state.meta.isValid),this.validate=(e,t)=>{let{fieldsErrorMap:n}=t?.skipFormValidation?{fieldsErrorMap:{}}:this.form.validateSync(e,{dontUpdateFormErrorMap:!0,filterFieldNames:e=>ms(this.name,e)}),{hasErrored:r}=this.validateSync(e,n[this.name]??{},{skipRelatedFieldValidation:t?.skipRelatedFieldValidation});if(r&&!this.options.asyncAlways)return this.getInfo().validationMetaMap[Ns(e)]?.lastAbortController.abort(),this.state.meta.errors;let i=t?.skipFormValidation?Promise.resolve({}):this.form.validateAsync(e,{dontUpdateFormErrorMap:!0,filterFieldNames:e=>ms(this.name,e)});return this.validateAsync(e,i,{skipRelatedFieldValidation:t?.skipRelatedFieldValidation})},this.triggerOnChangeListener=()=>{let e=this.form.options.listeners?.onChangeGroupDebounceMs;e&&e>0?(this.timeoutIds.formListeners.change&&clearTimeout(this.timeoutIds.formListeners.change),this.timeoutIds.formListeners.change=setTimeout(()=>{this.form.options.listeners?.onChangeGroup?.({formApi:this.form,groupApi:this})},e)):this.form.options.listeners?.onChangeGroup?.({formApi:this.form,groupApi:this});let t=this.options.listeners?.onChangeDebounceMs;t&&t>0?(this.timeoutIds.listeners.change&&clearTimeout(this.timeoutIds.listeners.change),this.timeoutIds.listeners.change=setTimeout(()=>{this.options.listeners?.onChange?.({value:this.state.value,groupApi:this})},t)):this.options.listeners?.onChange?.({value:this.state.value,groupApi:this})},this.triggerOnSubmitListener=()=>{this.options.listeners?.onSubmit?.({value:this.state.value,groupApi:this})},this._handleSubmit=async e=>{this.setFormGroupState(e=>({...e,isSubmitted:!1,submissionAttempts:e.submissionAttempts+1,isSubmitSuccessful:!1})),U(()=>{Object.values(this.getRelatedFields()).forEach(e=>{e.state.meta.isTouched||e.setMeta(e=>({...e,isTouched:!0}))})});let t=e??this.options.onSubmitMeta;this.setFormGroupState(e=>({...e,isSubmitting:!0}));let n=()=>{this.setFormGroupState(e=>({...e,isSubmitting:!1}))};if(await this.validateAllFields(`submit`),!this.areRelatedFieldsValid())n(),this.options.onGroupSubmitInvalid?.({value:this.state.value,groupApi:this,meta:t});else if(await this.validate(`submit`,{skipRelatedFieldValidation:!0}),!this.areRelatedFieldsValid()||!this.state.meta.isValid)n(),this.options.onGroupSubmitInvalid?.({value:this.state.value,groupApi:this,meta:t});else{U(()=>{Object.values(this.getRelatedFields()).forEach(e=>{e.options.listeners?.onGroupSubmit?.({value:e.state.value,fieldApi:e})})}),this.options.listeners?.onSubmit?.({groupApi:this,value:this.state.value});try{await this.options.onGroupSubmit?.({value:this.state.value,groupApi:this,meta:t}),U(()=>{this.setFormGroupState(e=>({...e,isSubmitted:!0,isSubmitSuccessful:!0})),n()})}catch(e){throw this.setFormGroupState(e=>({...e,isSubmitSuccessful:!1})),n(),e}}},this.form=t.form,this.name=t.name,this.options=t,this.timeoutIds={validations:{},listeners:{},formListeners:{}},this.fieldInfo={instance:null,validationMetaMap:{onChange:void 0,onBlur:void 0,onSubmit:void 0,onMount:void 0,onServer:void 0,onDynamic:void 0}},this.store=Yn(e=>{this.form.formGroupMetaDerived.get(),this.form.baseStore.get();let n=this.form.getFormGroupMeta(this.name)??Os(t.defaultMeta),r=this.form.getFieldValue(this.name);return!n.isTouched&&r===void 0&&this.options.defaultValue!==void 0&&!X(r,this.options.defaultValue)&&(r=this.options.defaultValue),e&&e.value===r&&e.meta===n?e:{value:r,meta:n}}),this.handleSubmit=this.handleSubmit.bind(this)}get state(){return this.store.state}runValidator(e){if(vs(e.validate)){let t=_s[e.type](e.value,e.validate);return e.type===`validate`?Ms(t):t.then(Ms)}return e.validate(e.value)}handleSubmit(e){return this._handleSubmit(e)}};function As(e){if(e)return e}function js(e){return!!e&&typeof e==`object`&&`fields`in e}function Ms(e){if(!e||typeof e!=`object`||!(`form`in e)&&!(`fields`in e))return e;let{form:t,fields:n,...r}=e;return{...r,group:t,fields:n}}function Ns(e){switch(e){case`submit`:return`onSubmit`;case`blur`:return`onBlur`;case`mount`:return`onMount`;case`server`:return`onServer`;case`dynamic`:return`onDynamic`;default:return`onChange`}}function Ps(e,t){if(!t)return;let n=Object.assign({},e,{state:ps(e.state)});t(n),n.fieldInfo!==e.fieldInfo&&(e.fieldInfo=n.fieldInfo),n.options!==e.options&&(e.options=n.options);let r=Object.keys({values:null,validationMetaMap:null,fieldMetaBase:null,formGroupStateBase:null,isSubmitting:null,isSubmitted:null,isValidating:null,submissionAttempts:null,isSubmitSuccessful:null,_force_re_eval:null}).reduce((t,r)=>(e.state[r]!==n.state[r]&&(t[r]=n.state[r]),t),{});return U(()=>{Object.keys(r).length&&e.baseStore.setState(e=>({...e,...r})),n.state.errorMap!==e.state.errorMap&&e.setErrorMap(n.state.errorMap)}),n}var Fs=typeof window<`u`?V.useLayoutEffect:V.useEffect;function Is(e){let[t,n]=(0,V.useState)(()=>({form:e.form,name:e.name})),[r,i]=(0,V.useState)(()=>new ws({...e})),a=r;(t.form!==e.form||t.name!==e.name)&&(a=new ws({...e}),i(a),n({form:e.form,name:e.name}));let o=W(a.store,e.mode===`array`?e=>e.meta._arrayVersion||0:e=>e.value),s=W(a.store,e=>e.meta.isTouched),c=W(a.store,e=>e.meta.isBlurred),l=W(a.store,e=>e.meta.isDirty),u=W(a.store,e=>e.meta.errorMap),d=W(a.store,e=>e.meta.errorSourceMap),f=W(a.store,e=>e.meta.isValidating),p=(0,V.useMemo)(()=>({...a,get state(){return{value:e.mode===`array`?a.state.value:o,get meta(){return{...a.state.meta,isTouched:s,isBlurred:c,isDirty:l,errorMap:u,errorSourceMap:d,isValidating:f}}}}}),[a,e.mode,o,s,c,l,u,d,f]);return Fs(a.mount,[a]),Fs(()=>{a.update(e)}),p}var Ls=(({children:e,...t})=>{let n=Is(t),r=(0,V.useMemo)(()=>Ko(e,n),[e,n]);return(0,G.jsx)(G.Fragment,{children:r})});function Rs(){return(0,V.useState)(()=>ds())[0]}var zs=V,Bs=`19.2.8`.split(`.`)[0]===`17`?Rs:zs.useId;function Vs(e){let[t,n]=(0,V.useState)(()=>({form:e.form,name:e.name})),[r,i]=(0,V.useState)(()=>new ks({...e}));(t.form!==e.form||t.name!==e.name)&&(i(new ks({...e})),n({form:e.form,name:e.name}));let a=W(r.store,e=>e.value),o=W(r.store,e=>e.meta.isTouched),s=W(r.store,e=>e.meta.isBlurred),c=W(r.store,e=>e.meta.isDirty),l=W(r.store,e=>e.meta.errorMap),u=W(r.store,e=>e.meta.errorSourceMap),d=W(r.store,e=>e.meta.isValidating),f=W(r.store,e=>e.meta.isSubmitting),p=W(r.store,e=>e.meta.isSubmitted),m=W(r.store,e=>e.meta.submissionAttempts),h=W(r.store,e=>e.meta.isSubmitSuccessful),g=W(r.store,e=>e.meta.canSubmit),_=W(r.store,e=>e.meta.isValid),v=W(r.store,e=>e.meta.isFieldsValid),y=W(r.store,e=>e.meta.isFieldsValidating),b=W(r.store,e=>e.meta.isGroupValid),x=(0,V.useMemo)(()=>({...r,handleSubmit:((...e)=>r._handleSubmit(...e)),get state(){return{...r.state,value:a,get meta(){return{...r.state.meta,isTouched:o,isBlurred:s,isDirty:c,errorMap:l,errorSourceMap:u,isValidating:d,isSubmitting:f,isSubmitted:p,submissionAttempts:m,isSubmitSuccessful:h,canSubmit:g,isValid:_,isFieldsValid:v,isFieldsValidating:y,isGroupValid:b}}}}}),[r,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b]);return Fs(r.mount,[r]),Fs(()=>{r.update(e)}),x}var Hs=(({children:e,...t})=>{let n=Vs(t),r=(0,V.useMemo)(()=>Ko(e,n),[e,n]);return(0,G.jsx)(G.Fragment,{children:r})});function Us({form:e,selector:t=e=>e,children:n}){let r=W(e.store,t);return(0,G.jsx)(G.Fragment,{children:Ko(n,r)})}function Ws(e){let t=Bs(),[n,r]=(0,V.useState)(e?.formId),[i,a]=(0,V.useState)(()=>new xs({...e,formId:e?.formId??t}));if(n!==e?.formId){let n=e?.formId??t;a(new xs({...e,formId:n})),r(n)}let o=(0,V.useMemo)(()=>{let e={...i,handleSubmit:((...e)=>i._handleSubmit(...e)),get formId(){return i._formId},get state(){return i.store.state}};return e.Field=function(e){return(0,G.jsx)(Ls,{...e,form:i})},e.FormGroup=function(e){return(0,G.jsx)(Hs,{...e,form:i})},e.Subscribe=function(e){return(0,G.jsx)(Us,{form:i,selector:e.selector,children:e.children})},e},[i]);Fs(i.mount,[]),Fs(()=>{i.update(e)});let s=(0,V.useRef)(!1);return Fs(()=>{s.current&&e?.transform&&Ps(i,e.transform)},[i,e?.transform]),Fs(()=>{s.current=!0}),o}var Gs=me(e=>nn(t=>{t.mount(e);let n=t.registry;t.addFinalizer(()=>{n.getNodes().has(e)&&(n.get(e).waiting||n.set(e,ce))})}));function Ks(e){let t=(0,K.c)(3),n;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n={mode:`promise`},t[0]=n):n=t[0];let r=Te(e,n),i;return t[1]===e?i=t[2]:(i=Gs(e),t[1]=e,t[2]=i),p(i),r}function qs(e,t,n){return r=>(r.project?e({projectId:r.project.id,mode:r.mode,writer:r.writer}):r.writer?t(r.writer):void 0)?.then(()=>{s({title:`Saved on this computer`,type:`success`}),n?.()},()=>void 0)}function Js(e){let t=(0,K.c)(6),{checking:n,onCheck:r}=e,i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,G.jsx)(`p`,{className:`font-medium text-foreground`,children:`No writers available`}),t[0]=i):i=t[0];let a;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,G.jsx)(`code`,{className:`font-mono`,children:`claude auth login`}),t[1]=a):a=t[1];let o;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,G.jsxs)(`p`,{className:`text-muted-foreground`,children:[`Install Claude Code or Codex on the connected computer, then sign in with `,a,` or`,` `,(0,G.jsx)(`code`,{className:`font-mono`,children:`codex login`}),`.`]}),t[2]=o):o=t[2];let s;return t[3]!==n||t[4]!==r?(s=(0,G.jsxs)(`div`,{role:`alert`,className:`grid justify-items-start gap-1 text-xs/relaxed`,children:[i,o,(0,G.jsx)(Ce,{pending:n,type:`button`,className:`mt-1`,variant:`outline`,size:`sm`,onClick:r,children:`Check again`})]}),t[3]=n,t[4]=r,t[5]=s):s=t[5],s}function Ys(e){let t=(0,K.c)(23),{connection:n,project:r,unavailable:i,onSaved:a}=e,o;t[0]===n?o=t[1]:(o=f(n),t[0]=n,t[1]=o);let s=z(o),c;t[2]===n?c=t[3]:(c=qt(n),t[2]=n,t[3]=c);let[l,u]=Te(c),d;t[4]===u?d=t[5]:(d=()=>u(void 0),t[4]=u,t[5]=d);let p=d,m=s.waiting||l.waiting,h;t[6]===s?h=t[7]:(h=Jt(Tt(s)),t[6]=s,t[7]=h);let g=h;if(ct(s)){let e;return t[8]!==m||t[9]!==p?(e=(0,G.jsxs)(`p`,{role:`alert`,className:`flex items-center gap-2 text-ui text-muted-foreground`,children:[`Could not read walkthrough models.`,(0,G.jsx)(Ce,{size:`xs`,variant:`outline`,pending:m,onClick:p,children:`Try again`})]}),t[8]=m,t[9]=p,t[10]=e):e=t[10],e}if(!g){let e;return t[11]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,G.jsx)(Ct,{label:`Reading walkthrough models`}),t[11]=e):e=t[11],e}if(g.models.length===0&&!r){let e;return t[12]!==m||t[13]!==p?(e=(0,G.jsx)(Js,{checking:m,onCheck:p}),t[12]=m,t[13]=p,t[14]=e):e=t[14],e}let _;return t[15]!==m||t[16]!==n||t[17]!==a||t[18]!==r||t[19]!==p||t[20]!==g||t[21]!==i?(_=(0,G.jsx)(Xs,{connection:n,project:r,unavailable:i,onSaved:a,settings:g,checking:m,onCheck:p}),t[15]=m,t[16]=n,t[17]=a,t[18]=r,t[19]=p,t[20]=g,t[21]=i,t[22]=_):_=t[22],_}function Xs(e){let t=(0,K.c)(64),{connection:n,project:r,unavailable:a,onSaved:o,settings:s,checking:c,onCheck:l}=e,u;t[0]===n?u=t[1]:(u=we(n),t[0]=n,t[1]=u);let[d,f]=Ks(u),p;t[2]===n?p=t[3]:(p=Xt(n),t[2]=n,t[3]=p);let[m,g]=Ks(p),_=r?r.walkthroughSettings?.writer:s.writer,v;t[4]===s?v=t[5]:(v=ye(s),t[4]=s,t[5]=v);let y=v,b=r?d:m,x=qs(f,g,o),S;t[6]!==_||t[7]!==r||t[8]!==s.models?(S=(e,t)=>h({writer:e,effort:t,current:_,project:r!==void 0,models:s.models}),t[6]=_,t[7]=r,t[8]=s.models,t[9]=S):S=t[9];let C=S,w;t[10]===s.models?w=t[11]:(w=te(s.models),t[10]=s.models,t[11]=w);let T=w,E;t[12]!==_||t[13]!==s.models?(E=_?i(_,s.models):`default`,t[12]=_,t[13]=s.models,t[14]=E):E=t[14];let D=_?.effort??s.writer.effort,ee=r?.walkthroughSettings?.mode??`manual`,O;t[15]!==E||t[16]!==D||t[17]!==ee?(O={writer:E,effort:D,mode:ee},t[15]=E,t[16]=D,t[17]=ee,t[18]=O):O=t[18];let k;t[19]!==C||t[20]!==r||t[21]!==x?(k=e=>{let{value:t}=e;if(C(t.writer,t.effort))return x({project:r,writer:t.writer==="default"?void 0:vt(t.writer,t.effort),mode:t.mode})},t[19]=C,t[20]=r,t[21]=x,t[22]=k):k=t[22];let ne;t[23]!==k||t[24]!==O?(ne={defaultValues:O,onSubmit:k},t[23]=k,t[24]=O,t[25]=ne):ne=t[25];let A=Ws(ne),M;t[26]===A?M=t[27]:(M=e=>St(e,()=>A.handleSubmit()),t[26]=A,t[27]=M);let N;t[28]!==C||t[29]!==c||t[30]!==_?.model||t[31]!==_?.provider||t[32]!==y||t[33]!==A||t[34]!==T||t[35]!==l||t[36]!==r||t[37]!==b.waiting||t[38]!==s.models||t[39]!==s.writer||t[40]!==a?(N=s.models.length===0?(0,G.jsx)(Js,{checking:c,onCheck:l}):(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(A.Field,{name:`writer`,children:e=>{let t=s.models.find(t=>`${t.provider}:${t.model}`===fe(e.state.value)),n=T.flatMap(tc).find(t=>t.key===e.state.value),i=`${_?.provider} / ${_?.model} (unavailable)`;return t&&(i=`${t.provider===`claude`?`Claude`:`Codex`} / ${n?`${n.label} · ${n.model}`:t.label}`),e.state.value==="default"&&(i=`Use the default · ${y.label}`),(0,G.jsxs)(`div`,{className:`grid gap-2`,children:[(0,G.jsx)(re,{htmlFor:`walkthrough-writer`,children:`Writer`}),(0,G.jsxs)(Me,{value:e.state.value,disabled:b.waiting||a!==void 0,onValueChange:t=>{if(t===null)return;e.handleChange(t);let n=s.models.find(e=>`${e.provider}:${e.model}`===fe(t));A.setFieldValue(`effort`,n?.defaultEffort??s.writer.effort)},children:[(0,G.jsx)(j,{id:`walkthrough-writer`,"aria-label":`Walkthrough writer`,className:`w-full`,children:(0,G.jsx)(Je,{children:i})}),(0,G.jsxs)(Be,{children:[r&&(0,G.jsxs)(P,{value:`default`,children:[`Use the default · `,y.label]}),!t&&e.state.value!=="default"&&(0,G.jsx)(P,{value:e.state.value,disabled:!0,children:i}),T.map(ec)]})]}),e.state.value!=="default"&&!t&&(0,G.jsx)(`p`,{role:`status`,className:`text-ui text-muted-foreground`,children:`Install the model’s CLI and sign in, or choose another model.`})]})}}),(0,G.jsx)(A.Subscribe,{selector:$s,children:e=>{let t=s.models.find(t=>`${t.provider}:${t.model}`===fe(e));return(0,G.jsx)(A.Field,{name:`effort`,children:n=>{let r=e==="default"?s.writer.effort:n.state.value,i;return e==="default"?y.availability===`unsupported-effort`&&(i=y.block):t&&!C(e,r)&&(i=De(t.label,r)),(0,G.jsxs)(`div`,{className:`grid gap-2`,children:[(0,G.jsx)(re,{htmlFor:`walkthrough-effort`,children:`Effort`}),(0,G.jsxs)(Me,{value:r,disabled:e==="default"||!t||b.waiting,onValueChange:e=>{e!==null&&n.handleChange(e)},children:[(0,G.jsx)(j,{id:`walkthrough-effort`,"aria-label":`Walkthrough effort`,"aria-describedby":i?`walkthrough-effort-note`:void 0,className:`w-full`,children:(0,G.jsx)(Je,{children:r})}),(0,G.jsx)(Be,{children:t?.efforts.map(Qs)})]}),i&&(0,G.jsx)(`p`,{id:`walkthrough-effort-note`,className:`text-ui text-muted-foreground`,children:i})]})}})}})]}),t[28]=C,t[29]=c,t[30]=_?.model,t[31]=_?.provider,t[32]=y,t[33]=A,t[34]=T,t[35]=l,t[36]=r,t[37]=b.waiting,t[38]=s.models,t[39]=s.writer,t[40]=a,t[41]=N):N=t[41];let F;t[42]!==A.Field||t[43]!==r||t[44]!==b.waiting?(F=r&&(0,G.jsx)(A.Field,{name:`mode`,children:e=>(0,G.jsxs)(`div`,{className:`grid gap-2`,children:[(0,G.jsx)(re,{htmlFor:`walkthrough-mode`,children:`Write walkthroughs`}),(0,G.jsxs)(Me,{value:e.state.value,disabled:b.waiting,onValueChange:t=>{(t===`manual`||t===`automatic`)&&e.handleChange(t)},children:[(0,G.jsx)(j,{id:`walkthrough-mode`,"aria-label":`Walkthrough mode`,className:`w-full`,children:(0,G.jsx)(Je,{children:e.state.value===`manual`?`Manual`:`Automatic`})}),(0,G.jsxs)(Be,{children:[(0,G.jsx)(P,{value:`manual`,children:`Manual`}),(0,G.jsx)(P,{value:`automatic`,children:`Automatic when a pull request opens`})]})]})]})}),t[42]=A.Field,t[43]=r,t[44]=b.waiting,t[45]=F):F=t[45];let I;t[46]===a?I=t[47]:(I=a&&(0,G.jsx)(Et,{variant:`destructive`,className:`w-0 min-w-full`,children:(0,G.jsx)(Ft,{children:a})}),t[46]=a,t[47]=I);let L;t[48]===b?L=t[49]:(L=ct(b)&&(0,G.jsx)(Et,{variant:`destructive`,className:`w-0 min-w-full`,children:(0,G.jsx)(Ft,{children:nc(en(b.cause))})}),t[48]=b,t[49]=L);let R;t[50]!==C||t[51]!==b.waiting||t[52]!==a?(R=e=>{let{writer:t,effort:n}=e;return(0,G.jsx)(Ce,{pending:b.waiting,type:`submit`,disabled:b.waiting||a!==void 0||!C(t,n),children:`Save`})},t[50]=C,t[51]=b.waiting,t[52]=a,t[53]=R):R=t[53];let ie;t[54]!==A.Subscribe||t[55]!==R?(ie=(0,G.jsx)(A.Subscribe,{selector:Zs,children:R}),t[54]=A.Subscribe,t[55]=R,t[56]=ie):ie=t[56];let ae;return t[57]!==M||t[58]!==N||t[59]!==F||t[60]!==I||t[61]!==L||t[62]!==ie?(ae=(0,G.jsxs)(`form`,{className:`grid gap-4`,onSubmit:M,children:[N,F,I,L,ie]}),t[57]=M,t[58]=N,t[59]=F,t[60]=I,t[61]=L,t[62]=ie,t[63]=ae):ae=t[63],ae}function Zs(e){return{writer:e.values.writer,effort:e.values.effort}}function Qs(e){return(0,G.jsx)(P,{value:e,children:e},e)}function $s(e){return e.values.writer}function ec(e){return(0,G.jsxs)(x,{children:[e.latest.map(t=>(0,G.jsxs)(P,{value:t.key,children:[e.label,` / `,t.label,` · `,t.model]},t.key)),e.exact.map(t=>(0,G.jsxs)(P,{value:t.key,children:[e.label,` / `,t.label]},t.key))]},e.provider)}function tc(e){return e.latest}function nc(e){return e instanceof Error&&e.message?e.message:`The writer could not be saved. Try again.`}function rc(e){let t=(0,K.c)(3),{connection:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,G.jsxs)(Qe,{className:`min-w-0 basis-72 self-start`,children:[(0,G.jsx)(ft,{children:`Default walkthrough writer`}),(0,G.jsx)(ve,{children:`Saved on this computer for manual and automatic walkthroughs. Each project can override this writer from its three-dot menu. Projects using the default follow later changes here.`})]}),t[0]=r):r=t[0];let i;return t[1]===n?i=t[2]:(i=(0,G.jsx)(I,{id:`walkthroughs`,title:`Walkthroughs`,children:(0,G.jsx)(T,{children:(0,G.jsxs)(Xe,{children:[r,(0,G.jsx)(qe,{children:(0,G.jsx)(Ys,{connection:n})})]})})}),t[1]=n,t[2]=i),i}function ic(e){let t=(0,K.c)(17),{connection:n}=e,{projects:r,failed:i,retry:a}=vo(n),o;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,G.jsx)(he,{children:`By default, Porcelain uses a signed-in account with access to the repository. Your choice applies to every device using this computer.`}),t[0]=o):o=t[0];let s;t[1]!==n||t[2]!==r?(s=r?.map(e=>(0,G.jsx)(ac,{connection:n,project:e},e.id)),t[1]=n,t[2]=r,t[3]=s):s=t[3];let c;t[4]===r?c=t[5]:(c=r!==void 0&&r.length>0&&(0,G.jsx)(`p`,{className:`hidden px-3 py-2.5 text-ui text-muted-foreground only:block`,children:`No project has a GitHub remote.`}),t[4]=r,t[5]=c);let l;t[6]!==i||t[7]!==r||t[8]!==a?(l=r===void 0&&i&&(0,G.jsxs)(`p`,{role:`alert`,className:`flex items-center gap-2 px-3 py-2.5 text-ui text-muted-foreground`,children:[`Could not read this computer’s projects.`,(0,G.jsx)(w,{size:`xs`,variant:`outline`,onClick:a,children:`Try again`})]}),t[6]=i,t[7]=r,t[8]=a,t[9]=l):l=t[9];let u;t[10]===r?.length?u=t[11]:(u=r?.length===0&&(0,G.jsx)(`p`,{className:`px-3 py-2.5 text-ui text-muted-foreground`,children:`Add a project to choose its GitHub account.`}),t[10]=r?.length,t[11]=u);let d;return t[12]!==s||t[13]!==c||t[14]!==l||t[15]!==u?(d=(0,G.jsxs)(I,{id:`github`,title:`GitHub accounts`,children:[o,(0,G.jsxs)(T,{children:[s,c,l,u]})]}),t[12]=s,t[13]=c,t[14]=l,t[15]=u,t[16]=d):d=t[16],d}function ac(e){let t=(0,K.c)(48),{connection:n,project:r}=e,i={connection:n,projectId:r.id},a=C(i),o=z(a),s=ke(a),[c,l]=Te(Ht(i)),u,d,f,p,m,h,g,_,v;if(t[0]!==c||t[1]!==r.name||t[2]!==o||t[3]!==l){g=Symbol.for(`react.early_return_sentinel`);bb0:{if(d=ct(o)?void 0:Jt(Tt(o)),d?.unavailable?.reason===`not-github`){g=null;break bb0}let e=d?.choice;f=o.waiting||c.waiting,_=d?.unavailable?qa(d.unavailable.reason):void 0;let n=d?.override?`The chosen account cannot open it. Choose another or use the detected account.`:`No signed-in account can open it`;v=d?.unavailable?.reason===`no-access`?n:_?.description,p=`Use the detected account for ${r.name}`,u=Xe;let i;t[13]===r.name?i=t[14]:(i=(0,G.jsx)(ft,{className:`max-w-full min-w-0`,children:(0,G.jsx)($e,{text:r.name})}),t[13]=r.name,t[14]=i),m=(0,G.jsxs)(Qe,{className:`min-w-0`,children:[i,d?.repository&&(0,G.jsx)($e,{text:d.repository,className:`block font-mono text-xs leading-4.5 text-muted-foreground`})]}),h=d&&d.accounts.length>0&&(0,G.jsxs)(qe,{children:[e&&(0,G.jsx)(Le,{variant:`secondary`,children:e.source===`overridden`?`Chosen`:`Detected`}),(0,G.jsxs)(Me,{value:e?.account??d.override??null,disabled:f,items:d.accounts.map(lc),onValueChange:t=>{typeof t==`string`&&t!==e?.account&&l({account:t})},children:[(0,G.jsx)(j,{"aria-label":`GitHub account for ${r.name}`,children:(0,G.jsx)(Je,{children:cc})}),(0,G.jsx)(Be,{children:d.accounts.map(sc)})]})]})}t[0]=c,t[1]=r.name,t[2]=o,t[3]=l,t[4]=u,t[5]=d,t[6]=f,t[7]=p,t[8]=m,t[9]=h,t[10]=g,t[11]=_,t[12]=v}else u=t[4],d=t[5],f=t[6],p=t[7],m=t[8],h=t[9],g=t[10],_=t[11],v=t[12];if(g!==Symbol.for(`react.early_return_sentinel`))return g;let y;t[15]!==d?.override||t[16]!==f||t[17]!==p||t[18]!==l?(y=d?.override&&(0,G.jsxs)(tn,{children:[(0,G.jsx)(Zt,{render:(0,G.jsx)(w,{size:`icon-sm`,variant:`ghost`,"aria-label":p,disabled:f,onClick:()=>l({account:void 0})}),children:(0,G.jsx)(ur,{"aria-hidden":`true`,className:`size-3.5`})}),(0,G.jsx)(it,{children:p})]}),t[15]=d?.override,t[16]=f,t[17]=p,t[18]=l,t[19]=y):y=t[19];let b;t[20]!==f||t[21]!==s||t[22]!==_||t[23]!==v?(b=_&&(0,G.jsxs)(`div`,{className:`flex min-w-0 flex-wrap items-center gap-2 text-ui leading-4.5 text-warn`,children:[(0,G.jsx)(ae,{"aria-hidden":`true`,className:`size-3.5 shrink-0`}),(0,G.jsx)(`span`,{children:v}),_.action.kind===`install`&&(0,G.jsx)(w,{size:`xs`,variant:`link`,render:(0,G.jsx)(`a`,{href:_.action.url,target:`_blank`,rel:`noreferrer`}),children:_.action.label}),_.action.kind===`copy`&&(0,G.jsx)(w,{size:`xs`,variant:`link`,onClick:oc,children:_.action.label}),_.action.kind!==`install`&&(0,G.jsx)(w,{size:`xs`,variant:`ghost`,disabled:f,onClick:s,children:`Try again`})]}),t[20]=f,t[21]=s,t[22]=_,t[23]=v,t[24]=b):b=t[24];let x;t[25]!==d||t[26]!==f||t[27]!==s||t[28]!==_?(x=d&&d.accounts.length===0&&!_&&(0,G.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 text-ui text-muted-foreground`,children:[`No GitHub account is available.`,(0,G.jsx)(w,{size:`xs`,variant:`ghost`,disabled:f,onClick:s,children:`Try again`})]}),t[25]=d,t[26]=f,t[27]=s,t[28]=_,t[29]=x):x=t[29];let S;t[30]!==f||t[31]!==s||t[32]!==o?(S=ct(o)&&(0,G.jsx)(Vt,{className:`basis-full`,message:`Could not display the GitHub account.`,waiting:f,onRetry:s}),t[30]=f,t[31]=s,t[32]=o,t[33]=S):S=t[33];let T;t[34]===c?T=t[35]:(T=ct(c)&&(0,G.jsx)(Et,{variant:`destructive`,className:`basis-full`,children:(0,G.jsx)(Ft,{children:`Could not save the GitHub account. Choose an account or reset it to try again.`})}),t[34]=c,t[35]=T);let E;t[36]===c.waiting?E=t[37]:(E=c.waiting&&(0,G.jsx)(`p`,{role:`status`,className:`basis-full text-xs text-muted-foreground`,children:`Saving GitHub account…`}),t[36]=c.waiting,t[37]=E);let D;return t[38]!==u||t[39]!==m||t[40]!==h||t[41]!==y||t[42]!==b||t[43]!==x||t[44]!==S||t[45]!==T||t[46]!==E?(D=(0,G.jsxs)(u,{children:[m,h,y,b,x,S,T,E]}),t[38]=u,t[39]=m,t[40]=h,t[41]=y,t[42]=b,t[43]=x,t[44]=S,t[45]=T,t[46]=E,t[47]=D):D=t[47],D}function oc(){return Lt(`gh auth login`,`command`)}function sc(e){return(0,G.jsx)(P,{value:e,children:(0,G.jsx)($e,{text:e,className:`block max-w-40`})},e)}function cc(e){let{value:t}=e;return typeof t==`string`?(0,G.jsx)($e,{text:t,className:`block max-w-30`}):`Choose an account`}function lc(e){return{value:e,label:e}}function uc(e){let t=(0,K.c)(12),{label:n,description:r,children:i}=e,a;t[0]===n?a=t[1]:(a=(0,G.jsx)(ft,{children:n}),t[0]=n,t[1]=a);let o;t[2]===r?o=t[3]:(o=r&&(0,G.jsx)(ve,{children:r}),t[2]=r,t[3]=o);let s;t[4]!==a||t[5]!==o?(s=(0,G.jsxs)(Qe,{className:`min-w-0`,children:[a,o]}),t[4]=a,t[5]=o,t[6]=s):s=t[6];let c;t[7]===i?c=t[8]:(c=(0,G.jsx)(qe,{children:i}),t[7]=i,t[8]=c);let l;return t[9]!==s||t[10]!==c?(l=(0,G.jsxs)(Xe,{children:[s,c]}),t[9]=s,t[10]=c,t[11]=l):l=t[11],l}function dc(e){let t=(0,K.c)(21),{label:n,description:r,value:i,options:a,disabled:o,onChange:s}=e,c=o!==void 0&&o,l=i??null,u;t[0]!==s||t[1]!==a?(u=e=>{let t=a.find(t=>t.value===e);t&&s(t.value)},t[0]=s,t[1]=a,t[2]=u):u=t[2];let d;if(t[3]!==c||t[4]!==a||t[5]!==i){let e;t[7]!==c||t[8]!==i?(e=e=>(0,G.jsx)(Vo,{value:e.value,disabled:c,children:(0,G.jsxs)(`span`,{className:`inline-flex items-center gap-1`,children:[i===e.value&&(0,G.jsx)(ee,{"aria-hidden":!0,className:`size-3.5`}),(0,G.jsx)(`span`,{className:i===e.value?`font-semibold`:void 0,children:e.label})]})},e.value),t[7]=c,t[8]=i,t[9]=e):e=t[9],d=a.map(e),t[3]=c,t[4]=a,t[5]=i,t[6]=d}else d=t[6];let f;t[10]!==n||t[11]!==d?(f=(0,G.jsx)(Bo,{"aria-label":n,children:d}),t[10]=n,t[11]=d,t[12]=f):f=t[12];let p;t[13]!==l||t[14]!==u||t[15]!==f?(p=(0,G.jsx)(Ro,{value:l,onValueChange:u,children:f}),t[13]=l,t[14]=u,t[15]=f,t[16]=p):p=t[16];let m;return t[17]!==r||t[18]!==n||t[19]!==p?(m=(0,G.jsx)(uc,{label:n,description:r,children:p}),t[17]=r,t[18]=n,t[19]=p,t[20]=m):m=t[20],m}function fc(e){let t=(0,K.c)(9),{label:n,description:r,name:i,options:a}=e,{preferences:o,setPreference:s}=ma(),c=o[i],l;t[0]!==i||t[1]!==s?(l=e=>s(i,e),t[0]=i,t[1]=s,t[2]=l):l=t[2];let u;return t[3]!==r||t[4]!==n||t[5]!==a||t[6]!==c||t[7]!==l?(u=(0,G.jsx)(dc,{label:n,description:r,value:c,options:a,onChange:l}),t[3]=r,t[4]=n,t[5]=a,t[6]=c,t[7]=l,t[8]=u):u=t[8],u}function pc(e){let t=(0,K.c)(12),{label:n,description:r,checked:i,disabled:a,onChange:o}=e,s=i===void 0?`Unavailable`:i===!0?`On`:`Off`,c;t[0]===s?c=t[1]:(c=(0,G.jsx)(`span`,{"aria-hidden":!0,className:`text-xs text-muted-foreground`,children:s}),t[0]=s,t[1]=c);let l=i??!1,u;t[2]!==a||t[3]!==n||t[4]!==o||t[5]!==l?(u=(0,G.jsx)(We,{"aria-label":n,checked:l,disabled:a,onCheckedChange:o}),t[2]=a,t[3]=n,t[4]=o,t[5]=l,t[6]=u):u=t[6];let d;return t[7]!==r||t[8]!==n||t[9]!==c||t[10]!==u?(d=(0,G.jsxs)(uc,{label:n,description:r,children:[c,u]}),t[7]=r,t[8]=n,t[9]=c,t[10]=u,t[11]=d):d=t[11],d}function mc(e){let t=(0,K.c)(13),{view:n,computer:r,onRetry:i}=e;if(n.kind===`unsupported`){let e;return t[0]===r?e=t[1]:(e=(0,G.jsxs)(Et,{children:[(0,G.jsxs)(gt,{children:[`Update `,r,` to sync settings`]}),(0,G.jsxs)(Ft,{children:[`Porcelain on `,r,` is older and keeps no Changes & Git settings. Update it from Computers to choose them here.`]})]}),t[0]=r,t[1]=e),e}let a;t[2]===n?a=t[3]:(a=Yi(n),t[2]=n,t[3]=a);let o=a;if(n.kind===`reading`||n.kind===`unconfigured`||!o)return null;let s;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,G.jsx)(gt,{children:`Settings unavailable`}),t[4]=s):s=t[4];let c;t[5]===o?c=t[6]:(c=(0,G.jsx)(`p`,{children:o}),t[5]=o,t[6]=c);let l;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,G.jsx)(`p`,{children:`Pull and Archive wait until they can be read again.`}),t[7]=l):l=t[7];let u;t[8]===i?u=t[9]:(u=(0,G.jsx)(w,{className:`mt-3`,size:`sm`,variant:`outline`,onClick:i,children:`Read settings again`}),t[8]=i,t[9]=u);let d;return t[10]!==c||t[11]!==u?(d=(0,G.jsxs)(Et,{variant:`destructive`,children:[s,(0,G.jsxs)(Ft,{children:[c,l,u]})]}),t[10]=c,t[11]=u,t[12]=d):d=t[12],d}function hc(e){let t=(0,K.c)(60),{connection:n,computer:r}=e,i=ho(n),a=_o(n),{preferences:o}=ma(),{save:s,saving:c,failure:l,kept:u,readAgain:d,checkTrustAgain:f}=yo(n),p;t[0]!==o.reviewGitSettingsImportCandidate||t[1]!==i?(p=Wi(i,o.reviewGitSettingsImportCandidate),t[0]=o.reviewGitSettingsImportCandidate,t[1]=i,t[2]=p):p=t[2];let m=p,h;t[3]!==c||t[4]!==i?(h=Hi(i)!==void 0&&!c,t[3]=c,t[4]=i,t[5]=h):h=t[5];let g=h,_;t[6]===s?_=t[7]:(_=e=>s({kind:`change`,change:e}),t[6]=s,t[7]=_);let v=_,y;t[8]===d?y=t[9]:(y=()=>d(void 0),t[8]=d,t[9]=y);let b;t[10]!==r.phrase||t[11]!==y||t[12]!==i?(b=(0,G.jsx)(mc,{view:i,computer:r.phrase,onRetry:y}),t[10]=r.phrase,t[11]=y,t[12]=i,t[13]=b):b=t[13];let x;t[14]!==f||t[15]!==r.phrase||t[16]!==o.reviewGitSettingsImportCandidate||t[17]!==s||t[18]!==c||t[19]!==a||t[20]!==i.kind?(x=i.kind===`unconfigured`&&(0,G.jsxs)(Et,{children:[(0,G.jsxs)(gt,{children:[`Choose settings for `,r.phrase]}),(0,G.jsxs)(Ft,{children:[(0,G.jsxs)(`p`,{children:[`Spec files, Pull strategy and the archive deletions are shared by every device connected to `,r.phrase,`. They show this device’s preferences or the defaults, and you can change them once you use them for `,r.phrase,`.`]}),(0,G.jsx)(S,{to:`/settings/$section`,params:{section:`git`},hash:`archive-settings`,replace:!0,className:`w-fit text-foreground underline underline-offset-4`,children:`Review archive deletions`}),a&&(0,G.jsx)(`p`,{children:a}),(0,G.jsxs)(`div`,{className:`mt-3 flex flex-wrap gap-2`,children:[(0,G.jsxs)(w,{className:`h-auto min-h-7 max-w-full whitespace-normal`,size:`sm`,disabled:c||a!==void 0,onClick:()=>s({kind:`initialize`,settings:o.reviewGitSettingsImportCandidate}),children:[`Use these settings for `,r.phrase]}),a&&(0,G.jsx)(w,{size:`sm`,variant:`outline`,onClick:f,children:`Check again`})]})]})]}),t[14]=f,t[15]=r.phrase,t[16]=o.reviewGitSettingsImportCandidate,t[17]=s,t[18]=c,t[19]=a,t[20]=i.kind,t[21]=x):x=t[21];let C;t[22]!==r.name||t[23]!==u?(C=u&&(0,G.jsx)(Et,{children:(0,G.jsx)(Ft,{children:Ki(r.name)})}),t[22]=r.name,t[23]=u,t[24]=C):C=t[24];let E;t[25]===l?E=t[26]:(E=l&&(0,G.jsxs)(Et,{variant:`destructive`,children:[(0,G.jsx)(gt,{children:`Not saved`}),(0,G.jsx)(Ft,{children:l})]}),t[25]=l,t[26]=E);let D=m?.collapseSpecs,ee=!g,te;t[27]===v?te=t[28]:(te=e=>v({collapseSpecs:e}),t[27]=v,t[28]=te);let O;t[29]!==ee||t[30]!==te||t[31]!==D?(O=(0,G.jsx)(I,{id:`changes`,title:`Changes`,children:(0,G.jsx)(T,{children:(0,G.jsx)(pc,{label:`Spec files`,description:`Show changed spec and test files in their own collapsed list.`,checked:D,disabled:ee,onChange:te})})}),t[29]=ee,t[30]=te,t[31]=D,t[32]=O):O=t[32];let k=m?.pullStrategy,ne=!g,A;t[33]===Symbol.for(`react.memo_cache_sentinel`)?(A=[{value:`merge`,label:`Merge`},{value:`rebase`,label:`Rebase`}],t[33]=A):A=t[33];let j;t[34]===v?j=t[35]:(j=e=>v({pullStrategy:e}),t[34]=v,t[35]=j);let M;t[36]!==k||t[37]!==ne||t[38]!==j?(M=(0,G.jsx)(I,{id:`git`,title:`Git`,children:(0,G.jsx)(T,{children:(0,G.jsx)(dc,{label:`Pull strategy`,value:k,disabled:ne,options:A,onChange:j})})}),t[36]=k,t[37]=ne,t[38]=j,t[39]=M):M=t[39];let N,P;t[40]===n?(N=t[41],P=t[42]):(N=(0,G.jsx)(rc,{connection:n}),P=(0,G.jsx)(ic,{connection:n}),t[40]=n,t[41]=N,t[42]=P);let F;t[43]===Symbol.for(`react.memo_cache_sentinel`)?(F=(0,G.jsx)(he,{children:`Archive asks you to confirm these deletions before running them.`}),t[43]=F):F=t[43];let L;t[44]!==v||t[45]!==g||t[46]!==m?(L=ba.map(e=>{let{key:t,label:n,description:r}=e;return(0,G.jsx)(pc,{label:n,description:r,checked:m?.[t],disabled:!g,onChange:e=>v({[t]:e})},t)}),t[44]=v,t[45]=g,t[46]=m,t[47]=L):L=t[47];let R;t[48]===L?R=t[49]:(R=(0,G.jsxs)(I,{id:`archive-settings`,title:`When archiving`,children:[F,(0,G.jsx)(T,{children:L})]}),t[48]=L,t[49]=R);let re;return t[50]!==O||t[51]!==M||t[52]!==N||t[53]!==P||t[54]!==R||t[55]!==b||t[56]!==x||t[57]!==C||t[58]!==E?(re=(0,G.jsxs)(G.Fragment,{children:[b,x,C,E,O,M,N,P,R]}),t[50]=O,t[51]=M,t[52]=N,t[53]=P,t[54]=R,t[55]=b,t[56]=x,t[57]=C,t[58]=E,t[59]=re):re=t[59],re}function gc(e){let t=(0,K.c)(15),{computers:n,selected:r,onSelect:i}=e,a;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,G.jsx)(A,{htmlFor:`settings-computer`,className:`shrink-0`,children:`Computer`}),t[0]=a):a=t[0];let o;t[1]===n?o=t[2]:(o=n.map(vc),t[1]=n,t[2]=o);let s;t[3]===i?s=t[4]:(s=e=>{typeof e==`string`&&i(e)},t[3]=i,t[4]=s);let c;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,G.jsx)(j,{id:`settings-computer`,className:`w-60 max-w-full min-w-0`,children:(0,G.jsx)(Je,{})}),t[5]=c):c=t[5];let l;t[6]===n?l=t[7]:(l=n.map(_c),t[6]=n,t[7]=l);let u;t[8]===l?u=t[9]:(u=(0,G.jsx)(Be,{children:l}),t[8]=l,t[9]=u);let d;return t[10]!==r||t[11]!==o||t[12]!==s||t[13]!==u?(d=(0,G.jsxs)(ue,{orientation:`horizontal`,className:`w-fit max-w-full`,children:[a,(0,G.jsxs)(Me,{items:o,value:r,onValueChange:s,children:[c,u]})]}),t[10]=r,t[11]=o,t[12]=s,t[13]=u,t[14]=d):d=t[14],d}function _c(e){return(0,G.jsx)(P,{value:e.id,children:(0,G.jsx)($e,{text:e.name,className:`block min-w-0`})},e.id)}function vc(e){return{value:e.id,label:e.name}}function yc(){let e=(0,K.c)(4),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,G.jsx)(I,{id:`appearance`,title:`Appearance`,children:(0,G.jsx)(T,{children:(0,G.jsx)(fc,{label:`Theme`,description:`System follows your operating system.`,name:`appearance`,options:[{value:`system`,label:`System`},{value:`light`,label:`Light`},{value:`dark`,label:`Dark`}]})})}),e[0]=t):t=e[0];let n;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,G.jsx)(fc,{label:`Diff layout`,description:`Split shows old and new side by side.`,name:`diffStyle`,options:[{value:`unified`,label:`Unified`},{value:`split`,label:`Split`}]}),e[1]=n):n=e[1];let r;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,G.jsx)(I,{id:`code`,title:`Code`,children:(0,G.jsxs)(T,{children:[n,(0,G.jsx)(fc,{label:`Long lines`,name:`lineOverflow`,options:[{value:`scroll`,label:`Scroll`},{value:`wrap`,label:`Wrap long lines`}]})]})}),e[2]=r):r=e[2];let i;return e[3]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,G.jsxs)(G.Fragment,{children:[t,r,(0,G.jsx)(I,{id:`documents`,title:`Documents`,children:(0,G.jsx)(T,{children:(0,G.jsx)(fc,{label:`Documents open as`,description:`Markdown and HTML. Switch per file.`,name:`documentsDefault`,options:[{value:`rendered`,label:`Rendered`},{value:`source`,label:`Source`}]})})}),(0,G.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`These preferences are saved on this device.`})]}),e[3]=i):i=e[3],i}function bc(){let e=(0,K.c)(17),{connection:t}=le(),n=ne(),r;e[0]===t?r=e[1]:(r={id:`this-computer`,name:`This computer`,phrase:`this computer`,connection:t},e[0]=t,e[1]=r);let i;e[2]!==n||e[3]!==r?(i=[r,...n.map(xc)],e[2]=n,e[3]=r,e[4]=i):i=e[4];let a=i,[o,s]=(0,V.useState)(`this-computer`),c;e[5]!==o||e[6]!==a?(c=a.find(e=>e.id===o)??a[0],e[5]=o,e[6]=a,e[7]=c):c=e[7];let l=c,u;e[8]!==l?.id||e[9]!==a?(u=a.length>1&&(0,G.jsx)(gc,{computers:a,selected:l?.id??`this-computer`,onSelect:s}),e[8]=l?.id,e[9]=a,e[10]=u):u=e[10];let d;e[11]===l?d=e[12]:(d=l&&(0,G.jsx)(hc,{connection:l.connection,computer:l},l.id),e[11]=l,e[12]=d);let f;e[13]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,G.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Saved on the computer, for every device connected to it. Archive and pull run on the computer that holds the worktree.`}),e[13]=f):f=e[13];let p;return e[14]!==u||e[15]!==d?(p=(0,G.jsxs)(G.Fragment,{children:[u,d,f]}),e[14]=u,e[15]=d,e[16]=p):p=e[16],p}function xc(e){return{id:e.remote.environmentId,name:e.remote.name,phrase:e.remote.name,connection:e.connection}}function Sc(e){let t=(0,K.c)(9),n=z(e),r;t[0]===n?r=t[1]:(r=Ae(Tt(n)),t[0]=n,t[1]=r);let i;t[2]===r?i=t[3]:(i={includeFailure:!0,suspendOnWaiting:r},t[2]=r,t[3]=i);let a=g(e,i),o;t[4]===a?o=t[5]:(o=Ee(Tt(a),()=>{throw ct(a)?en(a.cause):Error(`The read has no confirmed value`)}),t[4]=a,t[5]=o);let s=o,c;return t[6]!==a||t[7]!==s?(c={result:a,value:s},t[6]=a,t[7]=s,t[8]=c):c=t[8],c}export{Mi as $,Tr as $t,$a as A,qr as At,Ea as B,Br as Bt,Qa as C,si as Ct,Ka as D,Hr as Dt,eo as E,ni as Et,Da as F,Jr as Ft,va as G,Nr as Gt,Ca as H,Ir as Ht,Oa as I,Kr as It,ma as J,kr as Jt,fa as K,Lr as Kt,xa as L,ei as Lt,Ra as M,Xr as Mt,Wa as N,Zr as Nt,ka as O,pi as Ot,Ga as P,Yr as Pt,Yi as Q,Er as Qt,wa as R,ti as Rt,to as S,oi as St,Ja as T,ai as Tt,ya as U,Rr as Ut,Sa as V,Fr as Vt,J as W,Pr as Wt,Hi as X,Mr as Xt,ha as Y,Or as Yt,Ui as Z,Dr as Zt,Va as _,li as _t,Ks as a,yr as an,yi as at,ro as b,ui as bt,Ho as c,sr as cn,xi as ct,ho as d,er as dn,Di as dt,xr as en,Si as et,go as f,Sn as fn,ii as ft,Ua as g,fn as gn,ci as gt,po as h,dn as hn,Qr as ht,Ys as i,vr as in,wi as it,Ha as j,Gr as jt,ja as k,mi as kt,Bo as l,cr as ln,Ai as lt,lo as m,mn,Wr as mt,yc as n,Cr as nn,ji as nt,Ws as o,wr as on,Ti as ot,mo as p,xn as pn,ri as pt,_a as q,Ar as qt,bc as r,br as rn,ki as rt,Ro as s,ur as sn,Ei as st,Sc as t,Sr as tn,Ci as tt,Vo as u,W as un,Oi as ut,qa as v,di as vt,Xa as w,Ur as wt,no as x,$r as xt,Za as y,fi as yt,Ta as z,Vr as zt};
|