cognova 0.2.11 → 0.2.13
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/.output/nitro.json +1 -1
- package/.output/public/_nuxt/{DwY7rCd_.js → -HePz7lp.js} +2 -2
- package/.output/public/_nuxt/{CY-cjAwJ.js → 4ALIM-zZ.js} +1 -1
- package/.output/public/_nuxt/{DXdwpJ-I.js → 5sUbkh_6.js} +2 -2
- package/.output/public/_nuxt/{_cy8R3nk.js → 6bB8Ev7a.js} +1 -1
- package/.output/public/_nuxt/{1zUTf4AP.js → 7rT1DCe2.js} +1 -1
- package/.output/public/_nuxt/{vIOxcXKR.js → 9O1MXkck.js} +1 -1
- package/.output/public/_nuxt/{7oCGSglN.js → 9kAKMaPC.js} +1 -1
- package/.output/public/_nuxt/{CVqlefTY.js → B-DMcEU9.js} +1 -1
- package/.output/public/_nuxt/{BS2ZNXI1.js → B0nzD8Sk.js} +1 -1
- package/.output/public/_nuxt/B2PqR2Vu.js +1 -0
- package/.output/public/_nuxt/{Db4KMnt8.js → B2wI_pYg.js} +1 -1
- package/.output/public/_nuxt/{zq-a1TeT.js → B5FuOh7E.js} +1 -1
- package/.output/public/_nuxt/B6om4MW2.js +1 -0
- package/.output/public/_nuxt/{Dya5oK8u.js → B7ikW4eF.js} +1 -1
- package/.output/public/_nuxt/{BYHCP8x7.js → B8DFEjxA.js} +1 -1
- package/.output/public/_nuxt/{6boMs_nF.js → B9kWNcU7.js} +1 -1
- package/.output/public/_nuxt/BAZ8sewA.js +1 -0
- package/.output/public/_nuxt/{BXuWCWsJ.js → BCPwL4ma.js} +1 -1
- package/.output/public/_nuxt/{DY3uK7wM.js → BCrlmHh_.js} +1 -1
- package/.output/public/_nuxt/{BR8bKz8h.js → BD-AFJWW.js} +1 -1
- package/.output/public/_nuxt/{BtHQ1T0f.js → BGcQMReV.js} +1 -1
- package/.output/public/_nuxt/{BDyn4ApB.js → BL1mkqgd.js} +3 -3
- package/.output/public/_nuxt/BNJJSRKh.js +1 -0
- package/.output/public/_nuxt/{D8lwrAYS.js → BNeeERBt.js} +1 -1
- package/.output/public/_nuxt/{CVFwOzbl.js → BSJb5amZ.js} +1 -1
- package/.output/public/_nuxt/{CEnSeCqn.js → BSsaE9Db.js} +1 -1
- package/.output/public/_nuxt/{DzA58_Lm.js → BVO3XpHT.js} +1 -1
- package/.output/public/_nuxt/{CuxrHsu-.js → BWuL2CzO.js} +1 -1
- package/.output/public/_nuxt/{0yk-pS3R.js → B_9zJTqe.js} +1 -1
- package/.output/public/_nuxt/{DcJbYLTp.js → B_Lr1vlV.js} +1 -1
- package/.output/public/_nuxt/{CZoEPC_Q.js → Bc8bTnkd.js} +3 -3
- package/.output/public/_nuxt/{BKXg-alD.js → BghuwIGa.js} +1 -1
- package/.output/public/_nuxt/{PP_4ebzl.js → BjsKx597.js} +1 -1
- package/.output/public/_nuxt/{DuvzM-P1.js → Bl0qBhCG.js} +1 -1
- package/.output/public/_nuxt/{B_wilgcd.js → Bl43dkDq.js} +1 -1
- package/.output/public/_nuxt/{JbHa4oXq.js → BnMTFF5R.js} +1 -1
- package/.output/public/_nuxt/{CY-QVcA5.js → BrX-PnSK.js} +2 -2
- package/.output/public/_nuxt/{DYbZBZet.js → BtV7oNn3.js} +1 -1
- package/.output/public/_nuxt/{apYB9dr5.js → BvFYnRMR.js} +1 -1
- package/.output/public/_nuxt/{x6FRJ5ac.js → BvTUBUNN.js} +1 -1
- package/.output/public/_nuxt/{wO6z2ugJ.js → ByLsRRoQ.js} +1 -1
- package/.output/public/_nuxt/{DC4idAGt.js → C1LcEMwB.js} +1 -1
- package/.output/public/_nuxt/{YX8avsvq.js → C2IiXp9N.js} +2 -2
- package/.output/public/_nuxt/{fbyIeNkc.js → C6OSRpRd.js} +1 -1
- package/.output/public/_nuxt/{3jQMk_5H.js → C796kFT9.js} +1 -1
- package/.output/public/_nuxt/{DEd2xVbS.js → C7m9zGMG.js} +1 -1
- package/.output/public/_nuxt/C8AtdrMH.js +1 -0
- package/.output/public/_nuxt/CAWbHTgy.js +1 -0
- package/.output/public/_nuxt/{ixlNW2So.js → CFmvNggn.js} +1 -1
- package/.output/public/_nuxt/{gTrVszwd.js → CGplHfmR.js} +1 -1
- package/.output/public/_nuxt/CJPrV25_.js +1 -0
- package/.output/public/_nuxt/{U1MWjQMi.js → CKKEWapF.js} +1 -1
- package/.output/public/_nuxt/{C6qKcgOY.js → CLkkdThv.js} +22 -22
- package/.output/public/_nuxt/CNjv28J2.js +1 -0
- package/.output/public/_nuxt/{BLnYhy_t.js → CRRw0Thu.js} +1 -1
- package/.output/public/_nuxt/{10_wwHSz.js → CT8s4rqa.js} +1 -1
- package/.output/public/_nuxt/{C27WoGNZ.js → CZSOrxUy.js} +1 -1
- package/.output/public/_nuxt/{DNP5E1bC.js → CaNEL9JC.js} +5 -5
- package/.output/public/_nuxt/{DhuOKJda.js → CbTLg9oX.js} +1 -1
- package/.output/public/_nuxt/CfCXpVn5.js +1 -0
- package/.output/public/_nuxt/{C9WIgRRL.js → ChmNlvWR.js} +1 -1
- package/.output/public/_nuxt/{t8aDAkZ5.js → CiNxIhaq.js} +1 -1
- package/.output/public/_nuxt/{E3rXPwU8.js → Ck0QYdxe.js} +1 -1
- package/.output/public/_nuxt/{DUVzIl3o.js → Ckb0pu4-.js} +1 -1
- package/.output/public/_nuxt/{vScW1Zgm.js → CkwPRs1D.js} +1 -1
- package/.output/public/_nuxt/CmEJg8C6.js +2 -0
- package/.output/public/_nuxt/{CTCcEJU3.js → CmL_vMJD.js} +1 -1
- package/.output/public/_nuxt/{Bciqk4dX.js → Cq8zPxkT.js} +1 -1
- package/.output/public/_nuxt/{D8M722pn.js → CseYuM6E.js} +1 -1
- package/.output/public/_nuxt/{D0ifH682.js → CxRnB4NC.js} +1 -1
- package/.output/public/_nuxt/{CVdCqaby.js → D0zMyG8n.js} +1 -1
- package/.output/public/_nuxt/{DhI5cA_n.js → D12qPplu.js} +1 -1
- package/.output/public/_nuxt/{Beom-INj.js → D1XYB283.js} +1 -1
- package/.output/public/_nuxt/{BUghTae1.js → D2NxqyzW.js} +1 -1
- package/.output/public/_nuxt/{CZRnNmU8.js → D5xyrvFu.js} +1 -1
- package/.output/public/_nuxt/{2dNDtTiv.js → D6tVZcRs.js} +3 -3
- package/.output/public/_nuxt/{EgKnQnf-.js → D7N3EZ-I.js} +1 -1
- package/.output/public/_nuxt/{C5R5QaCA.js → D8iBB0Py.js} +1 -1
- package/.output/public/_nuxt/{XCjS70z4.js → D8oIH8m1.js} +1 -1
- package/.output/public/_nuxt/{BA_pRWwX.js → DB2zZev7.js} +1 -1
- package/.output/public/_nuxt/{Cl-LOSDV.js → DBrOAqkm.js} +1 -1
- package/.output/public/_nuxt/{DO9SFIh1.js → DDXDFweK.js} +1 -1
- package/.output/public/_nuxt/{B93pdGAW.js → DFZkCmLQ.js} +1 -1
- package/.output/public/_nuxt/{CLfF6dSn.js → DFpmIy6J.js} +1 -1
- package/.output/public/_nuxt/{BfcLZ_fC.js → DKZmgHNU.js} +1 -1
- package/.output/public/_nuxt/{CPutXj8l.js → DNcOC5zj.js} +1 -1
- package/.output/public/_nuxt/{BHtY0l0l.js → DQhm-UPG.js} +1 -1
- package/.output/public/_nuxt/{C2FxZbO_.js → DR8tGJhL.js} +1 -1
- package/.output/public/_nuxt/{D4UJwDQJ.js → DVAEVTjy.js} +1 -1
- package/.output/public/_nuxt/{2nOqGUPr.js → DVqrPkCJ.js} +1 -1
- package/.output/public/_nuxt/DWZ9ieYa.js +1 -0
- package/.output/public/_nuxt/{nnQqD5pb.js → DWj6VsZv.js} +1 -1
- package/.output/public/_nuxt/{C2vq6Te8.js → DXJ9PxCv.js} +1 -1
- package/.output/public/_nuxt/{CobqYwkp.js → D_ziPROx.js} +1 -1
- package/.output/public/_nuxt/{GtEM7xVU.js → Da2vwoYG.js} +1 -1
- package/.output/public/_nuxt/{Cc-2ziaZ.js → Ddz3HcBB.js} +1 -1
- package/.output/public/_nuxt/{Di-Nc75e.js → DgYei0bK.js} +1 -1
- package/.output/public/_nuxt/{DQh6I9z9.js → Di_3GV_R.js} +1 -1
- package/.output/public/_nuxt/{ByYh0uRg.js → Djog1f_e.js} +1 -1
- package/.output/public/_nuxt/{C4mwL7SE.js → Dkap2-Pj.js} +2 -2
- package/.output/public/_nuxt/{D5q8SnqE.js → DlJe_sHk.js} +1 -1
- package/.output/public/_nuxt/DlPOQpH_.js +1 -0
- package/.output/public/_nuxt/{DTGenhcA.js → DmYWMtVA.js} +1 -1
- package/.output/public/_nuxt/DmxKU7sH.js +1 -0
- package/.output/public/_nuxt/{DtjjnHnt.js → DowkFZ2V.js} +1 -1
- package/.output/public/_nuxt/{0NJ3PaRM.js → DsodHRrQ.js} +1 -1
- package/.output/public/_nuxt/{Bk6JUtIo.js → DuzpliIL.js} +1 -1
- package/.output/public/_nuxt/DvHS7_h2.js +1 -0
- package/.output/public/_nuxt/DwSY6_2U.js +1 -0
- package/.output/public/_nuxt/{Djs0Tlpa.js → DypJaSm-.js} +1 -1
- package/.output/public/_nuxt/{C71_a1IX.js → DzKaXH6P.js} +1 -1
- package/.output/public/_nuxt/{CBTkrk2M.js → FK-jSuOT.js} +1 -1
- package/.output/public/_nuxt/{ILEvizzp.js → Fc2JsQt4.js} +1 -1
- package/.output/public/_nuxt/{BIXrSYwR.js → IYCBGuRS.js} +1 -1
- package/.output/public/_nuxt/{JX1oqJI9.js → LRO7YHoH.js} +1 -1
- package/.output/public/_nuxt/{Kw0zy3FG.js → NrRzUJNY.js} +1 -1
- package/.output/public/_nuxt/{DJTCT0bl.js → OeVS0Rsb.js} +1 -1
- package/.output/public/_nuxt/{BmOtR1wX.js → OlF0QnKF.js} +1 -1
- package/.output/public/_nuxt/{DTAStixR.js → QuAoqY7t.js} +1 -1
- package/.output/public/_nuxt/{8q5NepGW.js → RlXHkmOd.js} +2 -2
- package/.output/public/_nuxt/{rfGRTJJW.js → TxMdabnL.js} +1 -1
- package/.output/public/_nuxt/{CZVzFlpI.js → WZnvL9Dh.js} +1 -1
- package/.output/public/_nuxt/ZvG7a1W3.js +1 -0
- package/.output/public/_nuxt/{N5XtbYVD.js → aPNZBVrG.js} +1 -1
- package/.output/public/_nuxt/builds/latest.json +1 -1
- package/.output/public/_nuxt/builds/meta/495aca73-bfa5-456e-b96a-f02e009c72d3.json +1 -0
- package/.output/public/_nuxt/entry.C_udkZt9.css +1 -0
- package/.output/public/_nuxt/{D_4LPm1U.js → evY81hM3.js} +1 -1
- package/.output/public/_nuxt/{DzGy77Vr.js → h_bXa-f2.js} +1 -1
- package/.output/public/_nuxt/{D9nmzBAw.js → i6QBzaEi.js} +1 -1
- package/.output/public/_nuxt/{BGgwYWjH.js → iTVKJ1kw.js} +1 -1
- package/.output/public/_nuxt/{Um1vPiAz.js → j92uR3uR.js} +1 -1
- package/.output/public/_nuxt/jdUkeAj_.js +1 -0
- package/.output/public/_nuxt/{BmVLxnDU.js → jeRvcMHU.js} +1 -1
- package/.output/public/_nuxt/{SrncdpaW.js → kuv0zpKq.js} +1 -1
- package/.output/public/_nuxt/{DfF81NlA.js → l3lKQs7b.js} +1 -1
- package/.output/public/_nuxt/{4K03TkGA.js → pdYvpiud.js} +3 -3
- package/.output/public/_nuxt/{C39dQ88F.js → qIgZ7OXa.js} +1 -1
- package/.output/public/_nuxt/{DS2wStH1.js → qcVwZv8e.js} +1 -1
- package/.output/public/_nuxt/{g5MjDvm5.js → ru8fqqWs.js} +1 -1
- package/.output/public/_nuxt/{CQqCBrXj.js → sBzyvWMJ.js} +1 -1
- package/.output/public/_nuxt/{D3AZaldL.js → sgmhgpCS.js} +1 -1
- package/.output/public/_nuxt/{ChcO9s3o.js → y2jv0da-.js} +1 -1
- package/.output/public/_nuxt/{Dn5a-guE.js → yyS4-kAX.js} +1 -1
- package/.output/public/_nuxt/zIoBLBHF.js +1 -0
- package/.output/public/_nuxt/zpazwPgx.js +1 -0
- package/.output/server/chunks/build/CodeIcon-CWD5HcV7.mjs +1 -1
- package/.output/server/chunks/build/DropdownMenu-BBrV9nXz.mjs +1 -1
- package/.output/server/chunks/build/EditorToolbar-DIfb5arC.mjs +1 -1
- package/.output/server/chunks/build/Img-CWLmvN1t.mjs +1 -1
- package/.output/server/chunks/build/MDC-Dx0YPDhe.mjs +1 -1
- package/.output/server/chunks/build/Select-BB1oLrCD.mjs +1 -1
- package/.output/server/chunks/build/SelectMenu-DPssg6zD.mjs +1 -1
- package/.output/server/chunks/build/Table-DCwTlhCj.mjs +1 -1
- package/.output/server/chunks/build/Tooltip-TRyl6dje.mjs +1 -1
- package/.output/server/chunks/build/Tree-DUhXKd8y.mjs +1 -1
- package/.output/server/chunks/build/_uuid_-DfJaumTE.mjs +1 -1
- package/.output/server/chunks/build/{chat-CR3JIVEq.mjs → chat-m4-n9vC6.mjs} +516 -14
- package/.output/server/chunks/build/chat-m4-n9vC6.mjs.map +1 -0
- package/.output/server/chunks/build/client.precomputed.mjs +1 -1
- package/.output/server/chunks/build/cookie-C_iulBi6.mjs +1 -1
- package/.output/server/chunks/build/dashboard-CiVTAZuF.mjs +1 -1
- package/.output/server/chunks/build/docs-ChGwOPg5.mjs +1 -1
- package/.output/server/chunks/build/fetch-BB7Qzkwe.mjs +1 -1
- package/.output/server/chunks/build/index-CxDxc9fm.mjs +1 -1
- package/.output/server/chunks/build/server.mjs +2 -2
- package/.output/server/chunks/build/settings-B2KXoGcz.mjs +1 -1
- package/.output/server/chunks/build/useNotificationBus-BG5JNQf1.mjs +1 -1
- package/.output/server/chunks/build/view-n2sYa4Zh.mjs +1 -1
- package/.output/server/chunks/nitro/nitro.mjs +882 -866
- package/.output/server/chunks/routes/_ws/chat.mjs +40 -6
- package/.output/server/chunks/routes/_ws/chat.mjs.map +1 -1
- package/.output/server/chunks/routes/api/bridges/_id/contacts.get.mjs +84 -0
- package/.output/server/chunks/routes/api/bridges/_id/contacts.get.mjs.map +1 -0
- package/.output/server/chunks/routes/api/bridges/_id/send.post.mjs +70 -0
- package/.output/server/chunks/routes/api/bridges/_id/send.post.mjs.map +1 -0
- package/.output/server/chunks/routes/api/bridges/context.get.mjs +19 -18
- package/.output/server/chunks/routes/api/bridges/context.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/conversations/_id_.delete.mjs +1 -1
- package/.output/server/chunks/routes/api/conversations/_id_.get.mjs +1 -1
- package/.output/server/chunks/routes/api/dashboard/overview.get.mjs +1 -1
- package/.output/server/chunks/routes/api/documents/_id/public.get.mjs +1 -1
- package/.output/server/chunks/routes/api/documents/_id/restore.post.mjs +1 -1
- package/.output/server/chunks/routes/api/documents/by-path.post.mjs +1 -1
- package/.output/server/chunks/routes/api/documents/index.delete.mjs +1 -1
- package/.output/server/chunks/routes/api/documents/index.put.mjs +1 -1
- package/.output/server/chunks/routes/api/fs/delete.post.mjs +1 -1
- package/.output/server/chunks/routes/api/fs/list.get.mjs +1 -1
- package/.output/server/chunks/routes/api/fs/mkdir.post.mjs +1 -1
- package/.output/server/chunks/routes/api/fs/move.post.mjs +1 -1
- package/.output/server/chunks/routes/api/fs/read.post.mjs +1 -1
- package/.output/server/chunks/routes/api/fs/rename.post.mjs +1 -1
- package/.output/server/chunks/routes/api/fs/write.post.mjs +1 -1
- package/.output/server/chunks/routes/api/health.get.mjs +1 -1
- package/.output/server/chunks/routes/api/home.get.mjs +1 -1
- package/.output/server/chunks/routes/api/hooks/index.get.mjs +1 -1
- package/.output/server/chunks/routes/api/hooks/index.post.mjs +1 -1
- package/.output/server/chunks/routes/api/hooks/stats.get.mjs +1 -1
- package/.output/server/chunks/routes/api/index.get10.mjs +1 -1
- package/.output/server/chunks/routes/api/index.get3.mjs +1 -1
- package/.output/server/chunks/routes/api/index.get4.mjs +1 -1
- package/.output/server/chunks/routes/api/index.get5.mjs +1 -1
- package/.output/server/chunks/routes/api/index.get6.mjs +1 -1
- package/.output/server/chunks/routes/api/index.get7.mjs +1 -1
- package/.output/server/chunks/routes/api/index.get8.mjs +1 -1
- package/.output/server/chunks/routes/api/index.get9.mjs +1 -1
- package/.output/server/chunks/routes/api/index.post3.mjs +1 -1
- package/.output/server/chunks/routes/api/index.post4.mjs +1 -1
- package/.output/server/chunks/routes/api/index.post5.mjs +1 -1
- package/.output/server/chunks/routes/api/index.put.mjs +1 -1
- package/.output/server/chunks/routes/api/memory/_id_.delete.mjs +1 -1
- package/.output/server/chunks/routes/api/memory/context.get.mjs +1 -1
- package/.output/server/chunks/routes/api/memory/extract.post.mjs +1 -1
- package/.output/server/chunks/routes/api/memory/search.get.mjs +1 -1
- package/.output/server/chunks/routes/api/memory/store.post.mjs +1 -1
- package/.output/server/chunks/routes/api/projects/index.delete.mjs +1 -1
- package/.output/server/chunks/routes/api/projects/index.get.mjs +1 -1
- package/.output/server/chunks/routes/api/projects/index.put.mjs +1 -1
- package/.output/server/chunks/routes/api/secrets/_key_.delete.mjs +1 -1
- package/.output/server/chunks/routes/api/secrets/_key_.get.mjs +1 -1
- package/.output/server/chunks/routes/api/secrets/_key_.put.mjs +1 -1
- package/.output/server/chunks/routes/api/skills/_name/delete.post.mjs +1 -1
- package/.output/server/chunks/routes/api/skills/_name/export.get.mjs +1 -1
- package/.output/server/chunks/routes/api/skills/_name/files/create.post.mjs +1 -1
- package/.output/server/chunks/routes/api/skills/_name/files/delete.post.mjs +1 -1
- package/.output/server/chunks/routes/api/skills/_name/files/read.post.mjs +1 -1
- package/.output/server/chunks/routes/api/skills/_name/files/write.post.mjs +1 -1
- package/.output/server/chunks/routes/api/skills/_name/index.get.mjs +1 -1
- package/.output/server/chunks/routes/api/skills/_name/rename.post.mjs +1 -1
- package/.output/server/chunks/routes/api/skills/_name/toggle.post.mjs +1 -1
- package/.output/server/chunks/routes/api/skills/create.post.mjs +1 -1
- package/.output/server/chunks/routes/api/skills/generate.post.mjs +1 -1
- package/.output/server/chunks/routes/api/skills/import.post.mjs +1 -1
- package/.output/server/chunks/routes/api/skills/index.get.mjs +1 -1
- package/.output/server/chunks/routes/api/skills/index.get2.mjs +1 -1
- package/.output/server/chunks/routes/api/skills/library/check-updates.get.mjs +1 -1
- package/.output/server/chunks/routes/api/skills/library/install.post.mjs +1 -1
- package/.output/server/chunks/routes/api/tasks/_id/restore.post.mjs +1 -1
- package/.output/server/chunks/routes/api/tasks/index.delete.mjs +1 -1
- package/.output/server/chunks/routes/api/tasks/index.put.mjs +1 -1
- package/.output/server/chunks/routes/api/tasks/tags.get.mjs +1 -1
- package/.output/server/chunks/routes/api/usage/stats.get.mjs +1 -1
- package/.output/server/chunks/routes/api/user/email.patch.mjs +1 -1
- package/.output/server/chunks/routes/api/webhooks/bluebubbles.post.mjs +1 -1
- package/.output/server/chunks/routes/api/webhooks/telegram.post.mjs +1 -1
- package/.output/server/chunks/routes/notifications.mjs +1 -1
- package/.output/server/chunks/routes/renderer.mjs +1 -1
- package/.output/server/chunks/routes/terminal.mjs +1 -1
- package/.output/server/index.mjs +1 -1
- package/.output/server/package.json +1 -1
- package/Claude/skills/_lib/api.py +3 -2
- package/Claude/skills/bridge/SKILL.md +25 -1
- package/Claude/skills/bridge/bridge.py +64 -0
- package/app/components/chat/ChatInput.vue +133 -5
- package/app/components/chat/MessageBubble.vue +188 -6
- package/app/composables/useAttachments.ts +196 -0
- package/app/composables/useChat.ts +14 -2
- package/app/pages/chat.vue +4 -2
- package/package.json +1 -1
- package/server/api/bridges/[id]/contacts.get.ts +57 -0
- package/server/api/bridges/[id]/send.post.ts +40 -0
- package/server/api/bridges/context.get.ts +19 -18
- package/server/bridge/adapters/imessage.ts +9 -2
- package/server/bridge/responder.ts +3 -3
- package/server/routes/_ws/chat.ts +61 -7
- package/server/utils/chat-session-manager.ts +20 -2
- package/shared/types/index.ts +27 -1
- package/.output/public/_nuxt/BH0QDWEm.js +0 -1
- package/.output/public/_nuxt/BK8S2ony.js +0 -1
- package/.output/public/_nuxt/BZrSPX0S.js +0 -1
- package/.output/public/_nuxt/BaZwjF8o.js +0 -1
- package/.output/public/_nuxt/BkfI94R8.js +0 -1
- package/.output/public/_nuxt/C3NST0BU.js +0 -1
- package/.output/public/_nuxt/CKxSHyww.js +0 -1
- package/.output/public/_nuxt/CSKJ-Ahh.js +0 -1
- package/.output/public/_nuxt/CWyMCJQH.js +0 -1
- package/.output/public/_nuxt/CYPO5o_C.js +0 -1
- package/.output/public/_nuxt/CqNwHCpo.js +0 -1
- package/.output/public/_nuxt/CwPdIZ9J.js +0 -1
- package/.output/public/_nuxt/D5jZq8b3.js +0 -1
- package/.output/public/_nuxt/DH4YkDAi.js +0 -1
- package/.output/public/_nuxt/DPklr_tJ.js +0 -2
- package/.output/public/_nuxt/DQM4eBdt.js +0 -1
- package/.output/public/_nuxt/DUAAXJ6Q.js +0 -1
- package/.output/public/_nuxt/DmmdPt_5.js +0 -1
- package/.output/public/_nuxt/H6JbrRBU.js +0 -1
- package/.output/public/_nuxt/builds/meta/515be38f-7222-4e4b-80cb-cef7594b1834.json +0 -1
- package/.output/public/_nuxt/entry.NKPfH2kE.css +0 -1
- package/.output/server/chunks/build/chat-CR3JIVEq.mjs.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{P as l,c as n,G as r,T as p,a4 as u,W as d,am as s}from"./D6tVZcRs.js";const m={base:""},_={__name:"ProseTbody",props:{class:{type:null,required:!1}},setup(e){const a=e,o=l(),t=n(()=>s({extend:s(m),...o.ui?.prose?.tbody||{}}));return(c,i)=>(p(),r("tbody",{class:d(t.value({class:a.class}))},[u(c.$slots,"default")],2))}};export{_ as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{aR as _,a as T,a_ as ee,aQ as de,c as F,a8 as te,S as g,T as u,U as q,a4 as h,a9 as z,C as t,X as I,bm as K,al as qe,au as ce,a3 as U,a6 as ke,V as A,bf as xe,aP as Ve,e as j,f as pe,aS as we,q as me,a2 as $e,M as Ce,k as Ie,aq as le,ao as fe,ar as Se,P as ae,Q as Be,az as ve,aM as be,L as ze,am as N,ab as O,G as E,W as V,_ as G,aa as Q,ae as H,ay as Fe,aj as J,ak as Z,aO as Pe,ah as Re,N as Ee,aN as se,Y as X,b8 as Me,bR as re,b9 as Y,ag as Ae,y as Ne,n as ie}from"./D6tVZcRs.js";import{_ as Ue}from"./BD-AFJWW.js";import{_ as De}from"./BvTUBUNN.js";import{L as oe,_ as Oe}from"./OeVS0Rsb.js";import{i as ne}from"./C6OSRpRd.js";import{u as je}from"./B6om4MW2.js";import{R as Te}from"./C8AtdrMH.js";import{V as ge}from"./DuzpliIL.js";import{_ as Le}from"./Bl0qBhCG.js";import{_ as ue}from"./ByLsRRoQ.js";import{u as Ke}from"./IYCBGuRS.js";import{u as Ge}from"./C6Y-ieo6.js";import{u as Qe}from"./BghuwIGa.js";import"./B5FuOh7E.js";import"./D12qPplu.js";import"./DWZ9ieYa.js";import"./DwSY6_2U.js";import"./CAWbHTgy.js";import"./BvFYnRMR.js";import"./DowkFZ2V.js";import"./sBzyvWMJ.js";import"./B0nzD8Sk.js";import"./BCrlmHh_.js";const[He]=_("CheckboxGroupRoot");function W(a){return a==="indeterminate"}function ye(a){return W(a)?"indeterminate":a?"checked":"unchecked"}const[We,Xe]=_("CheckboxRoot");var Ye=T({inheritAttrs:!1,__name:"CheckboxRoot",props:{defaultValue:{type:[Boolean,String],required:!1},modelValue:{type:[Boolean,String,null],required:!1,default:void 0},disabled:{type:Boolean,required:!1},value:{type:null,required:!1,default:"on"},id:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"},name:{type:String,required:!1},required:{type:Boolean,required:!1}},emits:["update:modelValue"],setup(a,{emit:v}){const e=a,s=v,{forwardRef:n,currentElement:k}=ee(),p=He(null),o=de(e,"modelValue",s,{defaultValue:e.defaultValue,passive:e.modelValue===void 0}),f=F(()=>p?.disabled.value||e.disabled),m=F(()=>te(p?.modelValue.value)?o.value==="indeterminate"?"indeterminate":o.value:ne(p.modelValue.value,e.value));function S(){if(te(p?.modelValue.value))o.value=W(o.value)?!0:!o.value;else{const l=[...p.modelValue.value||[]];if(ne(l,e.value)){const c=l.findIndex(r=>ke(r,e.value));l.splice(c,1)}else l.push(e.value);p.modelValue.value=l}}const P=je(k),y=F(()=>e.id&&k.value?document.querySelector(`[for="${e.id}"]`)?.innerText:void 0);return Xe({disabled:f,state:m}),(l,c)=>(u(),g(ce(t(p)?.rovingFocus.value?t(Te):t(U)),I(l.$attrs,{id:l.id,ref:t(n),role:"checkbox","as-child":l.asChild,as:l.as,type:l.as==="button"?"button":void 0,"aria-checked":t(W)(m.value)?"mixed":m.value,"aria-required":l.required,"aria-label":l.$attrs["aria-label"]||y.value,"data-state":t(ye)(m.value),"data-disabled":f.value?"":void 0,disabled:f.value,focusable:t(p)?.rovingFocus.value?!f.value:void 0,onKeydown:K(qe(()=>{},["prevent"]),["enter"]),onClick:S}),{default:q(()=>[h(l.$slots,"default",{modelValue:t(o),state:m.value}),t(P)&&l.name&&!t(p)?(u(),g(t(ge),{key:0,type:"checkbox",checked:!!m.value,name:l.name,value:l.value,disabled:f.value,required:l.required},null,8,["checked","name","value","disabled","required"])):z("v-if",!0)]),_:3},16,["id","as-child","as","type","aria-checked","aria-required","aria-label","data-state","data-disabled","disabled","focusable","onKeydown"]))}}),Je=Ye,Ze=T({__name:"CheckboxIndicator",props:{forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(a){const{forwardRef:v}=ee(),e=We();return(s,n)=>(u(),g(t(xe),{present:s.forceMount||t(W)(t(e).state.value)||t(e).state.value===!0},{default:q(()=>[A(t(U),I({ref:t(v),"data-state":t(ye)(t(e).state.value),"data-disabled":t(e).disabled.value?"":void 0,style:{pointerEvents:"none"},"as-child":s.asChild,as:s.as},s.$attrs),{default:q(()=>[h(s.$slots,"default")]),_:3},16,["data-state","data-disabled","as-child","as"])]),_:3},8,["present"]))}}),_e=Ze;const[ea,aa]=_("PinInputRoot");var ta=T({inheritAttrs:!1,__name:"PinInputRoot",props:{modelValue:{type:null,required:!1},defaultValue:{type:null,required:!1},placeholder:{type:String,required:!1,default:""},mask:{type:Boolean,required:!1},otp:{type:Boolean,required:!1},type:{type:null,required:!1,default:"text"},dir:{type:String,required:!1},disabled:{type:Boolean,required:!1},id:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},name:{type:String,required:!1},required:{type:Boolean,required:!1}},emits:["update:modelValue","complete"],setup(a,{emit:v}){const e=a,s=v,{mask:n,otp:k,placeholder:p,type:o,disabled:f,dir:m}=Ve(e),{forwardRef:S}=ee(),P=Ke(m),y=de(e,"modelValue",s,{defaultValue:e.defaultValue??[],passive:!0,deep:!0}),l=F(()=>Array.isArray(y.value)?[...y.value]:[]),c=j(new Set);function r(C){c.value.add(C)}const b=F(()=>e.type==="number"),w=F(()=>l.value.filter($=>!!$||b.value&&$===0).length===c.value.size);return pe(y,()=>{w.value&&s("complete",y.value)},{deep:!0}),aa({modelValue:y,currentModelValue:l,mask:n,otp:k,placeholder:p,type:o,dir:P,disabled:f,isCompleted:w,inputElements:c,onInputElementChange:r,isNumericMode:b}),(C,$)=>(u(),g(t(U),I(C.$attrs,{ref:t(S),dir:t(P),"data-complete":w.value?"":void 0,"data-disabled":t(f)?"":void 0}),{default:q(()=>[h(C.$slots,"default",{modelValue:t(y)}),A(ge,{id:C.id,as:"input",feature:"focusable",tabindex:"-1",value:l.value.join(""),name:C.name??"",disabled:t(f),required:C.required,onFocus:$[0]||($[0]=R=>Array.from(c.value)?.[0]?.focus())},null,8,["id","value","name","disabled","required"])]),_:3},16,["dir","data-complete","data-disabled"]))}}),la=ta,sa=T({__name:"PinInputInput",props:{index:{type:Number,required:!0},disabled:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"input"}},setup(a){const v=a,e=ea(),s=F(()=>Array.from(e.inputElements.value)),n=F(()=>e.currentModelValue.value[v.index]),k=F(()=>v.disabled||e.disabled.value),p=F(()=>e.otp.value),o=F(()=>e.mask.value),{primitiveElement:f,currentElement:m}=we();function S(i){const d=i.target;if((i.data?.length??0)>1){C(d.value);return}if(e.isNumericMode.value&&!/^\d*$/.test(d.value)){d.value=d.value.replace(/\D/g,"");return}d.value=i.data||d.value.slice(-1),R(v.index,d.value);const x=s.value[v.index+1];x&&x.focus()}function P(){const i=m.value;Ie(()=>{i&&!i.value&&(i.placeholder=e.placeholder.value)})}function y(i){Ge(i,Ce(),void 0,{itemsArray:s.value,focus:!0,loop:!1,arrowKeyOptions:"horizontal",dir:e.dir.value})}function l(i){if(i.preventDefault(),i.target.value)R(v.index,"");else{const B=s.value[v.index-1];B&&(B.focus(),R(v.index-1,""))}}function c(i){i.key==="Delete"&&(i.preventDefault(),R(v.index,""))}function r(i){const d=i.target;d.setSelectionRange(1,1),d.value||(d.placeholder=""),setTimeout(()=>{d.value||(d.placeholder="")})}function b(i){P()}function w(i){i.preventDefault();const d=i.clipboardData;if(!d)return;const x=d.getData("text");C(x)}function C(i){const d=[...e.currentModelValue.value],x=i.length>=s.value.length?0:v.index,B=Math.min(x+i.length,s.value.length);for(let M=x;M<B;M++){const L=s.value[M],D=i[M-x];e.isNumericMode.value&&!/^\d*$/.test(D)||(d[M]=D,L.focus())}e.modelValue.value=d,s.value[B]?.focus()}function $(i){let d=i.length-1;for(;d>=0&&i[d]==="";)i.pop(),d--;return i}function R(i,d){const x=[...e.currentModelValue.value];if(e.isNumericMode.value){const B=+d;d===""||isNaN(B)?delete x[i]:x[i]=B}else x[i]=d;e.modelValue.value=$(x)}return pe(n,()=>{n.value||P()}),me(()=>{e.onInputElementChange(m.value)}),$e(()=>{e.inputElements?.value.delete(m.value)}),(i,d)=>(u(),g(t(U),{ref_key:"primitiveElement",ref:f,autocapitalize:"none",as:i.as,"as-child":i.asChild,autocomplete:p.value?"one-time-code":"false",type:o.value?"password":"text",inputmode:t(e).isNumericMode.value?"numeric":"text",pattern:t(e).isNumericMode.value?"[0-9]*":void 0,placeholder:t(e).placeholder.value,value:n.value,disabled:k.value,"data-disabled":k.value?"":void 0,"data-complete":t(e).isCompleted.value?"":void 0,"aria-label":`pin input ${i.index+1} of ${s.value.length}`,onInput:d[0]||(d[0]=x=>S(x)),onKeydown:[K(y,["left","right","up","down","home","end"]),K(l,["backspace"]),K(c,["delete"])],onFocus:r,onBlur:b,onPaste:w},{default:q(()=>[h(i.$slots,"default")]),_:3},8,["as","as-child","autocomplete","type","inputmode","pattern","placeholder","value","disabled","data-disabled","data-complete","aria-label"]))}}),ra=sa;const ia={slots:{root:"relative flex items-start",container:"flex items-center",base:"rounded-sm ring ring-inset ring-accented overflow-hidden focus-visible:outline-2 focus-visible:outline-offset-2",indicator:"flex items-center justify-center size-full text-inverted",icon:"shrink-0 size-full",wrapper:"w-full",label:"block font-medium text-default",description:"text-muted"},variants:{color:{primary:{base:"focus-visible:outline-primary",indicator:"bg-primary"},secondary:{base:"focus-visible:outline-secondary",indicator:"bg-secondary"},success:{base:"focus-visible:outline-success",indicator:"bg-success"},info:{base:"focus-visible:outline-info",indicator:"bg-info"},warning:{base:"focus-visible:outline-warning",indicator:"bg-warning"},error:{base:"focus-visible:outline-error",indicator:"bg-error"},neutral:{base:"focus-visible:outline-inverted",indicator:"bg-inverted"}},variant:{list:{root:""},card:{root:"border border-muted rounded-lg"}},indicator:{start:{root:"flex-row",wrapper:"ms-2"},end:{root:"flex-row-reverse",wrapper:"me-2"},hidden:{base:"sr-only",wrapper:"text-center"}},size:{xs:{base:"size-3",container:"h-4",wrapper:"text-xs"},sm:{base:"size-3.5",container:"h-4",wrapper:"text-xs"},md:{base:"size-4",container:"h-5",wrapper:"text-sm"},lg:{base:"size-4.5",container:"h-5",wrapper:"text-sm"},xl:{base:"size-5",container:"h-6",wrapper:"text-base"}},required:{true:{label:"after:content-['*'] after:ms-0.5 after:text-error"}},disabled:{true:{root:"opacity-75",base:"cursor-not-allowed",label:"cursor-not-allowed",description:"cursor-not-allowed"}},checked:{true:""}},compoundVariants:[{size:"xs",variant:"card",class:{root:"p-2.5"}},{size:"sm",variant:"card",class:{root:"p-3"}},{size:"md",variant:"card",class:{root:"p-3.5"}},{size:"lg",variant:"card",class:{root:"p-4"}},{size:"xl",variant:"card",class:{root:"p-4.5"}},{color:"primary",variant:"card",class:{root:"has-data-[state=checked]:border-primary"}},{color:"secondary",variant:"card",class:{root:"has-data-[state=checked]:border-secondary"}},{color:"success",variant:"card",class:{root:"has-data-[state=checked]:border-success"}},{color:"info",variant:"card",class:{root:"has-data-[state=checked]:border-info"}},{color:"warning",variant:"card",class:{root:"has-data-[state=checked]:border-warning"}},{color:"error",variant:"card",class:{root:"has-data-[state=checked]:border-error"}},{color:"neutral",variant:"card",class:{root:"has-data-[state=checked]:border-inverted"}},{variant:"card",disabled:!0,class:{root:"cursor-not-allowed"}}],defaultVariants:{size:"md",color:"primary",variant:"list",indicator:"start"}},oa=Object.assign({inheritAttrs:!1},{__name:"UCheckbox",props:le({as:{type:null,required:!1},label:{type:String,required:!1},description:{type:String,required:!1},color:{type:null,required:!1},variant:{type:null,required:!1},size:{type:null,required:!1},indicator:{type:null,required:!1},icon:{type:null,required:!1},indeterminateIcon:{type:null,required:!1},class:{type:null,required:!1},ui:{type:null,required:!1},disabled:{type:Boolean,required:!1},required:{type:Boolean,required:!1},name:{type:String,required:!1},value:{type:null,required:!1},id:{type:String,required:!1},defaultValue:{type:[Boolean,String],required:!1}},{modelValue:{type:[Boolean,String],default:void 0},modelModifiers:{}}),emits:le(["change"],["update:modelValue"]),setup(a,{emit:v}){const e=a,s=fe(),n=v,k=Se(a,"modelValue",{type:[Boolean,String],default:void 0}),p=ae(),o=Be(ve(e,"required","value","defaultValue")),{id:f,emitFormChange:m,emitFormInput:S,size:P,color:y,name:l,disabled:c,ariaAttrs:r}=be(e),b=f.value??ze(),w=F(()=>N({extend:N(ia),...p.ui?.checkbox||{}})({size:P.value,color:y.value,variant:e.variant,indicator:e.indicator,required:e.required,disabled:c.value}));function C($){const R=new Event("change",{target:{value:$}});n("change",R),m(),S()}return($,R)=>(u(),g(t(U),{as:!a.variant||a.variant==="list"?a.as:t(oe),"data-slot":"root",class:V(w.value.root({class:[e.ui?.root,e.class]}))},{default:q(()=>[O("div",{"data-slot":"container",class:V(w.value.container({class:e.ui?.container}))},[A(t(Je),I({id:t(b)},{...t(o),...$.$attrs,...t(r)},{modelValue:k.value,"onUpdate:modelValue":[R[0]||(R[0]=i=>k.value=i),C],name:t(l),disabled:t(c),"data-slot":"base",class:w.value.base({class:e.ui?.base})}),{default:q(({modelValue:i})=>[A(t(_e),{"data-slot":"indicator",class:V(w.value.indicator({class:e.ui?.indicator}))},{default:q(()=>[i==="indeterminate"?(u(),g(G,{key:0,name:a.indeterminateIcon||t(p).ui.icons.minus,"data-slot":"icon",class:V(w.value.icon({class:e.ui?.icon}))},null,8,["name","class"])):(u(),g(G,{key:1,name:a.icon||t(p).ui.icons.check,"data-slot":"icon",class:V(w.value.icon({class:e.ui?.icon}))},null,8,["name","class"]))]),_:2},1032,["class"])]),_:1},16,["id","modelValue","name","disabled","class"])],2),a.label||s.label||a.description||s.description?(u(),E("div",{key:0,"data-slot":"wrapper",class:V(w.value.wrapper({class:e.ui?.wrapper}))},[a.label||s.label?(u(),g(ce(!a.variant||a.variant==="list"?t(oe):"p"),{key:0,for:t(b),"data-slot":"label",class:V(w.value.label({class:e.ui?.label}))},{default:q(()=>[h($.$slots,"label",{label:a.label},()=>[Q(H(a.label),1)])]),_:3},8,["for","class"])):z("",!0),a.description||s.description?(u(),E("p",{key:1,"data-slot":"description",class:V(w.value.description({class:e.ui?.description}))},[h($.$slots,"description",{description:a.description},()=>[Q(H(a.description),1)])],2)):z("",!0)],2)):z("",!0)]),_:3},8,["as","class"]))}}),na={slots:{root:"relative inline-flex items-center gap-1.5",base:["rounded-md border-0 placeholder:text-dimmed text-center focus:outline-none disabled:cursor-not-allowed disabled:opacity-75","transition-colors"]},variants:{size:{xs:{base:"size-6 text-xs"},sm:{base:"size-7 text-xs"},md:{base:"size-8 text-sm"},lg:{base:"size-9 text-sm"},xl:{base:"size-10 text-base"}},variant:{outline:"text-highlighted bg-default ring ring-inset ring-accented",soft:"text-highlighted bg-elevated/50 hover:bg-elevated focus:bg-elevated disabled:bg-elevated/50",subtle:"text-highlighted bg-elevated ring ring-inset ring-accented",ghost:"text-highlighted bg-transparent hover:bg-elevated focus:bg-elevated disabled:bg-transparent dark:disabled:bg-transparent",none:"text-highlighted bg-transparent"},color:{primary:"",secondary:"",success:"",info:"",warning:"",error:"",neutral:""},highlight:{true:""}},compoundVariants:[{color:"primary",variant:["outline","subtle"],class:"focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-primary"},{color:"secondary",variant:["outline","subtle"],class:"focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-secondary"},{color:"success",variant:["outline","subtle"],class:"focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-success"},{color:"info",variant:["outline","subtle"],class:"focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-info"},{color:"warning",variant:["outline","subtle"],class:"focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-warning"},{color:"error",variant:["outline","subtle"],class:"focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-error"},{color:"primary",highlight:!0,class:"ring ring-inset ring-primary"},{color:"secondary",highlight:!0,class:"ring ring-inset ring-secondary"},{color:"success",highlight:!0,class:"ring ring-inset ring-success"},{color:"info",highlight:!0,class:"ring ring-inset ring-info"},{color:"warning",highlight:!0,class:"ring ring-inset ring-warning"},{color:"error",highlight:!0,class:"ring ring-inset ring-error"},{color:"neutral",variant:["outline","subtle"],class:"focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-inverted"},{color:"neutral",highlight:!0,class:"ring ring-inset ring-inverted"}],defaultVariants:{size:"md",color:"primary",variant:"outline"}},ua={__name:"UPinInput",props:{as:{type:null,required:!1},color:{type:null,required:!1},variant:{type:null,required:!1},size:{type:null,required:!1},length:{type:[Number,String],required:!1,default:5},autofocus:{type:Boolean,required:!1},autofocusDelay:{type:Number,required:!1,default:0},highlight:{type:Boolean,required:!1},class:{type:null,required:!1},ui:{type:null,required:!1},defaultValue:{type:null,required:!1},disabled:{type:Boolean,required:!1},id:{type:String,required:!1},mask:{type:Boolean,required:!1},modelValue:{type:null,required:!1},name:{type:String,required:!1},otp:{type:Boolean,required:!1},placeholder:{type:String,required:!1},required:{type:Boolean,required:!1},type:{type:null,required:!1,default:"text"}},emits:["update:modelValue","complete","change","blur"],setup(a,{expose:v,emit:e}){const s=a,n=e,k=ae(),p=Fe(ve(s,"disabled","id","mask","name","otp","required","type"),n),{emitFormInput:o,emitFormFocus:f,emitFormChange:m,emitFormBlur:S,size:P,color:y,id:l,name:c,highlight:r,disabled:b,ariaAttrs:w}=be(s),C=F(()=>N({extend:N(na),...k.ui?.pinInput||{}})({color:y.value,variant:s.variant,size:P.value,highlight:r.value})),$=j([]),R=j(!1);function i(B){const M=new Event("change",{target:{value:B}});n("change",M),m()}function d(B){(!B.relatedTarget||R.value)&&(n("blur",B),S())}function x(){s.autofocus&&$.value[0]?.$el?.focus()}return me(()=>{setTimeout(()=>{x()},s.autofocusDelay)}),v({inputsRef:$}),(B,M)=>(u(),g(t(la),I({...t(p),...t(w)},{id:t(l),name:t(c),placeholder:a.placeholder,"model-value":a.modelValue,"default-value":a.defaultValue,"data-slot":"root",class:C.value.root({class:[s.ui?.root,s.class]}),"onUpdate:modelValue":M[0]||(M[0]=L=>t(o)()),onComplete:i}),{default:q(()=>[(u(!0),E(J,null,Z(t(Pe)(s.length),(L,D)=>(u(),g(t(ra),{key:L,ref_for:!0,ref:he=>$.value[D]=he,index:D,"data-slot":"base",class:V(C.value.base({class:s.ui?.base})),disabled:t(b),onBlur:d,onFocus:t(f)},null,8,["index","class","disabled","onFocus"]))),128))]),_:1},16,["id","name","placeholder","model-value","default-value","class"]))}},da={slots:{root:"w-full space-y-6",header:"flex flex-col text-center",leading:"mb-2",leadingIcon:"size-8 shrink-0 inline-block",title:"text-xl text-pretty font-semibold text-highlighted",description:"mt-1 text-base text-pretty text-muted",body:"gap-y-6 flex flex-col",providers:"space-y-3",checkbox:"",select:"w-full",password:"w-full",otp:"w-full",input:"w-full",separator:"",form:"space-y-5",footer:"text-sm text-center text-muted mt-2"}},ca=Object.assign({inheritAttrs:!1},{__name:"UAuthForm",props:{as:{type:null,required:!1},icon:{type:null,required:!1},title:{type:String,required:!1},description:{type:String,required:!1},fields:{type:Array,required:!1},providers:{type:Array,required:!1},separator:{type:[String,Object],required:!1,default:"or"},submit:{type:Object,required:!1},schema:{type:null,required:!1},validate:{type:Function,required:!1},validateOn:{type:Array,required:!1},validateOnInputDelay:{type:Number,required:!1},disabled:{type:Boolean,required:!1},loading:{type:Boolean,required:!1},loadingAuto:{type:Boolean,required:!1},class:{type:null,required:!1},onSubmit:{type:Function,required:!1},ui:{type:null,required:!1}},emits:["submit"],setup(a,{expose:v}){const e=a,s=Re((e.fields||[]).reduce((l,c)=>(c.name&&(l[c.name]=c.defaultValue),l),{})),n=fe(),{t:k}=Ee(),p=ae(),o=F(()=>N({extend:N(da),...p.ui?.authForm||{}})()),f=se("formRef"),m=j(!1),S=se("passwordRef");function P(l){const c=["name","errorPattern","help","error","hint","size","required","eagerValidation","validateOnInputDelay"];return l.type==="checkbox"?re(l,c):re(l,[...c,"label","description"])}function y(l){const c=["errorPattern","help","error","hint","size","required","eagerValidation","validateOnInputDelay"];return l.type==="checkbox"||l.type==="select"||l.type==="otp"?l.type==="checkbox"?Y(l,[...c,"type"]):Y(l,[...c,"type","label","description"]):Y(l,[...c,"label","description"])}return v({formRef:f,state:s}),(l,c)=>(u(),g(t(U),{as:a.as,"data-slot":"root",class:V(o.value.root({class:[e.ui?.root,e.class]}))},{default:q(()=>[a.icon||n.leading||a.title||n.title||a.description||n.description||n.header?(u(),E("div",{key:0,"data-slot":"header",class:V(o.value.header({class:e.ui?.header}))},[h(l.$slots,"header",{},()=>[a.icon||n.leading?(u(),E("div",{key:0,"data-slot":"leading",class:V(o.value.leading({class:e.ui?.leading}))},[h(l.$slots,"leading",{ui:o.value},()=>[a.icon?(u(),g(G,{key:0,name:a.icon,"data-slot":"leadingIcon",class:V(o.value.leadingIcon({class:e.ui?.leadingIcon}))},null,8,["name","class"])):z("",!0)])],2)):z("",!0),a.title||n.title?(u(),E("div",{key:1,"data-slot":"title",class:V(o.value.title({class:e.ui?.title}))},[h(l.$slots,"title",{},()=>[Q(H(a.title),1)])],2)):z("",!0),a.description||n.description?(u(),E("div",{key:2,"data-slot":"description",class:V(o.value.description({class:e.ui?.description}))},[h(l.$slots,"description",{},()=>[Q(H(a.description),1)])],2)):z("",!0)])],2)):z("",!0),O("div",{"data-slot":"body",class:V(o.value.body({class:e.ui?.body}))},[a.providers?.length||n.providers?(u(),E("div",{key:0,"data-slot":"providers",class:V(o.value.providers({class:e.ui?.providers}))},[h(l.$slots,"providers",{},()=>[(u(!0),E(J,null,Z(a.providers,(r,b)=>(u(),g(X,I({key:b,block:"",color:"neutral",variant:"subtle"},{ref_for:!0},r),null,16))),128))])],2)):z("",!0),a.providers?.length&&a.fields?.length?(u(),g(Ue,I({key:1},typeof a.separator=="object"?a.separator:{label:a.separator},{"data-slot":"separator",class:o.value.separator({class:e.ui?.separator})}),null,16,["class"])):z("",!0),a.fields?.length?(u(),g(De,I({key:2,ref_key:"formRef",ref:f,state:s,schema:a.schema,validate:a.validate,"validate-on":a.validateOn,disabled:a.disabled,"loading-auto":a.loadingAuto,"data-slot":"form",class:o.value.form({class:e.ui?.form})},l.$attrs,{onSubmit:a.onSubmit}),{default:q(()=>[(u(!0),E(J,null,Z(a.fields,r=>(u(),g(Oe,I({key:r.name},{ref_for:!0},P(r)),Me({default:q(()=>[h(l.$slots,`${r.name}-field`,I({ref_for:!0},{state:s,field:r}),()=>[r.type==="checkbox"?(u(),g(oa,I({key:0,modelValue:s[r.name],"onUpdate:modelValue":b=>s[r.name]=b,"data-slot":"checkbox",class:o.value.checkbox({class:e.ui?.checkbox})},{ref_for:!0},y(r)),null,16,["modelValue","onUpdate:modelValue","class"])):r.type==="select"?(u(),g(Le,I({key:1,modelValue:s[r.name],"onUpdate:modelValue":b=>s[r.name]=b,"data-slot":"select",class:o.value.select({class:e.ui?.select})},{ref_for:!0},y(r)),null,16,["modelValue","onUpdate:modelValue","class"])):r.type==="otp"?(u(),g(ua,I({key:2,id:r.name,modelValue:s[r.name],"onUpdate:modelValue":b=>s[r.name]=b,"data-slot":"otp",class:o.value.otp({class:e.ui?.otp})},{ref_for:!0},Object.assign({},y(r),typeof r.otp=="object"?r.otp:{}),{otp:""}),null,16,["id","modelValue","onUpdate:modelValue","class"])):r.type==="password"?(u(),g(ue,I({key:3,ref_for:!0,ref_key:"passwordRef",ref:S,modelValue:s[r.name],"onUpdate:modelValue":b=>s[r.name]=b,"data-slot":"password",class:o.value.password({class:e.ui?.password})},{ref_for:!0},y(r),{type:m.value?"text":"password"}),{trailing:q(()=>[A(X,{color:"neutral",variant:"link",size:"sm",icon:m.value?t(p).ui.icons.eyeOff:t(p).ui.icons.eye,"aria-label":m.value?t(k)("authForm.hidePassword"):t(k)("authForm.showPassword"),"aria-pressed":m.value,"aria-controls":S.value?.[0]?.inputRef?.id,onClick:c[0]||(c[0]=b=>m.value=!m.value)},null,8,["icon","aria-label","aria-pressed","aria-controls"])]),_:1},16,["modelValue","onUpdate:modelValue","class","type"])):(u(),g(ue,I({key:4,modelValue:s[r.name],"onUpdate:modelValue":b=>s[r.name]=b,"data-slot":"input",class:o.value.input({class:e.ui?.input})},{ref_for:!0},y(r)),null,16,["modelValue","onUpdate:modelValue","class"]))])]),_:2},[n[`${r.name}-label`]?{name:"label",fn:q(()=>[h(l.$slots,`${r.name}-label`)]),key:"0"}:void 0,n[`${r.name}-description`]?{name:"description",fn:q(()=>[h(l.$slots,`${r.name}-description`)]),key:"1"}:void 0,n[`${r.name}-hint`]?{name:"hint",fn:q(()=>[h(l.$slots,`${r.name}-hint`)]),key:"2"}:void 0,n[`${r.name}-help`]?{name:"help",fn:q(()=>[h(l.$slots,`${r.name}-help`)]),key:"3"}:void 0,n[`${r.name}-error`]?{name:"error",fn:q(()=>[h(l.$slots,`${r.name}-error`)]),key:"4"}:void 0]),1040))),128)),n.validation?h(l.$slots,"validation",{key:0}):z("",!0),h(l.$slots,"submit",{loading:a.loading},()=>[A(X,I({type:"submit",label:t(k)("authForm.submit"),block:"",loading:a.loading,"loading-auto":a.loadingAuto},a.submit),null,16,["label","loading","loading-auto"])])]),_:3},16,["state","schema","validate","validate-on","disabled","loading-auto","class","onSubmit"])):z("",!0)],2),n.footer?(u(),E("div",{key:1,"data-slot":"footer",class:V(o.value.footer({class:e.ui?.footer}))},[h(l.$slots,"footer")],2)):z("",!0)]),_:3},8,["as","class"]))}}),pa={class:"flex flex-col items-center gap-6 mb-8"},ma={class:"flex items-center gap-3"},Na=T({__name:"login",setup(a){const{login:v,isAuthenticated:e}=Qe(),s=Ae(),n=j(!1),k=[{name:"email",type:"email",label:"Email",placeholder:"admin@example.com",required:!0},{name:"password",type:"password",label:"Password",placeholder:"Enter your password",required:!0}];Ne(()=>{e.value&&ie("/")});async function p(o){n.value=!0;const f=await v(o.data.email,o.data.password);f.error?s.add({title:"Login failed",description:f.error.message||"Invalid email or password",color:"error",icon:"i-lucide-alert-circle"}):ie("/"),n.value=!1}return(o,f)=>{const m=G,S=ca;return u(),E("div",null,[O("div",pa,[O("div",ma,[A(m,{name:"i-lucide-brain",class:"size-10 text-primary"}),f[0]||(f[0]=O("span",{class:"font-bold text-2xl"},"Cognova",-1))])]),A(S,{title:"Sign In",description:"Enter your credentials to access your account",fields:k,submit:{label:"Sign In",loading:t(n)},onSubmit:p},null,8,["submit"])])}}});export{Na as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{P as o,c as r,am as a,S as c,T as u,U as i,a4 as p,W as m,C as f,a3 as x}from"./D6tVZcRs.js";const d={base:"w-full max-w-(--ui-container) mx-auto px-4 sm:px-6 lg:px-8"},g={__name:"UContainer",props:{as:{type:null,required:!1},class:{type:null,required:!1}},setup(s){const e=s,t=o(),n=r(()=>a({extend:a(d),...t.ui?.container||{}}));return(l,C)=>(u(),c(f(x),{as:s.as,class:m(n.value({class:e.class}))},{default:i(()=>[p(l.$slots,"default")]),_:3},8,["as","class"]))}};export{g as _};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{P as l,c as r,G as n,T as p,a4 as u,W as i,am as e}from"./D6tVZcRs.js";const d={base:"border-s-4 border-accented ps-4 italic"},b={__name:"ProseBlockquote",props:{class:{type:null,required:!1}},setup(s){const o=s,a=l(),t=r(()=>e({extend:e(d),...a.ui?.prose?.blockquote||{}}));return(c,m)=>(p(),n("blockquote",{class:i(t.value({class:o.class}))},[u(c.$slots,"default")],2))}};export{b as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as X,a as Y}from"./CqNwHCpo.js";import{_ as Z}from"./BmOtR1wX.js";import{a as E,ag as I,c as D,e as b,G as N,R as u,T as n,S as o,ab as d,al as ee,Q as g,_ as K,C as t,ae as B,bm as W,ai as T,W as L,aa as w,a9 as z,q,a2 as te,f as A,bg as le,an as oe,aj as ne,ak as ae,af as se}from"./2dNDtTiv.js";import{_ as ie,a as re}from"./7oCGSglN.js";import{_ as G}from"./wO6z2ugJ.js";import{_ as de}from"./C2vq6Te8.js";import{_ as Q}from"./B93pdGAW.js";import{_ as H}from"./JbHa4oXq.js";import{_ as ue}from"./1zUTf4AP.js";import{c as ce}from"./BHtY0l0l.js";import{_ as me}from"./rfGRTJJW.js";import{_ as fe}from"./DJTCT0bl.js";import"./D5jZq8b3.js";import"./DhI5cA_n.js";import"./DEd2xVbS.js";import"./CKxSHyww.js";import"./DH4YkDAi.js";import"./CWyMCJQH.js";import"./CYPO5o_C.js";import"./BIXrSYwR.js";import"./DtjjnHnt.js";import"./CQqCBrXj.js";import"./BS2ZNXI1.js";import"./DY3uK7wM.js";import"./DS2wStH1.js";import"./apYB9dr5.js";import"./DUAAXJ6Q.js";import"./C6Y-ieo6.js";import"./H6JbrRBU.js";import"./Db4KMnt8.js";import"./D8lwrAYS.js";import"./BA_pRWwX.js";import"./BZrSPX0S.js";import"./DmmdPt_5.js";import"./Bk6JUtIo.js";import"./Vcq4gwWv.js";const pe={class:"h-full flex flex-col"},_e={key:0,class:"h-full min-h-32 flex flex-col items-center justify-center text-dimmed text-sm"},ve=["onContextmenu"],ye={class:"truncate"},ke={class:"flex items-center gap-2"},xe={class:"flex justify-end gap-2"},he={class:"flex items-center gap-2"},$e={class:"flex justify-end gap-2"},ge={class:"flex items-center gap-2 text-error"},be={key:0,class:"text-sm text-dimmed mt-1"},we={class:"flex justify-end gap-2"},Ce=E({__name:"FileTree",props:{skillName:{},files:{},selectedPath:{}},emits:["select","refresh"],setup(S,{emit:P}){const p=S,$=P,m=I();function l(y,e=""){return y.map(s=>{const U=e?`${e}/${s.path}`:s.path,C={id:U,label:s.name,path:U,type:s.type,defaultExpanded:!0};return s.type==="directory"?C.children=s.children?l(s.children,U):[]:s.name.endsWith(".py")?C.icon="i-lucide-file-code":s.name.endsWith(".md")?C.icon="i-lucide-file-text":s.name.endsWith(".json")?C.icon="i-lucide-file-json":C.icon="i-lucide-file",C})}const k=D(()=>l(p.files)),i=b(null),x=b(!1),_=b(!1),c=b(!1),f=b(""),j=D(()=>[[{label:"New File",icon:"i-lucide-file-plus",onSelect:()=>{f.value="",x.value=!0}},{label:"New Folder",icon:"i-lucide-folder-plus",onSelect:()=>{f.value="",_.value=!0}}],[{label:"Delete",icon:"i-lucide-trash-2",color:"error",onSelect:()=>{i.value&&i.value.label!=="SKILL.md"&&(c.value=!0)}}]]);function h(y,e){e.type==="file"&&$("select",e.path)}async function a(){if(!f.value.trim())return;let y=f.value.trim();y.includes(".")||(y+=".py");const e=i.value?.type==="directory"?i.value.path:"",s=e?`${e}/${y}`:y;try{await $fetch(`/api/skills/${p.skillName}/files/create`,{method:"POST",body:{path:s,type:"file"}}),$("refresh"),$("select",s),m.add({title:`Created ${y}`,color:"success"})}catch{m.add({title:"Failed to create file",color:"error"})}x.value=!1,f.value=""}async function v(){if(!f.value.trim())return;const y=f.value.trim(),e=i.value?.type==="directory"?i.value.path:"",s=e?`${e}/${y}`:y;try{await $fetch(`/api/skills/${p.skillName}/files/create`,{method:"POST",body:{path:s,type:"directory"}}),$("refresh"),m.add({title:`Created ${y}/`,color:"success"})}catch{m.add({title:"Failed to create folder",color:"error"})}_.value=!1,f.value=""}async function V(){if(i.value){try{await $fetch(`/api/skills/${p.skillName}/files/delete`,{method:"POST",body:{path:i.value.path}}),$("refresh"),m.add({title:`Deleted ${i.value.label}`,color:"success"})}catch{m.add({title:"Failed to delete",color:"error"})}c.value=!1}}return(y,e)=>{const s=K,U=ie,C=re,O=G,F=L,M=de,R=Q;return u(),N("div",pe,[n(C,{items:t(j)},{default:o(()=>[d("div",{class:"flex-1 h-full overflow-auto p-2",onContextmenu:e[0]||(e[0]=ee(r=>i.value=null,["self"]))},[S.files.length===0?(u(),N("div",_e,[n(s,{name:"i-lucide-folder-open",class:"size-8 mx-auto mb-2 opacity-50"}),e[9]||(e[9]=d("p",null,"No files found",-1)),e[10]||(e[10]=d("p",{class:"text-xs mt-1"}," Right-click to create a file ",-1))])):(u(),g(U,{key:1,items:t(k),"get-key":r=>r.id,color:"primary","expanded-icon":"i-lucide-folder-open","collapsed-icon":"i-lucide-folder",onSelect:h},{item:o(({item:r,expanded:J})=>[d("div",{class:"flex items-center gap-2 w-full",onContextmenu:Ke=>i.value=r},[r.children?.length?(u(),g(s,{key:0,name:J?"i-lucide-folder-open":"i-lucide-folder",class:"size-4 shrink-0 text-dimmed"},null,8,["name"])):r.icon?(u(),g(s,{key:1,name:r.icon,class:"size-4 shrink-0 text-dimmed"},null,8,["name"])):(u(),g(s,{key:2,name:"i-lucide-file",class:"size-4 shrink-0 text-dimmed"})),d("span",ye,B(r.label),1)],40,ve)]),_:1},8,["items","get-key"]))],32)]),_:1},8,["items"]),n(R,{open:t(x),"onUpdate:open":e[3]||(e[3]=r=>T(x)?x.value=r:null)},{content:o(()=>[n(M,null,{header:o(()=>[d("div",ke,[n(s,{name:"i-lucide-file-plus",class:"size-5"}),e[11]||(e[11]=d("span",{class:"font-semibold"},"New File",-1))])]),footer:o(()=>[d("div",xe,[n(F,{color:"neutral",variant:"ghost",onClick:e[2]||(e[2]=r=>x.value=!1)},{default:o(()=>[...e[12]||(e[12]=[w(" Cancel ",-1)])]),_:1}),n(F,{onClick:a},{default:o(()=>[...e[13]||(e[13]=[w(" Create ",-1)])]),_:1})])]),default:o(()=>[n(O,{modelValue:t(f),"onUpdate:modelValue":e[1]||(e[1]=r=>T(f)?f.value=r:null),placeholder:"filename.py",autofocus:"",onKeyup:W(a,["enter"])},null,8,["modelValue"])]),_:1})]),_:1},8,["open"]),n(R,{open:t(_),"onUpdate:open":e[6]||(e[6]=r=>T(_)?_.value=r:null)},{content:o(()=>[n(M,null,{header:o(()=>[d("div",he,[n(s,{name:"i-lucide-folder-plus",class:"size-5"}),e[14]||(e[14]=d("span",{class:"font-semibold"},"New Folder",-1))])]),footer:o(()=>[d("div",$e,[n(F,{color:"neutral",variant:"ghost",onClick:e[5]||(e[5]=r=>_.value=!1)},{default:o(()=>[...e[15]||(e[15]=[w(" Cancel ",-1)])]),_:1}),n(F,{onClick:v},{default:o(()=>[...e[16]||(e[16]=[w(" Create ",-1)])]),_:1})])]),default:o(()=>[n(O,{modelValue:t(f),"onUpdate:modelValue":e[4]||(e[4]=r=>T(f)?f.value=r:null),placeholder:"folder-name",autofocus:"",onKeyup:W(v,["enter"])},null,8,["modelValue"])]),_:1})]),_:1},8,["open"]),n(R,{open:t(c),"onUpdate:open":e[8]||(e[8]=r=>T(c)?c.value=r:null)},{content:o(()=>[n(M,null,{header:o(()=>[d("div",ge,[n(s,{name:"i-lucide-trash-2",class:"size-5"}),e[17]||(e[17]=d("span",{class:"font-semibold"},"Delete",-1))])]),footer:o(()=>[d("div",we,[n(F,{color:"neutral",variant:"ghost",onClick:e[7]||(e[7]=r=>c.value=!1)},{default:o(()=>[...e[20]||(e[20]=[w(" Cancel ",-1)])]),_:1}),n(F,{color:"error",onClick:V},{default:o(()=>[...e[21]||(e[21]=[w(" Delete ",-1)])]),_:1})])]),default:o(()=>[d("p",null,[e[18]||(e[18]=w(" Are you sure you want to delete ",-1)),d("strong",null,B(t(i)?.label),1),e[19]||(e[19]=w("? ",-1))]),t(i)?.type==="directory"?(u(),N("p",be," This will delete all files and folders inside. ")):z("",!0)]),_:1})]),_:1},8,["open"])])}}}),Ne=Object.assign(Ce,{__name:"SkillsFileTree"}),Se=ce(me),Ue={class:"flex flex-col h-full"},Fe={class:"flex items-center justify-between px-4 py-2 border-b border-default"},ze={class:"flex items-center gap-2 text-sm text-muted"},je={key:0,class:"flex-1 flex items-center justify-center"},Pe=E({__name:"Editor",props:{skillName:{},filePath:{}},emits:["saved"],setup(S,{emit:P}){const p=S,$=P,m=I(),l=b(""),k=b(""),i=b(!0),x=b(!1),_=D(()=>l.value!==k.value),c=D(()=>{switch(p.filePath.split(".").pop()?.toLowerCase()){case"py":return"python";case"md":return"markdown";case"json":return"json";case"ts":return"typescript";case"js":return"javascript";case"yaml":case"yml":return"yaml";case"sh":case"bash":return"bash";default:return"plaintext"}});async function f(){i.value=!0;try{const a=await $fetch(`/api/skills/${p.skillName}/files/read`,{method:"POST",body:{path:p.filePath}});l.value=a.data.content,k.value=a.data.content}catch{m.add({title:"Failed to load file",color:"error"})}finally{i.value=!1}}async function j(){x.value=!0;try{await $fetch(`/api/skills/${p.skillName}/files/write`,{method:"POST",body:{path:p.filePath,content:l.value}}),k.value=l.value,m.add({title:"File saved",color:"success"}),$("saved")}catch{m.add({title:"Failed to save file",color:"error"})}finally{x.value=!1}}function h(a){(a.metaKey||a.ctrlKey)&&a.key==="s"&&(a.preventDefault(),_.value&&j())}return q(()=>{f(),window.addEventListener("keydown",h)}),te(()=>{window.removeEventListener("keydown",h)}),A(()=>p.filePath,()=>f()),(a,v)=>{const V=K,y=H,e=L,s=Se;return u(),N("div",Ue,[d("div",Fe,[d("div",ze,[n(V,{name:"i-lucide-file-code",class:"size-4"}),d("span",null,B(S.filePath),1),t(_)?(u(),g(y,{key:0,variant:"soft",color:"warning",size:"xs"},{default:o(()=>[...v[1]||(v[1]=[w(" Modified ",-1)])]),_:1})):z("",!0)]),n(e,{size:"xs",loading:t(x),disabled:!t(_),onClick:j},{default:o(()=>[...v[2]||(v[2]=[w(" Save ",-1)])]),_:1},8,["loading","disabled"])]),t(i)?(u(),N("div",je,[n(V,{name:"i-lucide-loader-2",class:"size-6 animate-spin text-dimmed"})])):(u(),g(s,{key:1,modelValue:t(l),"onUpdate:modelValue":v[0]||(v[0]=U=>T(l)?l.value=U:null),language:t(c),class:"flex-1"},null,8,["modelValue","language"]))])}}}),Te=Object.assign(Pe,{__name:"SkillsEditor"}),Ve={class:"flex justify-end gap-2"},Me=E({__name:"RenameModal",props:{open:{type:Boolean},currentName:{}},emits:["update:open","renamed"],setup(S,{emit:P}){const p=S,$=P,m=I(),l=b(p.currentName),k=b(!1);A(()=>p.currentName,_=>{l.value=_});function i(){$("update:open",!1)}async function x(){if(!(!l.value.trim()||l.value.trim()===p.currentName)){k.value=!0;try{await $fetch(`/api/skills/${p.currentName}/rename`,{method:"POST",body:{newName:l.value.trim()}}),m.add({title:`Skill renamed to '${l.value.trim()}'`,color:"success"}),$("renamed",l.value.trim()),i()}catch(_){const c=_ instanceof Error?_.message:"Failed to rename skill";m.add({title:c,color:"error"})}finally{k.value=!1}}}return(_,c)=>{const f=G,j=fe,h=L,a=Q;return u(),g(a,{open:p.open,"onUpdate:open":c[1]||(c[1]=v=>$("update:open",v))},{header:o(()=>[...c[2]||(c[2]=[d("span",{class:"font-semibold"},"Rename Skill",-1)])]),body:o(()=>[n(j,{label:"New Name"},{default:o(()=>[n(f,{modelValue:t(l),"onUpdate:modelValue":c[0]||(c[0]=v=>T(l)?l.value=v:null),placeholder:"my-skill",disabled:t(k)},null,8,["modelValue","disabled"])]),_:1})]),footer:o(()=>[d("div",Ve,[n(h,{variant:"ghost",color:"neutral",disabled:t(k),onClick:i},{default:o(()=>[...c[3]||(c[3]=[w(" Cancel ",-1)])]),_:1},8,["disabled"]),n(h,{loading:t(k),disabled:!t(l).trim()||t(l).trim()===S.currentName,onClick:x},{default:o(()=>[...c[4]||(c[4]=[w(" Rename ",-1)])]),_:1},8,["loading","disabled"])])]),_:1},8,["open"])}}}),Re=Object.assign(Me,{__name:"SkillsRenameModal"}),De={class:"flex flex-1 min-w-0"},Oe={key:0,class:"p-4 space-y-2"},Be={class:"font-medium"},Ee={key:0,class:"flex-1 flex items-center justify-center h-full"},Ie={key:1,class:"flex-1 flex items-center justify-center h-full text-dimmed"},Le={class:"text-center"},Nt=E({__name:"[name]",setup(S){const P=le(),p=oe(),$=I(),m=D(()=>P.params.name),l=b(null),k=b(!0),i=b(""),x=b(!1);async function _(){k.value=!0;try{const h=await $fetch(`/api/skills/${m.value}`);if(l.value=h.data,!i.value){const a=h.data.files.find(v=>v.name==="SKILL.md");a&&(i.value=a.path)}}catch{$.add({title:"Skill not found",color:"error"}),p.push("/skills")}finally{k.value=!1}}async function c(){if(!(!l.value||l.value.core))try{const h=await $fetch(`/api/skills/${m.value}/toggle`,{method:"POST"});l.value.active=h.data.active,$.add({title:`${m.value} ${h.data.active?"enabled":"disabled"}`,color:"success"})}catch{$.add({title:"Failed to toggle skill",color:"error"})}}function f(h){p.replace(`/skills/${h}`)}function j(){window.open(`/api/skills/${m.value}/export`,"_blank")}return q(()=>_()),(h,a)=>{const v=Y,V=Z,y=Ne,e=X,s=K,U=se,C=H,O=ue,F=L,M=Te,R=Re;return u(),N("div",De,[n(e,{id:"skill-filetree",collapsible:"",resizable:"","min-size":12,"default-size":16,"max-size":24,class:"hidden lg:flex"},{header:o(()=>[n(v,null,{title:o(()=>[...a[3]||(a[3]=[d("span",{class:"text-sm font-medium truncate"},"Files",-1)])]),_:1})]),body:o(()=>[t(k)?(u(),N("div",Oe,[(u(),N(ne,null,ae(4,r=>n(V,{key:r,class:"h-6 w-full"})),64))])):t(l)?(u(),g(y,{key:1,"skill-name":t(m),files:t(l).files,"selected-path":t(i),onSelect:a[0]||(a[0]=r=>i.value=r),onRefresh:_},null,8,["skill-name","files","selected-path"])):z("",!0)]),_:1}),n(e,{id:"skill-editor",grow:"",ui:{body:"!p-0"}},{header:o(()=>[n(v,null,{title:o(()=>[n(U,{to:"/skills",class:"text-muted hover:text-default transition-colors"},{default:o(()=>[n(s,{name:"i-lucide-arrow-left",class:"size-4"})]),_:1}),d("span",Be,B(t(m)),1),t(l)?.core?(u(),g(C,{key:0,variant:"subtle",color:"primary",size:"xs"},{default:o(()=>[...a[4]||(a[4]=[w(" Core ",-1)])]),_:1})):z("",!0),t(l)&&!t(l).active?(u(),g(C,{key:1,variant:"subtle",color:"neutral",size:"xs"},{default:o(()=>[...a[5]||(a[5]=[w(" Disabled ",-1)])]),_:1})):z("",!0)]),right:o(()=>[t(l)&&!t(l).core?(u(),g(O,{key:0,"model-value":t(l).active,size:"sm","onUpdate:modelValue":c},null,8,["model-value"])):z("",!0),t(l)&&!t(l).core?(u(),g(F,{key:1,icon:"i-lucide-pencil",variant:"ghost",color:"neutral",size:"sm",onClick:a[1]||(a[1]=r=>x.value=!0)})):z("",!0),t(l)?(u(),g(F,{key:2,icon:"i-lucide-download",variant:"ghost",color:"neutral",size:"sm",onClick:j})):z("",!0)]),_:1})]),body:o(()=>[t(k)?(u(),N("div",Ee,[n(s,{name:"i-lucide-loader-2",class:"size-6 animate-spin text-dimmed"})])):t(i)?(u(),g(M,{key:t(i),"skill-name":t(m),"file-path":t(i),onSaved:_},null,8,["skill-name","file-path"])):(u(),N("div",Ie,[d("div",Le,[n(s,{name:"i-lucide-file-code",class:"size-12 mx-auto mb-4 opacity-50"}),a[6]||(a[6]=d("p",null,"Select a file to edit",-1))])]))]),_:1}),t(l)?(u(),g(R,{key:0,open:t(x),"current-name":t(m),"onUpdate:open":a[2]||(a[2]=r=>x.value=r),onRenamed:f},null,8,["open","current-name"])):z("",!0)])}}});export{Nt as default};
|
|
1
|
+
import{_ as Q,a as X}from"./CfCXpVn5.js";import{_ as Z}from"./OlF0QnKF.js";import{a as E,ag as I,c as D,e as b,G as N,T as u,V as n,U as o,ab as d,al as ee,S as g,_ as K,C as t,ae as B,bm as W,ai as T,Y as L,aa as w,a9 as z,q,a2 as te,f as A,bg as le,an as oe,aj as ne,ak as ae,af as se}from"./D6tVZcRs.js";import{_ as ie,a as re}from"./9kAKMaPC.js";import{_ as G}from"./ByLsRRoQ.js";import{_ as de}from"./DXJ9PxCv.js";import{_ as Y}from"./DFZkCmLQ.js";import{_ as H}from"./BnMTFF5R.js";import{_ as ue}from"./7rT1DCe2.js";import{c as ce}from"./DQhm-UPG.js";import{_ as me}from"./TxMdabnL.js";import{_ as fe}from"./OeVS0Rsb.js";import"./ZvG7a1W3.js";import"./D12qPplu.js";import"./C7m9zGMG.js";import"./DmxKU7sH.js";import"./C8AtdrMH.js";import"./DWZ9ieYa.js";import"./DwSY6_2U.js";import"./IYCBGuRS.js";import"./DowkFZ2V.js";import"./sBzyvWMJ.js";import"./B0nzD8Sk.js";import"./BCrlmHh_.js";import"./qcVwZv8e.js";import"./BvFYnRMR.js";import"./DvHS7_h2.js";import"./C6Y-ieo6.js";import"./CAWbHTgy.js";import"./B2wI_pYg.js";import"./BNeeERBt.js";import"./DB2zZev7.js";import"./BNJJSRKh.js";import"./B6om4MW2.js";import"./DuzpliIL.js";import"./Vcq4gwWv.js";const pe={class:"h-full flex flex-col"},_e={key:0,class:"h-full min-h-32 flex flex-col items-center justify-center text-dimmed text-sm"},ve=["onContextmenu"],ye={class:"truncate"},ke={class:"flex items-center gap-2"},xe={class:"flex justify-end gap-2"},he={class:"flex items-center gap-2"},$e={class:"flex justify-end gap-2"},ge={class:"flex items-center gap-2 text-error"},be={key:0,class:"text-sm text-dimmed mt-1"},we={class:"flex justify-end gap-2"},Ce=E({__name:"FileTree",props:{skillName:{},files:{},selectedPath:{}},emits:["select","refresh"],setup(U,{emit:P}){const p=U,$=P,m=I();function l(y,e=""){return y.map(s=>{const S=e?`${e}/${s.path}`:s.path,C={id:S,label:s.name,path:S,type:s.type,defaultExpanded:!0};return s.type==="directory"?C.children=s.children?l(s.children,S):[]:s.name.endsWith(".py")?C.icon="i-lucide-file-code":s.name.endsWith(".md")?C.icon="i-lucide-file-text":s.name.endsWith(".json")?C.icon="i-lucide-file-json":C.icon="i-lucide-file",C})}const k=D(()=>l(p.files)),i=b(null),x=b(!1),_=b(!1),c=b(!1),f=b(""),j=D(()=>[[{label:"New File",icon:"i-lucide-file-plus",onSelect:()=>{f.value="",x.value=!0}},{label:"New Folder",icon:"i-lucide-folder-plus",onSelect:()=>{f.value="",_.value=!0}}],[{label:"Delete",icon:"i-lucide-trash-2",color:"error",onSelect:()=>{i.value&&i.value.label!=="SKILL.md"&&(c.value=!0)}}]]);function h(y,e){e.type==="file"&&$("select",e.path)}async function a(){if(!f.value.trim())return;let y=f.value.trim();y.includes(".")||(y+=".py");const e=i.value?.type==="directory"?i.value.path:"",s=e?`${e}/${y}`:y;try{await $fetch(`/api/skills/${p.skillName}/files/create`,{method:"POST",body:{path:s,type:"file"}}),$("refresh"),$("select",s),m.add({title:`Created ${y}`,color:"success"})}catch{m.add({title:"Failed to create file",color:"error"})}x.value=!1,f.value=""}async function v(){if(!f.value.trim())return;const y=f.value.trim(),e=i.value?.type==="directory"?i.value.path:"",s=e?`${e}/${y}`:y;try{await $fetch(`/api/skills/${p.skillName}/files/create`,{method:"POST",body:{path:s,type:"directory"}}),$("refresh"),m.add({title:`Created ${y}/`,color:"success"})}catch{m.add({title:"Failed to create folder",color:"error"})}_.value=!1,f.value=""}async function V(){if(i.value){try{await $fetch(`/api/skills/${p.skillName}/files/delete`,{method:"POST",body:{path:i.value.path}}),$("refresh"),m.add({title:`Deleted ${i.value.label}`,color:"success"})}catch{m.add({title:"Failed to delete",color:"error"})}c.value=!1}}return(y,e)=>{const s=K,S=ie,C=re,O=G,F=L,M=de,R=Y;return u(),N("div",pe,[n(C,{items:t(j)},{default:o(()=>[d("div",{class:"flex-1 h-full overflow-auto p-2",onContextmenu:e[0]||(e[0]=ee(r=>i.value=null,["self"]))},[U.files.length===0?(u(),N("div",_e,[n(s,{name:"i-lucide-folder-open",class:"size-8 mx-auto mb-2 opacity-50"}),e[9]||(e[9]=d("p",null,"No files found",-1)),e[10]||(e[10]=d("p",{class:"text-xs mt-1"}," Right-click to create a file ",-1))])):(u(),g(S,{key:1,items:t(k),"get-key":r=>r.id,color:"primary","expanded-icon":"i-lucide-folder-open","collapsed-icon":"i-lucide-folder",onSelect:h},{item:o(({item:r,expanded:J})=>[d("div",{class:"flex items-center gap-2 w-full",onContextmenu:Ke=>i.value=r},[r.children?.length?(u(),g(s,{key:0,name:J?"i-lucide-folder-open":"i-lucide-folder",class:"size-4 shrink-0 text-dimmed"},null,8,["name"])):r.icon?(u(),g(s,{key:1,name:r.icon,class:"size-4 shrink-0 text-dimmed"},null,8,["name"])):(u(),g(s,{key:2,name:"i-lucide-file",class:"size-4 shrink-0 text-dimmed"})),d("span",ye,B(r.label),1)],40,ve)]),_:1},8,["items","get-key"]))],32)]),_:1},8,["items"]),n(R,{open:t(x),"onUpdate:open":e[3]||(e[3]=r=>T(x)?x.value=r:null)},{content:o(()=>[n(M,null,{header:o(()=>[d("div",ke,[n(s,{name:"i-lucide-file-plus",class:"size-5"}),e[11]||(e[11]=d("span",{class:"font-semibold"},"New File",-1))])]),footer:o(()=>[d("div",xe,[n(F,{color:"neutral",variant:"ghost",onClick:e[2]||(e[2]=r=>x.value=!1)},{default:o(()=>[...e[12]||(e[12]=[w(" Cancel ",-1)])]),_:1}),n(F,{onClick:a},{default:o(()=>[...e[13]||(e[13]=[w(" Create ",-1)])]),_:1})])]),default:o(()=>[n(O,{modelValue:t(f),"onUpdate:modelValue":e[1]||(e[1]=r=>T(f)?f.value=r:null),placeholder:"filename.py",autofocus:"",onKeyup:W(a,["enter"])},null,8,["modelValue"])]),_:1})]),_:1},8,["open"]),n(R,{open:t(_),"onUpdate:open":e[6]||(e[6]=r=>T(_)?_.value=r:null)},{content:o(()=>[n(M,null,{header:o(()=>[d("div",he,[n(s,{name:"i-lucide-folder-plus",class:"size-5"}),e[14]||(e[14]=d("span",{class:"font-semibold"},"New Folder",-1))])]),footer:o(()=>[d("div",$e,[n(F,{color:"neutral",variant:"ghost",onClick:e[5]||(e[5]=r=>_.value=!1)},{default:o(()=>[...e[15]||(e[15]=[w(" Cancel ",-1)])]),_:1}),n(F,{onClick:v},{default:o(()=>[...e[16]||(e[16]=[w(" Create ",-1)])]),_:1})])]),default:o(()=>[n(O,{modelValue:t(f),"onUpdate:modelValue":e[4]||(e[4]=r=>T(f)?f.value=r:null),placeholder:"folder-name",autofocus:"",onKeyup:W(v,["enter"])},null,8,["modelValue"])]),_:1})]),_:1},8,["open"]),n(R,{open:t(c),"onUpdate:open":e[8]||(e[8]=r=>T(c)?c.value=r:null)},{content:o(()=>[n(M,null,{header:o(()=>[d("div",ge,[n(s,{name:"i-lucide-trash-2",class:"size-5"}),e[17]||(e[17]=d("span",{class:"font-semibold"},"Delete",-1))])]),footer:o(()=>[d("div",we,[n(F,{color:"neutral",variant:"ghost",onClick:e[7]||(e[7]=r=>c.value=!1)},{default:o(()=>[...e[20]||(e[20]=[w(" Cancel ",-1)])]),_:1}),n(F,{color:"error",onClick:V},{default:o(()=>[...e[21]||(e[21]=[w(" Delete ",-1)])]),_:1})])]),default:o(()=>[d("p",null,[e[18]||(e[18]=w(" Are you sure you want to delete ",-1)),d("strong",null,B(t(i)?.label),1),e[19]||(e[19]=w("? ",-1))]),t(i)?.type==="directory"?(u(),N("p",be," This will delete all files and folders inside. ")):z("",!0)]),_:1})]),_:1},8,["open"])])}}}),Ne=Object.assign(Ce,{__name:"SkillsFileTree"}),Ue=ce(me),Se={class:"flex flex-col h-full"},Fe={class:"flex items-center justify-between px-4 py-2 border-b border-default"},ze={class:"flex items-center gap-2 text-sm text-muted"},je={key:0,class:"flex-1 flex items-center justify-center"},Pe=E({__name:"Editor",props:{skillName:{},filePath:{}},emits:["saved"],setup(U,{emit:P}){const p=U,$=P,m=I(),l=b(""),k=b(""),i=b(!0),x=b(!1),_=D(()=>l.value!==k.value),c=D(()=>{switch(p.filePath.split(".").pop()?.toLowerCase()){case"py":return"python";case"md":return"markdown";case"json":return"json";case"ts":return"typescript";case"js":return"javascript";case"yaml":case"yml":return"yaml";case"sh":case"bash":return"bash";default:return"plaintext"}});async function f(){i.value=!0;try{const a=await $fetch(`/api/skills/${p.skillName}/files/read`,{method:"POST",body:{path:p.filePath}});l.value=a.data.content,k.value=a.data.content}catch{m.add({title:"Failed to load file",color:"error"})}finally{i.value=!1}}async function j(){x.value=!0;try{await $fetch(`/api/skills/${p.skillName}/files/write`,{method:"POST",body:{path:p.filePath,content:l.value}}),k.value=l.value,m.add({title:"File saved",color:"success"}),$("saved")}catch{m.add({title:"Failed to save file",color:"error"})}finally{x.value=!1}}function h(a){(a.metaKey||a.ctrlKey)&&a.key==="s"&&(a.preventDefault(),_.value&&j())}return q(()=>{f(),window.addEventListener("keydown",h)}),te(()=>{window.removeEventListener("keydown",h)}),A(()=>p.filePath,()=>f()),(a,v)=>{const V=K,y=H,e=L,s=Ue;return u(),N("div",Se,[d("div",Fe,[d("div",ze,[n(V,{name:"i-lucide-file-code",class:"size-4"}),d("span",null,B(U.filePath),1),t(_)?(u(),g(y,{key:0,variant:"soft",color:"warning",size:"xs"},{default:o(()=>[...v[1]||(v[1]=[w(" Modified ",-1)])]),_:1})):z("",!0)]),n(e,{size:"xs",loading:t(x),disabled:!t(_),onClick:j},{default:o(()=>[...v[2]||(v[2]=[w(" Save ",-1)])]),_:1},8,["loading","disabled"])]),t(i)?(u(),N("div",je,[n(V,{name:"i-lucide-loader-2",class:"size-6 animate-spin text-dimmed"})])):(u(),g(s,{key:1,modelValue:t(l),"onUpdate:modelValue":v[0]||(v[0]=S=>T(l)?l.value=S:null),language:t(c),class:"flex-1"},null,8,["modelValue","language"]))])}}}),Te=Object.assign(Pe,{__name:"SkillsEditor"}),Ve={class:"flex justify-end gap-2"},Me=E({__name:"RenameModal",props:{open:{type:Boolean},currentName:{}},emits:["update:open","renamed"],setup(U,{emit:P}){const p=U,$=P,m=I(),l=b(p.currentName),k=b(!1);A(()=>p.currentName,_=>{l.value=_});function i(){$("update:open",!1)}async function x(){if(!(!l.value.trim()||l.value.trim()===p.currentName)){k.value=!0;try{await $fetch(`/api/skills/${p.currentName}/rename`,{method:"POST",body:{newName:l.value.trim()}}),m.add({title:`Skill renamed to '${l.value.trim()}'`,color:"success"}),$("renamed",l.value.trim()),i()}catch(_){const c=_ instanceof Error?_.message:"Failed to rename skill";m.add({title:c,color:"error"})}finally{k.value=!1}}}return(_,c)=>{const f=G,j=fe,h=L,a=Y;return u(),g(a,{open:p.open,"onUpdate:open":c[1]||(c[1]=v=>$("update:open",v))},{header:o(()=>[...c[2]||(c[2]=[d("span",{class:"font-semibold"},"Rename Skill",-1)])]),body:o(()=>[n(j,{label:"New Name"},{default:o(()=>[n(f,{modelValue:t(l),"onUpdate:modelValue":c[0]||(c[0]=v=>T(l)?l.value=v:null),placeholder:"my-skill",disabled:t(k)},null,8,["modelValue","disabled"])]),_:1})]),footer:o(()=>[d("div",Ve,[n(h,{variant:"ghost",color:"neutral",disabled:t(k),onClick:i},{default:o(()=>[...c[3]||(c[3]=[w(" Cancel ",-1)])]),_:1},8,["disabled"]),n(h,{loading:t(k),disabled:!t(l).trim()||t(l).trim()===U.currentName,onClick:x},{default:o(()=>[...c[4]||(c[4]=[w(" Rename ",-1)])]),_:1},8,["loading","disabled"])])]),_:1},8,["open"])}}}),Re=Object.assign(Me,{__name:"SkillsRenameModal"}),De={class:"flex flex-1 min-w-0"},Oe={key:0,class:"p-4 space-y-2"},Be={class:"font-medium"},Ee={key:0,class:"flex-1 flex items-center justify-center h-full"},Ie={key:1,class:"flex-1 flex items-center justify-center h-full text-dimmed"},Le={class:"text-center"},Nt=E({__name:"[name]",setup(U){const P=le(),p=oe(),$=I(),m=D(()=>P.params.name),l=b(null),k=b(!0),i=b(""),x=b(!1);async function _(){k.value=!0;try{const h=await $fetch(`/api/skills/${m.value}`);if(l.value=h.data,!i.value){const a=h.data.files.find(v=>v.name==="SKILL.md");a&&(i.value=a.path)}}catch{$.add({title:"Skill not found",color:"error"}),p.push("/skills")}finally{k.value=!1}}async function c(){if(!(!l.value||l.value.core))try{const h=await $fetch(`/api/skills/${m.value}/toggle`,{method:"POST"});l.value.active=h.data.active,$.add({title:`${m.value} ${h.data.active?"enabled":"disabled"}`,color:"success"})}catch{$.add({title:"Failed to toggle skill",color:"error"})}}function f(h){p.replace(`/skills/${h}`)}function j(){window.open(`/api/skills/${m.value}/export`,"_blank")}return q(()=>_()),(h,a)=>{const v=X,V=Z,y=Ne,e=Q,s=K,S=se,C=H,O=ue,F=L,M=Te,R=Re;return u(),N("div",De,[n(e,{id:"skill-filetree",collapsible:"",resizable:"","min-size":12,"default-size":16,"max-size":24,class:"hidden lg:flex"},{header:o(()=>[n(v,null,{title:o(()=>[...a[3]||(a[3]=[d("span",{class:"text-sm font-medium truncate"},"Files",-1)])]),_:1})]),body:o(()=>[t(k)?(u(),N("div",Oe,[(u(),N(ne,null,ae(4,r=>n(V,{key:r,class:"h-6 w-full"})),64))])):t(l)?(u(),g(y,{key:1,"skill-name":t(m),files:t(l).files,"selected-path":t(i),onSelect:a[0]||(a[0]=r=>i.value=r),onRefresh:_},null,8,["skill-name","files","selected-path"])):z("",!0)]),_:1}),n(e,{id:"skill-editor",grow:"",ui:{body:"!p-0"}},{header:o(()=>[n(v,null,{title:o(()=>[n(S,{to:"/skills",class:"text-muted hover:text-default transition-colors"},{default:o(()=>[n(s,{name:"i-lucide-arrow-left",class:"size-4"})]),_:1}),d("span",Be,B(t(m)),1),t(l)?.core?(u(),g(C,{key:0,variant:"subtle",color:"primary",size:"xs"},{default:o(()=>[...a[4]||(a[4]=[w(" Core ",-1)])]),_:1})):z("",!0),t(l)&&!t(l).active?(u(),g(C,{key:1,variant:"subtle",color:"neutral",size:"xs"},{default:o(()=>[...a[5]||(a[5]=[w(" Disabled ",-1)])]),_:1})):z("",!0)]),right:o(()=>[t(l)&&!t(l).core?(u(),g(O,{key:0,"model-value":t(l).active,size:"sm","onUpdate:modelValue":c},null,8,["model-value"])):z("",!0),t(l)&&!t(l).core?(u(),g(F,{key:1,icon:"i-lucide-pencil",variant:"ghost",color:"neutral",size:"sm",onClick:a[1]||(a[1]=r=>x.value=!0)})):z("",!0),t(l)?(u(),g(F,{key:2,icon:"i-lucide-download",variant:"ghost",color:"neutral",size:"sm",onClick:j})):z("",!0)]),_:1})]),body:o(()=>[t(k)?(u(),N("div",Ee,[n(s,{name:"i-lucide-loader-2",class:"size-6 animate-spin text-dimmed"})])):t(i)?(u(),g(M,{key:t(i),"skill-name":t(m),"file-path":t(i),onSaved:_},null,8,["skill-name","file-path"])):(u(),N("div",Ie,[d("div",Le,[n(s,{name:"i-lucide-file-code",class:"size-12 mx-auto mb-4 opacity-50"}),a[6]||(a[6]=d("p",null,"Select a file to edit",-1))])]))]),_:1}),t(l)?(u(),g(R,{key:0,open:t(x),"current-name":t(m),"onUpdate:open":a[2]||(a[2]=r=>x.value=r),onRenamed:f},null,8,["open","current-name"])):z("",!0)])}}});export{Nt as default};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{X as Tt,c as M,i as Ot,a as Pt,D as Q,e as H,b as J,g as F,k as E,j as Nt,u as Ct,v as ai,s as D,h as ri,w as hi,n as li,q as At,r as jt,t as Et}from"./vIOxcXKR.js";import{a as Dt,aA as Rt,c as $t,e as Bt,G as Lt,q as Ht,k as Ft,a2 as It,f as I,R as Xt}from"./2dNDtTiv.js";var K=Math.PI,tt=2*K,N=1e-6,_i=tt-N;function it(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function lt(){return new it}it.prototype=lt.prototype={constructor:it,moveTo:function(t,i){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+i)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,i){this._+="L"+(this._x1=+t)+","+(this._y1=+i)},quadraticCurveTo:function(t,i,e,n){this._+="Q"+ +t+","+ +i+","+(this._x1=+e)+","+(this._y1=+n)},bezierCurveTo:function(t,i,e,n,s,o){this._+="C"+ +t+","+ +i+","+ +e+","+ +n+","+(this._x1=+s)+","+(this._y1=+o)},arcTo:function(t,i,e,n,s){t=+t,i=+i,e=+e,n=+n,s=+s;var o=this._x1,r=this._y1,a=e-t,h=n-i,u=o-t,_=r-i,l=u*u+_*_;if(s<0)throw new Error("negative radius: "+s);if(this._x1===null)this._+="M"+(this._x1=t)+","+(this._y1=i);else if(l>N)if(!(Math.abs(_*a-h*u)>N)||!s)this._+="L"+(this._x1=t)+","+(this._y1=i);else{var c=e-o,d=n-r,x=a*a+h*h,m=c*c+d*d,f=Math.sqrt(x),y=Math.sqrt(l),v=s*Math.tan((K-Math.acos((x+l-m)/(2*f*y)))/2),p=v/y,b=v/f;Math.abs(p-1)>N&&(this._+="L"+(t+p*u)+","+(i+p*_)),this._+="A"+s+","+s+",0,0,"+ +(_*c>u*d)+","+(this._x1=t+b*a)+","+(this._y1=i+b*h)}},arc:function(t,i,e,n,s,o){t=+t,i=+i,e=+e,o=!!o;var r=e*Math.cos(n),a=e*Math.sin(n),h=t+r,u=i+a,_=1^o,l=o?n-s:s-n;if(e<0)throw new Error("negative radius: "+e);this._x1===null?this._+="M"+h+","+u:(Math.abs(this._x1-h)>N||Math.abs(this._y1-u)>N)&&(this._+="L"+h+","+u),e&&(l<0&&(l=l%tt+tt),l>_i?this._+="A"+e+","+e+",0,1,"+_+","+(t-r)+","+(i-a)+"A"+e+","+e+",0,1,"+_+","+(this._x1=h)+","+(this._y1=u):l>N&&(this._+="A"+e+","+e+",0,"+ +(l>=K)+","+_+","+(this._x1=t+e*Math.cos(s))+","+(this._y1=i+e*Math.sin(s))))},rect:function(t,i,e,n){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+i)+"h"+ +e+"v"+ +n+"h"+-e+"Z"},toString:function(){return this._}};function k(t){return function(){return t}}var Ji=Math.abs,Ki=Math.atan2,te=Math.cos,ie=Math.max,ee=Math.min,ne=Math.sin,se=Math.sqrt,vt=1e-12,_t=Math.PI,dt=_t/2,oe=2*_t;function ae(t){return t>1?0:t<-1?_t:Math.acos(t)}function re(t){return t>=1?dt:t<=-1?-dt:Math.asin(t)}function Gt(t){this._context=t}Gt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2;default:this._context.lineTo(t,i);break}}};function ct(t){return new Gt(t)}function Yt(t){return t[0]}function zt(t){return t[1]}function Vt(){var t=Yt,i=zt,e=k(!0),n=null,s=ct,o=null;function r(a){var h,u=a.length,_,l=!1,c;for(n==null&&(o=s(c=lt())),h=0;h<=u;++h)!(h<u&&e(_=a[h],h,a))===l&&((l=!l)?o.lineStart():o.lineEnd()),l&&o.point(+t(_,h,a),+i(_,h,a));if(c)return o=null,c+""||null}return r.x=function(a){return arguments.length?(t=typeof a=="function"?a:k(+a),r):t},r.y=function(a){return arguments.length?(i=typeof a=="function"?a:k(+a),r):i},r.defined=function(a){return arguments.length?(e=typeof a=="function"?a:k(!!a),r):e},r.curve=function(a){return arguments.length?(s=a,n!=null&&(o=s(n)),r):s},r.context=function(a){return arguments.length?(a==null?n=o=null:o=s(n=a),r):n},r}function ci(){var t=Yt,i=null,e=k(0),n=zt,s=k(!0),o=null,r=ct,a=null;function h(_){var l,c,d,x=_.length,m,f=!1,y,v=new Array(x),p=new Array(x);for(o==null&&(a=r(y=lt())),l=0;l<=x;++l){if(!(l<x&&s(m=_[l],l,_))===f)if(f=!f)c=l,a.areaStart(),a.lineStart();else{for(a.lineEnd(),a.lineStart(),d=l-1;d>=c;--d)a.point(v[d],p[d]);a.lineEnd(),a.areaEnd()}f&&(v[l]=+t(m,l,_),p[l]=+e(m,l,_),a.point(i?+i(m,l,_):v[l],n?+n(m,l,_):p[l]))}if(y)return a=null,y+""||null}function u(){return Vt().defined(s).curve(r).context(o)}return h.x=function(_){return arguments.length?(t=typeof _=="function"?_:k(+_),i=null,h):t},h.x0=function(_){return arguments.length?(t=typeof _=="function"?_:k(+_),h):t},h.x1=function(_){return arguments.length?(i=_==null?null:typeof _=="function"?_:k(+_),h):i},h.y=function(_){return arguments.length?(e=typeof _=="function"?_:k(+_),n=null,h):e},h.y0=function(_){return arguments.length?(e=typeof _=="function"?_:k(+_),h):e},h.y1=function(_){return arguments.length?(n=_==null?null:typeof _=="function"?_:k(+_),h):n},h.lineX0=h.lineY0=function(){return u().x(t).y(e)},h.lineY1=function(){return u().x(t).y(n)},h.lineX1=function(){return u().x(i).y(e)},h.defined=function(_){return arguments.length?(s=typeof _=="function"?_:k(!!_),h):s},h.curve=function(_){return arguments.length?(r=_,o!=null&&(a=r(o)),h):r},h.context=function(_){return arguments.length?(_==null?o=a=null:a=r(o=_),h):o},h}function w(){}function X(t,i,e){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+i)/6,(t._y0+4*t._y1+e)/6)}function V(t){this._context=t}V.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:X(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:X(this,t,i);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=i}};function ui(t){return new V(t)}function qt(t){this._context=t}qt.prototype={areaStart:w,areaEnd:w,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._x2=t,this._y2=i;break;case 1:this._point=2,this._x3=t,this._y3=i;break;case 2:this._point=3,this._x4=t,this._y4=i,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+i)/6);break;default:X(this,t,i);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=i}};function fi(t){return new qt(t)}function Zt(t){this._context=t}Zt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var e=(this._x0+4*this._x1+t)/6,n=(this._y0+4*this._y1+i)/6;this._line?this._context.lineTo(e,n):this._context.moveTo(e,n);break;case 3:this._point=4;default:X(this,t,i);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=i}};function pi(t){return new Zt(t)}function Wt(t,i){this._basis=new V(t),this._beta=i}Wt.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,i=this._y,e=t.length-1;if(e>0)for(var n=t[0],s=i[0],o=t[e]-n,r=i[e]-s,a=-1,h;++a<=e;)h=a/e,this._basis.point(this._beta*t[a]+(1-this._beta)*(n+h*o),this._beta*i[a]+(1-this._beta)*(s+h*r));this._x=this._y=null,this._basis.lineEnd()},point:function(t,i){this._x.push(+t),this._y.push(+i)}};const yi=(function t(i){function e(n){return i===1?new V(n):new Wt(n,i)}return e.beta=function(n){return t(+n)},e})(.85);function G(t,i,e){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-i),t._y2+t._k*(t._y1-e),t._x2,t._y2)}function ut(t,i){this._context=t,this._k=(1-i)/6}ut.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:G(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2,this._x1=t,this._y1=i;break;case 2:this._point=3;default:G(this,t,i);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};const vi=(function t(i){function e(n){return new ut(n,i)}return e.tension=function(n){return t(+n)},e})(0);function ft(t,i){this._context=t,this._k=(1-i)/6}ft.prototype={areaStart:w,areaEnd:w,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._x3=t,this._y3=i;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=i);break;case 2:this._point=3,this._x5=t,this._y5=i;break;default:G(this,t,i);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};const di=(function t(i){function e(n){return new ft(n,i)}return e.tension=function(n){return t(+n)},e})(0);function pt(t,i){this._context=t,this._k=(1-i)/6}pt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:G(this,t,i);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};const xi=(function t(i){function e(n){return new pt(n,i)}return e.tension=function(n){return t(+n)},e})(0);function yt(t,i,e){var n=t._x1,s=t._y1,o=t._x2,r=t._y2;if(t._l01_a>vt){var a=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,h=3*t._l01_a*(t._l01_a+t._l12_a);n=(n*a-t._x0*t._l12_2a+t._x2*t._l01_2a)/h,s=(s*a-t._y0*t._l12_2a+t._y2*t._l01_2a)/h}if(t._l23_a>vt){var u=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,_=3*t._l23_a*(t._l23_a+t._l12_a);o=(o*u+t._x1*t._l23_2a-i*t._l12_2a)/_,r=(r*u+t._y1*t._l23_2a-e*t._l12_2a)/_}t._context.bezierCurveTo(n,s,o,r,t._x2,t._y2)}function Qt(t,i){this._context=t,this._alpha=i}Qt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){if(t=+t,i=+i,this._point){var e=this._x2-t,n=this._y2-i;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+n*n,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2;break;case 2:this._point=3;default:yt(this,t,i);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};const gi=(function t(i){function e(n){return i?new Qt(n,i):new ut(n,0)}return e.alpha=function(n){return t(+n)},e})(.5);function Ut(t,i){this._context=t,this._alpha=i}Ut.prototype={areaStart:w,areaEnd:w,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(t,i){if(t=+t,i=+i,this._point){var e=this._x2-t,n=this._y2-i;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+n*n,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=i;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=i);break;case 2:this._point=3,this._x5=t,this._y5=i;break;default:yt(this,t,i);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};const bi=(function t(i){function e(n){return i?new Ut(n,i):new ft(n,0)}return e.alpha=function(n){return t(+n)},e})(.5);function Jt(t,i){this._context=t,this._alpha=i}Jt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){if(t=+t,i=+i,this._point){var e=this._x2-t,n=this._y2-i;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+n*n,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:yt(this,t,i);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};const mi=(function t(i){function e(n){return i?new Jt(n,i):new pt(n,0)}return e.alpha=function(n){return t(+n)},e})(.5);function Kt(t){this._context=t}Kt.prototype={areaStart:w,areaEnd:w,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,i){t=+t,i=+i,this._point?this._context.lineTo(t,i):(this._point=1,this._context.moveTo(t,i))}};function ki(t){return new Kt(t)}function xt(t){return t<0?-1:1}function gt(t,i,e){var n=t._x1-t._x0,s=i-t._x1,o=(t._y1-t._y0)/(n||s<0&&-0),r=(e-t._y1)/(s||n<0&&-0),a=(o*s+r*n)/(n+s);return(xt(o)+xt(r))*Math.min(Math.abs(o),Math.abs(r),.5*Math.abs(a))||0}function bt(t,i){var e=t._x1-t._x0;return e?(3*(t._y1-t._y0)/e-i)/2:i}function U(t,i,e){var n=t._x0,s=t._y0,o=t._x1,r=t._y1,a=(o-n)/3;t._context.bezierCurveTo(n+a,s+a*i,o-a,r-a*e,o,r)}function Y(t){this._context=t}Y.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:U(this,this._t0,bt(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){var e=NaN;if(t=+t,i=+i,!(t===this._x1&&i===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2;break;case 2:this._point=3,U(this,bt(this,e=gt(this,t,i)),e);break;default:U(this,this._t0,e=gt(this,t,i));break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=i,this._t0=e}}};function ti(t){this._context=new ii(t)}(ti.prototype=Object.create(Y.prototype)).point=function(t,i){Y.prototype.point.call(this,i,t)};function ii(t){this._context=t}ii.prototype={moveTo:function(t,i){this._context.moveTo(i,t)},closePath:function(){this._context.closePath()},lineTo:function(t,i){this._context.lineTo(i,t)},bezierCurveTo:function(t,i,e,n,s,o){this._context.bezierCurveTo(i,t,n,e,o,s)}};function Si(t){return new Y(t)}function wi(t){return new ti(t)}function ei(t){this._context=t}ei.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,i=this._y,e=t.length;if(e)if(this._line?this._context.lineTo(t[0],i[0]):this._context.moveTo(t[0],i[0]),e===2)this._context.lineTo(t[1],i[1]);else for(var n=mt(t),s=mt(i),o=0,r=1;r<e;++o,++r)this._context.bezierCurveTo(n[0][o],s[0][o],n[1][o],s[1][o],t[r],i[r]);(this._line||this._line!==0&&e===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,i){this._x.push(+t),this._y.push(+i)}};function mt(t){var i,e=t.length-1,n,s=new Array(e),o=new Array(e),r=new Array(e);for(s[0]=0,o[0]=2,r[0]=t[0]+2*t[1],i=1;i<e-1;++i)s[i]=1,o[i]=4,r[i]=4*t[i]+2*t[i+1];for(s[e-1]=2,o[e-1]=7,r[e-1]=8*t[e-1]+t[e],i=1;i<e;++i)n=s[i]/o[i-1],o[i]-=n,r[i]-=n*r[i-1];for(s[e-1]=r[e-1]/o[e-1],i=e-2;i>=0;--i)s[i]=(r[i]-s[i+1])/o[i];for(o[e-1]=(t[e]+s[e-1])/2,i=0;i<e-1;++i)o[i]=2*t[i+1]-s[i+1];return[s,o]}function Mi(t){return new ei(t)}function q(t,i){this._context=t,this._t=i}q.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,i),this._context.lineTo(t,i);else{var e=this._x*(1-this._t)+t*this._t;this._context.lineTo(e,this._y),this._context.lineTo(e,i)}break}}this._x=t,this._y=i}};function Ti(t){return new q(t,.5)}function Oi(t){return new q(t,0)}function Pi(t){return new q(t,1)}function kt(t,i){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);i&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),e.push.apply(e,n)}return e}function Ni(t){for(var i=1;i<arguments.length;i++){var e=arguments[i]!=null?arguments[i]:{};i%2?kt(Object(e),!0).forEach(function(n){Ci(t,n,e[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):kt(Object(e)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))})}return t}function R(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?R=function(i){return typeof i}:R=function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},R(t)}function Ci(t,i,e){return i in t?Object.defineProperty(t,i,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[i]=e,t}function z(){return z=Object.assign||function(t){for(var i=1;i<arguments.length;i++){var e=arguments[i];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])}return t},z.apply(this,arguments)}function Ai(t,i){if(t){if(typeof t=="string")return St(t,i);var e=Object.prototype.toString.call(t).slice(8,-1);if(e==="Object"&&t.constructor&&(e=t.constructor.name),e==="Map"||e==="Set")return Array.from(t);if(e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return St(t,i)}}function St(t,i){(i==null||i>t.length)&&(i=t.length);for(var e=0,n=new Array(i);e<i;e++)n[e]=t[e];return n}function ni(t,i){var e=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!e){if(Array.isArray(t)||(e=Ai(t))||i){e&&(t=e);var n=0,s=function(){};return{s,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(h){throw h},f:s}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
2
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,r=!1,a;return{s:function(){e=e.call(t)},n:function(){var h=e.next();return o=h.done,h},e:function(h){r=!0,a=h},f:function(){try{!o&&e.return!=null&&e.return()}finally{if(r)throw a}}}}function ji(t,i){var e=[],n=[];function s(o,r){if(o.length===1)e.push(o[0]),n.push(o[0]);else{for(var a=Array(o.length-1),h=0;h<a.length;h++)h===0&&e.push(o[0]),h===a.length-1&&n.push(o[h+1]),a[h]=[(1-r)*o[h][0]+r*o[h+1][0],(1-r)*o[h][1]+r*o[h+1][1]];s(a,r)}}return t.length&&s(t,i),{left:e,right:n.reverse()}}function Ei(t){var i={};return t.length===4&&(i.x2=t[2][0],i.y2=t[2][1]),t.length>=3&&(i.x1=t[1][0],i.y1=t[1][1]),i.x=t[t.length-1][0],i.y=t[t.length-1][1],t.length===4?i.type="C":t.length===3?i.type="Q":i.type="L",i}function Di(t,i){i=i||2;for(var e=[],n=t,s=1/i,o=0;o<i-1;o++){var r=s/(1-s*o),a=ji(n,r);e.push(a.left),n=a.right}return e.push(n),e}function
|
|
1
|
+
import{X as Tt,c as M,i as Ot,a as Pt,D as Q,e as H,b as J,g as F,k as E,j as Nt,u as Ct,v as ai,s as D,h as ri,w as hi,n as li,q as At,r as jt,t as Et}from"./9O1MXkck.js";import{a as Dt,aI as $t,c as Rt,e as Bt,G as Lt,q as Ht,k as Ft,a2 as It,f as I,T as Xt}from"./D6tVZcRs.js";var K=Math.PI,tt=2*K,N=1e-6,_i=tt-N;function it(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function lt(){return new it}it.prototype=lt.prototype={constructor:it,moveTo:function(t,i){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+i)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,i){this._+="L"+(this._x1=+t)+","+(this._y1=+i)},quadraticCurveTo:function(t,i,e,n){this._+="Q"+ +t+","+ +i+","+(this._x1=+e)+","+(this._y1=+n)},bezierCurveTo:function(t,i,e,n,s,o){this._+="C"+ +t+","+ +i+","+ +e+","+ +n+","+(this._x1=+s)+","+(this._y1=+o)},arcTo:function(t,i,e,n,s){t=+t,i=+i,e=+e,n=+n,s=+s;var o=this._x1,r=this._y1,a=e-t,h=n-i,u=o-t,_=r-i,l=u*u+_*_;if(s<0)throw new Error("negative radius: "+s);if(this._x1===null)this._+="M"+(this._x1=t)+","+(this._y1=i);else if(l>N)if(!(Math.abs(_*a-h*u)>N)||!s)this._+="L"+(this._x1=t)+","+(this._y1=i);else{var c=e-o,d=n-r,x=a*a+h*h,m=c*c+d*d,f=Math.sqrt(x),y=Math.sqrt(l),v=s*Math.tan((K-Math.acos((x+l-m)/(2*f*y)))/2),p=v/y,b=v/f;Math.abs(p-1)>N&&(this._+="L"+(t+p*u)+","+(i+p*_)),this._+="A"+s+","+s+",0,0,"+ +(_*c>u*d)+","+(this._x1=t+b*a)+","+(this._y1=i+b*h)}},arc:function(t,i,e,n,s,o){t=+t,i=+i,e=+e,o=!!o;var r=e*Math.cos(n),a=e*Math.sin(n),h=t+r,u=i+a,_=1^o,l=o?n-s:s-n;if(e<0)throw new Error("negative radius: "+e);this._x1===null?this._+="M"+h+","+u:(Math.abs(this._x1-h)>N||Math.abs(this._y1-u)>N)&&(this._+="L"+h+","+u),e&&(l<0&&(l=l%tt+tt),l>_i?this._+="A"+e+","+e+",0,1,"+_+","+(t-r)+","+(i-a)+"A"+e+","+e+",0,1,"+_+","+(this._x1=h)+","+(this._y1=u):l>N&&(this._+="A"+e+","+e+",0,"+ +(l>=K)+","+_+","+(this._x1=t+e*Math.cos(s))+","+(this._y1=i+e*Math.sin(s))))},rect:function(t,i,e,n){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+i)+"h"+ +e+"v"+ +n+"h"+-e+"Z"},toString:function(){return this._}};function k(t){return function(){return t}}var Ji=Math.abs,Ki=Math.atan2,te=Math.cos,ie=Math.max,ee=Math.min,ne=Math.sin,se=Math.sqrt,vt=1e-12,_t=Math.PI,dt=_t/2,oe=2*_t;function ae(t){return t>1?0:t<-1?_t:Math.acos(t)}function re(t){return t>=1?dt:t<=-1?-dt:Math.asin(t)}function Gt(t){this._context=t}Gt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2;default:this._context.lineTo(t,i);break}}};function ct(t){return new Gt(t)}function Yt(t){return t[0]}function zt(t){return t[1]}function Vt(){var t=Yt,i=zt,e=k(!0),n=null,s=ct,o=null;function r(a){var h,u=a.length,_,l=!1,c;for(n==null&&(o=s(c=lt())),h=0;h<=u;++h)!(h<u&&e(_=a[h],h,a))===l&&((l=!l)?o.lineStart():o.lineEnd()),l&&o.point(+t(_,h,a),+i(_,h,a));if(c)return o=null,c+""||null}return r.x=function(a){return arguments.length?(t=typeof a=="function"?a:k(+a),r):t},r.y=function(a){return arguments.length?(i=typeof a=="function"?a:k(+a),r):i},r.defined=function(a){return arguments.length?(e=typeof a=="function"?a:k(!!a),r):e},r.curve=function(a){return arguments.length?(s=a,n!=null&&(o=s(n)),r):s},r.context=function(a){return arguments.length?(a==null?n=o=null:o=s(n=a),r):n},r}function ci(){var t=Yt,i=null,e=k(0),n=zt,s=k(!0),o=null,r=ct,a=null;function h(_){var l,c,d,x=_.length,m,f=!1,y,v=new Array(x),p=new Array(x);for(o==null&&(a=r(y=lt())),l=0;l<=x;++l){if(!(l<x&&s(m=_[l],l,_))===f)if(f=!f)c=l,a.areaStart(),a.lineStart();else{for(a.lineEnd(),a.lineStart(),d=l-1;d>=c;--d)a.point(v[d],p[d]);a.lineEnd(),a.areaEnd()}f&&(v[l]=+t(m,l,_),p[l]=+e(m,l,_),a.point(i?+i(m,l,_):v[l],n?+n(m,l,_):p[l]))}if(y)return a=null,y+""||null}function u(){return Vt().defined(s).curve(r).context(o)}return h.x=function(_){return arguments.length?(t=typeof _=="function"?_:k(+_),i=null,h):t},h.x0=function(_){return arguments.length?(t=typeof _=="function"?_:k(+_),h):t},h.x1=function(_){return arguments.length?(i=_==null?null:typeof _=="function"?_:k(+_),h):i},h.y=function(_){return arguments.length?(e=typeof _=="function"?_:k(+_),n=null,h):e},h.y0=function(_){return arguments.length?(e=typeof _=="function"?_:k(+_),h):e},h.y1=function(_){return arguments.length?(n=_==null?null:typeof _=="function"?_:k(+_),h):n},h.lineX0=h.lineY0=function(){return u().x(t).y(e)},h.lineY1=function(){return u().x(t).y(n)},h.lineX1=function(){return u().x(i).y(e)},h.defined=function(_){return arguments.length?(s=typeof _=="function"?_:k(!!_),h):s},h.curve=function(_){return arguments.length?(r=_,o!=null&&(a=r(o)),h):r},h.context=function(_){return arguments.length?(_==null?o=a=null:a=r(o=_),h):o},h}function w(){}function X(t,i,e){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+i)/6,(t._y0+4*t._y1+e)/6)}function V(t){this._context=t}V.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:X(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:X(this,t,i);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=i}};function ui(t){return new V(t)}function qt(t){this._context=t}qt.prototype={areaStart:w,areaEnd:w,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._x2=t,this._y2=i;break;case 1:this._point=2,this._x3=t,this._y3=i;break;case 2:this._point=3,this._x4=t,this._y4=i,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+i)/6);break;default:X(this,t,i);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=i}};function fi(t){return new qt(t)}function Zt(t){this._context=t}Zt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var e=(this._x0+4*this._x1+t)/6,n=(this._y0+4*this._y1+i)/6;this._line?this._context.lineTo(e,n):this._context.moveTo(e,n);break;case 3:this._point=4;default:X(this,t,i);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=i}};function pi(t){return new Zt(t)}function Wt(t,i){this._basis=new V(t),this._beta=i}Wt.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,i=this._y,e=t.length-1;if(e>0)for(var n=t[0],s=i[0],o=t[e]-n,r=i[e]-s,a=-1,h;++a<=e;)h=a/e,this._basis.point(this._beta*t[a]+(1-this._beta)*(n+h*o),this._beta*i[a]+(1-this._beta)*(s+h*r));this._x=this._y=null,this._basis.lineEnd()},point:function(t,i){this._x.push(+t),this._y.push(+i)}};const yi=(function t(i){function e(n){return i===1?new V(n):new Wt(n,i)}return e.beta=function(n){return t(+n)},e})(.85);function G(t,i,e){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-i),t._y2+t._k*(t._y1-e),t._x2,t._y2)}function ut(t,i){this._context=t,this._k=(1-i)/6}ut.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:G(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2,this._x1=t,this._y1=i;break;case 2:this._point=3;default:G(this,t,i);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};const vi=(function t(i){function e(n){return new ut(n,i)}return e.tension=function(n){return t(+n)},e})(0);function ft(t,i){this._context=t,this._k=(1-i)/6}ft.prototype={areaStart:w,areaEnd:w,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._x3=t,this._y3=i;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=i);break;case 2:this._point=3,this._x5=t,this._y5=i;break;default:G(this,t,i);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};const di=(function t(i){function e(n){return new ft(n,i)}return e.tension=function(n){return t(+n)},e})(0);function pt(t,i){this._context=t,this._k=(1-i)/6}pt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:G(this,t,i);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};const xi=(function t(i){function e(n){return new pt(n,i)}return e.tension=function(n){return t(+n)},e})(0);function yt(t,i,e){var n=t._x1,s=t._y1,o=t._x2,r=t._y2;if(t._l01_a>vt){var a=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,h=3*t._l01_a*(t._l01_a+t._l12_a);n=(n*a-t._x0*t._l12_2a+t._x2*t._l01_2a)/h,s=(s*a-t._y0*t._l12_2a+t._y2*t._l01_2a)/h}if(t._l23_a>vt){var u=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,_=3*t._l23_a*(t._l23_a+t._l12_a);o=(o*u+t._x1*t._l23_2a-i*t._l12_2a)/_,r=(r*u+t._y1*t._l23_2a-e*t._l12_2a)/_}t._context.bezierCurveTo(n,s,o,r,t._x2,t._y2)}function Qt(t,i){this._context=t,this._alpha=i}Qt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){if(t=+t,i=+i,this._point){var e=this._x2-t,n=this._y2-i;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+n*n,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2;break;case 2:this._point=3;default:yt(this,t,i);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};const gi=(function t(i){function e(n){return i?new Qt(n,i):new ut(n,0)}return e.alpha=function(n){return t(+n)},e})(.5);function Ut(t,i){this._context=t,this._alpha=i}Ut.prototype={areaStart:w,areaEnd:w,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(t,i){if(t=+t,i=+i,this._point){var e=this._x2-t,n=this._y2-i;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+n*n,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=i;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=i);break;case 2:this._point=3,this._x5=t,this._y5=i;break;default:yt(this,t,i);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};const bi=(function t(i){function e(n){return i?new Ut(n,i):new ft(n,0)}return e.alpha=function(n){return t(+n)},e})(.5);function Jt(t,i){this._context=t,this._alpha=i}Jt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){if(t=+t,i=+i,this._point){var e=this._x2-t,n=this._y2-i;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+n*n,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:yt(this,t,i);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};const mi=(function t(i){function e(n){return i?new Jt(n,i):new pt(n,0)}return e.alpha=function(n){return t(+n)},e})(.5);function Kt(t){this._context=t}Kt.prototype={areaStart:w,areaEnd:w,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,i){t=+t,i=+i,this._point?this._context.lineTo(t,i):(this._point=1,this._context.moveTo(t,i))}};function ki(t){return new Kt(t)}function xt(t){return t<0?-1:1}function gt(t,i,e){var n=t._x1-t._x0,s=i-t._x1,o=(t._y1-t._y0)/(n||s<0&&-0),r=(e-t._y1)/(s||n<0&&-0),a=(o*s+r*n)/(n+s);return(xt(o)+xt(r))*Math.min(Math.abs(o),Math.abs(r),.5*Math.abs(a))||0}function bt(t,i){var e=t._x1-t._x0;return e?(3*(t._y1-t._y0)/e-i)/2:i}function U(t,i,e){var n=t._x0,s=t._y0,o=t._x1,r=t._y1,a=(o-n)/3;t._context.bezierCurveTo(n+a,s+a*i,o-a,r-a*e,o,r)}function Y(t){this._context=t}Y.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:U(this,this._t0,bt(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){var e=NaN;if(t=+t,i=+i,!(t===this._x1&&i===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2;break;case 2:this._point=3,U(this,bt(this,e=gt(this,t,i)),e);break;default:U(this,this._t0,e=gt(this,t,i));break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=i,this._t0=e}}};function ti(t){this._context=new ii(t)}(ti.prototype=Object.create(Y.prototype)).point=function(t,i){Y.prototype.point.call(this,i,t)};function ii(t){this._context=t}ii.prototype={moveTo:function(t,i){this._context.moveTo(i,t)},closePath:function(){this._context.closePath()},lineTo:function(t,i){this._context.lineTo(i,t)},bezierCurveTo:function(t,i,e,n,s,o){this._context.bezierCurveTo(i,t,n,e,o,s)}};function Si(t){return new Y(t)}function wi(t){return new ti(t)}function ei(t){this._context=t}ei.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,i=this._y,e=t.length;if(e)if(this._line?this._context.lineTo(t[0],i[0]):this._context.moveTo(t[0],i[0]),e===2)this._context.lineTo(t[1],i[1]);else for(var n=mt(t),s=mt(i),o=0,r=1;r<e;++o,++r)this._context.bezierCurveTo(n[0][o],s[0][o],n[1][o],s[1][o],t[r],i[r]);(this._line||this._line!==0&&e===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,i){this._x.push(+t),this._y.push(+i)}};function mt(t){var i,e=t.length-1,n,s=new Array(e),o=new Array(e),r=new Array(e);for(s[0]=0,o[0]=2,r[0]=t[0]+2*t[1],i=1;i<e-1;++i)s[i]=1,o[i]=4,r[i]=4*t[i]+2*t[i+1];for(s[e-1]=2,o[e-1]=7,r[e-1]=8*t[e-1]+t[e],i=1;i<e;++i)n=s[i]/o[i-1],o[i]-=n,r[i]-=n*r[i-1];for(s[e-1]=r[e-1]/o[e-1],i=e-2;i>=0;--i)s[i]=(r[i]-s[i+1])/o[i];for(o[e-1]=(t[e]+s[e-1])/2,i=0;i<e-1;++i)o[i]=2*t[i+1]-s[i+1];return[s,o]}function Mi(t){return new ei(t)}function q(t,i){this._context=t,this._t=i}q.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,i),this._context.lineTo(t,i);else{var e=this._x*(1-this._t)+t*this._t;this._context.lineTo(e,this._y),this._context.lineTo(e,i)}break}}this._x=t,this._y=i}};function Ti(t){return new q(t,.5)}function Oi(t){return new q(t,0)}function Pi(t){return new q(t,1)}function kt(t,i){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);i&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),e.push.apply(e,n)}return e}function Ni(t){for(var i=1;i<arguments.length;i++){var e=arguments[i]!=null?arguments[i]:{};i%2?kt(Object(e),!0).forEach(function(n){Ci(t,n,e[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):kt(Object(e)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))})}return t}function $(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?$=function(i){return typeof i}:$=function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},$(t)}function Ci(t,i,e){return i in t?Object.defineProperty(t,i,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[i]=e,t}function z(){return z=Object.assign||function(t){for(var i=1;i<arguments.length;i++){var e=arguments[i];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])}return t},z.apply(this,arguments)}function Ai(t,i){if(t){if(typeof t=="string")return St(t,i);var e=Object.prototype.toString.call(t).slice(8,-1);if(e==="Object"&&t.constructor&&(e=t.constructor.name),e==="Map"||e==="Set")return Array.from(t);if(e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return St(t,i)}}function St(t,i){(i==null||i>t.length)&&(i=t.length);for(var e=0,n=new Array(i);e<i;e++)n[e]=t[e];return n}function ni(t,i){var e=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!e){if(Array.isArray(t)||(e=Ai(t))||i){e&&(t=e);var n=0,s=function(){};return{s,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(h){throw h},f:s}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
2
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,r=!1,a;return{s:function(){e=e.call(t)},n:function(){var h=e.next();return o=h.done,h},e:function(h){r=!0,a=h},f:function(){try{!o&&e.return!=null&&e.return()}finally{if(r)throw a}}}}function ji(t,i){var e=[],n=[];function s(o,r){if(o.length===1)e.push(o[0]),n.push(o[0]);else{for(var a=Array(o.length-1),h=0;h<a.length;h++)h===0&&e.push(o[0]),h===a.length-1&&n.push(o[h+1]),a[h]=[(1-r)*o[h][0]+r*o[h+1][0],(1-r)*o[h][1]+r*o[h+1][1]];s(a,r)}}return t.length&&s(t,i),{left:e,right:n.reverse()}}function Ei(t){var i={};return t.length===4&&(i.x2=t[2][0],i.y2=t[2][1]),t.length>=3&&(i.x1=t[1][0],i.y1=t[1][1]),i.x=t[t.length-1][0],i.y=t[t.length-1][1],t.length===4?i.type="C":t.length===3?i.type="Q":i.type="L",i}function Di(t,i){i=i||2;for(var e=[],n=t,s=1/i,o=0;o<i-1;o++){var r=s/(1-s*o),a=ji(n,r);e.push(a.left),n=a.right}return e.push(n),e}function $i(t,i,e){var n=[[t.x,t.y]];return i.x1!=null&&n.push([i.x1,i.y1]),i.x2!=null&&n.push([i.x2,i.y2]),n.push([i.x,i.y]),Di(n,e).map(Ei)}var Ri=/[MLCSTQAHVZmlcstqahv]|-?[\d.e+-]+/g,A={M:["x","y"],L:["x","y"],H:["x"],V:["y"],C:["x1","y1","x2","y2","x","y"],S:["x2","y2","x","y"],Q:["x1","y1","x","y"],T:["x","y"],A:["rx","ry","xAxisRotation","largeArcFlag","sweepFlag","x","y"],Z:[]};Object.keys(A).forEach(function(t){A[t.toLowerCase()]=A[t]});function et(t,i){for(var e=Array(t),n=0;n<t;n++)e[n]=i;return e}function Bi(t){return"".concat(t.type).concat(A[t.type].map(function(i){return t[i]}).join(","))}function Li(t,i){var e={x1:"x",y1:"y",x2:"x",y2:"y"},n=["xAxisRotation","largeArcFlag","sweepFlag"];if(t.type!==i.type&&i.type.toUpperCase()!=="M"){var s={};Object.keys(i).forEach(function(o){var r=i[o],a=t[o];a===void 0&&(n.includes(o)?a=r:(a===void 0&&e[o]&&(a=t[e[o]]),a===void 0&&(a=0))),s[o]=a}),s.type=i.type,t=s}return t}function Hi(t,i,e){var n=[];if(i.type==="L"||i.type==="Q"||i.type==="C")n=n.concat($i(t,i,e));else{var s=z({},t);s.type==="M"&&(s.type="L"),n=n.concat(et(e-1).map(function(){return s})),n.push(i)}return n}function wt(t,i,e){var n=t.length-1,s=i.length-1,o=n/s,r=et(s).reduce(function(h,u,_){var l=Math.floor(o*_);if(e&&l<t.length-1&&e(t[l],t[l+1])){var c=o*_%1<.5;h[l]&&(c?l>0?l-=1:l<t.length-1&&(l+=1):l<t.length-1?l+=1:l>0&&(l-=1))}return h[l]=(h[l]||0)+1,h},[]),a=r.reduce(function(h,u,_){if(_===t.length-1){var l=et(u,z({},t[t.length-1]));return l[0].type==="M"&&l.forEach(function(c){c.type="L"}),h.concat(l)}return h.concat(Hi(t[_],t[_+1],u))},[]);return a.unshift(t[0]),a}function Mt(t){for(var i=(t||"").match(Ri)||[],e=[],n,s,o=0;o<i.length;++o)if(n=A[i[o]],n){s={type:i[o]};for(var r=0;r<n.length;++r)s[n[r]]=+i[o+r+1];o+=n.length,e.push(s)}return e}function Fi(t,i,e){var n=t==null?[]:t.slice(),s=i==null?[]:i.slice(),o=$(e)==="object"?e:{excludeSegment:e,snapEndsToInput:!0},r=o.excludeSegment,a=o.snapEndsToInput;if(!n.length&&!s.length)return function(){return[]};var h=(n.length===0||n[n.length-1].type==="Z")&&(s.length===0||s[s.length-1].type==="Z");n.length>0&&n[n.length-1].type==="Z"&&n.pop(),s.length>0&&s[s.length-1].type==="Z"&&s.pop(),n.length?s.length||s.push(n[0]):n.push(s[0]);var u=Math.abs(s.length-n.length);u!==0&&(s.length>n.length?n=wt(n,s,r):s.length<n.length&&(s=wt(s,n,r))),n=n.map(function(l,c){return Li(l,s[c])});var _=n.map(function(l){return Ni({},l)});return h&&(_.push({type:"Z"}),n.push({type:"Z"})),function(c){if(c===1&&a)return i??[];if(c===0)return n;for(var d=0;d<_.length;++d){var x=n[d],m=s[d],f=_[d],y=ni(A[f.type]),v;try{for(y.s();!(v=y.n()).done;){var p=v.value;f[p]=(1-c)*x[p]+c*m[p],(p==="largeArcFlag"||p==="sweepFlag")&&(f[p]=Math.round(f[p]))}}catch(b){y.e(b)}finally{y.f()}}return _}}function si(t,i,e){var n=Mt(t),s=Mt(i),o=$(e)==="object"?e:{excludeSegment:e,snapEndsToInput:!0},r=o.excludeSegment,a=o.snapEndsToInput;if(!n.length&&!s.length)return function(){return""};var h=Fi(n,s,{excludeSegment:r,snapEndsToInput:a});return function(_){if(_===1&&a)return i??"";var l=h(_),c="",d=ni(l),x;try{for(d.s();!(x=d.n()).done;){var m=x.value;c+=Bi(m)}}catch(f){d.e(f)}finally{d.f()}return c}}var g;(function(t){t.Basis="basis",t.BasisClosed="basisClosed",t.BasisOpen="basisOpen",t.Bundle="bundle",t.Cardinal="cardinal",t.CardinalClosed="cardinalClosed",t.CardinalOpen="cardinalOpen",t.CatmullRom="catmullRom",t.CatmullRomClosed="catmullRomClosed",t.CatmullRomOpen="catmullRomOpen",t.Linear="linear",t.LinearClosed="linearClosed",t.MonotoneX="monotoneX",t.MonotoneY="monotoneY",t.Natural="natural",t.Step="step",t.StepAfter="stepAfter",t.StepBefore="stepBefore"})(g||(g={}));const nt={[g.Basis]:ui,[g.BasisClosed]:fi,[g.BasisOpen]:pi,[g.Bundle]:yi,[g.Cardinal]:vi,[g.CardinalClosed]:di,[g.CardinalOpen]:xi,[g.CatmullRom]:gi,[g.CatmullRomClosed]:bi,[g.CatmullRomOpen]:mi,[g.Linear]:ct,[g.LinearClosed]:ki,[g.MonotoneX]:Si,[g.MonotoneY]:wi,[g.Natural]:Mi,[g.Step]:Ti,[g.StepAfter]:Pi,[g.StepBefore]:Oi},Ii=Object.assign(Object.assign({},Tt),{curveType:g.MonotoneX,lineWidth:2,lineDashArray:void 0,fallbackValue:void 0,highlightOnHover:!1,cursor:null,interpolateMissingData:!1}),Xi=Ot`
|
|
3
3
|
:root {
|
|
4
4
|
--vis-line-cursor: default;
|
|
5
5
|
--vis-line-stroke-dasharray: none;
|
|
@@ -67,4 +67,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
67
67
|
fill-opacity: var(--vis-area-hover-fill-opacity);
|
|
68
68
|
stroke-width: var(--vis-area-hover-stroke-width);
|
|
69
69
|
}
|
|
70
|
-
`,qi=Object.freeze(Object.defineProperty({__proto__:null,area:ht,globalStyles:Vi,root:oi},Symbol.toStringTag,{value:"Module"}));class W extends Pt{constructor(i){super(),this._defaultConfig=zi,this.config=this._defaultConfig,this.stacked=!0,this.events={[W.selectors.area]:{}},i&&this.setConfig(i),this.stacked=Array.isArray(this.config.y)}_render(i){super._render(i);const{config:e,datamodel:{data:n}}=this,s=H(i)?i:e.duration,o=nt[e.curveType];this._areaGen=ci().x(f=>f.x).y0(f=>f.y0).y1(f=>f.y1).curve(o);const r=J(e.y)?e.y:[e.y],a=n.map((f,y)=>this.xScale(F(f,e.x,y))),h=ri(n,e.baseline,r,this._prevNegative);this._prevNegative=h.map(f=>!!f.isMostlyNegative);const u=[],_=h.map(f=>f.map((y,v)=>{var p,b;const S=a[v],C=this.yScale(y[0]),T=this.yScale(y[1]),O=T>C,P=u[v]||0
|
|
70
|
+
`,qi=Object.freeze(Object.defineProperty({__proto__:null,area:ht,globalStyles:Vi,root:oi},Symbol.toStringTag,{value:"Module"}));class W extends Pt{constructor(i){super(),this._defaultConfig=zi,this.config=this._defaultConfig,this.stacked=!0,this.events={[W.selectors.area]:{}},i&&this.setConfig(i),this.stacked=Array.isArray(this.config.y)}_render(i){super._render(i);const{config:e,datamodel:{data:n}}=this,s=H(i)?i:e.duration,o=nt[e.curveType];this._areaGen=ci().x(f=>f.x).y0(f=>f.y0).y1(f=>f.y1).curve(o);const r=J(e.y)?e.y:[e.y],a=n.map((f,y)=>this.xScale(F(f,e.x,y))),h=ri(n,e.baseline,r,this._prevNegative);this._prevNegative=h.map(f=>!!f.isMostlyNegative);const u=[],_=h.map(f=>f.map((y,v)=>{var p,b;const S=a[v],C=this.yScale(y[0]),T=this.yScale(y[1]),O=T>C,P=u[v]||0,R=O?C+P:C-P,B=O?T+P:T-P;let L=0;return(e.minHeight||e.minHeight1Px)&&Math.abs(B-R)<((p=e.minHeight)!==null&&p!==void 0?p:1)&&(L=((b=e.minHeight)!==null&&b!==void 0?b:1)-Math.abs(B-R),u[v]=P+L),{x:S,y0:R,y1:O?B+L:B-L}})),l=_.length-1,c=_.reverse(),d=this.g.selectAll(`.${ht}`).data(c),x=d.enter().append("path").attr("class",ht).attr("d",f=>this._areaGen(f)||this._emptyPath()).style("opacity",0).style("fill",(f,y)=>E(n,e.color,l-y)),m=D(x.merge(d),s).style("opacity",(f,y)=>f.some(p=>p.y0-p.y1!==0)?F(n,e.opacity,l-y):0).style("fill",(f,y)=>E(n,e.color,l-y)).style("cursor",(f,y)=>Nt(n,e.cursor,l-y));s?m.attrTween("d",(y,v,p)=>{const b=Ct(p[v]).attr("d"),S=this._areaGen(y)||this._emptyPath();return si(b,S)}):m.attr("d",f=>this._areaGen(f)||this._emptyPath()),D(d.exit(),s).style("opacity",0).remove()}getYDataExtent(i){const{config:e,datamodel:n}=this,s=J(e.y)?e.y:[e.y],o=this.xScale.domain(),r=i?hi(n.data,o,e.x,!0):n.data;return li(r,e.baseline,...s)}_emptyPath(){const i=this.xScale.range(),e=this.yScale.domain(),n=this.yScale((e[0]+e[1])/2),s=n;return this._areaGen([{y0:n,y1:s,x:i[0]},{y0:n,y1:s,x:i[1]}])}}W.selectors=qi;const Zi={"data-vis-component":""},he=Dt({__name:"index",props:{color:{},curveType:{},baseline:{},opacity:{},cursor:{},minHeight1Px:{type:Boolean},minHeight:{},x:{},y:{},id:{type:Function},xScale:{type:[Object,Function]},yScale:{type:[Object,Function]},excludeFromDomainCalculation:{type:Boolean},duration:{},events:{},attributes:{},data:{}},setup(t,{expose:i}){const e=$t(At),n=t,s=Rt(()=>e.data.value??n.data),o=jt(n),r=Bt();return Ht(()=>{Ft(()=>{var a;r.value=new W(o.value),(a=r.value)==null||a.setData(s.value),e.update(r.value)})}),It(()=>{var a;(a=r.value)==null||a.destroy(),e.destroy()}),I(o,(a,h)=>{var u;Et(a,h)||(u=r.value)==null||u.setConfig(o.value)}),I(s,()=>{var a;(a=r.value)==null||a.setData(s.value)}),i({component:r}),(a,h)=>(Xt(),Lt("div",Zi))}}),Wi={"data-vis-component":""},le=Dt({__name:"index",props:{color:{},curveType:{},lineWidth:{},lineDashArray:{},fallbackValue:{},highlightOnHover:{type:Boolean},cursor:{},interpolateMissingData:{type:Boolean},x:{},y:{},id:{type:Function},xScale:{type:[Object,Function]},yScale:{type:[Object,Function]},excludeFromDomainCalculation:{type:Boolean},duration:{},events:{},attributes:{},data:{}},setup(t,{expose:i}){const e=$t(At),n=t,s=Rt(()=>e.data.value??n.data),o=jt(n),r=Bt();return Ht(()=>{Ft(()=>{var a;r.value=new Z(o.value),(a=r.value)==null||a.setData(s.value),e.update(r.value)})}),It(()=>{var a;(a=r.value)==null||a.destroy(),e.destroy()}),I(o,(a,h)=>{var u;Et(a,h)||(u=r.value)==null||u.setConfig(o.value)}),I(s,()=>{var a;(a=r.value)==null||a.setData(s.value)}),i({component:r}),(a,h)=>(Xt(),Lt("div",Wi))}});export{he as P,le as S,k as a,lt as b,te as c,se as d,vt as e,Ji as f,Ki as g,dt as h,re as i,ie as j,ae as k,ee as m,_t as p,ne as s,oe as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as ae}from"./wO6z2ugJ.js";import{a as X,e as $,Q as w,R as c,S as a,ab as d,a9 as S,ae as B,aa as p,al as Q,C as t,W as Y,af as ie,ao as fe,N as me,aF as pe,aw as ve,c as se,am as Z,aG as be,f as ye,q as ne,a4 as W,G as V,V as ee,U as O,_ as J,ax as ke,a3 as xe,aH as he,k as ze,an as $e,ag as oe,T as r,ai as K,aj as te,ak as le,n as we}from"./2dNDtTiv.js";import{_ as _e,a as Ce}from"./CqNwHCpo.js";import{_ as Ie}from"./BmOtR1wX.js";import{_ as Se}from"./JbHa4oXq.js";import{_ as qe}from"./1zUTf4AP.js";import{_ as Ue}from"./DJTCT0bl.js";import{u as Te}from"./DhI5cA_n.js";import{_ as re}from"./B93pdGAW.js";import"./D5jZq8b3.js";import"./DEd2xVbS.js";import"./DmmdPt_5.js";import"./Bk6JUtIo.js";import"./BA_pRWwX.js";import"./CWyMCJQH.js";import"./BZrSPX0S.js";import"./H6JbrRBU.js";import"./DUAAXJ6Q.js";const Ve={class:"flex items-start justify-between gap-3"},Be={class:"flex-1 min-w-0"},Fe={class:"flex items-center gap-2 mb-1"},Ne={class:"font-medium text-sm truncate"},Ae={class:"text-xs text-muted line-clamp-2"},De={class:"flex items-center gap-2 mt-3"},Me={class:"text-xs text-dimmed ml-auto"},Oe=X({__name:"Card",props:{skill:{}},emits:["toggle","delete","update"],setup(i,{emit:x}){const _=i,l=x,k=$(!1);async function h(){k.value=!0,l("toggle",_.skill.name),k.value=!1}return(m,s)=>{const n=Se,g=qe,q=Y,I=ie;return c(),w(I,{to:`/skills/${i.skill.name}`,class:"block p-4 rounded-lg border border-default bg-elevated/50 hover:bg-elevated transition-colors"},{default:a(()=>[d("div",Ve,[d("div",Be,[d("div",Fe,[d("span",Ne,B(i.skill.name),1),i.skill.core?(c(),w(n,{key:0,variant:"subtle",color:"primary",size:"xs"},{default:a(()=>[...s[3]||(s[3]=[p(" Core ",-1)])]),_:1})):S("",!0),i.skill.active?S("",!0):(c(),w(n,{key:1,variant:"subtle",color:"neutral",size:"xs"},{default:a(()=>[...s[4]||(s[4]=[p(" Disabled ",-1)])]),_:1}))]),d("p",Ae,B(i.skill.description),1)]),i.skill.core?S("",!0):(c(),w(g,{key:0,"model-value":i.skill.active,size:"sm",loading:t(k),"onUpdate:modelValue":h,onClick:s[0]||(s[0]=Q(()=>{},["prevent","stop"]))},null,8,["model-value","loading"]))]),d("div",De,[i.skill.version?(c(),w(n,{key:0,variant:"soft",color:"neutral",size:"xs"},{default:a(()=>[p(" v"+B(i.skill.version),1)]),_:1})):S("",!0),i.skill.author?(c(),w(n,{key:1,variant:"soft",color:"neutral",size:"xs"},{default:a(()=>[p(B(i.skill.author),1)]),_:1})):S("",!0),d("span",Me,B(i.skill.fileCount)+" file"+B(i.skill.fileCount!==1?"s":""),1),i.skill.hasUpdate?(c(),w(q,{key:2,icon:"i-lucide-refresh-cw",color:"primary",variant:"soft",size:"xs",onClick:s[1]||(s[1]=Q(N=>l("update",i.skill.name),["prevent","stop"]))})):S("",!0),i.skill.core?S("",!0):(c(),w(q,{key:3,icon:"i-lucide-trash",color:"error",variant:"soft",size:"xs",onClick:s[2]||(s[2]=Q(N=>l("delete",i.skill.name),["prevent","stop"]))}))])]),_:1},8,["to"])}}}),je=Object.assign(Oe,{__name:"SkillsCard"}),Pe={slots:{root:"relative inline-flex items-center",base:["w-full rounded-md border-0 appearance-none placeholder:text-dimmed focus:outline-none disabled:cursor-not-allowed disabled:opacity-75","transition-colors"],leading:"absolute start-0 flex items-start",leadingIcon:"shrink-0 text-dimmed",leadingAvatar:"shrink-0",leadingAvatarSize:"",trailing:"absolute end-0 flex items-start",trailingIcon:"shrink-0 text-dimmed"},variants:{fieldGroup:{horizontal:{root:"group has-focus-visible:z-[1]",base:"group-not-only:group-first:rounded-e-none group-not-only:group-last:rounded-s-none group-not-last:group-not-first:rounded-none"},vertical:{root:"group has-focus-visible:z-[1]",base:"group-not-only:group-first:rounded-b-none group-not-only:group-last:rounded-t-none group-not-last:group-not-first:rounded-none"}},size:{xs:{base:"px-2 py-1 text-xs gap-1",leading:"ps-2 inset-y-1",trailing:"pe-2 inset-y-1",leadingIcon:"size-4",leadingAvatarSize:"3xs",trailingIcon:"size-4"},sm:{base:"px-2.5 py-1.5 text-xs gap-1.5",leading:"ps-2.5 inset-y-1.5",trailing:"pe-2.5 inset-y-1.5",leadingIcon:"size-4",leadingAvatarSize:"3xs",trailingIcon:"size-4"},md:{base:"px-2.5 py-1.5 text-sm gap-1.5",leading:"ps-2.5 inset-y-1.5",trailing:"pe-2.5 inset-y-1.5",leadingIcon:"size-5",leadingAvatarSize:"2xs",trailingIcon:"size-5"},lg:{base:"px-3 py-2 text-sm gap-2",leading:"ps-3 inset-y-2",trailing:"pe-3 inset-y-2",leadingIcon:"size-5",leadingAvatarSize:"2xs",trailingIcon:"size-5"},xl:{base:"px-3 py-2 text-base gap-2",leading:"ps-3 inset-y-2",trailing:"pe-3 inset-y-2",leadingIcon:"size-6",leadingAvatarSize:"xs",trailingIcon:"size-6"}},variant:{outline:"text-highlighted bg-default ring ring-inset ring-accented",soft:"text-highlighted bg-elevated/50 hover:bg-elevated focus:bg-elevated disabled:bg-elevated/50",subtle:"text-highlighted bg-elevated ring ring-inset ring-accented",ghost:"text-highlighted bg-transparent hover:bg-elevated focus:bg-elevated disabled:bg-transparent dark:disabled:bg-transparent",none:"text-highlighted bg-transparent"},color:{primary:"",secondary:"",success:"",info:"",warning:"",error:"",neutral:""},leading:{true:""},trailing:{true:""},loading:{true:""},highlight:{true:""},type:{file:"file:me-1.5 file:font-medium file:text-muted file:outline-none"},autoresize:{true:{base:"resize-none"}}},compoundVariants:[{color:"primary",variant:["outline","subtle"],class:"focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-primary"},{color:"secondary",variant:["outline","subtle"],class:"focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-secondary"},{color:"success",variant:["outline","subtle"],class:"focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-success"},{color:"info",variant:["outline","subtle"],class:"focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-info"},{color:"warning",variant:["outline","subtle"],class:"focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-warning"},{color:"error",variant:["outline","subtle"],class:"focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-error"},{color:"primary",highlight:!0,class:"ring ring-inset ring-primary"},{color:"secondary",highlight:!0,class:"ring ring-inset ring-secondary"},{color:"success",highlight:!0,class:"ring ring-inset ring-success"},{color:"info",highlight:!0,class:"ring ring-inset ring-info"},{color:"warning",highlight:!0,class:"ring ring-inset ring-warning"},{color:"error",highlight:!0,class:"ring ring-inset ring-error"},{color:"neutral",variant:["outline","subtle"],class:"focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-inverted"},{color:"neutral",highlight:!0,class:"ring ring-inset ring-inverted"},{leading:!0,size:"xs",class:"ps-7"},{leading:!0,size:"sm",class:"ps-8"},{leading:!0,size:"md",class:"ps-9"},{leading:!0,size:"lg",class:"ps-10"},{leading:!0,size:"xl",class:"ps-11"},{trailing:!0,size:"xs",class:"pe-7"},{trailing:!0,size:"sm",class:"pe-8"},{trailing:!0,size:"md",class:"pe-9"},{trailing:!0,size:"lg",class:"pe-10"},{trailing:!0,size:"xl",class:"pe-11"},{loading:!0,leading:!0,class:{leadingIcon:"animate-spin"}},{loading:!0,leading:!1,trailing:!0,class:{trailingIcon:"animate-spin"}}],defaultVariants:{size:"md",color:"primary",variant:"outline"}},Re=["id","value","name","rows","placeholder","disabled","required"],Le=Object.assign({inheritAttrs:!1},{__name:"UTextarea",props:{as:{type:null,required:!1},id:{type:String,required:!1},name:{type:String,required:!1},placeholder:{type:String,required:!1},color:{type:null,required:!1},variant:{type:null,required:!1},size:{type:null,required:!1},required:{type:Boolean,required:!1},autofocus:{type:Boolean,required:!1},autofocusDelay:{type:Number,required:!1,default:0},autoresize:{type:Boolean,required:!1},autoresizeDelay:{type:Number,required:!1,default:0},disabled:{type:Boolean,required:!1},rows:{type:Number,required:!1,default:3},maxrows:{type:Number,required:!1,default:0},highlight:{type:Boolean,required:!1},modelValue:{type:null,required:!1},defaultValue:{type:null,required:!1},modelModifiers:{type:Object,required:!1},class:{type:null,required:!1},ui:{type:null,required:!1},icon:{type:null,required:!1},avatar:{type:Object,required:!1},leading:{type:Boolean,required:!1},leadingIcon:{type:null,required:!1},trailing:{type:Boolean,required:!1},trailingIcon:{type:null,required:!1},loading:{type:Boolean,required:!1},loadingIcon:{type:null,required:!1}},emits:["update:modelValue","blur","change"],setup(i,{expose:x,emit:_}){const l=i,k=_,h=fe(),m=Te(l,"modelValue",k,{defaultValue:l.defaultValue}),s=me(),{emitFormFocus:n,emitFormBlur:g,emitFormInput:q,emitFormChange:I,size:N,color:U,id:u,name:A,highlight:M,disabled:D,ariaAttrs:v}=pe(l,{deferInputValidation:!0}),{isLeading:e,isTrailing:b,leadingIconName:y,trailingIconName:T}=ve(l),C=se(()=>Z({extend:Z(Pe),...s.ui?.textarea||{}})({color:U.value,variant:l.variant,size:N?.value,loading:l.loading,highlight:M.value,autoresize:l.autoresize,leading:e.value||!!l.avatar||!!h.leading,trailing:b.value||!!h.trailing})),z=be("textareaRef");function j(o){l.modelModifiers?.trim&&(o=o?.trim()??null),l.modelModifiers?.number&&(o=he(o)),l.modelModifiers?.nullable&&(o||=null),l.modelModifiers?.optional&&(o||=void 0),m.value=o,q()}function R(o){f(),l.modelModifiers?.lazy||j(o.target.value)}function L(o){const F=o.target.value;l.modelModifiers?.lazy&&j(F),l.modelModifiers?.trim&&(o.target.value=F.trim()),I(),k("change",o)}function G(o){g(),k("blur",o)}function P(){l.autofocus&&z.value?.focus()}function f(){if(l.autoresize&&z.value){z.value.rows=l.rows;const o=z.value.style.overflow;z.value.style.overflow="hidden";const F=window.getComputedStyle(z.value),H=Number.parseInt(F.paddingTop),de=Number.parseInt(F.paddingBottom),ue=H+de,ce=Number.parseInt(F.lineHeight),{scrollHeight:ge}=z.value,E=(ge-ue)/ce;E>l.rows&&(z.value.rows=l.maxrows?Math.min(E,l.maxrows):E),z.value.style.overflow=o}}return ye(m,()=>{ze(f)}),ne(()=>{setTimeout(()=>{P()},l.autofocusDelay),setTimeout(()=>{f()},l.autoresizeDelay)}),x({textareaRef:z}),(o,F)=>(c(),w(t(xe),{as:i.as,"data-slot":"root",class:O(C.value.root({class:[l.ui?.root,l.class]}))},{default:a(()=>[d("textarea",ee({id:t(u),ref_key:"textareaRef",ref:z,value:t(m),name:t(A),rows:i.rows,placeholder:i.placeholder,"data-slot":"base",class:C.value.base({class:l.ui?.base}),disabled:t(D),required:i.required},{...o.$attrs,...t(v)},{onInput:R,onBlur:G,onChange:L,onFocus:F[0]||(F[0]=(...H)=>t(n)&&t(n)(...H))}),null,16,Re),W(o.$slots,"default",{ui:C.value}),t(e)||i.avatar||h.leading?(c(),V("span",{key:0,"data-slot":"leading",class:O(C.value.leading({class:l.ui?.leading}))},[W(o.$slots,"leading",{ui:C.value},()=>[t(e)&&t(y)?(c(),w(J,{key:0,name:t(y),"data-slot":"leadingIcon",class:O(C.value.leadingIcon({class:l.ui?.leadingIcon}))},null,8,["name","class"])):i.avatar?(c(),w(ke,ee({key:1,size:l.ui?.leadingAvatarSize||C.value.leadingAvatarSize()},i.avatar,{"data-slot":"leadingAvatar",class:C.value.leadingAvatar({class:l.ui?.leadingAvatar})}),null,16,["size","class"])):S("",!0)])],2)):S("",!0),t(b)||h.trailing?(c(),V("span",{key:1,"data-slot":"trailing",class:O(C.value.trailing({class:l.ui?.trailing}))},[W(o.$slots,"trailing",{ui:C.value},()=>[t(T)?(c(),w(J,{key:0,name:t(T),"data-slot":"trailingIcon",class:O(C.value.trailingIcon({class:l.ui?.trailingIcon}))},null,8,["name","class"])):S("",!0)])],2)):S("",!0)]),_:3},8,["as","class"]))}}),Ge={class:"space-y-4"},He={class:"flex gap-2"},Ee={key:0,class:"text-xs text-muted"},Qe={class:"flex justify-end gap-2"},We=X({__name:"CreateModal",props:{open:{type:Boolean}},emits:["update:open","created"],setup(i,{emit:x}){const _=i,l=x,k=$e(),h=oe(),m=$("blank"),s=$(""),n=$(""),g=$(!1);function q(){m.value="blank",s.value="",n.value="",g.value=!1}function I(){l("update:open",!1),q()}async function N(){if(s.value.trim()){g.value=!0;try{if(m.value==="blank")await $fetch("/api/skills/create",{method:"POST",body:{name:s.value.trim(),description:n.value.trim()||void 0}}),h.add({title:`Skill '${s.value}' created`,color:"success"}),l("created",s.value.trim()),I(),k.push(`/skills/${s.value.trim()}`);else{if(!n.value.trim()){h.add({title:"Description is required for AI generation",color:"warning"}),g.value=!1;return}const U=await $fetch("/api/skills/generate",{method:"POST",body:{name:s.value.trim(),description:n.value.trim()}});h.add({title:`Skill '${s.value}' generated`,description:`Cost: $${U.data.costUsd.toFixed(4)} — created in inactive state for review`,color:"success"}),l("created",s.value.trim()),I(),k.push(`/skills/${s.value.trim()}`)}}catch(U){const u=U instanceof Error?U.message:"Failed to create skill";h.add({title:u,color:"error"})}finally{g.value=!1}}}return(U,u)=>{const A=Y,M=ae,D=Ue,v=Le,e=re;return c(),w(e,{open:_.open,"onUpdate:open":u[4]||(u[4]=b=>l("update:open",b))},{header:a(()=>[...u[5]||(u[5]=[d("span",{class:"font-semibold"},"Create Skill",-1)])]),body:a(()=>[d("div",Ge,[d("div",He,[r(A,{variant:t(m)==="blank"?"solid":"outline",color:"neutral",size:"sm",icon:"i-lucide-file-plus",onClick:u[0]||(u[0]=b=>m.value="blank")},{default:a(()=>[...u[6]||(u[6]=[p(" Blank Skill ",-1)])]),_:1},8,["variant"]),r(A,{variant:t(m)==="generate"?"solid":"outline",color:"neutral",size:"sm",icon:"i-lucide-sparkles",onClick:u[1]||(u[1]=b=>m.value="generate")},{default:a(()=>[...u[7]||(u[7]=[p(" AI Generate ",-1)])]),_:1},8,["variant"])]),r(D,{label:"Name"},{default:a(()=>[r(M,{modelValue:t(s),"onUpdate:modelValue":u[2]||(u[2]=b=>K(s)?s.value=b:null),placeholder:"my-skill",disabled:t(g),class:"w-full"},null,8,["modelValue","disabled"])]),_:1}),r(D,{label:"Description",required:t(m)==="generate"},{default:a(()=>[r(v,{modelValue:t(n),"onUpdate:modelValue":u[3]||(u[3]=b=>K(n)?n.value=b:null),placeholder:t(m)==="generate"?"Describe what this skill should do...":"Optional description",rows:3,disabled:t(g),class:"w-full"},null,8,["modelValue","placeholder","disabled"])]),_:1},8,["required"]),t(m)==="generate"?(c(),V("p",Ee," AI-generated skills are created in an inactive state so you can review them before enabling. ")):S("",!0)])]),footer:a(()=>[d("div",Qe,[r(A,{variant:"ghost",color:"neutral",disabled:t(g),onClick:I},{default:a(()=>[...u[8]||(u[8]=[p(" Cancel ",-1)])]),_:1},8,["disabled"]),r(A,{loading:t(g),disabled:!t(s).trim(),onClick:N},{default:a(()=>[p(B(t(m)==="generate"?"Generate":"Create"),1)]),_:1},8,["loading","disabled"])])]),_:1},8,["open"])}}}),Je=Object.assign(We,{__name:"SkillsCreateModal"}),Ke={class:"flex flex-1 min-w-0"},Xe={class:"p-4"},Ye={key:0,class:"grid gap-4 sm:grid-cols-2 lg:grid-cols-3"},Ze={key:1,class:"flex flex-col items-center justify-center py-16 text-dimmed"},et={key:2,class:"text-center py-12 text-muted text-sm"},tt={key:3,class:"grid gap-4 sm:grid-cols-2 lg:grid-cols-3"},lt={class:"text-sm text-muted"},at={class:"text-default"},it={class:"flex justify-end gap-2"},st={class:"text-sm text-muted"},nt={class:"text-default"},ot={class:"flex justify-end gap-2"},Ct=X({__name:"index",setup(i){const x=oe(),_=$([]),l=$(!0),k=$(""),h=$(!1),m=$(!1),s=$(null),n=$(""),g=$(""),q=$(!1),I=$(!1),N=se(()=>{if(!k.value.trim())return _.value;const v=k.value.toLowerCase();return _.value.filter(e=>e.name.toLowerCase().includes(v)||e.description.toLowerCase().includes(v))});async function U(){l.value=!0;try{const v=await $fetch("/api/skills");_.value=v.data}catch{x.add({title:"Failed to load skills",color:"error"})}finally{l.value=!1}}async function u(v){const e=v.target,b=e.files?.[0];if(b){m.value=!0;try{const y=new FormData;y.append("file",b);const T=await $fetch("/api/skills/import",{method:"POST",body:y});x.add({title:`Imported ${T.data.name}`,description:`${T.data.fileCount} file${T.data.fileCount===1?"":"s"}`,color:"success"}),we(`/skills/${T.data.name}`)}catch(y){const T=y instanceof Error?y.message:"Import failed";x.add({title:"Import failed",description:T,color:"error"})}finally{m.value=!1,e.value=""}}}async function A(v){try{const e=await $fetch(`/api/skills/${v}/toggle`,{method:"POST"}),b=_.value.find(y=>y.name===v);b&&(b.active=e.data.active),x.add({title:`${v} ${e.data.active?"enabled":"disabled"}`,color:"success"})}catch{x.add({title:`Failed to toggle ${v}`,color:"error"})}}async function M(){if(n.value){q.value=!0;try{await $fetch(`/api/skills/${n.value}/delete`,{method:"POST"}),_.value=_.value.filter(v=>v.name!==n.value),x.add({title:`Deleted ${n.value}`,color:"success"}),n.value=""}catch{x.add({title:`Failed to delete ${n.value}`,color:"error"})}finally{q.value=!1}}}async function D(){if(g.value){I.value=!0;try{await $fetch("/api/skills/library/install",{method:"POST",body:{name:g.value,force:!0}}),x.add({title:`Updated ${g.value}`,color:"success"}),g.value="",await U()}catch{x.add({title:`Failed to update ${g.value}`,color:"error"})}finally{I.value=!1}}}return ne(()=>U()),(v,e)=>{const b=ae,y=Y,T=ie,C=Ce,z=Ie,j=J,R=je,L=_e,G=Je,P=re;return c(),V("div",Ke,[r(L,{id:"skills-main",grow:""},{header:a(()=>[r(C,{title:"Skills"},{right:a(()=>[r(b,{modelValue:t(k),"onUpdate:modelValue":e[0]||(e[0]=f=>K(k)?k.value=f:null),icon:"i-lucide-search",placeholder:"Search skills...",size:"sm",class:"w-48"},null,8,["modelValue"]),r(T,{to:"/skills/library"},{default:a(()=>[r(y,{icon:"i-lucide-library",variant:"ghost",color:"neutral",size:"sm"},{default:a(()=>[...e[10]||(e[10]=[p(" Library ",-1)])]),_:1})]),_:1}),r(y,{icon:"i-lucide-upload",variant:"ghost",color:"neutral",size:"sm",loading:t(m),onClick:e[1]||(e[1]=f=>t(s)?.click())},{default:a(()=>[...e[11]||(e[11]=[p(" Import ",-1)])]),_:1},8,["loading"]),d("input",{ref_key:"fileInput",ref:s,type:"file",accept:".zip",class:"hidden",onChange:u},null,544),r(y,{icon:"i-lucide-plus",size:"sm",onClick:e[2]||(e[2]=f=>h.value=!0)},{default:a(()=>[...e[12]||(e[12]=[p(" Create Skill ",-1)])]),_:1})]),_:1})]),body:a(()=>[d("div",Xe,[t(l)?(c(),V("div",Ye,[(c(),V(te,null,le(6,f=>d("div",{key:f,class:"p-4 rounded-lg border border-default bg-elevated/50"},[r(z,{class:"h-4 w-24 mb-2"}),r(z,{class:"h-3 w-full mb-1"}),r(z,{class:"h-3 w-2/3"})])),64))])):t(_).length===0?(c(),V("div",Ze,[r(j,{name:"i-lucide-puzzle",class:"size-12 mb-4"}),e[13]||(e[13]=d("p",{class:"text-lg font-medium"}," No skills found ",-1)),e[14]||(e[14]=d("p",{class:"text-sm mt-1"}," Skills are loaded from ~/.claude/skills/ ",-1))])):t(N).length===0?(c(),V("div",et,' No skills matching "'+B(t(k))+'" ',1)):(c(),V("div",tt,[(c(!0),V(te,null,le(t(N),f=>(c(),w(R,{key:f.name,skill:f,onToggle:A,onDelete:e[3]||(e[3]=o=>n.value=o),onUpdate:e[4]||(e[4]=o=>g.value=o)},null,8,["skill"]))),128))]))])]),_:1}),r(G,{open:t(h),"onUpdate:open":e[5]||(e[5]=f=>h.value=f),onCreated:U},null,8,["open"]),r(P,{open:!!t(n),"onUpdate:open":e[7]||(e[7]=f=>!f&&(n.value=""))},{header:a(()=>[...e[15]||(e[15]=[d("span",{class:"font-semibold"},"Delete Skill",-1)])]),body:a(()=>[d("p",lt,[e[16]||(e[16]=p(" This will permanently delete ",-1)),d("strong",at,B(t(n)),1),e[17]||(e[17]=p(" and all its files. Any modifications you've made will be lost. This cannot be undone. ",-1))])]),footer:a(()=>[d("div",it,[r(y,{variant:"ghost",color:"neutral",disabled:t(q),onClick:e[6]||(e[6]=f=>n.value="")},{default:a(()=>[...e[18]||(e[18]=[p(" Cancel ",-1)])]),_:1},8,["disabled"]),r(y,{color:"error",loading:t(q),onClick:M},{default:a(()=>[...e[19]||(e[19]=[p(" Delete ",-1)])]),_:1},8,["loading"])])]),_:1},8,["open"]),r(P,{open:!!t(g),"onUpdate:open":e[9]||(e[9]=f=>!f&&(g.value=""))},{header:a(()=>[...e[20]||(e[20]=[d("span",{class:"font-semibold"},"Update Skill",-1)])]),body:a(()=>[d("p",st,[e[21]||(e[21]=p(" This will re-download ",-1)),d("strong",nt,B(t(g)),1),e[22]||(e[22]=p(" from the community library, overwriting any local changes you've made to its files. ",-1))])]),footer:a(()=>[d("div",ot,[r(y,{variant:"ghost",color:"neutral",disabled:t(I),onClick:e[8]||(e[8]=f=>g.value="")},{default:a(()=>[...e[23]||(e[23]=[p(" Cancel ",-1)])]),_:1},8,["disabled"]),r(y,{loading:t(I),onClick:D},{default:a(()=>[...e[24]||(e[24]=[p(" Update ",-1)])]),_:1},8,["loading"])])]),_:1},8,["open"])])}}});export{Ct as default};
|
|
1
|
+
import{_ as ae}from"./ByLsRRoQ.js";import{a as K,e as $,S as w,T as c,U as a,ab as d,a9 as S,ae as B,aa as p,al as W,C as t,Y as Q,af as ie,ao as fe,P as me,aM as pe,aw as ve,c as se,am as Z,aN as be,f as ye,q as ne,a4 as X,G as V,X as ee,W as O,_ as Y,ax as ke,a3 as xe,aO as he,k as ze,an as $e,ag as oe,V as r,ai as J,aj as te,ak as le,n as we}from"./D6tVZcRs.js";import{_ as _e,a as Ce}from"./CfCXpVn5.js";import{_ as Ie}from"./OlF0QnKF.js";import{_ as Se}from"./BnMTFF5R.js";import{_ as qe}from"./7rT1DCe2.js";import{_ as Ue}from"./OeVS0Rsb.js";import{u as Te}from"./D12qPplu.js";import{_ as re}from"./DFZkCmLQ.js";import"./ZvG7a1W3.js";import"./C7m9zGMG.js";import"./B6om4MW2.js";import"./DuzpliIL.js";import"./DB2zZev7.js";import"./DWZ9ieYa.js";import"./BNJJSRKh.js";import"./CAWbHTgy.js";import"./DvHS7_h2.js";const Ve={class:"flex items-start justify-between gap-3"},Be={class:"flex-1 min-w-0"},Ne={class:"flex items-center gap-2 mb-1"},Fe={class:"font-medium text-sm truncate"},Ae={class:"text-xs text-muted line-clamp-2"},De={class:"flex items-center gap-2 mt-3"},Me={class:"text-xs text-dimmed ml-auto"},Oe=K({__name:"Card",props:{skill:{}},emits:["toggle","delete","update"],setup(i,{emit:x}){const _=i,l=x,k=$(!1);async function h(){k.value=!0,l("toggle",_.skill.name),k.value=!1}return(m,s)=>{const n=Se,g=qe,q=Q,I=ie;return c(),w(I,{to:`/skills/${i.skill.name}`,class:"block p-4 rounded-lg border border-default bg-elevated/50 hover:bg-elevated transition-colors"},{default:a(()=>[d("div",Ve,[d("div",Be,[d("div",Ne,[d("span",Fe,B(i.skill.name),1),i.skill.core?(c(),w(n,{key:0,variant:"subtle",color:"primary",size:"xs"},{default:a(()=>[...s[3]||(s[3]=[p(" Core ",-1)])]),_:1})):S("",!0),i.skill.active?S("",!0):(c(),w(n,{key:1,variant:"subtle",color:"neutral",size:"xs"},{default:a(()=>[...s[4]||(s[4]=[p(" Disabled ",-1)])]),_:1}))]),d("p",Ae,B(i.skill.description),1)]),i.skill.core?S("",!0):(c(),w(g,{key:0,"model-value":i.skill.active,size:"sm",loading:t(k),"onUpdate:modelValue":h,onClick:s[0]||(s[0]=W(()=>{},["prevent","stop"]))},null,8,["model-value","loading"]))]),d("div",De,[i.skill.version?(c(),w(n,{key:0,variant:"soft",color:"neutral",size:"xs"},{default:a(()=>[p(" v"+B(i.skill.version),1)]),_:1})):S("",!0),i.skill.author?(c(),w(n,{key:1,variant:"soft",color:"neutral",size:"xs"},{default:a(()=>[p(B(i.skill.author),1)]),_:1})):S("",!0),d("span",Me,B(i.skill.fileCount)+" file"+B(i.skill.fileCount!==1?"s":""),1),i.skill.hasUpdate?(c(),w(q,{key:2,icon:"i-lucide-refresh-cw",color:"primary",variant:"soft",size:"xs",onClick:s[1]||(s[1]=W(F=>l("update",i.skill.name),["prevent","stop"]))})):S("",!0),i.skill.core?S("",!0):(c(),w(q,{key:3,icon:"i-lucide-trash",color:"error",variant:"soft",size:"xs",onClick:s[2]||(s[2]=W(F=>l("delete",i.skill.name),["prevent","stop"]))}))])]),_:1},8,["to"])}}}),je=Object.assign(Oe,{__name:"SkillsCard"}),Pe={slots:{root:"relative inline-flex items-center",base:["w-full rounded-md border-0 appearance-none placeholder:text-dimmed focus:outline-none disabled:cursor-not-allowed disabled:opacity-75","transition-colors"],leading:"absolute start-0 flex items-start",leadingIcon:"shrink-0 text-dimmed",leadingAvatar:"shrink-0",leadingAvatarSize:"",trailing:"absolute end-0 flex items-start",trailingIcon:"shrink-0 text-dimmed"},variants:{fieldGroup:{horizontal:{root:"group has-focus-visible:z-[1]",base:"group-not-only:group-first:rounded-e-none group-not-only:group-last:rounded-s-none group-not-last:group-not-first:rounded-none"},vertical:{root:"group has-focus-visible:z-[1]",base:"group-not-only:group-first:rounded-b-none group-not-only:group-last:rounded-t-none group-not-last:group-not-first:rounded-none"}},size:{xs:{base:"px-2 py-1 text-xs gap-1",leading:"ps-2 inset-y-1",trailing:"pe-2 inset-y-1",leadingIcon:"size-4",leadingAvatarSize:"3xs",trailingIcon:"size-4"},sm:{base:"px-2.5 py-1.5 text-xs gap-1.5",leading:"ps-2.5 inset-y-1.5",trailing:"pe-2.5 inset-y-1.5",leadingIcon:"size-4",leadingAvatarSize:"3xs",trailingIcon:"size-4"},md:{base:"px-2.5 py-1.5 text-sm gap-1.5",leading:"ps-2.5 inset-y-1.5",trailing:"pe-2.5 inset-y-1.5",leadingIcon:"size-5",leadingAvatarSize:"2xs",trailingIcon:"size-5"},lg:{base:"px-3 py-2 text-sm gap-2",leading:"ps-3 inset-y-2",trailing:"pe-3 inset-y-2",leadingIcon:"size-5",leadingAvatarSize:"2xs",trailingIcon:"size-5"},xl:{base:"px-3 py-2 text-base gap-2",leading:"ps-3 inset-y-2",trailing:"pe-3 inset-y-2",leadingIcon:"size-6",leadingAvatarSize:"xs",trailingIcon:"size-6"}},variant:{outline:"text-highlighted bg-default ring ring-inset ring-accented",soft:"text-highlighted bg-elevated/50 hover:bg-elevated focus:bg-elevated disabled:bg-elevated/50",subtle:"text-highlighted bg-elevated ring ring-inset ring-accented",ghost:"text-highlighted bg-transparent hover:bg-elevated focus:bg-elevated disabled:bg-transparent dark:disabled:bg-transparent",none:"text-highlighted bg-transparent"},color:{primary:"",secondary:"",success:"",info:"",warning:"",error:"",neutral:""},leading:{true:""},trailing:{true:""},loading:{true:""},highlight:{true:""},type:{file:"file:me-1.5 file:font-medium file:text-muted file:outline-none"},autoresize:{true:{base:"resize-none"}}},compoundVariants:[{color:"primary",variant:["outline","subtle"],class:"focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-primary"},{color:"secondary",variant:["outline","subtle"],class:"focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-secondary"},{color:"success",variant:["outline","subtle"],class:"focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-success"},{color:"info",variant:["outline","subtle"],class:"focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-info"},{color:"warning",variant:["outline","subtle"],class:"focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-warning"},{color:"error",variant:["outline","subtle"],class:"focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-error"},{color:"primary",highlight:!0,class:"ring ring-inset ring-primary"},{color:"secondary",highlight:!0,class:"ring ring-inset ring-secondary"},{color:"success",highlight:!0,class:"ring ring-inset ring-success"},{color:"info",highlight:!0,class:"ring ring-inset ring-info"},{color:"warning",highlight:!0,class:"ring ring-inset ring-warning"},{color:"error",highlight:!0,class:"ring ring-inset ring-error"},{color:"neutral",variant:["outline","subtle"],class:"focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-inverted"},{color:"neutral",highlight:!0,class:"ring ring-inset ring-inverted"},{leading:!0,size:"xs",class:"ps-7"},{leading:!0,size:"sm",class:"ps-8"},{leading:!0,size:"md",class:"ps-9"},{leading:!0,size:"lg",class:"ps-10"},{leading:!0,size:"xl",class:"ps-11"},{trailing:!0,size:"xs",class:"pe-7"},{trailing:!0,size:"sm",class:"pe-8"},{trailing:!0,size:"md",class:"pe-9"},{trailing:!0,size:"lg",class:"pe-10"},{trailing:!0,size:"xl",class:"pe-11"},{loading:!0,leading:!0,class:{leadingIcon:"animate-spin"}},{loading:!0,leading:!1,trailing:!0,class:{trailingIcon:"animate-spin"}}],defaultVariants:{size:"md",color:"primary",variant:"outline"}},Le=["id","value","name","rows","placeholder","disabled","required"],Re=Object.assign({inheritAttrs:!1},{__name:"UTextarea",props:{as:{type:null,required:!1},id:{type:String,required:!1},name:{type:String,required:!1},placeholder:{type:String,required:!1},color:{type:null,required:!1},variant:{type:null,required:!1},size:{type:null,required:!1},required:{type:Boolean,required:!1},autofocus:{type:Boolean,required:!1},autofocusDelay:{type:Number,required:!1,default:0},autoresize:{type:Boolean,required:!1},autoresizeDelay:{type:Number,required:!1,default:0},disabled:{type:Boolean,required:!1},rows:{type:Number,required:!1,default:3},maxrows:{type:Number,required:!1,default:0},highlight:{type:Boolean,required:!1},modelValue:{type:null,required:!1},defaultValue:{type:null,required:!1},modelModifiers:{type:Object,required:!1},class:{type:null,required:!1},ui:{type:null,required:!1},icon:{type:null,required:!1},avatar:{type:Object,required:!1},leading:{type:Boolean,required:!1},leadingIcon:{type:null,required:!1},trailing:{type:Boolean,required:!1},trailingIcon:{type:null,required:!1},loading:{type:Boolean,required:!1},loadingIcon:{type:null,required:!1}},emits:["update:modelValue","blur","change"],setup(i,{expose:x,emit:_}){const l=i,k=_,h=fe(),m=Te(l,"modelValue",k,{defaultValue:l.defaultValue}),s=me(),{emitFormFocus:n,emitFormBlur:g,emitFormInput:q,emitFormChange:I,size:F,color:U,id:u,name:A,highlight:M,disabled:D,ariaAttrs:v}=pe(l,{deferInputValidation:!0}),{isLeading:e,isTrailing:b,leadingIconName:y,trailingIconName:T}=ve(l),C=se(()=>Z({extend:Z(Pe),...s.ui?.textarea||{}})({color:U.value,variant:l.variant,size:F?.value,loading:l.loading,highlight:M.value,autoresize:l.autoresize,leading:e.value||!!l.avatar||!!h.leading,trailing:b.value||!!h.trailing})),z=be("textareaRef");function j(o){l.modelModifiers?.trim&&(o=o?.trim()??null),l.modelModifiers?.number&&(o=he(o)),l.modelModifiers?.nullable&&(o||=null),l.modelModifiers?.optional&&(o||=void 0),m.value=o,q()}function L(o){f(),l.modelModifiers?.lazy||j(o.target.value)}function R(o){const N=o.target.value;l.modelModifiers?.lazy&&j(N),l.modelModifiers?.trim&&(o.target.value=N.trim()),I(),k("change",o)}function G(o){g(),k("blur",o)}function P(){l.autofocus&&z.value?.focus()}function f(){if(l.autoresize&&z.value){z.value.rows=l.rows;const o=z.value.style.overflow;z.value.style.overflow="hidden";const N=window.getComputedStyle(z.value),E=Number.parseInt(N.paddingTop),de=Number.parseInt(N.paddingBottom),ue=E+de,ce=Number.parseInt(N.lineHeight),{scrollHeight:ge}=z.value,H=(ge-ue)/ce;H>l.rows&&(z.value.rows=l.maxrows?Math.min(H,l.maxrows):H),z.value.style.overflow=o}}return ye(m,()=>{ze(f)}),ne(()=>{setTimeout(()=>{P()},l.autofocusDelay),setTimeout(()=>{f()},l.autoresizeDelay)}),x({textareaRef:z}),(o,N)=>(c(),w(t(xe),{as:i.as,"data-slot":"root",class:O(C.value.root({class:[l.ui?.root,l.class]}))},{default:a(()=>[d("textarea",ee({id:t(u),ref_key:"textareaRef",ref:z,value:t(m),name:t(A),rows:i.rows,placeholder:i.placeholder,"data-slot":"base",class:C.value.base({class:l.ui?.base}),disabled:t(D),required:i.required},{...o.$attrs,...t(v)},{onInput:L,onBlur:G,onChange:R,onFocus:N[0]||(N[0]=(...E)=>t(n)&&t(n)(...E))}),null,16,Le),X(o.$slots,"default",{ui:C.value}),t(e)||i.avatar||h.leading?(c(),V("span",{key:0,"data-slot":"leading",class:O(C.value.leading({class:l.ui?.leading}))},[X(o.$slots,"leading",{ui:C.value},()=>[t(e)&&t(y)?(c(),w(Y,{key:0,name:t(y),"data-slot":"leadingIcon",class:O(C.value.leadingIcon({class:l.ui?.leadingIcon}))},null,8,["name","class"])):i.avatar?(c(),w(ke,ee({key:1,size:l.ui?.leadingAvatarSize||C.value.leadingAvatarSize()},i.avatar,{"data-slot":"leadingAvatar",class:C.value.leadingAvatar({class:l.ui?.leadingAvatar})}),null,16,["size","class"])):S("",!0)])],2)):S("",!0),t(b)||h.trailing?(c(),V("span",{key:1,"data-slot":"trailing",class:O(C.value.trailing({class:l.ui?.trailing}))},[X(o.$slots,"trailing",{ui:C.value},()=>[t(T)?(c(),w(Y,{key:0,name:t(T),"data-slot":"trailingIcon",class:O(C.value.trailingIcon({class:l.ui?.trailingIcon}))},null,8,["name","class"])):S("",!0)])],2)):S("",!0)]),_:3},8,["as","class"]))}}),Ge={class:"space-y-4"},Ee={class:"flex gap-2"},He={key:0,class:"text-xs text-muted"},We={class:"flex justify-end gap-2"},Xe=K({__name:"CreateModal",props:{open:{type:Boolean}},emits:["update:open","created"],setup(i,{emit:x}){const _=i,l=x,k=$e(),h=oe(),m=$("blank"),s=$(""),n=$(""),g=$(!1);function q(){m.value="blank",s.value="",n.value="",g.value=!1}function I(){l("update:open",!1),q()}async function F(){if(s.value.trim()){g.value=!0;try{if(m.value==="blank")await $fetch("/api/skills/create",{method:"POST",body:{name:s.value.trim(),description:n.value.trim()||void 0}}),h.add({title:`Skill '${s.value}' created`,color:"success"}),l("created",s.value.trim()),I(),k.push(`/skills/${s.value.trim()}`);else{if(!n.value.trim()){h.add({title:"Description is required for AI generation",color:"warning"}),g.value=!1;return}const U=await $fetch("/api/skills/generate",{method:"POST",body:{name:s.value.trim(),description:n.value.trim()}});h.add({title:`Skill '${s.value}' generated`,description:`Cost: $${U.data.costUsd.toFixed(4)} — created in inactive state for review`,color:"success"}),l("created",s.value.trim()),I(),k.push(`/skills/${s.value.trim()}`)}}catch(U){const u=U instanceof Error?U.message:"Failed to create skill";h.add({title:u,color:"error"})}finally{g.value=!1}}}return(U,u)=>{const A=Q,M=ae,D=Ue,v=Re,e=re;return c(),w(e,{open:_.open,"onUpdate:open":u[4]||(u[4]=b=>l("update:open",b))},{header:a(()=>[...u[5]||(u[5]=[d("span",{class:"font-semibold"},"Create Skill",-1)])]),body:a(()=>[d("div",Ge,[d("div",Ee,[r(A,{variant:t(m)==="blank"?"solid":"outline",color:"neutral",size:"sm",icon:"i-lucide-file-plus",onClick:u[0]||(u[0]=b=>m.value="blank")},{default:a(()=>[...u[6]||(u[6]=[p(" Blank Skill ",-1)])]),_:1},8,["variant"]),r(A,{variant:t(m)==="generate"?"solid":"outline",color:"neutral",size:"sm",icon:"i-lucide-sparkles",onClick:u[1]||(u[1]=b=>m.value="generate")},{default:a(()=>[...u[7]||(u[7]=[p(" AI Generate ",-1)])]),_:1},8,["variant"])]),r(D,{label:"Name"},{default:a(()=>[r(M,{modelValue:t(s),"onUpdate:modelValue":u[2]||(u[2]=b=>J(s)?s.value=b:null),placeholder:"my-skill",disabled:t(g),class:"w-full"},null,8,["modelValue","disabled"])]),_:1}),r(D,{label:"Description",required:t(m)==="generate"},{default:a(()=>[r(v,{modelValue:t(n),"onUpdate:modelValue":u[3]||(u[3]=b=>J(n)?n.value=b:null),placeholder:t(m)==="generate"?"Describe what this skill should do...":"Optional description",rows:3,disabled:t(g),class:"w-full"},null,8,["modelValue","placeholder","disabled"])]),_:1},8,["required"]),t(m)==="generate"?(c(),V("p",He," AI-generated skills are created in an inactive state so you can review them before enabling. ")):S("",!0)])]),footer:a(()=>[d("div",We,[r(A,{variant:"ghost",color:"neutral",disabled:t(g),onClick:I},{default:a(()=>[...u[8]||(u[8]=[p(" Cancel ",-1)])]),_:1},8,["disabled"]),r(A,{loading:t(g),disabled:!t(s).trim(),onClick:F},{default:a(()=>[p(B(t(m)==="generate"?"Generate":"Create"),1)]),_:1},8,["loading","disabled"])])]),_:1},8,["open"])}}}),Ye=Object.assign(Xe,{__name:"SkillsCreateModal"}),Je={class:"flex flex-1 min-w-0"},Ke={class:"p-4"},Qe={key:0,class:"grid gap-4 sm:grid-cols-2 lg:grid-cols-3"},Ze={key:1,class:"flex flex-col items-center justify-center py-16 text-dimmed"},et={key:2,class:"text-center py-12 text-muted text-sm"},tt={key:3,class:"grid gap-4 sm:grid-cols-2 lg:grid-cols-3"},lt={class:"text-sm text-muted"},at={class:"text-default"},it={class:"flex justify-end gap-2"},st={class:"text-sm text-muted"},nt={class:"text-default"},ot={class:"flex justify-end gap-2"},Ct=K({__name:"index",setup(i){const x=oe(),_=$([]),l=$(!0),k=$(""),h=$(!1),m=$(!1),s=$(null),n=$(""),g=$(""),q=$(!1),I=$(!1),F=se(()=>{if(!k.value.trim())return _.value;const v=k.value.toLowerCase();return _.value.filter(e=>e.name.toLowerCase().includes(v)||e.description.toLowerCase().includes(v))});async function U(){l.value=!0;try{const v=await $fetch("/api/skills");_.value=v.data}catch{x.add({title:"Failed to load skills",color:"error"})}finally{l.value=!1}}async function u(v){const e=v.target,b=e.files?.[0];if(b){m.value=!0;try{const y=new FormData;y.append("file",b);const T=await $fetch("/api/skills/import",{method:"POST",body:y});x.add({title:`Imported ${T.data.name}`,description:`${T.data.fileCount} file${T.data.fileCount===1?"":"s"}`,color:"success"}),we(`/skills/${T.data.name}`)}catch(y){const T=y instanceof Error?y.message:"Import failed";x.add({title:"Import failed",description:T,color:"error"})}finally{m.value=!1,e.value=""}}}async function A(v){try{const e=await $fetch(`/api/skills/${v}/toggle`,{method:"POST"}),b=_.value.find(y=>y.name===v);b&&(b.active=e.data.active),x.add({title:`${v} ${e.data.active?"enabled":"disabled"}`,color:"success"})}catch{x.add({title:`Failed to toggle ${v}`,color:"error"})}}async function M(){if(n.value){q.value=!0;try{await $fetch(`/api/skills/${n.value}/delete`,{method:"POST"}),_.value=_.value.filter(v=>v.name!==n.value),x.add({title:`Deleted ${n.value}`,color:"success"}),n.value=""}catch{x.add({title:`Failed to delete ${n.value}`,color:"error"})}finally{q.value=!1}}}async function D(){if(g.value){I.value=!0;try{await $fetch("/api/skills/library/install",{method:"POST",body:{name:g.value,force:!0}}),x.add({title:`Updated ${g.value}`,color:"success"}),g.value="",await U()}catch{x.add({title:`Failed to update ${g.value}`,color:"error"})}finally{I.value=!1}}}return ne(()=>U()),(v,e)=>{const b=ae,y=Q,T=ie,C=Ce,z=Ie,j=Y,L=je,R=_e,G=Ye,P=re;return c(),V("div",Je,[r(R,{id:"skills-main",grow:""},{header:a(()=>[r(C,{title:"Skills"},{right:a(()=>[r(b,{modelValue:t(k),"onUpdate:modelValue":e[0]||(e[0]=f=>J(k)?k.value=f:null),icon:"i-lucide-search",placeholder:"Search skills...",size:"sm",class:"w-48"},null,8,["modelValue"]),r(T,{to:"/skills/library"},{default:a(()=>[r(y,{icon:"i-lucide-library",variant:"ghost",color:"neutral",size:"sm"},{default:a(()=>[...e[10]||(e[10]=[p(" Library ",-1)])]),_:1})]),_:1}),r(y,{icon:"i-lucide-upload",variant:"ghost",color:"neutral",size:"sm",loading:t(m),onClick:e[1]||(e[1]=f=>t(s)?.click())},{default:a(()=>[...e[11]||(e[11]=[p(" Import ",-1)])]),_:1},8,["loading"]),d("input",{ref_key:"fileInput",ref:s,type:"file",accept:".zip",class:"hidden",onChange:u},null,544),r(y,{icon:"i-lucide-plus",size:"sm",onClick:e[2]||(e[2]=f=>h.value=!0)},{default:a(()=>[...e[12]||(e[12]=[p(" Create Skill ",-1)])]),_:1})]),_:1})]),body:a(()=>[d("div",Ke,[t(l)?(c(),V("div",Qe,[(c(),V(te,null,le(6,f=>d("div",{key:f,class:"p-4 rounded-lg border border-default bg-elevated/50"},[r(z,{class:"h-4 w-24 mb-2"}),r(z,{class:"h-3 w-full mb-1"}),r(z,{class:"h-3 w-2/3"})])),64))])):t(_).length===0?(c(),V("div",Ze,[r(j,{name:"i-lucide-puzzle",class:"size-12 mb-4"}),e[13]||(e[13]=d("p",{class:"text-lg font-medium"}," No skills found ",-1)),e[14]||(e[14]=d("p",{class:"text-sm mt-1"}," Skills are loaded from ~/.claude/skills/ ",-1))])):t(F).length===0?(c(),V("div",et,' No skills matching "'+B(t(k))+'" ',1)):(c(),V("div",tt,[(c(!0),V(te,null,le(t(F),f=>(c(),w(L,{key:f.name,skill:f,onToggle:A,onDelete:e[3]||(e[3]=o=>n.value=o),onUpdate:e[4]||(e[4]=o=>g.value=o)},null,8,["skill"]))),128))]))])]),_:1}),r(G,{open:t(h),"onUpdate:open":e[5]||(e[5]=f=>h.value=f),onCreated:U},null,8,["open"]),r(P,{open:!!t(n),"onUpdate:open":e[7]||(e[7]=f=>!f&&(n.value=""))},{header:a(()=>[...e[15]||(e[15]=[d("span",{class:"font-semibold"},"Delete Skill",-1)])]),body:a(()=>[d("p",lt,[e[16]||(e[16]=p(" This will permanently delete ",-1)),d("strong",at,B(t(n)),1),e[17]||(e[17]=p(" and all its files. Any modifications you've made will be lost. This cannot be undone. ",-1))])]),footer:a(()=>[d("div",it,[r(y,{variant:"ghost",color:"neutral",disabled:t(q),onClick:e[6]||(e[6]=f=>n.value="")},{default:a(()=>[...e[18]||(e[18]=[p(" Cancel ",-1)])]),_:1},8,["disabled"]),r(y,{color:"error",loading:t(q),onClick:M},{default:a(()=>[...e[19]||(e[19]=[p(" Delete ",-1)])]),_:1},8,["loading"])])]),_:1},8,["open"]),r(P,{open:!!t(g),"onUpdate:open":e[9]||(e[9]=f=>!f&&(g.value=""))},{header:a(()=>[...e[20]||(e[20]=[d("span",{class:"font-semibold"},"Update Skill",-1)])]),body:a(()=>[d("p",st,[e[21]||(e[21]=p(" This will re-download ",-1)),d("strong",nt,B(t(g)),1),e[22]||(e[22]=p(" from the community library, overwriting any local changes you've made to its files. ",-1))])]),footer:a(()=>[d("div",ot,[r(y,{variant:"ghost",color:"neutral",disabled:t(I),onClick:e[8]||(e[8]=f=>g.value="")},{default:a(()=>[...e[23]||(e[23]=[p(" Cancel ",-1)])]),_:1},8,["disabled"]),r(y,{loading:t(I),onClick:D},{default:a(()=>[...e[24]||(e[24]=[p(" Update ",-1)])]),_:1},8,["loading"])])]),_:1},8,["open"])])}}});export{Ct as default};
|