@inkeep/open-knowledge 0.6.0-beta.7 → 0.6.0-beta.9
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/assets/skills/discovery/SKILL.md +1 -1
- package/dist/assets/skills/project/SKILL.md +1 -1
- package/dist/cli.mjs +4 -4
- package/dist/constants-CkYsa36O.mjs +2 -0
- package/dist/index.mjs +1 -1
- package/dist/{init-CazPxPCi.mjs → init-BG3i7h4P.mjs} +3 -3
- package/dist/init-CGZULhvc.mjs +1 -0
- package/dist/{loader-Cq8Xjd2a.mjs → loader-4X5eR4wo.mjs} +2 -2
- package/dist/loader-DOJXinKb.mjs +1 -0
- package/dist/preview-DCei46zt.mjs +1 -0
- package/dist/{preview-6gUPBF0q.mjs → preview-fk1DB9JQ.mjs} +2 -2
- package/dist/public/assets/ActivityModeContent-DMKML_zC.js +2 -0
- package/dist/public/assets/ActivityPanelDiffView-BN3fSrLi.js +13 -0
- package/dist/public/assets/ConsentDialogBody-C5uHYfEW.js +2 -0
- package/dist/public/assets/DocumentContext-CP8suU6i.js +62 -0
- package/dist/public/assets/{GraphPanel-Btq3W8xK.js → GraphPanel-Dk9s6BR5.js} +1 -1
- package/dist/public/assets/McpConsentDialogBody-BfIuibLb.js +1 -0
- package/dist/public/assets/SettingsDialogBody-DD8SsPLc.js +7 -0
- package/dist/public/assets/{SourceEditor-BBghYkCg.js → SourceEditor-_oSCmouY.js} +1 -1
- package/dist/public/assets/{_baseFor-B3FCzyNW.js → _baseFor-BQ6FmUXQ.js} +1 -1
- package/dist/public/assets/{arc-GOD6SLHR.js → arc-BTYHqK6I.js} +1 -1
- package/dist/public/assets/architecture-YZFGNWBL-haHjZ-W1.js +1 -0
- package/dist/public/assets/{architectureDiagram-Q4EWVU46-CIVh0TLx.js → architectureDiagram-Q4EWVU46-BeBUNHfZ.js} +1 -1
- package/dist/public/assets/{blockDiagram-DXYQGD6D-Cg-UHasz.js → blockDiagram-DXYQGD6D-DsdTvw8_.js} +1 -1
- package/dist/public/assets/{c4Diagram-AHTNJAMY-KFeHAAOO.js → c4Diagram-AHTNJAMY-C-rFnJCR.js} +1 -1
- package/dist/public/assets/channel-BrrATp5X.js +1 -0
- package/dist/public/assets/checkbox-DlLMG5cc.js +1 -0
- package/dist/public/assets/{chunk-2KRD3SAO-ChBquZUZ.js → chunk-2KRD3SAO-C0VEmSSK.js} +1 -1
- package/dist/public/assets/{chunk-336JU56O-DHqaXNrn.js → chunk-336JU56O-gb9mgyWz.js} +2 -2
- package/dist/public/assets/chunk-426QAEUC-WS9k1tU2.js +1 -0
- package/dist/public/assets/{chunk-4BX2VUAB-Dagml-_v.js → chunk-4BX2VUAB-CqFQlA48.js} +1 -1
- package/dist/public/assets/{chunk-4TB4RGXK-QLafKs7A.js → chunk-4TB4RGXK-SWtNUTYl.js} +1 -1
- package/dist/public/assets/chunk-55IACEB6-mJDPihNE.js +1 -0
- package/dist/public/assets/{chunk-5FUZZQ4R-DoG5zk7O.js → chunk-5FUZZQ4R-CwnM4vYi.js} +1 -1
- package/dist/public/assets/{chunk-5PVQY5BW--zDnbXdQ.js → chunk-5PVQY5BW-D1dRE2Kl.js} +1 -1
- package/dist/public/assets/{chunk-67CJDMHE-BDDJCVvR.js → chunk-67CJDMHE-DaOHFcoK.js} +1 -1
- package/dist/public/assets/{chunk-7N4EOEYR-DcM-tXJf.js → chunk-7N4EOEYR-DxJSpCGX.js} +1 -1
- package/dist/public/assets/{chunk-AA7GKIK3-CIk9DOam.js → chunk-AA7GKIK3-Ck4Wrqot.js} +1 -1
- package/dist/public/assets/{chunk-BSJP7CBP-CC13npHT.js → chunk-BSJP7CBP-c353z_ln.js} +1 -1
- package/dist/public/assets/{chunk-CIAEETIT-B7rpgB3I.js → chunk-CIAEETIT-fgTeYGb2.js} +1 -1
- package/dist/public/assets/{chunk-EDXVE4YY-BfT15Ufb.js → chunk-EDXVE4YY-DgNhZfoF.js} +1 -1
- package/dist/public/assets/{chunk-ENJZ2VHE-DEtEhITq.js → chunk-ENJZ2VHE-BuXqjNcc.js} +1 -1
- package/dist/public/assets/{chunk-FMBD7UC4-DXl_nUYs.js → chunk-FMBD7UC4-c2vVGInH.js} +1 -1
- package/dist/public/assets/{chunk-FOC6F5B3-wEKzMqND.js → chunk-FOC6F5B3-CH9dNZl0.js} +1 -1
- package/dist/public/assets/{chunk-ICPOFSXX-C8AElYY_.js → chunk-ICPOFSXX-JDKZSS0Z.js} +2 -2
- package/dist/public/assets/{chunk-K5T4RW27-DcJgbIMU.js → chunk-K5T4RW27-DPAjYSpe.js} +1 -1
- package/dist/public/assets/{chunk-KGLVRYIC-kNC4I9ls.js → chunk-KGLVRYIC-BKUgXOPp.js} +1 -1
- package/dist/public/assets/{chunk-LIHQZDEY-B0zYcYPV.js → chunk-LIHQZDEY-CWn5kZJ_.js} +1 -1
- package/dist/public/assets/{chunk-ORNJ4GCN-S_3Y_0FS.js → chunk-ORNJ4GCN-BETATk1q.js} +1 -1
- package/dist/public/assets/{chunk-OYMX7WX6-CX3nrwxJ.js → chunk-OYMX7WX6-Dj48iVpu.js} +1 -1
- package/dist/public/assets/chunk-QZHKN3VN-B5CMAE_s.js +1 -0
- package/dist/public/assets/{chunk-U2HBQHQK-CfAyyLJz.js → chunk-U2HBQHQK-CHYJZdMm.js} +1 -1
- package/dist/public/assets/{chunk-X2U36JSP-CmACymAN.js → chunk-X2U36JSP-CXEQobKO.js} +1 -1
- package/dist/public/assets/{chunk-XPW4576I-D1s3NdKZ.js → chunk-XPW4576I-BQtjckSw.js} +1 -1
- package/dist/public/assets/{chunk-YZCP3GAM-CiWxV9XS.js → chunk-YZCP3GAM-CjxtydJy.js} +1 -1
- package/dist/public/assets/{chunk-ZZ45TVLE-B7t5_MqN.js → chunk-ZZ45TVLE-D0y4RiW0.js} +1 -1
- package/dist/public/assets/classDiagram-6PBFFD2Q-CQWW9Gah.js +1 -0
- package/dist/public/assets/classDiagram-v2-HSJHXN6E-BLv6Pgu5.js +1 -0
- package/dist/public/assets/clone-bY7YorPK.js +1 -0
- package/dist/public/assets/config-validation-events-OLcd2xaS.js +10 -0
- package/dist/public/assets/{cose-bilkent-S5V4N54A-BjJ-OKPr.js → cose-bilkent-S5V4N54A-D7YGD8wq.js} +1 -1
- package/dist/public/assets/{dagre-BuFRtOcC.js → dagre-DMcENKoE.js} +1 -1
- package/dist/public/assets/{dagre-KV5264BT-BpBW6R71.js → dagre-KV5264BT-BqnXUWtP.js} +1 -1
- package/dist/public/assets/{diagram-5BDNPKRD-B5phtkJp.js → diagram-5BDNPKRD-vW7QcnnV.js} +1 -1
- package/dist/public/assets/{diagram-G4DWMVQ6-tjReW6yx.js → diagram-G4DWMVQ6-Da6SwXmu.js} +1 -1
- package/dist/public/assets/{diagram-MMDJMWI5-b4CgKryF.js → diagram-MMDJMWI5-dI7u2q2_.js} +1 -1
- package/dist/public/assets/{diagram-TYMM5635-D5B0g2lj.js → diagram-TYMM5635-CPHmeIdk.js} +1 -1
- package/dist/public/assets/dialog-bA5Nvc2p.js +45 -0
- package/dist/public/assets/{dist-DQ1oWohr.js → dist-BPdgMMrT.js} +1 -1
- package/dist/public/assets/{dist-D3YXABda.js → dist-BzP1Tn1M.js} +1 -1
- package/dist/public/assets/dist-CQw2y-s3.js +1 -0
- package/dist/public/assets/{dist-D-oqC0-R.js → dist-ChXyuS-V.js} +1 -1
- package/dist/public/assets/{dist-DpEGxZ9h.js → dist-DBGkcnST.js} +1 -1
- package/dist/public/assets/{dist-DXgyWuz5.js → dist-J4_ocm9a.js} +1 -1
- package/dist/public/assets/{dist-By89CQBy.js → dist-Wjnnj7ws.js} +1 -1
- package/dist/public/assets/{dist-DllAuqQQ.js → dist-rBb7QGSM.js} +1 -1
- package/dist/public/assets/{doc-hash-BUfOgpiD.js → doc-hash-BrKkCdCz.js} +1 -1
- package/dist/public/assets/{erDiagram-SMLLAGMA-CRJz10Jv.js → erDiagram-SMLLAGMA-DitwrtLX.js} +1 -1
- package/dist/public/assets/{flatten-BWAerz3O.js → flatten-ptFIxnDZ.js} +1 -1
- package/dist/public/assets/{flowDiagram-DWJPFMVM-BDCJTgJ7.js → flowDiagram-DWJPFMVM-C0gFyX_S.js} +1 -1
- package/dist/public/assets/{ganttDiagram-T4ZO3ILL-cPQKlGYc.js → ganttDiagram-T4ZO3ILL-tiotNOZI.js} +1 -1
- package/dist/public/assets/gitGraph-7Q5UKJZL-EPtzLtdn.js +1 -0
- package/dist/public/assets/{gitGraphDiagram-UUTBAWPF-BMyjc352.js → gitGraphDiagram-UUTBAWPF-DMvh5XLj.js} +1 -1
- package/dist/public/assets/{graphlib-BU8FnRz1.js → graphlib-BrqdZy8t.js} +1 -1
- package/dist/public/assets/index-DoV-kWhK.js +1916 -0
- package/dist/public/assets/info-OMHHGYJF-DhGHQOTJ.js +1 -0
- package/dist/public/assets/{infoDiagram-42DDH7IO-BZ6v5y-j.js → infoDiagram-42DDH7IO-DKk8uvIK.js} +1 -1
- package/dist/public/assets/{isEmpty-Cairwk5V.js → isEmpty-Dff4GQVw.js} +1 -1
- package/dist/public/assets/isSymbol-DIRIUNhN.js +1 -0
- package/dist/public/assets/{ishikawaDiagram-UXIWVN3A-DA7_P2Up.js → ishikawaDiagram-UXIWVN3A-CdKANno1.js} +1 -1
- package/dist/public/assets/{journeyDiagram-VCZTEJTY-CzZoB161.js → journeyDiagram-VCZTEJTY-DbR4q1G1.js} +1 -1
- package/dist/public/assets/{kanban-definition-6JOO6SKY-DKg7pXv1.js → kanban-definition-6JOO6SKY-dx60koQU.js} +1 -1
- package/dist/public/assets/{line-DGc-MCyQ.js → line--3PJLF7I.js} +1 -1
- package/dist/public/assets/{linear-D6wzOaQP.js → linear-B5hCL-s4.js} +1 -1
- package/dist/public/assets/{mermaid-parser.core-Bm2u0Ges.js → mermaid-parser.core-DfyX5Z2V.js} +2 -2
- package/dist/public/assets/{mermaid.core-DRx0wZe0.js → mermaid.core-3naqvDT_.js} +3 -3
- package/dist/public/assets/{mindmap-definition-QFDTVHPH-C9GRZxO6.js → mindmap-definition-QFDTVHPH-B6GzcY6Y.js} +1 -1
- package/dist/public/assets/{now-BN_Nj6nz.js → now-y3Cm704C.js} +1 -1
- package/dist/public/assets/{ordinal-Dk6d5Y-0.js → ordinal-CdtiT3iH.js} +1 -1
- package/dist/public/assets/packet-4T2RLAQJ-dOkbaGJi.js +1 -0
- package/dist/public/assets/pie-ZZUOXDRM-7mxWmZMD.js +1 -0
- package/dist/public/assets/{pieDiagram-DEJITSTG-L6I3ft9Z.js → pieDiagram-DEJITSTG-DpAjvB-E.js} +1 -1
- package/dist/public/assets/{propagation-api-3kmMXRwS.js → propagation-api-CobBjsTC.js} +1 -1
- package/dist/public/assets/{quadrantDiagram-34T5L4WZ-Dp2IeEPC.js → quadrantDiagram-34T5L4WZ-Cfy7zW3N.js} +1 -1
- package/dist/public/assets/radar-PYXPWWZC-CYrvwt0c.js +1 -0
- package/dist/public/assets/{reduce-CSWSFqzz.js → reduce-C8tvPXVb.js} +1 -1
- package/dist/public/assets/{requirementDiagram-MS252O5E-BxNWyIZg.js → requirementDiagram-MS252O5E-Bq0qocwq.js} +1 -1
- package/dist/public/assets/{sankeyDiagram-XADWPNL6-CRn0_xkw.js → sankeyDiagram-XADWPNL6-Cs_gUjif.js} +1 -1
- package/dist/public/assets/{sequenceDiagram-FGHM5R23-Drkjb1j4.js → sequenceDiagram-FGHM5R23-mAj4_C_D.js} +1 -1
- package/dist/public/assets/{src-DZeiyxTL.js → src-BqeO7p9A.js} +1 -1
- package/dist/public/assets/{stateDiagram-FHFEXIEX-BBUFKS0u.js → stateDiagram-FHFEXIEX-Dl7UQcWR.js} +1 -1
- package/dist/public/assets/stateDiagram-v2-QKLJ7IA2-BBPg5CA6.js +1 -0
- package/dist/public/assets/{target-navigation-intent-Bg_vCLDN.js → target-navigation-intent-B5Xuyiwx.js} +1 -1
- package/dist/public/assets/{telemetry-impl-DPRMO_b_.js → telemetry-impl-4gFdQtY5.js} +2 -2
- package/dist/public/assets/{timeline-definition-GMOUNBTQ-CLoe9y-z.js → timeline-definition-GMOUNBTQ-BsJlKEZE.js} +1 -1
- package/dist/public/assets/{toggle-group-BvHaWPjZ.js → toggle-group-Dzandm58.js} +1 -1
- package/dist/public/assets/treeView-SZITEDCU-bf7fN5vg.js +1 -0
- package/dist/public/assets/treemap-W4RFUUIX-DeijdxYt.js +1 -0
- package/dist/public/assets/{typing-burst-detector-xohyxOCA.js → typing-burst-detector-tbQ3pXg5.js} +1 -1
- package/dist/public/assets/{vennDiagram-DHZGUBPP-q2zdiy4F.js → vennDiagram-DHZGUBPP-8a9bTsJc.js} +1 -1
- package/dist/public/assets/wardley-RL74JXVD-XbGOizT8.js +1 -0
- package/dist/public/assets/{wardleyDiagram-NUSXRM2D-Njg6YHso.js → wardleyDiagram-NUSXRM2D-C_5vGuXg.js} +1 -1
- package/dist/public/assets/{xychartDiagram-5P7HB3ND-Ct8Wgp45.js → xychartDiagram-5P7HB3ND-C-11ks2d.js} +1 -1
- package/dist/public/index.html +24 -23
- package/dist/{repair-launch-json-dn-ts3BK.mjs → repair-launch-json-ChOioNjY.mjs} +2 -2
- package/dist/{repair-mcp-configs-DcA8Rqru.mjs → repair-mcp-configs-KXG6sJju.mjs} +2 -2
- package/dist/{src-x_Xoxk5g.mjs → src-C-7gHcnB.mjs} +2 -2
- package/dist/start-CNPhu259.mjs +1 -0
- package/dist/{start-CW0qx0LO.mjs → start-vBx0y7gg.mjs} +2 -2
- package/package.json +1 -1
- package/dist/constants-CeJMalO7.mjs +0 -2
- package/dist/init-Bo0AfNom.mjs +0 -1
- package/dist/loader-DNFIL45q.mjs +0 -1
- package/dist/preview-CUdzf9Ro.mjs +0 -1
- package/dist/public/assets/ActivityModeContent-Dgodq1_3.js +0 -2
- package/dist/public/assets/ActivityPanelDiffView-d4ec9M69.js +0 -13
- package/dist/public/assets/ConsentDialogBody-Y-YFxY-Y.js +0 -2
- package/dist/public/assets/DocumentContext-CqL0pPxh.js +0 -62
- package/dist/public/assets/McpConsentDialogBody-CR1y0qI_.js +0 -1
- package/dist/public/assets/SettingsDialogBody-Dr2p2Reu.js +0 -11
- package/dist/public/assets/architecture-YZFGNWBL-B2pJrg2X.js +0 -1
- package/dist/public/assets/channel-BqqURnVG.js +0 -1
- package/dist/public/assets/checkbox-BLSL0WqH.js +0 -1
- package/dist/public/assets/chunk-426QAEUC-CuPmuy8t.js +0 -1
- package/dist/public/assets/chunk-55IACEB6-BRPDx2aU.js +0 -1
- package/dist/public/assets/chunk-QZHKN3VN-CTZ4su3-.js +0 -1
- package/dist/public/assets/classDiagram-6PBFFD2Q-DrN_pUa5.js +0 -1
- package/dist/public/assets/classDiagram-v2-HSJHXN6E-C1MJ1Ukt.js +0 -1
- package/dist/public/assets/clone-CecJCxEU.js +0 -1
- package/dist/public/assets/config-validation-events-CXyf_fVy.js +0 -10
- package/dist/public/assets/dialog-B6QxSuMP.js +0 -45
- package/dist/public/assets/gitGraph-7Q5UKJZL-BMann5g7.js +0 -1
- package/dist/public/assets/index-DMINOczF.js +0 -1918
- package/dist/public/assets/info-OMHHGYJF-CKMkwFH6.js +0 -1
- package/dist/public/assets/isSymbol-BKUBGC2u.js +0 -1
- package/dist/public/assets/packet-4T2RLAQJ-DXn_0fd3.js +0 -1
- package/dist/public/assets/pie-ZZUOXDRM-BdZBZPW9.js +0 -1
- package/dist/public/assets/radar-PYXPWWZC-yUE2OrUV.js +0 -1
- package/dist/public/assets/stateDiagram-v2-QKLJ7IA2-BtYsWsIg.js +0 -1
- package/dist/public/assets/treeView-SZITEDCU-BjJ_gnFc.js +0 -1
- package/dist/public/assets/treemap-W4RFUUIX-DiV984fD.js +0 -1
- package/dist/public/assets/wardley-RL74JXVD-DbPCtCHV.js +0 -1
- package/dist/start-Bk23H2YC.mjs +0 -1
- /package/dist/public/assets/{__vite-browser-external-Bet_nOzq.js → __vite-browser-external-CCyf2WTU.js} +0 -0
- /package/dist/public/assets/{array-DfeqBzds.js → array-B4rubdDx.js} +0 -0
- /package/dist/public/assets/{collapsible-CYwJ8q8x.js → collapsible-DfUFsfqv.js} +0 -0
- /package/dist/public/assets/{colors-CuFmRbNJ.js → colors-DTkp5rhC.js} +0 -0
- /package/dist/public/assets/{cytoscape.esm-C3hcpWGW.js → cytoscape.esm-lL68JtBB.js} +0 -0
- /package/dist/public/assets/{defaultLocale-CmG7Nywc.js → defaultLocale-VDKImYxX.js} +0 -0
- /package/dist/public/assets/{dist-GFox5lpz.js → dist-Df8SLnPf.js} +0 -0
- /package/dist/public/assets/{go-BjDSeE19.js → go-D1ad2i41.js} +0 -0
- /package/dist/public/assets/{init-D-V7N9g_.js → init-B4uw1rya.js} +0 -0
- /package/dist/public/assets/{isObjectLike-HLvQwJYx.js → isObjectLike-DkPsJ8ZC.js} +0 -0
- /package/dist/public/assets/{katex-DX-tM4Fr.js → katex-qwlL5fSd.js} +0 -0
- /package/dist/public/assets/{label-Bdsqm1CY.js → label-D2tjsHNp.js} +0 -0
- /package/dist/public/assets/{mcp-consent-store-BPw6Zd40.js → mcp-consent-store-DncCuarR.js} +0 -0
- /package/dist/public/assets/{min-CHzARyU6.js → min-DTUJKQNu.js} +0 -0
- /package/dist/public/assets/{path-Bf8MP5yP.js → path-flVp2dgl.js} +0 -0
- /package/dist/public/assets/{pdf-wFLJduM2.js → pdf-zy6UKR6F.js} +0 -0
- /package/dist/public/assets/{pdf.worker-CP44mBOj.js → pdf.worker-CETvIAHl.js} +0 -0
- /package/dist/public/assets/{project-paths-DKT5BePl.js → project-paths-6yNxfBJd.js} +0 -0
- /package/dist/public/assets/{rough.esm-Di0388iR.js → rough.esm-pmFy2cex.js} +0 -0
- /package/dist/public/assets/{shell-184Lov7C.js → shell-FUK9YCOo.js} +0 -0
- /package/dist/public/assets/{src-Dz70a8sm.js → src-CdWhPaRj.js} +0 -0
- /package/dist/public/assets/{stex-ChE_gMQ6.js → stex-BUy0wSq4.js} +0 -0
- /package/dist/public/assets/{textarea-CQGiqhkV.js → textarea-CzzwWKq0.js} +0 -0
- /package/dist/public/assets/{trace-api-CiCjX4Sz.js → trace-api-3dczfLSc.js} +0 -0
- /package/dist/public/assets/{w3c-keyname-B5t0fahT.js → w3c-keyname-BSTW6KzM.js} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{o as e,t as n}from"./chunk-CFjPhJqf.js";import{n as r,r as i,t as a}from"./compiler-runtime-CVnuRdak.js";import{a as o,c as s,i as c,n as l,o as u,r as d,s as f,t as p}from"./panel-CxlToFCs.js";import{A as m,D as h,It as g,Lt as _,Nt as v,O as y,Vt as b,_ as x,a as S,c as C,di as w,fi as T,hi as E,kt as ee,pi as te,tr as D}from"./doc-hash-BUfOgpiD.js";import{C as ne,S as re,t as ie}from"./button-JrGyO3-P.js";import{n as ae,t as oe}from"./target-navigation-intent-Bg_vCLDN.js";import{n as se,t as ce}from"./toggle-group-BvHaWPjZ.js";import{n as le}from"./isObjectLike-HLvQwJYx.js";import{t as ue}from"./ordinal-Dk6d5Y-0.js";import{n as de,t as fe}from"./min-CHzARyU6.js";import{C as pe,S as me,_ as he,b as ge,g as _e,n as O,r as ve,t as ye,v as k,w as A,x as be,y as xe}from"./src-Dz70a8sm.js";import{t as j}from"./colors-CuFmRbNJ.js";import{n as Se,t as M}from"./now-BN_Nj6nz.js";var Ce=ne(`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`}]]),we=ne(`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 Te(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 Ee=e=>()=>e;function De(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}})}De.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function Oe(e){return!e.ctrlKey&&!e.button}function ke(){return this.parentNode}function Ae(e,n){return n??{x:e.x,y:e.y}}function je(){return navigator.maxTouchPoints||`ontouchstart`in this}function Me(){var e=Oe,n=ke,r=Ae,i=je,a={},o=A(`start`,`drag`,`end`),s=0,c,l,u,d,f=0;function p(e){e.on(`mousedown.drag`,m).filter(i).on(`touchstart.drag`,_).on(`touchmove.drag`,v,xe).on(`touchend.drag touchcancel.drag`,y).style(`touch-action`,`none`).style(`-webkit-tap-highlight-color`,`rgba(0,0,0,0)`)}function m(r,i){if(!(d||!e.call(this,r,i))){var a=b(this,n.call(this,r,i),r,i,`mouse`);a&&(pe(r.view).on(`mousemove.drag`,h,ge).on(`mouseup.drag`,g,ge),_e(r.view),be(r),u=!1,c=r.clientX,l=r.clientY,a(`start`,r))}}function h(e){if(k(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),he(e.view,u),k(e),a.mouse(`end`,e)}function _(r,i){if(e.call(this,r,i)){var a=r.changedTouches,o=n.call(this,r,i),s=a.length,c,l;for(c=0;c<s;++c)(l=b(this,o,r,i,a[c].identifier,a[c]))&&(be(r),l(`start`,r,a[c]))}}function v(e){var n=e.changedTouches,r=n.length,i,o;for(i=0;i<r;++i)(o=a[n[i].identifier])&&(k(e),o(`drag`,e,n[i]))}function y(e){var n=e.changedTouches,r=n.length,i,o;for(d&&clearTimeout(d),d=setTimeout(function(){d=null},500),i=0;i<r;++i)(o=a[n[i].identifier])&&(be(e),o(`end`,e,n[i]))}function b(e,n,i,c,l,u){var d=o.copy(),f=me(u||i,n),m,h,g;if((g=r.call(e,new De(`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=me(u||o,n),v=s;break}d.call(i,e,new De(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:Ee(!!n),p):e},p.container=function(e){return arguments.length?(n=typeof e==`function`?e:Ee(e),p):n},p.subject=function(e){return arguments.length?(r=typeof e==`function`?e:Ee(e),p):r},p.touchable=function(e){return arguments.length?(i=typeof e==`function`?e:Ee(!!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 Ne(e){let n=+this._x.call(null,e),r=+this._y.call(null,e);return Pe(this.cover(n,r),n,r,e)}function Pe(e,n,r,i){if(isNaN(n)||isNaN(r))return e;var a,o=e._root,s={data:i},c=e._x0,l=e._y0,u=e._x1,d=e._y1,f,p,m,h,g,_,v,y;if(!o)return e._root=s,e;for(;o.length;)if((g=n>=(f=(c+u)/2))?c=f:u=f,(_=r>=(p=(l+d)/2))?l=p:d=p,a=o,!(o=o[v=_<<1|g]))return a[v]=s,e;if(m=+e._x.call(null,o.data),h=+e._y.call(null,o.data),n===m&&r===h)return s.next=o,a?a[v]=s:e._root=s,e;do a=a?a[v]=[,,,,]:e._root=[,,,,],(g=n>=(f=(c+u)/2))?c=f:u=f,(_=r>=(p=(l+d)/2))?l=p:d=p;while((v=_<<1|g)==(y=(h>=p)<<1|m>=f));return a[y]=o,a[v]=s,e}function Fe(e){var n,r,i=e.length,a,o,s=Array(i),c=Array(i),l=1/0,u=1/0,d=-1/0,f=-1/0;for(r=0;r<i;++r)isNaN(a=+this._x.call(null,n=e[r]))||isNaN(o=+this._y.call(null,n))||(s[r]=a,c[r]=o,a<l&&(l=a),a>d&&(d=a),o<u&&(u=o),o>f&&(f=o));if(l>d||u>f)return this;for(this.cover(l,u).cover(d,f),r=0;r<i;++r)Pe(this,s[r],c[r],e[r]);return this}function Ie(e,n){if(isNaN(e=+e)||isNaN(n=+n))return this;var r=this._x0,i=this._y0,a=this._x1,o=this._y1;if(isNaN(r))a=(r=Math.floor(e))+1,o=(i=Math.floor(n))+1;else{for(var s=a-r||1,c=this._root,l,u;r>e||e>=a||i>n||n>=o;)switch(u=(n<i)<<1|e<r,l=[,,,,],l[u]=c,c=l,s*=2,u){case 0:a=r+s,o=i+s;break;case 1:r=a-s,o=i+s;break;case 2:a=r+s,i=o-s;break;case 3:r=a-s,i=o-s;break}this._root&&this._root.length&&(this._root=c)}return this._x0=r,this._y0=i,this._x1=a,this._y1=o,this}function Le(){var e=[];return this.visit(function(n){if(!n.length)do e.push(n.data);while(n=n.next)}),e}function N(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 P(e,n,r,i,a){this.node=e,this.x0=n,this.y0=r,this.x1=i,this.y1=a}function Re(e,n,r){var i,a=this._x0,o=this._y0,s,c,l,u,d=this._x1,f=this._y1,p=[],m=this._root,h,g;for(m&&p.push(new P(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 P(m[3],_,v,l,u),new P(m[2],s,v,_,u),new P(m[1],_,c,l,v),new P(m[0],s,c,_,v)),(g=(n>=v)<<1|e>=_)&&(h=p[p.length-1],p[p.length-1]=p[p.length-1-g],p[p.length-1-g]=h)}else{var y=e-+this._x.call(null,m.data),b=n-+this._y.call(null,m.data),x=y*y+b*b;if(x<r){var S=Math.sqrt(r=x);a=e-S,o=n-S,d=e+S,f=n+S,i=m.data}}return i}function ze(e){if(isNaN(d=+this._x.call(null,e))||isNaN(f=+this._y.call(null,e)))return this;var n,r=this._root,i,a,o,s=this._x0,c=this._y0,l=this._x1,u=this._y1,d,f,p,m,h,g,_,v;if(!r)return this;if(r.length)for(;;){if((h=d>=(p=(s+l)/2))?s=p:l=p,(g=f>=(m=(c+u)/2))?c=m:u=m,n=r,!(r=r[_=g<<1|h]))return this;if(!r.length)break;(n[_+1&3]||n[_+2&3]||n[_+3&3])&&(i=n,v=_)}for(;r.data!==e;)if(a=r,!(r=r.next))return this;return(o=r.next)&&delete r.next,a?(o?a.next=o:delete a.next,this):n?(o?n[_]=o:delete n[_],(r=n[0]||n[1]||n[2]||n[3])&&r===(n[3]||n[2]||n[1]||n[0])&&!r.length&&(i?i[v]=r:this._root=r),this):(this._root=o,this)}function F(e){for(var n=0,r=e.length;n<r;++n)this.remove(e[n]);return this}function Be(){return this._root}function Ve(){var e=0;return this.visit(function(n){if(!n.length)do++e;while(n=n.next)}),e}function He(e){var n=[],r,i=this._root,a,o,s,c,l;for(i&&n.push(new P(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 P(a,u,d,c,l)),(a=i[2])&&n.push(new P(a,o,d,u,l)),(a=i[1])&&n.push(new P(a,u,s,c,d)),(a=i[0])&&n.push(new P(a,o,s,u,d))}return this}function Ue(e){var n=[],r=[],i;for(this._root&&n.push(new P(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 P(o,s,c,d,f)),(o=a[1])&&n.push(new P(o,d,c,l,f)),(o=a[2])&&n.push(new P(o,s,f,d,u)),(o=a[3])&&n.push(new P(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 I(e){return e[0]}function We(e){return arguments.length?(this._x=e,this):this._x}function L(e){return e[1]}function Ge(e){return arguments.length?(this._y=e,this):this._y}function R(e,n,r){var i=new z(n??I,r??L,NaN,NaN,NaN,NaN);return e==null?i:i.addAll(e)}function z(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 Ke(e){for(var n={data:e.data},r=n;e=e.next;)r=r.next={data:e.data};return n}var B=R.prototype=z.prototype;B.copy=function(){var e=new z(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=Ke(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]=Ke(i));return e},B.add=Ne,B.addAll=Fe,B.cover=Ie,B.data=Le,B.extent=N,B.find=Re,B.remove=ze,B.removeAll=F,B.root=Be,B.size=Ve,B.visit=He,B.visitAfter=Ue,B.x=We,B.y=Ge;var qe=j(`a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928`),V=i(),H=e(r(),1),Je=a(),Ye=`Expected a function`,Xe=Math.max,Ze=Math.min;function Qe(e,n,r){var i,a,o,s,c,l,u=0,d=!1,f=!1,p=!0;if(typeof e!=`function`)throw TypeError(Ye);n=Se(n)||0,le(r)&&(d=!!r.leading,f=`maxWait`in r,o=f?Xe(Se(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?Ze(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=M();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(M())}function S(){var e=M(),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 $e=`Expected a function`;function et(e,n,r){var i=!0,a=!0;if(typeof e!=`function`)throw TypeError($e);return le(r)&&(i=`leading`in r?!!r.leading:i,a=`trailing`in r?!!r.trailing:a),Qe(e,n,{leading:i,maxWait:n,trailing:a})}var tt=[`#60a5fa`,`#a78bfa`,`#34d399`,`#f472b6`,`#fb923c`,`#22d3ee`,`#c084fc`,`#4ade80`,`#f87171`,`#eab308`,`#ec4899`,`#06b67f`,`#8b5cf6`,`#f43f5e`,`#0ea5e9`,`#a855f7`],nt=[`#1e40af`,`#6b21a8`,`#166534`,`#9f1239`,`#9a3412`,`#164e63`,`#581c87`,`#166534`,`#991b1b`,`#854d0e`,`#831843`,`#0f766e`,`#312e81`,`#9f1239`,`#0c4a6e`,`#6b21a8`];function rt(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 it(e,n){let r=n?tt:nt;return r[rt(e)%r.length]}var at={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 ot(e){return at[e]}function st(e){let n=(0,Je.c)(5),{clusters:r,variant:i}=e,a=i===void 0?`fullscreen`:i,{resolvedTheme:o}=E(),s=o===`dark`,c,l;if(n[0]!==r||n[1]!==s||n[2]!==a){l=Symbol.for(`react.early_return_sentinel`);bb0:{let e=ot(a);if(r.length===0){l=null;break bb0}let n=r.slice(0,e.maxEntries),i=r.length-n.length;c=(0,V.jsxs)(`div`,{className:re(`pointer-events-none absolute z-10 flex flex-col backdrop-blur-sm`,e.containerClassName,s?`bg-black/70 text-gray-200`:`bg-white/80 text-gray-800 ring-1 ring-black/5`),children:[(0,V.jsx)(`div`,{className:re(`font-medium`,e.titleClassName,s?`text-slate-300`:`text-slate-700`),children:`Clusters`}),n.map(n=>(0,V.jsxs)(`div`,{className:re(`flex items-center`,e.rowClassName),children:[(0,V.jsx)(`span`,{className:re(`inline-block shrink-0 rounded-full`,e.swatchClassName),style:{backgroundColor:it(n,s)}}),(0,V.jsx)(`span`,{className:re(`truncate`,e.labelClassName),children:n})]},n)),i>0&&(0,V.jsxs)(`div`,{className:re(`text-muted-foreground`,e.overflowClassName),children:[`+ `,i,` more`]})]})}n[0]=r,n[1]=s,n[2]=a,n[3]=c,n[4]=l}else c=n[3],l=n[4];return l===Symbol.for(`react.early_return_sentinel`)?c:l}function ct(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 lt(e,n,r){return n=bt(n),n in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function ut(e,n){return pt(e)||ct(e,n)||ht(e,n)||vt()}function dt(e){return ft(e)||mt(e)||ht(e)||_t()}function ft(e){if(Array.isArray(e))return gt(e)}function pt(e){if(Array.isArray(e))return e}function mt(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function ht(e,n){if(e){if(typeof e==`string`)return gt(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 gt(e,n)}}function gt(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 _t(){throw TypeError(`Invalid attempt to spread non-iterable instance.
|
|
1
|
+
import{o as e,t as n}from"./chunk-CFjPhJqf.js";import{n as r,r as i,t as a}from"./compiler-runtime-CVnuRdak.js";import{a as o,c as s,i as c,n as l,o as u,r as d,s as f,t as p}from"./panel-CxlToFCs.js";import{A as m,D as h,It as g,Lt as _,Nt as v,O as y,Vt as b,_ as x,a as S,c as C,di as w,fi as T,hi as E,kt as ee,pi as te,tr as D}from"./doc-hash-BrKkCdCz.js";import{C as ne,S as re,t as ie}from"./button-JrGyO3-P.js";import{n as ae,t as oe}from"./target-navigation-intent-B5Xuyiwx.js";import{n as se,t as ce}from"./toggle-group-Dzandm58.js";import{n as le}from"./isObjectLike-DkPsJ8ZC.js";import{t as ue}from"./ordinal-CdtiT3iH.js";import{n as de,t as fe}from"./min-DTUJKQNu.js";import{C as pe,S as me,_ as he,b as ge,g as _e,n as O,r as ve,t as ye,v as k,w as A,x as be,y as xe}from"./src-CdWhPaRj.js";import{t as j}from"./colors-DTkp5rhC.js";import{n as Se,t as M}from"./now-y3Cm704C.js";var Ce=ne(`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`}]]),we=ne(`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 Te(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 Ee=e=>()=>e;function De(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}})}De.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function Oe(e){return!e.ctrlKey&&!e.button}function ke(){return this.parentNode}function Ae(e,n){return n??{x:e.x,y:e.y}}function je(){return navigator.maxTouchPoints||`ontouchstart`in this}function Me(){var e=Oe,n=ke,r=Ae,i=je,a={},o=A(`start`,`drag`,`end`),s=0,c,l,u,d,f=0;function p(e){e.on(`mousedown.drag`,m).filter(i).on(`touchstart.drag`,_).on(`touchmove.drag`,v,xe).on(`touchend.drag touchcancel.drag`,y).style(`touch-action`,`none`).style(`-webkit-tap-highlight-color`,`rgba(0,0,0,0)`)}function m(r,i){if(!(d||!e.call(this,r,i))){var a=b(this,n.call(this,r,i),r,i,`mouse`);a&&(pe(r.view).on(`mousemove.drag`,h,ge).on(`mouseup.drag`,g,ge),_e(r.view),be(r),u=!1,c=r.clientX,l=r.clientY,a(`start`,r))}}function h(e){if(k(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),he(e.view,u),k(e),a.mouse(`end`,e)}function _(r,i){if(e.call(this,r,i)){var a=r.changedTouches,o=n.call(this,r,i),s=a.length,c,l;for(c=0;c<s;++c)(l=b(this,o,r,i,a[c].identifier,a[c]))&&(be(r),l(`start`,r,a[c]))}}function v(e){var n=e.changedTouches,r=n.length,i,o;for(i=0;i<r;++i)(o=a[n[i].identifier])&&(k(e),o(`drag`,e,n[i]))}function y(e){var n=e.changedTouches,r=n.length,i,o;for(d&&clearTimeout(d),d=setTimeout(function(){d=null},500),i=0;i<r;++i)(o=a[n[i].identifier])&&(be(e),o(`end`,e,n[i]))}function b(e,n,i,c,l,u){var d=o.copy(),f=me(u||i,n),m,h,g;if((g=r.call(e,new De(`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=me(u||o,n),v=s;break}d.call(i,e,new De(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:Ee(!!n),p):e},p.container=function(e){return arguments.length?(n=typeof e==`function`?e:Ee(e),p):n},p.subject=function(e){return arguments.length?(r=typeof e==`function`?e:Ee(e),p):r},p.touchable=function(e){return arguments.length?(i=typeof e==`function`?e:Ee(!!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 Ne(e){let n=+this._x.call(null,e),r=+this._y.call(null,e);return Pe(this.cover(n,r),n,r,e)}function Pe(e,n,r,i){if(isNaN(n)||isNaN(r))return e;var a,o=e._root,s={data:i},c=e._x0,l=e._y0,u=e._x1,d=e._y1,f,p,m,h,g,_,v,y;if(!o)return e._root=s,e;for(;o.length;)if((g=n>=(f=(c+u)/2))?c=f:u=f,(_=r>=(p=(l+d)/2))?l=p:d=p,a=o,!(o=o[v=_<<1|g]))return a[v]=s,e;if(m=+e._x.call(null,o.data),h=+e._y.call(null,o.data),n===m&&r===h)return s.next=o,a?a[v]=s:e._root=s,e;do a=a?a[v]=[,,,,]:e._root=[,,,,],(g=n>=(f=(c+u)/2))?c=f:u=f,(_=r>=(p=(l+d)/2))?l=p:d=p;while((v=_<<1|g)==(y=(h>=p)<<1|m>=f));return a[y]=o,a[v]=s,e}function Fe(e){var n,r,i=e.length,a,o,s=Array(i),c=Array(i),l=1/0,u=1/0,d=-1/0,f=-1/0;for(r=0;r<i;++r)isNaN(a=+this._x.call(null,n=e[r]))||isNaN(o=+this._y.call(null,n))||(s[r]=a,c[r]=o,a<l&&(l=a),a>d&&(d=a),o<u&&(u=o),o>f&&(f=o));if(l>d||u>f)return this;for(this.cover(l,u).cover(d,f),r=0;r<i;++r)Pe(this,s[r],c[r],e[r]);return this}function Ie(e,n){if(isNaN(e=+e)||isNaN(n=+n))return this;var r=this._x0,i=this._y0,a=this._x1,o=this._y1;if(isNaN(r))a=(r=Math.floor(e))+1,o=(i=Math.floor(n))+1;else{for(var s=a-r||1,c=this._root,l,u;r>e||e>=a||i>n||n>=o;)switch(u=(n<i)<<1|e<r,l=[,,,,],l[u]=c,c=l,s*=2,u){case 0:a=r+s,o=i+s;break;case 1:r=a-s,o=i+s;break;case 2:a=r+s,i=o-s;break;case 3:r=a-s,i=o-s;break}this._root&&this._root.length&&(this._root=c)}return this._x0=r,this._y0=i,this._x1=a,this._y1=o,this}function Le(){var e=[];return this.visit(function(n){if(!n.length)do e.push(n.data);while(n=n.next)}),e}function N(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 P(e,n,r,i,a){this.node=e,this.x0=n,this.y0=r,this.x1=i,this.y1=a}function Re(e,n,r){var i,a=this._x0,o=this._y0,s,c,l,u,d=this._x1,f=this._y1,p=[],m=this._root,h,g;for(m&&p.push(new P(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 P(m[3],_,v,l,u),new P(m[2],s,v,_,u),new P(m[1],_,c,l,v),new P(m[0],s,c,_,v)),(g=(n>=v)<<1|e>=_)&&(h=p[p.length-1],p[p.length-1]=p[p.length-1-g],p[p.length-1-g]=h)}else{var y=e-+this._x.call(null,m.data),b=n-+this._y.call(null,m.data),x=y*y+b*b;if(x<r){var S=Math.sqrt(r=x);a=e-S,o=n-S,d=e+S,f=n+S,i=m.data}}return i}function ze(e){if(isNaN(d=+this._x.call(null,e))||isNaN(f=+this._y.call(null,e)))return this;var n,r=this._root,i,a,o,s=this._x0,c=this._y0,l=this._x1,u=this._y1,d,f,p,m,h,g,_,v;if(!r)return this;if(r.length)for(;;){if((h=d>=(p=(s+l)/2))?s=p:l=p,(g=f>=(m=(c+u)/2))?c=m:u=m,n=r,!(r=r[_=g<<1|h]))return this;if(!r.length)break;(n[_+1&3]||n[_+2&3]||n[_+3&3])&&(i=n,v=_)}for(;r.data!==e;)if(a=r,!(r=r.next))return this;return(o=r.next)&&delete r.next,a?(o?a.next=o:delete a.next,this):n?(o?n[_]=o:delete n[_],(r=n[0]||n[1]||n[2]||n[3])&&r===(n[3]||n[2]||n[1]||n[0])&&!r.length&&(i?i[v]=r:this._root=r),this):(this._root=o,this)}function F(e){for(var n=0,r=e.length;n<r;++n)this.remove(e[n]);return this}function Be(){return this._root}function Ve(){var e=0;return this.visit(function(n){if(!n.length)do++e;while(n=n.next)}),e}function He(e){var n=[],r,i=this._root,a,o,s,c,l;for(i&&n.push(new P(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 P(a,u,d,c,l)),(a=i[2])&&n.push(new P(a,o,d,u,l)),(a=i[1])&&n.push(new P(a,u,s,c,d)),(a=i[0])&&n.push(new P(a,o,s,u,d))}return this}function Ue(e){var n=[],r=[],i;for(this._root&&n.push(new P(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 P(o,s,c,d,f)),(o=a[1])&&n.push(new P(o,d,c,l,f)),(o=a[2])&&n.push(new P(o,s,f,d,u)),(o=a[3])&&n.push(new P(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 I(e){return e[0]}function We(e){return arguments.length?(this._x=e,this):this._x}function L(e){return e[1]}function Ge(e){return arguments.length?(this._y=e,this):this._y}function R(e,n,r){var i=new z(n??I,r??L,NaN,NaN,NaN,NaN);return e==null?i:i.addAll(e)}function z(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 Ke(e){for(var n={data:e.data},r=n;e=e.next;)r=r.next={data:e.data};return n}var B=R.prototype=z.prototype;B.copy=function(){var e=new z(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=Ke(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]=Ke(i));return e},B.add=Ne,B.addAll=Fe,B.cover=Ie,B.data=Le,B.extent=N,B.find=Re,B.remove=ze,B.removeAll=F,B.root=Be,B.size=Ve,B.visit=He,B.visitAfter=Ue,B.x=We,B.y=Ge;var qe=j(`a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928`),V=i(),H=e(r(),1),Je=a(),Ye=`Expected a function`,Xe=Math.max,Ze=Math.min;function Qe(e,n,r){var i,a,o,s,c,l,u=0,d=!1,f=!1,p=!0;if(typeof e!=`function`)throw TypeError(Ye);n=Se(n)||0,le(r)&&(d=!!r.leading,f=`maxWait`in r,o=f?Xe(Se(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?Ze(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=M();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(M())}function S(){var e=M(),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 $e=`Expected a function`;function et(e,n,r){var i=!0,a=!0;if(typeof e!=`function`)throw TypeError($e);return le(r)&&(i=`leading`in r?!!r.leading:i,a=`trailing`in r?!!r.trailing:a),Qe(e,n,{leading:i,maxWait:n,trailing:a})}var tt=[`#60a5fa`,`#a78bfa`,`#34d399`,`#f472b6`,`#fb923c`,`#22d3ee`,`#c084fc`,`#4ade80`,`#f87171`,`#eab308`,`#ec4899`,`#06b67f`,`#8b5cf6`,`#f43f5e`,`#0ea5e9`,`#a855f7`],nt=[`#1e40af`,`#6b21a8`,`#166534`,`#9f1239`,`#9a3412`,`#164e63`,`#581c87`,`#166534`,`#991b1b`,`#854d0e`,`#831843`,`#0f766e`,`#312e81`,`#9f1239`,`#0c4a6e`,`#6b21a8`];function rt(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 it(e,n){let r=n?tt:nt;return r[rt(e)%r.length]}var at={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 ot(e){return at[e]}function st(e){let n=(0,Je.c)(5),{clusters:r,variant:i}=e,a=i===void 0?`fullscreen`:i,{resolvedTheme:o}=E(),s=o===`dark`,c,l;if(n[0]!==r||n[1]!==s||n[2]!==a){l=Symbol.for(`react.early_return_sentinel`);bb0:{let e=ot(a);if(r.length===0){l=null;break bb0}let n=r.slice(0,e.maxEntries),i=r.length-n.length;c=(0,V.jsxs)(`div`,{className:re(`pointer-events-none absolute z-10 flex flex-col backdrop-blur-sm`,e.containerClassName,s?`bg-black/70 text-gray-200`:`bg-white/80 text-gray-800 ring-1 ring-black/5`),children:[(0,V.jsx)(`div`,{className:re(`font-medium`,e.titleClassName,s?`text-slate-300`:`text-slate-700`),children:`Clusters`}),n.map(n=>(0,V.jsxs)(`div`,{className:re(`flex items-center`,e.rowClassName),children:[(0,V.jsx)(`span`,{className:re(`inline-block shrink-0 rounded-full`,e.swatchClassName),style:{backgroundColor:it(n,s)}}),(0,V.jsx)(`span`,{className:re(`truncate`,e.labelClassName),children:n})]},n)),i>0&&(0,V.jsxs)(`div`,{className:re(`text-muted-foreground`,e.overflowClassName),children:[`+ `,i,` more`]})]})}n[0]=r,n[1]=s,n[2]=a,n[3]=c,n[4]=l}else c=n[3],l=n[4];return l===Symbol.for(`react.early_return_sentinel`)?c:l}function ct(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 lt(e,n,r){return n=bt(n),n in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function ut(e,n){return pt(e)||ct(e,n)||ht(e,n)||vt()}function dt(e){return ft(e)||mt(e)||ht(e)||_t()}function ft(e){if(Array.isArray(e))return gt(e)}function pt(e){if(Array.isArray(e))return e}function mt(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function ht(e,n){if(e){if(typeof e==`string`)return gt(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 gt(e,n)}}function gt(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 _t(){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 vt(){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 yt(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 bt(e){var n=yt(e,`string`);return typeof n==`symbol`?n:String(n)}var xt=function(e,n){var r=new Set(n);return Object.assign.apply(Object,[{}].concat(dt(Object.entries(e).filter(function(e){var n=ut(e,1)[0];return!r.has(n)}).map(function(e){var n=ut(e,2),r=n[0],i=n[1];return lt({},r,i)}))))};function St(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 Ct(e){if(Array.isArray(e))return e}function wt(e){if(Array.isArray(e))return St(e)}function Tt(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function Et(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 Dt(){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 Ot(){throw TypeError(`Invalid attempt to spread non-iterable instance.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{o as e}from"./chunk-CFjPhJqf.js";import{n as t,r as n,t as r}from"./compiler-runtime-CVnuRdak.js";import{n as i,r as a}from"./dist-CQw2y-s3.js";import{t as o}from"./button-JrGyO3-P.js";import{a as s,c,i as l,n as u,o as d,s as f,t as p,x as m}from"./dialog-bA5Nvc2p.js";import{t as h}from"./checkbox-DlLMG5cc.js";import{t as g}from"./label-D2tjsHNp.js";import{n as _}from"./mcp-consent-store-DncCuarR.js";var v=r(),y=e(t(),1),b=n();function x(e){let t=new Set;for(let n of e)n.detected&&t.add(n.id);return t}function S(e,t){let n=new Set(e);return n.has(t)?n.delete(t):n.add(t),n}function C(e,t){let n=[];for(let r of t)e.has(r.id)&&n.push(r.id);return n}var w={error:e=>m.error(e)};function T(e){let t=(0,v.c)(9),n;t[0]===e?n=t[1]:(n=e===void 0?{}:e,t[0]=e,t[1]=n);let{store:r,toast:i,payload:a}=n,o=r===void 0?_:r,s=i===void 0?w:i,c;t[2]!==a||t[3]!==o?(c=a??o.getSnapshot(),t[2]=a,t[3]=o,t[4]=c):c=t[4];let l=c;if(!l)return null;let u;return t[5]!==l||t[6]!==o||t[7]!==s?(u=(0,b.jsx)(E,{payload:l,store:o,toast:s}),t[5]=l,t[6]=o,t[7]=s,t[8]=u):u=t[8],u}function E(e){let t=(0,v.c)(52),{payload:n,store:r,toast:m}=e,{_}=a(),w=n.detectedEditors,T;t[0]===w?T=t[1]:(T=()=>x(w),t[0]=w,t[1]=T);let[E,D]=(0,y.useState)(T),[O,k]=(0,y.useState)(!1),A=(0,y.useId)(),j;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(j=function(e){D(t=>S(t,e))},t[2]=j):j=t[2];let M=j,N;t[3]!==w||t[4]!==E||t[5]!==r||t[6]!==m?(N=async function(){k(!0);let e=await r.confirm(C(E,w));e.ok||(m.error(e.error),k(!1))},t[3]=w,t[4]=E,t[5]=r,t[6]=m,t[7]=N):N=t[7];let P=N,F;t[8]!==r||t[9]!==m?(F=async function(){k(!0);let e=await r.skip();e.ok||(m.error(e.error),k(!1))},t[8]=r,t[9]=m,t[10]=F):F=t[10];let I=F,L;t[11]!==O||t[12]!==I?(L=function(e){!e&&!O&&I()},t[11]=O,t[12]=I,t[13]=L):L=t[13];let R=L,z;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(z=(0,b.jsx)(c,{children:(0,b.jsx)(i,{id:`C0NPNd`})}),t[14]=z):z=t[14];let B;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(B=(0,b.jsxs)(f,{children:[z,(0,b.jsx)(s,{children:(0,b.jsx)(i,{id:`AThCb_`,components:{0:(0,b.jsx)(`code`,{}),1:(0,b.jsx)(`code`,{}),2:(0,b.jsx)(`code`,{}),3:(0,b.jsx)(`code`,{})}})})]}),t[15]=B):B=t[15];let V;if(t[16]!==_||t[17]!==O||t[18]!==w||t[19]!==A||t[20]!==E){let e;t[22]!==_||t[23]!==O||t[24]!==A||t[25]!==E?(e=e=>{let t=E.has(e.id),n=`${A}-${e.id}`,r=e.willReplace?_({id:`hA8GQ6`}):e.detected?_({id:`bBE5tC`}):_({id:`yu8Pzy`}),i=e.willReplace?`text-xs text-amber-600 dark:text-amber-400`:`text-xs text-muted-foreground`;return(0,b.jsx)(`li`,{children:(0,b.jsxs)(g,{htmlFor:n,className:`flex cursor-pointer items-start gap-2.5 px-3 py-2.5 font-normal hover:bg-accent`,children:[(0,b.jsx)(h,{id:n,checked:t,disabled:O,onCheckedChange:()=>M(e.id),className:`mt-0.5`,"data-testid":`mcp-consent-checkbox-${e.id}`}),(0,b.jsxs)(`span`,{className:`flex min-w-0 flex-1 flex-col gap-0.5`,children:[(0,b.jsx)(`span`,{className:`text-sm font-medium text-foreground`,children:e.label}),(0,b.jsx)(`span`,{className:i,"data-testid":`mcp-consent-status-${e.id}`,children:r})]})]})},e.id)},t[22]=_,t[23]=O,t[24]=A,t[25]=E,t[26]=e):e=t[26],V=w.map(e),t[16]=_,t[17]=O,t[18]=w,t[19]=A,t[20]=E,t[21]=V}else V=t[21];let H;t[27]===V?H=t[28]:(H=(0,b.jsx)(u,{children:(0,b.jsx)(`ul`,{className:`rounded-md border border-border bg-card/50 divide-y divide-border overflow-hidden`,children:V})}),t[27]=V,t[28]=H);let U;t[29]===I?U=t[30]:(U=()=>void I(),t[29]=I,t[30]=U);let W;t[31]===Symbol.for(`react.memo_cache_sentinel`)?(W=(0,b.jsx)(i,{id:`6Uau97`}),t[31]=W):W=t[31];let G;t[32]!==O||t[33]!==U?(G=(0,b.jsx)(o,{variant:`outline`,className:`font-mono uppercase`,onClick:U,disabled:O,"data-testid":`mcp-consent-skip`,children:W}),t[32]=O,t[33]=U,t[34]=G):G=t[34];let K;t[35]===P?K=t[36]:(K=()=>void P(),t[35]=P,t[36]=K);let q=O||E.size===0,J;t[37]===O?J=t[38]:(J=O?(0,b.jsx)(i,{id:`b4itZn`}):(0,b.jsx)(i,{id:`m16xKo`}),t[37]=O,t[38]=J);let Y;t[39]!==K||t[40]!==q||t[41]!==J?(Y=(0,b.jsx)(o,{onClick:K,disabled:q,"data-testid":`mcp-consent-add`,children:J}),t[39]=K,t[40]=q,t[41]=J,t[42]=Y):Y=t[42];let X;t[43]!==G||t[44]!==Y?(X=(0,b.jsxs)(d,{children:[G,Y]}),t[43]=G,t[44]=Y,t[45]=X):X=t[45];let Z;t[46]!==X||t[47]!==H?(Z=(0,b.jsxs)(l,{className:`sm:max-w-md`,children:[B,H,X]}),t[46]=X,t[47]=H,t[48]=Z):Z=t[48];let Q;return t[49]!==R||t[50]!==Z?(Q=(0,b.jsx)(p,{open:!0,onOpenChange:R,children:Z}),t[49]=R,t[50]=Z,t[51]=Q):Q=t[51],Q}export{T as McpConsentDialogBody,T as default,x as computeInitialSelection,C as selectedIdsOrdered,S as toggleSelectedId};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import{o as e,t}from"./chunk-CFjPhJqf.js";import{n,r,t as i}from"./compiler-runtime-CVnuRdak.js";import{An as a,E as o,M as s,Sn as c,jn as l,wn as u}from"./DocumentContext-CP8suU6i.js";import{n as d,r as f}from"./dist-CQw2y-s3.js";import{A as p,D as m,O as h,ai as g,c as _,di as v,dt as y,er as b,lt as x,oi as S,si as C,zn as w}from"./doc-hash-BrKkCdCz.js";import{C as T,S as E,g as D,t as O}from"./button-JrGyO3-P.js";import{At as k,B as A,F as j,I as M,L as N,M as ee,N as P,O as F,P as I,Q as L,R as te,U as ne,V as re,W as ie,X as ae,Z as R,_ as oe,a as se,b as ce,c as le,d as ue,f as de,g as fe,h as pe,i as me,j as he,kt as ge,l as _e,lt as ve,m as ye,n as be,o as xe,p as Se,s as Ce,tt as we,u as Te,ut as Ee,v as De,z as Oe}from"./config-validation-events-OLcd2xaS.js";import{C as ke,S as Ae,t as je,x as Me}from"./dialog-bA5Nvc2p.js";import{i as Ne}from"./collapsible-DfUFsfqv.js";import{n as Pe,t as Fe}from"./toggle-group-Dzandm58.js";import{t as Ie}from"./label-D2tjsHNp.js";var Le=T(`rotate-ccw`,[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}]]),z=i(),B=e(n(),1),Re=e=>e.type===`checkbox`,ze=e=>e instanceof Date,V=e=>e==null,Be=e=>typeof e==`object`,H=e=>!V(e)&&!Array.isArray(e)&&Be(e)&&!ze(e),Ve=e=>H(e)&&e.target?Re(e.target)?e.target.checked:e.target.value:e,He=(e,t)=>t.split(`.`).some((t,n,r)=>!isNaN(Number(t))&&e.has(r.slice(0,n).join(`.`))),Ue=e=>{let t=e.constructor&&e.constructor.prototype;return H(t)&&t.hasOwnProperty(`isPrototypeOf`)},We=typeof window<`u`&&window.HTMLElement!==void 0&&typeof document<`u`;function U(e){if(e instanceof Date)return new Date(e);let t=typeof FileList<`u`&&e instanceof FileList;if(We&&(e instanceof Blob||t))return e;let n=Array.isArray(e);if(!n&&!(H(e)&&Ue(e)))return e;let r=n?[]:Object.create(Object.getPrototypeOf(e));for(let t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[t]=U(e[t]));return r}var Ge=e=>/^\w*$/.test(e),W=e=>e===void 0,Ke=e=>Array.isArray(e)?e.filter(Boolean):[],qe=e=>Ke(e.replace(/["|']|\]/g,``).split(/\.|\[/)),G=(e,t,n)=>{if(!t||!H(e))return n;let r=(Ge(t)?[t]:qe(t)).reduce((e,t)=>V(e)?void 0:e[t],e);return W(r)||r===e?W(e[t])?n:e[t]:r},K=e=>typeof e==`boolean`,q=e=>typeof e==`function`,J=(e,t,n)=>{let r=-1,i=Ge(t)?[t]:qe(t),a=i.length,o=a-1;for(;++r<a;){let t=i[r],a=n;if(r!==o){let n=e[t];a=H(n)||Array.isArray(n)?n:isNaN(+i[r+1])?{}:[]}if(t===`__proto__`||t===`constructor`||t===`prototype`)return;e[t]=a,e=e[t]}},Je={BLUR:`blur`,FOCUS_OUT:`focusout`,CHANGE:`change`,SUBMIT:`submit`,TRIGGER:`trigger`,VALID:`valid`},Ye={onBlur:`onBlur`,onChange:`onChange`,onSubmit:`onSubmit`,onTouched:`onTouched`,all:`all`},Xe={max:`max`,min:`min`,maxLength:`maxLength`,minLength:`minLength`,pattern:`pattern`,required:`required`,validate:`validate`},Ze=`form`,Qe=`root`,$e=B.createContext(null);$e.displayName=`HookFormControlContext`;var et=()=>B.useContext($e),tt=(e,t,n,r=!0)=>{let i={defaultValues:t._defaultValues};for(let a in e)Object.defineProperty(i,a,{get:()=>{let i=a;return t._proxyFormState[i]!==Ye.all&&(t._proxyFormState[i]=!r||Ye.all),n&&(n[i]=!0),e[i]}});return i},nt=typeof window<`u`?B.useLayoutEffect:B.useEffect;function rt(e){let t=et(),{control:n=t,disabled:r,name:i,exact:a}=e||{},[o,s]=B.useState(n._formState),c=B.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return nt(()=>n._subscribe({name:i,formState:c.current,exact:a,callback:e=>{!r&&s({...n._formState,...e})}}),[i,r,a]),B.useEffect(()=>{c.current.isValid&&n._setValid(!0)},[n]),B.useMemo(()=>tt(o,n,c.current,!1),[o,n])}var Y=e=>typeof e==`string`,it=(e,t,n,r,i)=>Y(e)?(r&&t.watch.add(e),G(n,e,i)):Array.isArray(e)?e.map(e=>(r&&t.watch.add(e),G(n,e))):(r&&(t.watchAll=!0),n),at=e=>V(e)||!Be(e);function X(e,t,n=new WeakSet){if(e===t)return!0;if(at(e)||at(t))return Object.is(e,t);if(ze(e)&&ze(t))return Object.is(e.getTime(),t.getTime());let r=Object.keys(e),i=Object.keys(t);if(r.length!==i.length)return!1;if(n.has(e)||n.has(t))return!0;n.add(e),n.add(t);for(let i of r){let r=e[i];if(!(i in t))return!1;if(i!==`ref`){let e=t[i];if(ze(r)&&ze(e)||(H(r)||Array.isArray(r))&&(H(e)||Array.isArray(e))?!X(r,e,n):!Object.is(r,e))return!1}}return!0}function ot(e){let t=et(),{control:n=t,name:r,defaultValue:i,disabled:a,exact:o,compute:s}=e||{},c=B.useRef(i),l=B.useRef(s),u=B.useRef(void 0),d=B.useRef(n),f=B.useRef(r);l.current=s;let[p,m]=B.useState(()=>{let e=n._getWatch(r,c.current);return l.current?l.current(e):e}),h=B.useCallback(e=>{let t=it(r,n._names,e||n._formValues,!1,c.current);return l.current?l.current(t):t},[n._formValues,n._names,r]),g=B.useCallback(e=>{if(!a){let t=it(r,n._names,e||n._formValues,!1,c.current);if(l.current){let e=l.current(t);X(e,u.current)||(m(e),u.current=e)}else m(t)}},[n._formValues,n._names,a,r]);nt(()=>((d.current!==n||!X(f.current,r))&&(d.current=n,f.current=r,g()),n._subscribe({name:r,formState:{values:!0},exact:o,callback:e=>{g(e.values)}})),[n,o,r,g]),B.useEffect(()=>n._removeUnmounted());let _=d.current!==n,v=f.current,y=B.useMemo(()=>{if(a)return null;let e=!_&&!X(v,r);return _||e?h():null},[a,_,r,v,h]);return y===null?p:y}function st(e){let t=et(),{name:n,disabled:r,control:i=t,shouldUnregister:a,defaultValue:o,exact:s=!0}=e,c=He(i._names.array,n),l=ot({control:i,name:n,defaultValue:B.useMemo(()=>G(i._formValues,n,G(i._defaultValues,n,o)),[i,n,o]),exact:s}),u=rt({control:i,name:n,exact:s}),d=B.useRef(e),f=B.useRef(i.register(n,{...e.rules,value:l,...K(e.disabled)?{disabled:e.disabled}:{}}));d.current=e;let p=B.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!G(u.errors,n)},isDirty:{enumerable:!0,get:()=>!!G(u.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!G(u.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!G(u.validatingFields,n)},error:{enumerable:!0,get:()=>G(u.errors,n)}}),[u,n]),m=B.useCallback(e=>f.current.onChange({target:{value:Ve(e),name:n},type:Je.CHANGE}),[n]),h=B.useCallback(()=>f.current.onBlur({target:{value:G(i._formValues,n),name:n},type:Je.BLUR}),[n,i._formValues]),g=B.useCallback(e=>{let t=G(i._fields,n);t&&t._f&&e&&(t._f.ref={focus:()=>q(e.focus)&&e.focus(),select:()=>q(e.select)&&e.select(),setCustomValidity:t=>q(e.setCustomValidity)&&e.setCustomValidity(t),reportValidity:()=>q(e.reportValidity)&&e.reportValidity()})},[i._fields,n]),_=B.useMemo(()=>({name:n,value:l,...K(r)||u.disabled?{disabled:u.disabled||r}:{},onChange:m,onBlur:h,ref:g}),[n,r,u.disabled,m,h,g,l]);return B.useEffect(()=>{let e=i._options.shouldUnregister||a;i.register(n,{...d.current.rules,...K(d.current.disabled)?{disabled:d.current.disabled}:{}});let t=(e,t)=>{let n=G(i._fields,e);n&&n._f&&(n._f.mount=t)};if(t(n,!0),e){let e=U(G(i._options.defaultValues,n,d.current.defaultValue));J(i._defaultValues,n,e),W(G(i._formValues,n))&&J(i._formValues,n,e)}return!c&&i.register(n),()=>{(c?e&&!i._state.action:e)?i.unregister(n):t(n,!1)}},[n,i,c,a]),B.useEffect(()=>{i._setDisabledField({disabled:r,name:n})},[r,n,i]),B.useMemo(()=>({field:_,formState:u,fieldState:p}),[_,u,p])}var ct=e=>e.render(st(e)),lt=B.createContext(null);lt.displayName=`HookFormContext`;var ut=()=>B.useContext(lt),dt=e=>{let{children:t,watch:n,getValues:r,getFieldState:i,setError:a,clearErrors:o,setValue:s,trigger:c,formState:l,resetField:u,reset:d,handleSubmit:f,unregister:p,control:m,register:h,setFocus:g,subscribe:_}=e,v=B.useMemo(()=>({watch:n,getValues:r,getFieldState:i,setError:a,clearErrors:o,setValue:s,trigger:c,formState:l,resetField:u,reset:d,handleSubmit:f,unregister:p,control:m,register:h,setFocus:g,subscribe:_}),[o,m,l,i,r,f,h,d,u,a,g,s,_,c,p,n]);return B.createElement(lt.Provider,{value:v},B.createElement($e.Provider,{value:v.control},t))},ft=(e,t,n,r,i)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:i||!0}}:{},pt=e=>Array.isArray(e)?e:[e],mt=()=>{let e=[];return{get observers(){return e},next:t=>{for(let n of e)n.next&&n.next(t)},subscribe:t=>(e.push(t),{unsubscribe:()=>{e=e.filter(e=>e!==t)}}),unsubscribe:()=>{e=[]}}};function ht(e,t){let n={};for(let r in e)if(e.hasOwnProperty(r)){let i=e[r],a=t[r];if(i&&H(i)&&a){let e=ht(i,a);H(e)&&(n[r]=e)}else e[r]&&(n[r]=a)}return n}var Z=e=>H(e)&&!Object.keys(e).length,gt=e=>e.type===`file`,_t=e=>{if(!We)return!1;let t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},vt=e=>e.type===`select-multiple`,yt=e=>e.type===`radio`,bt=e=>yt(e)||Re(e),xt=e=>_t(e)&&e.isConnected;function St(e,t){let n=t.slice(0,-1).length,r=0;for(;r<n;){if(V(e)){e=void 0;break}e=e[t[r]],r++}return e}function Ct(e){for(let t in e)if(e.hasOwnProperty(t)&&!W(e[t]))return!1;return!0}function Q(e,t){if(Y(t)&&Object.prototype.hasOwnProperty.call(e,t))return delete e[t],e;let n=Array.isArray(t)?t:Ge(t)?[t]:qe(t),r=n.length===1?e:St(e,n),i=n.length-1,a=n[i];return r&&delete r[a],i!==0&&(H(r)&&Z(r)||Array.isArray(r)&&Ct(r))&&Q(e,n.slice(0,-1)),e}var wt=e=>{for(let t in e)if(q(e[t]))return!0;return!1};function Tt(e){return Array.isArray(e)||H(e)&&!wt(e)}function Et(e,t={}){for(let n in e){let r=e[n];Tt(r)?(t[n]=Array.isArray(r)?[]:{},Et(r,t[n])):W(r)||(t[n]=!0)}return t}function Dt(e,t,n){n||=Et(t);for(let r in e){let i=e[r];if(Tt(i))W(t)||at(n[r])?n[r]=Et(i,Array.isArray(i)?[]:{}):Dt(i,V(t)?{}:t[r],n[r]);else{let e=t[r];n[r]=!X(i,e)}}return n}var Ot={value:!1,isValid:!1},kt={value:!0,isValid:!0},At=e=>{if(Array.isArray(e)){if(e.length>1){let t=e.filter(e=>e&&e.checked&&!e.disabled).map(e=>e.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!W(e[0].attributes.value)?W(e[0].value)||e[0].value===``?kt:{value:e[0].value,isValid:!0}:kt:Ot}return Ot},jt=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>W(e)?e:t?e===``?NaN:e&&+e:n&&Y(e)?new Date(e):r?r(e):e,Mt={isValid:!1,value:null},Nt=e=>Array.isArray(e)?e.reduce((e,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:e,Mt):Mt;function Pt(e){let t=e.ref;return gt(t)?t.files:yt(t)?Nt(e.refs).value:vt(t)?[...t.selectedOptions].map(({value:e})=>e):Re(t)?At(e.refs).value:jt(W(t.value)?e.ref.value:t.value,e)}var Ft=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,It=(e,t,n,r)=>{let i={};for(let n of e){let e=G(t,n);e&&J(i,n,e._f)}return{criteriaMode:n,names:[...e],fields:i,shouldUseNativeValidation:r}},Lt=e=>e instanceof RegExp,Rt=e=>W(e)?e:Lt(e)?e.source:H(e)?Lt(e.value)?e.value.source:e.value:e,zt=e=>({isOnSubmit:!e||e===Ye.onSubmit,isOnBlur:e===Ye.onBlur,isOnChange:e===Ye.onChange,isOnAll:e===Ye.all,isOnTouch:e===Ye.onTouched}),Bt=`AsyncFunction`,Vt=e=>!!e&&!!e.validate&&!!(q(e.validate)&&e.validate.constructor.name===Bt||H(e.validate)&&Object.values(e.validate).find(e=>e.constructor.name===Bt)),Ht=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),Ut=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(t=>e.startsWith(t)&&/^\.\w+/.test(e.slice(t.length)))),Wt=(e,t,n,r)=>{for(let i of n||Object.keys(e)){let n=G(e,i);if(n){let{_f:e,...a}=n;if(e){if(e.refs&&e.refs[0]&&t(e.refs[0],i)&&!r||e.ref&&t(e.ref,e.name)&&!r)return!0;if(Wt(a,t))break}else if(H(a)&&Wt(a,t))break}}};function Gt(e,t,n){let r=G(e,n);if(r||Ge(n))return{error:r,name:n};let i=n.split(`.`);for(;i.length;){let r=i.join(`.`),a=G(t,r),o=G(e,r);if(a&&!Array.isArray(a)&&n!==r)return{name:n};if(o&&o.type)return{name:r,error:o};if(o&&o.root&&o.root.type)return{name:`${r}.root`,error:o.root};i.pop()}return{name:n}}var Kt=(e,t,n,r)=>{n(e);let{name:i,...a}=e;return Z(a)||Object.keys(a).length>=Object.keys(t).length||Object.keys(a).find(e=>t[e]===(!r||Ye.all))},qt=(e,t,n)=>!e||!t||e===t||pt(e).some(e=>e&&(n?e===t:e.startsWith(t)||t.startsWith(e))),Jt=(e,t,n,r,i)=>i.isOnAll?!1:!n&&i.isOnTouch?!(t||e):(n?r.isOnBlur:i.isOnBlur)?!e:(n?r.isOnChange:i.isOnChange)?e:!0,Yt=(e,t)=>!Ke(G(e,t)).length&&Q(e,t),Xt=(e,t,n)=>{let r=pt(G(e,n));return J(r,Qe,t[n]),J(e,n,r),e};function Zt(e,t,n=`validate`){if(Y(e)||Array.isArray(e)&&e.every(Y)||K(e)&&!e)return{type:n,message:Y(e)?e:``,ref:t}}var Qt=e=>H(e)&&!Lt(e)?e:{value:e,message:``},$t=async(e,t,n,r,i,a)=>{let{ref:o,refs:s,required:c,maxLength:l,minLength:u,min:d,max:f,pattern:p,validate:m,name:h,valueAsNumber:g,mount:_}=e._f,v=G(n,h);if(!_||t.has(h))return{};let y=s?s[0]:o,b=e=>{i&&y.reportValidity&&(y.setCustomValidity(K(e)?``:e||``),y.reportValidity())},x={},S=yt(o),C=Re(o),w=S||C,T=(g||gt(o))&&W(o.value)&&W(v)||_t(o)&&o.value===``||v===``||Array.isArray(v)&&!v.length||g&&typeof v==`number`&&isNaN(v),E=ft.bind(null,h,r,x),D=(e,t,n,r=Xe.maxLength,i=Xe.minLength)=>{let a=e?t:n;x[h]={type:e?r:i,message:a,ref:o,...E(e?r:i,a)}};if(a?!Array.isArray(v)||!v.length:c&&(!w&&(T||V(v))||K(v)&&!v||C&&!At(s).isValid||S&&!Nt(s).isValid)){let{value:e,message:t}=Y(c)?{value:!!c,message:c}:Qt(c);if(e&&(x[h]={type:Xe.required,message:t,ref:y,...E(Xe.required,t)},!r))return b(t),x}if(!T&&(!V(d)||!V(f))){let e,t,n=Qt(f),i=Qt(d);if(!V(v)&&!isNaN(v)){let r=o.valueAsNumber||v&&+v;V(n.value)||(e=r>n.value),V(i.value)||(t=r<i.value)}else{let r=o.valueAsDate||new Date(v),a=e=>new Date(new Date().toDateString()+` `+e),s=o.type==`time`,c=o.type==`week`;Y(n.value)&&v&&(e=s?a(v)>a(n.value):c?v>n.value:r>new Date(n.value)),Y(i.value)&&v&&(t=s?a(v)<a(i.value):c?v<i.value:r<new Date(i.value))}if((e||t)&&(D(!!e,n.message,i.message,Xe.max,Xe.min),!r))return b(x[h].message),x}if((l||u)&&!T&&(Y(v)||a&&Array.isArray(v))){let e=Qt(l),t=Qt(u),n=!V(e.value)&&v.length>+e.value,i=!V(t.value)&&v.length<+t.value;if((n||i)&&(D(n,e.message,t.message),!r))return b(x[h].message),x}if(p&&!T&&Y(v)){let{value:e,message:t}=Qt(p);if(Lt(e)&&!v.match(e)&&(x[h]={type:Xe.pattern,message:t,ref:o,...E(Xe.pattern,t)},!r))return b(t),x}if(m){if(q(m)){let e=Zt(await m(v,n),y);if(e&&(x[h]={...e,...E(Xe.validate,e.message)},!r))return b(e.message),x}else if(H(m)){let e={};for(let t in m){if(!Z(e)&&!r)break;let i=Zt(await m[t](v,n),y,t);i&&(e={...i,...E(t,i.message)},b(i.message),r&&(x[h]=e))}if(!Z(e)&&(x[h]={ref:y,...e},!r))return x}}return b(!0),x},en={mode:Ye.onSubmit,reValidateMode:Ye.onChange,shouldFocusError:!0};function tn(e={}){let t={...en,...e},n={submitCount:0,isDirty:!1,isReady:!1,isLoading:q(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},r={},i=(H(t.defaultValues)||H(t.values))&&U(t.defaultValues||t.values)||{},a=t.shouldUnregister?{}:U(i),o={action:!1,mount:!1,watch:!1,keepIsValid:!1},s={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set,registerName:new Set},c,l=0,u={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},d={...u},f={...d},p={array:mt(),state:mt()},m=t.criteriaMode===Ye.all,h=e=>t=>{clearTimeout(l),l=setTimeout(e,t)},g=async e=>{if(!o.keepIsValid&&!t.disabled&&(d.isValid||f.isValid||e)){let e;t.resolver?(e=Z((await T()).errors),_()):e=await O({fields:r,onlyCheckValid:!0,eventType:Je.VALID}),e!==n.isValid&&p.state.next({isValid:e})}},_=(e,r)=>{!t.disabled&&(d.isValidating||d.validatingFields||f.isValidating||f.validatingFields)&&((e||Array.from(s.mount)).forEach(e=>{e&&(r?J(n.validatingFields,e,r):Q(n.validatingFields,e))}),p.state.next({validatingFields:n.validatingFields,isValidating:!Z(n.validatingFields)}))},v=e=>{let t=Dt(i,a),r=Ft(e);J(n.dirtyFields,r,G(t,r))},y=(e,i=[],s,c,l=!0,u=!0)=>{if(c&&s&&!t.disabled){if(o.action=!0,u&&Array.isArray(G(r,e))){let t=s(G(r,e),c.argA,c.argB);l&&J(r,e,t)}if(u&&Array.isArray(G(n.errors,e))){let t=s(G(n.errors,e),c.argA,c.argB);l&&J(n.errors,e,t),Yt(n.errors,e)}if((d.touchedFields||f.touchedFields)&&u&&Array.isArray(G(n.touchedFields,e))){let t=s(G(n.touchedFields,e),c.argA,c.argB);l&&J(n.touchedFields,e,t)}(d.dirtyFields||f.dirtyFields)&&v(e),p.state.next({name:e,isDirty:A(e,i),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else J(a,e,i)},b=(e,t)=>{J(n.errors,e,t),p.state.next({errors:n.errors})},x=e=>{n.errors=e,p.state.next({errors:n.errors,isValid:!1})},S=(e,t,n,s)=>{let c=G(r,e);if(c){let r=G(a,e,W(n)?G(i,e):n);W(r)||s&&s.defaultChecked||t?J(a,e,t?r:Pt(c._f)):N(e,r),o.mount&&!o.action&&g()}},C=(e,r,a,o,s)=>{let c=!1,l=!1,u={name:e};if(!t.disabled){if(!a||o){(d.isDirty||f.isDirty)&&(l=n.isDirty,n.isDirty=u.isDirty=A(),c=l!==u.isDirty);let t=X(G(i,e),r);l=!!G(n.dirtyFields,e),t?Q(n.dirtyFields,e):J(n.dirtyFields,e,!0),u.dirtyFields=n.dirtyFields,c||=(d.dirtyFields||f.dirtyFields)&&l!==!t}if(a){let t=G(n.touchedFields,e);t||(J(n.touchedFields,e,a),u.touchedFields=n.touchedFields,c||=(d.touchedFields||f.touchedFields)&&t!==a)}c&&s&&p.state.next(u)}return c?u:{}},w=(e,r,i,a)=>{let o=G(n.errors,e),s=(d.isValid||f.isValid)&&K(r)&&n.isValid!==r;if(t.delayError&&i?(c=h(()=>b(e,i)),c(t.delayError)):(clearTimeout(l),c=null,i?J(n.errors,e,i):Q(n.errors,e)),(i?!X(o,i):o)||!Z(a)||s){let t={...a,...s&&K(r)?{isValid:r}:{},errors:n.errors,name:e};n={...n,...t},p.state.next(t)}},T=async e=>(_(e,!0),await t.resolver(a,t.context,It(e||s.mount,r,t.criteriaMode,t.shouldUseNativeValidation))),E=async e=>{let{errors:t}=await T(e);if(_(e),e)for(let r of e){let e=G(t,r);e?J(n.errors,r,e):Q(n.errors,r)}else n.errors=t;return t},D=async({name:t,eventType:r})=>{if(e.validate){let i=await e.validate({formValues:a,formState:n,name:t,eventType:r});if(H(i))for(let e in i)i[e]&&ae(`${Ze}.${e}`,{message:Y(i.message)?i.message:``,type:Xe.validate});else Y(i)||!i?ae(Ze,{message:i||``,type:Xe.validate}):ie(Ze);return i}return!0},O=async({fields:r,onlyCheckValid:i,name:o,eventType:c,context:l={valid:!0,runRootValidation:!1}})=>{if(e.validate&&(l.runRootValidation=!0,!await D({name:o,eventType:c})&&(l.valid=!1,i)))return l.valid;for(let o in r){let u=r[o];if(u){let{_f:r,...f}=u;if(r){let o=s.array.has(r.name),c=u._f&&Vt(u._f);c&&d.validatingFields&&_([r.name],!0);let f=await $t(u,s.disabled,a,m,t.shouldUseNativeValidation&&!i,o);if(c&&d.validatingFields&&_([r.name]),f[r.name]&&(l.valid=!1,i)||(!i&&(G(f,r.name)?o?Xt(n.errors,f,r.name):J(n.errors,r.name,f[r.name]):Q(n.errors,r.name)),e.shouldUseNativeValidation&&f[r.name]))break}!Z(f)&&await O({context:l,onlyCheckValid:i,fields:f,name:o,eventType:c})}}return l.valid},k=()=>{for(let e of s.unMount){let t=G(r,e);t&&(t._f.refs?t._f.refs.every(e=>!xt(e)):!xt(t._f.ref))&&ce(e)}s.unMount=new Set},A=(e,n)=>!t.disabled&&(e&&n&&J(a,e,n),!X(ne(),i)),j=(e,t,n)=>it(e,s,{...o.mount?a:W(t)?i:Y(e)?{[e]:t}:t},n,t),M=e=>Ke(G(o.mount?a:i,e,t.shouldUnregister?G(i,e,[]):[])),N=(e,t,n={})=>{let i=G(r,e),o=t;if(i){let n=i._f;n&&(!n.disabled&&J(a,e,jt(t,n)),o=_t(n.ref)&&V(t)?``:t,vt(n.ref)?[...n.ref.options].forEach(e=>e.selected=o.includes(e.value)):n.refs?Re(n.ref)?n.refs.forEach(e=>{(!e.defaultChecked||!e.disabled)&&(Array.isArray(o)?e.checked=!!o.find(t=>t===e.value):e.checked=o===e.value||!!o)}):n.refs.forEach(e=>e.checked=e.value===o):gt(n.ref)?n.ref.value=``:(n.ref.value=o,n.ref.type||p.state.next({name:e,values:U(a)})))}(n.shouldDirty||n.shouldTouch)&&C(e,o,n.shouldTouch,n.shouldDirty,!0),n.shouldValidate&&te(e)},ee=(e,t,n)=>{for(let i in t){if(!t.hasOwnProperty(i))return;let a=t[i],o=e+`.`+i,c=G(r,o);(s.array.has(e)||H(a)||c&&!c._f)&&!ze(a)?ee(o,a,n):N(o,a,n)}},P=(e,t,i={})=>{let c=G(r,e),l=s.array.has(e),u=U(t),d=X(G(a,e),u);if(J(a,e,u),l)p.array.next({name:e,values:U(a)}),i.shouldDirty&&(v(e),p.state.next({name:e,dirtyFields:n.dirtyFields,isDirty:A(e,u)}));else{let t=Array.isArray(u)&&!u.length||Z(u);!c||c._f||V(u)||t?N(e,u,i):ee(e,u,i)}d||(Ut(e,s)?p.state.next({...n,name:e,values:U(a)}):p.state.next({name:o.mount?e:void 0,values:U(a)}))},F=e=>{let t=q(e)?e(a):e;X(a,t)||(a={...a,...t},p.state.next({...n,values:a}))},I=async i=>{o.mount=!0;let l=i.target,u=l.name,h=!0,v=G(r,u),y=e=>{h=Number.isNaN(e)||ze(e)&&isNaN(e.getTime())||X(e,G(a,u,e))},b=zt(t.mode),x=zt(t.reValidateMode);if(v){let o,S,E=l.type?Pt(v._f):Ve(i),k=i.type===Je.BLUR||i.type===Je.FOCUS_OUT,A=!Ht(v._f)&&!e.validate&&!t.resolver&&!G(n.errors,u)&&!v._f.deps||Jt(k,G(n.touchedFields,u),n.isSubmitted,x,b),j=Ut(u,s,k);J(a,u,E),k?(!l||!l.readOnly)&&(v._f.onBlur&&v._f.onBlur(i),c&&c(0)):v._f.onChange&&v._f.onChange(i);let M=C(u,E,k),N=!Z(M)||j;if(!k&&p.state.next({name:u,type:i.type,values:U(a)}),A)return(d.isValid||f.isValid)&&(t.mode===`onBlur`?k&&g():k||g()),N&&p.state.next({name:u,...j?{}:M});if(!t.resolver&&e.validate&&await D({name:u,eventType:i.type}),!k&&j&&p.state.next({...n}),t.resolver){let{errors:e}=await T([u]);if(_([u]),y(E),h){let t=Gt(n.errors,r,u),i=Gt(e,r,t.name||u);o=i.error,u=i.name,S=Z(e)}}else _([u],!0),o=(await $t(v,s.disabled,a,m,t.shouldUseNativeValidation))[u],_([u]),y(E),h&&(o?S=!1:(d.isValid||f.isValid)&&(S=await O({fields:r,onlyCheckValid:!0,name:u,eventType:i.type})));h&&(v._f.deps&&(!Array.isArray(v._f.deps)||v._f.deps.length>0)&&te(v._f.deps),w(u,S,o,M))}},L=(e,t)=>{if(G(n.errors,t)&&e.focus)return e.focus(),1},te=async(e,i={})=>{let a,o,c=pt(e);if(t.resolver){let t=await E(W(e)?e:c);a=Z(t),o=e?!c.some(e=>G(t,e)):a}else e?(o=(await Promise.all(c.map(async e=>{let t=G(r,e);return await O({fields:t&&t._f?{[e]:t}:t,eventType:Je.TRIGGER})}))).every(Boolean),!(!o&&!n.isValid)&&g()):o=a=await O({fields:r,name:e,eventType:Je.TRIGGER});return p.state.next({...!Y(e)||(d.isValid||f.isValid)&&a!==n.isValid?{}:{name:e},...t.resolver||!e?{isValid:a}:{},errors:n.errors}),i.shouldFocus&&!o&&Wt(r,L,e?c:s.mount),o},ne=(e,t)=>{let r={...o.mount?a:i};return t&&(r=ht(t.dirtyFields?n.dirtyFields:n.touchedFields,r)),W(e)?r:Y(e)?G(r,e):e.map(e=>G(r,e))},re=(e,t)=>({invalid:!!G((t||n).errors,e),isDirty:!!G((t||n).dirtyFields,e),error:G((t||n).errors,e),isValidating:!!G(n.validatingFields,e),isTouched:!!G((t||n).touchedFields,e)}),ie=e=>{let t=e?pt(e):void 0;t?.forEach(e=>Q(n.errors,e)),t?t.forEach(e=>{p.state.next({name:e,errors:n.errors})}):p.state.next({errors:{}})},ae=(e,t,i)=>{let a=(G(r,e,{_f:{}})._f||{}).ref,{ref:o,message:s,type:c,...l}=G(n.errors,e)||{};J(n.errors,e,{...l,...t,ref:a}),p.state.next({name:e,errors:n.errors,isValid:!1}),i&&i.shouldFocus&&a&&a.focus&&a.focus()},R=(e,t)=>q(e)?p.state.subscribe({next:n=>`values`in n&&e(n.values||j(void 0,t),n)}):j(e,t,!0),oe=e=>p.state.subscribe({next:t=>{if(qt(e.name,t.name,e.exact)&&Kt(t,e.formState||d,ve,e.reRenderRoot)){let r={...a};e.callback({values:r,...n,...t,defaultValues:i})}}}).unsubscribe,se=e=>(o.mount=!0,f={...f,...e.formState},oe({...e,formState:{...u,...e.formState}})),ce=(e,o={})=>{for(let c of e?pt(e):s.mount)s.mount.delete(c),s.array.delete(c),o.keepValue||(Q(r,c),Q(a,c)),!o.keepError&&Q(n.errors,c),!o.keepDirty&&Q(n.dirtyFields,c),!o.keepTouched&&Q(n.touchedFields,c),!o.keepIsValidating&&Q(n.validatingFields,c),!t.shouldUnregister&&!o.keepDefaultValue&&Q(i,c);p.state.next({values:U(a)}),p.state.next({...n,...o.keepDirty?{isDirty:A()}:{}}),!o.keepIsValid&&g()},le=({disabled:e,name:t})=>{if(K(e)&&o.mount||e||s.disabled.has(t)){let n=s.disabled.has(t)!==!!e;e?s.disabled.add(t):s.disabled.delete(t),n&&o.mount&&!o.action&&g()}},ue=(e,n={})=>{let a=G(r,e),c=K(n.disabled)||K(t.disabled),l=!s.registerName.has(e)&&a&&a._f&&!a._f.mount;return J(r,e,{...a||{},_f:{...a&&a._f?a._f:{ref:{name:e}},name:e,mount:!0,...n}}),s.mount.add(e),a&&!l?le({disabled:K(n.disabled)?n.disabled:t.disabled,name:e}):S(e,!0,n.value),{...c?{disabled:n.disabled||t.disabled}:{},...t.progressive?{required:!!n.required,min:Rt(n.min),max:Rt(n.max),minLength:Rt(n.minLength),maxLength:Rt(n.maxLength),pattern:Rt(n.pattern)}:{},name:e,onChange:I,onBlur:I,ref:c=>{if(c){s.registerName.add(e),ue(e,n),s.registerName.delete(e),a=G(r,e);let t=W(c.value)&&c.querySelectorAll&&c.querySelectorAll(`input,select,textarea`)[0]||c,o=bt(t),l=a._f.refs||[];if(o?l.find(e=>e===t):t===a._f.ref)return;J(r,e,{_f:{...a._f,...o?{refs:[...l.filter(xt),t,...Array.isArray(G(i,e))?[{}]:[]],ref:{type:t.type,name:e}}:{ref:t}}}),S(e,!1,void 0,t)}else a=G(r,e,{}),a._f&&(a._f.mount=!1),(t.shouldUnregister||n.shouldUnregister)&&!(He(s.array,e)&&o.action)&&s.unMount.add(e)}}},de=()=>t.shouldFocusError&&Wt(r,L,s.mount),fe=e=>{K(e)&&(p.state.next({disabled:e}),Wt(r,(t,n)=>{let i=G(r,n);i&&(t.disabled=i._f.disabled||e,Array.isArray(i._f.refs)&&i._f.refs.forEach(t=>{t.disabled=i._f.disabled||e}))},0,!1))},pe=(e,i)=>async o=>{let c;o&&(o.preventDefault&&o.preventDefault(),o.persist&&o.persist());let l=U(a);if(p.state.next({isSubmitting:!0}),t.resolver){let{errors:e,values:t}=await T();_(),n.errors=e,l=U(t)}else await O({fields:r,eventType:Je.SUBMIT});if(s.disabled.size)for(let e of s.disabled)Q(l,e);if(Q(n.errors,Qe),Z(n.errors)){p.state.next({errors:{}});try{await e(l,o)}catch(e){c=e}}else i&&await i({...n.errors},o),de(),setTimeout(de);if(p.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Z(n.errors)&&!c,submitCount:n.submitCount+1,errors:n.errors}),c)throw c},me=(e,t={})=>{G(r,e)&&(W(t.defaultValue)?P(e,U(G(i,e))):(P(e,t.defaultValue),J(i,e,U(t.defaultValue))),t.keepTouched||Q(n.touchedFields,e),t.keepDirty||(Q(n.dirtyFields,e),n.isDirty=t.defaultValue?A(e,U(G(i,e))):A()),t.keepError||(Q(n.errors,e),d.isValid&&g()),p.state.next({...n}))},he=(e,c={})=>{let l=e?U(e):i,u=U(l),f=Z(e),m=f?i:u;if(c.keepDefaultValues||(i=l),!c.keepValues){if(c.keepDirtyValues){let e=new Set([...s.mount,...Object.keys(Dt(i,a))]);for(let t of Array.from(e)){let e=G(n.dirtyFields,t),r=G(a,t),i=G(m,t);e&&!W(r)?J(m,t,r):!e&&!W(i)&&P(t,i)}}else{if(We&&W(e))for(let e of s.mount){let t=G(r,e);if(t&&t._f){let e=Array.isArray(t._f.refs)?t._f.refs[0]:t._f.ref;if(_t(e)){let t=e.closest(`form`);if(t){t.reset();break}}}}if(c.keepFieldsRef)for(let e of s.mount)P(e,G(m,e));else r={}}a=t.shouldUnregister?c.keepDefaultValues?U(i):{}:U(m),p.array.next({values:{...m}}),p.state.next({values:{...m}})}s={mount:c.keepDirtyValues?s.mount:new Set,unMount:new Set,array:new Set,registerName:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:``},o.mount=!d.isValid||!!c.keepIsValid||!!c.keepDirtyValues||!t.shouldUnregister&&!Z(m),o.watch=!!t.shouldUnregister,o.keepIsValid=!!c.keepIsValid,o.action=!1,c.keepErrors||(n.errors={}),p.state.next({submitCount:c.keepSubmitCount?n.submitCount:0,isDirty:f?!1:c.keepDirty?n.isDirty:!!(c.keepDefaultValues&&!X(e,i)),isSubmitted:c.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:f?{}:c.keepDirtyValues?c.keepDefaultValues&&a?Dt(i,a):n.dirtyFields:c.keepDefaultValues&&e?Dt(i,e):c.keepDirty?n.dirtyFields:{},touchedFields:c.keepTouched?n.touchedFields:{},errors:c.keepErrors?n.errors:{},isSubmitSuccessful:c.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:i})},ge=(e,n)=>he(q(e)?e(a):e,{...t.resetOptions,...n}),_e=(e,t={})=>{let n=G(r,e),i=n&&n._f;if(i){let e=i.refs?i.refs[0]:i.ref;e.focus&&setTimeout(()=>{e.focus(),t.shouldSelect&&q(e.select)&&e.select()})}},ve=e=>{n={...n,...e}},ye={control:{register:ue,unregister:ce,getFieldState:re,handleSubmit:pe,setError:ae,_subscribe:oe,_runSchema:T,_updateIsValidating:_,_focusError:de,_getWatch:j,_getDirty:A,_setValid:g,_setFieldArray:y,_setDisabledField:le,_setErrors:x,_getFieldArray:M,_reset:he,_resetDefaultValues:()=>q(t.defaultValues)&&t.defaultValues().then(e=>{ge(e,t.resetOptions),p.state.next({isLoading:!1})}),_removeUnmounted:k,_disableForm:fe,_subjects:p,_proxyFormState:d,get _fields(){return r},get _formValues(){return a},get _state(){return o},set _state(e){o=e},get _defaultValues(){return i},get _names(){return s},set _names(e){s=e},get _formState(){return n},get _options(){return t},set _options(e){t={...t,...e}}},subscribe:se,trigger:te,register:ue,handleSubmit:pe,watch:R,setValue:P,setValues:F,getValues:ne,reset:ge,resetField:me,clearErrors:ie,unregister:ce,setError:ae,setFocus:_e,getFieldState:re};return{...ye,formControl:ye}}function nn(e={}){let t=B.useRef(void 0),n=B.useRef(void 0),[r,i]=B.useState({isDirty:!1,isValidating:!1,isLoading:q(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,isReady:!1,defaultValues:q(e.defaultValues)?void 0:e.defaultValues});if(!t.current)if(e.formControl)t.current={...e.formControl,formState:r},e.defaultValues&&!q(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{let{formControl:n,...i}=tn(e);t.current={...i,formState:r}}let a=t.current.control;return a._options=e,nt(()=>{let e=a._subscribe({formState:a._proxyFormState,callback:()=>i({...a._formState}),reRenderRoot:!0});return i(e=>({...e,isReady:!0})),a._formState.isReady=!0,e},[a]),B.useEffect(()=>a._disableForm(e.disabled),[a,e.disabled]),B.useEffect(()=>{e.mode&&(a._options.mode=e.mode),e.reValidateMode&&(a._options.reValidateMode=e.reValidateMode)},[a,e.mode,e.reValidateMode]),B.useEffect(()=>{e.errors&&(a._setErrors(e.errors),a._focusError())},[a,e.errors]),B.useEffect(()=>{e.shouldUnregister&&a._subjects.state.next({values:a._getWatch()})},[a,e.shouldUnregister]),B.useEffect(()=>{if(a._proxyFormState.isDirty){let e=a._getDirty();e!==r.isDirty&&a._subjects.state.next({isDirty:e})}},[a,r.isDirty]),B.useEffect(()=>{e.values&&!X(e.values,n.current)?(a._reset(e.values,{keepFieldsRef:!0,...a._options.resetOptions}),a._options.resetOptions?.keepIsValid||a._setValid(),n.current=e.values,i(e=>({...e}))):a._resetDefaultValues()},[a,e.values]),B.useEffect(()=>{a._state.mount||(a._setValid(),a._state.mount=!0),a._state.watch&&(a._state.watch=!1,a._subjects.state.next({...a._formState})),a._removeUnmounted()}),t.current.formState=B.useMemo(()=>tt(r,a),[a,r]),t.current}var $=r(),rn=dt,an=B.createContext({}),on=e=>{let t=(0,z.c)(9),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;t[2]===n.name?r=t[3]:(r={name:n.name},t[2]=n.name,t[3]=r);let i;t[4]===n?i=t[5]:(i=(0,$.jsx)(ct,{...n}),t[4]=n,t[5]=i);let a;return t[6]!==r||t[7]!==i?(a=(0,$.jsx)(an.Provider,{value:r,children:i}),t[6]=r,t[7]=i,t[8]=a):a=t[8],a},sn=()=>{let e=(0,z.c)(13),t=B.use(an),n=B.use(cn),{getFieldState:r}=ut(),i;e[0]===t.name?i=e[1]:(i={name:t.name},e[0]=t.name,e[1]=i);let a=rt(i),o;e[2]!==t.name||e[3]!==a||e[4]!==r?(o=r(t.name,a),e[2]=t.name,e[3]=a,e[4]=r,e[5]=o):o=e[5];let s=o;if(!t)throw Error(`useFormField should be used within <FormField>`);let{id:c}=n,l=`${c}-form-item`,u=`${c}-form-item-description`,d=`${c}-form-item-message`,f;return e[6]!==t.name||e[7]!==s||e[8]!==c||e[9]!==l||e[10]!==u||e[11]!==d?(f={id:c,name:t.name,formItemId:l,formDescriptionId:u,formMessageId:d,...s},e[6]=t.name,e[7]=s,e[8]=c,e[9]=l,e[10]=u,e[11]=d,e[12]=f):f=e[12],f},cn=B.createContext({});function ln(e){let t=(0,z.c)(13),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i=B.useId(),a;t[3]===i?a=t[4]:(a={id:i},t[3]=i,t[4]=a);let o;t[5]===n?o=t[6]:(o=E(`grid gap-2`,n),t[5]=n,t[6]=o);let s;t[7]!==r||t[8]!==o?(s=(0,$.jsx)(`div`,{"data-slot":`form-item`,className:o,...r}),t[7]=r,t[8]=o,t[9]=s):s=t[9];let c;return t[10]!==a||t[11]!==s?(c=(0,$.jsx)(cn.Provider,{value:a,children:s}),t[10]=a,t[11]=s,t[12]=c):c=t[12],c}function un(e){let t=(0,z.c)(10),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let{error:i,formItemId:a}=sn(),o=!!i,s;t[3]===n?s=t[4]:(s=E(`data-[error=true]:text-destructive`,n),t[3]=n,t[4]=s);let c;return t[5]!==a||t[6]!==r||t[7]!==o||t[8]!==s?(c=(0,$.jsx)(Ie,{"data-slot":`form-label`,"data-error":o,className:s,htmlFor:a,...r}),t[5]=a,t[6]=r,t[7]=o,t[8]=s,t[9]=c):c=t[9],c}function dn(e){let t=(0,z.c)(7),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let{error:r,formItemId:i,formDescriptionId:a,formMessageId:o}=sn(),s=r?`${a} ${o}`:`${a}`,c=!!r,l;return t[2]!==i||t[3]!==n||t[4]!==s||t[5]!==c?(l=(0,$.jsx)(D,{"data-slot":`form-control`,id:i,"aria-describedby":s,"aria-invalid":c,...n}),t[2]=i,t[3]=n,t[4]=s,t[5]=c,t[6]=l):l=t[6],l}function fn(e){let t=(0,z.c)(9),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let{formDescriptionId:i}=sn(),a;t[3]===n?a=t[4]:(a=E(`text-sm text-muted-foreground`,n),t[3]=n,t[4]=a);let o;return t[5]!==i||t[6]!==r||t[7]!==a?(o=(0,$.jsx)(`p`,{"data-slot":`form-description`,id:i,className:a,...r}),t[5]=i,t[6]=r,t[7]=a,t[8]=o):o=t[8],o}function pn(e){let t=(0,z.c)(11),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let{error:i,formMessageId:a}=sn(),o=i?String(i?.message??``):r.children;if(!o)return null;let s=i?`alert`:void 0,c;t[3]===n?c=t[4]:(c=E(`text-sm text-destructive`,n),t[3]=n,t[4]=c);let l;return t[5]!==o||t[6]!==a||t[7]!==r||t[8]!==s||t[9]!==c?(l=(0,$.jsx)(`p`,{"data-slot":`form-message`,id:a,role:s,className:c,...r,children:o}),t[5]=o,t[6]=a,t[7]=r,t[8]=s,t[9]=c,t[10]=l):l=t[10],l}var mn=e(t(((e,t)=>{function n(e){return Array.isArray(e)?e:[e]}var r=``,i=` `,a=`\\`,o=/^\s+$/,s=/(?:[^\\]|^)\\$/,c=/^\\!/,l=/^\\#/,u=/\r?\n/g,d=/^\.*\/|^\.+$/,f=`/`,p=`node-ignore`;typeof Symbol<`u`&&(p=Symbol.for(`node-ignore`));var m=p,h=(e,t,n)=>Object.defineProperty(e,t,{value:n}),g=/([0-z])-([0-z])/g,_=()=>!1,v=e=>e.replace(g,(e,t,n)=>t.charCodeAt(0)<=n.charCodeAt(0)?e:r),y=e=>{let{length:t}=e;return e.slice(0,t-t%2)},b=[[/^\uFEFF/,()=>r],[/((?:\\\\)*?)(\\?\s+)$/,(e,t,n)=>t+(n.indexOf(`\\`)===0?i:r)],[/(\\+?)\s/g,(e,t)=>{let{length:n}=t;return t.slice(0,n-n%2)+i}],[/[\\$.|*+(){^]/g,e=>`\\${e}`],[/(?!\\)\?/g,()=>`[^/]`],[/^\//,()=>`^`],[/\//g,()=>`\\/`],[/^\^*\\\*\\\*\\\//,()=>`^(?:.*\\/)?`],[/^(?=[^^])/,function(){return/\/(?!$)/.test(this)?`^`:`(?:^|\\/)`}],[/\\\/\\\*\\\*(?=\\\/|$)/g,(e,t,n)=>t+6<n.length?`(?:\\/[^\\/]+)*`:`\\/.+`],[/(^|[^\\]+)(\\\*)+(?=.+)/g,(e,t,n)=>t+n.replace(/\\\*/g,`[^\\/]*`)],[/\\\\\\(?=[$.|*+(){^])/g,()=>a],[/\\\\/g,()=>a],[/(\\)?\[([^\]/]*?)(\\*)($|\])/g,(e,t,n,r,i)=>t===a?`\\[${n}${y(r)}${i}`:i===`]`&&r.length%2==0?`[${v(n)}${r}]`:`[]`],[/(?:[^*])$/,e=>/\/$/.test(e)?`${e}$`:`${e}(?=$|\\/$)`],[/(\^|\\\/)?\\\*$/,(e,t)=>`${t?`${t}[^/]+`:`[^/]*`}(?=$|\\/$)`]],x=Object.create(null),S=(e,t)=>{let n=x[e];return n||(n=b.reduce((t,[n,r])=>t.replace(n,r.bind(e)),e),x[e]=n),t?new RegExp(n,`i`):new RegExp(n)},C=e=>typeof e==`string`,w=e=>e&&C(e)&&!o.test(e)&&!s.test(e)&&e.indexOf(`#`)!==0,T=e=>e.split(u),E=class{constructor(e,t,n,r){this.origin=e,this.pattern=t,this.negative=n,this.regex=r}},D=(e,t)=>{let n=e,r=!1;e.indexOf(`!`)===0&&(r=!0,e=e.substr(1)),e=e.replace(c,`!`).replace(l,`#`);let i=S(e,t);return new E(n,e,r,i)},O=(e,t)=>{throw new t(e)},k=(e,t,n)=>C(e)?e?k.isNotRelative(e)?n(`path should be a \`path.relative()\`d string, but got "${t}"`,RangeError):!0:n(`path must not be empty`,TypeError):n(`path must be a string, but got \`${t}\``,TypeError),A=e=>d.test(e);k.isNotRelative=A,k.convert=e=>e;var j=class{constructor({ignorecase:e=!0,ignoreCase:t=e,allowRelativePaths:n=!1}={}){h(this,m,!0),this._rules=[],this._ignoreCase=t,this._allowRelativePaths=n,this._initCache()}_initCache(){this._ignoreCache=Object.create(null),this._testCache=Object.create(null)}_addPattern(e){if(e&&e[m]){this._rules=this._rules.concat(e._rules),this._added=!0;return}if(w(e)){let t=D(e,this._ignoreCase);this._added=!0,this._rules.push(t)}}add(e){return this._added=!1,n(C(e)?T(e):e).forEach(this._addPattern,this),this._added&&this._initCache(),this}addPattern(e){return this.add(e)}_testOne(e,t){let n=!1,r=!1;return this._rules.forEach(i=>{let{negative:a}=i;r===a&&n!==r||a&&!n&&!r&&!t||i.regex.test(e)&&(n=!a,r=a)}),{ignored:n,unignored:r}}_test(e,t,n,r){let i=e&&k.convert(e);return k(i,e,this._allowRelativePaths?_:O),this._t(i,t,n,r)}_t(e,t,n,r){if(e in t)return t[e];if(r||=e.split(f),r.pop(),!r.length)return t[e]=this._testOne(e,n);let i=this._t(r.join(f)+f,t,n,r);return t[e]=i.ignored?i:this._testOne(e,n)}ignores(e){return this._test(e,this._ignoreCache,!1).ignored}createFilter(){return e=>!this.ignores(e)}filter(e){return n(e).filter(this.createFilter())}test(e){return this._test(e,this._testCache,!0)}},M=e=>new j(e);if(M.isPathValid=e=>k(e&&k.convert(e),e,_),M.default=M,t.exports=M,typeof process<`u`&&({}.IGNORE_TEST_WIN32||process.platform===`win32`)){k.convert=e=>/^\\\\\?\\/.test(e)||/["<>|\u0000-\u001F]+/u.test(e)?e:e.replace(/\\/g,`/`);let e=/^[a-z]:\//i;k.isNotRelative=t=>e.test(t)||A(t)}}))(),1),hn=new Map;function gn(e){let t=hn.get(e);if(t)return hn.delete(e),hn.set(e,t),t;let n=(0,mn.default)();if(n.add(e),hn.set(e,n),hn.size>256){let e=hn.keys().next().value;e!==void 0&&hn.delete(e)}return n}function _n(e,t){let n=e.trim();if(n.length===0||n.startsWith(`#`))return 0;let r=gn(n),i=0;for(let e of t)e.length!==0&&r.ignores(e)&&(i+=1);return i}var vn={"trailing-backslash":`Trailing backslash — line continuation isn't supported.`,"unmatched-bracket":`Unmatched [ — character class is open.`,"lone-bang":`Lone ! — negation needs a pattern after it.`,"leading-whitespace":`Leading whitespace — the rule may not match as expected.`,"embedded-newline":`Embedded line break — the row spans multiple lines.`};function yn(e){let t=[];if(e.length===0||e.trimStart().startsWith(`#`))return t;/[\r\n]/.test(e)&&t.push({code:`embedded-newline`,message:vn[`embedded-newline`]}),/^\s/.test(e)&&t.push({code:`leading-whitespace`,message:vn[`leading-whitespace`]});let n=e.trim();return n===`!`&&t.push({code:`lone-bang`,message:vn[`lone-bang`]}),n.endsWith(`\\`)&&t.push({code:`trailing-backslash`,message:vn[`trailing-backslash`]}),bn(n,`[`)>bn(n,`]`)&&t.push({code:`unmatched-bracket`,message:vn[`unmatched-bracket`]}),t}function bn(e,t){let n=0;for(let r=0;r<e.length;r++)e[r]===t&&n++;return n}var xn=`https://openknowledge.ai/docs/features/ignore-patterns`,Sn=1200,Cn=150,wn=150,Tn=5e3,En=600,Dn=400,On=`okignore-show-advanced`;function kn(e){let t=(0,z.c)(3),{binding:n,synced:r}=e;if(n===null||!r){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(An,{}),t[0]=e):e=t[0],e}let i;return t[1]===n?i=t[2]:(i=(0,$.jsx)(jn,{binding:n}),t[1]=n,t[2]=i),i}function An(){let e=(0,z.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,$.jsxs)(`section`,{"aria-labelledby":`settings-okignore-title`,className:`space-y-3`,"data-testid":`settings-okignore-skeleton`,children:[(0,$.jsxs)(`div`,{className:`space-y-1`,children:[(0,$.jsx)(`h3`,{id:`settings-okignore-title`,className:`text-base font-semibold`,children:(0,$.jsx)(d,{id:`3zyg_A`})}),(0,$.jsx)(Ee,{className:`h-4 w-72`})]}),(0,$.jsx)(Ee,{className:`h-20 w-full`})]}),e[0]=t):t=e[0],t}function jn(e){let t=(0,z.c)(72),{binding:n}=e,{_:r}=f(),i;t[0]===n?i=t[1]:(i=()=>n.current(),t[0]=n,t[1]=i);let[a,o]=(0,B.useState)(i),s,c;t[2]===n?(s=t[3],c=t[4]):(s=()=>n.subscribe(e=>{o(e)}),c=[n],t[2]=n,t[3]=s,t[4]=c),(0,B.useEffect)(s,c);let{pages:l,pageMeta:u,assetPaths:p}=_(),m;t[5]!==p||t[6]!==u||t[7]!==l?(m=Qn(l,u,p),t[5]=p,t[6]=u,t[7]=l,t[8]=m):m=t[8];let h=m,g,v;t[9]===a?(g=t[10],v=t[11]):(g=Te(a),v=_e(g),t[9]=a,t[10]=g,t[11]=v);let y=v,b=y.length===0,[x,S]=(0,B.useState)(null),C=(0,B.useRef)(null),T,E;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(T=()=>()=>{C.current&&clearTimeout(C.current)},E=[],t[12]=T,t[13]=E):(T=t[12],E=t[13]),(0,B.useEffect)(T,E);let D;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(D=e=>{S({key:e,ts:Date.now()}),C.current&&clearTimeout(C.current),C.current=setTimeout(()=>S(null),Sn)},t[14]=D):D=t[14];let O=D,[k,A]=(0,B.useState)(null),N=(0,B.useRef)(null),ee,P;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(P=()=>()=>{N.current&&clearTimeout(N.current)},ee=[],t[15]=ee,t[16]=P):(ee=t[15],P=t[16]),(0,B.useEffect)(P,ee);let F,I;t[17]===n?(F=t[18],I=t[19]):(F=()=>be(e=>{e.docName===`__config__/okignore`&&n.notifyRejection(e.error)}),I=[n],t[17]=n,t[18]=F,t[19]=I),(0,B.useEffect)(F,I);let L,ne;t[20]===n?(L=t[21],ne=t[22]):(L=()=>n.subscribeRejection(e=>{let{error:t}=e,n=Jn(t);A({message:n?.detail??w(t),lineNumber:n?.lineNumber,ts:Date.now()}),N.current&&clearTimeout(N.current),N.current=setTimeout(()=>A(null),Tn)}),ne=[n],t[20]=n,t[21]=L,t[22]=ne),(0,B.useEffect)(L,ne);let re,ie;t[23]===r?(re=t[24],ie=t[25]):(re=()=>me(e=>{let{path:t}=e;Me.error(r({id:`3oh0nQ`,values:{path:t}}),{description:e.error,id:`okignore-nested-error:${e.path}`,duration:8e3})}),ie=[r],t[23]=r,t[24]=re,t[25]=ie),(0,B.useEffect)(re,ie);let ae;t[26]===n?ae=t[27]:(ae=e=>{n.patch(e)},t[26]=n,t[27]=ae);let R=ae,oe;t[28]!==R||t[29]!==g||t[30]!==y?(oe=(e,t)=>{let n=t.trim(),r=y[e];if(r&&n!==r.text){if(n.length===0){R(Se(ue(g,e)));return}R(Se(Ce(g,e,n))),O(qn(n,e))}},t[28]=R,t[29]=g,t[30]=y,t[31]=oe):oe=t[31];let se=oe,ce;t[32]!==R||t[33]!==g?(ce=e=>{R(Se(ue(g,e)))},t[32]=R,t[33]=g,t[34]=ce):ce=t[34];let fe=ce,pe;t[35]!==R||t[36]!==g||t[37]!==y.length?(pe=e=>{let t=e.trim();if(t.length===0)return;let n=le(g,t);if(n>=0){O(qn(t,n));return}R(Se(xe(g,t))),O(qn(t,y.length))},t[35]=R,t[36]=g,t[37]=y.length,t[38]=pe):pe=t[38];let ge=pe,ve;t[39]!==R||t[40]!==g?(ve=e=>{let t=String(e.active.id),n=e.over?String(e.over.id):null;if(!n||t===n)return;let r=Kn(t),i=Kn(n);r<0||i<0||r===i||R(Se(de(g,r,i)))},t[39]=R,t[40]=g,t[41]=ve):ve=t[41];let ye=ve,we;t[42]===Symbol.for(`react.memo_cache_sentinel`)?(we={activationConstraint:{distance:4}},t[42]=we):we=t[42];let Ee;t[43]===Symbol.for(`react.memo_cache_sentinel`)?(Ee={coordinateGetter:he},t[43]=Ee):Ee=t[43];let De=Oe(te(M,we),te(j,Ee)),ke=k===null?null:`rejection-${k.ts}`,[Ae,je]=tr(),Ne;t[44]===Symbol.for(`react.memo_cache_sentinel`)?(Ne=(0,$.jsx)(`h3`,{id:`settings-okignore-title`,className:`text-base font-semibold`,children:(0,$.jsx)(d,{id:`3zyg_A`})}),t[44]=Ne):Ne=t[44];let Pe;t[45]===Symbol.for(`react.memo_cache_sentinel`)?(Pe=(0,$.jsxs)(`div`,{className:`space-y-1`,children:[Ne,(0,$.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:(0,$.jsx)(d,{id:`Z5h97D`,components:{0:(0,$.jsx)(`a`,{href:xn,target:`_blank`,rel:`noreferrer noopener`,className:`text-primary underline-offset-2 hover:underline`,"data-testid":`settings-okignore-primer`})}})})]}),t[45]=Pe):Pe=t[45];let Fe;t[46]===k?Fe=t[47]:(Fe=k===null?null:(0,$.jsx)(Pn,{rejection:k}),t[46]=k,t[47]=Fe);let Ie;t[48]!==n||t[49]!==h||t[50]!==ge||t[51]!==ye||t[52]!==se||t[53]!==fe||t[54]!==b||t[55]!==y||t[56]!==ke||t[57]!==x||t[58]!==De||t[59]!==Ae||t[60]!==a?(Ie=Ae?(0,$.jsx)(Mn,{binding:n,text:a}):b?(0,$.jsx)(Fn,{onAdd:ge,rejectionFlashKey:ke,filePaths:h}):(0,$.jsx)(In,{patterns:y,sensors:De,onDragEnd:ye,onEdit:se,onRemove:fe,onAdd:ge,savedFlash:x,rejectionFlashKey:ke,filePaths:h}),t[48]=n,t[49]=h,t[50]=ge,t[51]=ye,t[52]=se,t[53]=fe,t[54]=b,t[55]=y,t[56]=ke,t[57]=x,t[58]=De,t[59]=Ae,t[60]=a,t[61]=Ie):Ie=t[61];let Le;t[62]!==je||t[63]!==Ae?(Le=()=>je(!Ae),t[62]=je,t[63]=Ae,t[64]=Le):Le=t[64];let Re;t[65]!==Ae||t[66]!==Le?(Re=(0,$.jsx)(`div`,{className:`flex justify-end`,children:(0,$.jsx)(Nn,{enabled:Ae,onToggle:Le})}),t[65]=Ae,t[66]=Le,t[67]=Re):Re=t[67];let ze;return t[68]!==Fe||t[69]!==Ie||t[70]!==Re?(ze=(0,$.jsxs)(`section`,{"aria-labelledby":`settings-okignore-title`,className:`space-y-3`,"data-testid":`settings-okignore-section`,children:[Pe,Fe,Ie,Re]}),t[68]=Fe,t[69]=Ie,t[70]=Re,t[71]=ze):ze=t[71],ze}function Mn(e){let t=(0,z.c)(31),{binding:n,text:r}=e,{_:i}=f(),[a,o]=(0,B.useState)(r),s=(0,B.useRef)(r),c=(0,B.useRef)(!1),l=(0,B.useRef)(r),u=(0,B.useRef)(null),d,p;t[0]===r?(d=t[1],p=t[2]):(d=()=>{c.current||r!==s.current&&(o(r),l.current=r,s.current=r)},p=[r],t[0]=r,t[1]=d,t[2]=p),(0,B.useEffect)(d,p);let m,h;t[3]===a?(m=t[4],h=t[5]):(m=()=>{l.current=a},h=[a],t[3]=a,t[4]=m,t[5]=h),(0,B.useEffect)(m,h);let g,_;t[6]===n?(g=t[7],_=t[8]):(g=()=>()=>{u.current&&(clearTimeout(u.current),u.current=null,l.current!==s.current&&(n.patch(l.current),s.current=l.current))},_=[n],t[6]=n,t[7]=g,t[8]=_),(0,B.useEffect)(g,_);let v;t[9]===n?v=t[10]:(v=e=>{u.current&&clearTimeout(u.current),u.current=setTimeout(()=>{u.current=null,e!==s.current&&(s.current=e,n.patch(e))},Dn)},t[9]=n,t[10]=v);let y=v,b;t[11]===n?b=t[12]:(b=()=>{u.current&&=(clearTimeout(u.current),null),l.current!==s.current&&(s.current=l.current,n.patch(l.current))},t[11]=n,t[12]=b);let x=b,S;t[13]===y?S=t[14]:(S=e=>{o(e.target.value),y(e.target.value)},t[13]=y,t[14]=S);let C;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(C=()=>{c.current=!0},t[15]=C):C=t[15];let w;t[16]===x?w=t[17]:(w=()=>{c.current=!1,x()},t[16]=x,t[17]=w);let T;t[18]===a?T=t[19]:(T=a.split(`
|
|
2
|
+
`),t[18]=a,t[19]=T);let E=Math.max(6,Math.min(20,T.length+1)),D;t[20]===i?D=t[21]:(D=i({id:`rssK8c`}),t[20]=i,t[21]=D);let O;t[22]===i?O=t[23]:(O=i({id:`AeHuzT`}),t[22]=i,t[23]=O);let k;return t[24]!==a||t[25]!==w||t[26]!==E||t[27]!==D||t[28]!==O||t[29]!==S?(k=(0,$.jsx)(`textarea`,{value:a,onChange:S,onFocus:C,onBlur:w,spellCheck:!1,rows:E,"aria-label":D,placeholder:O,className:`min-h-32 w-full rounded-md border border-input bg-background px-3 py-2 font-mono text-xs outline-none transition-colors focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50`,"data-testid":`settings-okignore-advanced-textarea`}),t[24]=a,t[25]=w,t[26]=E,t[27]=D,t[28]=O,t[29]=S,t[30]=k):k=t[30],k}function Nn(e){let t=(0,z.c)(6),{enabled:n,onToggle:r}=e,i;t[0]===n?i=t[1]:(i=n?(0,$.jsx)(d,{id:`9PQysm`}):(0,$.jsx)(d,{id:`Nv3mUj`}),t[0]=n,t[1]=i);let a;return t[2]!==n||t[3]!==r||t[4]!==i?(a=(0,$.jsx)(O,{type:`button`,variant:`ghost`,size:`sm`,onClick:r,"aria-pressed":n,className:`h-7 px-2 text-xs text-muted-foreground hover:text-foreground`,"data-testid":`settings-okignore-show-advanced-toggle`,children:i}),t[2]=n,t[3]=r,t[4]=i,t[5]=a):a=t[5],a}function Pn(e){let t=(0,z.c)(7),{rejection:n}=e,{_:r}=f(),{lineNumber:i,message:a}=n,o;t[0]!==r||t[1]!==i||t[2]!==a?(o=r(i===void 0?{id:`G7-rf8`,values:{message:a}}:{id:`P3NS4G`,values:{lineNumber:i,message:a}}),t[0]=r,t[1]=i,t[2]=a,t[3]=o):o=t[3];let s=o,c;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,$.jsx)(v,{"aria-hidden":`true`,className:`mt-0.5 size-4 shrink-0`}),t[4]=c):c=t[4];let l;return t[5]===s?l=t[6]:(l=(0,$.jsxs)(`div`,{role:`status`,"aria-live":`polite`,"data-testid":`settings-okignore-rejection-banner`,className:`flex items-start gap-2 rounded-md border border-destructive/30 bg-destructive/5 px-3 py-2 text-sm text-destructive animate-in fade-in`,children:[c,(0,$.jsx)(`span`,{children:s})]}),t[5]=s,t[6]=l),l}function Fn(e){let t=(0,z.c)(8),{onAdd:n,rejectionFlashKey:r,filePaths:i}=e,{_:a}=f(),o;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,$.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:(0,$.jsx)(d,{id:`makN88`})}),t[0]=o):o=t[0];let s;t[1]===a?s=t[2]:(s=a({id:`Gx0VS1`}),t[1]=a,t[2]=s);let c;return t[3]!==i||t[4]!==n||t[5]!==r||t[6]!==s?(c=(0,$.jsxs)(`div`,{className:`space-y-3 rounded-md border border-dashed p-4`,"data-testid":`settings-okignore-empty`,children:[o,(0,$.jsx)(Bn,{onAdd:n,placeholder:s,rejectionFlashKey:r,filePaths:i})]}),t[3]=i,t[4]=n,t[5]=r,t[6]=s,t[7]=c):c=t[7],c}function In(e){let t=(0,z.c)(35),{patterns:n,sensors:r,onDragEnd:i,onEdit:a,onRemove:o,onAdd:s,savedFlash:c,rejectionFlashKey:l,filePaths:u}=e,{_:d}=f(),p;t[0]===n?p=t[1]:(p=n.map(Ln),t[0]=n,t[1]=p);let m=p,h;t[2]===d?h=t[3]:(h=d({id:`3zyg_A`}),t[2]=d,t[3]=h);let g;if(t[4]!==u||t[5]!==a||t[6]!==o||t[7]!==n||t[8]!==c){let e;t[10]!==u||t[11]!==a||t[12]!==o||t[13]!==c?(e=(e,t)=>{let n=qn(e.text,t),r=c!==null&&c.key===n;return(0,$.jsx)(Rn,{sortableId:Gn(t),patternIndex:t,pattern:e,onEdit:a,onRemove:o,flashActive:r,filePaths:u},Gn(t))},t[10]=u,t[11]=a,t[12]=o,t[13]=c,t[14]=e):e=t[14],g=n.map(e),t[4]=u,t[5]=a,t[6]=o,t[7]=n,t[8]=c,t[9]=g}else g=t[9];let _;t[15]!==h||t[16]!==g?(_=(0,$.jsx)(`ul`,{"aria-label":h,className:`divide-y rounded-md border`,"data-testid":`settings-okignore-list`,children:g}),t[15]=h,t[16]=g,t[17]=_):_=t[17];let v;t[18]!==m||t[19]!==_?(v=(0,$.jsx)(F,{items:m,strategy:P,children:_}),t[18]=m,t[19]=_,t[20]=v):v=t[20];let y;t[21]!==i||t[22]!==r||t[23]!==v?(y=(0,$.jsx)(I,{sensors:r,collisionDetection:N,onDragEnd:i,children:v}),t[21]=i,t[22]=r,t[23]=v,t[24]=y):y=t[24];let b;t[25]===d?b=t[26]:(b=d({id:`cZGNlb`}),t[25]=d,t[26]=b);let x;t[27]!==u||t[28]!==s||t[29]!==l||t[30]!==b?(x=(0,$.jsx)(Bn,{onAdd:s,placeholder:b,rejectionFlashKey:l,filePaths:u}),t[27]=u,t[28]=s,t[29]=l,t[30]=b,t[31]=x):x=t[31];let S;return t[32]!==y||t[33]!==x?(S=(0,$.jsxs)(`div`,{className:`space-y-2`,children:[y,x]}),t[32]=y,t[33]=x,t[34]=S):S=t[34],S}function Ln(e,t){return Gn(t)}function Rn(e){let t=(0,z.c)(47),{sortableId:n,patternIndex:r,pattern:i,onEdit:a,onRemove:o,flashActive:s,filePaths:c}=e,{_:l}=f(),u;t[0]===n?u=t[1]:(u={id:n},t[0]=n,t[1]=u);let{attributes:d,listeners:p,setNodeRef:m,transform:h,transition:g,isDragging:_}=ee(u),v=i.text,y;t[2]===h?y=t[3]:(y=A.Transform.toString(h),t[2]=h,t[3]=y);let b=_?.5:void 0,x=_?1:void 0,S;t[4]!==y||t[5]!==b||t[6]!==x||t[7]!==g?(S={transform:y,transition:g,opacity:b,zIndex:x},t[4]=y,t[5]=b,t[6]=x,t[7]=g,t[8]=S):S=t[8];let C=S,w;t[9]!==l||t[10]!==v?(w=l({id:`7_bFEL`,values:{patternText:v}}),t[9]=l,t[10]=v,t[11]=w):w=t[11];let T;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(T=(0,$.jsx)(ge,{className:`size-3.5`}),t[12]=T):T=t[12];let E;t[13]!==d||t[14]!==p||t[15]!==w?(E=(0,$.jsx)(O,{type:`button`,variant:`ghost`,size:`icon-sm`,"data-testid":`settings-okignore-drag-handle`,"aria-label":w,...d,...p,className:`h-7 w-4 shrink-0 cursor-grab touch-none px-0 text-muted-foreground/40 hover:text-foreground focus-visible:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring active:cursor-grabbing`,children:T}),t[13]=d,t[14]=p,t[15]=w,t[16]=E):E=t[16];let D;t[17]!==a||t[18]!==r?(D=e=>a(r,e),t[17]=a,t[18]=r,t[19]=D):D=t[19];let k;t[20]!==c||t[21]!==i.text||t[22]!==r||t[23]!==D?(k=(0,$.jsx)(zn,{patternIndex:r,initialText:i.text,onCommit:D,filePaths:c}),t[20]=c,t[21]=i.text,t[22]=r,t[23]=D,t[24]=k):k=t[24];let j;t[25]===s?j=t[26]:(j=(0,$.jsx)(Wn,{visible:s}),t[25]=s,t[26]=j);let M;t[27]!==l||t[28]!==v?(M=l({id:`S9Vnum`,values:{patternText:v}}),t[27]=l,t[28]=v,t[29]=M):M=t[29];let N;t[30]!==o||t[31]!==r?(N=()=>o(r),t[30]=o,t[31]=r,t[32]=N):N=t[32];let P;t[33]===Symbol.for(`react.memo_cache_sentinel`)?(P=(0,$.jsx)(Ae,{className:`size-3.5`}),t[33]=P):P=t[33];let F;t[34]!==M||t[35]!==N?(F=(0,$.jsx)(O,{type:`button`,variant:`ghost`,size:`icon-sm`,"data-testid":`settings-okignore-remove`,"aria-label":M,onClick:N,className:`h-7 w-7 shrink-0 text-muted-foreground hover:text-destructive`,children:P}),t[34]=M,t[35]=N,t[36]=F):F=t[36];let I;t[37]!==k||t[38]!==j||t[39]!==F||t[40]!==E?(I=(0,$.jsxs)(`div`,{className:`flex items-center gap-1`,children:[E,k,j,F]}),t[37]=k,t[38]=j,t[39]=F,t[40]=E,t[41]=I):I=t[41];let L;return t[42]!==r||t[43]!==m||t[44]!==C||t[45]!==I?(L=(0,$.jsx)(`li`,{ref:m,style:C,className:`flex flex-col gap-0.5 px-2 py-1.5`,"data-testid":`settings-okignore-row`,"data-pattern-index":r,children:I}),t[42]=r,t[43]=m,t[44]=C,t[45]=I,t[46]=L):L=t[46],L}function zn(e){let t=(0,z.c)(31),{patternIndex:n,initialText:r,onCommit:i,filePaths:a}=e,{_:o}=f(),[s,c]=(0,B.useState)(r),l=(0,B.useRef)(r),u=(0,B.useRef)(!1),d,p;t[0]===r?(d=t[1],p=t[2]):(d=()=>{u.current||r!==l.current&&(c(r),l.current=r)},p=[r],t[0]=r,t[1]=d,t[2]=p),(0,B.useEffect)(d,p);let m=Yn(s),h=Xn(s,a),g=n+1,_;t[3]!==s||t[4]!==i?(_=()=>{s!==l.current&&(l.current=s,i(s))},t[3]=s,t[4]=i,t[5]=_):_=t[5];let v=_,y,b;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(y=e=>c(e.target.value),b=()=>{u.current=!0},t[6]=y,t[7]=b):(y=t[6],b=t[7]);let x;t[8]===v?x=t[9]:(x=()=>{u.current=!1,v()},t[8]=v,t[9]=x);let S;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(S=e=>{e.key===`Enter`?(e.preventDefault(),e.currentTarget.blur()):e.key===`Escape`&&(e.preventDefault(),c(l.current),e.currentTarget.blur())},t[10]=S):S=t[10];let C;t[11]!==o||t[12]!==g?(C=o({id:`-YV1Uo`,values:{patternNumber:g}}),t[11]=o,t[12]=g,t[13]=C):C=t[13];let w=m.length>0?`border-amber-500/60 focus-visible:ring-amber-500/40`:``,T;t[14]===w?T=t[15]:(T=E(`h-7 flex-1 font-mono text-xs`,w),t[14]=w,t[15]=T);let D;t[16]!==s||t[17]!==T||t[18]!==x||t[19]!==C?(D=(0,$.jsx)(Ne,{value:s,onChange:y,onFocus:b,onBlur:x,onKeyDown:S,"aria-label":C,className:T,"data-testid":`settings-okignore-row-input`}),t[16]=s,t[17]=T,t[18]=x,t[19]=C,t[20]=D):D=t[20];let O;t[21]===m?O=t[22]:(O=(0,$.jsx)(Vn,{warnings:m}),t[21]=m,t[22]=O);let k;t[23]!==D||t[24]!==O?(k=(0,$.jsxs)(`div`,{className:`flex min-w-0 items-center gap-1`,children:[D,O]}),t[23]=D,t[24]=O,t[25]=k):k=t[25];let A;t[26]===h?A=t[27]:(A=(0,$.jsx)(Zn,{count:h}),t[26]=h,t[27]=A);let j;return t[28]!==k||t[29]!==A?(j=(0,$.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col`,children:[k,A]}),t[28]=k,t[29]=A,t[30]=j):j=t[30],j}function Bn(e){let t=(0,z.c)(34),{onAdd:n,placeholder:r,rejectionFlashKey:i,filePaths:a}=e,{_:o}=f(),[s,c]=(0,B.useState)(``),l=Yn(s),u=Xn(s,a),p=rr(i),m;t[0]!==n||t[1]!==s?(m=()=>{let e=s.trim();e.length!==0&&(n(e),c(``))},t[0]=n,t[1]=s,t[2]=m):m=t[2];let h=m,g;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(g=e=>c(e.target.value),t[3]=g):g=t[3];let _;t[4]===h?_=t[5]:(_=e=>{e.key===`Enter`&&(e.preventDefault(),h())},t[4]=h,t[5]=_);let v;t[6]===o?v=t[7]:(v=o({id:`p9sdCy`}),t[6]=o,t[7]=v);let y=p?`border-destructive ring-2 ring-destructive/30 focus-visible:ring-destructive/50`:l.length>0?`border-amber-500/60 focus-visible:ring-amber-500/40`:``,b;t[8]===y?b=t[9]:(b=E(`h-8 text-sm`,y),t[8]=y,t[9]=b);let x=p?`true`:void 0,S;t[10]!==s||t[11]!==r||t[12]!==_||t[13]!==v||t[14]!==b||t[15]!==x?(S=(0,$.jsx)(Ne,{value:s,onChange:g,onKeyDown:_,placeholder:r,"aria-label":v,className:b,"data-testid":`settings-okignore-add-input`,"data-rejection-flashing":x}),t[10]=s,t[11]=r,t[12]=_,t[13]=v,t[14]=b,t[15]=x,t[16]=S):S=t[16];let C;t[17]===l?C=t[18]:(C=(0,$.jsx)(Vn,{warnings:l}),t[17]=l,t[18]=C);let w;t[19]===s?w=t[20]:(w=s.trim(),t[19]=s,t[20]=w);let T=w.length===0,D;t[21]===Symbol.for(`react.memo_cache_sentinel`)?(D=(0,$.jsx)(d,{id:`BY-g4_`}),t[21]=D):D=t[21];let k;t[22]!==h||t[23]!==T?(k=(0,$.jsx)(O,{size:`sm`,onClick:h,disabled:T,"data-testid":`settings-okignore-add-button`,children:D}),t[22]=h,t[23]=T,t[24]=k):k=t[24];let A;t[25]!==k||t[26]!==S||t[27]!==C?(A=(0,$.jsxs)(`div`,{className:`flex items-center gap-2`,children:[S,C,k]}),t[25]=k,t[26]=S,t[27]=C,t[28]=A):A=t[28];let j;t[29]===u?j=t[30]:(j=(0,$.jsx)(Zn,{count:u}),t[29]=u,t[30]=j);let M;return t[31]!==A||t[32]!==j?(M=(0,$.jsxs)(`div`,{className:`flex flex-col gap-0.5`,"data-testid":`settings-okignore-add`,children:[A,j]}),t[31]=A,t[32]=j,t[33]=M):M=t[33],M}function Vn(e){let t=(0,z.c)(31),{warnings:n}=e,{_:r}=f();if(n.length===0){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(`span`,{"aria-hidden":`true`,className:`flex w-4 shrink-0 justify-center`,"data-testid":`settings-okignore-warning-indicator`,"data-warnings":`0`}),t[0]=e):e=t[0],e}let i,a,o,s,c,l,u;t[1]!==r||t[2]!==n?(o=n.map(Un).join(` `),a=m,i=p,u=!0,s=`status`,c=`polite`,l=r({id:`NORKZU`,values:{summary:o}}),t[1]=r,t[2]=n,t[3]=i,t[4]=a,t[5]=o,t[6]=s,t[7]=c,t[8]=l,t[9]=u):(i=t[3],a=t[4],o=t[5],s=t[6],c=t[7],l=t[8],u=t[9]);let d=String(n.length),g;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(g=(0,$.jsx)(v,{"aria-hidden":`true`,className:`size-3.5`}),t[10]=g):g=t[10];let _;t[11]===o?_=t[12]:(_=(0,$.jsx)(`span`,{className:`sr-only`,children:o}),t[11]=o,t[12]=_);let y;t[13]!==s||t[14]!==c||t[15]!==l||t[16]!==d||t[17]!==_?(y=(0,$.jsxs)(`span`,{role:s,"aria-live":c,"aria-label":l,className:`flex w-4 shrink-0 cursor-help justify-center text-amber-500`,"data-testid":`settings-okignore-warning-indicator`,"data-warnings":d,children:[g,_]}),t[13]=s,t[14]=c,t[15]=l,t[16]=d,t[17]=_,t[18]=y):y=t[18];let b;t[19]!==i||t[20]!==u||t[21]!==y?(b=(0,$.jsx)(i,{asChild:u,children:y}),t[19]=i,t[20]=u,t[21]=y,t[22]=b):b=t[22];let x;t[23]===n?x=t[24]:(x=n.map(Hn),t[23]=n,t[24]=x);let S;t[25]===x?S=t[26]:(S=(0,$.jsx)(h,{side:`top`,className:`max-w-xs`,children:(0,$.jsx)(`ul`,{className:`list-disc space-y-1 pl-4`,children:x})}),t[25]=x,t[26]=S);let C;return t[27]!==a||t[28]!==S||t[29]!==b?(C=(0,$.jsxs)(a,{children:[b,S]}),t[27]=a,t[28]=S,t[29]=b,t[30]=C):C=t[30],C}function Hn(e){return(0,$.jsx)(`li`,{children:e.message},e.code)}function Un(e){return e.message}function Wn(e){let t=(0,z.c)(4),{visible:n}=e,r;t[0]===n?r=t[1]:(r=n?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(ke,{"aria-hidden":`true`,className:`size-3.5`}),(0,$.jsx)(`span`,{className:`sr-only`,children:(0,$.jsx)(d,{id:`idD8Ev`})})]}):null,t[0]=n,t[1]=r);let i;return t[2]===r?i=t[3]:(i=(0,$.jsx)(`span`,{role:`status`,"aria-live":`polite`,className:`flex w-4 shrink-0 justify-center text-emerald-600`,"data-testid":`settings-okignore-saved-indicator`,children:r}),t[2]=r,t[3]=i),i}function Gn(e){return`okignore-pattern-${e}`}function Kn(e){let t=e.match(/^okignore-pattern-(\d+)$/);if(!t)return-1;let n=Number.parseInt(t[1]??``,10);return Number.isNaN(n)?-1:n}function qn(e,t){return`${t}::${e}`}function Jn(e){return!b(e)||e.code!==`OKIGNORE_INVALID`?null:{detail:e.detail,lineNumber:e.lineNumber}}function Yn(e){let t=(0,z.c)(5),n;t[0]===e?n=t[1]:(n=()=>e.length===0?[]:yn(e),t[0]=e,t[1]=n);let[r,i]=(0,B.useState)(n),a,o;return t[2]===e?(a=t[3],o=t[4]):(a=()=>{if(e.length===0){i([]);return}let t=setTimeout(()=>{i(yn(e))},Cn);return()=>clearTimeout(t)},o=[e],t[2]=e,t[3]=a,t[4]=o),(0,B.useEffect)(a,o),r}function Xn(e,t){let n=(0,z.c)(9),r;n[0]===e?r=n[1]:(r=e.trim(),n[0]=e,n[1]=r);let i=r,a;n[2]!==t||n[3]!==i?(a=()=>i.length===0?null:_n(i,t),n[2]=t,n[3]=i,n[4]=a):a=n[4];let[o,s]=(0,B.useState)(a),c,l;return n[5]!==t||n[6]!==i?(c=()=>{if(i.length===0){s(null);return}let e=setTimeout(()=>{s(_n(i,t))},wn);return()=>clearTimeout(e)},l=[i,t],n[5]=t,n[6]=i,n[7]=c,n[8]=l):(c=n[7],l=n[8]),(0,B.useEffect)(c,l),o}function Zn(e){let t=(0,z.c)(12),{count:n}=e;if(n===null){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(`span`,{"aria-hidden":`true`,className:`block h-3.5`,"data-testid":`settings-okignore-preview`,"data-preview-state":`hidden`}),t[0]=e):e=t[0],e}let r=n===0,i=String(n),a=r?`text-muted-foreground/70`:`text-muted-foreground`,o;t[1]===a?o=t[2]:(o=E(`block text-xs`,a),t[1]=a,t[2]=o);let s;t[3]===n?s=t[4]:(s=(0,$.jsx)(d,{id:`-3Qbv7`,values:{count:n}}),t[3]=n,t[4]=s);let c;t[5]===r?c=t[6]:(c=r?(0,$.jsx)(`span`,{className:`ml-1 text-muted-foreground/60`,children:(0,$.jsx)(d,{id:`5kWklo`})}):null,t[5]=r,t[6]=c);let l;return t[7]!==i||t[8]!==o||t[9]!==s||t[10]!==c?(l=(0,$.jsxs)(`span`,{role:`status`,"aria-live":`polite`,"data-testid":`settings-okignore-preview`,"data-preview-state":`visible`,"data-preview-count":i,className:o,children:[s,c]}),t[7]=i,t[8]=o,t[9]=s,t[10]=c,t[11]=l):l=t[11],l}function Qn(e,t,n){let r=[];for(let n of e){let e=t.get(n)?.docExt??`.md`;r.push(n+e)}for(let e of n)r.push(e);return r}function $n(){try{return globalThis.localStorage?.getItem(On)===`true`}catch{return!1}}function er(e){try{globalThis.localStorage?.setItem(On,e?`true`:`false`)}catch(e){console.debug(`[OkignoreSection] localStorage unavailable; advanced toggle will not persist:`,e)}}function tr(){let e=(0,z.c)(3),[t,n]=(0,B.useState)(nr),r;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=e=>{n(e),er(e)},e[0]=r):r=e[0];let i=r,a;return e[1]===t?a=e[2]:(a=[t,i],e[1]=t,e[2]=a),a}function nr(){return $n()}function rr(e){let t=(0,z.c)(3),[n,r]=(0,B.useState)(!1),i,a;return t[0]===e?(i=t[1],a=t[2]):(i=()=>{if(e===null)return;r(!0);let t=setTimeout(()=>r(!1),En);return()=>clearTimeout(t)},a=[e],t[0]=e,t[1]=i,t[2]=a),(0,B.useEffect)(i,a),n}function ir(e){let t=(0,z.c)(86),{config:n}=e,{_:r}=f(),{state:i,refresh:a}=ve(``),[o,s]=(0,B.useState)(null),[c,l]=(0,B.useState)(null),[u,p]=(0,B.useState)(!1),[m,h]=(0,B.useState)(!1),g,_,v,y,b,x,S,C,w,T;if(t[0]!==r||t[1]!==n||t[2]!==m||t[3]!==a||t[4]!==i){T=Symbol.for(`react.early_return_sentinel`);bb0:{let e=i.status===`ready`?(i.data.folder.templates_available??[]).filter(e=>e.scope===n.scope).sort(or):[],o;if(t[15]!==r||t[16]!==a?(o=async function(e){p(!0);let t=await ce(``,e.name);if(p(!1),!t.ok){let{error:e}=t;Me.error(r({id:`yOGrCR`,values:{error:e}}));return}let{name:n}=e;Me.success(r({id:`I23A-U`,values:{name:n}})),l(null),a()},t[15]=r,t[16]=a,t[17]=o):o=t[17],_=o,i.status===`error`){let{loadErrorTitle:e}=n,{message:r}=i,o=`settings-${n.testIdPrefix}-section`,s;t[18]===Symbol.for(`react.memo_cache_sentinel`)?(s=()=>h(!0),t[18]=s):s=t[18];let c;t[19]!==n.description||t[20]!==n.settingsId||t[21]!==n.testIdPrefix||t[22]!==n.title?(c=(0,$.jsx)(sr,{settingsId:n.settingsId,testIdPrefix:n.testIdPrefix,title:n.title,description:n.description,onNewClick:s}),t[19]=n.description,t[20]=n.settingsId,t[21]=n.testIdPrefix,t[22]=n.title,t[23]=c):c=t[23];let l;t[24]!==e||t[25]!==r?(l=(0,$.jsx)(`div`,{className:`rounded-lg border border-destructive/30 bg-destructive/5 p-4 text-sm text-destructive`,role:`alert`,children:(0,$.jsx)(d,{id:`uH_S-u`,values:{loadErrorTitle:e,message:r}})}),t[24]=e,t[25]=r,t[26]=l):l=t[26];let u;t[27]===Symbol.for(`react.memo_cache_sentinel`)?(u=new Set,t[27]=u):u=t[27];let f;t[28]!==m||t[29]!==a?(f=(0,$.jsx)(oe,{folderPath:``,existingNames:u,open:m,onOpenChange:h,onCreated:a}),t[28]=m,t[29]=a,t[30]=f):f=t[30];let p;t[31]!==n.settingsId||t[32]!==o||t[33]!==c||t[34]!==l||t[35]!==f?(p=(0,$.jsxs)(`section`,{className:`space-y-3`,"aria-labelledby":n.settingsId,"data-testid":o,children:[c,l,f]}),t[31]=n.settingsId,t[32]=o,t[33]=c,t[34]=l,t[35]=f,t[36]=p):p=t[36],T=p;break bb0}if(i.status===`idle`||i.status===`loading`){let e=`settings-${n.testIdPrefix}-section`,r;t[37]!==n.description||t[38]!==n.settingsId||t[39]!==n.testIdPrefix||t[40]!==n.title?(r=(0,$.jsx)(sr,{settingsId:n.settingsId,testIdPrefix:n.testIdPrefix,title:n.title,description:n.description}),t[37]=n.description,t[38]=n.settingsId,t[39]=n.testIdPrefix,t[40]=n.title,t[41]=r):r=t[41];let i;t[42]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,$.jsxs)(`div`,{className:`rounded-lg border bg-card p-3 space-y-2`,children:[(0,$.jsx)(Ee,{className:`h-12 w-full`}),(0,$.jsx)(Ee,{className:`h-12 w-full`})]}),t[42]=i):i=t[42];let a;t[43]!==n.settingsId||t[44]!==e||t[45]!==r?(a=(0,$.jsxs)(`section`,{className:`space-y-3`,"aria-labelledby":n.settingsId,"data-testid":e,children:[r,i]}),t[43]=n.settingsId,t[44]=e,t[45]=r,t[46]=a):a=t[46],T=a;break bb0}b=`space-y-3`,x=n.settingsId,S=`settings-${n.testIdPrefix}-section`;let c;t[47]===Symbol.for(`react.memo_cache_sentinel`)?(c=()=>h(!0),t[47]=c):c=t[47],t[48]!==n.description||t[49]!==n.settingsId||t[50]!==n.testIdPrefix||t[51]!==n.title?(C=(0,$.jsx)(sr,{settingsId:n.settingsId,testIdPrefix:n.testIdPrefix,title:n.title,description:n.description,onNewClick:c}),t[48]=n.description,t[49]=n.settingsId,t[50]=n.testIdPrefix,t[51]=n.title,t[52]=C):C=t[52];let u=e.length===0?(0,$.jsx)(`p`,{className:`px-3 py-4 text-sm text-muted-foreground`,"data-testid":`settings-${n.testIdPrefix}-empty`,children:n.emptyMessage}):(0,$.jsx)(`ul`,{className:`space-y-1 p-2`,"data-testid":`settings-${n.testIdPrefix}-list`,children:e.map(e=>(0,$.jsx)(cr,{template:e,badge:n.badge,testIdPrefix:n.testIdPrefix,onEdit:()=>s(e),onDelete:()=>l(e)},e.name))});t[53]===u?w=t[54]:(w=(0,$.jsx)(`div`,{className:`rounded-lg border bg-card`,children:u}),t[53]=u,t[54]=w),g=oe,v=``,y=new Set(e.map(ar))}t[0]=r,t[1]=n,t[2]=m,t[3]=a,t[4]=i,t[5]=g,t[6]=_,t[7]=v,t[8]=y,t[9]=b,t[10]=x,t[11]=S,t[12]=C,t[13]=w,t[14]=T}else g=t[5],_=t[6],v=t[7],y=t[8],b=t[9],x=t[10],S=t[11],C=t[12],w=t[13],T=t[14];if(T!==Symbol.for(`react.early_return_sentinel`))return T;let E;t[55]!==g||t[56]!==m||t[57]!==a||t[58]!==v||t[59]!==y?(E=(0,$.jsx)(g,{folderPath:v,existingNames:y,open:m,onOpenChange:h,onCreated:a}),t[55]=g,t[56]=m,t[57]=a,t[58]=v,t[59]=y,t[60]=E):E=t[60];let D;t[61]===Symbol.for(`react.memo_cache_sentinel`)?(D=e=>{e||s(null)},t[61]=D):D=t[61];let O;t[62]!==o||t[63]!==a?(O=(0,$.jsx)(fe,{folderPath:``,template:o,onOpenChange:D,onSaved:a}),t[62]=o,t[63]=a,t[64]=O):O=t[64];let k=!!c,A;t[65]===u?A=t[66]:(A=e=>{!e&&!u&&l(null)},t[65]=u,t[66]=A);let j;t[67]!==n.deleteWarning||t[68]!==n.itemNoun||t[69]!==c||t[70]!==u||t[71]!==_?(j=c&&(0,$.jsx)(De,{itemName:`${n.itemNoun} "${c.name}"`,isSubmitting:u,onDelete:()=>_(c),customDescription:n.deleteWarning}),t[67]=n.deleteWarning,t[68]=n.itemNoun,t[69]=c,t[70]=u,t[71]=_,t[72]=j):j=t[72];let M;t[73]!==k||t[74]!==A||t[75]!==j?(M=(0,$.jsx)(je,{open:k,onOpenChange:A,children:j}),t[73]=k,t[74]=A,t[75]=j,t[76]=M):M=t[76];let N;return t[77]!==O||t[78]!==M||t[79]!==b||t[80]!==x||t[81]!==S||t[82]!==C||t[83]!==w||t[84]!==E?(N=(0,$.jsxs)(`section`,{className:b,"aria-labelledby":x,"data-testid":S,children:[C,w,E,O,M]}),t[77]=O,t[78]=M,t[79]=b,t[80]=x,t[81]=S,t[82]=C,t[83]=w,t[84]=E,t[85]=N):N=t[85],N}function ar(e){return e.name}function or(e,t){let n=(e.title??e.name).toLowerCase(),r=(t.title??t.name).toLowerCase();return n.localeCompare(r)}function sr(e){let t=(0,z.c)(14),{settingsId:n,testIdPrefix:r,title:i,description:o,onNewClick:s}=e,c;t[0]!==n||t[1]!==i?(c=(0,$.jsx)(`h3`,{id:n,className:`text-base font-semibold`,children:i}),t[0]=n,t[1]=i,t[2]=c):c=t[2];let l;t[3]===o?l=t[4]:(l=(0,$.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:o}),t[3]=o,t[4]=l);let u;t[5]!==c||t[6]!==l?(u=(0,$.jsxs)(`div`,{children:[c,l]}),t[5]=c,t[6]=l,t[7]=u):u=t[7];let f;t[8]!==s||t[9]!==r?(f=s?(0,$.jsxs)(O,{variant:`outline`,size:`sm`,className:`font-mono uppercase shrink-0`,onClick:s,"data-testid":`settings-${r}-new-button`,children:[(0,$.jsx)(a,{className:`size-3.5`,"aria-hidden":!0}),(0,$.jsx)(d,{id:`G1Gw0v`})]}):null,t[8]=s,t[9]=r,t[10]=f):f=t[10];let p;return t[11]!==u||t[12]!==f?(p=(0,$.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[u,f]}),t[11]=u,t[12]=f,t[13]=p):p=t[13],p}function cr(e){let t=(0,z.c)(46),{template:n,badge:r,testIdPrefix:i,onEdit:a,onDelete:o}=e,{_:s}=f(),p=n.title&&n.title!==n.name,m=n.title??n.name,h=`settings-${i}-row`,g=n.name,_=`settings-${i}-row-edit`,v=n.title??n.name,y;t[0]===v?y=t[1]:(y=(0,$.jsx)(`span`,{className:`font-medium truncate`,children:v}),t[0]=v,t[1]=y);let b;t[2]!==p||t[3]!==n.name?(b=p?(0,$.jsx)(`code`,{className:`font-mono text-xs text-muted-foreground shrink-0`,children:n.name}):null,t[2]=p,t[3]=n.name,t[4]=b):b=t[4];let x;t[5]!==r.label||t[6]!==r.variant?(x=(0,$.jsx)(c,{variant:r.variant,className:`ml-auto shrink-0 text-2xs`,children:r.label}),t[5]=r.label,t[6]=r.variant,t[7]=x):x=t[7];let S;t[8]!==y||t[9]!==b||t[10]!==x?(S=(0,$.jsxs)(`div`,{className:`flex items-center gap-2 min-w-0`,children:[y,b,x]}),t[8]=y,t[9]=b,t[10]=x,t[11]=S):S=t[11];let C;t[12]===n.description?C=t[13]:(C=n.description?(0,$.jsx)(`p`,{className:`text-sm text-muted-foreground truncate mt-0.5`,children:n.description}):null,t[12]=n.description,t[13]=C);let w;t[14]!==a||t[15]!==_||t[16]!==S||t[17]!==C?(w=(0,$.jsxs)(`button`,{type:`button`,onClick:a,className:`min-w-0 flex-1 text-left focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring rounded-sm`,"data-testid":_,children:[S,C]}),t[14]=a,t[15]=_,t[16]=S,t[17]=C,t[18]=w):w=t[18];let T;t[19]!==s||t[20]!==m?(T=s({id:`Z7fox7`,values:{rowLabel:m}}),t[19]=s,t[20]=m,t[21]=T):T=t[21];let E;t[22]===Symbol.for(`react.memo_cache_sentinel`)?(E=(0,$.jsx)(k,{className:`size-4`,"aria-hidden":!0}),t[22]=E):E=t[22];let D;t[23]===T?D=t[24]:(D=(0,$.jsx)(ae,{asChild:!0,children:(0,$.jsx)(O,{variant:`ghost`,size:`icon`,className:`size-7 shrink-0 opacity-0 group-hover:opacity-100 focus-visible:opacity-100 data-[state=open]:opacity-100`,"aria-label":T,children:E})}),t[23]=T,t[24]=D);let A=`settings-${i}-row-edit-menuitem`,j,M;t[25]===Symbol.for(`react.memo_cache_sentinel`)?(j=(0,$.jsx)(l,{"aria-hidden":!0}),M=(0,$.jsx)(d,{id:`ePK91l`}),t[25]=j,t[26]=M):(j=t[25],M=t[26]);let N;t[27]!==a||t[28]!==A?(N=(0,$.jsxs)(ie,{onSelect:a,"data-testid":A,children:[j,M]}),t[27]=a,t[28]=A,t[29]=N):N=t[29];let ee=`settings-${i}-row-delete-menuitem`,P,F;t[30]===Symbol.for(`react.memo_cache_sentinel`)?(P=(0,$.jsx)(u,{"aria-hidden":!0}),F=(0,$.jsx)(d,{id:`cnGeoo`}),t[30]=P,t[31]=F):(P=t[30],F=t[31]);let I;t[32]!==o||t[33]!==ee?(I=(0,$.jsxs)(ie,{variant:`destructive`,onSelect:o,"data-testid":ee,children:[P,F]}),t[32]=o,t[33]=ee,t[34]=I):I=t[34];let L;t[35]!==N||t[36]!==I?(L=(0,$.jsxs)(ne,{align:`end`,children:[N,I]}),t[35]=N,t[36]=I,t[37]=L):L=t[37];let te;t[38]!==D||t[39]!==L?(te=(0,$.jsxs)(re,{children:[D,L]}),t[38]=D,t[39]=L,t[40]=te):te=t[40];let R;return t[41]!==h||t[42]!==w||t[43]!==te||t[44]!==n.name?(R=(0,$.jsxs)(`li`,{className:`group flex items-center gap-2 rounded-md px-2 py-2 hover:bg-muted/50 text-sm`,"data-testid":h,"data-template-name":g,children:[w,te]}),t[41]=h,t[42]=w,t[43]=te,t[44]=n.name,t[45]=R):R=t[45],R}function lr(){let e=(0,z.c)(22),{_:t}=f(),n;e[0]===t?n=e[1]:(n=t({id:`hBMK4W`}),e[0]=t,e[1]=n);let r;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,$.jsx)(d,{id:`nft48x`,components:{0:(0,$.jsx)(`code`,{className:`font-mono`})}}),e[2]=r):r=e[2];let i;e[3]===t?i=e[4]:(i=t({id:`6Pxqwv`}),e[3]=t,e[4]=i);let a;e[5]===t?a=e[6]:(a=t({id:`7-NvM7`}),e[5]=t,e[6]=a);let o;e[7]===t?o=e[8]:(o=t({id:`FQlArb`}),e[7]=t,e[8]=o);let s;e[9]===t?s=e[10]:(s=t({id:`BD0XSC`}),e[9]=t,e[10]=s);let c;e[11]===t?c=e[12]:(c=t({id:`ysxgu8`}),e[11]=t,e[12]=c);let l;e[13]===c?l=e[14]:(l={label:c,variant:`gray`},e[13]=c,e[14]=l);let u;return e[15]!==n||e[16]!==i||e[17]!==a||e[18]!==o||e[19]!==s||e[20]!==l?(u=(0,$.jsx)(ir,{config:{scope:`local`,title:n,description:r,emptyMessage:i,deleteWarning:a,itemNoun:o,loadErrorTitle:s,badge:l,settingsId:`settings-project-templates-title`,testIdPrefix:`project-templates`}}),e[15]=n,e[16]=i,e[17]=a,e[18]=o,e[19]=s,e[20]=l,e[21]=u):u=e[21],u}function ur(e,t){if(e.length===0)throw Error(`buildPatch: path must be non-empty`);let[n,...r]=e;return r.length===0?{[String(n)]:t}:{[String(n)]:ur(r,t)}}function dr(e){let t=e;for(let e=0;e<16;e++){if(t==null)return;let e=t?._zod?.def;if(e?.type===`default`){let t=e.defaultValue;return typeof t==`function`?t():t}let n=t?._zod?.def?.innerType;if(n===void 0)return;t=n}}function fr(e){let t=e;for(let e=0;e<16;e++){if(t==null)return;let e=t?._zod?.def;if(!e)return;if(e.type===`default`||e.type===`optional`||e.type===`nullable`){t=e.innerType;continue}return e.type}}function pr(e){let t=e;for(let e=0;e<16;e++){if(t==null)return;let e=t?._zod?.def;if(!e)return;if(e.type===`enum`)return e.entries?Object.values(e.entries):void 0;if(e.innerType!==void 0){t=e.innerType;continue}return}}function mr(e){let t=(0,z.c)(14),n;t[0]===e?n=t[1]:(n=e.current(),t[0]=e,t[1]=n);let r=n,i;t[2]===r?i=t[3]:(i={defaultValues:r,mode:`onBlur`},t[2]=r,t[3]=i);let a=nn(i),o,s;t[4]!==e||t[5]!==a?(o=()=>e.subscribe(e=>{hr(a,e)}),s=[e,a],t[4]=e,t[5]=a,t[6]=o,t[7]=s):(o=t[6],s=t[7]),(0,B.useEffect)(o,s);let c;t[8]!==e||t[9]!==a?(c=t=>gr(a,e,t),t[8]=e,t[9]=a,t[10]=c):c=t[10];let l=c,u;return t[11]!==l||t[12]!==a?(u={form:a,commitField:l},t[11]=l,t[12]=a,t[13]=u):u=t[13],u}function hr(e,t){e.reset(t,{keepDirtyValues:!0,keepDirty:!0,keepTouched:!0})}function gr(e,t,n){let r=e.getValues(n),i=ur(yr(n),r),a=t.patch(i);if(a.ok)return e.clearErrors(n),e.resetField(n,{defaultValue:r,keepError:!1}),!0;if(b(a.error)&&a.error.code===`SCHEMA_INVALID`&&a.error.issues.length>0){e.clearErrors(n);for(let t of a.error.issues){let r=t.path.length>0?t.path.map(String).join(`.`):n;e.setError(r,{type:`config-binding`,message:t.message})}}else e.setError(n,{type:`config-binding`,message:_r(a.error,n)});return!1}function _r(e,t){if(b(e)&&e.code===`SCHEMA_INVALID`){let n=e.issues.find(e=>vr(e,t));if(n)return n.message}return w(e)}function vr(e,t){return e.path.map(String).join(`.`)===t}function yr(e){return e.split(`.`)}var br=[{path:[`appearance`,`theme`],label:{id:`FEr96N`},description:{id:`JZ8cO6`},control:`enum-toggle`},{path:[`editor`,`wordWrap`],label:{id:`iKSP5j`},description:{id:`mmpzAq`}}];function xr(e){let t=(0,z.c)(9),{activeId:n,userBinding:r,okignoreBinding:i,okignoreSynced:a}=e,{_:o}=f();if(n===`preferences`){let e;return t[0]!==o||t[1]!==r?(e=r?(0,$.jsx)(wr,{title:o({id:`Q6hhn8`}),description:o({id:`Y_kL7X`}),scope:`user`,binding:r,fields:br}):(0,$.jsx)(Cr,{}),t[0]=o,t[1]=r,t[2]=e):e=t[2],e}if(n===`sync`){let e;return t[3]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(Er,{}),t[3]=e):e=t[3],e}if(n===`project-templates`){let e;return t[4]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(lr,{}),t[4]=e):e=t[4],e}if(n===`okignore`){let e;return t[5]!==i||t[6]!==a?(e=(0,$.jsx)(kn,{binding:i,synced:a}),t[5]=i,t[6]=a,t[7]=e):e=t[7],e}if(n===`claude-desktop`){let e;return t[8]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(Nr,{}),t[8]=e):e=t[8],e}return null}function Sr(e){if(!b(e)||e.code!==`SCHEMA_INVALID`)return null;let t=e.issues[0];return!t||t.path.length===0?null:t.path.map(String).join(`.`)}function Cr(){let e=(0,z.c)(3),t,n;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,$.jsx)(Ee,{className:`h-5 w-32`}),n=(0,$.jsx)(Ee,{className:`h-4 w-64`}),e[0]=t,e[1]=n):(t=e[0],n=e[1]);let r;return e[2]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,$.jsxs)(`div`,{className:`space-y-3`,children:[t,n,(0,$.jsxs)(`div`,{className:`space-y-2`,children:[(0,$.jsx)(Ee,{className:`h-9 w-full`}),(0,$.jsx)(Ee,{className:`h-9 w-full`})]})]}),e[2]=r):r=e[2],r}function wr(e){let t=(0,z.c)(14),{title:n,description:r,scope:i,binding:a,fields:o}=e,{form:s,commitField:c}=mr(a),[l,u]=(0,B.useState)(null),d=(0,B.useRef)(null),f,p;t[0]!==s||t[1]!==i?(f=()=>{let e=i===`project`?x:y,t=be(t=>{if(t.docName!==e)return;Me.error(w(t.error),{duration:8e3});let n=Sr(t.error);n&&(s.setError(n,{type:`config-validation-rejected`,message:_r(t.error,n)}),s.setFocus(n),u(n),d.current&&clearTimeout(d.current),d.current=setTimeout(()=>{u(null),s.clearErrors(n)},600))});return()=>{t(),d.current&&clearTimeout(d.current)}},p=[i,s],t[0]=s,t[1]=i,t[2]=f,t[3]=p):(f=t[2],p=t[3]),(0,B.useEffect)(f,p);let m;t[4]!==c||t[5]!==r||t[6]!==o||t[7]!==l||t[8]!==i||t[9]!==n?(m=(0,$.jsx)(Tr,{title:n,description:r,scope:i,fields:o,commitField:c,flashedPath:l}),t[4]=c,t[5]=r,t[6]=o,t[7]=l,t[8]=i,t[9]=n,t[10]=m):m=t[10];let h;return t[11]!==s||t[12]!==m?(h=(0,$.jsx)(rn,{...s,children:m}),t[11]=s,t[12]=m,t[13]=h):h=t[13],h}function Tr(e){let t=(0,z.c)(23),{title:n,description:r,scope:i,fields:a,commitField:o,flashedPath:s}=e,c=`settings-section-${i}-title`,l;t[0]!==n||t[1]!==c?(l=(0,$.jsx)(`h3`,{id:c,className:`text-base font-semibold`,children:n}),t[0]=n,t[1]=c,t[2]=l):l=t[2];let u;t[3]===r?u=t[4]:(u=(0,$.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:r}),t[3]=r,t[4]=u);let d;t[5]!==l||t[6]!==u?(d=(0,$.jsxs)(`div`,{className:`space-y-1`,children:[l,u]}),t[5]=l,t[6]=u,t[7]=d):d=t[7];let f;if(t[8]!==o||t[9]!==a||t[10]!==s||t[11]!==i){let e;t[13]!==o||t[14]!==s||t[15]!==i?(e=e=>(0,$.jsx)(Dr,{field:e,scope:i,commitField:o,isFlashed:s===e.path.join(`.`)},e.path.join(`.`)),t[13]=o,t[14]=s,t[15]=i,t[16]=e):e=t[16],f=a.map(e),t[8]=o,t[9]=a,t[10]=s,t[11]=i,t[12]=f}else f=t[12];let p;t[17]===f?p=t[18]:(p=(0,$.jsx)(`div`,{className:`space-y-10`,children:f}),t[17]=f,t[18]=p);let m;return t[19]!==d||t[20]!==p||t[21]!==c?(m=(0,$.jsxs)(`section`,{"aria-labelledby":c,className:`space-y-3`,children:[d,p]}),t[19]=d,t[20]=p,t[21]=c,t[22]=m):m=t[22],m}function Er(){let e=(0,z.c)(26),{_:t}=f(),n=we(),{projectLocalConfig:r,projectLocalSynced:i}=o(),{confirmOpen:a,setConfirmOpen:c,onToggleRequest:l,onConfirm:u}=R(L());if(n&&!n.hasRemote&&n.state===`dormant`){let t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,$.jsx)(`h3`,{id:`settings-sync-title`,className:`text-base font-semibold`,children:(0,$.jsx)(d,{id:`Nu4DdT`})}),e[0]=t):t=e[0];let n;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,$.jsxs)(`div`,{className:`space-y-1`,children:[t,(0,$.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:(0,$.jsx)(d,{id:`8C2UQ5`})})]}),e[1]=n):n=e[1];let r;return e[2]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,$.jsxs)(`section`,{"aria-labelledby":`settings-sync-title`,className:`space-y-3`,"data-testid":`settings-sync-empty`,children:[n,(0,$.jsx)(`div`,{className:`rounded-md border p-3 text-sm text-muted-foreground`,children:(0,$.jsx)(d,{id:`vQayZz`,components:{0:(0,$.jsx)(`code`,{className:`rounded bg-muted px-1 py-0.5 font-mono text-xs`})}})})]}),e[2]=r):r=e[2],r}let p=r?.autoSync?.enabled??!1,m=!i,h;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,$.jsx)(`h3`,{id:`settings-sync-title`,className:`text-base font-semibold`,children:(0,$.jsx)(d,{id:`Nu4DdT`})}),e[3]=h):h=e[3];let g;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(g=(0,$.jsxs)(`div`,{className:`space-y-1`,children:[h,(0,$.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:(0,$.jsx)(d,{id:`T67A0Y`})})]}),e[4]=g):g=e[4];let _;e[5]===Symbol.for(`react.memo_cache_sentinel`)?(_=(0,$.jsx)(`label`,{htmlFor:`settings-sync-toggle`,className:`text-sm font-medium`,children:(0,$.jsx)(d,{id:`Nx7BWE`})}),e[5]=_):_=e[5];let v;e[6]===p?v=e[7]:(v=(0,$.jsxs)(`div`,{children:[_,(0,$.jsx)(`p`,{className:`text-muted-foreground text-1sm`,children:p?(0,$.jsx)(d,{id:`-gdcIo`}):(0,$.jsx)(d,{id:`qUB_o_`})})]}),e[6]=p,e[7]=v);let y;e[8]!==t||e[9]!==p?(y=t(p?{id:`OmHTGj`}:{id:`MKOVhz`}),e[8]=t,e[9]=p,e[10]=y):y=e[10];let b;e[11]!==m||e[12]!==p||e[13]!==l||e[14]!==y?(b=(0,$.jsx)(s,{id:`settings-sync-toggle`,checked:p,disabled:m,onCheckedChange:l,"aria-label":y,"data-testid":`settings-sync-toggle`}),e[11]=m,e[12]=p,e[13]=l,e[14]=y,e[15]=b):b=e[15];let x;e[16]!==v||e[17]!==b?(x=(0,$.jsx)(`div`,{className:`rounded-md border p-3`,children:(0,$.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[v,b]})}),e[16]=v,e[17]=b,e[18]=x):x=e[18];let S;e[19]!==a||e[20]!==u||e[21]!==c?(S=(0,$.jsx)(ye,{open:a,onOpenChange:c,onConfirm:u}),e[19]=a,e[20]=u,e[21]=c,e[22]=S):S=e[22];let C;return e[23]!==x||e[24]!==S?(C=(0,$.jsxs)(`section`,{"aria-labelledby":`settings-sync-title`,className:`space-y-3`,children:[g,x,S]}),e[23]=x,e[24]=S,e[25]=C):C=e[25],C}function Dr({field:e,scope:t,commitField:n,isFlashed:r}){"use no memo";let{_:i}=f(),a=ut(),o=C(g,e.path),s=o?fr(o):void 0,c=o?dr(o):void 0,l=o?pr(o):void 0,u=o?S(o):void 0,_=u?.scope===`project`&&t!==`project`||u?.scope===`user`&&t!==`user`,v=e.path.join(`.`),y=i(e.label),[b,x]=(0,B.useState)(!1),w=(0,B.useRef)(null);(0,B.useEffect)(()=>()=>{w.current&&clearTimeout(w.current)},[]);let T=()=>{x(!0),w.current&&clearTimeout(w.current),w.current=setTimeout(()=>x(!1),1200)},D=()=>{let e=n(v);return e&&T(),e},k=()=>a.getFieldState(v).isDirty?D():!0,A=()=>{let e=c===void 0?null:c;a.setValue(v,e,{shouldDirty:!1}),D()},j=E(`relative`,r&&`animate-settings-flash`);return(0,$.jsx)(on,{control:a.control,name:v,render:({field:n})=>{let r=!_&&(c!==void 0||n.value!==void 0);return(0,$.jsxs)(ln,{className:j,"data-field":e.path.join(`.`),"data-scope":t,children:[(0,$.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,$.jsx)(un,{className:`text-sm font-medium`,children:y}),r?(0,$.jsxs)(m,{children:[(0,$.jsx)(p,{asChild:!0,children:(0,$.jsx)(O,{variant:`ghost`,size:`icon`,className:`h-5 w-5 text-muted-foreground opacity-60 hover:opacity-100`,onClick:A,"aria-label":i({id:`lhjq3G`,values:{labelText:y}}),children:(0,$.jsx)(Le,{className:`size-3.5`})})}),(0,$.jsx)(h,{children:(0,$.jsx)(d,{id:`L-rMC9`})})]}):null]}),e.description?(0,$.jsx)(fn,{className:`text-muted-foreground text-1sm`,children:i(e.description)}):null,(0,$.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,$.jsx)(dn,{children:(0,$.jsx)(Or,{field:e,ctl:n,typeTag:s,enumOptions:l,onCommit:k})}),(0,$.jsx)(Mr,{visible:b})]}),(0,$.jsx)(pn,{"data-field-error":e.path.join(`.`)})]})}})}function Or({field:e,ctl:t,typeTag:n,enumOptions:r,onCommit:i,...a}){"use no memo";let{_:o}=f();if(n===`boolean`)return(0,$.jsx)(s,{...a,checked:!!t.value,ref:t.ref,onCheckedChange:e=>{t.onChange(e),i()},onBlur:t.onBlur});if(n===`enum`&&r&&r.length>0&&(e.control===`enum-toggle`||r.length<=4)){let{id:n,...s}=a;return(0,$.jsx)(Fe,{...s,type:`single`,value:typeof t.value==`string`?t.value:``,ref:t.ref,onValueChange:e=>{e&&(t.onChange(e),i())},onBlur:t.onBlur,variant:`segmented`,size:`sm`,spacing:1,className:`bg-muted dark:bg-background p-0.5 rounded-lg`,"aria-label":o(e.label),children:r.map((e,t)=>(0,$.jsx)(Pe,{value:e,id:t===0?n:void 0,className:`text-1sm capitalize`,children:e},e))})}return n===`number`||n===`int`?(0,$.jsx)(Ar,{ctl:t,onCommit:i,...a}):n===`array`?(0,$.jsx)(jr,{ctl:t,onCommit:i,...a}):(0,$.jsx)(kr,{ctl:t,onCommit:i,...a})}function kr({ctl:e,onCommit:t,...n}){"use no memo";return(0,$.jsx)(Ne,{...n,value:typeof e.value==`string`?e.value:``,ref:e.ref,onChange:t=>e.onChange(t.target.value),onBlur:()=>{e.onBlur(),t()},onKeyDown:e=>{e.key===`Enter`&&(e.preventDefault(),t())},className:`h-8 text-sm`})}function Ar({ctl:e,onCommit:t,...n}){"use no memo";let[r,i]=(0,B.useState)(e.value===void 0?``:String(e.value)),a=(0,B.useRef)(e.value);(0,B.useEffect)(()=>{a.current!==e.value&&(i(e.value===void 0?``:String(e.value)),a.current=e.value)},[e.value]);let o=()=>{let n=Number(r);if(!Number.isFinite(n)){e.onChange(r),t();return}e.onChange(n),t(),a.current=n};return(0,$.jsx)(Ne,{...n,type:`number`,value:r,ref:e.ref,onChange:e=>i(e.target.value),onBlur:()=>{e.onBlur(),o()},onKeyDown:e=>{e.key===`Enter`&&(e.preventDefault(),o())},className:`h-8 w-28 text-sm tabular-nums`})}function jr({ctl:e,onCommit:t,...n}){"use no memo";let r=Array.isArray(e.value)?e.value.join(`
|
|
3
|
+
`):``,[i,a]=(0,B.useState)(r),o=(0,B.useRef)(r);(0,B.useEffect)(()=>{let t=Array.isArray(e.value)?e.value.join(`
|
|
4
|
+
`):``;t!==o.current&&(a(t),o.current=t)},[e.value]);let s=()=>{let n=i.split(`
|
|
5
|
+
`).map(e=>e.trim()).filter(e=>e.length>0);e.onChange(n),t(),o.current=n.join(`
|
|
6
|
+
`)};return(0,$.jsx)(`textarea`,{...n,value:i,ref:e.ref,onChange:e=>a(e.target.value),onBlur:()=>{e.onBlur(),s()},rows:Math.max(2,Math.min(6,i.split(`
|
|
7
|
+
`).length)),className:`min-h-16 w-full rounded-md border border-input bg-background px-3 py-1.5 font-mono text-xs outline-none transition-colors focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40`})}function Mr(e){let t=(0,z.c)(4),{visible:n}=e,r;t[0]===n?r=t[1]:(r=n?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(ke,{"aria-hidden":`true`,className:`size-3.5`}),(0,$.jsx)(`span`,{className:`sr-only`,children:(0,$.jsx)(d,{id:`idD8Ev`})})]}):null,t[0]=n,t[1]=r);let i;return t[2]===r?i=t[3]:(i=(0,$.jsx)(`span`,{role:`status`,"aria-live":`polite`,className:`text-emerald-600`,children:r}),t[2]=r,t[3]=i),i}function Nr(){let e=(0,z.c)(16),[t,n]=(0,B.useState)(!1),{skillInstalled:r,refresh:i}=pe(),a;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,$.jsx)(`h3`,{id:`settings-integrations-title`,className:`text-base font-semibold`,children:(0,$.jsx)(d,{id:`nbfdhU`})}),e[0]=a):a=e[0];let o;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,$.jsxs)(`div`,{className:`space-y-1`,children:[a,(0,$.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:(0,$.jsx)(d,{id:`FF5rwn`})})]}),e[1]=o):o=e[1];let s;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,$.jsx)(`div`,{className:`text-sm font-medium`,children:(0,$.jsx)(d,{id:`QQghPu`})}),e[2]=s):s=e[2];let c;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,$.jsxs)(`div`,{children:[s,(0,$.jsx)(`p`,{className:`text-muted-foreground text-1sm`,children:(0,$.jsx)(d,{id:`Wcv-Zi`})})]}),e[3]=c):c=e[3];let l;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(l=()=>n(!0),e[4]=l):l=e[4];let u;e[5]===r?u=e[6]:(u=(0,$.jsx)(`div`,{className:`rounded-md border p-3`,children:(0,$.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[c,(0,$.jsx)(O,{variant:`outline`,size:`sm`,onClick:l,"data-testid":`settings-install-claude-desktop`,className:`uppercase font-mono`,children:r?(0,$.jsx)(d,{id:`YGIi_c`}):(0,$.jsx)(d,{id:`TKQ7K-`})})]})}),e[5]=r,e[6]=u);let f;e[7]===i?f=e[8]:(f=e=>{n(e),e||i()},e[7]=i,e[8]=f);let p;e[9]!==t||e[10]!==r||e[11]!==f?(p=(0,$.jsx)(se,{open:t,onOpenChange:f,reinstall:r}),e[9]=t,e[10]=r,e[11]=f,e[12]=p):p=e[12];let m;return e[13]!==u||e[14]!==p?(m=(0,$.jsxs)(`section`,{"aria-labelledby":`settings-integrations-title`,className:`space-y-3`,children:[o,u,p]}),e[13]=u,e[14]=p,e[15]=m):m=e[15],m}export{xr as SettingsDialogBody};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{o as e}from"./chunk-CFjPhJqf.js";import{n as t,r as n,t as r}from"./compiler-runtime-CVnuRdak.js";import{$t as i,E as a,G as o,Zt as s,an as c,b as l,cn as u,en as d,gt as f,ht as p,in as m,j as h,ln as g,nn as _,on as v,rn as y,sn as b,tn as x,v as ee,w as S,y as te}from"./DocumentContext-
|
|
1
|
+
import{o as e}from"./chunk-CFjPhJqf.js";import{n as t,r as n,t as r}from"./compiler-runtime-CVnuRdak.js";import{$t as i,E as a,G as o,Zt as s,an as c,b as l,cn as u,en as d,gt as f,ht as p,in as m,j as h,ln as g,nn as _,on as v,rn as y,sn as b,tn as x,v as ee,w as S,y as te}from"./DocumentContext-CP8suU6i.js";import{Cn as C,hi as ne}from"./doc-hash-BrKkCdCz.js";import{$ as w,Dt as re,Et as T,Ft as E,J as D,Ot as O,P as k,Q as A,Tt as j,X as M,jt as N,pt as P,ut as ie,xt as F}from"./dist-BzP1Tn1M.js";import{a as ae,i as oe,r as se,t as I}from"./typing-burst-detector-tbQ3pXg5.js";var L=e(t(),1),ce=r(),R=class e{constructor(e,t){this.yanchor=e,this.yhead=t}toJSON(){return{yanchor:m(this.yanchor),yhead:m(this.yhead)}}static fromJSON(t){return new e(_(t.yanchor),_(t.yhead))}},z=class{constructor(e,t){this.ytext=e,this.awareness=t,this.undoManager=new i(e)}toYPos(e,t=0){return y(this.ytext,e,t)}fromYPos(e){let t=x(_(e),this.ytext.doc);if(t==null||t.type!==this.ytext)throw Error(`[y-codemirror] The position you want to retrieve was created by a different document`);return{pos:t.index,assoc:t.assoc}}toYRange(e){let t=e.assoc;return new R(this.toYPos(e.anchor,t),this.toYPos(e.head,t))}fromYRange(e){let t=this.fromYPos(e.yanchor),n=this.fromYPos(e.yhead);return t.pos===n.pos?T.cursor(n.pos,n.assoc):T.range(t.pos,n.pos)}},B=O.define({combine(e){return e[e.length-1]}}),V=F.define(),H=class{constructor(e){this.view=e,this.conf=e.state.facet(B),this._observer=(t,n)=>{if(n.origin!==this.conf){let n=t.delta,r=[],i=0;for(let e=0;e<n.length;e++){let t=n[e];t.insert==null?t.delete==null?i+=t.retain:(r.push({from:i,to:i+t.delete,insert:``}),i+=t.delete):r.push({from:i,to:i,insert:t.insert})}e.dispatch({changes:r,annotations:[V.of(this.conf)]})}},this._ytext=this.conf.ytext,this._ytext.observe(this._observer)}update(e){if(!e.docChanged||e.transactions.length>0&&e.transactions[0].annotation(V)===this.conf)return;let t=this.conf.ytext;t.doc.transact(()=>{let n=0;e.changes.iterChanges((e,r,i,a,o)=>{let s=o.sliceString(0,o.length,`
|
|
2
2
|
`);e!==r&&t.delete(e+n,r-e),s.length>0&&t.insert(e+n,s),n+=s.length-(r-e)})},this.conf)}destroy(){this._ytext.unobserve(this._observer)}},U=A.fromClass(H),W=M.baseTheme({".cm-ySelection":{},".cm-yLineSelection":{padding:0,margin:`0px 2px 0px 4px`},".cm-ySelectionCaret":{position:`relative`,borderLeft:`1px solid black`,borderRight:`1px solid black`,marginLeft:`-1px`,marginRight:`-1px`,boxSizing:`border-box`,display:`inline`},".cm-ySelectionCaretDot":{borderRadius:`50%`,position:`absolute`,width:`.4em`,height:`.4em`,top:`-.2em`,left:`-.2em`,backgroundColor:`inherit`,transition:`transform .3s ease-in-out`,boxSizing:`border-box`},".cm-ySelectionCaret:hover > .cm-ySelectionCaretDot":{transformOrigin:`bottom center`,transform:`scale(0)`},".cm-ySelectionInfo":{position:`absolute`,top:`-1.05em`,left:`-1px`,fontSize:`.75em`,fontFamily:`serif`,fontStyle:`normal`,fontWeight:`normal`,lineHeight:`normal`,userSelect:`none`,color:`white`,paddingLeft:`2px`,paddingRight:`2px`,zIndex:101,transition:`opacity .3s ease-in-out`,backgroundColor:`inherit`,opacity:0,transitionDelay:`0s`,whiteSpace:`nowrap`},".cm-ySelectionCaret:hover > .cm-ySelectionInfo":{opacity:1,transitionDelay:`0s`}}),G=F.define(),K=class extends w{constructor(e,t){super(),this.color=e,this.name=t}toDOM(){return c(`span`,[b(`class`,`cm-ySelectionCaret`),b(`style`,`background-color: ${this.color}; border-color: ${this.color}`)],[v(``),c(`div`,[b(`class`,`cm-ySelectionCaretDot`)]),v(``),c(`div`,[b(`class`,`cm-ySelectionInfo`)],[v(this.name)]),v(``)])}eq(e){return e.color===this.color}compare(e){return e.color===this.color}updateDOM(){return!1}get estimatedHeight(){return-1}ignoreEvent(){return!0}},le=class{constructor(e){this.conf=e.state.facet(B),this._listener=({added:t,updated:n,removed:r},i,a)=>{t.concat(n).concat(r).findIndex(e=>e!==this.conf.awareness.doc.clientID)>=0&&e.dispatch({annotations:[G.of([])]})},this._awareness=this.conf.awareness,this._awareness.on(`change`,this._listener),this.decorations=N.of([])}destroy(){this._awareness.off(`change`,this._listener)}update(e){let t=this.conf.ytext,n=t.doc,r=this.conf.awareness,i=[],a=this.conf.awareness.getLocalState();if(a!=null){let n=e.view.hasFocus&&e.view.dom.ownerDocument.hasFocus(),i=n?e.state.selection.main:null,o=a.cursor==null?null:_(a.cursor.anchor),s=a.cursor==null?null:_(a.cursor.head);if(i!=null){let e=y(t,i.anchor),n=y(t,i.head);(a.cursor==null||!d(o,e)||!d(s,n))&&r.setLocalStateField(`cursor`,{anchor:e,head:n})}else a.cursor!=null&&n&&r.setLocalStateField(`cursor`,null)}r.getStates().forEach((a,o)=>{if(o===r.doc.clientID)return;let s=a.cursor;if(s==null||s.anchor==null||s.head==null)return;let c=x(s.anchor,n),l=x(s.head,n);if(c==null||l==null||c.type!==t||l.type!==t)return;let{color:d=`#30bced`,name:f=`Anonymous`}=a.user||{},p=a.user&&a.user.colorLight||d+`33`,m=g(c.index,l.index),h=u(c.index,l.index),_=e.view.state.doc.lineAt(m),v=e.view.state.doc.lineAt(h);if(_.number===v.number)i.push({from:m,to:h,value:D.mark({attributes:{style:`background-color: ${p}`},class:`cm-ySelection`})});else{i.push({from:m,to:_.from+_.length,value:D.mark({attributes:{style:`background-color: ${p}`},class:`cm-ySelection`})}),i.push({from:v.from,to:h,value:D.mark({attributes:{style:`background-color: ${p}`},class:`cm-ySelection`})});for(let t=_.number+1;t<v.number;t++){let n=e.view.state.doc.line(t).from;i.push({from:n,to:n,value:D.line({attributes:{style:`background-color: ${p}`,class:`cm-yLineSelection`}})})}}i.push({from:l.index,to:l.index,value:D.widget({side:l.index-c.index>0?-1:1,block:!1,widget:new K(d,f)})})}),this.decorations=D.set(i,!0)}},ue=A.fromClass(le,{decorations:e=>e.decorations}),de=class{constructor(e){this.undoManager=e}addTrackedOrigin(e){this.undoManager.addTrackedOrigin(e)}removeTrackedOrigin(e){this.undoManager.removeTrackedOrigin(e)}undo(){return this.undoManager.undo()!=null}redo(){return this.undoManager.redo()!=null}},q=O.define({combine(e){return e[e.length-1]}});F.define();var fe=class{constructor(e){this.view=e,this.conf=e.state.facet(q),this._undoManager=this.conf.undoManager,this.syncConf=e.state.facet(B),this._beforeChangeSelection=null,this._mux=s(),this._onStackItemAdded=({stackItem:e,changedParentTypes:t})=>{t.has(this.syncConf.ytext)&&this._beforeChangeSelection&&!e.meta.has(this)&&e.meta.set(this,this._beforeChangeSelection)},this._onStackItemPopped=({stackItem:t})=>{let n=t.meta.get(this);if(n){let t=this.syncConf.fromYRange(n);e.dispatch(e.state.update({selection:t,effects:[M.scrollIntoView(t)]})),this._storeSelection()}},this._storeSelection=()=>{this._beforeChangeSelection=this.syncConf.toYRange(this.view.state.selection.main)},this._undoManager.on(`stack-item-added`,this._onStackItemAdded),this._undoManager.on(`stack-item-popped`,this._onStackItemPopped),this._undoManager.addTrackedOrigin(this.syncConf)}update(e){e.selectionSet&&(e.transactions.length===0||e.transactions[0].annotation(V)!==this.syncConf)&&this._storeSelection()}destroy(){this._undoManager.off(`stack-item-added`,this._onStackItemAdded),this._undoManager.off(`stack-item-popped`,this._onStackItemPopped),this._undoManager.removeTrackedOrigin(this.syncConf)}},pe=A.fromClass(fe),me=({state:e,dispatch:t})=>e.facet(q).undo()||!0,he=({state:e,dispatch:t})=>e.facet(q).redo()||!0,ge=(e,t,{undoManager:n=new i(e)}={})=>{let r=new z(e,t),a=[B.of(r),U];return t&&a.push(W,ue),n!==!1&&a.push(q.of(new de(n)),pe,M.domEventHandlers({beforeinput(e,t){return e.inputType===`historyUndo`?me(t):e.inputType===`historyRedo`?he(t):!1}})),a},_e=D.mark({class:`cm-link-ref-broken`}),J=/^\s{0,3}\[([^\]]+)\]:\s/,Y=/\[([^\]]*)\]\[([^\]]*)\]/g,ve=new Set([`FencedCode`,`CodeBlock`,`InlineCode`]);function X(e,t){let n=0,r=t.length-1;for(;n<=r;){let i=n+r>>1,a=t[i];if(e<a.from)r=i-1;else if(e>=a.to)n=i+1;else return!0}return!1}function ye(e){let t=[];return k(e).iterate({enter(e){if(ve.has(e.name))return t.push({from:e.from,to:e.to}),!1}}),t.sort((e,t)=>e.from-t.from),t}function Z(e){let t=new Set,n=[],r=e.doc,i=ye(e);for(let e=1;e<=r.lines;e++){let n=r.line(e);if(X(n.from,i))continue;let a=J.exec(n.text);a&&t.add(a[1].toLowerCase())}for(let e=1;e<=r.lines;e++){let t=r.line(e);if(!X(t.from,i)&&!J.test(t.text))for(Y.lastIndex=0;;){let e=Y.exec(t.text);if(!e)break;let r=t.from+e.index;if(X(r,i))continue;let a=e[2]||e[1];n.push({from:r,to:r+e[0].length,label:a.toLowerCase()})}}let a=[];for(let e of n)t.has(e.label)||a.push(_e.range(e.from,e.to));return a.sort((e,t)=>e.from-t.from),D.set(a)}var be=E.define({create(e){return Z(e)},update(e,t){return t.docChanged?Z(t.state):e},provide:e=>M.decorations.from(e)}),xe=/^(\s*(?:[-*+]|\d+[.)]) (?:\[[ x]\] )?)/,Se=D.mark({class:`cm-del`}),Ce=D.line({class:`cm-table-header`}),Q=D.line({class:`cm-table-row`});function we(e){let t=0;for(let n of e)if(n===` `)t++;else if(n===` `)t+=4;else break;return t}function Te(e){if(e.doc.lines<2)return null;let t=e.doc.line(1);if(t.text!==`---`)return null;for(let n=2;n<=e.doc.lines;n++){let r=e.doc.line(n);if(r.text===`---`)return{from:t.from,to:r.to}}return null}function $(e,t){let n=[],r=k(e),i=Te(e),a=e=>i!==null&&e>=i.from&&e<=i.to;for(let{from:i,to:o}of t)r.iterate({from:i,to:o,enter(t){if(!a(t.from)){if(t.name===`Strikethrough`){let e=t.from,r=t.to,i=t.node.cursor();if(i.firstChild())do i.name===`StrikethroughMark`&&(i.from===t.from?e=i.to:r=i.from);while(i.nextSibling());return e<r&&n.push(Se.range(e,r)),!1}if(t.name===`ListItem`){let r=e.doc.lineAt(t.from),i=xe.exec(r.text),a=i?i[1].length:2,o=D.line({class:`cm-list-item`,attributes:{style:`--list-hang: ${a}ch`}});n.push(o.range(r.from));return}if(t.name===`FencedCode`){let r=e.doc.lineAt(t.from),i=e.doc.lineAt(t.to);for(let t=r.number+1;t<i.number;t++){let r=e.doc.line(t),i=we(r.text),a=D.line({class:`cm-fenced-code-line`,attributes:{style:`--line-indent: ${i}`}});n.push(a.range(r.from))}return!1}if(t.name===`TableHeader`){let r=e.doc.lineAt(t.from);return n.push(Ce.range(r.from)),!1}if(t.name===`TableRow`){let r=e.doc.lineAt(t.from);return n.push(Q.range(r.from)),!1}if(t.name===`TableDelimiter`&&t.node.parent?.name===`Table`){let r=e.doc.lineAt(t.from);return n.push(Q.range(r.from)),!1}}}});return n.sort((e,t)=>e.from-t.from||e.value.startSide-t.value.startSide),D.set(n)}var Ee=class{decorations;constructor(e){this.decorations=$(e.state,e.visibleRanges)}update(e){(e.docChanged||e.viewportChanged||k(e.startState)!==k(e.state))&&(this.decorations=$(e.view.state,e.view.visibleRanges))}},De=A.fromClass(Ee,{decorations:e=>e.decorations});function Oe(){return[De,be]}var ke=n(),Ae=56;function je(e,t){let n=e.state.doc,r=1;if(n.lines>=1&&n.line(1).text===`---`){for(let e=2;e<=n.lines;e++)if(n.line(e).text===`---`){r=e+1;break}}let i=C(),a=0;for(let o=r;o<=n.lines;o++){let r=n.line(o);if(!i(r.text)&&/^#{1,6}\s/.test(r.text)){if(a===t.index){e.dispatch({selection:T.cursor(r.from),effects:M.scrollIntoView(r.from,{y:`start`})}),e.focus();return}a++}}}function Me(e,t){requestAnimationFrame(()=>{let n=e.state.doc,r=Math.min(t.offset,n.length);e.dispatch({selection:T.cursor(r),effects:M.scrollIntoView(r,{y:`center`})}),e.focus()})}function Ne(e){let t=(0,ce.c)(33),{docName:n,ytext:r,provider:i,placeholder:s,isSourceModeActive:c}=e,u=(0,L.useRef)(null),d=(0,L.useRef)(null),m;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(m=new j,t[0]=m):m=t[0];let g=(0,L.useRef)(m),_;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(_=new j,t[1]=_):_=t[1];let v=(0,L.useRef)(_),y;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(y=new j,t[2]=y):y=t[2];let b=(0,L.useRef)(y),[x,S]=(0,L.useState)(null);if(x)throw x;let{resolvedTheme:C}=ne(),{merged:w}=a(),T=w?.editor?.wordWrap??!0,E=(0,L.useRef)(null),D;t[3]!==s||t[4]!==i||t[5]!==C||t[6]!==T||t[7]!==r?(D=()=>{let e=u.current;if(!e)return;let t=i.configuration.name??``,n,a=Fe;try{n=p({docName:t,container:e,sizeStats:{viewCount:0,bytes:r.length},factory:e=>{let t=o({ydoc:i.document,ytext:r}),n=new M({state:re.create({doc:r.toString(),extensions:[se,ie.of([h]),ge(r,i.awareness),...ee({themeCompartment:g.current,resolvedTheme:C,ydoc:i.document,wordWrapCompartment:b.current,wordWrap:T}),Oe(),t,v.current.of(P(s??``)),M.theme({"&":{height:`100%`}}),M.scrollMargins.of(Pe)]}),parent:e}),c=n.contentDOM;return c.addEventListener(`keydown`,a),c.addEventListener(`paste`,a),c.addEventListener(`drop`,a),c.addEventListener(`cut`,a),{view:n,ydoc:i.document,ytext:r,provider:i}}}),E.current=n,d.current=n.view}catch(e){let t=e;console.error(`[SourceEditor] mountCmEditor failed`,t),E.current=null,d.current=null,S(t instanceof Error?t:Error(String(t)))}return()=>{let e=E.current;e&&f(e),E.current=null,d.current=null}},t[3]=s,t[4]=i,t[5]=C,t[6]=T,t[7]=r,t[8]=D):D=t[8];let O;t[9]!==i||t[10]!==r?(O=[r,i],t[9]=i,t[10]=r,t[11]=O):O=t[11],(0,L.useEffect)(D,O);let k,A;t[12]===n?(k=t[13],A=t[14]):(k=()=>{},A=[n],t[12]=n,t[13]=k,t[14]=A),(0,L.useEffect)(k,A);let N,F;t[15]===C?(N=t[16],F=t[17]):(N=()=>{d.current&&d.current.dispatch({effects:g.current.reconfigure(C===`dark`?te:l)})},F=[C],t[15]=C,t[16]=N,t[17]=F),(0,L.useEffect)(N,F);let R,z;t[18]===T?(R=t[19],z=t[20]):(R=()=>{d.current&&d.current.dispatch({effects:b.current.reconfigure(T?M.lineWrapping:[])})},z=[T],t[18]=T,t[19]=R,t[20]=z),(0,L.useEffect)(R,z);let B,V;t[21]===s?(B=t[22],V=t[23]):(B=()=>{d.current&&d.current.dispatch({effects:v.current.reconfigure(P(s??``))})},V=[s],t[21]=s,t[22]=B,t[23]=V),(0,L.useEffect)(B,V);let H,U;t[24]!==n||t[25]!==c?(H=()=>{let e=function(e){let t=e.detail;if(!t||t.mode!==`source`||!c)return;let r=d.current;r&&(je(r,t),oe(n))};return window.addEventListener(I,e),()=>window.removeEventListener(I,e)},U=[n,c],t[24]=n,t[25]=c,t[26]=H,t[27]=U):(H=t[26],U=t[27]),(0,L.useEffect)(H,U);let W,G;t[28]!==n||t[29]!==c?(W=()=>{if(!c)return;let e=d.current;if(!e)return;let t=ae(n);if(t){if(t.kind===`outline`){je(e,t.detail);return}Me(e,t.detail)}},G=[n,c],t[28]=n,t[29]=c,t[30]=W,t[31]=G):(W=t[30],G=t[31]),(0,L.useEffect)(W,G);let K;return t[32]===Symbol.for(`react.memo_cache_sentinel`)?(K=(0,ke.jsx)(`div`,{ref:u,className:`source-editor h-full pb-3`}),t[32]=K):K=t[32],K}function Pe(){return{top:Ae}}function Fe(){return S()}export{Ne as SourceEditor};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e,n as t,o as n,r,t as i}from"./isObjectLike-
|
|
1
|
+
import{a as e,n as t,o as n,r,t as i}from"./isObjectLike-DkPsJ8ZC.js";function a(){this.__data__=[],this.size=0}function o(e,t){return e===t||e!==e&&t!==t}function s(e,t){for(var n=e.length;n--;)if(o(e[n][0],t))return n;return-1}var c=Array.prototype.splice;function l(e){var t=this.__data__,n=s(t,e);return n<0?!1:(n==t.length-1?t.pop():c.call(t,n,1),--this.size,!0)}function ee(e){var t=this.__data__,n=s(t,e);return n<0?void 0:t[n][1]}function te(e){return s(this.__data__,e)>-1}function ne(e,t){var n=this.__data__,r=s(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function u(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}u.prototype.clear=a,u.prototype.delete=l,u.prototype.get=ee,u.prototype.has=te,u.prototype.set=ne;function re(){this.__data__=new u,this.size=0}function ie(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function d(e){return this.__data__.get(e)}function f(e){return this.__data__.has(e)}var ae=`[object AsyncFunction]`,oe=`[object Function]`,p=`[object GeneratorFunction]`,se=`[object Proxy]`;function m(e){if(!t(e))return!1;var n=r(e);return n==oe||n==p||n==ae||n==se}var h=e[`__core-js_shared__`],g=function(){var e=/[^.]+$/.exec(h&&h.keys&&h.keys.IE_PROTO||``);return e?`Symbol(src)_1.`+e:``}();function ce(e){return!!g&&g in e}var le=Function.prototype.toString;function _(e){if(e!=null){try{return le.call(e)}catch{}try{return e+``}catch{}}return``}var ue=/[\\^$.*+?()[\]{}|]/g,de=/^\[object .+?Constructor\]$/,fe=Function.prototype,pe=Object.prototype,me=fe.toString,he=pe.hasOwnProperty,ge=RegExp(`^`+me.call(he).replace(ue,`\\$&`).replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,`$1.*?`)+`$`);function _e(e){return!t(e)||ce(e)?!1:(m(e)?ge:de).test(_(e))}function ve(e,t){return e?.[t]}function v(e,t){var n=ve(e,t);return _e(n)?n:void 0}var y=v(e,`Map`),b=v(Object,`create`);function ye(){this.__data__=b?b(null):{},this.size=0}function be(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=+!!t,t}var xe=`__lodash_hash_undefined__`,x=Object.prototype.hasOwnProperty;function S(e){var t=this.__data__;if(b){var n=t[e];return n===xe?void 0:n}return x.call(t,e)?t[e]:void 0}var C=Object.prototype.hasOwnProperty;function w(e){var t=this.__data__;return b?t[e]!==void 0:C.call(t,e)}var T=`__lodash_hash_undefined__`;function E(e,t){var n=this.__data__;return this.size+=+!this.has(e),n[e]=b&&t===void 0?T:t,this}function D(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}D.prototype.clear=ye,D.prototype.delete=be,D.prototype.get=S,D.prototype.has=w,D.prototype.set=E;function O(){this.size=0,this.__data__={hash:new D,map:new(y||u),string:new D}}function k(e){var t=typeof e;return t==`string`||t==`number`||t==`symbol`||t==`boolean`?e!==`__proto__`:e===null}function A(e,t){var n=e.__data__;return k(t)?n[typeof t==`string`?`string`:`hash`]:n.map}function j(e){var t=A(this,e).delete(e);return this.size-=+!!t,t}function M(e){return A(this,e).get(e)}function Se(e){return A(this,e).has(e)}function Ce(e,t){var n=A(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function N(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}N.prototype.clear=O,N.prototype.delete=j,N.prototype.get=M,N.prototype.has=Se,N.prototype.set=Ce;var we=200;function Te(e,t){var n=this.__data__;if(n instanceof u){var r=n.__data__;if(!y||r.length<we-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new N(r)}return n.set(e,t),this.size=n.size,this}function P(e){this.size=(this.__data__=new u(e)).size}P.prototype.clear=re,P.prototype.delete=ie,P.prototype.get=d,P.prototype.has=f,P.prototype.set=Te;var Ee=e.Uint8Array,F=Array.isArray;function De(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var Oe=`[object Arguments]`;function I(e){return i(e)&&r(e)==Oe}var L=Object.prototype,ke=L.hasOwnProperty,Ae=L.propertyIsEnumerable,R=I(function(){return arguments}())?I:function(e){return i(e)&&ke.call(e,`callee`)&&!Ae.call(e,`callee`)};function je(){return!1}var z=typeof exports==`object`&&exports&&!exports.nodeType&&exports,B=z&&typeof module==`object`&&module&&!module.nodeType&&module,V=B&&B.exports===z?e.Buffer:void 0,H=(V?V.isBuffer:void 0)||je,Me=9007199254740991,Ne=/^(?:0|[1-9]\d*)$/;function U(e,t){var n=typeof e;return t??=Me,!!t&&(n==`number`||n!=`symbol`&&Ne.test(e))&&e>-1&&e%1==0&&e<t}var Pe=9007199254740991;function W(e){return typeof e==`number`&&e>-1&&e%1==0&&e<=Pe}var Fe=`[object Arguments]`,Ie=`[object Array]`,Le=`[object Boolean]`,Re=`[object Date]`,ze=`[object Error]`,Be=`[object Function]`,Ve=`[object Map]`,He=`[object Number]`,Ue=`[object Object]`,We=`[object RegExp]`,Ge=`[object Set]`,Ke=`[object String]`,qe=`[object WeakMap]`,Je=`[object ArrayBuffer]`,Ye=`[object DataView]`,Xe=`[object Float32Array]`,Ze=`[object Float64Array]`,Qe=`[object Int8Array]`,$e=`[object Int16Array]`,et=`[object Int32Array]`,tt=`[object Uint8Array]`,nt=`[object Uint8ClampedArray]`,rt=`[object Uint16Array]`,it=`[object Uint32Array]`,G={};G[Xe]=G[Ze]=G[Qe]=G[$e]=G[et]=G[tt]=G[nt]=G[rt]=G[it]=!0,G[Fe]=G[Ie]=G[Je]=G[Le]=G[Ye]=G[Re]=G[ze]=G[Be]=G[Ve]=G[He]=G[Ue]=G[We]=G[Ge]=G[Ke]=G[qe]=!1;function at(e){return i(e)&&W(e.length)&&!!G[r(e)]}function K(e){return function(t){return e(t)}}var q=typeof exports==`object`&&exports&&!exports.nodeType&&exports,J=q&&typeof module==`object`&&module&&!module.nodeType&&module,Y=J&&J.exports===q&&n.process,X=function(){try{return J&&J.require&&J.require(`util`).types||Y&&Y.binding&&Y.binding(`util`)}catch{}}(),Z=X&&X.isTypedArray,Q=Z?K(Z):at,ot=Object.prototype.hasOwnProperty;function st(e,t){var n=F(e),r=!n&&R(e),i=!n&&!r&&H(e),a=!n&&!r&&!i&&Q(e),o=n||r||i||a,s=o?De(e.length,String):[],c=s.length;for(var l in e)(t||ot.call(e,l))&&!(o&&(l==`length`||i&&(l==`offset`||l==`parent`)||a&&(l==`buffer`||l==`byteLength`||l==`byteOffset`)||U(l,c)))&&s.push(l);return s}var ct=Object.prototype;function lt(e){var t=e&&e.constructor;return e===(typeof t==`function`&&t.prototype||ct)}function ut(e,t){return function(n){return e(t(n))}}function dt(e){return e!=null&&W(e.length)&&!m(e)}var ft=`Expected a function`;function $(e,t){if(typeof e!=`function`||t!=null&&typeof t!=`function`)throw TypeError(ft);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);var o=e.apply(this,r);return n.cache=a.set(i,o)||a,o};return n.cache=new($.Cache||N),n}$.Cache=N;function pt(e){return e}function mt(e){return function(t,n,r){for(var i=-1,a=Object(t),o=r(t),s=o.length;s--;){var c=o[e?s:++i];if(n(a[c],c,a)===!1)break}return t}}var ht=mt();export{o as C,m as S,P as _,ut as a,v as b,Q as c,W as d,U as f,Ee as g,F as h,dt as i,X as l,R as m,pt as n,lt as o,H as p,$ as r,st as s,ht as t,K as u,N as v,_ as x,y};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e,t}from"./path-
|
|
1
|
+
import{n as e,t}from"./path-flVp2dgl.js";import{a as n,c as r,d as i,f as a,i as o,l as s,m as c,n as l,o as u,p as d,r as f,u as p}from"./dist-Df8SLnPf.js";function m(e){return e.innerRadius}function h(e){return e.outerRadius}function g(e){return e.startAngle}function _(e){return e.endAngle}function v(e){return e&&e.padAngle}function y(e,t,n,r,i,a,o,s){var c=n-e,l=r-t,u=o-i,d=s-a,f=d*c-u*l;if(!(f*f<1e-12))return f=(u*(t-a)-d*(e-i))/f,[e+f*c,t+f*l]}function b(e,t,n,r,i,a,o){var c=e-n,l=t-r,u=(o?a:-a)/d(c*c+l*l),f=u*l,p=-u*c,m=e+f,h=t+p,g=n+f,_=r+p,v=(m+g)/2,y=(h+_)/2,b=g-m,x=_-h,S=b*b+x*x,C=i-a,w=m*_-g*h,T=(x<0?-1:1)*d(s(0,C*C*S-w*w)),E=(w*x-b*T)/S,D=(-w*b-x*T)/S,O=(w*x+b*T)/S,k=(-w*b+x*T)/S,A=E-v,j=D-y,M=O-v,N=k-y;return A*A+j*j>M*M+N*N&&(E=O,D=k),{cx:E,cy:D,x01:-f,y01:-p,x11:E*(i/C-1),y11:D*(i/C-1)}}function x(){var s=m,x=h,S=e(0),C=null,w=g,T=_,E=v,D=null,O=t(k);function k(){var e,t,m=+s.apply(this,arguments),h=+x.apply(this,arguments),g=w.apply(this,arguments)-r,_=T.apply(this,arguments)-r,v=l(_-g),k=_>g;if(D||=e=O(),h<m&&(t=h,h=m,m=t),!(h>1e-12))D.moveTo(0,0);else if(v>c-1e-12)D.moveTo(h*u(g),h*a(g)),D.arc(0,0,h,g,_,!k),m>1e-12&&(D.moveTo(m*u(_),m*a(_)),D.arc(0,0,m,_,g,k));else{var A=g,j=_,M=g,N=_,P=v,F=v,I=E.apply(this,arguments)/2,L=I>1e-12&&(C?+C.apply(this,arguments):d(m*m+h*h)),R=p(l(h-m)/2,+S.apply(this,arguments)),z=R,B=R,V,H;if(L>1e-12){var U=o(L/m*a(I)),W=o(L/h*a(I));(P-=U*2)>1e-12?(U*=k?1:-1,M+=U,N-=U):(P=0,M=N=(g+_)/2),(F-=W*2)>1e-12?(W*=k?1:-1,A+=W,j-=W):(F=0,A=j=(g+_)/2)}var G=h*u(A),K=h*a(A),q=m*u(N),J=m*a(N);if(R>1e-12){var Y=h*u(j),X=h*a(j),Z=m*u(M),Q=m*a(M),$;if(v<i)if($=y(G,K,Z,Q,Y,X,q,J)){var ee=G-$[0],te=K-$[1],ne=Y-$[0],re=X-$[1],ie=1/a(f((ee*ne+te*re)/(d(ee*ee+te*te)*d(ne*ne+re*re)))/2),ae=d($[0]*$[0]+$[1]*$[1]);z=p(R,(m-ae)/(ie-1)),B=p(R,(h-ae)/(ie+1))}else z=B=0}F>1e-12?B>1e-12?(V=b(Z,Q,G,K,h,B,k),H=b(Y,X,q,J,h,B,k),D.moveTo(V.cx+V.x01,V.cy+V.y01),B<R?D.arc(V.cx,V.cy,B,n(V.y01,V.x01),n(H.y01,H.x01),!k):(D.arc(V.cx,V.cy,B,n(V.y01,V.x01),n(V.y11,V.x11),!k),D.arc(0,0,h,n(V.cy+V.y11,V.cx+V.x11),n(H.cy+H.y11,H.cx+H.x11),!k),D.arc(H.cx,H.cy,B,n(H.y11,H.x11),n(H.y01,H.x01),!k))):(D.moveTo(G,K),D.arc(0,0,h,A,j,!k)):D.moveTo(G,K),!(m>1e-12)||!(P>1e-12)?D.lineTo(q,J):z>1e-12?(V=b(q,J,Y,X,m,-z,k),H=b(G,K,Z,Q,m,-z,k),D.lineTo(V.cx+V.x01,V.cy+V.y01),z<R?D.arc(V.cx,V.cy,z,n(V.y01,V.x01),n(H.y01,H.x01),!k):(D.arc(V.cx,V.cy,z,n(V.y01,V.x01),n(V.y11,V.x11),!k),D.arc(0,0,m,n(V.cy+V.y11,V.cx+V.x11),n(H.cy+H.y11,H.cx+H.x11),k),D.arc(H.cx,H.cy,z,n(H.y11,H.x11),n(H.y01,H.x01),!k))):D.arc(0,0,m,N,M,k)}if(D.closePath(),e)return D=null,e+``||null}return k.centroid=function(){var e=(+s.apply(this,arguments)+ +x.apply(this,arguments))/2,t=(+w.apply(this,arguments)+ +T.apply(this,arguments))/2-i/2;return[u(t)*e,a(t)*e]},k.innerRadius=function(t){return arguments.length?(s=typeof t==`function`?t:e(+t),k):s},k.outerRadius=function(t){return arguments.length?(x=typeof t==`function`?t:e(+t),k):x},k.cornerRadius=function(t){return arguments.length?(S=typeof t==`function`?t:e(+t),k):S},k.padRadius=function(t){return arguments.length?(C=t==null?null:typeof t==`function`?t:e(+t),k):C},k.startAngle=function(t){return arguments.length?(w=typeof t==`function`?t:e(+t),k):w},k.endAngle=function(t){return arguments.length?(T=typeof t==`function`?t:e(+t),k):T},k.padAngle=function(t){return arguments.length?(E=typeof t==`function`?t:e(+t),k):E},k.context=function(e){return arguments.length?(D=e??null,k):D},k}export{x as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./chunk-K5T4RW27-DPAjYSpe.js";import{n as e}from"./chunk-7N4EOEYR-DxJSpCGX.js";export{e as createArchitectureServices};
|