decocms
Version:
Deco CMS — Self-hostable MCP Gateway for managing AI connections and tools
2 lines (1 loc) • 35.5 kB
JavaScript
import{fP as U,q as ke,b as V,r as H,e as Fe,K as Q,fQ as ae,eh as ze,fR as Re,fS as ce,fT as fe,fU as Le,fV as He,fW as $e,fX as Ue,c as $,fY as Be,fZ as Ie,j as o,x as Qe,aW as Ve,w as qe,e3 as we,R as Ge,v as We,D as Ye,m as Ze,B as je,h as Je,t as Pe,X as Xe,a_ as ue,Y as ie,a9 as _e,Z as Ke,_ as et}from"./index-DoEtSiIe.js";import{u as tt}from"./use-voice-input-DJjQBO4e.js";import{x as it,c as rt,u as be,v as nt,aq as st,ar as Ce,as as ot,at as W,au as ee,aj as lt,av as at,aw as de,ax as re,ay as me,Z as ct,X as ft,Y as ut,az as dt,aA as he,aB as mt,ac as ht,aC as gt,aD as pt,y as yt,$ as xt,aE as vt,a1 as St}from"./site-editor-toast-B-FDGvtN.js";import{b as kt,h as wt,a as jt,d as ge,e as pe,f as Pt,c as bt,g as Ct}from"./hosted-reconcile-CTronLZo.js";import{A as Et,z as Dt}from"./blocks-tab-states-CTy1iAF5.js";import{s as Nt}from"./sandbox-git-api-DiUyKbJU.js";import{u as Tt}from"./chat-context-vJ6R-Clt.js";import{b as At}from"./sandbox-url-D3mC8qhT.js";import{d as Mt}from"./utils-CzRFs-0R.js";import{d as Ot}from"./delay-CnY5UFtP.js";import{i as Ft}from"./AlertCircle-GoAGGV0G.js";import{e as zt}from"./agent-icon-DoabtHNW.js";import{a as Rt}from"./SwitchHorizontal01-CHtrDs50.js";import{i as Lt}from"./File02-Y4Nh84qP.js";import{a as te}from"./Image01-BRABRo3v.js";import{i as Ee}from"./Upload01-DgxprpI7.js";import{S as Ht}from"./search-input-wk0beNbE.js";import{T as $t,a as Ut,c as Bt,b as It}from"./tabs-Bh3jtZIY.js";import{u as Qt}from"./use-debounced-value-DqHSmPMR.js";import{a as Vt}from"./use-file-configs-J6lDtEfO.js";import{a as qt,u as Gt,i as De,B as Wt,e as Yt,b as ye,f as Zt}from"./asset-utils-D7ZsoUjl.js";import{f as q,M as Jt,c as Xt,g as K}from"./usage-stats-CLeyhHyT.js";function _t(t,e,i,n={}){return Ne("",t,e,i,n)}function Ne(t,e,i,n,r){if(Y(i,n)||Y(e,n))return i;if(Y(e,i))return n;if(ne(i)&&ne(n)){const s=ne(e)?e:{},a={},c=[...Object.keys(i),...Object.keys(n).filter(p=>!(p in i))];for(const p of c){const g=Ne(`${t}/${Kt(p)}`,s[p],i[p],n[p],r);g!==void 0&&(a[p]=g)}return a}if(Array.isArray(e)&&Array.isArray(i)&&Array.isArray(n)&&i.length===e.length&&n.length===e.length){const s=[];for(const[a,c]of e.entries()){const p=!Y(c,i[a]),g=!Y(c,n[a]);if(p&&g&&!Y(i[a],n[a]))return xe(t,i,n,r);s.push(p?i[a]:n[a])}return s}return xe(t,i,n,r)}function xe(t,e,i,n){return n.conflicts?.push(t),n.prefer==="theirs"?i:e}function Kt(t){return t.replaceAll("~","~0").replaceAll("/","~1")}function Y(t,e){return U(t)===U(e)}function ne(t){return!!t&&typeof t=="object"&&!Array.isArray(t)}function ei(t){return t?1e3:700}const X=new Map;function _(t,e){return`${t}\0${e}`}function ve(t,e){return X.has(t)?X.get(t)!==e?!0:(X.delete(t),!1):!1}function se(t){return!!t&&typeof t=="object"&&t.keptTheirs===!0}const Z=new Map,ti=20,ii=200,ri=1500;function Te(t){const e=Z.get(t);Z.delete(t);const i=e??[];if(Z.set(t,i),Z.size>ii){const n=Z.keys().next().value;n!==void 0&&Z.delete(n)}return i}function ni(t,e){const i=Te(t);i.push(U(e)),i.length>ti&&i.shift()}function si(t,e){return Te(t).includes(U(e))}async function oi(t,e){if(e){if(e.value===void 0)return{[t]:null};try{return{[t]:await Ie(e.value)}}catch{return}}}function li({orgSlug:t,virtualMcpId:e,branch:i},n){const r=ke(),s=Tt()?.taskId??null,a=it(e),c=tt(e).runtime==="cms",{url:p}=rt(e),g=be(e,i),v=g.kind==="protocol"?g:null,d=nt({orgSlug:t,virtualMcpId:e,branch:i}),S=V(),k=v?.source==="github",[P]=H.useState(()=>n?.holdsCopy?new Ct(()=>gt(r,d)):null);P?.settle();const h=k?P:null,j=async(l,f,u,x)=>{if(p)return{blockKey:l,data:f};if(c){const F=async(R,M)=>{const B=await oi(l,M);return vt({orgSlug:t,virtualMcpId:e,branch:i},{set:{[l]:R},...B?{expect:B}:{}})},L=`${d}:${l}`,m=(R,M=[])=>new W(R,M.length>0?S("sectionsEditor.sectionsEditor.blockFieldsChangedElsewhere",{fields:Be(M)}):S("sectionsEditor.sectionsEditor.blockChangedElsewhere"),M),w=async R=>{await r.invalidateQueries({queryKey:Q.decofile(d)});const M=r.getQueryData(Q.decofile(d))?.[l];if(u&&si(L,M)&&U(M)!==U(u.value))return await Ot(ri),{draft:await F(f,u),written:f};const B=[],G=x&&u?.fromCache?_t(u.value,f,M,{prefer:"theirs",conflicts:B}):void 0;if(G===void 0||B.length>0)throw m(R.blocks,B);const I=ae(G);return{draft:await F(I,{value:M}),written:I}};let z=f,A;try{A=await F(f,u)}catch(R){if(!(R instanceof W))throw R;try{({draft:A,written:z}=await w(R))}catch(M){throw!(M instanceof W)||M.fields.length>0?M:(await r.invalidateQueries({queryKey:Q.decofile(d)}),m(M.blocks))}}return ni(L,z),pt(r,{orgSlug:t,virtualMcpId:e,branch:i},A),await r.invalidateQueries({queryKey:Nt({orgSlug:t,virtualMcpId:e,branch:i,threadId:s})}),{...A,written:z}}const y=yt(a,Mt(l)),D=JSON.stringify(f,null,2),E=await fetch(At({orgSlug:t,virtualMcpId:e,branch:i,threadId:s},"write"),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({path:y,content:D})});return E.ok?E.json():xt(E,"Write")},b=async(l,f,u,x,y,D)=>{const E=v,F={queryClient:r,backend:E,params:l,cacheKey:d};let L=u,m=y?void 0:D?D.value:x?.value,w=y?{[f]:null}:D?{[f]:await wt(D,Re(r,d,f))}:await jt(F,[f],x?{[f]:x.value}:void 0);for(let z=0;;z++)try{return{...await re(r,E,l,d,{set:{[f]:L}},w),written:L}}catch(A){if(!ee(A))throw A;const R=await me(r,E,l,d,f,A),M=r.getQueryData(Q.decofile(d))?.[f],B=he(r,d,f,E),G=L;if(z+1>=ge||!ce()||B===void 0||!J(G)||M!==void 0&&!J(M))throw new W([f],z+1>=ge?S("siteEditor.save.keptChanging"):S("siteEditor.save.conflict"),[],R);if(w={[f]:B},!J(M)){if(!J(m))continue;if(await fe({kind:"theyDeleted",label:pe(f,m,G)})==="theirs")return{keptTheirs:!0,deleted:!0};m=void 0;continue}const I=Le({ancestor:J(m)?m:{},mine:G,theirs:M}),le=I.pointers.length===0?{}:await He(I,$e(I,C(l,M),!0),{block:Et(f,M),author:{draft:l,blockKey:f}});if(L=I.pointers.length===0?I.merged:Ue(I,le),Pt(le)&&U(L)===U(M))return{keptTheirs:!0,deleted:!1};m=M}},C=(l,f)=>{const u=f.__resolveType,x=r.getQueryData(ht(l,v));if(typeof u!="string"||!x?.manifest)return null;try{return Dt(u,x)}catch{return null}},N=async(l,f,u,x,y)=>{const D=v,E=r.getQueryData(Q.decofile(d));if(E&&Object.hasOwn(E,f)||!ce()||!J(u))return;if(await fe({kind:"theyDeleted",label:pe(f,y?.value,u)})==="theirs")return{keptTheirs:!0,deleted:!0};const L=he(r,d,f,D);if(L===void 0)return;const m=await re(r,D,l,d,{set:{[f]:u}},{[f]:L});return x.onApplied?.(m.versions),{...m,written:u}},T=Fe({mutationKey:ut(t,e,i),scope:ft(t,e,i),mutationFn:async({blockKey:l,data:f,base:u,rebaseOnConflict:x=!0,guard:y,create:D=!1,edit:E})=>{if(g.kind==="pending"||g.kind==="unavailable")throw lt("CMS storage");if(v?.source!=="github"&&(f=ae(f)),v){const F={orgSlug:t,virtualMcpId:e,branch:i},L=w=>{!h||se(w)||U(w.written)===U(f)&&w.versions[l]&&h.saved(l,f)};if(k&&!y){const w=await b(F,l,f,u,D,D?void 0:h?.guardOf(l,E));return L(w),w}if(k&&y&&!y.reloadOnConflict){const w=await y.ifMatch(l),z=D||!!w&&w[l]===null;try{const A=await b(F,l,f,u,z,z?void 0:h?.guardOf(l,E));return L(A),y.onApplied?.(se(A)?{}:A.versions),A}catch(A){throw y.onRejected?.(A),A}}let m=await y?.ifMatch(l);if(y&&!m&&k&&(await at(r,v,F,d).catch(()=>{throw new de}),m=await y.ifMatch(l),!m))throw new de;try{const w=await re(r,v,F,d,{set:{[l]:f}},m);return m&&y?.onApplied?.(w.versions),w}catch(w){if(m&&y?.onRejected?.(w),m&&y?.reloadOnConflict&&ee(w)){const z=await me(r,v,F,d,l,w);if(k)try{const A=await N(F,l,f,y,u);if(A)return A}catch(A){if(!ee(A))throw A}throw new W([l],S("sectionsEditor.sectionsEditor.blockChangedElsewhere"),[],z)}throw w}}return ct({queryClient:r,orgSlug:t,virtualMcpId:e,branch:i,backend:g,cacheKey:d},{kind:"edit",write:()=>j(l,f,u,x)})},onMutate:async({blockKey:l,data:f})=>{const u=Q.decofile(d);await r.cancelQueries({queryKey:u});const x=r.getQueryData(u),y=!!x&&l in x,D=x?.[l];return r.setQueryData(u,E=>({...E??{},[l]:f})),X.set(_(d,l),f),{queryKey:u,blockKey:l,hadKey:y,previousValue:D}},onError:(l,{blockKey:f,data:u},x)=>{ot(S,l),!ve(_(d,f),u)&&(!x||l instanceof W||(ee(l)&&r.invalidateQueries({queryKey:x.queryKey}),r.setQueryData(x.queryKey,y=>{if(!y)return y;if(!x.hadKey){const{[x.blockKey]:D,...E}=y;return E}return{...y,[x.blockKey]:x.previousValue}})))},onSuccess:(l,{blockKey:f,data:u})=>{const x=ve(_(d,f),u),y=()=>{if(!h)return;const E=bt({orgSlug:t,virtualMcpId:e,branch:i});ze.schedule(()=>kt(E,f))};if(se(l)){st(S,l.deleted,l.deleted&&Ce(r,d,f)),y();return}if(x)return;const D=l&&typeof l=="object"&&"written"in l?l.written:u;r.setQueryData(Q.decofile(d),E=>({...E??{},[f]:D})),U(D)!==U(u)&&y()}}),O=l=>{if(l.base)return l;const f=r.getQueryData(Q.decofile(d));return f?{...l,base:{value:f[l.blockKey],fromCache:!0}}:l};return{...T,v8:g.kind!=="legacy",mutate:(l,f)=>T.mutate(O(l),f),mutateAsync:(l,f)=>T.mutateAsync(O(l),f),reportError:l=>dt(S,l,v?.source??null),hold:l=>P?.hold(l),holdsCopy:h!==null,autosaveDelay:ei(v!==null),showEdit:(l,f)=>{r.setQueryData(Q.decofile(d),u=>({...u??{},[l]:f})),X.set(_(d,l),f)},forgetShownEdit:l=>{X.delete(_(d,l))},edited:l=>h?.edited(l),shown:l=>h?.get(l)}}function or(t,e){const i=$.c(35),n=e?.holdsCopy;let r;i[0]!==n?(r={holdsCopy:n},i[0]=n,i[1]=r):r=i[1];const s=li(t,r);let a;i[2]===Symbol.for("react.memo_cache_sentinel")?(a=new Map,i[2]=a):a=i[2];const c=H.useRef(a);let p;i[3]===Symbol.for("react.memo_cache_sentinel")?(p=new Map,i[3]=p):p=i[3];const g=H.useRef(p);let v;i[4]===Symbol.for("react.memo_cache_sentinel")?(v=new Map,i[4]=v):v=i[4];const d=H.useRef(v);let S;i[5]===Symbol.for("react.memo_cache_sentinel")?(S=new Map,i[5]=S):S=i[5];const k=H.useRef(S);let P;i[6]===Symbol.for("react.memo_cache_sentinel")?(P=new Set,i[6]=P):P=i[6];const h=H.useRef(P);let j;i[7]===Symbol.for("react.memo_cache_sentinel")?(j=new Set,i[7]=j):j=i[7];const b=H.useRef(j);let C,N;i[8]!==e||i[9]!==s?(C=m=>{if(h.current.has(m)){b.current.add(m);return}const w=c.current.get(m);if(!w)return;const z=typeof w=="function"?w():w;c.current.delete(m);const A=g.current.get(m);if(g.current.delete(m),!z)return;h.current.add(m);const R=d.current.get(m);R&&d.current.set(m,{base:{value:z,fromCache:!0}});const M=()=>c.current.has(m)||b.current.has(m);s.mutateAsync({blockKey:m,data:z,guard:e?.guard,edit:A,...R?{base:R.base,...R.create?{create:!0}:{}}:{}}).then(()=>{M()||d.current.delete(m),e?.onSaved?.()},B=>{R&&d.current.set(m,R),s.reportError(B)}).finally(()=>{h.current.delete(m),b.current.delete(m)&&C(m)})},N=()=>{for(const m of k.current.values())clearTimeout(m);k.current.clear();for(const m of[...c.current.keys()])C(m)},i[8]=e,i[9]=s,i[10]=C,i[11]=N):(C=i[10],N=i[11]);const T=N;let O;i[12]!==e?.showEdits||i[13]!==s?(O=m=>{for(const w of m){const z=k.current.get(w);z&&clearTimeout(z),k.current.delete(w),c.current.delete(w),g.current.delete(w),b.current.delete(w),d.current.delete(w),e?.showEdits&&s.forgetShownEdit(w)}},i[12]=e?.showEdits,i[13]=s,i[14]=O):O=i[14],mt(t.orgSlug,t.virtualMcpId,O);let l,f;i[15]===Symbol.for("react.memo_cache_sentinel")?(l=()=>{const m=w=>{(c.current.size>0||h.current.size>0)&&w.preventDefault()};return window.addEventListener("beforeunload",m),()=>window.removeEventListener("beforeunload",m)},f=[],i[15]=l,i[16]=f):(l=i[15],f=i[16]),H.useEffect(l,f);let u;i[17]!==T||i[18]!==e?.showEdits||i[19]!==s.holdsCopy?(u=()=>{const m=s.holdsCopy||!!e?.showEdits;return m&&T(),m},i[17]=T,i[18]=e?.showEdits,i[19]=s.holdsCopy,i[20]=u):u=i[20];const x=H.useEffectEvent(u);let y;i[21]!==x?(y=()=>{const m=k.current;return()=>{if(!x())for(const w of m.values())clearTimeout(w)}},i[21]=x,i[22]=y):y=i[22];let D;i[23]===Symbol.for("react.memo_cache_sentinel")?(D=[],i[23]=D):D=i[23],H.useEffect(y,D);let E;i[24]!==e?.showEdits||i[25]!==C||i[26]!==s?(E=(m,w,z)=>{if(!g.current.has(m)){const R=s.edited(m);R&&g.current.set(m,R)}z&&!d.current.has(m)&&d.current.set(m,z),e?.showEdits&&typeof w!="function"&&s.showEdit(m,w),c.current.set(m,w);const A=k.current.get(m);A&&clearTimeout(A),k.current.set(m,setTimeout(()=>{k.current.delete(m),C(m)},s.autosaveDelay))},i[24]=e?.showEdits,i[25]=C,i[26]=s,i[27]=E):E=i[27];const F=E;let L;return i[28]!==T||i[29]!==F||i[30]!==s.hold||i[31]!==s.isError||i[32]!==s.isPending||i[33]!==s.v8?(L={save:F,flush:T,isPending:s.isPending,isError:s.isError,hold:s.hold,v8:s.v8},i[28]=T,i[29]=F,i[30]=s.hold,i[31]=s.isError,i[32]=s.isPending,i[33]=s.v8,i[34]=L):L=i[34],L}function J(t){return!!t&&typeof t=="object"&&!Array.isArray(t)}const Ae="file-picker:last-config-id";function lr(t){const e=$.c(31),i=V(),n=t.open,r=t.onOpenChange;let s;e[0]!==t.mode||e[1]!==i?(s=t.mode==="image"?i("filePicker.filePickerDialog.pickAnImage"):i("filePicker.filePickerDialog.pickAFile"),e[0]=t.mode,e[1]=i,e[2]=s):s=e[2];let a;e[3]!==s?(a=o.jsx(Qe,{children:s}),e[3]=s,e[4]=a):a=e[4];let c;e[5]!==i?(c=i("filePicker.filePickerDialog.description"),e[5]=i,e[6]=c):c=e[6];let p;e[7]!==c?(p=o.jsx(Ve,{children:c}),e[7]=c,e[8]=p):p=e[8];let g;e[9]!==a||e[10]!==p?(g=o.jsxs(qe,{children:[a,p]}),e[9]=a,e[10]=p,e[11]=g):g=e[11];let v;e[12]!==i?(v=b=>{const{error:C}=b;return o.jsx(ai,{error:C??new Error(i("filePicker.filePickerDialog.failedToLoadBuckets"))})},e[12]=i,e[13]=v):v=e[13];let d;e[14]===Symbol.for("react.memo_cache_sentinel")?(d=o.jsx(we,{className:"h-64 w-full"}),e[14]=d):d=e[14];let S;e[15]!==t?(S=b=>{t.onSelect(b),t.onOpenChange(!1)},e[15]=t,e[16]=S):S=e[16];let k;e[17]!==t.lockedConfigId||e[18]!==t.mode||e[19]!==S?(k=o.jsx(H.Suspense,{fallback:d,children:o.jsx(ci,{mode:t.mode,lockedConfigId:t.lockedConfigId,onSelect:S})}),e[17]=t.lockedConfigId,e[18]=t.mode,e[19]=S,e[20]=k):k=e[20];let P;e[21]!==k||e[22]!==v?(P=o.jsx(Ge,{fallback:v,children:k}),e[21]=k,e[22]=v,e[23]=P):P=e[23];let h;e[24]!==P||e[25]!==g?(h=o.jsxs(We,{className:"sm:max-w-3xl max-h-[85vh] overflow-hidden flex flex-col",children:[g,P]}),e[24]=P,e[25]=g,e[26]=h):h=e[26];let j;return e[27]!==t.onOpenChange||e[28]!==t.open||e[29]!==h?(j=o.jsx(Ye,{open:n,onOpenChange:r,children:h}),e[27]=t.onOpenChange,e[28]=t.open,e[29]=h,e[30]=j):j=e[30],j}function ai(t){const e=$.c(3),{error:i}=t;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=o.jsx(Ft,{size:16}),e[0]=n):n=e[0];let r;return e[1]!==i.message?(r=o.jsxs("div",{className:"p-4 rounded-md bg-destructive/10 text-destructive flex items-center gap-2",children:[n,o.jsx("span",{className:"text-sm font-medium",children:i.message})]}),e[1]=i.message,e[2]=r):r=e[2],r}function ci(t){const e=$.c(36),{mode:i,lockedConfigId:n,onSelect:r}=t,s=Vt(),a=V();if(s.length===0){let h;return e[0]===Symbol.for("react.memo_cache_sentinel")?(h=o.jsx(di,{}),e[0]=h):h=e[0],h}if(n){let h;if(e[1]!==s||e[2]!==n){let N;e[4]!==n?(N=T=>T.id===n,e[4]=n,e[5]=N):N=e[5],h=s.find(N),e[1]=s,e[2]=n,e[3]=h}else h=e[3];const j=h;if(j){let N;return e[6]!==j||e[7]!==i||e[8]!==r?(N=o.jsx(oe,{config:j,mode:i,onSelect:r}),e[6]=j,e[7]=i,e[8]=r,e[9]=N):N=e[9],N}let b;e[10]!==a?(b=a("virtualMcp.settings.assetStorage.missing"),e[10]=a,e[11]=b):b=e[11];let C;return e[12]!==b?(C=o.jsx("p",{className:"p-6 text-sm text-muted-foreground",children:b}),e[12]=b,e[13]=C):C=e[13],C}if(s.length===1){const h=s[0];let j;return e[14]!==h||e[15]!==i||e[16]!==r?(j=o.jsx(oe,{config:h,mode:i,onSelect:r}),e[14]=h,e[15]=i,e[16]=r,e[17]=j):j=e[17],j}let c;e[18]===Symbol.for("react.memo_cache_sentinel")?(c=typeof window<"u"?window.localStorage.getItem(Ae):null,e[18]=c):c=e[18];const p=c;let g;e[19]!==s?(g=s.find(h=>h.id===p)?.id??s[0].id,e[19]=s,e[20]=g):g=e[20];const v=g;let d;e[21]!==s?(d=s.map(fi),e[21]=s,e[22]=d):d=e[22];let S;e[23]!==d?(S=o.jsx(Ut,{className:"self-start",children:d}),e[23]=d,e[24]=S):S=e[24];let k;if(e[25]!==s||e[26]!==i||e[27]!==r){let h;e[29]!==i||e[30]!==r?(h=j=>o.jsx(Bt,{value:j.id,className:"min-h-0 flex-1 overflow-hidden flex flex-col",children:o.jsx(oe,{config:j,mode:i,onSelect:r})},j.id),e[29]=i,e[30]=r,e[31]=h):h=e[31],k=s.map(h),e[25]=s,e[26]=i,e[27]=r,e[28]=k}else k=e[28];let P;return e[32]!==v||e[33]!==S||e[34]!==k?(P=o.jsxs(It,{defaultValue:v,onValueChange:ui,className:"min-h-0 flex-1 flex flex-col",children:[S,k]}),e[32]=v,e[33]=S,e[34]=k,e[35]=P):P=e[35],P}function fi(t){return o.jsx($t,{value:t.id,children:t.name},t.id)}function ui(t){typeof window<"u"&&window.localStorage.setItem(Ae,t)}function di(){const t=$.c(12),e=V();let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i=o.jsx("div",{className:"size-12 rounded-full bg-muted flex items-center justify-center",children:o.jsx(Ee,{size:20,className:"text-muted-foreground"})}),t[0]=i):i=t[0];let n;t[1]!==e?(n=e("filePicker.filePickerDialog.noBucketConfigured"),t[1]=e,t[2]=n):n=t[2];let r;t[3]!==n?(r=o.jsx("p",{className:"font-medium text-sm",children:n}),t[3]=n,t[4]=r):r=t[4];let s;t[5]!==e?(s=e("filePicker.filePickerDialog.noBucketDescription"),t[5]=e,t[6]=s):s=t[6];let a;t[7]!==s?(a=o.jsx("p",{className:"text-xs text-muted-foreground mt-1 max-w-sm",children:s}),t[7]=s,t[8]=a):a=t[8];let c;return t[9]!==r||t[10]!==a?(c=o.jsxs("div",{className:"rounded-xl border border-dashed border-border/60 p-10 flex flex-col items-center justify-center text-center gap-3",children:[i,o.jsxs("div",{children:[r,a]})]}),t[9]=r,t[10]=a,t[11]=c):c=t[11],c}function oe({config:t,mode:e,onSelect:i}){const n=V(),[r,s]=H.useState(""),a=Qt(r,300),c=qt({configId:t.id,search:a,imageOnly:e==="image"}),p=Gt(),[g,v]=H.useState(!1),d=H.useRef(null),S=e==="image"?"image/*":void 0;async function k(u){if(!u)return;const x=Array.from(u);if(x.length===0)return;let y=null;const D=[];for(const E of x)try{const F=await p.mutateAsync({configId:t.id,file:E});y??=F.publicUrl}catch(F){D.push(`${E.name} (${F instanceof Error?F.message:"upload failed"})`)}c.data?.pages.some(E=>E.listingError)||c.refetch(),D.length>0&&Pe.error(D.length===x.length?n("filePicker.filePickerDialog.uploadFailedAll",{errors:D.join("; ")}):n("filePicker.filePickerDialog.uploadFailedSome",{errors:D.join("; ")})),y&&i(y)}function P(u){u.preventDefault(),v(!0)}function h(){v(!1)}function j(u){u.preventDefault(),u.stopPropagation(),v(!1),k(u.dataTransfer.files)}const b=c.data?.pages??[],C=b.some(u=>u.listingError==="access_denied"),N=b.flatMap(u=>u.items),T=N.filter(u=>e==="image"?De(u.key):!0),O=a.trim(),l=N.length>0||r.trim().length>0,f=r!==a||c.isFetching&&!c.isFetchingNextPage;return o.jsxs("div",{className:"flex flex-col gap-3 min-h-0 flex-1",children:[o.jsxs("button",{type:"button",onClick:()=>d.current?.click(),onDragOver:P,onDragLeave:h,onDrop:j,className:Ze("rounded-xl border border-dashed border-border/60 p-6 flex flex-col items-center justify-center gap-2 text-center transition-colors",g&&"border-primary bg-primary/5",p.isPending&&"opacity-60 pointer-events-none"),children:[o.jsx(Ee,{size:18,className:"text-muted-foreground"}),o.jsx("p",{className:"text-sm font-medium",children:p.isPending?n("filePicker.filePickerDialog.uploading"):n("filePicker.filePickerDialog.dropFilesOrClick")}),o.jsxs("p",{className:"text-xs text-muted-foreground",children:[n("filePicker.filePickerDialog.uploadSizeLimit")," ",n(e==="image"?"filePicker.filePickerDialog.imagesOnlyTypes":"filePicker.filePickerDialog.commonMediaTypes")]}),o.jsx("input",{ref:d,type:"file",accept:S,multiple:!0,className:"hidden",onChange:u=>{const x=Array.from(u.target.files??[]);u.target.value="",k(x)}})]}),l?o.jsx(Ht,{value:r,onChange:s,isSearching:f,placeholder:n(e==="image"?"filePicker.filePickerDialog.searchImagesPlaceholder":"filePicker.filePickerDialog.searchFilesPlaceholder"),className:"shrink-0"}):null,o.jsxs("div",{className:"min-h-0 flex-1 overflow-y-auto pr-1",children:[C||c.isError?o.jsx(Wt,{denied:C,retrying:c.isFetching,onRetry:()=>{c.refetch()}}):c.isPending?o.jsx(we,{className:"h-32 w-full"}):T.length===0?O?o.jsx(gi,{query:O}):e==="image"&&N.length>0?o.jsx(hi,{}):o.jsx(mi,{}):e==="image"?o.jsx(pi,{items:T,onSelect:i}):o.jsx(yi,{items:T,onSelect:i}),c.hasNextPage&&o.jsx("div",{className:"flex justify-center py-4",children:o.jsx(je,{type:"button",variant:"outline",size:"sm",disabled:c.isFetchingNextPage,onClick:()=>c.fetchNextPage(),children:c.isFetchingNextPage?o.jsxs(o.Fragment,{children:[o.jsx(Je,{className:"size-3.5"}),n("filePicker.filePickerDialog.loading")]}):n("filePicker.filePickerDialog.loadMore")})})]})]})}function mi(){const t=$.c(12),e=V();let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i=o.jsx("div",{className:"flex size-10 items-center justify-center rounded-full bg-muted",children:o.jsx(te,{size:18,className:"text-muted-foreground"})}),t[0]=i):i=t[0];let n;t[1]!==e?(n=e("filePicker.filePickerDialog.noFilesYet"),t[1]=e,t[2]=n):n=t[2];let r;t[3]!==n?(r=o.jsx("p",{className:"text-sm font-medium",children:n}),t[3]=n,t[4]=r):r=t[4];let s;t[5]!==e?(s=e("filePicker.filePickerDialog.dropFileToGetStarted"),t[5]=e,t[6]=s):s=t[6];let a;t[7]!==s?(a=o.jsx("p",{className:"text-xs text-muted-foreground",children:s}),t[7]=s,t[8]=a):a=t[8];let c;return t[9]!==r||t[10]!==a?(c=o.jsxs("div",{className:"flex h-full min-h-40 flex-col items-center justify-center gap-2 py-8 text-center",children:[i,r,a]}),t[9]=r,t[10]=a,t[11]=c):c=t[11],c}function hi(){const t=$.c(12),e=V();let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i=o.jsx("div",{className:"flex size-10 items-center justify-center rounded-full bg-muted",children:o.jsx(te,{size:18,className:"text-muted-foreground"})}),t[0]=i):i=t[0];let n;t[1]!==e?(n=e("filePicker.filePickerDialog.noImagesYet"),t[1]=e,t[2]=n):n=t[2];let r;t[3]!==n?(r=o.jsx("p",{className:"text-sm font-medium",children:n}),t[3]=n,t[4]=r):r=t[4];let s;t[5]!==e?(s=e("filePicker.filePickerDialog.noImagesFormatDesc"),t[5]=e,t[6]=s):s=t[6];let a;t[7]!==s?(a=o.jsx("p",{className:"text-xs text-muted-foreground",children:s}),t[7]=s,t[8]=a):a=t[8];let c;return t[9]!==r||t[10]!==a?(c=o.jsxs("div",{className:"flex h-full min-h-40 flex-col items-center justify-center gap-2 py-8 text-center",children:[i,r,a]}),t[9]=r,t[10]=a,t[11]=c):c=t[11],c}function gi(t){const e=$.c(13),{query:i}=t,n=V();let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=o.jsx("div",{className:"flex size-10 items-center justify-center rounded-full bg-muted",children:o.jsx(te,{size:18,className:"text-muted-foreground"})}),e[0]=r):r=e[0];let s;e[1]!==i||e[2]!==n?(s=n("filePicker.filePickerDialog.noMatches",{query:i}),e[1]=i,e[2]=n,e[3]=s):s=e[3];let a;e[4]!==s?(a=o.jsx("p",{className:"text-sm font-medium",children:s}),e[4]=s,e[5]=a):a=e[5];let c;e[6]!==n?(c=n("filePicker.filePickerDialog.tryDifferentSearchOrLoadMore"),e[6]=n,e[7]=c):c=e[7];let p;e[8]!==c?(p=o.jsx("p",{className:"text-xs text-muted-foreground",children:c}),e[8]=c,e[9]=p):p=e[9];let g;return e[10]!==a||e[11]!==p?(g=o.jsxs("div",{className:"flex h-full min-h-40 flex-col items-center justify-center gap-2 py-8 text-center",children:[r,a,p]}),e[10]=a,e[11]=p,e[12]=g):g=e[12],g}function pi(t){const e=$.c(7),{items:i,onSelect:n}=t;let r;if(e[0]!==i||e[1]!==n){let a;e[3]!==n?(a=c=>o.jsx(Me,{item:c,variant:"image",onSelect:n},c.key),e[3]=n,e[4]=a):a=e[4],r=i.map(a),e[0]=i,e[1]=n,e[2]=r}else r=e[2];let s;return e[5]!==r?(s=o.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 gap-3",children:r}),e[5]=r,e[6]=s):s=e[6],s}function yi(t){const e=$.c(7),{items:i,onSelect:n}=t;let r;if(e[0]!==i||e[1]!==n){let a;e[3]!==n?(a=c=>o.jsx("li",{children:o.jsx(Me,{item:c,variant:"row",onSelect:n})},c.key),e[3]=n,e[4]=a):a=e[4],r=i.map(a),e[0]=i,e[1]=n,e[2]=r}else r=e[2];let s;return e[5]!==r?(s=o.jsx("ul",{className:"divide-y divide-border/60 rounded-lg border border-border/60",children:r}),e[5]=r,e[6]=s):s=e[6],s}function Me(t){const e=$.c(58),{item:i,variant:n,onSelect:r}=t;let s;e[0]!==i.key?(s=Yt(i.key),e[0]=i.key,e[1]=s):s=e[1];const a=s;if(n==="image"){let N;e[2]!==i.publicUrl||e[3]!==r?(N=()=>r(i.publicUrl),e[2]=i.publicUrl,e[3]=r,e[4]=N):N=e[4];let T;e[5]!==i.key||e[6]!==i.publicUrl?(T=o.jsx("img",{src:i.publicUrl,alt:i.key,loading:"lazy",className:"h-full w-full object-cover",onError:xi}),e[5]=i.key,e[6]=i.publicUrl,e[7]=T):T=e[7];let O;e[8]!==i.key||e[9]!==N||e[10]!==T?(O=o.jsx("button",{type:"button",onClick:N,className:"block h-full w-full transition hover:ring-2 hover:ring-primary",title:i.key,children:T}),e[8]=i.key,e[9]=N,e[10]=T,e[11]=O):O=e[11];let l;e[12]!==a?(l=o.jsx("span",{className:"pointer-events-none absolute left-1.5 top-1.5 rounded bg-background/80 px-1.5 py-0.5 text-2xs font-medium uppercase text-foreground opacity-0 backdrop-blur-sm transition-opacity group-hover:opacity-100",children:a}),e[12]=a,e[13]=l):l=e[13];let f;e[14]!==i||e[15]!==r?(f=o.jsx("div",{className:"absolute right-1.5 top-1.5 opacity-0 transition-opacity group-hover:opacity-100",children:o.jsx(Se,{item:i,onSelect:r})}),e[14]=i,e[15]=r,e[16]=f):f=e[16];let u;e[17]!==i.key?(u=ye(i.key),e[17]=i.key,e[18]=u):u=e[18];let x;e[19]!==u?(x=o.jsx("div",{className:"pointer-events-none absolute inset-x-0 bottom-0 bg-gradient-to-t from-black/70 to-transparent p-2 opacity-0 transition-opacity group-hover:opacity-100",children:o.jsx("p",{className:"truncate text-xs text-white",children:u})}),e[19]=u,e[20]=x):x=e[20];let y;return e[21]!==O||e[22]!==l||e[23]!==f||e[24]!==x?(y=o.jsxs("div",{className:"group relative aspect-square overflow-hidden rounded-lg border border-border/60 bg-muted",children:[O,l,f,x]}),e[21]=O,e[22]=l,e[23]=f,e[24]=x,e[25]=y):y=e[25],y}let c;e[26]!==i.publicUrl||e[27]!==r?(c=()=>r(i.publicUrl),e[26]=i.publicUrl,e[27]=r,e[28]=c):c=e[28];let p;e[29]!==i.key?(p=o.jsx("div",{className:"flex size-9 shrink-0 items-center justify-center rounded-md bg-muted",children:De(i.key)?o.jsx(te,{size:16,className:"text-muted-foreground"}):o.jsx(Lt,{size:16,className:"text-muted-foreground"})}),e[29]=i.key,e[30]=p):p=e[30];let g;e[31]!==i.key?(g=ye(i.key),e[31]=i.key,e[32]=g):g=e[32];let v;e[33]!==g?(v=o.jsx("p",{className:"truncate text-sm font-medium",children:g}),e[33]=g,e[34]=v):v=e[34];let d;e[35]!==i.key?(d=o.jsx("p",{className:"truncate font-mono text-xs text-muted-foreground",children:i.key}),e[35]=i.key,e[36]=d):d=e[36];let S;e[37]!==v||e[38]!==d?(S=o.jsxs("div",{className:"min-w-0 flex-1",children:[v,d]}),e[37]=v,e[38]=d,e[39]=S):S=e[39];let k;e[40]!==a?(k=o.jsx("span",{className:"shrink-0 rounded bg-muted px-1.5 py-0.5 text-2xs font-medium uppercase text-muted-foreground",children:a}),e[40]=a,e[41]=k):k=e[41];let P;e[42]!==i.size?(P=Zt(i.size),e[42]=i.size,e[43]=P):P=e[43];let h;e[44]!==P?(h=o.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:P}),e[44]=P,e[45]=h):h=e[45];let j;e[46]!==h||e[47]!==c||e[48]!==p||e[49]!==S||e[50]!==k?(j=o.jsxs("button",{type:"button",onClick:c,className:"flex min-w-0 flex-1 items-center gap-3 text-left",children:[p,S,k,h]}),e[46]=h,e[47]=c,e[48]=p,e[49]=S,e[50]=k,e[51]=j):j=e[51];let b;e[52]!==i||e[53]!==r?(b=o.jsx(Se,{item:i,onSelect:r}),e[52]=i,e[53]=r,e[54]=b):b=e[54];let C;return e[55]!==j||e[56]!==b?(C=o.jsxs("div",{className:"group flex items-center gap-3 px-3 py-2 transition hover:bg-accent",children:[j,b]}),e[55]=j,e[56]=b,e[57]=C):C=e[57],C}function xi(t){t.target.style.display="none"}function Se(t){const e=$.c(39),{item:i,onSelect:n}=t,r=V(),[s,a]=H.useState(!1);let c;e[0]!==i.publicUrl||e[1]!==r?(c=async function(y){y.preventDefault(),y.stopPropagation();try{await navigator.clipboard.writeText(i.publicUrl),a(!0),window.setTimeout(()=>a(!1),1500)}catch{Pe.error(r("filePicker.filePickerDialog.failedToCopyUrl"))}},e[0]=i.publicUrl,e[1]=r,e[2]=c):c=e[2];const p=c;let g;e[3]!==r?(g=r("filePicker.filePickerDialog.assetActions"),e[3]=r,e[4]=g):g=e[4];let v;e[5]===Symbol.for("react.memo_cache_sentinel")?(v=o.jsx(Rt,{size:14}),e[5]=v):v=e[5];let d;e[6]!==g?(d=o.jsx(Xe,{asChild:!0,children:o.jsx(je,{type:"button",variant:"ghost",size:"icon-sm",className:"bg-background/80 backdrop-blur-sm",onClick:ki,"aria-label":g,children:v})}),e[6]=g,e[7]=d):d=e[7];let S;e[8]!==i.publicUrl||e[9]!==n?(S=()=>n(i.publicUrl),e[8]=i.publicUrl,e[9]=n,e[10]=S):S=e[10];let k;e[11]===Symbol.for("react.memo_cache_sentinel")?(k=o.jsx(ue,{size:14}),e[11]=k):k=e[11];let P;e[12]!==r?(P=r("filePicker.filePickerDialog.useThis"),e[12]=r,e[13]=P):P=e[13];let h;e[14]!==S||e[15]!==P?(h=o.jsxs(ie,{onClick:S,children:[k,P]}),e[14]=S,e[15]=P,e[16]=h):h=e[16];let j;e[17]!==s?(j=s?o.jsx(ue,{size:14}):o.jsx(zt,{size:14}),e[17]=s,e[18]=j):j=e[18];let b;e[19]!==s||e[20]!==r?(b=r(s?"filePicker.filePickerDialog.copied":"filePicker.filePickerDialog.copyUrl"),e[19]=s,e[20]=r,e[21]=b):b=e[21];let C;e[22]!==p||e[23]!==b||e[24]!==j?(C=o.jsxs(ie,{onClick:p,children:[j,b]}),e[22]=p,e[23]=b,e[24]=j,e[25]=C):C=e[25];const N=i.publicUrl;let T;e[26]===Symbol.for("react.memo_cache_sentinel")?(T=o.jsx(_e,{size:14}),e[26]=T):T=e[26];let O;e[27]!==r?(O=r("filePicker.filePickerDialog.openInNewTab"),e[27]=r,e[28]=O):O=e[28];let l;e[29]!==i.publicUrl||e[30]!==O?(l=o.jsx(ie,{asChild:!0,children:o.jsxs("a",{href:N,target:"_blank",rel:"noreferrer",onClick:vi,children:[T,O]})}),e[29]=i.publicUrl,e[30]=O,e[31]=l):l=e[31];let f;e[32]!==C||e[33]!==l||e[34]!==h?(f=o.jsxs(Ke,{align:"end",onClick:Si,children:[h,C,l]}),e[32]=C,e[33]=l,e[34]=h,e[35]=f):f=e[35];let u;return e[36]!==f||e[37]!==d?(u=o.jsxs(et,{children:[d,f]}),e[36]=f,e[37]=d,e[38]=u):u=e[38],u}function vi(t){return t.stopPropagation()}function Si(t){return t.stopPropagation()}function ki(t){return t.stopPropagation()}function ar(t,e,i){return e||(t.length===1?t[0].id:t.length===0?null:t.some(n=>n.id===i)?i:null)}const wi=new Set(["http:","https:"]),ji=/[\u0000-\u001F\u007F]/g;function Pi(t){return t.replace(ji,"").trim()}const bi=/^[a-zA-Z][a-zA-Z0-9+.-]*:/;function cr(t){return Ci(t)!==""}function Ci(t){const e=Pi(t);if(!e)return"";if(!bi.test(e))try{return encodeURI(e)}catch{return""}try{const i=new URL(e);return wi.has(i.protocol)||i.protocol==="data:"&&/^data:image\//i.test(i.href)?i.href:""}catch{return""}}const Ei=q.create({name:"textAlign",addOptions(){return{types:[],alignments:["left","center","right","justify"],defaultAlignment:null}},addGlobalAttributes(){return[{types:this.options.types,attributes:{textAlign:{default:this.options.defaultAlignment,parseHTML:t=>{const e=t.style.textAlign;return this.options.alignments.includes(e)?e:this.options.defaultAlignment},renderHTML:t=>t.textAlign?{style:`text-align: ${t.textAlign}`}:{}}}}]},addCommands(){return{setTextAlign:t=>({commands:e})=>this.options.alignments.includes(t)?this.options.types.map(i=>e.updateAttributes(i,{textAlign:t})).some(i=>i):!1,unsetTextAlign:()=>({commands:t})=>this.options.types.map(e=>t.resetAttributes(e,"textAlign")).some(e=>e),toggleTextAlign:t=>({editor:e,commands:i})=>this.options.alignments.includes(t)?e.isActive({textAlign:t})?i.unsetTextAlign():i.setTextAlign(t):!1}},addKeyboardShortcuts(){return{"Mod-Shift-l":()=>this.editor.commands.setTextAlign("left"),"Mod-Shift-e":()=>this.editor.commands.setTextAlign("center"),"Mod-Shift-r":()=>this.editor.commands.setTextAlign("right"),"Mod-Shift-j":()=>this.editor.commands.setTextAlign("justify")}}});var fr=Ei;const Di=20,Oe=(t,e=0)=>{const i=[];return!t.children.length||e>Di||Array.from(t.children).forEach(n=>{n.tagName==="SPAN"?i.push(n):n.children.length&&i.push(...Oe(n,e+1))}),i},Ni=t=>{if(!t.children.length)return;const e=Oe(t);e&&e.forEach(i=>{var n;const r=i.getAttribute("style"),s=(n=i.parentElement)===null||n===void 0||(n=n.closest("span"))===null||n===void 0?void 0:n.getAttribute("style");i.setAttribute("style",`${s};${r}`)})},Ti=Jt.create({name:"textStyle",priority:101,addOptions(){return{HTMLAttributes:{},mergeNestedSpanStyles:!0}},parseHTML(){return[{tag:"span",consuming:!1,getAttrs:t=>t.hasAttribute("style")?(this.options.mergeNestedSpanStyles&&Ni(t),{}):!1}]},renderHTML({HTMLAttributes:t}){return["span",Xt(this.options.HTMLAttributes,t),0]},addCommands(){return{toggleTextStyle:t=>({commands:e})=>e.toggleMark(this.name,t),removeEmptyTextStyle:()=>({tr:t})=>{const{selection:e}=t;return t.doc.nodesBetween(e.from,e.to,(i,n)=>{if(!i.isInline)return!0;i.marks.filter(r=>r.type===this.type).some(r=>Object.values(r.attrs).some(s=>!!s))||t.removeMark(n,n+i.nodeSize,this.type)}),!0}}}}),Ai=q.create({name:"backgroundColor",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{backgroundColor:{default:null,parseHTML:t=>{var e;const i=(e=K(t,"background-color"))!==null&&e!==void 0?e:t.style.backgroundColor;return i?.replace(/['"]+/g,"")},renderHTML:t=>t.backgroundColor?{style:`background-color: ${t.backgroundColor}`}:{}}}}]},addCommands(){return{setBackgroundColor:t=>({chain:e})=>e().setMark("textStyle",{backgroundColor:t}).run(),unsetBackgroundColor:()=>({chain:t})=>t().setMark("textStyle",{backgroundColor:null}).removeEmptyTextStyle().run()}}}),Mi=q.create({name:"color",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{color:{default:null,parseHTML:t=>{var e;const i=(e=K(t,"color"))!==null&&e!==void 0?e:t.style.color;return i?.replace(/['"]+/g,"")},renderHTML:t=>t.color?{style:`color: ${t.color}`}:{}}}}]},addCommands(){return{setColor:t=>({chain:e})=>e().setMark("textStyle",{color:t}).run(),unsetColor:()=>({chain:t})=>t().setMark("textStyle",{color:null}).removeEmptyTextStyle().run()}}}),Oi=q.create({name:"fontFamily",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{fontFamily:{default:null,parseHTML:t=>{var e;return(e=K(t,"font-family"))!==null&&e!==void 0?e:t.style.fontFamily},renderHTML:t=>t.fontFamily?{style:`font-family: ${t.fontFamily}`}:{}}}}]},addCommands(){return{setFontFamily:t=>({chain:e})=>e().setMark("textStyle",{fontFamily:t}).run(),unsetFontFamily:()=>({chain:t})=>t().setMark("textStyle",{fontFamily:null}).removeEmptyTextStyle().run()}}}),Fi=q.create({name:"fontSize",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{fontSize:{default:null,parseHTML:t=>{var e;return(e=K(t,"font-size"))!==null&&e!==void 0?e:t.style.fontSize},renderHTML:t=>t.fontSize?{style:`font-size: ${t.fontSize}`}:{}}}}]},addCommands(){return{setFontSize:t=>({chain:e})=>e().setMark("textStyle",{fontSize:t}).run(),unsetFontSize:()=>({chain:t})=>t().setMark("textStyle",{fontSize:null}).removeEmptyTextStyle().run()}}}),zi=q.create({name:"lineHeight",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{lineHeight:{default:null,parseHTML:t=>{var e;return(e=K(t,"line-height"))!==null&&e!==void 0?e:t.style.lineHeight},renderHTML:t=>t.lineHeight?{style:`line-height: ${t.lineHeight}`}:{}}}}]},addCommands(){return{setLineHeight:t=>({chain:e})=>e().setMark("textStyle",{lineHeight:t}).run(),unsetLineHeight:()=>({chain:t})=>t().setMark("textStyle",{lineHeight:null}).removeEmptyTextStyle().run()}}});q.create({name:"textStyleKit",addExtensions(){const t=[];return this.options.backgroundColor!==!1&&t.push(Ai.configure(this.options.backgroundColor)),this.options.color!==!1&&t.push(Mi.configure(this.options.color)),this.options.fontFamily!==!1&&t.push(Oi.configure(this.options.fontFamily)),this.options.fontSize!==!1&&t.push(Fi.configure(this.options.fontSize)),this.options.lineHeight!==!1&&t.push(zi.configure(this.options.lineHeight)),this.options.textStyle!==!1&&t.push(Ti.configure(this.options.textStyle)),t}});function ur(t){const e=$.c(6),i=ke(),n=be(t.virtualMcpId,t.branch);if(n.kind!=="protocol"||n.source!=="github")return Ri;let r;e[0]!==n||e[1]!==t?(r=St(t,n),e[0]=n,e[1]=t,e[2]=r):r=e[2];const s=r;let a;return e[3]!==s||e[4]!==i?(a=c=>Ce(i,s,c),e[3]=s,e[4]=i,e[5]=a):a=e[5],a}function Ri(){return!1}export{Mi as C,lr as F,Ae as L,Ti as T,ur as a,or as b,Fi as c,fr as d,ei as e,cr as i,se as k,ar as r,Ci as s,li as u};