@inkeep/open-knowledge 0.86.23-beta.2 → 0.87.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (121) hide show
  1. package/dist/cli.mjs +75 -75
  2. package/dist/constants-DKjIJ8BH.mjs +1 -0
  3. package/dist/{dist-Ds1SZERP.mjs → dist-0gI1oLbO.mjs} +493 -493
  4. package/dist/dist-_mI3Jjf-.mjs +1 -0
  5. package/dist/index.d.mts +80 -6
  6. package/dist/index.mjs +247 -247
  7. package/dist/init-CT4iXGbs.mjs +1 -0
  8. package/dist/{init-DHnTcGr6.mjs → init-DRDwcEOj.mjs} +15 -15
  9. package/dist/{launch-json-removal-ltNLhw7o.mjs → launch-json-removal-BdlZ0vPm.mjs} +1 -1
  10. package/dist/{loader-VhpdfQ6n.mjs → loader-C4IPKtMB.mjs} +1 -1
  11. package/dist/loader-DMgqHZVT.mjs +1 -0
  12. package/dist/{open-browser-BGyDP4ZD.mjs → open-browser-3bURxjbo.mjs} +1 -1
  13. package/dist/preview-BGPQ_giI.mjs +1 -0
  14. package/dist/{preview-C5-gE13d.mjs → preview-CbulwVyu.mjs} +1 -1
  15. package/dist/public/assets/{AccountSection-COZ7ABsp.js → AccountSection-DArMM190.js} +1 -1
  16. package/dist/public/assets/{ActivityModeContent-C4Q_tRxu.js → ActivityModeContent-BmmqkbZB.js} +1 -1
  17. package/dist/public/assets/{AddPropertiesButton-BODEX4GB.js → AddPropertiesButton-CvR-LNTP.js} +1 -1
  18. package/dist/public/assets/{AgentDiffPane-CvSfi3At.js → AgentDiffPane-CARKEc-n.js} +1 -1
  19. package/dist/public/assets/{AttachmentsSection-Dxf1wtrp.js → AttachmentsSection-CTDcS4G0.js} +1 -1
  20. package/dist/public/assets/{CodeMirrorPropInput-DsAqr1Kf.js → CodeMirrorPropInput-DziaSRyA.js} +1 -1
  21. package/dist/public/assets/{ContentRulesSection-CuRPQN6T.js → ContentRulesSection-BoUMLaMI.js} +1 -1
  22. package/dist/public/assets/{DocumentContext-BaQWlBuy.js → DocumentContext-Cx6cWR4i.js} +24 -24
  23. package/dist/public/assets/{EditorModeToggle-DG0NVCGU.js → EditorModeToggle-BmS5EYHk.js} +1 -1
  24. package/dist/public/assets/{ExcalidrawDocEditor-CLDxymdI.js → ExcalidrawDocEditor-BY4UQfw2.js} +1 -1
  25. package/dist/public/assets/FeedbackForm-DvRjZiGv.js +1 -0
  26. package/dist/public/assets/{ImportSkillDialog-CUoW9D0X.js → ImportSkillDialog-BlJk9fjc.js} +1 -1
  27. package/dist/public/assets/{LinkPreviewsSection-xuKQ51jY.js → LinkPreviewsSection-Cj6sCkS3.js} +1 -1
  28. package/dist/public/assets/{LintConfigEditor-DVJihwN6.js → LintConfigEditor-Y8b1VzmV.js} +1 -1
  29. package/dist/public/assets/{LintingSection-8TnDZxJX.js → LintingSection-DSdgtZap.js} +1 -1
  30. package/dist/public/assets/{ManagedArtifactProperties-BACwMVMY.js → ManagedArtifactProperties-S7GjNV3d.js} +1 -1
  31. package/dist/public/assets/ManagedArtifactProperties-q4TqoQV2.js +1 -0
  32. package/dist/public/assets/{MermaidDocEditor-DTgptcuv.js → MermaidDocEditor-PBklQH0n.js} +1 -1
  33. package/dist/public/assets/{NetworkAccessSection-eWEJlIu7.js → NetworkAccessSection-zZuupGBt.js} +1 -1
  34. package/dist/public/assets/{PropertyDisplayRow-CEFrvIxn.js → PropertyDisplayRow-C3EiK8jV.js} +1 -1
  35. package/dist/public/assets/PublishToGitHubDialog-CDIxzUHp.js +1 -0
  36. package/dist/public/assets/{SchemaConfigEditor-B3TCOAEp.js → SchemaConfigEditor-DcuHTuF-.js} +1 -1
  37. package/dist/public/assets/{SearchSection-BksELOrz.js → SearchSection-CmKxwaFI.js} +1 -1
  38. package/dist/public/assets/{SessionsHost-CN7gF-qE.js → SessionsHost-CFfbnCiC.js} +2 -2
  39. package/dist/public/assets/{SettingsDialogBody-ekNWyft9.js → SettingsDialogBody-CwlAR3oi.js} +2 -2
  40. package/dist/public/assets/{ShareReceiveMissDialog-5wTbjpkQ.js → ShareReceiveMissDialog-Dfh_u69r.js} +1 -1
  41. package/dist/public/assets/{SkillToolbarControls-Doh6o7-P.js → SkillToolbarControls-DCBGvG7b.js} +1 -1
  42. package/dist/public/assets/SourceEditor-Ct16BvoA.js +1 -0
  43. package/dist/public/assets/{SpellingSettings-C72xD-Zu.js → SpellingSettings-BFvKxALP.js} +1 -1
  44. package/dist/public/assets/{SyncSection-KppmI_8F.js → SyncSection-7RBalU2A.js} +1 -1
  45. package/dist/public/assets/{SyncStatusBadge-CpABykqw.js → SyncStatusBadge-CvIcZmIZ.js} +1 -1
  46. package/dist/public/assets/{TerminalSection-BUuFwl3W.js → TerminalSection-uEJkYj2U.js} +1 -1
  47. package/dist/public/assets/{TerminalWindowApp-Dkwz2O0G.js → TerminalWindowApp-Bis-JDdP.js} +1 -1
  48. package/dist/public/assets/{TextDocEditor-wHCAhtms.js → TextDocEditor-IMDFjQrq.js} +1 -1
  49. package/dist/public/assets/{ThemePluginSection-BHfep7sw.js → ThemePluginSection-C-CpTYq_.js} +1 -1
  50. package/dist/public/assets/{ThreadView-D5aFNNAq.js → ThreadView-Bv4nKAfi.js} +5 -5
  51. package/dist/public/assets/{TimelineDiffPane-Du7d1E9E.js → TimelineDiffPane-DMgLR5AW.js} +1 -1
  52. package/dist/public/assets/{client-version-fr9bbad4.js → client-version-2Mppplfj.js} +1 -1
  53. package/dist/public/assets/{comment-chips-D2Nfwmfq.js → comment-chips-BwBti9Bl.js} +2 -2
  54. package/dist/public/assets/{config-provider-CSBBgm3A.js → config-provider-DRxl68wD.js} +1 -1
  55. package/dist/public/assets/config-schema-C-FQk_Mm.js +1 -0
  56. package/dist/public/assets/{doc-undo-manager-BC2jdW7G.js → doc-undo-manager-C91Oo7rt.js} +1 -1
  57. package/dist/public/assets/{field-controls-DBnF9Har.js → field-controls-BpWYzCuF.js} +1 -1
  58. package/dist/public/assets/field-controls-CeiuhLz4.js +1 -0
  59. package/dist/public/assets/index-Co3uFj5v.js +2209 -0
  60. package/dist/public/assets/{lint-config-client-B249C1D2.js → lint-config-client-Dg87hhVT.js} +1 -1
  61. package/dist/public/assets/{lint-plugins-CKGeh2cO.js → lint-plugins-DVI7vQmE.js} +1 -1
  62. package/dist/public/assets/{markdown-lint-BMeMGAz_.js → markdown-lint-x790xNNy.js} +1 -1
  63. package/dist/public/assets/{markdownlint-rule-browser-Bt2f856y.js → markdownlint-rule-browser-8GiyDBq_.js} +1 -1
  64. package/dist/public/assets/{messages-BGmL7MgU.js → messages-7ot3-W0V.js} +1 -1
  65. package/dist/public/assets/{messages-DWWaq0e2.js → messages-BApsFcNp.js} +1 -1
  66. package/dist/public/assets/{messages-D0VKiuAT.js → messages-BBuXP7Ld.js} +1 -1
  67. package/dist/public/assets/{messages-DMOSEYr-.js → messages-BNJUhcVY.js} +1 -1
  68. package/dist/public/assets/{messages-BFNQsHgi.js → messages-BuskOiEV.js} +1 -1
  69. package/dist/public/assets/{messages-B3hGIlOW.js → messages-CARxKltJ.js} +1 -1
  70. package/dist/public/assets/{messages-DrETOalU.js → messages-CJU9Nxin.js} +1 -1
  71. package/dist/public/assets/{messages-DSIrnwaj.js → messages-CTMApgaB.js} +1 -1
  72. package/dist/public/assets/{messages-Czw7FUyE.js → messages-CgDzjmQd.js} +1 -1
  73. package/dist/public/assets/{messages-B8VdcD3O.js → messages-DBYYZ3YE.js} +1 -1
  74. package/dist/public/assets/{messages-CW0D4yWD.js → messages-DZ7BcTw6.js} +1 -1
  75. package/dist/public/assets/{messages-DA0gX6QO.js → messages-DZILDMH3.js} +1 -1
  76. package/dist/public/assets/{messages-C6AMkVgN.js → messages-DrbEzBII.js} +1 -1
  77. package/dist/public/assets/{pending-receive-nav-store-BWDoELkF.js → pending-receive-nav-store-D00zGtAr.js} +1 -1
  78. package/dist/public/assets/{preferred-session-events-J2z7la5R.js → preferred-session-events-HEU-5nkP.js} +1 -1
  79. package/dist/public/assets/{progress-BIK4Iaje.js → progress-BtyrAYUy.js} +1 -1
  80. package/dist/public/assets/restart-collab-server-D_8KLQoA.js +1 -0
  81. package/dist/public/assets/{saved-themes-client-DFijgxrT.js → saved-themes-client-CiHeGH6d.js} +1 -1
  82. package/dist/public/assets/{schema-section-BHt16UFk.js → schema-section-CzcjDNJt.js} +1 -1
  83. package/dist/public/assets/{selection-context-bQYya6ju.js → selection-context-HzQ8FtwX.js} +1 -1
  84. package/dist/public/assets/{src-BxB2ktSX.js → src-23Nu47Ud.js} +1 -1
  85. package/dist/public/assets/{telemetry-impl-BFvQQClb.js → telemetry-impl-DXS2NSHU.js} +1 -1
  86. package/dist/public/assets/{telemetry-startup-BoCB-eeh.js → telemetry-startup-D9zsSdNI.js} +1 -1
  87. package/dist/public/assets/{typing-burst-detector-DNs7iclM.js → typing-burst-detector-DHfcudgi.js} +3 -3
  88. package/dist/public/assets/{uninstall-Is26Mh1k.js → uninstall-Dpuk0rjl.js} +1 -1
  89. package/dist/public/assets/{use-activity-panel-CN7-zVEU.js → use-activity-panel-Bihi6LUs.js} +1 -1
  90. package/dist/public/assets/{use-apply-config-language-DhdpbJI9.js → use-apply-config-language-B6Gq14bn.js} +2 -2
  91. package/dist/public/assets/{use-open-skill-DGAyrfaE.js → use-open-skill-B3yZzcRf.js} +1 -1
  92. package/dist/public/assets/{use-terminal-enabled-B4Gi5Zjc.js → use-terminal-enabled-KnMOlCdw.js} +1 -1
  93. package/dist/public/assets/{use-timeline-entry-diff-DNcMdk_l.js → use-timeline-entry-diff-CahLIRQA.js} +3 -3
  94. package/dist/public/index.html +25 -25
  95. package/dist/public/uninstall.html +3 -3
  96. package/dist/{registry-probes-BZCOA4wX.mjs → registry-probes-5d1sNdrt.mjs} +9 -9
  97. package/dist/{removal-file-path-rblntP7O.mjs → removal-file-path-Ce-SU21T.mjs} +1 -1
  98. package/dist/{repair-launch-json-CZz-cgXP.mjs → repair-launch-json-loOJnWcB.mjs} +1 -1
  99. package/dist/{repair-mcp-configs-Tqi9Wv8S.mjs → repair-mcp-configs-F5gZqTRO.mjs} +1 -1
  100. package/dist/src-CogLbAhI.mjs +16 -0
  101. package/dist/src-XoibUPmJ.mjs +1 -0
  102. package/dist/start-Bqp-AUZl.mjs +5 -0
  103. package/dist/start-TeIncOoZ.mjs +1 -0
  104. package/package.json +4 -4
  105. package/dist/constants-CDeJ7jDX.mjs +0 -1
  106. package/dist/dist-nfglEvqM.mjs +0 -1
  107. package/dist/init-C5mmikSI.mjs +0 -1
  108. package/dist/loader-BCjTwIJ9.mjs +0 -1
  109. package/dist/preview-CFegFYRY.mjs +0 -1
  110. package/dist/public/assets/FeedbackForm-D6Kdqz4C.js +0 -1
  111. package/dist/public/assets/ManagedArtifactProperties-ChW7ImCD.js +0 -1
  112. package/dist/public/assets/PublishToGitHubDialog-vmoOQpEO.js +0 -1
  113. package/dist/public/assets/SourceEditor-Cp5eu3Iw.js +0 -1
  114. package/dist/public/assets/config-schema-zP71feeS.js +0 -1
  115. package/dist/public/assets/field-controls-B49FSs4r.js +0 -1
  116. package/dist/public/assets/index-CTW1mBkJ.js +0 -2209
  117. package/dist/public/assets/restart-collab-server-DKIjp3iW.js +0 -1
  118. package/dist/src-CHO6mu7Q.mjs +0 -1
  119. package/dist/src-CHRW9Vi4.mjs +0 -16
  120. package/dist/start-C1m1oj3B.mjs +0 -1
  121. package/dist/start-CBmvntob.mjs +0 -5
