studiograph 1.3.44-next.29 → 1.3.44-next.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/web/_app/immutable/assets/{2.DYVcVAAZ.css → 2.C8c1wJGZ.css} +1 -1
- package/dist/web/_app/immutable/chunks/{C9_3Ff5B.js → BG6tNivF.js} +1 -1
- package/dist/web/_app/immutable/chunks/{Cj6cIc9R.js → BGci7Sbu.js} +1 -1
- package/dist/web/_app/immutable/chunks/{dcQMpFpV.js → BpSD0SL0.js} +1 -1
- package/dist/web/_app/immutable/chunks/{DwHk5Kfq.js → C5NpCM5M.js} +1 -1
- package/dist/web/_app/immutable/chunks/C9G-Qu8M.js +1 -0
- package/dist/web/_app/immutable/chunks/{CvJTICR-.js → CK0pOLF9.js} +1 -1
- package/dist/web/_app/immutable/chunks/{B3I0LEd4.js → CP8Y20Js.js} +1 -1
- package/dist/web/_app/immutable/chunks/{BibBvlh6.js → DWr57_P_.js} +1 -1
- package/dist/web/_app/immutable/chunks/{DdhleRw3.js → Dfsw-bFx.js} +1 -1
- package/dist/web/_app/immutable/chunks/{djbkUVVd.js → Qo3f5AAd.js} +1 -1
- package/dist/web/_app/immutable/entry/{app.CNpiOfob.js → app.CsMu4053.js} +2 -2
- package/dist/web/_app/immutable/entry/start.C-TWR30X.js +1 -0
- package/dist/web/_app/immutable/nodes/{0.CECcqK4-.js → 0.Bs5Ab2BW.js} +2 -2
- package/dist/web/_app/immutable/nodes/{1.CrFrqmx1.js → 1.B_H0M3Va.js} +1 -1
- package/dist/web/_app/immutable/nodes/{10.DiNtfLSU.js → 10.DYbda0Bv.js} +1 -1
- package/dist/web/_app/immutable/nodes/2.U4PfU2o9.js +84 -0
- package/dist/web/_app/immutable/nodes/{3.g6IPnkIU.js → 3.DDSoszYC.js} +1 -1
- package/dist/web/_app/immutable/nodes/{4.HxLRys44.js → 4.DkMabYNf.js} +4 -4
- package/dist/web/_app/immutable/nodes/{5.ope2LRLB.js → 5.BPe8hpdl.js} +1 -1
- package/dist/web/_app/immutable/nodes/{6.DmtVRg2y.js → 6.BeZxWhy8.js} +1 -1
- package/dist/web/_app/immutable/nodes/{7.rcmG9858.js → 7.DPZbq0vT.js} +1 -1
- package/dist/web/_app/immutable/nodes/{8.CM8OsD3b.js → 8.DrZ1zMLK.js} +1 -1
- package/dist/web/_app/immutable/nodes/{9.CoNP0psI.js → 9.C_b665hb.js} +1 -1
- package/dist/web/_app/version.json +1 -1
- package/dist/web/index.html +6 -6
- package/package.json +1 -1
- package/dist/web/_app/immutable/chunks/3hOCGOkU.js +0 -1
- package/dist/web/_app/immutable/entry/start.CBvPEBDa.js +0 -1
- package/dist/web/_app/immutable/nodes/2.BKG4QbY7.js +0 -84
|
@@ -1 +1 @@
|
|
|
1
|
-
.resize-handle.svelte-tfh9g9{position:absolute;top:0;bottom:0;width:6px;cursor:col-resize;z-index:10}.resize-handle.right.svelte-tfh9g9{right:-3px}.resize-handle.left.svelte-tfh9g9{left:-3px}.resize-handle.svelte-tfh9g9:hover,.resize-handle.active.svelte-tfh9g9{background:var(--color-accent);opacity:.3}.resize-handle.active.svelte-tfh9g9{opacity:.5}.entity-body{padding:16px 24px 24px;display:flex;flex-direction:column;gap:20px;overflow-x:hidden}.type-section.svelte-ak7t5k{display:flex;flex-direction:column;gap:8px}.type-section-label.svelte-ak7t5k{font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.05em;color:var(--color-text-tertiary)}.type-grid.svelte-ak7t5k{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.type-grid.svelte-ak7t5k .type-card{display:flex;flex-direction:column;align-items:flex-start;gap:10px;padding:12px;height:auto;border-radius:8px;text-align:left;color:var(--color-text-secondary);justify-content:flex-start}.type-grid.svelte-ak7t5k .type-card:hover{background:var(--color-bg-hover);border-color:var(--color-border-strong)}.type-grid.svelte-ak7t5k .type-card:hover .type-name{color:var(--color-text-primary)}.type-dot.svelte-ak7t5k{width:8px;height:8px;border-radius:50%}.type-info.svelte-ak7t5k{display:flex;flex-direction:column;gap:2px}.type-name.svelte-ak7t5k{font-size:14px;font-weight:500;color:var(--color-text-secondary)}.type-desc.svelte-ak7t5k{font-size:12px;color:var(--color-text-tertiary);line-height:1.3}.sidebar.svelte-6dohdz{position:relative;flex-shrink:0;display:flex;flex-direction:column;overflow:hidden;background:var(--color-bg);border-right:1px solid var(--color-border)}.sidebar-header.svelte-6dohdz{height:var(--row-height);display:flex;align-items:center;gap:11px;padding:0 12px 0 19px;border-bottom:1px solid var(--color-border);flex-shrink:0}.header-actions.svelte-6dohdz{margin-left:auto;display:flex;align-items:center}.sidebar-header.svelte-6dohdz .home-btn{display:inline-flex;align-items:center;gap:11px;padding:0;min-width:0;text-align:left;border-radius:0;height:auto;background:transparent!important}.sidebar-header.svelte-6dohdz .home-btn:hover .workspace-icon{opacity:.8}.sidebar-header.svelte-6dohdz .home-btn:hover .workspace-name{color:var(--color-text-secondary)}.workspace-icon.svelte-6dohdz{width:22px;height:22px;border-radius:50%;background:var(--color-accent, #e05050);color:#fff;display:flex;align-items:center;justify-content:center;font-weight:600;font-size:11px;flex-shrink:0}.workspace-name.svelte-6dohdz{flex:1;font-size:14px;font-weight:600;color:var(--color-text-primary)}.settings-nav.svelte-6dohdz{display:flex;flex-direction:column;flex:1;padding-top:0}.settings-nav.svelte-6dohdz button[data-slot=tabs-trigger]{display:flex;align-items:center;width:100%;height:var(--row-height);padding:0 12px 0 19px;gap:11px;border:none;background:transparent;cursor:pointer;font-family:inherit;font-size:14px;color:var(--color-text-secondary);transition:color .15s,background .15s}.settings-nav.svelte-6dohdz button[data-slot=tabs-trigger]:hover{background:var(--color-bg-hover);color:var(--color-text-primary)}.settings-nav.svelte-6dohdz button[data-slot=tabs-trigger][data-state=active]{background:var(--color-bg-hover);color:var(--color-text-primary);font-weight:500}.settings-nav.svelte-6dohdz button[data-slot=tabs-trigger] svg{width:14px;height:14px;flex-shrink:0;box-sizing:content-box;padding:0 4px}.filter-bar.svelte-6dohdz{position:relative;display:flex;align-items:center;height:var(--row-height);padding:0 12px 0 52px;border-bottom:1px solid var(--color-border);flex-shrink:0}.filter-icon.svelte-6dohdz{position:absolute;left:22px;top:50%;transform:translateY(-50%);display:flex;align-items:center;justify-content:center;width:16px;color:var(--color-text-tertiary)}.filter-bar.svelte-6dohdz .filter-input{flex:1;background:transparent;border:none;outline:none;padding:0;margin:0;font-size:14px;line-height:1.4;height:auto;border-radius:0}.filter-bar.svelte-6dohdz .filter-clear{width:20px;height:20px;flex-shrink:0}.filter-bar.svelte-6dohdz .sort-toggle{width:28px;height:28px;flex-shrink:0;margin-left:4px}.filter-bar.svelte-6dohdz .sort-toggle.active{color:var(--color-accent, #e05050)}.repo-type-icon.svelte-6dohdz{display:inline-flex;align-items:center;color:var(--color-text-tertiary);margin-right:6px;flex-shrink:0;align-self:center}.tree.svelte-6dohdz{flex:1;overflow-y:auto;padding-top:0}.tree-group.svelte-6dohdz{display:flex;flex-direction:column}.tree-group.svelte-6dohdz+.tree-group:where(.svelte-6dohdz){margin-top:0}.repo-row{display:flex;align-items:baseline;height:var(--row-height);line-height:var(--row-height);width:100%;padding:0 12px 0 20px;border:none;background:transparent;font-family:inherit;text-align:left;border-left:2px solid transparent;border-radius:0;gap:0;justify-content:flex-start}.repo-row:hover,.repo-row.focused{background:var(--color-bg-hover)}.repo-row.repo-active{border-left-color:var(--active-color)}.repo-name.svelte-6dohdz{font-size:14px;color:var(--color-text-secondary)}.repo-row.repo-active .repo-name.svelte-6dohdz,.repo-row.repo-active .repo-type-icon.svelte-6dohdz{font-weight:600;color:var(--color-text-primary)}.tree-row{position:relative;display:flex;align-items:baseline;height:var(--row-height);line-height:var(--row-height);padding-right:40px;color:var(--color-text-secondary);font-size:14px;border:none;background:transparent;font-family:inherit;text-align:left;width:100%;border-left:2px solid transparent;border-radius:0;gap:0;justify-content:flex-start}.tree-row:hover,.tree-row.focused{background:var(--color-bg-hover)}.tree-row.selected{background:var(--color-bg-selected);border-left-color:var(--active-color);color:var(--color-text-primary);font-weight:600}.row-chevron.svelte-6dohdz{display:inline-flex;align-items:center;justify-content:center;align-self:center;width:16px;height:16px;flex-shrink:0;margin-right:14px;color:var(--color-text-tertiary);transition:transform .15s}.row-chevron.open.svelte-6dohdz{transform:rotate(90deg)}.row-label.svelte-6dohdz{flex:1;overflow:hidden;white-space:nowrap;mask-image:linear-gradient(to right,black calc(100% - 16px),transparent 100%);-webkit-mask-image:linear-gradient(to right,black calc(100% - 16px),transparent 100%)}.item-count.svelte-6dohdz{font-size:12px;font-weight:400;color:var(--color-text-tertiary);margin-left:8px;flex-shrink:0;opacity:0;transition:opacity .15s}.tree-row:hover .item-count.svelte-6dohdz,.repo-row-wrapper.svelte-6dohdz:hover .item-count:where(.svelte-6dohdz),.repo-row-wrapper.svelte-6dohdz:has(.repo-actions-btn.menu-open) .item-count:where(.svelte-6dohdz),.type-header-wrapper.svelte-6dohdz:hover .item-count:where(.svelte-6dohdz),.type-header-wrapper.svelte-6dohdz:has(.type-actions-btn.menu-open) .item-count:where(.svelte-6dohdz),.entity-row-wrapper.svelte-6dohdz:hover .item-count:where(.svelte-6dohdz),.entity-row-wrapper.svelte-6dohdz:has(.entity-actions-btn.menu-open) .item-count:where(.svelte-6dohdz){opacity:1}.indent-group.svelte-6dohdz{position:relative}.indent-group.svelte-6dohdz:before{content:"";position:absolute;left:var(--guide-left);top:0;bottom:0;width:1px;background:var(--color-border);pointer-events:none}.loading-row.svelte-6dohdz{height:var(--row-height);display:flex;align-items:center;font-size:14px;color:var(--color-text-tertiary)}.type-header-row{color:var(--color-text-secondary);border-left:2px solid transparent}.type-header-row.type-active{color:var(--color-text-primary);font-weight:600}.type-header-row .row-label.svelte-6dohdz{flex:none;mask-image:none;-webkit-mask-image:none}.entity-type-dot.svelte-6dohdz{width:6px;height:6px;border-radius:3px;flex-shrink:0;margin-right:2px}.new-entity-row{color:var(--color-text-tertiary);align-items:center}.new-entity-row:hover{color:var(--color-text-secondary)}.entity-row-wrapper.svelte-6dohdz{position:relative;display:flex;align-items:center}.entity-row-wrapper.svelte-6dohdz .tree-row{flex:1;min-width:0}.entity-row-wrapper.svelte-6dohdz .entity-actions-btn{display:none;width:28px;height:28px;position:absolute;right:12px;flex-shrink:0;padding:0;border:none;background:none;cursor:pointer;color:var(--color-text-tertiary);border-radius:4px;align-items:center;justify-content:center}.entity-row-wrapper.svelte-6dohdz .entity-actions-btn:hover{background:var(--color-bg-hover);color:var(--color-text-primary)}.entity-row-wrapper.svelte-6dohdz:hover .tree-row,.entity-row-wrapper.svelte-6dohdz:has(.entity-actions-btn.menu-open) .tree-row{background:var(--color-bg-hover)}.entity-row-wrapper.svelte-6dohdz:hover .entity-actions-btn,.entity-row-wrapper.svelte-6dohdz .entity-actions-btn.menu-open{display:inline-flex}.entity-type-dot.svelte-6dohdz{width:6px;height:6px;border-radius:50%;flex-shrink:0;margin-right:19px;align-self:center}.recent-time.svelte-6dohdz{font-size:12px;color:var(--color-text-tertiary);position:absolute;right:26px;top:50%;transform:translate(50%,-50%);white-space:nowrap}.entity-row-wrapper.svelte-6dohdz:hover .recent-time:where(.svelte-6dohdz){display:none}.presence-stack.svelte-6dohdz{display:flex;align-items:center;gap:-4px;margin-left:auto;flex-shrink:0;align-self:center}.presence-avatar.svelte-6dohdz{width:18px;height:18px;border-radius:50%;font-size:10px;font-weight:600;color:#fff;background:var(--color-accent);display:flex;align-items:center;justify-content:center;margin-left:-3px;border:1px solid var(--color-bg);box-sizing:border-box;flex-shrink:0;align-self:center}.presence-stack.svelte-6dohdz .presence-avatar:where(.svelte-6dohdz):first-child{margin-left:4px}.repo-row .presence-stack.svelte-6dohdz{margin-right:28px}.presence-avatar.svelte-6dohdz:nth-child(1){z-index:3}.presence-avatar.svelte-6dohdz:nth-child(2){z-index:2}.presence-avatar.svelte-6dohdz:nth-child(3){z-index:1}.filter-match.svelte-6dohdz{background:var(--color-accent, #e05050);color:#fff;border-radius:2px;padding:0}.no-results.svelte-6dohdz{padding:24px 16px;font-size:14px;color:var(--color-text-tertiary);text-align:center}.repo-row .repo-rename-input{flex:1;min-width:0;height:100%;padding:0 6px;margin:0;border:1px solid var(--color-accent, #e05050);border-radius:3px;font-size:14px;font-weight:600}.repo-row-wrapper.svelte-6dohdz{position:relative;display:flex;align-items:center}.repo-row-wrapper.drop-target.svelte-6dohdz{outline:2px solid var(--color-accent, #e05050);outline-offset:-2px;border-radius:6px;background:#e0505014}.import-modal{max-width:480px}.import-modal .dialog-header{flex-direction:column;align-items:flex-start;gap:4px}.import-modal-body.svelte-6dohdz{padding:16px 24px 8px}.import-modal .dialog-footer{border-top:none}.import-file-list.svelte-6dohdz{display:flex;flex-direction:column;max-height:240px;overflow-y:auto}.import-file-row.svelte-6dohdz{display:flex;align-items:center;gap:10px;padding:10px 12px;border-bottom:1px solid var(--color-border)}.import-file-icon.svelte-6dohdz{flex-shrink:0;color:var(--color-text-tertiary)}.import-file-info.svelte-6dohdz{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}.import-file-name.svelte-6dohdz{font-size:14px;color:var(--color-text-primary);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.import-file-size.svelte-6dohdz{font-size:12px;color:var(--color-text-tertiary)}.import-file-remove.svelte-6dohdz{flex-shrink:0;background:none;border:none;color:var(--color-text-tertiary);cursor:pointer;padding:4px;border-radius:4px;display:flex;align-items:center;justify-content:center}.import-file-remove.svelte-6dohdz:hover{color:var(--color-text-primary);background:var(--color-bg-hover)}.import-drop-zone.svelte-6dohdz{border:1px solid var(--color-border, #333);border-radius:0;padding:40px 16px;text-align:center;color:var(--color-text-tertiary);font-size:15px;min-height:180px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;transition:background .15s}.import-drop-zone-compact.svelte-6dohdz{min-height:0;padding:14px 16px;border-top:none}.import-hint.svelte-6dohdz{font-size:13px;color:var(--color-text-tertiary);margin:0}.file-picker-link.svelte-6dohdz{background:none;border:none;color:var(--color-accent, #e05050);cursor:pointer;text-decoration:underline;font-size:15px;padding:0}.file-picker-link-sm.svelte-6dohdz{font-size:13px}.repo-row-wrapper.svelte-6dohdz .repo-row{flex:1;min-width:0}.repo-row-wrapper.svelte-6dohdz .repo-actions-btn{display:none;width:28px;height:28px;position:absolute;right:12px;flex-shrink:0;padding:0;border:none;background:none;cursor:pointer;color:var(--color-text-tertiary);border-radius:4px;align-items:center;justify-content:center}.repo-row-wrapper.svelte-6dohdz .repo-actions-btn:hover{background:var(--color-bg-hover);color:var(--color-text-primary)}.repo-row-wrapper.svelte-6dohdz:hover .repo-row,.repo-row-wrapper.svelte-6dohdz:has(.repo-actions-btn.menu-open) .repo-row{background:var(--color-bg-hover)}.repo-row-wrapper.svelte-6dohdz:hover .repo-actions-btn,.repo-row-wrapper.svelte-6dohdz .repo-actions-btn.menu-open{display:inline-flex}.type-header-wrapper.svelte-6dohdz{position:relative;display:flex;align-items:center}.type-header-wrapper.svelte-6dohdz .type-header-row{flex:1;min-width:0}.type-header-wrapper.svelte-6dohdz .type-actions-btn{display:none;width:24px;height:24px;position:absolute;right:12px;flex-shrink:0;padding:0;border:none;background:none;cursor:pointer;color:var(--color-text-tertiary);border-radius:4px;align-items:center;justify-content:center}.type-header-wrapper.svelte-6dohdz .type-actions-btn:hover{background:var(--color-bg-hover);color:var(--color-text-primary)}.type-header-wrapper.svelte-6dohdz:hover .type-header-row,.type-header-wrapper.svelte-6dohdz:has(.type-actions-btn.menu-open) .type-header-row{background:var(--color-bg-hover)}.type-header-wrapper.svelte-6dohdz:hover .type-actions-btn,.type-header-wrapper.svelte-6dohdz .type-actions-btn.menu-open{display:inline-flex}.repo-actions-menu{min-width:120px;padding:4px;border-radius:6px;background:var(--color-bg-elevated);border:1px solid var(--color-border);box-shadow:0 4px 12px #00000026;z-index:1000}.repo-menu-item{display:flex;align-items:center;gap:8px;padding:6px 8px;border-radius:4px;cursor:pointer;font-size:13px;color:var(--color-text-primary)}.repo-menu-item:hover{background:var(--color-bg-hover)}.repo-menu-item-danger{color:var(--color-error, #e55)}.new-collection-btn,.new-collection-btn .repo-name.svelte-6dohdz,.new-collection-btn .row-chevron.svelte-6dohdz{color:var(--color-text-tertiary)}.new-collection-btn:hover,.new-collection-btn:hover .repo-name.svelte-6dohdz{color:var(--color-text-secondary)}.new-collection-row.svelte-6dohdz{display:flex;align-items:center;height:var(--row-height);padding:0 12px 0 20px;border-left:2px solid transparent}.new-collection-row.svelte-6dohdz .new-collection-input{flex:1;height:100%;padding:0 0 0 30px;margin-top:-1px;border:none;background:transparent;font-size:14px;border-radius:0}.new-collection-row.svelte-6dohdz .new-collection-clear{width:20px;height:20px;flex-shrink:0;margin-right:4px}.new-collection-row.svelte-6dohdz .private-toggle{width:20px;height:20px;flex-shrink:0;margin-left:auto;margin-right:4px;color:var(--color-text-secondary)}.new-collection-row.svelte-6dohdz .private-toggle.active{color:var(--color-accent, #e05050)}@keyframes svelte-6dohdz-shake{0%,to{transform:translate(0)}20%{transform:translate(-4px)}40%{transform:translate(4px)}60%{transform:translate(-3px)}80%{transform:translate(2px)}}.new-collection-row.svelte-6dohdz .new-collection-input.shake{animation:svelte-6dohdz-shake .3s ease-in-out}.sidebar-footer.svelte-6dohdz{display:flex;align-items:center;height:var(--row-height);padding:0 12px 0 19px;border-top:1px solid var(--color-border);flex-shrink:0;gap:8px}.user-email.svelte-6dohdz{flex:1;font-size:13px;color:var(--color-text-tertiary);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sidebar-footer.svelte-6dohdz .footer-icon-btn{width:28px;height:28px}.transfer-list.svelte-6dohdz{display:flex;flex-direction:column;gap:2px}.transfer-list-item.svelte-6dohdz{display:flex;align-items:center;width:100%;padding:8px 12px;border:none;border-radius:6px;background:none;color:var(--color-text);font-size:13px;cursor:pointer;text-align:left}.transfer-list-item.svelte-6dohdz:hover{background:var(--color-bg-hover)}.chat-panel.svelte-1xwj6s7{position:relative;flex-shrink:0;display:flex;flex-direction:column;background:var(--color-bg);border-left:1px solid var(--color-border)}.chat-panel.chat-full.svelte-1xwj6s7{width:100%;min-width:0;flex:1;border-left:none}.chat-full.svelte-1xwj6s7 .chat-messages:where(.svelte-1xwj6s7){padding-left:calc((100% - 720px)/2);padding-right:calc((100% - 720px)/2)}.chat-full.svelte-1xwj6s7 .chat-input-area:where(.svelte-1xwj6s7){padding-left:calc((100% - 720px)/2);padding-right:calc((100% - 720px)/2)}.chat-header.svelte-1xwj6s7{height:var(--row-height);display:flex;align-items:center;justify-content:space-between;padding:0 16px;border-bottom:1px solid var(--color-border);position:relative;flex-shrink:0}.chat-header-left.svelte-1xwj6s7,.chat-header-right.svelte-1xwj6s7{display:flex;align-items:center;gap:2px}.history-active{color:var(--color-accent, #e05050)!important}.history-active:not(:hover){background:transparent!important}.session-dropdown.svelte-1xwj6s7{position:absolute;top:100%;left:0;right:0;z-index:10;box-shadow:0 4px 12px #0000001f}.session-list.svelte-1xwj6s7{max-height:240px;overflow-y:auto;background:var(--color-bg);border-bottom:1px solid var(--color-border)}.session-row.svelte-1xwj6s7{position:relative;display:flex;align-items:center}.session-row.svelte-1xwj6s7 .session-item{display:flex;align-items:center;justify-content:flex-start;flex:1;min-width:0;padding:0 32px 0 16px;height:var(--row-height);line-height:var(--row-height);font-size:14px;color:var(--color-text-secondary);text-align:left;border-radius:0}.session-row.svelte-1xwj6s7:hover .session-item{background:var(--color-bg-hover)}.session-row.svelte-1xwj6s7 .session-item.active{background:var(--color-bg-hover);color:var(--color-text-primary);font-weight:500}.session-row.svelte-1xwj6s7 .session-delete-btn{display:none;width:20px;height:20px;position:absolute;right:6px;flex-shrink:0;padding:0}.session-row.svelte-1xwj6s7 .session-delete-btn:hover{color:var(--color-error, #e55)}.session-row.svelte-1xwj6s7:hover .session-delete-btn{display:flex}.session-title.svelte-1xwj6s7{flex:1;overflow:hidden;white-space:nowrap;min-width:0;mask-image:linear-gradient(to right,black calc(100% - 24px),transparent 100%);-webkit-mask-image:linear-gradient(to right,black calc(100% - 24px),transparent 100%)}.chat-messages.svelte-1xwj6s7{flex:1;overflow-y:auto;padding:24px 16px;display:flex;flex-direction:column;gap:32px}.empty-state.svelte-1xwj6s7{flex:1;display:flex;align-items:center;justify-content:center;color:var(--color-text-tertiary);font-size:14px}.seed-prompts.svelte-1xwj6s7{display:flex;flex-direction:column;gap:8px;width:100%}.seed-prompts.svelte-1xwj6s7 .seed-prompt{font-size:14px;line-height:20px;padding:9px 13px;min-height:var(--row-height);height:auto;border-radius:8px;color:var(--color-text-secondary);text-align:left;white-space:normal;justify-content:flex-start}.seed-prompts.svelte-1xwj6s7 .seed-prompt:hover{background:var(--color-bg-hover);color:var(--color-text-primary)}.message-group.svelte-1xwj6s7{display:flex;flex-direction:column;gap:16px}.user-bubble.svelte-1xwj6s7{background:var(--color-bg-surface);border-radius:8px;padding:12px 14px;font-size:14px;line-height:22px;color:var(--color-text-primary)}.agent-content.svelte-1xwj6s7{display:flex;flex-direction:column;gap:14px;position:relative}.msg-actions.svelte-1xwj6s7{display:flex;gap:2px;align-self:flex-start}.copy-btn.svelte-1xwj6s7{display:flex;align-items:center;justify-content:center;background:none;border:none;color:var(--color-text-tertiary);cursor:pointer;padding:4px;border-radius:4px;align-self:flex-start}.copy-btn.svelte-1xwj6s7:hover{color:var(--color-text-primary);background:var(--color-bg-hover)}.tool-calls.svelte-1xwj6s7{display:flex;flex-direction:column;gap:4px}.tool-call.svelte-1xwj6s7{font-family:var(--font-mono);font-size:12px;color:var(--color-accent)}.agent-text.svelte-1xwj6s7{font-size:14px;line-height:22px;color:var(--color-text-primary)}.prose.svelte-1xwj6s7 h1{font-size:18px;font-weight:600;color:var(--color-text-primary);margin:24px 0 12px}.prose.svelte-1xwj6s7 h2{font-size:16px;font-weight:600;color:var(--color-text-primary);margin:22px 0 10px}.prose.svelte-1xwj6s7 h3{font-size:15px;font-weight:600;color:var(--color-text-primary);margin:20px 0 8px}.prose.svelte-1xwj6s7 p{margin:0 0 14px}.prose.svelte-1xwj6s7 p:last-child{margin-bottom:0}.prose.svelte-1xwj6s7 strong{font-weight:600}.prose.svelte-1xwj6s7 ul,.prose.svelte-1xwj6s7 ol{padding-left:20px;margin:0 0 14px;color:var(--color-text-primary)}.prose.svelte-1xwj6s7 ul{list-style-type:disc}.prose.svelte-1xwj6s7 ol{list-style-type:decimal}.prose.svelte-1xwj6s7 li{margin-bottom:6px}.prose.svelte-1xwj6s7 table{width:100%;border-collapse:collapse;font-size:13px;margin:16px 0}.prose.svelte-1xwj6s7 th,.prose.svelte-1xwj6s7 td{border:1px solid var(--color-border);padding:4px 8px;text-align:left;vertical-align:top}.prose.svelte-1xwj6s7 th{font-weight:600}.prose.svelte-1xwj6s7 pre{background:var(--color-bg-surface);border-radius:6px;padding:10px 12px;overflow-x:auto;margin:16px 0;font-family:var(--font-mono);font-size:13px;line-height:18px}.prose.svelte-1xwj6s7 code{font-family:var(--font-mono);font-size:13px;background:var(--color-bg-surface);padding:1px 4px;border-radius:3px}.prose.svelte-1xwj6s7 pre code{background:none;padding:0}.prose.svelte-1xwj6s7 a{color:var(--color-link)}.prose.svelte-1xwj6s7 blockquote{border-left:3px solid var(--color-accent);padding-left:12px;margin:16px 0;color:var(--color-text-secondary)}.prose.svelte-1xwj6s7 hr{border:none;border-top:1px solid var(--color-border);margin:24px 0}.streaming-dot.svelte-1xwj6s7{display:inline-block;width:8px;height:8px;background:var(--color-accent);border-radius:4px;animation:svelte-1xwj6s7-pulse 1s ease-in-out infinite}@keyframes svelte-1xwj6s7-pulse{0%,to{opacity:.3}50%{opacity:1}}.context-chip.svelte-1xwj6s7{font-size:12px;color:var(--color-text-tertiary);padding:0 2px 4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chat-input-area.svelte-1xwj6s7{padding:12px 16px 16px}.text-input.svelte-1xwj6s7{display:flex;align-items:flex-end;min-height:var(--row-height);max-height:140px;padding:0 0 0 13px;background:transparent;border:1px solid var(--color-border);border-radius:8px;transition:border-color .15s}.text-input.svelte-1xwj6s7:focus-within{border-color:var(--color-accent)}.send-btn{color:var(--color-text-tertiary);margin:6px;flex-shrink:0;pointer-events:none}.send-btn.send-active{pointer-events:auto;color:#fff;background:var(--color-accent);border-radius:6px}.stop-btn{color:#fff;background:var(--color-accent);border-radius:6px}.input-field.svelte-1xwj6s7{flex:1;background:transparent;border:none;outline:none;font-family:inherit;font-size:14px;line-height:20px;color:var(--color-text-primary);resize:none;overflow-y:auto;padding:9px 0;max-height:120px;field-sizing:content}.input-field.svelte-1xwj6s7::placeholder{color:var(--color-text-tertiary)}.input-field.svelte-1xwj6s7:disabled{opacity:.5}.search-header.svelte-1xems06{display:flex;align-items:center;height:52px;padding:0 16px;gap:10px;border-bottom:1px solid var(--color-border)}.search-header.svelte-1xems06 svg{color:var(--color-text-tertiary);flex-shrink:0}.search-header.svelte-1xems06 .search-input{flex:1;font-size:16px;line-height:20px;border:none;background:transparent;box-shadow:none;padding:0;height:auto}.search-header.svelte-1xems06 .search-input:focus{box-shadow:none;border:none}.esc-badge.svelte-1xems06{font-family:var(--font-sans);font-size:12px;line-height:1;padding:3px 6px;border-radius:4px;background:var(--color-bg-surface);border:1px solid var(--color-border);color:var(--color-text-tertiary)}.results-list.svelte-1xems06{flex:1;overflow-y:auto;min-height:0}.empty-results.svelte-1xems06{padding:24px 16px;text-align:center;font-size:14px;color:var(--color-text-tertiary)}.results-list.svelte-1xems06 .result-row{display:flex;align-items:flex-start;padding:10px 16px;width:100%;text-align:left;border-radius:0;height:auto;justify-content:flex-start}.results-list.svelte-1xems06 .result-row:hover,.results-list.svelte-1xems06 .result-row.selected{background:var(--color-bg-hover)}.result-body.svelte-1xems06{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}.result-title-row.svelte-1xems06{display:flex;align-items:center;gap:8px}.result-title.svelte-1xems06{font-size:14px;font-weight:500;color:var(--color-text-primary);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.entity-tag.svelte-1xems06{flex-shrink:0;font-size:11px;font-weight:500;letter-spacing:.04em;text-transform:uppercase;padding:1px 6px;border-radius:3px;background:var(--color-badge-bg);color:var(--color-badge-text)}.result-meta.svelte-1xems06{font-size:13px;color:var(--color-text-tertiary)}.search-footer.svelte-1xems06{display:flex;align-items:center;height:39px;padding:0 16px;gap:16px;border-top:1px solid var(--color-border)}.shortcut-group.svelte-1xems06{display:flex;align-items:center;gap:4px}.shortcut-key.svelte-1xems06{display:inline-flex;align-items:center;justify-content:center;min-width:20px;height:20px;padding:0 4px;border-radius:4px;background:var(--color-bg-surface);border:1px solid var(--color-border);color:var(--color-text-tertiary)}.shortcut-label.svelte-1xems06{font-size:12px;color:var(--color-text-tertiary);margin-left:2px}.app-frame.svelte-vr1z90{width:100vw;height:100vh;display:flex;flex-direction:column;overflow:hidden;background:var(--color-bg)}.app-body.svelte-vr1z90{flex:1;display:flex;min-height:0;overflow:hidden}.main-content.svelte-vr1z90{flex:1;display:flex;flex-direction:column;min-width:0;min-height:0;overflow:hidden}#sg-chrome-footer{flex-shrink:0}
|
|
1
|
+
.resize-handle.svelte-tfh9g9{position:absolute;top:0;bottom:0;width:6px;cursor:col-resize;z-index:10}.resize-handle.right.svelte-tfh9g9{right:-3px}.resize-handle.left.svelte-tfh9g9{left:-3px}.resize-handle.svelte-tfh9g9:hover,.resize-handle.active.svelte-tfh9g9{background:var(--color-accent);opacity:.3}.resize-handle.active.svelte-tfh9g9{opacity:.5}.entity-body{padding:16px 24px 24px;display:flex;flex-direction:column;gap:20px;overflow-x:hidden}.type-section.svelte-ak7t5k{display:flex;flex-direction:column;gap:8px}.type-section-label.svelte-ak7t5k{font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.05em;color:var(--color-text-tertiary)}.type-grid.svelte-ak7t5k{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.type-grid.svelte-ak7t5k .type-card{display:flex;flex-direction:column;align-items:flex-start;gap:10px;padding:12px;height:auto;border-radius:8px;text-align:left;color:var(--color-text-secondary);justify-content:flex-start}.type-grid.svelte-ak7t5k .type-card:hover{background:var(--color-bg-hover);border-color:var(--color-border-strong)}.type-grid.svelte-ak7t5k .type-card:hover .type-name{color:var(--color-text-primary)}.type-dot.svelte-ak7t5k{width:8px;height:8px;border-radius:50%}.type-info.svelte-ak7t5k{display:flex;flex-direction:column;gap:2px}.type-name.svelte-ak7t5k{font-size:14px;font-weight:500;color:var(--color-text-secondary)}.type-desc.svelte-ak7t5k{font-size:12px;color:var(--color-text-tertiary);line-height:1.3}.sidebar.svelte-6dohdz{position:relative;flex-shrink:0;display:flex;flex-direction:column;overflow:hidden;background:var(--color-bg);border-right:1px solid var(--color-border)}.sidebar-header.svelte-6dohdz{height:var(--row-height);display:flex;align-items:center;gap:11px;padding:0 12px 0 19px;border-bottom:1px solid var(--color-border);flex-shrink:0}.header-actions.svelte-6dohdz{margin-left:auto;display:flex;align-items:center}.sidebar-header.svelte-6dohdz .home-btn{display:inline-flex;align-items:center;gap:11px;padding:0;min-width:0;text-align:left;border-radius:0;height:auto;background:transparent!important}.sidebar-header.svelte-6dohdz .home-btn:hover .workspace-icon{opacity:.8}.sidebar-header.svelte-6dohdz .home-btn:hover .workspace-name{color:var(--color-text-secondary)}.workspace-icon.svelte-6dohdz{width:22px;height:22px;border-radius:50%;background:var(--color-accent, #e05050);color:#fff;display:flex;align-items:center;justify-content:center;font-weight:600;font-size:11px;flex-shrink:0}.workspace-name.svelte-6dohdz{flex:1;font-size:14px;font-weight:600;color:var(--color-text-primary)}.settings-nav.svelte-6dohdz{display:flex;flex-direction:column;flex:1;padding-top:0}.settings-nav.svelte-6dohdz button[data-slot=tabs-trigger]{display:flex;align-items:center;width:100%;height:var(--row-height);padding:0 12px 0 19px;gap:11px;border:none;background:transparent;cursor:pointer;font-family:inherit;font-size:14px;color:var(--color-text-secondary);transition:color .15s,background .15s}.settings-nav.svelte-6dohdz button[data-slot=tabs-trigger]:hover{background:var(--color-bg-hover);color:var(--color-text-primary)}.settings-nav.svelte-6dohdz button[data-slot=tabs-trigger][data-state=active]{background:var(--color-bg-hover);color:var(--color-text-primary);font-weight:500}.settings-nav.svelte-6dohdz button[data-slot=tabs-trigger] svg{width:14px;height:14px;flex-shrink:0;box-sizing:content-box;padding:0 4px}.filter-bar.svelte-6dohdz{position:relative;display:flex;align-items:center;height:var(--row-height);padding:0 12px 0 52px;border-bottom:1px solid var(--color-border);flex-shrink:0}.filter-icon.svelte-6dohdz{position:absolute;left:22px;top:50%;transform:translateY(-50%);display:flex;align-items:center;justify-content:center;width:16px;color:var(--color-text-tertiary)}.filter-bar.svelte-6dohdz .filter-input{flex:1;background:transparent;border:none;outline:none;padding:0;margin:0;font-size:14px;line-height:1.4;height:auto;border-radius:0}.filter-bar.svelte-6dohdz .filter-clear{width:20px;height:20px;flex-shrink:0}.filter-bar.svelte-6dohdz .sort-toggle{width:28px;height:28px;flex-shrink:0;margin-left:4px}.filter-bar.svelte-6dohdz .sort-toggle.active{color:var(--color-accent, #e05050)}.repo-type-icon.svelte-6dohdz{display:inline-flex;align-items:center;color:var(--color-text-tertiary);margin-right:6px;flex-shrink:0;align-self:center}.tree.svelte-6dohdz{flex:1;overflow-y:auto;padding-top:0}.tree-group.svelte-6dohdz{display:flex;flex-direction:column}.tree-group.svelte-6dohdz+.tree-group:where(.svelte-6dohdz){margin-top:0}.repo-row{display:flex;align-items:baseline;height:var(--row-height);line-height:var(--row-height);width:100%;padding:0 12px 0 20px;border:none;background:transparent;font-family:inherit;text-align:left;border-left:2px solid transparent;border-radius:0;gap:0;justify-content:flex-start}.repo-row:hover,.repo-row.focused{background:var(--color-bg-hover)}.repo-row.repo-active{border-left-color:var(--active-color)}.repo-name.svelte-6dohdz{font-size:14px;color:var(--color-text-secondary)}.repo-row.repo-active .repo-name.svelte-6dohdz,.repo-row.repo-active .repo-type-icon.svelte-6dohdz{font-weight:600;color:var(--color-text-primary)}.tree-row{position:relative;display:flex;align-items:baseline;height:var(--row-height);line-height:var(--row-height);padding-right:40px;color:var(--color-text-secondary);font-size:14px;border:none;background:transparent;font-family:inherit;text-align:left;width:100%;border-left:2px solid transparent;border-radius:0;gap:0;justify-content:flex-start}.tree-row:hover,.tree-row.focused{background:var(--color-bg-hover)}.tree-row.selected{background:var(--color-bg-selected);border-left-color:var(--active-color);color:var(--color-text-primary);font-weight:600}.row-chevron.svelte-6dohdz{display:inline-flex;align-items:center;justify-content:center;align-self:center;width:16px;height:16px;flex-shrink:0;margin-right:14px;color:var(--color-text-tertiary);transition:transform .15s}.row-chevron.open.svelte-6dohdz{transform:rotate(90deg)}.row-label.svelte-6dohdz{flex:1;overflow:hidden;white-space:nowrap;mask-image:linear-gradient(to right,black calc(100% - 16px),transparent 100%);-webkit-mask-image:linear-gradient(to right,black calc(100% - 16px),transparent 100%)}.item-count.svelte-6dohdz{font-size:12px;font-weight:400;color:var(--color-text-tertiary);margin-left:8px;flex-shrink:0;opacity:0;transition:opacity .15s}.tree-row:hover .item-count.svelte-6dohdz,.repo-row-wrapper.svelte-6dohdz:hover .item-count:where(.svelte-6dohdz),.repo-row-wrapper.svelte-6dohdz:has(.repo-actions-btn.menu-open) .item-count:where(.svelte-6dohdz),.type-header-wrapper.svelte-6dohdz:hover .item-count:where(.svelte-6dohdz),.type-header-wrapper.svelte-6dohdz:has(.type-actions-btn.menu-open) .item-count:where(.svelte-6dohdz),.entity-row-wrapper.svelte-6dohdz:hover .item-count:where(.svelte-6dohdz),.entity-row-wrapper.svelte-6dohdz:has(.entity-actions-btn.menu-open) .item-count:where(.svelte-6dohdz){opacity:1}.indent-group.svelte-6dohdz{position:relative}.indent-group.svelte-6dohdz:before{content:"";position:absolute;left:var(--guide-left);top:0;bottom:0;width:1px;background:var(--color-border);pointer-events:none}.loading-row.svelte-6dohdz{height:var(--row-height);display:flex;align-items:center;font-size:14px;color:var(--color-text-tertiary)}.type-header-row{color:var(--color-text-secondary);border-left:2px solid transparent}.type-header-row.type-active{color:var(--color-text-primary);font-weight:600}.type-header-row .row-label.svelte-6dohdz{flex:none;mask-image:none;-webkit-mask-image:none}.entity-type-dot.svelte-6dohdz{width:6px;height:6px;border-radius:3px;flex-shrink:0;margin-right:2px}.new-entity-row{color:var(--color-text-tertiary);align-items:center}.new-entity-row:hover{color:var(--color-text-secondary)}.entity-row-wrapper.svelte-6dohdz{position:relative;display:flex;align-items:center}.entity-row-wrapper.svelte-6dohdz .tree-row{flex:1;min-width:0}.entity-row-wrapper.svelte-6dohdz .entity-actions-btn{display:none;width:28px;height:28px;position:absolute;right:12px;flex-shrink:0;padding:0;border:none;background:none;cursor:pointer;color:var(--color-text-tertiary);border-radius:4px;align-items:center;justify-content:center}.entity-row-wrapper.svelte-6dohdz .entity-actions-btn:hover{background:var(--color-bg-hover);color:var(--color-text-primary)}.entity-row-wrapper.svelte-6dohdz:hover .tree-row,.entity-row-wrapper.svelte-6dohdz:has(.entity-actions-btn.menu-open) .tree-row{background:var(--color-bg-hover)}.entity-row-wrapper.svelte-6dohdz:hover .entity-actions-btn,.entity-row-wrapper.svelte-6dohdz .entity-actions-btn.menu-open{display:inline-flex}.entity-type-dot.svelte-6dohdz{width:6px;height:6px;border-radius:50%;flex-shrink:0;margin-right:19px;align-self:center}.recent-time.svelte-6dohdz{font-size:12px;color:var(--color-text-tertiary);position:absolute;right:26px;top:50%;transform:translate(50%,-50%);white-space:nowrap}.entity-row-wrapper.svelte-6dohdz:hover .recent-time:where(.svelte-6dohdz){display:none}.presence-stack.svelte-6dohdz{display:flex;align-items:center;gap:-4px;margin-left:auto;flex-shrink:0;align-self:center}.presence-avatar.svelte-6dohdz{width:18px;height:18px;border-radius:50%;font-size:10px;font-weight:600;color:#fff;background:var(--color-accent);display:flex;align-items:center;justify-content:center;margin-left:-3px;border:1px solid var(--color-bg);box-sizing:border-box;flex-shrink:0;align-self:center}.presence-stack.svelte-6dohdz .presence-avatar:where(.svelte-6dohdz):first-child{margin-left:4px}.repo-row .presence-stack.svelte-6dohdz{margin-right:28px}.presence-avatar.svelte-6dohdz:nth-child(1){z-index:3}.presence-avatar.svelte-6dohdz:nth-child(2){z-index:2}.presence-avatar.svelte-6dohdz:nth-child(3){z-index:1}.filter-match.svelte-6dohdz{background:var(--color-accent, #e05050);color:#fff;border-radius:2px;padding:0}.no-results.svelte-6dohdz{padding:24px 16px;font-size:14px;color:var(--color-text-tertiary);text-align:center}.repo-row .repo-rename-input{flex:1;min-width:0;height:100%;padding:0 6px;margin:0;border:1px solid var(--color-accent, #e05050);border-radius:3px;font-size:14px;font-weight:600}.repo-row-wrapper.svelte-6dohdz{position:relative;display:flex;align-items:center}.repo-row-wrapper.drop-target.svelte-6dohdz{outline:2px solid var(--color-accent, #e05050);outline-offset:-2px;border-radius:6px;background:#e0505014}.import-modal{max-width:480px}.import-modal .dialog-header{flex-direction:column;align-items:flex-start;gap:4px}.import-modal-body.svelte-6dohdz{padding:16px 24px 8px}.import-modal .dialog-footer{border-top:none}.import-file-list.svelte-6dohdz{display:flex;flex-direction:column;max-height:240px;overflow-y:auto}.import-file-row.svelte-6dohdz{display:flex;align-items:center;gap:10px;padding:10px 12px;border-bottom:1px solid var(--color-border)}.import-file-icon.svelte-6dohdz{flex-shrink:0;color:var(--color-text-tertiary)}.import-file-info.svelte-6dohdz{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}.import-file-name.svelte-6dohdz{font-size:14px;color:var(--color-text-primary);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.import-file-size.svelte-6dohdz{font-size:12px;color:var(--color-text-tertiary)}.import-file-remove.svelte-6dohdz{flex-shrink:0;background:none;border:none;color:var(--color-text-tertiary);cursor:pointer;padding:4px;border-radius:4px;display:flex;align-items:center;justify-content:center}.import-file-remove.svelte-6dohdz:hover{color:var(--color-text-primary);background:var(--color-bg-hover)}.import-drop-zone.svelte-6dohdz{border:1px solid var(--color-border, #333);border-radius:0;padding:40px 16px;text-align:center;color:var(--color-text-tertiary);font-size:15px;min-height:180px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;transition:background .15s}.import-drop-zone-compact.svelte-6dohdz{min-height:0;padding:14px 16px;border-top:none}.import-hint.svelte-6dohdz{font-size:13px;color:var(--color-text-tertiary);margin:0}.file-picker-link.svelte-6dohdz{background:none;border:none;color:var(--color-accent, #e05050);cursor:pointer;text-decoration:underline;font-size:15px;padding:0}.file-picker-link-sm.svelte-6dohdz{font-size:13px}.repo-row-wrapper.svelte-6dohdz .repo-row{flex:1;min-width:0}.repo-row-wrapper.svelte-6dohdz .repo-actions-btn{display:none;width:28px;height:28px;position:absolute;right:12px;flex-shrink:0;padding:0;border:none;background:none;cursor:pointer;color:var(--color-text-tertiary);border-radius:4px;align-items:center;justify-content:center}.repo-row-wrapper.svelte-6dohdz .repo-actions-btn:hover{background:var(--color-bg-hover);color:var(--color-text-primary)}.repo-row-wrapper.svelte-6dohdz:hover .repo-row,.repo-row-wrapper.svelte-6dohdz:has(.repo-actions-btn.menu-open) .repo-row{background:var(--color-bg-hover)}.repo-row-wrapper.svelte-6dohdz:hover .repo-actions-btn,.repo-row-wrapper.svelte-6dohdz .repo-actions-btn.menu-open{display:inline-flex}.type-header-wrapper.svelte-6dohdz{position:relative;display:flex;align-items:center}.type-header-wrapper.svelte-6dohdz .type-header-row{flex:1;min-width:0}.type-header-wrapper.svelte-6dohdz .type-actions-btn{display:none;width:24px;height:24px;position:absolute;right:12px;flex-shrink:0;padding:0;border:none;background:none;cursor:pointer;color:var(--color-text-tertiary);border-radius:4px;align-items:center;justify-content:center}.type-header-wrapper.svelte-6dohdz .type-actions-btn:hover{background:var(--color-bg-hover);color:var(--color-text-primary)}.type-header-wrapper.svelte-6dohdz:hover .type-header-row,.type-header-wrapper.svelte-6dohdz:has(.type-actions-btn.menu-open) .type-header-row{background:var(--color-bg-hover)}.type-header-wrapper.svelte-6dohdz:hover .type-actions-btn,.type-header-wrapper.svelte-6dohdz .type-actions-btn.menu-open{display:inline-flex}.repo-actions-menu{min-width:120px;padding:4px;border-radius:6px;background:var(--color-bg-elevated);border:1px solid var(--color-border);box-shadow:0 4px 12px #00000026;z-index:1000}.repo-menu-item{display:flex;align-items:center;gap:8px;padding:6px 8px;border-radius:4px;cursor:pointer;font-size:13px;color:var(--color-text-primary)}.repo-menu-item:hover{background:var(--color-bg-hover)}.repo-menu-item-danger{color:var(--color-error, #e55)}.new-collection-btn,.new-collection-btn .repo-name.svelte-6dohdz,.new-collection-btn .row-chevron.svelte-6dohdz{color:var(--color-text-tertiary)}.new-collection-btn:hover,.new-collection-btn:hover .repo-name.svelte-6dohdz{color:var(--color-text-secondary)}.new-collection-row.svelte-6dohdz{display:flex;align-items:center;height:var(--row-height);padding:0 12px 0 20px;border-left:2px solid transparent}.new-collection-row.svelte-6dohdz .new-collection-input{flex:1;height:100%;padding:0 0 0 30px;margin-top:-1px;border:none;background:transparent;font-size:14px;border-radius:0}.new-collection-row.svelte-6dohdz .new-collection-clear{width:20px;height:20px;flex-shrink:0;margin-right:4px}.new-collection-row.svelte-6dohdz .private-toggle{width:20px;height:20px;flex-shrink:0;margin-left:auto;margin-right:4px;color:var(--color-text-secondary)}.new-collection-row.svelte-6dohdz .private-toggle.active{color:var(--color-accent, #e05050)}@keyframes svelte-6dohdz-shake{0%,to{transform:translate(0)}20%{transform:translate(-4px)}40%{transform:translate(4px)}60%{transform:translate(-3px)}80%{transform:translate(2px)}}.new-collection-row.svelte-6dohdz .new-collection-input.shake{animation:svelte-6dohdz-shake .3s ease-in-out}.sidebar-footer.svelte-6dohdz{display:flex;align-items:center;height:var(--row-height);padding:0 12px 0 19px;border-top:1px solid var(--color-border);flex-shrink:0;gap:8px}.user-email.svelte-6dohdz{flex:1;font-size:13px;color:var(--color-text-tertiary);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sidebar-footer.svelte-6dohdz .footer-icon-btn{width:28px;height:28px}.transfer-header-col.svelte-6dohdz{display:flex;flex-direction:column;gap:4px}.transfer-list.svelte-6dohdz{display:flex;flex-direction:column;gap:2px}.transfer-list-item.svelte-6dohdz{display:flex;align-items:center;gap:10px;width:100%;padding:8px 12px;border:none;border-radius:6px;background:none;color:var(--color-text);font-size:13px;cursor:pointer;text-align:left}.transfer-list-item.svelte-6dohdz:hover,.transfer-list-item.selected.svelte-6dohdz{background:var(--color-bg-hover)}.transfer-radio.svelte-6dohdz{width:16px;height:16px;border-radius:50%;border:1.5px solid var(--color-text-tertiary);flex-shrink:0;position:relative}.transfer-radio.checked.svelte-6dohdz{border-color:var(--color-accent)}.transfer-radio.checked.svelte-6dohdz:after{content:"";position:absolute;top:3px;left:3px;width:8px;height:8px;border-radius:50%;background:var(--color-accent)}.chat-panel.svelte-1xwj6s7{position:relative;flex-shrink:0;display:flex;flex-direction:column;background:var(--color-bg);border-left:1px solid var(--color-border)}.chat-panel.chat-full.svelte-1xwj6s7{width:100%;min-width:0;flex:1;border-left:none}.chat-full.svelte-1xwj6s7 .chat-messages:where(.svelte-1xwj6s7){padding-left:calc((100% - 720px)/2);padding-right:calc((100% - 720px)/2)}.chat-full.svelte-1xwj6s7 .chat-input-area:where(.svelte-1xwj6s7){padding-left:calc((100% - 720px)/2);padding-right:calc((100% - 720px)/2)}.chat-header.svelte-1xwj6s7{height:var(--row-height);display:flex;align-items:center;justify-content:space-between;padding:0 16px;border-bottom:1px solid var(--color-border);position:relative;flex-shrink:0}.chat-header-left.svelte-1xwj6s7,.chat-header-right.svelte-1xwj6s7{display:flex;align-items:center;gap:2px}.history-active{color:var(--color-accent, #e05050)!important}.history-active:not(:hover){background:transparent!important}.session-dropdown.svelte-1xwj6s7{position:absolute;top:100%;left:0;right:0;z-index:10;box-shadow:0 4px 12px #0000001f}.session-list.svelte-1xwj6s7{max-height:240px;overflow-y:auto;background:var(--color-bg);border-bottom:1px solid var(--color-border)}.session-row.svelte-1xwj6s7{position:relative;display:flex;align-items:center}.session-row.svelte-1xwj6s7 .session-item{display:flex;align-items:center;justify-content:flex-start;flex:1;min-width:0;padding:0 32px 0 16px;height:var(--row-height);line-height:var(--row-height);font-size:14px;color:var(--color-text-secondary);text-align:left;border-radius:0}.session-row.svelte-1xwj6s7:hover .session-item{background:var(--color-bg-hover)}.session-row.svelte-1xwj6s7 .session-item.active{background:var(--color-bg-hover);color:var(--color-text-primary);font-weight:500}.session-row.svelte-1xwj6s7 .session-delete-btn{display:none;width:20px;height:20px;position:absolute;right:6px;flex-shrink:0;padding:0}.session-row.svelte-1xwj6s7 .session-delete-btn:hover{color:var(--color-error, #e55)}.session-row.svelte-1xwj6s7:hover .session-delete-btn{display:flex}.session-title.svelte-1xwj6s7{flex:1;overflow:hidden;white-space:nowrap;min-width:0;mask-image:linear-gradient(to right,black calc(100% - 24px),transparent 100%);-webkit-mask-image:linear-gradient(to right,black calc(100% - 24px),transparent 100%)}.chat-messages.svelte-1xwj6s7{flex:1;overflow-y:auto;padding:24px 16px;display:flex;flex-direction:column;gap:32px}.empty-state.svelte-1xwj6s7{flex:1;display:flex;align-items:center;justify-content:center;color:var(--color-text-tertiary);font-size:14px}.seed-prompts.svelte-1xwj6s7{display:flex;flex-direction:column;gap:8px;width:100%}.seed-prompts.svelte-1xwj6s7 .seed-prompt{font-size:14px;line-height:20px;padding:9px 13px;min-height:var(--row-height);height:auto;border-radius:8px;color:var(--color-text-secondary);text-align:left;white-space:normal;justify-content:flex-start}.seed-prompts.svelte-1xwj6s7 .seed-prompt:hover{background:var(--color-bg-hover);color:var(--color-text-primary)}.message-group.svelte-1xwj6s7{display:flex;flex-direction:column;gap:16px}.user-bubble.svelte-1xwj6s7{background:var(--color-bg-surface);border-radius:8px;padding:12px 14px;font-size:14px;line-height:22px;color:var(--color-text-primary)}.agent-content.svelte-1xwj6s7{display:flex;flex-direction:column;gap:14px;position:relative}.msg-actions.svelte-1xwj6s7{display:flex;gap:2px;align-self:flex-start}.copy-btn.svelte-1xwj6s7{display:flex;align-items:center;justify-content:center;background:none;border:none;color:var(--color-text-tertiary);cursor:pointer;padding:4px;border-radius:4px;align-self:flex-start}.copy-btn.svelte-1xwj6s7:hover{color:var(--color-text-primary);background:var(--color-bg-hover)}.tool-calls.svelte-1xwj6s7{display:flex;flex-direction:column;gap:4px}.tool-call.svelte-1xwj6s7{font-family:var(--font-mono);font-size:12px;color:var(--color-accent)}.agent-text.svelte-1xwj6s7{font-size:14px;line-height:22px;color:var(--color-text-primary)}.prose.svelte-1xwj6s7 h1{font-size:18px;font-weight:600;color:var(--color-text-primary);margin:24px 0 12px}.prose.svelte-1xwj6s7 h2{font-size:16px;font-weight:600;color:var(--color-text-primary);margin:22px 0 10px}.prose.svelte-1xwj6s7 h3{font-size:15px;font-weight:600;color:var(--color-text-primary);margin:20px 0 8px}.prose.svelte-1xwj6s7 p{margin:0 0 14px}.prose.svelte-1xwj6s7 p:last-child{margin-bottom:0}.prose.svelte-1xwj6s7 strong{font-weight:600}.prose.svelte-1xwj6s7 ul,.prose.svelte-1xwj6s7 ol{padding-left:20px;margin:0 0 14px;color:var(--color-text-primary)}.prose.svelte-1xwj6s7 ul{list-style-type:disc}.prose.svelte-1xwj6s7 ol{list-style-type:decimal}.prose.svelte-1xwj6s7 li{margin-bottom:6px}.prose.svelte-1xwj6s7 table{width:100%;border-collapse:collapse;font-size:13px;margin:16px 0}.prose.svelte-1xwj6s7 th,.prose.svelte-1xwj6s7 td{border:1px solid var(--color-border);padding:4px 8px;text-align:left;vertical-align:top}.prose.svelte-1xwj6s7 th{font-weight:600}.prose.svelte-1xwj6s7 pre{background:var(--color-bg-surface);border-radius:6px;padding:10px 12px;overflow-x:auto;margin:16px 0;font-family:var(--font-mono);font-size:13px;line-height:18px}.prose.svelte-1xwj6s7 code{font-family:var(--font-mono);font-size:13px;background:var(--color-bg-surface);padding:1px 4px;border-radius:3px}.prose.svelte-1xwj6s7 pre code{background:none;padding:0}.prose.svelte-1xwj6s7 a{color:var(--color-link)}.prose.svelte-1xwj6s7 blockquote{border-left:3px solid var(--color-accent);padding-left:12px;margin:16px 0;color:var(--color-text-secondary)}.prose.svelte-1xwj6s7 hr{border:none;border-top:1px solid var(--color-border);margin:24px 0}.streaming-dot.svelte-1xwj6s7{display:inline-block;width:8px;height:8px;background:var(--color-accent);border-radius:4px;animation:svelte-1xwj6s7-pulse 1s ease-in-out infinite}@keyframes svelte-1xwj6s7-pulse{0%,to{opacity:.3}50%{opacity:1}}.context-chip.svelte-1xwj6s7{font-size:12px;color:var(--color-text-tertiary);padding:0 2px 4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chat-input-area.svelte-1xwj6s7{padding:12px 16px 16px}.text-input.svelte-1xwj6s7{display:flex;align-items:flex-end;min-height:var(--row-height);max-height:140px;padding:0 0 0 13px;background:transparent;border:1px solid var(--color-border);border-radius:8px;transition:border-color .15s}.text-input.svelte-1xwj6s7:focus-within{border-color:var(--color-accent)}.send-btn{color:var(--color-text-tertiary);margin:6px;flex-shrink:0;pointer-events:none}.send-btn.send-active{pointer-events:auto;color:#fff;background:var(--color-accent);border-radius:6px}.stop-btn{color:#fff;background:var(--color-accent);border-radius:6px}.input-field.svelte-1xwj6s7{flex:1;background:transparent;border:none;outline:none;font-family:inherit;font-size:14px;line-height:20px;color:var(--color-text-primary);resize:none;overflow-y:auto;padding:9px 0;max-height:120px;field-sizing:content}.input-field.svelte-1xwj6s7::placeholder{color:var(--color-text-tertiary)}.input-field.svelte-1xwj6s7:disabled{opacity:.5}.search-header.svelte-1xems06{display:flex;align-items:center;height:52px;padding:0 16px;gap:10px;border-bottom:1px solid var(--color-border)}.search-header.svelte-1xems06 svg{color:var(--color-text-tertiary);flex-shrink:0}.search-header.svelte-1xems06 .search-input{flex:1;font-size:16px;line-height:20px;border:none;background:transparent;box-shadow:none;padding:0;height:auto}.search-header.svelte-1xems06 .search-input:focus{box-shadow:none;border:none}.esc-badge.svelte-1xems06{font-family:var(--font-sans);font-size:12px;line-height:1;padding:3px 6px;border-radius:4px;background:var(--color-bg-surface);border:1px solid var(--color-border);color:var(--color-text-tertiary)}.results-list.svelte-1xems06{flex:1;overflow-y:auto;min-height:0}.empty-results.svelte-1xems06{padding:24px 16px;text-align:center;font-size:14px;color:var(--color-text-tertiary)}.results-list.svelte-1xems06 .result-row{display:flex;align-items:flex-start;padding:10px 16px;width:100%;text-align:left;border-radius:0;height:auto;justify-content:flex-start}.results-list.svelte-1xems06 .result-row:hover,.results-list.svelte-1xems06 .result-row.selected{background:var(--color-bg-hover)}.result-body.svelte-1xems06{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}.result-title-row.svelte-1xems06{display:flex;align-items:center;gap:8px}.result-title.svelte-1xems06{font-size:14px;font-weight:500;color:var(--color-text-primary);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.entity-tag.svelte-1xems06{flex-shrink:0;font-size:11px;font-weight:500;letter-spacing:.04em;text-transform:uppercase;padding:1px 6px;border-radius:3px;background:var(--color-badge-bg);color:var(--color-badge-text)}.result-meta.svelte-1xems06{font-size:13px;color:var(--color-text-tertiary)}.search-footer.svelte-1xems06{display:flex;align-items:center;height:39px;padding:0 16px;gap:16px;border-top:1px solid var(--color-border)}.shortcut-group.svelte-1xems06{display:flex;align-items:center;gap:4px}.shortcut-key.svelte-1xems06{display:inline-flex;align-items:center;justify-content:center;min-width:20px;height:20px;padding:0 4px;border-radius:4px;background:var(--color-bg-surface);border:1px solid var(--color-border);color:var(--color-text-tertiary)}.shortcut-label.svelte-1xems06{font-size:12px;color:var(--color-text-tertiary);margin-left:2px}.app-frame.svelte-vr1z90{width:100vw;height:100vh;display:flex;flex-direction:column;overflow:hidden;background:var(--color-bg)}.app-body.svelte-vr1z90{flex:1;display:flex;min-height:0;overflow:hidden}.main-content.svelte-vr1z90{flex:1;display:flex;flex-direction:column;min-width:0;min-height:0;overflow:hidden}#sg-chrome-footer{flex-shrink:0}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{O as _,f as P,g as b,e as W,w as m,a as G,t as k,c as A,r as I,b as q,d as j,h as V,i as R,j as z,k as C,l as K,D as Q,p as X,m as Z}from"./CSVbGg_b.js";import{r as O}from"./
|
|
1
|
+
import{O as _,f as P,g as b,e as W,w as m,a as G,t as k,c as A,r as I,b as q,d as j,h as V,i as R,j as z,k as C,l as K,D as Q,p as X,m as Z}from"./CSVbGg_b.js";import{r as O}from"./BGci7Sbu.js";const T=3e4;class $ extends _{constructor(n){super(),this.doc=n,this.clientID=n.clientID,this.states=new Map,this.meta=new Map,this._checkInterval=setInterval(()=>{const e=b();this.getLocalState()!==null&&T/2<=e-this.meta.get(this.clientID).lastUpdated&&this.setLocalState(this.getLocalState());const s=[];this.meta.forEach((a,c)=>{c!==this.clientID&&T<=e-a.lastUpdated&&this.states.has(c)&&s.push(c)}),s.length>0&&Y(this,s,"timeout")},P(T/10)),n.on("destroy",()=>{this.destroy()}),this.setLocalState({})}destroy(){this.emit("destroy",[this]),this.setLocalState(null),super.destroy(),clearInterval(this._checkInterval)}getLocalState(){return this.states.get(this.clientID)||null}setLocalState(n){const e=this.clientID,s=this.meta.get(e),a=s===void 0?0:s.clock+1,c=this.states.get(e);n===null?this.states.delete(e):this.states.set(e,n),this.meta.set(e,{clock:a,lastUpdated:b()});const i=[],u=[],r=[],f=[];n===null?f.push(e):c==null?n!=null&&i.push(e):(u.push(e),W(c,n)||r.push(e)),(i.length>0||r.length>0||f.length>0)&&this.emit("change",[{added:i,updated:r,removed:f},"local"]),this.emit("update",[{added:i,updated:u,removed:f},"local"])}setLocalStateField(n,e){const s=this.getLocalState();s!==null&&this.setLocalState({...s,[n]:e})}getStates(){return this.states}}const Y=(t,n,e)=>{const s=[];for(let a=0;a<n.length;a++){const c=n[a];if(t.states.has(c)){if(t.states.delete(c),c===t.clientID){const i=t.meta.get(c);t.meta.set(c,{clock:i.clock+1,lastUpdated:b()})}s.push(c)}}s.length>0&&(t.emit("change",[{added:[],updated:[],removed:s},e]),t.emit("update",[{added:[],updated:[],removed:s},e]))},H=(t,n,e=t.states)=>{const s=n.length,a=A();m(a,s);for(let c=0;c<s;c++){const i=n[c],u=e.get(i)||null,r=t.meta.get(i).clock;m(a,i),m(a,r),G(a,JSON.stringify(u))}return k(a)},tt=(t,n,e)=>{const s=j(n),a=b(),c=[],i=[],u=[],r=[],f=I(s);for(let w=0;w<f;w++){const d=I(s);let y=I(s);const h=JSON.parse(q(s)),g=t.meta.get(d),U=t.states.get(d),S=g===void 0?0:g.clock;(S<y||S===y&&h===null&&t.states.has(d))&&(h===null?d===t.clientID&&t.getLocalState()!=null?y++:t.states.delete(d):t.states.set(d,h),t.meta.set(d,{clock:y,lastUpdated:a}),g===void 0&&h!==null?c.push(d):g!==void 0&&h===null?r.push(d):h!==null&&(W(h,U)||u.push(d),i.push(d)))}(c.length>0||u.length>0||r.length>0)&&t.emit("change",[{added:c,updated:u,removed:r},e]),(c.length>0||i.length>0||r.length>0)&&t.emit("update",[{added:c,updated:i,removed:r},e])},B=0,M=1,N=2,et=(t,n)=>{m(t,B);const e=R(n);V(t,e)},nt=(t,n,e)=>{m(t,M),V(t,K(n,e))},st=(t,n,e)=>nt(n,e,C(t)),F=(t,n,e,s)=>{try{z(n,C(t),e)}catch(a){s?.(a),console.error("Caught error while handling a Yjs update",a)}},at=(t,n)=>{m(t,N),V(t,n)},ct=F,ot=(t,n,e,s,a)=>{const c=I(t);switch(c){case B:st(t,n,e);break;case M:F(t,e,s,a);break;case N:ct(t,e,s,a);break;default:throw new Error("Unknown message type")}return c},L=0,x=1;function it(t,n,e){const s=new TextEncoder().encode(t),a=new ArrayBuffer(2+s.length+1+e.length);return new DataView(a).setUint16(0,s.length),new Uint8Array(a,2,s.length).set(s),new Uint8Array(a)[2+s.length]=n,new Uint8Array(a,2+s.length+1).set(e),a}function lt(t){if(t.byteLength<3)return null;const e=new DataView(t).getUint16(0);if(t.byteLength<2+e+1)return null;const s=new TextDecoder().decode(new Uint8Array(t,2,e)),a=new Uint8Array(t)[2+e],c=new Uint8Array(t,2+e+1);return{docName:s,msgType:a,payload:c}}function ut(t,n){const e=new Q,s=e.getText("content"),a=new $(e);a.setLocalStateField("user",{name:n.name,color:n.color,colorLight:n.colorLight??n.color+"33"});let c=null,i=!1,u=!1;function r(){return O.ws??null}function f(o,p){const l=r();!l||l.readyState!==WebSocket.OPEN||l.send(it(t,o,p))}function w(){const o=A();et(o,e),f(L,k(o))}function d(o){const p=o??[e.clientID],l=H(a,p);f(x,l)}function y(o){if(i||typeof o.data=="string")return;const p=o.data instanceof ArrayBuffer?o.data:null;if(!p)return;const l=lt(p);if(!(!l||l.docName!==t))if(l.msgType===L){const v=j(l.payload),D=X(v),E=A();ot(v,E,e,"ws-server"),Z(E)>0&&f(L,k(E)),!u&&(D===M||D===N)&&(u=!0,S.synced=!0)}else l.msgType===x&&tt(a,l.payload,"ws-server")}function h(o,p){if(i||p==="ws-server")return;const l=A();at(l,o),f(L,k(l))}function g({added:o,updated:p,removed:l},v){if(i||v==="ws-server")return;const D=o.concat(p,l);d(D)}function U(){if(i)return;const o=r();!o||o.readyState!==WebSocket.OPEN||(o.send(JSON.stringify({type:"collab:join",docName:t})),c&&o.removeEventListener("message",c),c=y,o.addEventListener("message",c),w(),d())}const S={ydoc:e,ytext:s,awareness:a,synced:!1,destroy:J};e.on("update",h),a.on("update",g),U(),O.addConnectHandler(U);function J(){if(i)return;i=!0,Y(a,[e.clientID],"local"),d([e.clientID]);const o=r();o&&o.readyState===WebSocket.OPEN&&o.send(JSON.stringify({type:"collab:leave",docName:t})),c&&o&&(o.removeEventListener("message",c),c=null),e.off("update",h),a.off("update",g),a.destroy(),e.destroy()}return S}export{ut as createCollabSession};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./CD64r3Gf.js","./DwMoyB6r.js","./C88BjBh_.js","./koVwyjnn.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{_ as Y}from"./PPVm8Dsz.js";import{aY as G,aC as A,aX as X,e as S,f as P,g,s as c,a4 as D,ab as q}from"./DwMoyB6r.js";import{i as z}from"./
|
|
2
|
+
import{_ as Y}from"./PPVm8Dsz.js";import{aY as G,aC as A,aX as X,e as S,f as P,g,s as c,a4 as D,ab as q}from"./DwMoyB6r.js";import{i as z}from"./C9G-Qu8M.js";import{i as H,w as h}from"./C88BjBh_.js";import{a as K}from"./hE0jymgn.js";import{n as $}from"./DiQyiOFg.js";import{l as Q,o as N}from"./S3zzfNyy.js";function At(...t){return t.filter(Boolean).join(" ")}const Z=typeof document<"u",v=typeof window<"u"?window:void 0;function tt(t){let e=t.activeElement;for(;e?.shadowRoot;){const s=e.shadowRoot.activeElement;if(s===e)break;e=s}return e}class et{#e;#t;constructor(e={}){const{window:s=v,document:i=s?.document}=e;s!==void 0&&(this.#e=i,this.#t=Q(n=>{const r=N(s,"focusin",n),o=N(s,"focusout",n);return()=>{r(),o()}}))}get current(){return this.#t?.(),this.#e?tt(this.#e):null}}new et;class st{#e;#t;constructor(e){this.#e=e,this.#t=Symbol(e)}get key(){return this.#t}exists(){return G(this.#t)}get(){const e=A(this.#t);if(e===void 0)throw new Error(`Context "${this.#e}" not found`);return e}getOr(e){const s=A(this.#t);return s===void 0?e:s}set(e){return X(this.#t,e)}}const it=new st("<Toaster/>");let U=0;class nt{#e=S(P([]));get toasts(){return g(this.#e)}set toasts(e){c(this.#e,e,!0)}#t=S(P([]));get heights(){return g(this.#t)}set heights(e){c(this.#t,e,!0)}#s=e=>{const s=this.toasts.findIndex(i=>i.id===e);return s===-1?null:s};addToast=e=>{Z&&this.toasts.unshift(e)};updateToast=({id:e,data:s,type:i,message:n})=>{const r=this.toasts.findIndex(f=>f.id===e),o=this.toasts[r];this.toasts[r]={...o,...s,id:e,title:n,type:i,updated:!0}};create=e=>{const{message:s,...i}=e,n=typeof e?.id=="number"||e.id&&e.id?.length>0?e.id:U++,r=e.dismissible!==void 0?e.dismissible:e.dismissable!==void 0?e.dismissable:!0,o=e.type===void 0?"default":e.type;return D(()=>{this.toasts.find(E=>E.id===n)?this.updateToast({id:n,data:e,type:o,message:s,dismissible:r}):this.addToast({...i,id:n,title:s,dismissible:r,type:o})}),n};dismiss=e=>(D(()=>{if(e===void 0){this.toasts=this.toasts.map(i=>({...i,dismiss:!0}));return}const s=this.toasts.findIndex(i=>i.id===e);this.toasts[s]&&(this.toasts[s]={...this.toasts[s],dismiss:!0})}),e);remove=e=>{if(e===void 0){this.toasts=[];return}const s=this.#s(e);if(s!==null)return this.toasts.splice(s,1),e};message=(e,s)=>this.create({...s,type:"default",message:e});error=(e,s)=>this.create({...s,type:"error",message:e});success=(e,s)=>this.create({...s,type:"success",message:e});info=(e,s)=>this.create({...s,type:"info",message:e});warning=(e,s)=>this.create({...s,type:"warning",message:e});loading=(e,s)=>this.create({...s,type:"loading",message:e});promise=(e,s)=>{if(!s)return;let i;s.loading!==void 0&&(i=this.create({...s,promise:e,type:"loading",message:typeof s.loading=="string"?s.loading:s.loading()}));const n=e instanceof Promise?e:e();let r=i!==void 0;return n.then(o=>{if(typeof o=="object"&&o&&"ok"in o&&typeof o.ok=="boolean"&&!o.ok){r=!1;const f=rt(o);this.create({id:i,type:"error",message:f})}else if(s.success!==void 0){r=!1;const f=typeof s.success=="function"?s.success(o):s.success;this.create({id:i,type:"success",message:f})}}).catch(o=>{if(s.error!==void 0){r=!1;const f=typeof s.error=="function"?s.error(o):s.error;this.create({id:i,type:"error",message:f})}}).finally(()=>{r&&(this.dismiss(i),i=void 0),s.finally?.()}),i};custom=(e,s)=>{const i=s?.id||U++;return this.create({component:e,id:i,...s}),i};removeHeight=e=>{this.heights=this.heights.filter(s=>s.toastId!==e)};setHeight=e=>{const s=this.#s(e.toastId);if(s===null){this.heights.push(e);return}this.heights[s]=e};reset=()=>{this.toasts=[],this.heights=[]}}function rt(t){return t&&typeof t=="object"&&"status"in t?`HTTP error! Status: ${t.status}`:`Error! ${t}`}const d=new nt;function ot(t,e){return d.create({message:t,...e})}class Pt{#e=q(()=>d.toasts.filter(e=>!e.dismiss));get toasts(){return g(this.#e)}}function Dt(){return it.get()}const ct=ot,u=Object.assign(ct,{success:d.success,info:d.info,warning:d.warning,error:d.error,custom:d.custom,message:d.message,promise:d.promise,dismiss:d.dismiss,loading:d.loading,getActiveToasts:()=>d.toasts.filter(t=>!t.dismiss)}),at=800;function ut(){let t=S(!1),e=S(null),s=S(null),i=null,n=null,r=!1;function o(p,w,m,l){i&&i.repo===p&&i.type===w&&i.id===m?(l.data!==void 0&&(i.payload.data=l.data),l.content!==void 0&&(i.payload.content=l.content)):i={repo:p,type:w,id:m,payload:{...l}},f()}function f(){n&&clearTimeout(n),n=setTimeout(E,at)}async function E(){if(n=null,!r&&i){const{repo:p,type:w,id:m,payload:l}=i;i=null,r=!0,c(t,!0),c(s,null);try{if(await H(p,w,m,l),c(e,new Date,!0),l.data?.name){const b=h.repos.find(C=>C.name===p)?.entities.find(C=>C.id===m);b&&(b.title=l.data.name)}}catch(y){c(s,y.message??"Save failed",!0);const b=y.status??y.statusCode;(!b||b>=500)&&(i={repo:p,type:w,id:m,payload:l})}finally{c(t,!1),r=!1,i&&E()}}}function J(){n&&(clearTimeout(n),n=null),i&&E()}async function L(p,w,m,l){c(t,!0),c(s,null);try{const y=await H(p,w,m,l);return c(e,new Date,!0),y}catch(y){return c(s,y.message??"Save failed",!0),null}finally{c(t,!1)}}function V(){c(s,null),c(e,null),i=null,n&&(clearTimeout(n),n=null)}return{get saving(){return g(t)},get lastSaved(){return g(e)},get error(){return g(s)},get hasPending(){return!!(i||r)},scheduleAutoSave:o,flush:J,saveEntity:L,reset:V}}const lt=ut();let a=null,B=null,R=null,F=[],I=null,_=1e3,k=S(!1),W=S(null);const T=new Map,x={},O={};function j(t,e){T.delete(t);const s=e.entities.length,i=s===1?`${t} updated ${e.entities[0]}`:`${t} updated ${s} entities`;u(i)}function dt(t){for(const[e,s]of T)s.repo===t&&(clearTimeout(s.timer),T.delete(e))}function ft(t){const e=K.user?.displayName;if(t.type==="sync_progress"){const s=x[t.repo];if(s){const i=t.message.trim(),n=i.match(/^Syncing from source:\s*(.+)$/i);n&&(O[t.repo]=`Syncing ${n[1].trim()}…`);const r=O[t.repo]??`Syncing ${t.repo}…`;u.loading(r,{id:s,description:i,duration:36e5})}return}if(t.type==="entity_change"){if(e&&t.actor===e&&t.source==="api"){h.refreshEntities(t.repo);return}if(h.refreshEntities(t.repo),$.selectedRepo===t.repo&&$.selectedType===t.entityType&&$.selectedId===t.entityId){lt.hasPending?u(`${t.actor} also saved changes to this entity`):z();return}const i=T.get(t.actor);if(i)clearTimeout(i.timer),i.entities.includes(t.entityId)||i.entities.push(t.entityId),i.timer=setTimeout(()=>j(t.actor,i),1e4);else{const n={entities:[t.entityId],repo:t.repo,timer:setTimeout(()=>j(t.actor,n),1e4)};T.set(t.actor,n)}return}if(t.type==="session_commit"){if(e&&t.actor===e){c(W,t.timestamp,!0);return}const s=t.entities.length,i=s===1?`${t.actor} saved changes to ${t.entities[0]}`:`${t.actor} saved ${s} changes in ${t.repo}`;u(i),h.refreshEntities(t.repo);return}if(t.type==="sync_complete"){if(dt(t.repo),!x[t.repo]){const s=t.created+t.updated+t.deleted,i=s===0?`Sync complete · no changes in ${t.repo}`:`Sync complete · ${s} ${s===1?"entity":"entities"} from ${t.source}`;u.success(i)}h.refreshEntities(t.repo);return}if(t.type==="collection_created"){u(`${t.actor} created collection ${t.repo}`),h.refreshEntities(t.repo);return}if(t.type==="collection_deleted"){u(`${t.actor} deleted collection ${t.repo}`);return}if(t.type==="repo_sync"){u(`${t.actor} pushed to ${t.repo}`),h.refreshEntities(t.repo);return}if(t.type==="presence"){B?.(t);return}if(t.type==="online"){R?.(t);return}if(t.type==="insights_updated"){Y(()=>import("./CD64r3Gf.js"),__vite__mapDeps([0,1,2,3]),import.meta.url).then(s=>s.insightsStore.load());return}if(t.type==="access_granted"||t.type==="access_revoked"){t.type==="access_revoked"&&$.selectedRepo===t.repo&&$.deselect(),h.load();return}}function M(){if(typeof window>"u"||a&&(a.readyState===WebSocket.OPEN||a.readyState===WebSocket.CONNECTING))return;const e=`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/ws`;a=new WebSocket(e),a.binaryType="arraybuffer",a.onopen=()=>{c(k,!0),_=1e3,h.refreshAll();for(const s of F)s()},a.onmessage=s=>{if(!(s.data instanceof ArrayBuffer))try{const i=JSON.parse(s.data);if(i?.type==="ping"){a?.send(JSON.stringify({type:"pong"}));return}const n=i;n.type&&n.type!=="toast"&&ft(n)}catch{}},a.onclose=()=>{c(k,!1),a=null,I=setTimeout(()=>{_=Math.min(_*2,1e4),M()},_)},a.onerror=()=>{}}function ht(){I&&(clearTimeout(I),I=null),a&&(a.close(),a=null),c(k,!1);for(const[,t]of T)clearTimeout(t.timer);T.clear()}function pt(t,e=4e3){u(t,{duration:e})}function mt(t,e){const s=crypto.randomUUID();return e?.loading?u.loading(t,{id:s,duration:36e5}):u(t,{id:s}),s}function yt(t,e,s){if(s?.loading){u.loading(e,{id:t});return}/failed|error/i.test(e)?u.error(e,{id:t,duration:s?.duration??6e3}):u.success(e,{id:t,duration:s?.duration??4e3})}function gt(t){const e=crypto.randomUUID();x[t]=e,u.loading(`Syncing ${t}…`,{id:e,duration:36e5})}function wt(t,e,s){const i=x[t];i&&(delete x[t],delete O[t],s?u.error(e,{id:i,duration:6e3}):u.success(e,{id:i,duration:4e3}))}function St(t){B=t}function Tt(t){R=t}function Et(t){F.push(t)}function bt(t){a?.readyState===WebSocket.OPEN&&a.send(JSON.stringify(t))}const Ht={get connected(){return g(k)},get lastAutoSaved(){return g(W)},get ws(){return a},connect:M,disconnect:ht,showToast:pt,showPersistentToast:mt,updateToast:yt,startSyncToast:gt,finishSyncToast:wt,send:bt,setPresenceHandler:St,setOnlineHandler:Tt,addConnectHandler:Et};export{Pt as S,d as a,At as c,lt as e,Ht as r,it as s,u as t,Dt as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as i,f as y,g as r,s as n}from"./DwMoyB6r.js";import{g as l}from"./
|
|
1
|
+
import{e as i,f as y,g as r,s as n}from"./DwMoyB6r.js";import{g as l}from"./C9G-Qu8M.js";import{d as v,u as V,c as F,f as h}from"./C88BjBh_.js";const d={selectedType:null,groupBy:null,sortKey:"name",sortAsc:!0,filters:{text:{},enum:{},date:{}}};function x(){let a=i(y([])),o=i(null),c=i(!1);async function w(){try{n(a,await h(),!0),n(c,!0)}catch(e){console.error("Failed to load views:",e)}}async function f(e,t="list"){const s=t==="calendar"?{...d,calendar:{dateField:"due_date",year:new Date().getFullYear(),month:new Date().getMonth()+1}}:d,u=await F(e,s,t);return n(a,[...r(a),u],!0),u}async function g(e,t){await V(e,t),n(a,r(a).map(s=>s.id===e?{...s,...t}:s),!0)}async function m(e){if(await v(e),n(a,r(a).filter(t=>t.id!==e),!0),r(o)===e){const t=r(a)[0];t?(n(o,t.id,!0),l(`/views/${t.id}`,{replaceState:!0})):(n(o,null),l("/",{replaceState:!0}))}}function p(e){n(o,e,!0)}return{get views(){return r(a)},get activeViewId(){return r(o)},get loaded(){return r(c)},load:w,create:f,update:g,remove:m,setActive:p}}const D=x();export{D as v};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as ae,c as A,a as d,b as B,s as ee,f as he,t as ne}from"./S3zzfNyy.js";import{p as N,a0 as S,b as Y,g as i,c as U,ad as X,r as z,ab as L,e as Pe,f as ye,s as de,l as fe,d as le,a as be,n as te,m as ve,t as re,aa as ie}from"./DwMoyB6r.js";import{b as K,a as j}from"./BYqzpKy3.js";import{i as q}from"./DVe5EzgB.js";import{p as s,r as oe,s as pe,l as _e}from"./DLfZVgnp.js";import{f as se,n as J,M as Me,h as b,m as Q,j as we,k as Ce,l as Se,F as xe,o as Oe,P as Ae,p as Fe,q as ge,D as Ie,r as Re,s as ke,A as Ee,t as Le,u as Ke,v as He,x as Te,y as Ue,z as ze,B as De}from"./CMw7AR0M.js";import{r as ce}from"./
|
|
1
|
+
import{p as ae,c as A,a as d,b as B,s as ee,f as he,t as ne}from"./S3zzfNyy.js";import{p as N,a0 as S,b as Y,g as i,c as U,ad as X,r as z,ab as L,e as Pe,f as ye,s as de,l as fe,d as le,a as be,n as te,m as ve,t as re,aa as ie}from"./DwMoyB6r.js";import{b as K,a as j}from"./BYqzpKy3.js";import{i as q}from"./DVe5EzgB.js";import{p as s,r as oe,s as pe,l as _e}from"./DLfZVgnp.js";import{f as se,n as J,M as Me,h as b,m as Q,j as we,k as Ce,l as Se,F as xe,o as Oe,P as Ae,p as Fe,q as ge,D as Ie,r as Re,s as ke,A as Ee,t as Le,u as Ke,v as He,x as Te,y as Ue,z as ze,B as De}from"./CMw7AR0M.js";import{r as ce}from"./BGci7Sbu.js";import{i as je}from"./CkRzikAP.js";import{c as D}from"./BdfrxCf_.js";import{a as me}from"./ClyoIkBa.js";var Be=B("<div><!></div>");function Ve(c,e){const l=ae();N(e,!0);let m=s(e,"ref",15,null),p=s(e,"id",19,()=>se(l)),_=s(e,"disabled",3,!1),M=s(e,"onSelect",3,J),P=s(e,"closeOnSelect",3,!0),f=oe(e,["$$slots","$$events","$$legacy","child","children","ref","id","disabled","onSelect","closeOnSelect"]);const w=Me.create({id:b(()=>p()),disabled:b(()=>_()),onSelect:b(()=>M()),ref:b(()=>m(),r=>m(r)),closeOnSelect:b(()=>P())}),u=L(()=>Q(f,w.props));var x=A(),a=S(x);{var t=r=>{var o=A(),h=S(o);K(h,()=>e.child,()=>({props:i(u)})),d(r,o)},n=r=>{var o=Be();j(o,()=>({...i(u)}));var h=U(o);K(h,()=>e.children??X),z(o),d(r,o)};q(a,r=>{e.child?r(t):r(n,!1)})}d(c,x),Y()}var Ze=B("<div><!></div>");function We(c,e){const l=ae();N(e,!0);let m=s(e,"ref",15,null),p=s(e,"id",19,()=>se(l)),_=oe(e,["$$slots","$$events","$$legacy","ref","id","child","children"]);const M=we.create({id:b(()=>p()),ref:b(()=>m(),a=>m(a))}),P=L(()=>Q(_,M.props));var f=A(),w=S(f);{var u=a=>{var t=A(),n=S(t);K(n,()=>e.child,()=>({props:i(P)})),d(a,t)},x=a=>{var t=Ze();j(t,()=>({...i(P)}));var n=U(t);K(n,()=>e.children??X),z(t),d(a,t)};q(w,a=>{e.child?a(u):a(x,!1)})}d(c,f),Y()}function qe(c,e){N(e,!0);let l=s(e,"open",15,!1),m=s(e,"dir",3,"ltr"),p=s(e,"onOpenChange",3,J),_=s(e,"onOpenChangeComplete",3,J),M=s(e,"_internal_variant",3,"dropdown-menu");const P=Ce.create({variant:b(()=>M()),dir:b(()=>m()),onClose:()=>{l(!1),p()(!1)}});Se.create({open:b(()=>l(),f=>{l(f),p()(f)}),onOpenChangeComplete:b(()=>_())},P),xe(c,{children:(f,w)=>{var u=A(),x=S(u);K(x,()=>e.children??X),d(f,u)},$$slots:{default:!0}}),Y()}var Ne=B("<div><div><!></div></div>"),Ye=B("<div><div><!></div></div>");function Ge(c,e){const l=ae();N(e,!0);let m=s(e,"id",19,()=>se(l)),p=s(e,"ref",15,null),_=s(e,"loop",3,!0),M=s(e,"onInteractOutside",3,J),P=s(e,"onEscapeKeydown",3,J),f=s(e,"onCloseAutoFocus",3,J),w=s(e,"forceMount",3,!1),u=s(e,"trapFocus",3,!1),x=oe(e,["$$slots","$$events","$$legacy","id","child","children","ref","loop","onInteractOutside","onEscapeKeydown","onCloseAutoFocus","forceMount","trapFocus","style"]);const a=Oe.create({id:b(()=>m()),loop:b(()=>_()),ref:b(()=>p(),g=>p(g)),onCloseAutoFocus:b(()=>f())}),t=L(()=>Q(x,a.props));function n(g){if(a.handleInteractOutside(g),!g.defaultPrevented&&(M()(g),!g.defaultPrevented)){if(g.target&&g.target instanceof Element){const V=`[${a.parentMenu.root.getBitsAttr("sub-content")}]`;if(g.target.closest(V))return}a.parentMenu.onClose()}}function r(g){P()(g),!g.defaultPrevented&&a.parentMenu.onClose()}var o=A(),h=S(o);{var O=g=>{Ae(g,pe(()=>i(t),()=>a.popperProps,{get ref(){return a.opts.ref},get enabled(){return a.parentMenu.opts.open.current},onInteractOutside:n,onEscapeKeydown:r,get trapFocus(){return u()},get loop(){return _()},forceMount:!0,get id(){return m()},get shouldRender(){return a.shouldRender},popper:(Z,H)=>{let $=()=>H?.().props,F=()=>H?.().wrapperProps;const I=L(()=>Q($(),{style:ge("dropdown-menu")},{style:e.style}));var T=A(),R=S(T);{var k=y=>{var v=A(),C=S(v);{let W=L(()=>({props:i(I),wrapperProps:F(),...a.snippetProps}));K(C,()=>e.child,()=>i(W))}d(y,v)},E=y=>{var v=Ne();j(v,()=>({...F()}));var C=U(v);j(C,()=>({...i(I)}));var W=U(C);K(W,()=>e.children??X),z(C),z(v),d(y,v)};q(R,y=>{e.child?y(k):y(E,!1)})}d(Z,T)},$$slots:{popper:!0}}))},G=g=>{Fe(g,pe(()=>i(t),()=>a.popperProps,{get ref(){return a.opts.ref},get open(){return a.parentMenu.opts.open.current},onInteractOutside:n,onEscapeKeydown:r,get trapFocus(){return u()},get loop(){return _()},forceMount:!1,get id(){return m()},get shouldRender(){return a.shouldRender},popper:(Z,H)=>{let $=()=>H?.().props,F=()=>H?.().wrapperProps;const I=L(()=>Q($(),{style:ge("dropdown-menu")},{style:e.style}));var T=A(),R=S(T);{var k=y=>{var v=A(),C=S(v);{let W=L(()=>({props:i(I),wrapperProps:F(),...a.snippetProps}));K(C,()=>e.child,()=>i(W))}d(y,v)},E=y=>{var v=Ye();j(v,()=>({...F()}));var C=U(v);j(C,()=>({...i(I)}));var W=U(C);K(W,()=>e.children??X),z(C),z(v),d(y,v)};q(R,y=>{e.child?y(k):y(E,!1)})}d(Z,T)},$$slots:{popper:!0}}))};q(h,g=>{w()?g(O):w()||g(G,1)})}d(c,o),Y()}var Je=B("<button><!></button>");function Qe(c,e){const l=ae();N(e,!0);let m=s(e,"id",19,()=>se(l)),p=s(e,"ref",15,null),_=s(e,"disabled",3,!1),M=s(e,"type",3,"button"),P=oe(e,["$$slots","$$events","$$legacy","id","ref","child","children","disabled","type"]);const f=Ie.create({id:b(()=>m()),disabled:b(()=>_()??!1),ref:b(()=>p(),u=>p(u))}),w=L(()=>Q(P,f.props,{type:M()}));Re(c,{get id(){return m()},get ref(){return f.opts.ref},children:(u,x)=>{var a=A(),t=S(a);{var n=o=>{var h=A(),O=S(h);K(O,()=>e.child,()=>({props:i(w)})),d(o,h)},r=o=>{var h=Je();j(h,()=>({...i(w)}));var O=U(h);K(O,()=>e.children??X),z(h),d(o,h)};q(t,o=>{e.child?o(n):o(r,!1)})}d(u,a)},$$slots:{default:!0}}),Y()}const pt=qe,_t=Qe,gt=ke,mt=Ge,ht=Ve,Pt=We;function Xe(){let c=Pe(ye({})),e=null,l=null;function m(t,n,r){l&&(clearInterval(l),l=null),e=`${t}/${n}/${r}`,_("enter",t,n,r),l=setInterval(()=>{e&&_("heartbeat",t,n,r)},3e4)}function p(){if(l&&(clearInterval(l),l=null),e){const[t,n,r]=e.split("/");t&&n&&r&&_("leave",t,n,r),e=null}}function _(t,n,r,o){ce.send({type:"presence",action:t,repo:n,entityType:r,entityId:o})}function M(t){const n=`${t.repo}/${t.entityType}/${t.entityId}`,r=i(c)[n]??[];if(t.action==="leave")i(c)[n]=r.filter(o=>o.id!==t.user.id);else{const o=r.findIndex(h=>h.id===t.user.id);o>=0?(r[o]=t.user,i(c)[n]=[...r]):i(c)[n]=[...r,t.user]}}function P(){if(de(c,{},!0),!e)return;const[t,n,r]=e.split("/");t&&n&&r&&_("enter",t,n,r)}function f(t,n,r,o){const h=`${t}/${n}/${r}`,O=i(c)[h]??[];return o?O.filter(G=>G.id!==o):O}function w(t,n){const r=new Map;for(const[o,h]of Object.entries(i(c)))if(o.startsWith(t))for(const O of h)(!n||O.id!==n)&&r.set(O.id,O);return[...r.values()]}function u(t,n){return w(`${t}/`,n)}function x(t){const n=new Map;for(const r of Object.values(i(c)))for(const o of r)(!t||o.id!==t)&&n.set(o.id,o);return[...n.values()]}const a=L(()=>{const t=new Map;for(const n of Object.values(i(c)))for(const r of n)t.set(r.id,r);return[...t.values()]});return{enter:m,leave:p,handlePresenceEvent:M,resetAndResend:P,getPresence:f,getPresenceByPrefix:w,getRepoPresence:u,getAllUsers:x,get allUsers(){return i(a)}}}const ue=Xe();ce.setPresenceHandler(c=>ue.handlePresenceEvent(c));ce.addConnectHandler(()=>ue.resetAndResend());typeof window<"u"&&window.addEventListener("beforeunload",()=>ue.leave());var $e=he("<title> </title>"),et=he('<svg><!><path d="M25,12H20v2h5a1.0008,1.0008,0,0,1,1,1v2H22a3.0033,3.0033,0,0,0-3,3v1a3.0033,3.0033,0,0,0,3,3h6V15A3.0033,3.0033,0,0,0,25,12ZM22,22a1.0008,1.0008,0,0,1-1-1V20a1.0008,1.0008,0,0,1,1-1h4v3Z"></path><path d="M16,24h2L12,7H10L4,24H6l1.6936-5h6.6135ZM8.3711,17l2.4966-7.3711.2668.0005L13.63,17Z"></path></svg>');function yt(c,e){const l=_e(e,["children","$$slots","$$events","$$legacy"]),m=_e(l,["size","title"]);N(e,!1);const p=ve(),_=ve();let M=s(e,"size",8,16),P=s(e,"title",8,void 0);fe(()=>(le(l),le(P())),()=>{de(p,l["aria-label"]||l["aria-labelledby"]||P())}),fe(()=>(i(p),le(l)),()=>{de(_,{"aria-hidden":i(p)?void 0:!0,role:i(p)?"img":void 0,focusable:Number(l.tabindex)===0?!0:void 0})}),be(),je();var f=et();j(f,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:M(),height:M(),...i(_),...m}));var w=U(f);{var u=x=>{var a=$e(),t=U(a,!0);z(a),re(()=>ee(t,P())),d(x,a)};q(w,x=>{P()&&x(u)})}te(2),z(f),d(c,f),Y()}var tt=B("<!> <!>",1),rt=B("<!> <!>",1),nt=B("<!> <!>",1);function bt(c,e){N(e,!0);let l=s(e,"open",15),m=s(e,"confirmLabel",3,"Confirm"),p=s(e,"cancelLabel",3,"Cancel"),_=s(e,"destructive",3,!1);var M=A(),P=S(M);D(P,()=>De,(f,w)=>{w(f,{onOpenChange:u=>{u||e.oncancel()},get open(){return l()},set open(u){l(u)},children:(u,x)=>{var a=A(),t=S(a);D(t,()=>Ee,(n,r)=>{r(n,{children:(o,h)=>{var O=nt(),G=S(O);D(G,()=>Le,(V,Z)=>{Z(V,{children:(H,$)=>{var F=tt(),I=S(F);D(I,()=>Ke,(R,k)=>{k(R,{children:(E,y)=>{te();var v=ne();re(()=>ee(v,e.title)),d(E,v)},$$slots:{default:!0}})});var T=ie(I,2);D(T,()=>He,(R,k)=>{k(R,{children:(E,y)=>{te();var v=ne();re(()=>ee(v,e.message)),d(E,v)},$$slots:{default:!0}})}),d(H,F)},$$slots:{default:!0}})});var g=ie(G,2);D(g,()=>Te,(V,Z)=>{Z(V,{children:(H,$)=>{var F=rt(),I=S(F);{let R=L(()=>me({variant:"ghost"}));D(I,()=>Ue,(k,E)=>{E(k,{get class(){return i(R)},get onclick(){return e.oncancel},children:(y,v)=>{te();var C=ne();re(()=>ee(C,p())),d(y,C)},$$slots:{default:!0}})})}var T=ie(I,2);{let R=L(()=>me({variant:_()?"destructive":"accent"}));D(T,()=>ze,(k,E)=>{E(k,{get class(){return i(R)},get onclick(){return e.onconfirm},children:(y,v)=>{te();var C=ne();re(()=>ee(C,m())),d(y,C)},$$slots:{default:!0}})})}d(H,F)},$$slots:{default:!0}})}),d(o,O)},$$slots:{default:!0}})}),d(u,a)},$$slots:{default:!0}})}),d(c,M),Y()}export{mt as C,ht as I,gt as P,pt as R,Pt as S,_t as T,yt as a,bt as b,ue as p};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{bB as Le,aE as Ge,e as A,g as U,s as P,aF as ne,bC as vt}from"./DwMoyB6r.js";class Ae{constructor(t,n){this.status=t,typeof n=="string"?this.body={message:n}:n?this.body=n:this.body={message:`Error: ${t}`}}toString(){return JSON.stringify(this.body)}}class Ue{constructor(t,n){this.status=t,this.location=n}}class Pe extends Error{constructor(t,n,r){super(r),this.status=t,this.text=n}}new URL("sveltekit-internal://");function wt(e,t){return e==="/"||t==="ignore"?e:t==="never"?e.endsWith("/")?e.slice(0,-1):e:t==="always"&&!e.endsWith("/")?e+"/":e}function yt(e){return e.split("%25").map(decodeURI).join("%25")}function bt(e){for(const t in e)e[t]=decodeURIComponent(e[t]);return e}function me({href:e}){return e.split("#")[0]}function kt(e,t,n,r=!1){const a=new URL(e);Object.defineProperty(a,"searchParams",{value:new Proxy(a.searchParams,{get(s,o){if(o==="get"||o==="getAll"||o==="has")return(c,...d)=>(n(c),s[o](c,...d));t();const l=Reflect.get(s,o);return typeof l=="function"?l.bind(s):l}}),enumerable:!0,configurable:!0});const i=["href","pathname","search","toString","toJSON"];r&&i.push("hash");for(const s of i)Object.defineProperty(a,s,{get(){return t(),e[s]},enumerable:!0,configurable:!0});return a}function Et(...e){let t=5381;for(const n of e)if(typeof n=="string"){let r=n.length;for(;r;)t=t*33^n.charCodeAt(--r)}else if(ArrayBuffer.isView(n)){const r=new Uint8Array(n.buffer,n.byteOffset,n.byteLength);let a=r.length;for(;a;)t=t*33^r[--a]}else throw new TypeError("value must be a string or TypedArray");return(t>>>0).toString(36)}new TextEncoder;new TextDecoder;function St(e){const t=atob(e),n=new Uint8Array(t.length);for(let r=0;r<t.length;r++)n[r]=t.charCodeAt(r);return n}const Rt=window.fetch;window.fetch=(e,t)=>((e instanceof Request?e.method:t?.method||"GET")!=="GET"&&G.delete(Te(e)),Rt(e,t));const G=new Map;function xt(e,t){const n=Te(e,t),r=document.querySelector(n);if(r?.textContent){r.remove();let{body:a,...i}=JSON.parse(r.textContent);const s=r.getAttribute("data-ttl");return s&&G.set(n,{body:a,init:i,ttl:1e3*Number(s)}),r.getAttribute("data-b64")!==null&&(a=St(a)),Promise.resolve(new Response(a,i))}return window.fetch(e,t)}function Lt(e,t,n){if(G.size>0){const r=Te(e,n),a=G.get(r);if(a){if(performance.now()<a.ttl&&["default","force-cache","only-if-cached",void 0].includes(n?.cache))return new Response(a.body,a.init);G.delete(r)}}return window.fetch(t,n)}function Te(e,t){let r=`script[data-sveltekit-fetched][data-url=${JSON.stringify(e instanceof Request?e.url:e)}]`;if(t?.headers||t?.body){const a=[];t.headers&&a.push([...new Headers(t.headers)].join(",")),t.body&&(typeof t.body=="string"||ArrayBuffer.isView(t.body))&&a.push(t.body),r+=`[data-hash="${Et(...a)}"]`}return r}const At=/^(\[)?(\.\.\.)?(\w+)(?:=(\w+))?(\])?$/;function Ut(e){const t=[];return{pattern:e==="/"?/^\/$/:new RegExp(`^${Tt(e).map(r=>{const a=/^\[\.\.\.(\w+)(?:=(\w+))?\]$/.exec(r);if(a)return t.push({name:a[1],matcher:a[2],optional:!1,rest:!0,chained:!0}),"(?:/([^]*))?";const i=/^\[\[(\w+)(?:=(\w+))?\]\]$/.exec(r);if(i)return t.push({name:i[1],matcher:i[2],optional:!0,rest:!1,chained:!0}),"(?:/([^/]+))?";if(!r)return;const s=r.split(/\[(.+?)\](?!\])/);return"/"+s.map((l,c)=>{if(c%2){if(l.startsWith("x+"))return _e(String.fromCharCode(parseInt(l.slice(2),16)));if(l.startsWith("u+"))return _e(String.fromCharCode(...l.slice(2).split("-").map(v=>parseInt(v,16))));const d=At.exec(l),[,p,f,u,h]=d;return t.push({name:u,matcher:h,optional:!!p,rest:!!f,chained:f?c===1&&s[0]==="":!1}),f?"([^]*?)":p?"([^/]*)?":"([^/]+?)"}return _e(l)}).join("")}).join("")}/?$`),params:t}}function Pt(e){return e!==""&&!/^\([^)]+\)$/.test(e)}function Tt(e){return e.slice(1).split("/").filter(Pt)}function It(e,t,n){const r={},a=e.slice(1),i=a.filter(o=>o!==void 0);let s=0;for(let o=0;o<t.length;o+=1){const l=t[o];let c=a[o-s];if(l.chained&&l.rest&&s&&(c=a.slice(o-s,o+1).filter(d=>d).join("/"),s=0),c===void 0)if(l.rest)c="";else continue;if(!l.matcher||n[l.matcher](c)){r[l.name]=c;const d=t[o+1],p=a[o+1];d&&!d.rest&&d.optional&&p&&l.chained&&(s=0),!d&&!p&&Object.keys(r).length===i.length&&(s=0);continue}if(l.optional&&l.chained){s++;continue}return}if(!s)return r}function _e(e){return e.normalize().replace(/[[\]]/g,"\\$&").replace(/%/g,"%25").replace(/\//g,"%2[Ff]").replace(/\?/g,"%3[Ff]").replace(/#/g,"%23").replace(/[.*+?^${}()|\\]/g,"\\$&")}function Ot({nodes:e,server_loads:t,dictionary:n,matchers:r}){const a=new Set(t);return Object.entries(n).map(([o,[l,c,d]])=>{const{pattern:p,params:f}=Ut(o),u={id:o,exec:h=>{const v=p.exec(h);if(v)return It(v,f,r)},errors:[1,...d||[]].map(h=>e[h]),layouts:[0,...c||[]].map(s),leaf:i(l)};return u.errors.length=u.layouts.length=Math.max(u.errors.length,u.layouts.length),u});function i(o){const l=o<0;return l&&(o=~o),[l,e[o]]}function s(o){return o===void 0?o:[a.has(o),e[o]]}}function Xe(e,t=JSON.parse){try{return t(sessionStorage[e])}catch{}}function Me(e,t,n=JSON.stringify){const r=n(t);try{sessionStorage[e]=r}catch{}}const x=globalThis.__sveltekit_lx8yt1?.base??"",Ct=globalThis.__sveltekit_lx8yt1?.assets??x??"",$t="1774987361142",Qe="sveltekit:snapshot",Ze="sveltekit:scroll",et="sveltekit:states",jt="sveltekit:pageurl",B="sveltekit:history",H="sveltekit:navigation",N={tap:1,hover:2,viewport:3,eager:4,off:-1,false:-1},he=location.origin;function Ie(e){if(e instanceof URL)return e;let t=document.baseURI;if(!t){const n=document.getElementsByTagName("base");t=n.length?n[0].href:document.URL}return new URL(e,t)}function D(){return{x:pageXOffset,y:pageYOffset}}function V(e,t){return e.getAttribute(`data-sveltekit-${t}`)}const He={...N,"":N.hover};function tt(e){let t=e.assignedSlot??e.parentNode;return t?.nodeType===11&&(t=t.host),t}function nt(e,t){for(;e&&e!==t;){if(e.nodeName.toUpperCase()==="A"&&e.hasAttribute("href"))return e;e=tt(e)}}function be(e,t,n){let r;try{if(r=new URL(e instanceof SVGAElement?e.href.baseVal:e.href,document.baseURI),n&&r.hash.match(/^#[^/]/)){const o=location.hash.split("#")[1]||"/";r.hash=`#${o}${r.hash}`}}catch{}const a=e instanceof SVGAElement?e.target.baseVal:e.target,i=!r||!!a||pe(r,t,n)||(e.getAttribute("rel")||"").split(/\s+/).includes("external"),s=r?.origin===he&&e.hasAttribute("download");return{url:r,external:i,target:a,download:s}}function re(e){let t=null,n=null,r=null,a=null,i=null,s=null,o=e;for(;o&&o!==document.documentElement;)r===null&&(r=V(o,"preload-code")),a===null&&(a=V(o,"preload-data")),t===null&&(t=V(o,"keepfocus")),n===null&&(n=V(o,"noscroll")),i===null&&(i=V(o,"reload")),s===null&&(s=V(o,"replacestate")),o=tt(o);function l(c){switch(c){case"":case"true":return!0;case"off":case"false":return!1;default:return}}return{preload_code:He[r??"off"],preload_data:He[a??"off"],keepfocus:l(t),noscroll:l(n),reload:l(i),replace_state:l(s)}}function We(e){const t=Le(e);let n=!0;function r(){n=!0,t.update(s=>s)}function a(s){n=!1,t.set(s)}function i(s){let o;return t.subscribe(l=>{(o===void 0||n&&l!==o)&&s(o=l)})}return{notify:r,set:a,subscribe:i}}const rt={v:()=>{}};function Nt(){const{set:e,subscribe:t}=Le(!1);let n;async function r(){clearTimeout(n);try{const a=await fetch(`${Ct}/_app/version.json`,{headers:{pragma:"no-cache","cache-control":"no-cache"}});if(!a.ok)return!1;const s=(await a.json()).version!==$t;return s&&(e(!0),rt.v(),clearTimeout(n)),s}catch{return!1}}return{subscribe:t,check:r}}function pe(e,t,n){return e.origin!==he||!e.pathname.startsWith(t)?!0:n?e.pathname!==location.pathname:!1}function cn(e){}const at=new Set(["load","prerender","csr","ssr","trailingSlash","config"]);[...at];const Dt=new Set([...at]);[...Dt];function qt(e){return e.filter(t=>t!=null)}function Oe(e){return e instanceof Ae||e instanceof Pe?e.status:500}function Vt(e){return e instanceof Pe?e.text:"Internal Error"}let b,W,ve;const Bt=Ge.toString().includes("$$")||/function \w+\(\) \{\}/.test(Ge.toString());Bt?(b={data:{},form:null,error:null,params:{},route:{id:null},state:{},status:-1,url:new URL("https://example.com")},W={current:null},ve={current:!1}):(b=new class{#e=A({});get data(){return U(this.#e)}set data(t){P(this.#e,t)}#t=A(null);get form(){return U(this.#t)}set form(t){P(this.#t,t)}#n=A(null);get error(){return U(this.#n)}set error(t){P(this.#n,t)}#r=A({});get params(){return U(this.#r)}set params(t){P(this.#r,t)}#a=A({id:null});get route(){return U(this.#a)}set route(t){P(this.#a,t)}#o=A({});get state(){return U(this.#o)}set state(t){P(this.#o,t)}#s=A(-1);get status(){return U(this.#s)}set status(t){P(this.#s,t)}#i=A(new URL("https://example.com"));get url(){return U(this.#i)}set url(t){P(this.#i,t)}},W=new class{#e=A(null);get current(){return U(this.#e)}set current(t){P(this.#e,t)}},ve=new class{#e=A(!1);get current(){return U(this.#e)}set current(t){P(this.#e,t)}},rt.v=()=>ve.current=!0);function ot(e){Object.assign(b,e)}const Je={spanContext(){return Ft},setAttribute(){return this},setAttributes(){return this},addEvent(){return this},setStatus(){return this},updateName(){return this},end(){return this},isRecording(){return!1},recordException(){return this},addLink(){return this},addLinks(){return this}},Ft={traceId:"",spanId:"",traceFlags:0},Kt=new Set(["icon","shortcut icon","apple-touch-icon"]),j=Xe(Ze)??{},J=Xe(Qe)??{},$={url:We({}),page:We({}),navigating:Le(null),updated:Nt()};function Ce(e){j[e]=D()}function Gt(e,t){let n=e+1;for(;j[n];)delete j[n],n+=1;for(n=t+1;J[n];)delete J[n],n+=1}function Y(e,t=!1){return t?location.replace(e.href):location.href=e.href,new Promise(()=>{})}async function st(){if("serviceWorker"in navigator){const e=await navigator.serviceWorker.getRegistration(x||"/");e&&await e.update()}}function ke(){}let $e,Ee,ae,T,Se,w;const oe=[],se=[];let L=null;function ie(){L?.fork?.then(e=>e?.discard()),L=null}const te=new Map,it=new Set,Mt=new Set,M=new Set;let _={branch:[],error:null,url:null},lt=!1,le=!1,Ye=!0,z=!1,K=!1,ct=!1,Q=!1,je,y,R,I;const ce=new Set;let we;const ue=new Map;async function hn(e,t,n){globalThis.__sveltekit_lx8yt1?.data&&globalThis.__sveltekit_lx8yt1.data,document.URL!==location.href&&(location.href=location.href),w=e,await e.hooks.init?.(),$e=Ot(e),T=document.documentElement,Se=t,Ee=e.nodes[0],ae=e.nodes[1],Ee(),ae(),y=history.state?.[B],R=history.state?.[H],y||(y=R=Date.now(),history.replaceState({...history.state,[B]:y,[H]:R},""));const r=j[y];function a(){r&&(history.scrollRestoration="manual",scrollTo(r.x,r.y))}n?(a(),await rn(Se,n)):(await F({type:"enter",url:Ie(w.hash?sn(new URL(location.href)):location.href),replace_state:!0}),a()),nn()}async function Ht(e=!0,t=!0){if(await(we||=Promise.resolve()),!we)return;we=null;const n=I={},r=await Z(_.url,!0);if(ie(),Q&&ue.forEach(({resource:a})=>{a.refresh?.()}),e){const a=b.state,i=r&&await Ve(r);if(!i||n!==I)return;if(i.type==="redirect")return Ne(new URL(i.location,_.url).href,{replaceState:!0},1,n);t||(i.props.page.state=a),ot(i.props.page),_=i.state,Re(),je.$set(i.props)}else Re();await Promise.all([...ue.values()].map(({resource:a})=>a)).catch(ke)}function Re(){oe.length=0,Q=!1}function ut(e){se.some(t=>t?.snapshot)&&(J[e]=se.map(t=>t?.snapshot?.capture()))}function ft(e){J[e]?.forEach((t,n)=>{se[n]?.snapshot?.restore(t)})}function ze(){Ce(y),Me(Ze,j),ut(R),Me(Qe,J)}async function Ne(e,t,n,r){let a;t.invalidateAll&&ie(),await F({type:"goto",url:Ie(e),keepfocus:t.keepFocus,noscroll:t.noScroll,replace_state:t.replaceState,state:t.state,redirect_count:n,nav_token:r,accept:()=>{t.invalidateAll&&(Q=!0,a=[...ue.keys()]),t.invalidate&&t.invalidate.forEach(tn)}}),t.invalidateAll&&ne().then(ne).then(()=>{ue.forEach(({resource:i},s)=>{a?.includes(s)&&i.refresh?.()})})}async function Wt(e){if(e.id!==L?.id){ie();const t={};ce.add(t),L={id:e.id,token:t,promise:Ve({...e,preload:t}).then(n=>(ce.delete(t),n.type==="loaded"&&n.state.error&&ie(),n)),fork:null}}return L.promise}async function ye(e){const t=(await Z(e,!1))?.route;t&&await Promise.all([...t.layouts,t.leaf].filter(Boolean).map(n=>n[1]()))}async function dt(e,t,n){_=e.state;const r=document.querySelector("style[data-sveltekit]");if(r&&r.remove(),Object.assign(b,e.props.page),je=new w.root({target:t,props:{...e.props,stores:$,components:se},hydrate:n,sync:!1}),await Promise.resolve(),ft(R),n){const a={from:null,to:{params:_.params,route:{id:_.route?.id??null},url:new URL(location.href),scroll:j[y]??D()},willUnload:!1,type:"enter",complete:Promise.resolve()};M.forEach(i=>i(a))}le=!0}function fe({url:e,params:t,branch:n,status:r,error:a,route:i,form:s}){let o="never";if(x&&(e.pathname===x||e.pathname===x+"/"))o="always";else for(const u of n)u?.slash!==void 0&&(o=u.slash);e.pathname=wt(e.pathname,o),e.search=e.search;const l={type:"loaded",state:{url:e,params:t,branch:n,error:a,route:i},props:{constructors:qt(n).map(u=>u.node.component),page:Ke(b)}};s!==void 0&&(l.props.form=s);let c={},d=!b,p=0;for(let u=0;u<Math.max(n.length,_.branch.length);u+=1){const h=n[u],v=_.branch[u];h?.data!==v?.data&&(d=!0),h&&(c={...c,...h.data},d&&(l.props[`data_${p}`]=c),p+=1)}return(!_.url||e.href!==_.url.href||_.error!==a||s!==void 0&&s!==b.form||d)&&(l.props.page={error:a,params:t,route:{id:i?.id??null},state:{},status:r,url:new URL(e),form:s??null,data:d?c:b.data}),l}async function De({loader:e,parent:t,url:n,params:r,route:a,server_data_node:i}){let s=null,o=!0;const l={dependencies:new Set,params:new Set,parent:!1,route:!1,url:!1,search_params:new Set},c=await e();if(c.universal?.load){let d=function(...f){for(const u of f){const{href:h}=new URL(u,n);l.dependencies.add(h)}};const p={tracing:{enabled:!1,root:Je,current:Je},route:new Proxy(a,{get:(f,u)=>(o&&(l.route=!0),f[u])}),params:new Proxy(r,{get:(f,u)=>(o&&l.params.add(u),f[u])}),data:i?.data??null,url:kt(n,()=>{o&&(l.url=!0)},f=>{o&&l.search_params.add(f)},w.hash),async fetch(f,u){f instanceof Request&&(u={body:f.method==="GET"||f.method==="HEAD"?void 0:await f.blob(),cache:f.cache,credentials:f.credentials,headers:[...f.headers].length>0?f?.headers:void 0,integrity:f.integrity,keepalive:f.keepalive,method:f.method,mode:f.mode,redirect:f.redirect,referrer:f.referrer,referrerPolicy:f.referrerPolicy,signal:f.signal,...u});const{resolved:h,promise:v}=ht(f,u,n);return o&&d(h.href),v},setHeaders:()=>{},depends:d,parent(){return o&&(l.parent=!0),t()},untrack(f){o=!1;try{return f()}finally{o=!0}}};s=await c.universal.load.call(null,p)??null}return{node:c,loader:e,server:i,universal:c.universal?.load?{type:"data",data:s,uses:l}:null,data:s??i?.data??null,slash:c.universal?.trailingSlash??i?.slash}}function ht(e,t,n){let r=e instanceof Request?e.url:e;const a=new URL(r,n);a.origin===n.origin&&(r=a.href.slice(n.origin.length));const i=le?Lt(r,a.href,t):xt(r,t);return{resolved:a,promise:i}}function Jt(e,t,n,r,a,i){if(Q)return!0;if(!a)return!1;if(a.parent&&e||a.route&&t||a.url&&n)return!0;for(const s of a.search_params)if(r.has(s))return!0;for(const s of a.params)if(i[s]!==_.params[s])return!0;for(const s of a.dependencies)if(oe.some(o=>o(new URL(s))))return!0;return!1}function qe(e,t){return e?.type==="data"?e:e?.type==="skip"?t??null:null}function Yt(e,t){if(!e)return new Set(t.searchParams.keys());const n=new Set([...e.searchParams.keys(),...t.searchParams.keys()]);for(const r of n){const a=e.searchParams.getAll(r),i=t.searchParams.getAll(r);a.every(s=>i.includes(s))&&i.every(s=>a.includes(s))&&n.delete(r)}return n}function zt({error:e,url:t,route:n,params:r}){return{type:"loaded",state:{error:e,url:t,route:n,params:r,branch:[]},props:{page:Ke(b),constructors:[]}}}async function Ve({id:e,invalidating:t,url:n,params:r,route:a,preload:i}){if(L?.id===e)return ce.delete(L.token),L.promise;const{errors:s,layouts:o,leaf:l}=a,c=[...o,l];s.forEach(m=>m?.().catch(()=>{})),c.forEach(m=>m?.[1]().catch(()=>{}));const d=_.url?e!==de(_.url):!1,p=_.route?a.id!==_.route.id:!1,f=Yt(_.url,n);let u=!1;const h=c.map(async(m,g)=>{if(!m)return;const E=_.branch[g];return m[1]===E?.loader&&!Jt(u,p,d,f,E.universal?.uses,r)?E:(u=!0,De({loader:m[1],url:n,params:r,route:a,parent:async()=>{const O={};for(let C=0;C<g;C+=1)Object.assign(O,(await h[C])?.data);return O},server_data_node:qe(m[0]?{type:"skip"}:null,m[0]?E?.server:void 0)}))});for(const m of h)m.catch(()=>{});const v=[];for(let m=0;m<c.length;m+=1)if(c[m])try{v.push(await h[m])}catch(g){if(g instanceof Ue)return{type:"redirect",location:g.location};if(ce.has(i))return zt({error:await X(g,{params:r,url:n,route:{id:a.id}}),url:n,params:r,route:a});let E=Oe(g),S;if(g instanceof Ae)S=g.body;else{if(await $.updated.check())return await st(),await Y(n);S=await X(g,{params:r,url:n,route:{id:a.id}})}const O=await Xt(m,v,s);return O?fe({url:n,params:r,branch:v.slice(0,O.idx).concat(O.node),status:E,error:S,route:a}):await gt(n,{id:a.id},S,E)}else v.push(void 0);return fe({url:n,params:r,branch:v,status:200,error:null,route:a,form:t?void 0:null})}async function Xt(e,t,n){for(;e--;)if(n[e]){let r=e;for(;!t[r];)r-=1;try{return{idx:r+1,node:{node:await n[e](),loader:n[e],data:{},server:null,universal:null}}}catch{continue}}}async function Be({status:e,error:t,url:n,route:r}){const a={};let i=null;try{const s=await De({loader:Ee,url:n,params:a,route:r,parent:()=>Promise.resolve({}),server_data_node:qe(i)}),o={node:await ae(),loader:ae,universal:null,server:null,data:null};return fe({url:n,params:a,branch:[s,o],status:e,error:t,route:null})}catch(s){if(s instanceof Ue)return Ne(new URL(s.location,location.href),{},0);throw s}}async function Qt(e){const t=e.href;if(te.has(t))return te.get(t);let n;try{const r=(async()=>{let a=await w.hooks.reroute({url:new URL(e),fetch:async(i,s)=>ht(i,s,e).promise})??e;if(typeof a=="string"){const i=new URL(e);w.hash?i.hash=a:i.pathname=a,a=i}return a})();te.set(t,r),n=await r}catch{te.delete(t);return}return n}async function Z(e,t){if(e&&!pe(e,x,w.hash)){const n=await Qt(e);if(!n)return;const r=Zt(n);for(const a of $e){const i=a.exec(r);if(i)return{id:de(e),invalidating:t,route:a,params:bt(i),url:e}}}}function Zt(e){return yt(w.hash?e.hash.replace(/^#/,"").replace(/[?#].+/,""):e.pathname.slice(x.length))||"/"}function de(e){return(w.hash?e.hash.replace(/^#/,""):e.pathname)+e.search}function pt({url:e,type:t,intent:n,delta:r,event:a,scroll:i}){let s=!1;const o=Fe(_,n,e,t,i??null);r!==void 0&&(o.navigation.delta=r),a!==void 0&&(o.navigation.event=a);const l={...o.navigation,cancel:()=>{s=!0,o.reject(new Error("navigation cancelled"))}};return z||it.forEach(c=>c(l)),s?null:o}async function F({type:e,url:t,popped:n,keepfocus:r,noscroll:a,replace_state:i,state:s={},redirect_count:o=0,nav_token:l={},accept:c=ke,block:d=ke,event:p}){const f=I;I=l;const u=await Z(t,!1),h=e==="enter"?Fe(_,u,t,e):pt({url:t,type:e,delta:n?.delta,intent:u,scroll:n?.scroll,event:p});if(!h){d(),I===l&&(I=f);return}const v=y,m=R;c(),z=!0,le&&h.navigation.type!=="enter"&&$.navigating.set(W.current=h.navigation);let g=u&&await Ve(u);if(!g){if(pe(t,x,w.hash))return await Y(t,i);g=await gt(t,{id:null},await X(new Pe(404,"Not Found",`Not found: ${t.pathname}`),{url:t,params:{},route:{id:null}}),404,i)}if(t=u?.url||t,I!==l)return h.reject(new Error("navigation aborted")),!1;if(g.type==="redirect"){if(o<20){await F({type:e,url:new URL(g.location,t),popped:n,keepfocus:r,noscroll:a,replace_state:i,state:s,redirect_count:o+1,nav_token:l}),h.fulfil(void 0);return}g=await Be({status:500,error:await X(new Error("Redirect loop"),{url:t,params:{},route:{id:null}}),url:t,route:{id:null}})}else g.props.page.status>=400&&await $.updated.check()&&(await st(),await Y(t,i));if(Re(),Ce(v),ut(m),g.props.page.url.pathname!==t.pathname&&(t.pathname=g.props.page.url.pathname),s=n?n.state:s,!n){const k=i?0:1,ee={[B]:y+=k,[H]:R+=k,[et]:s};(i?history.replaceState:history.pushState).call(history,ee,"",t),i||Gt(y,R)}const E=u&&L?.id===u.id?L.fork:null;L=null,g.props.page.state=s;let S;if(le){const k=(await Promise.all(Array.from(Mt,q=>q(h.navigation)))).filter(q=>typeof q=="function");if(k.length>0){let q=function(){k.forEach(ge=>{M.delete(ge)})};k.push(q),k.forEach(ge=>{M.add(ge)})}_=g.state,g.props.page&&(g.props.page.url=t);const ee=E&&await E;ee?S=ee.commit():(je.$set(g.props),ot(g.props.page),S=vt?.()),ct=!0}else await dt(g,Se,!1);const{activeElement:O}=document;await S,await ne(),await ne();let C=null;if(Ye){const k=n?n.scroll:a?D():null;k?scrollTo(k.x,k.y):(C=t.hash&&document.getElementById(mt(t)))?C.scrollIntoView():scrollTo(0,0)}const _t=document.activeElement!==O&&document.activeElement!==document.body;!r&&!_t&&on(t,!C),Ye=!0,g.props.page&&Object.assign(b,g.props.page),z=!1,e==="popstate"&&ft(R),h.fulfil(void 0),h.navigation.to&&(h.navigation.to.scroll=D()),M.forEach(k=>k(h.navigation)),$.navigating.set(W.current=null)}async function gt(e,t,n,r,a){return e.origin===he&&e.pathname===location.pathname&&!lt?await Be({status:r,error:n,url:e,route:t}):await Y(e,a)}function en(){let e,t={element:void 0,href:void 0},n;T.addEventListener("mousemove",o=>{const l=o.target;clearTimeout(e),e=setTimeout(()=>{i(l,N.hover)},20)});function r(o){o.defaultPrevented||i(o.composedPath()[0],N.tap)}T.addEventListener("mousedown",r),T.addEventListener("touchstart",r,{passive:!0});const a=new IntersectionObserver(o=>{for(const l of o)l.isIntersecting&&(ye(new URL(l.target.href)),a.unobserve(l.target))},{threshold:0});async function i(o,l){const c=nt(o,T),d=c===t.element&&c?.href===t.href&&l>=n;if(!c||d)return;const{url:p,external:f,download:u}=be(c,x,w.hash);if(f||u)return;const h=re(c),v=p&&de(_.url)===de(p);if(!(h.reload||v))if(l<=h.preload_data){t={element:c,href:c.href},n=N.tap;const m=await Z(p,!1);if(!m)return;Wt(m)}else l<=h.preload_code&&(t={element:c,href:c.href},n=l,ye(p))}function s(){a.disconnect();for(const o of T.querySelectorAll("a")){const{url:l,external:c,download:d}=be(o,x,w.hash);if(c||d)continue;const p=re(o);p.reload||(p.preload_code===N.viewport&&a.observe(o),p.preload_code===N.eager&&ye(l))}}M.add(s),s()}function X(e,t){if(e instanceof Ae)return e.body;const n=Oe(e),r=Vt(e);return w.hooks.handleError({error:e,event:t,status:n,message:r})??{message:r}}function pn(e,t={}){return e=new URL(Ie(e)),e.origin!==he?Promise.reject(new Error("goto: invalid URL")):Ne(e,t,0)}function tn(e){if(typeof e=="function")oe.push(e);else{const{href:t}=new URL(e,location.href);oe.push(n=>n.href===t)}}function gn(){return Q=!0,Ht()}function nn(){history.scrollRestoration="manual",addEventListener("beforeunload",t=>{let n=!1;if(ze(),!z){const r=Fe(_,void 0,null,"leave"),a={...r.navigation,cancel:()=>{n=!0,r.reject(new Error("navigation cancelled"))}};it.forEach(i=>i(a))}n?(t.preventDefault(),t.returnValue=""):history.scrollRestoration="auto"}),addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&ze()}),navigator.connection?.saveData||en(),T.addEventListener("click",async t=>{if(t.button||t.which!==1||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.defaultPrevented)return;const n=nt(t.composedPath()[0],T);if(!n)return;const{url:r,external:a,target:i,download:s}=be(n,x,w.hash);if(!r)return;if(i==="_parent"||i==="_top"){if(window.parent!==window)return}else if(i&&i!=="_self")return;const o=re(n);if(!(n instanceof SVGAElement)&&r.protocol!==location.protocol&&!(r.protocol==="https:"||r.protocol==="http:")||s)return;const[c,d]=(w.hash?r.hash.replace(/^#/,""):r.href).split("#"),p=c===me(location);if(a||o.reload&&(!p||!d)){pt({url:r,type:"link",event:t})?z=!0:t.preventDefault();return}if(d!==void 0&&p){const[,f]=_.url.href.split("#");if(f===d){if(t.preventDefault(),d===""||d==="top"&&n.ownerDocument.getElementById("top")===null)scrollTo({top:0});else{const u=n.ownerDocument.getElementById(decodeURIComponent(d));u&&(u.scrollIntoView(),u.focus())}return}if(K=!0,Ce(y),e(r),!o.replace_state)return;K=!1}t.preventDefault(),await new Promise(f=>{requestAnimationFrame(()=>{setTimeout(f,0)}),setTimeout(f,100)}),await F({type:"link",url:r,keepfocus:o.keepfocus,noscroll:o.noscroll,replace_state:o.replace_state??r.href===location.href,event:t})}),T.addEventListener("submit",t=>{if(t.defaultPrevented)return;const n=HTMLFormElement.prototype.cloneNode.call(t.target),r=t.submitter;if((r?.formTarget||n.target)==="_blank"||(r?.formMethod||n.method)!=="get")return;const s=new URL(r?.hasAttribute("formaction")&&r?.formAction||n.action);if(pe(s,x,!1))return;const o=t.target,l=re(o);if(l.reload)return;t.preventDefault(),t.stopPropagation();const c=new FormData(o,r);s.search=new URLSearchParams(c).toString(),F({type:"form",url:s,keepfocus:l.keepfocus,noscroll:l.noscroll,replace_state:l.replace_state??s.href===location.href,event:t})}),addEventListener("popstate",async t=>{if(!xe){if(t.state?.[B]){const n=t.state[B];if(I={},n===y)return;const r=j[n],a=t.state[et]??{},i=new URL(t.state[jt]??location.href),s=t.state[H],o=_.url?me(location)===me(_.url):!1;if(s===R&&(ct||o)){a!==b.state&&(b.state=a),e(i),j[y]=D(),r&&scrollTo(r.x,r.y),y=n;return}const c=n-y;await F({type:"popstate",url:i,popped:{state:a,scroll:r,delta:c},accept:()=>{y=n,R=s},block:()=>{history.go(-c)},nav_token:I,event:t})}else if(!K){const n=new URL(location.href);e(n),w.hash&&location.reload()}}}),addEventListener("hashchange",()=>{K&&(K=!1,history.replaceState({...history.state,[B]:++y,[H]:R},"",location.href))});for(const t of document.querySelectorAll("link"))Kt.has(t.rel)&&(t.href=t.href);addEventListener("pageshow",t=>{t.persisted&&$.navigating.set(W.current=null)});function e(t){_.url=b.url=t,$.page.set(Ke(b)),$.page.notify()}}async function rn(e,{status:t=200,error:n,node_ids:r,params:a,route:i,server_route:s,data:o,form:l}){lt=!0;const c=new URL(location.href);let d;({params:a={},route:i={id:null}}=await Z(c,!1)||{}),d=$e.find(({id:u})=>u===i.id);let p,f=!0;try{const u=r.map(async(v,m)=>{const g=o[m];return g?.uses&&(g.uses=an(g.uses)),De({loader:w.nodes[v],url:c,params:a,route:i,parent:async()=>{const E={};for(let S=0;S<m;S+=1)Object.assign(E,(await u[S]).data);return E},server_data_node:qe(g)})}),h=await Promise.all(u);if(d){const v=d.layouts;for(let m=0;m<v.length;m++)v[m]||h.splice(m,0,void 0)}p=fe({url:c,params:a,branch:h,status:t,error:n,form:l,route:d??null})}catch(u){if(u instanceof Ue){await Y(new URL(u.location,location.href));return}p=await Be({status:Oe(u),error:await X(u,{url:c,params:a,route:i}),url:c,route:i}),e.textContent="",f=!1}p.props.page&&(p.props.page.state={}),await dt(p,e,f)}function an(e){return{dependencies:new Set(e?.dependencies??[]),params:new Set(e?.params??[]),parent:!!e?.parent,route:!!e?.route,url:!!e?.url,search_params:new Set(e?.search_params??[])}}let xe=!1;function on(e,t=!0){const n=document.querySelector("[autofocus]");if(n)n.focus();else{const r=mt(e);if(r&&document.getElementById(r)){const{x:i,y:s}=D();setTimeout(()=>{const o=history.state;xe=!0,location.replace(new URL(`#${r}`,location.href)),history.replaceState(o,"",e),t&&scrollTo(i,s),xe=!1})}else{const i=document.body,s=i.getAttribute("tabindex");i.tabIndex=-1,i.focus({preventScroll:!0,focusVisible:!1}),s!==null?i.setAttribute("tabindex",s):i.removeAttribute("tabindex")}const a=getSelection();if(a&&a.type!=="None"){const i=[];for(let s=0;s<a.rangeCount;s+=1)i.push(a.getRangeAt(s));setTimeout(()=>{if(a.rangeCount===i.length){for(let s=0;s<a.rangeCount;s+=1){const o=i[s],l=a.getRangeAt(s);if(o.commonAncestorContainer!==l.commonAncestorContainer||o.startContainer!==l.startContainer||o.endContainer!==l.endContainer||o.startOffset!==l.startOffset||o.endOffset!==l.endOffset)return}a.removeAllRanges()}})}}}function Fe(e,t,n,r,a=null){let i,s;const o=new Promise((c,d)=>{i=c,s=d});return o.catch(()=>{}),{navigation:{from:{params:e.params,route:{id:e.route?.id??null},url:e.url,scroll:D()},to:n&&{params:t?.params??null,route:{id:t?.route?.id??null},url:n,scroll:a},willUnload:!t,type:r,complete:o},fulfil:i,reject:s}}function Ke(e){return{data:e.data,error:e.error,form:e.form,params:e.params,route:e.route,state:e.state,status:e.status,url:e.url}}function sn(e){const t=new URL(e);return t.hash=decodeURIComponent(e.hash),t}function mt(e){let t;if(w.hash){const[,,n]=e.hash.split("#",3);t=n??""}else t=e.hash.slice(1);return decodeURIComponent(t)}export{hn as a,pn as g,gn as i,cn as l,b as p,$ as s};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as St,p as le,c as q,a as u,b as D,s as Ht,f as Ot,d as fe,g as Y,t as Nt,e as ve}from"./S3zzfNyy.js";import{e as F,s as c,g as o,ab as k,p as _t,a0 as A,b as yt,c as g,ad as Kt,r as _,l as At,d as et,a as Gt,n as J,m as Mt,t as dt,aC as me,a3 as be,aa as z}from"./DwMoyB6r.js";import{b as ut,a as ct,r as ge,s as _e}from"./BYqzpKy3.js";import{i as S,b as ye}from"./DVe5EzgB.js";import{e as Ce}from"./BnuoIjma.js";import{c as X}from"./BdfrxCf_.js";import{s as Wt}from"./koVwyjnn.js";import{b as we,B as Pe}from"./ClyoIkBa.js";import{p as f,s as ee,r as he,l as Vt}from"./DLfZVgnp.js";import{g as oe}from"./3hOCGOkU.js";import{i as Jt}from"./CkRzikAP.js";import{A as xe,C as re}from"./BEQ3s_NB.js";import{n as tt}from"./DiQyiOFg.js";import{v as $t}from"./dcQMpFpV.js";import{w as He}from"./C88BjBh_.js";import{w as Ut,G as Ae,H as gt,C as Me,a as de,I as Ve,J as Lt,E as Oe,S as Te,K as ue,c as ke,L as Ie,N as ne,h as I,d as De,f as ce,n as xt,P as ze,p as Fe,m as Bt,q as se,r as Ee,F as Se,A as Ne,t as We,u as $e,v as Be,x as Ke,y as Le,z as Ye,B as Xe}from"./CMw7AR0M.js";function ie(v,t){const[e,s]=v;let n=!1;const r=t.length;for(let d=0,i=r-1;d<r;i=d++){const[p,P]=t[d]??[0,0],[y,a]=t[i]??[0,0];P>=s!=a>=s&&e<=(y-p)*(s-P)/(a-P)+p&&(n=!n)}return n}function ae(v,t){return v[0]>=t.left&&v[0]<=t.right&&v[1]>=t.top&&v[1]<=t.bottom}function qe(v,t){const e=v.left+v.width/2,s=v.top+v.height/2,n=t.left+t.width/2,r=t.top+t.height/2,d=n-e,i=r-s;return Math.abs(d)>Math.abs(i)?d>0?"right":"left":i>0?"bottom":"top"}class je{#t;#n;#o=null;#e=null;#s=null;#a(){this.#s!==null&&(cancelAnimationFrame(this.#s),this.#s=null)}#h(){this.#a(),this.#s=requestAnimationFrame(()=>{this.#s=null,!(!this.#o||!this.#e)&&(this.#r(),this.#t.onPointerExit())})}constructor(t){this.#t=t,this.#n=t.buffer??1,Ut([t.triggerNode,t.contentNode,t.enabled],([e,s,n])=>{if(!e||!s||!n){this.#r();return}const r=Ae(e),d=a=>{this.#i([a.clientX,a.clientY],e,s)},i=a=>{const l=a.relatedTarget;if(gt(l)&&s.contains(l))return;const x=this.#t.ignoredTargets?.()??[];if(!(gt(l)&&x.some(H=>H===l||H.contains(l)))){if(gt(l)&&!e.contains(l)&&!s.contains(l)&&!l.contains(s)){this.#r(),this.#t.onPointerExit();return}this.#o=[a.clientX,a.clientY],this.#e="content",this.#h()}},p=()=>{this.#r()},P=()=>{this.#r()},y=a=>{const l=a.relatedTarget;gt(l)&&e.contains(l)||(this.#o=[a.clientX,a.clientY],this.#e="trigger",this.#h())};return[St(r,"pointermove",d),St(e,"pointerleave",i),St(e,"pointerenter",p),St(s,"pointerenter",P),St(s,"pointerleave",y)].reduce((a,l)=>()=>{a(),l()},()=>{})})}#i(t,e,s){if(!this.#o||!this.#e)return;this.#a();const n=e.getBoundingClientRect(),r=s.getBoundingClientRect();if(this.#e==="content"&&ae(t,r)){this.#r();return}if(this.#e==="trigger"&&ae(t,n)){this.#r();return}const d=qe(n,r),i=this.#l(n,r,d);if(i&&ie(t,i))return;const p=this.#e==="content"?r:n,P=this.#d(this.#o,p,d,this.#e);ie(t,P)||(this.#r(),this.#t.onPointerExit())}#r(){this.#o=null,this.#e=null,this.#a()}#l(t,e,s){const n=this.#n;switch(s){case"top":return[[Math.min(t.left,e.left)-n,t.top],[Math.min(t.left,e.left)-n,e.bottom],[Math.max(t.right,e.right)+n,e.bottom],[Math.max(t.right,e.right)+n,t.top]];case"bottom":return[[Math.min(t.left,e.left)-n,t.bottom],[Math.min(t.left,e.left)-n,e.top],[Math.max(t.right,e.right)+n,e.top],[Math.max(t.right,e.right)+n,t.bottom]];case"left":return[[t.left,Math.min(t.top,e.top)-n],[e.right,Math.min(t.top,e.top)-n],[e.right,Math.max(t.bottom,e.bottom)+n],[t.left,Math.max(t.bottom,e.bottom)+n]];case"right":return[[t.right,Math.min(t.top,e.top)-n],[e.left,Math.min(t.top,e.top)-n],[e.left,Math.max(t.bottom,e.bottom)+n],[t.right,Math.max(t.bottom,e.bottom)+n]]}}#d(t,e,s,n){const r=this.#n*4,[d,i]=t;switch(n==="trigger"?this.#u(s):s){case"top":return[[d-r,i+r],[d+r,i+r],[e.right+r,e.bottom],[e.right+r,e.top],[e.left-r,e.top],[e.left-r,e.bottom]];case"bottom":return[[d-r,i-r],[d+r,i-r],[e.right+r,e.top],[e.right+r,e.bottom],[e.left-r,e.bottom],[e.left-r,e.top]];case"left":return[[d+r,i-r],[d+r,i+r],[e.right,e.bottom+r],[e.left,e.bottom+r],[e.left,e.top-r],[e.right,e.top-r]];case"right":return[[d-r,i-r],[d-r,i+r],[e.left,e.bottom+r],[e.right,e.bottom+r],[e.right,e.top-r],[e.left,e.top-r]]}}#u(t){switch(t){case"top":return"bottom";case"bottom":return"top";case"left":return"right";case"right":return"left"}}}const jt=De({component:"popover",parts:["root","trigger","content","close","overlay"]}),Zt=new Me("Popover.Root");class Qt{static create(t){return Zt.set(new Qt(t))}opts;#t=F(null);get contentNode(){return o(this.#t)}set contentNode(t){c(this.#t,t,!0)}contentPresence;#n=F(null);get triggerNode(){return o(this.#n)}set triggerNode(t){c(this.#n,t,!0)}#o=F(null);get overlayNode(){return o(this.#o)}set overlayNode(t){c(this.#o,t,!0)}overlayPresence;#e=F(!1);get openedViaHover(){return o(this.#e)}set openedViaHover(t){c(this.#e,t,!0)}#s=F(!1);get hasInteractedWithContent(){return o(this.#s)}set hasInteractedWithContent(t){c(this.#s,t,!0)}#a=F(!1);get hoverCooldown(){return o(this.#a)}set hoverCooldown(t){c(this.#a,t,!0)}#h=F(0);get closeDelay(){return o(this.#h)}set closeDelay(t){c(this.#h,t,!0)}#i=null;#r=null;constructor(t){this.opts=t,this.contentPresence=new ne({ref:I(()=>this.contentNode),open:this.opts.open,onComplete:()=>{this.opts.onOpenChangeComplete.current(this.opts.open.current)}}),this.overlayPresence=new ne({ref:I(()=>this.overlayNode),open:this.opts.open}),Ut(()=>this.opts.open.current,e=>{e||(this.openedViaHover=!1,this.hasInteractedWithContent=!1,this.#l())})}setDomContext(t){this.#r=t}#l(){this.#i!==null&&this.#r&&(this.#r.clearTimeout(this.#i),this.#i=null)}toggleOpen(){this.#l(),this.opts.open.current=!this.opts.open.current}handleClose(){this.#l(),this.opts.open.current&&(this.opts.open.current=!1)}handleHoverOpen(){this.#l(),!this.opts.open.current&&(this.openedViaHover=!0,this.opts.open.current=!0)}handleHoverClose(){this.opts.open.current&&this.openedViaHover&&!this.hasInteractedWithContent&&(this.opts.open.current=!1)}handleDelayedHoverClose(){this.opts.open.current&&(!this.openedViaHover||this.hasInteractedWithContent||(this.#l(),this.closeDelay<=0?this.opts.open.current=!1:this.#r&&(this.#i=this.#r.setTimeout(()=>{this.openedViaHover&&!this.hasInteractedWithContent&&(this.opts.open.current=!1),this.#i=null},this.closeDelay))))}cancelDelayedClose(){this.#l()}markInteraction(){this.hasInteractedWithContent=!0,this.#l()}}class Rt{static create(t){return new Rt(t,Zt.get())}opts;root;attachment;domContext;#t=null;#n=null;#o=F(!1);constructor(t,e){this.opts=t,this.root=e,this.attachment=de(this.opts.ref,s=>this.root.triggerNode=s),this.domContext=new Ve(t.ref),this.root.setDomContext(this.domContext),this.onclick=this.onclick.bind(this),this.onkeydown=this.onkeydown.bind(this),this.onpointerenter=this.onpointerenter.bind(this),this.onpointerleave=this.onpointerleave.bind(this),Ut(()=>this.opts.closeDelay.current,s=>{this.root.closeDelay=s})}#e(){this.#t!==null&&(this.domContext.clearTimeout(this.#t),this.#t=null)}#s(){this.#n!==null&&(this.domContext.clearTimeout(this.#n),this.#n=null)}#a(){this.#e(),this.#s()}onpointerenter(t){if(this.opts.disabled.current||!this.opts.openOnHover.current||Lt(t)||(c(this.#o,!0),this.#s(),this.root.cancelDelayedClose(),this.root.opts.open.current||this.root.hoverCooldown))return;const e=this.opts.openDelay.current;e<=0?this.root.handleHoverOpen():this.#t=this.domContext.setTimeout(()=>{this.root.handleHoverOpen(),this.#t=null},e)}onpointerleave(t){this.opts.disabled.current||this.opts.openOnHover.current&&(Lt(t)||(c(this.#o,!1),this.#e(),this.root.hoverCooldown=!1))}onclick(t){if(!this.opts.disabled.current&&t.button===0){if(this.#a(),o(this.#o)&&this.root.opts.open.current&&this.root.openedViaHover){this.root.openedViaHover=!1,this.root.hasInteractedWithContent=!0;return}o(this.#o)&&this.opts.openOnHover.current&&this.root.opts.open.current&&(this.root.hoverCooldown=!0),this.root.hoverCooldown&&!this.root.opts.open.current&&(this.root.hoverCooldown=!1),this.root.toggleOpen()}}onkeydown(t){this.opts.disabled.current||(t.key===Oe||t.key===Te)&&(t.preventDefault(),this.#a(),this.root.toggleOpen())}#h(){if(this.root.opts.open.current&&this.root.contentNode?.id)return this.root.contentNode?.id}#i=k(()=>({id:this.opts.id.current,"aria-haspopup":"dialog","aria-expanded":ke(this.root.opts.open.current),"data-state":ue(this.root.opts.open.current),"aria-controls":this.#h(),[jt.trigger]:"",disabled:this.opts.disabled.current,onkeydown:this.onkeydown,onclick:this.onclick,onpointerenter:this.onpointerenter,onpointerleave:this.onpointerleave,...this.attachment}));get props(){return o(this.#i)}set props(t){c(this.#i,t)}}class te{static create(t){return new te(t,Zt.get())}opts;root;attachment;constructor(t,e){this.opts=t,this.root=e,this.attachment=de(this.opts.ref,s=>this.root.contentNode=s),this.onpointerdown=this.onpointerdown.bind(this),this.onfocusin=this.onfocusin.bind(this),this.onpointerenter=this.onpointerenter.bind(this),this.onpointerleave=this.onpointerleave.bind(this),new je({triggerNode:()=>this.root.triggerNode,contentNode:()=>this.root.contentNode,enabled:()=>this.root.opts.open.current&&this.root.openedViaHover&&!this.root.hasInteractedWithContent,onPointerExit:()=>{this.root.handleDelayedHoverClose()}})}onpointerdown(t){this.root.markInteraction()}onfocusin(t){const e=t.target;gt(e)&&Ie(e)&&this.root.markInteraction()}onpointerenter(t){Lt(t)||this.root.cancelDelayedClose()}onpointerleave(t){Lt(t)}onInteractOutside=t=>{if(this.opts.onInteractOutside.current(t),t.defaultPrevented||!gt(t.target))return;const e=t.target.closest(jt.selector("trigger"));if(!(e&&e===this.root.triggerNode)){if(this.opts.customAnchor.current){if(gt(this.opts.customAnchor.current)){if(this.opts.customAnchor.current.contains(t.target))return}else if(typeof this.opts.customAnchor.current=="string"){const s=document.querySelector(this.opts.customAnchor.current);if(s&&s.contains(t.target))return}}this.root.handleClose()}};onEscapeKeydown=t=>{this.opts.onEscapeKeydown.current(t),!t.defaultPrevented&&this.root.handleClose()};get shouldRender(){return this.root.contentPresence.shouldRender}get shouldTrapFocus(){return!(this.root.openedViaHover&&!this.root.hasInteractedWithContent)}#t=k(()=>({open:this.root.opts.open.current}));get snippetProps(){return o(this.#t)}set snippetProps(t){c(this.#t,t)}#n=k(()=>({id:this.opts.id.current,tabindex:-1,"data-state":ue(this.root.opts.open.current),[jt.content]:"",style:{pointerEvents:"auto",contain:"layout style"},onpointerdown:this.onpointerdown,onfocusin:this.onfocusin,onpointerenter:this.onpointerenter,onpointerleave:this.onpointerleave,...this.attachment}));get props(){return o(this.#n)}set props(t){c(this.#n,t)}popperProps={onInteractOutside:this.onInteractOutside,onEscapeKeydown:this.onEscapeKeydown}}var Ge=D("<div><div><!></div></div>"),Je=D("<div><div><!></div></div>");function Ue(v,t){const e=le();_t(t,!0);let s=f(t,"ref",15,null),n=f(t,"id",19,()=>ce(e)),r=f(t,"forceMount",3,!1),d=f(t,"onOpenAutoFocus",3,xt),i=f(t,"onCloseAutoFocus",3,xt),p=f(t,"onEscapeKeydown",3,xt),P=f(t,"onInteractOutside",3,xt),y=f(t,"trapFocus",3,!0),a=f(t,"preventScroll",3,!1),l=f(t,"customAnchor",3,null),x=he(t,["$$slots","$$events","$$legacy","child","children","ref","id","forceMount","onOpenAutoFocus","onCloseAutoFocus","onEscapeKeydown","onInteractOutside","trapFocus","preventScroll","customAnchor","style"]);const H=te.create({id:I(()=>n()),ref:I(()=>s(),O=>s(O)),onInteractOutside:I(()=>P()),onEscapeKeydown:I(()=>p()),customAnchor:I(()=>l())}),ot=k(()=>Bt(x,H.props)),Ct=k(()=>y()&&H.shouldTrapFocus);function wt(O){H.shouldTrapFocus||O.preventDefault(),d()(O)}var N=q(),j=A(N);{var B=O=>{ze(O,ee(()=>o(ot),()=>H.popperProps,{get ref(){return H.opts.ref},get enabled(){return H.root.opts.open.current},get id(){return n()},get trapFocus(){return o(Ct)},get preventScroll(){return a()},loop:!0,forceMount:!0,get customAnchor(){return l()},onOpenAutoFocus:wt,get onCloseAutoFocus(){return i()},get shouldRender(){return H.shouldRender},popper:(pt,nt)=>{let ft=()=>nt?.().props,st=()=>nt?.().wrapperProps;const it=k(()=>Bt(ft(),{style:se("popover")},{style:t.style}));var at=q(),kt=A(at);{var It=V=>{var M=q(),E=A(M);{let U=k(()=>({props:o(it),wrapperProps:st(),...H.snippetProps}));ut(E,()=>t.child,()=>o(U))}u(V,M)},Pt=V=>{var M=Ge();ct(M,()=>({...st()}));var E=g(M);ct(E,()=>({...o(it)}));var U=g(E);ut(U,()=>t.children??Kt),_(E),_(M),u(V,M)};S(kt,V=>{t.child?V(It):V(Pt,!1)})}u(pt,at)},$$slots:{popper:!0}}))},rt=O=>{Fe(O,ee(()=>o(ot),()=>H.popperProps,{get ref(){return H.opts.ref},get open(){return H.root.opts.open.current},get id(){return n()},get trapFocus(){return o(Ct)},get preventScroll(){return a()},loop:!0,forceMount:!1,get customAnchor(){return l()},onOpenAutoFocus:wt,get onCloseAutoFocus(){return i()},get shouldRender(){return H.shouldRender},popper:(pt,nt)=>{let ft=()=>nt?.().props,st=()=>nt?.().wrapperProps;const it=k(()=>Bt(ft(),{style:se("popover")},{style:t.style}));var at=q(),kt=A(at);{var It=V=>{var M=q(),E=A(M);{let U=k(()=>({props:o(it),wrapperProps:st(),...H.snippetProps}));ut(E,()=>t.child,()=>o(U))}u(V,M)},Pt=V=>{var M=Je();ct(M,()=>({...st()}));var E=g(M);ct(E,()=>({...o(it)}));var U=g(E);ut(U,()=>t.children??Kt),_(E),_(M),u(V,M)};S(kt,V=>{t.child?V(It):V(Pt,!1)})}u(pt,at)},$$slots:{popper:!0}}))};S(j,O=>{r()?O(B):r()||O(rt,1)})}u(v,N),yt()}var Ze=D("<button><!></button>");function Qe(v,t){const e=le();_t(t,!0);let s=f(t,"id",19,()=>ce(e)),n=f(t,"ref",15,null),r=f(t,"type",3,"button"),d=f(t,"disabled",3,!1),i=f(t,"openOnHover",3,!1),p=f(t,"openDelay",3,700),P=f(t,"closeDelay",3,300),y=he(t,["$$slots","$$events","$$legacy","children","child","id","ref","type","disabled","openOnHover","openDelay","closeDelay"]);const a=Rt.create({id:I(()=>s()),ref:I(()=>n(),x=>n(x)),disabled:I(()=>!!d()),openOnHover:I(()=>i()),openDelay:I(()=>p()),closeDelay:I(()=>P())}),l=k(()=>Bt(y,a.props,{type:r()}));Ee(v,{get id(){return s()},get ref(){return a.opts.ref},children:(x,H)=>{var ot=q(),Ct=A(ot);{var wt=j=>{var B=q(),rt=A(B);ut(rt,()=>t.child,()=>({props:o(l)})),u(j,B)},N=j=>{var B=Ze();ct(B,()=>({...o(l)}));var rt=g(B);ut(rt,()=>t.children??Kt),_(B),u(j,B)};S(Ct,j=>{t.child?j(wt):j(N,!1)})}u(x,ot)},$$slots:{default:!0}}),yt()}function Re(v,t){_t(t,!0);let e=f(t,"open",15,!1),s=f(t,"onOpenChange",3,xt),n=f(t,"onOpenChangeComplete",3,xt);Qt.create({open:I(()=>e(),r=>{e(r),s()(r)}),onOpenChangeComplete:I(()=>n())}),Se(v,{children:(r,d)=>{var i=q(),p=A(i);ut(p,()=>t.children??Kt),u(r,i)},$$slots:{default:!0}}),yt()}var to=Ot("<title> </title>"),eo=Ot('<svg><!><path d="M17.74,30,16,29l4-7h6a2,2,0,0,0,2-2V8a2,2,0,0,0-2-2H6A2,2,0,0,0,4,8V20a2,2,0,0,0,2,2h9v2H6a4,4,0,0,1-4-4V8A4,4,0,0,1,6,4H26a4,4,0,0,1,4,4V20a4,4,0,0,1-4,4H21.16Z"></path><path d="M8 10H24V12H8z"></path><path d="M8 16H18V18H8z"></path></svg>');function oo(v,t){const e=Vt(t,["children","$$slots","$$events","$$legacy"]),s=Vt(e,["size","title"]);_t(t,!1);const n=Mt(),r=Mt();let d=f(t,"size",8,16),i=f(t,"title",8,void 0);At(()=>(et(e),et(i())),()=>{c(n,e["aria-label"]||e["aria-labelledby"]||i())}),At(()=>(o(n),et(e)),()=>{c(r,{"aria-hidden":o(n)?void 0:!0,role:o(n)?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})}),Gt(),Jt();var p=eo();ct(p,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:d(),height:d(),...o(r),...s}));var P=g(p);{var y=a=>{var l=to(),x=g(l,!0);_(l),dt(()=>Ht(x,i())),u(a,l)};S(P,a=>{i()&&a(y)})}J(3),_(p),u(v,p),yt()}var ro=Ot("<title> </title>"),no=Ot('<svg><!><path d="M10 6H28V8H10z"></path><path d="M10 24H28V26H10z"></path><path d="M10 15H28V17H10z"></path><path d="M4 15H6V17H4z"></path><path d="M4 6H6V8H4z"></path><path d="M4 24H6V26H4z"></path></svg>');function so(v,t){const e=Vt(t,["children","$$slots","$$events","$$legacy"]),s=Vt(e,["size","title"]);_t(t,!1);const n=Mt(),r=Mt();let d=f(t,"size",8,16),i=f(t,"title",8,void 0);At(()=>(et(e),et(i())),()=>{c(n,e["aria-label"]||e["aria-labelledby"]||i())}),At(()=>(o(n),et(e)),()=>{c(r,{"aria-hidden":o(n)?void 0:!0,role:o(n)?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})}),Gt(),Jt();var p=no();ct(p,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:d(),height:d(),...o(r),...s}));var P=g(p);{var y=a=>{var l=ro(),x=g(l,!0);_(l),dt(()=>Ht(x,i())),u(a,l)};S(P,a=>{i()&&a(y)})}J(6),_(p),u(v,p),yt()}var io=Ot("<title> </title>"),ao=Ot('<svg><!><path d="M26,4h-4V2h-2v2h-8V2h-2v2H6C4.9,4,4,4.9,4,6v20c0,1.1,0.9,2,2,2h20c1.1,0,2-0.9,2-2V6C28,4.9,27.1,4,26,4z M26,26H6V12h20 V26z M26,10H6V6h4v2h2V6h8v2h2V6h4V10z"></path></svg>');function lo(v,t){const e=Vt(t,["children","$$slots","$$events","$$legacy"]),s=Vt(e,["size","title"]);_t(t,!1);const n=Mt(),r=Mt();let d=f(t,"size",8,16),i=f(t,"title",8,void 0);At(()=>(et(e),et(i())),()=>{c(n,e["aria-label"]||e["aria-labelledby"]||i())}),At(()=>(o(n),et(e)),()=>{c(r,{"aria-hidden":o(n)?void 0:!0,role:o(n)?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})}),Gt(),Jt();var p=ao();ct(p,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:d(),height:d(),...o(r),...s}));var P=g(p);{var y=a=>{var l=io(),x=g(l,!0);_(l),dt(()=>Ht(x,i())),u(a,l)};S(P,a=>{i()&&a(y)})}J(),_(p),u(v,p),yt()}const ho=Re,uo=Qe,co=Ue;var po=D('<div class="tab active svelte-r6dy5f"><input class="tab-rename-input svelte-r6dy5f"/></div>'),fo=D('<span class="tab-close svelte-r6dy5f" title="Close"><!></span>'),vo=D('<button><span class="tab-label svelte-r6dy5f"> </span> <!></button>'),mo=D('<span class="tab-close svelte-r6dy5f" title="Close"><!></span>'),bo=D('<button><span class="tab-label svelte-r6dy5f"> </span> <!></button>'),go=D("<!> <span>New View</span>",1),_o=D('<button class="add-view-option svelte-r6dy5f"><!> List</button> <button class="add-view-option svelte-r6dy5f"><!> Calendar</button>',1),yo=D("<!> <!>",1),Co=D("<!> <!>",1),wo=D("<!> <!>",1),Po=D("<!> <!>",1),xo=D('<div class="tab-bar svelte-r6dy5f"><div class="tabs-scroll svelte-r6dy5f"><button><span class="tab-label svelte-r6dy5f">Home</span></button> <button><span class="tab-label svelte-r6dy5f">Graph</span></button> <!> <!> <!></div> <div class="bar-right svelte-r6dy5f"><!> <!></div></div> <!>',1);function Bo(v,t){_t(t,!0);let e=f(t,"activeView",3,"entity");const s=me("chat");function n(h){oe(h,{noScroll:!0})}const r=k(()=>tt.selectedId!==null),d=k(()=>{if(!tt.selectedRepo||!tt.selectedId)return"";for(const h of He.repos){if(h.name!==tt.selectedRepo)continue;const m=h.entities.find(C=>C.id===tt.selectedId);if(m)return m.title}return tt.selectedId.replace(/-/g," ").replace(/\b\w/g,h=>h.toUpperCase())});function i(){tt.deselect(),n("/")}let p=F(!1);async function P(h){c(p,!1);const m=h==="calendar"?"Calendar":"List",C=await $t.create(m,h);oe(`/views/${C.id}`)}let y=F(null),a=F(""),l=F(null),x=F(!1);function H(h){c(x,!1),c(y,h.id,!0),c(a,h.name,!0)}be(()=>{o(y)&&o(l)&&(o(l).focus(),o(l).select(),setTimeout(()=>{c(x,!0)},50))});function ot(){o(x)&&(o(y)&&o(a).trim()&&$t.update(o(y),{name:o(a).trim()}),c(y,null),c(x,!1))}function Ct(){c(y,null),c(x,!1)}function wt(h){h.key==="Enter"&&(h.preventDefault(),c(x,!0),ot()),h.key==="Escape"&&(h.preventDefault(),Ct())}let N=F(null);function j(h,m){h.stopPropagation(),c(N,m,!0)}async function B(){o(N)&&(await $t.remove(o(N).id),c(N,null))}var rt=xo(),O=A(rt),Tt=g(O),pt=g(Tt);let nt;var ft=z(pt,2);let st;var it=z(ft,2);Ce(it,17,()=>$t.views,h=>h.id,(h,m)=>{var C=q(),Z=A(C);{var Q=W=>{var T=po(),b=g(T);ge(b),ye(b,w=>c(l,w),()=>o(l)),_(T),dt(w=>_e(b,"size",w),[()=>Math.max(o(a).length,1)]),Y("keydown",b,wt),Y("input",b,w=>{c(a,w.currentTarget.value,!0)}),ve("blur",b,ot),we(b,()=>o(a),w=>c(a,w)),u(W,T)},R=W=>{const T=k(()=>e()==="view"&&tt.activeViewId===o(m).id);var b=vo();let w;var lt=g(b),$=g(lt,!0);_(lt);var K=z(lt,2);{var Dt=L=>{var G=fo(),zt=g(G);re(zt,{size:12}),_(G),Y("click",G,Yt=>j(Yt,o(m))),u(L,G)};S(K,L=>{o(T)&&L(Dt)})}_(b),dt(()=>{w=Wt(b,1,"tab svelte-r6dy5f",null,w,{"tab-permanent":!o(T),active:o(T)}),Ht($,o(m).name)}),Y("click",b,()=>n(`/views/${o(m).id}`)),Y("dblclick",b,()=>H(o(m))),u(W,b)};S(Z,W=>{o(y)===o(m).id?W(Q):W(R,!1)})}u(h,C)});var at=z(it,2);{var kt=h=>{const m=k(()=>e()==="entity"&&o(r));var C=bo();let Z;var Q=g(C),R=g(Q,!0);_(Q);var W=z(Q,2);{var T=b=>{var w=mo(),lt=g(w);re(lt,{size:12}),_(w),Y("click",w,$=>{$.stopPropagation(),i()}),u(b,w)};S(W,b=>{o(m)&&b(T)})}_(C),dt(()=>{Z=Wt(C,1,"tab svelte-r6dy5f",null,Z,{"tab-permanent":!o(m),active:o(m)}),Ht(R,o(d))}),Y("click",C,()=>n(tt.entityPath??"/")),u(h,C)};S(at,h=>{o(r)&&h(kt)})}var It=z(at,2);X(It,()=>ho,(h,m)=>{m(h,{get open(){return o(p)},set open(C){c(p,C,!0)},children:(C,Z)=>{var Q=yo(),R=A(Q);X(R,()=>uo,(T,b)=>{b(T,{class:"new-view-btn",title:"New view",children:(w,lt)=>{var $=go(),K=A($);xe(K,{size:16}),J(2),u(w,$)},$$slots:{default:!0}})});var W=z(R,2);X(W,()=>co,(T,b)=>{b(T,{class:"add-view-menu",sideOffset:4,align:"start",children:(w,lt)=>{var $=_o(),K=A($),Dt=g(K);so(Dt,{size:14}),J(),_(K);var L=z(K,2),G=g(L);lo(G,{size:14}),J(),_(L),Y("click",K,()=>P("list")),Y("click",L,()=>P("calendar")),u(w,$)},$$slots:{default:!0}})}),u(C,Q)},$$slots:{default:!0}})}),_(Tt);var Pt=z(Tt,2),V=g(Pt);{var M=h=>{var m=q(),C=A(m);ut(C,()=>t.right),u(h,m)};S(V,h=>{t.right&&h(M)})}var E=z(V,2);{var U=h=>{Pe(h,{variant:"accent",size:"icon",class:"chat-toggle",title:"Open Agent",get onclick(){return s.toggle},children:(m,C)=>{oo(m,{size:14})},$$slots:{default:!0}})};S(E,h=>{s.open||h(U)})}_(Pt),_(O);var pe=z(O,2);{let h=k(()=>!!o(N));X(pe,()=>Xe,(m,C)=>{C(m,{get open(){return o(h)},onOpenChange:Z=>{Z||c(N,null)},children:(Z,Q)=>{var R=q(),W=A(R);X(W,()=>Ne,(T,b)=>{b(T,{children:(w,lt)=>{var $=Po(),K=A($);X(K,()=>We,(L,G)=>{G(L,{children:(zt,Yt)=>{var Ft=Co(),Et=A(Ft);X(Et,()=>$e,(vt,mt)=>{mt(vt,{children:(bt,qt)=>{J();var ht=Nt("Delete view?");u(bt,ht)},$$slots:{default:!0}})});var Xt=z(Et,2);X(Xt,()=>Be,(vt,mt)=>{mt(vt,{children:(bt,qt)=>{J();var ht=Nt();dt(()=>Ht(ht,`The view "${o(N)?.name??""}" will be permanently deleted.`)),u(bt,ht)},$$slots:{default:!0}})}),u(zt,Ft)},$$slots:{default:!0}})});var Dt=z(K,2);X(Dt,()=>Ke,(L,G)=>{G(L,{children:(zt,Yt)=>{var Ft=wo(),Et=A(Ft);X(Et,()=>Le,(vt,mt)=>{mt(vt,{children:(bt,qt)=>{J();var ht=Nt("Cancel");u(bt,ht)},$$slots:{default:!0}})});var Xt=z(Et,2);X(Xt,()=>Ye,(vt,mt)=>{mt(vt,{onclick:B,children:(bt,qt)=>{J();var ht=Nt("Delete");u(bt,ht)},$$slots:{default:!0}})}),u(zt,Ft)},$$slots:{default:!0}})}),u(w,$)},$$slots:{default:!0}})}),u(Z,R)},$$slots:{default:!0}})})}dt(()=>{nt=Wt(pt,1,"tab tab-permanent svelte-r6dy5f",null,nt,{active:e()==="home"}),st=Wt(ft,1,"tab tab-permanent svelte-r6dy5f",null,st,{active:e()==="graph"})}),Y("click",pt,()=>n("/")),Y("click",ft,()=>e()!=="graph"&&n("/graph")),u(v,rt),yt()}fe(["click","keydown","input","dblclick"]);export{co as C,ho as R,uo as T,Bo as V,lo as a};
|
|
1
|
+
import{o as St,p as le,c as q,a as u,b as D,s as Ht,f as Ot,d as fe,g as Y,t as Nt,e as ve}from"./S3zzfNyy.js";import{e as F,s as c,g as o,ab as k,p as _t,a0 as A,b as yt,c as g,ad as Kt,r as _,l as At,d as et,a as Gt,n as J,m as Mt,t as dt,aC as me,a3 as be,aa as z}from"./DwMoyB6r.js";import{b as ut,a as ct,r as ge,s as _e}from"./BYqzpKy3.js";import{i as S,b as ye}from"./DVe5EzgB.js";import{e as Ce}from"./BnuoIjma.js";import{c as X}from"./BdfrxCf_.js";import{s as Wt}from"./koVwyjnn.js";import{b as we,B as Pe}from"./ClyoIkBa.js";import{p as f,s as ee,r as he,l as Vt}from"./DLfZVgnp.js";import{g as oe}from"./C9G-Qu8M.js";import{i as Jt}from"./CkRzikAP.js";import{A as xe,C as re}from"./BEQ3s_NB.js";import{n as tt}from"./DiQyiOFg.js";import{v as $t}from"./BpSD0SL0.js";import{w as He}from"./C88BjBh_.js";import{w as Ut,G as Ae,H as gt,C as Me,a as de,I as Ve,J as Lt,E as Oe,S as Te,K as ue,c as ke,L as Ie,N as ne,h as I,d as De,f as ce,n as xt,P as ze,p as Fe,m as Bt,q as se,r as Ee,F as Se,A as Ne,t as We,u as $e,v as Be,x as Ke,y as Le,z as Ye,B as Xe}from"./CMw7AR0M.js";function ie(v,t){const[e,s]=v;let n=!1;const r=t.length;for(let d=0,i=r-1;d<r;i=d++){const[p,P]=t[d]??[0,0],[y,a]=t[i]??[0,0];P>=s!=a>=s&&e<=(y-p)*(s-P)/(a-P)+p&&(n=!n)}return n}function ae(v,t){return v[0]>=t.left&&v[0]<=t.right&&v[1]>=t.top&&v[1]<=t.bottom}function qe(v,t){const e=v.left+v.width/2,s=v.top+v.height/2,n=t.left+t.width/2,r=t.top+t.height/2,d=n-e,i=r-s;return Math.abs(d)>Math.abs(i)?d>0?"right":"left":i>0?"bottom":"top"}class je{#t;#n;#o=null;#e=null;#s=null;#a(){this.#s!==null&&(cancelAnimationFrame(this.#s),this.#s=null)}#h(){this.#a(),this.#s=requestAnimationFrame(()=>{this.#s=null,!(!this.#o||!this.#e)&&(this.#r(),this.#t.onPointerExit())})}constructor(t){this.#t=t,this.#n=t.buffer??1,Ut([t.triggerNode,t.contentNode,t.enabled],([e,s,n])=>{if(!e||!s||!n){this.#r();return}const r=Ae(e),d=a=>{this.#i([a.clientX,a.clientY],e,s)},i=a=>{const l=a.relatedTarget;if(gt(l)&&s.contains(l))return;const x=this.#t.ignoredTargets?.()??[];if(!(gt(l)&&x.some(H=>H===l||H.contains(l)))){if(gt(l)&&!e.contains(l)&&!s.contains(l)&&!l.contains(s)){this.#r(),this.#t.onPointerExit();return}this.#o=[a.clientX,a.clientY],this.#e="content",this.#h()}},p=()=>{this.#r()},P=()=>{this.#r()},y=a=>{const l=a.relatedTarget;gt(l)&&e.contains(l)||(this.#o=[a.clientX,a.clientY],this.#e="trigger",this.#h())};return[St(r,"pointermove",d),St(e,"pointerleave",i),St(e,"pointerenter",p),St(s,"pointerenter",P),St(s,"pointerleave",y)].reduce((a,l)=>()=>{a(),l()},()=>{})})}#i(t,e,s){if(!this.#o||!this.#e)return;this.#a();const n=e.getBoundingClientRect(),r=s.getBoundingClientRect();if(this.#e==="content"&&ae(t,r)){this.#r();return}if(this.#e==="trigger"&&ae(t,n)){this.#r();return}const d=qe(n,r),i=this.#l(n,r,d);if(i&&ie(t,i))return;const p=this.#e==="content"?r:n,P=this.#d(this.#o,p,d,this.#e);ie(t,P)||(this.#r(),this.#t.onPointerExit())}#r(){this.#o=null,this.#e=null,this.#a()}#l(t,e,s){const n=this.#n;switch(s){case"top":return[[Math.min(t.left,e.left)-n,t.top],[Math.min(t.left,e.left)-n,e.bottom],[Math.max(t.right,e.right)+n,e.bottom],[Math.max(t.right,e.right)+n,t.top]];case"bottom":return[[Math.min(t.left,e.left)-n,t.bottom],[Math.min(t.left,e.left)-n,e.top],[Math.max(t.right,e.right)+n,e.top],[Math.max(t.right,e.right)+n,t.bottom]];case"left":return[[t.left,Math.min(t.top,e.top)-n],[e.right,Math.min(t.top,e.top)-n],[e.right,Math.max(t.bottom,e.bottom)+n],[t.left,Math.max(t.bottom,e.bottom)+n]];case"right":return[[t.right,Math.min(t.top,e.top)-n],[e.left,Math.min(t.top,e.top)-n],[e.left,Math.max(t.bottom,e.bottom)+n],[t.right,Math.max(t.bottom,e.bottom)+n]]}}#d(t,e,s,n){const r=this.#n*4,[d,i]=t;switch(n==="trigger"?this.#u(s):s){case"top":return[[d-r,i+r],[d+r,i+r],[e.right+r,e.bottom],[e.right+r,e.top],[e.left-r,e.top],[e.left-r,e.bottom]];case"bottom":return[[d-r,i-r],[d+r,i-r],[e.right+r,e.top],[e.right+r,e.bottom],[e.left-r,e.bottom],[e.left-r,e.top]];case"left":return[[d+r,i-r],[d+r,i+r],[e.right,e.bottom+r],[e.left,e.bottom+r],[e.left,e.top-r],[e.right,e.top-r]];case"right":return[[d-r,i-r],[d-r,i+r],[e.left,e.bottom+r],[e.right,e.bottom+r],[e.right,e.top-r],[e.left,e.top-r]]}}#u(t){switch(t){case"top":return"bottom";case"bottom":return"top";case"left":return"right";case"right":return"left"}}}const jt=De({component:"popover",parts:["root","trigger","content","close","overlay"]}),Zt=new Me("Popover.Root");class Qt{static create(t){return Zt.set(new Qt(t))}opts;#t=F(null);get contentNode(){return o(this.#t)}set contentNode(t){c(this.#t,t,!0)}contentPresence;#n=F(null);get triggerNode(){return o(this.#n)}set triggerNode(t){c(this.#n,t,!0)}#o=F(null);get overlayNode(){return o(this.#o)}set overlayNode(t){c(this.#o,t,!0)}overlayPresence;#e=F(!1);get openedViaHover(){return o(this.#e)}set openedViaHover(t){c(this.#e,t,!0)}#s=F(!1);get hasInteractedWithContent(){return o(this.#s)}set hasInteractedWithContent(t){c(this.#s,t,!0)}#a=F(!1);get hoverCooldown(){return o(this.#a)}set hoverCooldown(t){c(this.#a,t,!0)}#h=F(0);get closeDelay(){return o(this.#h)}set closeDelay(t){c(this.#h,t,!0)}#i=null;#r=null;constructor(t){this.opts=t,this.contentPresence=new ne({ref:I(()=>this.contentNode),open:this.opts.open,onComplete:()=>{this.opts.onOpenChangeComplete.current(this.opts.open.current)}}),this.overlayPresence=new ne({ref:I(()=>this.overlayNode),open:this.opts.open}),Ut(()=>this.opts.open.current,e=>{e||(this.openedViaHover=!1,this.hasInteractedWithContent=!1,this.#l())})}setDomContext(t){this.#r=t}#l(){this.#i!==null&&this.#r&&(this.#r.clearTimeout(this.#i),this.#i=null)}toggleOpen(){this.#l(),this.opts.open.current=!this.opts.open.current}handleClose(){this.#l(),this.opts.open.current&&(this.opts.open.current=!1)}handleHoverOpen(){this.#l(),!this.opts.open.current&&(this.openedViaHover=!0,this.opts.open.current=!0)}handleHoverClose(){this.opts.open.current&&this.openedViaHover&&!this.hasInteractedWithContent&&(this.opts.open.current=!1)}handleDelayedHoverClose(){this.opts.open.current&&(!this.openedViaHover||this.hasInteractedWithContent||(this.#l(),this.closeDelay<=0?this.opts.open.current=!1:this.#r&&(this.#i=this.#r.setTimeout(()=>{this.openedViaHover&&!this.hasInteractedWithContent&&(this.opts.open.current=!1),this.#i=null},this.closeDelay))))}cancelDelayedClose(){this.#l()}markInteraction(){this.hasInteractedWithContent=!0,this.#l()}}class Rt{static create(t){return new Rt(t,Zt.get())}opts;root;attachment;domContext;#t=null;#n=null;#o=F(!1);constructor(t,e){this.opts=t,this.root=e,this.attachment=de(this.opts.ref,s=>this.root.triggerNode=s),this.domContext=new Ve(t.ref),this.root.setDomContext(this.domContext),this.onclick=this.onclick.bind(this),this.onkeydown=this.onkeydown.bind(this),this.onpointerenter=this.onpointerenter.bind(this),this.onpointerleave=this.onpointerleave.bind(this),Ut(()=>this.opts.closeDelay.current,s=>{this.root.closeDelay=s})}#e(){this.#t!==null&&(this.domContext.clearTimeout(this.#t),this.#t=null)}#s(){this.#n!==null&&(this.domContext.clearTimeout(this.#n),this.#n=null)}#a(){this.#e(),this.#s()}onpointerenter(t){if(this.opts.disabled.current||!this.opts.openOnHover.current||Lt(t)||(c(this.#o,!0),this.#s(),this.root.cancelDelayedClose(),this.root.opts.open.current||this.root.hoverCooldown))return;const e=this.opts.openDelay.current;e<=0?this.root.handleHoverOpen():this.#t=this.domContext.setTimeout(()=>{this.root.handleHoverOpen(),this.#t=null},e)}onpointerleave(t){this.opts.disabled.current||this.opts.openOnHover.current&&(Lt(t)||(c(this.#o,!1),this.#e(),this.root.hoverCooldown=!1))}onclick(t){if(!this.opts.disabled.current&&t.button===0){if(this.#a(),o(this.#o)&&this.root.opts.open.current&&this.root.openedViaHover){this.root.openedViaHover=!1,this.root.hasInteractedWithContent=!0;return}o(this.#o)&&this.opts.openOnHover.current&&this.root.opts.open.current&&(this.root.hoverCooldown=!0),this.root.hoverCooldown&&!this.root.opts.open.current&&(this.root.hoverCooldown=!1),this.root.toggleOpen()}}onkeydown(t){this.opts.disabled.current||(t.key===Oe||t.key===Te)&&(t.preventDefault(),this.#a(),this.root.toggleOpen())}#h(){if(this.root.opts.open.current&&this.root.contentNode?.id)return this.root.contentNode?.id}#i=k(()=>({id:this.opts.id.current,"aria-haspopup":"dialog","aria-expanded":ke(this.root.opts.open.current),"data-state":ue(this.root.opts.open.current),"aria-controls":this.#h(),[jt.trigger]:"",disabled:this.opts.disabled.current,onkeydown:this.onkeydown,onclick:this.onclick,onpointerenter:this.onpointerenter,onpointerleave:this.onpointerleave,...this.attachment}));get props(){return o(this.#i)}set props(t){c(this.#i,t)}}class te{static create(t){return new te(t,Zt.get())}opts;root;attachment;constructor(t,e){this.opts=t,this.root=e,this.attachment=de(this.opts.ref,s=>this.root.contentNode=s),this.onpointerdown=this.onpointerdown.bind(this),this.onfocusin=this.onfocusin.bind(this),this.onpointerenter=this.onpointerenter.bind(this),this.onpointerleave=this.onpointerleave.bind(this),new je({triggerNode:()=>this.root.triggerNode,contentNode:()=>this.root.contentNode,enabled:()=>this.root.opts.open.current&&this.root.openedViaHover&&!this.root.hasInteractedWithContent,onPointerExit:()=>{this.root.handleDelayedHoverClose()}})}onpointerdown(t){this.root.markInteraction()}onfocusin(t){const e=t.target;gt(e)&&Ie(e)&&this.root.markInteraction()}onpointerenter(t){Lt(t)||this.root.cancelDelayedClose()}onpointerleave(t){Lt(t)}onInteractOutside=t=>{if(this.opts.onInteractOutside.current(t),t.defaultPrevented||!gt(t.target))return;const e=t.target.closest(jt.selector("trigger"));if(!(e&&e===this.root.triggerNode)){if(this.opts.customAnchor.current){if(gt(this.opts.customAnchor.current)){if(this.opts.customAnchor.current.contains(t.target))return}else if(typeof this.opts.customAnchor.current=="string"){const s=document.querySelector(this.opts.customAnchor.current);if(s&&s.contains(t.target))return}}this.root.handleClose()}};onEscapeKeydown=t=>{this.opts.onEscapeKeydown.current(t),!t.defaultPrevented&&this.root.handleClose()};get shouldRender(){return this.root.contentPresence.shouldRender}get shouldTrapFocus(){return!(this.root.openedViaHover&&!this.root.hasInteractedWithContent)}#t=k(()=>({open:this.root.opts.open.current}));get snippetProps(){return o(this.#t)}set snippetProps(t){c(this.#t,t)}#n=k(()=>({id:this.opts.id.current,tabindex:-1,"data-state":ue(this.root.opts.open.current),[jt.content]:"",style:{pointerEvents:"auto",contain:"layout style"},onpointerdown:this.onpointerdown,onfocusin:this.onfocusin,onpointerenter:this.onpointerenter,onpointerleave:this.onpointerleave,...this.attachment}));get props(){return o(this.#n)}set props(t){c(this.#n,t)}popperProps={onInteractOutside:this.onInteractOutside,onEscapeKeydown:this.onEscapeKeydown}}var Ge=D("<div><div><!></div></div>"),Je=D("<div><div><!></div></div>");function Ue(v,t){const e=le();_t(t,!0);let s=f(t,"ref",15,null),n=f(t,"id",19,()=>ce(e)),r=f(t,"forceMount",3,!1),d=f(t,"onOpenAutoFocus",3,xt),i=f(t,"onCloseAutoFocus",3,xt),p=f(t,"onEscapeKeydown",3,xt),P=f(t,"onInteractOutside",3,xt),y=f(t,"trapFocus",3,!0),a=f(t,"preventScroll",3,!1),l=f(t,"customAnchor",3,null),x=he(t,["$$slots","$$events","$$legacy","child","children","ref","id","forceMount","onOpenAutoFocus","onCloseAutoFocus","onEscapeKeydown","onInteractOutside","trapFocus","preventScroll","customAnchor","style"]);const H=te.create({id:I(()=>n()),ref:I(()=>s(),O=>s(O)),onInteractOutside:I(()=>P()),onEscapeKeydown:I(()=>p()),customAnchor:I(()=>l())}),ot=k(()=>Bt(x,H.props)),Ct=k(()=>y()&&H.shouldTrapFocus);function wt(O){H.shouldTrapFocus||O.preventDefault(),d()(O)}var N=q(),j=A(N);{var B=O=>{ze(O,ee(()=>o(ot),()=>H.popperProps,{get ref(){return H.opts.ref},get enabled(){return H.root.opts.open.current},get id(){return n()},get trapFocus(){return o(Ct)},get preventScroll(){return a()},loop:!0,forceMount:!0,get customAnchor(){return l()},onOpenAutoFocus:wt,get onCloseAutoFocus(){return i()},get shouldRender(){return H.shouldRender},popper:(pt,nt)=>{let ft=()=>nt?.().props,st=()=>nt?.().wrapperProps;const it=k(()=>Bt(ft(),{style:se("popover")},{style:t.style}));var at=q(),kt=A(at);{var It=V=>{var M=q(),E=A(M);{let U=k(()=>({props:o(it),wrapperProps:st(),...H.snippetProps}));ut(E,()=>t.child,()=>o(U))}u(V,M)},Pt=V=>{var M=Ge();ct(M,()=>({...st()}));var E=g(M);ct(E,()=>({...o(it)}));var U=g(E);ut(U,()=>t.children??Kt),_(E),_(M),u(V,M)};S(kt,V=>{t.child?V(It):V(Pt,!1)})}u(pt,at)},$$slots:{popper:!0}}))},rt=O=>{Fe(O,ee(()=>o(ot),()=>H.popperProps,{get ref(){return H.opts.ref},get open(){return H.root.opts.open.current},get id(){return n()},get trapFocus(){return o(Ct)},get preventScroll(){return a()},loop:!0,forceMount:!1,get customAnchor(){return l()},onOpenAutoFocus:wt,get onCloseAutoFocus(){return i()},get shouldRender(){return H.shouldRender},popper:(pt,nt)=>{let ft=()=>nt?.().props,st=()=>nt?.().wrapperProps;const it=k(()=>Bt(ft(),{style:se("popover")},{style:t.style}));var at=q(),kt=A(at);{var It=V=>{var M=q(),E=A(M);{let U=k(()=>({props:o(it),wrapperProps:st(),...H.snippetProps}));ut(E,()=>t.child,()=>o(U))}u(V,M)},Pt=V=>{var M=Je();ct(M,()=>({...st()}));var E=g(M);ct(E,()=>({...o(it)}));var U=g(E);ut(U,()=>t.children??Kt),_(E),_(M),u(V,M)};S(kt,V=>{t.child?V(It):V(Pt,!1)})}u(pt,at)},$$slots:{popper:!0}}))};S(j,O=>{r()?O(B):r()||O(rt,1)})}u(v,N),yt()}var Ze=D("<button><!></button>");function Qe(v,t){const e=le();_t(t,!0);let s=f(t,"id",19,()=>ce(e)),n=f(t,"ref",15,null),r=f(t,"type",3,"button"),d=f(t,"disabled",3,!1),i=f(t,"openOnHover",3,!1),p=f(t,"openDelay",3,700),P=f(t,"closeDelay",3,300),y=he(t,["$$slots","$$events","$$legacy","children","child","id","ref","type","disabled","openOnHover","openDelay","closeDelay"]);const a=Rt.create({id:I(()=>s()),ref:I(()=>n(),x=>n(x)),disabled:I(()=>!!d()),openOnHover:I(()=>i()),openDelay:I(()=>p()),closeDelay:I(()=>P())}),l=k(()=>Bt(y,a.props,{type:r()}));Ee(v,{get id(){return s()},get ref(){return a.opts.ref},children:(x,H)=>{var ot=q(),Ct=A(ot);{var wt=j=>{var B=q(),rt=A(B);ut(rt,()=>t.child,()=>({props:o(l)})),u(j,B)},N=j=>{var B=Ze();ct(B,()=>({...o(l)}));var rt=g(B);ut(rt,()=>t.children??Kt),_(B),u(j,B)};S(Ct,j=>{t.child?j(wt):j(N,!1)})}u(x,ot)},$$slots:{default:!0}}),yt()}function Re(v,t){_t(t,!0);let e=f(t,"open",15,!1),s=f(t,"onOpenChange",3,xt),n=f(t,"onOpenChangeComplete",3,xt);Qt.create({open:I(()=>e(),r=>{e(r),s()(r)}),onOpenChangeComplete:I(()=>n())}),Se(v,{children:(r,d)=>{var i=q(),p=A(i);ut(p,()=>t.children??Kt),u(r,i)},$$slots:{default:!0}}),yt()}var to=Ot("<title> </title>"),eo=Ot('<svg><!><path d="M17.74,30,16,29l4-7h6a2,2,0,0,0,2-2V8a2,2,0,0,0-2-2H6A2,2,0,0,0,4,8V20a2,2,0,0,0,2,2h9v2H6a4,4,0,0,1-4-4V8A4,4,0,0,1,6,4H26a4,4,0,0,1,4,4V20a4,4,0,0,1-4,4H21.16Z"></path><path d="M8 10H24V12H8z"></path><path d="M8 16H18V18H8z"></path></svg>');function oo(v,t){const e=Vt(t,["children","$$slots","$$events","$$legacy"]),s=Vt(e,["size","title"]);_t(t,!1);const n=Mt(),r=Mt();let d=f(t,"size",8,16),i=f(t,"title",8,void 0);At(()=>(et(e),et(i())),()=>{c(n,e["aria-label"]||e["aria-labelledby"]||i())}),At(()=>(o(n),et(e)),()=>{c(r,{"aria-hidden":o(n)?void 0:!0,role:o(n)?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})}),Gt(),Jt();var p=eo();ct(p,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:d(),height:d(),...o(r),...s}));var P=g(p);{var y=a=>{var l=to(),x=g(l,!0);_(l),dt(()=>Ht(x,i())),u(a,l)};S(P,a=>{i()&&a(y)})}J(3),_(p),u(v,p),yt()}var ro=Ot("<title> </title>"),no=Ot('<svg><!><path d="M10 6H28V8H10z"></path><path d="M10 24H28V26H10z"></path><path d="M10 15H28V17H10z"></path><path d="M4 15H6V17H4z"></path><path d="M4 6H6V8H4z"></path><path d="M4 24H6V26H4z"></path></svg>');function so(v,t){const e=Vt(t,["children","$$slots","$$events","$$legacy"]),s=Vt(e,["size","title"]);_t(t,!1);const n=Mt(),r=Mt();let d=f(t,"size",8,16),i=f(t,"title",8,void 0);At(()=>(et(e),et(i())),()=>{c(n,e["aria-label"]||e["aria-labelledby"]||i())}),At(()=>(o(n),et(e)),()=>{c(r,{"aria-hidden":o(n)?void 0:!0,role:o(n)?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})}),Gt(),Jt();var p=no();ct(p,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:d(),height:d(),...o(r),...s}));var P=g(p);{var y=a=>{var l=ro(),x=g(l,!0);_(l),dt(()=>Ht(x,i())),u(a,l)};S(P,a=>{i()&&a(y)})}J(6),_(p),u(v,p),yt()}var io=Ot("<title> </title>"),ao=Ot('<svg><!><path d="M26,4h-4V2h-2v2h-8V2h-2v2H6C4.9,4,4,4.9,4,6v20c0,1.1,0.9,2,2,2h20c1.1,0,2-0.9,2-2V6C28,4.9,27.1,4,26,4z M26,26H6V12h20 V26z M26,10H6V6h4v2h2V6h8v2h2V6h4V10z"></path></svg>');function lo(v,t){const e=Vt(t,["children","$$slots","$$events","$$legacy"]),s=Vt(e,["size","title"]);_t(t,!1);const n=Mt(),r=Mt();let d=f(t,"size",8,16),i=f(t,"title",8,void 0);At(()=>(et(e),et(i())),()=>{c(n,e["aria-label"]||e["aria-labelledby"]||i())}),At(()=>(o(n),et(e)),()=>{c(r,{"aria-hidden":o(n)?void 0:!0,role:o(n)?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})}),Gt(),Jt();var p=ao();ct(p,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:d(),height:d(),...o(r),...s}));var P=g(p);{var y=a=>{var l=io(),x=g(l,!0);_(l),dt(()=>Ht(x,i())),u(a,l)};S(P,a=>{i()&&a(y)})}J(),_(p),u(v,p),yt()}const ho=Re,uo=Qe,co=Ue;var po=D('<div class="tab active svelte-r6dy5f"><input class="tab-rename-input svelte-r6dy5f"/></div>'),fo=D('<span class="tab-close svelte-r6dy5f" title="Close"><!></span>'),vo=D('<button><span class="tab-label svelte-r6dy5f"> </span> <!></button>'),mo=D('<span class="tab-close svelte-r6dy5f" title="Close"><!></span>'),bo=D('<button><span class="tab-label svelte-r6dy5f"> </span> <!></button>'),go=D("<!> <span>New View</span>",1),_o=D('<button class="add-view-option svelte-r6dy5f"><!> List</button> <button class="add-view-option svelte-r6dy5f"><!> Calendar</button>',1),yo=D("<!> <!>",1),Co=D("<!> <!>",1),wo=D("<!> <!>",1),Po=D("<!> <!>",1),xo=D('<div class="tab-bar svelte-r6dy5f"><div class="tabs-scroll svelte-r6dy5f"><button><span class="tab-label svelte-r6dy5f">Home</span></button> <button><span class="tab-label svelte-r6dy5f">Graph</span></button> <!> <!> <!></div> <div class="bar-right svelte-r6dy5f"><!> <!></div></div> <!>',1);function Bo(v,t){_t(t,!0);let e=f(t,"activeView",3,"entity");const s=me("chat");function n(h){oe(h,{noScroll:!0})}const r=k(()=>tt.selectedId!==null),d=k(()=>{if(!tt.selectedRepo||!tt.selectedId)return"";for(const h of He.repos){if(h.name!==tt.selectedRepo)continue;const m=h.entities.find(C=>C.id===tt.selectedId);if(m)return m.title}return tt.selectedId.replace(/-/g," ").replace(/\b\w/g,h=>h.toUpperCase())});function i(){tt.deselect(),n("/")}let p=F(!1);async function P(h){c(p,!1);const m=h==="calendar"?"Calendar":"List",C=await $t.create(m,h);oe(`/views/${C.id}`)}let y=F(null),a=F(""),l=F(null),x=F(!1);function H(h){c(x,!1),c(y,h.id,!0),c(a,h.name,!0)}be(()=>{o(y)&&o(l)&&(o(l).focus(),o(l).select(),setTimeout(()=>{c(x,!0)},50))});function ot(){o(x)&&(o(y)&&o(a).trim()&&$t.update(o(y),{name:o(a).trim()}),c(y,null),c(x,!1))}function Ct(){c(y,null),c(x,!1)}function wt(h){h.key==="Enter"&&(h.preventDefault(),c(x,!0),ot()),h.key==="Escape"&&(h.preventDefault(),Ct())}let N=F(null);function j(h,m){h.stopPropagation(),c(N,m,!0)}async function B(){o(N)&&(await $t.remove(o(N).id),c(N,null))}var rt=xo(),O=A(rt),Tt=g(O),pt=g(Tt);let nt;var ft=z(pt,2);let st;var it=z(ft,2);Ce(it,17,()=>$t.views,h=>h.id,(h,m)=>{var C=q(),Z=A(C);{var Q=W=>{var T=po(),b=g(T);ge(b),ye(b,w=>c(l,w),()=>o(l)),_(T),dt(w=>_e(b,"size",w),[()=>Math.max(o(a).length,1)]),Y("keydown",b,wt),Y("input",b,w=>{c(a,w.currentTarget.value,!0)}),ve("blur",b,ot),we(b,()=>o(a),w=>c(a,w)),u(W,T)},R=W=>{const T=k(()=>e()==="view"&&tt.activeViewId===o(m).id);var b=vo();let w;var lt=g(b),$=g(lt,!0);_(lt);var K=z(lt,2);{var Dt=L=>{var G=fo(),zt=g(G);re(zt,{size:12}),_(G),Y("click",G,Yt=>j(Yt,o(m))),u(L,G)};S(K,L=>{o(T)&&L(Dt)})}_(b),dt(()=>{w=Wt(b,1,"tab svelte-r6dy5f",null,w,{"tab-permanent":!o(T),active:o(T)}),Ht($,o(m).name)}),Y("click",b,()=>n(`/views/${o(m).id}`)),Y("dblclick",b,()=>H(o(m))),u(W,b)};S(Z,W=>{o(y)===o(m).id?W(Q):W(R,!1)})}u(h,C)});var at=z(it,2);{var kt=h=>{const m=k(()=>e()==="entity"&&o(r));var C=bo();let Z;var Q=g(C),R=g(Q,!0);_(Q);var W=z(Q,2);{var T=b=>{var w=mo(),lt=g(w);re(lt,{size:12}),_(w),Y("click",w,$=>{$.stopPropagation(),i()}),u(b,w)};S(W,b=>{o(m)&&b(T)})}_(C),dt(()=>{Z=Wt(C,1,"tab svelte-r6dy5f",null,Z,{"tab-permanent":!o(m),active:o(m)}),Ht(R,o(d))}),Y("click",C,()=>n(tt.entityPath??"/")),u(h,C)};S(at,h=>{o(r)&&h(kt)})}var It=z(at,2);X(It,()=>ho,(h,m)=>{m(h,{get open(){return o(p)},set open(C){c(p,C,!0)},children:(C,Z)=>{var Q=yo(),R=A(Q);X(R,()=>uo,(T,b)=>{b(T,{class:"new-view-btn",title:"New view",children:(w,lt)=>{var $=go(),K=A($);xe(K,{size:16}),J(2),u(w,$)},$$slots:{default:!0}})});var W=z(R,2);X(W,()=>co,(T,b)=>{b(T,{class:"add-view-menu",sideOffset:4,align:"start",children:(w,lt)=>{var $=_o(),K=A($),Dt=g(K);so(Dt,{size:14}),J(),_(K);var L=z(K,2),G=g(L);lo(G,{size:14}),J(),_(L),Y("click",K,()=>P("list")),Y("click",L,()=>P("calendar")),u(w,$)},$$slots:{default:!0}})}),u(C,Q)},$$slots:{default:!0}})}),_(Tt);var Pt=z(Tt,2),V=g(Pt);{var M=h=>{var m=q(),C=A(m);ut(C,()=>t.right),u(h,m)};S(V,h=>{t.right&&h(M)})}var E=z(V,2);{var U=h=>{Pe(h,{variant:"accent",size:"icon",class:"chat-toggle",title:"Open Agent",get onclick(){return s.toggle},children:(m,C)=>{oo(m,{size:14})},$$slots:{default:!0}})};S(E,h=>{s.open||h(U)})}_(Pt),_(O);var pe=z(O,2);{let h=k(()=>!!o(N));X(pe,()=>Xe,(m,C)=>{C(m,{get open(){return o(h)},onOpenChange:Z=>{Z||c(N,null)},children:(Z,Q)=>{var R=q(),W=A(R);X(W,()=>Ne,(T,b)=>{b(T,{children:(w,lt)=>{var $=Po(),K=A($);X(K,()=>We,(L,G)=>{G(L,{children:(zt,Yt)=>{var Ft=Co(),Et=A(Ft);X(Et,()=>$e,(vt,mt)=>{mt(vt,{children:(bt,qt)=>{J();var ht=Nt("Delete view?");u(bt,ht)},$$slots:{default:!0}})});var Xt=z(Et,2);X(Xt,()=>Be,(vt,mt)=>{mt(vt,{children:(bt,qt)=>{J();var ht=Nt();dt(()=>Ht(ht,`The view "${o(N)?.name??""}" will be permanently deleted.`)),u(bt,ht)},$$slots:{default:!0}})}),u(zt,Ft)},$$slots:{default:!0}})});var Dt=z(K,2);X(Dt,()=>Ke,(L,G)=>{G(L,{children:(zt,Yt)=>{var Ft=wo(),Et=A(Ft);X(Et,()=>Le,(vt,mt)=>{mt(vt,{children:(bt,qt)=>{J();var ht=Nt("Cancel");u(bt,ht)},$$slots:{default:!0}})});var Xt=z(Et,2);X(Xt,()=>Ye,(vt,mt)=>{mt(vt,{onclick:B,children:(bt,qt)=>{J();var ht=Nt("Delete");u(bt,ht)},$$slots:{default:!0}})}),u(zt,Ft)},$$slots:{default:!0}})}),u(w,$)},$$slots:{default:!0}})}),u(Z,R)},$$slots:{default:!0}})})}dt(()=>{nt=Wt(pt,1,"tab tab-permanent svelte-r6dy5f",null,nt,{active:e()==="home"}),st=Wt(ft,1,"tab tab-permanent svelte-r6dy5f",null,st,{active:e()==="graph"})}),Y("click",pt,()=>n("/")),Y("click",ft,()=>e()!=="graph"&&n("/graph")),u(v,rt),yt()}fe(["click","keydown","input","dblclick"]);export{co as C,ho as R,uo as T,Bo as V,lo as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as m,a,f as l}from"./S3zzfNyy.js";import{a0 as w}from"./DwMoyB6r.js";import{i as n}from"./DVe5EzgB.js";import{p as d}from"./DLfZVgnp.js";import{L as b,T as k}from"./
|
|
1
|
+
import{c as m,a,f as l}from"./S3zzfNyy.js";import{a0 as w}from"./DwMoyB6r.js";import{i as n}from"./DVe5EzgB.js";import{p as d}from"./DLfZVgnp.js";import{L as b,T as k}from"./Qo3f5AAd.js";import{t as y}from"./BGci7Sbu.js";import{u as S}from"./BGci7Sbu.js";var u=l('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" height="20" width="20"><path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z" clip-rule="evenodd"></path></svg>'),x=l('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" height="20" width="20"><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z" clip-rule="evenodd"></path></svg>'),_=l('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" height="20" width="20"><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z" clip-rule="evenodd"></path></svg>'),z=l('<svg viewBox="0 0 64 64" fill="currentColor" height="20" width="20" xmlns="http://www.w3.org/2000/svg"><path d="M32.427,7.987c2.183,0.124 4,1.165 5.096,3.281l17.936,36.208c1.739,3.66 -0.954,8.585 -5.373,8.656l-36.119,0c-4.022,-0.064 -7.322,-4.631 -5.352,-8.696l18.271,-36.207c0.342,-0.65 0.498,-0.838 0.793,-1.179c1.186,-1.375 2.483,-2.111 4.748,-2.063Zm-0.295,3.997c-0.687,0.034 -1.316,0.419 -1.659,1.017c-6.312,11.979 -12.397,24.081 -18.301,36.267c-0.546,1.225 0.391,2.797 1.762,2.863c12.06,0.195 24.125,0.195 36.185,0c1.325,-0.064 2.321,-1.584 1.769,-2.85c-5.793,-12.184 -11.765,-24.286 -17.966,-36.267c-0.366,-0.651 -0.903,-1.042 -1.79,-1.03Z"></path><path d="M33.631,40.581l-3.348,0l-0.368,-16.449l4.1,0l-0.384,16.449Zm-3.828,5.03c0,-0.609 0.197,-1.113 0.592,-1.514c0.396,-0.4 0.935,-0.601 1.618,-0.601c0.684,0 1.223,0.201 1.618,0.601c0.395,0.401 0.593,0.905 0.593,1.514c0,0.587 -0.193,1.078 -0.577,1.473c-0.385,0.395 -0.929,0.593 -1.634,0.593c-0.705,0 -1.249,-0.198 -1.634,-0.593c-0.384,-0.395 -0.576,-0.886 -0.576,-1.473Z"></path></svg>');function H(s,v){const t=d(v,"type",3,"success");var e=m(),c=w(e);{var i=o=>{var r=u();a(o,r)},p=o=>{var r=x();a(o,r)},h=o=>{var r=_();a(o,r)},g=o=>{var r=z();a(o,r)},f=o=>{};n(c,o=>{t()==="success"?o(i):t()==="error"?o(p,1):t()==="info"?o(h,2):t()==="warning"?o(g,3):o(f,!1)})}a(s,e)}export{H as Icon,b as Loader,k as Toaster,y as toast,S as useSonner};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{s as e}from"./
|
|
1
|
+
import{s as e}from"./C9G-Qu8M.js";const r=()=>{const s=e;return{page:{subscribe:s.page.subscribe},navigating:{subscribe:s.navigating.subscribe},updated:s.updated}},b={subscribe(s){return r().page.subscribe(s)}};export{b as p};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{e as h,f as U,s as a,g as t,av as x}from"./DwMoyB6r.js";import{i as L,g as V}from"./
|
|
1
|
+
import{e as h,f as U,s as a,g as t,av as x}from"./DwMoyB6r.js";import{i as L,g as V}from"./C9G-Qu8M.js";import{n as y}from"./DiQyiOFg.js";import{w as W}from"./C88BjBh_.js";function X(g,c,o){fetch("/api/chat/stream",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(g),signal:o}).then(async n=>{if(!n.ok){c({type:"error",message:`HTTP ${n.status}`});return}const r=n.body?.getReader();if(!r){c({type:"error",message:"No response body"});return}const p=new TextDecoder;let m="";for(;;){const{done:k,value:O}=await r.read();if(k)break;m+=p.decode(O,{stream:!0});const A=m.split(`
|
|
2
2
|
`);m=A.pop()??"";for(const C of A)if(C.startsWith("data: "))try{const f=JSON.parse(C.slice(6));c(f)}catch{}}}).catch(n=>{n.name!=="AbortError"&&c({type:"error",message:n.message})})}const D="sg-chat-sessions",J="sg-chat-version",z=14;function b(){try{const g=localStorage.getItem(D);if(!g)return[];if(localStorage.getItem(J)==="2")return JSON.parse(g);const n=JSON.parse(g).map(r=>({id:crypto.randomUUID(),createdAt:r.date+"T00:00:00.000Z",updatedAt:r.date+"T00:00:00.000Z",title:r.messages.find(p=>p.role==="user")?.content.slice(0,50)||"New chat",messages:r.messages}));return localStorage.setItem(D,JSON.stringify(n)),localStorage.setItem(J,"2"),n}catch{return[]}}function _(g){const o=[...g].sort((n,r)=>r.updatedAt.localeCompare(n.updatedAt)).slice(0,z);try{localStorage.setItem(D,JSON.stringify(o)),localStorage.setItem(J,"2")}catch{}}function N(g,c){const o=b(),n=c.map(({streaming:p,...m})=>m),r=o.findIndex(p=>p.id===g);r>=0&&(o[r].messages=n,o[r].updatedAt=new Date().toISOString()),_(o)}function B(){const c=b().sort((e,i)=>i.updatedAt.localeCompare(e.updatedAt))[0];let o=h(U(c?c.messages.map(e=>({...e,streaming:!1})):[])),n=h(U(c?.id??null)),r=h(!1),p=h(0),m=h(0),k=h(0),O=h(null),A=null,C=h(""),f=h(U(!!c));const R=new Set(["create_entity","update_entity","delete_entity","move_entity"]);function M(){$();const e=crypto.randomUUID();a(n,e,!0),a(o,[],!0),a(f,!1)}function E(){if(t(n)&&t(f))return t(n);const e=t(n)||crypto.randomUUID();a(n,e,!0);const i=new Date().toISOString(),d=b();return d.push({id:e,createdAt:i,updatedAt:i,title:"New chat",messages:[]}),_(d),a(f,!0),e}function K(e){if(!e.trim()||t(r))return;a(O,null);const i=E();t(o).push({role:"user",content:e}),t(o).push({role:"agent",content:"",segments:[],streaming:!0}),a(r,!0);const d=b(),l=d.find(s=>s.id===i);l&&l.title==="New chat"&&(l.title=e.slice(0,50),_(d)),N(i,t(o));let T=!1,w=null;A=new AbortController;const G=y.selectedSubPath?`${y.selectedRepo}/${y.selectedType}/${y.selectedId}/${y.selectedSubPath}`:y.selectedId?`${y.selectedRepo}/${y.selectedType}/${y.selectedId}`:null,P=t(o).slice(0,-2).map(s=>({role:s.role==="agent"?"assistant":s.role,content:s.content})),H={message:e,context:G??void 0,sessionId:i,history:P.length>0?P:void 0};X(H,s=>{if(!t(r))return;const u=t(o)[t(o).length-1];if(!u||u.role!=="agent")return;const S=u.segments;switch(s.type){case"token":{u.content+=s.text??"";const I=S[S.length-1];I&&I.type==="text"?I.content+=s.text??"":S.push({type:"text",content:s.text??""}),u.segments=S,x(m);break}case"tool_start":if(s.name){R.has(s.name)&&(T=!0);const I=S[S.length-1];I&&I.type==="tools"?I.names=[...I.names,s.name]:S.push({type:"tools",names:[s.name]}),u.segments=S,x(m)}break;case"mutation":T=!0,s.action==="created"&&s.repo&&s.entityType&&s.entityId&&(w={repo:s.repo,entityType:s.entityType,entityId:s.entityId}),window.StudioChrome?.emitMutation?.({action:s.action,repo:s.repo,entityType:s.entityType,entityId:s.entityId});break;case"highlight":a(O,s.entityIds&&s.entityIds.length>0?new Set(s.entityIds):null,!0);break;case"done":s.message&&!u.content&&(u.content=s.message,u.segments=[{type:"text",content:s.message}]),u.streaming=!1,a(r,!1),N(i,t(o)),T&&(L().then(()=>{x(p)}),W.refreshAll().then(()=>{w&&V(`/${w.repo}/${w.entityType}/${w.entityId}`)}));break;case"error":u.content+=`
|
|
3
3
|
|
|
4
4
|
Error: ${s.message}`,u.streaming=!1,a(r,!1),N(i,t(o));break}},A.signal)}function $(){if(!t(r))return;fetch("/api/chat/abort",{method:"POST",credentials:"include"}).catch(()=>{}),A?.abort(),A=null,a(r,!1);const e=t(o)[t(o).length-1];e?.streaming&&(e.streaming=!1,t(n)&&N(t(n),t(o)))}function Y(){$(),a(o,[],!0),t(n)&&t(f)&&N(t(n),t(o))}function Z(e){const d=b().filter(l=>l.id!==e);if(_(d),t(n)===e){const l=d.sort((T,w)=>w.updatedAt.localeCompare(T.updatedAt));l.length>0?(a(n,l[0].id,!0),a(o,l[0].messages.map(T=>({...T,streaming:!1})),!0),a(f,!0)):(a(n,null),a(o,[],!0),a(f,!1))}}function j(e){const d=b().find(l=>l.id===e);d&&($(),a(n,d.id,!0),a(o,d.messages.map(l=>({...l,streaming:!1})),!0),a(f,!0))}function q(){return b().sort((e,i)=>i.updatedAt.localeCompare(e.updatedAt)).map(e=>({id:e.id,title:e.title,createdAt:e.createdAt,updatedAt:e.updatedAt,preview:e.messages.find(i=>i.role==="user")?.content.slice(0,80)||"",count:e.messages.length,active:e.id===t(n)}))}return{get messages(){return t(o)},get streaming(){return t(r)},get mutationCount(){return t(p)},get scrollTick(){return t(m)},get forceScroll(){return t(k)},triggerScroll(){x(k)},get highlightedIds(){return t(O)},get activeSessionId(){return t(n)},get draftInput(){return t(C)},set draftInput(e){a(C,e,!0)},send:K,stop:$,clear:Y,newSession:M,deleteSession:Z,getSessions:q,loadSession:j}}const te=B();export{te as chatStore};
|