@inkeep/open-knowledge 0.42.0-beta.2 → 0.42.0-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{acp-harness-probe-Du_PVB_P.mjs → acp-harness-probe-ChUiXq4Y.mjs} +2 -2
- package/dist/assets/skills/discovery/SKILL.md +1 -1
- package/dist/assets/skills/project/SKILL.md +2 -2
- package/dist/assets/skills/project/references/components-and-visuals.md +4 -0
- package/dist/assets/skills/write-skill/SKILL.md +1 -1
- package/dist/assets/skills/write-skill/references/pressure-testing.md +1 -1
- package/dist/cli.mjs +7 -7
- package/dist/constants-Do1hpvs-.mjs +2 -0
- package/dist/{git-handle-JgY8Ytwb.mjs → git-handle-BFhoHYr0.mjs} +2 -2
- package/dist/git-handle-CRnnMEIm.mjs +1 -0
- package/dist/index.mjs +1 -1
- package/dist/init-BC0lVj9G.mjs +1 -0
- package/dist/{init-DEzyD1YK.mjs → init-o3oVQbkm.mjs} +3 -3
- package/dist/{launch-json-removal-CbMg4I0R.mjs → launch-json-removal-5A8Lrjdh.mjs} +2 -2
- package/dist/{loader-DO9rcR2q.mjs → loader-b0Jnp3-m.mjs} +2 -2
- package/dist/loader-xZjZfXpn.mjs +1 -0
- package/dist/md-manager-CAqfesEA.mjs +2 -0
- package/dist/{open-browser-BqBGMi_2.mjs → open-browser-Be1y1t9d.mjs} +2 -2
- package/dist/parse-worker.mjs +1 -1
- package/dist/preview-Bi-j3iwm.mjs +1 -0
- package/dist/{preview-7FhIhdGC.mjs → preview-Zqg7QABJ.mjs} +2 -2
- package/dist/public/assets/{ActivityModeContent-5kzpB8WF.js → ActivityModeContent-CnhDNi-c.js} +1 -1
- package/dist/public/assets/{AgentDiffPane-CH_Uedi-.js → AgentDiffPane-BKvov9S5.js} +1 -1
- package/dist/public/assets/{AgentThreadClientBinder-D_oI6JYB.js → AgentThreadClientBinder-MaSL3zla.js} +1 -1
- package/dist/public/assets/{CodeMirrorPropInput-C5y2rXYX.js → CodeMirrorPropInput-ZGACWLSy.js} +1 -1
- package/dist/public/assets/{DocumentContext-fuUQIepk.js → DocumentContext-DDkluS7D.js} +4 -4
- package/dist/public/assets/{EditorModeToggle-v_8_QyqL.js → EditorModeToggle-D0Db8Ydu.js} +1 -1
- package/dist/public/assets/{EnableSyncConfirmDialog-DGzRLORN.js → EnableSyncConfirmDialog-B2sHRtLY.js} +1 -1
- package/dist/public/assets/FeedbackForm-DuEQbMOb.js +1 -0
- package/dist/public/assets/{GraphPanel-Bp-rgKAp.js → GraphPanel-1CKwHElx.js} +1 -1
- package/dist/public/assets/{LintConfigEditor-P94jXYrX.js → LintConfigEditor-DKgxJcvl.js} +1 -1
- package/dist/public/assets/{ManagedArtifactProperties-fjWoKeUA.js → ManagedArtifactProperties-9e_jj3hZ.js} +1 -1
- package/dist/public/assets/{McpConsentDialogBody-DQKGlIrW.js → McpConsentDialogBody-CYOKF_sf.js} +1 -1
- package/dist/public/assets/{MermaidDocEditor-LMmhg9P3.js → MermaidDocEditor-BNURUYJE.js} +1 -1
- package/dist/public/assets/{PropertyPanel-DP1c3fMs.js → PropertyPanel-BMIcO_AS.js} +1 -1
- package/dist/public/assets/{ReportBugDialogBody-CN9m_7Kk.js → ReportBugDialogBody-ByMe7BRT.js} +1 -1
- package/dist/public/assets/{SchemaConfigEditor-DgQ8bbvw.js → SchemaConfigEditor-D7xbhgl6.js} +1 -1
- package/dist/public/assets/{SettingsDialogBody-tm_Zr9wy.js → SettingsDialogBody-Bkz3Bpgp.js} +1 -1
- package/dist/public/assets/{ShareBranchSwitchDialog-C5BWlfbq.js → ShareBranchSwitchDialog-C6G5A_aK.js} +1 -1
- package/dist/public/assets/{ShareReceiveDialog-CI2Mloot.js → ShareReceiveDialog-DLEkjmkI.js} +1 -1
- package/dist/public/assets/{ShareReceiveMissDialog-ohgoelQ3.js → ShareReceiveMissDialog-Ls1ECEge.js} +1 -1
- package/dist/public/assets/{SkillEditorActions-B3vkquAC.js → SkillEditorActions-AGeWFFyT.js} +1 -1
- package/dist/public/assets/{SourceEditor-BS9xKRLC.js → SourceEditor-DI6JkRTr.js} +1 -1
- package/dist/public/assets/{TerminalPanel-BNrFiNj3.js → TerminalPanel-Bf_h8SIB.js} +1 -1
- package/dist/public/assets/{TerminalSessionsHost-1SkLbZxP.js → TerminalSessionsHost-B2cWbpj-.js} +2 -2
- package/dist/public/assets/{TerminalWindowApp-CcIKz82K.js → TerminalWindowApp-2yCXBcQc.js} +1 -1
- package/dist/public/assets/{ThreadView-DbEiSAgi.js → ThreadView-D2BFrI_O.js} +1 -1
- package/dist/public/assets/{TimelineDiffPane-BRIL_hOz.js → TimelineDiffPane-B9KqEt7q.js} +1 -1
- package/dist/public/assets/{agent-diff-store-CL1zJhM8.js → agent-diff-store-Bi0IQPgd.js} +1 -1
- package/dist/public/assets/{agent-visibility-DboUkSIR.js → agent-visibility-HpfSUFqP.js} +1 -1
- package/dist/public/assets/{auth-state-cache-CnTQSDtz.js → auth-state-cache-BUVYaS5m.js} +1 -1
- package/dist/public/assets/{client-version-Cx5VddNZ.js → client-version-FVbajnsJ.js} +1 -1
- package/dist/public/assets/{config-provider-BvRqIV8_.js → config-provider-DIuwNlqX.js} +1 -1
- package/dist/public/assets/{dist-CRnLx168.js → dist-Cal4LUep.js} +148 -148
- package/dist/public/assets/{doc-hash-DaHNz5tZ.js → doc-hash-BSK-KaTu.js} +1 -1
- package/dist/public/assets/{documents-events-CO5GMB1j.js → documents-events-1HWCdfoh.js} +1 -1
- package/dist/public/assets/{file-tree-adapter-CMkAk18U.js → file-tree-adapter-Dw7Dgyj1.js} +1 -1
- package/dist/public/assets/{file-tree-utils-DW5kpGI7.js → file-tree-utils-DiUPuK3N.js} +1 -1
- package/dist/public/assets/{index-lO6NOXfq.js → index-Bh6-_Nba.js} +96 -96
- package/dist/public/assets/{lint-config-client-ClOK3XHG.js → lint-config-client-G_mrikOJ.js} +1 -1
- package/dist/public/assets/{markdownlint-rule-browser-BkNWMW9T.js → markdownlint-rule-browser-rS3aDGOb.js} +1 -1
- package/dist/public/assets/{navigation-targets-BvMgbXSl.js → navigation-targets-Ci2h-vaL.js} +1 -1
- package/dist/public/assets/{open-managed-artifact-tab-uWUnYmu7.js → open-managed-artifact-tab-DfGutPkc.js} +1 -1
- package/dist/public/assets/{pending-receive-nav-store-ZP5ClzoO.js → pending-receive-nav-store-BuGLGemz.js} +1 -1
- package/dist/public/assets/{prop-types-CaVq0ILj.js → prop-types-B-N3_i3c.js} +1 -1
- package/dist/public/assets/{receive-store-O26Klsmj.js → receive-store-CL0RH8Oa.js} +1 -1
- package/dist/public/assets/{selection-context-D1dfmp_3.js → selection-context-zsjvL-8N.js} +1 -1
- package/dist/public/assets/{skill-actions-BOEtYQao.js → skill-actions-C_5-d4BC.js} +1 -1
- package/dist/public/assets/{skills-api-BxZRuTIF.js → skills-api-ChYiP1Zv.js} +1 -1
- package/dist/public/assets/{src-BPnSaHfB.js → src-D8jPu2QV.js} +1 -1
- package/dist/public/assets/{tag-pill-input-D3yKn_j2.js → tag-pill-input-B27HgfRy.js} +1 -1
- package/dist/public/assets/{target-navigation-intent-DKN8qckv.js → target-navigation-intent-ClG4AlV8.js} +1 -1
- package/dist/public/assets/{terminal-launch-events-cbz64adZ.js → terminal-launch-events-N4CMVbPT.js} +1 -1
- package/dist/public/assets/{terminal-telemetry-B-8TrAWX.js → terminal-telemetry-DxTZB2oZ.js} +1 -1
- package/dist/public/assets/{typing-burst-detector-u3Nddbn5.js → typing-burst-detector-BP7d86JP.js} +1 -1
- package/dist/public/assets/{uninstall-B_24eCu8.js → uninstall-DHjtqCbn.js} +1 -1
- package/dist/public/assets/{use-activity-panel-DfbfDD9Z.js → use-activity-panel-35_3901z.js} +1 -1
- package/dist/public/assets/{use-apply-config-color-theme-CsOxA7Ln.js → use-apply-config-color-theme-CK97Jvup.js} +1 -1
- package/dist/public/assets/{use-collab-url-DKVO0F_k.js → use-collab-url-D0INpn_f.js} +1 -1
- package/dist/public/assets/{use-live-xterm-theme-DxXMX-ZB.js → use-live-xterm-theme-C-fHLeXw.js} +1 -1
- package/dist/public/assets/{use-settings-route-R3f95s9q.js → use-settings-route-CXFzIfYo.js} +1 -1
- package/dist/public/assets/{use-terminal-enabled-FmmwhtBs.js → use-terminal-enabled-fhwpyN81.js} +1 -1
- package/dist/public/assets/{use-timeline-entry-diff-B4mNkRPy.js → use-timeline-entry-diff-CHWJnnz2.js} +1 -1
- package/dist/public/assets/{use-workspace-DQ7VjlT1.js → use-workspace-3T40FR83.js} +1 -1
- package/dist/public/assets/{workspace-paths-CFyvLimb.js → workspace-paths-B-NChZS2.js} +1 -1
- package/dist/public/index.html +35 -35
- package/dist/public/uninstall.html +2 -2
- package/dist/{repair-launch-json-LkGq6bbj.mjs → repair-launch-json-4OYtLMnw.mjs} +2 -2
- package/dist/{repair-mcp-configs-xbGF2ooR.mjs → repair-mcp-configs-BLJJ9tZq.mjs} +2 -2
- package/dist/repair-skills-B1Zc-g_X.mjs +1 -0
- package/dist/{repair-skills-C0Geadpr.mjs → repair-skills-CBmnNSO7.mjs} +2 -2
- package/dist/server-lock-DKRUWCqU.mjs +1 -0
- package/dist/{server-lock-rqh-yT8R.mjs → server-lock-vdpThyb4.mjs} +2 -2
- package/dist/{src-Dex2lDDb.mjs → src-D5V8i8YL.mjs} +2 -2
- package/dist/{src-Q2mWJGdH.mjs → src-DtcKZLt0.mjs} +116 -116
- package/dist/{src-phea8qFf.mjs → src-mOlBaMpr.mjs} +8 -6
- package/dist/{src-DF_K89lg.mjs → src-o9XsfdYT.mjs} +1 -1
- package/dist/{start-BprUXI6x.mjs → start-9cYd5WRC.mjs} +2 -2
- package/dist/start-JsQQrTQk.mjs +1 -0
- package/dist/{write-project-skill-CG87XS-d.mjs → write-project-skill-B_HecSEZ.mjs} +2 -2
- package/package.json +4 -4
- package/dist/constants-Jq21Pm6p.mjs +0 -2
- package/dist/git-handle-maG17s4k.mjs +0 -1
- package/dist/init-BBYxg46o.mjs +0 -1
- package/dist/loader-DtiWOOTx.mjs +0 -1
- package/dist/md-manager-BHEZ9tjn.mjs +0 -2
- package/dist/preview-Bt_EkZoA.mjs +0 -1
- package/dist/public/assets/FeedbackForm-CZgsAWY7.js +0 -1
- package/dist/repair-skills-D19a_XVe.mjs +0 -1
- package/dist/server-lock-DUfHjP3M.mjs +0 -1
- package/dist/start-kk-goUtr.mjs +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./dist-DNwOaDhC.js","./chunk-CYidjpOJ.js","./w3c-keyname-DtWCia6R.js","./dist-CP0xcBf_.js","./dist-ioWbCXab.js","./dist-BObw0jPE.js","./dist-CiPafPDy.js","./dist-BR00oFrA2.js","./dist-DGzvBIzr.js","./dist-DifRwKW-.js","./dist-d-7NE8aL.js","./dist-BF6U-ayK.js","./dist-C7rVxfRB.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./preload-helper-Chd9yIcd.js";import{t as n}from"./jsx-runtime-BUgB2tll.js";import{t as r}from"./react-f2sANaYj.js";import{n as i,r as a}from"./dist-Nvb76hAm.js";import{n as o}from"./dist-PQ5KMVDh.js";import{t as s}from"./compiler-runtime-BfE3aGVn.js";import{s as c}from"./createLucideIcon-DAkhoPjT.js";import{t as l}from"./button-Gol9BgNB.js";import{i as u,n as d,t as f}from"./tooltip-B4J7VHmA.js";import{s as p}from"./switch-DYic2V-1.js";import{n as m,t as h}from"./toggle-group-CjXmmTGy.js";import{Fa as g,ka as _}from"./dist-CRnLx168.js";import{n as v}from"./dist-BLAMau9Z.js";import{t as y}from"./file-tree-utils-DW5kpGI7.js";import"./config-provider-BvRqIV8_.js";import{Ot as b,X as x}from"./dist-DNwOaDhC.js";import{n as S,t as C}from"./esm-HV7Pxfbn.js";import{n as w}from"./config-context-gd3BC-iY.js";import{t as T}from"./dist-B1qkpf98.js";var E=e(r(),1),D=s(),O=new Map;function k(e){let t=O.get(e);if(t)return t;let n=A(e);return O.set(e,n),n}async function A(e){switch(e){case`bash`:case`shell`:return(await t(async()=>{let{StreamLanguage:e}=await import(`./dist-DNwOaDhC.js`).then(e=>e.h);return{StreamLanguage:e}},__vite__mapDeps([0,1,2]),import.meta.url)).StreamLanguage.define((await t(async()=>{let{shell:e}=await import(`./shell-BvVJAeXE.js`);return{shell:e}},[],import.meta.url)).shell);case`c`:return(await t(async()=>{let{StreamLanguage:e}=await import(`./dist-DNwOaDhC.js`).then(e=>e.h);return{StreamLanguage:e}},__vite__mapDeps([0,1,2]),import.meta.url)).StreamLanguage.define((await t(async()=>{let{c:e}=await import(`./clike-CkWR_Slw.js`);return{c:e}},[],import.meta.url)).c);case`cpp`:return(await t(async()=>{let{StreamLanguage:e}=await import(`./dist-DNwOaDhC.js`).then(e=>e.h);return{StreamLanguage:e}},__vite__mapDeps([0,1,2]),import.meta.url)).StreamLanguage.define((await t(async()=>{let{cpp:e}=await import(`./clike-CkWR_Slw.js`);return{cpp:e}},[],import.meta.url)).cpp);case`csharp`:return(await t(async()=>{let{StreamLanguage:e}=await import(`./dist-DNwOaDhC.js`).then(e=>e.h);return{StreamLanguage:e}},__vite__mapDeps([0,1,2]),import.meta.url)).StreamLanguage.define((await t(async()=>{let{csharp:e}=await import(`./clike-CkWR_Slw.js`);return{csharp:e}},[],import.meta.url)).csharp);case`css`:case`less`:case`scss`:return(await t(async()=>{let{css:e}=await import(`./dist-CP0xcBf_.js`).then(e=>e.r);return{css:e}},__vite__mapDeps([3,1,0,2,4]),import.meta.url)).css().language;case`diff`:return(await t(async()=>{let{StreamLanguage:e}=await import(`./dist-DNwOaDhC.js`).then(e=>e.h);return{StreamLanguage:e}},__vite__mapDeps([0,1,2]),import.meta.url)).StreamLanguage.define((await t(async()=>{let{diff:e}=await import(`./diff-BsdYbIgD.js`);return{diff:e}},[],import.meta.url)).diff);case`go`:return(await t(async()=>{let{StreamLanguage:e}=await import(`./dist-DNwOaDhC.js`).then(e=>e.h);return{StreamLanguage:e}},__vite__mapDeps([0,1,2]),import.meta.url)).StreamLanguage.define((await t(async()=>{let{go:e}=await import(`./go-D-ZJPtwk.js`);return{go:e}},[],import.meta.url)).go);case`ini`:return(await t(async()=>{let{StreamLanguage:e}=await import(`./dist-DNwOaDhC.js`).then(e=>e.h);return{StreamLanguage:e}},__vite__mapDeps([0,1,2]),import.meta.url)).StreamLanguage.define((await t(async()=>{let{properties:e}=await import(`./properties-D1GaCcfv.js`);return{properties:e}},[],import.meta.url)).properties);case`java`:return(await t(async()=>{let{StreamLanguage:e}=await import(`./dist-DNwOaDhC.js`).then(e=>e.h);return{StreamLanguage:e}},__vite__mapDeps([0,1,2]),import.meta.url)).StreamLanguage.define((await t(async()=>{let{java:e}=await import(`./clike-CkWR_Slw.js`);return{java:e}},[],import.meta.url)).java);case`javascript`:return(await t(async()=>{let{javascript:e}=await import(`./dist-BObw0jPE.js`).then(e=>e.t);return{javascript:e}},__vite__mapDeps([5,1,6,0,2,4]),import.meta.url)).javascript().language;case`json`:return(await t(async()=>{let{json:e}=await import(`./dist-BR00oFrA2.js`).then(e=>e.t);return{json:e}},__vite__mapDeps([7,1,0,2,4]),import.meta.url)).json().language;case`kotlin`:return(await t(async()=>{let{StreamLanguage:e}=await import(`./dist-DNwOaDhC.js`).then(e=>e.h);return{StreamLanguage:e}},__vite__mapDeps([0,1,2]),import.meta.url)).StreamLanguage.define((await t(async()=>{let{kotlin:e}=await import(`./clike-CkWR_Slw.js`);return{kotlin:e}},[],import.meta.url)).kotlin);case`lua`:return(await t(async()=>{let{StreamLanguage:e}=await import(`./dist-DNwOaDhC.js`).then(e=>e.h);return{StreamLanguage:e}},__vite__mapDeps([0,1,2]),import.meta.url)).StreamLanguage.define((await t(async()=>{let{lua:e}=await import(`./lua-Cx3bDzQk.js`);return{lua:e}},[],import.meta.url)).lua);case`markdown`:return(await t(async()=>{let{markdown:e}=await import(`./dist-DGzvBIzr.js`).then(e=>e.t);return{markdown:e}},__vite__mapDeps([8,1,6,0,2,9,3,4,5]),import.meta.url)).markdown().language;case`objectivec`:return(await t(async()=>{let{StreamLanguage:e}=await import(`./dist-DNwOaDhC.js`).then(e=>e.h);return{StreamLanguage:e}},__vite__mapDeps([0,1,2]),import.meta.url)).StreamLanguage.define((await t(async()=>{let{objectiveC:e}=await import(`./clike-CkWR_Slw.js`);return{objectiveC:e}},[],import.meta.url)).objectiveC);case`perl`:return(await t(async()=>{let{StreamLanguage:e}=await import(`./dist-DNwOaDhC.js`).then(e=>e.h);return{StreamLanguage:e}},__vite__mapDeps([0,1,2]),import.meta.url)).StreamLanguage.define((await t(async()=>{let{perl:e}=await import(`./perl-CV3dlsd7.js`);return{perl:e}},[],import.meta.url)).perl);case`python`:return(await t(async()=>{let{python:e}=await import(`./dist-d-7NE8aL.js`);return{python:e}},__vite__mapDeps([10,6,0,1,2,4]),import.meta.url)).python().language;case`r`:return(await t(async()=>{let{StreamLanguage:e}=await import(`./dist-DNwOaDhC.js`).then(e=>e.h);return{StreamLanguage:e}},__vite__mapDeps([0,1,2]),import.meta.url)).StreamLanguage.define((await t(async()=>{let{r:e}=await import(`./r-CHRF940O.js`);return{r:e}},[],import.meta.url)).r);case`ruby`:return(await t(async()=>{let{StreamLanguage:e}=await import(`./dist-DNwOaDhC.js`).then(e=>e.h);return{StreamLanguage:e}},__vite__mapDeps([0,1,2]),import.meta.url)).StreamLanguage.define((await t(async()=>{let{ruby:e}=await import(`./ruby-YzQuyklS.js`);return{ruby:e}},[],import.meta.url)).ruby);case`rust`:return(await t(async()=>{let{rust:e}=await import(`./dist-BF6U-ayK.js`);return{rust:e}},__vite__mapDeps([11,0,1,2,4]),import.meta.url)).rust().language;case`sql`:return(await t(async()=>{let{StreamLanguage:e}=await import(`./dist-DNwOaDhC.js`).then(e=>e.h);return{StreamLanguage:e}},__vite__mapDeps([0,1,2]),import.meta.url)).StreamLanguage.define((await t(async()=>{let{standardSQL:e}=await import(`./sql-CECtKdDi.js`);return{standardSQL:e}},[],import.meta.url)).standardSQL);case`swift`:return(await t(async()=>{let{StreamLanguage:e}=await import(`./dist-DNwOaDhC.js`).then(e=>e.h);return{StreamLanguage:e}},__vite__mapDeps([0,1,2]),import.meta.url)).StreamLanguage.define((await t(async()=>{let{swift:e}=await import(`./swift-DLct3DJs.js`);return{swift:e}},[],import.meta.url)).swift);case`typescript`:return(await t(async()=>{let{javascript:e}=await import(`./dist-BObw0jPE.js`).then(e=>e.t);return{javascript:e}},__vite__mapDeps([5,1,6,0,2,4]),import.meta.url)).javascript({typescript:!0,jsx:!0}).language;case`xml`:return(await t(async()=>{let{html:e}=await import(`./dist-DifRwKW-.js`).then(e=>e.t);return{html:e}},__vite__mapDeps([9,1,3,0,2,4,5,6]),import.meta.url)).html().language;case`yaml`:return(await t(async()=>{let{yaml:e}=await import(`./dist-C7rVxfRB.js`).then(e=>e.t);return{yaml:e}},__vite__mapDeps([12,1,0,2,4]),import.meta.url)).yaml().language;default:return null}}async function j(e,n){if(e===`canvas`)return(await t(async()=>{let{json:e}=await import(`./dist-BR00oFrA2.js`).then(e=>e.t);return{json:e}},__vite__mapDeps([7,1,0,2,4]),import.meta.url)).json().language;if(n){let e=await k(n);if(e)return e}return e===`toml`?(await t(async()=>{let{StreamLanguage:e}=await import(`./dist-DNwOaDhC.js`).then(e=>e.h);return{StreamLanguage:e}},__vite__mapDeps([0,1,2]),import.meta.url)).StreamLanguage.define((await t(async()=>{let{toml:e}=await import(`./toml-Bl-Vp4wG.js`);return{toml:e}},[],import.meta.url)).toml):null}function M(e){let t=(0,D.c)(10),{_:n}=a(),r;t[0]===n?r=t[1]:(r=e=>n(e===413?{id:`C_WGy8`}:e===415?{id:`VM7H66`}:e===404?{id:`s0IDhW`}:e===400?{id:`N1mdmS`}:typeof e==`number`?{id:`96w9hU`,values:{status:e}}:{id:`ig5vUe`}),t[0]=n,t[1]=r);let i=r,{src:o,loadText:s}=e,c=(0,E.useRef)(s),l=(0,E.useRef)(i),u;t[2]!==s||t[3]!==i?(u=()=>{c.current=s,l.current=i},t[2]=s,t[3]=i,t[4]=u):u=t[4],(0,E.useEffect)(u);let d;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(d={status:`loading`},t[5]=d):d=t[5];let[f,p]=(0,E.useState)(d),m,h;return t[6]!==n||t[7]!==o?(m=()=>{let e=!1,t=new AbortController;p({status:`loading`});let r=c.current;return r?(r(t.signal).then(t=>{if(!e){if(t.ok){p({status:`loaded`,content:t.text});return}p({status:`error`,message:t.message??l.current(t.status)})}}).catch(t=>{e||t instanceof Error&&t.name===`AbortError`||p({status:`error`,message:n({id:`ig5vUe`})})}),()=>{e=!0,t.abort()}):(fetch(o??``,{credentials:`same-origin`,signal:t.signal}).then(async e=>{if(!e.ok)throw Error(l.current(e.status));return e.text()}).then(t=>{e||p({status:`loaded`,content:t})}).catch(t=>{e||t instanceof Error&&t.name===`AbortError`||p({status:`error`,message:t instanceof Error?t.message:n({id:`ig5vUe`})})}),()=>{e=!0,t.abort()})},h=[o,n],t[6]=n,t[7]=o,t[8]=m,t[9]=h):(m=t[8],h=t[9]),(0,E.useEffect)(m,h),f}var N=n();function P(e){let t=(0,D.c)(10),{fileName:n,dataAttr:r,extraAttrs:a}=e,o=`${r}-state`,s;t[0]!==r||t[1]!==o?(s={[r]:``,[o]:`loading`},t[0]=r,t[1]=o,t[2]=s):s=t[2];let c;t[3]===n?c=t[4]:(c=(0,N.jsx)(`span`,{children:(0,N.jsx)(i,{id:`Md709y`,values:{fileName:n}})}),t[3]=n,t[4]=c);let l;return t[5]!==a||t[6]!==n||t[7]!==s||t[8]!==c?(l=(0,N.jsx)(`main`,{className:`flex h-full min-h-0 flex-col items-center justify-center bg-background text-muted-foreground text-sm`,"aria-label":n,...s,...a,children:c}),t[5]=a,t[6]=n,t[7]=s,t[8]=c,t[9]=l):l=t[9],l}function F(e){let t=(0,D.c)(16),{fileName:n,dataAttr:r,extraAttrs:a,message:o,openHref:s}=e,c=`${r}-state`,l;t[0]!==r||t[1]!==c?(l={[r]:``,[c]:`error`},t[0]=r,t[1]=c,t[2]=l):l=t[2];let u;t[3]===n?u=t[4]:(u=(0,N.jsx)(`div`,{className:`font-medium text-sm`,children:(0,N.jsx)(i,{id:`qdBUHP`,values:{fileName:n}})}),t[3]=n,t[4]=u);let d;t[5]===o?d=t[6]:(d=(0,N.jsx)(`div`,{className:`text-muted-foreground text-xs`,children:o}),t[5]=o,t[6]=d);let f;t[7]===s?f=t[8]:(f=s?(0,N.jsx)(`a`,{href:s,className:`mt-2 rounded-md border px-3 py-1.5 text-sm hover:bg-accent hover:text-accent-foreground`,children:(0,N.jsx)(i,{id:`9npOH9`})}):null,t[7]=s,t[8]=f);let p;return t[9]!==a||t[10]!==n||t[11]!==l||t[12]!==u||t[13]!==d||t[14]!==f?(p=(0,N.jsxs)(`main`,{className:`flex h-full min-h-0 flex-col items-center justify-center gap-2 bg-background p-4 text-center`,"aria-label":n,...l,...a,children:[u,d,f]}),t[9]=a,t[10]=n,t[11]=l,t[12]=u,t[13]=d,t[14]=f,t[15]=p):p=t[15],p}var I=S({settings:{background:`var(--background)`,gutterBackground:`var(--muted)`}}),L=C({settings:{background:`var(--background)`,gutterBackground:`var(--muted)`}});function R(e){let t=(0,D.c)(23),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({fileName:r,extension:n,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a=(0,E.useRef)(null),s=(0,E.useRef)(null),{resolvedTheme:c}=o(),l=M(i),u=l.status===`loaded`?l.content:null,d,f;t[4]!==n||t[5]!==u||t[6]!==c?(d=()=>{if(!a.current||u===null)return;let e=n.toLowerCase(),t=_(e),r=c===`dark`?I:L,i=!1,o=null;return j(e,t).then(e=>{if(i||!a.current)return;let t=[T,...e?[e]:[],x.editable.of(!0),b.readOnly.of(!0),x.lineWrapping,r];o=new x({state:b.create({doc:u,extensions:t}),parent:a.current}),s.current=o}),()=>{i=!0,o?.destroy(),s.current=null}},f=[u,n,c],t[4]=n,t[5]=u,t[6]=c,t[7]=d,t[8]=f):(d=t[7],f=t[8]),(0,E.useEffect)(d,f);let p;t[9]===n?p=t[10]:(p={"data-text-viewer-extension":n},t[9]=n,t[10]=p);let m=p;if(l.status===`loading`){let e;return t[11]!==m||t[12]!==r?(e=(0,N.jsx)(P,{fileName:r,dataAttr:`data-text-viewer`,extraAttrs:m}),t[11]=m,t[12]=r,t[13]=e):e=t[13],e}if(l.status===`error`){let e;return t[14]!==m||t[15]!==l.message||t[16]!==r||t[17]!==i.src?(e=(0,N.jsx)(F,{fileName:r,dataAttr:`data-text-viewer`,extraAttrs:m,message:l.message,openHref:i.src}),t[14]=m,t[15]=l.message,t[16]=r,t[17]=i.src,t[18]=e):e=t[18],e}let h;t[19]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,N.jsx)(`div`,{ref:a,className:`min-h-0 flex-1 overflow-auto`}),t[19]=h):h=t[19];let g;return t[20]!==n||t[21]!==r?(g=(0,N.jsx)(`main`,{className:`flex h-full min-h-0 flex-col bg-background`,"aria-label":r,"data-text-viewer":``,"data-text-viewer-state":`loaded`,"data-text-viewer-extension":n,children:h}),t[20]=n,t[21]=r,t[22]=g):g=t[22],g}function z(e){let t=(0,D.c)(29),{entry:n,className:r}=e,{_:i}=a(),{projectLocalBinding:o,merged:s}=w(),u=s?.appearance?.sidebar,d=u?.showHiddenFiles??!1,f=u?.showOnlyMarkdownFiles??!1,m;t[0]!==n||t[1]!==d||t[2]!==f?(m=y(n,{showHiddenFiles:d,showOnlyMarkdownFiles:f}),t[0]=n,t[1]=d,t[2]=f,t[3]=m):m=t[3];let h=m;if(!h.hiddenFiles&&!h.onlyMarkdownFiles)return null;let _;t[4]!==i||t[5]!==o?(_=e=>{if(o===null)return;let t=o.patch({appearance:{sidebar:e}});t.ok||(console.warn(`[NotInSidebarIndicator] sidebar visibility flip rejected:`,g(t.error)),v.error(i({id:`P47EWZ`}),{description:g(t.error)}))},t[4]=i,t[5]=o,t[6]=_):_=t[6];let b=_,x;t[7]===r?x=t[8]:(x=c(`flex items-center gap-1.5 text-muted-foreground/70 text-xs`,r),t[7]=r,t[8]=x);let S;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(S=(0,N.jsx)(p,{"aria-hidden":`true`,className:`size-3.5 shrink-0`}),t[9]=S):S=t[9];let C;t[10]===i?C=t[11]:(C=i({id:`j9tqwO`}),t[10]=i,t[11]=C);let T;t[12]===C?T=t[13]:(T=(0,N.jsx)(`span`,{className:`whitespace-nowrap`,children:C}),t[12]=C,t[13]=T);let E;t[14]!==i||t[15]!==h.hiddenFiles||t[16]!==b||t[17]!==o?(E=h.hiddenFiles?(0,N.jsx)(l,{variant:`outline`,size:`sm`,className:`h-5 rounded-sm px-1.5 font-normal text-2xs text-muted-foreground hover:text-foreground`,disabled:o===null,onClick:()=>b({showHiddenFiles:!0}),"aria-label":i({id:`XcGbim`}),title:i({id:`XcGbim`}),"data-testid":`not-in-sidebar-flip-hidden-files`,children:i({id:`6KCH4m`})}):null,t[14]=i,t[15]=h.hiddenFiles,t[16]=b,t[17]=o,t[18]=E):E=t[18];let O;t[19]!==i||t[20]!==h.onlyMarkdownFiles||t[21]!==b||t[22]!==o?(O=h.onlyMarkdownFiles?(0,N.jsx)(l,{variant:`outline`,size:`sm`,className:`h-5 rounded-sm px-1.5 font-normal text-2xs text-muted-foreground hover:text-foreground`,disabled:o===null,onClick:()=>b({showOnlyMarkdownFiles:!1}),"aria-label":i({id:`10g8I_`}),title:i({id:`10g8I_`}),"data-testid":`not-in-sidebar-flip-only-markdown`,children:i({id:`5-o4kO`})}):null,t[19]=i,t[20]=h.onlyMarkdownFiles,t[21]=b,t[22]=o,t[23]=O):O=t[23];let k;return t[24]!==O||t[25]!==x||t[26]!==T||t[27]!==E?(k=(0,N.jsxs)(`div`,{"data-testid":`not-in-sidebar-indicator`,className:x,children:[S,T,E,O]}),t[24]=O,t[25]=x,t[26]=T,t[27]=E,t[28]=k):k=t[28],k}var B={fill:`none`,height:24,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,viewBox:`0 0 24 24`,width:24,xmlns:`http://www.w3.org/2000/svg`},V=e=>{let t=(0,D.c)(15),n,r,i,a,o,s,c;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6],c=t[7]):({color:a,size:o,strokeWidth:s,absoluteStrokeWidth:n,className:c,children:r,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s,t[7]=c);let l=a===void 0?`currentColor`:a,u=o===void 0?24:o,d=s===void 0?2:s,f=c===void 0?``:c,p=n?Number(d)*24/Number(u):d,m;return t[8]!==r||t[9]!==f||t[10]!==l||t[11]!==i||t[12]!==u||t[13]!==p?(m=(0,N.jsx)(`svg`,{"aria-hidden":`true`,...B,className:f,height:u,stroke:l,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:p,width:u,...i,children:r}),t[8]=r,t[9]=f,t[10]=l,t[11]=i,t[12]=u,t[13]=p,t[14]=m):m=t[14],m},H=e=>{let t=(0,D.c)(4),n,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,N.jsx)(`title`,{children:`Markdown`}),r=(0,N.jsx)(`path`,{d:`M232,48H24A16,16,0,0,0,8,64V192a16,16,0,0,0,16,16H232a16,16,0,0,0,16-16V64A16,16,0,0,0,232,48Zm0,144H24V64H232V192ZM128,104v48a8,8,0,0,1-16,0V123.31L93.66,141.66a8,8,0,0,1-11.32,0L64,123.31V152a8,8,0,0,1-16,0V104a8,8,0,0,1,13.66-5.66L88,124.69l26.34-26.35A8,8,0,0,1,128,104Zm77.66,18.34a8,8,0,0,1,0,11.32l-24,24a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L168,132.69V104a8,8,0,0,1,16,0v28.69l10.34-10.35A8,8,0,0,1,205.66,122.34Z`}),t[0]=n,t[1]=r):(n=t[0],r=t[1]);let i;return t[2]===e?i=t[3]:(i=(0,N.jsxs)(V,{...e,viewBox:`0 0 256 256`,fill:`currentColor`,children:[n,r]}),t[2]=e,t[3]=i),i},U=e=>{let t=(0,D.c)(4),n,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,N.jsx)(`title`,{children:`Textbox`}),r=(0,N.jsx)(`path`,{d:`M112,40a8,8,0,0,0-8,8V64H24A16,16,0,0,0,8,80v96a16,16,0,0,0,16,16h80v16a8,8,0,0,0,16,0V48A8,8,0,0,0,112,40ZM24,176V80h80v96ZM248,80v96a16,16,0,0,1-16,16H144a8,8,0,0,1,0-16h88V80H144a8,8,0,0,1,0-16h88A16,16,0,0,1,248,80ZM88,112a8,8,0,0,1-8,8H72v24a8,8,0,0,1-16,0V120H48a8,8,0,0,1,0-16H80A8,8,0,0,1,88,112Z`}),t[0]=n,t[1]=r):(n=t[0],r=t[1]);let i;return t[2]===e?i=t[3]:(i=(0,N.jsxs)(V,{...e,viewBox:`0 0 256 256`,fill:`currentColor`,children:[n,r]}),t[2]=e,t[3]=i),i};function W(e){let t=(0,D.c)(48),{isSourceMode:n,onModeChange:r,sourceDisabled:o,wysiwygDisabled:s,wysiwygLabel:c,sourceLabel:l,wysiwygDisabledReason:p}=e,g=o===void 0?!1:o,_=s===void 0?!1:s,{_:v}=a(),y;t[0]!==v||t[1]!==c?(y=c??v({id:`ur2XSb`}),t[0]=v,t[1]=c,t[2]=y):y=t[2];let b=y,x;t[3]!==v||t[4]!==l?(x=l??v({id:`xbdtfY`}),t[3]=v,t[4]=l,t[5]=x):x=t[5];let S=x,C=(0,E.useId)(),w=_&&p?p:null,T=n?`source`:`wysiwyg`,O;t[6]===r?O=t[7]:(O=e=>{e&&r(e)},t[6]=r,t[7]=O);let k;t[8]===v?k=t[9]:(k=v({id:`n7aopT`}),t[8]=v,t[9]=k);let A=w?C:void 0,j;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(j=(0,N.jsx)(U,{className:`size-4`}),t[10]=j):j=t[10];let M;t[11]!==A||t[12]!==_||t[13]!==b?(M=(0,N.jsx)(m,{value:`wysiwyg`,"aria-label":b,"aria-describedby":A,disabled:_,className:`size-7 px-0 dark:data-[state=on]:bg-foreground/15`,children:j}),t[11]=A,t[12]=_,t[13]=b,t[14]=M):M=t[14];let P;t[15]!==w||t[16]!==C?(P=w?(0,N.jsx)(`span`,{id:C,className:`sr-only`,children:w}):null,t[15]=w,t[16]=C,t[17]=P):P=t[17];let F;t[18]!==M||t[19]!==P?(F=(0,N.jsx)(u,{asChild:!0,children:(0,N.jsxs)(`div`,{children:[M,P]})}),t[18]=M,t[19]=P,t[20]=F):F=t[20];let I;t[21]!==_||t[22]!==p||t[23]!==c?(I=_&&p?p:c||(0,N.jsx)(i,{id:`Mb_20S`}),t[21]=_,t[22]=p,t[23]=c,t[24]=I):I=t[24];let L;t[25]===I?L=t[26]:(L=(0,N.jsx)(d,{side:`bottom`,children:I}),t[25]=I,t[26]=L);let R;t[27]!==F||t[28]!==L?(R=(0,N.jsxs)(f,{children:[F,L]}),t[27]=F,t[28]=L,t[29]=R):R=t[29];let z;t[30]===Symbol.for(`react.memo_cache_sentinel`)?(z=(0,N.jsx)(H,{className:`size-4`}),t[30]=z):z=t[30];let B;t[31]!==g||t[32]!==S?(B=(0,N.jsx)(u,{asChild:!0,children:(0,N.jsx)(`div`,{children:(0,N.jsx)(m,{value:`source`,"aria-label":S,disabled:g,className:`size-7 px-0 dark:data-[state=on]:bg-foreground/15`,children:z})})}),t[31]=g,t[32]=S,t[33]=B):B=t[33];let V;t[34]!==g||t[35]!==l?(V=g?(0,N.jsx)(i,{id:`G-JBA1`}):l||(0,N.jsx)(i,{id:`u6Hp4N`}),t[34]=g,t[35]=l,t[36]=V):V=t[36];let W;t[37]===V?W=t[38]:(W=(0,N.jsx)(d,{side:`bottom`,children:V}),t[37]=V,t[38]=W);let G;t[39]!==B||t[40]!==W?(G=(0,N.jsxs)(f,{children:[B,W]}),t[39]=B,t[40]=W,t[41]=G):G=t[41];let K;return t[42]!==R||t[43]!==G||t[44]!==T||t[45]!==O||t[46]!==k?(K=(0,N.jsxs)(h,{type:`single`,value:T,onValueChange:O,"aria-label":k,variant:`segmented`,size:`sm`,spacing:1,className:`shrink-0 bg-muted p-0.5 data-[size=sm]:rounded-[10px]`,children:[R,G]}),t[42]=R,t[43]=G,t[44]=T,t[45]=O,t[46]=k,t[47]=K):K=t[47],K}export{P as a,F as i,z as n,M as o,R as r,W as t};
|
|
2
|
+
import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./preload-helper-Chd9yIcd.js";import{t as n}from"./jsx-runtime-BUgB2tll.js";import{t as r}from"./react-f2sANaYj.js";import{n as i,r as a}from"./dist-Nvb76hAm.js";import{n as o}from"./dist-PQ5KMVDh.js";import{t as s}from"./compiler-runtime-BfE3aGVn.js";import{s as c}from"./createLucideIcon-DAkhoPjT.js";import{t as l}from"./button-Gol9BgNB.js";import{i as u,n as d,t as f}from"./tooltip-B4J7VHmA.js";import{s as p}from"./switch-DYic2V-1.js";import{n as m,t as h}from"./toggle-group-CjXmmTGy.js";import{Fa as g,ka as _}from"./dist-Cal4LUep.js";import{n as v}from"./dist-BLAMau9Z.js";import{t as y}from"./file-tree-utils-DiUPuK3N.js";import"./config-provider-DIuwNlqX.js";import{Ot as b,X as x}from"./dist-DNwOaDhC.js";import{n as S,t as C}from"./esm-HV7Pxfbn.js";import{n as w}from"./config-context-gd3BC-iY.js";import{t as T}from"./dist-B1qkpf98.js";var E=e(r(),1),D=s(),O=new Map;function k(e){let t=O.get(e);if(t)return t;let n=A(e);return O.set(e,n),n}async function A(e){switch(e){case`bash`:case`shell`:return(await t(async()=>{let{StreamLanguage:e}=await import(`./dist-DNwOaDhC.js`).then(e=>e.h);return{StreamLanguage:e}},__vite__mapDeps([0,1,2]),import.meta.url)).StreamLanguage.define((await t(async()=>{let{shell:e}=await import(`./shell-BvVJAeXE.js`);return{shell:e}},[],import.meta.url)).shell);case`c`:return(await t(async()=>{let{StreamLanguage:e}=await import(`./dist-DNwOaDhC.js`).then(e=>e.h);return{StreamLanguage:e}},__vite__mapDeps([0,1,2]),import.meta.url)).StreamLanguage.define((await t(async()=>{let{c:e}=await import(`./clike-CkWR_Slw.js`);return{c:e}},[],import.meta.url)).c);case`cpp`:return(await t(async()=>{let{StreamLanguage:e}=await import(`./dist-DNwOaDhC.js`).then(e=>e.h);return{StreamLanguage:e}},__vite__mapDeps([0,1,2]),import.meta.url)).StreamLanguage.define((await t(async()=>{let{cpp:e}=await import(`./clike-CkWR_Slw.js`);return{cpp:e}},[],import.meta.url)).cpp);case`csharp`:return(await t(async()=>{let{StreamLanguage:e}=await import(`./dist-DNwOaDhC.js`).then(e=>e.h);return{StreamLanguage:e}},__vite__mapDeps([0,1,2]),import.meta.url)).StreamLanguage.define((await t(async()=>{let{csharp:e}=await import(`./clike-CkWR_Slw.js`);return{csharp:e}},[],import.meta.url)).csharp);case`css`:case`less`:case`scss`:return(await t(async()=>{let{css:e}=await import(`./dist-CP0xcBf_.js`).then(e=>e.r);return{css:e}},__vite__mapDeps([3,1,0,2,4]),import.meta.url)).css().language;case`diff`:return(await t(async()=>{let{StreamLanguage:e}=await import(`./dist-DNwOaDhC.js`).then(e=>e.h);return{StreamLanguage:e}},__vite__mapDeps([0,1,2]),import.meta.url)).StreamLanguage.define((await t(async()=>{let{diff:e}=await import(`./diff-BsdYbIgD.js`);return{diff:e}},[],import.meta.url)).diff);case`go`:return(await t(async()=>{let{StreamLanguage:e}=await import(`./dist-DNwOaDhC.js`).then(e=>e.h);return{StreamLanguage:e}},__vite__mapDeps([0,1,2]),import.meta.url)).StreamLanguage.define((await t(async()=>{let{go:e}=await import(`./go-D-ZJPtwk.js`);return{go:e}},[],import.meta.url)).go);case`ini`:return(await t(async()=>{let{StreamLanguage:e}=await import(`./dist-DNwOaDhC.js`).then(e=>e.h);return{StreamLanguage:e}},__vite__mapDeps([0,1,2]),import.meta.url)).StreamLanguage.define((await t(async()=>{let{properties:e}=await import(`./properties-D1GaCcfv.js`);return{properties:e}},[],import.meta.url)).properties);case`java`:return(await t(async()=>{let{StreamLanguage:e}=await import(`./dist-DNwOaDhC.js`).then(e=>e.h);return{StreamLanguage:e}},__vite__mapDeps([0,1,2]),import.meta.url)).StreamLanguage.define((await t(async()=>{let{java:e}=await import(`./clike-CkWR_Slw.js`);return{java:e}},[],import.meta.url)).java);case`javascript`:return(await t(async()=>{let{javascript:e}=await import(`./dist-BObw0jPE.js`).then(e=>e.t);return{javascript:e}},__vite__mapDeps([5,1,6,0,2,4]),import.meta.url)).javascript().language;case`json`:return(await t(async()=>{let{json:e}=await import(`./dist-BR00oFrA2.js`).then(e=>e.t);return{json:e}},__vite__mapDeps([7,1,0,2,4]),import.meta.url)).json().language;case`kotlin`:return(await t(async()=>{let{StreamLanguage:e}=await import(`./dist-DNwOaDhC.js`).then(e=>e.h);return{StreamLanguage:e}},__vite__mapDeps([0,1,2]),import.meta.url)).StreamLanguage.define((await t(async()=>{let{kotlin:e}=await import(`./clike-CkWR_Slw.js`);return{kotlin:e}},[],import.meta.url)).kotlin);case`lua`:return(await t(async()=>{let{StreamLanguage:e}=await import(`./dist-DNwOaDhC.js`).then(e=>e.h);return{StreamLanguage:e}},__vite__mapDeps([0,1,2]),import.meta.url)).StreamLanguage.define((await t(async()=>{let{lua:e}=await import(`./lua-Cx3bDzQk.js`);return{lua:e}},[],import.meta.url)).lua);case`markdown`:return(await t(async()=>{let{markdown:e}=await import(`./dist-DGzvBIzr.js`).then(e=>e.t);return{markdown:e}},__vite__mapDeps([8,1,6,0,2,9,3,4,5]),import.meta.url)).markdown().language;case`objectivec`:return(await t(async()=>{let{StreamLanguage:e}=await import(`./dist-DNwOaDhC.js`).then(e=>e.h);return{StreamLanguage:e}},__vite__mapDeps([0,1,2]),import.meta.url)).StreamLanguage.define((await t(async()=>{let{objectiveC:e}=await import(`./clike-CkWR_Slw.js`);return{objectiveC:e}},[],import.meta.url)).objectiveC);case`perl`:return(await t(async()=>{let{StreamLanguage:e}=await import(`./dist-DNwOaDhC.js`).then(e=>e.h);return{StreamLanguage:e}},__vite__mapDeps([0,1,2]),import.meta.url)).StreamLanguage.define((await t(async()=>{let{perl:e}=await import(`./perl-CV3dlsd7.js`);return{perl:e}},[],import.meta.url)).perl);case`python`:return(await t(async()=>{let{python:e}=await import(`./dist-d-7NE8aL.js`);return{python:e}},__vite__mapDeps([10,6,0,1,2,4]),import.meta.url)).python().language;case`r`:return(await t(async()=>{let{StreamLanguage:e}=await import(`./dist-DNwOaDhC.js`).then(e=>e.h);return{StreamLanguage:e}},__vite__mapDeps([0,1,2]),import.meta.url)).StreamLanguage.define((await t(async()=>{let{r:e}=await import(`./r-CHRF940O.js`);return{r:e}},[],import.meta.url)).r);case`ruby`:return(await t(async()=>{let{StreamLanguage:e}=await import(`./dist-DNwOaDhC.js`).then(e=>e.h);return{StreamLanguage:e}},__vite__mapDeps([0,1,2]),import.meta.url)).StreamLanguage.define((await t(async()=>{let{ruby:e}=await import(`./ruby-YzQuyklS.js`);return{ruby:e}},[],import.meta.url)).ruby);case`rust`:return(await t(async()=>{let{rust:e}=await import(`./dist-BF6U-ayK.js`);return{rust:e}},__vite__mapDeps([11,0,1,2,4]),import.meta.url)).rust().language;case`sql`:return(await t(async()=>{let{StreamLanguage:e}=await import(`./dist-DNwOaDhC.js`).then(e=>e.h);return{StreamLanguage:e}},__vite__mapDeps([0,1,2]),import.meta.url)).StreamLanguage.define((await t(async()=>{let{standardSQL:e}=await import(`./sql-CECtKdDi.js`);return{standardSQL:e}},[],import.meta.url)).standardSQL);case`swift`:return(await t(async()=>{let{StreamLanguage:e}=await import(`./dist-DNwOaDhC.js`).then(e=>e.h);return{StreamLanguage:e}},__vite__mapDeps([0,1,2]),import.meta.url)).StreamLanguage.define((await t(async()=>{let{swift:e}=await import(`./swift-DLct3DJs.js`);return{swift:e}},[],import.meta.url)).swift);case`typescript`:return(await t(async()=>{let{javascript:e}=await import(`./dist-BObw0jPE.js`).then(e=>e.t);return{javascript:e}},__vite__mapDeps([5,1,6,0,2,4]),import.meta.url)).javascript({typescript:!0,jsx:!0}).language;case`xml`:return(await t(async()=>{let{html:e}=await import(`./dist-DifRwKW-.js`).then(e=>e.t);return{html:e}},__vite__mapDeps([9,1,3,0,2,4,5,6]),import.meta.url)).html().language;case`yaml`:return(await t(async()=>{let{yaml:e}=await import(`./dist-C7rVxfRB.js`).then(e=>e.t);return{yaml:e}},__vite__mapDeps([12,1,0,2,4]),import.meta.url)).yaml().language;default:return null}}async function j(e,n){if(e===`canvas`)return(await t(async()=>{let{json:e}=await import(`./dist-BR00oFrA2.js`).then(e=>e.t);return{json:e}},__vite__mapDeps([7,1,0,2,4]),import.meta.url)).json().language;if(n){let e=await k(n);if(e)return e}return e===`toml`?(await t(async()=>{let{StreamLanguage:e}=await import(`./dist-DNwOaDhC.js`).then(e=>e.h);return{StreamLanguage:e}},__vite__mapDeps([0,1,2]),import.meta.url)).StreamLanguage.define((await t(async()=>{let{toml:e}=await import(`./toml-Bl-Vp4wG.js`);return{toml:e}},[],import.meta.url)).toml):null}function M(e){let t=(0,D.c)(10),{_:n}=a(),r;t[0]===n?r=t[1]:(r=e=>n(e===413?{id:`C_WGy8`}:e===415?{id:`VM7H66`}:e===404?{id:`s0IDhW`}:e===400?{id:`N1mdmS`}:typeof e==`number`?{id:`96w9hU`,values:{status:e}}:{id:`ig5vUe`}),t[0]=n,t[1]=r);let i=r,{src:o,loadText:s}=e,c=(0,E.useRef)(s),l=(0,E.useRef)(i),u;t[2]!==s||t[3]!==i?(u=()=>{c.current=s,l.current=i},t[2]=s,t[3]=i,t[4]=u):u=t[4],(0,E.useEffect)(u);let d;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(d={status:`loading`},t[5]=d):d=t[5];let[f,p]=(0,E.useState)(d),m,h;return t[6]!==n||t[7]!==o?(m=()=>{let e=!1,t=new AbortController;p({status:`loading`});let r=c.current;return r?(r(t.signal).then(t=>{if(!e){if(t.ok){p({status:`loaded`,content:t.text});return}p({status:`error`,message:t.message??l.current(t.status)})}}).catch(t=>{e||t instanceof Error&&t.name===`AbortError`||p({status:`error`,message:n({id:`ig5vUe`})})}),()=>{e=!0,t.abort()}):(fetch(o??``,{credentials:`same-origin`,signal:t.signal}).then(async e=>{if(!e.ok)throw Error(l.current(e.status));return e.text()}).then(t=>{e||p({status:`loaded`,content:t})}).catch(t=>{e||t instanceof Error&&t.name===`AbortError`||p({status:`error`,message:t instanceof Error?t.message:n({id:`ig5vUe`})})}),()=>{e=!0,t.abort()})},h=[o,n],t[6]=n,t[7]=o,t[8]=m,t[9]=h):(m=t[8],h=t[9]),(0,E.useEffect)(m,h),f}var N=n();function P(e){let t=(0,D.c)(10),{fileName:n,dataAttr:r,extraAttrs:a}=e,o=`${r}-state`,s;t[0]!==r||t[1]!==o?(s={[r]:``,[o]:`loading`},t[0]=r,t[1]=o,t[2]=s):s=t[2];let c;t[3]===n?c=t[4]:(c=(0,N.jsx)(`span`,{children:(0,N.jsx)(i,{id:`Md709y`,values:{fileName:n}})}),t[3]=n,t[4]=c);let l;return t[5]!==a||t[6]!==n||t[7]!==s||t[8]!==c?(l=(0,N.jsx)(`main`,{className:`flex h-full min-h-0 flex-col items-center justify-center bg-background text-muted-foreground text-sm`,"aria-label":n,...s,...a,children:c}),t[5]=a,t[6]=n,t[7]=s,t[8]=c,t[9]=l):l=t[9],l}function F(e){let t=(0,D.c)(16),{fileName:n,dataAttr:r,extraAttrs:a,message:o,openHref:s}=e,c=`${r}-state`,l;t[0]!==r||t[1]!==c?(l={[r]:``,[c]:`error`},t[0]=r,t[1]=c,t[2]=l):l=t[2];let u;t[3]===n?u=t[4]:(u=(0,N.jsx)(`div`,{className:`font-medium text-sm`,children:(0,N.jsx)(i,{id:`qdBUHP`,values:{fileName:n}})}),t[3]=n,t[4]=u);let d;t[5]===o?d=t[6]:(d=(0,N.jsx)(`div`,{className:`text-muted-foreground text-xs`,children:o}),t[5]=o,t[6]=d);let f;t[7]===s?f=t[8]:(f=s?(0,N.jsx)(`a`,{href:s,className:`mt-2 rounded-md border px-3 py-1.5 text-sm hover:bg-accent hover:text-accent-foreground`,children:(0,N.jsx)(i,{id:`9npOH9`})}):null,t[7]=s,t[8]=f);let p;return t[9]!==a||t[10]!==n||t[11]!==l||t[12]!==u||t[13]!==d||t[14]!==f?(p=(0,N.jsxs)(`main`,{className:`flex h-full min-h-0 flex-col items-center justify-center gap-2 bg-background p-4 text-center`,"aria-label":n,...l,...a,children:[u,d,f]}),t[9]=a,t[10]=n,t[11]=l,t[12]=u,t[13]=d,t[14]=f,t[15]=p):p=t[15],p}var I=S({settings:{background:`var(--background)`,gutterBackground:`var(--muted)`}}),L=C({settings:{background:`var(--background)`,gutterBackground:`var(--muted)`}});function R(e){let t=(0,D.c)(23),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({fileName:r,extension:n,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a=(0,E.useRef)(null),s=(0,E.useRef)(null),{resolvedTheme:c}=o(),l=M(i),u=l.status===`loaded`?l.content:null,d,f;t[4]!==n||t[5]!==u||t[6]!==c?(d=()=>{if(!a.current||u===null)return;let e=n.toLowerCase(),t=_(e),r=c===`dark`?I:L,i=!1,o=null;return j(e,t).then(e=>{if(i||!a.current)return;let t=[T,...e?[e]:[],x.editable.of(!0),b.readOnly.of(!0),x.lineWrapping,r];o=new x({state:b.create({doc:u,extensions:t}),parent:a.current}),s.current=o}),()=>{i=!0,o?.destroy(),s.current=null}},f=[u,n,c],t[4]=n,t[5]=u,t[6]=c,t[7]=d,t[8]=f):(d=t[7],f=t[8]),(0,E.useEffect)(d,f);let p;t[9]===n?p=t[10]:(p={"data-text-viewer-extension":n},t[9]=n,t[10]=p);let m=p;if(l.status===`loading`){let e;return t[11]!==m||t[12]!==r?(e=(0,N.jsx)(P,{fileName:r,dataAttr:`data-text-viewer`,extraAttrs:m}),t[11]=m,t[12]=r,t[13]=e):e=t[13],e}if(l.status===`error`){let e;return t[14]!==m||t[15]!==l.message||t[16]!==r||t[17]!==i.src?(e=(0,N.jsx)(F,{fileName:r,dataAttr:`data-text-viewer`,extraAttrs:m,message:l.message,openHref:i.src}),t[14]=m,t[15]=l.message,t[16]=r,t[17]=i.src,t[18]=e):e=t[18],e}let h;t[19]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,N.jsx)(`div`,{ref:a,className:`min-h-0 flex-1 overflow-auto`}),t[19]=h):h=t[19];let g;return t[20]!==n||t[21]!==r?(g=(0,N.jsx)(`main`,{className:`flex h-full min-h-0 flex-col bg-background`,"aria-label":r,"data-text-viewer":``,"data-text-viewer-state":`loaded`,"data-text-viewer-extension":n,children:h}),t[20]=n,t[21]=r,t[22]=g):g=t[22],g}function z(e){let t=(0,D.c)(29),{entry:n,className:r}=e,{_:i}=a(),{projectLocalBinding:o,merged:s}=w(),u=s?.appearance?.sidebar,d=u?.showHiddenFiles??!1,f=u?.showOnlyMarkdownFiles??!1,m;t[0]!==n||t[1]!==d||t[2]!==f?(m=y(n,{showHiddenFiles:d,showOnlyMarkdownFiles:f}),t[0]=n,t[1]=d,t[2]=f,t[3]=m):m=t[3];let h=m;if(!h.hiddenFiles&&!h.onlyMarkdownFiles)return null;let _;t[4]!==i||t[5]!==o?(_=e=>{if(o===null)return;let t=o.patch({appearance:{sidebar:e}});t.ok||(console.warn(`[NotInSidebarIndicator] sidebar visibility flip rejected:`,g(t.error)),v.error(i({id:`P47EWZ`}),{description:g(t.error)}))},t[4]=i,t[5]=o,t[6]=_):_=t[6];let b=_,x;t[7]===r?x=t[8]:(x=c(`flex items-center gap-1.5 text-muted-foreground/70 text-xs`,r),t[7]=r,t[8]=x);let S;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(S=(0,N.jsx)(p,{"aria-hidden":`true`,className:`size-3.5 shrink-0`}),t[9]=S):S=t[9];let C;t[10]===i?C=t[11]:(C=i({id:`j9tqwO`}),t[10]=i,t[11]=C);let T;t[12]===C?T=t[13]:(T=(0,N.jsx)(`span`,{className:`whitespace-nowrap`,children:C}),t[12]=C,t[13]=T);let E;t[14]!==i||t[15]!==h.hiddenFiles||t[16]!==b||t[17]!==o?(E=h.hiddenFiles?(0,N.jsx)(l,{variant:`outline`,size:`sm`,className:`h-5 rounded-sm px-1.5 font-normal text-2xs text-muted-foreground hover:text-foreground`,disabled:o===null,onClick:()=>b({showHiddenFiles:!0}),"aria-label":i({id:`XcGbim`}),title:i({id:`XcGbim`}),"data-testid":`not-in-sidebar-flip-hidden-files`,children:i({id:`6KCH4m`})}):null,t[14]=i,t[15]=h.hiddenFiles,t[16]=b,t[17]=o,t[18]=E):E=t[18];let O;t[19]!==i||t[20]!==h.onlyMarkdownFiles||t[21]!==b||t[22]!==o?(O=h.onlyMarkdownFiles?(0,N.jsx)(l,{variant:`outline`,size:`sm`,className:`h-5 rounded-sm px-1.5 font-normal text-2xs text-muted-foreground hover:text-foreground`,disabled:o===null,onClick:()=>b({showOnlyMarkdownFiles:!1}),"aria-label":i({id:`10g8I_`}),title:i({id:`10g8I_`}),"data-testid":`not-in-sidebar-flip-only-markdown`,children:i({id:`5-o4kO`})}):null,t[19]=i,t[20]=h.onlyMarkdownFiles,t[21]=b,t[22]=o,t[23]=O):O=t[23];let k;return t[24]!==O||t[25]!==x||t[26]!==T||t[27]!==E?(k=(0,N.jsxs)(`div`,{"data-testid":`not-in-sidebar-indicator`,className:x,children:[S,T,E,O]}),t[24]=O,t[25]=x,t[26]=T,t[27]=E,t[28]=k):k=t[28],k}var B={fill:`none`,height:24,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,viewBox:`0 0 24 24`,width:24,xmlns:`http://www.w3.org/2000/svg`},V=e=>{let t=(0,D.c)(15),n,r,i,a,o,s,c;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6],c=t[7]):({color:a,size:o,strokeWidth:s,absoluteStrokeWidth:n,className:c,children:r,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s,t[7]=c);let l=a===void 0?`currentColor`:a,u=o===void 0?24:o,d=s===void 0?2:s,f=c===void 0?``:c,p=n?Number(d)*24/Number(u):d,m;return t[8]!==r||t[9]!==f||t[10]!==l||t[11]!==i||t[12]!==u||t[13]!==p?(m=(0,N.jsx)(`svg`,{"aria-hidden":`true`,...B,className:f,height:u,stroke:l,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:p,width:u,...i,children:r}),t[8]=r,t[9]=f,t[10]=l,t[11]=i,t[12]=u,t[13]=p,t[14]=m):m=t[14],m},H=e=>{let t=(0,D.c)(4),n,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,N.jsx)(`title`,{children:`Markdown`}),r=(0,N.jsx)(`path`,{d:`M232,48H24A16,16,0,0,0,8,64V192a16,16,0,0,0,16,16H232a16,16,0,0,0,16-16V64A16,16,0,0,0,232,48Zm0,144H24V64H232V192ZM128,104v48a8,8,0,0,1-16,0V123.31L93.66,141.66a8,8,0,0,1-11.32,0L64,123.31V152a8,8,0,0,1-16,0V104a8,8,0,0,1,13.66-5.66L88,124.69l26.34-26.35A8,8,0,0,1,128,104Zm77.66,18.34a8,8,0,0,1,0,11.32l-24,24a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L168,132.69V104a8,8,0,0,1,16,0v28.69l10.34-10.35A8,8,0,0,1,205.66,122.34Z`}),t[0]=n,t[1]=r):(n=t[0],r=t[1]);let i;return t[2]===e?i=t[3]:(i=(0,N.jsxs)(V,{...e,viewBox:`0 0 256 256`,fill:`currentColor`,children:[n,r]}),t[2]=e,t[3]=i),i},U=e=>{let t=(0,D.c)(4),n,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,N.jsx)(`title`,{children:`Textbox`}),r=(0,N.jsx)(`path`,{d:`M112,40a8,8,0,0,0-8,8V64H24A16,16,0,0,0,8,80v96a16,16,0,0,0,16,16h80v16a8,8,0,0,0,16,0V48A8,8,0,0,0,112,40ZM24,176V80h80v96ZM248,80v96a16,16,0,0,1-16,16H144a8,8,0,0,1,0-16h88V80H144a8,8,0,0,1,0-16h88A16,16,0,0,1,248,80ZM88,112a8,8,0,0,1-8,8H72v24a8,8,0,0,1-16,0V120H48a8,8,0,0,1,0-16H80A8,8,0,0,1,88,112Z`}),t[0]=n,t[1]=r):(n=t[0],r=t[1]);let i;return t[2]===e?i=t[3]:(i=(0,N.jsxs)(V,{...e,viewBox:`0 0 256 256`,fill:`currentColor`,children:[n,r]}),t[2]=e,t[3]=i),i};function W(e){let t=(0,D.c)(48),{isSourceMode:n,onModeChange:r,sourceDisabled:o,wysiwygDisabled:s,wysiwygLabel:c,sourceLabel:l,wysiwygDisabledReason:p}=e,g=o===void 0?!1:o,_=s===void 0?!1:s,{_:v}=a(),y;t[0]!==v||t[1]!==c?(y=c??v({id:`ur2XSb`}),t[0]=v,t[1]=c,t[2]=y):y=t[2];let b=y,x;t[3]!==v||t[4]!==l?(x=l??v({id:`xbdtfY`}),t[3]=v,t[4]=l,t[5]=x):x=t[5];let S=x,C=(0,E.useId)(),w=_&&p?p:null,T=n?`source`:`wysiwyg`,O;t[6]===r?O=t[7]:(O=e=>{e&&r(e)},t[6]=r,t[7]=O);let k;t[8]===v?k=t[9]:(k=v({id:`n7aopT`}),t[8]=v,t[9]=k);let A=w?C:void 0,j;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(j=(0,N.jsx)(U,{className:`size-4`}),t[10]=j):j=t[10];let M;t[11]!==A||t[12]!==_||t[13]!==b?(M=(0,N.jsx)(m,{value:`wysiwyg`,"aria-label":b,"aria-describedby":A,disabled:_,className:`size-7 px-0 dark:data-[state=on]:bg-foreground/15`,children:j}),t[11]=A,t[12]=_,t[13]=b,t[14]=M):M=t[14];let P;t[15]!==w||t[16]!==C?(P=w?(0,N.jsx)(`span`,{id:C,className:`sr-only`,children:w}):null,t[15]=w,t[16]=C,t[17]=P):P=t[17];let F;t[18]!==M||t[19]!==P?(F=(0,N.jsx)(u,{asChild:!0,children:(0,N.jsxs)(`div`,{children:[M,P]})}),t[18]=M,t[19]=P,t[20]=F):F=t[20];let I;t[21]!==_||t[22]!==p||t[23]!==c?(I=_&&p?p:c||(0,N.jsx)(i,{id:`Mb_20S`}),t[21]=_,t[22]=p,t[23]=c,t[24]=I):I=t[24];let L;t[25]===I?L=t[26]:(L=(0,N.jsx)(d,{side:`bottom`,children:I}),t[25]=I,t[26]=L);let R;t[27]!==F||t[28]!==L?(R=(0,N.jsxs)(f,{children:[F,L]}),t[27]=F,t[28]=L,t[29]=R):R=t[29];let z;t[30]===Symbol.for(`react.memo_cache_sentinel`)?(z=(0,N.jsx)(H,{className:`size-4`}),t[30]=z):z=t[30];let B;t[31]!==g||t[32]!==S?(B=(0,N.jsx)(u,{asChild:!0,children:(0,N.jsx)(`div`,{children:(0,N.jsx)(m,{value:`source`,"aria-label":S,disabled:g,className:`size-7 px-0 dark:data-[state=on]:bg-foreground/15`,children:z})})}),t[31]=g,t[32]=S,t[33]=B):B=t[33];let V;t[34]!==g||t[35]!==l?(V=g?(0,N.jsx)(i,{id:`G-JBA1`}):l||(0,N.jsx)(i,{id:`u6Hp4N`}),t[34]=g,t[35]=l,t[36]=V):V=t[36];let W;t[37]===V?W=t[38]:(W=(0,N.jsx)(d,{side:`bottom`,children:V}),t[37]=V,t[38]=W);let G;t[39]!==B||t[40]!==W?(G=(0,N.jsxs)(f,{children:[B,W]}),t[39]=B,t[40]=W,t[41]=G):G=t[41];let K;return t[42]!==R||t[43]!==G||t[44]!==T||t[45]!==O||t[46]!==k?(K=(0,N.jsxs)(h,{type:`single`,value:T,onValueChange:O,"aria-label":k,variant:`segmented`,size:`sm`,spacing:1,className:`shrink-0 bg-muted p-0.5 data-[size=sm]:rounded-[10px]`,children:[R,G]}),t[42]=R,t[43]=G,t[44]=T,t[45]=O,t[46]=k,t[47]=K):K=t[47],K}export{P as a,F as i,z as n,M as o,R as r,W as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./jsx-runtime-BUgB2tll.js";import{t as n}from"./react-f2sANaYj.js";import{n as r,r as i}from"./dist-Nvb76hAm.js";import{t as a}from"./compiler-runtime-BfE3aGVn.js";import{t as o}from"./createLucideIcon-DAkhoPjT.js";import{t as s}from"./button-Gol9BgNB.js";import{a as c,c as l,i as u,n as d,o as f,r as p,s as m,t as h}from"./dialog-TkFkuYVg.js";import{Ba as g,Fa as _,Ga as v,Pa as y,ja as b}from"./dist-CRnLx168.js";import{t as x}from"./eye-CASw1HTi.js";import{n as S}from"./dist-BLAMau9Z.js";import{c as C}from"./documents-events-CO5GMB1j.js";import"./config-provider-BvRqIV8_.js";import{n as w}from"./config-context-gd3BC-iY.js";var T=o(`arrow-down-to-line`,[[`path`,{d:`M12 17V3`,key:`1cwfxf`}],[`path`,{d:`m6 11 6 6 6-6`,key:`12ii2o`}],[`path`,{d:`M19 21H5`,key:`150jfl`}]]),E=o(`arrow-right-left`,[[`path`,{d:`m16 3 4 4-4 4`,key:`1x1c3m`}],[`path`,{d:`M20 7H4`,key:`zbl0bi`}],[`path`,{d:`m8 21-4-4 4-4`,key:`h9nckh`}],[`path`,{d:`M4 17h16`,key:`g4d7ey`}]]),D=o(`git-commit-vertical`,[[`path`,{d:`M12 3v6`,key:`1holv5`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}],[`path`,{d:`M12 15v6`,key:`a9ows0`}]]),O=o(`git-merge`,[[`circle`,{cx:`18`,cy:`18`,r:`3`,key:`1xkwt0`}],[`circle`,{cx:`6`,cy:`6`,r:`3`,key:`1lh9wr`}],[`path`,{d:`M6 21V9a9 9 0 0 0 9 9`,key:`7kw0sc`}]]),k=o(`laptop`,[[`path`,{d:`M18 5a2 2 0 0 1 2 2v8.526a2 2 0 0 0 .212.897l1.068 2.127a1 1 0 0 1-.9 1.45H3.62a1 1 0 0 1-.9-1.45l1.068-2.127A2 2 0 0 0 4 15.526V7a2 2 0 0 1 2-2z`,key:`1pdavp`}],[`path`,{d:`M20.054 15.987H3.946`,key:`14rxg9`}]]),A=a(),j=e(n(),1);async function M(){try{let e=await fetch(`/api/sync/status`);return e.ok?{status:await e.json()}:{status:null,error:`server`}}catch{return{status:null,error:`network`}}}function N(){return P().status}function P(){let e=(0,A.c)(8),[t,n]=(0,j.useState)(null),[r,i]=(0,j.useState)(null),a;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(a=function(){M().then(e=>{let{status:t,error:r}=e;i(r??null),t&&n(t)})},e[0]=a):a=e[0];let o=a,s,c;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(s=()=>{o()},c=[],e[1]=s,e[2]=c):(s=e[1],c=e[2]),(0,j.useEffect)(s,c);let l,u;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(l=()=>C(e=>{e.includes(`sync-status`)&&o()}),u=[],e[3]=l,e[4]=u):(l=e[3],u=e[4]),(0,j.useEffect)(l,u);let d;return e[5]!==r||e[6]!==t?(d={status:t,fetchError:r},e[5]=r,e[6]=t,e[7]=d):d=e[7],d}var F=t();function I(e){let t=(0,A.c)(4),{variant:n}=e;if((n===void 0?`full`:n)===`follow`){let e;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,F.jsx)(l,{children:(0,F.jsx)(r,{id:`8sMErm`})}),t[0]=e):e=t[0];let n;return t[1]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,F.jsxs)(F.Fragment,{children:[e,(0,F.jsx)(c,{children:(0,F.jsx)(r,{id:`CVRM5N`})})]}),t[1]=n):n=t[1],n}let i;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,F.jsx)(l,{children:(0,F.jsx)(r,{id:`q_9EcE`})}),t[2]=i):i=t[2];let a;return t[3]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,F.jsxs)(F.Fragment,{children:[i,(0,F.jsx)(c,{children:(0,F.jsx)(r,{id:`n6hXUm`})})]}),t[3]=a):a=t[3],a}function L(e){let t=(0,A.c)(3),{variant:n}=e,i=n===void 0?`full`:n,a;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,F.jsxs)(`p`,{className:`flex items-center gap-1.5 text-xs font-semibold font-mono uppercase tracking-wider text-primary`,children:[(0,F.jsx)(`span`,{"aria-hidden":`true`,className:`mb-[3px] flex items-center justify-center`,children:`◇`}),(0,F.jsx)(r,{id:`6s7LXO`})]}),t[0]=a):a=t[0];let o;return t[1]===i?o=t[2]:(o=(0,F.jsxs)(`div`,{role:`note`,className:`text-sm space-y-5`,children:[a,(0,F.jsx)(`div`,{className:`space-y-5`,children:i===`follow`?(0,F.jsx)(z,{}):(0,F.jsx)(R,{})})]}),t[1]=i,t[2]=o),o}function R(){let e=(0,A.c)(3),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,F.jsx)(B,{icon:(0,F.jsx)(E,{"aria-hidden":`true`,className:`mt-0.5 size-4 shrink-0 text-muted-foreground`}),title:(0,F.jsx)(r,{id:`cdmk8A`}),body:(0,F.jsx)(r,{id:`YaeyFh`})}),e[0]=t):t=e[0];let n;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,F.jsx)(B,{icon:(0,F.jsx)(D,{"aria-hidden":`true`,className:`mt-0.5 size-4 shrink-0 text-muted-foreground`}),title:(0,F.jsx)(r,{id:`9i21pa`}),body:(0,F.jsx)(r,{id:`KIIamL`})}),e[1]=n):n=e[1];let i;return e[2]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,F.jsxs)(F.Fragment,{children:[t,n,(0,F.jsx)(B,{icon:(0,F.jsx)(x,{"aria-hidden":`true`,className:`mt-0.5 size-4 shrink-0 text-muted-foreground`}),title:(0,F.jsx)(r,{id:`8cpeU3`}),body:(0,F.jsx)(r,{id:`DELNQk`})})]}),e[2]=i):i=e[2],i}function z(){let e=(0,A.c)(3),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,F.jsx)(B,{icon:(0,F.jsx)(T,{"aria-hidden":`true`,className:`mt-0.5 size-4 shrink-0 text-muted-foreground`}),title:(0,F.jsx)(r,{id:`0xnQ_X`}),body:(0,F.jsx)(r,{id:`aCoQfY`})}),e[0]=t):t=e[0];let n;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,F.jsx)(B,{icon:(0,F.jsx)(k,{"aria-hidden":`true`,className:`mt-0.5 size-4 shrink-0 text-muted-foreground`}),title:(0,F.jsx)(r,{id:`5rnB76`}),body:(0,F.jsx)(r,{id:`evHlIg`})}),e[1]=n):n=e[1];let i;return e[2]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,F.jsxs)(F.Fragment,{children:[t,n,(0,F.jsx)(B,{icon:(0,F.jsx)(O,{"aria-hidden":`true`,className:`mt-0.5 size-4 shrink-0 text-muted-foreground`}),title:(0,F.jsx)(r,{id:`oBK5fD`}),body:(0,F.jsx)(r,{id:`8Wav8y`})})]}),e[2]=i):i=e[2],i}function B(e){let t=(0,A.c)(10),{icon:n,title:r,body:i}=e,a;t[0]===r?a=t[1]:(a=(0,F.jsx)(`p`,{className:`font-medium`,children:r}),t[0]=r,t[1]=a);let o;t[2]===i?o=t[3]:(o=(0,F.jsx)(`p`,{className:`text-muted-foreground`,children:i}),t[2]=i,t[3]=o);let s;t[4]!==a||t[5]!==o?(s=(0,F.jsxs)(`div`,{className:`space-y-0.5`,children:[a,o]}),t[4]=a,t[5]=o,t[6]=s):s=t[6];let c;return t[7]!==n||t[8]!==s?(c=(0,F.jsxs)(`div`,{className:`flex items-start gap-3`,children:[n,s]}),t[7]=n,t[8]=s,t[9]=c):c=t[9],c}function V(){let e=(0,A.c)(2),{projectLocalBinding:t}=w();if(t===null)return null;let n;return e[0]===t?n=e[1]:(n=e=>{let n=e?`full`:`off`,r=t.patch({autoSync:{mode:n,enabled:e}});return r.ok?{ok:!0}:{ok:!1,error:_(r.error)}},e[0]=t,e[1]=n),n}function H(){let e=(0,A.c)(2),{projectLocalBinding:t}=w();if(t===null)return null;let n;return e[0]===t?n=e[1]:(n=e=>{let n=t.patch({autoSync:{mode:e,enabled:null}});return n.ok?{ok:!0}:{ok:!1,error:_(n.error)}},e[0]=t,e[1]=n),n}function U(){let e=(0,A.c)(2),{projectBinding:t}=w();if(t===null)return null;let n;return e[0]===t?n=e[1]:(n=e=>{let n=t.patch({autoSync:{default:e}});return n.ok?{ok:!0}:{ok:!1,error:_(n.error)}},e[0]=t,e[1]=n),n}function W(e,t){let n=(0,A.c)(12),{_:r}=i(),[a,o]=(0,j.useState)(!1),s;n[0]!==r||n[1]!==e?(s=function(t){if(e===null)return S.error(r({id:`fiMNLl`})),!1;let n=e(t);if(!n.ok){console.error(`[sync] toggle failed:`,n.error);let e=n.error;return S.error(r(t?{id:`04RA0-`,values:{detail:e}}:{id:`qjHMHf`,values:{detail:e}})),!1}return!0},n[0]=r,n[1]=e,n[2]=s):s=n[2];let c=s,l;n[3]===c?l=n[4]:(l=function(e){if(e){o(!0);return}c(!1)},n[3]=c,n[4]=l);let u=l,d;n[5]!==c||n[6]!==t?(d=function(){c(!0)&&(o(!1),t?.onEnabled?.())},n[5]=c,n[6]=t,n[7]=d):d=n[7];let f=d,p;return n[8]!==a||n[9]!==f||n[10]!==u?(p={confirmOpen:a,setConfirmOpen:o,onToggleRequest:u,onConfirm:f},n[8]=a,n[9]=f,n[10]=u,n[11]=p):p=n[11],p}function G(e,t,n){let r=(0,A.c)(15),{_:a}=i(),[o,s]=(0,j.useState)(!1),[c,l]=(0,j.useState)(null),u;r[0]!==a||r[1]!==n||r[2]!==e?(u=function(t){if(e===null)return S.error(a({id:`fiMNLl`})),!1;let r=e(t);if(!r.ok){console.error(`[sync] mode change failed:`,r.error);let e=r.error;return S.error(a({id:`nOEDQs`,values:{detail:e}})),!1}return n?.onApplied?.(t),!0},r[0]=a,r[1]=n,r[2]=e,r[3]=u):u=r[3];let d=u,f;r[4]!==d||r[5]!==t?(f=function(e){if(e!==t){if(e===`off`){d(`off`);return}l(e),s(!0)}},r[4]=d,r[5]=t,r[6]=f):f=r[6];let p=f,m;r[7]!==d||r[8]!==c?(m=function(){c!==null&&d(c)&&s(!1)},r[7]=d,r[8]=c,r[9]=m):m=r[9];let h=m,g;return r[10]!==o||r[11]!==h||r[12]!==p||r[13]!==c?(g={confirmOpen:o,setConfirmOpen:s,pendingMode:c,onModeSelect:p,onConfirm:h},r[10]=o,r[11]=h,r[12]=p,r[13]=c,r[14]=g):g=r[14],g}function K(){let e=(0,A.c)(2),{projectLocalBinding:t}=w();if(t===null)return null;let n;return e[0]===t?n=e[1]:(n=e=>{let n=t.patch({autoSync:e});return n.ok?{ok:!0}:{ok:!1,error:_(n.error)}},e[0]=t,e[1]=n),n}function q(e,t){let n=(0,A.c)(34),{_:r}=i(),a=K(),[o,s]=(0,j.useState)(!1),[c,l]=(0,j.useState)(null),u;n[0]===e?u=n[1]:(u=v(e)??`off`,n[0]=e,n[1]=u);let d=u,f=d===`follow`||d===`full`,p;n[2]===e?p=n[3]:(p=g(e),n[2]=e,n[3]=p);let m=p,h;n[4]===e?h=n[5]:(h=y(e),n[4]=e,n[5]=h);let _=h,x;n[6]===e?x=n[7]:(x=b(e),n[6]=e,n[7]=x);let C=x,w;n[8]!==r||n[9]!==a?(w=function(e){if(a===null)return S.error(r({id:`fiMNLl`})),!1;let t=a(e);if(!t.ok){console.error(`[sync] badge control failed:`,t.error);let e=t.error;return S.error(r({id:`ZVOhXM`,values:{detail:e}})),!1}return!0},n[8]=r,n[9]=a,n[10]=w):w=n[10];let T=w,E;n[11]!==f||n[12]!==T||n[13]!==d||n[14]!==C?(E=function(e){if(e){if(C===`full`){l(`full`),s(!0);return}T({mode:`follow`,enabled:null,resumeMode:null});return}T({mode:`off`,enabled:null,resumeMode:f?d:C})},n[11]=f,n[12]=T,n[13]=d,n[14]=C,n[15]=E):E=n[15];let D=E,O;n[16]!==f||n[17]!==T||n[18]!==C?(O=function(e){if(e!==C){if(!f){T({resumeMode:e});return}l(e),s(!0)}},n[16]=f,n[17]=T,n[18]=C,n[19]=O):O=n[19];let k=O,M;n[20]!==T||n[21]!==c?(M=function(){c!==null&&T({mode:c,enabled:null,resumeMode:null})&&(s(!1),l(null))},n[20]=T,n[21]=c,n[22]=M):M=n[22];let N=M,P=c===`follow`?t:0,F;return n[23]!==f||n[24]!==o||n[25]!==_||n[26]!==N||n[27]!==k||n[28]!==D||n[29]!==m||n[30]!==c||n[31]!==P||n[32]!==C?(F={active:f,paused:m,everEnabled:_,toggleMode:C,confirmOpen:o,setConfirmOpen:s,pendingMode:c,strandedCommitCount:P,onToggleActive:D,onModeSelect:k,onConfirm:N},n[23]=f,n[24]=o,n[25]=_,n[26]=N,n[27]=k,n[28]=D,n[29]=m,n[30]=c,n[31]=P,n[32]=C,n[33]=F):F=n[33],F}async function J(e){let t=await fetch(`/api/sync/trigger`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({op:e})});if(!t.ok)throw Error(`sync trigger failed: ${t.status}`)}function Y(e){let t=(0,A.c)(24),{open:n,onOpenChange:i,onConfirm:a,variant:o,strandedCommitCount:c}=e,l=o===void 0?`full`:o,g=c===void 0?0:c,_=l===`follow`&&g>0,v;t[0]===l?v=t[1]:(v=(0,F.jsx)(m,{children:(0,F.jsx)(I,{variant:l})}),t[0]=l,t[1]=v);let y;t[2]===l?y=t[3]:(y=(0,F.jsx)(L,{variant:l}),t[2]=l,t[3]=y);let b;t[4]!==_||t[5]!==g?(b=_&&(0,F.jsx)(`p`,{className:`mt-4 text-sm text-muted-foreground`,children:(0,F.jsx)(r,{id:`caw8gO`,values:{strandedCommitCount:g}})}),t[4]=_,t[5]=g,t[6]=b):b=t[6];let x;t[7]!==y||t[8]!==b?(x=(0,F.jsxs)(d,{children:[y,b]}),t[7]=y,t[8]=b,t[9]=x):x=t[9];let S;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(S=(0,F.jsx)(p,{asChild:!0,children:(0,F.jsx)(s,{variant:`outline`,children:(0,F.jsx)(r,{id:`dEgA5A`})})}),t[10]=S):S=t[10];let C;t[11]===l?C=t[12]:(C=l===`follow`?(0,F.jsx)(r,{id:`U4nTfu`}):(0,F.jsx)(r,{id:`XU0OXn`}),t[11]=l,t[12]=C);let w;t[13]!==a||t[14]!==C?(w=(0,F.jsxs)(f,{children:[S,(0,F.jsx)(s,{onClick:a,children:C})]}),t[13]=a,t[14]=C,t[15]=w):w=t[15];let T;t[16]!==v||t[17]!==x||t[18]!==w?(T=(0,F.jsxs)(u,{className:`sm:max-w-lg`,children:[v,x,w]}),t[16]=v,t[17]=x,t[18]=w,t[19]=T):T=t[19];let E;return t[20]!==i||t[21]!==n||t[22]!==T?(E=(0,F.jsx)(h,{open:n,onOpenChange:i,children:T}),t[20]=i,t[21]=n,t[22]=T,t[23]=E):E=t[23],E}export{U as a,H as c,N as d,P as f,W as i,I as l,J as n,V as o,T as p,q as r,G as s,Y as t,L as u};
|
|
1
|
+
import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./jsx-runtime-BUgB2tll.js";import{t as n}from"./react-f2sANaYj.js";import{n as r,r as i}from"./dist-Nvb76hAm.js";import{t as a}from"./compiler-runtime-BfE3aGVn.js";import{t as o}from"./createLucideIcon-DAkhoPjT.js";import{t as s}from"./button-Gol9BgNB.js";import{a as c,c as l,i as u,n as d,o as f,r as p,s as m,t as h}from"./dialog-TkFkuYVg.js";import{Ba as g,Fa as _,Ga as v,Pa as y,ja as b}from"./dist-Cal4LUep.js";import{t as x}from"./eye-CASw1HTi.js";import{n as S}from"./dist-BLAMau9Z.js";import{c as C}from"./documents-events-1HWCdfoh.js";import"./config-provider-DIuwNlqX.js";import{n as w}from"./config-context-gd3BC-iY.js";var T=o(`arrow-down-to-line`,[[`path`,{d:`M12 17V3`,key:`1cwfxf`}],[`path`,{d:`m6 11 6 6 6-6`,key:`12ii2o`}],[`path`,{d:`M19 21H5`,key:`150jfl`}]]),E=o(`arrow-right-left`,[[`path`,{d:`m16 3 4 4-4 4`,key:`1x1c3m`}],[`path`,{d:`M20 7H4`,key:`zbl0bi`}],[`path`,{d:`m8 21-4-4 4-4`,key:`h9nckh`}],[`path`,{d:`M4 17h16`,key:`g4d7ey`}]]),D=o(`git-commit-vertical`,[[`path`,{d:`M12 3v6`,key:`1holv5`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}],[`path`,{d:`M12 15v6`,key:`a9ows0`}]]),O=o(`git-merge`,[[`circle`,{cx:`18`,cy:`18`,r:`3`,key:`1xkwt0`}],[`circle`,{cx:`6`,cy:`6`,r:`3`,key:`1lh9wr`}],[`path`,{d:`M6 21V9a9 9 0 0 0 9 9`,key:`7kw0sc`}]]),k=o(`laptop`,[[`path`,{d:`M18 5a2 2 0 0 1 2 2v8.526a2 2 0 0 0 .212.897l1.068 2.127a1 1 0 0 1-.9 1.45H3.62a1 1 0 0 1-.9-1.45l1.068-2.127A2 2 0 0 0 4 15.526V7a2 2 0 0 1 2-2z`,key:`1pdavp`}],[`path`,{d:`M20.054 15.987H3.946`,key:`14rxg9`}]]),A=a(),j=e(n(),1);async function M(){try{let e=await fetch(`/api/sync/status`);return e.ok?{status:await e.json()}:{status:null,error:`server`}}catch{return{status:null,error:`network`}}}function N(){return P().status}function P(){let e=(0,A.c)(8),[t,n]=(0,j.useState)(null),[r,i]=(0,j.useState)(null),a;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(a=function(){M().then(e=>{let{status:t,error:r}=e;i(r??null),t&&n(t)})},e[0]=a):a=e[0];let o=a,s,c;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(s=()=>{o()},c=[],e[1]=s,e[2]=c):(s=e[1],c=e[2]),(0,j.useEffect)(s,c);let l,u;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(l=()=>C(e=>{e.includes(`sync-status`)&&o()}),u=[],e[3]=l,e[4]=u):(l=e[3],u=e[4]),(0,j.useEffect)(l,u);let d;return e[5]!==r||e[6]!==t?(d={status:t,fetchError:r},e[5]=r,e[6]=t,e[7]=d):d=e[7],d}var F=t();function I(e){let t=(0,A.c)(4),{variant:n}=e;if((n===void 0?`full`:n)===`follow`){let e;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,F.jsx)(l,{children:(0,F.jsx)(r,{id:`8sMErm`})}),t[0]=e):e=t[0];let n;return t[1]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,F.jsxs)(F.Fragment,{children:[e,(0,F.jsx)(c,{children:(0,F.jsx)(r,{id:`CVRM5N`})})]}),t[1]=n):n=t[1],n}let i;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,F.jsx)(l,{children:(0,F.jsx)(r,{id:`q_9EcE`})}),t[2]=i):i=t[2];let a;return t[3]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,F.jsxs)(F.Fragment,{children:[i,(0,F.jsx)(c,{children:(0,F.jsx)(r,{id:`n6hXUm`})})]}),t[3]=a):a=t[3],a}function L(e){let t=(0,A.c)(3),{variant:n}=e,i=n===void 0?`full`:n,a;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,F.jsxs)(`p`,{className:`flex items-center gap-1.5 text-xs font-semibold font-mono uppercase tracking-wider text-primary`,children:[(0,F.jsx)(`span`,{"aria-hidden":`true`,className:`mb-[3px] flex items-center justify-center`,children:`◇`}),(0,F.jsx)(r,{id:`6s7LXO`})]}),t[0]=a):a=t[0];let o;return t[1]===i?o=t[2]:(o=(0,F.jsxs)(`div`,{role:`note`,className:`text-sm space-y-5`,children:[a,(0,F.jsx)(`div`,{className:`space-y-5`,children:i===`follow`?(0,F.jsx)(z,{}):(0,F.jsx)(R,{})})]}),t[1]=i,t[2]=o),o}function R(){let e=(0,A.c)(3),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,F.jsx)(B,{icon:(0,F.jsx)(E,{"aria-hidden":`true`,className:`mt-0.5 size-4 shrink-0 text-muted-foreground`}),title:(0,F.jsx)(r,{id:`cdmk8A`}),body:(0,F.jsx)(r,{id:`YaeyFh`})}),e[0]=t):t=e[0];let n;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,F.jsx)(B,{icon:(0,F.jsx)(D,{"aria-hidden":`true`,className:`mt-0.5 size-4 shrink-0 text-muted-foreground`}),title:(0,F.jsx)(r,{id:`9i21pa`}),body:(0,F.jsx)(r,{id:`KIIamL`})}),e[1]=n):n=e[1];let i;return e[2]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,F.jsxs)(F.Fragment,{children:[t,n,(0,F.jsx)(B,{icon:(0,F.jsx)(x,{"aria-hidden":`true`,className:`mt-0.5 size-4 shrink-0 text-muted-foreground`}),title:(0,F.jsx)(r,{id:`8cpeU3`}),body:(0,F.jsx)(r,{id:`DELNQk`})})]}),e[2]=i):i=e[2],i}function z(){let e=(0,A.c)(3),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,F.jsx)(B,{icon:(0,F.jsx)(T,{"aria-hidden":`true`,className:`mt-0.5 size-4 shrink-0 text-muted-foreground`}),title:(0,F.jsx)(r,{id:`0xnQ_X`}),body:(0,F.jsx)(r,{id:`aCoQfY`})}),e[0]=t):t=e[0];let n;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,F.jsx)(B,{icon:(0,F.jsx)(k,{"aria-hidden":`true`,className:`mt-0.5 size-4 shrink-0 text-muted-foreground`}),title:(0,F.jsx)(r,{id:`5rnB76`}),body:(0,F.jsx)(r,{id:`evHlIg`})}),e[1]=n):n=e[1];let i;return e[2]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,F.jsxs)(F.Fragment,{children:[t,n,(0,F.jsx)(B,{icon:(0,F.jsx)(O,{"aria-hidden":`true`,className:`mt-0.5 size-4 shrink-0 text-muted-foreground`}),title:(0,F.jsx)(r,{id:`oBK5fD`}),body:(0,F.jsx)(r,{id:`8Wav8y`})})]}),e[2]=i):i=e[2],i}function B(e){let t=(0,A.c)(10),{icon:n,title:r,body:i}=e,a;t[0]===r?a=t[1]:(a=(0,F.jsx)(`p`,{className:`font-medium`,children:r}),t[0]=r,t[1]=a);let o;t[2]===i?o=t[3]:(o=(0,F.jsx)(`p`,{className:`text-muted-foreground`,children:i}),t[2]=i,t[3]=o);let s;t[4]!==a||t[5]!==o?(s=(0,F.jsxs)(`div`,{className:`space-y-0.5`,children:[a,o]}),t[4]=a,t[5]=o,t[6]=s):s=t[6];let c;return t[7]!==n||t[8]!==s?(c=(0,F.jsxs)(`div`,{className:`flex items-start gap-3`,children:[n,s]}),t[7]=n,t[8]=s,t[9]=c):c=t[9],c}function V(){let e=(0,A.c)(2),{projectLocalBinding:t}=w();if(t===null)return null;let n;return e[0]===t?n=e[1]:(n=e=>{let n=e?`full`:`off`,r=t.patch({autoSync:{mode:n,enabled:e}});return r.ok?{ok:!0}:{ok:!1,error:_(r.error)}},e[0]=t,e[1]=n),n}function H(){let e=(0,A.c)(2),{projectLocalBinding:t}=w();if(t===null)return null;let n;return e[0]===t?n=e[1]:(n=e=>{let n=t.patch({autoSync:{mode:e,enabled:null}});return n.ok?{ok:!0}:{ok:!1,error:_(n.error)}},e[0]=t,e[1]=n),n}function U(){let e=(0,A.c)(2),{projectBinding:t}=w();if(t===null)return null;let n;return e[0]===t?n=e[1]:(n=e=>{let n=t.patch({autoSync:{default:e}});return n.ok?{ok:!0}:{ok:!1,error:_(n.error)}},e[0]=t,e[1]=n),n}function W(e,t){let n=(0,A.c)(12),{_:r}=i(),[a,o]=(0,j.useState)(!1),s;n[0]!==r||n[1]!==e?(s=function(t){if(e===null)return S.error(r({id:`fiMNLl`})),!1;let n=e(t);if(!n.ok){console.error(`[sync] toggle failed:`,n.error);let e=n.error;return S.error(r(t?{id:`04RA0-`,values:{detail:e}}:{id:`qjHMHf`,values:{detail:e}})),!1}return!0},n[0]=r,n[1]=e,n[2]=s):s=n[2];let c=s,l;n[3]===c?l=n[4]:(l=function(e){if(e){o(!0);return}c(!1)},n[3]=c,n[4]=l);let u=l,d;n[5]!==c||n[6]!==t?(d=function(){c(!0)&&(o(!1),t?.onEnabled?.())},n[5]=c,n[6]=t,n[7]=d):d=n[7];let f=d,p;return n[8]!==a||n[9]!==f||n[10]!==u?(p={confirmOpen:a,setConfirmOpen:o,onToggleRequest:u,onConfirm:f},n[8]=a,n[9]=f,n[10]=u,n[11]=p):p=n[11],p}function G(e,t,n){let r=(0,A.c)(15),{_:a}=i(),[o,s]=(0,j.useState)(!1),[c,l]=(0,j.useState)(null),u;r[0]!==a||r[1]!==n||r[2]!==e?(u=function(t){if(e===null)return S.error(a({id:`fiMNLl`})),!1;let r=e(t);if(!r.ok){console.error(`[sync] mode change failed:`,r.error);let e=r.error;return S.error(a({id:`nOEDQs`,values:{detail:e}})),!1}return n?.onApplied?.(t),!0},r[0]=a,r[1]=n,r[2]=e,r[3]=u):u=r[3];let d=u,f;r[4]!==d||r[5]!==t?(f=function(e){if(e!==t){if(e===`off`){d(`off`);return}l(e),s(!0)}},r[4]=d,r[5]=t,r[6]=f):f=r[6];let p=f,m;r[7]!==d||r[8]!==c?(m=function(){c!==null&&d(c)&&s(!1)},r[7]=d,r[8]=c,r[9]=m):m=r[9];let h=m,g;return r[10]!==o||r[11]!==h||r[12]!==p||r[13]!==c?(g={confirmOpen:o,setConfirmOpen:s,pendingMode:c,onModeSelect:p,onConfirm:h},r[10]=o,r[11]=h,r[12]=p,r[13]=c,r[14]=g):g=r[14],g}function K(){let e=(0,A.c)(2),{projectLocalBinding:t}=w();if(t===null)return null;let n;return e[0]===t?n=e[1]:(n=e=>{let n=t.patch({autoSync:e});return n.ok?{ok:!0}:{ok:!1,error:_(n.error)}},e[0]=t,e[1]=n),n}function q(e,t){let n=(0,A.c)(34),{_:r}=i(),a=K(),[o,s]=(0,j.useState)(!1),[c,l]=(0,j.useState)(null),u;n[0]===e?u=n[1]:(u=v(e)??`off`,n[0]=e,n[1]=u);let d=u,f=d===`follow`||d===`full`,p;n[2]===e?p=n[3]:(p=g(e),n[2]=e,n[3]=p);let m=p,h;n[4]===e?h=n[5]:(h=y(e),n[4]=e,n[5]=h);let _=h,x;n[6]===e?x=n[7]:(x=b(e),n[6]=e,n[7]=x);let C=x,w;n[8]!==r||n[9]!==a?(w=function(e){if(a===null)return S.error(r({id:`fiMNLl`})),!1;let t=a(e);if(!t.ok){console.error(`[sync] badge control failed:`,t.error);let e=t.error;return S.error(r({id:`ZVOhXM`,values:{detail:e}})),!1}return!0},n[8]=r,n[9]=a,n[10]=w):w=n[10];let T=w,E;n[11]!==f||n[12]!==T||n[13]!==d||n[14]!==C?(E=function(e){if(e){if(C===`full`){l(`full`),s(!0);return}T({mode:`follow`,enabled:null,resumeMode:null});return}T({mode:`off`,enabled:null,resumeMode:f?d:C})},n[11]=f,n[12]=T,n[13]=d,n[14]=C,n[15]=E):E=n[15];let D=E,O;n[16]!==f||n[17]!==T||n[18]!==C?(O=function(e){if(e!==C){if(!f){T({resumeMode:e});return}l(e),s(!0)}},n[16]=f,n[17]=T,n[18]=C,n[19]=O):O=n[19];let k=O,M;n[20]!==T||n[21]!==c?(M=function(){c!==null&&T({mode:c,enabled:null,resumeMode:null})&&(s(!1),l(null))},n[20]=T,n[21]=c,n[22]=M):M=n[22];let N=M,P=c===`follow`?t:0,F;return n[23]!==f||n[24]!==o||n[25]!==_||n[26]!==N||n[27]!==k||n[28]!==D||n[29]!==m||n[30]!==c||n[31]!==P||n[32]!==C?(F={active:f,paused:m,everEnabled:_,toggleMode:C,confirmOpen:o,setConfirmOpen:s,pendingMode:c,strandedCommitCount:P,onToggleActive:D,onModeSelect:k,onConfirm:N},n[23]=f,n[24]=o,n[25]=_,n[26]=N,n[27]=k,n[28]=D,n[29]=m,n[30]=c,n[31]=P,n[32]=C,n[33]=F):F=n[33],F}async function J(e){let t=await fetch(`/api/sync/trigger`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({op:e})});if(!t.ok)throw Error(`sync trigger failed: ${t.status}`)}function Y(e){let t=(0,A.c)(24),{open:n,onOpenChange:i,onConfirm:a,variant:o,strandedCommitCount:c}=e,l=o===void 0?`full`:o,g=c===void 0?0:c,_=l===`follow`&&g>0,v;t[0]===l?v=t[1]:(v=(0,F.jsx)(m,{children:(0,F.jsx)(I,{variant:l})}),t[0]=l,t[1]=v);let y;t[2]===l?y=t[3]:(y=(0,F.jsx)(L,{variant:l}),t[2]=l,t[3]=y);let b;t[4]!==_||t[5]!==g?(b=_&&(0,F.jsx)(`p`,{className:`mt-4 text-sm text-muted-foreground`,children:(0,F.jsx)(r,{id:`caw8gO`,values:{strandedCommitCount:g}})}),t[4]=_,t[5]=g,t[6]=b):b=t[6];let x;t[7]!==y||t[8]!==b?(x=(0,F.jsxs)(d,{children:[y,b]}),t[7]=y,t[8]=b,t[9]=x):x=t[9];let S;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(S=(0,F.jsx)(p,{asChild:!0,children:(0,F.jsx)(s,{variant:`outline`,children:(0,F.jsx)(r,{id:`dEgA5A`})})}),t[10]=S):S=t[10];let C;t[11]===l?C=t[12]:(C=l===`follow`?(0,F.jsx)(r,{id:`U4nTfu`}):(0,F.jsx)(r,{id:`XU0OXn`}),t[11]=l,t[12]=C);let w;t[13]!==a||t[14]!==C?(w=(0,F.jsxs)(f,{children:[S,(0,F.jsx)(s,{onClick:a,children:C})]}),t[13]=a,t[14]=C,t[15]=w):w=t[15];let T;t[16]!==v||t[17]!==x||t[18]!==w?(T=(0,F.jsxs)(u,{className:`sm:max-w-lg`,children:[v,x,w]}),t[16]=v,t[17]=x,t[18]=w,t[19]=T):T=t[19];let E;return t[20]!==i||t[21]!==n||t[22]!==T?(E=(0,F.jsx)(h,{open:n,onOpenChange:i,children:T}),t[20]=i,t[21]=n,t[22]=T,t[23]=E):E=t[23],E}export{U as a,H as c,N as d,P as f,W as i,I as l,J as n,V as o,T as p,q as r,G as s,Y as t,L as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./index-Bh6-_Nba.js";export{e as FeedbackForm};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{o as e}from"./chunk-CYidjpOJ.js";import{t as n}from"./jsx-runtime-BUgB2tll.js";import{t as r}from"./react-f2sANaYj.js";import{n as i,r as a}from"./dist-Nvb76hAm.js";import{t as o}from"./useQuery-ZeEDLtxh.js";import{n as s}from"./dist-PQ5KMVDh.js";import{t as c}from"./compiler-runtime-BfE3aGVn.js";import{s as l,t as u}from"./createLucideIcon-DAkhoPjT.js";import{t as d}from"./button-Gol9BgNB.js";import{i as f,n as p,t as m}from"./tooltip-B4J7VHmA.js";import{n as h,t as g}from"./toggle-group-CjXmmTGy.js";import{W as _,X as v,_t as y,lt as b,ut as x,yr as S}from"./dist-CRnLx168.js";import{t as C}from"./arrow-up-right-obRIg3Sv.js";import{i as w,o as T,s as E,t as D}from"./prop-types-CaVq0ILj.js";import{t as ee}from"./triangle-alert-Clgvyc7B.js";import{t as O}from"./dist-q14fBS3T.js";import{c as k}from"./documents-events-CO5GMB1j.js";import{s as te}from"./doc-hash-DaHNz5tZ.js";import{n as ne}from"./external-link-T4Nj1gcG.js";import{a as A,i as re,n as ie,o as ae,r as oe,s as se,t as ce}from"./panel-Cyobla0Z.js";import{t as le}from"./target-navigation-intent-DKN8qckv.js";import{t as ue}from"./ordinal-DrDHGs3t.js";import{n as de,t as j}from"./min-Bd9Lorof.js";import{C as fe,S as M,_ as pe,b as me,g as he,n as N,r as ge,t as _e,v as ve,w as ye,x as be,y as xe}from"./src-BaTc8y5c.js";import{t as Se}from"./colors-C1oQkVlI.js";import{t as Ce}from"./isObject-BkQ5hIlp.js";import{n as we,t as P}from"./now-Ck_JVNC2.js";var Te=u(`maximize-2`,[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`m21 3-7 7`,key:`1l2asr`}],[`path`,{d:`m3 21 7-7`,key:`tjx5ai`}],[`path`,{d:`M9 21H3v-6`,key:`wtvkvv`}]]),Ee=u(`minimize-2`,[[`path`,{d:`m14 10 7-7`,key:`oa77jy`}],[`path`,{d:`M20 10h-6V4`,key:`mjg0md`}],[`path`,{d:`m3 21 7-7`,key:`tjx5ai`}],[`path`,{d:`M4 14h6v6`,key:`rmj7iw`}]]);function F(e,n){let r=0;if(n===void 0)for(let n of e)(n=+n)&&(r+=n);else{let i=-1;for(let a of e)(a=+n(a,++i,e))&&(r+=a)}return r}var De=e=>()=>e;function Oe(e,{sourceEvent:n,subject:r,target:i,identifier:a,active:o,x:s,y:c,dx:l,dy:u,dispatch:d}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:n,enumerable:!0,configurable:!0},subject:{value:r,enumerable:!0,configurable:!0},target:{value:i,enumerable:!0,configurable:!0},identifier:{value:a,enumerable:!0,configurable:!0},active:{value:o,enumerable:!0,configurable:!0},x:{value:s,enumerable:!0,configurable:!0},y:{value:c,enumerable:!0,configurable:!0},dx:{value:l,enumerable:!0,configurable:!0},dy:{value:u,enumerable:!0,configurable:!0},_:{value:d}})}Oe.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function ke(e){return!e.ctrlKey&&!e.button}function Ae(){return this.parentNode}function je(e,n){return n??{x:e.x,y:e.y}}function Me(){return navigator.maxTouchPoints||`ontouchstart`in this}function Ne(){var e=ke,n=Ae,r=je,i=Me,a={},o=ye(`start`,`drag`,`end`),s=0,c,l,u,d,f=0;function p(e){e.on(`mousedown.drag`,m).filter(i).on(`touchstart.drag`,_).on(`touchmove.drag`,v,xe).on(`touchend.drag touchcancel.drag`,y).style(`touch-action`,`none`).style(`-webkit-tap-highlight-color`,`rgba(0,0,0,0)`)}function m(r,i){if(!(d||!e.call(this,r,i))){var a=b(this,n.call(this,r,i),r,i,`mouse`);a&&(fe(r.view).on(`mousemove.drag`,h,me).on(`mouseup.drag`,g,me),he(r.view),be(r),u=!1,c=r.clientX,l=r.clientY,a(`start`,r))}}function h(e){if(ve(e),!u){var n=e.clientX-c,r=e.clientY-l;u=n*n+r*r>f}a.mouse(`drag`,e)}function g(e){fe(e.view).on(`mousemove.drag mouseup.drag`,null),pe(e.view,u),ve(e),a.mouse(`end`,e)}function _(r,i){if(e.call(this,r,i)){var a=r.changedTouches,o=n.call(this,r,i),s=a.length,c,l;for(c=0;c<s;++c)(l=b(this,o,r,i,a[c].identifier,a[c]))&&(be(r),l(`start`,r,a[c]))}}function v(e){var n=e.changedTouches,r=n.length,i,o;for(i=0;i<r;++i)(o=a[n[i].identifier])&&(ve(e),o(`drag`,e,n[i]))}function y(e){var n=e.changedTouches,r=n.length,i,o;for(d&&clearTimeout(d),d=setTimeout(function(){d=null},500),i=0;i<r;++i)(o=a[n[i].identifier])&&(be(e),o(`end`,e,n[i]))}function b(e,n,i,c,l,u){var d=o.copy(),f=M(u||i,n),m,h,g;if((g=r.call(e,new Oe(`beforestart`,{sourceEvent:i,target:p,identifier:l,active:s,x:f[0],y:f[1],dx:0,dy:0,dispatch:d}),c))!=null)return m=g.x-f[0]||0,h=g.y-f[1]||0,function r(i,o,u){var _=f,v;switch(i){case`start`:a[l]=r,v=s++;break;case`end`:delete a[l],--s;case`drag`:f=M(u||o,n),v=s;break}d.call(i,e,new Oe(i,{sourceEvent:o,subject:g,target:p,identifier:l,active:v,x:f[0]+m,y:f[1]+h,dx:f[0]-_[0],dy:f[1]-_[1],dispatch:d}),c)}}return p.filter=function(n){return arguments.length?(e=typeof n==`function`?n:De(!!n),p):e},p.container=function(e){return arguments.length?(n=typeof e==`function`?e:De(e),p):n},p.subject=function(e){return arguments.length?(r=typeof e==`function`?e:De(e),p):r},p.touchable=function(e){return arguments.length?(i=typeof e==`function`?e:De(!!e),p):i},p.on=function(){var e=o.on.apply(o,arguments);return e===o?p:e},p.clickDistance=function(e){return arguments.length?(f=(e=+e)*e,p):Math.sqrt(f)},p}function I(e){let n=+this._x.call(null,e),r=+this._y.call(null,e);return Pe(this.cover(n,r),n,r,e)}function Pe(e,n,r,i){if(isNaN(n)||isNaN(r))return e;var a,o=e._root,s={data:i},c=e._x0,l=e._y0,u=e._x1,d=e._y1,f,p,m,h,g,_,v,y;if(!o)return e._root=s,e;for(;o.length;)if((g=n>=(f=(c+u)/2))?c=f:u=f,(_=r>=(p=(l+d)/2))?l=p:d=p,a=o,!(o=o[v=_<<1|g]))return a[v]=s,e;if(m=+e._x.call(null,o.data),h=+e._y.call(null,o.data),n===m&&r===h)return s.next=o,a?a[v]=s:e._root=s,e;do a=a?a[v]=[,,,,]:e._root=[,,,,],(g=n>=(f=(c+u)/2))?c=f:u=f,(_=r>=(p=(l+d)/2))?l=p:d=p;while((v=_<<1|g)==(y=(h>=p)<<1|m>=f));return a[y]=o,a[v]=s,e}function Fe(e){var n,r,i=e.length,a,o,s=Array(i),c=Array(i),l=1/0,u=1/0,d=-1/0,f=-1/0;for(r=0;r<i;++r)isNaN(a=+this._x.call(null,n=e[r]))||isNaN(o=+this._y.call(null,n))||(s[r]=a,c[r]=o,a<l&&(l=a),a>d&&(d=a),o<u&&(u=o),o>f&&(f=o));if(l>d||u>f)return this;for(this.cover(l,u).cover(d,f),r=0;r<i;++r)Pe(this,s[r],c[r],e[r]);return this}function Ie(e,n){if(isNaN(e=+e)||isNaN(n=+n))return this;var r=this._x0,i=this._y0,a=this._x1,o=this._y1;if(isNaN(r))a=(r=Math.floor(e))+1,o=(i=Math.floor(n))+1;else{for(var s=a-r||1,c=this._root,l,u;r>e||e>=a||i>n||n>=o;)switch(u=(n<i)<<1|e<r,l=[,,,,],l[u]=c,c=l,s*=2,u){case 0:a=r+s,o=i+s;break;case 1:r=a-s,o=i+s;break;case 2:a=r+s,i=o-s;break;case 3:r=a-s,i=o-s;break}this._root&&this._root.length&&(this._root=c)}return this._x0=r,this._y0=i,this._x1=a,this._y1=o,this}function L(){var e=[];return this.visit(function(n){if(!n.length)do e.push(n.data);while(n=n.next)}),e}function Le(e){return arguments.length?this.cover(+e[0][0],+e[0][1]).cover(+e[1][0],+e[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function R(e,n,r,i,a){this.node=e,this.x0=n,this.y0=r,this.x1=i,this.y1=a}function Re(e,n,r){var i,a=this._x0,o=this._y0,s,c,l,u,d=this._x1,f=this._y1,p=[],m=this._root,h,g;for(m&&p.push(new R(m,a,o,d,f)),r==null?r=1/0:(a=e-r,o=n-r,d=e+r,f=n+r,r*=r);h=p.pop();)if(!(!(m=h.node)||(s=h.x0)>d||(c=h.y0)>f||(l=h.x1)<a||(u=h.y1)<o))if(m.length){var _=(s+l)/2,v=(c+u)/2;p.push(new R(m[3],_,v,l,u),new R(m[2],s,v,_,u),new R(m[1],_,c,l,v),new R(m[0],s,c,_,v)),(g=(n>=v)<<1|e>=_)&&(h=p[p.length-1],p[p.length-1]=p[p.length-1-g],p[p.length-1-g]=h)}else{var y=e-+this._x.call(null,m.data),b=n-+this._y.call(null,m.data),x=y*y+b*b;if(x<r){var S=Math.sqrt(r=x);a=e-S,o=n-S,d=e+S,f=n+S,i=m.data}}return i}function ze(e){if(isNaN(d=+this._x.call(null,e))||isNaN(f=+this._y.call(null,e)))return this;var n,r=this._root,i,a,o,s=this._x0,c=this._y0,l=this._x1,u=this._y1,d,f,p,m,h,g,_,v;if(!r)return this;if(r.length)for(;;){if((h=d>=(p=(s+l)/2))?s=p:l=p,(g=f>=(m=(c+u)/2))?c=m:u=m,n=r,!(r=r[_=g<<1|h]))return this;if(!r.length)break;(n[_+1&3]||n[_+2&3]||n[_+3&3])&&(i=n,v=_)}for(;r.data!==e;)if(a=r,!(r=r.next))return this;return(o=r.next)&&delete r.next,a?(o?a.next=o:delete a.next,this):n?(o?n[_]=o:delete n[_],(r=n[0]||n[1]||n[2]||n[3])&&r===(n[3]||n[2]||n[1]||n[0])&&!r.length&&(i?i[v]=r:this._root=r),this):(this._root=o,this)}function Be(e){for(var n=0,r=e.length;n<r;++n)this.remove(e[n]);return this}function Ve(){return this._root}function He(){var e=0;return this.visit(function(n){if(!n.length)do++e;while(n=n.next)}),e}function Ue(e){var n=[],r,i=this._root,a,o,s,c,l;for(i&&n.push(new R(i,this._x0,this._y0,this._x1,this._y1));r=n.pop();)if(!e(i=r.node,o=r.x0,s=r.y0,c=r.x1,l=r.y1)&&i.length){var u=(o+c)/2,d=(s+l)/2;(a=i[3])&&n.push(new R(a,u,d,c,l)),(a=i[2])&&n.push(new R(a,o,d,u,l)),(a=i[1])&&n.push(new R(a,u,s,c,d)),(a=i[0])&&n.push(new R(a,o,s,u,d))}return this}function We(e){var n=[],r=[],i;for(this._root&&n.push(new R(this._root,this._x0,this._y0,this._x1,this._y1));i=n.pop();){var a=i.node;if(a.length){var o,s=i.x0,c=i.y0,l=i.x1,u=i.y1,d=(s+l)/2,f=(c+u)/2;(o=a[0])&&n.push(new R(o,s,c,d,f)),(o=a[1])&&n.push(new R(o,d,c,l,f)),(o=a[2])&&n.push(new R(o,s,f,d,u)),(o=a[3])&&n.push(new R(o,d,f,l,u))}r.push(i)}for(;i=r.pop();)e(i.node,i.x0,i.y0,i.x1,i.y1);return this}function Ge(e){return e[0]}function Ke(e){return arguments.length?(this._x=e,this):this._x}function qe(e){return e[1]}function Je(e){return arguments.length?(this._y=e,this):this._y}function Ye(e,n,r){var i=new Xe(n??Ge,r??qe,NaN,NaN,NaN,NaN);return e==null?i:i.addAll(e)}function Xe(e,n,r,i,a,o){this._x=e,this._y=n,this._x0=r,this._y0=i,this._x1=a,this._y1=o,this._root=void 0}function Ze(e){for(var n={data:e.data},r=n;e=e.next;)r=r.next={data:e.data};return n}var z=Ye.prototype=Xe.prototype;z.copy=function(){var e=new Xe(this._x,this._y,this._x0,this._y0,this._x1,this._y1),n=this._root,r,i;if(!n)return e;if(!n.length)return e._root=Ze(n),e;for(r=[{source:n,target:e._root=[,,,,]}];n=r.pop();)for(var a=0;a<4;++a)(i=n.source[a])&&(i.length?r.push({source:i,target:n.target[a]=[,,,,]}):n.target[a]=Ze(i));return e},z.add=I,z.addAll=Fe,z.cover=Ie,z.data=L,z.extent=Le,z.find=Re,z.remove=ze,z.removeAll=Be,z.root=Ve,z.size=He,z.visit=Ue,z.visitAfter=We,z.x=Ke,z.y=Je;var Qe=Se(`a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928`),B=n(),V=e(r(),1),$e=c(),et=`Expected a function`,tt=Math.max,nt=Math.min;function rt(e,n,r){var i,a,o,s,c,l,u=0,d=!1,f=!1,p=!0;if(typeof e!=`function`)throw TypeError(et);n=we(n)||0,Ce(r)&&(d=!!r.leading,f=`maxWait`in r,o=f?tt(we(r.maxWait)||0,n):o,p=`trailing`in r?!!r.trailing:p);function m(n){var r=i,o=a;return i=a=void 0,u=n,s=e.apply(o,r),s}function h(e){return u=e,c=setTimeout(v,n),d?m(e):s}function g(e){var r=e-l,i=e-u,a=n-r;return f?nt(a,o-i):a}function _(e){var r=e-l,i=e-u;return l===void 0||r>=n||r<0||f&&i>=o}function v(){var e=P();if(_(e))return y(e);c=setTimeout(v,g(e))}function y(e){return c=void 0,p&&i?m(e):(i=a=void 0,s)}function b(){c!==void 0&&clearTimeout(c),u=0,i=l=a=c=void 0}function x(){return c===void 0?s:y(P())}function S(){var e=P(),r=_(e);if(i=arguments,a=this,l=e,r){if(c===void 0)return h(l);if(f)return clearTimeout(c),c=setTimeout(v,n),m(l)}return c===void 0&&(c=setTimeout(v,n)),s}return S.cancel=b,S.flush=x,S}var it=`Expected a function`;function H(e,n,r){var i=!0,a=!0;if(typeof e!=`function`)throw TypeError(it);return Ce(r)&&(i=`leading`in r?!!r.leading:i,a=`trailing`in r?!!r.trailing:a),rt(e,n,{leading:i,maxWait:n,trailing:a})}var at=[`#60a5fa`,`#a78bfa`,`#34d399`,`#f472b6`,`#fb923c`,`#22d3ee`,`#c084fc`,`#4ade80`,`#f87171`,`#eab308`,`#ec4899`,`#06b67f`,`#8b5cf6`,`#f43f5e`,`#0ea5e9`,`#a855f7`],ot=[`#1e40af`,`#6b21a8`,`#166534`,`#9f1239`,`#9a3412`,`#164e63`,`#581c87`,`#166534`,`#991b1b`,`#854d0e`,`#831843`,`#0f766e`,`#312e81`,`#9f1239`,`#0c4a6e`,`#6b21a8`];function st(e){let n=2;for(let r=0;r<e.length;r++)n=Math.imul(n^e.charCodeAt(r),1540483477),n^=n>>>13,n=Math.imul(n,1540483477),n^=n>>>15;return n>>>0}function ct(e,n){let r=n?at:ot;return r[st(e)%r.length]}var lt={fullscreen:{maxEntries:10,containerClassName:`bottom-3 left-3 gap-1 rounded-lg px-3 py-2 text-xs`,titleClassName:`mb-1.5`,rowClassName:`gap-2`,swatchClassName:`size-2.5`,labelClassName:`max-w-[140px]`,overflowClassName:`pl-[18px]`},docked:{maxEntries:6,containerClassName:`bottom-2 left-2 gap-0.5 rounded-md px-2 py-1.5 text-[11px]`,titleClassName:`mb-1`,rowClassName:`gap-1.5`,swatchClassName:`size-2`,labelClassName:`max-w-[112px]`,overflowClassName:`pl-[14px]`}};function U(e){return lt[e]}function ut(e){let n=(0,$e.c)(6),{clusters:r,variant:a}=e,o=a===void 0?`fullscreen`:a,{resolvedTheme:c}=s(),u=c===`dark`,d,f;if(n[0]!==r||n[1]!==u||n[2]!==o){f=Symbol.for(`react.early_return_sentinel`);bb0:{let e=U(o);if(r.length===0){f=null;break bb0}let a=r.slice(0,e.maxEntries),s=r.length-a.length,c;n[5]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,B.jsx)(i,{id:`kmKqZg`}),n[5]=c):c=n[5],d=(0,B.jsxs)(`div`,{className:l(`pointer-events-none absolute z-10 flex flex-col backdrop-blur-sm`,e.containerClassName,u?`bg-black/70 text-gray-200`:`bg-white/80 text-gray-800 ring-1 ring-black/5`),children:[(0,B.jsx)(`div`,{className:l(`font-medium`,e.titleClassName,u?`text-slate-300`:`text-slate-700`),children:c}),a.map(n=>(0,B.jsxs)(`div`,{className:l(`flex items-center`,e.rowClassName),children:[(0,B.jsx)(`span`,{className:l(`inline-block shrink-0 rounded-full`,e.swatchClassName),style:{backgroundColor:ct(n,u)}}),(0,B.jsx)(`span`,{className:l(`truncate`,e.labelClassName),children:n})]},n)),s>0&&(0,B.jsx)(`div`,{className:l(`text-muted-foreground`,e.overflowClassName),children:(0,B.jsx)(i,{id:`lrhetp`,values:{overflow:s}})})]})}n[0]=r,n[1]=u,n[2]=o,n[3]=d,n[4]=f}else d=n[3],f=n[4];return f===Symbol.for(`react.early_return_sentinel`)?d:f}function W(e,n){var r=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(r!=null){var i,a,o,s,c=[],l=!0,u=!1;try{if(o=(r=r.call(e)).next,n===0){if(Object(r)!==r)return;l=!1}else for(;!(l=(i=o.call(r)).done)&&(c.push(i.value),c.length!==n);l=!0);}catch(e){u=!0,a=e}finally{try{if(!l&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(u)throw a}}return c}}function dt(e,n,r){return n=St(n),n in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function ft(e,n){return ht(e)||W(e,n)||_t(e,n)||bt()}function pt(e){return mt(e)||gt(e)||_t(e)||yt()}function mt(e){if(Array.isArray(e))return vt(e)}function ht(e){if(Array.isArray(e))return e}function gt(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function _t(e,n){if(e){if(typeof e==`string`)return vt(e,n);var r=Object.prototype.toString.call(e).slice(8,-1);if(r===`Object`&&e.constructor&&(r=e.constructor.name),r===`Map`||r===`Set`)return Array.from(e);if(r===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return vt(e,n)}}function vt(e,n){(n==null||n>e.length)&&(n=e.length);for(var r=0,i=Array(n);r<n;r++)i[r]=e[r];return i}function yt(){throw TypeError(`Invalid attempt to spread non-iterable instance.
|
|
1
|
+
import{o as e}from"./chunk-CYidjpOJ.js";import{t as n}from"./jsx-runtime-BUgB2tll.js";import{t as r}from"./react-f2sANaYj.js";import{n as i,r as a}from"./dist-Nvb76hAm.js";import{t as o}from"./useQuery-ZeEDLtxh.js";import{n as s}from"./dist-PQ5KMVDh.js";import{t as c}from"./compiler-runtime-BfE3aGVn.js";import{s as l,t as u}from"./createLucideIcon-DAkhoPjT.js";import{t as d}from"./button-Gol9BgNB.js";import{i as f,n as p,t as m}from"./tooltip-B4J7VHmA.js";import{n as h,t as g}from"./toggle-group-CjXmmTGy.js";import{W as _,X as v,_t as y,lt as b,ut as x,yr as S}from"./dist-Cal4LUep.js";import{t as C}from"./arrow-up-right-obRIg3Sv.js";import{i as w,o as T,s as E,t as D}from"./prop-types-B-N3_i3c.js";import{t as ee}from"./triangle-alert-Clgvyc7B.js";import{t as O}from"./dist-q14fBS3T.js";import{c as k}from"./documents-events-1HWCdfoh.js";import{s as te}from"./doc-hash-BSK-KaTu.js";import{n as ne}from"./external-link-T4Nj1gcG.js";import{a as A,i as re,n as ie,o as ae,r as oe,s as se,t as ce}from"./panel-Cyobla0Z.js";import{t as le}from"./target-navigation-intent-ClG4AlV8.js";import{t as ue}from"./ordinal-DrDHGs3t.js";import{n as de,t as j}from"./min-Bd9Lorof.js";import{C as fe,S as M,_ as pe,b as me,g as he,n as N,r as ge,t as _e,v as ve,w as ye,x as be,y as xe}from"./src-BaTc8y5c.js";import{t as Se}from"./colors-C1oQkVlI.js";import{t as Ce}from"./isObject-BkQ5hIlp.js";import{n as we,t as P}from"./now-Ck_JVNC2.js";var Te=u(`maximize-2`,[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`m21 3-7 7`,key:`1l2asr`}],[`path`,{d:`m3 21 7-7`,key:`tjx5ai`}],[`path`,{d:`M9 21H3v-6`,key:`wtvkvv`}]]),Ee=u(`minimize-2`,[[`path`,{d:`m14 10 7-7`,key:`oa77jy`}],[`path`,{d:`M20 10h-6V4`,key:`mjg0md`}],[`path`,{d:`m3 21 7-7`,key:`tjx5ai`}],[`path`,{d:`M4 14h6v6`,key:`rmj7iw`}]]);function F(e,n){let r=0;if(n===void 0)for(let n of e)(n=+n)&&(r+=n);else{let i=-1;for(let a of e)(a=+n(a,++i,e))&&(r+=a)}return r}var De=e=>()=>e;function Oe(e,{sourceEvent:n,subject:r,target:i,identifier:a,active:o,x:s,y:c,dx:l,dy:u,dispatch:d}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:n,enumerable:!0,configurable:!0},subject:{value:r,enumerable:!0,configurable:!0},target:{value:i,enumerable:!0,configurable:!0},identifier:{value:a,enumerable:!0,configurable:!0},active:{value:o,enumerable:!0,configurable:!0},x:{value:s,enumerable:!0,configurable:!0},y:{value:c,enumerable:!0,configurable:!0},dx:{value:l,enumerable:!0,configurable:!0},dy:{value:u,enumerable:!0,configurable:!0},_:{value:d}})}Oe.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function ke(e){return!e.ctrlKey&&!e.button}function Ae(){return this.parentNode}function je(e,n){return n??{x:e.x,y:e.y}}function Me(){return navigator.maxTouchPoints||`ontouchstart`in this}function Ne(){var e=ke,n=Ae,r=je,i=Me,a={},o=ye(`start`,`drag`,`end`),s=0,c,l,u,d,f=0;function p(e){e.on(`mousedown.drag`,m).filter(i).on(`touchstart.drag`,_).on(`touchmove.drag`,v,xe).on(`touchend.drag touchcancel.drag`,y).style(`touch-action`,`none`).style(`-webkit-tap-highlight-color`,`rgba(0,0,0,0)`)}function m(r,i){if(!(d||!e.call(this,r,i))){var a=b(this,n.call(this,r,i),r,i,`mouse`);a&&(fe(r.view).on(`mousemove.drag`,h,me).on(`mouseup.drag`,g,me),he(r.view),be(r),u=!1,c=r.clientX,l=r.clientY,a(`start`,r))}}function h(e){if(ve(e),!u){var n=e.clientX-c,r=e.clientY-l;u=n*n+r*r>f}a.mouse(`drag`,e)}function g(e){fe(e.view).on(`mousemove.drag mouseup.drag`,null),pe(e.view,u),ve(e),a.mouse(`end`,e)}function _(r,i){if(e.call(this,r,i)){var a=r.changedTouches,o=n.call(this,r,i),s=a.length,c,l;for(c=0;c<s;++c)(l=b(this,o,r,i,a[c].identifier,a[c]))&&(be(r),l(`start`,r,a[c]))}}function v(e){var n=e.changedTouches,r=n.length,i,o;for(i=0;i<r;++i)(o=a[n[i].identifier])&&(ve(e),o(`drag`,e,n[i]))}function y(e){var n=e.changedTouches,r=n.length,i,o;for(d&&clearTimeout(d),d=setTimeout(function(){d=null},500),i=0;i<r;++i)(o=a[n[i].identifier])&&(be(e),o(`end`,e,n[i]))}function b(e,n,i,c,l,u){var d=o.copy(),f=M(u||i,n),m,h,g;if((g=r.call(e,new Oe(`beforestart`,{sourceEvent:i,target:p,identifier:l,active:s,x:f[0],y:f[1],dx:0,dy:0,dispatch:d}),c))!=null)return m=g.x-f[0]||0,h=g.y-f[1]||0,function r(i,o,u){var _=f,v;switch(i){case`start`:a[l]=r,v=s++;break;case`end`:delete a[l],--s;case`drag`:f=M(u||o,n),v=s;break}d.call(i,e,new Oe(i,{sourceEvent:o,subject:g,target:p,identifier:l,active:v,x:f[0]+m,y:f[1]+h,dx:f[0]-_[0],dy:f[1]-_[1],dispatch:d}),c)}}return p.filter=function(n){return arguments.length?(e=typeof n==`function`?n:De(!!n),p):e},p.container=function(e){return arguments.length?(n=typeof e==`function`?e:De(e),p):n},p.subject=function(e){return arguments.length?(r=typeof e==`function`?e:De(e),p):r},p.touchable=function(e){return arguments.length?(i=typeof e==`function`?e:De(!!e),p):i},p.on=function(){var e=o.on.apply(o,arguments);return e===o?p:e},p.clickDistance=function(e){return arguments.length?(f=(e=+e)*e,p):Math.sqrt(f)},p}function I(e){let n=+this._x.call(null,e),r=+this._y.call(null,e);return Pe(this.cover(n,r),n,r,e)}function Pe(e,n,r,i){if(isNaN(n)||isNaN(r))return e;var a,o=e._root,s={data:i},c=e._x0,l=e._y0,u=e._x1,d=e._y1,f,p,m,h,g,_,v,y;if(!o)return e._root=s,e;for(;o.length;)if((g=n>=(f=(c+u)/2))?c=f:u=f,(_=r>=(p=(l+d)/2))?l=p:d=p,a=o,!(o=o[v=_<<1|g]))return a[v]=s,e;if(m=+e._x.call(null,o.data),h=+e._y.call(null,o.data),n===m&&r===h)return s.next=o,a?a[v]=s:e._root=s,e;do a=a?a[v]=[,,,,]:e._root=[,,,,],(g=n>=(f=(c+u)/2))?c=f:u=f,(_=r>=(p=(l+d)/2))?l=p:d=p;while((v=_<<1|g)==(y=(h>=p)<<1|m>=f));return a[y]=o,a[v]=s,e}function Fe(e){var n,r,i=e.length,a,o,s=Array(i),c=Array(i),l=1/0,u=1/0,d=-1/0,f=-1/0;for(r=0;r<i;++r)isNaN(a=+this._x.call(null,n=e[r]))||isNaN(o=+this._y.call(null,n))||(s[r]=a,c[r]=o,a<l&&(l=a),a>d&&(d=a),o<u&&(u=o),o>f&&(f=o));if(l>d||u>f)return this;for(this.cover(l,u).cover(d,f),r=0;r<i;++r)Pe(this,s[r],c[r],e[r]);return this}function Ie(e,n){if(isNaN(e=+e)||isNaN(n=+n))return this;var r=this._x0,i=this._y0,a=this._x1,o=this._y1;if(isNaN(r))a=(r=Math.floor(e))+1,o=(i=Math.floor(n))+1;else{for(var s=a-r||1,c=this._root,l,u;r>e||e>=a||i>n||n>=o;)switch(u=(n<i)<<1|e<r,l=[,,,,],l[u]=c,c=l,s*=2,u){case 0:a=r+s,o=i+s;break;case 1:r=a-s,o=i+s;break;case 2:a=r+s,i=o-s;break;case 3:r=a-s,i=o-s;break}this._root&&this._root.length&&(this._root=c)}return this._x0=r,this._y0=i,this._x1=a,this._y1=o,this}function L(){var e=[];return this.visit(function(n){if(!n.length)do e.push(n.data);while(n=n.next)}),e}function Le(e){return arguments.length?this.cover(+e[0][0],+e[0][1]).cover(+e[1][0],+e[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function R(e,n,r,i,a){this.node=e,this.x0=n,this.y0=r,this.x1=i,this.y1=a}function Re(e,n,r){var i,a=this._x0,o=this._y0,s,c,l,u,d=this._x1,f=this._y1,p=[],m=this._root,h,g;for(m&&p.push(new R(m,a,o,d,f)),r==null?r=1/0:(a=e-r,o=n-r,d=e+r,f=n+r,r*=r);h=p.pop();)if(!(!(m=h.node)||(s=h.x0)>d||(c=h.y0)>f||(l=h.x1)<a||(u=h.y1)<o))if(m.length){var _=(s+l)/2,v=(c+u)/2;p.push(new R(m[3],_,v,l,u),new R(m[2],s,v,_,u),new R(m[1],_,c,l,v),new R(m[0],s,c,_,v)),(g=(n>=v)<<1|e>=_)&&(h=p[p.length-1],p[p.length-1]=p[p.length-1-g],p[p.length-1-g]=h)}else{var y=e-+this._x.call(null,m.data),b=n-+this._y.call(null,m.data),x=y*y+b*b;if(x<r){var S=Math.sqrt(r=x);a=e-S,o=n-S,d=e+S,f=n+S,i=m.data}}return i}function ze(e){if(isNaN(d=+this._x.call(null,e))||isNaN(f=+this._y.call(null,e)))return this;var n,r=this._root,i,a,o,s=this._x0,c=this._y0,l=this._x1,u=this._y1,d,f,p,m,h,g,_,v;if(!r)return this;if(r.length)for(;;){if((h=d>=(p=(s+l)/2))?s=p:l=p,(g=f>=(m=(c+u)/2))?c=m:u=m,n=r,!(r=r[_=g<<1|h]))return this;if(!r.length)break;(n[_+1&3]||n[_+2&3]||n[_+3&3])&&(i=n,v=_)}for(;r.data!==e;)if(a=r,!(r=r.next))return this;return(o=r.next)&&delete r.next,a?(o?a.next=o:delete a.next,this):n?(o?n[_]=o:delete n[_],(r=n[0]||n[1]||n[2]||n[3])&&r===(n[3]||n[2]||n[1]||n[0])&&!r.length&&(i?i[v]=r:this._root=r),this):(this._root=o,this)}function Be(e){for(var n=0,r=e.length;n<r;++n)this.remove(e[n]);return this}function Ve(){return this._root}function He(){var e=0;return this.visit(function(n){if(!n.length)do++e;while(n=n.next)}),e}function Ue(e){var n=[],r,i=this._root,a,o,s,c,l;for(i&&n.push(new R(i,this._x0,this._y0,this._x1,this._y1));r=n.pop();)if(!e(i=r.node,o=r.x0,s=r.y0,c=r.x1,l=r.y1)&&i.length){var u=(o+c)/2,d=(s+l)/2;(a=i[3])&&n.push(new R(a,u,d,c,l)),(a=i[2])&&n.push(new R(a,o,d,u,l)),(a=i[1])&&n.push(new R(a,u,s,c,d)),(a=i[0])&&n.push(new R(a,o,s,u,d))}return this}function We(e){var n=[],r=[],i;for(this._root&&n.push(new R(this._root,this._x0,this._y0,this._x1,this._y1));i=n.pop();){var a=i.node;if(a.length){var o,s=i.x0,c=i.y0,l=i.x1,u=i.y1,d=(s+l)/2,f=(c+u)/2;(o=a[0])&&n.push(new R(o,s,c,d,f)),(o=a[1])&&n.push(new R(o,d,c,l,f)),(o=a[2])&&n.push(new R(o,s,f,d,u)),(o=a[3])&&n.push(new R(o,d,f,l,u))}r.push(i)}for(;i=r.pop();)e(i.node,i.x0,i.y0,i.x1,i.y1);return this}function Ge(e){return e[0]}function Ke(e){return arguments.length?(this._x=e,this):this._x}function qe(e){return e[1]}function Je(e){return arguments.length?(this._y=e,this):this._y}function Ye(e,n,r){var i=new Xe(n??Ge,r??qe,NaN,NaN,NaN,NaN);return e==null?i:i.addAll(e)}function Xe(e,n,r,i,a,o){this._x=e,this._y=n,this._x0=r,this._y0=i,this._x1=a,this._y1=o,this._root=void 0}function Ze(e){for(var n={data:e.data},r=n;e=e.next;)r=r.next={data:e.data};return n}var z=Ye.prototype=Xe.prototype;z.copy=function(){var e=new Xe(this._x,this._y,this._x0,this._y0,this._x1,this._y1),n=this._root,r,i;if(!n)return e;if(!n.length)return e._root=Ze(n),e;for(r=[{source:n,target:e._root=[,,,,]}];n=r.pop();)for(var a=0;a<4;++a)(i=n.source[a])&&(i.length?r.push({source:i,target:n.target[a]=[,,,,]}):n.target[a]=Ze(i));return e},z.add=I,z.addAll=Fe,z.cover=Ie,z.data=L,z.extent=Le,z.find=Re,z.remove=ze,z.removeAll=Be,z.root=Ve,z.size=He,z.visit=Ue,z.visitAfter=We,z.x=Ke,z.y=Je;var Qe=Se(`a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928`),B=n(),V=e(r(),1),$e=c(),et=`Expected a function`,tt=Math.max,nt=Math.min;function rt(e,n,r){var i,a,o,s,c,l,u=0,d=!1,f=!1,p=!0;if(typeof e!=`function`)throw TypeError(et);n=we(n)||0,Ce(r)&&(d=!!r.leading,f=`maxWait`in r,o=f?tt(we(r.maxWait)||0,n):o,p=`trailing`in r?!!r.trailing:p);function m(n){var r=i,o=a;return i=a=void 0,u=n,s=e.apply(o,r),s}function h(e){return u=e,c=setTimeout(v,n),d?m(e):s}function g(e){var r=e-l,i=e-u,a=n-r;return f?nt(a,o-i):a}function _(e){var r=e-l,i=e-u;return l===void 0||r>=n||r<0||f&&i>=o}function v(){var e=P();if(_(e))return y(e);c=setTimeout(v,g(e))}function y(e){return c=void 0,p&&i?m(e):(i=a=void 0,s)}function b(){c!==void 0&&clearTimeout(c),u=0,i=l=a=c=void 0}function x(){return c===void 0?s:y(P())}function S(){var e=P(),r=_(e);if(i=arguments,a=this,l=e,r){if(c===void 0)return h(l);if(f)return clearTimeout(c),c=setTimeout(v,n),m(l)}return c===void 0&&(c=setTimeout(v,n)),s}return S.cancel=b,S.flush=x,S}var it=`Expected a function`;function H(e,n,r){var i=!0,a=!0;if(typeof e!=`function`)throw TypeError(it);return Ce(r)&&(i=`leading`in r?!!r.leading:i,a=`trailing`in r?!!r.trailing:a),rt(e,n,{leading:i,maxWait:n,trailing:a})}var at=[`#60a5fa`,`#a78bfa`,`#34d399`,`#f472b6`,`#fb923c`,`#22d3ee`,`#c084fc`,`#4ade80`,`#f87171`,`#eab308`,`#ec4899`,`#06b67f`,`#8b5cf6`,`#f43f5e`,`#0ea5e9`,`#a855f7`],ot=[`#1e40af`,`#6b21a8`,`#166534`,`#9f1239`,`#9a3412`,`#164e63`,`#581c87`,`#166534`,`#991b1b`,`#854d0e`,`#831843`,`#0f766e`,`#312e81`,`#9f1239`,`#0c4a6e`,`#6b21a8`];function st(e){let n=2;for(let r=0;r<e.length;r++)n=Math.imul(n^e.charCodeAt(r),1540483477),n^=n>>>13,n=Math.imul(n,1540483477),n^=n>>>15;return n>>>0}function ct(e,n){let r=n?at:ot;return r[st(e)%r.length]}var lt={fullscreen:{maxEntries:10,containerClassName:`bottom-3 left-3 gap-1 rounded-lg px-3 py-2 text-xs`,titleClassName:`mb-1.5`,rowClassName:`gap-2`,swatchClassName:`size-2.5`,labelClassName:`max-w-[140px]`,overflowClassName:`pl-[18px]`},docked:{maxEntries:6,containerClassName:`bottom-2 left-2 gap-0.5 rounded-md px-2 py-1.5 text-[11px]`,titleClassName:`mb-1`,rowClassName:`gap-1.5`,swatchClassName:`size-2`,labelClassName:`max-w-[112px]`,overflowClassName:`pl-[14px]`}};function U(e){return lt[e]}function ut(e){let n=(0,$e.c)(6),{clusters:r,variant:a}=e,o=a===void 0?`fullscreen`:a,{resolvedTheme:c}=s(),u=c===`dark`,d,f;if(n[0]!==r||n[1]!==u||n[2]!==o){f=Symbol.for(`react.early_return_sentinel`);bb0:{let e=U(o);if(r.length===0){f=null;break bb0}let a=r.slice(0,e.maxEntries),s=r.length-a.length,c;n[5]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,B.jsx)(i,{id:`kmKqZg`}),n[5]=c):c=n[5],d=(0,B.jsxs)(`div`,{className:l(`pointer-events-none absolute z-10 flex flex-col backdrop-blur-sm`,e.containerClassName,u?`bg-black/70 text-gray-200`:`bg-white/80 text-gray-800 ring-1 ring-black/5`),children:[(0,B.jsx)(`div`,{className:l(`font-medium`,e.titleClassName,u?`text-slate-300`:`text-slate-700`),children:c}),a.map(n=>(0,B.jsxs)(`div`,{className:l(`flex items-center`,e.rowClassName),children:[(0,B.jsx)(`span`,{className:l(`inline-block shrink-0 rounded-full`,e.swatchClassName),style:{backgroundColor:ct(n,u)}}),(0,B.jsx)(`span`,{className:l(`truncate`,e.labelClassName),children:n})]},n)),s>0&&(0,B.jsx)(`div`,{className:l(`text-muted-foreground`,e.overflowClassName),children:(0,B.jsx)(i,{id:`lrhetp`,values:{overflow:s}})})]})}n[0]=r,n[1]=u,n[2]=o,n[3]=d,n[4]=f}else d=n[3],f=n[4];return f===Symbol.for(`react.early_return_sentinel`)?d:f}function W(e,n){var r=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(r!=null){var i,a,o,s,c=[],l=!0,u=!1;try{if(o=(r=r.call(e)).next,n===0){if(Object(r)!==r)return;l=!1}else for(;!(l=(i=o.call(r)).done)&&(c.push(i.value),c.length!==n);l=!0);}catch(e){u=!0,a=e}finally{try{if(!l&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(u)throw a}}return c}}function dt(e,n,r){return n=St(n),n in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function ft(e,n){return ht(e)||W(e,n)||_t(e,n)||bt()}function pt(e){return mt(e)||gt(e)||_t(e)||yt()}function mt(e){if(Array.isArray(e))return vt(e)}function ht(e){if(Array.isArray(e))return e}function gt(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function _t(e,n){if(e){if(typeof e==`string`)return vt(e,n);var r=Object.prototype.toString.call(e).slice(8,-1);if(r===`Object`&&e.constructor&&(r=e.constructor.name),r===`Map`||r===`Set`)return Array.from(e);if(r===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return vt(e,n)}}function vt(e,n){(n==null||n>e.length)&&(n=e.length);for(var r=0,i=Array(n);r<n;r++)i[r]=e[r];return i}function yt(){throw TypeError(`Invalid attempt to spread non-iterable instance.
|
|
2
2
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function bt(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
3
3
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function xt(e,n){if(typeof e!=`object`||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,n||`default`);if(typeof i!=`object`)return i;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(n===`string`?String:Number)(e)}function St(e){var n=xt(e,`string`);return typeof n==`symbol`?n:String(n)}var Ct=function(e,n){var r=new Set(n);return Object.assign.apply(Object,[{}].concat(pt(Object.entries(e).filter(function(e){var n=ft(e,1)[0];return!r.has(n)}).map(function(e){var n=ft(e,2),r=n[0],i=n[1];return dt({},r,i)}))))};function wt(e,{wrapperElementType:n=`div`,nodeMapper:r=e=>e,methodNames:i=[],initPropNames:a=[]}={}){return(0,V.forwardRef)((o,s)=>{let c=(0,V.useRef)(),l=(0,V.useMemo)(()=>e(Object.fromEntries(a.filter(e=>o.hasOwnProperty(e)).map(e=>[e,o[e]]))),[]);Tt(()=>{l(r(c.current))},V.useLayoutEffect),Tt(()=>l._destructor instanceof Function?l._destructor:void 0);let u=(0,V.useCallback)((e,...n)=>l[e]instanceof Function?l[e](...n):void 0,[l]),d=(0,V.useRef)({});return Object.keys(Ct(o,[...i,...a])).filter(e=>d.current[e]!==o[e]).forEach(e=>u(e,o[e])),d.current=o,(0,V.useImperativeHandle)(s,()=>Object.fromEntries(i.map(e=>[e,(...n)=>u(e,...n)])),[u]),V.createElement(n,{ref:c})})}function Tt(e,n=V.useEffect){let r=(0,V.useRef)(),i=(0,V.useRef)(!1),a=(0,V.useRef)(!1),[o,s]=(0,V.useState)(0);i.current&&(a.current=!0),n(()=>(i.current||=(r.current=e(),!0),s(e=>e+1),()=>{a.current&&=(r.current&&r.current(),r.current=void 0,i.current=!1,!1)}),[])}var Et=Object.freeze({Linear:Object.freeze({None:function(e){return e},In:function(e){return e},Out:function(e){return e},InOut:function(e){return e}}),Quadratic:Object.freeze({In:function(e){return e*e},Out:function(e){return e*(2-e)},InOut:function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)}}),Cubic:Object.freeze({In:function(e){return e*e*e},Out:function(e){return--e*e*e+1},InOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)}}),Quartic:Object.freeze({In:function(e){return e*e*e*e},Out:function(e){return 1- --e*e*e*e},InOut:function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)}}),Quintic:Object.freeze({In:function(e){return e*e*e*e*e},Out:function(e){return--e*e*e*e*e+1},InOut:function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)}}),Sinusoidal:Object.freeze({In:function(e){return 1-Math.sin((1-e)*Math.PI/2)},Out:function(e){return Math.sin(e*Math.PI/2)},InOut:function(e){return .5*(1-Math.sin(Math.PI*(.5-e)))}}),Exponential:Object.freeze({In:function(e){return e===0?0:1024**(e-1)},Out:function(e){return e===1?1:1-2**(-10*e)},InOut:function(e){return e===0?0:e===1?1:(e*=2)<1?.5*1024**(e-1):.5*(-(2**(-10*(e-1)))+2)}}),Circular:Object.freeze({In:function(e){return 1-Math.sqrt(1-e*e)},Out:function(e){return Math.sqrt(1- --e*e)},InOut:function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)}}),Elastic:Object.freeze({In:function(e){return e===0?0:e===1?1:-(2**(10*(e-1)))*Math.sin((e-1.1)*5*Math.PI)},Out:function(e){return e===0?0:e===1?1:2**(-10*e)*Math.sin((e-.1)*5*Math.PI)+1},InOut:function(e){return e===0?0:e===1?1:(e*=2,e<1?-.5*2**(10*(e-1))*Math.sin((e-1.1)*5*Math.PI):.5*2**(-10*(e-1))*Math.sin((e-1.1)*5*Math.PI)+1)}}),Back:Object.freeze({In:function(e){var n=1.70158;return e===1?1:e*e*((n+1)*e-n)},Out:function(e){var n=1.70158;return e===0?0:--e*e*((n+1)*e+n)+1},InOut:function(e){var n=1.70158*1.525;return(e*=2)<1?.5*(e*e*((n+1)*e-n)):.5*((e-=2)*e*((n+1)*e+n)+2)}}),Bounce:Object.freeze({In:function(e){return 1-Et.Bounce.Out(1-e)},Out:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},InOut:function(e){return e<.5?Et.Bounce.In(e*2)*.5:Et.Bounce.Out(e*2-1)*.5+.5}}),generatePow:function(e){return e===void 0&&(e=4),e=e<2**-52?2**-52:e,e=e>1e4?1e4:e,{In:function(n){return n**+e},Out:function(n){return 1-(1-n)**e},InOut:function(n){return n<.5?(n*2)**e/2:(1-(2-n*2)**e)/2+.5}}}}),Dt=function(){return performance.now()},Ot=function(){function e(){var e=[...arguments];this._tweens={},this._tweensAddedDuringUpdate={},this.add.apply(this,e)}return e.prototype.getAll=function(){var e=this;return Object.keys(this._tweens).map(function(n){return e._tweens[n]})},e.prototype.removeAll=function(){this._tweens={}},e.prototype.add=function(){for(var e,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];for(var i=0,a=n;i<a.length;i++){var o=a[i];(e=o._group)==null||e.remove(o),o._group=this,this._tweens[o.getId()]=o,this._tweensAddedDuringUpdate[o.getId()]=o}},e.prototype.remove=function(){for(var e=[...arguments],n=0,r=e;n<r.length;n++){var i=r[n];i._group=void 0,delete this._tweens[i.getId()],delete this._tweensAddedDuringUpdate[i.getId()]}},e.prototype.allStopped=function(){return this.getAll().every(function(e){return!e.isPlaying()})},e.prototype.update=function(e,n){e===void 0&&(e=Dt()),n===void 0&&(n=!0);var r=Object.keys(this._tweens);if(r.length!==0)for(;r.length>0;){this._tweensAddedDuringUpdate={};for(var i=0;i<r.length;i++){var a=this._tweens[r[i]],o=!n;a&&a.update(e,o)===!1&&!n&&this.remove(a)}r=Object.keys(this._tweensAddedDuringUpdate)}},e}(),kt={Linear:function(e,n){var r=e.length-1,i=r*n,a=Math.floor(i),o=kt.Utils.Linear;return n<0?o(e[0],e[1],i):n>1?o(e[r],e[r-1],r-i):o(e[a],e[a+1>r?r:a+1],i-a)},Bezier:function(e,n){for(var r=0,i=e.length-1,a=Math.pow,o=kt.Utils.Bernstein,s=0;s<=i;s++)r+=a(1-n,i-s)*a(n,s)*e[s]*o(i,s);return r},CatmullRom:function(e,n){var r=e.length-1,i=r*n,a=Math.floor(i),o=kt.Utils.CatmullRom;return e[0]===e[r]?(n<0&&(a=Math.floor(i=r*(1+n))),o(e[(a-1+r)%r],e[a],e[(a+1)%r],e[(a+2)%r],i-a)):n<0?e[0]-(o(e[0],e[0],e[1],e[1],-i)-e[0]):n>1?e[r]-(o(e[r],e[r],e[r-1],e[r-1],i-r)-e[r]):o(e[a?a-1:0],e[a],e[r<a+1?r:a+1],e[r<a+2?r:a+2],i-a)},Utils:{Linear:function(e,n,r){return(n-e)*r+e},Bernstein:function(e,n){var r=kt.Utils.Factorial;return r(e)/r(n)/r(e-n)},Factorial:(function(){var e=[1];return function(n){var r=1;if(e[n])return e[n];for(var i=n;i>1;i--)r*=i;return e[n]=r,r}})(),CatmullRom:function(e,n,r,i,a){var o=(r-e)*.5,s=(i-n)*.5,c=a*a,l=a*c;return(2*n-2*r+o+s)*l+(-3*n+3*r-2*o-s)*c+o*a+n}}},At=function(){function e(){}return e.nextId=function(){return e._nextId++},e._nextId=0,e}(),jt=new Ot,Mt=function(){function e(e,n){this._isPaused=!1,this._pauseStart=0,this._valuesStart={},this._valuesEnd={},this._valuesStartRepeat={},this._duration=1e3,this._isDynamic=!1,this._initialRepeat=0,this._repeat=0,this._yoyo=!1,this._isPlaying=!1,this._reversed=!1,this._delayTime=0,this._startTime=0,this._easingFunction=Et.Linear.None,this._interpolationFunction=kt.Linear,this._chainedTweens=[],this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._id=At.nextId(),this._isChainStopped=!1,this._propertiesAreSetUp=!1,this._goToEnd=!1,this._object=e,typeof n==`object`?(this._group=n,n.add(this)):n===!0&&(this._group=jt,jt.add(this))}return e.prototype.getId=function(){return this._id},e.prototype.isPlaying=function(){return this._isPlaying},e.prototype.isPaused=function(){return this._isPaused},e.prototype.getDuration=function(){return this._duration},e.prototype.to=function(e,n){if(n===void 0&&(n=1e3),this._isPlaying)throw Error(`Can not call Tween.to() while Tween is already started or paused. Stop the Tween first.`);return this._valuesEnd=e,this._propertiesAreSetUp=!1,this._duration=n<0?0:n,this},e.prototype.duration=function(e){return e===void 0&&(e=1e3),this._duration=e<0?0:e,this},e.prototype.dynamic=function(e){return e===void 0&&(e=!1),this._isDynamic=e,this},e.prototype.start=function(e,n){if(e===void 0&&(e=Dt()),n===void 0&&(n=!1),this._isPlaying)return this;if(this._repeat=this._initialRepeat,this._reversed)for(var r in this._reversed=!1,this._valuesStartRepeat)this._swapEndStartRepeatValues(r),this._valuesStart[r]=this._valuesStartRepeat[r];if(this._isPlaying=!0,this._isPaused=!1,this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._isChainStopped=!1,this._startTime=e,this._startTime+=this._delayTime,!this._propertiesAreSetUp||n){if(this._propertiesAreSetUp=!0,!this._isDynamic){var i={};for(var a in this._valuesEnd)i[a]=this._valuesEnd[a];this._valuesEnd=i}this._setupProperties(this._object,this._valuesStart,this._valuesEnd,this._valuesStartRepeat,n)}return this},e.prototype.startFromCurrentValues=function(e){return this.start(e,!0)},e.prototype._setupProperties=function(e,n,r,i,a){for(var o in r){var s=e[o],c=Array.isArray(s),l=c?`array`:typeof s,u=!c&&Array.isArray(r[o]);if(!(l===`undefined`||l===`function`)){if(u){var d=r[o];if(d.length===0)continue;for(var f=[s],p=0,m=d.length;p<m;p+=1){var h=this._handleRelativeValue(s,d[p]);if(isNaN(h)){u=!1,console.warn(`Found invalid interpolation list. Skipping.`);break}f.push(h)}u&&(r[o]=f)}if((l===`object`||c)&&s&&!u){n[o]=c?[]:{};var g=s;for(var _ in g)n[o][_]=g[_];i[o]=c?[]:{};var d=r[o];if(!this._isDynamic){var v={};for(var _ in d)v[_]=d[_];r[o]=d=v}this._setupProperties(g,n[o],d,i[o],a)}else (n[o]===void 0||a)&&(n[o]=s),c||(n[o]*=1),u?i[o]=r[o].slice().reverse():i[o]=n[o]||0}}},e.prototype.stop=function(){return this._isChainStopped||(this._isChainStopped=!0,this.stopChainedTweens()),this._isPlaying?(this._isPlaying=!1,this._isPaused=!1,this._onStopCallback&&this._onStopCallback(this._object),this):this},e.prototype.end=function(){return this._goToEnd=!0,this.update(this._startTime+this._duration),this},e.prototype.pause=function(e){return e===void 0&&(e=Dt()),this._isPaused||!this._isPlaying?this:(this._isPaused=!0,this._pauseStart=e,this)},e.prototype.resume=function(e){return e===void 0&&(e=Dt()),!this._isPaused||!this._isPlaying?this:(this._isPaused=!1,this._startTime+=e-this._pauseStart,this._pauseStart=0,this)},e.prototype.stopChainedTweens=function(){for(var e=0,n=this._chainedTweens.length;e<n;e++)this._chainedTweens[e].stop();return this},e.prototype.group=function(e){return e?(e.add(this),this):(console.warn(`tween.group() without args has been removed, use group.add(tween) instead.`),this)},e.prototype.remove=function(){var e;return(e=this._group)==null||e.remove(this),this},e.prototype.delay=function(e){return e===void 0&&(e=0),this._delayTime=e,this},e.prototype.repeat=function(e){return e===void 0&&(e=0),this._initialRepeat=e,this._repeat=e,this},e.prototype.repeatDelay=function(e){return this._repeatDelayTime=e,this},e.prototype.yoyo=function(e){return e===void 0&&(e=!1),this._yoyo=e,this},e.prototype.easing=function(e){return e===void 0&&(e=Et.Linear.None),this._easingFunction=e,this},e.prototype.interpolation=function(e){return e===void 0&&(e=kt.Linear),this._interpolationFunction=e,this},e.prototype.chain=function(){return this._chainedTweens=[...arguments],this},e.prototype.onStart=function(e){return this._onStartCallback=e,this},e.prototype.onEveryStart=function(e){return this._onEveryStartCallback=e,this},e.prototype.onUpdate=function(e){return this._onUpdateCallback=e,this},e.prototype.onRepeat=function(e){return this._onRepeatCallback=e,this},e.prototype.onComplete=function(e){return this._onCompleteCallback=e,this},e.prototype.onStop=function(e){return this._onStopCallback=e,this},e.prototype.update=function(n,r){var i=this;if(n===void 0&&(n=Dt()),r===void 0&&(r=e.autoStartOnUpdate),this._isPaused)return!0;var a;if(!this._goToEnd&&!this._isPlaying)if(r)this.start(n,!0);else return!1;if(this._goToEnd=!1,n<this._startTime)return!0;this._onStartCallbackFired===!1&&(this._onStartCallback&&this._onStartCallback(this._object),this._onStartCallbackFired=!0),this._onEveryStartCallbackFired===!1&&(this._onEveryStartCallback&&this._onEveryStartCallback(this._object),this._onEveryStartCallbackFired=!0);var o=n-this._startTime,s=this._duration+(this._repeatDelayTime??this._delayTime),c=this._duration+this._repeat*s,l=function(){if(i._duration===0||o>c)return 1;var e=o-Math.trunc(o/s)*s,n=Math.min(e/i._duration,1);return n===0&&o===i._duration?1:n}(),u=this._easingFunction(l);if(this._updateProperties(this._object,this._valuesStart,this._valuesEnd,u),this._onUpdateCallback&&this._onUpdateCallback(this._object,l),this._duration===0||o>=this._duration)if(this._repeat>0){var d=Math.min(Math.trunc((o-this._duration)/s)+1,this._repeat);for(a in isFinite(this._repeat)&&(this._repeat-=d),this._valuesStartRepeat)!this._yoyo&&typeof this._valuesEnd[a]==`string`&&(this._valuesStartRepeat[a]=this._valuesStartRepeat[a]+parseFloat(this._valuesEnd[a])),this._yoyo&&this._swapEndStartRepeatValues(a),this._valuesStart[a]=this._valuesStartRepeat[a];return this._yoyo&&(this._reversed=!this._reversed),this._startTime+=s*d,this._onRepeatCallback&&this._onRepeatCallback(this._object),this._onEveryStartCallbackFired=!1,!0}else{this._onCompleteCallback&&this._onCompleteCallback(this._object);for(var f=0,p=this._chainedTweens.length;f<p;f++)this._chainedTweens[f].start(this._startTime+this._duration,!1);return this._isPlaying=!1,!1}return!0},e.prototype._updateProperties=function(e,n,r,i){for(var a in r)if(n[a]!==void 0){var o=n[a]||0,s=r[a];!Array.isArray(e[a])&&Array.isArray(s)?e[a]=this._interpolationFunction(s,i):typeof s==`object`&&s?this._updateProperties(e[a],o,s,i):(s=this._handleRelativeValue(o,s),typeof s==`number`&&(e[a]=o+(s-o)*i))}},e.prototype._handleRelativeValue=function(e,n){return typeof n==`string`?n.charAt(0)===`+`||n.charAt(0)===`-`?e+parseFloat(n):parseFloat(n):n},e.prototype._swapEndStartRepeatValues=function(e){var n=this._valuesStartRepeat[e],r=this._valuesEnd[e];typeof r==`string`?this._valuesStartRepeat[e]=this._valuesStartRepeat[e]+parseFloat(r):this._valuesStartRepeat[e]=this._valuesEnd[e],this._valuesEnd[e]=n},e.autoStartOnUpdate=!1,e}();At.nextId;var Nt=jt;Nt.getAll.bind(Nt),Nt.removeAll.bind(Nt),Nt.add.bind(Nt),Nt.remove.bind(Nt),Nt.update.bind(Nt);function Pt(e,n){(n==null||n>e.length)&&(n=e.length);for(var r=0,i=Array(n);r<n;r++)i[r]=e[r];return i}function Ft(e){if(Array.isArray(e))return e}function It(e,n){if(!(e instanceof n))throw TypeError(`Cannot call a class as a function`)}function Lt(e,n,r){return Object.defineProperty(e,`prototype`,{writable:!1}),e}function Rt(e,n){var r=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(r!=null){var i,a,o,s,c=[],l=!0,u=!1;try{if(o=(r=r.call(e)).next,n!==0)for(;!(l=(i=o.call(r)).done)&&(c.push(i.value),c.length!==n);l=!0);}catch(e){u=!0,a=e}finally{try{if(!l&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(u)throw a}}return c}}function zt(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
4
4
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Bt(e,n){return Ft(e)||Rt(e,n)||Vt(e,n)||zt()}function Vt(e,n){if(e){if(typeof e==`string`)return Pt(e,n);var r={}.toString.call(e).slice(8,-1);return r===`Object`&&e.constructor&&(r=e.constructor.name),r===`Map`||r===`Set`?Array.from(e):r===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Pt(e,n):void 0}}var Ht=Lt(function e(n,r){var i=r.default,a=i===void 0?null:i,o=r.triggerUpdate,s=o===void 0?!0:o,c=r.onChange,l=c===void 0?function(e,n){}:c;It(this,e),this.name=n,this.defaultVal=a,this.triggerUpdate=s,this.onChange=l});function Ut(e){var n=e.stateInit,r=n===void 0?function(){return{}}:n,i=e.props,a=i===void 0?{}:i,o=e.methods,s=o===void 0?{}:o,c=e.aliases,l=c===void 0?{}:c,u=e.init,d=u===void 0?function(){}:u,f=e.update,p=f===void 0?function(){}:f,m=Object.keys(a).map(function(e){return new Ht(e,a[e])});return function e(){var n=[...arguments],i=!!(this instanceof e&&this.constructor),a=i?n.shift():void 0,o=n[0],c=o===void 0?{}:o,u=Object.assign({},r instanceof Function?r(c):r,{initialised:!1}),f={};function h(e){return g(e,c),_(),h}var g=function(e,n){d.call(h,e,u,n),u.initialised=!0},_=rt(function(){u.initialised&&(p.call(h,u,f),f={})},1);return m.forEach(function(e){h[e.name]=n(e);function n(e){var n=e.name,r=e.triggerUpdate,i=r===void 0?!1:r,a=e.onChange,o=a===void 0?function(e,n){}:a,s=e.defaultVal,c=s===void 0?null:s;return function(e){var r=u[n];if(!arguments.length)return r;var a=e===void 0?c:e;return u[n]=a,o.call(h,a,u,r),!f.hasOwnProperty(n)&&(f[n]=r),i&&_(),h}}}),Object.keys(s).forEach(function(e){h[e]=function(){var n,r=[...arguments];return(n=s[e]).call.apply(n,[h,u].concat(r))}}),Object.entries(l).forEach(function(e){var n=Bt(e,2),r=n[0];return h[r]=h[n[1]]}),h.resetProps=function(){return m.forEach(function(e){h[e.name](e.defaultVal)}),h},h.resetProps(),u._rerender=_,i&&a&&h(a),h}}var G=(function(e){return typeof e==`function`?e:typeof e==`string`?function(n){return n[e]}:function(n){return e}});function Wt(e){"@babel/helpers - typeof";return Wt=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},Wt(e)}var Gt=/^\s+/,Kt=/\s+$/;function K(e,n){if(e||=``,n||={},e instanceof K)return e;if(!(this instanceof K))return new K(e,n);var r=qt(e);this._originalInput=e,this._r=r.r,this._g=r.g,this._b=r.b,this._a=r.a,this._roundA=Math.round(100*this._a)/100,this._format=n.format||r.format,this._gradientType=n.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=r.ok}K.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(e.r*299+e.g*587+e.b*114)/1e3},getLuminance:function(){var e=this.toRgb(),n=e.r/255,r=e.g/255,i=e.b/255,a=n<=.03928?n/12.92:((n+.055)/1.055)**2.4,o=r<=.03928?r/12.92:((r+.055)/1.055)**2.4,s=i<=.03928?i/12.92:((i+.055)/1.055)**2.4;return .2126*a+.7152*o+.0722*s},setAlpha:function(e){return this._a=vn(e),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var e=Zt(this._r,this._g,this._b);return{h:e.h*360,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=Zt(this._r,this._g,this._b),n=Math.round(e.h*360),r=Math.round(e.s*100),i=Math.round(e.v*100);return this._a==1?`hsv(`+n+`, `+r+`%, `+i+`%)`:`hsva(`+n+`, `+r+`%, `+i+`%, `+this._roundA+`)`},toHsl:function(){var e=Yt(this._r,this._g,this._b);return{h:e.h*360,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=Yt(this._r,this._g,this._b),n=Math.round(e.h*360),r=Math.round(e.s*100),i=Math.round(e.l*100);return this._a==1?`hsl(`+n+`, `+r+`%, `+i+`%)`:`hsla(`+n+`, `+r+`%, `+i+`%, `+this._roundA+`)`},toHex:function(e){return $t(this._r,this._g,this._b,e)},toHexString:function(e){return`#`+this.toHex(e)},toHex8:function(e){return en(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return`#`+this.toHex8(e)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?`rgb(`+Math.round(this._r)+`, `+Math.round(this._g)+`, `+Math.round(this._b)+`)`:`rgba(`+Math.round(this._r)+`, `+Math.round(this._g)+`, `+Math.round(this._b)+`, `+this._roundA+`)`},toPercentageRgb:function(){return{r:Math.round(q(this._r,255)*100)+`%`,g:Math.round(q(this._g,255)*100)+`%`,b:Math.round(q(this._b,255)*100)+`%`,a:this._a}},toPercentageRgbString:function(){return this._a==1?`rgb(`+Math.round(q(this._r,255)*100)+`%, `+Math.round(q(this._g,255)*100)+`%, `+Math.round(q(this._b,255)*100)+`%)`:`rgba(`+Math.round(q(this._r,255)*100)+`%, `+Math.round(q(this._g,255)*100)+`%, `+Math.round(q(this._b,255)*100)+`%, `+this._roundA+`)`},toName:function(){return this._a===0?`transparent`:this._a<1?!1:gn[$t(this._r,this._g,this._b,!0)]||!1},toFilter:function(e){var n=`#`+tn(this._r,this._g,this._b,this._a),r=n,i=this._gradientType?`GradientType = 1, `:``;if(e){var a=K(e);r=`#`+tn(a._r,a._g,a._b,a._a)}return`progid:DXImageTransform.Microsoft.gradient(`+i+`startColorstr=`+n+`,endColorstr=`+r+`)`},toString:function(e){var n=!!e;e||=this._format;var r=!1,i=this._a<1&&this._a>=0;return!n&&i&&(e===`hex`||e===`hex6`||e===`hex3`||e===`hex4`||e===`hex8`||e===`name`)?e===`name`&&this._a===0?this.toName():this.toRgbString():(e===`rgb`&&(r=this.toRgbString()),e===`prgb`&&(r=this.toPercentageRgbString()),(e===`hex`||e===`hex6`)&&(r=this.toHexString()),e===`hex3`&&(r=this.toHexString(!0)),e===`hex4`&&(r=this.toHex8String(!0)),e===`hex8`&&(r=this.toHex8String()),e===`name`&&(r=this.toName()),e===`hsl`&&(r=this.toHslString()),e===`hsv`&&(r=this.toHsvString()),r||this.toHexString())},clone:function(){return K(this.toString())},_applyModification:function(e,n){var r=e.apply(null,[this].concat([].slice.call(n)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(on,arguments)},brighten:function(){return this._applyModification(sn,arguments)},darken:function(){return this._applyModification(cn,arguments)},desaturate:function(){return this._applyModification(nn,arguments)},saturate:function(){return this._applyModification(rn,arguments)},greyscale:function(){return this._applyModification(an,arguments)},spin:function(){return this._applyModification(ln,arguments)},_applyCombination:function(e,n){return e.apply(null,[this].concat([].slice.call(n)))},analogous:function(){return this._applyCombination(pn,arguments)},complement:function(){return this._applyCombination(un,arguments)},monochromatic:function(){return this._applyCombination(mn,arguments)},splitcomplement:function(){return this._applyCombination(fn,arguments)},triad:function(){return this._applyCombination(dn,[3])},tetrad:function(){return this._applyCombination(dn,[4])}},K.fromRatio=function(e,n){if(Wt(e)==`object`){var r={};for(var i in e)e.hasOwnProperty(i)&&(i===`a`?r[i]=e[i]:r[i]=wn(e[i]));e=r}return K(e,n)};function qt(e){var n={r:0,g:0,b:0},r=1,i=null,a=null,o=null,s=!1,c=!1;return typeof e==`string`&&(e=kn(e)),Wt(e)==`object`&&(On(e.r)&&On(e.g)&&On(e.b)?(n=Jt(e.r,e.g,e.b),s=!0,c=String(e.r).substr(-1)===`%`?`prgb`:`rgb`):On(e.h)&&On(e.s)&&On(e.v)?(i=wn(e.s),a=wn(e.v),n=Qt(e.h,i,a),s=!0,c=`hsv`):On(e.h)&&On(e.s)&&On(e.l)&&(i=wn(e.s),o=wn(e.l),n=Xt(e.h,i,o),s=!0,c=`hsl`),e.hasOwnProperty(`a`)&&(r=e.a)),r=vn(r),{ok:s,format:e.format||c,r:Math.min(255,Math.max(n.r,0)),g:Math.min(255,Math.max(n.g,0)),b:Math.min(255,Math.max(n.b,0)),a:r}}function Jt(e,n,r){return{r:q(e,255)*255,g:q(n,255)*255,b:q(r,255)*255}}function Yt(e,n,r){e=q(e,255),n=q(n,255),r=q(r,255);var i=Math.max(e,n,r),a=Math.min(e,n,r),o,s,c=(i+a)/2;if(i==a)o=s=0;else{var l=i-a;switch(s=c>.5?l/(2-i-a):l/(i+a),i){case e:o=(n-r)/l+(n<r?6:0);break;case n:o=(r-e)/l+2;break;case r:o=(e-n)/l+4;break}o/=6}return{h:o,s,l:c}}function Xt(e,n,r){var i,a,o;e=q(e,360),n=q(n,100),r=q(r,100);function s(e,n,r){return r<0&&(r+=1),r>1&&--r,r<1/6?e+(n-e)*6*r:r<1/2?n:r<2/3?e+(n-e)*(2/3-r)*6:e}if(n===0)i=a=o=r;else{var c=r<.5?r*(1+n):r+n-r*n,l=2*r-c;i=s(l,c,e+1/3),a=s(l,c,e),o=s(l,c,e-1/3)}return{r:i*255,g:a*255,b:o*255}}function Zt(e,n,r){e=q(e,255),n=q(n,255),r=q(r,255);var i=Math.max(e,n,r),a=Math.min(e,n,r),o,s,c=i,l=i-a;if(s=i===0?0:l/i,i==a)o=0;else{switch(i){case e:o=(n-r)/l+(n<r?6:0);break;case n:o=(r-e)/l+2;break;case r:o=(e-n)/l+4;break}o/=6}return{h:o,s,v:c}}function Qt(e,n,r){e=q(e,360)*6,n=q(n,100),r=q(r,100);var i=Math.floor(e),a=e-i,o=r*(1-n),s=r*(1-a*n),c=r*(1-(1-a)*n),l=i%6,u=[r,s,o,o,c,r][l],d=[c,r,r,s,o,o][l],f=[o,o,c,r,r,s][l];return{r:u*255,g:d*255,b:f*255}}function $t(e,n,r,i){var a=[Cn(Math.round(e).toString(16)),Cn(Math.round(n).toString(16)),Cn(Math.round(r).toString(16))];return i&&a[0].charAt(0)==a[0].charAt(1)&&a[1].charAt(0)==a[1].charAt(1)&&a[2].charAt(0)==a[2].charAt(1)?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0):a.join(``)}function en(e,n,r,i,a){var o=[Cn(Math.round(e).toString(16)),Cn(Math.round(n).toString(16)),Cn(Math.round(r).toString(16)),Cn(Tn(i))];return a&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)&&o[3].charAt(0)==o[3].charAt(1)?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0)+o[3].charAt(0):o.join(``)}function tn(e,n,r,i){return[Cn(Tn(i)),Cn(Math.round(e).toString(16)),Cn(Math.round(n).toString(16)),Cn(Math.round(r).toString(16))].join(``)}K.equals=function(e,n){return!e||!n?!1:K(e).toRgbString()==K(n).toRgbString()},K.random=function(){return K.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function nn(e,n){n=n===0?0:n||10;var r=K(e).toHsl();return r.s-=n/100,r.s=yn(r.s),K(r)}function rn(e,n){n=n===0?0:n||10;var r=K(e).toHsl();return r.s+=n/100,r.s=yn(r.s),K(r)}function an(e){return K(e).desaturate(100)}function on(e,n){n=n===0?0:n||10;var r=K(e).toHsl();return r.l+=n/100,r.l=yn(r.l),K(r)}function sn(e,n){n=n===0?0:n||10;var r=K(e).toRgb();return r.r=Math.max(0,Math.min(255,r.r-Math.round(255*-(n/100)))),r.g=Math.max(0,Math.min(255,r.g-Math.round(255*-(n/100)))),r.b=Math.max(0,Math.min(255,r.b-Math.round(255*-(n/100)))),K(r)}function cn(e,n){n=n===0?0:n||10;var r=K(e).toHsl();return r.l-=n/100,r.l=yn(r.l),K(r)}function ln(e,n){var r=K(e).toHsl(),i=(r.h+n)%360;return r.h=i<0?360+i:i,K(r)}function un(e){var n=K(e).toHsl();return n.h=(n.h+180)%360,K(n)}function dn(e,n){if(isNaN(n)||n<=0)throw Error(`Argument to polyad must be a positive number`);for(var r=K(e).toHsl(),i=[K(e)],a=360/n,o=1;o<n;o++)i.push(K({h:(r.h+o*a)%360,s:r.s,l:r.l}));return i}function fn(e){var n=K(e).toHsl(),r=n.h;return[K(e),K({h:(r+72)%360,s:n.s,l:n.l}),K({h:(r+216)%360,s:n.s,l:n.l})]}function pn(e,n,r){n||=6,r||=30;var i=K(e).toHsl(),a=360/r,o=[K(e)];for(i.h=(i.h-(a*n>>1)+720)%360;--n;)i.h=(i.h+a)%360,o.push(K(i));return o}function mn(e,n){n||=6;for(var r=K(e).toHsv(),i=r.h,a=r.s,o=r.v,s=[],c=1/n;n--;)s.push(K({h:i,s:a,v:o})),o=(o+c)%1;return s}K.mix=function(e,n,r){r=r===0?0:r||50;var i=K(e).toRgb(),a=K(n).toRgb(),o=r/100;return K({r:(a.r-i.r)*o+i.r,g:(a.g-i.g)*o+i.g,b:(a.b-i.b)*o+i.b,a:(a.a-i.a)*o+i.a})},K.readability=function(e,n){var r=K(e),i=K(n);return(Math.max(r.getLuminance(),i.getLuminance())+.05)/(Math.min(r.getLuminance(),i.getLuminance())+.05)},K.isReadable=function(e,n,r){var i=K.readability(e,n),a,o=!1;switch(a=An(r),a.level+a.size){case`AAsmall`:case`AAAlarge`:o=i>=4.5;break;case`AAlarge`:o=i>=3;break;case`AAAsmall`:o=i>=7;break}return o},K.mostReadable=function(e,n,r){var i=null,a=0,o,s,c,l;r||={},s=r.includeFallbackColors,c=r.level,l=r.size;for(var u=0;u<n.length;u++)o=K.readability(e,n[u]),o>a&&(a=o,i=K(n[u]));return K.isReadable(e,i,{level:c,size:l})||!s?i:(r.includeFallbackColors=!1,K.mostReadable(e,[`#fff`,`#000`],r))};var hn=K.names={aliceblue:`f0f8ff`,antiquewhite:`faebd7`,aqua:`0ff`,aquamarine:`7fffd4`,azure:`f0ffff`,beige:`f5f5dc`,bisque:`ffe4c4`,black:`000`,blanchedalmond:`ffebcd`,blue:`00f`,blueviolet:`8a2be2`,brown:`a52a2a`,burlywood:`deb887`,burntsienna:`ea7e5d`,cadetblue:`5f9ea0`,chartreuse:`7fff00`,chocolate:`d2691e`,coral:`ff7f50`,cornflowerblue:`6495ed`,cornsilk:`fff8dc`,crimson:`dc143c`,cyan:`0ff`,darkblue:`00008b`,darkcyan:`008b8b`,darkgoldenrod:`b8860b`,darkgray:`a9a9a9`,darkgreen:`006400`,darkgrey:`a9a9a9`,darkkhaki:`bdb76b`,darkmagenta:`8b008b`,darkolivegreen:`556b2f`,darkorange:`ff8c00`,darkorchid:`9932cc`,darkred:`8b0000`,darksalmon:`e9967a`,darkseagreen:`8fbc8f`,darkslateblue:`483d8b`,darkslategray:`2f4f4f`,darkslategrey:`2f4f4f`,darkturquoise:`00ced1`,darkviolet:`9400d3`,deeppink:`ff1493`,deepskyblue:`00bfff`,dimgray:`696969`,dimgrey:`696969`,dodgerblue:`1e90ff`,firebrick:`b22222`,floralwhite:`fffaf0`,forestgreen:`228b22`,fuchsia:`f0f`,gainsboro:`dcdcdc`,ghostwhite:`f8f8ff`,gold:`ffd700`,goldenrod:`daa520`,gray:`808080`,green:`008000`,greenyellow:`adff2f`,grey:`808080`,honeydew:`f0fff0`,hotpink:`ff69b4`,indianred:`cd5c5c`,indigo:`4b0082`,ivory:`fffff0`,khaki:`f0e68c`,lavender:`e6e6fa`,lavenderblush:`fff0f5`,lawngreen:`7cfc00`,lemonchiffon:`fffacd`,lightblue:`add8e6`,lightcoral:`f08080`,lightcyan:`e0ffff`,lightgoldenrodyellow:`fafad2`,lightgray:`d3d3d3`,lightgreen:`90ee90`,lightgrey:`d3d3d3`,lightpink:`ffb6c1`,lightsalmon:`ffa07a`,lightseagreen:`20b2aa`,lightskyblue:`87cefa`,lightslategray:`789`,lightslategrey:`789`,lightsteelblue:`b0c4de`,lightyellow:`ffffe0`,lime:`0f0`,limegreen:`32cd32`,linen:`faf0e6`,magenta:`f0f`,maroon:`800000`,mediumaquamarine:`66cdaa`,mediumblue:`0000cd`,mediumorchid:`ba55d3`,mediumpurple:`9370db`,mediumseagreen:`3cb371`,mediumslateblue:`7b68ee`,mediumspringgreen:`00fa9a`,mediumturquoise:`48d1cc`,mediumvioletred:`c71585`,midnightblue:`191970`,mintcream:`f5fffa`,mistyrose:`ffe4e1`,moccasin:`ffe4b5`,navajowhite:`ffdead`,navy:`000080`,oldlace:`fdf5e6`,olive:`808000`,olivedrab:`6b8e23`,orange:`ffa500`,orangered:`ff4500`,orchid:`da70d6`,palegoldenrod:`eee8aa`,palegreen:`98fb98`,paleturquoise:`afeeee`,palevioletred:`db7093`,papayawhip:`ffefd5`,peachpuff:`ffdab9`,peru:`cd853f`,pink:`ffc0cb`,plum:`dda0dd`,powderblue:`b0e0e6`,purple:`800080`,rebeccapurple:`663399`,red:`f00`,rosybrown:`bc8f8f`,royalblue:`4169e1`,saddlebrown:`8b4513`,salmon:`fa8072`,sandybrown:`f4a460`,seagreen:`2e8b57`,seashell:`fff5ee`,sienna:`a0522d`,silver:`c0c0c0`,skyblue:`87ceeb`,slateblue:`6a5acd`,slategray:`708090`,slategrey:`708090`,snow:`fffafa`,springgreen:`00ff7f`,steelblue:`4682b4`,tan:`d2b48c`,teal:`008080`,thistle:`d8bfd8`,tomato:`ff6347`,turquoise:`40e0d0`,violet:`ee82ee`,wheat:`f5deb3`,white:`fff`,whitesmoke:`f5f5f5`,yellow:`ff0`,yellowgreen:`9acd32`},gn=K.hexNames=_n(hn);function _n(e){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[e[r]]=r);return n}function vn(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function q(e,n){xn(e)&&(e=`100%`);var r=Sn(e);return e=Math.min(n,Math.max(0,parseFloat(e))),r&&(e=parseInt(e*n,10)/100),Math.abs(e-n)<1e-6?1:e%n/parseFloat(n)}function yn(e){return Math.min(1,Math.max(0,e))}function bn(e){return parseInt(e,16)}function xn(e){return typeof e==`string`&&e.indexOf(`.`)!=-1&&parseFloat(e)===1}function Sn(e){return typeof e==`string`&&e.indexOf(`%`)!=-1}function Cn(e){return e.length==1?`0`+e:``+e}function wn(e){return e<=1&&(e=e*100+`%`),e}function Tn(e){return Math.round(parseFloat(e)*255).toString(16)}function En(e){return bn(e)/255}var Dn=function(){var e=`(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)`,n=`[\\s|\\(]+(`+e+`)[,|\\s]+(`+e+`)[,|\\s]+(`+e+`)\\s*\\)?`,r=`[\\s|\\(]+(`+e+`)[,|\\s]+(`+e+`)[,|\\s]+(`+e+`)[,|\\s]+(`+e+`)\\s*\\)?`;return{CSS_UNIT:new RegExp(e),rgb:RegExp(`rgb`+n),rgba:RegExp(`rgba`+r),hsl:RegExp(`hsl`+n),hsla:RegExp(`hsla`+r),hsv:RegExp(`hsv`+n),hsva:RegExp(`hsva`+r),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function On(e){return!!Dn.CSS_UNIT.exec(e)}function kn(e){e=e.replace(Gt,``).replace(Kt,``).toLowerCase();var n=!1;if(hn[e])e=hn[e],n=!0;else if(e==`transparent`)return{r:0,g:0,b:0,a:0,format:`name`};var r;return(r=Dn.rgb.exec(e))?{r:r[1],g:r[2],b:r[3]}:(r=Dn.rgba.exec(e))?{r:r[1],g:r[2],b:r[3],a:r[4]}:(r=Dn.hsl.exec(e))?{h:r[1],s:r[2],l:r[3]}:(r=Dn.hsla.exec(e))?{h:r[1],s:r[2],l:r[3],a:r[4]}:(r=Dn.hsv.exec(e))?{h:r[1],s:r[2],v:r[3]}:(r=Dn.hsva.exec(e))?{h:r[1],s:r[2],v:r[3],a:r[4]}:(r=Dn.hex8.exec(e))?{r:bn(r[1]),g:bn(r[2]),b:bn(r[3]),a:En(r[4]),format:n?`name`:`hex8`}:(r=Dn.hex6.exec(e))?{r:bn(r[1]),g:bn(r[2]),b:bn(r[3]),format:n?`name`:`hex`}:(r=Dn.hex4.exec(e))?{r:bn(r[1]+``+r[1]),g:bn(r[2]+``+r[2]),b:bn(r[3]+``+r[3]),a:En(r[4]+``+r[4]),format:n?`name`:`hex8`}:(r=Dn.hex3.exec(e))?{r:bn(r[1]+``+r[1]),g:bn(r[2]+``+r[2]),b:bn(r[3]+``+r[3]),format:n?`name`:`hex`}:!1}function An(e){var n,r;return e||={level:`AA`,size:`small`},n=(e.level||`AA`).toUpperCase(),r=(e.size||`small`).toLowerCase(),n!==`AA`&&n!==`AAA`&&(n=`AA`),r!==`small`&&r!==`large`&&(r=`small`),{level:n,size:r}}function jn(e,n){(n==null||n>e.length)&&(n=e.length);for(var r=0,i=Array(n);r<n;r++)i[r]=e[r];return i}function Mn(e){if(Array.isArray(e))return jn(e)}function Nn(e,n,r){if(typeof e==`function`?e===n:e.has(n))return arguments.length<3?n:r;throw TypeError(`Private element is not present on this object`)}function Pn(e,n){if(n.has(e))throw TypeError(`Cannot initialize the same private elements twice on an object`)}function Fn(e,n){if(!(e instanceof n))throw TypeError(`Cannot call a class as a function`)}function In(e,n){return e.get(Nn(e,n))}function Ln(e,n,r){Pn(e,n),n.set(e,r)}function Rn(e,n,r){return e.set(Nn(e,n),r),r}function zn(e,n){for(var r=0;r<n.length;r++){var i=n[r];i.enumerable=i.enumerable||!1,i.configurable=!0,`value`in i&&(i.writable=!0),Object.defineProperty(e,Gn(i.key),i)}}function Bn(e,n,r){return n&&zn(e.prototype,n),Object.defineProperty(e,`prototype`,{writable:!1}),e}function Vn(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function Hn(){throw TypeError(`Invalid attempt to spread non-iterable instance.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./jsx-runtime-BUgB2tll.js";import{r as t}from"./dist-Nvb76hAm.js";import{t as n}from"./compiler-runtime-BfE3aGVn.js";import{d as r}from"./lint-config-client-
|
|
1
|
+
import{t as e}from"./jsx-runtime-BUgB2tll.js";import{r as t}from"./dist-Nvb76hAm.js";import{t as n}from"./compiler-runtime-BfE3aGVn.js";import{d as r}from"./lint-config-client-G_mrikOJ.js";import{n as i,r as a,t as o}from"./EditorModeToggle-D0Db8Ydu.js";import{t as s}from"./markdownlint-rule-browser-rS3aDGOb.js";import{t as c}from"./useLintConfigViewMode-BYm6FwC5.js";var l=n(),u=e();function d(e){return`/api/asset-text?path=${encodeURIComponent(e)}`}function f(e){let n=(0,l.c)(30),{assetPath:f}=e,{_:p}=t(),[m,h]=c(),{data:g}=r(),_=(g?.configFile??null)===f,v=!_||m===`source`,y;n[0]===f?y=n[1]:(y=f.split(`/`).pop()??f,n[0]=f,n[1]=y);let b=y,x;n[2]===b?x=n[3]:(x=b.includes(`.`)?(b.split(`.`).pop()??``).toLowerCase():``,n[2]=b,n[3]=x);let S=x,C;n[4]===f?C=n[5]:(C=(0,u.jsx)(i,{entry:{kind:`asset`,path:f},className:`shrink-0 border-b bg-background px-3 py-1.5`}),n[4]=f,n[5]=C);let w;n[6]===h?w=n[7]:(w=e=>h(e===`source`?`source`:`rules`),n[6]=h,n[7]=w);let T=!_,E;n[8]===p?E=n[9]:(E=p({id:`4EZrJN`}),n[8]=p,n[9]=E);let D;n[10]===p?D=n[11]:(D=p({id:`wdxz7K`}),n[10]=p,n[11]=D);let O;n[12]===p?O=n[13]:(O=p({id:`EeUucb`}),n[12]=p,n[13]=O);let k;n[14]!==v||n[15]!==w||n[16]!==T||n[17]!==E||n[18]!==D||n[19]!==O?(k=(0,u.jsx)(`div`,{className:`flex shrink-0 items-center justify-center border-b bg-background py-2`,children:(0,u.jsx)(o,{isSourceMode:v,onModeChange:w,wysiwygDisabled:T,wysiwygLabel:E,sourceLabel:D,wysiwygDisabledReason:O})}),n[14]=v,n[15]=w,n[16]=T,n[17]=E,n[18]=D,n[19]=O,n[20]=k):k=n[20];let A;n[21]!==f||n[22]!==S||n[23]!==b||n[24]!==v?(A=v?(0,u.jsx)(`div`,{className:`min-h-0 flex-1 overflow-hidden`,children:(0,u.jsx)(a,{src:d(f),fileName:b,extension:S},f)}):(0,u.jsx)(`div`,{className:`min-h-0 flex-1 overflow-y-auto px-4 py-4 sm:px-6`,children:(0,u.jsx)(`div`,{className:`mx-auto w-full max-w-3xl`,children:(0,u.jsx)(s,{hideConfigSourceNote:!0})})}),n[21]=f,n[22]=S,n[23]=b,n[24]=v,n[25]=A):A=n[25];let j;return n[26]!==A||n[27]!==C||n[28]!==k?(j=(0,u.jsxs)(`div`,{className:`flex h-full min-h-0 flex-col bg-background`,"data-lint-config-editor":``,children:[C,k,A]}),n[26]=A,n[27]=C,n[28]=k,n[29]=j):j=n[29],j}export{f as LintConfigEditor};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./jsx-runtime-BUgB2tll.js";import{Q as n,et as r,n as i}from"./DocumentContext-fuUQIepk.js";import{t as a}from"./react-f2sANaYj.js";import{n as o,r as s}from"./dist-Nvb76hAm.js";import{t as c}from"./compiler-runtime-BfE3aGVn.js";import{s as l,t as u}from"./createLucideIcon-DAkhoPjT.js";import{t as d}from"./button-Gol9BgNB.js";import{$t as f,Dt as p,Lr as m,Lt as h,Ur as g,ei as _}from"./dist-CRnLx168.js";import{h as v,r as y,t as b}from"./PropertyPanel-DP1c3fMs.js";import{c as x,i as ee,s as S}from"./workspace-paths-CFyvLimb.js";import{a as C,t as w}from"./open-managed-artifact-tab-uWUnYmu7.js";import{n as T}from"./dist-BLAMau9Z.js";import{t as te}from"./input-D0ZW0Opq.js";import{t as ne}from"./textarea-RSYJwPz9.js";import{c as E,s as D}from"./skills-api-BxZRuTIF.js";var re=u(`folder-git-2`,[[`path`,{d:`M18 19a5 5 0 0 1-5-5v8`,key:`sz5oeg`}],[`path`,{d:`M9 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v5`,key:`1w6njk`}],[`circle`,{cx:`13`,cy:`12`,r:`2`,key:`1j92g6`}],[`circle`,{cx:`20`,cy:`19`,r:`2`,key:`1obnsp`}]]),O=c(),k=e(a(),1),A=t(),j=[`name`];function M(e){let t=(0,O.c)(46),{provider:n,name:r,scopeControl:i,onRename:a,nameError:c,onNameDraftChange:u,nameEditable:f}=e,m=f===void 0?!0:f,{_:h}=s(),g=(0,k.useId)(),_=(0,k.useId)(),y=x(),[S,C]=(0,k.useState)(r),w,T;t[0]===r?(w=t[1],T=t[2]):(w=()=>C(r),T=[r],t[0]=r,t[1]=w,t[2]=T),(0,k.useEffect)(w,T);let ne,E;t[3]===S?(ne=t[4],E=t[5]):(E=S.trim(),ne=E!==``&&!p.test(E),t[3]=S,t[4]=ne,t[5]=E);let D=ne,M;t[6]!==r||t[7]!==D||t[8]!==a||t[9]!==E?(M=function(){a&&(D||E===``||E===r||a(E))},t[6]=r,t[7]=D,t[8]=a,t[9]=E,t[10]=M):M=t[10];let F=M,I=D||!!c,L;t[11]!==h||t[12]!==i||t[13]!==_||t[14]!==y?(L=i?(0,A.jsx)(P,{icon:(0,A.jsx)(re,{className:`size-3.5`}),label:h({id:`oCHfGC`}),htmlFor:_,children:(0,A.jsxs)(`fieldset`,{id:_,className:`m-0 inline-flex items-center gap-1 rounded-full border-0 bg-muted/60 p-0.5`,children:[(0,A.jsx)(`legend`,{className:`sr-only`,children:h({id:`KszKI_`})}),ee.map(e=>{let t=i.scope===e;return(0,A.jsx)(d,{type:`button`,"aria-pressed":t,variant:`ghost`,size:`sm`,onClick:()=>{t||i.onScopeChange(e)},className:l(`h-6 rounded-full px-3 text-xs font-medium`,t?e===`global`?`bg-violet-700 text-white hover:bg-violet-700 hover:text-white`:`bg-sky-700 text-white hover:bg-sky-700 hover:text-white`:`text-muted-foreground hover:bg-transparent hover:text-foreground`),children:y[e]},e)})]})}):null,t[11]=h,t[12]=i,t[13]=_,t[14]=y,t[15]=L):L=t[15];let ie;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(ie=(0,A.jsx)(v,{className:`size-3.5`}),t[16]=ie):ie=t[16];let R;t[17]===h?R=t[18]:(R=h({id:`XmJfZT`}),t[17]=h,t[18]=R);let z=!m,B;t[19]===u?B=t[20]:(B=e=>{let t=e.target.value;C(t),u?.(t)},t[19]=u,t[20]=B);let V=I?`${g}-error`:void 0,H;t[21]!==F||t[22]!==S||t[23]!==g||t[24]!==I||t[25]!==B||t[26]!==V||t[27]!==z?(H=(0,A.jsx)(te,{id:g,"data-testid":`skill-name-input`,value:S,readOnly:z,onChange:B,onBlur:F,onKeyDown:N,"aria-invalid":I,"aria-describedby":V,className:`h-7 rounded-sm border-transparent bg-transparent px-2 font-mono text-sm shadow-none focus-visible:border-transparent focus-visible:bg-muted focus-visible:ring-0 dark:bg-transparent`}),t[21]=F,t[22]=S,t[23]=g,t[24]=I,t[25]=B,t[26]=V,t[27]=z,t[28]=H):H=t[28];let U;t[29]!==c||t[30]!==g||t[31]!==I?(U=I?(0,A.jsx)(`p`,{id:`${g}-error`,className:`px-1 pt-0.5 text-[11px] text-destructive`,children:c||(0,A.jsx)(o,{id:`A50vr3`,components:{0:(0,A.jsx)(`code`,{className:`font-mono`})}})}):(0,A.jsx)(`p`,{className:`px-1 pt-0.5 text-[11px] text-muted-foreground`,children:(0,A.jsx)(o,{id:`1hvhf0`})}),t[29]=c,t[30]=g,t[31]=I,t[32]=U):U=t[32];let W;t[33]!==g||t[34]!==H||t[35]!==U||t[36]!==R?(W=(0,A.jsxs)(P,{icon:ie,label:R,htmlFor:g,children:[H,U]}),t[33]=g,t[34]=H,t[35]=U,t[36]=R,t[37]=W):W=t[37];let G;t[38]!==W||t[39]!==L?(G=(0,A.jsxs)(`div`,{className:`editor-content-aligned gap-0.5 pt-4`,children:[L,W]}),t[38]=W,t[39]=L,t[40]=G):G=t[40];let K;t[41]===n?K=t[42]:(K=(0,A.jsx)(b,{provider:n,reservedKeys:j}),t[41]=n,t[42]=K);let q;return t[43]!==G||t[44]!==K?(q=(0,A.jsxs)(`div`,{className:`flex flex-col`,children:[G,K]}),t[43]=G,t[44]=K,t[45]=q):q=t[45],q}function N(e){e.key===`Enter`&&e.currentTarget.blur()}function P(e){let t=(0,O.c)(14),{icon:n,label:r,htmlFor:i,children:a}=e,o;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,A.jsx)(`span`,{"aria-hidden":!0,className:`h-7 w-4 shrink-0`}),t[0]=o):o=t[0];let s;t[1]===n?s=t[2]:(s=(0,A.jsx)(`span`,{className:`flex size-7 shrink-0 items-center justify-center text-muted-foreground`,children:n}),t[1]=n,t[2]=s);let c;t[3]!==i||t[4]!==r?(c=(0,A.jsx)(`label`,{htmlFor:i,className:`flex h-7 w-32 shrink-0 items-center truncate px-2 text-sm text-muted-foreground`,children:r}),t[3]=i,t[4]=r,t[5]=c):c=t[5];let l;t[6]!==s||t[7]!==c?(l=(0,A.jsxs)(`div`,{className:`flex items-center gap-1`,children:[s,c]}),t[6]=s,t[7]=c,t[8]=l):l=t[8];let u;t[9]===a?u=t[10]:(u=(0,A.jsx)(`div`,{className:`min-w-0 flex-1`,children:a}),t[9]=a,t[10]=u);let d;return t[11]!==l||t[12]!==u?(d=(0,A.jsxs)(`div`,{className:`flex items-start gap-1 py-0.5`,children:[o,l,u]}),t[11]=l,t[12]=u,t[13]=d):d=t[13],d}function F(e,t){let n=e.current().map[t];return typeof n==`string`?n:``}function I(e,t){let n=(0,O.c)(15),[r,i]=(0,k.useState)(null),a;n[0]!==t||n[1]!==e?(a=()=>{let n=f(e),r=F(n,t);return n.dispose(),r},n[0]=t,n[1]=e,n[2]=a):a=n[2];let[o,s]=(0,k.useState)(a),c=(0,k.useRef)(!1),l,u;n[3]!==t||n[4]!==e?(l=()=>{let n=f(e);i(n),s(F(n,t));let r=n.subscribe(()=>{c.current||s(F(n,t))});return()=>{r(),n.dispose(),i(e=>e===n?null:e)}},u=[e,t],n[3]=t,n[4]=e,n[5]=l,n[6]=u):(l=n[5],u=n[6]),(0,k.useEffect)(l,u);let d;n[7]===Symbol.for(`react.memo_cache_sentinel`)?(d=()=>{c.current=!0},n[7]=d):d=n[7];let p;n[8]!==r||n[9]!==t||n[10]!==o?(p=()=>{c.current=!1,r&&o!==F(r,t)&&r.patch({[t]:o})},n[8]=r,n[9]=t,n[10]=o,n[11]=p):p=n[11];let m;return n[12]!==p||n[13]!==o?(m={value:o,setValue:s,onFocus:d,onBlur:p},n[12]=p,n[13]=o,n[14]=m):m=n[14],m}function L(e){let t=(0,O.c)(76),{provider:n,name:r,folder:i,onRename:a,nameError:c}=e,{_:l}=s(),u=(0,k.useId)(),d=(0,k.useId)(),f=(0,k.useId)(),p=(0,k.useId)(),m=I(n,`title`),g=I(n,`description`),[_,b]=(0,k.useState)(r),x,ee;t[0]===r?(x=t[1],ee=t[2]):(x=()=>b(r),ee=[r],t[0]=r,t[1]=x,t[2]=ee),(0,k.useEffect)(x,ee);let S,C;t[3]===_?(S=t[4],C=t[5]):(C=_.trim(),S=C!==``&&!h.test(C),t[3]=_,t[4]=S,t[5]=C);let w=S,T;t[6]!==r||t[7]!==w||t[8]!==a||t[9]!==C?(T=function(){a&&(w||C===``||C===r||a(C))},t[6]=r,t[7]=w,t[8]=a,t[9]=C,t[10]=T):T=t[10];let E=T,D=w||!!c,j;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(j=(0,A.jsx)(o,{id:`l_UFPv`}),t[11]=j):j=t[11];let M;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(M=(0,A.jsx)(re,{className:`size-3.5`}),t[12]=M):M=t[12];let N;t[13]===l?N=t[14]:(N=l({id:`ugoTXs`}),t[13]=l,t[14]=N);let P=i||`/`,F;t[15]!==p||t[16]!==P?(F=(0,A.jsx)(te,{id:p,value:P,readOnly:!0,className:`h-8 border-input bg-transparent px-2 font-mono text-muted-foreground shadow-none`}),t[15]=p,t[16]=P,t[17]=F):F=t[17];let L;t[18]!==p||t[19]!==N||t[20]!==F?(L=(0,A.jsx)(R,{icon:M,label:N,htmlFor:p,children:F}),t[18]=p,t[19]=N,t[20]=F,t[21]=L):L=t[21];let z;t[22]===Symbol.for(`react.memo_cache_sentinel`)?(z=(0,A.jsx)(v,{className:`size-3.5`}),t[22]=z):z=t[22];let B;t[23]===l?B=t[24]:(B=l({id:`XmJfZT`}),t[23]=l,t[24]=B);let V;t[25]===Symbol.for(`react.memo_cache_sentinel`)?(V=e=>b(e.target.value),t[25]=V):V=t[25];let H;t[26]!==E||t[27]!==_||t[28]!==u||t[29]!==D?(H=(0,A.jsx)(te,{id:u,"data-testid":`template-name-input`,value:_,onChange:V,onBlur:E,onKeyDown:ie,"aria-invalid":D,className:`h-8 border-input bg-transparent px-2 font-mono shadow-none focus-visible:bg-muted/30`}),t[26]=E,t[27]=_,t[28]=u,t[29]=D,t[30]=H):H=t[30];let U;t[31]!==c||t[32]!==D?(U=D?(0,A.jsx)(`p`,{className:`px-1 pt-0.5 text-[11px] text-destructive`,children:c||(0,A.jsx)(o,{id:`lI0Td2`,components:{0:(0,A.jsx)(`code`,{className:`font-mono`}),1:(0,A.jsx)(`code`,{className:`font-mono`})}})}):(0,A.jsx)(`p`,{className:`px-1 pt-0.5 text-[11px] text-muted-foreground`,children:(0,A.jsx)(o,{id:`QfFBdJ`})}),t[31]=c,t[32]=D,t[33]=U):U=t[33];let W;t[34]!==u||t[35]!==B||t[36]!==H||t[37]!==U?(W=(0,A.jsxs)(R,{icon:z,label:B,htmlFor:u,children:[H,U]}),t[34]=u,t[35]=B,t[36]=H,t[37]=U,t[38]=W):W=t[38];let G;t[39]===Symbol.for(`react.memo_cache_sentinel`)?(G=(0,A.jsx)(v,{className:`size-3.5`}),t[39]=G):G=t[39];let K;t[40]===l?K=t[41]:(K=l({id:`q7F5am`}),t[40]=l,t[41]=K);let q;t[42]===m?q=t[43]:(q=e=>m.setValue(e.target.value),t[42]=m,t[43]=q);let J;t[44]!==q||t[45]!==m.onBlur||t[46]!==m.onFocus||t[47]!==m.value||t[48]!==d?(J=(0,A.jsx)(te,{id:d,"data-testid":`template-title-input`,value:m.value,onChange:q,onFocus:m.onFocus,onBlur:m.onBlur,className:`h-8 border-input bg-transparent px-2 shadow-none focus-visible:bg-muted/30`}),t[44]=q,t[45]=m.onBlur,t[46]=m.onFocus,t[47]=m.value,t[48]=d,t[49]=J):J=t[49];let ae;t[50]===Symbol.for(`react.memo_cache_sentinel`)?(ae=(0,A.jsx)(`p`,{className:`px-1 pt-0.5 text-[11px] text-muted-foreground`,children:(0,A.jsx)(o,{id:`5e1Dri`})}),t[50]=ae):ae=t[50];let Y;t[51]!==K||t[52]!==J||t[53]!==d?(Y=(0,A.jsxs)(R,{icon:G,label:K,htmlFor:d,children:[J,ae]}),t[51]=K,t[52]=J,t[53]=d,t[54]=Y):Y=t[54];let oe;t[55]===Symbol.for(`react.memo_cache_sentinel`)?(oe=(0,A.jsx)(v,{className:`size-3.5`}),t[55]=oe):oe=t[55];let X;t[56]===l?X=t[57]:(X=l({id:`eTsJYJ`}),t[56]=l,t[57]=X);let Z;t[58]===g?Z=t[59]:(Z=e=>g.setValue(e.target.value),t[58]=g,t[59]=Z);let Q;t[60]!==g.onBlur||t[61]!==g.onFocus||t[62]!==g.value||t[63]!==f||t[64]!==Z?(Q=(0,A.jsx)(ne,{id:f,"data-testid":`template-description-input`,value:g.value,onChange:Z,onFocus:g.onFocus,onBlur:g.onBlur,className:`min-h-16 resize-none border-input bg-transparent px-2 py-1.5 shadow-none focus-visible:bg-muted/30`}),t[60]=g.onBlur,t[61]=g.onFocus,t[62]=g.value,t[63]=f,t[64]=Z,t[65]=Q):Q=t[65];let se;t[66]===Symbol.for(`react.memo_cache_sentinel`)?(se=(0,A.jsx)(`p`,{className:`px-1 pt-0.5 text-[11px] text-muted-foreground`,children:(0,A.jsx)(o,{id:`sFhaTJ`})}),t[66]=se):se=t[66];let $;t[67]!==f||t[68]!==X||t[69]!==Q?($=(0,A.jsxs)(R,{icon:oe,label:X,htmlFor:f,children:[Q,se]}),t[67]=f,t[68]=X,t[69]=Q,t[70]=$):$=t[70];let ce;return t[71]!==L||t[72]!==W||t[73]!==Y||t[74]!==$?(ce=(0,A.jsxs)(y,{title:j,className:`pt-4 pb-2`,children:[L,W,Y,$]}),t[71]=L,t[72]=W,t[73]=Y,t[74]=$,t[75]=ce):ce=t[75],ce}function ie(e){e.key===`Enter`&&e.currentTarget.blur()}function R(e){let t=(0,O.c)(13),{icon:n,label:r,htmlFor:i,children:a}=e,o;t[0]===n?o=t[1]:(o=(0,A.jsx)(`span`,{className:`text-muted-foreground`,children:n}),t[0]=n,t[1]=o);let s;t[2]===r?s=t[3]:(s=(0,A.jsx)(`span`,{className:`truncate text-muted-foreground`,children:r}),t[2]=r,t[3]=s);let c;t[4]!==i||t[5]!==o||t[6]!==s?(c=(0,A.jsxs)(`label`,{htmlFor:i,className:`flex w-32 shrink-0 items-center gap-1 pt-1.5`,children:[o,s]}),t[4]=i,t[5]=o,t[6]=s,t[7]=c):c=t[7];let l;t[8]===a?l=t[9]:(l=(0,A.jsx)(`div`,{className:`min-w-0 flex-1`,children:a}),t[8]=a,t[9]=l);let u;return t[10]!==c||t[11]!==l?(u=(0,A.jsxs)(`div`,{className:`flex items-start gap-1 py-0.5`,children:[c,l]}),t[10]=c,t[11]=l,t[12]=u):u=t[12],u}function z(e){let t=(0,O.c)(18),{docName:r,provider:i}=e,a;t[0]===r?a=t[1]:(a=m(r),t[0]=r,t[1]=a);let o=a;if(o?.kind===`skill`){let e;return t[2]!==r||t[3]!==o.name||t[4]!==o.scope||t[5]!==i?(e=(0,A.jsx)(V,{provider:i,docName:r,scope:o.scope,name:o.name}),t[2]=r,t[3]=o.name,t[4]=o.scope,t[5]=i,t[6]=e):e=t[6],e}if(o?.kind===`template`){let e;return t[7]!==r||t[8]!==o.folder||t[9]!==o.name||t[10]!==i?(e=(0,A.jsx)(U,{provider:i,docName:r,folder:o.folder,name:o.name}),t[7]=r,t[8]=o.folder,t[9]=o.name,t[10]=i,t[11]=e):e=t[11],e}let s;t[12]===r?s=t[13]:(s=n(r),t[12]=r,t[13]=s);let c=s;if(c){let e;return t[14]!==r||t[15]!==c||t[16]!==i?(e=(0,A.jsx)(H,{provider:i,docName:r,name:c}),t[14]=r,t[15]=c,t[16]=i,t[17]=e):e=t[17],e}return null}function B(){let e=(0,O.c)(2),{closeDocument:t}=i(),n;return e[0]===t?n=e[1]:(n=(e,n)=>{e!==n&&(w(n),t(e))},e[0]=t,e[1]=n),n}function V(e){let t=(0,O.c)(24),{provider:n,docName:r,scope:i,name:a}=e,{_:o}=s(),c=S(),l=B(),[u,d]=(0,k.useState)(null),[f,p]=(0,k.useState)(!1),m;t[0]!==o||t[1]!==r||t[2]!==a||t[3]!==l||t[4]!==i?(m=async function(e){d(null);let t=await D({scope:i,fromName:a,toName:e});if(!t.ok){d(t.error),T.error(o({id:`sHrqDx`,values:{0:t.error}}));return}T.success(o({id:`_hPpdX`})),l(r,_(i,e))},t[0]=o,t[1]=r,t[2]=a,t[3]=l,t[4]=i,t[5]=m):m=t[5];let h=m,g;t[6]!==o||t[7]!==r||t[8]!==f||t[9]!==a||t[10]!==l||t[11]!==i||t[12]!==c?(g=async function(e){if(e===i||f)return;p(!0);let t=await E({name:a,fromScope:i,toScope:e});if(p(!1),!t.ok){T.error(o({id:`07eGJB`,values:{0:t.error}}));return}let n=t.skippedBinaryFiles?.length??0;n>0?T.warning(o({id:`DhK_hZ`,values:{0:c[e],name:a,skipped:n}})):T.success(o({id:`UQMMvx`,values:{0:c[e],name:a}})),l(r,_(e,a))},t[6]=o,t[7]=r,t[8]=f,t[9]=a,t[10]=l,t[11]=i,t[12]=c,t[13]=g):g=t[13];let v=g,y=!f,b;t[14]!==v||t[15]!==i?(b={scope:i,onScopeChange:v},t[14]=v,t[15]=i,t[16]=b):b=t[16];let x;return t[17]!==h||t[18]!==a||t[19]!==n||t[20]!==u||t[21]!==y||t[22]!==b?(x=(0,A.jsx)(M,{provider:n,name:a,onRename:h,nameError:u,nameEditable:y,scopeControl:b}),t[17]=h,t[18]=a,t[19]=n,t[20]=u,t[21]=y,t[22]=b,t[23]=x):x=t[23],x}function H(e){let t=(0,O.c)(21),{provider:n,docName:r,name:i}=e,{_:a}=s(),o=S(),c=B(),[l,u]=(0,k.useState)(null),[d,f]=(0,k.useState)(!1),p;t[0]!==a||t[1]!==r||t[2]!==i||t[3]!==c?(p=async function(e){u(null);let t=await D({scope:`project`,fromName:i,toName:e});if(!t.ok){u(t.error),T.error(a({id:`sHrqDx`,values:{0:t.error}}));return}T.success(a({id:`_hPpdX`})),c(r,g(e))},t[0]=a,t[1]=r,t[2]=i,t[3]=c,t[4]=p):p=t[4];let m=p,h;t[5]!==a||t[6]!==r||t[7]!==d||t[8]!==i||t[9]!==c||t[10]!==o?(h=async function(e){if(e===`project`||d)return;f(!0);let t=await E({name:i,fromScope:`project`,toScope:e});if(f(!1),!t.ok){T.error(a({id:`07eGJB`,values:{0:t.error}}));return}let n=t.skippedBinaryFiles?.length??0;n>0?T.warning(a({id:`DhK_hZ`,values:{0:o[e],name:i,skipped:n}})):T.success(a({id:`UQMMvx`,values:{0:o[e],name:i}})),c(r,_(e,i))},t[5]=a,t[6]=r,t[7]=d,t[8]=i,t[9]=c,t[10]=o,t[11]=h):h=t[11];let v=h,y=!d,b;t[12]===v?b=t[13]:(b={scope:`project`,onScopeChange:v},t[12]=v,t[13]=b);let x;return t[14]!==m||t[15]!==i||t[16]!==n||t[17]!==l||t[18]!==y||t[19]!==b?(x=(0,A.jsx)(M,{provider:n,name:i,onRename:m,nameError:l,nameEditable:y,scopeControl:b}),t[14]=m,t[15]=i,t[16]=n,t[17]=l,t[18]=y,t[19]=b,t[20]=x):x=t[20],x}function U(e){let t=(0,O.c)(12),{provider:n,docName:i,folder:a,name:o}=e,{_:c}=s(),l=B(),[u,d]=(0,k.useState)(null),f;t[0]!==c||t[1]!==i||t[2]!==a||t[3]!==o||t[4]!==l?(f=async function(e){d(null);let t=await C({fromFolder:a,fromName:o,toFolder:a,toName:e});if(!t.ok){d(t.error),T.error(c({id:`gk_-qj`,values:{0:t.error}}));return}T.success(c({id:`YKLP_-`})),l(i,r(a,e))},t[0]=c,t[1]=i,t[2]=a,t[3]=o,t[4]=l,t[5]=f):f=t[5];let p=f,m;return t[6]!==a||t[7]!==p||t[8]!==o||t[9]!==n||t[10]!==u?(m=(0,A.jsx)(L,{provider:n,name:o,folder:a,onRename:p,nameError:u}),t[6]=a,t[7]=p,t[8]=o,t[9]=n,t[10]=u,t[11]=m):m=t[11],m}export{z as ManagedArtifactProperties};
|
|
1
|
+
import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./jsx-runtime-BUgB2tll.js";import{Q as n,et as r,n as i}from"./DocumentContext-DDkluS7D.js";import{t as a}from"./react-f2sANaYj.js";import{n as o,r as s}from"./dist-Nvb76hAm.js";import{t as c}from"./compiler-runtime-BfE3aGVn.js";import{s as l,t as u}from"./createLucideIcon-DAkhoPjT.js";import{t as d}from"./button-Gol9BgNB.js";import{$t as f,Dt as p,Lr as m,Lt as h,Ur as g,ei as _}from"./dist-Cal4LUep.js";import{h as v,r as y,t as b}from"./PropertyPanel-BMIcO_AS.js";import{c as x,i as ee,s as S}from"./workspace-paths-B-NChZS2.js";import{a as C,t as w}from"./open-managed-artifact-tab-DfGutPkc.js";import{n as T}from"./dist-BLAMau9Z.js";import{t as te}from"./input-D0ZW0Opq.js";import{t as ne}from"./textarea-RSYJwPz9.js";import{c as E,s as D}from"./skills-api-ChYiP1Zv.js";var re=u(`folder-git-2`,[[`path`,{d:`M18 19a5 5 0 0 1-5-5v8`,key:`sz5oeg`}],[`path`,{d:`M9 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v5`,key:`1w6njk`}],[`circle`,{cx:`13`,cy:`12`,r:`2`,key:`1j92g6`}],[`circle`,{cx:`20`,cy:`19`,r:`2`,key:`1obnsp`}]]),O=c(),k=e(a(),1),A=t(),j=[`name`];function M(e){let t=(0,O.c)(46),{provider:n,name:r,scopeControl:i,onRename:a,nameError:c,onNameDraftChange:u,nameEditable:f}=e,m=f===void 0?!0:f,{_:h}=s(),g=(0,k.useId)(),_=(0,k.useId)(),y=x(),[S,C]=(0,k.useState)(r),w,T;t[0]===r?(w=t[1],T=t[2]):(w=()=>C(r),T=[r],t[0]=r,t[1]=w,t[2]=T),(0,k.useEffect)(w,T);let ne,E;t[3]===S?(ne=t[4],E=t[5]):(E=S.trim(),ne=E!==``&&!p.test(E),t[3]=S,t[4]=ne,t[5]=E);let D=ne,M;t[6]!==r||t[7]!==D||t[8]!==a||t[9]!==E?(M=function(){a&&(D||E===``||E===r||a(E))},t[6]=r,t[7]=D,t[8]=a,t[9]=E,t[10]=M):M=t[10];let F=M,I=D||!!c,L;t[11]!==h||t[12]!==i||t[13]!==_||t[14]!==y?(L=i?(0,A.jsx)(P,{icon:(0,A.jsx)(re,{className:`size-3.5`}),label:h({id:`oCHfGC`}),htmlFor:_,children:(0,A.jsxs)(`fieldset`,{id:_,className:`m-0 inline-flex items-center gap-1 rounded-full border-0 bg-muted/60 p-0.5`,children:[(0,A.jsx)(`legend`,{className:`sr-only`,children:h({id:`KszKI_`})}),ee.map(e=>{let t=i.scope===e;return(0,A.jsx)(d,{type:`button`,"aria-pressed":t,variant:`ghost`,size:`sm`,onClick:()=>{t||i.onScopeChange(e)},className:l(`h-6 rounded-full px-3 text-xs font-medium`,t?e===`global`?`bg-violet-700 text-white hover:bg-violet-700 hover:text-white`:`bg-sky-700 text-white hover:bg-sky-700 hover:text-white`:`text-muted-foreground hover:bg-transparent hover:text-foreground`),children:y[e]},e)})]})}):null,t[11]=h,t[12]=i,t[13]=_,t[14]=y,t[15]=L):L=t[15];let ie;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(ie=(0,A.jsx)(v,{className:`size-3.5`}),t[16]=ie):ie=t[16];let R;t[17]===h?R=t[18]:(R=h({id:`XmJfZT`}),t[17]=h,t[18]=R);let z=!m,B;t[19]===u?B=t[20]:(B=e=>{let t=e.target.value;C(t),u?.(t)},t[19]=u,t[20]=B);let V=I?`${g}-error`:void 0,H;t[21]!==F||t[22]!==S||t[23]!==g||t[24]!==I||t[25]!==B||t[26]!==V||t[27]!==z?(H=(0,A.jsx)(te,{id:g,"data-testid":`skill-name-input`,value:S,readOnly:z,onChange:B,onBlur:F,onKeyDown:N,"aria-invalid":I,"aria-describedby":V,className:`h-7 rounded-sm border-transparent bg-transparent px-2 font-mono text-sm shadow-none focus-visible:border-transparent focus-visible:bg-muted focus-visible:ring-0 dark:bg-transparent`}),t[21]=F,t[22]=S,t[23]=g,t[24]=I,t[25]=B,t[26]=V,t[27]=z,t[28]=H):H=t[28];let U;t[29]!==c||t[30]!==g||t[31]!==I?(U=I?(0,A.jsx)(`p`,{id:`${g}-error`,className:`px-1 pt-0.5 text-[11px] text-destructive`,children:c||(0,A.jsx)(o,{id:`A50vr3`,components:{0:(0,A.jsx)(`code`,{className:`font-mono`})}})}):(0,A.jsx)(`p`,{className:`px-1 pt-0.5 text-[11px] text-muted-foreground`,children:(0,A.jsx)(o,{id:`1hvhf0`})}),t[29]=c,t[30]=g,t[31]=I,t[32]=U):U=t[32];let W;t[33]!==g||t[34]!==H||t[35]!==U||t[36]!==R?(W=(0,A.jsxs)(P,{icon:ie,label:R,htmlFor:g,children:[H,U]}),t[33]=g,t[34]=H,t[35]=U,t[36]=R,t[37]=W):W=t[37];let G;t[38]!==W||t[39]!==L?(G=(0,A.jsxs)(`div`,{className:`editor-content-aligned gap-0.5 pt-4`,children:[L,W]}),t[38]=W,t[39]=L,t[40]=G):G=t[40];let K;t[41]===n?K=t[42]:(K=(0,A.jsx)(b,{provider:n,reservedKeys:j}),t[41]=n,t[42]=K);let q;return t[43]!==G||t[44]!==K?(q=(0,A.jsxs)(`div`,{className:`flex flex-col`,children:[G,K]}),t[43]=G,t[44]=K,t[45]=q):q=t[45],q}function N(e){e.key===`Enter`&&e.currentTarget.blur()}function P(e){let t=(0,O.c)(14),{icon:n,label:r,htmlFor:i,children:a}=e,o;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,A.jsx)(`span`,{"aria-hidden":!0,className:`h-7 w-4 shrink-0`}),t[0]=o):o=t[0];let s;t[1]===n?s=t[2]:(s=(0,A.jsx)(`span`,{className:`flex size-7 shrink-0 items-center justify-center text-muted-foreground`,children:n}),t[1]=n,t[2]=s);let c;t[3]!==i||t[4]!==r?(c=(0,A.jsx)(`label`,{htmlFor:i,className:`flex h-7 w-32 shrink-0 items-center truncate px-2 text-sm text-muted-foreground`,children:r}),t[3]=i,t[4]=r,t[5]=c):c=t[5];let l;t[6]!==s||t[7]!==c?(l=(0,A.jsxs)(`div`,{className:`flex items-center gap-1`,children:[s,c]}),t[6]=s,t[7]=c,t[8]=l):l=t[8];let u;t[9]===a?u=t[10]:(u=(0,A.jsx)(`div`,{className:`min-w-0 flex-1`,children:a}),t[9]=a,t[10]=u);let d;return t[11]!==l||t[12]!==u?(d=(0,A.jsxs)(`div`,{className:`flex items-start gap-1 py-0.5`,children:[o,l,u]}),t[11]=l,t[12]=u,t[13]=d):d=t[13],d}function F(e,t){let n=e.current().map[t];return typeof n==`string`?n:``}function I(e,t){let n=(0,O.c)(15),[r,i]=(0,k.useState)(null),a;n[0]!==t||n[1]!==e?(a=()=>{let n=f(e),r=F(n,t);return n.dispose(),r},n[0]=t,n[1]=e,n[2]=a):a=n[2];let[o,s]=(0,k.useState)(a),c=(0,k.useRef)(!1),l,u;n[3]!==t||n[4]!==e?(l=()=>{let n=f(e);i(n),s(F(n,t));let r=n.subscribe(()=>{c.current||s(F(n,t))});return()=>{r(),n.dispose(),i(e=>e===n?null:e)}},u=[e,t],n[3]=t,n[4]=e,n[5]=l,n[6]=u):(l=n[5],u=n[6]),(0,k.useEffect)(l,u);let d;n[7]===Symbol.for(`react.memo_cache_sentinel`)?(d=()=>{c.current=!0},n[7]=d):d=n[7];let p;n[8]!==r||n[9]!==t||n[10]!==o?(p=()=>{c.current=!1,r&&o!==F(r,t)&&r.patch({[t]:o})},n[8]=r,n[9]=t,n[10]=o,n[11]=p):p=n[11];let m;return n[12]!==p||n[13]!==o?(m={value:o,setValue:s,onFocus:d,onBlur:p},n[12]=p,n[13]=o,n[14]=m):m=n[14],m}function L(e){let t=(0,O.c)(76),{provider:n,name:r,folder:i,onRename:a,nameError:c}=e,{_:l}=s(),u=(0,k.useId)(),d=(0,k.useId)(),f=(0,k.useId)(),p=(0,k.useId)(),m=I(n,`title`),g=I(n,`description`),[_,b]=(0,k.useState)(r),x,ee;t[0]===r?(x=t[1],ee=t[2]):(x=()=>b(r),ee=[r],t[0]=r,t[1]=x,t[2]=ee),(0,k.useEffect)(x,ee);let S,C;t[3]===_?(S=t[4],C=t[5]):(C=_.trim(),S=C!==``&&!h.test(C),t[3]=_,t[4]=S,t[5]=C);let w=S,T;t[6]!==r||t[7]!==w||t[8]!==a||t[9]!==C?(T=function(){a&&(w||C===``||C===r||a(C))},t[6]=r,t[7]=w,t[8]=a,t[9]=C,t[10]=T):T=t[10];let E=T,D=w||!!c,j;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(j=(0,A.jsx)(o,{id:`l_UFPv`}),t[11]=j):j=t[11];let M;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(M=(0,A.jsx)(re,{className:`size-3.5`}),t[12]=M):M=t[12];let N;t[13]===l?N=t[14]:(N=l({id:`ugoTXs`}),t[13]=l,t[14]=N);let P=i||`/`,F;t[15]!==p||t[16]!==P?(F=(0,A.jsx)(te,{id:p,value:P,readOnly:!0,className:`h-8 border-input bg-transparent px-2 font-mono text-muted-foreground shadow-none`}),t[15]=p,t[16]=P,t[17]=F):F=t[17];let L;t[18]!==p||t[19]!==N||t[20]!==F?(L=(0,A.jsx)(R,{icon:M,label:N,htmlFor:p,children:F}),t[18]=p,t[19]=N,t[20]=F,t[21]=L):L=t[21];let z;t[22]===Symbol.for(`react.memo_cache_sentinel`)?(z=(0,A.jsx)(v,{className:`size-3.5`}),t[22]=z):z=t[22];let B;t[23]===l?B=t[24]:(B=l({id:`XmJfZT`}),t[23]=l,t[24]=B);let V;t[25]===Symbol.for(`react.memo_cache_sentinel`)?(V=e=>b(e.target.value),t[25]=V):V=t[25];let H;t[26]!==E||t[27]!==_||t[28]!==u||t[29]!==D?(H=(0,A.jsx)(te,{id:u,"data-testid":`template-name-input`,value:_,onChange:V,onBlur:E,onKeyDown:ie,"aria-invalid":D,className:`h-8 border-input bg-transparent px-2 font-mono shadow-none focus-visible:bg-muted/30`}),t[26]=E,t[27]=_,t[28]=u,t[29]=D,t[30]=H):H=t[30];let U;t[31]!==c||t[32]!==D?(U=D?(0,A.jsx)(`p`,{className:`px-1 pt-0.5 text-[11px] text-destructive`,children:c||(0,A.jsx)(o,{id:`lI0Td2`,components:{0:(0,A.jsx)(`code`,{className:`font-mono`}),1:(0,A.jsx)(`code`,{className:`font-mono`})}})}):(0,A.jsx)(`p`,{className:`px-1 pt-0.5 text-[11px] text-muted-foreground`,children:(0,A.jsx)(o,{id:`QfFBdJ`})}),t[31]=c,t[32]=D,t[33]=U):U=t[33];let W;t[34]!==u||t[35]!==B||t[36]!==H||t[37]!==U?(W=(0,A.jsxs)(R,{icon:z,label:B,htmlFor:u,children:[H,U]}),t[34]=u,t[35]=B,t[36]=H,t[37]=U,t[38]=W):W=t[38];let G;t[39]===Symbol.for(`react.memo_cache_sentinel`)?(G=(0,A.jsx)(v,{className:`size-3.5`}),t[39]=G):G=t[39];let K;t[40]===l?K=t[41]:(K=l({id:`q7F5am`}),t[40]=l,t[41]=K);let q;t[42]===m?q=t[43]:(q=e=>m.setValue(e.target.value),t[42]=m,t[43]=q);let J;t[44]!==q||t[45]!==m.onBlur||t[46]!==m.onFocus||t[47]!==m.value||t[48]!==d?(J=(0,A.jsx)(te,{id:d,"data-testid":`template-title-input`,value:m.value,onChange:q,onFocus:m.onFocus,onBlur:m.onBlur,className:`h-8 border-input bg-transparent px-2 shadow-none focus-visible:bg-muted/30`}),t[44]=q,t[45]=m.onBlur,t[46]=m.onFocus,t[47]=m.value,t[48]=d,t[49]=J):J=t[49];let ae;t[50]===Symbol.for(`react.memo_cache_sentinel`)?(ae=(0,A.jsx)(`p`,{className:`px-1 pt-0.5 text-[11px] text-muted-foreground`,children:(0,A.jsx)(o,{id:`5e1Dri`})}),t[50]=ae):ae=t[50];let Y;t[51]!==K||t[52]!==J||t[53]!==d?(Y=(0,A.jsxs)(R,{icon:G,label:K,htmlFor:d,children:[J,ae]}),t[51]=K,t[52]=J,t[53]=d,t[54]=Y):Y=t[54];let oe;t[55]===Symbol.for(`react.memo_cache_sentinel`)?(oe=(0,A.jsx)(v,{className:`size-3.5`}),t[55]=oe):oe=t[55];let X;t[56]===l?X=t[57]:(X=l({id:`eTsJYJ`}),t[56]=l,t[57]=X);let Z;t[58]===g?Z=t[59]:(Z=e=>g.setValue(e.target.value),t[58]=g,t[59]=Z);let Q;t[60]!==g.onBlur||t[61]!==g.onFocus||t[62]!==g.value||t[63]!==f||t[64]!==Z?(Q=(0,A.jsx)(ne,{id:f,"data-testid":`template-description-input`,value:g.value,onChange:Z,onFocus:g.onFocus,onBlur:g.onBlur,className:`min-h-16 resize-none border-input bg-transparent px-2 py-1.5 shadow-none focus-visible:bg-muted/30`}),t[60]=g.onBlur,t[61]=g.onFocus,t[62]=g.value,t[63]=f,t[64]=Z,t[65]=Q):Q=t[65];let se;t[66]===Symbol.for(`react.memo_cache_sentinel`)?(se=(0,A.jsx)(`p`,{className:`px-1 pt-0.5 text-[11px] text-muted-foreground`,children:(0,A.jsx)(o,{id:`sFhaTJ`})}),t[66]=se):se=t[66];let $;t[67]!==f||t[68]!==X||t[69]!==Q?($=(0,A.jsxs)(R,{icon:oe,label:X,htmlFor:f,children:[Q,se]}),t[67]=f,t[68]=X,t[69]=Q,t[70]=$):$=t[70];let ce;return t[71]!==L||t[72]!==W||t[73]!==Y||t[74]!==$?(ce=(0,A.jsxs)(y,{title:j,className:`pt-4 pb-2`,children:[L,W,Y,$]}),t[71]=L,t[72]=W,t[73]=Y,t[74]=$,t[75]=ce):ce=t[75],ce}function ie(e){e.key===`Enter`&&e.currentTarget.blur()}function R(e){let t=(0,O.c)(13),{icon:n,label:r,htmlFor:i,children:a}=e,o;t[0]===n?o=t[1]:(o=(0,A.jsx)(`span`,{className:`text-muted-foreground`,children:n}),t[0]=n,t[1]=o);let s;t[2]===r?s=t[3]:(s=(0,A.jsx)(`span`,{className:`truncate text-muted-foreground`,children:r}),t[2]=r,t[3]=s);let c;t[4]!==i||t[5]!==o||t[6]!==s?(c=(0,A.jsxs)(`label`,{htmlFor:i,className:`flex w-32 shrink-0 items-center gap-1 pt-1.5`,children:[o,s]}),t[4]=i,t[5]=o,t[6]=s,t[7]=c):c=t[7];let l;t[8]===a?l=t[9]:(l=(0,A.jsx)(`div`,{className:`min-w-0 flex-1`,children:a}),t[8]=a,t[9]=l);let u;return t[10]!==c||t[11]!==l?(u=(0,A.jsxs)(`div`,{className:`flex items-start gap-1 py-0.5`,children:[c,l]}),t[10]=c,t[11]=l,t[12]=u):u=t[12],u}function z(e){let t=(0,O.c)(18),{docName:r,provider:i}=e,a;t[0]===r?a=t[1]:(a=m(r),t[0]=r,t[1]=a);let o=a;if(o?.kind===`skill`){let e;return t[2]!==r||t[3]!==o.name||t[4]!==o.scope||t[5]!==i?(e=(0,A.jsx)(V,{provider:i,docName:r,scope:o.scope,name:o.name}),t[2]=r,t[3]=o.name,t[4]=o.scope,t[5]=i,t[6]=e):e=t[6],e}if(o?.kind===`template`){let e;return t[7]!==r||t[8]!==o.folder||t[9]!==o.name||t[10]!==i?(e=(0,A.jsx)(U,{provider:i,docName:r,folder:o.folder,name:o.name}),t[7]=r,t[8]=o.folder,t[9]=o.name,t[10]=i,t[11]=e):e=t[11],e}let s;t[12]===r?s=t[13]:(s=n(r),t[12]=r,t[13]=s);let c=s;if(c){let e;return t[14]!==r||t[15]!==c||t[16]!==i?(e=(0,A.jsx)(H,{provider:i,docName:r,name:c}),t[14]=r,t[15]=c,t[16]=i,t[17]=e):e=t[17],e}return null}function B(){let e=(0,O.c)(2),{closeDocument:t}=i(),n;return e[0]===t?n=e[1]:(n=(e,n)=>{e!==n&&(w(n),t(e))},e[0]=t,e[1]=n),n}function V(e){let t=(0,O.c)(24),{provider:n,docName:r,scope:i,name:a}=e,{_:o}=s(),c=S(),l=B(),[u,d]=(0,k.useState)(null),[f,p]=(0,k.useState)(!1),m;t[0]!==o||t[1]!==r||t[2]!==a||t[3]!==l||t[4]!==i?(m=async function(e){d(null);let t=await D({scope:i,fromName:a,toName:e});if(!t.ok){d(t.error),T.error(o({id:`sHrqDx`,values:{0:t.error}}));return}T.success(o({id:`_hPpdX`})),l(r,_(i,e))},t[0]=o,t[1]=r,t[2]=a,t[3]=l,t[4]=i,t[5]=m):m=t[5];let h=m,g;t[6]!==o||t[7]!==r||t[8]!==f||t[9]!==a||t[10]!==l||t[11]!==i||t[12]!==c?(g=async function(e){if(e===i||f)return;p(!0);let t=await E({name:a,fromScope:i,toScope:e});if(p(!1),!t.ok){T.error(o({id:`07eGJB`,values:{0:t.error}}));return}let n=t.skippedBinaryFiles?.length??0;n>0?T.warning(o({id:`DhK_hZ`,values:{0:c[e],name:a,skipped:n}})):T.success(o({id:`UQMMvx`,values:{0:c[e],name:a}})),l(r,_(e,a))},t[6]=o,t[7]=r,t[8]=f,t[9]=a,t[10]=l,t[11]=i,t[12]=c,t[13]=g):g=t[13];let v=g,y=!f,b;t[14]!==v||t[15]!==i?(b={scope:i,onScopeChange:v},t[14]=v,t[15]=i,t[16]=b):b=t[16];let x;return t[17]!==h||t[18]!==a||t[19]!==n||t[20]!==u||t[21]!==y||t[22]!==b?(x=(0,A.jsx)(M,{provider:n,name:a,onRename:h,nameError:u,nameEditable:y,scopeControl:b}),t[17]=h,t[18]=a,t[19]=n,t[20]=u,t[21]=y,t[22]=b,t[23]=x):x=t[23],x}function H(e){let t=(0,O.c)(21),{provider:n,docName:r,name:i}=e,{_:a}=s(),o=S(),c=B(),[l,u]=(0,k.useState)(null),[d,f]=(0,k.useState)(!1),p;t[0]!==a||t[1]!==r||t[2]!==i||t[3]!==c?(p=async function(e){u(null);let t=await D({scope:`project`,fromName:i,toName:e});if(!t.ok){u(t.error),T.error(a({id:`sHrqDx`,values:{0:t.error}}));return}T.success(a({id:`_hPpdX`})),c(r,g(e))},t[0]=a,t[1]=r,t[2]=i,t[3]=c,t[4]=p):p=t[4];let m=p,h;t[5]!==a||t[6]!==r||t[7]!==d||t[8]!==i||t[9]!==c||t[10]!==o?(h=async function(e){if(e===`project`||d)return;f(!0);let t=await E({name:i,fromScope:`project`,toScope:e});if(f(!1),!t.ok){T.error(a({id:`07eGJB`,values:{0:t.error}}));return}let n=t.skippedBinaryFiles?.length??0;n>0?T.warning(a({id:`DhK_hZ`,values:{0:o[e],name:i,skipped:n}})):T.success(a({id:`UQMMvx`,values:{0:o[e],name:i}})),c(r,_(e,i))},t[5]=a,t[6]=r,t[7]=d,t[8]=i,t[9]=c,t[10]=o,t[11]=h):h=t[11];let v=h,y=!d,b;t[12]===v?b=t[13]:(b={scope:`project`,onScopeChange:v},t[12]=v,t[13]=b);let x;return t[14]!==m||t[15]!==i||t[16]!==n||t[17]!==l||t[18]!==y||t[19]!==b?(x=(0,A.jsx)(M,{provider:n,name:i,onRename:m,nameError:l,nameEditable:y,scopeControl:b}),t[14]=m,t[15]=i,t[16]=n,t[17]=l,t[18]=y,t[19]=b,t[20]=x):x=t[20],x}function U(e){let t=(0,O.c)(12),{provider:n,docName:i,folder:a,name:o}=e,{_:c}=s(),l=B(),[u,d]=(0,k.useState)(null),f;t[0]!==c||t[1]!==i||t[2]!==a||t[3]!==o||t[4]!==l?(f=async function(e){d(null);let t=await C({fromFolder:a,fromName:o,toFolder:a,toName:e});if(!t.ok){d(t.error),T.error(c({id:`gk_-qj`,values:{0:t.error}}));return}T.success(c({id:`YKLP_-`})),l(i,r(a,e))},t[0]=c,t[1]=i,t[2]=a,t[3]=o,t[4]=l,t[5]=f):f=t[5];let p=f,m;return t[6]!==a||t[7]!==p||t[8]!==o||t[9]!==n||t[10]!==u?(m=(0,A.jsx)(L,{provider:n,name:o,folder:a,onRename:p,nameError:u}),t[6]=a,t[7]=p,t[8]=o,t[9]=n,t[10]=u,t[11]=m):m=t[11],m}export{z as ManagedArtifactProperties};
|
package/dist/public/assets/{McpConsentDialogBody-DQKGlIrW.js → McpConsentDialogBody-CYOKF_sf.js}
RENAMED
|
@@ -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{s as o}from"./createLucideIcon-DAkhoPjT.js";import{t as s}from"./button-Gol9BgNB.js";import{i as c,n as l,r as u,t as ee}from"./tooltip-B4J7VHmA.js";import{a as te,c as ne,i as re,n as ie,o as ae,s as oe,t as se}from"./dialog-TkFkuYVg.js";import{t as d}from"./checkbox-DY-vIhnZ.js";import{t as f}from"./label-DyipnO5I.js";import{F as ce}from"./dist-
|
|
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{s as o}from"./createLucideIcon-DAkhoPjT.js";import{t as s}from"./button-Gol9BgNB.js";import{i as c,n as l,r as u,t as ee}from"./tooltip-B4J7VHmA.js";import{a as te,c as ne,i as re,n as ie,o as ae,s as oe,t as se}from"./dialog-TkFkuYVg.js";import{t as d}from"./checkbox-DY-vIhnZ.js";import{t as f}from"./label-DyipnO5I.js";import{F as ce}from"./dist-Cal4LUep.js";import{t as le}from"./arrow-up-right-obRIg3Sv.js";import{t as ue}from"./info-yKMseklR.js";import{n as p}from"./dist-BLAMau9Z.js";import{t as de}from"./external-link-T4Nj1gcG.js";import{n as m}from"./mcp-consent-store-Xk9UA_MB.js";var fe=a(),h=e(n(),1),g=t();function pe(e){return e.shellDetected&&!e.alreadyInstalled}function me(e){let t=new Set;for(let n of e)n.detected&&t.add(n.id);return t}function he(e,t){let n=new Set(e);return n.has(t)?n.delete(t):n.add(t),n}function ge(e,t){let n=[];for(let r of t)e.has(r.id)&&n.push(r.id);return n}function _e(e){return new Set(e.map(e=>e.id))}function ve(e,t){let n=new Set(e);return n.has(t)?n.delete(t):n.add(t),n}function ye(e,t){return t.filter(t=>e.has(t.id)).map(e=>e.id)}var _={error:e=>p.error(e)};function v(e){let t=(0,fe.c)(9),n;t[0]===e?n=t[1]:(n=e===void 0?{}:e,t[0]=e,t[1]=n);let{store:r,toast:i,payload:a}=n,o=r===void 0?m:r,s=i===void 0?_:i,c;t[2]!==a||t[3]!==o?(c=a??o.getSnapshot(),t[2]=a,t[3]=o,t[4]=c):c=t[4];let l=c;if(!l)return null;let u;return t[5]!==l||t[6]!==o||t[7]!==s?(u=(0,g.jsx)(y,{payload:l,store:o,toast:s}),t[5]=l,t[6]=o,t[7]=s,t[8]=u):u=t[8],u}function y(e){let t=(0,fe.c)(84),{payload:n,store:a,toast:p}=e,{_:m}=i(),_=n.detectedEditors,v=n.pathInstall,y=n.globalSkills,b=y.length>0,x;t[0]===v?x=t[1]:(x=pe(v),t[0]=v,t[1]=x);let S=x,C;t[2]===_?C=t[3]:(C=()=>me(_),t[2]=_,t[3]=C);let[w,Se]=(0,h.useState)(C),[T,Ce]=(0,h.useState)(!0),E;t[4]===y?E=t[5]:(E=()=>_e(y),t[4]=y,t[5]=E);let[D,we]=(0,h.useState)(E),[O,k]=(0,h.useState)(!1),A=(0,h.useId)(),j;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(j=function(e){Se(t=>he(t,e))},t[6]=j):j=t[6];let Te=j,M;t[7]!==_||t[8]!==y||t[9]!==S||t[10]!==T||t[11]!==w||t[12]!==D||t[13]!==b||t[14]!==a||t[15]!==p?(M=async function(){k(!0);let e=await a.confirm({editorIds:ge(w,_),pathInstall:S?T:void 0,skills:b?ye(D,y):void 0});e.ok||(p.error(e.error),k(!1))},t[7]=_,t[8]=y,t[9]=S,t[10]=T,t[11]=w,t[12]=D,t[13]=b,t[14]=a,t[15]=p,t[16]=M):M=t[16];let Ee=M,N;t[17]!==a||t[18]!==p?(N=async function(){k(!0);let e=await a.skip();e.ok||(p.error(e.error),k(!1))},t[17]=a,t[18]=p,t[19]=N):N=t[19];let P=N,F;t[20]!==O||t[21]!==P?(F=function(e){!e&&!O&&P()},t[20]=O,t[21]=P,t[22]=F):F=t[22];let De=F,I;t[23]===Symbol.for(`react.memo_cache_sentinel`)?(I=(0,g.jsx)(ne,{children:(0,g.jsx)(r,{id:`tsyExA`})}),t[23]=I):I=t[23];let L;t[24]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,g.jsxs)(oe,{children:[I,(0,g.jsx)(te,{children:(0,g.jsx)(r,{id:`GF51cw`})})]}),t[24]=L):L=t[24];let R;t[25]!==m||t[26]!==O||t[27]!==A||t[28]!==S||t[29]!==T||t[30]!==v.rcFilesToTouch||t[31]!==v.shellDetected?(R=v.shellDetected&&(0,g.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,g.jsx)(`span`,{className:`text-xs font-medium text-muted-foreground`,children:(0,g.jsx)(r,{id:`ALhMYW`})}),(0,g.jsx)(`div`,{className:`overflow-hidden rounded-md border border-border bg-card/50`,children:(0,g.jsxs)(f,{htmlFor:`${A}-path`,className:S?`flex cursor-pointer flex-col items-start gap-1 px-3 py-2.5 font-normal hover:bg-accent`:`flex flex-col items-start gap-1 px-3 py-2.5 font-normal`,children:[(0,g.jsxs)(`span`,{className:`flex items-center gap-2.5`,children:[(0,g.jsx)(d,{id:`${A}-path`,checked:S?T:!0,disabled:O||!S,onCheckedChange:()=>Ce(xe),"data-testid":`mcp-consent-path-checkbox`}),(0,g.jsxs)(`span`,{className:`flex min-w-0 flex-1 items-center gap-1.5 text-sm font-medium text-foreground`,children:[(0,g.jsx)(r,{id:`Fsx78O`,components:{0:(0,g.jsx)(`code`,{className:`inline-code`})}}),S&&(0,g.jsx)(u,{children:(0,g.jsxs)(ee,{children:[(0,g.jsx)(c,{onClick:be,className:`text-muted-foreground hover:text-foreground`,"aria-label":m({id:`LiAw2k`}),"data-testid":`mcp-consent-path-info`,children:(0,g.jsx)(ue,{className:`size-3.5`,"aria-hidden":!0})}),(0,g.jsx)(l,{className:`max-w-xs`,children:(0,g.jsx)(`p`,{className:`leading-relaxed wrap-break-word`,"data-testid":`mcp-consent-path-status`,children:m({id:`04XyCH`,values:{0:v.rcFilesToTouch.join(`, `)}})})})]})})]})]}),!S&&(0,g.jsx)(`span`,{className:`ps-6.5 text-xs text-muted-foreground`,"data-testid":`mcp-consent-path-status`,children:m({id:`RnrnTe`})}),S&&!T&&(0,g.jsx)(`span`,{className:`ps-6.5 text-xs text-amber-600 dark:text-amber-400`,"data-testid":`mcp-consent-path-warning`,children:(0,g.jsx)(r,{id:`7PXYaF`,components:{0:(0,g.jsx)(`code`,{className:`inline-code`})}})})]})})]}),t[25]=m,t[26]=O,t[27]=A,t[28]=S,t[29]=T,t[30]=v.rcFilesToTouch,t[31]=v.shellDetected,t[32]=R):R=t[32];let z;t[33]===v.shellDetected?z=t[34]:(z=v.shellDetected&&(0,g.jsx)(`div`,{className:`text-xs font-medium text-muted-foreground`,children:(0,g.jsx)(r,{id:`psfGPX`})}),t[33]=v.shellDetected,t[34]=z);let B;if(t[35]!==m||t[36]!==O||t[37]!==_||t[38]!==A||t[39]!==w){let e;t[41]!==m||t[42]!==O||t[43]!==A||t[44]!==w?(e=e=>{let t=w.has(e.id),n=`${A}-${e.id}`,i=`https://openknowledge.ai/docs/integrations/${ce[e.id]}`;return(0,g.jsxs)(`li`,{className:`flex flex-wrap items-stretch hover:bg-accent`,children:[(0,g.jsxs)(f,{htmlFor:n,className:o(`flex flex-1 cursor-pointer items-center gap-2.5 px-3 py-2.5 font-normal`,e.willReplace?`pb-0.5`:``),children:[(0,g.jsx)(d,{id:n,checked:t,disabled:O,onCheckedChange:()=>Te(e.id),"data-testid":`mcp-consent-checkbox-${e.id}`}),(0,g.jsx)(`span`,{className:`text-sm font-medium text-foreground`,children:e.label})]}),e.willReplace?(0,g.jsx)(`span`,{className:`ms-6.5 basis-full px-3 pb-2.5 text-xs text-amber-600 dark:text-amber-400`,"data-testid":`mcp-consent-status-${e.id}`,children:(0,g.jsx)(r,{id:`TEEPPF`})}):e.detected?null:(0,g.jsxs)(`a`,{href:i,target:`_blank`,rel:`noopener noreferrer`,onClick:e=>de(e,i),onAuxClick:e=>de(e,i),"aria-label":m({id:`D-Oh1s`,values:{0:e.label}}),className:`flex items-center gap-0.5 px-3 py-2.5 text-xs text-muted-foreground underline-offset-2 hover:text-foreground hover:underline`,"data-testid":`mcp-consent-status-${e.id}`,children:[(0,g.jsx)(r,{id:`P_bX4O`}),(0,g.jsx)(le,{className:`size-3`,"aria-hidden":!0})]})]},e.id)},t[41]=m,t[42]=O,t[43]=A,t[44]=w,t[45]=e):e=t[45],B=_.map(e),t[35]=m,t[36]=O,t[37]=_,t[38]=A,t[39]=w,t[40]=B}else B=t[40];let V;t[46]===B?V=t[47]:(V=(0,g.jsx)(`ul`,{className:`rounded-md border border-border bg-card/50 divide-y divide-border overflow-hidden`,children:B}),t[46]=B,t[47]=V);let H;t[48]!==z||t[49]!==V?(H=(0,g.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[z,V]}),t[48]=z,t[49]=V,t[50]=H):H=t[50];let U;t[51]!==O||t[52]!==y||t[53]!==A||t[54]!==D||t[55]!==b?(U=b&&(0,g.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,g.jsx)(`span`,{className:`text-xs font-medium text-muted-foreground`,children:(0,g.jsx)(r,{id:`28B21t`})}),(0,g.jsx)(`ul`,{className:`rounded-md border border-border bg-card/50 divide-y divide-border overflow-hidden`,children:y.map(e=>{let t=D.has(e.id),n=`${A}-skill-${e.id}`;return(0,g.jsx)(`li`,{children:(0,g.jsxs)(f,{htmlFor:n,className:`flex cursor-pointer items-start gap-2.5 px-3 py-2.5 font-normal hover:bg-accent`,children:[(0,g.jsx)(d,{id:n,checked:t,disabled:O,onCheckedChange:()=>we(t=>ve(t,e.id)),className:`mt-0.5`,"data-testid":`mcp-consent-skill-checkbox-${e.id}`}),(0,g.jsxs)(`span`,{className:`flex min-w-0 flex-1 flex-col gap-0.5`,children:[(0,g.jsx)(`span`,{className:`text-sm font-medium text-foreground`,children:(0,g.jsx)(`code`,{children:e.name})}),(0,g.jsx)(`span`,{className:`text-xs text-muted-foreground`,"data-testid":`mcp-consent-skill-status-${e.id}`,children:e.id===`discovery`?(0,g.jsx)(r,{id:`0inVGS`}):(0,g.jsx)(r,{id:`FXk_zY`})}),e.alreadyInstalled&&!t&&(0,g.jsx)(`span`,{className:`text-xs text-amber-600 dark:text-amber-400`,"data-testid":`mcp-consent-skill-warning-${e.id}`,children:(0,g.jsx)(r,{id:`dXWMFn`})})]})]})},e.id)})})]}),t[51]=O,t[52]=y,t[53]=A,t[54]=D,t[55]=b,t[56]=U):U=t[56];let W;t[57]!==R||t[58]!==H||t[59]!==U?(W=(0,g.jsxs)(ie,{className:`flex flex-col gap-6 min-h-0`,children:[R,H,U]}),t[57]=R,t[58]=H,t[59]=U,t[60]=W):W=t[60];let G;t[61]===P?G=t[62]:(G=()=>void P(),t[61]=P,t[62]=G);let K;t[63]===Symbol.for(`react.memo_cache_sentinel`)?(K=(0,g.jsx)(r,{id:`6Uau97`}),t[63]=K):K=t[63];let q;t[64]!==O||t[65]!==G?(q=(0,g.jsx)(s,{variant:`outline`,className:`font-mono uppercase`,onClick:G,disabled:O,"data-testid":`mcp-consent-skip`,children:K}),t[64]=O,t[65]=G,t[66]=q):q=t[66];let J;t[67]===Ee?J=t[68]:(J=()=>void Ee(),t[67]=Ee,t[68]=J);let Oe=O||w.size===0&&!(S&&T)&&!b,Y;t[69]===O?Y=t[70]:(Y=O?(0,g.jsx)(r,{id:`b4itZn`}):(0,g.jsx)(r,{id:`iSLIjg`}),t[69]=O,t[70]=Y);let X;t[71]!==J||t[72]!==Oe||t[73]!==Y?(X=(0,g.jsx)(s,{onClick:J,disabled:Oe,"data-testid":`mcp-consent-add`,children:Y}),t[71]=J,t[72]=Oe,t[73]=Y,t[74]=X):X=t[74];let Z;t[75]!==q||t[76]!==X?(Z=(0,g.jsxs)(ae,{children:[q,X]}),t[75]=q,t[76]=X,t[77]=Z):Z=t[77];let Q;t[78]!==W||t[79]!==Z?(Q=(0,g.jsxs)(re,{className:`sm:max-w-md`,children:[L,W,Z]}),t[78]=W,t[79]=Z,t[80]=Q):Q=t[80];let $;return t[81]!==De||t[82]!==Q?($=(0,g.jsx)(se,{open:!0,onOpenChange:De,children:Q}),t[81]=De,t[82]=Q,t[83]=$):$=t[83],$}function be(e){e.preventDefault(),e.stopPropagation()}function xe(e){return!e}export{v as McpConsentDialogBody,v as default,me as computeInitialSelection,_e as computeInitialSkillSelection,pe as isPathRowActionable,ge as selectedIdsOrdered,ye as skillIdsOrdered,he as toggleSelectedId,ve as toggleSkillId};
|
|
@@ -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{r}from"./dist-Nvb76hAm.js";import{n as i}from"./dist-PQ5KMVDh.js";import{t as a}from"./compiler-runtime-BfE3aGVn.js";import{A as o,O as s,n as c}from"./CodeMirrorPropInput-
|
|
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{r}from"./dist-Nvb76hAm.js";import{n as i}from"./dist-PQ5KMVDh.js";import{t as a}from"./compiler-runtime-BfE3aGVn.js";import{A as o,O as s,n as c}from"./CodeMirrorPropInput-ZGACWLSy.js";import{f as l}from"./config-provider-DIuwNlqX.js";import{N as u,Ot as d,X as f}from"./dist-DNwOaDhC.js";import{n as p,t as m}from"./esm-HV7Pxfbn.js";import{t as h}from"./dist-B1qkpf98.js";import{t as g}from"./src-D8jPu2QV.js";var _=a(),v=e(n(),1),y=t(),b=p({settings:{background:`var(--background)`,gutterBackground:`var(--muted)`}}),x=m({settings:{background:`var(--background)`,gutterBackground:`var(--muted)`}});function S(e,t,n){let r=e.toString();if(r===t)return;let i=0,a=Math.min(r.length,t.length);for(;i<a&&r[i]===t[i];)i+=1;let o=r.length,s=t.length;for(;o>i&&s>i&&r[o-1]===t[s-1];)--o,--s;let c=()=>{o>i&&e.delete(i,o-i),s>i&&e.insert(i,t.slice(i,s))},l=e.doc;l?l.transact(c,n):c()}function C(e){let t=(0,_.c)(7),{ytext:n,provider:r,undoManager:a}=e,o=(0,v.useRef)(null),{resolvedTheme:l}=i(),p,m;t[0]!==r||t[1]!==l||t[2]!==a||t[3]!==n?(p=()=>{let e=o.current;if(!e)return;let t=l===`dark`?b:x,i=new f({state:d.create({doc:n.toString(),extensions:[h,g(n,r.awareness,{undoManager:a}),s(),u(c),f.lineWrapping,f.theme({"&":{height:`100%`}}),t]}),parent:e});return()=>i.destroy()},m=[n,r,l,a],t[0]=r,t[1]=l,t[2]=a,t[3]=n,t[4]=p,t[5]=m):(p=t[4],m=t[5]),(0,v.useEffect)(p,m);let S;return t[6]===Symbol.for(`react.memo_cache_sentinel`)?(S=(0,y.jsx)(`div`,{ref:o,className:`h-full min-h-0 overflow-auto`}),t[6]=S):S=t[6],S}var w=Symbol(`mermaid-diagram-edit`);function T(e){let t=(0,_.c)(28),{provider:n,isSourceMode:i}=e,{_:a}=r(),s;t[0]===n.document?s=t[1]:(s=n.document.getText(`source`),t[0]=n.document,t[1]=s);let c=s,u;t[2]===c?u=t[3]:(u=()=>c.toString(),t[2]=c,t[3]=u);let[d,f]=(0,v.useState)(u),p,m;t[4]===c?(p=t[5],m=t[6]):(p=()=>{let e=()=>f(c.toString());return c.observe(e),e(),()=>c.unobserve(e)},m=[c],t[4]=c,t[5]=p,t[6]=m),(0,v.useEffect)(p,m);let h;t[7]===c?h=t[8]:(h=()=>new l(c,{trackedOrigins:new Set([w])}),t[7]=c,t[8]=h);let[g]=(0,v.useState)(h),b;t[9]===c?b=t[10]:(b={canEdit:!0,commitChart:e=>S(c,e,w)},t[9]=c,t[10]=b);let x=b,T,E;t[11]!==i||t[12]!==g?(T=()=>{if(i)return;let e=e=>{if(!(e.metaKey||e.ctrlKey)||e.key.toLowerCase()!==`z`)return;let t=e.target;if(t instanceof HTMLElement){let e=t.tagName;if(e===`INPUT`||e===`TEXTAREA`||t.isContentEditable)return}e.preventDefault(),e.shiftKey?g.redo():g.undo()};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},E=[i,g],t[11]=i,t[12]=g,t[13]=T,t[14]=E):(T=t[13],E=t[14]),(0,v.useEffect)(T,E);let D;t[15]===a?D=t[16]:(D=a({id:`8PifYj`}),t[15]=a,t[16]=D);let O=i?`source`:`diagram`,k;t[17]!==x||t[18]!==i||t[19]!==n||t[20]!==d||t[21]!==g||t[22]!==c?(k=(0,y.jsx)(`div`,{className:`min-h-0 flex-1 overflow-hidden`,children:i?(0,y.jsx)(C,{ytext:c,provider:n,undoManager:g}):(0,y.jsx)(`div`,{className:`flex h-full min-h-0 flex-col p-3`,children:(0,y.jsx)(o,{chart:d,editBinding:x,className:`min-h-0 flex-1`})})}),t[17]=x,t[18]=i,t[19]=n,t[20]=d,t[21]=g,t[22]=c,t[23]=k):k=t[23];let A;return t[24]!==O||t[25]!==k||t[26]!==D?(A=(0,y.jsx)(`main`,{className:`flex h-full min-h-0 flex-col bg-background`,"aria-label":D,"data-mermaid-doc-editor":``,"data-mermaid-doc-editor-mode":O,children:k}),t[24]=O,t[25]=k,t[26]=D,t[27]=A):A=t[27],A}export{T as MermaidDocEditor};
|