@@ -1 +1 @@
1
- import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./react-f2sANaYj.js";import{t as n}from"./compiler-runtime-BfE3aGVn.js";import{a as r,i,n as a}from"./markdown-lint-BMeMGAz_.js";var o=n(),s=e(t(),1),c=`open-knowledge:lint-config-changed`;function l(){window.dispatchEvent(new CustomEvent(c))}function u(e){let t=()=>e();return window.addEventListener(c,t),()=>window.removeEventListener(c,t)}async function d(e){try{let t=e===void 0?``:`?doc=${encodeURIComponent(e)}`,n=await fetch(`/api/lint/config${t}`);if(!n.ok)return null;let r=await n.json().catch(()=>null),a=i.safeParse(r);return a.success?a.data:(console.warn(`[lint] lint-config response failed schema validation`,a.error.issues),null)}catch{return null}}async function f(e){return(await d(e))?.effective??null}var p=3e4;async function m(e){let t=new AbortController,n=setTimeout(()=>t.abort(),p);try{let n=await fetch(`/api/lint/fix`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({docName:e}),signal:t.signal});if(!n.ok){let e=await n.json().catch(()=>null);return{ok:!1,errorDetail:typeof e?.title==`string`?e.title:null,status:n.status,problemType:typeof e?.type==`string`?e.type:null}}let i=await n.json().catch(()=>null),a=r.safeParse(i);return a.success?{ok:!0,result:a.data}:(console.warn(`[lint] fix response failed schema validation`,a.error.issues),{ok:!1,errorDetail:null,status:n.status,problemType:null})}catch(t){return console.warn(`[lint] fix request failed`,e,t instanceof Error?t.message:t),{ok:!1,errorDetail:null,status:null,problemType:null}}finally{clearTimeout(n)}}async function h(e,t){try{let n=await fetch(`/api/lint/markdownlint-config`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({ruleId:e,value:t})});if(!n.ok){let e=await n.json().catch(()=>null);return{ok:!1,errorDetail:typeof e?.title==`string`?e.title:null}}let r=await n.json().catch(()=>null),a=i.safeParse(r);return a.success?{ok:!0,response:a.data}:{ok:!1,errorDetail:null}}catch{return{ok:!1,errorDetail:null}}}async function g(e){try{let t=await fetch(`/api/lint/frontmatter-schema`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify(e)});if(!t.ok){let e=await t.json().catch(()=>null);return{ok:!1,errorDetail:typeof e?.title==`string`?e.title:null}}let n=i.safeParse(await t.json().catch(()=>null));return n.success?{ok:!0,response:n.data}:{ok:!1,errorDetail:null}}catch{return{ok:!1,errorDetail:null}}}function _(e){return e.length>0?e:void 0}async function v(e,t,n,r=[]){return g({file:e,field:t,constraint:n,parentPath:_(r)})}async function y(){try{let e=await fetch(`/api/lint/frontmatter-schemas`);if(!e.ok)return[];let t=await e.json().catch(()=>null),n=a.safeParse(t);return n.success?n.data.schemas:(console.warn(`[lint] frontmatter-schemas response failed schema validation`,n.error.issues),[])}catch{return[]}}async function b(e){let t=await g({file:e});return t.ok&&l(),t}async function x(e,t,n=[]){return g({file:e,field:t,removeField:!0,parentPath:_(n)})}async function S(e,t,n,r=[]){return g({file:e,field:t,renameTo:n,parentPath:_(r)})}async function C(e){let t=await g({file:e,delete:!0});return t.ok&&l(),t}function w(){let e=(0,o.c)(6),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=[],e[0]=t):t=e[0];let[n,r]=(0,s.useState)(t),i;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(i=()=>{y().then(r)},e[1]=i):i=e[1];let a=i,c,l;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(c=()=>{let e=!1,t=()=>{y().then(t=>{e||r(t)})};t();let n=u(t);return()=>{e=!0,n()}},l=[],e[2]=c,e[3]=l):(c=e[2],l=e[3]),(0,s.useEffect)(c,l);let d;return e[4]===n?d=e[5]:(d={schemas:n,refresh:a},e[4]=n,e[5]=d),d}function T(e){let t=(0,o.c)(5),[n,r]=(0,s.useState)(null),i,a;t[0]===e?(i=t[1],a=t[2]):(i=()=>{if(!e){r(null);return}let t=!1,n=()=>{d(e).then(e=>{t||r(e)})};n();let i=u(n);return()=>{t=!0,i()}},a=[e],t[0]=e,t[1]=i,t[2]=a),(0,s.useEffect)(i,a);let c;return t[3]===n?c=t[4]:(c={data:n},t[3]=n,t[4]=c),c}function E(){let e=(0,o.c)(4),[t,n]=(0,s.useState)(null),r,i;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=()=>{let e=!1,t=()=>{d().then(t=>{e||n(t)})};t();let r=u(t);return()=>{e=!0,r()}},i=[],e[0]=r,e[1]=i):(r=e[0],i=e[1]),(0,s.useEffect)(r,i);let a;return e[2]===t?a=e[3]:(a={data:t},e[2]=t,e[3]=a),a}export{m as a,u as c,E as d,v as f,f as i,T as l,C as n,x as o,h as p,l as r,S as s,b as t,w as u};
1
+ import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./react-f2sANaYj.js";import{t as n}from"./compiler-runtime-BfE3aGVn.js";import{a as r,i,n as a}from"./markdown-lint-x790xNNy.js";var o=n(),s=e(t(),1),c=`open-knowledge:lint-config-changed`;function l(){window.dispatchEvent(new CustomEvent(c))}function u(e){let t=()=>e();return window.addEventListener(c,t),()=>window.removeEventListener(c,t)}async function d(e){try{let t=e===void 0?``:`?doc=${encodeURIComponent(e)}`,n=await fetch(`/api/lint/config${t}`);if(!n.ok)return null;let r=await n.json().catch(()=>null),a=i.safeParse(r);return a.success?a.data:(console.warn(`[lint] lint-config response failed schema validation`,a.error.issues),null)}catch{return null}}async function f(e){return(await d(e))?.effective??null}var p=3e4;async function m(e){let t=new AbortController,n=setTimeout(()=>t.abort(),p);try{let n=await fetch(`/api/lint/fix`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({docName:e}),signal:t.signal});if(!n.ok){let e=await n.json().catch(()=>null);return{ok:!1,errorDetail:typeof e?.title==`string`?e.title:null,status:n.status,problemType:typeof e?.type==`string`?e.type:null}}let i=await n.json().catch(()=>null),a=r.safeParse(i);return a.success?{ok:!0,result:a.data}:(console.warn(`[lint] fix response failed schema validation`,a.error.issues),{ok:!1,errorDetail:null,status:n.status,problemType:null})}catch(t){return console.warn(`[lint] fix request failed`,e,t instanceof Error?t.message:t),{ok:!1,errorDetail:null,status:null,problemType:null}}finally{clearTimeout(n)}}async function h(e,t){try{let n=await fetch(`/api/lint/markdownlint-config`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({ruleId:e,value:t})});if(!n.ok){let e=await n.json().catch(()=>null);return{ok:!1,errorDetail:typeof e?.title==`string`?e.title:null}}let r=await n.json().catch(()=>null),a=i.safeParse(r);return a.success?{ok:!0,response:a.data}:{ok:!1,errorDetail:null}}catch{return{ok:!1,errorDetail:null}}}async function g(e){try{let t=await fetch(`/api/lint/frontmatter-schema`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify(e)});if(!t.ok){let e=await t.json().catch(()=>null);return{ok:!1,errorDetail:typeof e?.title==`string`?e.title:null}}let n=i.safeParse(await t.json().catch(()=>null));return n.success?{ok:!0,response:n.data}:{ok:!1,errorDetail:null}}catch{return{ok:!1,errorDetail:null}}}function _(e){return e.length>0?e:void 0}async function v(e,t,n,r=[]){return g({file:e,field:t,constraint:n,parentPath:_(r)})}async function y(){try{let e=await fetch(`/api/lint/frontmatter-schemas`);if(!e.ok)return[];let t=await e.json().catch(()=>null),n=a.safeParse(t);return n.success?n.data.schemas:(console.warn(`[lint] frontmatter-schemas response failed schema validation`,n.error.issues),[])}catch{return[]}}async function b(e){let t=await g({file:e});return t.ok&&l(),t}async function x(e,t,n=[]){return g({file:e,field:t,removeField:!0,parentPath:_(n)})}async function S(e,t,n,r=[]){return g({file:e,field:t,renameTo:n,parentPath:_(r)})}async function C(e){let t=await g({file:e,delete:!0});return t.ok&&l(),t}function w(){let e=(0,o.c)(6),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=[],e[0]=t):t=e[0];let[n,r]=(0,s.useState)(t),i;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(i=()=>{y().then(r)},e[1]=i):i=e[1];let a=i,c,l;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(c=()=>{let e=!1,t=()=>{y().then(t=>{e||r(t)})};t();let n=u(t);return()=>{e=!0,n()}},l=[],e[2]=c,e[3]=l):(c=e[2],l=e[3]),(0,s.useEffect)(c,l);let d;return e[4]===n?d=e[5]:(d={schemas:n,refresh:a},e[4]=n,e[5]=d),d}function T(e){let t=(0,o.c)(5),[n,r]=(0,s.useState)(null),i,a;t[0]===e?(i=t[1],a=t[2]):(i=()=>{if(!e){r(null);return}let t=!1,n=()=>{d(e).then(e=>{t||r(e)})};n();let i=u(n);return()=>{t=!0,i()}},a=[e],t[0]=e,t[1]=i,t[2]=a),(0,s.useEffect)(i,a);let c;return t[3]===n?c=t[4]:(c={data:n},t[3]=n,t[4]=c),c}function E(){let e=(0,o.c)(4),[t,n]=(0,s.useState)(null),r,i;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=()=>{let e=!1,t=()=>{d().then(t=>{e||n(t)})};t();let r=u(t);return()=>{e=!0,r()}},i=[],e[0]=r,e[1]=i):(r=e[0],i=e[1]),(0,s.useEffect)(r,i);let a;return e[2]===t?a=e[3]:(a={data:t},e[2]=t,e[3]=a),a}export{m as a,u as c,E as d,v as f,f as i,T as l,C as n,x as o,h as p,l as r,S as s,b as t,w as u};
@@ -1 +1 @@
1
- import{t as e}from"./lint-plugin-meta-CtDE2R0v.js";import{FrontmatterPluginSection as t,MarkdownlintPluginSection as n,OkfPluginSection as r}from"./LintingSection-8TnDZxJX.js";var i={markdownlint:n,frontmatter:t,okf:r},a=e.map(e=>({...e,Section:i[e.id]}));export{a as LINT_PLUGIN_UI};
1
+ import{t as e}from"./lint-plugin-meta-CtDE2R0v.js";import{FrontmatterPluginSection as t,MarkdownlintPluginSection as n,OkfPluginSection as r}from"./LintingSection-DSdgtZap.js";var i={markdownlint:n,frontmatter:t,okf:r},a=e.map(e=>({...e,Section:i[e.id]}));export{a as LINT_PLUGIN_UI};
@@ -1,5 +1,5 @@
1
1
  const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./markdownit-BNu6K0Lc.js","./chunk-CYidjpOJ.js"])))=>i.map(i=>d[i]);
