@inkeep/open-knowledge 0.78.0-beta.1 → 0.78.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (107) hide show
  1. package/dist/cli.mjs +6 -6
  2. package/dist/constants-C1lOvW4D.mjs +1 -0
  3. package/dist/index.mjs +1 -1
  4. package/dist/init-Bgyu6Q7F.mjs +1 -0
  5. package/dist/{init-C0ht_YRB.mjs → init-CauDIZhv.mjs} +2 -2
  6. package/dist/{launch-json-removal-BayfH9oD.mjs → launch-json-removal-CmiX_UVO.mjs} +1 -1
  7. package/dist/{loader-BwEW4OHx.mjs → loader-CEt5K63z.mjs} +1 -1
  8. package/dist/loader-DOJUF41h.mjs +1 -0
  9. package/dist/preview-CwSxo0Rm.mjs +1 -0
  10. package/dist/{preview-CJ4lC6m4.mjs → preview-sgi-YKgo.mjs} +1 -1
  11. package/dist/public/assets/ActivityModeContent-C0ggUUwf.js +1 -0
  12. package/dist/public/assets/{AddPropertiesButton-Ds4lHG87.js → AddPropertiesButton-onYfQ085.js} +1 -1
  13. package/dist/public/assets/{AgentDiffPane-D9SHwzkL.js → AgentDiffPane-CwIvZ2u0.js} +1 -1
  14. package/dist/public/assets/{CodeMirrorPropInput-CmvXuenG.js → CodeMirrorPropInput-BxpqNYRy.js} +1 -1
  15. package/dist/public/assets/{DocumentContext-C3MFq3ua.js → DocumentContext-D5M6KGbp.js} +8 -8
  16. package/dist/public/assets/{EditorModeToggle-BeTnxhxA.js → EditorModeToggle-KkeyqUiS.js} +1 -1
  17. package/dist/public/assets/{EnableSyncConfirmDialog-BNRdHnML.js → EnableSyncConfirmDialog-B1jUtYf0.js} +1 -1
  18. package/dist/public/assets/{ExcalidrawDocEditor-ChJs2RHO.js → ExcalidrawDocEditor-CWEkU2Is.js} +1 -1
  19. package/dist/public/assets/FeedbackForm-CBP1A2Tx.js +1 -0
  20. package/dist/public/assets/ImageAttachments-_-DakRUS.js +1 -0
  21. package/dist/public/assets/{ImportSkillDialog-BuL9v-6W.js → ImportSkillDialog-1JqeHG2e.js} +1 -1
  22. package/dist/public/assets/{LintConfigEditor-bFtZkDDa.js → LintConfigEditor-BrzBuNZO.js} +1 -1
  23. package/dist/public/assets/ManagedArtifactProperties-BC8n8Uux.js +1 -0
  24. package/dist/public/assets/ManagedArtifactProperties-BjR__N-F.js +1 -0
  25. package/dist/public/assets/{MermaidDocEditor-CPj1u1Na.js → MermaidDocEditor-Bcrx_8El.js} +1 -1
  26. package/dist/public/assets/{PropertyDisplayRow-CIz5E76a.js → PropertyDisplayRow-C--8-E2f.js} +1 -1
  27. package/dist/public/assets/ReportBugDialogBody-DX1dP7wO.js +3 -0
  28. package/dist/public/assets/{ReportBugMenuTrigger-BTrSdrQf.js → ReportBugMenuTrigger-CfFeITtu.js} +2 -2
  29. package/dist/public/assets/{SchemaConfigEditor-CfZbORWL.js → SchemaConfigEditor-D4GFyhNn.js} +1 -1
  30. package/dist/public/assets/{SessionsHost-m1vUsJgF.js → SessionsHost-7KYn79Jy.js} +2 -2
  31. package/dist/public/assets/{SettingsDialogBody-D_GVq8_Z.js → SettingsDialogBody-CuLgDT7N.js} +3 -3
  32. package/dist/public/assets/{ShareReceiveMissDialog-DDH2W42g.js → ShareReceiveMissDialog-wjtra43z.js} +1 -1
  33. package/dist/public/assets/{SkillToolbarControls-S5KMiPEx.js → SkillToolbarControls-Ci1FfVXC.js} +1 -1
  34. package/dist/public/assets/{SourceEditor-wsG_saIm.js → SourceEditor-BFdkSsY2.js} +1 -1
  35. package/dist/public/assets/{TerminalWindowApp-CqFoMmN8.js → TerminalWindowApp-BBh9BN3G.js} +1 -1
  36. package/dist/public/assets/{TextDocEditor-U0WwgKxA.js → TextDocEditor-mnFdtiZH.js} +1 -1
  37. package/dist/public/assets/{ThreadView-DK8pgUsH.js → ThreadView-CeGUJ4X2.js} +7 -7
  38. package/dist/public/assets/{TimelineDiffPane-4ZOOyITN.js → TimelineDiffPane-BAWK-Q5D.js} +1 -1
  39. package/dist/public/assets/{auth-state-cache-B3gDmMGR.js → auth-state-cache-CdB3wQ9D.js} +3 -3
  40. package/dist/public/assets/circle-alert-Czw40trT.js +1 -0
  41. package/dist/public/assets/{comment-chips-C2qbaCxd.js → comment-chips-v9i2WFp7.js} +1 -1
  42. package/dist/public/assets/{config-provider-ClTAXVvb.js → config-provider-BUgrvKtX.js} +1 -1
  43. package/dist/public/assets/{doc-undo-manager-0LeFk0ji.js → doc-undo-manager-Bk_m4g6i.js} +1 -1
  44. package/dist/public/assets/globals-C2k1tx6d.css +1 -0
  45. package/dist/public/assets/index-CEN6HBkt.js +2205 -0
  46. package/dist/public/assets/messages-6qws_7C7.js +1 -0
  47. package/dist/public/assets/messages-BF_iG0sW.js +1 -0
  48. package/dist/public/assets/messages-C9UAfelD.js +1 -0
  49. package/dist/public/assets/messages-CKB7yTOj.js +1 -0
  50. package/dist/public/assets/messages-Ct5vpcrr.js +1 -0
  51. package/dist/public/assets/messages-CzWcDH0o.js +1 -0
  52. package/dist/public/assets/messages-D0gaBtmz.js +1 -0
  53. package/dist/public/assets/messages-DJY8AZIt.js +1 -0
  54. package/dist/public/assets/messages-DbeSi0ES.js +1 -0
  55. package/dist/public/assets/messages-DdnJgPgv.js +1 -0
  56. package/dist/public/assets/messages-OC7L0t93.js +1 -0
  57. package/dist/public/assets/messages-csZIBce1.js +1 -0
  58. package/dist/public/assets/{pending-receive-nav-store-ZTb8wqQu.js → pending-receive-nav-store-CjPbRp3A.js} +1 -1
  59. package/dist/public/assets/{progress-BUZ09BFV.js → progress-C8UCGQRe.js} +1 -1
  60. package/dist/public/assets/{selection-context-Bh3Wccul.js → selection-context-Cp2kc_W1.js} +1 -1
  61. package/dist/public/assets/{src-Bsvkxusv.js → src-CTXqiIaz.js} +1 -1
  62. package/dist/public/assets/{typing-burst-detector-BsYaC0Hm.js → typing-burst-detector-BFDczoXG.js} +3 -3
  63. package/dist/public/assets/{uninstall-BDGkqSz6.js → uninstall-BcKDZGep.js} +1 -1
  64. package/dist/public/assets/{use-activity-panel-C3WeDBAl.js → use-activity-panel-BYLbiHM1.js} +1 -1
  65. package/dist/public/assets/{use-apply-config-language-Di5W-8BZ.js → use-apply-config-language-CcGDxTum.js} +2 -2
  66. package/dist/public/assets/{use-open-skill-MLwbsxuR.js → use-open-skill-xND65ZuD.js} +1 -1
  67. package/dist/public/assets/{use-terminal-enabled-BI0_ugUJ.js → use-terminal-enabled-DTm-rbQh.js} +1 -1
  68. package/dist/public/assets/{use-timeline-entry-diff-CoUYWVFF.js → use-timeline-entry-diff-BSYk_tLD.js} +1 -1
  69. package/dist/public/index.html +23 -23
  70. package/dist/public/uninstall.html +5 -5
  71. package/dist/{registry-probes-Trc22gkn.mjs → registry-probes-CScn2dZh.mjs} +1 -1
  72. package/dist/{removal-file-path-BJLJdU25.mjs → removal-file-path-DTjTawVh.mjs} +1 -1
  73. package/dist/{repair-launch-json-Dy1MyLSZ.mjs → repair-launch-json-CivVWhsK.mjs} +1 -1
  74. package/dist/{repair-mcp-configs-xBQEG0AX.mjs → repair-mcp-configs-SnRs1fQ6.mjs} +1 -1
  75. package/dist/{src-CI2gZlGL.mjs → src-Cc4o4uHE.mjs} +1 -1
  76. package/dist/src-tzK2WU-f.mjs +1 -0
  77. package/dist/{start-DvYJMlYp.mjs → start-Xk0ma1a9.mjs} +2 -2
  78. package/dist/start-pbM_NmhO.mjs +1 -0
  79. package/package.json +5 -5
  80. package/dist/constants-CqnSfysY.mjs +0 -1
  81. package/dist/init-Dmfw9165.mjs +0 -1
  82. package/dist/loader-BaY7osJS.mjs +0 -1
  83. package/dist/preview-rn0piPQ2.mjs +0 -1
  84. package/dist/public/assets/ActivityModeContent-By3_IMI2.js +0 -1
  85. package/dist/public/assets/FeedbackForm-CchQrgi0.js +0 -1
  86. package/dist/public/assets/ImageAttachments-DJgsccSw.js +0 -1
  87. package/dist/public/assets/ManagedArtifactProperties-BogBt9Ik.js +0 -1
  88. package/dist/public/assets/ManagedArtifactProperties-DrztV163.js +0 -1
  89. package/dist/public/assets/ReportBugDialogBody-BdLhyQ-4.js +0 -3
  90. package/dist/public/assets/globals-AHtFUs2x.css +0 -1
  91. package/dist/public/assets/index-Dg8USqVa.js +0 -2205
  92. package/dist/public/assets/messages-BFJSFaWI.js +0 -1
  93. package/dist/public/assets/messages-BZ0Rp5oQ.js +0 -1
  94. package/dist/public/assets/messages-BcY0lkkQ.js +0 -1
  95. package/dist/public/assets/messages-Bo_6qLDj.js +0 -1
  96. package/dist/public/assets/messages-C4-bXzOl.js +0 -1
  97. package/dist/public/assets/messages-C4DVEQdg.js +0 -1
  98. package/dist/public/assets/messages-CUM_I4Lc.js +0 -1
  99. package/dist/public/assets/messages-CkSYFJp9.js +0 -1
  100. package/dist/public/assets/messages-CtH_wjQ2.js +0 -1
  101. package/dist/public/assets/messages-Gj3uVc4q.js +0 -1
  102. package/dist/public/assets/messages-uTpJ-tr5.js +0 -1
  103. package/dist/public/assets/messages-xpJBGaqz.js +0 -1
  104. package/dist/public/assets/upload-DGQJhdiQ.js +0 -1
  105. package/dist/src-DdAWkvJ7.mjs +0 -1
  106. package/dist/start-CyNiscGq.mjs +0 -1
  107. /package/dist/public/assets/{globals-DR22XRmG.js → globals-CRC8g2z-.js} +0 -0
