@scalar/agent-chat 0.2.3 → 0.2.6
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/LICENSE +21 -0
- package/dist/App.vue.d.ts +3 -2
- package/dist/App.vue.d.ts.map +1 -1
- package/dist/App.vue.js +32 -0
- package/dist/App.vue2.js +4 -0
- package/dist/Chat.vue.d.ts.map +1 -1
- package/dist/Chat.vue.js +23 -0
- package/dist/Chat.vue2.js +4 -0
- package/dist/_virtual/_plugin-vue_export-helper.js +9 -0
- package/dist/api.d.ts +50 -0
- package/dist/api.d.ts.map +1 -0
- package/dist/api.js +68 -0
- package/dist/components/ApprovalSection.vue.d.ts.map +1 -1
- package/dist/components/ApprovalSection.vue.js +7 -0
- package/dist/components/ApprovalSection.vue2.js +42 -0
- package/dist/components/AuthenticationProvided.vue.d.ts +3 -0
- package/dist/components/AuthenticationProvided.vue.d.ts.map +1 -0
- package/dist/components/AuthenticationProvided.vue.js +13 -0
- package/dist/components/AuthenticationRequired.vue.d.ts +3 -0
- package/dist/components/AuthenticationRequired.vue.d.ts.map +1 -0
- package/dist/components/AuthenticationRequired.vue.js +13 -0
- package/dist/components/AutosendPaused.vue.d.ts.map +1 -1
- package/dist/components/AutosendPaused.vue.js +13 -0
- package/dist/components/ContextItem.vue.d.ts.map +1 -1
- package/dist/components/ContextItem.vue.js +7 -0
- package/dist/components/ContextItem.vue2.js +19 -0
- package/dist/components/ErrorMessage.vue.d.ts +2 -1
- package/dist/components/ErrorMessage.vue.d.ts.map +1 -1
- package/dist/components/ErrorMessage.vue.js +7 -0
- package/dist/components/ErrorMessage.vue2.js +22 -0
- package/dist/components/LoadingMiniOpenAPIDoc.vue.d.ts.map +1 -1
- package/dist/components/LoadingMiniOpenAPIDoc.vue.js +14 -0
- package/dist/components/LoadingOpenAPISpecsSummary.vue.d.ts.map +1 -1
- package/dist/components/LoadingOpenAPISpecsSummary.vue.js +14 -0
- package/dist/components/Logo.vue.d.ts.map +1 -1
- package/dist/components/Logo.vue.js +23 -0
- package/dist/components/PaymentSection.vue.d.ts.map +1 -1
- package/dist/components/PaymentSection.vue.js +7 -0
- package/dist/components/PaymentSection.vue2.js +34 -0
- package/dist/components/RequestApproved.vue.d.ts.map +1 -1
- package/dist/components/RequestApproved.vue.js +13 -0
- package/dist/components/RequestFailed.vue.d.ts.map +1 -1
- package/dist/components/RequestFailed.vue.js +24 -0
- package/dist/components/RequestPreview.vue.d.ts +1 -1
- package/dist/components/RequestPreview.vue.d.ts.map +1 -1
- package/dist/components/RequestPreview.vue.js +7 -0
- package/dist/components/RequestPreview.vue2.js +123 -0
- package/dist/components/RequestRejected.vue.d.ts.map +1 -1
- package/dist/components/RequestRejected.vue.js +22 -0
- package/dist/components/RequestSuccess.vue.d.ts.map +1 -1
- package/dist/components/RequestSuccess.vue.js +13 -0
- package/dist/components/ResponseBody/ResponseBody.vue.d.ts +1 -1
- package/dist/components/ResponseBody/ResponseBody.vue.d.ts.map +1 -1
- package/dist/components/ResponseBody/ResponseBody.vue.js +41 -0
- package/dist/components/ResponseBody/ResponseBody.vue2.js +4 -0
- package/dist/components/ResponseBody/ResponseBodyInfo.vue.d.ts.map +1 -1
- package/dist/components/ResponseBody/ResponseBodyInfo.vue.js +14 -0
- package/dist/components/ResponseBody/ResponseBodyPreview.vue.d.ts +1 -1
- package/dist/components/ResponseBody/ResponseBodyPreview.vue.d.ts.map +1 -1
- package/dist/components/ResponseBody/ResponseBodyPreview.vue.js +7 -0
- package/dist/components/ResponseBody/ResponseBodyPreview.vue2.js +65 -0
- package/dist/components/ResponseBody/ResponseBodyRaw.vue.d.ts.map +1 -1
- package/dist/components/ResponseBody/ResponseBodyRaw.vue.js +20 -0
- package/dist/components/ResponseBody/ResponseBodyRaw.vue2.js +4 -0
- package/dist/components/ResponseBody/ResponseBodyToggle.vue.d.ts +2 -2
- package/dist/components/ResponseBody/ResponseBodyToggle.vue.d.ts.map +1 -1
- package/dist/components/ResponseBody/ResponseBodyToggle.vue.js +26 -0
- package/dist/components/ResponseBody/ResponseBodyToggle.vue2.js +4 -0
- package/dist/components/ResponseBody/helpers/media-types.js +130 -0
- package/dist/components/ResponseBody/helpers/process-response-body.d.ts +1 -1
- package/dist/components/ResponseBody/helpers/process-response-body.d.ts.map +1 -1
- package/dist/components/ResponseBody/helpers/process-response-body.js +33 -0
- package/dist/components/SearchPopover.vue.d.ts +2 -2
- package/dist/components/SearchPopover.vue.d.ts.map +1 -1
- package/dist/components/SearchPopover.vue.js +7 -0
- package/dist/components/SearchPopover.vue2.js +67 -0
- package/dist/components/Selector.vue.d.ts +24 -0
- package/dist/components/Selector.vue.d.ts.map +1 -0
- package/dist/components/Selector.vue.js +67 -0
- package/dist/components/Selector.vue2.js +4 -0
- package/dist/components/SendingRequest.vue.d.ts.map +1 -1
- package/dist/components/SendingRequest.vue.js +24 -0
- package/dist/components/ServerSelector.vue.d.ts +22 -0
- package/dist/components/ServerSelector.vue.d.ts.map +1 -0
- package/dist/components/ServerSelector.vue.js +57 -0
- package/dist/components/ServerSelector.vue2.js +4 -0
- package/dist/components/Suggestion.vue.d.ts.map +1 -1
- package/dist/components/TestRequestButton.vue.d.ts.map +1 -1
- package/dist/components/{Endpoint.vue.d.ts → UploadSection.vue.d.ts} +3 -5
- package/dist/components/UploadSection.vue.d.ts.map +1 -0
- package/dist/components/UploadSection.vue.js +7 -0
- package/dist/components/UploadSection.vue2.js +62 -0
- package/dist/entities/prompt/constants.d.ts +2 -0
- package/dist/entities/prompt/constants.d.ts.map +1 -0
- package/dist/entities/prompt/constants.js +4 -0
- package/dist/entities/registry/document.d.ts +21 -0
- package/dist/entities/registry/document.d.ts.map +1 -0
- package/dist/entities/registry/document.js +12 -0
- package/dist/entities/tools/ask-for-authentication.d.ts +7 -0
- package/dist/entities/tools/ask-for-authentication.d.ts.map +1 -0
- package/dist/entities/tools/ask-for-authentication.js +8 -0
- package/dist/entities/tools/constants.d.ts +2 -0
- package/dist/entities/tools/constants.d.ts.map +1 -0
- package/dist/entities/tools/constants.js +4 -0
- package/dist/entities/tools/execute-request.d.ts +42 -0
- package/dist/entities/tools/execute-request.d.ts.map +1 -0
- package/dist/entities/tools/execute-request.js +11 -0
- package/dist/entities/tools/get-mini-openapi-spec.d.ts +12 -0
- package/dist/entities/tools/get-mini-openapi-spec.d.ts.map +1 -0
- package/dist/entities/tools/get-mini-openapi-spec.js +8 -0
- package/dist/entities/tools/get-openapi-spec-summary.d.ts +10 -0
- package/dist/entities/tools/get-openapi-spec-summary.d.ts.map +1 -0
- package/dist/entities/tools/get-openapi-spec-summary.js +4 -0
- package/dist/helpers.d.ts +20 -12
- package/dist/helpers.d.ts.map +1 -1
- package/dist/helpers.js +122 -0
- package/dist/hooks/{useChatApprovals.d.ts → use-chat-approvals.d.ts} +1 -1
- package/dist/hooks/use-chat-approvals.d.ts.map +1 -0
- package/dist/hooks/use-chat-approvals.js +21 -0
- package/dist/hooks/use-chat-error.d.ts +14 -0
- package/dist/hooks/use-chat-error.d.ts.map +1 -0
- package/dist/hooks/use-chat-error.js +23 -0
- package/dist/hooks/use-chat-pending-client-tool-parts.d.ts +19 -0
- package/dist/hooks/use-chat-pending-client-tool-parts.d.ts.map +1 -0
- package/dist/hooks/use-chat-pending-client-tool-parts.js +12 -0
- package/dist/hooks/{useChatScroll.d.ts → use-chat-scroll.d.ts} +1 -1
- package/dist/hooks/use-chat-scroll.d.ts.map +1 -0
- package/dist/hooks/use-chat-scroll.js +16 -0
- package/dist/hooks/{useSearch.d.ts → use-search.d.ts} +11 -11
- package/dist/hooks/use-search.d.ts.map +1 -0
- package/dist/hooks/use-search.js +25 -0
- package/dist/hooks/use-term-and-conditions.d.ts +6 -0
- package/dist/hooks/use-term-and-conditions.d.ts.map +1 -0
- package/dist/hooks/use-term-and-conditions.js +16 -0
- package/dist/hooks/use-upload-tmp-document.d.ts +19 -0
- package/dist/hooks/use-upload-tmp-document.d.ts.map +1 -0
- package/dist/hooks/use-upload-tmp-document.js +64 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/package.json +34 -23
- package/dist/registry/add-documents-to-store.d.ts +6 -6
- package/dist/registry/add-documents-to-store.d.ts.map +1 -1
- package/dist/registry/add-documents-to-store.js +40 -0
- package/dist/registry/create-document-name.d.ts +2 -0
- package/dist/registry/create-document-name.d.ts.map +1 -0
- package/dist/registry/create-document-name.js +6 -0
- package/dist/state/state.d.ts +20 -8
- package/dist/state/state.d.ts.map +1 -1
- package/dist/state/state.js +110 -0
- package/dist/style.css +1 -1
- package/dist/types.d.ts +2 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/views/Chat/Chat.vue.d.ts.map +1 -1
- package/dist/views/Chat/Chat.vue.js +7 -0
- package/dist/views/Chat/Chat.vue2.js +77 -0
- package/dist/views/Chat/Messages/AskForAuthentication.vue.d.ts +10 -0
- package/dist/views/Chat/Messages/AskForAuthentication.vue.d.ts.map +1 -0
- package/dist/views/Chat/Messages/AskForAuthentication.vue.js +7 -0
- package/dist/views/Chat/Messages/AskForAuthentication.vue2.js +93 -0
- package/dist/views/Chat/Messages/ExecuteRequestTool.vue.d.ts +2 -2
- package/dist/views/Chat/Messages/ExecuteRequestTool.vue.d.ts.map +1 -1
- package/dist/views/Chat/Messages/ExecuteRequestTool.vue.js +7 -0
- package/dist/views/Chat/Messages/ExecuteRequestTool.vue2.js +23 -0
- package/dist/views/Chat/Messages/GetMiniOpenAPIDocTool.vue.d.ts +2 -2
- package/dist/views/Chat/Messages/GetMiniOpenAPIDocTool.vue.d.ts.map +1 -1
- package/dist/views/Chat/Messages/GetMiniOpenAPIDocTool.vue.js +7 -0
- package/dist/views/Chat/Messages/GetMiniOpenAPIDocTool.vue2.js +56 -0
- package/dist/views/Chat/Messages/GetOpenAPISpecsSummary.vue.d.ts +2 -2
- package/dist/views/Chat/Messages/GetOpenAPISpecsSummary.vue.d.ts.map +1 -1
- package/dist/views/Chat/Messages/GetOpenAPISpecsSummary.vue.js +26 -0
- package/dist/views/Chat/Messages/GetOpenAPISpecsSummary.vue2.js +4 -0
- package/dist/views/Chat/Messages/Text.vue.d.ts.map +1 -1
- package/dist/views/Chat/Messages/Text.vue.js +16 -0
- package/dist/views/Chat/Messages/Text.vue2.js +4 -0
- package/dist/views/Layout.vue.d.ts.map +1 -1
- package/dist/views/Layout.vue.js +7 -0
- package/dist/views/Layout.vue2.js +23 -0
- package/dist/views/PromptForm.vue.d.ts.map +1 -1
- package/dist/views/PromptForm.vue.js +7 -0
- package/dist/views/PromptForm.vue2.js +212 -0
- package/dist/views/Settings/Auth.vue.d.ts.map +1 -1
- package/dist/views/Settings/Auth.vue.js +67 -0
- package/dist/views/Settings/Auth.vue2.js +4 -0
- package/dist/views/Settings/DocSettings.vue.d.ts.map +1 -1
- package/dist/views/Settings/DocSettings.vue.js +7 -0
- package/dist/views/Settings/DocSettings.vue2.js +48 -0
- package/dist/views/Settings/Settings.vue.d.ts.map +1 -1
- package/dist/views/Settings/Settings.vue.js +8 -0
- package/dist/views/Settings/Settings.vue2.js +67 -0
- package/dist/views/Start.vue.d.ts.map +1 -1
- package/dist/views/Start.vue.js +7 -0
- package/dist/views/Start.vue2.js +41 -0
- package/package.json +52 -7
- package/dist/Tooltip-Cm82QgNj.js +0 -575
- package/dist/__vite-optional-peer-dep_stream-markdown_markstream-vue_false-sdjmOmXd.js +0 -5
- package/dist/__vite-optional-peer-dep_stream-monaco_markstream-vue_false-HdL4xm5U.js +0 -5
- package/dist/__vite-optional-peer-dep_vue-i18n_markstream-vue_false-B9Pwe5kz.js +0 -5
- package/dist/_basePickBy-hHD8tMGb.js +0 -151
- package/dist/_baseUniq-DTF1wuF6.js +0 -614
- package/dist/arc-Dw2RQerU.js +0 -83
- package/dist/architecture-U656AL7Q-B00Z9eXr.js +0 -36
- package/dist/architectureDiagram-VXUJARFQ-BtOffFaM.js +0 -4662
- package/dist/blockDiagram-VD42YOAC-BUqFMMQe.js +0 -2261
- package/dist/c4Diagram-YG6GDRKO-NrM1YcpG.js +0 -1579
- package/dist/channel-105myCGU.js +0 -5
- package/dist/chunk-4BX2VUAB-TAxJli7C.js +0 -8
- package/dist/chunk-55IACEB6-VXFJ4bz5.js +0 -8
- package/dist/chunk-B4BG7PRW-CZDQpfj5.js +0 -1375
- package/dist/chunk-DI55MBZ5-D3l7TA-E.js +0 -1370
- package/dist/chunk-FMBD7UC4-BMXFm8I3.js +0 -19
- package/dist/chunk-QN33PNHL-BOUpbpWp.js +0 -19
- package/dist/chunk-QZHKN3VN-C-TEEx05.js +0 -15
- package/dist/chunk-TZMSLE5B-BUiROKNR.js +0 -64
- package/dist/classDiagram-2ON5EDUG-HQET4ybK.js +0 -16
- package/dist/classDiagram-v2-WZHVMYZB-HQET4ybK.js +0 -16
- package/dist/clone-CIIO71O9.js +0 -8
- package/dist/components/Endpoint.vue.d.ts.map +0 -1
- package/dist/cose-bilkent-S5V4N54A-CMsF4n-5.js +0 -2609
- package/dist/cytoscape.esm-DfdJODL8.js +0 -18735
- package/dist/dagre-6UL2VRFP-DqzdQ6Qg.js +0 -444
- package/dist/defaultLocale-BEa-49Qz.js +0 -171
- package/dist/diagram-PSM6KHXK-1xyGntw2.js +0 -531
- package/dist/diagram-QEK2KX5R-DdZdlAm1.js +0 -217
- package/dist/diagram-S2PKOQOG-C80Eo2jp.js +0 -142
- package/dist/erDiagram-Q2GNP2WA-DFVRrMXT.js +0 -841
- package/dist/flowDiagram-NV44I4VS-D9QK_qqB.js +0 -1620
- package/dist/ganttDiagram-LVOFAZNH-Bo1NTkeQ.js +0 -2506
- package/dist/gitGraph-F6HP7TQM-C5hdgcgO.js +0 -27
- package/dist/gitGraphDiagram-NY62KEGX-BZqnqZh6.js +0 -699
- package/dist/graph-Dth4IhEK.js +0 -247
- package/dist/hooks/useChatApprovals.d.ts.map +0 -1
- package/dist/hooks/useChatOperationBlocks.d.ts +0 -3
- package/dist/hooks/useChatOperationBlocks.d.ts.map +0 -1
- package/dist/hooks/useChatScroll.d.ts.map +0 -1
- package/dist/hooks/useSearch.d.ts.map +0 -1
- package/dist/index-BOvT43H8.js +0 -111780
- package/dist/index2-B36B-gt0.js +0 -69
- package/dist/index3-CtIyYUnG.js +0 -70
- package/dist/index4-Dzz91Ao2.js +0 -537
- package/dist/index5-Bmz0gMSP.js +0 -590
- package/dist/index6-DMB3qTSV.js +0 -196
- package/dist/info-NVLQJR56-azt5obk5.js +0 -27
- package/dist/infoDiagram-ER5ION4S-DD4Jtctm.js +0 -24
- package/dist/infographic_markstream-vue_false-BfsmcXxk.js +0 -5
- package/dist/init-DjUOC4st.js +0 -16
- package/dist/journeyDiagram-XKPGCS4Q-CXL6UO0r.js +0 -834
- package/dist/kanban-definition-3W4ZIXB7-B57do5Wg.js +0 -719
- package/dist/katex-SsTUIUTC.js +0 -11688
- package/dist/layout-7TCY8eA2.js +0 -1332
- package/dist/linear-DSm5i91N.js +0 -625
- package/dist/mermaid-parser.core-CUQWpAMM.js +0 -12746
- package/dist/mermaid.core-QjuzH7xx.js +0 -14164
- package/dist/mhchem-XHl7cef5.js +0 -2306
- package/dist/mindmap-definition-VGOIOE7T-DAQyGNAM.js +0 -784
- package/dist/ordinal-DfAQgscy.js +0 -61
- package/dist/packet-BFZMPI3H-CixuxAEA.js +0 -27
- package/dist/pie-7BOR55EZ-D3cgnzR1.js +0 -32
- package/dist/pieDiagram-ADFJNKIX-BqxgYwrL.js +0 -161
- package/dist/quadrantDiagram-AYHSOK5B-CQ4v-9Hh.js +0 -1022
- package/dist/radar-NHE76QYJ-DhV0Od_M.js +0 -27
- package/dist/requirementDiagram-UZGBJVZJ-ncWNAgFi.js +0 -850
- package/dist/safeRaf-I3a3-dyJ.js +0 -10
- package/dist/sankeyDiagram-TZEHDZUN-yCR2_cH5.js +0 -810
- package/dist/sequenceDiagram-WL72ISMW-DZ7wqFyd.js +0 -2511
- package/dist/stateDiagram-FKZM4ZOC-Dra68Tzi.js +0 -263
- package/dist/stateDiagram-v2-4FDKWEC3-CARbPECD.js +0 -16
- package/dist/timeline-definition-IT6M3QCI-DEbG9QIM.js +0 -795
- package/dist/treemap-KMMF4GRG-CQbPsyWe.js +0 -81
- package/dist/xychartDiagram-PRI3JC2R-C94Pu8hL.js +0 -1340
package/dist/ordinal-DfAQgscy.js
DELETED
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import { i as a } from "./init-DjUOC4st.js";
|
|
2
|
-
class o extends Map {
|
|
3
|
-
constructor(n, t = g) {
|
|
4
|
-
if (super(), Object.defineProperties(this, { _intern: { value: /* @__PURE__ */ new Map() }, _key: { value: t } }), n != null) for (const [r, s] of n) this.set(r, s);
|
|
5
|
-
}
|
|
6
|
-
get(n) {
|
|
7
|
-
return super.get(c(this, n));
|
|
8
|
-
}
|
|
9
|
-
has(n) {
|
|
10
|
-
return super.has(c(this, n));
|
|
11
|
-
}
|
|
12
|
-
set(n, t) {
|
|
13
|
-
return super.set(l(this, n), t);
|
|
14
|
-
}
|
|
15
|
-
delete(n) {
|
|
16
|
-
return super.delete(p(this, n));
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
function c({ _intern: e, _key: n }, t) {
|
|
20
|
-
const r = n(t);
|
|
21
|
-
return e.has(r) ? e.get(r) : t;
|
|
22
|
-
}
|
|
23
|
-
function l({ _intern: e, _key: n }, t) {
|
|
24
|
-
const r = n(t);
|
|
25
|
-
return e.has(r) ? e.get(r) : (e.set(r, t), t);
|
|
26
|
-
}
|
|
27
|
-
function p({ _intern: e, _key: n }, t) {
|
|
28
|
-
const r = n(t);
|
|
29
|
-
return e.has(r) && (t = e.get(r), e.delete(r)), t;
|
|
30
|
-
}
|
|
31
|
-
function g(e) {
|
|
32
|
-
return e !== null && typeof e == "object" ? e.valueOf() : e;
|
|
33
|
-
}
|
|
34
|
-
const f = Symbol("implicit");
|
|
35
|
-
function h() {
|
|
36
|
-
var e = new o(), n = [], t = [], r = f;
|
|
37
|
-
function s(u) {
|
|
38
|
-
let i = e.get(u);
|
|
39
|
-
if (i === void 0) {
|
|
40
|
-
if (r !== f) return r;
|
|
41
|
-
e.set(u, i = n.push(u) - 1);
|
|
42
|
-
}
|
|
43
|
-
return t[i % t.length];
|
|
44
|
-
}
|
|
45
|
-
return s.domain = function(u) {
|
|
46
|
-
if (!arguments.length) return n.slice();
|
|
47
|
-
n = [], e = new o();
|
|
48
|
-
for (const i of u)
|
|
49
|
-
e.has(i) || e.set(i, n.push(i) - 1);
|
|
50
|
-
return s;
|
|
51
|
-
}, s.range = function(u) {
|
|
52
|
-
return arguments.length ? (t = Array.from(u), s) : t.slice();
|
|
53
|
-
}, s.unknown = function(u) {
|
|
54
|
-
return arguments.length ? (r = u, s) : r;
|
|
55
|
-
}, s.copy = function() {
|
|
56
|
-
return h(n, t).unknown(r);
|
|
57
|
-
}, a.apply(s, arguments), s;
|
|
58
|
-
}
|
|
59
|
-
export {
|
|
60
|
-
h as o
|
|
61
|
-
};
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { E as o, i as s, M as n, c as i, _ as r, P as u, a as d, C as l, A as k } from "./mermaid-parser.core-CUQWpAMM.js";
|
|
2
|
-
var e, m = (e = class extends k {
|
|
3
|
-
constructor() {
|
|
4
|
-
super(["packet"]);
|
|
5
|
-
}
|
|
6
|
-
}, r(e, "PacketTokenBuilder"), e), v = {
|
|
7
|
-
parser: {
|
|
8
|
-
TokenBuilder: /* @__PURE__ */ r(() => new m(), "TokenBuilder"),
|
|
9
|
-
ValueConverter: /* @__PURE__ */ r(() => new l(), "ValueConverter")
|
|
10
|
-
}
|
|
11
|
-
};
|
|
12
|
-
function M(c = o) {
|
|
13
|
-
const a = s(
|
|
14
|
-
i(c),
|
|
15
|
-
n
|
|
16
|
-
), t = s(
|
|
17
|
-
d({ shared: a }),
|
|
18
|
-
u,
|
|
19
|
-
v
|
|
20
|
-
);
|
|
21
|
-
return a.ServiceRegistry.register(t), { shared: a, Packet: t };
|
|
22
|
-
}
|
|
23
|
-
r(M, "createPacketServices");
|
|
24
|
-
export {
|
|
25
|
-
v as PacketModule,
|
|
26
|
-
M as createPacketServices
|
|
27
|
-
};
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { E as n, i as s, M as u, c as d, _ as a, b as c, a as l, d as v, A as m } from "./mermaid-parser.core-CUQWpAMM.js";
|
|
2
|
-
var e, C = (e = class extends m {
|
|
3
|
-
constructor() {
|
|
4
|
-
super(["pie", "showData"]);
|
|
5
|
-
}
|
|
6
|
-
}, a(e, "PieTokenBuilder"), e), r, P = (r = class extends v {
|
|
7
|
-
runCustomConverter(t, i, S) {
|
|
8
|
-
if (t.name === "PIE_SECTION_LABEL")
|
|
9
|
-
return i.replace(/"/g, "").trim();
|
|
10
|
-
}
|
|
11
|
-
}, a(r, "PieValueConverter"), r), M = {
|
|
12
|
-
parser: {
|
|
13
|
-
TokenBuilder: /* @__PURE__ */ a(() => new C(), "TokenBuilder"),
|
|
14
|
-
ValueConverter: /* @__PURE__ */ a(() => new P(), "ValueConverter")
|
|
15
|
-
}
|
|
16
|
-
};
|
|
17
|
-
function p(o = n) {
|
|
18
|
-
const t = s(
|
|
19
|
-
d(o),
|
|
20
|
-
u
|
|
21
|
-
), i = s(
|
|
22
|
-
l({ shared: t }),
|
|
23
|
-
c,
|
|
24
|
-
M
|
|
25
|
-
);
|
|
26
|
-
return t.ServiceRegistry.register(i), { shared: t, Pie: i };
|
|
27
|
-
}
|
|
28
|
-
a(p, "createPieServices");
|
|
29
|
-
export {
|
|
30
|
-
M as PieModule,
|
|
31
|
-
p as createPieServices
|
|
32
|
-
};
|
|
@@ -1,161 +0,0 @@
|
|
|
1
|
-
import { a4 as S, a7 as F, aG as j, _ as p, g as q, s as H, a as Z, b as J, q as K, p as Q, l as z, c as X, D as Y, H as ee, N as te, e as ae, y as re, F as ne } from "./mermaid.core-QjuzH7xx.js";
|
|
2
|
-
import { p as ie } from "./chunk-4BX2VUAB-TAxJli7C.js";
|
|
3
|
-
import { p as se } from "./mermaid-parser.core-CUQWpAMM.js";
|
|
4
|
-
import { d as I } from "./arc-Dw2RQerU.js";
|
|
5
|
-
import { o as le } from "./ordinal-DfAQgscy.js";
|
|
6
|
-
function oe(e, a) {
|
|
7
|
-
return a < e ? -1 : a > e ? 1 : a >= e ? 0 : NaN;
|
|
8
|
-
}
|
|
9
|
-
function ce(e) {
|
|
10
|
-
return e;
|
|
11
|
-
}
|
|
12
|
-
function ue() {
|
|
13
|
-
var e = ce, a = oe, f = null, y = S(0), s = S(F), o = S(0);
|
|
14
|
-
function l(t) {
|
|
15
|
-
var n, c = (t = j(t)).length, d, x, m = 0, u = new Array(c), i = new Array(c), v = +y.apply(this, arguments), w = Math.min(F, Math.max(-F, s.apply(this, arguments) - v)), h, C = Math.min(Math.abs(w) / c, o.apply(this, arguments)), $ = C * (w < 0 ? -1 : 1), g;
|
|
16
|
-
for (n = 0; n < c; ++n)
|
|
17
|
-
(g = i[u[n] = n] = +e(t[n], n, t)) > 0 && (m += g);
|
|
18
|
-
for (a != null ? u.sort(function(A, D) {
|
|
19
|
-
return a(i[A], i[D]);
|
|
20
|
-
}) : f != null && u.sort(function(A, D) {
|
|
21
|
-
return f(t[A], t[D]);
|
|
22
|
-
}), n = 0, x = m ? (w - c * $) / m : 0; n < c; ++n, v = h)
|
|
23
|
-
d = u[n], g = i[d], h = v + (g > 0 ? g * x : 0) + $, i[d] = {
|
|
24
|
-
data: t[d],
|
|
25
|
-
index: n,
|
|
26
|
-
value: g,
|
|
27
|
-
startAngle: v,
|
|
28
|
-
endAngle: h,
|
|
29
|
-
padAngle: C
|
|
30
|
-
};
|
|
31
|
-
return i;
|
|
32
|
-
}
|
|
33
|
-
return l.value = function(t) {
|
|
34
|
-
return arguments.length ? (e = typeof t == "function" ? t : S(+t), l) : e;
|
|
35
|
-
}, l.sortValues = function(t) {
|
|
36
|
-
return arguments.length ? (a = t, f = null, l) : a;
|
|
37
|
-
}, l.sort = function(t) {
|
|
38
|
-
return arguments.length ? (f = t, a = null, l) : f;
|
|
39
|
-
}, l.startAngle = function(t) {
|
|
40
|
-
return arguments.length ? (y = typeof t == "function" ? t : S(+t), l) : y;
|
|
41
|
-
}, l.endAngle = function(t) {
|
|
42
|
-
return arguments.length ? (s = typeof t == "function" ? t : S(+t), l) : s;
|
|
43
|
-
}, l.padAngle = function(t) {
|
|
44
|
-
return arguments.length ? (o = typeof t == "function" ? t : S(+t), l) : o;
|
|
45
|
-
}, l;
|
|
46
|
-
}
|
|
47
|
-
var pe = ne.pie, G = {
|
|
48
|
-
sections: /* @__PURE__ */ new Map(),
|
|
49
|
-
showData: !1
|
|
50
|
-
}, T = G.sections, N = G.showData, de = structuredClone(pe), ge = /* @__PURE__ */ p(() => structuredClone(de), "getConfig"), fe = /* @__PURE__ */ p(() => {
|
|
51
|
-
T = /* @__PURE__ */ new Map(), N = G.showData, re();
|
|
52
|
-
}, "clear"), he = /* @__PURE__ */ p(({ label: e, value: a }) => {
|
|
53
|
-
if (a < 0)
|
|
54
|
-
throw new Error(
|
|
55
|
-
`"${e}" has invalid value: ${a}. Negative values are not allowed in pie charts. All slice values must be >= 0.`
|
|
56
|
-
);
|
|
57
|
-
T.has(e) || (T.set(e, a), z.debug(`added new section: ${e}, with value: ${a}`));
|
|
58
|
-
}, "addSection"), me = /* @__PURE__ */ p(() => T, "getSections"), ve = /* @__PURE__ */ p((e) => {
|
|
59
|
-
N = e;
|
|
60
|
-
}, "setShowData"), Se = /* @__PURE__ */ p(() => N, "getShowData"), L = {
|
|
61
|
-
getConfig: ge,
|
|
62
|
-
clear: fe,
|
|
63
|
-
setDiagramTitle: Q,
|
|
64
|
-
getDiagramTitle: K,
|
|
65
|
-
setAccTitle: J,
|
|
66
|
-
getAccTitle: Z,
|
|
67
|
-
setAccDescription: H,
|
|
68
|
-
getAccDescription: q,
|
|
69
|
-
addSection: he,
|
|
70
|
-
getSections: me,
|
|
71
|
-
setShowData: ve,
|
|
72
|
-
getShowData: Se
|
|
73
|
-
}, ye = /* @__PURE__ */ p((e, a) => {
|
|
74
|
-
ie(e, a), a.setShowData(e.showData), e.sections.map(a.addSection);
|
|
75
|
-
}, "populateDb"), xe = {
|
|
76
|
-
parse: /* @__PURE__ */ p(async (e) => {
|
|
77
|
-
const a = await se("pie", e);
|
|
78
|
-
z.debug(a), ye(a, L);
|
|
79
|
-
}, "parse")
|
|
80
|
-
}, we = /* @__PURE__ */ p((e) => `
|
|
81
|
-
.pieCircle{
|
|
82
|
-
stroke: ${e.pieStrokeColor};
|
|
83
|
-
stroke-width : ${e.pieStrokeWidth};
|
|
84
|
-
opacity : ${e.pieOpacity};
|
|
85
|
-
}
|
|
86
|
-
.pieOuterCircle{
|
|
87
|
-
stroke: ${e.pieOuterStrokeColor};
|
|
88
|
-
stroke-width: ${e.pieOuterStrokeWidth};
|
|
89
|
-
fill: none;
|
|
90
|
-
}
|
|
91
|
-
.pieTitleText {
|
|
92
|
-
text-anchor: middle;
|
|
93
|
-
font-size: ${e.pieTitleTextSize};
|
|
94
|
-
fill: ${e.pieTitleTextColor};
|
|
95
|
-
font-family: ${e.fontFamily};
|
|
96
|
-
}
|
|
97
|
-
.slice {
|
|
98
|
-
font-family: ${e.fontFamily};
|
|
99
|
-
fill: ${e.pieSectionTextColor};
|
|
100
|
-
font-size:${e.pieSectionTextSize};
|
|
101
|
-
// fill: white;
|
|
102
|
-
}
|
|
103
|
-
.legend text {
|
|
104
|
-
fill: ${e.pieLegendTextColor};
|
|
105
|
-
font-family: ${e.fontFamily};
|
|
106
|
-
font-size: ${e.pieLegendTextSize};
|
|
107
|
-
}
|
|
108
|
-
`, "getStyles"), Ae = we, De = /* @__PURE__ */ p((e) => {
|
|
109
|
-
const a = [...e.values()].reduce((s, o) => s + o, 0), f = [...e.entries()].map(([s, o]) => ({ label: s, value: o })).filter((s) => s.value / a * 100 >= 1).sort((s, o) => o.value - s.value);
|
|
110
|
-
return ue().value((s) => s.value)(f);
|
|
111
|
-
}, "createPieArcs"), Ce = /* @__PURE__ */ p((e, a, f, y) => {
|
|
112
|
-
z.debug(`rendering pie chart
|
|
113
|
-
` + e);
|
|
114
|
-
const s = y.db, o = X(), l = Y(s.getConfig(), o.pie), t = 40, n = 18, c = 4, d = 450, x = d, m = ee(a), u = m.append("g");
|
|
115
|
-
u.attr("transform", "translate(" + x / 2 + "," + d / 2 + ")");
|
|
116
|
-
const { themeVariables: i } = o;
|
|
117
|
-
let [v] = te(i.pieOuterStrokeWidth);
|
|
118
|
-
v ??= 2;
|
|
119
|
-
const w = l.textPosition, h = Math.min(x, d) / 2 - t, C = I().innerRadius(0).outerRadius(h), $ = I().innerRadius(h * w).outerRadius(h * w);
|
|
120
|
-
u.append("circle").attr("cx", 0).attr("cy", 0).attr("r", h + v / 2).attr("class", "pieOuterCircle");
|
|
121
|
-
const g = s.getSections(), A = De(g), D = [
|
|
122
|
-
i.pie1,
|
|
123
|
-
i.pie2,
|
|
124
|
-
i.pie3,
|
|
125
|
-
i.pie4,
|
|
126
|
-
i.pie5,
|
|
127
|
-
i.pie6,
|
|
128
|
-
i.pie7,
|
|
129
|
-
i.pie8,
|
|
130
|
-
i.pie9,
|
|
131
|
-
i.pie10,
|
|
132
|
-
i.pie11,
|
|
133
|
-
i.pie12
|
|
134
|
-
];
|
|
135
|
-
let b = 0;
|
|
136
|
-
g.forEach((r) => {
|
|
137
|
-
b += r;
|
|
138
|
-
});
|
|
139
|
-
const W = A.filter((r) => (r.data.value / b * 100).toFixed(0) !== "0"), E = le(D);
|
|
140
|
-
u.selectAll("mySlices").data(W).enter().append("path").attr("d", C).attr("fill", (r) => E(r.data.label)).attr("class", "pieCircle"), u.selectAll("mySlices").data(W).enter().append("text").text((r) => (r.data.value / b * 100).toFixed(0) + "%").attr("transform", (r) => "translate(" + $.centroid(r) + ")").style("text-anchor", "middle").attr("class", "slice"), u.append("text").text(s.getDiagramTitle()).attr("x", 0).attr("y", -400 / 2).attr("class", "pieTitleText");
|
|
141
|
-
const O = [...g.entries()].map(([r, M]) => ({
|
|
142
|
-
label: r,
|
|
143
|
-
value: M
|
|
144
|
-
})), k = u.selectAll(".legend").data(O).enter().append("g").attr("class", "legend").attr("transform", (r, M) => {
|
|
145
|
-
const R = n + c, B = R * O.length / 2, V = 12 * n, U = M * R - B;
|
|
146
|
-
return "translate(" + V + "," + U + ")";
|
|
147
|
-
});
|
|
148
|
-
k.append("rect").attr("width", n).attr("height", n).style("fill", (r) => E(r.label)).style("stroke", (r) => E(r.label)), k.append("text").attr("x", n + c).attr("y", n - c).text((r) => s.getShowData() ? `${r.label} [${r.value}]` : r.label);
|
|
149
|
-
const _ = Math.max(
|
|
150
|
-
...k.selectAll("text").nodes().map((r) => r?.getBoundingClientRect().width ?? 0)
|
|
151
|
-
), P = x + t + n + c + _;
|
|
152
|
-
m.attr("viewBox", `0 0 ${P} ${d}`), ae(m, d, P, l.useMaxWidth);
|
|
153
|
-
}, "draw"), $e = { draw: Ce }, Fe = {
|
|
154
|
-
parser: xe,
|
|
155
|
-
db: L,
|
|
156
|
-
renderer: $e,
|
|
157
|
-
styles: Ae
|
|
158
|
-
};
|
|
159
|
-
export {
|
|
160
|
-
Fe as diagram
|
|
161
|
-
};
|