2
- import{a as e,i as t,n,o as r,r as i,t as a}from"./chunk-CYidjpOJ.js";import{t as o}from"./preload-helper-Chd9yIcd.js";import{a as s,b as c,f as l,g as u,i as d,p as f,r as p,t as m,u as h,v as g,y as _}from"./schemas-B93JY9Ef.js";import{d as v,s as y,u as b}from"./_envelope-q8XHEv4O-C-Qnl5Tu.js";import{Ht as x,Mt as S,Vt as C,gt as w,jt as T,kt as E,vt as D,yt as O}from"./schemas-api-CL5ZXlEj.js";import{t as k}from"./doc-extensions-CcO7K8uD-DG9uHV54.js";import{C as A,S as ee}from"./saved-themes-client-DFijgxrT.js";import{A as j,E as M,M as N,O as P,R as F,a as I,c as L,d as R,f as z,i as B,j as V,k as H,l as U,n as W,o as G,p as K,r as te,s as ne,t as q,u as re,v as J}from"./lib-CHTgVmKZ.js";import{n as ie,t as ae}from"./syntax-YjkwC8Y2.js";import{n as oe,t as se}from"./markdownit-BNu6K0Lc.js";var ce=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.regexpCode=e.getEsmExportName=e.getProperty=e.safeStringify=e.stringify=e.strConcat=e.addCodeArg=e.str=e._=e.nil=e._Code=e.Name=e.IDENTIFIER=e._CodeOrName=void 0;var t=class{};e._CodeOrName=t,e.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var n=class extends t{constructor(t){if(super(),!e.IDENTIFIER.test(t))throw Error(`CodeGen: name must be a valid identifier`);this.str=t}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};e.Name=n;var r=class extends t{constructor(e){super(),this._items=typeof e==`string`?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let e=this._items[0];return e===``||e===`""`}get str(){return this._str??=this._items.reduce((e,t)=>`${e}${t}`,``)}get names(){return this._names??=this._items.reduce((e,t)=>(t instanceof n&&(e[t.str]=(e[t.str]||0)+1),e),{})}};e._Code=r,e.nil=new r(``);function i(e,...t){let n=[e[0]],i=0;for(;i<t.length;)s(n,t[i]),n.push(e[++i]);return new r(n)}e._=i;var a=new r(`+`);function o(e,...t){let n=[p(e[0])],i=0;for(;i<t.length;)n.push(a),s(n,t[i]),n.push(a,p(e[++i]));return c(n),new r(n)}e.str=o;function s(e,t){t instanceof r?e.push(...t._items):t instanceof n?e.push(t):e.push(d(t))}e.addCodeArg=s;function c(e){let t=1;for(;t<e.length-1;){if(e[t]===a){let n=l(e[t-1],e[t+1]);if(n!==void 0){e.splice(t-1,3,n);continue}e[t++]=`+`}t++}}function l(e,t){if(t===`""`)return e;if(e===`""`)return t;if(typeof e==`string`)return t instanceof n||e[e.length-1]!==`"`?void 0:typeof t==`string`?t[0]===`"`?e.slice(0,-1)+t.slice(1):void 0:`${e.slice(0,-1)}${t}"`;if(typeof t==`string`&&t[0]===`"`&&!(e instanceof n))return`"${e}${t.slice(1)}`}function u(e,t){return t.emptyStr()?e:e.emptyStr()?t:o`${e}${t}`}e.strConcat=u;function d(e){return typeof e==`number`||typeof e==`boolean`||e===null?e:p(Array.isArray(e)?e.join(`,`):e)}function f(e){return new r(p(e))}e.stringify=f;function p(e){return JSON.stringify(e).replace(/\u2028/g,`\\u2028`).replace(/\u2029/g,`\\u2029`)}e.safeStringify=p;function m(t){return typeof t==`string`&&e.IDENTIFIER.test(t)?new r(`.${t}`):i`[${t}]`}e.getProperty=m;function h(t){if(typeof t==`string`&&e.IDENTIFIER.test(t))return new r(`${t}`);throw Error(`CodeGen: invalid export name: ${t}, use explicit $id name mapping`)}e.getEsmExportName=h;function g(e){return new r(e.toString())}e.regexpCode=g})),le=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;var t=ce(),n=class extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}},r;(function(e){e[e.Started=0]=`Started`,e[e.Completed=1]=`Completed`})(r||(e.UsedValueState=r={})),e.varKinds={const:new t.Name(`const`),let:new t.Name(`let`),var:new t.Name(`var`)};var i=class{constructor({prefixes:e,parent:t}={}){this._names={},this._prefixes=e,this._parent=t}toName(e){return e instanceof t.Name?e:this.name(e)}name(e){return new t.Name(this._newName(e))}_newName(e){let t=this._names[e]||this._nameGroup(e);return`${e}${t.index++}`}_nameGroup(e){if((this._parent?._prefixes)?.has(e)||this._prefixes&&!this._prefixes.has(e))throw Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}};e.Scope=i;var a=class extends t.Name{constructor(e,t){super(t),this.prefix=e}setValue(e,{property:n,itemIndex:r}){this.value=e,this.scopePath=(0,t._)`.${new t.Name(n)}[${r}]`}};e.ValueScopeName=a;var o=(0,t._)`\n`;e.ValueScope=class extends i{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?o:t.nil}}get(){return this._scope}name(e){return new a(e,this._newName(e))}value(e,t){if(t.ref===void 0)throw Error(`CodeGen: ref must be passed in value`);let n=this.toName(e),{prefix:r}=n,i=t.key??t.ref,a=this._values[r];if(a){let e=a.get(i);if(e)return e}else a=this._values[r]=new Map;a.set(i,n);let o=this._scope[r]||(this._scope[r]=[]),s=o.length;return o[s]=t.ref,n.setValue(t,{property:r,itemIndex:s}),n}getValue(e,t){let n=this._values[e];if(n)return n.get(t)}scopeRefs(e,n=this._values){return this._reduceValues(n,n=>{if(n.scopePath===void 0)throw Error(`CodeGen: name "${n}" has no value`);return(0,t._)`${e}${n.scopePath}`})}scopeCode(e=this._values,t,n){return this._reduceValues(e,e=>{if(e.value===void 0)throw Error(`CodeGen: name "${e}" has no value`);return e.value.code},t,n)}_reduceValues(i,a,o={},s){let c=t.nil;for(let l in i){let u=i[l];if(!u)continue;let d=o[l]=o[l]||new Map;u.forEach(i=>{if(d.has(i))return;d.set(i,r.Started);let o=a(i);if(o){let n=this.opts.es5?e.varKinds.var:e.varKinds.const;c=(0,t._)`${c}${n} ${i} = ${o};${this.opts._n}`}else if(o=s?.(i))c=(0,t._)`${c}${o}${this.opts._n}`;else throw new n(i);d.set(i,r.Completed)})}return c}}})),Y=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.or=e.and=e.not=e.CodeGen=e.operators=e.varKinds=e.ValueScopeName=e.ValueScope=e.Scope=e.Name=e.regexpCode=e.stringify=e.getProperty=e.nil=e.strConcat=e.str=e._=void 0;var t=ce(),n=le(),r=ce();Object.defineProperty(e,`_`,{enumerable:!0,get:function(){return r._}}),Object.defineProperty(e,`str`,{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(e,`strConcat`,{enumerable:!0,get:function(){return r.strConcat}}),Object.defineProperty(e,`nil`,{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(e,`getProperty`,{enumerable:!0,get:function(){return r.getProperty}}),Object.defineProperty(e,`stringify`,{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(e,`regexpCode`,{enumerable:!0,get:function(){return r.regexpCode}}),Object.defineProperty(e,`Name`,{enumerable:!0,get:function(){return r.Name}});var i=le();Object.defineProperty(e,`Scope`,{enumerable:!0,get:function(){return i.Scope}}),Object.defineProperty(e,`ValueScope`,{enumerable:!0,get:function(){return i.ValueScope}}),Object.defineProperty(e,`ValueScopeName`,{enumerable:!0,get:function(){return i.ValueScopeName}}),Object.defineProperty(e,`varKinds`,{enumerable:!0,get:function(){return i.varKinds}}),e.operators={GT:new t._Code(`>`),GTE:new t._Code(`>=`),LT:new t._Code(`<`),LTE:new t._Code(`<=`),EQ:new t._Code(`===`),NEQ:new t._Code(`!==`),NOT:new t._Code(`!`),OR:new t._Code(`||`),AND:new t._Code(`&&`),ADD:new t._Code(`+`)};var a=class{optimizeNodes(){return this}optimizeNames(e,t){return this}},o=class extends a{constructor(e,t,n){super(),this.varKind=e,this.name=t,this.rhs=n}render({es5:e,_n:t}){let r=e?n.varKinds.var:this.varKind,i=this.rhs===void 0?``:` = ${this.rhs}`;return`${r} ${this.name}${i};`+t}optimizeNames(e,t){if(e[this.name.str])return this.rhs&&=k(this.rhs,e,t),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}},s=class extends a{constructor(e,t,n){super(),this.lhs=e,this.rhs=t,this.sideEffects=n}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,n){if(!(this.lhs instanceof t.Name&&!e[this.lhs.str]&&!this.sideEffects))return this.rhs=k(this.rhs,e,n),this}get names(){return O(this.lhs instanceof t.Name?{}:{...this.lhs.names},this.rhs)}},c=class extends s{constructor(e,t,n,r){super(e,n,r),this.op=t}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}},l=class extends a{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}},u=class extends a{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:``};`+e}},d=class extends a{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}},f=class extends a{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,t){return this.code=k(this.code,e,t),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}},p=class extends a{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce((t,n)=>t+n.render(e),``)}optimizeNodes(){let{nodes:e}=this,t=e.length;for(;t--;){let n=e[t].optimizeNodes();Array.isArray(n)?e.splice(t,1,...n):n?e[t]=n:e.splice(t,1)}return e.length>0?this:void 0}optimizeNames(e,t){let{nodes:n}=this,r=n.length;for(;r--;){let i=n[r];i.optimizeNames(e,t)||(A(e,i.names),n.splice(r,1))}return n.length>0?this:void 0}get names(){return this.nodes.reduce((e,t)=>D(e,t.names),{})}},m=class extends p{render(e){return`{`+e._n+super.render(e)+`}`+e._n}},h=class extends p{},g=class extends m{};g.kind=`else`;var _=class e extends m{constructor(e,t){super(t),this.condition=e}render(e){let t=`if(${this.condition})`+super.render(e);return this.else&&(t+=`else `+this.else.render(e)),t}optimizeNodes(){super.optimizeNodes();let t=this.condition;if(t===!0)return this.nodes;let n=this.else;if(n){let e=n.optimizeNodes();n=this.else=Array.isArray(e)?new g(e):e}if(n)return t===!1?n instanceof e?n:n.nodes:this.nodes.length?this:new e(ee(t),n instanceof e?[n]:n.nodes);if(!(t===!1||!this.nodes.length))return this}optimizeNames(e,t){if(this.else=this.else?.optimizeNames(e,t),super.optimizeNames(e,t)||this.else)return this.condition=k(this.condition,e,t),this}get names(){let e=super.names;return O(e,this.condition),this.else&&D(e,this.else.names),e}};_.kind=`if`;var v=class extends m{};v.kind=`for`;var y=class extends v{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iteration=k(this.iteration,e,t),this}get names(){return D(super.names,this.iteration.names)}},b=class extends v{constructor(e,t,n,r){super(),this.varKind=e,this.name=t,this.from=n,this.to=r}render(e){let t=e.es5?n.varKinds.var:this.varKind,{name:r,from:i,to:a}=this;return`for(${t} ${r}=${i}; ${r}<${a}; ${r}++)`+super.render(e)}get names(){return O(O(super.names,this.from),this.to)}},x=class extends v{constructor(e,t,n,r){super(),this.loop=e,this.varKind=t,this.name=n,this.iterable=r}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iterable=k(this.iterable,e,t),this}get names(){return D(super.names,this.iterable.names)}},S=class extends m{constructor(e,t,n){super(),this.name=e,this.args=t,this.async=n}render(e){return`${this.async?`async `:``}function ${this.name}(${this.args})`+super.render(e)}};S.kind=`func`;var C=class extends p{render(e){return`return `+super.render(e)}};C.kind=`return`;var w=class extends m{render(e){let t=`try`+super.render(e);return this.catch&&(t+=this.catch.render(e)),this.finally&&(t+=this.finally.render(e)),t}optimizeNodes(){var e,t;return super.optimizeNodes(),(e=this.catch)==null||e.optimizeNodes(),(t=this.finally)==null||t.optimizeNodes(),this}optimizeNames(e,t){var n,r;return super.optimizeNames(e,t),(n=this.catch)==null||n.optimizeNames(e,t),(r=this.finally)==null||r.optimizeNames(e,t),this}get names(){let e=super.names;return this.catch&&D(e,this.catch.names),this.finally&&D(e,this.finally.names),e}},T=class extends m{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}};T.kind=`catch`;var E=class extends m{render(e){return`finally`+super.render(e)}};E.kind=`finally`,e.CodeGen=class{constructor(e,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...t,_n:t.lines?`
2
+ import{a as e,i as t,n,o as r,r as i,t as a}from"./chunk-CYidjpOJ.js";import{t as o}from"./preload-helper-Chd9yIcd.js";import{a as s,b as c,f as l,g as u,i as d,p as f,r as p,t as m,u as h,v as g,y as _}from"./schemas-B93JY9Ef.js";import{d as v,s as y,u as b}from"./_envelope-q8XHEv4O-C-Qnl5Tu.js";import{Ht as x,Mt as S,Vt as C,gt as w,jt as T,kt as E,vt as D,yt as O}from"./schemas-api-CL5ZXlEj.js";import{t as k}from"./doc-extensions-CcO7K8uD-DG9uHV54.js";import{C as A,S as ee}from"./saved-themes-client-CiHeGH6d.js";import{A as j,E as M,M as N,O as P,R as F,a as I,c as L,d as R,f as z,i as B,j as V,k as H,l as U,n as W,o as G,p as K,r as te,s as ne,t as q,u as re,v as J}from"./lib-CHTgVmKZ.js";import{n as ie,t as ae}from"./syntax-YjkwC8Y2.js";import{n as oe,t as se}from"./markdownit-BNu6K0Lc.js";var ce=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.regexpCode=e.getEsmExportName=e.getProperty=e.safeStringify=e.stringify=e.strConcat=e.addCodeArg=e.str=e._=e.nil=e._Code=e.Name=e.IDENTIFIER=e._CodeOrName=void 0;var t=class{};e._CodeOrName=t,e.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var n=class extends t{constructor(t){if(super(),!e.IDENTIFIER.test(t))throw Error(`CodeGen: name must be a valid identifier`);this.str=t}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};e.Name=n;var r=class extends t{constructor(e){super(),this._items=typeof e==`string`?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let e=this._items[0];return e===``||e===`""`}get str(){return this._str??=this._items.reduce((e,t)=>`${e}${t}`,``)}get names(){return this._names??=this._items.reduce((e,t)=>(t instanceof n&&(e[t.str]=(e[t.str]||0)+1),e),{})}};e._Code=r,e.nil=new r(``);function i(e,...t){let n=[e[0]],i=0;for(;i<t.length;)s(n,t[i]),n.push(e[++i]);return new r(n)}e._=i;var a=new r(`+`);function o(e,...t){let n=[p(e[0])],i=0;for(;i<t.length;)n.push(a),s(n,t[i]),n.push(a,p(e[++i]));return c(n),new r(n)}e.str=o;function s(e,t){t instanceof r?e.push(...t._items):t instanceof n?e.push(t):e.push(d(t))}e.addCodeArg=s;function c(e){let t=1;for(;t<e.length-1;){if(e[t]===a){let n=l(e[t-1],e[t+1]);if(n!==void 0){e.splice(t-1,3,n);continue}e[t++]=`+`}t++}}function l(e,t){if(t===`""`)return e;if(e===`""`)return t;if(typeof e==`string`)return t instanceof n||e[e.length-1]!==`"`?void 0:typeof t==`string`?t[0]===`"`?e.slice(0,-1)+t.slice(1):void 0:`${e.slice(0,-1)}${t}"`;if(typeof t==`string`&&t[0]===`"`&&!(e instanceof n))return`"${e}${t.slice(1)}`}function u(e,t){return t.emptyStr()?e:e.emptyStr()?t:o`${e}${t}`}e.strConcat=u;function d(e){return typeof e==`number`||typeof e==`boolean`||e===null?e:p(Array.isArray(e)?e.join(`,`):e)}function f(e){return new r(p(e))}e.stringify=f;function p(e){return JSON.stringify(e).replace(/\u2028/g,`\\u2028`).replace(/\u2029/g,`\\u2029`)}e.safeStringify=p;function m(t){return typeof t==`string`&&e.IDENTIFIER.test(t)?new r(`.${t}`):i`[${t}]`}e.getProperty=m;function h(t){if(typeof t==`string`&&e.IDENTIFIER.test(t))return new r(`${t}`);throw Error(`CodeGen: invalid export name: ${t}, use explicit $id name mapping`)}e.getEsmExportName=h;function g(e){return new r(e.toString())}e.regexpCode=g})),le=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;var t=ce(),n=class extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}},r;(function(e){e[e.Started=0]=`Started`,e[e.Completed=1]=`Completed`})(r||(e.UsedValueState=r={})),e.varKinds={const:new t.Name(`const`),let:new t.Name(`let`),var:new t.Name(`var`)};var i=class{constructor({prefixes:e,parent:t}={}){this._names={},this._prefixes=e,this._parent=t}toName(e){return e instanceof t.Name?e:this.name(e)}name(e){return new t.Name(this._newName(e))}_newName(e){let t=this._names[e]||this._nameGroup(e);return`${e}${t.index++}`}_nameGroup(e){if((this._parent?._prefixes)?.has(e)||this._prefixes&&!this._prefixes.has(e))throw Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}};e.Scope=i;var a=class extends t.Name{constructor(e,t){super(t),this.prefix=e}setValue(e,{property:n,itemIndex:r}){this.value=e,this.scopePath=(0,t._)`.${new t.Name(n)}[${r}]`}};e.ValueScopeName=a;var o=(0,t._)`\n`;e.ValueScope=class extends i{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?o:t.nil}}get(){return this._scope}name(e){return new a(e,this._newName(e))}value(e,t){if(t.ref===void 0)throw Error(`CodeGen: ref must be passed in value`);let n=this.toName(e),{prefix:r}=n,i=t.key??t.ref,a=this._values[r];if(a){let e=a.get(i);if(e)return e}else a=this._values[r]=new Map;a.set(i,n);let o=this._scope[r]||(this._scope[r]=[]),s=o.length;return o[s]=t.ref,n.setValue(t,{property:r,itemIndex:s}),n}getValue(e,t){let n=this._values[e];if(n)return n.get(t)}scopeRefs(e,n=this._values){return this._reduceValues(n,n=>{if(n.scopePath===void 0)throw Error(`CodeGen: name "${n}" has no value`);return(0,t._)`${e}${n.scopePath}`})}scopeCode(e=this._values,t,n){return this._reduceValues(e,e=>{if(e.value===void 0)throw Error(`CodeGen: name "${e}" has no value`);return e.value.code},t,n)}_reduceValues(i,a,o={},s){let c=t.nil;for(let l in i){let u=i[l];if(!u)continue;let d=o[l]=o[l]||new Map;u.forEach(i=>{if(d.has(i))return;d.set(i,r.Started);let o=a(i);if(o){let n=this.opts.es5?e.varKinds.var:e.varKinds.const;c=(0,t._)`${c}${n} ${i} = ${o};${this.opts._n}`}else if(o=s?.(i))c=(0,t._)`${c}${o}${this.opts._n}`;else throw new n(i);d.set(i,r.Completed)})}return c}}})),Y=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.or=e.and=e.not=e.CodeGen=e.operators=e.varKinds=e.ValueScopeName=e.ValueScope=e.Scope=e.Name=e.regexpCode=e.stringify=e.getProperty=e.nil=e.strConcat=e.str=e._=void 0;var t=ce(),n=le(),r=ce();Object.defineProperty(e,`_`,{enumerable:!0,get:function(){return r._}}),Object.defineProperty(e,`str`,{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(e,`strConcat`,{enumerable:!0,get:function(){return r.strConcat}}),Object.defineProperty(e,`nil`,{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(e,`getProperty`,{enumerable:!0,get:function(){return r.getProperty}}),Object.defineProperty(e,`stringify`,{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(e,`regexpCode`,{enumerable:!0,get:function(){return r.regexpCode}}),Object.defineProperty(e,`Name`,{enumerable:!0,get:function(){return r.Name}});var i=le();Object.defineProperty(e,`Scope`,{enumerable:!0,get:function(){return i.Scope}}),Object.defineProperty(e,`ValueScope`,{enumerable:!0,get:function(){return i.ValueScope}}),Object.defineProperty(e,`ValueScopeName`,{enumerable:!0,get:function(){return i.ValueScopeName}}),Object.defineProperty(e,`varKinds`,{enumerable:!0,get:function(){return i.varKinds}}),e.operators={GT:new t._Code(`>`),GTE:new t._Code(`>=`),LT:new t._Code(`<`),LTE:new t._Code(`<=`),EQ:new t._Code(`===`),NEQ:new t._Code(`!==`),NOT:new t._Code(`!`),OR:new t._Code(`||`),AND:new t._Code(`&&`),ADD:new t._Code(`+`)};var a=class{optimizeNodes(){return this}optimizeNames(e,t){return this}},o=class extends a{constructor(e,t,n){super(),this.varKind=e,this.name=t,this.rhs=n}render({es5:e,_n:t}){let r=e?n.varKinds.var:this.varKind,i=this.rhs===void 0?``:` = ${this.rhs}`;return`${r} ${this.name}${i};`+t}optimizeNames(e,t){if(e[this.name.str])return this.rhs&&=k(this.rhs,e,t),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}},s=class extends a{constructor(e,t,n){super(),this.lhs=e,this.rhs=t,this.sideEffects=n}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,n){if(!(this.lhs instanceof t.Name&&!e[this.lhs.str]&&!this.sideEffects))return this.rhs=k(this.rhs,e,n),this}get names(){return O(this.lhs instanceof t.Name?{}:{...this.lhs.names},this.rhs)}},c=class extends s{constructor(e,t,n,r){super(e,n,r),this.op=t}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}},l=class extends a{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}},u=class extends a{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:``};`+e}},d=class extends a{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}},f=class extends a{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,t){return this.code=k(this.code,e,t),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}},p=class extends a{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce((t,n)=>t+n.render(e),``)}optimizeNodes(){let{nodes:e}=this,t=e.length;for(;t--;){let n=e[t].optimizeNodes();Array.isArray(n)?e.splice(t,1,...n):n?e[t]=n:e.splice(t,1)}return e.length>0?this:void 0}optimizeNames(e,t){let{nodes:n}=this,r=n.length;for(;r--;){let i=n[r];i.optimizeNames(e,t)||(A(e,i.names),n.splice(r,1))}return n.length>0?this:void 0}get names(){return this.nodes.reduce((e,t)=>D(e,t.names),{})}},m=class extends p{render(e){return`{`+e._n+super.render(e)+`}`+e._n}},h=class extends p{},g=class extends m{};g.kind=`else`;var _=class e extends m{constructor(e,t){super(t),this.condition=e}render(e){let t=`if(${this.condition})`+super.render(e);return this.else&&(t+=`else `+this.else.render(e)),t}optimizeNodes(){super.optimizeNodes();let t=this.condition;if(t===!0)return this.nodes;let n=this.else;if(n){let e=n.optimizeNodes();n=this.else=Array.isArray(e)?new g(e):e}if(n)return t===!1?n instanceof e?n:n.nodes:this.nodes.length?this:new e(ee(t),n instanceof e?[n]:n.nodes);if(!(t===!1||!this.nodes.length))return this}optimizeNames(e,t){if(this.else=this.else?.optimizeNames(e,t),super.optimizeNames(e,t)||this.else)return this.condition=k(this.condition,e,t),this}get names(){let e=super.names;return O(e,this.condition),this.else&&D(e,this.else.names),e}};_.kind=`if`;var v=class extends m{};v.kind=`for`;var y=class extends v{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iteration=k(this.iteration,e,t),this}get names(){return D(super.names,this.iteration.names)}},b=class extends v{constructor(e,t,n,r){super(),this.varKind=e,this.name=t,this.from=n,this.to=r}render(e){let t=e.es5?n.varKinds.var:this.varKind,{name:r,from:i,to:a}=this;return`for(${t} ${r}=${i}; ${r}<${a}; ${r}++)`+super.render(e)}get names(){return O(O(super.names,this.from),this.to)}},x=class extends v{constructor(e,t,n,r){super(),this.loop=e,this.varKind=t,this.name=n,this.iterable=r}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iterable=k(this.iterable,e,t),this}get names(){return D(super.names,this.iterable.names)}},S=class extends m{constructor(e,t,n){super(),this.name=e,this.args=t,this.async=n}render(e){return`${this.async?`async `:``}function ${this.name}(${this.args})`+super.render(e)}};S.kind=`func`;var C=class extends p{render(e){return`return `+super.render(e)}};C.kind=`return`;var w=class extends m{render(e){let t=`try`+super.render(e);return this.catch&&(t+=this.catch.render(e)),this.finally&&(t+=this.finally.render(e)),t}optimizeNodes(){var e,t;return super.optimizeNodes(),(e=this.catch)==null||e.optimizeNodes(),(t=this.finally)==null||t.optimizeNodes(),this}optimizeNames(e,t){var n,r;return super.optimizeNames(e,t),(n=this.catch)==null||n.optimizeNames(e,t),(r=this.finally)==null||r.optimizeNames(e,t),this}get names(){let e=super.names;return this.catch&&D(e,this.catch.names),this.finally&&D(e,this.finally.names),e}},T=class extends m{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}};T.kind=`catch`;var E=class extends m{render(e){return`finally`+super.render(e)}};E.kind=`finally`,e.CodeGen=class{constructor(e,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...t,_n:t.lines?`
3
3
  `:``},this._extScope=e,this._scope=new n.Scope({parent:e}),this._nodes=[new h]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,t){let n=this._extScope.value(e,t);return(this._values[n.prefix]||(this._values[n.prefix]=new Set)).add(n),n}getScopeValue(e,t){return this._extScope.getValue(e,t)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,t,n,r){let i=this._scope.toName(t);return n!==void 0&&r&&(this._constants[i.str]=n),this._leafNode(new o(e,i,n)),i}const(e,t,r){return this._def(n.varKinds.const,e,t,r)}let(e,t,r){return this._def(n.varKinds.let,e,t,r)}var(e,t,r){return this._def(n.varKinds.var,e,t,r)}assign(e,t,n){return this._leafNode(new s(e,t,n))}add(t,n){return this._leafNode(new c(t,e.operators.ADD,n))}code(e){return typeof e==`function`?e():e!==t.nil&&this._leafNode(new f(e)),this}object(...e){let n=[`{`];for(let[r,i]of e)n.length>1&&n.push(`,`),n.push(r),(r!==i||this.opts.es5)&&(n.push(`:`),(0,t.addCodeArg)(n,i));return n.push(`}`),new t._Code(n)}if(e,t,n){if(this._blockNode(new _(e)),t&&n)this.code(t).else().code(n).endIf();else if(t)this.code(t).endIf();else if(n)throw Error(`CodeGen: "else" body without "then" body`);return this}elseIf(e){return this._elseNode(new _(e))}else(){return this._elseNode(new g)}endIf(){return this._endBlockNode(_,g)}_for(e,t){return this._blockNode(e),t&&this.code(t).endFor(),this}for(e,t){return this._for(new y(e),t)}forRange(e,t,r,i,a=this.opts.es5?n.varKinds.var:n.varKinds.let){let o=this._scope.toName(e);return this._for(new b(a,o,t,r),()=>i(o))}forOf(e,r,i,a=n.varKinds.const){let o=this._scope.toName(e);if(this.opts.es5){let e=r instanceof t.Name?r:this.var(`_arr`,r);return this.forRange(`_i`,0,(0,t._)`${e}.length`,n=>{this.var(o,(0,t._)`${e}[${n}]`),i(o)})}return this._for(new x(`of`,a,o,r),()=>i(o))}forIn(e,r,i,a=this.opts.es5?n.varKinds.var:n.varKinds.const){if(this.opts.ownProperties)return this.forOf(e,(0,t._)`Object.keys(${r})`,i);let o=this._scope.toName(e);return this._for(new x(`in`,a,o,r),()=>i(o))}endFor(){return this._endBlockNode(v)}label(e){return this._leafNode(new l(e))}break(e){return this._leafNode(new u(e))}return(e){let t=new C;if(this._blockNode(t),this.code(e),t.nodes.length!==1)throw Error(`CodeGen: "return" should have one node`);return this._endBlockNode(C)}try(e,t,n){if(!t&&!n)throw Error(`CodeGen: "try" without "catch" and "finally"`);let r=new w;if(this._blockNode(r),this.code(e),t){let e=this.name(`e`);this._currNode=r.catch=new T(e),t(e)}return n&&(this._currNode=r.finally=new E,this.code(n)),this._endBlockNode(T,E)}throw(e){return this._leafNode(new d(e))}block(e,t){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(t),this}endBlock(e){let t=this._blockStarts.pop();if(t===void 0)throw Error(`CodeGen: not in self-balancing block`);let n=this._nodes.length-t;if(n<0||e!==void 0&&n!==e)throw Error(`CodeGen: wrong number of nodes: ${n} vs ${e} expected`);return this._nodes.length=t,this}func(e,n=t.nil,r,i){return this._blockNode(new S(e,n,r)),i&&this.code(i).endFunc(),this}endFunc(){return this._endBlockNode(S)}optimize(e=1){for(;e-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,t){let n=this._currNode;if(n instanceof e||t&&n instanceof t)return this._nodes.pop(),this;throw Error(`CodeGen: not in block "${t?`${e.kind}/${t.kind}`:e.kind}"`)}_elseNode(e){let t=this._currNode;if(!(t instanceof _))throw Error(`CodeGen: "else" without "if"`);return this._currNode=t.else=e,this}get _root(){return this._nodes[0]}get _currNode(){let e=this._nodes;return e[e.length-1]}set _currNode(e){let t=this._nodes;t[t.length-1]=e}};function D(e,t){for(let n in t)e[n]=(e[n]||0)+(t[n]||0);return e}function O(e,n){return n instanceof t._CodeOrName?D(e,n.names):e}function k(e,n,r){if(e instanceof t.Name)return i(e);if(!a(e))return e;return new t._Code(e._items.reduce((e,n)=>(n instanceof t.Name&&(n=i(n)),n instanceof t._Code?e.push(...n._items):e.push(n),e),[]));function i(e){let t=r[e.str];return t===void 0||n[e.str]!==1?e:(delete n[e.str],t)}function a(e){return e instanceof t._Code&&e._items.some(e=>e instanceof t.Name&&n[e.str]===1&&r[e.str]!==void 0)}}function A(e,t){for(let n in t)e[n]=(e[n]||0)-(t[n]||0)}function ee(e){return typeof e==`boolean`||typeof e==`number`||e===null?!e:(0,t._)`!${I(e)}`}e.not=ee;var j=F(e.operators.AND);function M(...e){return e.reduce(j)}e.and=M;var N=F(e.operators.OR);function P(...e){return e.reduce(N)}e.or=P;function F(e){return(n,r)=>n===t.nil?r:r===t.nil?n:(0,t._)`${I(n)} ${e} ${I(r)}`}function I(e){return e instanceof t.Name?e:(0,t._)`(${e})`}})),X=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.checkStrictMode=e.getErrorPath=e.Type=e.useFunc=e.setEvaluated=e.evaluatedPropsToName=e.mergeEvaluated=e.eachItem=e.unescapeJsonPointer=e.escapeJsonPointer=e.escapeFragment=e.unescapeFragment=e.schemaRefOrVal=e.schemaHasRulesButRef=e.schemaHasRules=e.checkUnknownRules=e.alwaysValidSchema=e.toHash=void 0;var t=Y(),n=ce();function r(e){let t={};for(let n of e)t[n]=!0;return t}e.toHash=r;function i(e,t){return typeof t==`boolean`?t:Object.keys(t).length===0?!0:(a(e,t),!o(t,e.self.RULES.all))}e.alwaysValidSchema=i;function a(e,t=e.schema){let{opts:n,self:r}=e;if(!n.strictSchema||typeof t==`boolean`)return;let i=r.RULES.keywords;for(let n in t)i[n]||x(e,`unknown keyword: "${n}"`)}e.checkUnknownRules=a;function o(e,t){if(typeof e==`boolean`)return!e;for(let n in e)if(t[n])return!0;return!1}e.schemaHasRules=o;function s(e,t){if(typeof e==`boolean`)return!e;for(let n in e)if(n!==`$ref`&&t.all[n])return!0;return!1}e.schemaHasRulesButRef=s;function c({topSchemaRef:e,schemaPath:n},r,i,a){if(!a){if(typeof r==`number`||typeof r==`boolean`)return r;if(typeof r==`string`)return(0,t._)`${r}`}return(0,t._)`${e}${n}${(0,t.getProperty)(i)}`}e.schemaRefOrVal=c;function l(e){return f(decodeURIComponent(e))}e.unescapeFragment=l;function u(e){return encodeURIComponent(d(e))}e.escapeFragment=u;function d(e){return typeof e==`number`?`${e}`:e.replace(/~/g,`~0`).replace(/\//g,`~1`)}e.escapeJsonPointer=d;function f(e){return e.replace(/~1/g,`/`).replace(/~0/g,`~`)}e.unescapeJsonPointer=f;function p(e,t){if(Array.isArray(e))for(let n of e)t(n);else t(e)}e.eachItem=p;function m({mergeNames:e,mergeToName:n,mergeValues:r,resultToName:i}){return(a,o,s,c)=>{let l=s===void 0?o:s instanceof t.Name?(o instanceof t.Name?e(a,o,s):n(a,o,s),s):o instanceof t.Name?(n(a,s,o),o):r(o,s);return c===t.Name&&!(l instanceof t.Name)?i(a,l):l}}e.mergeEvaluated={props:m({mergeNames:(e,n,r)=>e.if((0,t._)`${r} !== true && ${n} !== undefined`,()=>{e.if((0,t._)`${n} === true`,()=>e.assign(r,!0),()=>e.assign(r,(0,t._)`${r} || {}`).code((0,t._)`Object.assign(${r}, ${n})`))}),mergeToName:(e,n,r)=>e.if((0,t._)`${r} !== true`,()=>{n===!0?e.assign(r,!0):(e.assign(r,(0,t._)`${r} || {}`),g(e,r,n))}),mergeValues:(e,t)=>e===!0?!0:{...e,...t},resultToName:h}),items:m({mergeNames:(e,n,r)=>e.if((0,t._)`${r} !== true && ${n} !== undefined`,()=>e.assign(r,(0,t._)`${n} === true ? true : ${r} > ${n} ? ${r} : ${n}`)),mergeToName:(e,n,r)=>e.if((0,t._)`${r} !== true`,()=>e.assign(r,n===!0?!0:(0,t._)`${r} > ${n} ? ${r} : ${n}`)),mergeValues:(e,t)=>e===!0?!0:Math.max(e,t),resultToName:(e,t)=>e.var(`items`,t)})};function h(e,n){if(n===!0)return e.var(`props`,!0);let r=e.var(`props`,(0,t._)`{}`);return n!==void 0&&g(e,r,n),r}e.evaluatedPropsToName=h;function g(e,n,r){Object.keys(r).forEach(r=>e.assign((0,t._)`${n}${(0,t.getProperty)(r)}`,!0))}e.setEvaluated=g;var _={};function v(e,t){return e.scopeValue(`func`,{ref:t,code:_[t.code]||(_[t.code]=new n._Code(t.code))})}e.useFunc=v;var y;(function(e){e[e.Num=0]=`Num`,e[e.Str=1]=`Str`})(y||(e.Type=y={}));function b(e,n,r){if(e instanceof t.Name){let i=n===y.Num;return r?i?(0,t._)`"[" + ${e} + "]"`:(0,t._)`"['" + ${e} + "']"`:i?(0,t._)`"/" + ${e}`:(0,t._)`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,t.getProperty)(e).toString():`/`+d(e)}e.getErrorPath=b;function x(e,t,n=e.opts.strictSchema){if(n){if(t=`strict mode: ${t}`,n===!0)throw Error(t);e.self.logger.warn(t)}}e.checkStrictMode=x})),ue=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=Y();e.default={data:new t.Name(`data`),valCxt:new t.Name(`valCxt`),instancePath:new t.Name(`instancePath`),parentData:new t.Name(`parentData`),parentDataProperty:new t.Name(`parentDataProperty`),rootData:new t.Name(`rootData`),dynamicAnchors:new t.Name(`dynamicAnchors`),vErrors:new t.Name(`vErrors`),errors:new t.Name(`errors`),this:new t.Name(`this`),self:new t.Name(`self`),scope:new t.Name(`scope`),json:new t.Name(`json`),jsonPos:new t.Name(`jsonPos`),jsonLen:new t.Name(`jsonLen`),jsonPart:new t.Name(`jsonPart`)}})),de=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.extendErrors=e.resetErrorsCount=e.reportExtraError=e.reportError=e.keyword$DataError=e.keywordError=void 0;var t=Y(),n=X(),r=ue();e.keywordError={message:({keyword:e})=>(0,t.str)`must pass "${e}" keyword validation`},e.keyword$DataError={message:({keyword:e,schemaType:n})=>n?(0,t.str)`"${e}" keyword must be ${n} ($data)`:(0,t.str)`"${e}" keyword is invalid ($data)`};function i(n,r=e.keywordError,i,a){let{it:o}=n,{gen:s,compositeRule:u,allErrors:f}=o,p=d(n,r,i);a??(u||f)?c(s,p):l(o,(0,t._)`[${p}]`)}e.reportError=i;function a(t,n=e.keywordError,i){let{it:a}=t,{gen:o,compositeRule:s,allErrors:u}=a;c(o,d(t,n,i)),s||u||l(a,r.default.vErrors)}e.reportExtraError=a;function o(e,n){e.assign(r.default.errors,n),e.if((0,t._)`${r.default.vErrors} !== null`,()=>e.if(n,()=>e.assign((0,t._)`${r.default.vErrors}.length`,n),()=>e.assign(r.default.vErrors,null)))}e.resetErrorsCount=o;function s({gen:e,keyword:n,schemaValue:i,data:a,errsCount:o,it:s}){if(o===void 0)throw Error(`ajv implementation error`);let c=e.name(`err`);e.forRange(`i`,o,r.default.errors,o=>{e.const(c,(0,t._)`${r.default.vErrors}[${o}]`),e.if((0,t._)`${c}.instancePath === undefined`,()=>e.assign((0,t._)`${c}.instancePath`,(0,t.strConcat)(r.default.instancePath,s.errorPath))),e.assign((0,t._)`${c}.schemaPath`,(0,t.str)`${s.errSchemaPath}/${n}`),s.opts.verbose&&(e.assign((0,t._)`${c}.schema`,i),e.assign((0,t._)`${c}.data`,a))})}e.extendErrors=s;function c(e,n){let i=e.const(`err`,n);e.if((0,t._)`${r.default.vErrors} === null`,()=>e.assign(r.default.vErrors,(0,t._)`[${i}]`),(0,t._)`${r.default.vErrors}.push(${i})`),e.code((0,t._)`${r.default.errors}++`)}function l(e,n){let{gen:r,validateName:i,schemaEnv:a}=e;a.$async?r.throw((0,t._)`new ${e.ValidationError}(${n})`):(r.assign((0,t._)`${i}.errors`,n),r.return(!1))}var u={keyword:new t.Name(`keyword`),schemaPath:new t.Name(`schemaPath`),params:new t.Name(`params`),propertyName:new t.Name(`propertyName`),message:new t.Name(`message`),schema:new t.Name(`schema`),parentSchema:new t.Name(`parentSchema`)};function d(e,n,r){let{createErrors:i}=e.it;return i===!1?(0,t._)`{}`:f(e,n,r)}function f(e,t,n={}){let{gen:r,it:i}=e,a=[p(i,n),m(e,n)];return h(e,t,a),r.object(...a)}function p({errorPath:e},{instancePath:i}){let a=i?(0,t.str)`${e}${(0,n.getErrorPath)(i,n.Type.Str)}`:e;return[r.default.instancePath,(0,t.strConcat)(r.default.instancePath,a)]}function m({keyword:e,it:{errSchemaPath:r}},{schemaPath:i,parentSchema:a}){let o=a?r:(0,t.str)`${r}/${e}`;return i&&(o=(0,t.str)`${o}${(0,n.getErrorPath)(i,n.Type.Str)}`),[u.schemaPath,o]}function h(e,{params:n,message:i},a){let{keyword:o,data:s,schemaValue:c,it:l}=e,{opts:d,propertyName:f,topSchemaRef:p,schemaPath:m}=l;a.push([u.keyword,o],[u.params,typeof n==`function`?n(e):n||(0,t._)`{}`]),d.messages&&a.push([u.message,typeof i==`function`?i(e):i]),d.verbose&&a.push([u.schema,c],[u.parentSchema,(0,t._)`${p}${m}`],[r.default.data,s]),f&&a.push([u.propertyName,f])}})),fe=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.boolOrEmptySchema=e.topBoolOrEmptySchema=void 0;var t=de(),n=Y(),r=ue(),i={message:`boolean schema is false`};function a(e){let{gen:t,schema:i,validateName:a}=e;i===!1?s(e,!1):typeof i==`object`&&i.$async===!0?t.return(r.default.data):(t.assign((0,n._)`${a}.errors`,null),t.return(!0))}e.topBoolOrEmptySchema=a;function o(e,t){let{gen:n,schema:r}=e;r===!1?(n.var(t,!1),s(e)):n.var(t,!0)}e.boolOrEmptySchema=o;function s(e,n){let{gen:r,data:a}=e,o={gen:r,keyword:`false schema`,data:a,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,t.reportError)(o,i,void 0,n)}})),pe=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.getRules=e.isJSONType=void 0;var t=new Set([`string`,`number`,`integer`,`boolean`,`null`,`object`,`array`]);function n(e){return typeof e==`string`&&t.has(e)}e.isJSONType=n;function r(){let e={number:{type:`number`,rules:[]},string:{type:`string`,rules:[]},array:{type:`array`,rules:[]},object:{type:`object`,rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}e.getRules=r})),me=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.shouldUseRule=e.shouldUseGroup=e.schemaHasRulesForType=void 0;function t({schema:e,self:t},r){let i=t.RULES.types[r];return i&&i!==!0&&n(e,i)}e.schemaHasRulesForType=t;function n(e,t){return t.rules.some(t=>r(e,t))}e.shouldUseGroup=n;function r(e,t){return e[t.keyword]!==void 0||t.definition.implements?.some(t=>e[t]!==void 0)}e.shouldUseRule=r})),he=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.reportTypeError=e.checkDataTypes=e.checkDataType=e.coerceAndCheckDataType=e.getJSONTypes=e.getSchemaTypes=e.DataType=void 0;var t=pe(),n=me(),r=de(),i=Y(),a=X(),o;(function(e){e[e.Correct=0]=`Correct`,e[e.Wrong=1]=`Wrong`})(o||(e.DataType=o={}));function s(e){let t=c(e.type);if(t.includes(`null`)){if(e.nullable===!1)throw Error(`type: null contradicts nullable: false`)}else{if(!t.length&&e.nullable!==void 0)throw Error(`"nullable" cannot be used without "type"`);e.nullable===!0&&t.push(`null`)}return t}e.getSchemaTypes=s;function c(e){let n=Array.isArray(e)?e:e?[e]:[];if(n.every(t.isJSONType))return n;throw Error(`type must be JSONType or JSONType[]: `+n.join(`,`))}e.getJSONTypes=c;function l(e,t){let{gen:r,data:i,opts:a}=e,s=d(t,a.coerceTypes),c=t.length>0&&!(s.length===0&&t.length===1&&(0,n.schemaHasRulesForType)(e,t[0]));if(c){let n=h(t,i,a.strictNumbers,o.Wrong);r.if(n,()=>{s.length?f(e,t,s):_(e)})}return c}e.coerceAndCheckDataType=l;var u=new Set([`string`,`number`,`integer`,`boolean`,`null`]);function d(e,t){return t?e.filter(e=>u.has(e)||t===`array`&&e===`array`):[]}function f(e,t,n){let{gen:r,data:a,opts:o}=e,s=r.let(`dataType`,(0,i._)`typeof ${a}`),c=r.let(`coerced`,(0,i._)`undefined`);o.coerceTypes===`array`&&r.if((0,i._)`${s} == 'object' && Array.isArray(${a}) && ${a}.length == 1`,()=>r.assign(a,(0,i._)`${a}[0]`).assign(s,(0,i._)`typeof ${a}`).if(h(t,a,o.strictNumbers),()=>r.assign(c,a))),r.if((0,i._)`${c} !== undefined`);for(let e of n)(u.has(e)||e===`array`&&o.coerceTypes===`array`)&&l(e);r.else(),_(e),r.endIf(),r.if((0,i._)`${c} !== undefined`,()=>{r.assign(a,c),p(e,c)});function l(e){switch(e){case`string`:r.elseIf((0,i._)`${s} == "number" || ${s} == "boolean"`).assign(c,(0,i._)`"" + ${a}`).elseIf((0,i._)`${a} === null`).assign(c,(0,i._)`""`);return;case`number`:r.elseIf((0,i._)`${s} == "boolean" || ${a} === null
4
4
  || (${s} == "string" && ${a} && ${a} == +${a})`).assign(c,(0,i._)`+${a}`);return;case`integer`:r.elseIf((0,i._)`${s} === "boolean" || ${a} === null
5
5
  || (${s} === "string" && ${a} && ${a} == +${a} && !(${a} % 1))`).assign(c,(0,i._)`+${a}`);return;case`boolean`:r.elseIf((0,i._)`${a} === "false" || ${a} === 0 || ${a} === null`).assign(c,!1).elseIf((0,i._)`${a} === "true" || ${a} === 1`).assign(c,!0);return;case`null`:r.elseIf((0,i._)`${a} === "" || ${a} === 0 || ${a} === false`),r.assign(c,null);return;case`array`:r.elseIf((0,i._)`${s} === "string" || ${s} === "number"
@@ -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{i as o,n as s,t as c}from"./tooltip-Bz6z4_se.js";import{n as l,r as u,t as d}from"./collapsible-BKbszYZV.js";import{t as f}from"./checkbox-CKD8LETI.js";import{t as p}from"./label-CvMpFFbN.js";import{i as m,n as h,o as g,s as _,t as v}from"./select-pACXgFe2.js";import{t as y}from"./switch-BKZTXkzu.js";import{t as ee}from"./button-DzgjsZzC.js";import{n as b}from"./dist-BGzUo_18.js";import{t as x}from"./arrow-up-right-nJaICi16.js";import{t as te}from"./chevron-right-Bofu4lib.js";import{t as S}from"./info-CyR0W2SK.js";import{t as ne}from"./rotate-ccw-Zi1IjIg9.js";import{t as C}from"./badge-BIamhtRR.js";import{r as w}from"./field-DFJgKWGh.js";import{t as T}from"./input-BsFOyzfK.js";import{t as E}from"./external-link-8lDpeCuR.js";import{_ as D,g as O,l as k,o as A}from"./markdown-lint-BMeMGAz_.js";import{t as j}from"./skeleton-CrbF9ppq.js";import{d as M,p as N,r as re}from"./lint-config-client-B249C1D2.js";import{t as P}from"./tag-pill-input-qgfgpKpV.js";var F=a(),I=e(n(),1),L=t(),R={};function ie(e){let t=(0,F.c)(5),n=R[e.ruleId];if(n!==void 0){let r;return t[0]!==n||t[1]!==e?(r=(0,L.jsx)(n,{...e}),t[0]=n,t[1]=e,t[2]=r):r=t[2],r}let r;return t[3]===e?r=t[4]:(r=(0,L.jsx)(z,{...e}),t[3]=e,t[4]=r),r}function z(e){let t=(0,F.c)(65),{ruleId:n,spec:i,value:a,disabled:o,onChange:s}=e,c=`rule-option-${n}-${i.key}`,l=`${c}-description`,u;t[0]!==c||t[1]!==i.key||t[2]!==i.type?(u=i.type===`unsupported`?(0,L.jsx)(`span`,{className:`font-mono text-sm font-medium`,children:i.key}):(0,L.jsx)(p,{htmlFor:c,className:`font-mono text-sm font-medium`,children:i.key}),t[0]=c,t[1]=i.key,t[2]=i.type,t[3]=u):u=t[3];let d;t[4]===i.default?d=t[5]:(d=i.default===void 0?null:(0,L.jsxs)(L.Fragment,{children:[` · `,(0,L.jsx)(r,{id:`KtACeE`,values:{0:H(i.default)},components:{0:(0,L.jsx)(`code`,{className:`font-mono`})}})]}),t[4]=i.default,t[5]=d);let f;t[6]!==l||t[7]!==i.description||t[8]!==d?(f=(0,L.jsxs)(w,{id:l,children:[i.description,d]}),t[6]=l,t[7]=i.description,t[8]=d,t[9]=f):f=t[9];let m;t[10]!==u||t[11]!==f?(m=(0,L.jsxs)(`div`,{className:`min-w-0 space-y-0.5`,children:[u,f]}),t[10]=u,t[11]=f,t[12]=m):m=t[12];let h=m,g=o===!0,_;t[13]!==c||t[14]!==l||t[15]!==s||t[16]!==g?(_={controlId:c,descriptionId:l,disabled:g,onChange:s},t[13]=c,t[14]=l,t[15]=s,t[16]=g,t[17]=_):_=t[17];let v=_;switch(i.type){case`boolean`:{let e;t[18]!==v||t[19]!==i||t[20]!==a?(e=(0,L.jsx)(U,{...v,spec:i,value:a}),t[18]=v,t[19]=i,t[20]=a,t[21]=e):e=t[21];let n;return t[22]!==c||t[23]!==h||t[24]!==e?(n=(0,L.jsx)(B,{testId:c,header:h,children:e}),t[22]=c,t[23]=h,t[24]=e,t[25]=n):n=t[25],n}case`enum`:{let e;t[26]!==v||t[27]!==i||t[28]!==a?(e=(0,L.jsx)(W,{...v,spec:i,value:a}),t[26]=v,t[27]=i,t[28]=a,t[29]=e):e=t[29];let n;return t[30]!==c||t[31]!==h||t[32]!==e?(n=(0,L.jsx)(B,{testId:c,header:h,children:e}),t[30]=c,t[31]=h,t[32]=e,t[33]=n):n=t[33],n}case`integer`:{let e;t[34]!==v||t[35]!==i||t[36]!==a?(e=(0,L.jsx)(G,{...v,spec:i,value:a}),t[34]=v,t[35]=i,t[36]=a,t[37]=e):e=t[37];let n;return t[38]!==c||t[39]!==h||t[40]!==e?(n=(0,L.jsx)(B,{testId:c,header:h,children:e}),t[38]=c,t[39]=h,t[40]=e,t[41]=n):n=t[41],n}case`string`:{let e;t[42]!==v||t[43]!==i||t[44]!==a?(e=(0,L.jsx)(K,{...v,spec:i,value:a}),t[42]=v,t[43]=i,t[44]=a,t[45]=e):e=t[45];let n;return t[46]!==c||t[47]!==h||t[48]!==e?(n=(0,L.jsx)(V,{testId:c,header:h,children:e}),t[46]=c,t[47]=h,t[48]=e,t[49]=n):n=t[49],n}case`string-array`:{let e;t[50]!==v||t[51]!==i||t[52]!==a?(e=(0,L.jsx)(q,{...v,spec:i,value:a}),t[50]=v,t[51]=i,t[52]=a,t[53]=e):e=t[53];let n;return t[54]!==c||t[55]!==h||t[56]!==e?(n=(0,L.jsx)(V,{testId:c,header:h,children:e}),t[54]=c,t[55]=h,t[56]=e,t[57]=n):n=t[57],n}case`unsupported`:{let e=`${c}-unsupported`,n;t[58]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,L.jsx)(r,{id:`NQXwDy`}),t[58]=n):n=t[58];let i;t[59]===e?i=t[60]:(i=(0,L.jsx)(C,{variant:`gray`,"data-testid":e,children:n}),t[59]=e,t[60]=i);let a;return t[61]!==c||t[62]!==h||t[63]!==i?(a=(0,L.jsx)(B,{testId:c,header:h,children:i}),t[61]=c,t[62]=h,t[63]=i,t[64]=a):a=t[64],a}default:return i}}function B(e){let t=(0,F.c)(6),{testId:n,header:r,children:i}=e,a;t[0]===i?a=t[1]:(a=(0,L.jsx)(`div`,{className:`shrink-0`,children:i}),t[0]=i,t[1]=a);let o;return t[2]!==r||t[3]!==a||t[4]!==n?(o=(0,L.jsxs)(`div`,{className:`flex items-start justify-between gap-3`,"data-testid":n,children:[r,a]}),t[2]=r,t[3]=a,t[4]=n,t[5]=o):o=t[5],o}function V(e){let t=(0,F.c)(4),{testId:n,header:r,children:i}=e,a;return t[0]!==i||t[1]!==r||t[2]!==n?(a=(0,L.jsxs)(`div`,{className:`space-y-1.5`,"data-testid":n,children:[r,i]}),t[0]=i,t[1]=r,t[2]=n,t[3]=a):a=t[3],a}function H(e){return JSON.stringify(e)}function U(e){let t=(0,F.c)(8),{spec:n,value:r,controlId:i,descriptionId:a,disabled:o,onChange:s}=e,c=typeof r==`boolean`?r:n.default??!1,l;t[0]===s?l=t[1]:(l=e=>s(e),t[0]=s,t[1]=l);let u;return t[2]!==c||t[3]!==i||t[4]!==a||t[5]!==o||t[6]!==l?(u=(0,L.jsx)(y,{id:i,checked:c,disabled:o,"aria-describedby":a,onCheckedChange:l}),t[2]=c,t[3]=i,t[4]=a,t[5]=o,t[6]=l,t[7]=u):u=t[7],u}function W(e){let t=(0,F.c)(16),{spec:n,value:r,controlId:i,descriptionId:a,disabled:o,onChange:s}=e,c=typeof r==`string`?r:n.default??``,l;t[0]===s?l=t[1]:(l=e=>s(e),t[0]=s,t[1]=l);let u;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,L.jsx)(_,{}),t[2]=u):u=t[2];let d;t[3]!==i||t[4]!==a?(d=(0,L.jsx)(g,{id:i,"aria-describedby":a,className:`w-48`,children:u}),t[3]=i,t[4]=a,t[5]=d):d=t[5];let f;t[6]===n.enum?f=t[7]:(f=n.enum.map(ae),t[6]=n.enum,t[7]=f);let p;t[8]===f?p=t[9]:(p=(0,L.jsx)(h,{children:f}),t[8]=f,t[9]=p);let m;return t[10]!==c||t[11]!==o||t[12]!==l||t[13]!==d||t[14]!==p?(m=(0,L.jsxs)(v,{value:c,onValueChange:l,disabled:o,children:[d,p]}),t[10]=c,t[11]=o,t[12]=l,t[13]=d,t[14]=p,t[15]=m):m=t[15],m}function ae(e){return(0,L.jsx)(m,{value:e,children:e},e)}function G(e){let t=(0,F.c)(22),{spec:n,value:r,controlId:i,descriptionId:a,disabled:o,onChange:s}=e,c=typeof r==`number`?r:n.default,l=c===void 0?``:String(c),[u,d]=(0,I.useState)(l),f=(0,I.useRef)(c),p,m;t[0]===c?(p=t[1],m=t[2]):(p=()=>{f.current!==c&&(d(c===void 0?``:String(c)),f.current=c)},m=[c],t[0]=c,t[1]=p,t[2]=m),(0,I.useEffect)(p,m);let h;t[3]!==c||t[4]!==l||t[5]!==s||t[6]!==u||t[7]!==n.maximum||t[8]!==n.minimum?(h=()=>{if(u.trim()===``){d(l);return}let e=Number(u);if(!Number.isFinite(e)){d(l);return}let t=Math.round(e);n.minimum!==void 0&&t<n.minimum&&(t=n.minimum),n.maximum!==void 0&&t>n.maximum&&(t=n.maximum),d(String(t)),t!==c&&s(t)},t[3]=c,t[4]=l,t[5]=s,t[6]=u,t[7]=n.maximum,t[8]=n.minimum,t[9]=h):h=t[9];let g=h,_;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(_=e=>d(e.target.value),t[10]=_):_=t[10];let v;t[11]===g?v=t[12]:(v=e=>{e.key===`Enter`&&(e.preventDefault(),g())},t[11]=g,t[12]=v);let y;return t[13]!==g||t[14]!==i||t[15]!==a||t[16]!==o||t[17]!==u||t[18]!==n.maximum||t[19]!==n.minimum||t[20]!==v?(y=(0,L.jsx)(T,{id:i,type:`number`,value:u,min:n.minimum,max:n.maximum,disabled:o,"aria-describedby":a,onChange:_,onBlur:g,onKeyDown:v,className:`h-8 w-28 text-sm tabular-nums`}),t[13]=g,t[14]=i,t[15]=a,t[16]=o,t[17]=u,t[18]=n.maximum,t[19]=n.minimum,t[20]=v,t[21]=y):y=t[21],y}function K(e){let t=(0,F.c)(17),{spec:n,value:r,controlId:i,descriptionId:a,disabled:o,onChange:s}=e,c=typeof r==`string`?r:n.default??``,[l,u]=(0,I.useState)(c),d=(0,I.useRef)(c),f,p;t[0]===c?(f=t[1],p=t[2]):(f=()=>{d.current!==c&&(u(c),d.current=c)},p=[c],t[0]=c,t[1]=f,t[2]=p),(0,I.useEffect)(f,p);let m;t[3]!==c||t[4]!==s||t[5]!==l?(m=()=>{l!==c&&s(l)},t[3]=c,t[4]=s,t[5]=l,t[6]=m):m=t[6];let h=m,g;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(g=e=>u(e.target.value),t[7]=g):g=t[7];let _;t[8]===h?_=t[9]:(_=e=>{e.key===`Enter`&&(e.preventDefault(),h())},t[8]=h,t[9]=_);let v;return t[10]!==h||t[11]!==i||t[12]!==a||t[13]!==o||t[14]!==l||t[15]!==_?(v=(0,L.jsx)(T,{id:i,value:l,disabled:o,"aria-describedby":a,onChange:g,onBlur:h,onKeyDown:_,className:`h-8 font-mono text-sm`}),t[10]=h,t[11]=i,t[12]=a,t[13]=o,t[14]=l,t[15]=_,t[16]=v):v=t[16],v}function q(e){let t=(0,F.c)(11),{spec:n,value:r,controlId:i,descriptionId:a,disabled:o,onChange:s}=e,c;t[0]!==n||t[1]!==r?(c=Array.isArray(r)?r.filter(J):[...n.default??[]],t[0]=n,t[1]=r,t[2]=c):c=t[2];let l=c,u;t[3]===s?u=t[4]:(u=e=>s(e),t[3]=s,t[4]=u);let d;return t[5]!==i||t[6]!==a||t[7]!==o||t[8]!==l||t[9]!==u?(d=(0,L.jsx)(P,{id:i,value:l,grammar:`free-text`,disabled:o,"aria-describedby":a,onChange:u}),t[5]=i,t[6]=a,t[7]=o,t[8]=l,t[9]=u,t[10]=d):d=t[10],d}function J(e){return typeof e==`string`}function oe(e){let t=(0,F.c)(53),n;t[0]===e?n=t[1]:(n=e===void 0?{}:e,t[0]=e,t[1]=n);let{hideConfigSourceNote:a,initialRuleQuery:o}=n,s=a===void 0?!1:a,{_:c}=i(),{data:m}=M(),h=m!==null,g;t[2]===m?.effective.plugins.markdownlint.rules?g=t[3]:(g=m?.effective.plugins.markdownlint.rules??{},t[2]=m?.effective.plugins.markdownlint.rules,t[3]=g);let _=g,v=m?.configFile??null,[y,ee]=(0,I.useState)(o?.query??``),[x,ne]=(0,I.useState)(!1),C=o?.nonce,w=o?.query,E,D;t[4]!==C||t[5]!==w?(E=()=>{C===void 0||w===void 0||ee(w)},D=[C,w],t[4]=C,t[5]=w,t[6]=E,t[7]=D):(E=t[6],D=t[7]),(0,I.useEffect)(E,D);let P;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(P=[],t[8]=P):P=t[8];let[R,ie]=(0,I.useState)(P),z;t[9]===c?z=t[10]:(z=function(e,t){N(e,t).then(e=>{if(!e.ok){b.error(e.errorDetail??c({id:`2G-56b`}));return}re()})},t[9]=c,t[10]=z);let B=z,V;t[11]!==x||t[12]!==y?(V=y.trim()!==``||x,t[11]=x,t[12]=y,t[13]=V):V=t[13];let H=V,U;if(t[14]!==c||t[15]!==R||t[16]!==v||t[17]!==H||t[18]!==s||t[19]!==x||t[20]!==h||t[21]!==_||t[22]!==y||t[23]!==B){let e;t[25]!==v||t[26]!==x||t[27]!==_||t[28]!==y?(e=e=>le(e,y)&&(!x||se(_,v,e.id)),t[25]=v,t[26]=x,t[27]=_,t[28]=y,t[29]=e):e=t[29];let n=A.filter(e),i=k.map(e=>({category:e,entries:n.filter(t=>O(t)===e)})).filter(Y),a;t[30]!==v||t[31]!==s||t[32]!==h?(a=!s&&(h?v?(0,L.jsx)(`p`,{className:`text-sm text-muted-foreground`,"data-testid":`markdownlint-config-source-note`,children:(0,L.jsx)(r,{id:`V2Gmie`,values:{configFile:v},components:{0:(0,L.jsx)(`code`,{className:`rounded bg-muted px-1 py-0.5 font-mono text-xs`})}})}):(0,L.jsxs)(`div`,{className:`space-y-2`,children:[(0,L.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:(0,L.jsx)(r,{id:`Z6rrjc`,components:{0:(0,L.jsx)(`code`,{className:`rounded bg-muted px-1 py-0.5 font-mono text-xs`})}})}),(0,L.jsxs)(`p`,{className:`flex items-start gap-1.5 rounded-md border border-dashed p-2.5 text-sm text-muted-foreground`,"data-testid":`markdownlint-no-file-disclaimer`,children:[(0,L.jsx)(S,{"aria-hidden":!0,className:`mt-0.5 size-4 shrink-0`}),(0,L.jsx)(`span`,{children:(0,L.jsx)(r,{id:`Te6sK2`,components:{0:(0,L.jsx)(`code`,{className:`rounded bg-muted px-1 py-0.5 font-mono text-xs`})}})})]})]}):(0,L.jsxs)(`div`,{className:`space-y-2`,"aria-busy":`true`,"data-testid":`markdownlint-rule-browser-config-loading`,children:[(0,L.jsx)(j,{className:`h-4 w-full`}),(0,L.jsx)(j,{className:`h-4 w-2/3`})]})),t[30]=v,t[31]=s,t[32]=h,t[33]=a):a=t[33];let o;t[34]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,L.jsx)(`p`,{className:`text-sm text-muted-foreground`,"data-testid":`markdownlint-rule-browser-legend`,children:(0,L.jsx)(r,{id:`zYp8Sr`,components:{0:(0,L.jsx)(`span`,{className:`font-medium text-foreground`}),1:(0,L.jsx)(`code`,{className:`rounded bg-muted px-1 py-0.5 font-mono text-xs`})}})}),t[34]=o):o=t[34];let m;t[35]===Symbol.for(`react.memo_cache_sentinel`)?(m=e=>ee(e.target.value),t[35]=m):m=t[35];let g;t[36]===c?g=t[37]:(g=c({id:`l-4nnw`}),t[36]=c,t[37]=g);let b;t[38]===c?b=t[39]:(b=c({id:`yf5auF`}),t[38]=c,t[39]=b);let C;t[40]!==y||t[41]!==g||t[42]!==b?(C=(0,L.jsx)(T,{value:y,onChange:m,placeholder:g,"aria-label":b,className:`h-8`,"data-testid":`markdownlint-rule-search`}),t[40]=y,t[41]=g,t[42]=b,t[43]=C):C=t[43];let w;t[44]===Symbol.for(`react.memo_cache_sentinel`)?(w=e=>ne(e===!0),t[44]=w):w=t[44];let E;t[45]===x?E=t[46]:(E=(0,L.jsx)(f,{id:`markdownlint-only-modified`,checked:x,onCheckedChange:w,"data-testid":`markdownlint-only-modified`}),t[45]=x,t[46]=E);let D;t[47]===Symbol.for(`react.memo_cache_sentinel`)?(D=(0,L.jsx)(p,{htmlFor:`markdownlint-only-modified`,className:`text-sm font-normal`,children:(0,L.jsx)(r,{id:`ccNps_`})}),t[47]=D):D=t[47];let M;t[48]===E?M=t[49]:(M=(0,L.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2`,children:[E,D]}),t[48]=E,t[49]=M);let N;t[50]!==C||t[51]!==M?(N=(0,L.jsxs)(`div`,{className:`flex items-center gap-4`,children:[C,M]}),t[50]=C,t[51]=M,t[52]=N):N=t[52],U=(0,L.jsxs)(`div`,{className:`space-y-3`,"data-testid":`settings-linting-markdownlint-rules`,children:[a,o,N,i.length===0?(0,L.jsx)(`p`,{className:`rounded-md border border-dashed p-3 text-sm text-muted-foreground`,"data-testid":`markdownlint-rule-browser-empty`,children:(0,L.jsx)(r,{id:`RfilGt`})}):(0,L.jsx)(`div`,{className:`space-y-2`,children:i.map(e=>{let{category:t,entries:n}=e,i=n.filter(e=>ue($(_,e.id))).length;return(0,L.jsxs)(d,{open:H||!R.includes(t),onOpenChange:e=>ie(e?R.filter(e=>e!==t):[...R,t]),children:[(0,L.jsxs)(u,{className:`group flex w-full items-center gap-2 rounded-md px-1.5 py-1.5 text-sm font-medium hover:bg-muted/50`,"data-testid":`markdownlint-rule-category-${Q(t)}`,children:[(0,L.jsx)(te,{className:`size-4 shrink-0 text-muted-foreground transition-transform group-data-[state=open]:rotate-90 motion-reduce:transition-none`}),(0,L.jsx)(Z,{category:t}),(0,L.jsx)(`span`,{className:`ms-auto text-xs font-normal text-muted-foreground tabular-nums`,children:(0,L.jsx)(r,{id:`NgZwB0`,values:{0:n.length,enabledCount:i}})})]}),(0,L.jsx)(l,{children:(0,L.jsx)(`div`,{className:`mt-1 divide-y rounded-md border`,children:n.map(e=>(0,L.jsx)(X,{rule:e,value:$(_,e.id),modified:se(_,v,e.id),ready:h,onWrite:t=>B(e.id,t)},e.id))})})]},t)})})]}),t[14]=c,t[15]=R,t[16]=v,t[17]=H,t[18]=s,t[19]=x,t[20]=h,t[21]=_,t[22]=y,t[23]=B,t[24]=U}else U=t[24];return U}function Y(e){return e.entries.length>0}function X(e){let t=(0,F.c)(96),{rule:n,value:a,modified:f,ready:p,onWrite:m}=e,{_:h}=i(),g;t[0]===a?g=t[1]:(g=ue(a),t[0]=a,t[1]=g);let _=g,v;t[2]===a?v=t[3]:(v=ce(a),t[2]=a,t[3]=v);let b=v,S,w,T,D,O,k,A;if(t[4]!==n.id||t[5]!==n.name||t[6]!==a){w=de(a),S=d,A=`markdownlint-rule-row-${n.id}`,O=`flex items-center justify-between gap-3 px-3 py-2`;let e=`markdownlint-rule-expand-${n.id}`,i;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,L.jsx)(te,{className:`size-4 shrink-0 text-muted-foreground transition-transform group-data-[state=open]:rotate-90 motion-reduce:transition-none`}),t[14]=i):i=t[14];let o;t[15]===n.name?o=t[16]:(o=(0,L.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-sm text-foreground`,children:n.name}),t[15]=n.name,t[16]=o),t[17]!==o||t[18]!==e?(k=(0,L.jsxs)(u,{className:`group flex min-w-0 flex-1 items-center gap-1.5 rounded-md py-0.5 text-left hover:bg-muted/50`,"data-testid":e,children:[i,o]}),t[17]=o,t[18]=e,t[19]=k):k=t[19],T=`flex shrink-0 items-center gap-2`,D=w.length>0?(0,L.jsx)(`span`,{id:`settings-linting-markdownlint-options-${n.id}`,className:`text-xs text-muted-foreground`,title:w.join(`, `),"data-testid":`settings-linting-markdownlint-options-${n.id}`,children:(0,L.jsx)(r,{id:`G-h6qN`,values:{0:w.length}})}):null,t[4]=n.id,t[5]=n.name,t[6]=a,t[7]=S,t[8]=w,t[9]=T,t[10]=D,t[11]=O,t[12]=k,t[13]=A}else S=t[7],w=t[8],T=t[9],D=t[10],O=t[11],k=t[12],A=t[13];let j;t[20]!==n.id||t[21]!==b?(j=b===null?null:(0,L.jsx)(C,{variant:`gray`,"data-testid":`markdownlint-rule-severity-${n.id}`,children:b}),t[20]=n.id,t[21]=b,t[22]=j):j=t[22];let M;t[23]!==f||t[24]!==n.id?(M=f?(0,L.jsx)(C,{variant:`outline`,"data-testid":`markdownlint-rule-modified-${n.id}`,children:(0,L.jsx)(r,{id:`tgWuMB`})}):null,t[23]=f,t[24]=n.id,t[25]=M):M=t[25];let N;t[26]!==h||t[27]!==f||t[28]!==m||t[29]!==p||t[30]!==n.id?(N=f?(0,L.jsxs)(c,{children:[(0,L.jsx)(o,{asChild:!0,children:(0,L.jsx)(ee,{variant:`ghost`,size:`icon`,className:`h-5 w-5 shrink-0 text-muted-foreground opacity-60 hover:opacity-100`,disabled:!p,"aria-label":h({id:`50ORFs`,values:{0:n.id}}),onClick:()=>m(null),children:(0,L.jsx)(ne,{className:`size-3.5`})})}),(0,L.jsx)(s,{children:(0,L.jsx)(r,{id:`L-rMC9`})})]}):null,t[26]=h,t[27]=f,t[28]=m,t[29]=p,t[30]=n.id,t[31]=N):N=t[31];let re=`markdownlint-rule-toggle-${n.id}`,P=!p,I;t[32]!==h||t[33]!==_||t[34]!==n.name?(I=h(_?{id:`y5UgU8`,values:{0:n.name}}:{id:`FZtBeR`,values:{0:n.name}}),t[32]=h,t[33]=_,t[34]=n.name,t[35]=I):I=t[35];let R=w.length>0?`settings-linting-markdownlint-options-${n.id}`:void 0,z;t[36]!==m||t[37]!==a?(z=e=>m(fe(a,e)),t[36]=m,t[37]=a,t[38]=z):z=t[38];let B=`markdownlint-rule-toggle-${n.id}`,V;t[39]!==_||t[40]!==re||t[41]!==P||t[42]!==I||t[43]!==R||t[44]!==z||t[45]!==B?(V=(0,L.jsx)(y,{id:re,checked:_,disabled:P,"aria-label":I,"aria-describedby":R,onCheckedChange:z,"data-testid":B}),t[39]=_,t[40]=re,t[41]=P,t[42]=I,t[43]=R,t[44]=z,t[45]=B,t[46]=V):V=t[46];let H;t[47]!==N||t[48]!==V||t[49]!==T||t[50]!==D||t[51]!==j||t[52]!==M?(H=(0,L.jsxs)(`div`,{className:T,children:[D,j,M,N,V]}),t[47]=N,t[48]=V,t[49]=T,t[50]=D,t[51]=j,t[52]=M,t[53]=H):H=t[53];let U;t[54]!==H||t[55]!==O||t[56]!==k?(U=(0,L.jsxs)(`div`,{className:O,children:[k,H]}),t[54]=H,t[55]=O,t[56]=k,t[57]=U):U=t[57];let W;t[58]!==n.alias||t[59]!==n.id?(W=(0,L.jsxs)(`span`,{className:`font-mono`,children:[n.id,` · `,n.alias]}),t[58]=n.alias,t[59]=n.id,t[60]=W):W=t[60];let ae=n.docUrl,G,K;t[61]===n.docUrl?(G=t[62],K=t[63]):(G=e=>E(e,n.docUrl),K=e=>E(e,n.docUrl),t[61]=n.docUrl,t[62]=G,t[63]=K);let q;t[64]!==h||t[65]!==n.id?(q=h({id:`iv452l`,values:{0:n.id}}),t[64]=h,t[65]=n.id,t[66]=q):q=t[66];let J,oe;t[67]===Symbol.for(`react.memo_cache_sentinel`)?(J=(0,L.jsx)(r,{id:`TvY_XA`}),oe=(0,L.jsx)(x,{"aria-hidden":!0,className:`size-3`}),t[67]=J,t[68]=oe):(J=t[67],oe=t[68]);let Y;t[69]!==n.docUrl||t[70]!==G||t[71]!==K||t[72]!==q?(Y=(0,L.jsxs)(`a`,{href:ae,target:`_blank`,rel:`noopener noreferrer`,onClick:G,onAuxClick:K,"aria-label":q,className:`inline-flex items-center gap-0.5 text-muted-foreground underline-offset-2 hover:text-foreground hover:underline`,children:[J,oe]}),t[69]=n.docUrl,t[70]=G,t[71]=K,t[72]=q,t[73]=Y):Y=t[73];let X;t[74]!==W||t[75]!==Y?(X=(0,L.jsxs)(`p`,{className:`text-1sm text-muted-foreground`,children:[W,` · `,Y]}),t[74]=W,t[75]=Y,t[76]=X):X=t[76];let Z;if(t[77]!==m||t[78]!==p||t[79]!==n.id||t[80]!==n.options||t[81]!==a){let e;t[83]!==m||t[84]!==p||t[85]!==n.id||t[86]!==a?(e=e=>(0,L.jsx)(ie,{ruleId:n.id,spec:e,value:me(a,e.key),disabled:!p,onChange:t=>m(pe(a,e.key,t))},e.key),t[83]=m,t[84]=p,t[85]=n.id,t[86]=a,t[87]=e):e=t[87],Z=n.options.map(e),t[77]=m,t[78]=p,t[79]=n.id,t[80]=n.options,t[81]=a,t[82]=Z}else Z=t[82];let Q;t[88]!==X||t[89]!==Z?(Q=(0,L.jsx)(l,{className:`overflow-hidden data-[state=open]:animate-[collapsible-down_150ms_ease-out] data-[state=closed]:animate-[collapsible-up_150ms_ease-in]`,children:(0,L.jsxs)(`div`,{className:`space-y-3 px-3 pb-3 pt-1`,children:[X,Z]})}),t[88]=X,t[89]=Z,t[90]=Q):Q=t[90];let $;return t[91]!==S||t[92]!==U||t[93]!==Q||t[94]!==A?($=(0,L.jsxs)(S,{"data-testid":A,children:[U,Q]}),t[91]=S,t[92]=U,t[93]=Q,t[94]=A,t[95]=$):$=t[95],$}function Z(e){let t=(0,F.c)(6),{category:n}=e;switch(n){case`Headings`:{let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,L.jsx)(r,{id:`PKjGhT`}),t[0]=e):e=t[0],e}case`Lists`:{let e;return t[1]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,L.jsx)(r,{id:`h16FyT`}),t[1]=e):e=t[1],e}case`Whitespace`:{let e;return t[2]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,L.jsx)(r,{id:`iIaSUD`}),t[2]=e):e=t[2],e}case`Code`:{let e;return t[3]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,L.jsx)(r,{id:`EWPtMO`}),t[3]=e):e=t[3],e}case`Links & images`:{let e;return t[4]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,L.jsx)(r,{id:`-kbIAr`}),t[4]=e):e=t[4],e}case`Style`:{let e;return t[5]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,L.jsx)(r,{id:`1CalO6`}),t[5]=e):e=t[5],e}default:return n}}function Q(e){return e.toLowerCase().replace(/[^a-z]+/g,`-`).replace(/^-|-$/g,``)}function $(e,t){let n=D(e,t);return n===void 0?e.default??!0:n.value}function se(e,t,n){return t!==null&&D(e,n)!==void 0}function ce(e){return typeof e==`string`?e:null}function le(e,t){let n=t.trim().toLowerCase();return n===``?!0:e.id.toLowerCase().includes(n)||e.alias.toLowerCase().includes(n)||e.name.toLowerCase().includes(n)}function ue(e){return typeof e!=`object`||!e?e!==!1:e.enabled!==!1}function de(e){return typeof e!=`object`||!e?[]:Object.keys(e).filter(e=>e!==`enabled`)}function fe(e,t){if(typeof e!=`object`||!e)return t;let n={};for(let t of Object.keys(e))t!==`enabled`&&(n[t]=e[t]);return Object.keys(n).length===0?t:t?n:{...n,enabled:!1}}function pe(e,t,n){return typeof e==`object`&&e?{...e,[t]:n}:e===!1?{enabled:!1,[t]:n}:{[t]:n}}function me(e,t){if(!(typeof e!=`object`||!e))return e[t]}export{oe as t};
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{i as o,n as s,t as c}from"./tooltip-Bz6z4_se.js";import{n as l,r as u,t as d}from"./collapsible-BKbszYZV.js";import{t as f}from"./checkbox-CKD8LETI.js";import{t as p}from"./label-CvMpFFbN.js";import{i as m,n as h,o as g,s as _,t as v}from"./select-pACXgFe2.js";import{t as y}from"./switch-BKZTXkzu.js";import{t as ee}from"./button-DzgjsZzC.js";import{n as b}from"./dist-BGzUo_18.js";import{t as x}from"./arrow-up-right-nJaICi16.js";import{t as te}from"./chevron-right-Bofu4lib.js";import{t as S}from"./info-CyR0W2SK.js";import{t as ne}from"./rotate-ccw-Zi1IjIg9.js";import{t as C}from"./badge-BIamhtRR.js";import{r as w}from"./field-DFJgKWGh.js";import{t as T}from"./input-BsFOyzfK.js";import{t as E}from"./external-link-8lDpeCuR.js";import{_ as D,g as O,l as k,o as A}from"./markdown-lint-x790xNNy.js";import{t as j}from"./skeleton-CrbF9ppq.js";import{d as M,p as N,r as re}from"./lint-config-client-Dg87hhVT.js";import{t as P}from"./tag-pill-input-qgfgpKpV.js";var F=a(),I=e(n(),1),L=t(),R={};function ie(e){let t=(0,F.c)(5),n=R[e.ruleId];if(n!==void 0){let r;return t[0]!==n||t[1]!==e?(r=(0,L.jsx)(n,{...e}),t[0]=n,t[1]=e,t[2]=r):r=t[2],r}let r;return t[3]===e?r=t[4]:(r=(0,L.jsx)(z,{...e}),t[3]=e,t[4]=r),r}function z(e){let t=(0,F.c)(65),{ruleId:n,spec:i,value:a,disabled:o,onChange:s}=e,c=`rule-option-${n}-${i.key}`,l=`${c}-description`,u;t[0]!==c||t[1]!==i.key||t[2]!==i.type?(u=i.type===`unsupported`?(0,L.jsx)(`span`,{className:`font-mono text-sm font-medium`,children:i.key}):(0,L.jsx)(p,{htmlFor:c,className:`font-mono text-sm font-medium`,children:i.key}),t[0]=c,t[1]=i.key,t[2]=i.type,t[3]=u):u=t[3];let d;t[4]===i.default?d=t[5]:(d=i.default===void 0?null:(0,L.jsxs)(L.Fragment,{children:[` · `,(0,L.jsx)(r,{id:`KtACeE`,values:{0:H(i.default)},components:{0:(0,L.jsx)(`code`,{className:`font-mono`})}})]}),t[4]=i.default,t[5]=d);let f;t[6]!==l||t[7]!==i.description||t[8]!==d?(f=(0,L.jsxs)(w,{id:l,children:[i.description,d]}),t[6]=l,t[7]=i.description,t[8]=d,t[9]=f):f=t[9];let m;t[10]!==u||t[11]!==f?(m=(0,L.jsxs)(`div`,{className:`min-w-0 space-y-0.5`,children:[u,f]}),t[10]=u,t[11]=f,t[12]=m):m=t[12];let h=m,g=o===!0,_;t[13]!==c||t[14]!==l||t[15]!==s||t[16]!==g?(_={controlId:c,descriptionId:l,disabled:g,onChange:s},t[13]=c,t[14]=l,t[15]=s,t[16]=g,t[17]=_):_=t[17];let v=_;switch(i.type){case`boolean`:{let e;t[18]!==v||t[19]!==i||t[20]!==a?(e=(0,L.jsx)(U,{...v,spec:i,value:a}),t[18]=v,t[19]=i,t[20]=a,t[21]=e):e=t[21];let n;return t[22]!==c||t[23]!==h||t[24]!==e?(n=(0,L.jsx)(B,{testId:c,header:h,children:e}),t[22]=c,t[23]=h,t[24]=e,t[25]=n):n=t[25],n}case`enum`:{let e;t[26]!==v||t[27]!==i||t[28]!==a?(e=(0,L.jsx)(W,{...v,spec:i,value:a}),t[26]=v,t[27]=i,t[28]=a,t[29]=e):e=t[29];let n;return t[30]!==c||t[31]!==h||t[32]!==e?(n=(0,L.jsx)(B,{testId:c,header:h,children:e}),t[30]=c,t[31]=h,t[32]=e,t[33]=n):n=t[33],n}case`integer`:{let e;t[34]!==v||t[35]!==i||t[36]!==a?(e=(0,L.jsx)(G,{...v,spec:i,value:a}),t[34]=v,t[35]=i,t[36]=a,t[37]=e):e=t[37];let n;return t[38]!==c||t[39]!==h||t[40]!==e?(n=(0,L.jsx)(B,{testId:c,header:h,children:e}),t[38]=c,t[39]=h,t[40]=e,t[41]=n):n=t[41],n}case`string`:{let e;t[42]!==v||t[43]!==i||t[44]!==a?(e=(0,L.jsx)(K,{...v,spec:i,value:a}),t[42]=v,t[43]=i,t[44]=a,t[45]=e):e=t[45];let n;return t[46]!==c||t[47]!==h||t[48]!==e?(n=(0,L.jsx)(V,{testId:c,header:h,children:e}),t[46]=c,t[47]=h,t[48]=e,t[49]=n):n=t[49],n}case`string-array`:{let e;t[50]!==v||t[51]!==i||t[52]!==a?(e=(0,L.jsx)(q,{...v,spec:i,value:a}),t[50]=v,t[51]=i,t[52]=a,t[53]=e):e=t[53];let n;return t[54]!==c||t[55]!==h||t[56]!==e?(n=(0,L.jsx)(V,{testId:c,header:h,children:e}),t[54]=c,t[55]=h,t[56]=e,t[57]=n):n=t[57],n}case`unsupported`:{let e=`${c}-unsupported`,n;t[58]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,L.jsx)(r,{id:`NQXwDy`}),t[58]=n):n=t[58];let i;t[59]===e?i=t[60]:(i=(0,L.jsx)(C,{variant:`gray`,"data-testid":e,children:n}),t[59]=e,t[60]=i);let a;return t[61]!==c||t[62]!==h||t[63]!==i?(a=(0,L.jsx)(B,{testId:c,header:h,children:i}),t[61]=c,t[62]=h,t[63]=i,t[64]=a):a=t[64],a}default:return i}}function B(e){let t=(0,F.c)(6),{testId:n,header:r,children:i}=e,a;t[0]===i?a=t[1]:(a=(0,L.jsx)(`div`,{className:`shrink-0`,children:i}),t[0]=i,t[1]=a);let o;return t[2]!==r||t[3]!==a||t[4]!==n?(o=(0,L.jsxs)(`div`,{className:`flex items-start justify-between gap-3`,"data-testid":n,children:[r,a]}),t[2]=r,t[3]=a,t[4]=n,t[5]=o):o=t[5],o}function V(e){let t=(0,F.c)(4),{testId:n,header:r,children:i}=e,a;return t[0]!==i||t[1]!==r||t[2]!==n?(a=(0,L.jsxs)(`div`,{className:`space-y-1.5`,"data-testid":n,children:[r,i]}),t[0]=i,t[1]=r,t[2]=n,t[3]=a):a=t[3],a}function H(e){return JSON.stringify(e)}function U(e){let t=(0,F.c)(8),{spec:n,value:r,controlId:i,descriptionId:a,disabled:o,onChange:s}=e,c=typeof r==`boolean`?r:n.default??!1,l;t[0]===s?l=t[1]:(l=e=>s(e),t[0]=s,t[1]=l);let u;return t[2]!==c||t[3]!==i||t[4]!==a||t[5]!==o||t[6]!==l?(u=(0,L.jsx)(y,{id:i,checked:c,disabled:o,"aria-describedby":a,onCheckedChange:l}),t[2]=c,t[3]=i,t[4]=a,t[5]=o,t[6]=l,t[7]=u):u=t[7],u}function W(e){let t=(0,F.c)(16),{spec:n,value:r,controlId:i,descriptionId:a,disabled:o,onChange:s}=e,c=typeof r==`string`?r:n.default??``,l;t[0]===s?l=t[1]:(l=e=>s(e),t[0]=s,t[1]=l);let u;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,L.jsx)(_,{}),t[2]=u):u=t[2];let d;t[3]!==i||t[4]!==a?(d=(0,L.jsx)(g,{id:i,"aria-describedby":a,className:`w-48`,children:u}),t[3]=i,t[4]=a,t[5]=d):d=t[5];let f;t[6]===n.enum?f=t[7]:(f=n.enum.map(ae),t[6]=n.enum,t[7]=f);let p;t[8]===f?p=t[9]:(p=(0,L.jsx)(h,{children:f}),t[8]=f,t[9]=p);let m;return t[10]!==c||t[11]!==o||t[12]!==l||t[13]!==d||t[14]!==p?(m=(0,L.jsxs)(v,{value:c,onValueChange:l,disabled:o,children:[d,p]}),t[10]=c,t[11]=o,t[12]=l,t[13]=d,t[14]=p,t[15]=m):m=t[15],m}function ae(e){return(0,L.jsx)(m,{value:e,children:e},e)}function G(e){let t=(0,F.c)(22),{spec:n,value:r,controlId:i,descriptionId:a,disabled:o,onChange:s}=e,c=typeof r==`number`?r:n.default,l=c===void 0?``:String(c),[u,d]=(0,I.useState)(l),f=(0,I.useRef)(c),p,m;t[0]===c?(p=t[1],m=t[2]):(p=()=>{f.current!==c&&(d(c===void 0?``:String(c)),f.current=c)},m=[c],t[0]=c,t[1]=p,t[2]=m),(0,I.useEffect)(p,m);let h;t[3]!==c||t[4]!==l||t[5]!==s||t[6]!==u||t[7]!==n.maximum||t[8]!==n.minimum?(h=()=>{if(u.trim()===``){d(l);return}let e=Number(u);if(!Number.isFinite(e)){d(l);return}let t=Math.round(e);n.minimum!==void 0&&t<n.minimum&&(t=n.minimum),n.maximum!==void 0&&t>n.maximum&&(t=n.maximum),d(String(t)),t!==c&&s(t)},t[3]=c,t[4]=l,t[5]=s,t[6]=u,t[7]=n.maximum,t[8]=n.minimum,t[9]=h):h=t[9];let g=h,_;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(_=e=>d(e.target.value),t[10]=_):_=t[10];let v;t[11]===g?v=t[12]:(v=e=>{e.key===`Enter`&&(e.preventDefault(),g())},t[11]=g,t[12]=v);let y;return t[13]!==g||t[14]!==i||t[15]!==a||t[16]!==o||t[17]!==u||t[18]!==n.maximum||t[19]!==n.minimum||t[20]!==v?(y=(0,L.jsx)(T,{id:i,type:`number`,value:u,min:n.minimum,max:n.maximum,disabled:o,"aria-describedby":a,onChange:_,onBlur:g,onKeyDown:v,className:`h-8 w-28 text-sm tabular-nums`}),t[13]=g,t[14]=i,t[15]=a,t[16]=o,t[17]=u,t[18]=n.maximum,t[19]=n.minimum,t[20]=v,t[21]=y):y=t[21],y}function K(e){let t=(0,F.c)(17),{spec:n,value:r,controlId:i,descriptionId:a,disabled:o,onChange:s}=e,c=typeof r==`string`?r:n.default??``,[l,u]=(0,I.useState)(c),d=(0,I.useRef)(c),f,p;t[0]===c?(f=t[1],p=t[2]):(f=()=>{d.current!==c&&(u(c),d.current=c)},p=[c],t[0]=c,t[1]=f,t[2]=p),(0,I.useEffect)(f,p);let m;t[3]!==c||t[4]!==s||t[5]!==l?(m=()=>{l!==c&&s(l)},t[3]=c,t[4]=s,t[5]=l,t[6]=m):m=t[6];let h=m,g;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(g=e=>u(e.target.value),t[7]=g):g=t[7];let _;t[8]===h?_=t[9]:(_=e=>{e.key===`Enter`&&(e.preventDefault(),h())},t[8]=h,t[9]=_);let v;return t[10]!==h||t[11]!==i||t[12]!==a||t[13]!==o||t[14]!==l||t[15]!==_?(v=(0,L.jsx)(T,{id:i,value:l,disabled:o,"aria-describedby":a,onChange:g,onBlur:h,onKeyDown:_,className:`h-8 font-mono text-sm`}),t[10]=h,t[11]=i,t[12]=a,t[13]=o,t[14]=l,t[15]=_,t[16]=v):v=t[16],v}function q(e){let t=(0,F.c)(11),{spec:n,value:r,controlId:i,descriptionId:a,disabled:o,onChange:s}=e,c;t[0]!==n||t[1]!==r?(c=Array.isArray(r)?r.filter(J):[...n.default??[]],t[0]=n,t[1]=r,t[2]=c):c=t[2];let l=c,u;t[3]===s?u=t[4]:(u=e=>s(e),t[3]=s,t[4]=u);let d;return t[5]!==i||t[6]!==a||t[7]!==o||t[8]!==l||t[9]!==u?(d=(0,L.jsx)(P,{id:i,value:l,grammar:`free-text`,disabled:o,"aria-describedby":a,onChange:u}),t[5]=i,t[6]=a,t[7]=o,t[8]=l,t[9]=u,t[10]=d):d=t[10],d}function J(e){return typeof e==`string`}function oe(e){let t=(0,F.c)(53),n;t[0]===e?n=t[1]:(n=e===void 0?{}:e,t[0]=e,t[1]=n);let{hideConfigSourceNote:a,initialRuleQuery:o}=n,s=a===void 0?!1:a,{_:c}=i(),{data:m}=M(),h=m!==null,g;t[2]===m?.effective.plugins.markdownlint.rules?g=t[3]:(g=m?.effective.plugins.markdownlint.rules??{},t[2]=m?.effective.plugins.markdownlint.rules,t[3]=g);let _=g,v=m?.configFile??null,[y,ee]=(0,I.useState)(o?.query??``),[x,ne]=(0,I.useState)(!1),C=o?.nonce,w=o?.query,E,D;t[4]!==C||t[5]!==w?(E=()=>{C===void 0||w===void 0||ee(w)},D=[C,w],t[4]=C,t[5]=w,t[6]=E,t[7]=D):(E=t[6],D=t[7]),(0,I.useEffect)(E,D);let P;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(P=[],t[8]=P):P=t[8];let[R,ie]=(0,I.useState)(P),z;t[9]===c?z=t[10]:(z=function(e,t){N(e,t).then(e=>{if(!e.ok){b.error(e.errorDetail??c({id:`2G-56b`}));return}re()})},t[9]=c,t[10]=z);let B=z,V;t[11]!==x||t[12]!==y?(V=y.trim()!==``||x,t[11]=x,t[12]=y,t[13]=V):V=t[13];let H=V,U;if(t[14]!==c||t[15]!==R||t[16]!==v||t[17]!==H||t[18]!==s||t[19]!==x||t[20]!==h||t[21]!==_||t[22]!==y||t[23]!==B){let e;t[25]!==v||t[26]!==x||t[27]!==_||t[28]!==y?(e=e=>le(e,y)&&(!x||se(_,v,e.id)),t[25]=v,t[26]=x,t[27]=_,t[28]=y,t[29]=e):e=t[29];let n=A.filter(e),i=k.map(e=>({category:e,entries:n.filter(t=>O(t)===e)})).filter(Y),a;t[30]!==v||t[31]!==s||t[32]!==h?(a=!s&&(h?v?(0,L.jsx)(`p`,{className:`text-sm text-muted-foreground`,"data-testid":`markdownlint-config-source-note`,children:(0,L.jsx)(r,{id:`V2Gmie`,values:{configFile:v},components:{0:(0,L.jsx)(`code`,{className:`rounded bg-muted px-1 py-0.5 font-mono text-xs`})}})}):(0,L.jsxs)(`div`,{className:`space-y-2`,children:[(0,L.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:(0,L.jsx)(r,{id:`Z6rrjc`,components:{0:(0,L.jsx)(`code`,{className:`rounded bg-muted px-1 py-0.5 font-mono text-xs`})}})}),(0,L.jsxs)(`p`,{className:`flex items-start gap-1.5 rounded-md border border-dashed p-2.5 text-sm text-muted-foreground`,"data-testid":`markdownlint-no-file-disclaimer`,children:[(0,L.jsx)(S,{"aria-hidden":!0,className:`mt-0.5 size-4 shrink-0`}),(0,L.jsx)(`span`,{children:(0,L.jsx)(r,{id:`Te6sK2`,components:{0:(0,L.jsx)(`code`,{className:`rounded bg-muted px-1 py-0.5 font-mono text-xs`})}})})]})]}):(0,L.jsxs)(`div`,{className:`space-y-2`,"aria-busy":`true`,"data-testid":`markdownlint-rule-browser-config-loading`,children:[(0,L.jsx)(j,{className:`h-4 w-full`}),(0,L.jsx)(j,{className:`h-4 w-2/3`})]})),t[30]=v,t[31]=s,t[32]=h,t[33]=a):a=t[33];let o;t[34]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,L.jsx)(`p`,{className:`text-sm text-muted-foreground`,"data-testid":`markdownlint-rule-browser-legend`,children:(0,L.jsx)(r,{id:`zYp8Sr`,components:{0:(0,L.jsx)(`span`,{className:`font-medium text-foreground`}),1:(0,L.jsx)(`code`,{className:`rounded bg-muted px-1 py-0.5 font-mono text-xs`})}})}),t[34]=o):o=t[34];let m;t[35]===Symbol.for(`react.memo_cache_sentinel`)?(m=e=>ee(e.target.value),t[35]=m):m=t[35];let g;t[36]===c?g=t[37]:(g=c({id:`l-4nnw`}),t[36]=c,t[37]=g);let b;t[38]===c?b=t[39]:(b=c({id:`yf5auF`}),t[38]=c,t[39]=b);let C;t[40]!==y||t[41]!==g||t[42]!==b?(C=(0,L.jsx)(T,{value:y,onChange:m,placeholder:g,"aria-label":b,className:`h-8`,"data-testid":`markdownlint-rule-search`}),t[40]=y,t[41]=g,t[42]=b,t[43]=C):C=t[43];let w;t[44]===Symbol.for(`react.memo_cache_sentinel`)?(w=e=>ne(e===!0),t[44]=w):w=t[44];let E;t[45]===x?E=t[46]:(E=(0,L.jsx)(f,{id:`markdownlint-only-modified`,checked:x,onCheckedChange:w,"data-testid":`markdownlint-only-modified`}),t[45]=x,t[46]=E);let D;t[47]===Symbol.for(`react.memo_cache_sentinel`)?(D=(0,L.jsx)(p,{htmlFor:`markdownlint-only-modified`,className:`text-sm font-normal`,children:(0,L.jsx)(r,{id:`ccNps_`})}),t[47]=D):D=t[47];let M;t[48]===E?M=t[49]:(M=(0,L.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2`,children:[E,D]}),t[48]=E,t[49]=M);let N;t[50]!==C||t[51]!==M?(N=(0,L.jsxs)(`div`,{className:`flex items-center gap-4`,children:[C,M]}),t[50]=C,t[51]=M,t[52]=N):N=t[52],U=(0,L.jsxs)(`div`,{className:`space-y-3`,"data-testid":`settings-linting-markdownlint-rules`,children:[a,o,N,i.length===0?(0,L.jsx)(`p`,{className:`rounded-md border border-dashed p-3 text-sm text-muted-foreground`,"data-testid":`markdownlint-rule-browser-empty`,children:(0,L.jsx)(r,{id:`RfilGt`})}):(0,L.jsx)(`div`,{className:`space-y-2`,children:i.map(e=>{let{category:t,entries:n}=e,i=n.filter(e=>ue($(_,e.id))).length;return(0,L.jsxs)(d,{open:H||!R.includes(t),onOpenChange:e=>ie(e?R.filter(e=>e!==t):[...R,t]),children:[(0,L.jsxs)(u,{className:`group flex w-full items-center gap-2 rounded-md px-1.5 py-1.5 text-sm font-medium hover:bg-muted/50`,"data-testid":`markdownlint-rule-category-${Q(t)}`,children:[(0,L.jsx)(te,{className:`size-4 shrink-0 text-muted-foreground transition-transform group-data-[state=open]:rotate-90 motion-reduce:transition-none`}),(0,L.jsx)(Z,{category:t}),(0,L.jsx)(`span`,{className:`ms-auto text-xs font-normal text-muted-foreground tabular-nums`,children:(0,L.jsx)(r,{id:`NgZwB0`,values:{0:n.length,enabledCount:i}})})]}),(0,L.jsx)(l,{children:(0,L.jsx)(`div`,{className:`mt-1 divide-y rounded-md border`,children:n.map(e=>(0,L.jsx)(X,{rule:e,value:$(_,e.id),modified:se(_,v,e.id),ready:h,onWrite:t=>B(e.id,t)},e.id))})})]},t)})})]}),t[14]=c,t[15]=R,t[16]=v,t[17]=H,t[18]=s,t[19]=x,t[20]=h,t[21]=_,t[22]=y,t[23]=B,t[24]=U}else U=t[24];return U}function Y(e){return e.entries.length>0}function X(e){let t=(0,F.c)(96),{rule:n,value:a,modified:f,ready:p,onWrite:m}=e,{_:h}=i(),g;t[0]===a?g=t[1]:(g=ue(a),t[0]=a,t[1]=g);let _=g,v;t[2]===a?v=t[3]:(v=ce(a),t[2]=a,t[3]=v);let b=v,S,w,T,D,O,k,A;if(t[4]!==n.id||t[5]!==n.name||t[6]!==a){w=de(a),S=d,A=`markdownlint-rule-row-${n.id}`,O=`flex items-center justify-between gap-3 px-3 py-2`;let e=`markdownlint-rule-expand-${n.id}`,i;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,L.jsx)(te,{className:`size-4 shrink-0 text-muted-foreground transition-transform group-data-[state=open]:rotate-90 motion-reduce:transition-none`}),t[14]=i):i=t[14];let o;t[15]===n.name?o=t[16]:(o=(0,L.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-sm text-foreground`,children:n.name}),t[15]=n.name,t[16]=o),t[17]!==o||t[18]!==e?(k=(0,L.jsxs)(u,{className:`group flex min-w-0 flex-1 items-center gap-1.5 rounded-md py-0.5 text-left hover:bg-muted/50`,"data-testid":e,children:[i,o]}),t[17]=o,t[18]=e,t[19]=k):k=t[19],T=`flex shrink-0 items-center gap-2`,D=w.length>0?(0,L.jsx)(`span`,{id:`settings-linting-markdownlint-options-${n.id}`,className:`text-xs text-muted-foreground`,title:w.join(`, `),"data-testid":`settings-linting-markdownlint-options-${n.id}`,children:(0,L.jsx)(r,{id:`G-h6qN`,values:{0:w.length}})}):null,t[4]=n.id,t[5]=n.name,t[6]=a,t[7]=S,t[8]=w,t[9]=T,t[10]=D,t[11]=O,t[12]=k,t[13]=A}else S=t[7],w=t[8],T=t[9],D=t[10],O=t[11],k=t[12],A=t[13];let j;t[20]!==n.id||t[21]!==b?(j=b===null?null:(0,L.jsx)(C,{variant:`gray`,"data-testid":`markdownlint-rule-severity-${n.id}`,children:b}),t[20]=n.id,t[21]=b,t[22]=j):j=t[22];let M;t[23]!==f||t[24]!==n.id?(M=f?(0,L.jsx)(C,{variant:`outline`,"data-testid":`markdownlint-rule-modified-${n.id}`,children:(0,L.jsx)(r,{id:`tgWuMB`})}):null,t[23]=f,t[24]=n.id,t[25]=M):M=t[25];let N;t[26]!==h||t[27]!==f||t[28]!==m||t[29]!==p||t[30]!==n.id?(N=f?(0,L.jsxs)(c,{children:[(0,L.jsx)(o,{asChild:!0,children:(0,L.jsx)(ee,{variant:`ghost`,size:`icon`,className:`h-5 w-5 shrink-0 text-muted-foreground opacity-60 hover:opacity-100`,disabled:!p,"aria-label":h({id:`50ORFs`,values:{0:n.id}}),onClick:()=>m(null),children:(0,L.jsx)(ne,{className:`size-3.5`})})}),(0,L.jsx)(s,{children:(0,L.jsx)(r,{id:`L-rMC9`})})]}):null,t[26]=h,t[27]=f,t[28]=m,t[29]=p,t[30]=n.id,t[31]=N):N=t[31];let re=`markdownlint-rule-toggle-${n.id}`,P=!p,I;t[32]!==h||t[33]!==_||t[34]!==n.name?(I=h(_?{id:`y5UgU8`,values:{0:n.name}}:{id:`FZtBeR`,values:{0:n.name}}),t[32]=h,t[33]=_,t[34]=n.name,t[35]=I):I=t[35];let R=w.length>0?`settings-linting-markdownlint-options-${n.id}`:void 0,z;t[36]!==m||t[37]!==a?(z=e=>m(fe(a,e)),t[36]=m,t[37]=a,t[38]=z):z=t[38];let B=`markdownlint-rule-toggle-${n.id}`,V;t[39]!==_||t[40]!==re||t[41]!==P||t[42]!==I||t[43]!==R||t[44]!==z||t[45]!==B?(V=(0,L.jsx)(y,{id:re,checked:_,disabled:P,"aria-label":I,"aria-describedby":R,onCheckedChange:z,"data-testid":B}),t[39]=_,t[40]=re,t[41]=P,t[42]=I,t[43]=R,t[44]=z,t[45]=B,t[46]=V):V=t[46];let H;t[47]!==N||t[48]!==V||t[49]!==T||t[50]!==D||t[51]!==j||t[52]!==M?(H=(0,L.jsxs)(`div`,{className:T,children:[D,j,M,N,V]}),t[47]=N,t[48]=V,t[49]=T,t[50]=D,t[51]=j,t[52]=M,t[53]=H):H=t[53];let U;t[54]!==H||t[55]!==O||t[56]!==k?(U=(0,L.jsxs)(`div`,{className:O,children:[k,H]}),t[54]=H,t[55]=O,t[56]=k,t[57]=U):U=t[57];let W;t[58]!==n.alias||t[59]!==n.id?(W=(0,L.jsxs)(`span`,{className:`font-mono`,children:[n.id,` · `,n.alias]}),t[58]=n.alias,t[59]=n.id,t[60]=W):W=t[60];let ae=n.docUrl,G,K;t[61]===n.docUrl?(G=t[62],K=t[63]):(G=e=>E(e,n.docUrl),K=e=>E(e,n.docUrl),t[61]=n.docUrl,t[62]=G,t[63]=K);let q;t[64]!==h||t[65]!==n.id?(q=h({id:`iv452l`,values:{0:n.id}}),t[64]=h,t[65]=n.id,t[66]=q):q=t[66];let J,oe;t[67]===Symbol.for(`react.memo_cache_sentinel`)?(J=(0,L.jsx)(r,{id:`TvY_XA`}),oe=(0,L.jsx)(x,{"aria-hidden":!0,className:`size-3`}),t[67]=J,t[68]=oe):(J=t[67],oe=t[68]);let Y;t[69]!==n.docUrl||t[70]!==G||t[71]!==K||t[72]!==q?(Y=(0,L.jsxs)(`a`,{href:ae,target:`_blank`,rel:`noopener noreferrer`,onClick:G,onAuxClick:K,"aria-label":q,className:`inline-flex items-center gap-0.5 text-muted-foreground underline-offset-2 hover:text-foreground hover:underline`,children:[J,oe]}),t[69]=n.docUrl,t[70]=G,t[71]=K,t[72]=q,t[73]=Y):Y=t[73];let X;t[74]!==W||t[75]!==Y?(X=(0,L.jsxs)(`p`,{className:`text-1sm text-muted-foreground`,children:[W,` · `,Y]}),t[74]=W,t[75]=Y,t[76]=X):X=t[76];let Z;if(t[77]!==m||t[78]!==p||t[79]!==n.id||t[80]!==n.options||t[81]!==a){let e;t[83]!==m||t[84]!==p||t[85]!==n.id||t[86]!==a?(e=e=>(0,L.jsx)(ie,{ruleId:n.id,spec:e,value:me(a,e.key),disabled:!p,onChange:t=>m(pe(a,e.key,t))},e.key),t[83]=m,t[84]=p,t[85]=n.id,t[86]=a,t[87]=e):e=t[87],Z=n.options.map(e),t[77]=m,t[78]=p,t[79]=n.id,t[80]=n.options,t[81]=a,t[82]=Z}else Z=t[82];let Q;t[88]!==X||t[89]!==Z?(Q=(0,L.jsx)(l,{className:`overflow-hidden data-[state=open]:animate-[collapsible-down_150ms_ease-out] data-[state=closed]:animate-[collapsible-up_150ms_ease-in]`,children:(0,L.jsxs)(`div`,{className:`space-y-3 px-3 pb-3 pt-1`,children:[X,Z]})}),t[88]=X,t[89]=Z,t[90]=Q):Q=t[90];let $;return t[91]!==S||t[92]!==U||t[93]!==Q||t[94]!==A?($=(0,L.jsxs)(S,{"data-testid":A,children:[U,Q]}),t[91]=S,t[92]=U,t[93]=Q,t[94]=A,t[95]=$):$=t[95],$}function Z(e){let t=(0,F.c)(6),{category:n}=e;switch(n){case`Headings`:{let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,L.jsx)(r,{id:`PKjGhT`}),t[0]=e):e=t[0],e}case`Lists`:{let e;return t[1]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,L.jsx)(r,{id:`h16FyT`}),t[1]=e):e=t[1],e}case`Whitespace`:{let e;return t[2]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,L.jsx)(r,{id:`iIaSUD`}),t[2]=e):e=t[2],e}case`Code`:{let e;return t[3]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,L.jsx)(r,{id:`EWPtMO`}),t[3]=e):e=t[3],e}case`Links & images`:{let e;return t[4]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,L.jsx)(r,{id:`-kbIAr`}),t[4]=e):e=t[4],e}case`Style`:{let e;return t[5]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,L.jsx)(r,{id:`1CalO6`}),t[5]=e):e=t[5],e}default:return n}}function Q(e){return e.toLowerCase().replace(/[^a-z]+/g,`-`).replace(/^-|-$/g,``)}function $(e,t){let n=D(e,t);return n===void 0?e.default??!0:n.value}function se(e,t,n){return t!==null&&D(e,n)!==void 0}function ce(e){return typeof e==`string`?e:null}function le(e,t){let n=t.trim().toLowerCase();return n===``?!0:e.id.toLowerCase().includes(n)||e.alias.toLowerCase().includes(n)||e.name.toLowerCase().includes(n)}function ue(e){return typeof e!=`object`||!e?e!==!1:e.enabled!==!1}function de(e){return typeof e!=`object`||!e?[]:Object.keys(e).filter(e=>e!==`enabled`)}function fe(e,t){if(typeof e!=`object`||!e)return t;let n={};for(let t of Object.keys(e))t!==`enabled`&&(n[t]=e[t]);return Object.keys(n).length===0?t:t?n:{...n,enabled:!1}}function pe(e,t,n){return typeof e==`object`&&e?{...e,[t]:n}:e===!1?{enabled:!1,[t]:n}:{[t]:n}}function me(e,t){if(!(typeof e!=`object`||!e))return e[t]}export{oe as t};