@inkeep/open-knowledge 0.47.4 → 0.47.5
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-B1Hzf1SD.mjs → acp-harness-probe-inKMbnTO.mjs} +2 -2
- package/dist/cli.mjs +57 -57
- package/dist/constants-iJqy8Hia.mjs +2 -0
- package/dist/{git-handle-CllEzrX4.mjs → git-handle-BKNpWc-0.mjs} +2 -2
- package/dist/git-handle-vAOkZizz.mjs +1 -0
- package/dist/index.mjs +1 -1
- package/dist/init-Bp0b6aXB.mjs +1 -0
- package/dist/{init-CB3lq_i9.mjs → init-D0r4e25M.mjs} +3 -3
- package/dist/{launch-json-removal-DfaHcfms.mjs → launch-json-removal-p9WHQkrd.mjs} +2 -2
- package/dist/loader-C6qDEjnp.mjs +1 -0
- package/dist/{loader-7y3WQNVR.mjs → loader-DI6RYqwy.mjs} +2 -2
- package/dist/md-manager-BuZAb56s.mjs +2 -0
- package/dist/{open-browser-BXJKGvZF.mjs → open-browser-BGPHwSRQ.mjs} +2 -2
- package/dist/parse-worker.mjs +1 -1
- package/dist/{preview-CcFBEKQd.mjs → preview-B-2W99IX.mjs} +2 -2
- package/dist/preview-CITNy9Et.mjs +1 -0
- package/dist/public/assets/{ActivityModeContent-2l8BA531.js → ActivityModeContent-Cs_G4A2z.js} +1 -1
- package/dist/public/assets/{AgentDiffPane-wqdF9lpR.js → AgentDiffPane-CWfs6hRd.js} +1 -1
- package/dist/public/assets/{AgentThreadClientBinder-56IhVeqo.js → AgentThreadClientBinder-GaJMQpHN.js} +1 -1
- package/dist/public/assets/{ChangedOutsideBadge-eT1ODdAD.js → ChangedOutsideBadge-DhOK_p1U.js} +1 -1
- package/dist/public/assets/{CodeMirrorPropInput-L7fbBlLy.js → CodeMirrorPropInput-DvoNWmdR.js} +1 -1
- package/dist/public/assets/{DocumentContext-DD95gIt4.js → DocumentContext-BaYg4CBg.js} +1 -1
- package/dist/public/assets/{EditorModeToggle-CR5jA0YM.js → EditorModeToggle-C9I-Efpm.js} +1 -1
- package/dist/public/assets/{EnableSyncConfirmDialog-C5fNw26t.js → EnableSyncConfirmDialog-DCen-fKk.js} +1 -1
- package/dist/public/assets/FeedbackForm-EBcXu2CA.js +1 -0
- package/dist/public/assets/{GraphPanel-BDGxPSvY.js → GraphPanel-B9HMPssx.js} +1 -1
- package/dist/public/assets/{ImportSkillDialog-B2ilfqxe.js → ImportSkillDialog-BjLITatU.js} +1 -1
- package/dist/public/assets/{LintConfigEditor-ByUOzhaw.js → LintConfigEditor-D6dnss9h.js} +1 -1
- package/dist/public/assets/{ManagedArtifactProperties-CVGjtd3P.js → ManagedArtifactProperties-BO70pd59.js} +1 -1
- package/dist/public/assets/ManagedArtifactProperties-BkBzFhn7.js +1 -0
- package/dist/public/assets/{McpConsentDialogBody-B3ubISnW.js → McpConsentDialogBody-CZC9r_Ug.js} +1 -1
- package/dist/public/assets/{MermaidDocEditor-CftVeU4U.js → MermaidDocEditor-C6SV6GjT.js} +1 -1
- package/dist/public/assets/{ReportBugDialogBody-CWbkwdNL.js → ReportBugDialogBody-BZrgGB1Z.js} +1 -1
- package/dist/public/assets/{SchemaConfigEditor-UkvF3UAn.js → SchemaConfigEditor-BYBjMHsb.js} +1 -1
- package/dist/public/assets/{SessionsHost-Pa6hY3sI.js → SessionsHost-llsZYWbP.js} +2 -2
- package/dist/public/assets/{SettingsDialogBody-Be8P3Vqa.js → SettingsDialogBody-DXaeMFz_.js} +1 -1
- package/dist/public/assets/{ShareBranchSwitchDialog-BmGWQCY6.js → ShareBranchSwitchDialog-DUzjoGVJ.js} +1 -1
- package/dist/public/assets/{ShareReceiveDialog-BoqZXYhT.js → ShareReceiveDialog-BQhhG70Y.js} +1 -1
- package/dist/public/assets/{ShareReceiveMissDialog-B_DT1dz2.js → ShareReceiveMissDialog-CaI0eq9C.js} +1 -1
- package/dist/public/assets/{SkillEditBanner-hcLaEQ2F.js → SkillEditBanner-WG0cwpb-.js} +1 -1
- package/dist/public/assets/{SkillOriginInline-CtSdZ4_j.js → SkillOriginInline-8KJ3qbz8.js} +1 -1
- package/dist/public/assets/{SkillToolbarControls-DQYbvJTe.js → SkillToolbarControls-LDRTNFTx.js} +1 -1
- package/dist/public/assets/{SourceEditor-DX9L1Mci.js → SourceEditor-nYPGo8QU.js} +1 -1
- package/dist/public/assets/{TerminalPanel-WTiFd3Z6.js → TerminalPanel-CkcArSmy.js} +1 -1
- package/dist/public/assets/{TerminalWindowApp-CnhrK_tv.js → TerminalWindowApp-COjq6Uas.js} +1 -1
- package/dist/public/assets/{TextDocEditor-BGlQEeBq.js → TextDocEditor-eS5P-G2H.js} +1 -1
- package/dist/public/assets/{ThreadView-CExveDEV.js → ThreadView-v9Y3Ih_a.js} +1 -1
- package/dist/public/assets/{TimelineDiffPane-DDFvXSlv.js → TimelineDiffPane-3nkpH5uW.js} +1 -1
- package/dist/public/assets/{agent-diff-store-jazihC28.js → agent-diff-store-PJFwSxS1.js} +1 -1
- package/dist/public/assets/{agent-visibility-Ch0XQMkJ.js → agent-visibility-Cieocxzz.js} +1 -1
- package/dist/public/assets/{auth-state-cache-D47fide1.js → auth-state-cache-B8KE-_17.js} +1 -1
- package/dist/public/assets/{client-version-CHRlMl4l.js → client-version-uMlMQx33.js} +1 -1
- package/dist/public/assets/{config-context-B2fceTMP.js → config-context-BIynQsCe.js} +1 -1
- package/dist/public/assets/{config-provider-Cb43FIW2.js → config-provider-DKj_NBqh.js} +1 -1
- package/dist/public/assets/{dist-5ovMzVKN2.js → dist-CrqBb5y32.js} +175 -175
- package/dist/public/assets/{doc-paths-BFNbv2er.js → doc-paths-CCYuGvJq.js} +1 -1
- package/dist/public/assets/{documents-events-BM8xyAJz.js → documents-events-CdU1iFH9.js} +1 -1
- package/dist/public/assets/{file-tree-adapter-C1zJK1Gk.js → file-tree-adapter-a1hBKu8z.js} +1 -1
- package/dist/public/assets/{file-tree-utils-Dma5c4k_.js → file-tree-utils-CClHAhYa.js} +1 -1
- package/dist/public/assets/{folder-config-api-BxuLFuqM.js → folder-config-api-6QhNU0oa.js} +1 -1
- package/dist/public/assets/{index-DlH6tzhG.js → index-kaTVsIsC.js} +108 -108
- package/dist/public/assets/{lint-config-client-DDxBMTZk.js → lint-config-client-B0H2okzr.js} +1 -1
- package/dist/public/assets/{markdownlint-rule-browser-c2Uv_5Ry.js → markdownlint-rule-browser-BXGIkBuD.js} +1 -1
- package/dist/public/assets/{navigation-targets-D9VW9WdW.js → navigation-targets-BwmQHp3k.js} +1 -1
- package/dist/public/assets/{open-managed-artifact-tab-CLwVAGCD.js → open-managed-artifact-tab-BzW5kLR0.js} +1 -1
- package/dist/public/assets/{pending-receive-nav-store-BmcjNZOu.js → pending-receive-nav-store-B1W7hvut.js} +1 -1
- package/dist/public/assets/{prop-types-BPmLSxhG.js → prop-types-DIaGyPZM.js} +1 -1
- package/dist/public/assets/{receive-store-BlAqmJZT.js → receive-store-DlIsfkuF.js} +1 -1
- package/dist/public/assets/{selection-context-DJvv-kK_.js → selection-context-DS--IqEv.js} +1 -1
- package/dist/public/assets/{skill-actions-CfQkZqK6.js → skill-actions-DCISbh85.js} +2 -2
- package/dist/public/assets/skill-scope-7fBhGcjl.js +1 -0
- package/dist/public/assets/{skills-api-BTy9LAk0.js → skills-api-wUsPYcxD.js} +1 -1
- package/dist/public/assets/{src-hNXjwMT1.js → src-ScxRfF8q.js} +1 -1
- package/dist/public/assets/{tag-pill-input-DVdwNfBT.js → tag-pill-input-Bx_oWl-2.js} +1 -1
- package/dist/public/assets/{target-navigation-intent-C6AhTsfc.js → target-navigation-intent-D2TXEip5.js} +1 -1
- package/dist/public/assets/{terminal-launch-events-B1DGOVIv.js → terminal-launch-events-B3gBFWc1.js} +1 -1
- package/dist/public/assets/{terminal-telemetry-CviFLmIq.js → terminal-telemetry-Bv3GE2Aw.js} +1 -1
- package/dist/public/assets/{typing-burst-detector-B4AQIJp7.js → typing-burst-detector-lX1cLLkC.js} +2 -2
- package/dist/public/assets/{uninstall-CfW-qETg.js → uninstall-BILpXTW1.js} +1 -1
- package/dist/public/assets/{use-activity-panel-D8pDT3xu.js → use-activity-panel-CxtCUEYv.js} +1 -1
- package/dist/public/assets/{use-collab-url-CUHlgRv5.js → use-collab-url-BjRhUqsT.js} +1 -1
- package/dist/public/assets/{use-live-xterm-theme-CLCjRdjJ.js → use-live-xterm-theme-Cvtrg0j6.js} +1 -1
- package/dist/public/assets/{use-open-skill-akwbVkG4.js → use-open-skill-BHdzD0v1.js} +1 -1
- package/dist/public/assets/{use-settings-route-BnOIfxuB.js → use-settings-route-aXWIMVRt.js} +1 -1
- package/dist/public/assets/{use-skill-directory-CSx9txvQ.js → use-skill-directory-BV092Gnw.js} +1 -1
- package/dist/public/assets/{use-skill-origin-DvSOmIz_.js → use-skill-origin-DMt7ay7U.js} +1 -1
- package/dist/public/assets/{use-skills-DcLUuUJ9.js → use-skills-C7huRzJa.js} +1 -1
- package/dist/public/assets/{use-terminal-enabled-CgG0yd-l.js → use-terminal-enabled-C5zv0ln-.js} +1 -1
- package/dist/public/assets/{use-timeline-entry-diff-DD-1OHsM.js → use-timeline-entry-diff-EbqHCjsV.js} +1 -1
- package/dist/public/assets/{use-workspace-J5QvjwOx.js → use-workspace-D80aSSBD.js} +1 -1
- package/dist/public/index.html +41 -41
- package/dist/public/uninstall.html +2 -2
- package/dist/{repair-launch-json-C-n2O-Po.mjs → repair-launch-json-CSPeJG-m.mjs} +2 -2
- package/dist/{repair-mcp-configs-BOlWztB-.mjs → repair-mcp-configs-Basw3obQ.mjs} +2 -2
- package/dist/{repair-skills-IlcXRdDC.mjs → repair-skills-CXOdNyyU.mjs} +2 -2
- package/dist/repair-skills-CdFjRSeM.mjs +1 -0
- package/dist/{server-lock-CmYdHyX7.mjs → server-lock-9wk8At58.mjs} +2 -2
- package/dist/server-lock-DxjYF04b.mjs +1 -0
- package/dist/src-7fluFHtm.mjs +1 -0
- package/dist/{src-BS7drzIV.mjs → src-BA6UmYHS.mjs} +318 -318
- package/dist/{src-C-GJXht_.mjs → src-D81OiBLA.mjs} +2 -2
- package/dist/{src-CHSJwcpc.mjs → src-Dkrbi5Bh.mjs} +87 -87
- package/dist/start-B5xwD4lL.mjs +1 -0
- package/dist/{start-BITNJysu.mjs → start-DUP_Th9B.mjs} +3 -3
- package/dist/{write-project-skill-CzrMSTf3.mjs → write-project-skill-D_i5y_ki.mjs} +4 -4
- package/package.json +5 -5
- package/dist/constants-BpeoO1T6.mjs +0 -2
- package/dist/git-handle-DJPLRe3o.mjs +0 -1
- package/dist/init-BGPGjp1S.mjs +0 -1
- package/dist/loader-BeuP5hjg.mjs +0 -1
- package/dist/md-manager-DqRVEVmJ.mjs +0 -2
- package/dist/preview-lBskg3BM.mjs +0 -1
- package/dist/public/assets/FeedbackForm-macxQS8x.js +0 -1
- package/dist/public/assets/ManagedArtifactProperties-m1GRSrIt.js +0 -1
- package/dist/public/assets/skill-scope-DwJ84s_r.js +0 -1
- package/dist/repair-skills-3_7Dtv4E.mjs +0 -1
- package/dist/server-lock-D61z37T2.mjs +0 -1
- package/dist/src-BWFntIGk.mjs +0 -1
- package/dist/start-DPqozQkA.mjs +0 -1
|
@@ -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{n as a}from"./dist-PQ5KMVDh.js";import{t as o}from"./compiler-runtime-BfE3aGVn.js";import{t as s}from"./utils-CPqDy6Hr.js";import{t as c}from"./button-RQ5o7P7w.js";import{i as l,n as u,t as d}from"./tooltip-x7BNUa3s.js";import{c as f}from"./select-BUOcREjn.js";import{n as p,t as m}from"./toggle-group-Cnezoq-B.js";import{$r as h,Ya as g,mo as _,yo as v}from"./dist-5ovMzVKN2.js";import{n as y}from"./dist-uN7pEWl0.js";import{t as b}from"./file-tree-utils-Dma5c4k_.js";import"./config-provider-Cb43FIW2.js";import{n as x}from"./config-context-B2fceTMP.js";import{Ot as S,X as C}from"./dist-BNDNcytQ.js";import{t as w}from"./cm-theme-BCzjFmR8.js";import{t as T}from"./asset-dispatch-BOfThpQD.js";import{t as E}from"./dist-CZG2zXVq.js";import{t as D}from"./text-viewer-languages-BZtGVaBl.js";var O=o(),k=e(n(),1),A=class extends Error{httpStatus;constructor(e,t){super(e),this.name=`ViewerTextLoadError`,this.httpStatus=t}};function j(e){let t=(0,O.c)(10),{_:n}=i(),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 a=r,{src:o,loadText:s}=e,c=(0,k.useRef)(s),l=(0,k.useRef)(a),u;t[2]!==s||t[3]!==a?(u=()=>{c.current=s,l.current=a},t[2]=s,t[3]=a,t[4]=u):u=t[4],(0,k.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,k.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),httpStatus: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 new A(l.current(e.status),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`}),httpStatus:t instanceof A?t.httpStatus:void 0})}),()=>{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,k.useEffect)(m,h),f}var M=t();function N(e){let t=(0,O.c)(10),{fileName:n,dataAttr:i,extraAttrs:a}=e,o=`${i}-state`,s;t[0]!==i||t[1]!==o?(s={[i]:``,[o]:`loading`},t[0]=i,t[1]=o,t[2]=s):s=t[2];let c;t[3]===n?c=t[4]:(c=(0,M.jsx)(`span`,{children:(0,M.jsx)(r,{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,M.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 P(e){let t=(0,O.c)(16),{fileName:n,dataAttr:i,extraAttrs:a,message:o,openFile:s}=e,l=`${i}-state`,u;t[0]!==i||t[1]!==l?(u={[i]:``,[l]:`error`},t[0]=i,t[1]=l,t[2]=u):u=t[2];let d;t[3]===n?d=t[4]:(d=(0,M.jsx)(`div`,{className:`font-medium text-sm`,children:(0,M.jsx)(r,{id:`qdBUHP`,values:{fileName:n}})}),t[3]=n,t[4]=d);let f;t[5]===o?f=t[6]:(f=(0,M.jsx)(`div`,{className:`text-muted-foreground text-xs`,children:o}),t[5]=o,t[6]=f);let p;t[7]===s?p=t[8]:(p=s?(0,M.jsx)(c,{variant:`outline`,size:`sm`,className:`mt-2`,"data-testid":`viewer-open-file`,onClick:()=>{T({url:s.url,projectRelPath:s.projectRelPath,ext:s.ext,title:s.title,forceOsDelegation:!0})},children:(0,M.jsx)(r,{id:`9npOH9`})}):null,t[7]=s,t[8]=p);let m;return t[9]!==a||t[10]!==n||t[11]!==u||t[12]!==d||t[13]!==f||t[14]!==p?(m=(0,M.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,...u,...a,children:[d,f,p]}),t[9]=a,t[10]=n,t[11]=u,t[12]=d,t[13]=f,t[14]=p,t[15]=m):m=t[15],m}function F({assetPath:e,fileName:t,extension:n,httpStatus:r}){if(!e||r===404)return;let i=n.toLowerCase();return{projectRelPath:e,ext:i,title:t,url:h(`${g.has(i)?`/api/asset`:`/api/asset-text`}?path=${encodeURIComponent(e)}`)}}var I=w({dark:!0,background:`var(--background)`,gutterBackground:`var(--muted)`}),L=w({dark:!1,background:`var(--background)`,gutterBackground:`var(--muted)`});function R(e){let t=(0,O.c)(28),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 o=(0,k.useRef)(null),s=(0,k.useRef)(null),{resolvedTheme:c}=a(),l=j(i),u=l.status===`loaded`?l.content:null,d,f;t[4]!==n||t[5]!==u||t[6]!==c?(d=()=>{if(!o.current||u===null)return;let e=n.toLowerCase(),t=_(e),r=c===`dark`?I:L,i=!1,a=null;return D(e,t).then(e=>{if(i||!o.current)return;let t=[E,...e?[e]:[],C.editable.of(!0),S.readOnly.of(!0),C.lineWrapping,r];a=new C({state:S.create({doc:u,extensions:t}),parent:o.current}),s.current=a}),()=>{i=!0,a?.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,k.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,M.jsx)(N,{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=l.message,a;t[14]!==n||t[15]!==l.httpStatus||t[16]!==r||t[17]!==i.assetPath?(a=F({assetPath:i.assetPath,fileName:r,extension:n,httpStatus:l.httpStatus}),t[14]=n,t[15]=l.httpStatus,t[16]=r,t[17]=i.assetPath,t[18]=a):a=t[18];let o;return t[19]!==m||t[20]!==l.message||t[21]!==r||t[22]!==a?(o=(0,M.jsx)(P,{fileName:r,dataAttr:`data-text-viewer`,extraAttrs:m,message:e,openFile:a}),t[19]=m,t[20]=l.message,t[21]=r,t[22]=a,t[23]=o):o=t[23],o}let h;t[24]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,M.jsx)(`div`,{ref:o,className:`min-h-0 flex-1 overflow-auto`}),t[24]=h):h=t[24];let g;return t[25]!==n||t[26]!==r?(g=(0,M.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[25]=n,t[26]=r,t[27]=g):g=t[27],g}function z(e){let t=(0,O.c)(29),{entry:n,className:r}=e,{_:a}=i(),{projectLocalBinding:o,merged:l}=x(),u=l?.appearance?.sidebar,d=u?.showHiddenFiles??!1,p=u?.showOnlyMarkdownFiles??!1,m;t[0]!==n||t[1]!==d||t[2]!==p?(m=b(n,{showHiddenFiles:d,showOnlyMarkdownFiles:p}),t[0]=n,t[1]=d,t[2]=p,t[3]=m):m=t[3];let h=m;if(!h.hiddenFiles&&!h.onlyMarkdownFiles)return null;let g;t[4]!==a||t[5]!==o?(g=e=>{if(o===null)return;let t=o.patch({appearance:{sidebar:e}});t.ok||(console.warn(`[NotInSidebarIndicator] sidebar visibility flip rejected:`,v(t.error)),y.error(a({id:`P47EWZ`}),{description:v(t.error)}))},t[4]=a,t[5]=o,t[6]=g):g=t[6];let _=g,S;t[7]===r?S=t[8]:(S=s(`flex items-center gap-1.5 text-muted-foreground/70 text-xs`,r),t[7]=r,t[8]=S);let C;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(C=(0,M.jsx)(f,{"aria-hidden":`true`,className:`size-3.5 shrink-0`}),t[9]=C):C=t[9];let w;t[10]===a?w=t[11]:(w=a({id:`j9tqwO`}),t[10]=a,t[11]=w);let T;t[12]===w?T=t[13]:(T=(0,M.jsx)(`span`,{className:`whitespace-nowrap`,children:w}),t[12]=w,t[13]=T);let E;t[14]!==a||t[15]!==h.hiddenFiles||t[16]!==_||t[17]!==o?(E=h.hiddenFiles?(0,M.jsx)(c,{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:()=>_({showHiddenFiles:!0}),"aria-label":a({id:`XcGbim`}),title:a({id:`XcGbim`}),"data-testid":`not-in-sidebar-flip-hidden-files`,children:a({id:`6KCH4m`})}):null,t[14]=a,t[15]=h.hiddenFiles,t[16]=_,t[17]=o,t[18]=E):E=t[18];let D;t[19]!==a||t[20]!==h.onlyMarkdownFiles||t[21]!==_||t[22]!==o?(D=h.onlyMarkdownFiles?(0,M.jsx)(c,{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:()=>_({showOnlyMarkdownFiles:!1}),"aria-label":a({id:`10g8I_`}),title:a({id:`10g8I_`}),"data-testid":`not-in-sidebar-flip-only-markdown`,children:a({id:`5-o4kO`})}):null,t[19]=a,t[20]=h.onlyMarkdownFiles,t[21]=_,t[22]=o,t[23]=D):D=t[23];let k;return t[24]!==D||t[25]!==S||t[26]!==T||t[27]!==E?(k=(0,M.jsxs)(`div`,{"data-testid":`not-in-sidebar-indicator`,className:S,children:[C,T,E,D]}),t[24]=D,t[25]=S,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,O.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,M.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,O.c)(4),n,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,M.jsx)(`title`,{children:`Markdown`}),r=(0,M.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,M.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,O.c)(4),n,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,M.jsx)(`title`,{children:`Textbox`}),r=(0,M.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,M.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,O.c)(48),{isSourceMode:n,onModeChange:a,sourceDisabled:o,wysiwygDisabled:s,wysiwygLabel:c,sourceLabel:f,wysiwygDisabledReason:h}=e,g=o===void 0?!1:o,_=s===void 0?!1:s,{_:v}=i(),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]!==f?(x=f??v({id:`xbdtfY`}),t[3]=v,t[4]=f,t[5]=x):x=t[5];let S=x,C=(0,k.useId)(),w=_&&h?h:null,T=n?`source`:`wysiwyg`,E;t[6]===a?E=t[7]:(E=e=>{e&&a(e)},t[6]=a,t[7]=E);let D;t[8]===v?D=t[9]:(D=v({id:`n7aopT`}),t[8]=v,t[9]=D);let A=w?C:void 0,j;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(j=(0,M.jsx)(U,{className:`size-4`}),t[10]=j):j=t[10];let N;t[11]!==A||t[12]!==_||t[13]!==b?(N=(0,M.jsx)(p,{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]=N):N=t[14];let P;t[15]!==w||t[16]!==C?(P=w?(0,M.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]!==N||t[19]!==P?(F=(0,M.jsx)(l,{asChild:!0,children:(0,M.jsxs)(`div`,{children:[N,P]})}),t[18]=N,t[19]=P,t[20]=F):F=t[20];let I;t[21]!==_||t[22]!==h||t[23]!==c?(I=_&&h?h:c||(0,M.jsx)(r,{id:`Mb_20S`}),t[21]=_,t[22]=h,t[23]=c,t[24]=I):I=t[24];let L;t[25]===I?L=t[26]:(L=(0,M.jsx)(u,{side:`bottom`,children:I}),t[25]=I,t[26]=L);let R;t[27]!==F||t[28]!==L?(R=(0,M.jsxs)(d,{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,M.jsx)(H,{className:`size-4`}),t[30]=z):z=t[30];let B;t[31]!==g||t[32]!==S?(B=(0,M.jsx)(l,{asChild:!0,children:(0,M.jsx)(`div`,{children:(0,M.jsx)(p,{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]!==f?(V=g?(0,M.jsx)(r,{id:`G-JBA1`}):f||(0,M.jsx)(r,{id:`u6Hp4N`}),t[34]=g,t[35]=f,t[36]=V):V=t[36];let W;t[37]===V?W=t[38]:(W=(0,M.jsx)(u,{side:`bottom`,children:V}),t[37]=V,t[38]=W);let G;t[39]!==B||t[40]!==W?(G=(0,M.jsxs)(d,{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]!==E||t[46]!==D?(K=(0,M.jsxs)(m,{type:`single`,value:T,onValueChange:E,"aria-label":D,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]=E,t[46]=D,t[47]=K):K=t[47],K}export{F as a,j as c,R as i,H as n,P as o,z as r,N as s,W as t};
|
|
1
|
+
import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./jsx-runtime-BUgB2tll.js";import{t as n}from"./react-f2sANaYj.js";import{n as r,r as i}from"./dist-Nvb76hAm.js";import{n as a}from"./dist-PQ5KMVDh.js";import{t as o}from"./compiler-runtime-BfE3aGVn.js";import{t as s}from"./utils-CPqDy6Hr.js";import{t as c}from"./button-RQ5o7P7w.js";import{i as l,n as u,t as d}from"./tooltip-x7BNUa3s.js";import{c as f}from"./select-BUOcREjn.js";import{n as p,t as m}from"./toggle-group-Cnezoq-B.js";import{$r as h,Ya as g,mo as _,yo as v}from"./dist-CrqBb5y32.js";import{n as y}from"./dist-uN7pEWl0.js";import{t as b}from"./file-tree-utils-CClHAhYa.js";import"./config-provider-DKj_NBqh.js";import{n as x}from"./config-context-BIynQsCe.js";import{Ot as S,X as C}from"./dist-BNDNcytQ.js";import{t as w}from"./cm-theme-BCzjFmR8.js";import{t as T}from"./asset-dispatch-BOfThpQD.js";import{t as E}from"./dist-CZG2zXVq.js";import{t as D}from"./text-viewer-languages-BZtGVaBl.js";var O=o(),k=e(n(),1),A=class extends Error{httpStatus;constructor(e,t){super(e),this.name=`ViewerTextLoadError`,this.httpStatus=t}};function j(e){let t=(0,O.c)(10),{_:n}=i(),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 a=r,{src:o,loadText:s}=e,c=(0,k.useRef)(s),l=(0,k.useRef)(a),u;t[2]!==s||t[3]!==a?(u=()=>{c.current=s,l.current=a},t[2]=s,t[3]=a,t[4]=u):u=t[4],(0,k.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,k.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),httpStatus: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 new A(l.current(e.status),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`}),httpStatus:t instanceof A?t.httpStatus:void 0})}),()=>{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,k.useEffect)(m,h),f}var M=t();function N(e){let t=(0,O.c)(10),{fileName:n,dataAttr:i,extraAttrs:a}=e,o=`${i}-state`,s;t[0]!==i||t[1]!==o?(s={[i]:``,[o]:`loading`},t[0]=i,t[1]=o,t[2]=s):s=t[2];let c;t[3]===n?c=t[4]:(c=(0,M.jsx)(`span`,{children:(0,M.jsx)(r,{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,M.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 P(e){let t=(0,O.c)(16),{fileName:n,dataAttr:i,extraAttrs:a,message:o,openFile:s}=e,l=`${i}-state`,u;t[0]!==i||t[1]!==l?(u={[i]:``,[l]:`error`},t[0]=i,t[1]=l,t[2]=u):u=t[2];let d;t[3]===n?d=t[4]:(d=(0,M.jsx)(`div`,{className:`font-medium text-sm`,children:(0,M.jsx)(r,{id:`qdBUHP`,values:{fileName:n}})}),t[3]=n,t[4]=d);let f;t[5]===o?f=t[6]:(f=(0,M.jsx)(`div`,{className:`text-muted-foreground text-xs`,children:o}),t[5]=o,t[6]=f);let p;t[7]===s?p=t[8]:(p=s?(0,M.jsx)(c,{variant:`outline`,size:`sm`,className:`mt-2`,"data-testid":`viewer-open-file`,onClick:()=>{T({url:s.url,projectRelPath:s.projectRelPath,ext:s.ext,title:s.title,forceOsDelegation:!0})},children:(0,M.jsx)(r,{id:`9npOH9`})}):null,t[7]=s,t[8]=p);let m;return t[9]!==a||t[10]!==n||t[11]!==u||t[12]!==d||t[13]!==f||t[14]!==p?(m=(0,M.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,...u,...a,children:[d,f,p]}),t[9]=a,t[10]=n,t[11]=u,t[12]=d,t[13]=f,t[14]=p,t[15]=m):m=t[15],m}function F({assetPath:e,fileName:t,extension:n,httpStatus:r}){if(!e||r===404)return;let i=n.toLowerCase();return{projectRelPath:e,ext:i,title:t,url:h(`${g.has(i)?`/api/asset`:`/api/asset-text`}?path=${encodeURIComponent(e)}`)}}var I=w({dark:!0,background:`var(--background)`,gutterBackground:`var(--muted)`}),L=w({dark:!1,background:`var(--background)`,gutterBackground:`var(--muted)`});function R(e){let t=(0,O.c)(28),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 o=(0,k.useRef)(null),s=(0,k.useRef)(null),{resolvedTheme:c}=a(),l=j(i),u=l.status===`loaded`?l.content:null,d,f;t[4]!==n||t[5]!==u||t[6]!==c?(d=()=>{if(!o.current||u===null)return;let e=n.toLowerCase(),t=_(e),r=c===`dark`?I:L,i=!1,a=null;return D(e,t).then(e=>{if(i||!o.current)return;let t=[E,...e?[e]:[],C.editable.of(!0),S.readOnly.of(!0),C.lineWrapping,r];a=new C({state:S.create({doc:u,extensions:t}),parent:o.current}),s.current=a}),()=>{i=!0,a?.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,k.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,M.jsx)(N,{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=l.message,a;t[14]!==n||t[15]!==l.httpStatus||t[16]!==r||t[17]!==i.assetPath?(a=F({assetPath:i.assetPath,fileName:r,extension:n,httpStatus:l.httpStatus}),t[14]=n,t[15]=l.httpStatus,t[16]=r,t[17]=i.assetPath,t[18]=a):a=t[18];let o;return t[19]!==m||t[20]!==l.message||t[21]!==r||t[22]!==a?(o=(0,M.jsx)(P,{fileName:r,dataAttr:`data-text-viewer`,extraAttrs:m,message:e,openFile:a}),t[19]=m,t[20]=l.message,t[21]=r,t[22]=a,t[23]=o):o=t[23],o}let h;t[24]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,M.jsx)(`div`,{ref:o,className:`min-h-0 flex-1 overflow-auto`}),t[24]=h):h=t[24];let g;return t[25]!==n||t[26]!==r?(g=(0,M.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[25]=n,t[26]=r,t[27]=g):g=t[27],g}function z(e){let t=(0,O.c)(29),{entry:n,className:r}=e,{_:a}=i(),{projectLocalBinding:o,merged:l}=x(),u=l?.appearance?.sidebar,d=u?.showHiddenFiles??!1,p=u?.showOnlyMarkdownFiles??!1,m;t[0]!==n||t[1]!==d||t[2]!==p?(m=b(n,{showHiddenFiles:d,showOnlyMarkdownFiles:p}),t[0]=n,t[1]=d,t[2]=p,t[3]=m):m=t[3];let h=m;if(!h.hiddenFiles&&!h.onlyMarkdownFiles)return null;let g;t[4]!==a||t[5]!==o?(g=e=>{if(o===null)return;let t=o.patch({appearance:{sidebar:e}});t.ok||(console.warn(`[NotInSidebarIndicator] sidebar visibility flip rejected:`,v(t.error)),y.error(a({id:`P47EWZ`}),{description:v(t.error)}))},t[4]=a,t[5]=o,t[6]=g):g=t[6];let _=g,S;t[7]===r?S=t[8]:(S=s(`flex items-center gap-1.5 text-muted-foreground/70 text-xs`,r),t[7]=r,t[8]=S);let C;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(C=(0,M.jsx)(f,{"aria-hidden":`true`,className:`size-3.5 shrink-0`}),t[9]=C):C=t[9];let w;t[10]===a?w=t[11]:(w=a({id:`j9tqwO`}),t[10]=a,t[11]=w);let T;t[12]===w?T=t[13]:(T=(0,M.jsx)(`span`,{className:`whitespace-nowrap`,children:w}),t[12]=w,t[13]=T);let E;t[14]!==a||t[15]!==h.hiddenFiles||t[16]!==_||t[17]!==o?(E=h.hiddenFiles?(0,M.jsx)(c,{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:()=>_({showHiddenFiles:!0}),"aria-label":a({id:`XcGbim`}),title:a({id:`XcGbim`}),"data-testid":`not-in-sidebar-flip-hidden-files`,children:a({id:`6KCH4m`})}):null,t[14]=a,t[15]=h.hiddenFiles,t[16]=_,t[17]=o,t[18]=E):E=t[18];let D;t[19]!==a||t[20]!==h.onlyMarkdownFiles||t[21]!==_||t[22]!==o?(D=h.onlyMarkdownFiles?(0,M.jsx)(c,{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:()=>_({showOnlyMarkdownFiles:!1}),"aria-label":a({id:`10g8I_`}),title:a({id:`10g8I_`}),"data-testid":`not-in-sidebar-flip-only-markdown`,children:a({id:`5-o4kO`})}):null,t[19]=a,t[20]=h.onlyMarkdownFiles,t[21]=_,t[22]=o,t[23]=D):D=t[23];let k;return t[24]!==D||t[25]!==S||t[26]!==T||t[27]!==E?(k=(0,M.jsxs)(`div`,{"data-testid":`not-in-sidebar-indicator`,className:S,children:[C,T,E,D]}),t[24]=D,t[25]=S,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,O.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,M.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,O.c)(4),n,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,M.jsx)(`title`,{children:`Markdown`}),r=(0,M.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,M.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,O.c)(4),n,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,M.jsx)(`title`,{children:`Textbox`}),r=(0,M.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,M.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,O.c)(48),{isSourceMode:n,onModeChange:a,sourceDisabled:o,wysiwygDisabled:s,wysiwygLabel:c,sourceLabel:f,wysiwygDisabledReason:h}=e,g=o===void 0?!1:o,_=s===void 0?!1:s,{_:v}=i(),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]!==f?(x=f??v({id:`xbdtfY`}),t[3]=v,t[4]=f,t[5]=x):x=t[5];let S=x,C=(0,k.useId)(),w=_&&h?h:null,T=n?`source`:`wysiwyg`,E;t[6]===a?E=t[7]:(E=e=>{e&&a(e)},t[6]=a,t[7]=E);let D;t[8]===v?D=t[9]:(D=v({id:`n7aopT`}),t[8]=v,t[9]=D);let A=w?C:void 0,j;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(j=(0,M.jsx)(U,{className:`size-4`}),t[10]=j):j=t[10];let N;t[11]!==A||t[12]!==_||t[13]!==b?(N=(0,M.jsx)(p,{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]=N):N=t[14];let P;t[15]!==w||t[16]!==C?(P=w?(0,M.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]!==N||t[19]!==P?(F=(0,M.jsx)(l,{asChild:!0,children:(0,M.jsxs)(`div`,{children:[N,P]})}),t[18]=N,t[19]=P,t[20]=F):F=t[20];let I;t[21]!==_||t[22]!==h||t[23]!==c?(I=_&&h?h:c||(0,M.jsx)(r,{id:`Mb_20S`}),t[21]=_,t[22]=h,t[23]=c,t[24]=I):I=t[24];let L;t[25]===I?L=t[26]:(L=(0,M.jsx)(u,{side:`bottom`,children:I}),t[25]=I,t[26]=L);let R;t[27]!==F||t[28]!==L?(R=(0,M.jsxs)(d,{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,M.jsx)(H,{className:`size-4`}),t[30]=z):z=t[30];let B;t[31]!==g||t[32]!==S?(B=(0,M.jsx)(l,{asChild:!0,children:(0,M.jsx)(`div`,{children:(0,M.jsx)(p,{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]!==f?(V=g?(0,M.jsx)(r,{id:`G-JBA1`}):f||(0,M.jsx)(r,{id:`u6Hp4N`}),t[34]=g,t[35]=f,t[36]=V):V=t[36];let W;t[37]===V?W=t[38]:(W=(0,M.jsx)(u,{side:`bottom`,children:V}),t[37]=V,t[38]=W);let G;t[39]!==B||t[40]!==W?(G=(0,M.jsxs)(d,{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]!==E||t[46]!==D?(K=(0,M.jsxs)(m,{type:`single`,value:T,onValueChange:E,"aria-label":D,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]=E,t[46]=D,t[47]=K):K=t[47],K}export{F as a,j as c,R as i,H as n,P as o,z as r,N as s,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"./button-RQ5o7P7w.js";import{a as s,c,i as l,n as u,o as d,r as f,s as p,t as m}from"./dialog-FGMqkFjm.js";import{Eo as h,Fo as g,go as _,vo as v,yo as y}from"./dist-5ovMzVKN2.js";import{t as b}from"./createLucideIcon-DihYAFEK.js";import{t as x}from"./eye-BIA1oECU.js";import{n as S}from"./dist-uN7pEWl0.js";import{d as C}from"./documents-events-BM8xyAJz.js";import"./config-provider-Cb43FIW2.js";import{n as w}from"./config-context-B2fceTMP.js";var T=b(`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=b(`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=b(`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=b(`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=b(`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)(c,{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)(s,{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)(c,{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)(s,{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:y(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:y(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:y(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:y(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=g(e)??`off`,n[0]=e,n[1]=u);let d=u,f=d===`follow`||d===`full`,p;n[2]===e?p=n[3]:(p=h(e),n[2]=e,n[3]=p);let m=p,y;n[4]===e?y=n[5]:(y=v(e),n[4]=e,n[5]=y);let b=y,x;n[6]===e?x=n[7]:(x=_(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]!==b||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:b,toggleMode:C,confirmOpen:o,setConfirmOpen:s,pendingMode:c,strandedCommitCount:P,onToggleActive:D,onModeSelect:k,onConfirm:N},n[23]=f,n[24]=o,n[25]=b,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:s,strandedCommitCount:c}=e,h=s===void 0?`full`:s,g=c===void 0?0:c,_=h===`follow`&&g>0,v;t[0]===h?v=t[1]:(v=(0,F.jsx)(p,{children:(0,F.jsx)(I,{variant:h})}),t[0]=h,t[1]=v);let y;t[2]===h?y=t[3]:(y=(0,F.jsx)(L,{variant:h}),t[2]=h,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)(u,{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)(f,{asChild:!0,children:(0,F.jsx)(o,{variant:`outline`,children:(0,F.jsx)(r,{id:`dEgA5A`})})}),t[10]=S):S=t[10];let C;t[11]===h?C=t[12]:(C=h===`follow`?(0,F.jsx)(r,{id:`U4nTfu`}):(0,F.jsx)(r,{id:`XU0OXn`}),t[11]=h,t[12]=C);let w;t[13]!==a||t[14]!==C?(w=(0,F.jsxs)(d,{children:[S,(0,F.jsx)(o,{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)(l,{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)(m,{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"./button-RQ5o7P7w.js";import{a as s,c,i as l,n as u,o as d,r as f,s as p,t as m}from"./dialog-FGMqkFjm.js";import{Eo as h,Fo as g,go as _,vo as v,yo as y}from"./dist-CrqBb5y32.js";import{t as b}from"./createLucideIcon-DihYAFEK.js";import{t as x}from"./eye-BIA1oECU.js";import{n as S}from"./dist-uN7pEWl0.js";import{d as C}from"./documents-events-CdU1iFH9.js";import"./config-provider-DKj_NBqh.js";import{n as w}from"./config-context-BIynQsCe.js";var T=b(`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=b(`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=b(`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=b(`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=b(`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)(c,{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)(s,{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)(c,{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)(s,{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:y(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:y(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:y(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:y(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=g(e)??`off`,n[0]=e,n[1]=u);let d=u,f=d===`follow`||d===`full`,p;n[2]===e?p=n[3]:(p=h(e),n[2]=e,n[3]=p);let m=p,y;n[4]===e?y=n[5]:(y=v(e),n[4]=e,n[5]=y);let b=y,x;n[6]===e?x=n[7]:(x=_(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]!==b||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:b,toggleMode:C,confirmOpen:o,setConfirmOpen:s,pendingMode:c,strandedCommitCount:P,onToggleActive:D,onModeSelect:k,onConfirm:N},n[23]=f,n[24]=o,n[25]=b,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:s,strandedCommitCount:c}=e,h=s===void 0?`full`:s,g=c===void 0?0:c,_=h===`follow`&&g>0,v;t[0]===h?v=t[1]:(v=(0,F.jsx)(p,{children:(0,F.jsx)(I,{variant:h})}),t[0]=h,t[1]=v);let y;t[2]===h?y=t[3]:(y=(0,F.jsx)(L,{variant:h}),t[2]=h,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)(u,{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)(f,{asChild:!0,children:(0,F.jsx)(o,{variant:`outline`,children:(0,F.jsx)(r,{id:`dEgA5A`})})}),t[10]=S):S=t[10];let C;t[11]===h?C=t[12]:(C=h===`follow`?(0,F.jsx)(r,{id:`U4nTfu`}):(0,F.jsx)(r,{id:`XU0OXn`}),t[11]=h,t[12]=C);let w;t[13]!==a||t[14]!==C?(w=(0,F.jsxs)(d,{children:[S,(0,F.jsx)(o,{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)(l,{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)(m,{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-kaTVsIsC.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{t as l}from"./utils-CPqDy6Hr.js";import{t as u}from"./button-RQ5o7P7w.js";import{i as d,n as f,t as p}from"./tooltip-x7BNUa3s.js";import{n as m,t as h}from"./toggle-group-Cnezoq-B.js";import{V as g,Y as _,_r as v,mt as y,ot as b,st as x}from"./dist-5ovMzVKN2.js";import{t as S}from"./createLucideIcon-DihYAFEK.js";import{t as C}from"./arrow-up-right-CxtRAecj.js";import{i as w,o as T,s as E,t as D}from"./prop-types-BPmLSxhG.js";import{t as ee}from"./triangle-alert-C2yId37R.js";import{t as O}from"./dist-CzC3AWOn.js";import{f as k}from"./doc-paths-BFNbv2er.js";import{d as te}from"./documents-events-BM8xyAJz.js";import{n as ne}from"./external-link-Dvu-nzFi.js";import{t as A}from"./overlay-layers-Bzzqy8A3.js";import{a as re,c as ie,i as ae,n as j,r as oe,s as se,t as ce}from"./panel-Bjv8raTx.js";import{t as le}from"./target-navigation-intent-C6AhTsfc.js";import{t as ue}from"./ordinal-DOdOZcEj.js";import{n as de,t as fe}from"./min-BZE3RIbd.js";import{C as pe,S as M,_ as me,b as he,g as ge,n as N,r as _e,t as ve,v as ye,w as be,x as xe,y as Se}from"./src-D9TuoXKa.js";import{t as Ce}from"./colors-DxV0gzKw.js";import{t as we}from"./isObject-cN229uXS.js";import{n as Te,t as P}from"./now-DrceMm81.js";var Ee=S(`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`}]]),De=S(`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 Oe=e=>()=>e;function ke(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}})}ke.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function Ae(e){return!e.ctrlKey&&!e.button}function je(){return this.parentNode}function Me(e,n){return n??{x:e.x,y:e.y}}function Ne(){return navigator.maxTouchPoints||`ontouchstart`in this}function Pe(){var e=Ae,n=je,r=Me,i=Ne,a={},o=be(`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,Se).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&&(pe(r.view).on(`mousemove.drag`,h,he).on(`mouseup.drag`,g,he),ge(r.view),xe(r),u=!1,c=r.clientX,l=r.clientY,a(`start`,r))}}function h(e){if(ye(e),!u){var n=e.clientX-c,r=e.clientY-l;u=n*n+r*r>f}a.mouse(`drag`,e)}function g(e){pe(e.view).on(`mousemove.drag mouseup.drag`,null),me(e.view,u),ye(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]))&&(xe(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])&&(ye(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])&&(xe(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 ke(`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 ke(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:Oe(!!n),p):e},p.container=function(e){return arguments.length?(n=typeof e==`function`?e:Oe(e),p):n},p.subject=function(e){return arguments.length?(r=typeof e==`function`?e:Oe(e),p):r},p.touchable=function(e){return arguments.length?(i=typeof e==`function`?e:Oe(!!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 Fe(this.cover(n,r),n,r,e)}function Fe(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 Ie(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)Fe(this,s[r],c[r],e[r]);return this}function L(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 Le(){var e=[];return this.visit(function(n){if(!n.length)do e.push(n.data);while(n=n.next)}),e}function Re(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 ze(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 Be(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 Ve(e){for(var n=0,r=e.length;n<r;++n)this.remove(e[n]);return this}function He(){return this._root}function Ue(){var e=0;return this.visit(function(n){if(!n.length)do++e;while(n=n.next)}),e}function We(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 Ge(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 Ke(e){return e[0]}function qe(e){return arguments.length?(this._x=e,this):this._x}function Je(e){return e[1]}function Ye(e){return arguments.length?(this._y=e,this):this._y}function Xe(e,n,r){var i=new Ze(n??Ke,r??Je,NaN,NaN,NaN,NaN);return e==null?i:i.addAll(e)}function Ze(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 Qe(e){for(var n={data:e.data},r=n;e=e.next;)r=r.next={data:e.data};return n}var z=Xe.prototype=Ze.prototype;z.copy=function(){var e=new Ze(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=Qe(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]=Qe(i));return e},z.add=I,z.addAll=Ie,z.cover=L,z.data=Le,z.extent=Re,z.find=ze,z.remove=Be,z.removeAll=Ve,z.root=He,z.size=Ue,z.visit=We,z.visitAfter=Ge,z.x=qe,z.y=Ye;var $e=Ce(`a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928`),B=n(),V=e(r(),1),et=c(),H=`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(H);n=Te(n)||0,we(r)&&(d=!!r.leading,f=`maxWait`in r,o=f?tt(Te(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 U=`Expected a function`;function it(e,n,r){var i=!0,a=!0;if(typeof e!=`function`)throw TypeError(U);return we(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 W={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 lt(e){return W[e]}function ut(e){let n=(0,et.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=lt(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 dt(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 ft(e,n,r){return n=Ct(n),n in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function pt(e,n){return gt(e)||dt(e,n)||vt(e,n)||xt()}function mt(e){return ht(e)||_t(e)||vt(e)||bt()}function ht(e){if(Array.isArray(e))return yt(e)}function gt(e){if(Array.isArray(e))return e}function _t(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function vt(e,n){if(e){if(typeof e==`string`)return yt(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 yt(e,n)}}function yt(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 bt(){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{t as l}from"./utils-CPqDy6Hr.js";import{t as u}from"./button-RQ5o7P7w.js";import{i as d,n as f,t as p}from"./tooltip-x7BNUa3s.js";import{n as m,t as h}from"./toggle-group-Cnezoq-B.js";import{V as g,Y as _,_r as v,mt as y,ot as b,st as x}from"./dist-CrqBb5y32.js";import{t as S}from"./createLucideIcon-DihYAFEK.js";import{t as C}from"./arrow-up-right-CxtRAecj.js";import{i as w,o as T,s as E,t as D}from"./prop-types-DIaGyPZM.js";import{t as ee}from"./triangle-alert-C2yId37R.js";import{t as O}from"./dist-CzC3AWOn.js";import{f as k}from"./doc-paths-CCYuGvJq.js";import{d as te}from"./documents-events-CdU1iFH9.js";import{n as ne}from"./external-link-Dvu-nzFi.js";import{t as A}from"./overlay-layers-Bzzqy8A3.js";import{a as re,c as ie,i as ae,n as j,r as oe,s as se,t as ce}from"./panel-Bjv8raTx.js";import{t as le}from"./target-navigation-intent-D2TXEip5.js";import{t as ue}from"./ordinal-DOdOZcEj.js";import{n as de,t as fe}from"./min-BZE3RIbd.js";import{C as pe,S as M,_ as me,b as he,g as ge,n as N,r as _e,t as ve,v as ye,w as be,x as xe,y as Se}from"./src-D9TuoXKa.js";import{t as Ce}from"./colors-DxV0gzKw.js";import{t as we}from"./isObject-cN229uXS.js";import{n as Te,t as P}from"./now-DrceMm81.js";var Ee=S(`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`}]]),De=S(`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 Oe=e=>()=>e;function ke(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}})}ke.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function Ae(e){return!e.ctrlKey&&!e.button}function je(){return this.parentNode}function Me(e,n){return n??{x:e.x,y:e.y}}function Ne(){return navigator.maxTouchPoints||`ontouchstart`in this}function Pe(){var e=Ae,n=je,r=Me,i=Ne,a={},o=be(`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,Se).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&&(pe(r.view).on(`mousemove.drag`,h,he).on(`mouseup.drag`,g,he),ge(r.view),xe(r),u=!1,c=r.clientX,l=r.clientY,a(`start`,r))}}function h(e){if(ye(e),!u){var n=e.clientX-c,r=e.clientY-l;u=n*n+r*r>f}a.mouse(`drag`,e)}function g(e){pe(e.view).on(`mousemove.drag mouseup.drag`,null),me(e.view,u),ye(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]))&&(xe(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])&&(ye(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])&&(xe(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 ke(`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 ke(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:Oe(!!n),p):e},p.container=function(e){return arguments.length?(n=typeof e==`function`?e:Oe(e),p):n},p.subject=function(e){return arguments.length?(r=typeof e==`function`?e:Oe(e),p):r},p.touchable=function(e){return arguments.length?(i=typeof e==`function`?e:Oe(!!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 Fe(this.cover(n,r),n,r,e)}function Fe(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 Ie(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)Fe(this,s[r],c[r],e[r]);return this}function L(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 Le(){var e=[];return this.visit(function(n){if(!n.length)do e.push(n.data);while(n=n.next)}),e}function Re(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 ze(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 Be(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 Ve(e){for(var n=0,r=e.length;n<r;++n)this.remove(e[n]);return this}function He(){return this._root}function Ue(){var e=0;return this.visit(function(n){if(!n.length)do++e;while(n=n.next)}),e}function We(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 Ge(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 Ke(e){return e[0]}function qe(e){return arguments.length?(this._x=e,this):this._x}function Je(e){return e[1]}function Ye(e){return arguments.length?(this._y=e,this):this._y}function Xe(e,n,r){var i=new Ze(n??Ke,r??Je,NaN,NaN,NaN,NaN);return e==null?i:i.addAll(e)}function Ze(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 Qe(e){for(var n={data:e.data},r=n;e=e.next;)r=r.next={data:e.data};return n}var z=Xe.prototype=Ze.prototype;z.copy=function(){var e=new Ze(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=Qe(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]=Qe(i));return e},z.add=I,z.addAll=Ie,z.cover=L,z.data=Le,z.extent=Re,z.find=ze,z.remove=Be,z.removeAll=Ve,z.root=He,z.size=Ue,z.visit=We,z.visitAfter=Ge,z.x=qe,z.y=Ye;var $e=Ce(`a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928`),B=n(),V=e(r(),1),et=c(),H=`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(H);n=Te(n)||0,we(r)&&(d=!!r.leading,f=`maxWait`in r,o=f?tt(Te(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 U=`Expected a function`;function it(e,n,r){var i=!0,a=!0;if(typeof e!=`function`)throw TypeError(U);return we(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 W={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 lt(e){return W[e]}function ut(e){let n=(0,et.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=lt(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 dt(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 ft(e,n,r){return n=Ct(n),n in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function pt(e,n){return gt(e)||dt(e,n)||vt(e,n)||xt()}function mt(e){return ht(e)||_t(e)||vt(e)||bt()}function ht(e){if(Array.isArray(e))return yt(e)}function gt(e){if(Array.isArray(e))return e}function _t(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function vt(e,n){if(e){if(typeof e==`string`)return yt(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 yt(e,n)}}function yt(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 bt(){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 xt(){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 St(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 Ct(e){var n=St(e,`string`);return typeof n==`symbol`?n:String(n)}var wt=function(e,n){var r=new Set(n);return Object.assign.apply(Object,[{}].concat(mt(Object.entries(e).filter(function(e){var n=pt(e,1)[0];return!r.has(n)}).map(function(e){var n=pt(e,2),r=n[0],i=n[1];return ft({},r,i)}))))};function Tt(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]]))),[]);Et(()=>{l(r(c.current))},V.useLayoutEffect),Et(()=>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(wt(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 Et(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 Dt=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-Dt.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?Dt.Bounce.In(e*2)*.5:Dt.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}}}}),Ot=function(){return performance.now()},kt=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=Ot()),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}(),At={Linear:function(e,n){var r=e.length-1,i=r*n,a=Math.floor(i),o=At.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=At.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=At.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=At.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}}},jt=function(){function e(){}return e.nextId=function(){return e._nextId++},e._nextId=0,e}(),Mt=new kt,Nt=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=Dt.Linear.None,this._interpolationFunction=At.Linear,this._chainedTweens=[],this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._id=jt.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=Mt,Mt.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=Ot()),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=Ot()),this._isPaused||!this._isPlaying?this:(this._isPaused=!0,this._pauseStart=e,this)},e.prototype.resume=function(e){return e===void 0&&(e=Ot()),!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=Dt.Linear.None),this._easingFunction=e,this},e.prototype.interpolation=function(e){return e===void 0&&(e=At.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=Ot()),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}();jt.nextId;var Pt=Mt;Pt.getAll.bind(Pt),Pt.removeAll.bind(Pt),Pt.add.bind(Pt),Pt.remove.bind(Pt),Pt.update.bind(Pt);function Ft(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 It(e){if(Array.isArray(e))return e}function Lt(e,n){if(!(e instanceof n))throw TypeError(`Cannot call a class as a function`)}function Rt(e,n,r){return Object.defineProperty(e,`prototype`,{writable:!1}),e}function zt(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 Bt(){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 Vt(e,n){return It(e)||zt(e,n)||Ht(e,n)||Bt()}function Ht(e,n){if(e){if(typeof e==`string`)return Ft(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)?Ft(e,n):void 0}}var Ut=Rt(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;Lt(this,e),this.name=n,this.defaultVal=a,this.triggerUpdate=s,this.onChange=l});function Wt(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 Ut(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=Vt(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 Gt(e){"@babel/helpers - typeof";return Gt=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},Gt(e)}var Kt=/^\s+/,qt=/\s+$/;function K(e,n){if(e||=``,n||={},e instanceof K)return e;if(!(this instanceof K))return new K(e,n);var r=Jt(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=yn(e),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var e=Qt(this._r,this._g,this._b);return{h:e.h*360,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=Qt(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=Xt(this._r,this._g,this._b);return{h:e.h*360,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=Xt(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 en(this._r,this._g,this._b,e)},toHexString:function(e){return`#`+this.toHex(e)},toHex8:function(e){return tn(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:_n[en(this._r,this._g,this._b,!0)]||!1},toFilter:function(e){var n=`#`+nn(this._r,this._g,this._b,this._a),r=n,i=this._gradientType?`GradientType = 1, `:``;if(e){var a=K(e);r=`#`+nn(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(sn,arguments)},brighten:function(){return this._applyModification(cn,arguments)},darken:function(){return this._applyModification(ln,arguments)},desaturate:function(){return this._applyModification(rn,arguments)},saturate:function(){return this._applyModification(an,arguments)},greyscale:function(){return this._applyModification(on,arguments)},spin:function(){return this._applyModification(un,arguments)},_applyCombination:function(e,n){return e.apply(null,[this].concat([].slice.call(n)))},analogous:function(){return this._applyCombination(mn,arguments)},complement:function(){return this._applyCombination(dn,arguments)},monochromatic:function(){return this._applyCombination(hn,arguments)},splitcomplement:function(){return this._applyCombination(pn,arguments)},triad:function(){return this._applyCombination(fn,[3])},tetrad:function(){return this._applyCombination(fn,[4])}},K.fromRatio=function(e,n){if(Gt(e)==`object`){var r={};for(var i in e)e.hasOwnProperty(i)&&(i===`a`?r[i]=e[i]:r[i]=Tn(e[i]));e=r}return K(e,n)};function Jt(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=An(e)),Gt(e)==`object`&&(kn(e.r)&&kn(e.g)&&kn(e.b)?(n=Yt(e.r,e.g,e.b),s=!0,c=String(e.r).substr(-1)===`%`?`prgb`:`rgb`):kn(e.h)&&kn(e.s)&&kn(e.v)?(i=Tn(e.s),a=Tn(e.v),n=$t(e.h,i,a),s=!0,c=`hsv`):kn(e.h)&&kn(e.s)&&kn(e.l)&&(i=Tn(e.s),o=Tn(e.l),n=Zt(e.h,i,o),s=!0,c=`hsl`),e.hasOwnProperty(`a`)&&(r=e.a)),r=yn(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 Yt(e,n,r){return{r:q(e,255)*255,g:q(n,255)*255,b:q(r,255)*255}}function Xt(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 Zt(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 Qt(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 $t(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 en(e,n,r,i){var a=[wn(Math.round(e).toString(16)),wn(Math.round(n).toString(16)),wn(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 tn(e,n,r,i,a){var o=[wn(Math.round(e).toString(16)),wn(Math.round(n).toString(16)),wn(Math.round(r).toString(16)),wn(En(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 nn(e,n,r,i){return[wn(En(i)),wn(Math.round(e).toString(16)),wn(Math.round(n).toString(16)),wn(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 rn(e,n){n=n===0?0:n||10;var r=K(e).toHsl();return r.s-=n/100,r.s=bn(r.s),K(r)}function an(e,n){n=n===0?0:n||10;var r=K(e).toHsl();return r.s+=n/100,r.s=bn(r.s),K(r)}function on(e){return K(e).desaturate(100)}function sn(e,n){n=n===0?0:n||10;var r=K(e).toHsl();return r.l+=n/100,r.l=bn(r.l),K(r)}function cn(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 ln(e,n){n=n===0?0:n||10;var r=K(e).toHsl();return r.l-=n/100,r.l=bn(r.l),K(r)}function un(e,n){var r=K(e).toHsl(),i=(r.h+n)%360;return r.h=i<0?360+i:i,K(r)}function dn(e){var n=K(e).toHsl();return n.h=(n.h+180)%360,K(n)}function fn(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 pn(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 mn(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 hn(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=jn(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 gn=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`},_n=K.hexNames=vn(gn);function vn(e){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[e[r]]=r);return n}function yn(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function q(e,n){Sn(e)&&(e=`100%`);var r=Cn(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 bn(e){return Math.min(1,Math.max(0,e))}function xn(e){return parseInt(e,16)}function Sn(e){return typeof e==`string`&&e.indexOf(`.`)!=-1&&parseFloat(e)===1}function Cn(e){return typeof e==`string`&&e.indexOf(`%`)!=-1}function wn(e){return e.length==1?`0`+e:``+e}function Tn(e){return e<=1&&(e=e*100+`%`),e}function En(e){return Math.round(parseFloat(e)*255).toString(16)}function Dn(e){return xn(e)/255}var On=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 kn(e){return!!On.CSS_UNIT.exec(e)}function An(e){e=e.replace(Kt,``).replace(qt,``).toLowerCase();var n=!1;if(gn[e])e=gn[e],n=!0;else if(e==`transparent`)return{r:0,g:0,b:0,a:0,format:`name`};var r;return(r=On.rgb.exec(e))?{r:r[1],g:r[2],b:r[3]}:(r=On.rgba.exec(e))?{r:r[1],g:r[2],b:r[3],a:r[4]}:(r=On.hsl.exec(e))?{h:r[1],s:r[2],l:r[3]}:(r=On.hsla.exec(e))?{h:r[1],s:r[2],l:r[3],a:r[4]}:(r=On.hsv.exec(e))?{h:r[1],s:r[2],v:r[3]}:(r=On.hsva.exec(e))?{h:r[1],s:r[2],v:r[3],a:r[4]}:(r=On.hex8.exec(e))?{r:xn(r[1]),g:xn(r[2]),b:xn(r[3]),a:Dn(r[4]),format:n?`name`:`hex8`}:(r=On.hex6.exec(e))?{r:xn(r[1]),g:xn(r[2]),b:xn(r[3]),format:n?`name`:`hex`}:(r=On.hex4.exec(e))?{r:xn(r[1]+``+r[1]),g:xn(r[2]+``+r[2]),b:xn(r[3]+``+r[3]),a:Dn(r[4]+``+r[4]),format:n?`name`:`hex8`}:(r=On.hex3.exec(e))?{r:xn(r[1]+``+r[1]),g:xn(r[2]+``+r[2]),b:xn(r[3]+``+r[3]),format:n?`name`:`hex`}:!1}function jn(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 Mn(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 Nn(e){if(Array.isArray(e))return Mn(e)}function Pn(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 Fn(e,n){if(n.has(e))throw TypeError(`Cannot initialize the same private elements twice on an object`)}function In(e,n){if(!(e instanceof n))throw TypeError(`Cannot call a class as a function`)}function Ln(e,n){return e.get(Pn(e,n))}function Rn(e,n,r){Fn(e,n),n.set(e,r)}function zn(e,n,r){return e.set(Pn(e,n),r),r}function Bn(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,Kn(i.key),i)}}function Vn(e,n,r){return n&&Bn(e.prototype,n),Object.defineProperty(e,`prototype`,{writable:!1}),e}function Hn(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function Un(){throw TypeError(`Invalid attempt to spread non-iterable instance.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./jsx-runtime-BUgB2tll.js";import{yn as n}from"./DocumentContext-DD95gIt4.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"./compiler-runtime-BfE3aGVn.js";import{t as s}from"./utils-CPqDy6Hr.js";import{t as c}from"./button-RQ5o7P7w.js";import{a as l,c as ee,i as u,n as d,o as f,s as p,t as m}from"./dialog-FGMqkFjm.js";import{t as h}from"./label-G0lbYOgL.js";import{a as g,i as _,n as v,o as y,r as b,s as x,t as te}from"./select-BUOcREjn.js";import{n as S,t as ne}from"./radio-group-MAC3jHHk.js";import{i as C,n as w,r as T,t as re}from"./tabs-BKX_R3ed.js";import{t as E}from"./createLucideIcon-DihYAFEK.js";import{t as ie}from"./git-branch-le6ClqcQ.js";import{t as ae}from"./folder-DcWlgZbb.js";import{t as oe}from"./loader-circle-DJ1nzSAL.js";import{n as se,r as D,t as O}from"./use-skill-directory-CSx9txvQ.js";import{n as k}from"./dist-uN7pEWl0.js";import{t as A}from"./input-Cm94Cun3.js";import{t as j}from"./dist-CzC3AWOn.js";import{d as ce,t as le}from"./skill-scope-DwJ84s_r.js";import{E as ue,k as de,r as fe,u as M}from"./skills-api-BTy9LAk0.js";import{t as N}from"./skeleton-Zj40UZU5.js";import{n as pe,r as P,t as me}from"./input-group-cP5PCk_d.js";var F=E(`file-archive`,[[`path`,{d:`M13.659 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v11.5`,key:`4pqfef`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M8 12v-1`,key:`1ej8lb`}],[`path`,{d:`M8 18v-2`,key:`qcmpov`}],[`path`,{d:`M8 7V6`,key:`1nbb54`}],[`circle`,{cx:`8`,cy:`20`,r:`2`,key:`ckkr5m`}]]),he=o(),I=e(r(),1),L=t(),ge=[`s1`,`s2`,`s3`,`s4`,`s5`,`s6`,`s7`,`s8`],_e=[{label:{id:`f8fH8W`},query:`design`},{label:{id:`-ySLQJ`},query:`git`},{label:{id:`qIJIrD`},query:`test`},{label:{id:`8Uv5e6`},query:`agent`},{label:{id:`UDb2YD`},query:`react`},{label:{id:`TbjyhA`},query:`docs`},{label:{id:`9wQrUU`},query:`refactor`},{label:{id:`HKH-W-`},query:`data`},{label:{id:`43qzxu`},query:`devops`},{label:{id:`a3LDKx`},query:`security`}];function R(e){let t=(0,he.c)(57),{scope:r,onNavigate:o}=e,{_:s}=a(),l;t[0]!==o||t[1]!==r?(l={scope:r,onNavigate:o},t[0]=o,t[1]=r,t[2]=l):l=t[2];let{importedEntry:ee,openResult:u}=O(l),[d,f]=(0,I.useState)(``),p;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(p=[],t[3]=p):p=t[3];let[m,h]=(0,I.useState)(p),[S,ne]=(0,I.useState)(!1),[C,w]=(0,I.useState)(`idle`),[T,re]=(0,I.useState)(`relevance`),{skills:E}=se(),ie,ae;t[4]===d?(ie=t[5],ae=t[6]):(ie=()=>{let e=d.trim();if(e.length<2){h([]),w(`idle`);return}let t=!1;w(`searching`);let n=setTimeout(()=>{ue(e).then(e=>{if(!t){if(!e.ok){w(`error`),h([]),ne(!1);return}h(e.results),ne(e.degraded),w(`idle`)}})},300);return()=>{t=!0,clearTimeout(n)}},ae=[d],t[4]=d,t[5]=ie,t[6]=ae),(0,I.useEffect)(ie,ae);let oe;t[7]===d?oe=t[8]:(oe=d.trim(),t[7]=d,t[8]=oe);let k=oe,A;t[9]!==m||t[10]!==T?(A=T===`installs`?[...m].sort(ye):m,t[9]=m,t[10]=T,t[11]=A):A=t[11];let j=A,ce;t[12]!==ee||t[13]!==u?(ce=e=>(0,L.jsx)(D,{result:e,imported:ee(e),onOpen:()=>u(e)},e.id),t[12]=ee,t[13]=u,t[14]=ce):ce=t[14];let le=ce,de;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(de=(0,L.jsx)(pe,{align:`inline-start`,children:(0,L.jsx)(n,{"aria-hidden":`true`})}),t[15]=de):de=t[15];let fe;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(fe=e=>f(e.target.value),t[16]=fe):fe=t[16];let M;t[17]===s?M=t[18]:(M=s({id:`BlLxpG`}),t[17]=s,t[18]=M);let N;t[19]===s?N=t[20]:(N=s({id:`BlLxpG`}),t[19]=s,t[20]=N);let F;t[21]!==d||t[22]!==M||t[23]!==N?(F=(0,L.jsxs)(me,{className:`h-9 flex-1`,children:[de,(0,L.jsx)(P,{value:d,onChange:fe,placeholder:M,"aria-label":N})]}),t[21]=d,t[22]=M,t[23]=N,t[24]=F):F=t[24];let R;t[25]!==s||t[26]!==k.length||t[27]!==m||t[28]!==T||t[29]!==C?(R=k.length>=2&&C===`idle`&&m.length>0?(0,L.jsxs)(te,{value:T,onValueChange:e=>re(e),children:[(0,L.jsx)(y,{className:`h-9! w-40 shrink-0`,"aria-label":s({id:`eUFXS1`}),children:(0,L.jsx)(x,{})}),(0,L.jsx)(v,{children:(0,L.jsxs)(b,{children:[(0,L.jsx)(g,{children:s({id:`_HgF9q`})}),(0,L.jsx)(_,{value:`relevance`,children:s({id:`7dZnmw`})}),(0,L.jsx)(_,{value:`installs`,children:s({id:`tc65fD`})})]})})]}):null,t[25]=s,t[26]=k.length,t[27]=m,t[28]=T,t[29]=C,t[30]=R):R=t[30];let z;t[31]!==F||t[32]!==R?(z=(0,L.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2`,children:[F,R]}),t[31]=F,t[32]=R,t[33]=z):z=t[33];let B;t[34]!==s||t[35]!==d?(B=_e.map(e=>{let t=d.trim().split(/\s+/).filter(Boolean),n=t.includes(e.query);return(0,L.jsx)(c,{variant:n?`secondary`:`outline`,size:`sm`,"aria-pressed":n,className:`h-6 shrink-0 rounded-full data-[active=true]:border-foreground/30`,"data-active":n,onClick:()=>f((n?t.filter(t=>t!==e.query):[...t,e.query]).join(` `)),children:s(e.label)},e.query)}),t[34]=s,t[35]=d,t[36]=B):B=t[36];let V;t[37]===B?V=t[38]:(V=(0,L.jsx)(`div`,{className:`flex shrink-0 gap-2 overflow-x-auto scroll-fade-mask-x [scrollbar-width:none]`,children:B}),t[37]=B,t[38]=V);let H;t[39]!==S||t[40]!==k.length?(H=S&&k.length>=2?(0,L.jsx)(`p`,{className:`text-[11px] text-muted-foreground`,children:(0,L.jsx)(i,{id:`MBKkUy`})}):null,t[39]=S,t[40]=k.length,t[41]=H):H=t[41];let U;t[42]!==E||t[43]!==k.length||t[44]!==le||t[45]!==m||t[46]!==j||t[47]!==C?(U=k.length<2?E.length>0?(0,L.jsxs)(`div`,{className:`space-y-2`,children:[(0,L.jsx)(`h3`,{className:`font-mono text-2xs uppercase tracking-wider text-muted-foreground`,children:(0,L.jsx)(i,{id:`gL_sdV`})}),(0,L.jsx)(`ul`,{className:`grid grid-cols-1 gap-2.5 sm:grid-cols-2`,children:E.map(le)})]}):null:C===`searching`?(0,L.jsxs)(`div`,{"aria-busy":`true`,children:[(0,L.jsx)(`span`,{className:`sr-only`,children:(0,L.jsx)(i,{id:`WRNXKp`})}),(0,L.jsx)(`ul`,{className:`grid grid-cols-1 gap-2.5 sm:grid-cols-2`,"aria-hidden":!0,children:ge.map(ve)})]}):C===`error`?(0,L.jsx)(`p`,{className:`text-sm text-destructive`,children:(0,L.jsx)(i,{id:`yg_6wQ`})}):m.length===0?(0,L.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:(0,L.jsx)(i,{id:`8t9T3-`})}):(0,L.jsx)(`ul`,{className:`grid grid-cols-1 gap-2.5 sm:grid-cols-2`,children:j.map(le)}),t[42]=E,t[43]=k.length,t[44]=le,t[45]=m,t[46]=j,t[47]=C,t[48]=U):U=t[48];let W;t[49]===U?W=t[50]:(W=(0,L.jsx)(`div`,{className:`min-h-0 flex-1 overflow-auto subtle-scrollbar scroll-fade-mask`,children:U}),t[49]=U,t[50]=W);let G;t[51]===Symbol.for(`react.memo_cache_sentinel`)?(G=(0,L.jsx)(`p`,{className:`-mb-3.5 shrink-0 text-center text-[11px] text-muted-foreground/80`,children:(0,L.jsx)(i,{id:`fg1U4e`,components:{0:(0,L.jsx)(`a`,{href:`https://skills.sh`,target:`_blank`,rel:`noreferrer`,className:`underline hover:text-foreground`})}})}),t[51]=G):G=t[51];let K;return t[52]!==z||t[53]!==V||t[54]!==H||t[55]!==W?(K=(0,L.jsxs)(`div`,{className:`flex h-full min-h-0 flex-col gap-3`,children:[z,V,H,W,G]}),t[52]=z,t[53]=V,t[54]=H,t[55]=W,t[56]=K):K=t[56],K}function ve(e){return(0,L.jsx)(N,{className:`h-[72px] rounded-xl`},e)}function ye(e,t){return(t.installs??-1)-(e.installs??-1)}function z(e,t){t.alreadyImported?k.success(e===`upload`?j._({id:`tA2-xC`,values:{0:t.name}}):j._({id:`8AjnFz`,values:{0:t.name}})):t.collisionRenamedFrom?k.success(e===`upload`?j._({id:`EPGePE`,values:{0:t.name,1:t.collisionRenamedFrom}}):j._({id:`C0Ciaj`,values:{0:t.name,1:t.collisionRenamedFrom}})):k.success(e===`upload`?j._({id:`Pg83C9`,values:{0:t.name}}):j._({id:`qFKsNl`,values:{0:t.name}}));for(let e of t.warnings??[])k.warning(e)}var B=`flex items-start justify-between gap-3 rounded-md border p-3 text-sm font-normal transition-colors cursor-pointer`;function V(e){let t=(0,he.c)(122),{defaultScope:n,onOpenChange:r,onImported:o}=e,{_:l}=a(),ee=(0,I.useId)(),u=(0,I.useId)(),p=(0,I.useId)(),m=(0,I.useId)(),g=(0,I.useId)(),b=ce(),[C,w]=(0,I.useState)(n),[T,re]=(0,I.useState)(`remote`),[E,se]=(0,I.useState)(``),[D,O]=(0,I.useState)(``),[j,ue]=(0,I.useState)(null),[N,pe]=(0,I.useState)(!1),[P,me]=(0,I.useState)(null),[ge,_e]=(0,I.useState)(!1),[R,ve]=(0,I.useState)(!1),ye=(0,I.useRef)(null),V,G;t[0]===T?(V=t[1],G=t[2]):(V=()=>{let e=ye.current;e&&(T===`folder`?(e.setAttribute(`webkitdirectory`,``),e.setAttribute(`directory`,``)):(e.removeAttribute(`webkitdirectory`),e.removeAttribute(`directory`)))},G=[T],t[0]=T,t[1]=V,t[2]=G),(0,I.useEffect)(V,G);let K;t[3]===E?K=t[4]:(K=E.trim(),t[3]=E,t[4]=K);let q=K,J=T===`zip`||T===`folder`,be=j?.[0]?.webkitRelativePath?.split(`/`)[0]??``,xe,Se;t[5]!==J||t[6]!==q?(xe=()=>{if(J||q===``){me(null),_e(!1),ve(!1),O(``);return}let e=!1,t=new AbortController;_e(!0),ve(!1);let n=setTimeout(()=>{fe(q,t.signal).then(t=>{if(!e){if(_e(!1),!t.ok){me(null),O(``),ve(!0);return}ve(!1),me(t.skills),O(t.skills.length>1?t.skills[0].name:``)}})},500);return()=>{e=!0,t.abort(),clearTimeout(n)}},Se=[q,J],t[5]=J,t[6]=q,t[7]=xe,t[8]=Se):(xe=t[7],Se=t[8]),(0,I.useEffect)(xe,Se);let Ce=!N&&(J?j!==null&&j.length>0:q!==``),we;t[9]!==l||t[10]!==Ce||t[11]!==j||t[12]!==J||t[13]!==o||t[14]!==r||t[15]!==C||t[16]!==D||t[17]!==T||t[18]!==q?(we=async function(){if(!Ce)return;if(pe(!0),J&&j!==null){let e=new FormData;if(T===`zip`)e.append(`file`,j[0]);else for(let t of Array.from(j))e.append(`files`,t,t.webkitRelativePath||t.name);let t=await de(e,C);if(pe(!1),!t.ok){k.error(l({id:`Z8nach`,values:{0:t.error}}));return}z(`upload`,t),o({scope:C,name:t.name}),r(!1);return}let e=await M({source:q,...D.trim()===``?{}:{skill:D.trim()},scope:C});if(pe(!1),!e.ok){if(e.skills&&e.skills.length>1){me(e.skills.map(W)),O(e.skills[0]),k.info(l({id:`iYUTsI`}));return}k.error(l({id:`kfL8BJ`,values:{0:e.error}}));return}z(`import`,e),o({scope:C,name:e.name}),r(!1)},t[9]=l,t[10]=Ce,t[11]=j,t[12]=J,t[13]=o,t[14]=r,t[15]=C,t[16]=D,t[17]=T,t[18]=q,t[19]=we):we=t[19];let Te=we,Ee=d,De;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(De=(0,L.jsx)(i,{id:`aBgwis`}),t[20]=De):De=t[20];let Y;t[21]===m?Y=t[22]:(Y=(0,L.jsx)(h,{htmlFor:m,children:De}),t[21]=m,t[22]=Y);let Oe;t[23]===Symbol.for(`react.memo_cache_sentinel`)?(Oe=e=>w(e),t[23]=Oe):Oe=t[23];let ke;t[24]===Symbol.for(`react.memo_cache_sentinel`)?(ke=(0,L.jsx)(x,{}),t[24]=ke):ke=t[24];let X;t[25]===m?X=t[26]:(X=(0,L.jsx)(y,{id:m,className:`w-full`,children:ke}),t[25]=m,t[26]=X);let Z;t[27]===b?Z=t[28]:(Z=le.map(e=>(0,L.jsx)(_,{value:e,children:b[e]},e)),t[27]=b,t[28]=Z);let Ae;t[29]===Z?Ae=t[30]:(Ae=(0,L.jsx)(v,{children:Z}),t[29]=Z,t[30]=Ae);let je;t[31]!==C||t[32]!==X||t[33]!==Ae?(je=(0,L.jsxs)(te,{value:C,onValueChange:Oe,children:[X,Ae]}),t[31]=C,t[32]=X,t[33]=Ae,t[34]=je):je=t[34];let Me;t[35]!==je||t[36]!==Y?(Me=(0,L.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[Y,je]}),t[35]=je,t[36]=Y,t[37]=Me):Me=t[37];let Ne;t[38]===Symbol.for(`react.memo_cache_sentinel`)?(Ne=(0,L.jsx)(i,{id:`wdxz7K`}),t[38]=Ne):Ne=t[38];let Pe;t[39]===u?Pe=t[40]:(Pe=(0,L.jsx)(h,{id:u,children:Ne}),t[39]=u,t[40]=Pe);let Fe;t[41]===Symbol.for(`react.memo_cache_sentinel`)?(Fe=e=>{re(e),ue(null)},t[41]=Fe):Fe=t[41];let Ie=`${u}-remote`,Le=T===`remote`?`border-primary bg-primary/5`:`border-border hover:bg-muted/40`,Re;t[42]===Le?Re=t[43]:(Re=s(B,Le),t[42]=Le,t[43]=Re);let ze;t[44]===Symbol.for(`react.memo_cache_sentinel`)?(ze=(0,L.jsxs)(`span`,{className:`flex items-center gap-2 font-medium`,children:[(0,L.jsx)(ie,{className:`size-4 shrink-0 text-muted-foreground`,"aria-hidden":`true`}),(0,L.jsx)(i,{id:`qlAIQ1`})]}),t[44]=ze):ze=t[44];let Be;t[45]===Symbol.for(`react.memo_cache_sentinel`)?(Be=(0,L.jsxs)(`span`,{className:`flex flex-col gap-0.5`,children:[ze,(0,L.jsx)(`span`,{className:`text-1sm text-muted-foreground`,children:(0,L.jsx)(i,{id:`9m4D_h`})})]}),t[45]=Be):Be=t[45];let Ve=`${u}-remote`,He;t[46]===Ve?He=t[47]:(He=(0,L.jsx)(S,{id:Ve,value:`remote`,className:`mt-0.5`}),t[46]=Ve,t[47]=He);let Ue;t[48]!==Ie||t[49]!==Re||t[50]!==He?(Ue=(0,L.jsxs)(h,{htmlFor:Ie,className:Re,children:[Be,He]}),t[48]=Ie,t[49]=Re,t[50]=He,t[51]=Ue):Ue=t[51];let We=`${u}-zip`,Ge=T===`zip`?`border-primary bg-primary/5`:`border-border hover:bg-muted/40`,Ke;t[52]===Ge?Ke=t[53]:(Ke=s(B,Ge),t[52]=Ge,t[53]=Ke);let qe;t[54]===Symbol.for(`react.memo_cache_sentinel`)?(qe=(0,L.jsxs)(`span`,{className:`flex items-center gap-2 font-medium`,children:[(0,L.jsx)(F,{className:`size-4 shrink-0 text-muted-foreground`,"aria-hidden":`true`}),(0,L.jsx)(i,{id:`Fr8JGg`})]}),t[54]=qe):qe=t[54];let Je;t[55]===Symbol.for(`react.memo_cache_sentinel`)?(Je=(0,L.jsxs)(`span`,{className:`flex flex-col gap-0.5`,children:[qe,(0,L.jsx)(`span`,{className:`text-1sm text-muted-foreground`,children:(0,L.jsx)(i,{id:`hQjvzi`})})]}),t[55]=Je):Je=t[55];let Ye=`${u}-zip`,Xe;t[56]===Ye?Xe=t[57]:(Xe=(0,L.jsx)(S,{id:Ye,value:`zip`,className:`mt-0.5`}),t[56]=Ye,t[57]=Xe);let Ze;t[58]!==We||t[59]!==Ke||t[60]!==Xe?(Ze=(0,L.jsxs)(h,{htmlFor:We,className:Ke,children:[Je,Xe]}),t[58]=We,t[59]=Ke,t[60]=Xe,t[61]=Ze):Ze=t[61];let Qe=`${u}-folder`,$e=T===`folder`?`border-primary bg-primary/5`:`border-border hover:bg-muted/40`,et;t[62]===$e?et=t[63]:(et=s(B,$e),t[62]=$e,t[63]=et);let tt;t[64]===Symbol.for(`react.memo_cache_sentinel`)?(tt=(0,L.jsxs)(`span`,{className:`flex items-center gap-2 font-medium`,children:[(0,L.jsx)(ae,{className:`size-4 shrink-0 text-muted-foreground`,"aria-hidden":`true`}),(0,L.jsx)(i,{id:`kNqMMd`})]}),t[64]=tt):tt=t[64];let nt;t[65]===Symbol.for(`react.memo_cache_sentinel`)?(nt=(0,L.jsxs)(`span`,{className:`flex flex-col gap-0.5`,children:[tt,(0,L.jsx)(`span`,{className:`text-1sm text-muted-foreground`,children:(0,L.jsx)(i,{id:`UPWItY`})})]}),t[65]=nt):nt=t[65];let rt=`${u}-folder`,it;t[66]===rt?it=t[67]:(it=(0,L.jsx)(S,{id:rt,value:`folder`,className:`mt-0.5`}),t[66]=rt,t[67]=it);let at;t[68]!==Qe||t[69]!==et||t[70]!==it?(at=(0,L.jsxs)(h,{htmlFor:Qe,className:et,children:[nt,it]}),t[68]=Qe,t[69]=et,t[70]=it,t[71]=at):at=t[71];let ot;t[72]!==T||t[73]!==u||t[74]!==Ue||t[75]!==Ze||t[76]!==at?(ot=(0,L.jsxs)(ne,{value:T,onValueChange:Fe,"aria-labelledby":u,className:`grid-cols-1 gap-2 sm:grid-cols-3 mb-2`,children:[Ue,Ze,at]}),t[72]=T,t[73]=u,t[74]=Ue,t[75]=Ze,t[76]=at,t[77]=ot):ot=t[77];let st=J?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(A,{ref:ye,id:g,"aria-label":l(T===`zip`?{id:`wErce0`}:{id:`VJaBca`}),type:`file`,"data-testid":`skill-upload-input`,accept:T===`zip`?`.zip,.skill`:void 0,onChange:e=>ue(e.target.files),className:`sr-only`},T),(0,L.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,L.jsx)(c,{type:`button`,variant:`outline`,size:`sm`,onClick:()=>ye.current?.click(),children:T===`zip`?(0,L.jsx)(i,{id:`-yPBXI`}):(0,L.jsx)(i,{id:`TgZOXj`})}),(0,L.jsx)(`span`,{className:`truncate text-sm text-muted-foreground`,"data-testid":`skill-upload-filename`,children:j&&j.length>0?T===`folder`?j.length===1?l({id:`BGtzlf`,values:{uploadFolderName:be}}):l({id:`K7NMEc`,values:{0:j.length,uploadFolderName:be}}):j[0].name:(0,L.jsx)(i,{id:`hqCwRf`})})]})]}):(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(A,{id:ee,"aria-label":l({id:`cLP0Lf`}),"data-testid":`skill-import-source-input`,value:E,onChange:e=>se(e.target.value),onKeyDown:e=>{e.key===`Enter`&&Te()},placeholder:l({id:`gv5w9J`}),className:`font-mono`}),ge||R||P&&P.length===1?(0,L.jsx)(`p`,{className:`text-1sm text-muted-foreground`,children:ge?(0,L.jsx)(i,{id:`K4G55s`}):R?(0,L.jsx)(i,{id:`XgqUOy`}):P&&P.length===1?(0,L.jsx)(i,{id:`WpE38V`,values:{0:P[0].name}}):null}):null]}),ct;t[78]!==Pe||t[79]!==ot||t[80]!==st?(ct=(0,L.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[Pe,ot,st]}),t[78]=Pe,t[79]=ot,t[80]=st,t[81]=ct):ct=t[81];let lt;t[82]!==P||t[83]!==J||t[84]!==D||t[85]!==p?(lt=!J&&P&&P.length>1?(0,L.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,L.jsx)(h,{htmlFor:p,children:(0,L.jsx)(i,{id:`FCMaBz`})}),(0,L.jsxs)(te,{value:D,onValueChange:O,children:[(0,L.jsx)(y,{id:p,size:`sm`,className:`w-full`,"data-testid":`skill-import-pick`,children:(0,L.jsx)(x,{})}),(0,L.jsx)(v,{children:P.map(U)})]}),(0,L.jsx)(`p`,{className:`text-1sm text-muted-foreground`,children:(0,L.jsx)(i,{id:`xtJgSe`})})]}):null,t[82]=P,t[83]=J,t[84]=D,t[85]=p,t[86]=lt):lt=t[86];let ut;t[87]===Symbol.for(`react.memo_cache_sentinel`)?(ut=(0,L.jsx)(`p`,{className:`font-medium text-xs font-mono text-muted-foreground/80 uppercase tracking-wider`,children:(0,L.jsx)(i,{id:`DWJtEo`})}),t[87]=ut):ut=t[87];let dt;t[88]===C?dt=t[89]:(dt=(0,L.jsx)(`li`,{children:C===`project`?(0,L.jsx)(i,{id:`rucNcu`,components:{0:(0,L.jsx)(`code`,{className:`rounded bg-muted px-1 py-0.5 font-mono text-[0.9em] text-foreground/80`})}}):(0,L.jsx)(i,{id:`vjW-SM`,components:{0:(0,L.jsx)(`code`,{className:`rounded bg-muted px-1 py-0.5 font-mono text-[0.9em] text-foreground/80`})}})}),t[88]=C,t[89]=dt);let ft,pt;t[90]===Symbol.for(`react.memo_cache_sentinel`)?(ft=(0,L.jsx)(`li`,{children:(0,L.jsx)(i,{id:`tqQBwN`})}),pt=(0,L.jsx)(`li`,{children:(0,L.jsx)(i,{id:`QB-moX`})}),t[90]=ft,t[91]=pt):(ft=t[90],pt=t[91]);let Q;t[92]===dt?Q=t[93]:(Q=(0,L.jsxs)(`div`,{role:`note`,className:`space-y-3`,"data-testid":`skill-import-disclosure`,children:[ut,(0,L.jsxs)(`ul`,{className:`list-disc space-y-2.5 pl-4 text-sm text-muted-foreground marker:text-muted-foreground/50`,children:[dt,ft,pt]})]}),t[92]=dt,t[93]=Q);let mt;t[94]!==Ee||t[95]!==Me||t[96]!==ct||t[97]!==lt||t[98]!==Q?(mt=(0,L.jsxs)(Ee,{className:`flex flex-col gap-6`,children:[Me,ct,lt,Q]}),t[94]=Ee,t[95]=Me,t[96]=ct,t[97]=lt,t[98]=Q,t[99]=mt):mt=t[99];let ht;t[100]===r?ht=t[101]:(ht=()=>r(!1),t[100]=r,t[101]=ht);let gt;t[102]===Symbol.for(`react.memo_cache_sentinel`)?(gt=(0,L.jsx)(i,{id:`dEgA5A`}),t[102]=gt):gt=t[102];let _t;t[103]!==N||t[104]!==ht?(_t=(0,L.jsx)(c,{variant:`outline`,className:`font-mono uppercase`,onMouseDown:H,onClick:ht,disabled:N,children:gt}),t[103]=N,t[104]=ht,t[105]=_t):_t=t[105];let vt=J?`skill-upload-button`:`skill-import-button`,yt;t[106]===Te?yt=t[107]:(yt=()=>void Te(),t[106]=Te,t[107]=yt);let bt=!Ce,xt;t[108]!==N||t[109]!==J?(xt=N?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(oe,{className:`size-4 animate-spin`}),J?(0,L.jsx)(i,{id:`_eguJc`}):(0,L.jsx)(i,{id:`RqSvT0`})]}):J?(0,L.jsx)(i,{id:`ONWvwQ`}):(0,L.jsx)(i,{id:`l3s5ri`}),t[108]=N,t[109]=J,t[110]=xt):xt=t[110];let St;t[111]!==vt||t[112]!==yt||t[113]!==bt||t[114]!==xt?(St=(0,L.jsx)(c,{"data-testid":vt,onClick:yt,disabled:bt,children:xt}),t[111]=vt,t[112]=yt,t[113]=bt,t[114]=xt,t[115]=St):St=t[115];let $;t[116]!==_t||t[117]!==St?($=(0,L.jsxs)(f,{children:[_t,St]}),t[116]=_t,t[117]=St,t[118]=$):$=t[118];let Ct;return t[119]!==mt||t[120]!==$?(Ct=(0,L.jsxs)(L.Fragment,{children:[mt,$]}),t[119]=mt,t[120]=$,t[121]=Ct):Ct=t[121],Ct}function H(e){return e.preventDefault()}function U(e){return(0,L.jsx)(_,{value:e.name,children:e.name},e.name)}function W(e){return{name:e,description:null}}function G(e){let t=(0,he.c)(21),{defaultScope:n,open:r,onOpenChange:a,defaultTab:o,onImported:s}=e,c=o===void 0?`skills-sh`:o,d;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,L.jsx)(ee,{children:(0,L.jsx)(i,{id:`GBQjiV`})}),t[0]=d):d=t[0];let f;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,L.jsxs)(p,{children:[d,(0,L.jsx)(l,{className:`sr-only`,children:(0,L.jsx)(i,{id:`qTcVwj`})})]}),t[1]=f):f=t[1];let h;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,L.jsx)(C,{variant:`line`,value:`skills-sh`,children:(0,L.jsx)(i,{id:`8tjQCz`})}),t[2]=h):h=t[2];let g;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(g=(0,L.jsxs)(T,{variant:`line`,className:`w-full justify-start gap-4 border-b p-0`,children:[h,(0,L.jsx)(C,{variant:`line`,value:`upload`,children:(0,L.jsx)(i,{id:`ONWvwQ`})})]}),t[3]=g):g=t[3];let _;t[4]===a?_=t[5]:(_=()=>a(!1),t[4]=a,t[5]=_);let v;t[6]!==n||t[7]!==_?(v=(0,L.jsx)(w,{value:`skills-sh`,className:`h-[62vh] min-h-0 flex-none`,children:(0,L.jsx)(R,{scope:n,onNavigate:_})}),t[6]=n,t[7]=_,t[8]=v):v=t[8];let y;t[9]!==n||t[10]!==s||t[11]!==a?(y=(0,L.jsx)(w,{value:`upload`,className:`mt-3 flex min-h-0 flex-1 flex-col gap-6`,children:(0,L.jsx)(V,{defaultScope:n,onOpenChange:a,onImported:s})}),t[9]=n,t[10]=s,t[11]=a,t[12]=y):y=t[12];let b;t[13]!==c||t[14]!==v||t[15]!==y?(b=(0,L.jsxs)(u,{className:`flex max-h-[85vh] flex-col gap-4 sm:max-w-4xl`,children:[f,(0,L.jsxs)(re,{defaultValue:c,className:`flex min-h-0 flex-1 flex-col gap-3`,children:[g,v,y]})]}),t[13]=c,t[14]=v,t[15]=y,t[16]=b):b=t[16];let x;return t[17]!==a||t[18]!==r||t[19]!==b?(x=(0,L.jsx)(m,{open:r,onOpenChange:a,children:b}),t[17]=a,t[18]=r,t[19]=b,t[20]=x):x=t[20],x}export{G as ImportSkillDialog};
|
|
1
|
+
import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./jsx-runtime-BUgB2tll.js";import{yn as n}from"./DocumentContext-BaYg4CBg.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"./compiler-runtime-BfE3aGVn.js";import{t as s}from"./utils-CPqDy6Hr.js";import{t as c}from"./button-RQ5o7P7w.js";import{a as l,c as ee,i as u,n as d,o as f,s as p,t as m}from"./dialog-FGMqkFjm.js";import{t as h}from"./label-G0lbYOgL.js";import{a as g,i as _,n as v,o as y,r as b,s as x,t as te}from"./select-BUOcREjn.js";import{n as S,t as ne}from"./radio-group-MAC3jHHk.js";import{i as C,n as w,r as T,t as re}from"./tabs-BKX_R3ed.js";import{t as E}from"./createLucideIcon-DihYAFEK.js";import{t as ie}from"./git-branch-le6ClqcQ.js";import{t as ae}from"./folder-DcWlgZbb.js";import{t as oe}from"./loader-circle-DJ1nzSAL.js";import{n as se,r as D,t as O}from"./use-skill-directory-BV092Gnw.js";import{n as k}from"./dist-uN7pEWl0.js";import{t as A}from"./input-Cm94Cun3.js";import{t as j}from"./dist-CzC3AWOn.js";import{f as ce,t as le}from"./skill-scope-7fBhGcjl.js";import{E as ue,k as de,r as fe,u as M}from"./skills-api-wUsPYcxD.js";import{t as N}from"./skeleton-Zj40UZU5.js";import{n as pe,r as P,t as me}from"./input-group-cP5PCk_d.js";var F=E(`file-archive`,[[`path`,{d:`M13.659 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v11.5`,key:`4pqfef`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M8 12v-1`,key:`1ej8lb`}],[`path`,{d:`M8 18v-2`,key:`qcmpov`}],[`path`,{d:`M8 7V6`,key:`1nbb54`}],[`circle`,{cx:`8`,cy:`20`,r:`2`,key:`ckkr5m`}]]),he=o(),I=e(r(),1),L=t(),ge=[`s1`,`s2`,`s3`,`s4`,`s5`,`s6`,`s7`,`s8`],_e=[{label:{id:`f8fH8W`},query:`design`},{label:{id:`-ySLQJ`},query:`git`},{label:{id:`qIJIrD`},query:`test`},{label:{id:`8Uv5e6`},query:`agent`},{label:{id:`UDb2YD`},query:`react`},{label:{id:`TbjyhA`},query:`docs`},{label:{id:`9wQrUU`},query:`refactor`},{label:{id:`HKH-W-`},query:`data`},{label:{id:`43qzxu`},query:`devops`},{label:{id:`a3LDKx`},query:`security`}];function R(e){let t=(0,he.c)(57),{scope:r,onNavigate:o}=e,{_:s}=a(),l;t[0]!==o||t[1]!==r?(l={scope:r,onNavigate:o},t[0]=o,t[1]=r,t[2]=l):l=t[2];let{importedEntry:ee,openResult:u}=O(l),[d,f]=(0,I.useState)(``),p;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(p=[],t[3]=p):p=t[3];let[m,h]=(0,I.useState)(p),[S,ne]=(0,I.useState)(!1),[C,w]=(0,I.useState)(`idle`),[T,re]=(0,I.useState)(`relevance`),{skills:E}=se(),ie,ae;t[4]===d?(ie=t[5],ae=t[6]):(ie=()=>{let e=d.trim();if(e.length<2){h([]),w(`idle`);return}let t=!1;w(`searching`);let n=setTimeout(()=>{ue(e).then(e=>{if(!t){if(!e.ok){w(`error`),h([]),ne(!1);return}h(e.results),ne(e.degraded),w(`idle`)}})},300);return()=>{t=!0,clearTimeout(n)}},ae=[d],t[4]=d,t[5]=ie,t[6]=ae),(0,I.useEffect)(ie,ae);let oe;t[7]===d?oe=t[8]:(oe=d.trim(),t[7]=d,t[8]=oe);let k=oe,A;t[9]!==m||t[10]!==T?(A=T===`installs`?[...m].sort(ye):m,t[9]=m,t[10]=T,t[11]=A):A=t[11];let j=A,ce;t[12]!==ee||t[13]!==u?(ce=e=>(0,L.jsx)(D,{result:e,imported:ee(e),onOpen:()=>u(e)},e.id),t[12]=ee,t[13]=u,t[14]=ce):ce=t[14];let le=ce,de;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(de=(0,L.jsx)(pe,{align:`inline-start`,children:(0,L.jsx)(n,{"aria-hidden":`true`})}),t[15]=de):de=t[15];let fe;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(fe=e=>f(e.target.value),t[16]=fe):fe=t[16];let M;t[17]===s?M=t[18]:(M=s({id:`BlLxpG`}),t[17]=s,t[18]=M);let N;t[19]===s?N=t[20]:(N=s({id:`BlLxpG`}),t[19]=s,t[20]=N);let F;t[21]!==d||t[22]!==M||t[23]!==N?(F=(0,L.jsxs)(me,{className:`h-9 flex-1`,children:[de,(0,L.jsx)(P,{value:d,onChange:fe,placeholder:M,"aria-label":N})]}),t[21]=d,t[22]=M,t[23]=N,t[24]=F):F=t[24];let R;t[25]!==s||t[26]!==k.length||t[27]!==m||t[28]!==T||t[29]!==C?(R=k.length>=2&&C===`idle`&&m.length>0?(0,L.jsxs)(te,{value:T,onValueChange:e=>re(e),children:[(0,L.jsx)(y,{className:`h-9! w-40 shrink-0`,"aria-label":s({id:`eUFXS1`}),children:(0,L.jsx)(x,{})}),(0,L.jsx)(v,{children:(0,L.jsxs)(b,{children:[(0,L.jsx)(g,{children:s({id:`_HgF9q`})}),(0,L.jsx)(_,{value:`relevance`,children:s({id:`7dZnmw`})}),(0,L.jsx)(_,{value:`installs`,children:s({id:`tc65fD`})})]})})]}):null,t[25]=s,t[26]=k.length,t[27]=m,t[28]=T,t[29]=C,t[30]=R):R=t[30];let z;t[31]!==F||t[32]!==R?(z=(0,L.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2`,children:[F,R]}),t[31]=F,t[32]=R,t[33]=z):z=t[33];let B;t[34]!==s||t[35]!==d?(B=_e.map(e=>{let t=d.trim().split(/\s+/).filter(Boolean),n=t.includes(e.query);return(0,L.jsx)(c,{variant:n?`secondary`:`outline`,size:`sm`,"aria-pressed":n,className:`h-6 shrink-0 rounded-full data-[active=true]:border-foreground/30`,"data-active":n,onClick:()=>f((n?t.filter(t=>t!==e.query):[...t,e.query]).join(` `)),children:s(e.label)},e.query)}),t[34]=s,t[35]=d,t[36]=B):B=t[36];let V;t[37]===B?V=t[38]:(V=(0,L.jsx)(`div`,{className:`flex shrink-0 gap-2 overflow-x-auto scroll-fade-mask-x [scrollbar-width:none]`,children:B}),t[37]=B,t[38]=V);let H;t[39]!==S||t[40]!==k.length?(H=S&&k.length>=2?(0,L.jsx)(`p`,{className:`text-[11px] text-muted-foreground`,children:(0,L.jsx)(i,{id:`MBKkUy`})}):null,t[39]=S,t[40]=k.length,t[41]=H):H=t[41];let U;t[42]!==E||t[43]!==k.length||t[44]!==le||t[45]!==m||t[46]!==j||t[47]!==C?(U=k.length<2?E.length>0?(0,L.jsxs)(`div`,{className:`space-y-2`,children:[(0,L.jsx)(`h3`,{className:`font-mono text-2xs uppercase tracking-wider text-muted-foreground`,children:(0,L.jsx)(i,{id:`gL_sdV`})}),(0,L.jsx)(`ul`,{className:`grid grid-cols-1 gap-2.5 sm:grid-cols-2`,children:E.map(le)})]}):null:C===`searching`?(0,L.jsxs)(`div`,{"aria-busy":`true`,children:[(0,L.jsx)(`span`,{className:`sr-only`,children:(0,L.jsx)(i,{id:`WRNXKp`})}),(0,L.jsx)(`ul`,{className:`grid grid-cols-1 gap-2.5 sm:grid-cols-2`,"aria-hidden":!0,children:ge.map(ve)})]}):C===`error`?(0,L.jsx)(`p`,{className:`text-sm text-destructive`,children:(0,L.jsx)(i,{id:`yg_6wQ`})}):m.length===0?(0,L.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:(0,L.jsx)(i,{id:`8t9T3-`})}):(0,L.jsx)(`ul`,{className:`grid grid-cols-1 gap-2.5 sm:grid-cols-2`,children:j.map(le)}),t[42]=E,t[43]=k.length,t[44]=le,t[45]=m,t[46]=j,t[47]=C,t[48]=U):U=t[48];let W;t[49]===U?W=t[50]:(W=(0,L.jsx)(`div`,{className:`min-h-0 flex-1 overflow-auto subtle-scrollbar scroll-fade-mask`,children:U}),t[49]=U,t[50]=W);let G;t[51]===Symbol.for(`react.memo_cache_sentinel`)?(G=(0,L.jsx)(`p`,{className:`-mb-3.5 shrink-0 text-center text-[11px] text-muted-foreground/80`,children:(0,L.jsx)(i,{id:`fg1U4e`,components:{0:(0,L.jsx)(`a`,{href:`https://skills.sh`,target:`_blank`,rel:`noreferrer`,className:`underline hover:text-foreground`})}})}),t[51]=G):G=t[51];let K;return t[52]!==z||t[53]!==V||t[54]!==H||t[55]!==W?(K=(0,L.jsxs)(`div`,{className:`flex h-full min-h-0 flex-col gap-3`,children:[z,V,H,W,G]}),t[52]=z,t[53]=V,t[54]=H,t[55]=W,t[56]=K):K=t[56],K}function ve(e){return(0,L.jsx)(N,{className:`h-[72px] rounded-xl`},e)}function ye(e,t){return(t.installs??-1)-(e.installs??-1)}function z(e,t){t.alreadyImported?k.success(e===`upload`?j._({id:`tA2-xC`,values:{0:t.name}}):j._({id:`8AjnFz`,values:{0:t.name}})):t.collisionRenamedFrom?k.success(e===`upload`?j._({id:`EPGePE`,values:{0:t.name,1:t.collisionRenamedFrom}}):j._({id:`C0Ciaj`,values:{0:t.name,1:t.collisionRenamedFrom}})):k.success(e===`upload`?j._({id:`Pg83C9`,values:{0:t.name}}):j._({id:`qFKsNl`,values:{0:t.name}}));for(let e of t.warnings??[])k.warning(e)}var B=`flex items-start justify-between gap-3 rounded-md border p-3 text-sm font-normal transition-colors cursor-pointer`;function V(e){let t=(0,he.c)(122),{defaultScope:n,onOpenChange:r,onImported:o}=e,{_:l}=a(),ee=(0,I.useId)(),u=(0,I.useId)(),p=(0,I.useId)(),m=(0,I.useId)(),g=(0,I.useId)(),b=ce(),[C,w]=(0,I.useState)(n),[T,re]=(0,I.useState)(`remote`),[E,se]=(0,I.useState)(``),[D,O]=(0,I.useState)(``),[j,ue]=(0,I.useState)(null),[N,pe]=(0,I.useState)(!1),[P,me]=(0,I.useState)(null),[ge,_e]=(0,I.useState)(!1),[R,ve]=(0,I.useState)(!1),ye=(0,I.useRef)(null),V,G;t[0]===T?(V=t[1],G=t[2]):(V=()=>{let e=ye.current;e&&(T===`folder`?(e.setAttribute(`webkitdirectory`,``),e.setAttribute(`directory`,``)):(e.removeAttribute(`webkitdirectory`),e.removeAttribute(`directory`)))},G=[T],t[0]=T,t[1]=V,t[2]=G),(0,I.useEffect)(V,G);let K;t[3]===E?K=t[4]:(K=E.trim(),t[3]=E,t[4]=K);let q=K,J=T===`zip`||T===`folder`,be=j?.[0]?.webkitRelativePath?.split(`/`)[0]??``,xe,Se;t[5]!==J||t[6]!==q?(xe=()=>{if(J||q===``){me(null),_e(!1),ve(!1),O(``);return}let e=!1,t=new AbortController;_e(!0),ve(!1);let n=setTimeout(()=>{fe(q,t.signal).then(t=>{if(!e){if(_e(!1),!t.ok){me(null),O(``),ve(!0);return}ve(!1),me(t.skills),O(t.skills.length>1?t.skills[0].name:``)}})},500);return()=>{e=!0,t.abort(),clearTimeout(n)}},Se=[q,J],t[5]=J,t[6]=q,t[7]=xe,t[8]=Se):(xe=t[7],Se=t[8]),(0,I.useEffect)(xe,Se);let Ce=!N&&(J?j!==null&&j.length>0:q!==``),we;t[9]!==l||t[10]!==Ce||t[11]!==j||t[12]!==J||t[13]!==o||t[14]!==r||t[15]!==C||t[16]!==D||t[17]!==T||t[18]!==q?(we=async function(){if(!Ce)return;if(pe(!0),J&&j!==null){let e=new FormData;if(T===`zip`)e.append(`file`,j[0]);else for(let t of Array.from(j))e.append(`files`,t,t.webkitRelativePath||t.name);let t=await de(e,C);if(pe(!1),!t.ok){k.error(l({id:`Z8nach`,values:{0:t.error}}));return}z(`upload`,t),o({scope:C,name:t.name}),r(!1);return}let e=await M({source:q,...D.trim()===``?{}:{skill:D.trim()},scope:C});if(pe(!1),!e.ok){if(e.skills&&e.skills.length>1){me(e.skills.map(W)),O(e.skills[0]),k.info(l({id:`iYUTsI`}));return}k.error(l({id:`kfL8BJ`,values:{0:e.error}}));return}z(`import`,e),o({scope:C,name:e.name}),r(!1)},t[9]=l,t[10]=Ce,t[11]=j,t[12]=J,t[13]=o,t[14]=r,t[15]=C,t[16]=D,t[17]=T,t[18]=q,t[19]=we):we=t[19];let Te=we,Ee=d,De;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(De=(0,L.jsx)(i,{id:`aBgwis`}),t[20]=De):De=t[20];let Y;t[21]===m?Y=t[22]:(Y=(0,L.jsx)(h,{htmlFor:m,children:De}),t[21]=m,t[22]=Y);let Oe;t[23]===Symbol.for(`react.memo_cache_sentinel`)?(Oe=e=>w(e),t[23]=Oe):Oe=t[23];let ke;t[24]===Symbol.for(`react.memo_cache_sentinel`)?(ke=(0,L.jsx)(x,{}),t[24]=ke):ke=t[24];let X;t[25]===m?X=t[26]:(X=(0,L.jsx)(y,{id:m,className:`w-full`,children:ke}),t[25]=m,t[26]=X);let Z;t[27]===b?Z=t[28]:(Z=le.map(e=>(0,L.jsx)(_,{value:e,children:b[e]},e)),t[27]=b,t[28]=Z);let Ae;t[29]===Z?Ae=t[30]:(Ae=(0,L.jsx)(v,{children:Z}),t[29]=Z,t[30]=Ae);let je;t[31]!==C||t[32]!==X||t[33]!==Ae?(je=(0,L.jsxs)(te,{value:C,onValueChange:Oe,children:[X,Ae]}),t[31]=C,t[32]=X,t[33]=Ae,t[34]=je):je=t[34];let Me;t[35]!==je||t[36]!==Y?(Me=(0,L.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[Y,je]}),t[35]=je,t[36]=Y,t[37]=Me):Me=t[37];let Ne;t[38]===Symbol.for(`react.memo_cache_sentinel`)?(Ne=(0,L.jsx)(i,{id:`wdxz7K`}),t[38]=Ne):Ne=t[38];let Pe;t[39]===u?Pe=t[40]:(Pe=(0,L.jsx)(h,{id:u,children:Ne}),t[39]=u,t[40]=Pe);let Fe;t[41]===Symbol.for(`react.memo_cache_sentinel`)?(Fe=e=>{re(e),ue(null)},t[41]=Fe):Fe=t[41];let Ie=`${u}-remote`,Le=T===`remote`?`border-primary bg-primary/5`:`border-border hover:bg-muted/40`,Re;t[42]===Le?Re=t[43]:(Re=s(B,Le),t[42]=Le,t[43]=Re);let ze;t[44]===Symbol.for(`react.memo_cache_sentinel`)?(ze=(0,L.jsxs)(`span`,{className:`flex items-center gap-2 font-medium`,children:[(0,L.jsx)(ie,{className:`size-4 shrink-0 text-muted-foreground`,"aria-hidden":`true`}),(0,L.jsx)(i,{id:`qlAIQ1`})]}),t[44]=ze):ze=t[44];let Be;t[45]===Symbol.for(`react.memo_cache_sentinel`)?(Be=(0,L.jsxs)(`span`,{className:`flex flex-col gap-0.5`,children:[ze,(0,L.jsx)(`span`,{className:`text-1sm text-muted-foreground`,children:(0,L.jsx)(i,{id:`9m4D_h`})})]}),t[45]=Be):Be=t[45];let Ve=`${u}-remote`,He;t[46]===Ve?He=t[47]:(He=(0,L.jsx)(S,{id:Ve,value:`remote`,className:`mt-0.5`}),t[46]=Ve,t[47]=He);let Ue;t[48]!==Ie||t[49]!==Re||t[50]!==He?(Ue=(0,L.jsxs)(h,{htmlFor:Ie,className:Re,children:[Be,He]}),t[48]=Ie,t[49]=Re,t[50]=He,t[51]=Ue):Ue=t[51];let We=`${u}-zip`,Ge=T===`zip`?`border-primary bg-primary/5`:`border-border hover:bg-muted/40`,Ke;t[52]===Ge?Ke=t[53]:(Ke=s(B,Ge),t[52]=Ge,t[53]=Ke);let qe;t[54]===Symbol.for(`react.memo_cache_sentinel`)?(qe=(0,L.jsxs)(`span`,{className:`flex items-center gap-2 font-medium`,children:[(0,L.jsx)(F,{className:`size-4 shrink-0 text-muted-foreground`,"aria-hidden":`true`}),(0,L.jsx)(i,{id:`Fr8JGg`})]}),t[54]=qe):qe=t[54];let Je;t[55]===Symbol.for(`react.memo_cache_sentinel`)?(Je=(0,L.jsxs)(`span`,{className:`flex flex-col gap-0.5`,children:[qe,(0,L.jsx)(`span`,{className:`text-1sm text-muted-foreground`,children:(0,L.jsx)(i,{id:`hQjvzi`})})]}),t[55]=Je):Je=t[55];let Ye=`${u}-zip`,Xe;t[56]===Ye?Xe=t[57]:(Xe=(0,L.jsx)(S,{id:Ye,value:`zip`,className:`mt-0.5`}),t[56]=Ye,t[57]=Xe);let Ze;t[58]!==We||t[59]!==Ke||t[60]!==Xe?(Ze=(0,L.jsxs)(h,{htmlFor:We,className:Ke,children:[Je,Xe]}),t[58]=We,t[59]=Ke,t[60]=Xe,t[61]=Ze):Ze=t[61];let Qe=`${u}-folder`,$e=T===`folder`?`border-primary bg-primary/5`:`border-border hover:bg-muted/40`,et;t[62]===$e?et=t[63]:(et=s(B,$e),t[62]=$e,t[63]=et);let tt;t[64]===Symbol.for(`react.memo_cache_sentinel`)?(tt=(0,L.jsxs)(`span`,{className:`flex items-center gap-2 font-medium`,children:[(0,L.jsx)(ae,{className:`size-4 shrink-0 text-muted-foreground`,"aria-hidden":`true`}),(0,L.jsx)(i,{id:`kNqMMd`})]}),t[64]=tt):tt=t[64];let nt;t[65]===Symbol.for(`react.memo_cache_sentinel`)?(nt=(0,L.jsxs)(`span`,{className:`flex flex-col gap-0.5`,children:[tt,(0,L.jsx)(`span`,{className:`text-1sm text-muted-foreground`,children:(0,L.jsx)(i,{id:`UPWItY`})})]}),t[65]=nt):nt=t[65];let rt=`${u}-folder`,it;t[66]===rt?it=t[67]:(it=(0,L.jsx)(S,{id:rt,value:`folder`,className:`mt-0.5`}),t[66]=rt,t[67]=it);let at;t[68]!==Qe||t[69]!==et||t[70]!==it?(at=(0,L.jsxs)(h,{htmlFor:Qe,className:et,children:[nt,it]}),t[68]=Qe,t[69]=et,t[70]=it,t[71]=at):at=t[71];let ot;t[72]!==T||t[73]!==u||t[74]!==Ue||t[75]!==Ze||t[76]!==at?(ot=(0,L.jsxs)(ne,{value:T,onValueChange:Fe,"aria-labelledby":u,className:`grid-cols-1 gap-2 sm:grid-cols-3 mb-2`,children:[Ue,Ze,at]}),t[72]=T,t[73]=u,t[74]=Ue,t[75]=Ze,t[76]=at,t[77]=ot):ot=t[77];let st=J?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(A,{ref:ye,id:g,"aria-label":l(T===`zip`?{id:`wErce0`}:{id:`VJaBca`}),type:`file`,"data-testid":`skill-upload-input`,accept:T===`zip`?`.zip,.skill`:void 0,onChange:e=>ue(e.target.files),className:`sr-only`},T),(0,L.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,L.jsx)(c,{type:`button`,variant:`outline`,size:`sm`,onClick:()=>ye.current?.click(),children:T===`zip`?(0,L.jsx)(i,{id:`-yPBXI`}):(0,L.jsx)(i,{id:`TgZOXj`})}),(0,L.jsx)(`span`,{className:`truncate text-sm text-muted-foreground`,"data-testid":`skill-upload-filename`,children:j&&j.length>0?T===`folder`?j.length===1?l({id:`BGtzlf`,values:{uploadFolderName:be}}):l({id:`K7NMEc`,values:{0:j.length,uploadFolderName:be}}):j[0].name:(0,L.jsx)(i,{id:`hqCwRf`})})]})]}):(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(A,{id:ee,"aria-label":l({id:`cLP0Lf`}),"data-testid":`skill-import-source-input`,value:E,onChange:e=>se(e.target.value),onKeyDown:e=>{e.key===`Enter`&&Te()},placeholder:l({id:`gv5w9J`}),className:`font-mono`}),ge||R||P&&P.length===1?(0,L.jsx)(`p`,{className:`text-1sm text-muted-foreground`,children:ge?(0,L.jsx)(i,{id:`K4G55s`}):R?(0,L.jsx)(i,{id:`XgqUOy`}):P&&P.length===1?(0,L.jsx)(i,{id:`WpE38V`,values:{0:P[0].name}}):null}):null]}),ct;t[78]!==Pe||t[79]!==ot||t[80]!==st?(ct=(0,L.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[Pe,ot,st]}),t[78]=Pe,t[79]=ot,t[80]=st,t[81]=ct):ct=t[81];let lt;t[82]!==P||t[83]!==J||t[84]!==D||t[85]!==p?(lt=!J&&P&&P.length>1?(0,L.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,L.jsx)(h,{htmlFor:p,children:(0,L.jsx)(i,{id:`FCMaBz`})}),(0,L.jsxs)(te,{value:D,onValueChange:O,children:[(0,L.jsx)(y,{id:p,size:`sm`,className:`w-full`,"data-testid":`skill-import-pick`,children:(0,L.jsx)(x,{})}),(0,L.jsx)(v,{children:P.map(U)})]}),(0,L.jsx)(`p`,{className:`text-1sm text-muted-foreground`,children:(0,L.jsx)(i,{id:`xtJgSe`})})]}):null,t[82]=P,t[83]=J,t[84]=D,t[85]=p,t[86]=lt):lt=t[86];let ut;t[87]===Symbol.for(`react.memo_cache_sentinel`)?(ut=(0,L.jsx)(`p`,{className:`font-medium text-xs font-mono text-muted-foreground/80 uppercase tracking-wider`,children:(0,L.jsx)(i,{id:`DWJtEo`})}),t[87]=ut):ut=t[87];let dt;t[88]===C?dt=t[89]:(dt=(0,L.jsx)(`li`,{children:C===`project`?(0,L.jsx)(i,{id:`rucNcu`,components:{0:(0,L.jsx)(`code`,{className:`rounded bg-muted px-1 py-0.5 font-mono text-[0.9em] text-foreground/80`})}}):(0,L.jsx)(i,{id:`vjW-SM`,components:{0:(0,L.jsx)(`code`,{className:`rounded bg-muted px-1 py-0.5 font-mono text-[0.9em] text-foreground/80`})}})}),t[88]=C,t[89]=dt);let ft,pt;t[90]===Symbol.for(`react.memo_cache_sentinel`)?(ft=(0,L.jsx)(`li`,{children:(0,L.jsx)(i,{id:`tqQBwN`})}),pt=(0,L.jsx)(`li`,{children:(0,L.jsx)(i,{id:`QB-moX`})}),t[90]=ft,t[91]=pt):(ft=t[90],pt=t[91]);let Q;t[92]===dt?Q=t[93]:(Q=(0,L.jsxs)(`div`,{role:`note`,className:`space-y-3`,"data-testid":`skill-import-disclosure`,children:[ut,(0,L.jsxs)(`ul`,{className:`list-disc space-y-2.5 pl-4 text-sm text-muted-foreground marker:text-muted-foreground/50`,children:[dt,ft,pt]})]}),t[92]=dt,t[93]=Q);let mt;t[94]!==Ee||t[95]!==Me||t[96]!==ct||t[97]!==lt||t[98]!==Q?(mt=(0,L.jsxs)(Ee,{className:`flex flex-col gap-6`,children:[Me,ct,lt,Q]}),t[94]=Ee,t[95]=Me,t[96]=ct,t[97]=lt,t[98]=Q,t[99]=mt):mt=t[99];let ht;t[100]===r?ht=t[101]:(ht=()=>r(!1),t[100]=r,t[101]=ht);let gt;t[102]===Symbol.for(`react.memo_cache_sentinel`)?(gt=(0,L.jsx)(i,{id:`dEgA5A`}),t[102]=gt):gt=t[102];let _t;t[103]!==N||t[104]!==ht?(_t=(0,L.jsx)(c,{variant:`outline`,className:`font-mono uppercase`,onMouseDown:H,onClick:ht,disabled:N,children:gt}),t[103]=N,t[104]=ht,t[105]=_t):_t=t[105];let vt=J?`skill-upload-button`:`skill-import-button`,yt;t[106]===Te?yt=t[107]:(yt=()=>void Te(),t[106]=Te,t[107]=yt);let bt=!Ce,xt;t[108]!==N||t[109]!==J?(xt=N?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(oe,{className:`size-4 animate-spin`}),J?(0,L.jsx)(i,{id:`_eguJc`}):(0,L.jsx)(i,{id:`RqSvT0`})]}):J?(0,L.jsx)(i,{id:`ONWvwQ`}):(0,L.jsx)(i,{id:`l3s5ri`}),t[108]=N,t[109]=J,t[110]=xt):xt=t[110];let St;t[111]!==vt||t[112]!==yt||t[113]!==bt||t[114]!==xt?(St=(0,L.jsx)(c,{"data-testid":vt,onClick:yt,disabled:bt,children:xt}),t[111]=vt,t[112]=yt,t[113]=bt,t[114]=xt,t[115]=St):St=t[115];let $;t[116]!==_t||t[117]!==St?($=(0,L.jsxs)(f,{children:[_t,St]}),t[116]=_t,t[117]=St,t[118]=$):$=t[118];let Ct;return t[119]!==mt||t[120]!==$?(Ct=(0,L.jsxs)(L.Fragment,{children:[mt,$]}),t[119]=mt,t[120]=$,t[121]=Ct):Ct=t[121],Ct}function H(e){return e.preventDefault()}function U(e){return(0,L.jsx)(_,{value:e.name,children:e.name},e.name)}function W(e){return{name:e,description:null}}function G(e){let t=(0,he.c)(21),{defaultScope:n,open:r,onOpenChange:a,defaultTab:o,onImported:s}=e,c=o===void 0?`skills-sh`:o,d;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,L.jsx)(ee,{children:(0,L.jsx)(i,{id:`GBQjiV`})}),t[0]=d):d=t[0];let f;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,L.jsxs)(p,{children:[d,(0,L.jsx)(l,{className:`sr-only`,children:(0,L.jsx)(i,{id:`qTcVwj`})})]}),t[1]=f):f=t[1];let h;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,L.jsx)(C,{variant:`line`,value:`skills-sh`,children:(0,L.jsx)(i,{id:`8tjQCz`})}),t[2]=h):h=t[2];let g;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(g=(0,L.jsxs)(T,{variant:`line`,className:`w-full justify-start gap-4 border-b p-0`,children:[h,(0,L.jsx)(C,{variant:`line`,value:`upload`,children:(0,L.jsx)(i,{id:`ONWvwQ`})})]}),t[3]=g):g=t[3];let _;t[4]===a?_=t[5]:(_=()=>a(!1),t[4]=a,t[5]=_);let v;t[6]!==n||t[7]!==_?(v=(0,L.jsx)(w,{value:`skills-sh`,className:`h-[62vh] min-h-0 flex-none`,children:(0,L.jsx)(R,{scope:n,onNavigate:_})}),t[6]=n,t[7]=_,t[8]=v):v=t[8];let y;t[9]!==n||t[10]!==s||t[11]!==a?(y=(0,L.jsx)(w,{value:`upload`,className:`mt-3 flex min-h-0 flex-1 flex-col gap-6`,children:(0,L.jsx)(V,{defaultScope:n,onOpenChange:a,onImported:s})}),t[9]=n,t[10]=s,t[11]=a,t[12]=y):y=t[12];let b;t[13]!==c||t[14]!==v||t[15]!==y?(b=(0,L.jsxs)(u,{className:`flex max-h-[85vh] flex-col gap-4 sm:max-w-4xl`,children:[f,(0,L.jsxs)(re,{defaultValue:c,className:`flex min-h-0 flex-1 flex-col gap-3`,children:[g,v,y]})]}),t[13]=c,t[14]=v,t[15]=y,t[16]=b):b=t[16];let x;return t[17]!==a||t[18]!==r||t[19]!==b?(x=(0,L.jsx)(m,{open:r,onOpenChange:a,children:b}),t[17]=a,t[18]=r,t[19]=b,t[20]=x):x=t[20],x}export{G as ImportSkillDialog};
|
|
@@ -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-B0H2okzr.js";import{i,r as a,t as o}from"./EditorModeToggle-C9I-Efpm.js";import{t as s}from"./markdownlint-rule-browser-BXGIkBuD.js";import{t as c}from"./useLintConfigViewMode-DHyC74de.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)(a,{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)(i,{src:d(f),assetPath: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};
|