@@ -0,0 +1,3 @@
1
+ import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./jsx-runtime-BUgB2tll.js";import{t as n}from"./react-f2sANaYj.js";import{n as r,r as i}from"./dist-Nvb76hAm.js";import{t as a}from"./compiler-runtime-BfE3aGVn.js";import{t as o}from"./button-HKX9wT1K.js";import{n as s,r as c,t as l}from"./collapsible-DYySK8La.js";import{t as u}from"./checkbox-Crs_F_Np.js";import{Lc as d,Nr as f,c as p,ii as m}from"./dist-BBWka618.js";import{t as h}from"./createLucideIcon-B6ULg5PN.js";import{t as g}from"./chevron-right-C-g4JuT4.js";import{t as _}from"./circle-alert-Czw40trT.js";import{t as v}from"./spinner-Bp2_BYkl.js";import{a as ee,r as te,t as y}from"./bug-report-send-manager-Bdl0o5Py.js";import{n as b}from"./BugReportHistory-fO3bN8lg.js";import{t as ne}from"./triangle-alert-CCeXtPLU.js";import{a as x,c as re,i as ie,l as ae,n as oe,o as se,s as ce,t as le}from"./dialog-Cv_pRVgB.js";import{t as ue}from"./input-6HnhfmYW.js";import{t as de}from"./badge-EmKkAvTN.js";import{n as S}from"./platform-labels-ExCG9yvH.js";import{n as C,t as fe}from"./contact-email-store-VCf9Nhpy.js";import{n as pe,s as me,t as he}from"./ImageAttachments-_-DakRUS.js";var ge=h(`archive`,[[`rect`,{width:`20`,height:`5`,x:`2`,y:`3`,rx:`1`,key:`1wp1u1`}],[`path`,{d:`M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8`,key:`1s80jp`}],[`path`,{d:`M10 12h4`,key:`a56b0p`}]]),_e=h(`expand`,[[`path`,{d:`m15 15 6 6`,key:`1s409w`}],[`path`,{d:`m15 9 6-6`,key:`ko1vev`}],[`path`,{d:`M21 16v5h-5`,key:`1ck2sf`}],[`path`,{d:`M21 8V3h-5`,key:`1qoq8a`}],[`path`,{d:`M3 16v5h5`,key:`1t08am`}],[`path`,{d:`m3 21 6-6`,key:`wwnumi`}],[`path`,{d:`M3 8V3h5`,key:`1ln10m`}],[`path`,{d:`M9 9 3 3`,key:`v551iv`}]]),ve=h(`shield`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}]]),ye=a(),w=e(n(),1);function be(e){let t=e===void 0?C:e;return(0,w.useSyncExternalStore)(t.subscribe,t.getSnapshot,t.getSnapshot)}function xe(e){return d().safeParse(e).success}var T=t();function Se(e,t){let n=e.trim();if(t===void 0)return n===``?void 0:n;let r=t.join(`
2
+ `);return n===``?r:`${n}\n\n${r}`}var E=25;function Ce(e){return e.replace(/\(([^)]*)\)/,(e,t)=>{let n=t.split(/[/\\]/).pop();return n===void 0||n===``?e:`(${n})`})}function D(e){let t=e.split(`
3
+ `).map(e=>Ce(e.trim())).filter(e=>e!==``);if(t.length===0)return[];let n=t.slice(0,E),r=t.length-n.length;return[`Component stack:`,...n,...r>0?[`... ${r} more frame(s) omitted`]:[]]}function we(e){let t=[`Crash source: ${e.source}`];return e.docName!==void 0&&t.push(`Document: ${e.docName}`),e.errorMessage!==void 0&&t.push(`Error: ${e.errorMessage}`),e.componentStack!==void 0&&t.push(...D(e.componentStack)),t}function Te(e){let t=[`Crash source: ${e.kind===`render-process-gone`?`renderer process crash (reason: ${e.context.reason})`:e.kind===`child-process-gone`?`${e.context.processType} process crash (reason: ${e.context.reason})`:e.context.dirtyShutdown?`previous session ended without a clean quit`:`new crash dump found from the previous session`}`,`Crash event: ${e.eventId}`];return e.kind===`boot`&&e.crashedAppVersion!==void 0&&t.push(`Crashed app version: ${e.crashedAppVersion}`),e.kind===`boot`&&e.crashedAt!==void 0&&t.push(`Crashed at: ${e.crashedAt} (${f(e.crashedAt)})`),t}var Ee={step:`compose`,creating:!1,createError:null};function De(e){return e.summary.files.some(e=>e.startsWith(`extra/`)&&e!==p&&!m(e))}function Oe(e){return e.summary.files.some(m)}async function ke(e){let t=[];for(let n of e)me(n.type)&&t.push({contentType:n.type,bytes:new Uint8Array(await n.arrayBuffer())});return t}function O(e){let t=(0,ye.c)(80),{open:n,onOpenChange:a,systemWide:d,crashContext:f,crashInvite:m,screenshot:h,pointerMarked:ee,crashDumpAvailable:te}=e,S=d===void 0?!1:d,C=h===void 0?null:h,me=ee===void 0?!1:ee,ge=te===void 0?!1:te,{_:E}=i(),Ce=(typeof window<`u`?window.okDesktop?.platform:void 0)===`darwin`,[D,O]=(0,w.useState)(Ee),[k,je]=(0,w.useState)(``),[A,Me]=(0,w.useState)(f!==void 0||m!==void 0),j=m===void 0?ge:m.minidumpAvailable===!0,[M,Ne]=(0,w.useState)(m?.minidumpAvailable===!0),[N,Pe]=(0,w.useState)(!0),P;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(P=[],t[0]=P):P=t[0];let[F,Fe]=(0,w.useState)(P),Ie=D.step!==`compose`||D.creating,I;t[1]!==F||t[2]!==Ie?(I={files:F,onChange:Fe,disabled:Ie},t[1]=F,t[2]=Ie,t[3]=I):I=t[3];let L=pe(I),[R,Le]=(0,w.useState)(!1),[z,Re]=(0,w.useState)(``),[B,V]=(0,w.useState)(null),H=(0,w.useRef)(0),U=(0,w.useId)(),ze=(0,w.useId)(),W=(0,w.useId)(),G=(0,w.useId)(),Be=(0,w.useId)(),Ve=(0,w.useId)(),He=(0,w.useId)(),Ue=(0,w.useId)(),We=(0,w.useId)(),Ge=(0,w.useId)(),Ke=(0,w.useId)(),qe=(0,w.useId)(),K=be().email,Je,Ye;t[4]!==n||t[5]!==K?(Je=()=>{n&&(Le(K!==null),Re(K??``),V(null))},Ye=[n,K],t[4]=n,t[5]=K,t[6]=Je,t[7]=Ye):(Je=t[6],Ye=t[7]),(0,w.useEffect)(Je,Ye);let Xe;t[8]!==f||t[9]!==m?(Xe=f===void 0?m===void 0?void 0:Te(m):we(f),t[8]=f,t[9]=m,t[10]=Xe):Xe=t[10];let q=Xe,Ze;t[11]===a?Ze=t[12]:(Ze=function(e){e||(H.current+=1,O(Ee)),a(e)},t[11]=a,t[12]=Ze);let J=Ze,Qe;t[13]!==E||t[14]!==L||t[15]!==F||t[16]!==j||t[17]!==A||t[18]!==z||t[19]!==M||t[20]!==N||t[21]!==k||t[22]!==q||t[23]!==C||t[24]!==R?(Qe=async function(){let e=window.okDesktop?.bugReport;if(!e){O({step:`compose`,creating:!1,createError:E({id:`_0JUKX`})});return}if(R&&!xe(z.trim())){V(E({id:`fwrPh4`}));return}V(null);let t=H.current+=1;O({step:`compose`,creating:!0,createError:null});let n=await ke(F);if(H.current!==t)return;let r=await e.create({level:A?`full`:`standard`,note:Se(k,q),...j?{includeCrashDump:M}:{},...C===null?{}:{includeScreenshot:N},...n.length>0?{attachments:n}:{}});H.current===t&&(r.ok?(L.clearProblem(),O({step:`review`,report:{zipPath:r.zipPath,zipSizeBytes:r.zipSizeBytes,summary:r.summary}})):O({step:`compose`,creating:!1,createError:r.error}))},t[13]=E,t[14]=L,t[15]=F,t[16]=j,t[17]=A,t[18]=z,t[19]=M,t[20]=N,t[21]=k,t[22]=q,t[23]=C,t[24]=R,t[25]=Qe):Qe=t[25];let $e=Qe,et;t[26]!==f||t[27]!==m||t[28]!==z||t[29]!==J||t[30]!==k||t[31]!==q||t[32]!==R?(et=function(e){let t=z.trim();fe(R,t),y.startBugReportSend({kind:`created-report`,report:e,note:Se(k,q),includeScreenshot:e.summary.files.includes(p),includeAttachments:Oe(e),...R&&xe(t)?{email:t}:{}}),je(``),Me(f!==void 0||m!==void 0),Ne(m?.minidumpAvailable===!0),Pe(!0),Fe([]),J(!1)},t[26]=f,t[27]=m,t[28]=z,t[29]=J,t[30]=k,t[31]=q,t[32]=R,t[33]=et):et=t[33];let tt=et,Y;t[34]===Symbol.for(`react.memo_cache_sentinel`)?(Y=function(e){window.okDesktop?.shell.showItemInFolder(e)},t[34]=Y):Y=t[34];let nt=Y,X;t[35]!==E||t[36]!==L||t[37]!==f||t[38]!==j||t[39]!==m||t[40]!==A||t[41]!==Be||t[42]!==G||t[43]!==He||t[44]!==Ve||t[45]!==z||t[46]!==B||t[47]!==qe||t[48]!==Ke||t[49]!==$e||t[50]!==J||t[51]!==M||t[52]!==N||t[53]!==W||t[54]!==ze||t[55]!==k||t[56]!==U||t[57]!==D.createError||t[58]!==D.creating||t[59]!==D.step||t[60]!==me||t[61]!==C||t[62]!==We||t[63]!==Ue||t[64]!==R||t[65]!==Ge||t[66]!==S?(X=D.step===`compose`&&(0,T.jsxs)(T.Fragment,{children:[(0,T.jsxs)(ce,{className:`gap-2 pr-6`,children:[(0,T.jsx)(re,{children:(0,T.jsx)(r,{id:`cd5EXh`})}),m===void 0&&(0,T.jsx)(x,{children:(0,T.jsx)(r,{id:`2H5Zhu`})})]}),(0,T.jsxs)(oe,{className:`flex flex-auto flex-col gap-2 pb-2 [&>*]:shrink-0`,children:[m!==void 0&&(0,T.jsxs)(`div`,{className:`flex items-start gap-2.5 rounded-md border border-chart-3/35 bg-chart-3/10 px-3 py-2.5 text-sm`,children:[(0,T.jsx)(ne,{className:`mt-0.5 size-4 shrink-0 text-chart-3`,"aria-hidden":`true`}),(0,T.jsxs)(`div`,{children:[(0,T.jsx)(`p`,{className:`font-medium`,children:(0,T.jsx)(r,{id:`_IGfXZ`})}),(0,T.jsx)(x,{className:`mt-0.5 text-xs`,children:(0,T.jsx)(r,{id:`03wKPg`})})]})]}),D.createError!==null&&(0,T.jsxs)(`div`,{role:`alert`,className:`flex items-start gap-2.5 rounded-md border border-destructive/35 bg-destructive/10 px-3 py-2.5 text-sm`,children:[(0,T.jsx)(_,{className:`mt-0.5 size-4 shrink-0 text-destructive`,"aria-hidden":`true`}),(0,T.jsxs)(`div`,{children:[(0,T.jsx)(`p`,{className:`font-medium`,children:(0,T.jsx)(r,{id:`wVa83H`})}),(0,T.jsx)(`p`,{className:`mt-0.5 text-xs text-muted-foreground`,children:D.createError}),(0,T.jsx)(`p`,{className:`mt-0.5 text-xs text-muted-foreground`,children:(0,T.jsx)(r,{id:`5PHgV2`,components:{0:(0,T.jsx)(`code`,{className:`font-mono`})}})})]})]}),f!==void 0&&(0,T.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:(0,T.jsx)(r,{id:`CJ59QJ`})}),(0,T.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,T.jsxs)(`label`,{htmlFor:U,className:`text-sm font-medium`,children:[m===void 0?(0,T.jsx)(r,{id:`y_K0Dz`}):(0,T.jsx)(r,{id:`60vpJN`}),` `,(0,T.jsx)(`span`,{className:`font-normal text-muted-foreground`,children:(0,T.jsx)(r,{id:`NzluOx`})})]}),(0,T.jsx)(he,{id:U,value:k,onChange:e=>je(e.target.value),placeholder:E(m===void 0?{id:`YLMBSd`}:{id:`T3j-7o`}),rows:2,className:`min-h-20`,intake:L,hint:(0,T.jsx)(r,{id:`XoMG7W`})})]}),C!==null&&(0,T.jsxs)(`div`,{className:`flex flex-wrap items-start gap-x-3 gap-y-2`,children:[(0,T.jsxs)(`div`,{className:`flex items-center gap-2.5 pt-0.5`,children:[(0,T.jsx)(u,{id:Ue,checked:N,onCheckedChange:e=>Pe(e===!0),"aria-describedby":We,disabled:D.creating}),(0,T.jsx)(`label`,{htmlFor:Ue,className:`text-sm font-medium`,children:(0,T.jsx)(r,{id:`IxyZXD`})})]}),(0,T.jsxs)(le,{children:[(0,T.jsx)(ae,{asChild:!0,children:(0,T.jsxs)(o,{variant:`outline`,className:`relative block h-auto w-40 shrink-0 overflow-hidden rounded-md bg-muted/40 p-0`,"aria-label":E({id:`AkJx1j`}),children:[(0,T.jsx)(`img`,{src:C.dataUrl,alt:E({id:`WuntOK`}),className:`h-24 w-full object-contain ${N?``:`opacity-40`}`}),(0,T.jsx)(`span`,{className:`absolute end-1 top-1 flex items-center rounded bg-popover/90 p-1`,children:(0,T.jsx)(_e,{className:`size-3`,"aria-hidden":`true`})})]})}),(0,T.jsxs)(ie,{className:`sm:max-w-5xl`,children:[(0,T.jsxs)(ce,{className:`pr-6`,children:[(0,T.jsx)(re,{children:(0,T.jsx)(r,{id:`xvv5gL`})}),(0,T.jsx)(x,{children:(0,T.jsx)(r,{id:`qApCYm`})})]}),(0,T.jsx)(oe,{children:(0,T.jsx)(`img`,{src:C.dataUrl,alt:E({id:`WuntOK`}),className:`max-h-[70dvh] w-full object-contain`})})]})]}),(0,T.jsxs)(`p`,{id:We,className:`min-w-40 flex-1 text-xs text-muted-foreground`,children:[me?(0,T.jsx)(r,{id:`ZBZEkP`}):(0,T.jsx)(r,{id:`nczGih`}),` `,(0,T.jsx)(r,{id:`qApCYm`})]})]}),(0,T.jsxs)(`fieldset`,{className:`grid min-w-0 gap-3 border-t pt-3 sm:grid-cols-[1fr_1.25fr]`,children:[(0,T.jsx)(`legend`,{className:`sr-only`,children:(0,T.jsx)(r,{id:`WJjviG`})}),(0,T.jsxs)(`div`,{className:`flex items-start gap-2.5`,children:[(0,T.jsx)(u,{id:ze,checked:!0,disabled:!0,"aria-describedby":W,className:`mt-0.5`}),(0,T.jsxs)(`div`,{className:`flex flex-col gap-0.5`,children:[(0,T.jsxs)(`label`,{htmlFor:ze,className:`flex flex-wrap items-center gap-2 text-sm font-medium text-foreground`,children:[(0,T.jsx)(r,{id:`FgRAvd`}),(0,T.jsx)(de,{variant:`primary`,className:`text-2xs`,children:(0,T.jsx)(r,{id:`C0hoX6`})})]}),(0,T.jsx)(`p`,{id:W,className:`text-1sm text-muted-foreground`,children:S?(0,T.jsx)(r,{id:`DqyItq`}):(0,T.jsx)(r,{id:`0wkh7o`})})]})]}),(0,T.jsxs)(`div`,{className:`flex items-start gap-2.5`,children:[(0,T.jsx)(u,{id:G,checked:A,onCheckedChange:e=>Me(e===!0),"aria-describedby":Be,disabled:D.creating,className:`mt-0.5`}),(0,T.jsxs)(`div`,{className:`flex flex-col gap-0.5`,children:[(0,T.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,T.jsx)(`label`,{htmlFor:G,className:`text-sm font-medium`,children:(0,T.jsx)(r,{id:`zvjCD4`})}),(0,T.jsx)(de,{variant:`primary`,className:`text-2xs`,children:(0,T.jsx)(r,{id:`WEYdDv`})})]}),(0,T.jsx)(`p`,{className:`text-1sm text-muted-foreground`,children:(0,T.jsx)(r,{id:`mx_oWI`})}),(0,T.jsx)(`p`,{id:Be,className:`text-1sm text-muted-foreground`,children:(0,T.jsx)(r,{id:`Z5q-I8`})}),(0,T.jsxs)(l,{children:[(0,T.jsx)(c,{asChild:!0,children:(0,T.jsxs)(o,{variant:`ghost`,size:`sm`,className:`group -ms-2 h-7 justify-start px-2 text-1sm font-normal`,children:[(0,T.jsx)(g,{className:`size-3.5 group-data-[state=open]:rotate-90`,"aria-hidden":`true`}),(0,T.jsx)(r,{id:`0cGsQh`})]})}),(0,T.jsx)(s,{children:(0,T.jsxs)(`p`,{className:`rounded-md bg-muted/50 p-3 text-1sm text-muted-foreground`,children:[(0,T.jsx)(r,{id:`fRVBiq`}),` `,Ce&&(0,T.jsx)(r,{id:`7xEWbL`})]})})]})]})]})]}),j&&(0,T.jsxs)(`div`,{className:`flex items-start gap-2.5`,children:[(0,T.jsx)(u,{id:Ve,checked:M,onCheckedChange:e=>Ne(e===!0),"aria-describedby":He,disabled:D.creating,className:`mt-0.5`}),(0,T.jsxs)(`div`,{className:`flex flex-col gap-0.5`,children:[(0,T.jsx)(`label`,{htmlFor:Ve,className:`text-sm font-medium`,children:(0,T.jsx)(r,{id:`8TvlHF`})}),(0,T.jsx)(`p`,{id:He,className:`text-1sm text-muted-foreground`,children:(0,T.jsx)(r,{id:`jnCROW`})})]})]}),(0,T.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:(0,T.jsx)(r,{id:`ko-CKk`})}),(0,T.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,T.jsxs)(`div`,{className:`flex items-center gap-2.5`,children:[(0,T.jsx)(u,{id:Ge,checked:R,onCheckedChange:e=>{Le(e===!0),V(null)},disabled:D.creating}),(0,T.jsx)(`label`,{htmlFor:Ge,className:`text-sm`,children:(0,T.jsx)(r,{id:`SF9qpO`})})]}),R&&(0,T.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,T.jsx)(ue,{id:Ke,"aria-label":E({id:`DFQ2Sj`}),type:`email`,value:z,onChange:e=>{Re(e.target.value),V(null)},placeholder:E({id:`JHf6qZ`}),disabled:D.creating,"aria-invalid":B!==null,"aria-describedby":B===null?void 0:qe}),B!==null&&(0,T.jsx)(`p`,{id:qe,className:`text-destructive text-sm`,children:B})]})]}),m===void 0&&f===void 0?(0,T.jsx)(b,{}):null]}),(0,T.jsxs)(se,{children:[(0,T.jsx)(o,{variant:`ghost`,onClick:()=>J(!1),children:m===void 0?(0,T.jsx)(r,{id:`dEgA5A`}):(0,T.jsx)(r,{id:`PBxg_E`})}),(0,T.jsxs)(o,{onClick:()=>void $e(),disabled:D.creating,children:[D.creating&&(0,T.jsx)(v,{className:`size-4`,"aria-hidden":`true`}),(0,T.jsx)(r,{id:`Si7mIR`})]})]})]}),t[35]=E,t[36]=L,t[37]=f,t[38]=j,t[39]=m,t[40]=A,t[41]=Be,t[42]=G,t[43]=He,t[44]=Ve,t[45]=z,t[46]=B,t[47]=qe,t[48]=Ke,t[49]=$e,t[50]=J,t[51]=M,t[52]=N,t[53]=W,t[54]=ze,t[55]=k,t[56]=U,t[57]=D.createError,t[58]=D.creating,t[59]=D.step,t[60]=me,t[61]=C,t[62]=We,t[63]=Ue,t[64]=R,t[65]=Ge,t[66]=S,t[67]=X):X=t[67];let Z;t[68]!==tt||t[69]!==D.report||t[70]!==D.step?(Z=D.step===`review`&&(0,T.jsxs)(T.Fragment,{children:[(0,T.jsxs)(ce,{children:[(0,T.jsx)(re,{children:(0,T.jsx)(r,{id:`2AIVbm`})}),(0,T.jsx)(x,{children:(0,T.jsx)(r,{id:`3l_cXP`})})]}),(0,T.jsxs)(oe,{className:`flex flex-col gap-4`,children:[(0,T.jsx)(Ae,{zipPath:D.report.zipPath,zipSizeBytes:D.report.zipSizeBytes,fileCount:D.report.summary.files.length,rawDumpIncluded:De(D.report),onReveal:nt}),(0,T.jsxs)(`div`,{className:`flex items-start gap-2 rounded-md border bg-muted/50 px-3 py-2.5 text-xs text-muted-foreground`,children:[(0,T.jsx)(ve,{className:`size-3.5 shrink-0 text-muted-foreground`,"aria-hidden":`true`}),(0,T.jsx)(`span`,{children:(0,T.jsx)(r,{id:`-o5XAG`})})]})]}),(0,T.jsxs)(se,{className:`sm:justify-between`,children:[(0,T.jsx)(o,{variant:`ghost`,onClick:()=>O(Ee),children:(0,T.jsx)(r,{id:`iH8pgl`})}),(0,T.jsx)(o,{onClick:()=>tt(D.report),children:(0,T.jsx)(r,{id:`O9oQJS`})})]})]}),t[68]=tt,t[69]=D.report,t[70]=D.step,t[71]=Z):Z=t[71];let Q;t[72]!==L.onPaste||t[73]!==X||t[74]!==Z?(Q=(0,T.jsxs)(ie,{className:`gap-2 sm:max-w-[46.25rem]`,onPaste:L.onPaste,children:[X,Z]}),t[72]=L.onPaste,t[73]=X,t[74]=Z,t[75]=Q):Q=t[75];let $;return t[76]!==J||t[77]!==n||t[78]!==Q?($=(0,T.jsx)(le,{open:n,onOpenChange:J,children:Q}),t[76]=J,t[77]=n,t[78]=Q,t[79]=$):$=t[79],$}function Ae(e){let t=(0,ye.c)(23),{zipPath:n,zipSizeBytes:i,fileCount:a,rawDumpIncluded:s,onReveal:c}=e,l;t[0]===n?l=t[1]:(l=ee(n),t[0]=n,t[1]=l);let u=l,d;t[2]===i?d=t[3]:(d=te(i),t[2]=i,t[3]=d);let f=d,p;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,T.jsx)(`div`,{className:`flex items-center justify-center size-8 rounded-md bg-muted`,children:(0,T.jsx)(ge,{className:`size-4 shrink-0 text-muted-foreground`,"aria-hidden":`true`})}),t[4]=p):p=t[4];let m;t[5]===u?m=t[6]:(m=(0,T.jsx)(`p`,{className:`truncate text-1sm`,title:u,children:u}),t[5]=u,t[6]=m);let h;t[7]!==a||t[8]!==s||t[9]!==f?(h=(0,T.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:s?(0,T.jsx)(r,{id:`sn5BEU`,values:{sizeText:f,fileCount:a}}):(0,T.jsx)(r,{id:`3DJEEt`,values:{sizeText:f,fileCount:a}})}),t[7]=a,t[8]=s,t[9]=f,t[10]=h):h=t[10];let g;t[11]!==m||t[12]!==h?(g=(0,T.jsxs)(`div`,{className:`min-w-0 flex-1 space-y-0.5`,children:[m,h]}),t[11]=m,t[12]=h,t[13]=g):g=t[13];let _;t[14]!==c||t[15]!==n?(_=()=>c(n),t[14]=c,t[15]=n,t[16]=_):_=t[16];let v;t[17]===Symbol.for(`react.memo_cache_sentinel`)?(v=S(typeof window<`u`?window.okDesktop?.platform:void 0),t[17]=v):v=t[17];let y;t[18]===_?y=t[19]:(y=(0,T.jsx)(o,{variant:`link`,className:`h-auto shrink-0 p-0 text-xs`,onClick:_,children:v}),t[18]=_,t[19]=y);let b;return t[20]!==g||t[21]!==y?(b=(0,T.jsxs)(`div`,{className:`flex items-center gap-2.5 rounded-md border px-3 py-2.5`,children:[p,g,y]}),t[20]=g,t[21]=y,t[22]=b):b=t[22],b}export{O as default};
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./ReportBugDialogBody-BdLhyQ-4.js","./chunk-CYidjpOJ.js","./dist-BBWka618.js","./preload-helper-Chd9yIcd.js","./trace-api-BP9dN1Hz.js","./lib-CPkc7nK4.js","./html-void-elements-zEl0KGqf.js","./lib-DmueaA5E.js","./markdownit-CugClK-K.js","./w3c-keyname-C7Rznu6R.js","./dist-Nvb76hAm.js","./jsx-runtime-BUgB2tll.js","./react-f2sANaYj.js","./checkbox-Crs_F_Np.js","./dist-BcvirUWL.js","./dist-BHv-mziD.js","./react-dom-DPxgxlDT.js","./dist-Bd_yyADX.js","./dist-BDna-dOq.js","./check-BzfGb3KU.js","./createLucideIcon-B6ULg5PN.js","./minus-cd1ERTPg.js","./compiler-runtime-BfE3aGVn.js","./utils-CPqDy6Hr.js","./bundle-mjs-SHeFpKGC.js","./collapsible-DYySK8La.js","./button-HKX9wT1K.js","./chevron-right-C-g4JuT4.js","./upload-DGQJhdiQ.js","./spinner-Bp2_BYkl.js","./bug-report-send-manager-Bdl0o5Py.js","./propagation-api-DC5404fy.js","./contact-email-store-VCf9Nhpy.js","./BugReportHistory-fO3bN8lg.js","./chevron-down-Dloks0wp.js","./folder-open-dlosmFj2.js","./trash-2-B9Flu-41.js","./badge-EmKkAvTN.js","./platform-labels-ExCG9yvH.js","./dist-Cr4-nBVI.js","./triangle-alert-CCeXtPLU.js","./ImageAttachments-DJgsccSw.js","./tooltip-DVBVVaAs.js","./dist-DYso7MCm.js","./floating-ui.dom-CDtYEnEj.js","./dist-DRO03ovd.js","./paperclip-C8NmE81Z.js","./x-DIayTyoR.js","./input-6HnhfmYW.js","./file-tree-adapter-DLjG7Vd1.js","./file-tree-rename-validation-C0aGoscw.js","./file-tree-utils-xLkLWRXE.js","./navigation-targets-CQRRzWZU.js","./doc-paths-Cchodm9a.js","./dialog-Cv_pRVgB.js","./electron-drag-strip-BgiQs0O3.js","./es2015-B9_uRFGw.js","./textarea-D9PjrPjk.js","./image-attachment-m6wAdtfg.js"])))=>i.map(i=>d[i]);
2
- import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./preload-helper-Chd9yIcd.js";import{t as n}from"./jsx-runtime-BUgB2tll.js";import{t as r}from"./react-f2sANaYj.js";import{t as i}from"./compiler-runtime-BfE3aGVn.js";import{n as a}from"./local-menu-action-bus-DaoT7_kL.js";var o=e(r(),1),s=i(),c=0,l=0,u=!1,d=null;function f(){if(typeof window>`u`)return()=>{};if(d!==null)return d;let e=new AbortController,t={passive:!0,signal:e.signal};return window.addEventListener(`pointermove`,e=>{c=e.clientX,l=e.clientY,u=!0},t),window.addEventListener(`pointerout`,e=>{e.relatedTarget===null&&(u=!1)},t),d=()=>{e.abort(),u=!1,d=null},d}function p(){return u?{x:c,y:l}:null}var m=n(),h=(0,o.lazy)(()=>t(()=>import(`./ReportBugDialogBody-BdLhyQ-4.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58]),import.meta.url)),g=1200,_=`[cmdk-root],[data-radix-popper-content-wrapper]`,v=500;function y(){let e=p();if(e===null)return null;let t=document.createElement(`div`);return t.className=`ok-pointer-marker`,t.setAttribute(`aria-hidden`,`true`),t.style.left=`${e.x}px`,t.style.top=`${e.y}px`,document.body.append(t),()=>t.remove()}function b(e){let t=(0,s.c)(14),n,r;t[0]===e?(n=t[1],r=t[2]):({launcherBorne:r,...n}=e,t[0]=e,t[1]=n,t[2]=r);let i=r===void 0?!1:r,[a,c]=(0,o.useState)(n.open),[l,u]=(0,o.useState)(!1),[d,f]=(0,o.useState)(null),[p,b]=(0,o.useState)(!1),[C,w]=(0,o.useState)(!1),T=(0,o.useRef)(0);n.open&&!a&&c(!0);let E,D;if(t[3]!==i||t[4]!==n.crashInvite||t[5]!==n.open?(E=()=>{if(!n.open){u(!1);return}let e=T.current+=1;w(!1);let t=window.okDesktop?.bugReport?.crashDumpAvailability;n.crashInvite===void 0&&typeof t==`function`&&t().then(t=>{T.current===e&&w(t.available)}).catch(S);let r=window.okDesktop?.bugReport?.captureScreenshot;if(typeof r!=`function`||n.crashInvite!==void 0){f(null),u(!0);return}f(null);let a=!1,o=x,s=!1,c=t=>{a||T.current!==e||(a=!0,o(),f(t),b(t!==null&&s),u(!0))},l=setTimeout(()=>{console.warn(`[bug-report] screenshot capture did not settle within ${g}ms; revealing without one`),c(null)},g),d=performance.now(),p=0,m=()=>{if(a||T.current!==e)return;let t=performance.now()-d>=v;if(i&&document.querySelector(_)!==null&&!t){p=requestAnimationFrame(m);return}if(!i){let e=y();e!==null&&(o=e,s=!0)}p=requestAnimationFrame(()=>{a||T.current!==e||r().then(c).catch(e=>{console.warn(`[bug-report] screenshot capture failed:`,e),c(null)})})};return p=requestAnimationFrame(m),()=>{T.current+=1,clearTimeout(l),cancelAnimationFrame(p),o()}},D=[n.open,n.crashInvite,i],t[3]=i,t[4]=n.crashInvite,t[5]=n.open,t[6]=E,t[7]=D):(E=t[6],D=t[7]),(0,o.useEffect)(E,D),!a)return null;let O=n.open&&l,k;return t[8]!==C||t[9]!==p||t[10]!==n||t[11]!==d||t[12]!==O?(k=(0,m.jsx)(o.Suspense,{fallback:null,children:(0,m.jsx)(h,{...n,open:O,screenshot:d,pointerMarked:p,crashDumpAvailable:C})}),t[8]=C,t[9]=p,t[10]=n,t[11]=d,t[12]=O,t[13]=k):k=t[13],k}function x(){}function S(e){console.warn(`[bug-report] crash-dump availability probe failed:`,e)}function C(e){let t=(0,s.c)(7),{systemWide:n}=e,[r,i]=(0,o.useState)(null),c,l;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(c=()=>a((e,t)=>{e===`report-bug`&&i(e=>e??t)}),l=[],t[0]=c,t[1]=l):(c=t[0],l=t[1]),(0,o.useEffect)(c,l);let u=r!==null,d;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(d=e=>{e||i(null)},t[2]=d):d=t[2];let f=r?.launcherBorne===!0,p;return t[3]!==n||t[4]!==u||t[5]!==f?(p=(0,m.jsx)(b,{open:u,onOpenChange:d,launcherBorne:f,systemWide:n}),t[3]=n,t[4]=u,t[5]=f,t[6]=p):p=t[6],p}export{b as n,f as r,C as t};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./ReportBugDialogBody-DX1dP7wO.js","./chunk-CYidjpOJ.js","./dist-BBWka618.js","./preload-helper-Chd9yIcd.js","./trace-api-BP9dN1Hz.js","./lib-CPkc7nK4.js","./html-void-elements-zEl0KGqf.js","./lib-DmueaA5E.js","./markdownit-CugClK-K.js","./w3c-keyname-C7Rznu6R.js","./dist-Nvb76hAm.js","./jsx-runtime-BUgB2tll.js","./react-f2sANaYj.js","./checkbox-Crs_F_Np.js","./dist-BcvirUWL.js","./dist-BHv-mziD.js","./react-dom-DPxgxlDT.js","./dist-Bd_yyADX.js","./dist-BDna-dOq.js","./check-BzfGb3KU.js","./createLucideIcon-B6ULg5PN.js","./minus-cd1ERTPg.js","./compiler-runtime-BfE3aGVn.js","./utils-CPqDy6Hr.js","./bundle-mjs-SHeFpKGC.js","./collapsible-DYySK8La.js","./button-HKX9wT1K.js","./chevron-right-C-g4JuT4.js","./circle-alert-Czw40trT.js","./spinner-Bp2_BYkl.js","./bug-report-send-manager-Bdl0o5Py.js","./propagation-api-DC5404fy.js","./contact-email-store-VCf9Nhpy.js","./BugReportHistory-fO3bN8lg.js","./chevron-down-Dloks0wp.js","./folder-open-dlosmFj2.js","./trash-2-B9Flu-41.js","./badge-EmKkAvTN.js","./platform-labels-ExCG9yvH.js","./dist-Cr4-nBVI.js","./triangle-alert-CCeXtPLU.js","./ImageAttachments-_-DakRUS.js","./tooltip-DVBVVaAs.js","./dist-DYso7MCm.js","./floating-ui.dom-CDtYEnEj.js","./dist-DRO03ovd.js","./paperclip-C8NmE81Z.js","./x-DIayTyoR.js","./file-tree-adapter-DLjG7Vd1.js","./file-tree-rename-validation-C0aGoscw.js","./file-tree-utils-xLkLWRXE.js","./navigation-targets-CQRRzWZU.js","./doc-paths-Cchodm9a.js","./input-6HnhfmYW.js","./textarea-D9PjrPjk.js","./image-attachment-m6wAdtfg.js","./dialog-Cv_pRVgB.js","./electron-drag-strip-BgiQs0O3.js","./es2015-B9_uRFGw.js"])))=>i.map(i=>d[i]);
2
+ import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./preload-helper-Chd9yIcd.js";import{t as n}from"./jsx-runtime-BUgB2tll.js";import{t as r}from"./react-f2sANaYj.js";import{t as i}from"./compiler-runtime-BfE3aGVn.js";import{n as a}from"./local-menu-action-bus-DaoT7_kL.js";var o=e(r(),1),s=i(),c=0,l=0,u=!1,d=null;function f(){if(typeof window>`u`)return()=>{};if(d!==null)return d;let e=new AbortController,t={passive:!0,signal:e.signal};return window.addEventListener(`pointermove`,e=>{c=e.clientX,l=e.clientY,u=!0},t),window.addEventListener(`pointerout`,e=>{e.relatedTarget===null&&(u=!1)},t),d=()=>{e.abort(),u=!1,d=null},d}function p(){return u?{x:c,y:l}:null}var m=n(),h=(0,o.lazy)(()=>t(()=>import(`./ReportBugDialogBody-DX1dP7wO.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58]),import.meta.url)),g=1200,_=`[cmdk-root],[data-radix-popper-content-wrapper]`,v=500;function y(){let e=p();if(e===null)return null;let t=document.createElement(`div`);return t.className=`ok-pointer-marker`,t.setAttribute(`aria-hidden`,`true`),t.style.left=`${e.x}px`,t.style.top=`${e.y}px`,document.body.append(t),()=>t.remove()}function b(e){let t=(0,s.c)(14),n,r;t[0]===e?(n=t[1],r=t[2]):({launcherBorne:r,...n}=e,t[0]=e,t[1]=n,t[2]=r);let i=r===void 0?!1:r,[a,c]=(0,o.useState)(n.open),[l,u]=(0,o.useState)(!1),[d,f]=(0,o.useState)(null),[p,b]=(0,o.useState)(!1),[C,w]=(0,o.useState)(!1),T=(0,o.useRef)(0);n.open&&!a&&c(!0);let E,D;if(t[3]!==i||t[4]!==n.crashInvite||t[5]!==n.open?(E=()=>{if(!n.open){u(!1);return}let e=T.current+=1;w(!1);let t=window.okDesktop?.bugReport?.crashDumpAvailability;n.crashInvite===void 0&&typeof t==`function`&&t().then(t=>{T.current===e&&w(t.available)}).catch(S);let r=window.okDesktop?.bugReport?.captureScreenshot;if(typeof r!=`function`||n.crashInvite!==void 0){f(null),u(!0);return}f(null);let a=!1,o=x,s=!1,c=t=>{a||T.current!==e||(a=!0,o(),f(t),b(t!==null&&s),u(!0))},l=setTimeout(()=>{console.warn(`[bug-report] screenshot capture did not settle within ${g}ms; revealing without one`),c(null)},g),d=performance.now(),p=0,m=()=>{if(a||T.current!==e)return;let t=performance.now()-d>=v;if(i&&document.querySelector(_)!==null&&!t){p=requestAnimationFrame(m);return}if(!i){let e=y();e!==null&&(o=e,s=!0)}p=requestAnimationFrame(()=>{a||T.current!==e||r().then(c).catch(e=>{console.warn(`[bug-report] screenshot capture failed:`,e),c(null)})})};return p=requestAnimationFrame(m),()=>{T.current+=1,clearTimeout(l),cancelAnimationFrame(p),o()}},D=[n.open,n.crashInvite,i],t[3]=i,t[4]=n.crashInvite,t[5]=n.open,t[6]=E,t[7]=D):(E=t[6],D=t[7]),(0,o.useEffect)(E,D),!a)return null;let O=n.open&&l,k;return t[8]!==C||t[9]!==p||t[10]!==n||t[11]!==d||t[12]!==O?(k=(0,m.jsx)(o.Suspense,{fallback:null,children:(0,m.jsx)(h,{...n,open:O,screenshot:d,pointerMarked:p,crashDumpAvailable:C})}),t[8]=C,t[9]=p,t[10]=n,t[11]=d,t[12]=O,t[13]=k):k=t[13],k}function x(){}function S(e){console.warn(`[bug-report] crash-dump availability probe failed:`,e)}function C(e){let t=(0,s.c)(7),{systemWide:n}=e,[r,i]=(0,o.useState)(null),c,l;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(c=()=>a((e,t)=>{e===`report-bug`&&i(e=>e??t)}),l=[],t[0]=c,t[1]=l):(c=t[0],l=t[1]),(0,o.useEffect)(c,l);let u=r!==null,d;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(d=e=>{e||i(null)},t[2]=d):d=t[2];let f=r?.launcherBorne===!0,p;return t[3]!==n||t[4]!==u||t[5]!==f?(p=(0,m.jsx)(b,{open:u,onOpenChange:d,launcherBorne:f,systemWide:n}),t[3]=n,t[4]=u,t[5]=f,t[6]=p):p=t[6],p}export{b as n,f as r,C as t};
@@ -1 +1 @@
1
- import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./jsx-runtime-BUgB2tll.js";import{t as n}from"./react-f2sANaYj.js";import{n as r,r as i}from"./dist-Nvb76hAm.js";import{t as a}from"./compiler-runtime-BfE3aGVn.js";import{t as o}from"./utils-CPqDy6Hr.js";import{t as s}from"./button-HKX9wT1K.js";import{t as c}from"./label-D-K3fWtj.js";import{i as l,n as u,o as d,s as f,t as p}from"./select-D_BhUvh8.js";import{t as m}from"./switch-iwBsEWej.js";import{n as h}from"./dist-CJhtNlOm2.js";import{t as g}from"./createLucideIcon-B6ULg5PN.js";import{t as _}from"./braces-OM56BU1Y.js";import{t as v}from"./case-sensitive-B01mpdhT.js";import{t as y}from"./hash-d98LeeWB.js";import{t as b}from"./trash-2-B9Flu-41.js";import{t as x}from"./input-6HnhfmYW.js";import{d as S,f as C,o as w,r as T,s as E}from"./lint-config-client-CnphqIMJ.js";import{i as D,r as ee,t as O}from"./EditorModeToggle-BeTnxhxA.js";import{t as k}from"./tag-pill-input-Bs1Otf32.js";import{t as te}from"./useLintConfigViewMode-BPPqSrQ1.js";import{r as A,t as ne}from"./schema-fields-view-intent-BXqlgMcX.js";var j=g(`brackets`,[[`path`,{d:`M16 3h3a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1h-3`,key:`1kt8lf`}],[`path`,{d:`M8 21H5a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h3`,key:`gduv9`}]]),M=g(`list-checks`,[[`path`,{d:`M13 5h8`,key:`a7qcls`}],[`path`,{d:`M13 12h8`,key:`h98zly`}],[`path`,{d:`M13 19h8`,key:`c3s6r1`}],[`path`,{d:`m3 17 2 2 4-4`,key:`1jhpwq`}],[`path`,{d:`m3 7 2 2 4-4`,key:`1obspn`}]]),N=g(`toggle-left`,[[`circle`,{cx:`9`,cy:`12`,r:`3`,key:`u3jwor`}],[`rect`,{width:`20`,height:`14`,x:`2`,y:`5`,rx:`7`,key:`g7kal2`}]]),P=a(),F=e(n(),1),I=t(),L=[`string`,`number`,`boolean`,`array`,`object`],re=[`string`,`number`,`boolean`,`enum`,`array`,`object`],ie=[`string`,`number`,`boolean`,`enum`,`object`],R={string:{Icon:v,className:`text-green-500`},number:{Icon:y,className:`text-blue-500`},boolean:{Icon:N,className:`text-orange-500`},enum:{Icon:M,className:`text-yellow-500`},array:{Icon:j,className:`text-pink-500`},object:{Icon:_,className:`text-purple-500`}};function ae(e){let t=(0,P.c)(8),{option:n}=e,{Icon:r,className:i}=R[n],a;t[0]===i?a=t[1]:(a=o(`size-3.5 shrink-0`,i),t[0]=i,t[1]=a);let s;t[2]!==r||t[3]!==a?(s=(0,I.jsx)(r,{"aria-hidden":!0,className:a}),t[2]=r,t[3]=a,t[4]=s):s=t[4];let c;return t[5]!==n||t[6]!==s?(c=(0,I.jsxs)(`span`,{className:`flex items-center gap-2`,children:[s,n]}),t[5]=n,t[6]=s,t[7]=c):c=t[7],c}function oe(e){let t=(0,P.c)(5),{option:n}=e,{Icon:r,className:i}=R[n],a;t[0]===i?a=t[1]:(a=o(`size-4 shrink-0`,i),t[0]=i,t[1]=a);let s;return t[2]!==r||t[3]!==a?(s=(0,I.jsx)(r,{"aria-hidden":!0,className:a}),t[2]=r,t[3]=a,t[4]=s):s=t[4],s}var se=4,ce=new Set([`$schema`,`type`,`properties`,`required`]),z=new Set([`type`,`enum`,`pattern`,`format`,`items`,`description`,`properties`,`required`]);function B(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function le(e){return e===void 0?[]:Array.isArray(e)&&e.every(e=>typeof e==`string`)?e:null}function ue(e){if(Object.keys(e).some(e=>!z.has(e)))return!0;let t=e.items;if(t!==void 0){if(!B(t))return!0;let e=new Set([`enum`,`type`,`properties`,`required`,`description`]);if(Object.keys(t).some(t=>!e.has(t)))return!0}return!1}function de(e,t){return[...e.map(e=>typeof e==`string`?e:`[]`),t].join(`.`)}function fe(e){let t=(0,P.c)(28),{file:n}=e,{_:a}=i(),{data:o}=S(),s,c,l,u,d,f,p;if(t[0]!==a||t[1]!==o?.effective.plugins.frontmatter.schemas||t[2]!==n){let e=o?.effective.plugins.frontmatter.schemas.find(e=>e.file===n)?.schema,i=B(e)?Object.keys(e).filter(pe):[],m;t[10]!==a||t[11]!==n?(m={save:(e,t,r)=>{(async()=>{let i=await C(n,e,t,r);i.ok?T():h.error(i.errorDetail??a({id:`IQgeSn`}))})()},rename:(e,t,r)=>{(async()=>{let i=await E(n,e,t,r);i.ok?T():h.error(i.errorDetail??a({id:`kooyLJ`}))})()},remove:(e,t)=>{(async()=>{let r=await w(n,e,t);r.ok?T():h.error(r.errorDetail??a({id:`qC7PwZ`}))})()}},t[10]=a,t[11]=n,t[12]=m):m=t[12],c=m,u=`space-y-3`,d=`frontmatter-field-editor-${n}`,f=e===void 0&&(0,I.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:(0,I.jsx)(r,{id:`ri6zS-`})}),t[13]!==n||t[14]!==i?(p=i.length>0&&(0,I.jsx)(`p`,{className:`text-xs text-muted-foreground`,"data-testid":`frontmatter-schema-root-preserved-${n}`,children:(0,I.jsx)(r,{id:`98FP1E`,values:{0:i.join(`, `)}})}),t[13]=n,t[14]=i,t[15]=p):p=t[15],s=me,l=B(e)?e:{},t[0]=a,t[1]=o?.effective.plugins.frontmatter.schemas,t[2]=n,t[3]=s,t[4]=c,t[5]=l,t[6]=u,t[7]=d,t[8]=f,t[9]=p}else s=t[3],c=t[4],l=t[5],u=t[6],d=t[7],f=t[8],p=t[9];let m;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(m=[],t[16]=m):m=t[16];let g=`frontmatter-add-field-${n}`,_;t[17]!==s||t[18]!==c||t[19]!==l||t[20]!==g?(_=(0,I.jsx)(s,{node:l,parentPath:m,depth:0,addInputId:g,ops:c}),t[17]=s,t[18]=c,t[19]=l,t[20]=g,t[21]=_):_=t[21];let v;return t[22]!==u||t[23]!==d||t[24]!==f||t[25]!==p||t[26]!==_?(v=(0,I.jsxs)(`div`,{className:u,"data-testid":d,children:[f,p,_]}),t[22]=u,t[23]=d,t[24]=f,t[25]=p,t[26]=_,t[27]=v):v=t[27],v}function pe(e){return!ce.has(e)}function me(e){let t=(0,P.c)(19),{node:n,parentPath:r,depth:i,addInputId:a,ops:o}=e,s;t[0]===n.properties?s=t[1]:(s=B(n.properties)?n.properties:{},t[0]=n.properties,t[1]=s);let c=s,l,u;if(t[2]!==i||t[3]!==n.required||t[4]!==o||t[5]!==r||t[6]!==c){let e=Array.isArray(n.required)?n.required.filter(he):[];l=`space-y-2`,u=Object.entries(c).map(t=>{let[n,a]=t;return(0,I.jsx)(V,{field:n,property:B(a)?a:{},isRequired:e.includes(n),parentPath:r,depth:i,ops:o},n)}),t[2]=i,t[3]=n.required,t[4]=o,t[5]=r,t[6]=c,t[7]=l,t[8]=u}else l=t[7],u=t[8];let d;t[9]!==o||t[10]!==r?(d=e=>o.save(e,{type:`string`},r),t[9]=o,t[10]=r,t[11]=d):d=t[11];let f;t[12]!==a||t[13]!==d?(f=(0,I.jsx)(ve,{inputId:a,onAdd:d}),t[12]=a,t[13]=d,t[14]=f):f=t[14];let p;return t[15]!==l||t[16]!==u||t[17]!==f?(p=(0,I.jsxs)(`div`,{className:l,children:[u,f]}),t[15]=l,t[16]=u,t[17]=f,t[18]=p):p=t[18],p}function he(e){return typeof e==`string`}function V(e){let t=(0,P.c)(170),{field:n,property:a,isRequired:o,parentPath:l,depth:h,ops:g}=e,{_}=i(),[v,y]=(0,F.useState)(!1),[x,S]=(0,F.useState)(!1),C;t[0]!==n||t[1]!==l?(C=de(l,n),t[0]=n,t[1]=l,t[2]=C):C=t[2];let w=C,T=typeof a.type==`string`&&L.includes(a.type)?a.type:void 0,E;t[3]===a.enum?E=t[4]:(E=le(a.enum),t[3]=a.enum,t[4]=E);let D=E,ee;t[5]===a.items?ee=t[6]:(ee=B(a.items)?a.items:{},t[5]=a.items,t[6]=ee);let O=ee,te;t[7]===O.enum?te=t[8]:(te=le(O.enum),t[7]=O.enum,t[8]=te);let A=te,ne=typeof a.pattern==`string`?a.pattern:``,j=typeof a.description==`string`?a.description:``,M;t[9]===a?M=t[10]:(M=ue(a),t[9]=a,t[10]=M);let N=M,R=T!==`array`&&T!==`object`&&D!==null&&(v||T===void 0&&D.length>0),ae=T===`object`&&h<se,ce;t[11]===O.type?ce=t[12]:(ce=typeof O.type==`string`&&ie.includes(O.type)?O.type:void 0,t[11]=O.type,t[12]=ce);let z=ce,fe=z!==`object`&&A!==null&&(x||z===void 0&&A.length>0),pe=T===`array`&&z===`object`&&h<se,he=`frontmatter-field-row-${w}`,V;t[13]!==R||t[14]!==T?(V=(R||T!==void 0)&&(0,I.jsx)(oe,{option:R?`enum`:T}),t[13]=R,t[14]=T,t[15]=V):V=t[15];let ve=`frontmatter-field-name-${w}`,H;t[16]===_?H=t[17]:(H=_({id:`nrXDdR`}),t[16]=_,t[17]=H);let U;t[18]!==n||t[19]!==g||t[20]!==l?(U=e=>{e!==``&&e!==n&&g.rename(n,e,l)},t[18]=n,t[19]=g,t[20]=l,t[21]=U):U=t[21];let W;t[22]!==n||t[23]!==H||t[24]!==U||t[25]!==ve?(W=(0,I.jsx)(ye,{id:ve,initial:n,ariaLabel:H,className:`h-7 w-36 shrink-0 font-mono text-sm font-medium`,onCommit:U}),t[22]=n,t[23]=H,t[24]=U,t[25]=ve,t[26]=W):W=t[26];let be=`frontmatter-field-description-${w}`,G;t[27]===_?G=t[28]:(G=_({id:`PGPGsL`}),t[27]=_,t[28]=G);let K;t[29]!==_||t[30]!==n?(K=_({id:`IFALcX`,values:{field:n}}),t[29]=_,t[30]=n,t[31]=K):K=t[31];let q;t[32]!==n||t[33]!==g||t[34]!==l?(q=e=>g.save(n,{description:e===``?null:e},l),t[32]=n,t[33]=g,t[34]=l,t[35]=q):q=t[35];let J;t[36]!==j||t[37]!==be||t[38]!==G||t[39]!==K||t[40]!==q?(J=(0,I.jsx)(ye,{id:be,initial:j,placeholder:G,ariaLabel:K,className:`h-7 min-w-0 flex-1`,onCommit:q}),t[36]=j,t[37]=be,t[38]=G,t[39]=K,t[40]=q,t[41]=J):J=t[41];let xe=`frontmatter-field-required-${w}`,Se;t[42]===Symbol.for(`react.memo_cache_sentinel`)?(Se=(0,I.jsx)(r,{id:`TMLAx2`}),t[42]=Se):Se=t[42];let Y;t[43]===xe?Y=t[44]:(Y=(0,I.jsx)(c,{htmlFor:xe,className:`shrink-0 text-xs text-muted-foreground`,children:Se}),t[43]=xe,t[44]=Y);let Ce=`frontmatter-field-required-${w}`,X;t[45]!==n||t[46]!==g||t[47]!==l?(X=e=>g.save(n,{required:e},l),t[45]=n,t[46]=g,t[47]=l,t[48]=X):X=t[48];let we=`frontmatter-field-required-${w}`,Z;t[49]!==o||t[50]!==Ce||t[51]!==X||t[52]!==we?(Z=(0,I.jsx)(m,{id:Ce,checked:o,onCheckedChange:X,"data-testid":we}),t[49]=o,t[50]=Ce,t[51]=X,t[52]=we,t[53]=Z):Z=t[53];let Te;t[54]!==n||t[55]!==g||t[56]!==l?(Te=()=>g.remove(n,l),t[54]=n,t[55]=g,t[56]=l,t[57]=Te):Te=t[57];let Ee;t[58]!==_||t[59]!==n?(Ee=_({id:`bF22t6`,values:{field:n}}),t[58]=_,t[59]=n,t[60]=Ee):Ee=t[60];let De=`frontmatter-field-remove-${w}`,Oe;t[61]===Symbol.for(`react.memo_cache_sentinel`)?(Oe=(0,I.jsx)(b,{"aria-hidden":!0,className:`size-4`}),t[61]=Oe):Oe=t[61];let ke;t[62]!==Te||t[63]!==Ee||t[64]!==De?(ke=(0,I.jsx)(s,{variant:`ghost`,size:`icon`,className:`size-7 shrink-0`,onClick:Te,"aria-label":Ee,"data-testid":De,children:Oe}),t[62]=Te,t[63]=Ee,t[64]=De,t[65]=ke):ke=t[65];let Ae;t[66]!==W||t[67]!==J||t[68]!==Y||t[69]!==Z||t[70]!==ke||t[71]!==V?(Ae=(0,I.jsxs)(`div`,{className:`flex items-center gap-2`,children:[V,W,J,Y,Z,ke]}),t[66]=W,t[67]=J,t[68]=Y,t[69]=Z,t[70]=ke,t[71]=V,t[72]=Ae):Ae=t[72];let je;t[73]!==w||t[74]!==N?(je=N&&(0,I.jsx)(`p`,{className:`text-xs text-muted-foreground`,"data-testid":`frontmatter-field-preserved-${w}`,children:(0,I.jsx)(r,{id:`TdlVEN`})}),t[73]=w,t[74]=N,t[75]=je):je=t[75];let Me=`frontmatter-field-type-${w}`,Ne;t[76]===Symbol.for(`react.memo_cache_sentinel`)?(Ne=(0,I.jsx)(r,{id:`-zy2Nq`}),t[76]=Ne):Ne=t[76];let Pe;t[77]===Me?Pe=t[78]:(Pe=(0,I.jsx)(c,{className:`text-xs`,htmlFor:Me,children:Ne}),t[77]=Me,t[78]=Pe);let Fe=R?`enum`:T??``,Ie;t[79]!==D?.length||t[80]!==n||t[81]!==g||t[82]!==l?(Ie=e=>{if(e===`enum`){y(!0);return}y(!1);let t=e!==`string`&&(D?.length??0)>0?{type:e,enum:null}:{type:e};g.save(n,t,l)},t[79]=D?.length,t[80]=n,t[81]=g,t[82]=l,t[83]=Ie):Ie=t[83];let Le=`frontmatter-field-type-${w}`,Re=`frontmatter-field-type-${w}`,Q;t[84]===_?Q=t[85]:(Q=_({id:`EkUnmS`}),t[84]=_,t[85]=Q);let ze;t[86]===Q?ze=t[87]:(ze=(0,I.jsx)(f,{placeholder:Q}),t[86]=Q,t[87]=ze);let Be;t[88]!==Le||t[89]!==Re||t[90]!==ze?(Be=(0,I.jsx)(d,{id:Le,"data-testid":Re,children:ze}),t[88]=Le,t[89]=Re,t[90]=ze,t[91]=Be):Be=t[91];let Ve;t[92]===Symbol.for(`react.memo_cache_sentinel`)?(Ve=(0,I.jsx)(u,{children:re.map(_e)}),t[92]=Ve):Ve=t[92];let He;t[93]!==Fe||t[94]!==Ie||t[95]!==Be?(He=(0,I.jsxs)(p,{value:Fe,onValueChange:Ie,children:[Be,Ve]}),t[93]=Fe,t[94]=Ie,t[95]=Be,t[96]=He):He=t[96];let Ue;t[97]!==Pe||t[98]!==He?(Ue=(0,I.jsxs)(`div`,{className:`space-y-1`,children:[Pe,He]}),t[97]=Pe,t[98]=He,t[99]=Ue):Ue=t[99];let We=`frontmatter-field-pattern-${w}`,Ge;t[100]===Symbol.for(`react.memo_cache_sentinel`)?(Ge=(0,I.jsx)(r,{id:`cstC0z`}),t[100]=Ge):Ge=t[100];let Ke;t[101]===We?Ke=t[102]:(Ke=(0,I.jsx)(c,{className:`text-xs`,htmlFor:We,children:Ge}),t[101]=We,t[102]=Ke);let qe=`frontmatter-field-pattern-${w}`,Je;t[103]!==n||t[104]!==g||t[105]!==l?(Je=e=>g.save(n,{pattern:e===``?null:e},l),t[103]=n,t[104]=g,t[105]=l,t[106]=Je):Je=t[106];let Ye;t[107]!==ne||t[108]!==qe||t[109]!==Je?(Ye=(0,I.jsx)(ye,{id:qe,initial:ne,onCommit:Je}),t[107]=ne,t[108]=qe,t[109]=Je,t[110]=Ye):Ye=t[110];let Xe;t[111]!==Ke||t[112]!==Ye?(Xe=(0,I.jsxs)(`div`,{className:`space-y-1`,children:[Ke,Ye]}),t[111]=Ke,t[112]=Ye,t[113]=Xe):Xe=t[113];let Ze;t[114]!==Ue||t[115]!==Xe?(Ze=(0,I.jsxs)(`div`,{className:`grid grid-cols-2 gap-2`,children:[Ue,Xe]}),t[114]=Ue,t[115]=Xe,t[116]=Ze):Ze=t[116];let Qe;t[117]!==_||t[118]!==D||t[119]!==n||t[120]!==g||t[121]!==l||t[122]!==w||t[123]!==T?(Qe=T!==`array`&&T!==`object`&&D!==null&&(0,I.jsxs)(`div`,{className:`space-y-1`,children:[(0,I.jsx)(c,{className:`text-xs`,htmlFor:`frontmatter-field-enum-${w}`,children:(0,I.jsx)(r,{id:`UGeJuP`})}),(0,I.jsx)(k,{id:`frontmatter-field-enum-${w}`,value:D,grammar:`free-text`,onChange:e=>g.save(n,{enum:e.length===0?null:e},l),placeholder:_({id:`5tcmwY`}),"aria-label":_({id:`5qQr1u`,values:{field:n}})})]}),t[117]=_,t[118]=D,t[119]=n,t[120]=g,t[121]=l,t[122]=w,t[123]=T,t[124]=Qe):Qe=t[124];let $e;t[125]!==_||t[126]!==n||t[127]!==A?.length||t[128]!==z||t[129]!==g||t[130]!==l||t[131]!==w||t[132]!==fe||t[133]!==T?($e=T===`array`&&(0,I.jsx)(`div`,{className:`grid grid-cols-2 gap-2`,children:(0,I.jsxs)(`div`,{className:`space-y-1`,children:[(0,I.jsx)(c,{className:`text-xs`,htmlFor:`frontmatter-field-items-type-${w}`,children:(0,I.jsx)(r,{id:`6pe_G5`})}),(0,I.jsxs)(p,{value:fe?`enum`:z??``,onValueChange:e=>{if(e===`enum`){S(!0);return}S(!1);let t=e!==`string`&&(A?.length??0)>0?{itemsType:e,itemsEnum:null}:{itemsType:e};g.save(n,t,l)},children:[(0,I.jsx)(d,{id:`frontmatter-field-items-type-${w}`,"data-testid":`frontmatter-field-items-type-${w}`,children:(0,I.jsx)(f,{placeholder:_({id:`EkUnmS`})})}),(0,I.jsx)(u,{children:ie.map(ge)})]})]})}),t[125]=_,t[126]=n,t[127]=A?.length,t[128]=z,t[129]=g,t[130]=l,t[131]=w,t[132]=fe,t[133]=T,t[134]=$e):$e=t[134];let et;t[135]!==_||t[136]!==n||t[137]!==A||t[138]!==z||t[139]!==g||t[140]!==l||t[141]!==w||t[142]!==T?(et=T===`array`&&z!==`object`&&A!==null&&(0,I.jsxs)(`div`,{className:`space-y-1`,children:[(0,I.jsx)(c,{className:`text-xs`,htmlFor:`frontmatter-field-items-enum-${w}`,children:(0,I.jsx)(r,{id:`ezUmoU`})}),(0,I.jsx)(k,{id:`frontmatter-field-items-enum-${w}`,value:A,grammar:`free-text`,onChange:e=>g.save(n,{itemsEnum:e.length===0?null:e},l),placeholder:_({id:`5tcmwY`}),"aria-label":_({id:`e60wew`,values:{field:n}})})]}),t[135]=_,t[136]=n,t[137]=A,t[138]=z,t[139]=g,t[140]=l,t[141]=w,t[142]=T,t[143]=et):et=t[143];let tt;t[144]!==h||t[145]!==n||t[146]!==O||t[147]!==g||t[148]!==l||t[149]!==w||t[150]!==pe?(tt=pe&&(0,I.jsxs)(`div`,{className:`ml-2 space-y-1 border-l pl-3 pt-1`,"data-testid":`frontmatter-field-item-children-${w}`,children:[(0,I.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:(0,I.jsx)(r,{id:`wU8WyK`})}),(0,I.jsx)(me,{node:O,parentPath:[...l,n,{items:!0}],depth:h+1,addInputId:`frontmatter-add-field-${w}.[]`,ops:g})]}),t[144]=h,t[145]=n,t[146]=O,t[147]=g,t[148]=l,t[149]=w,t[150]=pe,t[151]=tt):tt=t[151];let $;t[152]!==h||t[153]!==n||t[154]!==g||t[155]!==l||t[156]!==w||t[157]!==a||t[158]!==ae?($=ae&&(0,I.jsxs)(`div`,{className:`ml-2 space-y-1 border-l pl-3 pt-1`,"data-testid":`frontmatter-field-children-${w}`,children:[(0,I.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:(0,I.jsx)(r,{id:`9nIrRp`})}),(0,I.jsx)(me,{node:a,parentPath:[...l,n],depth:h+1,addInputId:`frontmatter-add-field-${w}`,ops:g})]}),t[152]=h,t[153]=n,t[154]=g,t[155]=l,t[156]=w,t[157]=a,t[158]=ae,t[159]=$):$=t[159];let nt;return t[160]!==Ae||t[161]!==je||t[162]!==Ze||t[163]!==Qe||t[164]!==$e||t[165]!==et||t[166]!==tt||t[167]!==$||t[168]!==he?(nt=(0,I.jsxs)(`div`,{className:`space-y-2 rounded-md border p-3`,"data-testid":he,children:[Ae,je,Ze,Qe,$e,et,tt,$]}),t[160]=Ae,t[161]=je,t[162]=Ze,t[163]=Qe,t[164]=$e,t[165]=et,t[166]=tt,t[167]=$,t[168]=he,t[169]=nt):nt=t[169],nt}function ge(e){return(0,I.jsx)(l,{value:e,children:(0,I.jsx)(ae,{option:e})},e)}function _e(e){return(0,I.jsx)(l,{value:e,children:(0,I.jsx)(ae,{option:e})},e)}function ve(e){let t=(0,P.c)(24),{inputId:n,onAdd:i}=e,[a,o]=(0,F.useState)(``),l;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,I.jsx)(r,{id:`Va3xJe`}),t[0]=l):l=t[0];let u;t[1]===n?u=t[2]:(u=(0,I.jsx)(c,{htmlFor:n,className:`text-xs`,children:l}),t[1]=n,t[2]=u);let d;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(d=e=>o(e.target.value),t[3]=d):d=t[3];let f=`${n}-input`,p;t[4]!==n||t[5]!==a||t[6]!==f?(p=(0,I.jsx)(x,{id:n,value:a,onChange:d,placeholder:`owner`,"data-testid":f}),t[4]=n,t[5]=a,t[6]=f,t[7]=p):p=t[7];let m;t[8]!==u||t[9]!==p?(m=(0,I.jsxs)(`div`,{className:`min-w-0 flex-1 space-y-1`,children:[u,p]}),t[8]=u,t[9]=p,t[10]=m):m=t[10];let h;t[11]===a?h=t[12]:(h=a.trim(),t[11]=a,t[12]=h);let g=h===``,_;t[13]!==a||t[14]!==i?(_=()=>{i(a.trim()),o(``)},t[13]=a,t[14]=i,t[15]=_):_=t[15];let v=`${n}-save`,y;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(y=(0,I.jsx)(r,{id:`m16xKo`}),t[16]=y):y=t[16];let b;t[17]!==v||t[18]!==g||t[19]!==_?(b=(0,I.jsx)(s,{size:`sm`,variant:`outline`,disabled:g,onClick:_,"data-testid":v,children:y}),t[17]=v,t[18]=g,t[19]=_,t[20]=b):b=t[20];let S;return t[21]!==b||t[22]!==m?(S=(0,I.jsxs)(`div`,{className:`flex items-end gap-2`,children:[m,b]}),t[21]=b,t[22]=m,t[23]=S):S=t[23],S}function ye(e){let t=(0,P.c)(15),{id:n,initial:r,onCommit:i,placeholder:a,ariaLabel:o,className:s}=e,[c,l]=(0,F.useState)(r),u;t[0]!==c||t[1]!==r||t[2]!==i?(u=()=>{c.trim()!==r&&i(c.trim())},t[0]=c,t[1]=r,t[2]=i,t[3]=u):u=t[3];let d=u,f;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(f=e=>l(e.target.value),t[4]=f):f=t[4];let p;t[5]===d?p=t[6]:(p=e=>{e.key===`Enter`&&d()},t[5]=d,t[6]=p);let m;return t[7]!==o||t[8]!==s||t[9]!==d||t[10]!==c||t[11]!==n||t[12]!==a||t[13]!==p?(m=(0,I.jsx)(x,{id:n,value:c,onChange:f,onBlur:d,onKeyDown:p,placeholder:a,"aria-label":o,className:s,"data-testid":n}),t[7]=o,t[8]=s,t[9]=d,t[10]=c,t[11]=n,t[12]=a,t[13]=p,t[14]=m):m=t[14],m}function H(e){return`/api/asset-text?path=${encodeURIComponent(e)}`}function U(e){let t=(0,P.c)(42),{assetPath:n}=e,{_:r}=i(),[a,o]=te(),[s,c]=(0,F.useState)(null),l=s??a,u;t[0]===o?u=t[1]:(u=e=>{c(e),o(e)},t[0]=o,t[1]=u);let d=u,f,p;t[2]===n?(f=t[3],p=t[4]):(f=()=>{let e=e=>{e===n&&ne(e)&&c(`rules`)};return e(n),A(e)},p=[n],t[2]=n,t[3]=f,t[4]=p),(0,F.useEffect)(f,p);let{data:m}=S(),h;t[5]===m?.effective.plugins.frontmatter.schemas?h=t[6]:(h=m?.effective.plugins.frontmatter.schemas??[],t[5]=m?.effective.plugins.frontmatter.schemas,t[6]=h);let g;if(t[7]!==n||t[8]!==h){let e;t[10]===n?e=t[11]:(e=e=>e.file===n,t[10]=n,t[11]=e),g=h.some(e),t[7]=n,t[8]=h,t[9]=g}else g=t[9];let _=g,v=!_||l===`source`,y;t[12]===n?y=t[13]:(y=n.split(`/`).pop()??n,t[12]=n,t[13]=y);let b=y,x;t[14]===b?x=t[15]:(x=b.includes(`.`)?(b.split(`.`).pop()??``).toLowerCase():``,t[14]=b,t[15]=x);let C=x,w;t[16]===n?w=t[17]:(w=(0,I.jsx)(ee,{entry:{kind:`asset`,path:n},className:`shrink-0 border-b bg-background px-3 py-1.5`}),t[16]=n,t[17]=w);let T;t[18]===d?T=t[19]:(T=e=>d(e===`source`?`source`:`rules`),t[18]=d,t[19]=T);let E=!_,k;t[20]===r?k=t[21]:(k=r({id:`vF68cg`}),t[20]=r,t[21]=k);let j;t[22]===r?j=t[23]:(j=r({id:`wdxz7K`}),t[22]=r,t[23]=j);let M;t[24]===r?M=t[25]:(M=r({id:`nc-ipN`}),t[24]=r,t[25]=M);let N;t[26]!==v||t[27]!==E||t[28]!==k||t[29]!==j||t[30]!==M||t[31]!==T?(N=(0,I.jsx)(`div`,{className:`flex shrink-0 items-center justify-center border-b bg-background py-2`,children:(0,I.jsx)(O,{isSourceMode:v,onModeChange:T,wysiwygDisabled:E,wysiwygLabel:k,sourceLabel:j,wysiwygDisabledReason:M})}),t[26]=v,t[27]=E,t[28]=k,t[29]=j,t[30]=M,t[31]=T,t[32]=N):N=t[32];let L;t[33]!==n||t[34]!==C||t[35]!==b||t[36]!==v?(L=v?(0,I.jsx)(`div`,{className:`min-h-0 flex-1 overflow-hidden`,children:(0,I.jsx)(D,{src:H(n),assetPath:n,fileName:b,extension:C},n)}):(0,I.jsx)(`div`,{className:`min-h-0 flex-1 overflow-y-auto px-4 py-4 sm:px-6`,children:(0,I.jsx)(`div`,{className:`mx-auto w-full max-w-3xl`,children:(0,I.jsx)(fe,{file:n})})}),t[33]=n,t[34]=C,t[35]=b,t[36]=v,t[37]=L):L=t[37];let re;return t[38]!==N||t[39]!==L||t[40]!==w?(re=(0,I.jsxs)(`div`,{className:`flex h-full min-h-0 flex-col bg-background`,"data-schema-config-editor":``,children:[w,N,L]}),t[38]=N,t[39]=L,t[40]=w,t[41]=re):re=t[41],re}export{U as SchemaConfigEditor};
1
+ import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./jsx-runtime-BUgB2tll.js";import{t as n}from"./react-f2sANaYj.js";import{n as r,r as i}from"./dist-Nvb76hAm.js";import{t as a}from"./compiler-runtime-BfE3aGVn.js";import{t as o}from"./utils-CPqDy6Hr.js";import{t as s}from"./button-HKX9wT1K.js";import{t as c}from"./label-D-K3fWtj.js";import{i as l,n as u,o as d,s as f,t as p}from"./select-D_BhUvh8.js";import{t as m}from"./switch-iwBsEWej.js";import{n as h}from"./dist-CJhtNlOm2.js";import{t as g}from"./createLucideIcon-B6ULg5PN.js";import{t as _}from"./braces-OM56BU1Y.js";import{t as v}from"./case-sensitive-B01mpdhT.js";import{t as y}from"./hash-d98LeeWB.js";import{t as b}from"./trash-2-B9Flu-41.js";import{t as x}from"./input-6HnhfmYW.js";import{d as S,f as C,o as w,r as T,s as E}from"./lint-config-client-CnphqIMJ.js";import{i as D,r as ee,t as O}from"./EditorModeToggle-KkeyqUiS.js";import{t as k}from"./tag-pill-input-Bs1Otf32.js";import{t as te}from"./useLintConfigViewMode-BPPqSrQ1.js";import{r as A,t as ne}from"./schema-fields-view-intent-BXqlgMcX.js";var j=g(`brackets`,[[`path`,{d:`M16 3h3a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1h-3`,key:`1kt8lf`}],[`path`,{d:`M8 21H5a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h3`,key:`gduv9`}]]),M=g(`list-checks`,[[`path`,{d:`M13 5h8`,key:`a7qcls`}],[`path`,{d:`M13 12h8`,key:`h98zly`}],[`path`,{d:`M13 19h8`,key:`c3s6r1`}],[`path`,{d:`m3 17 2 2 4-4`,key:`1jhpwq`}],[`path`,{d:`m3 7 2 2 4-4`,key:`1obspn`}]]),N=g(`toggle-left`,[[`circle`,{cx:`9`,cy:`12`,r:`3`,key:`u3jwor`}],[`rect`,{width:`20`,height:`14`,x:`2`,y:`5`,rx:`7`,key:`g7kal2`}]]),P=a(),F=e(n(),1),I=t(),L=[`string`,`number`,`boolean`,`array`,`object`],re=[`string`,`number`,`boolean`,`enum`,`array`,`object`],ie=[`string`,`number`,`boolean`,`enum`,`object`],R={string:{Icon:v,className:`text-green-500`},number:{Icon:y,className:`text-blue-500`},boolean:{Icon:N,className:`text-orange-500`},enum:{Icon:M,className:`text-yellow-500`},array:{Icon:j,className:`text-pink-500`},object:{Icon:_,className:`text-purple-500`}};function ae(e){let t=(0,P.c)(8),{option:n}=e,{Icon:r,className:i}=R[n],a;t[0]===i?a=t[1]:(a=o(`size-3.5 shrink-0`,i),t[0]=i,t[1]=a);let s;t[2]!==r||t[3]!==a?(s=(0,I.jsx)(r,{"aria-hidden":!0,className:a}),t[2]=r,t[3]=a,t[4]=s):s=t[4];let c;return t[5]!==n||t[6]!==s?(c=(0,I.jsxs)(`span`,{className:`flex items-center gap-2`,children:[s,n]}),t[5]=n,t[6]=s,t[7]=c):c=t[7],c}function oe(e){let t=(0,P.c)(5),{option:n}=e,{Icon:r,className:i}=R[n],a;t[0]===i?a=t[1]:(a=o(`size-4 shrink-0`,i),t[0]=i,t[1]=a);let s;return t[2]!==r||t[3]!==a?(s=(0,I.jsx)(r,{"aria-hidden":!0,className:a}),t[2]=r,t[3]=a,t[4]=s):s=t[4],s}var se=4,ce=new Set([`$schema`,`type`,`properties`,`required`]),z=new Set([`type`,`enum`,`pattern`,`format`,`items`,`description`,`properties`,`required`]);function B(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function le(e){return e===void 0?[]:Array.isArray(e)&&e.every(e=>typeof e==`string`)?e:null}function ue(e){if(Object.keys(e).some(e=>!z.has(e)))return!0;let t=e.items;if(t!==void 0){if(!B(t))return!0;let e=new Set([`enum`,`type`,`properties`,`required`,`description`]);if(Object.keys(t).some(t=>!e.has(t)))return!0}return!1}function de(e,t){return[...e.map(e=>typeof e==`string`?e:`[]`),t].join(`.`)}function fe(e){let t=(0,P.c)(28),{file:n}=e,{_:a}=i(),{data:o}=S(),s,c,l,u,d,f,p;if(t[0]!==a||t[1]!==o?.effective.plugins.frontmatter.schemas||t[2]!==n){let e=o?.effective.plugins.frontmatter.schemas.find(e=>e.file===n)?.schema,i=B(e)?Object.keys(e).filter(pe):[],m;t[10]!==a||t[11]!==n?(m={save:(e,t,r)=>{(async()=>{let i=await C(n,e,t,r);i.ok?T():h.error(i.errorDetail??a({id:`IQgeSn`}))})()},rename:(e,t,r)=>{(async()=>{let i=await E(n,e,t,r);i.ok?T():h.error(i.errorDetail??a({id:`kooyLJ`}))})()},remove:(e,t)=>{(async()=>{let r=await w(n,e,t);r.ok?T():h.error(r.errorDetail??a({id:`qC7PwZ`}))})()}},t[10]=a,t[11]=n,t[12]=m):m=t[12],c=m,u=`space-y-3`,d=`frontmatter-field-editor-${n}`,f=e===void 0&&(0,I.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:(0,I.jsx)(r,{id:`ri6zS-`})}),t[13]!==n||t[14]!==i?(p=i.length>0&&(0,I.jsx)(`p`,{className:`text-xs text-muted-foreground`,"data-testid":`frontmatter-schema-root-preserved-${n}`,children:(0,I.jsx)(r,{id:`98FP1E`,values:{0:i.join(`, `)}})}),t[13]=n,t[14]=i,t[15]=p):p=t[15],s=me,l=B(e)?e:{},t[0]=a,t[1]=o?.effective.plugins.frontmatter.schemas,t[2]=n,t[3]=s,t[4]=c,t[5]=l,t[6]=u,t[7]=d,t[8]=f,t[9]=p}else s=t[3],c=t[4],l=t[5],u=t[6],d=t[7],f=t[8],p=t[9];let m;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(m=[],t[16]=m):m=t[16];let g=`frontmatter-add-field-${n}`,_;t[17]!==s||t[18]!==c||t[19]!==l||t[20]!==g?(_=(0,I.jsx)(s,{node:l,parentPath:m,depth:0,addInputId:g,ops:c}),t[17]=s,t[18]=c,t[19]=l,t[20]=g,t[21]=_):_=t[21];let v;return t[22]!==u||t[23]!==d||t[24]!==f||t[25]!==p||t[26]!==_?(v=(0,I.jsxs)(`div`,{className:u,"data-testid":d,children:[f,p,_]}),t[22]=u,t[23]=d,t[24]=f,t[25]=p,t[26]=_,t[27]=v):v=t[27],v}function pe(e){return!ce.has(e)}function me(e){let t=(0,P.c)(19),{node:n,parentPath:r,depth:i,addInputId:a,ops:o}=e,s;t[0]===n.properties?s=t[1]:(s=B(n.properties)?n.properties:{},t[0]=n.properties,t[1]=s);let c=s,l,u;if(t[2]!==i||t[3]!==n.required||t[4]!==o||t[5]!==r||t[6]!==c){let e=Array.isArray(n.required)?n.required.filter(he):[];l=`space-y-2`,u=Object.entries(c).map(t=>{let[n,a]=t;return(0,I.jsx)(V,{field:n,property:B(a)?a:{},isRequired:e.includes(n),parentPath:r,depth:i,ops:o},n)}),t[2]=i,t[3]=n.required,t[4]=o,t[5]=r,t[6]=c,t[7]=l,t[8]=u}else l=t[7],u=t[8];let d;t[9]!==o||t[10]!==r?(d=e=>o.save(e,{type:`string`},r),t[9]=o,t[10]=r,t[11]=d):d=t[11];let f;t[12]!==a||t[13]!==d?(f=(0,I.jsx)(ve,{inputId:a,onAdd:d}),t[12]=a,t[13]=d,t[14]=f):f=t[14];let p;return t[15]!==l||t[16]!==u||t[17]!==f?(p=(0,I.jsxs)(`div`,{className:l,children:[u,f]}),t[15]=l,t[16]=u,t[17]=f,t[18]=p):p=t[18],p}function he(e){return typeof e==`string`}function V(e){let t=(0,P.c)(170),{field:n,property:a,isRequired:o,parentPath:l,depth:h,ops:g}=e,{_}=i(),[v,y]=(0,F.useState)(!1),[x,S]=(0,F.useState)(!1),C;t[0]!==n||t[1]!==l?(C=de(l,n),t[0]=n,t[1]=l,t[2]=C):C=t[2];let w=C,T=typeof a.type==`string`&&L.includes(a.type)?a.type:void 0,E;t[3]===a.enum?E=t[4]:(E=le(a.enum),t[3]=a.enum,t[4]=E);let D=E,ee;t[5]===a.items?ee=t[6]:(ee=B(a.items)?a.items:{},t[5]=a.items,t[6]=ee);let O=ee,te;t[7]===O.enum?te=t[8]:(te=le(O.enum),t[7]=O.enum,t[8]=te);let A=te,ne=typeof a.pattern==`string`?a.pattern:``,j=typeof a.description==`string`?a.description:``,M;t[9]===a?M=t[10]:(M=ue(a),t[9]=a,t[10]=M);let N=M,R=T!==`array`&&T!==`object`&&D!==null&&(v||T===void 0&&D.length>0),ae=T===`object`&&h<se,ce;t[11]===O.type?ce=t[12]:(ce=typeof O.type==`string`&&ie.includes(O.type)?O.type:void 0,t[11]=O.type,t[12]=ce);let z=ce,fe=z!==`object`&&A!==null&&(x||z===void 0&&A.length>0),pe=T===`array`&&z===`object`&&h<se,he=`frontmatter-field-row-${w}`,V;t[13]!==R||t[14]!==T?(V=(R||T!==void 0)&&(0,I.jsx)(oe,{option:R?`enum`:T}),t[13]=R,t[14]=T,t[15]=V):V=t[15];let ve=`frontmatter-field-name-${w}`,H;t[16]===_?H=t[17]:(H=_({id:`nrXDdR`}),t[16]=_,t[17]=H);let U;t[18]!==n||t[19]!==g||t[20]!==l?(U=e=>{e!==``&&e!==n&&g.rename(n,e,l)},t[18]=n,t[19]=g,t[20]=l,t[21]=U):U=t[21];let W;t[22]!==n||t[23]!==H||t[24]!==U||t[25]!==ve?(W=(0,I.jsx)(ye,{id:ve,initial:n,ariaLabel:H,className:`h-7 w-36 shrink-0 font-mono text-sm font-medium`,onCommit:U}),t[22]=n,t[23]=H,t[24]=U,t[25]=ve,t[26]=W):W=t[26];let be=`frontmatter-field-description-${w}`,G;t[27]===_?G=t[28]:(G=_({id:`PGPGsL`}),t[27]=_,t[28]=G);let K;t[29]!==_||t[30]!==n?(K=_({id:`IFALcX`,values:{field:n}}),t[29]=_,t[30]=n,t[31]=K):K=t[31];let q;t[32]!==n||t[33]!==g||t[34]!==l?(q=e=>g.save(n,{description:e===``?null:e},l),t[32]=n,t[33]=g,t[34]=l,t[35]=q):q=t[35];let J;t[36]!==j||t[37]!==be||t[38]!==G||t[39]!==K||t[40]!==q?(J=(0,I.jsx)(ye,{id:be,initial:j,placeholder:G,ariaLabel:K,className:`h-7 min-w-0 flex-1`,onCommit:q}),t[36]=j,t[37]=be,t[38]=G,t[39]=K,t[40]=q,t[41]=J):J=t[41];let xe=`frontmatter-field-required-${w}`,Se;t[42]===Symbol.for(`react.memo_cache_sentinel`)?(Se=(0,I.jsx)(r,{id:`TMLAx2`}),t[42]=Se):Se=t[42];let Y;t[43]===xe?Y=t[44]:(Y=(0,I.jsx)(c,{htmlFor:xe,className:`shrink-0 text-xs text-muted-foreground`,children:Se}),t[43]=xe,t[44]=Y);let Ce=`frontmatter-field-required-${w}`,X;t[45]!==n||t[46]!==g||t[47]!==l?(X=e=>g.save(n,{required:e},l),t[45]=n,t[46]=g,t[47]=l,t[48]=X):X=t[48];let we=`frontmatter-field-required-${w}`,Z;t[49]!==o||t[50]!==Ce||t[51]!==X||t[52]!==we?(Z=(0,I.jsx)(m,{id:Ce,checked:o,onCheckedChange:X,"data-testid":we}),t[49]=o,t[50]=Ce,t[51]=X,t[52]=we,t[53]=Z):Z=t[53];let Te;t[54]!==n||t[55]!==g||t[56]!==l?(Te=()=>g.remove(n,l),t[54]=n,t[55]=g,t[56]=l,t[57]=Te):Te=t[57];let Ee;t[58]!==_||t[59]!==n?(Ee=_({id:`bF22t6`,values:{field:n}}),t[58]=_,t[59]=n,t[60]=Ee):Ee=t[60];let De=`frontmatter-field-remove-${w}`,Oe;t[61]===Symbol.for(`react.memo_cache_sentinel`)?(Oe=(0,I.jsx)(b,{"aria-hidden":!0,className:`size-4`}),t[61]=Oe):Oe=t[61];let ke;t[62]!==Te||t[63]!==Ee||t[64]!==De?(ke=(0,I.jsx)(s,{variant:`ghost`,size:`icon`,className:`size-7 shrink-0`,onClick:Te,"aria-label":Ee,"data-testid":De,children:Oe}),t[62]=Te,t[63]=Ee,t[64]=De,t[65]=ke):ke=t[65];let Ae;t[66]!==W||t[67]!==J||t[68]!==Y||t[69]!==Z||t[70]!==ke||t[71]!==V?(Ae=(0,I.jsxs)(`div`,{className:`flex items-center gap-2`,children:[V,W,J,Y,Z,ke]}),t[66]=W,t[67]=J,t[68]=Y,t[69]=Z,t[70]=ke,t[71]=V,t[72]=Ae):Ae=t[72];let je;t[73]!==w||t[74]!==N?(je=N&&(0,I.jsx)(`p`,{className:`text-xs text-muted-foreground`,"data-testid":`frontmatter-field-preserved-${w}`,children:(0,I.jsx)(r,{id:`TdlVEN`})}),t[73]=w,t[74]=N,t[75]=je):je=t[75];let Me=`frontmatter-field-type-${w}`,Ne;t[76]===Symbol.for(`react.memo_cache_sentinel`)?(Ne=(0,I.jsx)(r,{id:`-zy2Nq`}),t[76]=Ne):Ne=t[76];let Pe;t[77]===Me?Pe=t[78]:(Pe=(0,I.jsx)(c,{className:`text-xs`,htmlFor:Me,children:Ne}),t[77]=Me,t[78]=Pe);let Fe=R?`enum`:T??``,Ie;t[79]!==D?.length||t[80]!==n||t[81]!==g||t[82]!==l?(Ie=e=>{if(e===`enum`){y(!0);return}y(!1);let t=e!==`string`&&(D?.length??0)>0?{type:e,enum:null}:{type:e};g.save(n,t,l)},t[79]=D?.length,t[80]=n,t[81]=g,t[82]=l,t[83]=Ie):Ie=t[83];let Le=`frontmatter-field-type-${w}`,Re=`frontmatter-field-type-${w}`,Q;t[84]===_?Q=t[85]:(Q=_({id:`EkUnmS`}),t[84]=_,t[85]=Q);let ze;t[86]===Q?ze=t[87]:(ze=(0,I.jsx)(f,{placeholder:Q}),t[86]=Q,t[87]=ze);let Be;t[88]!==Le||t[89]!==Re||t[90]!==ze?(Be=(0,I.jsx)(d,{id:Le,"data-testid":Re,children:ze}),t[88]=Le,t[89]=Re,t[90]=ze,t[91]=Be):Be=t[91];let Ve;t[92]===Symbol.for(`react.memo_cache_sentinel`)?(Ve=(0,I.jsx)(u,{children:re.map(_e)}),t[92]=Ve):Ve=t[92];let He;t[93]!==Fe||t[94]!==Ie||t[95]!==Be?(He=(0,I.jsxs)(p,{value:Fe,onValueChange:Ie,children:[Be,Ve]}),t[93]=Fe,t[94]=Ie,t[95]=Be,t[96]=He):He=t[96];let Ue;t[97]!==Pe||t[98]!==He?(Ue=(0,I.jsxs)(`div`,{className:`space-y-1`,children:[Pe,He]}),t[97]=Pe,t[98]=He,t[99]=Ue):Ue=t[99];let We=`frontmatter-field-pattern-${w}`,Ge;t[100]===Symbol.for(`react.memo_cache_sentinel`)?(Ge=(0,I.jsx)(r,{id:`cstC0z`}),t[100]=Ge):Ge=t[100];let Ke;t[101]===We?Ke=t[102]:(Ke=(0,I.jsx)(c,{className:`text-xs`,htmlFor:We,children:Ge}),t[101]=We,t[102]=Ke);let qe=`frontmatter-field-pattern-${w}`,Je;t[103]!==n||t[104]!==g||t[105]!==l?(Je=e=>g.save(n,{pattern:e===``?null:e},l),t[103]=n,t[104]=g,t[105]=l,t[106]=Je):Je=t[106];let Ye;t[107]!==ne||t[108]!==qe||t[109]!==Je?(Ye=(0,I.jsx)(ye,{id:qe,initial:ne,onCommit:Je}),t[107]=ne,t[108]=qe,t[109]=Je,t[110]=Ye):Ye=t[110];let Xe;t[111]!==Ke||t[112]!==Ye?(Xe=(0,I.jsxs)(`div`,{className:`space-y-1`,children:[Ke,Ye]}),t[111]=Ke,t[112]=Ye,t[113]=Xe):Xe=t[113];let Ze;t[114]!==Ue||t[115]!==Xe?(Ze=(0,I.jsxs)(`div`,{className:`grid grid-cols-2 gap-2`,children:[Ue,Xe]}),t[114]=Ue,t[115]=Xe,t[116]=Ze):Ze=t[116];let Qe;t[117]!==_||t[118]!==D||t[119]!==n||t[120]!==g||t[121]!==l||t[122]!==w||t[123]!==T?(Qe=T!==`array`&&T!==`object`&&D!==null&&(0,I.jsxs)(`div`,{className:`space-y-1`,children:[(0,I.jsx)(c,{className:`text-xs`,htmlFor:`frontmatter-field-enum-${w}`,children:(0,I.jsx)(r,{id:`UGeJuP`})}),(0,I.jsx)(k,{id:`frontmatter-field-enum-${w}`,value:D,grammar:`free-text`,onChange:e=>g.save(n,{enum:e.length===0?null:e},l),placeholder:_({id:`5tcmwY`}),"aria-label":_({id:`5qQr1u`,values:{field:n}})})]}),t[117]=_,t[118]=D,t[119]=n,t[120]=g,t[121]=l,t[122]=w,t[123]=T,t[124]=Qe):Qe=t[124];let $e;t[125]!==_||t[126]!==n||t[127]!==A?.length||t[128]!==z||t[129]!==g||t[130]!==l||t[131]!==w||t[132]!==fe||t[133]!==T?($e=T===`array`&&(0,I.jsx)(`div`,{className:`grid grid-cols-2 gap-2`,children:(0,I.jsxs)(`div`,{className:`space-y-1`,children:[(0,I.jsx)(c,{className:`text-xs`,htmlFor:`frontmatter-field-items-type-${w}`,children:(0,I.jsx)(r,{id:`6pe_G5`})}),(0,I.jsxs)(p,{value:fe?`enum`:z??``,onValueChange:e=>{if(e===`enum`){S(!0);return}S(!1);let t=e!==`string`&&(A?.length??0)>0?{itemsType:e,itemsEnum:null}:{itemsType:e};g.save(n,t,l)},children:[(0,I.jsx)(d,{id:`frontmatter-field-items-type-${w}`,"data-testid":`frontmatter-field-items-type-${w}`,children:(0,I.jsx)(f,{placeholder:_({id:`EkUnmS`})})}),(0,I.jsx)(u,{children:ie.map(ge)})]})]})}),t[125]=_,t[126]=n,t[127]=A?.length,t[128]=z,t[129]=g,t[130]=l,t[131]=w,t[132]=fe,t[133]=T,t[134]=$e):$e=t[134];let et;t[135]!==_||t[136]!==n||t[137]!==A||t[138]!==z||t[139]!==g||t[140]!==l||t[141]!==w||t[142]!==T?(et=T===`array`&&z!==`object`&&A!==null&&(0,I.jsxs)(`div`,{className:`space-y-1`,children:[(0,I.jsx)(c,{className:`text-xs`,htmlFor:`frontmatter-field-items-enum-${w}`,children:(0,I.jsx)(r,{id:`ezUmoU`})}),(0,I.jsx)(k,{id:`frontmatter-field-items-enum-${w}`,value:A,grammar:`free-text`,onChange:e=>g.save(n,{itemsEnum:e.length===0?null:e},l),placeholder:_({id:`5tcmwY`}),"aria-label":_({id:`e60wew`,values:{field:n}})})]}),t[135]=_,t[136]=n,t[137]=A,t[138]=z,t[139]=g,t[140]=l,t[141]=w,t[142]=T,t[143]=et):et=t[143];let tt;t[144]!==h||t[145]!==n||t[146]!==O||t[147]!==g||t[148]!==l||t[149]!==w||t[150]!==pe?(tt=pe&&(0,I.jsxs)(`div`,{className:`ml-2 space-y-1 border-l pl-3 pt-1`,"data-testid":`frontmatter-field-item-children-${w}`,children:[(0,I.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:(0,I.jsx)(r,{id:`wU8WyK`})}),(0,I.jsx)(me,{node:O,parentPath:[...l,n,{items:!0}],depth:h+1,addInputId:`frontmatter-add-field-${w}.[]`,ops:g})]}),t[144]=h,t[145]=n,t[146]=O,t[147]=g,t[148]=l,t[149]=w,t[150]=pe,t[151]=tt):tt=t[151];let $;t[152]!==h||t[153]!==n||t[154]!==g||t[155]!==l||t[156]!==w||t[157]!==a||t[158]!==ae?($=ae&&(0,I.jsxs)(`div`,{className:`ml-2 space-y-1 border-l pl-3 pt-1`,"data-testid":`frontmatter-field-children-${w}`,children:[(0,I.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:(0,I.jsx)(r,{id:`9nIrRp`})}),(0,I.jsx)(me,{node:a,parentPath:[...l,n],depth:h+1,addInputId:`frontmatter-add-field-${w}`,ops:g})]}),t[152]=h,t[153]=n,t[154]=g,t[155]=l,t[156]=w,t[157]=a,t[158]=ae,t[159]=$):$=t[159];let nt;return t[160]!==Ae||t[161]!==je||t[162]!==Ze||t[163]!==Qe||t[164]!==$e||t[165]!==et||t[166]!==tt||t[167]!==$||t[168]!==he?(nt=(0,I.jsxs)(`div`,{className:`space-y-2 rounded-md border p-3`,"data-testid":he,children:[Ae,je,Ze,Qe,$e,et,tt,$]}),t[160]=Ae,t[161]=je,t[162]=Ze,t[163]=Qe,t[164]=$e,t[165]=et,t[166]=tt,t[167]=$,t[168]=he,t[169]=nt):nt=t[169],nt}function ge(e){return(0,I.jsx)(l,{value:e,children:(0,I.jsx)(ae,{option:e})},e)}function _e(e){return(0,I.jsx)(l,{value:e,children:(0,I.jsx)(ae,{option:e})},e)}function ve(e){let t=(0,P.c)(24),{inputId:n,onAdd:i}=e,[a,o]=(0,F.useState)(``),l;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,I.jsx)(r,{id:`Va3xJe`}),t[0]=l):l=t[0];let u;t[1]===n?u=t[2]:(u=(0,I.jsx)(c,{htmlFor:n,className:`text-xs`,children:l}),t[1]=n,t[2]=u);let d;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(d=e=>o(e.target.value),t[3]=d):d=t[3];let f=`${n}-input`,p;t[4]!==n||t[5]!==a||t[6]!==f?(p=(0,I.jsx)(x,{id:n,value:a,onChange:d,placeholder:`owner`,"data-testid":f}),t[4]=n,t[5]=a,t[6]=f,t[7]=p):p=t[7];let m;t[8]!==u||t[9]!==p?(m=(0,I.jsxs)(`div`,{className:`min-w-0 flex-1 space-y-1`,children:[u,p]}),t[8]=u,t[9]=p,t[10]=m):m=t[10];let h;t[11]===a?h=t[12]:(h=a.trim(),t[11]=a,t[12]=h);let g=h===``,_;t[13]!==a||t[14]!==i?(_=()=>{i(a.trim()),o(``)},t[13]=a,t[14]=i,t[15]=_):_=t[15];let v=`${n}-save`,y;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(y=(0,I.jsx)(r,{id:`m16xKo`}),t[16]=y):y=t[16];let b;t[17]!==v||t[18]!==g||t[19]!==_?(b=(0,I.jsx)(s,{size:`sm`,variant:`outline`,disabled:g,onClick:_,"data-testid":v,children:y}),t[17]=v,t[18]=g,t[19]=_,t[20]=b):b=t[20];let S;return t[21]!==b||t[22]!==m?(S=(0,I.jsxs)(`div`,{className:`flex items-end gap-2`,children:[m,b]}),t[21]=b,t[22]=m,t[23]=S):S=t[23],S}function ye(e){let t=(0,P.c)(15),{id:n,initial:r,onCommit:i,placeholder:a,ariaLabel:o,className:s}=e,[c,l]=(0,F.useState)(r),u;t[0]!==c||t[1]!==r||t[2]!==i?(u=()=>{c.trim()!==r&&i(c.trim())},t[0]=c,t[1]=r,t[2]=i,t[3]=u):u=t[3];let d=u,f;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(f=e=>l(e.target.value),t[4]=f):f=t[4];let p;t[5]===d?p=t[6]:(p=e=>{e.key===`Enter`&&d()},t[5]=d,t[6]=p);let m;return t[7]!==o||t[8]!==s||t[9]!==d||t[10]!==c||t[11]!==n||t[12]!==a||t[13]!==p?(m=(0,I.jsx)(x,{id:n,value:c,onChange:f,onBlur:d,onKeyDown:p,placeholder:a,"aria-label":o,className:s,"data-testid":n}),t[7]=o,t[8]=s,t[9]=d,t[10]=c,t[11]=n,t[12]=a,t[13]=p,t[14]=m):m=t[14],m}function H(e){return`/api/asset-text?path=${encodeURIComponent(e)}`}function U(e){let t=(0,P.c)(42),{assetPath:n}=e,{_:r}=i(),[a,o]=te(),[s,c]=(0,F.useState)(null),l=s??a,u;t[0]===o?u=t[1]:(u=e=>{c(e),o(e)},t[0]=o,t[1]=u);let d=u,f,p;t[2]===n?(f=t[3],p=t[4]):(f=()=>{let e=e=>{e===n&&ne(e)&&c(`rules`)};return e(n),A(e)},p=[n],t[2]=n,t[3]=f,t[4]=p),(0,F.useEffect)(f,p);let{data:m}=S(),h;t[5]===m?.effective.plugins.frontmatter.schemas?h=t[6]:(h=m?.effective.plugins.frontmatter.schemas??[],t[5]=m?.effective.plugins.frontmatter.schemas,t[6]=h);let g;if(t[7]!==n||t[8]!==h){let e;t[10]===n?e=t[11]:(e=e=>e.file===n,t[10]=n,t[11]=e),g=h.some(e),t[7]=n,t[8]=h,t[9]=g}else g=t[9];let _=g,v=!_||l===`source`,y;t[12]===n?y=t[13]:(y=n.split(`/`).pop()??n,t[12]=n,t[13]=y);let b=y,x;t[14]===b?x=t[15]:(x=b.includes(`.`)?(b.split(`.`).pop()??``).toLowerCase():``,t[14]=b,t[15]=x);let C=x,w;t[16]===n?w=t[17]:(w=(0,I.jsx)(ee,{entry:{kind:`asset`,path:n},className:`shrink-0 border-b bg-background px-3 py-1.5`}),t[16]=n,t[17]=w);let T;t[18]===d?T=t[19]:(T=e=>d(e===`source`?`source`:`rules`),t[18]=d,t[19]=T);let E=!_,k;t[20]===r?k=t[21]:(k=r({id:`vF68cg`}),t[20]=r,t[21]=k);let j;t[22]===r?j=t[23]:(j=r({id:`wdxz7K`}),t[22]=r,t[23]=j);let M;t[24]===r?M=t[25]:(M=r({id:`nc-ipN`}),t[24]=r,t[25]=M);let N;t[26]!==v||t[27]!==E||t[28]!==k||t[29]!==j||t[30]!==M||t[31]!==T?(N=(0,I.jsx)(`div`,{className:`flex shrink-0 items-center justify-center border-b bg-background py-2`,children:(0,I.jsx)(O,{isSourceMode:v,onModeChange:T,wysiwygDisabled:E,wysiwygLabel:k,sourceLabel:j,wysiwygDisabledReason:M})}),t[26]=v,t[27]=E,t[28]=k,t[29]=j,t[30]=M,t[31]=T,t[32]=N):N=t[32];let L;t[33]!==n||t[34]!==C||t[35]!==b||t[36]!==v?(L=v?(0,I.jsx)(`div`,{className:`min-h-0 flex-1 overflow-hidden`,children:(0,I.jsx)(D,{src:H(n),assetPath:n,fileName:b,extension:C},n)}):(0,I.jsx)(`div`,{className:`min-h-0 flex-1 overflow-y-auto px-4 py-4 sm:px-6`,children:(0,I.jsx)(`div`,{className:`mx-auto w-full max-w-3xl`,children:(0,I.jsx)(fe,{file:n})})}),t[33]=n,t[34]=C,t[35]=b,t[36]=v,t[37]=L):L=t[37];let re;return t[38]!==N||t[39]!==L||t[40]!==w?(re=(0,I.jsxs)(`div`,{className:`flex h-full min-h-0 flex-col bg-background`,"data-schema-config-editor":``,children:[w,N,L]}),t[38]=N,t[39]=L,t[40]=w,t[41]=re):re=t[41],re}export{U as SchemaConfigEditor};