@das-fed/upf-ui 6.4.0-dev.305 → 6.4.0-dev.307
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/front-end/i18n/front-end-page/dasui_en-US.js +1 -1
- package/front-end/i18n/front-end-page/dasui_zh-CN.js +1 -1
- package/front-end/i18n/front-end-page/dasui_zh-MO.js +1 -1
- package/package.json +9 -9
- package/packages/business-components/ai-panel/{index-BdLFU3HT.js → index-C1XseEkL.js} +1 -1
- package/packages/business-components/ai-panel/index-C1XseEkL.js.gz +0 -0
- package/packages/business-components/ai-panel/{index-Cc1_Wpca.js → index-_XzaXcle.js} +1136 -1154
- package/packages/business-components/ai-panel/index-_XzaXcle.js.gz +0 -0
- package/packages/business-components/ai-panel/index.js +1 -1
- package/packages/business-components/ai-panel/src/dasAI/components/referenceContent/index.vue.d.ts +2 -2
- package/packages/business-components/ai-panel/src/dasAI/hooks/audio.d.ts +1 -1
- package/packages/business-components/app-container/index.js +56 -56
- package/packages/business-components/app-container/index.js.gz +0 -0
- package/packages/business-components/area-phone-select/index.d.ts +39 -39
- package/packages/business-components/area-phone-select/index.js +87 -87
- package/packages/business-components/area-phone-select/index.js.gz +0 -0
- package/packages/business-components/area-phone-select/src/area-popover/index.vue.d.ts +5 -5
- package/packages/business-components/change-enterprises/index.js +20 -20
- package/packages/business-components/change-enterprises/index.js.gz +0 -0
- package/packages/business-components/change-pwd/index.js +15 -15
- package/packages/business-components/change-pwd/index.js.gz +0 -0
- package/packages/business-components/change-pwd/src/hooks/use-changePwd.d.ts +28 -28
- package/packages/business-components/currency-page/index.js +39 -39
- package/packages/business-components/currency-page/index.js.gz +0 -0
- package/packages/business-components/device-panel/index.js +46 -46
- package/packages/business-components/device-panel/index.js.gz +0 -0
- package/packages/business-components/device-panel/src/components/drag-resize/index.vue.d.ts +1 -1
- package/packages/business-components/device-panel/style.css +1 -1
- package/packages/business-components/device-panel/style.css.gz +0 -0
- package/packages/business-components/echarts/index.d.ts +10 -10
- package/packages/business-components/echarts/src/Index.vue.d.ts +2 -2
- package/packages/business-components/export-button/index.d.ts +3 -3
- package/packages/business-components/export-button/index.js +92 -92
- package/packages/business-components/export-button/index.js.gz +0 -0
- package/packages/business-components/export-button/src/App.vue.d.ts +1 -1
- package/packages/business-components/import-button/index.js +171 -171
- package/packages/business-components/import-button/index.js.gz +0 -0
- package/packages/business-components/layout-breadcrumb/index.js +42 -42
- package/packages/business-components/layout-breadcrumb/index.js.gz +0 -0
- package/packages/business-components/model-table-dialog/index.d.ts +43 -43
- package/packages/business-components/model-table-dialog/index.js +233 -233
- package/packages/business-components/model-table-dialog/index.js.gz +0 -0
- package/packages/business-components/model-table-dialog/src/Index.vue.d.ts +4 -4
- package/packages/business-components/model-table-dialog/src/ModelTable.vue.d.ts +1 -1
- package/packages/business-components/payment/index.js +44 -44
- package/packages/business-components/payment/index.js.gz +0 -0
- package/packages/business-components/process-form/index.js +939 -939
- package/packages/business-components/process-form/index.js.gz +0 -0
- package/packages/business-components/process-form/src/hooks/useForm.d.ts +28 -28
- package/packages/business-components/process-form/src/widgets/layout/accordion/accordion.d.ts +1 -1
- package/packages/business-components/process-form/src/widgets/layout/grid/grid.d.ts +1 -1
- package/packages/business-components/process-log/index.js +331 -331
- package/packages/business-components/process-log/index.js.gz +0 -0
- package/packages/business-components/process-log/style.css +1 -1
- package/packages/business-components/process-log/style.css.gz +0 -0
- package/packages/business-components/process-search-form/hooks/useSearchOptions.d.ts +4 -4
- package/packages/business-components/process-table/index.d.ts +14 -14
- package/packages/business-components/upload-file/index.js +43 -43
- package/packages/business-components/upload-file/index.js.gz +0 -0
- package/packages/business-components/upload-file/style.css +1 -1
- package/packages/business-components/urgent-panel/index.js +340 -340
- package/packages/business-components/urgent-panel/index.js.gz +0 -0
- package/packages/business-components/urgent-panel/src/components/drag-resize/index.vue.d.ts +1 -1
- package/packages/business-components/video-dialog/index.js +17 -17
- package/packages/business-components/video-dialog/index.js.gz +0 -0
- package/packages/business-components/video-dialog/style.css +1 -1
- package/packages/business-components/video-dialog/style.css.gz +0 -0
- package/packages/components/alert/index.d.ts +13 -13
- package/packages/components/alert/index.js +5 -5
- package/packages/components/alert/index.js.gz +0 -0
- package/packages/components/alert/src/index.vue.d.ts +1 -1
- package/packages/components/audio-video/index.d.ts +10 -10
- package/packages/components/audio-video/index.js +141 -141
- package/packages/components/audio-video/index.js.gz +0 -0
- package/packages/components/audio-video/src/Index.vue.d.ts +2 -2
- package/packages/components/autocomplete/index.d.ts +15 -15
- package/packages/components/autocomplete/index.js +162 -162
- package/packages/components/autocomplete/index.js.gz +0 -0
- package/packages/components/autocomplete/src/index.vue.d.ts +1 -1
- package/packages/components/autocomplete/style.css +1 -1
- package/packages/components/autocomplete/style.css.gz +0 -0
- package/packages/components/breadcrumb/index.js +37 -37
- package/packages/components/breadcrumb/index.js.gz +0 -0
- package/packages/components/button/index.d.ts +3 -3
- package/packages/components/button/index.js +223 -223
- package/packages/components/button/index.js.gz +0 -0
- package/packages/components/button/src/Index.vue.d.ts +1 -1
- package/packages/components/calendar/index.js +164 -164
- package/packages/components/calendar/index.js.gz +0 -0
- package/packages/components/cascader/index.d.ts +8 -8
- package/packages/components/cascader/index.js +89 -89
- package/packages/components/cascader/index.js.gz +0 -0
- package/packages/components/cascader/style.css +1 -1
- package/packages/components/cascader/style.css.gz +0 -0
- package/packages/components/checkbox/index.d.ts +12 -12
- package/packages/components/checkbox/index.js +180 -180
- package/packages/components/checkbox/index.js.gz +0 -0
- package/packages/components/checkbox/style.css +1 -1
- package/packages/components/checkbox/style.css.gz +0 -0
- package/packages/components/collapse-panel/index.js +12 -12
- package/packages/components/collapse-panel/index.js.gz +0 -0
- package/packages/components/collaspe/index.d.ts +4 -4
- package/packages/components/collaspe/index.js +22 -22
- package/packages/components/collaspe/index.js.gz +0 -0
- package/packages/components/custom-search-item/index.d.ts +4 -4
- package/packages/components/custom-search-item/index.js +36 -36
- package/packages/components/custom-search-item/index.js.gz +0 -0
- package/packages/components/date-picker/index.d.ts +15 -15
- package/packages/components/date-picker/index.js +658 -658
- package/packages/components/date-picker/index.js.gz +0 -0
- package/packages/components/date-picker/src/DatePicker.vue.d.ts +1 -1
- package/packages/components/date-picker/src/DateRangePicker.vue.d.ts +1 -1
- package/packages/components/date-picker/src/RangePicker.vue.d.ts +1 -1
- package/packages/components/date-picker/src/TimePicker.vue.d.ts +1 -1
- package/packages/components/date-picker/src/TimeRangePicker.vue.d.ts +1 -1
- package/packages/components/date-picker/style.css +1 -1
- package/packages/components/date-picker/style.css.gz +0 -0
- package/packages/components/dialog/index.d.ts +3 -3
- package/packages/components/dialog/index.js +1 -1
- package/packages/components/dialog/index.js.gz +0 -0
- package/packages/components/dialog/src/Index.vue.d.ts +1 -1
- package/packages/components/dialog/style.css +1 -1
- package/packages/components/dialog/style.css.gz +0 -0
- package/packages/components/dimple-layout/index.js +31 -73
- package/packages/components/dimple-layout/index.js.gz +0 -0
- package/packages/components/dropdown/index.js +33 -33
- package/packages/components/dropdown/index.js.gz +0 -0
- package/packages/components/edit-table/index.d.ts +4 -4
- package/packages/components/edit-table/index.js +190 -190
- package/packages/components/edit-table/index.js.gz +0 -0
- package/packages/components/empty/index.d.ts +3 -3
- package/packages/components/empty/index.js +29 -29
- package/packages/components/empty/index.js.gz +0 -0
- package/packages/components/empty/src/Index.vue.d.ts +1 -1
- package/packages/components/error-overlay-model/index.js +31 -31
- package/packages/components/error-overlay-model/index.js.gz +0 -0
- package/packages/components/form/index.d.ts +37 -37
- package/packages/components/form/index.js +23 -23
- package/packages/components/form/index.js.gz +0 -0
- package/packages/components/form/src/Index.vue.d.ts +3 -3
- package/packages/components/form-item/index.js +847 -841
- package/packages/components/form-item/index.js.gz +0 -0
- package/packages/components/form-item/style.css +1 -1
- package/packages/components/form-item/style.css.gz +0 -0
- package/packages/components/image-upload/index.js +90 -90
- package/packages/components/image-upload/index.js.gz +0 -0
- package/packages/components/image-viewer/index.js +418 -418
- package/packages/components/image-viewer/index.js.gz +0 -0
- package/packages/components/infinite-scroll/index.d.ts +2 -4
- package/packages/components/infinite-scroll/index.js +509 -509
- package/packages/components/infinite-scroll/index.js.gz +0 -0
- package/packages/components/infinite-scroll/src/index.vue.d.ts +3 -5
- package/packages/components/infinite-scroll/src/type.d.ts +78 -78
- package/packages/components/infinite-scroll/style.css +1 -1
- package/packages/components/infinite-scroll/style.css.gz +0 -0
- package/packages/components/input/index.js +544 -544
- package/packages/components/input/index.js.gz +0 -0
- package/packages/components/input/src/index.vue.d.ts +2 -2
- package/packages/components/input/style.css +1 -1
- package/packages/components/input/style.css.gz +0 -0
- package/packages/components/input-dialog-select/index.js +82 -82
- package/packages/components/input-dialog-select/index.js.gz +0 -0
- package/packages/components/input-number/index.js +103 -103
- package/packages/components/input-number/index.js.gz +0 -0
- package/packages/components/input-number/style.css +1 -1
- package/packages/components/input-number/style.css.gz +0 -0
- package/packages/components/live-player/index.d.ts +4 -4
- package/packages/components/loading/index.js +1 -1
- package/packages/components/loading/index.js.gz +0 -0
- package/packages/components/menu-aside/index.js +600 -600
- package/packages/components/menu-aside/index.js.gz +0 -0
- package/packages/components/menu-header/index.js +17 -17
- package/packages/components/menu-header/index.js.gz +0 -0
- package/packages/components/pagination/index.js +91 -91
- package/packages/components/pagination/index.js.gz +0 -0
- package/packages/components/pagination/style.css +1 -1
- package/packages/components/pagination/style.css.gz +0 -0
- package/packages/components/popover/index.d.ts +4 -4
- package/packages/components/popover/index.js +33 -33
- package/packages/components/popover/index.js.gz +0 -0
- package/packages/components/popup-mask/index.js +13 -13
- package/packages/components/popup-mask/index.js.gz +0 -0
- package/packages/components/progress/index.js +93 -93
- package/packages/components/progress/index.js.gz +0 -0
- package/packages/components/progress/style.css +1 -1
- package/packages/components/progress/style.css.gz +0 -0
- package/packages/components/radio/index.d.ts +10 -10
- package/packages/components/radio/index.js +175 -175
- package/packages/components/radio/index.js.gz +0 -0
- package/packages/components/rich-editor/index.js +234 -234
- package/packages/components/rich-editor/index.js.gz +0 -0
- package/packages/components/scrollbar/index.js +2 -2
- package/packages/components/scrollbar/index.js.gz +0 -0
- package/packages/components/search/index.js +68 -68
- package/packages/components/search/index.js.gz +0 -0
- package/packages/components/search-form/index.js +736 -736
- package/packages/components/search-form/index.js.gz +0 -0
- package/packages/components/search-form/style.css +1 -1
- package/packages/components/search-form/style.css.gz +0 -0
- package/packages/components/select/index.d.ts +3 -3
- package/packages/components/select/index.js +212 -212
- package/packages/components/select/index.js.gz +0 -0
- package/packages/components/select/src/Select.vue.d.ts +1 -1
- package/packages/components/select/style.css +1 -1
- package/packages/components/select/style.css.gz +0 -0
- package/packages/components/select-input/index.js +77 -77
- package/packages/components/select-input/index.js.gz +0 -0
- package/packages/components/select-list/index.d.ts +3 -3
- package/packages/components/select-list/index.js +430 -430
- package/packages/components/select-list/index.js.gz +0 -0
- package/packages/components/select-list/src/Index.vue.d.ts +1 -1
- package/packages/components/select-list/style.css +1 -1
- package/packages/components/select-list/style.css.gz +0 -0
- package/packages/components/special-range-picker-month/index.js +140 -140
- package/packages/components/special-range-picker-month/index.js.gz +0 -0
- package/packages/components/special-range-picker-month/style.css +1 -1
- package/packages/components/special-range-picker-month/style.css.gz +0 -0
- package/packages/components/special-range-picker-year/index.js +169 -169
- package/packages/components/special-range-picker-year/index.js.gz +0 -0
- package/packages/components/special-range-picker-year/style.css +1 -1
- package/packages/components/special-range-picker-year/style.css.gz +0 -0
- package/packages/components/spin/index.js +37 -37
- package/packages/components/spin/index.js.gz +0 -0
- package/packages/components/split-panel/index.d.ts +8 -8
- package/packages/components/split-panel/index.js +27 -27
- package/packages/components/split-panel/index.js.gz +0 -0
- package/packages/components/switch/style.css +1 -1
- package/packages/components/switch/style.css.gz +0 -0
- package/packages/components/table/index.d.ts +121 -121
- package/packages/components/table/index.js +1869 -1869
- package/packages/components/table/index.js.gz +0 -0
- package/packages/components/table/src/Table.vue.d.ts +10 -10
- package/packages/components/table/src/table-column/index.vue.d.ts +1 -1
- package/packages/components/tabs/index.js +101 -101
- package/packages/components/tabs/index.js.gz +0 -0
- package/packages/components/tag/index.d.ts +3 -3
- package/packages/components/tag/src/Index.vue.d.ts +1 -1
- package/packages/components/text-tooltip/src/type.d.ts +5 -5
- package/packages/components/time-line/index.js +35 -35
- package/packages/components/time-line/index.js.gz +0 -0
- package/packages/components/tooltip/index.d.ts +22 -22
- package/packages/components/tooltip/index.js +62 -62
- package/packages/components/tooltip/index.js.gz +0 -0
- package/packages/components/tooltip/src/index.vue.d.ts +2 -2
- package/packages/components/tooltip/style.css +1 -1
- package/packages/components/tooltip/style.css.gz +0 -0
- package/packages/components/tree/index.js +426 -426
- package/packages/components/tree/index.js.gz +0 -0
- package/packages/components/tree-select/index.js +233 -233
- package/packages/components/tree-select/index.js.gz +0 -0
- package/packages/components/tree-select/src/App.vue.d.ts +20 -20
- package/packages/components/tree-select/src/hooks/use-tree-select.d.ts +18 -18
- package/packages/components/tree-table/index.d.ts +2 -2
- package/packages/components/tree-table/index.js +181 -181
- package/packages/components/tree-table/index.js.gz +0 -0
- package/packages/components/tree-v2/index.js +1308 -1308
- package/packages/components/tree-v2/index.js.gz +0 -0
- package/packages/components/tree-v2/src/App.vue.d.ts +145 -155
- package/packages/components/tree-v2/style.css +1 -1
- package/packages/components/tree-v2/style.css.gz +0 -0
- package/packages/components/upload/index.js +98 -98
- package/packages/components/upload/index.js.gz +0 -0
- package/packages/components/virtual-tree/index.js +62 -62
- package/packages/components/virtual-tree/index.js.gz +0 -0
- package/packages/components/virtual-tree/src/App.vue.d.ts +140 -140
- package/release-meta.json +6 -6
- package/packages/business-components/ai-panel/index-BdLFU3HT.js.gz +0 -0
- package/packages/business-components/ai-panel/index-Cc1_Wpca.js.gz +0 -0
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { defineAsyncComponent as
|
|
1
|
+
import { defineAsyncComponent as ot, ref as M, watch as bu, h as it, reactive as ct, defineComponent as ou, onMounted as qu, openBlock as w, createElementBlock as R, createElementVNode as g, toDisplayString as V, computed as su, createCommentVNode as T, createVNode as H, unref as A, normalizeClass as Ju, createBlock as X, withCtx as J, Fragment as Nu, renderList as Qu, withDirectives as yu, withKeys as Jt, vModelText as Qt, withModifiers as Fe, vShow as Hu, onBeforeUnmount as at, resolveDirective as Wt, nextTick as ye, Transition as Xt, normalizeStyle as Yt } from "vue";
|
|
2
2
|
import { withInstall as u0 } from "@das-fed/upf-utils/with-install/index";
|
|
3
3
|
import { useRoute as e0 } from "vue-router";
|
|
4
4
|
import { DasIconClose2 as t0 } from "@das-fed/upf-ui/packages/icons/close-2/index";
|
|
5
5
|
import { t as I, setI18nRule as n0 } from "@das-fed/upf-web/packages/i18n/index";
|
|
6
6
|
import { DasIconAudioing as r0 } from "@das-fed/upf-ui/packages/icons/audioing/index";
|
|
7
|
-
import { DasIconCloseaudio as
|
|
8
|
-
import { DasIconLishihuihua as
|
|
7
|
+
import { DasIconCloseaudio as o0 } from "@das-fed/upf-ui/packages/icons/closeaudio/index";
|
|
8
|
+
import { DasIconLishihuihua as i0 } from "@das-fed/upf-ui/packages/icons/lishihuihua/index";
|
|
9
9
|
import { DasScrollbar as we } from "@das-fed/upf-ui/packages/components/scrollbar/index";
|
|
10
10
|
import "@das-fed/upf-ui/packages/components/text-tooltip/index";
|
|
11
11
|
import { DasTooltip as Cu } from "@das-fed/upf-ui/packages/components/tooltip/index";
|
|
@@ -32,7 +32,7 @@ import { DasIconSelect2 as b0 } from "@das-fed/upf-ui/packages/icons/select2/ind
|
|
|
32
32
|
import { DasPopover as m0 } from "@das-fed/upf-ui/packages/components/popover/index";
|
|
33
33
|
import { DasTree as x0 } from "@das-fed/upf-ui/packages/components/tree/index";
|
|
34
34
|
import { vDasLoading as bt } from "@das-fed/upf-ui/packages/components/loading/index";
|
|
35
|
-
import { createService as mt, iotMinio as xt, knowledgeBase as
|
|
35
|
+
import { createService as mt, iotMinio as xt, knowledgeBase as Ru } from "@das-fed/upf-utils/api-services";
|
|
36
36
|
import { DasIconLianjie as _0 } from "@das-fed/upf-ui/packages/icons/lianjie/index";
|
|
37
37
|
import { DasIconQingkong as g0 } from "@das-fed/upf-ui/packages/icons/qingkong/index";
|
|
38
38
|
import { DasIconDelete as k0 } from "@das-fed/upf-ui/packages/icons/delete/index";
|
|
@@ -47,14 +47,14 @@ let $u = (u = 21) => {
|
|
|
47
47
|
}
|
|
48
48
|
return e;
|
|
49
49
|
};
|
|
50
|
-
const C0 =
|
|
50
|
+
const C0 = ot(() => import("./index-C1XseEkL.js")), D0 = () => {
|
|
51
51
|
const u = M(), e = M(!1);
|
|
52
52
|
let t = !1;
|
|
53
53
|
const n = (c) => {
|
|
54
54
|
e.value && (t = c, e.value = !1);
|
|
55
55
|
};
|
|
56
56
|
return {
|
|
57
|
-
folderDialogVue: () =>
|
|
57
|
+
folderDialogVue: () => it(C0, {
|
|
58
58
|
dialogShow: e.value,
|
|
59
59
|
content: u.value,
|
|
60
60
|
onSubmit: (c) => {
|
|
@@ -67,13 +67,13 @@ const C0 = it(() => import("./index-BdLFU3HT.js")), D0 = () => {
|
|
|
67
67
|
n(!1);
|
|
68
68
|
}
|
|
69
69
|
}),
|
|
70
|
-
showFolderDialog: async (c) => (u.value = c, e.value = !0, new Promise((
|
|
70
|
+
showFolderDialog: async (c) => (u.value = c, e.value = !0, new Promise((i) => {
|
|
71
71
|
const a = bu(() => e.value, (s) => {
|
|
72
|
-
|
|
72
|
+
i(t), a();
|
|
73
73
|
});
|
|
74
74
|
}))
|
|
75
75
|
};
|
|
76
|
-
},
|
|
76
|
+
}, x = ct({
|
|
77
77
|
deepseek: !1,
|
|
78
78
|
// 是否深度思考
|
|
79
79
|
loading: !1,
|
|
@@ -89,7 +89,7 @@ const C0 = it(() => import("./index-BdLFU3HT.js")), D0 = () => {
|
|
|
89
89
|
folderName: ""
|
|
90
90
|
// 默认选择知识库-全部
|
|
91
91
|
}), E0 = () => {
|
|
92
|
-
|
|
92
|
+
x.loading = !1, x.isplay = !1, x.showScrollBom = !1, x.senderValue = "";
|
|
93
93
|
};
|
|
94
94
|
ct({
|
|
95
95
|
knowDeepseek: !1,
|
|
@@ -106,22 +106,22 @@ const _t = () => sessionStorage.getItem("deepseekConfig") ? JSON.parse(sessionSt
|
|
|
106
106
|
sessionStorage.setItem("deepseekConfig", JSON.stringify(e));
|
|
107
107
|
return;
|
|
108
108
|
}
|
|
109
|
-
|
|
109
|
+
x.searchType == "0" && (e.appDeepseek = x.deepseek), x.searchType == "1" && (e.knowDeepseek = x.deepseek), x.searchType == "2" && (e.networkDeepseek = x.deepseek), sessionStorage.setItem("deepseekConfig", JSON.stringify(e));
|
|
110
110
|
}, Vu = () => {
|
|
111
111
|
const u = _t();
|
|
112
|
-
|
|
112
|
+
x.searchType == "0" && (x.deepseek = u.appDeepseek), x.searchType == "1" && (x.deepseek = u.knowDeepseek), x.searchType == "2" && (x.deepseek = u.networkDeepseek);
|
|
113
113
|
};
|
|
114
114
|
var tu = function(u, e) {
|
|
115
115
|
if (!(this instanceof tu))
|
|
116
116
|
return new tu(u, e);
|
|
117
|
-
this.url = u, e = e || {}, this.headers = e.headers || {}, this.payload = e.payload !== void 0 ? e.payload : "", this.method = e.method || this.payload && "POST" || "GET", this.withCredentials = !!e.withCredentials, this.debug = !!e.debug, this.
|
|
117
|
+
this.url = u, e = e || {}, this.headers = e.headers || {}, this.payload = e.payload !== void 0 ? e.payload : "", this.method = e.method || this.payload && "POST" || "GET", this.withCredentials = !!e.withCredentials, this.debug = !!e.debug, this.FIELD_SEPARATOR = ":", this.listeners = {}, this.xhr = null, this.readyState = tu.INITIALIZING, this.progress = 0, this.chunk = "", this.lastEventId = "", this.addEventListener = function(t, n) {
|
|
118
118
|
this.listeners[t] === void 0 && (this.listeners[t] = []), this.listeners[t].indexOf(n) === -1 && this.listeners[t].push(n);
|
|
119
119
|
}, this.removeEventListener = function(t, n) {
|
|
120
120
|
if (this.listeners[t] === void 0)
|
|
121
121
|
return;
|
|
122
122
|
const r = [];
|
|
123
|
-
this.listeners[t].forEach(function(
|
|
124
|
-
|
|
123
|
+
this.listeners[t].forEach(function(o) {
|
|
124
|
+
o !== n && r.push(o);
|
|
125
125
|
}), r.length === 0 ? delete this.listeners[t] : this.listeners[t] = r;
|
|
126
126
|
}, this.dispatchEvent = function(t) {
|
|
127
127
|
if (!t)
|
|
@@ -132,15 +132,7 @@ var tu = function(u, e) {
|
|
|
132
132
|
return r(t), !t.defaultPrevented;
|
|
133
133
|
}) : !0;
|
|
134
134
|
}, this._markClosed = function() {
|
|
135
|
-
|
|
136
|
-
if (this.maxRetries !== null && this.retryCount >= this.maxRetries) {
|
|
137
|
-
this.debug, this.autoReconnect = !1, this.close();
|
|
138
|
-
return;
|
|
139
|
-
}
|
|
140
|
-
this.reconnectTimer && clearTimeout(this.reconnectTimer), this.debug, this.reconnectTimer = setTimeout(() => {
|
|
141
|
-
this.reconnectTimer = null, this.retryCount++, this.stream();
|
|
142
|
-
}, this.reconnectDelay);
|
|
143
|
-
}
|
|
135
|
+
this.xhr = null, this.progress = 0, this.chunk = "", this._setReadyState(tu.CLOSED);
|
|
144
136
|
}, this._setReadyState = function(t) {
|
|
145
137
|
const n = new CustomEvent("readystatechange");
|
|
146
138
|
n.readyState = t, this.readyState = t, this.dispatchEvent(n);
|
|
@@ -156,15 +148,12 @@ var tu = function(u, e) {
|
|
|
156
148
|
this._onStreamFailure(t);
|
|
157
149
|
return;
|
|
158
150
|
}
|
|
159
|
-
this.retryCount = 0;
|
|
160
151
|
const n = this.xhr.responseText.substring(this.progress);
|
|
161
152
|
this.progress += n.length;
|
|
162
|
-
const r = (this.chunk + n).split(/(\r\n\r\n|\r\r|\n\n)/g),
|
|
163
|
-
r.forEach(
|
|
164
|
-
(
|
|
165
|
-
|
|
166
|
-
}).bind(this)
|
|
167
|
-
), this.chunk = i;
|
|
153
|
+
const r = (this.chunk + n).split(/(\r\n\r\n|\r\r|\n\n)/g), o = r.pop();
|
|
154
|
+
r.forEach((function(c) {
|
|
155
|
+
c.trim().length > 0 && this.dispatchEvent(this._parseEventChunk(c));
|
|
156
|
+
}).bind(this)), this.chunk = o;
|
|
168
157
|
}, this._onStreamLoaded = function(t) {
|
|
169
158
|
this._onStreamProgress(t), this.dispatchEvent(this._parseEventChunk(this.chunk)), this.chunk = "", this._markClosed();
|
|
170
159
|
}, this._parseEventChunk = function(t) {
|
|
@@ -172,31 +161,27 @@ var tu = function(u, e) {
|
|
|
172
161
|
return null;
|
|
173
162
|
this.debug;
|
|
174
163
|
const n = { id: null, retry: null, data: null, event: null };
|
|
175
|
-
|
|
176
|
-
(
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
}).bind(this)
|
|
189
|
-
), n.data === null)
|
|
190
|
-
return null;
|
|
191
|
-
n.id !== null && (this.lastEventId = n.id);
|
|
164
|
+
t.split(/\n|\r\n|\r/).forEach((function(o) {
|
|
165
|
+
const c = o.indexOf(this.FIELD_SEPARATOR);
|
|
166
|
+
let i, a;
|
|
167
|
+
if (c > 0) {
|
|
168
|
+
const s = o[c + 1] === " " ? 2 : 1;
|
|
169
|
+
i = o.substring(0, c), a = o.substring(c + s);
|
|
170
|
+
} else if (c < 0)
|
|
171
|
+
i = o, a = "";
|
|
172
|
+
else
|
|
173
|
+
return;
|
|
174
|
+
i in n && (i === "data" && n[i] !== null ? n.data += `
|
|
175
|
+
` + a : n[i] = a);
|
|
176
|
+
}).bind(this)), n.id !== null && (this.lastEventId = n.id);
|
|
192
177
|
const r = new CustomEvent(n.event || "message");
|
|
193
178
|
return r.id = n.id, r.data = n.data || "", r.lastEventId = this.lastEventId, r;
|
|
194
179
|
}, this._onReadyStateChange = function() {
|
|
195
180
|
if (this.xhr && this.xhr.readyState === XMLHttpRequest.HEADERS_RECEIVED) {
|
|
196
181
|
const t = {}, n = this.xhr.getAllResponseHeaders().trim().split(`\r
|
|
197
182
|
`);
|
|
198
|
-
for (const
|
|
199
|
-
const [c, ...
|
|
183
|
+
for (const o of n) {
|
|
184
|
+
const [c, ...i] = o.split(":"), a = i.join(":").trim();
|
|
200
185
|
t[c.trim().toLowerCase()] = t[c.trim().toLowerCase()] || [], t[c.trim().toLowerCase()].push(a);
|
|
201
186
|
}
|
|
202
187
|
const r = new CustomEvent("open");
|
|
@@ -204,16 +189,13 @@ var tu = function(u, e) {
|
|
|
204
189
|
}
|
|
205
190
|
}, this.stream = function() {
|
|
206
191
|
if (!this.xhr) {
|
|
207
|
-
this._setReadyState(tu.CONNECTING), this.xhr = new XMLHttpRequest(), this.xhr.addEventListener("progress", this._onStreamProgress.bind(this)), this.xhr.addEventListener("load", this._onStreamLoaded.bind(this)), this.xhr.addEventListener(
|
|
208
|
-
"readystatechange",
|
|
209
|
-
this._onReadyStateChange.bind(this)
|
|
210
|
-
), this.xhr.addEventListener("error", this._onStreamFailure.bind(this)), this.xhr.addEventListener("abort", this._onStreamAbort.bind(this)), this.xhr.open(this.method, this.url);
|
|
192
|
+
this._setReadyState(tu.CONNECTING), this.xhr = new XMLHttpRequest(), this.xhr.addEventListener("progress", this._onStreamProgress.bind(this)), this.xhr.addEventListener("load", this._onStreamLoaded.bind(this)), this.xhr.addEventListener("readystatechange", this._onReadyStateChange.bind(this)), this.xhr.addEventListener("error", this._onStreamFailure.bind(this)), this.xhr.addEventListener("abort", this._onStreamAbort.bind(this)), this.xhr.open(this.method, this.url);
|
|
211
193
|
for (let t in this.headers)
|
|
212
194
|
this.xhr.setRequestHeader(t, this.headers[t]);
|
|
213
|
-
this.
|
|
195
|
+
this.lastEventId.length > 0 && this.xhr.setRequestHeader("Last-Event-ID", this.lastEventId), this.xhr.withCredentials = this.withCredentials, this.xhr.send(this.payload);
|
|
214
196
|
}
|
|
215
197
|
}, this.close = function() {
|
|
216
|
-
this.readyState !== tu.CLOSED &&
|
|
198
|
+
this.readyState !== tu.CLOSED && this.xhr.abort();
|
|
217
199
|
}, (e.start === void 0 || e.start) && this.stream();
|
|
218
200
|
};
|
|
219
201
|
tu.INITIALIZING = -1;
|
|
@@ -223,7 +205,7 @@ tu.CLOSED = 2;
|
|
|
223
205
|
typeof exports < "u" && (exports.SSE = tu);
|
|
224
206
|
const F0 = { class: "das-ai-use-chat-content" }, w0 = {
|
|
225
207
|
name: "useChat"
|
|
226
|
-
}, S0 = /* @__PURE__ */
|
|
208
|
+
}, S0 = /* @__PURE__ */ ou({
|
|
227
209
|
...w0,
|
|
228
210
|
props: {
|
|
229
211
|
item: { default: {} }
|
|
@@ -231,8 +213,8 @@ const F0 = { class: "das-ai-use-chat-content" }, w0 = {
|
|
|
231
213
|
emits: ["click"],
|
|
232
214
|
setup(u, { emit: e }) {
|
|
233
215
|
const t = M();
|
|
234
|
-
return
|
|
235
|
-
}), (n, r) => (w(),
|
|
216
|
+
return qu(() => {
|
|
217
|
+
}), (n, r) => (w(), R(
|
|
236
218
|
"div",
|
|
237
219
|
{
|
|
238
220
|
ref_key: "userChatRef",
|
|
@@ -243,7 +225,7 @@ const F0 = { class: "das-ai-use-chat-content" }, w0 = {
|
|
|
243
225
|
g(
|
|
244
226
|
"div",
|
|
245
227
|
F0,
|
|
246
|
-
V(
|
|
228
|
+
V(n.item.content),
|
|
247
229
|
1
|
|
248
230
|
/* TEXT */
|
|
249
231
|
)
|
|
@@ -252,12 +234,12 @@ const F0 = { class: "das-ai-use-chat-content" }, w0 = {
|
|
|
252
234
|
/* NEED_PATCH */
|
|
253
235
|
));
|
|
254
236
|
}
|
|
255
|
-
}),
|
|
237
|
+
}), iu = (u, e) => {
|
|
256
238
|
const t = u.__vccOpts || u;
|
|
257
239
|
for (const [n, r] of e)
|
|
258
240
|
t[n] = r;
|
|
259
241
|
return t;
|
|
260
|
-
}, z0 = /* @__PURE__ */
|
|
242
|
+
}, z0 = /* @__PURE__ */ iu(S0, [["__scopeId", "data-v-9ae9d9b5"]]);
|
|
261
243
|
var I0 = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
262
244
|
function T0(u) {
|
|
263
245
|
return u && u.__esModule && Object.prototype.hasOwnProperty.call(u, "default") ? u.default : u;
|
|
@@ -280,8 +262,8 @@ var kt = { exports: {} };
|
|
|
280
262
|
/***/
|
|
281
263
|
686: (
|
|
282
264
|
/***/
|
|
283
|
-
function(
|
|
284
|
-
|
|
265
|
+
function(o, c, i) {
|
|
266
|
+
i.d(c, {
|
|
285
267
|
default: function() {
|
|
286
268
|
return (
|
|
287
269
|
/* binding */
|
|
@@ -289,7 +271,7 @@ var kt = { exports: {} };
|
|
|
289
271
|
);
|
|
290
272
|
}
|
|
291
273
|
});
|
|
292
|
-
var a =
|
|
274
|
+
var a = i(279), s = /* @__PURE__ */ i.n(a), l = i(370), f = /* @__PURE__ */ i.n(l), _ = i(817), h = /* @__PURE__ */ i.n(_);
|
|
293
275
|
function d(B) {
|
|
294
276
|
try {
|
|
295
277
|
return document.execCommand(B);
|
|
@@ -298,40 +280,40 @@ var kt = { exports: {} };
|
|
|
298
280
|
}
|
|
299
281
|
}
|
|
300
282
|
var y = function(S) {
|
|
301
|
-
var
|
|
302
|
-
return d("cut"),
|
|
283
|
+
var F = h()(S);
|
|
284
|
+
return d("cut"), F;
|
|
303
285
|
}, v = y;
|
|
304
286
|
function C(B) {
|
|
305
|
-
var S = document.documentElement.getAttribute("dir") === "rtl",
|
|
306
|
-
|
|
287
|
+
var S = document.documentElement.getAttribute("dir") === "rtl", F = document.createElement("textarea");
|
|
288
|
+
F.style.fontSize = "12pt", F.style.border = "0", F.style.padding = "0", F.style.margin = "0", F.style.position = "absolute", F.style[S ? "right" : "left"] = "-9999px";
|
|
307
289
|
var N = window.pageYOffset || document.documentElement.scrollTop;
|
|
308
|
-
return
|
|
290
|
+
return F.style.top = "".concat(N, "px"), F.setAttribute("readonly", ""), F.value = B, F;
|
|
309
291
|
}
|
|
310
|
-
var k = function(S,
|
|
292
|
+
var k = function(S, F) {
|
|
311
293
|
var N = C(S);
|
|
312
|
-
|
|
294
|
+
F.container.appendChild(N);
|
|
313
295
|
var L = h()(N);
|
|
314
296
|
return d("copy"), N.remove(), L;
|
|
315
|
-
},
|
|
316
|
-
var
|
|
297
|
+
}, p = function(S) {
|
|
298
|
+
var F = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {
|
|
317
299
|
container: document.body
|
|
318
300
|
}, N = "";
|
|
319
|
-
return typeof S == "string" ? N = k(S,
|
|
320
|
-
},
|
|
321
|
-
function
|
|
301
|
+
return typeof S == "string" ? N = k(S, F) : S instanceof HTMLInputElement && !["text", "search", "url", "tel", "password"].includes(S == null ? void 0 : S.type) ? N = k(S.value, F) : (N = h()(S), d("copy")), N;
|
|
302
|
+
}, b = p;
|
|
303
|
+
function m(B) {
|
|
322
304
|
"@babel/helpers - typeof";
|
|
323
|
-
return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ?
|
|
324
|
-
return typeof
|
|
325
|
-
} :
|
|
326
|
-
return
|
|
327
|
-
},
|
|
305
|
+
return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? m = function(F) {
|
|
306
|
+
return typeof F;
|
|
307
|
+
} : m = function(F) {
|
|
308
|
+
return F && typeof Symbol == "function" && F.constructor === Symbol && F !== Symbol.prototype ? "symbol" : typeof F;
|
|
309
|
+
}, m(B);
|
|
328
310
|
}
|
|
329
311
|
var O = function() {
|
|
330
|
-
var S = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {},
|
|
312
|
+
var S = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, F = S.action, N = F === void 0 ? "copy" : F, L = S.container, $ = S.target, eu = S.text;
|
|
331
313
|
if (N !== "copy" && N !== "cut")
|
|
332
314
|
throw new Error('Invalid "action" value, use either "copy" or "cut"');
|
|
333
315
|
if ($ !== void 0)
|
|
334
|
-
if ($ &&
|
|
316
|
+
if ($ && m($) === "object" && $.nodeType === 1) {
|
|
335
317
|
if (N === "copy" && $.hasAttribute("disabled"))
|
|
336
318
|
throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');
|
|
337
319
|
if (N === "cut" && ($.hasAttribute("readonly") || $.hasAttribute("disabled")))
|
|
@@ -339,20 +321,20 @@ var kt = { exports: {} };
|
|
|
339
321
|
} else
|
|
340
322
|
throw new Error('Invalid "target" value, use a valid Element');
|
|
341
323
|
if (eu)
|
|
342
|
-
return
|
|
324
|
+
return b(eu, {
|
|
343
325
|
container: L
|
|
344
326
|
});
|
|
345
327
|
if ($)
|
|
346
|
-
return N === "cut" ? v($) :
|
|
328
|
+
return N === "cut" ? v($) : b($, {
|
|
347
329
|
container: L
|
|
348
330
|
});
|
|
349
|
-
},
|
|
331
|
+
}, E = O;
|
|
350
332
|
function P(B) {
|
|
351
333
|
"@babel/helpers - typeof";
|
|
352
|
-
return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? P = function(
|
|
353
|
-
return typeof
|
|
354
|
-
} : P = function(
|
|
355
|
-
return
|
|
334
|
+
return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? P = function(F) {
|
|
335
|
+
return typeof F;
|
|
336
|
+
} : P = function(F) {
|
|
337
|
+
return F && typeof Symbol == "function" && F.constructor === Symbol && F !== Symbol.prototype ? "symbol" : typeof F;
|
|
356
338
|
}, P(B);
|
|
357
339
|
}
|
|
358
340
|
function j(B, S) {
|
|
@@ -360,13 +342,13 @@ var kt = { exports: {} };
|
|
|
360
342
|
throw new TypeError("Cannot call a class as a function");
|
|
361
343
|
}
|
|
362
344
|
function K(B, S) {
|
|
363
|
-
for (var
|
|
364
|
-
var N = S[
|
|
345
|
+
for (var F = 0; F < S.length; F++) {
|
|
346
|
+
var N = S[F];
|
|
365
347
|
N.enumerable = N.enumerable || !1, N.configurable = !0, "value" in N && (N.writable = !0), Object.defineProperty(B, N.key, N);
|
|
366
348
|
}
|
|
367
349
|
}
|
|
368
|
-
function du(B, S,
|
|
369
|
-
return K(B.prototype, S), K(B,
|
|
350
|
+
function du(B, S, F) {
|
|
351
|
+
return K(B.prototype, S), K(B, F), B;
|
|
370
352
|
}
|
|
371
353
|
function _u(B, S) {
|
|
372
354
|
if (typeof S != "function" && S !== null)
|
|
@@ -409,23 +391,23 @@ var kt = { exports: {} };
|
|
|
409
391
|
}
|
|
410
392
|
}
|
|
411
393
|
function zu(B) {
|
|
412
|
-
return zu = Object.setPrototypeOf ? Object.getPrototypeOf : function(
|
|
413
|
-
return
|
|
394
|
+
return zu = Object.setPrototypeOf ? Object.getPrototypeOf : function(F) {
|
|
395
|
+
return F.__proto__ || Object.getPrototypeOf(F);
|
|
414
396
|
}, zu(B);
|
|
415
397
|
}
|
|
416
398
|
function ju(B, S) {
|
|
417
|
-
var
|
|
418
|
-
if (S.hasAttribute(
|
|
419
|
-
return S.getAttribute(
|
|
399
|
+
var F = "data-clipboard-".concat(B);
|
|
400
|
+
if (S.hasAttribute(F))
|
|
401
|
+
return S.getAttribute(F);
|
|
420
402
|
}
|
|
421
403
|
var Iu = /* @__PURE__ */ function(B) {
|
|
422
|
-
_u(
|
|
423
|
-
var S = wu(
|
|
424
|
-
function
|
|
404
|
+
_u(F, B);
|
|
405
|
+
var S = wu(F);
|
|
406
|
+
function F(N, L) {
|
|
425
407
|
var $;
|
|
426
|
-
return j(this,
|
|
408
|
+
return j(this, F), $ = S.call(this), $.resolveOptions(L), $.listenClick(N), $;
|
|
427
409
|
}
|
|
428
|
-
return du(
|
|
410
|
+
return du(F, [{
|
|
429
411
|
key: "resolveOptions",
|
|
430
412
|
value: function() {
|
|
431
413
|
var L = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
@@ -450,7 +432,7 @@ var kt = { exports: {} };
|
|
|
450
432
|
}, {
|
|
451
433
|
key: "onClick",
|
|
452
434
|
value: function(L) {
|
|
453
|
-
var $ = L.delegateTarget || L.currentTarget, eu = this.action($) || "copy", Eu =
|
|
435
|
+
var $ = L.delegateTarget || L.currentTarget, eu = this.action($) || "copy", Eu = E({
|
|
454
436
|
action: eu,
|
|
455
437
|
container: this.container,
|
|
456
438
|
target: this.target($),
|
|
@@ -514,7 +496,7 @@ var kt = { exports: {} };
|
|
|
514
496
|
var $ = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {
|
|
515
497
|
container: document.body
|
|
516
498
|
};
|
|
517
|
-
return
|
|
499
|
+
return b(L, $);
|
|
518
500
|
}
|
|
519
501
|
/**
|
|
520
502
|
* Allow fire programmatically a cut action
|
|
@@ -539,18 +521,18 @@ var kt = { exports: {} };
|
|
|
539
521
|
eu = eu && !!document.queryCommandSupported(Eu);
|
|
540
522
|
}), eu;
|
|
541
523
|
}
|
|
542
|
-
}]),
|
|
524
|
+
}]), F;
|
|
543
525
|
}(s()), fe = Iu;
|
|
544
526
|
}
|
|
545
527
|
),
|
|
546
528
|
/***/
|
|
547
529
|
828: (
|
|
548
530
|
/***/
|
|
549
|
-
function(
|
|
531
|
+
function(o) {
|
|
550
532
|
var c = 9;
|
|
551
533
|
if (typeof Element < "u" && !Element.prototype.matches) {
|
|
552
|
-
var
|
|
553
|
-
|
|
534
|
+
var i = Element.prototype;
|
|
535
|
+
i.matches = i.matchesSelector || i.mozMatchesSelector || i.msMatchesSelector || i.oMatchesSelector || i.webkitMatchesSelector;
|
|
554
536
|
}
|
|
555
537
|
function a(s, l) {
|
|
556
538
|
for (; s && s.nodeType !== c; ) {
|
|
@@ -559,48 +541,48 @@ var kt = { exports: {} };
|
|
|
559
541
|
s = s.parentNode;
|
|
560
542
|
}
|
|
561
543
|
}
|
|
562
|
-
|
|
544
|
+
o.exports = a;
|
|
563
545
|
}
|
|
564
546
|
),
|
|
565
547
|
/***/
|
|
566
548
|
438: (
|
|
567
549
|
/***/
|
|
568
|
-
function(
|
|
569
|
-
var a =
|
|
570
|
-
function s(
|
|
550
|
+
function(o, c, i) {
|
|
551
|
+
var a = i(828);
|
|
552
|
+
function s(_, h, d, y, v) {
|
|
571
553
|
var C = f.apply(this, arguments);
|
|
572
|
-
return
|
|
554
|
+
return _.addEventListener(d, C, v), {
|
|
573
555
|
destroy: function() {
|
|
574
|
-
|
|
556
|
+
_.removeEventListener(d, C, v);
|
|
575
557
|
}
|
|
576
558
|
};
|
|
577
559
|
}
|
|
578
|
-
function l(
|
|
579
|
-
return typeof
|
|
560
|
+
function l(_, h, d, y, v) {
|
|
561
|
+
return typeof _.addEventListener == "function" ? s.apply(null, arguments) : typeof d == "function" ? s.bind(null, document).apply(null, arguments) : (typeof _ == "string" && (_ = document.querySelectorAll(_)), Array.prototype.map.call(_, function(C) {
|
|
580
562
|
return s(C, h, d, y, v);
|
|
581
563
|
}));
|
|
582
564
|
}
|
|
583
|
-
function f(
|
|
565
|
+
function f(_, h, d, y) {
|
|
584
566
|
return function(v) {
|
|
585
|
-
v.delegateTarget = a(v.target, h), v.delegateTarget && y.call(
|
|
567
|
+
v.delegateTarget = a(v.target, h), v.delegateTarget && y.call(_, v);
|
|
586
568
|
};
|
|
587
569
|
}
|
|
588
|
-
|
|
570
|
+
o.exports = l;
|
|
589
571
|
}
|
|
590
572
|
),
|
|
591
573
|
/***/
|
|
592
574
|
879: (
|
|
593
575
|
/***/
|
|
594
|
-
function(
|
|
595
|
-
c.node = function(
|
|
596
|
-
return
|
|
597
|
-
}, c.nodeList = function(
|
|
598
|
-
var a = Object.prototype.toString.call(
|
|
599
|
-
return
|
|
600
|
-
}, c.string = function(
|
|
601
|
-
return typeof
|
|
602
|
-
}, c.fn = function(
|
|
603
|
-
var a = Object.prototype.toString.call(
|
|
576
|
+
function(o, c) {
|
|
577
|
+
c.node = function(i) {
|
|
578
|
+
return i !== void 0 && i instanceof HTMLElement && i.nodeType === 1;
|
|
579
|
+
}, c.nodeList = function(i) {
|
|
580
|
+
var a = Object.prototype.toString.call(i);
|
|
581
|
+
return i !== void 0 && (a === "[object NodeList]" || a === "[object HTMLCollection]") && "length" in i && (i.length === 0 || c.node(i[0]));
|
|
582
|
+
}, c.string = function(i) {
|
|
583
|
+
return typeof i == "string" || i instanceof String;
|
|
584
|
+
}, c.fn = function(i) {
|
|
585
|
+
var a = Object.prototype.toString.call(i);
|
|
604
586
|
return a === "[object Function]";
|
|
605
587
|
};
|
|
606
588
|
}
|
|
@@ -608,8 +590,8 @@ var kt = { exports: {} };
|
|
|
608
590
|
/***/
|
|
609
591
|
370: (
|
|
610
592
|
/***/
|
|
611
|
-
function(
|
|
612
|
-
var a =
|
|
593
|
+
function(o, c, i) {
|
|
594
|
+
var a = i(879), s = i(438);
|
|
613
595
|
function l(d, y, v) {
|
|
614
596
|
if (!d && !y && !v)
|
|
615
597
|
throw new Error("Missing required arguments");
|
|
@@ -620,7 +602,7 @@ var kt = { exports: {} };
|
|
|
620
602
|
if (a.node(d))
|
|
621
603
|
return f(d, y, v);
|
|
622
604
|
if (a.nodeList(d))
|
|
623
|
-
return
|
|
605
|
+
return _(d, y, v);
|
|
624
606
|
if (a.string(d))
|
|
625
607
|
return h(d, y, v);
|
|
626
608
|
throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList");
|
|
@@ -632,7 +614,7 @@ var kt = { exports: {} };
|
|
|
632
614
|
}
|
|
633
615
|
};
|
|
634
616
|
}
|
|
635
|
-
function
|
|
617
|
+
function _(d, y, v) {
|
|
636
618
|
return Array.prototype.forEach.call(d, function(C) {
|
|
637
619
|
C.addEventListener(y, v);
|
|
638
620
|
}), {
|
|
@@ -646,73 +628,73 @@ var kt = { exports: {} };
|
|
|
646
628
|
function h(d, y, v) {
|
|
647
629
|
return s(document.body, d, y, v);
|
|
648
630
|
}
|
|
649
|
-
|
|
631
|
+
o.exports = l;
|
|
650
632
|
}
|
|
651
633
|
),
|
|
652
634
|
/***/
|
|
653
635
|
817: (
|
|
654
636
|
/***/
|
|
655
|
-
function(
|
|
656
|
-
function c(
|
|
637
|
+
function(o) {
|
|
638
|
+
function c(i) {
|
|
657
639
|
var a;
|
|
658
|
-
if (
|
|
659
|
-
|
|
660
|
-
else if (
|
|
661
|
-
var s =
|
|
662
|
-
s ||
|
|
640
|
+
if (i.nodeName === "SELECT")
|
|
641
|
+
i.focus(), a = i.value;
|
|
642
|
+
else if (i.nodeName === "INPUT" || i.nodeName === "TEXTAREA") {
|
|
643
|
+
var s = i.hasAttribute("readonly");
|
|
644
|
+
s || i.setAttribute("readonly", ""), i.select(), i.setSelectionRange(0, i.value.length), s || i.removeAttribute("readonly"), a = i.value;
|
|
663
645
|
} else {
|
|
664
|
-
|
|
646
|
+
i.hasAttribute("contenteditable") && i.focus();
|
|
665
647
|
var l = window.getSelection(), f = document.createRange();
|
|
666
|
-
f.selectNodeContents(
|
|
648
|
+
f.selectNodeContents(i), l.removeAllRanges(), l.addRange(f), a = l.toString();
|
|
667
649
|
}
|
|
668
650
|
return a;
|
|
669
651
|
}
|
|
670
|
-
|
|
652
|
+
o.exports = c;
|
|
671
653
|
}
|
|
672
654
|
),
|
|
673
655
|
/***/
|
|
674
656
|
279: (
|
|
675
657
|
/***/
|
|
676
|
-
function(
|
|
658
|
+
function(o) {
|
|
677
659
|
function c() {
|
|
678
660
|
}
|
|
679
661
|
c.prototype = {
|
|
680
|
-
on: function(
|
|
662
|
+
on: function(i, a, s) {
|
|
681
663
|
var l = this.e || (this.e = {});
|
|
682
|
-
return (l[
|
|
664
|
+
return (l[i] || (l[i] = [])).push({
|
|
683
665
|
fn: a,
|
|
684
666
|
ctx: s
|
|
685
667
|
}), this;
|
|
686
668
|
},
|
|
687
|
-
once: function(
|
|
669
|
+
once: function(i, a, s) {
|
|
688
670
|
var l = this;
|
|
689
671
|
function f() {
|
|
690
|
-
l.off(
|
|
672
|
+
l.off(i, f), a.apply(s, arguments);
|
|
691
673
|
}
|
|
692
|
-
return f._ = a, this.on(
|
|
674
|
+
return f._ = a, this.on(i, f, s);
|
|
693
675
|
},
|
|
694
|
-
emit: function(
|
|
695
|
-
var a = [].slice.call(arguments, 1), s = ((this.e || (this.e = {}))[
|
|
676
|
+
emit: function(i) {
|
|
677
|
+
var a = [].slice.call(arguments, 1), s = ((this.e || (this.e = {}))[i] || []).slice(), l = 0, f = s.length;
|
|
696
678
|
for (l; l < f; l++)
|
|
697
679
|
s[l].fn.apply(s[l].ctx, a);
|
|
698
680
|
return this;
|
|
699
681
|
},
|
|
700
|
-
off: function(
|
|
701
|
-
var s = this.e || (this.e = {}), l = s[
|
|
682
|
+
off: function(i, a) {
|
|
683
|
+
var s = this.e || (this.e = {}), l = s[i], f = [];
|
|
702
684
|
if (l && a)
|
|
703
|
-
for (var
|
|
704
|
-
l[
|
|
705
|
-
return f.length ? s[
|
|
685
|
+
for (var _ = 0, h = l.length; _ < h; _++)
|
|
686
|
+
l[_].fn !== a && l[_].fn._ !== a && f.push(l[_]);
|
|
687
|
+
return f.length ? s[i] = f : delete s[i], this;
|
|
706
688
|
}
|
|
707
|
-
},
|
|
689
|
+
}, o.exports = c, o.exports.TinyEmitter = c;
|
|
708
690
|
}
|
|
709
691
|
)
|
|
710
692
|
/******/
|
|
711
693
|
}, n = {};
|
|
712
|
-
function r(
|
|
713
|
-
if (n[
|
|
714
|
-
return n[
|
|
715
|
-
var c = n[
|
|
694
|
+
function r(o) {
|
|
695
|
+
if (n[o])
|
|
696
|
+
return n[o].exports;
|
|
697
|
+
var c = n[o] = {
|
|
716
698
|
/******/
|
|
717
699
|
// no module.id needed
|
|
718
700
|
/******/
|
|
@@ -721,31 +703,31 @@ var kt = { exports: {} };
|
|
|
721
703
|
exports: {}
|
|
722
704
|
/******/
|
|
723
705
|
};
|
|
724
|
-
return t[
|
|
706
|
+
return t[o](c, c.exports, r), c.exports;
|
|
725
707
|
}
|
|
726
708
|
return function() {
|
|
727
|
-
r.n = function(
|
|
728
|
-
var c =
|
|
709
|
+
r.n = function(o) {
|
|
710
|
+
var c = o && o.__esModule ? (
|
|
729
711
|
/******/
|
|
730
712
|
function() {
|
|
731
|
-
return
|
|
713
|
+
return o.default;
|
|
732
714
|
}
|
|
733
715
|
) : (
|
|
734
716
|
/******/
|
|
735
717
|
function() {
|
|
736
|
-
return
|
|
718
|
+
return o;
|
|
737
719
|
}
|
|
738
720
|
);
|
|
739
721
|
return r.d(c, { a: c }), c;
|
|
740
722
|
};
|
|
741
723
|
}(), function() {
|
|
742
|
-
r.d = function(
|
|
743
|
-
for (var
|
|
744
|
-
r.o(c,
|
|
724
|
+
r.d = function(o, c) {
|
|
725
|
+
for (var i in c)
|
|
726
|
+
r.o(c, i) && !r.o(o, i) && Object.defineProperty(o, i, { enumerable: !0, get: c[i] });
|
|
745
727
|
};
|
|
746
728
|
}(), function() {
|
|
747
|
-
r.o = function(
|
|
748
|
-
return Object.prototype.hasOwnProperty.call(
|
|
729
|
+
r.o = function(o, c) {
|
|
730
|
+
return Object.prototype.hasOwnProperty.call(o, c);
|
|
749
731
|
};
|
|
750
732
|
}(), r(686);
|
|
751
733
|
}().default
|
|
@@ -756,16 +738,16 @@ var M0 = kt.exports;
|
|
|
756
738
|
const O0 = /* @__PURE__ */ T0(M0), N0 = (u) => ({
|
|
757
739
|
toClipboard(e, t) {
|
|
758
740
|
return new Promise((n, r) => {
|
|
759
|
-
const
|
|
741
|
+
const o = document.createElement("button"), c = new O0(o, {
|
|
760
742
|
text: () => e,
|
|
761
743
|
action: () => "copy",
|
|
762
744
|
container: t !== void 0 ? t : document.body
|
|
763
745
|
});
|
|
764
|
-
c.on("success", (
|
|
765
|
-
c.destroy(), n(
|
|
766
|
-
}), c.on("error", (
|
|
767
|
-
c.destroy(), r(
|
|
768
|
-
}), document.body.appendChild(
|
|
746
|
+
c.on("success", (i) => {
|
|
747
|
+
c.destroy(), n(i);
|
|
748
|
+
}), c.on("error", (i) => {
|
|
749
|
+
c.destroy(), r(i);
|
|
750
|
+
}), document.body.appendChild(o), o.click(), document.body.removeChild(o);
|
|
769
751
|
});
|
|
770
752
|
}
|
|
771
753
|
}), je = {};
|
|
@@ -789,33 +771,33 @@ function Lu(u, e) {
|
|
|
789
771
|
const t = L0(e);
|
|
790
772
|
return u.replace(/(%[a-f0-9]{2})+/gi, function(n) {
|
|
791
773
|
let r = "";
|
|
792
|
-
for (let
|
|
793
|
-
const
|
|
794
|
-
if (
|
|
795
|
-
r += t[
|
|
774
|
+
for (let o = 0, c = n.length; o < c; o += 3) {
|
|
775
|
+
const i = parseInt(n.slice(o + 1, o + 3), 16);
|
|
776
|
+
if (i < 128) {
|
|
777
|
+
r += t[i];
|
|
796
778
|
continue;
|
|
797
779
|
}
|
|
798
|
-
if ((
|
|
799
|
-
const a = parseInt(n.slice(
|
|
780
|
+
if ((i & 224) === 192 && o + 3 < c) {
|
|
781
|
+
const a = parseInt(n.slice(o + 4, o + 6), 16);
|
|
800
782
|
if ((a & 192) === 128) {
|
|
801
|
-
const s =
|
|
802
|
-
s < 128 ? r += "��" : r += String.fromCharCode(s),
|
|
783
|
+
const s = i << 6 & 1984 | a & 63;
|
|
784
|
+
s < 128 ? r += "��" : r += String.fromCharCode(s), o += 3;
|
|
803
785
|
continue;
|
|
804
786
|
}
|
|
805
787
|
}
|
|
806
|
-
if ((
|
|
807
|
-
const a = parseInt(n.slice(
|
|
788
|
+
if ((i & 240) === 224 && o + 6 < c) {
|
|
789
|
+
const a = parseInt(n.slice(o + 4, o + 6), 16), s = parseInt(n.slice(o + 7, o + 9), 16);
|
|
808
790
|
if ((a & 192) === 128 && (s & 192) === 128) {
|
|
809
|
-
const l =
|
|
810
|
-
l < 2048 || l >= 55296 && l <= 57343 ? r += "���" : r += String.fromCharCode(l),
|
|
791
|
+
const l = i << 12 & 61440 | a << 6 & 4032 | s & 63;
|
|
792
|
+
l < 2048 || l >= 55296 && l <= 57343 ? r += "���" : r += String.fromCharCode(l), o += 6;
|
|
811
793
|
continue;
|
|
812
794
|
}
|
|
813
795
|
}
|
|
814
|
-
if ((
|
|
815
|
-
const a = parseInt(n.slice(
|
|
796
|
+
if ((i & 248) === 240 && o + 9 < c) {
|
|
797
|
+
const a = parseInt(n.slice(o + 4, o + 6), 16), s = parseInt(n.slice(o + 7, o + 9), 16), l = parseInt(n.slice(o + 10, o + 12), 16);
|
|
816
798
|
if ((a & 192) === 128 && (s & 192) === 128 && (l & 192) === 128) {
|
|
817
|
-
let f =
|
|
818
|
-
f < 65536 || f > 1114111 ? r += "����" : (f -= 65536, r += String.fromCharCode(55296 + (f >> 10), 56320 + (f & 1023))),
|
|
799
|
+
let f = i << 18 & 1835008 | a << 12 & 258048 | s << 6 & 4032 | l & 63;
|
|
800
|
+
f < 65536 || f > 1114111 ? r += "����" : (f -= 65536, r += String.fromCharCode(55296 + (f >> 10), 56320 + (f & 1023))), o += 9;
|
|
819
801
|
continue;
|
|
820
802
|
}
|
|
821
803
|
}
|
|
@@ -844,28 +826,28 @@ function Wu(u, e, t) {
|
|
|
844
826
|
typeof e != "string" && (t = e, e = Wu.defaultChars), typeof t > "u" && (t = !0);
|
|
845
827
|
const n = B0(e);
|
|
846
828
|
let r = "";
|
|
847
|
-
for (let
|
|
848
|
-
const
|
|
849
|
-
if (t &&
|
|
850
|
-
r += u.slice(
|
|
829
|
+
for (let o = 0, c = u.length; o < c; o++) {
|
|
830
|
+
const i = u.charCodeAt(o);
|
|
831
|
+
if (t && i === 37 && o + 2 < c && /^[0-9a-f]{2}$/i.test(u.slice(o + 1, o + 3))) {
|
|
832
|
+
r += u.slice(o, o + 3), o += 2;
|
|
851
833
|
continue;
|
|
852
834
|
}
|
|
853
|
-
if (
|
|
854
|
-
r += n[
|
|
835
|
+
if (i < 128) {
|
|
836
|
+
r += n[i];
|
|
855
837
|
continue;
|
|
856
838
|
}
|
|
857
|
-
if (
|
|
858
|
-
if (
|
|
859
|
-
const a = u.charCodeAt(
|
|
839
|
+
if (i >= 55296 && i <= 57343) {
|
|
840
|
+
if (i >= 55296 && i <= 56319 && o + 1 < c) {
|
|
841
|
+
const a = u.charCodeAt(o + 1);
|
|
860
842
|
if (a >= 56320 && a <= 57343) {
|
|
861
|
-
r += encodeURIComponent(u[
|
|
843
|
+
r += encodeURIComponent(u[o] + u[o + 1]), o++;
|
|
862
844
|
continue;
|
|
863
845
|
}
|
|
864
846
|
}
|
|
865
847
|
r += "%EF%BF%BD";
|
|
866
848
|
continue;
|
|
867
849
|
}
|
|
868
|
-
r += encodeURIComponent(u[
|
|
850
|
+
r += encodeURIComponent(u[o]);
|
|
869
851
|
}
|
|
870
852
|
return r;
|
|
871
853
|
}
|
|
@@ -875,10 +857,10 @@ function ze(u) {
|
|
|
875
857
|
let e = "";
|
|
876
858
|
return e += u.protocol || "", e += u.slashes ? "//" : "", e += u.auth ? u.auth + "@" : "", u.hostname && u.hostname.indexOf(":") !== -1 ? e += "[" + u.hostname + "]" : e += u.hostname || "", e += u.port ? ":" + u.port : "", e += u.pathname || "", e += u.search || "", e += u.hash || "", e;
|
|
877
859
|
}
|
|
878
|
-
function
|
|
860
|
+
function oe() {
|
|
879
861
|
this.protocol = null, this.slashes = null, this.auth = null, this.port = null, this.hostname = null, this.hash = null, this.search = null, this.pathname = null;
|
|
880
862
|
}
|
|
881
|
-
const
|
|
863
|
+
const q0 = /^([a-z0-9.+-]+:)/i, R0 = /:[0-9]*$/, P0 = /^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/, j0 = ["<", ">", '"', "`", " ", "\r", `
|
|
882
864
|
`, " "], H0 = ["{", "}", "|", "\\", "^", "`"].concat(j0), $0 = ["'"].concat(H0), $e = ["%", "/", "?", ";", "#"].concat($0), Ve = ["/", "?", "#"], V0 = 255, Ue = /^[+a-z0-9A-Z_-]{0,63}$/, U0 = /^([+a-z0-9A-Z_-]{0,63})(.*)$/, Ze = {
|
|
883
865
|
javascript: !0,
|
|
884
866
|
"javascript:": !0
|
|
@@ -895,29 +877,29 @@ const R0 = /^([a-z0-9.+-]+:)/i, q0 = /:[0-9]*$/, P0 = /^(\/\/?(?!\/)[^\?\s]*)(\?
|
|
|
895
877
|
"file:": !0
|
|
896
878
|
};
|
|
897
879
|
function Ie(u, e) {
|
|
898
|
-
if (u && u instanceof
|
|
899
|
-
const t = new
|
|
880
|
+
if (u && u instanceof oe) return u;
|
|
881
|
+
const t = new oe();
|
|
900
882
|
return t.parse(u, e), t;
|
|
901
883
|
}
|
|
902
|
-
|
|
903
|
-
let t, n, r,
|
|
904
|
-
if (
|
|
905
|
-
const s = P0.exec(
|
|
884
|
+
oe.prototype.parse = function(u, e) {
|
|
885
|
+
let t, n, r, o = u;
|
|
886
|
+
if (o = o.trim(), !e && u.split("#").length === 1) {
|
|
887
|
+
const s = P0.exec(o);
|
|
906
888
|
if (s)
|
|
907
889
|
return this.pathname = s[1], s[2] && (this.search = s[2]), this;
|
|
908
890
|
}
|
|
909
|
-
let c =
|
|
910
|
-
if (c && (c = c[0], t = c.toLowerCase(), this.protocol = c,
|
|
891
|
+
let c = q0.exec(o);
|
|
892
|
+
if (c && (c = c[0], t = c.toLowerCase(), this.protocol = c, o = o.substr(c.length)), (e || c || o.match(/^\/\/[^@\/]+@[^@\/]+/)) && (r = o.substr(0, 2) === "//", r && !(c && Ze[c]) && (o = o.substr(2), this.slashes = !0)), !Ze[c] && (r || c && !Ge[c])) {
|
|
911
893
|
let s = -1;
|
|
912
894
|
for (let d = 0; d < Ve.length; d++)
|
|
913
|
-
n =
|
|
895
|
+
n = o.indexOf(Ve[d]), n !== -1 && (s === -1 || n < s) && (s = n);
|
|
914
896
|
let l, f;
|
|
915
|
-
s === -1 ? f =
|
|
897
|
+
s === -1 ? f = o.lastIndexOf("@") : f = o.lastIndexOf("@", s), f !== -1 && (l = o.slice(0, f), o = o.slice(f + 1), this.auth = l), s = -1;
|
|
916
898
|
for (let d = 0; d < $e.length; d++)
|
|
917
|
-
n =
|
|
918
|
-
s === -1 && (s =
|
|
919
|
-
const
|
|
920
|
-
|
|
899
|
+
n = o.indexOf($e[d]), n !== -1 && (s === -1 || n < s) && (s = n);
|
|
900
|
+
s === -1 && (s = o.length), o[s - 1] === ":" && s--;
|
|
901
|
+
const _ = o.slice(0, s);
|
|
902
|
+
o = o.slice(s), this.parseHost(_), this.hostname = this.hostname || "";
|
|
921
903
|
const h = this.hostname[0] === "[" && this.hostname[this.hostname.length - 1] === "]";
|
|
922
904
|
if (!h) {
|
|
923
905
|
const d = this.hostname.split(/\./);
|
|
@@ -925,11 +907,11 @@ ie.prototype.parse = function(u, e) {
|
|
|
925
907
|
const C = d[y];
|
|
926
908
|
if (C && !C.match(Ue)) {
|
|
927
909
|
let k = "";
|
|
928
|
-
for (let
|
|
929
|
-
C.charCodeAt(
|
|
910
|
+
for (let p = 0, b = C.length; p < b; p++)
|
|
911
|
+
C.charCodeAt(p) > 127 ? k += "x" : k += C[p];
|
|
930
912
|
if (!k.match(Ue)) {
|
|
931
|
-
const
|
|
932
|
-
|
|
913
|
+
const p = d.slice(0, y), b = d.slice(y + 1), m = C.match(U0);
|
|
914
|
+
m && (p.push(m[1]), b.unshift(m[2])), b.length && (o = b.join(".") + o), this.hostname = p.join(".");
|
|
933
915
|
break;
|
|
934
916
|
}
|
|
935
917
|
}
|
|
@@ -937,13 +919,13 @@ ie.prototype.parse = function(u, e) {
|
|
|
937
919
|
}
|
|
938
920
|
this.hostname.length > V0 && (this.hostname = ""), h && (this.hostname = this.hostname.substr(1, this.hostname.length - 2));
|
|
939
921
|
}
|
|
940
|
-
const
|
|
941
|
-
|
|
942
|
-
const a =
|
|
943
|
-
return a !== -1 && (this.search =
|
|
922
|
+
const i = o.indexOf("#");
|
|
923
|
+
i !== -1 && (this.hash = o.substr(i), o = o.slice(0, i));
|
|
924
|
+
const a = o.indexOf("?");
|
|
925
|
+
return a !== -1 && (this.search = o.substr(a), o = o.slice(0, a)), o && (this.pathname = o), Ge[t] && this.hostname && !this.pathname && (this.pathname = ""), this;
|
|
944
926
|
};
|
|
945
|
-
|
|
946
|
-
let e =
|
|
927
|
+
oe.prototype.parseHost = function(u) {
|
|
928
|
+
let e = R0.exec(u);
|
|
947
929
|
e && (e = e[0], e !== ":" && (this.port = e.substr(1)), u = u.substr(0, u.length - e.length)), u && (this.hostname = u);
|
|
948
930
|
};
|
|
949
931
|
const Z0 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
@@ -1085,8 +1067,8 @@ class rn {
|
|
|
1085
1067
|
}
|
|
1086
1068
|
addToNumericResult(e, t, n, r) {
|
|
1087
1069
|
if (t !== n) {
|
|
1088
|
-
const
|
|
1089
|
-
this.result = this.result * Math.pow(r,
|
|
1070
|
+
const o = n - t;
|
|
1071
|
+
this.result = this.result * Math.pow(r, o) + parseInt(e.substr(t, o), r), this.consumed += o;
|
|
1090
1072
|
}
|
|
1091
1073
|
}
|
|
1092
1074
|
/**
|
|
@@ -1163,17 +1145,17 @@ class rn {
|
|
|
1163
1145
|
*/
|
|
1164
1146
|
stateNamedEntity(e, t) {
|
|
1165
1147
|
const { decodeTree: n } = this;
|
|
1166
|
-
let r = n[this.treeIndex],
|
|
1148
|
+
let r = n[this.treeIndex], o = (r & Au.VALUE_LENGTH) >> 14;
|
|
1167
1149
|
for (; t < e.length; t++, this.excess++) {
|
|
1168
1150
|
const c = e.charCodeAt(t);
|
|
1169
|
-
if (this.treeIndex = on(n, r, this.treeIndex + Math.max(1,
|
|
1151
|
+
if (this.treeIndex = on(n, r, this.treeIndex + Math.max(1, o), c), this.treeIndex < 0)
|
|
1170
1152
|
return this.result === 0 || // If we are parsing an attribute
|
|
1171
1153
|
this.decodeMode === vu.Attribute && // We shouldn't have consumed any characters after the entity,
|
|
1172
|
-
(
|
|
1154
|
+
(o === 0 || // And there should be no invalid characters.
|
|
1173
1155
|
nn(c)) ? 0 : this.emitNotTerminatedNamedEntity();
|
|
1174
|
-
if (r = n[this.treeIndex],
|
|
1156
|
+
if (r = n[this.treeIndex], o = (r & Au.VALUE_LENGTH) >> 14, o !== 0) {
|
|
1175
1157
|
if (c === W.SEMI)
|
|
1176
|
-
return this.emitNamedEntityData(this.treeIndex,
|
|
1158
|
+
return this.emitNamedEntityData(this.treeIndex, o, this.consumed + this.excess);
|
|
1177
1159
|
this.decodeMode !== vu.Strict && (this.result = this.treeIndex, this.consumed += this.excess, this.excess = 0);
|
|
1178
1160
|
}
|
|
1179
1161
|
}
|
|
@@ -1228,40 +1210,40 @@ class rn {
|
|
|
1228
1210
|
function Dt(u) {
|
|
1229
1211
|
let e = "";
|
|
1230
1212
|
const t = new rn(u, (n) => e += X0(n));
|
|
1231
|
-
return function(r,
|
|
1232
|
-
let c = 0,
|
|
1233
|
-
for (; (
|
|
1234
|
-
e += r.slice(c,
|
|
1213
|
+
return function(r, o) {
|
|
1214
|
+
let c = 0, i = 0;
|
|
1215
|
+
for (; (i = r.indexOf("&", i)) >= 0; ) {
|
|
1216
|
+
e += r.slice(c, i), t.startEntity(o);
|
|
1235
1217
|
const s = t.write(
|
|
1236
1218
|
r,
|
|
1237
1219
|
// Skip the "&"
|
|
1238
|
-
|
|
1220
|
+
i + 1
|
|
1239
1221
|
);
|
|
1240
1222
|
if (s < 0) {
|
|
1241
|
-
c =
|
|
1223
|
+
c = i + t.end();
|
|
1242
1224
|
break;
|
|
1243
1225
|
}
|
|
1244
|
-
c =
|
|
1226
|
+
c = i + s, i = s === 0 ? c + 1 : c;
|
|
1245
1227
|
}
|
|
1246
1228
|
const a = e + r.slice(c);
|
|
1247
1229
|
return e = "", a;
|
|
1248
1230
|
};
|
|
1249
1231
|
}
|
|
1250
1232
|
function on(u, e, t, n) {
|
|
1251
|
-
const r = (e & Au.BRANCH_LENGTH) >> 7,
|
|
1233
|
+
const r = (e & Au.BRANCH_LENGTH) >> 7, o = e & Au.JUMP_TABLE;
|
|
1252
1234
|
if (r === 0)
|
|
1253
|
-
return
|
|
1254
|
-
if (
|
|
1255
|
-
const a = n -
|
|
1235
|
+
return o !== 0 && n === o ? t : -1;
|
|
1236
|
+
if (o) {
|
|
1237
|
+
const a = n - o;
|
|
1256
1238
|
return a < 0 || a >= r ? -1 : u[t + a] - 1;
|
|
1257
1239
|
}
|
|
1258
|
-
let c = t,
|
|
1259
|
-
for (; c <=
|
|
1260
|
-
const a = c +
|
|
1240
|
+
let c = t, i = c + r - 1;
|
|
1241
|
+
for (; c <= i; ) {
|
|
1242
|
+
const a = c + i >>> 1, s = u[a];
|
|
1261
1243
|
if (s < n)
|
|
1262
1244
|
c = a + 1;
|
|
1263
1245
|
else if (s > n)
|
|
1264
|
-
|
|
1246
|
+
i = a - 1;
|
|
1265
1247
|
else
|
|
1266
1248
|
return u[a + r];
|
|
1267
1249
|
}
|
|
@@ -1299,7 +1281,7 @@ function Ft(u, e, t) {
|
|
|
1299
1281
|
function Oe(u) {
|
|
1300
1282
|
return !(u >= 55296 && u <= 57343 || u >= 64976 && u <= 65007 || (u & 65535) === 65535 || (u & 65535) === 65534 || u >= 0 && u <= 8 || u === 11 || u >= 14 && u <= 31 || u >= 127 && u <= 159 || u > 1114111);
|
|
1301
1283
|
}
|
|
1302
|
-
function
|
|
1284
|
+
function ie(u) {
|
|
1303
1285
|
if (u > 65535) {
|
|
1304
1286
|
u -= 65536;
|
|
1305
1287
|
const e = 55296 + (u >> 10), t = 56320 + (u & 1023);
|
|
@@ -1311,7 +1293,7 @@ const wt = /\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g, dn = /&([a-z#][a-z0-9]{
|
|
|
1311
1293
|
function pn(u, e) {
|
|
1312
1294
|
if (e.charCodeAt(0) === 35 && hn.test(e)) {
|
|
1313
1295
|
const n = e[1].toLowerCase() === "x" ? parseInt(e.slice(2), 16) : parseInt(e.slice(1), 10);
|
|
1314
|
-
return Oe(n) ?
|
|
1296
|
+
return Oe(n) ? ie(n) : u;
|
|
1315
1297
|
}
|
|
1316
1298
|
const t = Et(u);
|
|
1317
1299
|
return t !== u ? t : u;
|
|
@@ -1418,7 +1400,7 @@ const yn = { mdurl: Z0, ucmicro: K0 }, An = /* @__PURE__ */ Object.freeze(/* @__
|
|
|
1418
1400
|
assign: ae,
|
|
1419
1401
|
escapeHtml: Du,
|
|
1420
1402
|
escapeRE: vn,
|
|
1421
|
-
fromCodePoint:
|
|
1403
|
+
fromCodePoint: ie,
|
|
1422
1404
|
has: ln,
|
|
1423
1405
|
isMdAsciiPunct: Gu,
|
|
1424
1406
|
isPunctChar: Zu,
|
|
@@ -1432,14 +1414,14 @@ const yn = { mdurl: Z0, ucmicro: K0 }, An = /* @__PURE__ */ Object.freeze(/* @__
|
|
|
1432
1414
|
unescapeMd: bn
|
|
1433
1415
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
1434
1416
|
function Cn(u, e, t) {
|
|
1435
|
-
let n, r,
|
|
1436
|
-
const
|
|
1437
|
-
for (u.pos = e + 1, n = 1; u.pos <
|
|
1438
|
-
if (
|
|
1417
|
+
let n, r, o, c;
|
|
1418
|
+
const i = u.posMax, a = u.pos;
|
|
1419
|
+
for (u.pos = e + 1, n = 1; u.pos < i; ) {
|
|
1420
|
+
if (o = u.src.charCodeAt(u.pos), o === 93 && (n--, n === 0)) {
|
|
1439
1421
|
r = !0;
|
|
1440
1422
|
break;
|
|
1441
1423
|
}
|
|
1442
|
-
if (c = u.pos, u.md.inline.skipToken(u),
|
|
1424
|
+
if (c = u.pos, u.md.inline.skipToken(u), o === 91) {
|
|
1443
1425
|
if (c === u.pos - 1)
|
|
1444
1426
|
n++;
|
|
1445
1427
|
else if (t)
|
|
@@ -1451,7 +1433,7 @@ function Cn(u, e, t) {
|
|
|
1451
1433
|
}
|
|
1452
1434
|
function Dn(u, e, t) {
|
|
1453
1435
|
let n, r = e;
|
|
1454
|
-
const
|
|
1436
|
+
const o = {
|
|
1455
1437
|
ok: !1,
|
|
1456
1438
|
pos: 0,
|
|
1457
1439
|
str: ""
|
|
@@ -1459,16 +1441,16 @@ function Dn(u, e, t) {
|
|
|
1459
1441
|
if (u.charCodeAt(r) === 60) {
|
|
1460
1442
|
for (r++; r < t; ) {
|
|
1461
1443
|
if (n = u.charCodeAt(r), n === 10 || n === 60)
|
|
1462
|
-
return
|
|
1444
|
+
return o;
|
|
1463
1445
|
if (n === 62)
|
|
1464
|
-
return
|
|
1446
|
+
return o.pos = r + 1, o.str = Bu(u.slice(e + 1, r)), o.ok = !0, o;
|
|
1465
1447
|
if (n === 92 && r + 1 < t) {
|
|
1466
1448
|
r += 2;
|
|
1467
1449
|
continue;
|
|
1468
1450
|
}
|
|
1469
1451
|
r++;
|
|
1470
1452
|
}
|
|
1471
|
-
return
|
|
1453
|
+
return o;
|
|
1472
1454
|
}
|
|
1473
1455
|
let c = 0;
|
|
1474
1456
|
for (; r < t && (n = u.charCodeAt(r), !(n === 32 || n < 32 || n === 127)); ) {
|
|
@@ -1479,7 +1461,7 @@ function Dn(u, e, t) {
|
|
|
1479
1461
|
continue;
|
|
1480
1462
|
}
|
|
1481
1463
|
if (n === 40 && (c++, c > 32))
|
|
1482
|
-
return
|
|
1464
|
+
return o;
|
|
1483
1465
|
if (n === 41) {
|
|
1484
1466
|
if (c === 0)
|
|
1485
1467
|
break;
|
|
@@ -1487,10 +1469,10 @@ function Dn(u, e, t) {
|
|
|
1487
1469
|
}
|
|
1488
1470
|
r++;
|
|
1489
1471
|
}
|
|
1490
|
-
return e === r || c !== 0 || (
|
|
1472
|
+
return e === r || c !== 0 || (o.str = Bu(u.slice(e, r)), o.pos = r, o.ok = !0), o;
|
|
1491
1473
|
}
|
|
1492
1474
|
function En(u, e, t, n) {
|
|
1493
|
-
let r,
|
|
1475
|
+
let r, o = e;
|
|
1494
1476
|
const c = {
|
|
1495
1477
|
// if `true`, this is a valid link title
|
|
1496
1478
|
ok: !1,
|
|
@@ -1506,21 +1488,21 @@ function En(u, e, t, n) {
|
|
|
1506
1488
|
if (n)
|
|
1507
1489
|
c.str = n.str, c.marker = n.marker;
|
|
1508
1490
|
else {
|
|
1509
|
-
if (
|
|
1491
|
+
if (o >= t)
|
|
1510
1492
|
return c;
|
|
1511
|
-
let
|
|
1512
|
-
if (
|
|
1493
|
+
let i = u.charCodeAt(o);
|
|
1494
|
+
if (i !== 34 && i !== 39 && i !== 40)
|
|
1513
1495
|
return c;
|
|
1514
|
-
e++,
|
|
1496
|
+
e++, o++, i === 40 && (i = 41), c.marker = i;
|
|
1515
1497
|
}
|
|
1516
|
-
for (;
|
|
1517
|
-
if (r = u.charCodeAt(
|
|
1518
|
-
return c.pos =
|
|
1498
|
+
for (; o < t; ) {
|
|
1499
|
+
if (r = u.charCodeAt(o), r === c.marker)
|
|
1500
|
+
return c.pos = o + 1, c.str += Bu(u.slice(e, o)), c.ok = !0, c;
|
|
1519
1501
|
if (r === 40 && c.marker === 41)
|
|
1520
1502
|
return c;
|
|
1521
|
-
r === 92 &&
|
|
1503
|
+
r === 92 && o + 1 < t && o++, o++;
|
|
1522
1504
|
}
|
|
1523
|
-
return c.can_continue = !0, c.str += Bu(u.slice(e,
|
|
1505
|
+
return c.can_continue = !0, c.str += Bu(u.slice(e, o)), c;
|
|
1524
1506
|
}
|
|
1525
1507
|
const Fn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1526
1508
|
__proto__: null,
|
|
@@ -1529,40 +1511,40 @@ const Fn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
1529
1511
|
parseLinkTitle: En
|
|
1530
1512
|
}, Symbol.toStringTag, { value: "Module" })), mu = {};
|
|
1531
1513
|
mu.code_inline = function(u, e, t, n, r) {
|
|
1532
|
-
const
|
|
1533
|
-
return "<code" + r.renderAttrs(
|
|
1514
|
+
const o = u[e];
|
|
1515
|
+
return "<code" + r.renderAttrs(o) + ">" + Du(o.content) + "</code>";
|
|
1534
1516
|
};
|
|
1535
1517
|
mu.code_block = function(u, e, t, n, r) {
|
|
1536
|
-
const
|
|
1537
|
-
return "<pre" + r.renderAttrs(
|
|
1518
|
+
const o = u[e];
|
|
1519
|
+
return "<pre" + r.renderAttrs(o) + "><code>" + Du(u[e].content) + `</code></pre>
|
|
1538
1520
|
`;
|
|
1539
1521
|
};
|
|
1540
1522
|
mu.fence = function(u, e, t, n, r) {
|
|
1541
|
-
const
|
|
1542
|
-
let
|
|
1523
|
+
const o = u[e], c = o.info ? Bu(o.info).trim() : "";
|
|
1524
|
+
let i = "", a = "";
|
|
1543
1525
|
if (c) {
|
|
1544
1526
|
const l = c.split(/(\s+)/g);
|
|
1545
|
-
|
|
1527
|
+
i = l[0], a = l.slice(2).join("");
|
|
1546
1528
|
}
|
|
1547
1529
|
let s;
|
|
1548
|
-
if (t.highlight ? s = t.highlight(
|
|
1530
|
+
if (t.highlight ? s = t.highlight(o.content, i, a) || Du(o.content) : s = Du(o.content), s.indexOf("<pre") === 0)
|
|
1549
1531
|
return s + `
|
|
1550
1532
|
`;
|
|
1551
1533
|
if (c) {
|
|
1552
|
-
const l =
|
|
1553
|
-
l < 0 ? f.push(["class", t.langPrefix +
|
|
1554
|
-
const
|
|
1534
|
+
const l = o.attrIndex("class"), f = o.attrs ? o.attrs.slice() : [];
|
|
1535
|
+
l < 0 ? f.push(["class", t.langPrefix + i]) : (f[l] = f[l].slice(), f[l][1] += " " + t.langPrefix + i);
|
|
1536
|
+
const _ = {
|
|
1555
1537
|
attrs: f
|
|
1556
1538
|
};
|
|
1557
|
-
return `<pre><code${r.renderAttrs(
|
|
1539
|
+
return `<pre><code${r.renderAttrs(_)}>${s}</code></pre>
|
|
1558
1540
|
`;
|
|
1559
1541
|
}
|
|
1560
|
-
return `<pre><code${r.renderAttrs(
|
|
1542
|
+
return `<pre><code${r.renderAttrs(o)}>${s}</code></pre>
|
|
1561
1543
|
`;
|
|
1562
1544
|
};
|
|
1563
1545
|
mu.image = function(u, e, t, n, r) {
|
|
1564
|
-
const
|
|
1565
|
-
return
|
|
1546
|
+
const o = u[e];
|
|
1547
|
+
return o.attrs[o.attrIndex("alt")][1] = r.renderInlineAsText(o.children, t, n), r.renderToken(u, e, t);
|
|
1566
1548
|
};
|
|
1567
1549
|
mu.hardbreak = function(u, e, t) {
|
|
1568
1550
|
return t.xhtmlOut ? `<br />
|
|
@@ -1597,31 +1579,31 @@ Pu.prototype.renderAttrs = function(e) {
|
|
|
1597
1579
|
};
|
|
1598
1580
|
Pu.prototype.renderToken = function(e, t, n) {
|
|
1599
1581
|
const r = e[t];
|
|
1600
|
-
let
|
|
1582
|
+
let o = "";
|
|
1601
1583
|
if (r.hidden)
|
|
1602
1584
|
return "";
|
|
1603
|
-
r.block && r.nesting !== -1 && t && e[t - 1].hidden && (
|
|
1604
|
-
`),
|
|
1585
|
+
r.block && r.nesting !== -1 && t && e[t - 1].hidden && (o += `
|
|
1586
|
+
`), o += (r.nesting === -1 ? "</" : "<") + r.tag, o += this.renderAttrs(r), r.nesting === 0 && n.xhtmlOut && (o += " /");
|
|
1605
1587
|
let c = !1;
|
|
1606
1588
|
if (r.block && (c = !0, r.nesting === 1 && t + 1 < e.length)) {
|
|
1607
|
-
const
|
|
1608
|
-
(
|
|
1589
|
+
const i = e[t + 1];
|
|
1590
|
+
(i.type === "inline" || i.hidden || i.nesting === -1 && i.tag === r.tag) && (c = !1);
|
|
1609
1591
|
}
|
|
1610
|
-
return
|
|
1611
|
-
` : ">",
|
|
1592
|
+
return o += c ? `>
|
|
1593
|
+
` : ">", o;
|
|
1612
1594
|
};
|
|
1613
1595
|
Pu.prototype.renderInline = function(u, e, t) {
|
|
1614
1596
|
let n = "";
|
|
1615
1597
|
const r = this.rules;
|
|
1616
|
-
for (let
|
|
1617
|
-
const
|
|
1618
|
-
typeof r[
|
|
1598
|
+
for (let o = 0, c = u.length; o < c; o++) {
|
|
1599
|
+
const i = u[o].type;
|
|
1600
|
+
typeof r[i] < "u" ? n += r[i](u, o, e, t, this) : n += this.renderToken(u, o, e);
|
|
1619
1601
|
}
|
|
1620
1602
|
return n;
|
|
1621
1603
|
};
|
|
1622
1604
|
Pu.prototype.renderInlineAsText = function(u, e, t) {
|
|
1623
1605
|
let n = "";
|
|
1624
|
-
for (let r = 0,
|
|
1606
|
+
for (let r = 0, o = u.length; r < o; r++)
|
|
1625
1607
|
switch (u[r].type) {
|
|
1626
1608
|
case "text":
|
|
1627
1609
|
n += u[r].content;
|
|
@@ -1644,9 +1626,9 @@ Pu.prototype.renderInlineAsText = function(u, e, t) {
|
|
|
1644
1626
|
Pu.prototype.render = function(u, e, t) {
|
|
1645
1627
|
let n = "";
|
|
1646
1628
|
const r = this.rules;
|
|
1647
|
-
for (let
|
|
1648
|
-
const
|
|
1649
|
-
|
|
1629
|
+
for (let o = 0, c = u.length; o < c; o++) {
|
|
1630
|
+
const i = u[o].type;
|
|
1631
|
+
i === "inline" ? n += this.renderInline(u[o].children, e, t) : typeof r[i] < "u" ? n += r[i](u, o, e, t, this) : n += this.renderToken(u, o, e, t);
|
|
1650
1632
|
}
|
|
1651
1633
|
return n;
|
|
1652
1634
|
};
|
|
@@ -1678,25 +1660,25 @@ uu.prototype.at = function(u, e, t) {
|
|
|
1678
1660
|
this.__rules__[n].fn = e, this.__rules__[n].alt = r.alt || [], this.__cache__ = null;
|
|
1679
1661
|
};
|
|
1680
1662
|
uu.prototype.before = function(u, e, t, n) {
|
|
1681
|
-
const r = this.__find__(u),
|
|
1663
|
+
const r = this.__find__(u), o = n || {};
|
|
1682
1664
|
if (r === -1)
|
|
1683
1665
|
throw new Error("Parser rule not found: " + u);
|
|
1684
1666
|
this.__rules__.splice(r, 0, {
|
|
1685
1667
|
name: e,
|
|
1686
1668
|
enabled: !0,
|
|
1687
1669
|
fn: t,
|
|
1688
|
-
alt:
|
|
1670
|
+
alt: o.alt || []
|
|
1689
1671
|
}), this.__cache__ = null;
|
|
1690
1672
|
};
|
|
1691
1673
|
uu.prototype.after = function(u, e, t, n) {
|
|
1692
|
-
const r = this.__find__(u),
|
|
1674
|
+
const r = this.__find__(u), o = n || {};
|
|
1693
1675
|
if (r === -1)
|
|
1694
1676
|
throw new Error("Parser rule not found: " + u);
|
|
1695
1677
|
this.__rules__.splice(r + 1, 0, {
|
|
1696
1678
|
name: e,
|
|
1697
1679
|
enabled: !0,
|
|
1698
1680
|
fn: t,
|
|
1699
|
-
alt:
|
|
1681
|
+
alt: o.alt || []
|
|
1700
1682
|
}), this.__cache__ = null;
|
|
1701
1683
|
};
|
|
1702
1684
|
uu.prototype.push = function(u, e, t) {
|
|
@@ -1803,19 +1785,19 @@ function Nn(u) {
|
|
|
1803
1785
|
for (let t = 0, n = e.length; t < n; t++) {
|
|
1804
1786
|
if (e[t].type !== "inline" || !u.md.linkify.pretest(e[t].content))
|
|
1805
1787
|
continue;
|
|
1806
|
-
let r = e[t].children,
|
|
1788
|
+
let r = e[t].children, o = 0;
|
|
1807
1789
|
for (let c = r.length - 1; c >= 0; c--) {
|
|
1808
|
-
const
|
|
1809
|
-
if (
|
|
1810
|
-
for (c--; r[c].level !==
|
|
1790
|
+
const i = r[c];
|
|
1791
|
+
if (i.type === "link_close") {
|
|
1792
|
+
for (c--; r[c].level !== i.level && r[c].type !== "link_open"; )
|
|
1811
1793
|
c--;
|
|
1812
1794
|
continue;
|
|
1813
1795
|
}
|
|
1814
|
-
if (
|
|
1815
|
-
const a =
|
|
1796
|
+
if (i.type === "html_inline" && (Mn(i.content) && o > 0 && o--, On(i.content) && o++), !(o > 0) && i.type === "text" && u.md.linkify.test(i.content)) {
|
|
1797
|
+
const a = i.content;
|
|
1816
1798
|
let s = u.md.linkify.match(a);
|
|
1817
1799
|
const l = [];
|
|
1818
|
-
let f =
|
|
1800
|
+
let f = i.level, _ = 0;
|
|
1819
1801
|
s.length > 0 && s[0].index === 0 && c > 0 && r[c - 1].type === "text_special" && (s = s.slice(1));
|
|
1820
1802
|
for (let h = 0; h < s.length; h++) {
|
|
1821
1803
|
const d = s[h].url, y = u.md.normalizeLink(d);
|
|
@@ -1824,39 +1806,39 @@ function Nn(u) {
|
|
|
1824
1806
|
let v = s[h].text;
|
|
1825
1807
|
s[h].schema ? s[h].schema === "mailto:" && !/^mailto:/i.test(v) ? v = u.md.normalizeLinkText("mailto:" + v).replace(/^mailto:/, "") : v = u.md.normalizeLinkText(v) : v = u.md.normalizeLinkText("http://" + v).replace(/^http:\/\//, "");
|
|
1826
1808
|
const C = s[h].index;
|
|
1827
|
-
if (C >
|
|
1828
|
-
const
|
|
1829
|
-
|
|
1809
|
+
if (C > _) {
|
|
1810
|
+
const m = new u.Token("text", "", 0);
|
|
1811
|
+
m.content = a.slice(_, C), m.level = f, l.push(m);
|
|
1830
1812
|
}
|
|
1831
1813
|
const k = new u.Token("link_open", "a", 1);
|
|
1832
1814
|
k.attrs = [["href", y]], k.level = f++, k.markup = "linkify", k.info = "auto", l.push(k);
|
|
1833
|
-
const
|
|
1834
|
-
|
|
1835
|
-
const
|
|
1836
|
-
|
|
1815
|
+
const p = new u.Token("text", "", 0);
|
|
1816
|
+
p.content = v, p.level = f, l.push(p);
|
|
1817
|
+
const b = new u.Token("link_close", "a", -1);
|
|
1818
|
+
b.level = --f, b.markup = "linkify", b.info = "auto", l.push(b), _ = s[h].lastIndex;
|
|
1837
1819
|
}
|
|
1838
|
-
if (
|
|
1820
|
+
if (_ < a.length) {
|
|
1839
1821
|
const h = new u.Token("text", "", 0);
|
|
1840
|
-
h.content = a.slice(
|
|
1822
|
+
h.content = a.slice(_), h.level = f, l.push(h);
|
|
1841
1823
|
}
|
|
1842
1824
|
e[t].children = r = Ft(r, c, l);
|
|
1843
1825
|
}
|
|
1844
1826
|
}
|
|
1845
1827
|
}
|
|
1846
1828
|
}
|
|
1847
|
-
const zt = /\+-|\.\.|\?\?\?\?|!!!!|,,|--/, Ln = /\((c|tm|r)\)/i, Bn = /\((c|tm|r)\)/ig,
|
|
1829
|
+
const zt = /\+-|\.\.|\?\?\?\?|!!!!|,,|--/, Ln = /\((c|tm|r)\)/i, Bn = /\((c|tm|r)\)/ig, qn = {
|
|
1848
1830
|
c: "©",
|
|
1849
1831
|
r: "®",
|
|
1850
1832
|
tm: "™"
|
|
1851
1833
|
};
|
|
1852
|
-
function
|
|
1853
|
-
return
|
|
1834
|
+
function Rn(u, e) {
|
|
1835
|
+
return qn[e.toLowerCase()];
|
|
1854
1836
|
}
|
|
1855
1837
|
function Pn(u) {
|
|
1856
1838
|
let e = 0;
|
|
1857
1839
|
for (let t = u.length - 1; t >= 0; t--) {
|
|
1858
1840
|
const n = u[t];
|
|
1859
|
-
n.type === "text" && !e && (n.content = n.content.replace(Bn,
|
|
1841
|
+
n.type === "text" && !e && (n.content = n.content.replace(Bn, Rn)), n.type === "link_open" && n.info === "auto" && e--, n.type === "link_close" && n.info === "auto" && e++;
|
|
1860
1842
|
}
|
|
1861
1843
|
}
|
|
1862
1844
|
function jn(u) {
|
|
@@ -1880,24 +1862,24 @@ function Vn(u, e) {
|
|
|
1880
1862
|
let t;
|
|
1881
1863
|
const n = [];
|
|
1882
1864
|
for (let r = 0; r < u.length; r++) {
|
|
1883
|
-
const
|
|
1865
|
+
const o = u[r], c = u[r].level;
|
|
1884
1866
|
for (t = n.length - 1; t >= 0 && !(n[t].level <= c); t--)
|
|
1885
1867
|
;
|
|
1886
|
-
if (n.length = t + 1,
|
|
1868
|
+
if (n.length = t + 1, o.type !== "text")
|
|
1887
1869
|
continue;
|
|
1888
|
-
let
|
|
1870
|
+
let i = o.content, a = 0, s = i.length;
|
|
1889
1871
|
u:
|
|
1890
1872
|
for (; a < s; ) {
|
|
1891
1873
|
Ke.lastIndex = a;
|
|
1892
|
-
const l = Ke.exec(
|
|
1874
|
+
const l = Ke.exec(i);
|
|
1893
1875
|
if (!l)
|
|
1894
1876
|
break;
|
|
1895
|
-
let f = !0,
|
|
1877
|
+
let f = !0, _ = !0;
|
|
1896
1878
|
a = l.index + 1;
|
|
1897
1879
|
const h = l[0] === "'";
|
|
1898
1880
|
let d = 32;
|
|
1899
1881
|
if (l.index - 1 >= 0)
|
|
1900
|
-
d =
|
|
1882
|
+
d = i.charCodeAt(l.index - 1);
|
|
1901
1883
|
else
|
|
1902
1884
|
for (t = r - 1; t >= 0 && !(u[t].type === "softbreak" || u[t].type === "hardbreak"); t--)
|
|
1903
1885
|
if (u[t].content) {
|
|
@@ -1906,31 +1888,31 @@ function Vn(u, e) {
|
|
|
1906
1888
|
}
|
|
1907
1889
|
let y = 32;
|
|
1908
1890
|
if (a < s)
|
|
1909
|
-
y =
|
|
1891
|
+
y = i.charCodeAt(a);
|
|
1910
1892
|
else
|
|
1911
1893
|
for (t = r + 1; t < u.length && !(u[t].type === "softbreak" || u[t].type === "hardbreak"); t++)
|
|
1912
1894
|
if (u[t].content) {
|
|
1913
1895
|
y = u[t].content.charCodeAt(0);
|
|
1914
1896
|
break;
|
|
1915
1897
|
}
|
|
1916
|
-
const v = Gu(d) || Zu(String.fromCharCode(d)), C = Gu(y) || Zu(String.fromCharCode(y)), k = Uu(d),
|
|
1917
|
-
if (
|
|
1918
|
-
h && (
|
|
1898
|
+
const v = Gu(d) || Zu(String.fromCharCode(d)), C = Gu(y) || Zu(String.fromCharCode(y)), k = Uu(d), p = Uu(y);
|
|
1899
|
+
if (p ? f = !1 : C && (k || v || (f = !1)), k ? _ = !1 : v && (p || C || (_ = !1)), y === 34 && l[0] === '"' && d >= 48 && d <= 57 && (_ = f = !1), f && _ && (f = v, _ = C), !f && !_) {
|
|
1900
|
+
h && (o.content = ee(o.content, l.index, Je));
|
|
1919
1901
|
continue;
|
|
1920
1902
|
}
|
|
1921
|
-
if (
|
|
1903
|
+
if (_)
|
|
1922
1904
|
for (t = n.length - 1; t >= 0; t--) {
|
|
1923
|
-
let
|
|
1905
|
+
let b = n[t];
|
|
1924
1906
|
if (n[t].level < c)
|
|
1925
1907
|
break;
|
|
1926
|
-
if (
|
|
1927
|
-
|
|
1928
|
-
let
|
|
1929
|
-
h ? (
|
|
1930
|
-
u[
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
), a += O.length - 1,
|
|
1908
|
+
if (b.single === h && n[t].level === c) {
|
|
1909
|
+
b = n[t];
|
|
1910
|
+
let m, O;
|
|
1911
|
+
h ? (m = e.md.options.quotes[2], O = e.md.options.quotes[3]) : (m = e.md.options.quotes[0], O = e.md.options.quotes[1]), o.content = ee(o.content, l.index, O), u[b.token].content = ee(
|
|
1912
|
+
u[b.token].content,
|
|
1913
|
+
b.pos,
|
|
1914
|
+
m
|
|
1915
|
+
), a += O.length - 1, b.token === r && (a += m.length - 1), i = o.content, s = i.length, n.length = t;
|
|
1934
1916
|
continue u;
|
|
1935
1917
|
}
|
|
1936
1918
|
}
|
|
@@ -1939,7 +1921,7 @@ function Vn(u, e) {
|
|
|
1939
1921
|
pos: l.index,
|
|
1940
1922
|
single: h,
|
|
1941
1923
|
level: c
|
|
1942
|
-
}) :
|
|
1924
|
+
}) : _ && h && (o.content = ee(o.content, l.index, Je));
|
|
1943
1925
|
}
|
|
1944
1926
|
}
|
|
1945
1927
|
}
|
|
@@ -1951,13 +1933,13 @@ function Un(u) {
|
|
|
1951
1933
|
function Zn(u) {
|
|
1952
1934
|
let e, t;
|
|
1953
1935
|
const n = u.tokens, r = n.length;
|
|
1954
|
-
for (let
|
|
1955
|
-
if (n[
|
|
1956
|
-
const c = n[
|
|
1957
|
-
for (e = 0; e <
|
|
1936
|
+
for (let o = 0; o < r; o++) {
|
|
1937
|
+
if (n[o].type !== "inline") continue;
|
|
1938
|
+
const c = n[o].children, i = c.length;
|
|
1939
|
+
for (e = 0; e < i; e++)
|
|
1958
1940
|
c[e].type === "text_special" && (c[e].type = "text");
|
|
1959
|
-
for (e = t = 0; e <
|
|
1960
|
-
c[e].type === "text" && e + 1 <
|
|
1941
|
+
for (e = t = 0; e < i; e++)
|
|
1942
|
+
c[e].type === "text" && e + 1 < i && c[e + 1].type === "text" ? c[e + 1].content = c[e].content + c[e + 1].content : (e !== t && (c[t] = c[e]), t++);
|
|
1961
1943
|
e !== t && (c.length = t);
|
|
1962
1944
|
}
|
|
1963
1945
|
}
|
|
@@ -1986,15 +1968,15 @@ Ne.prototype.State = St;
|
|
|
1986
1968
|
function xu(u, e, t, n) {
|
|
1987
1969
|
this.src = u, this.md = e, this.env = t, this.tokens = n, this.bMarks = [], this.eMarks = [], this.tShift = [], this.sCount = [], this.bsCount = [], this.blkIndent = 0, this.line = 0, this.lineMax = 0, this.tight = !1, this.ddIndent = -1, this.listIndent = -1, this.parentType = "root", this.level = 0;
|
|
1988
1970
|
const r = this.src;
|
|
1989
|
-
for (let
|
|
1971
|
+
for (let o = 0, c = 0, i = 0, a = 0, s = r.length, l = !1; c < s; c++) {
|
|
1990
1972
|
const f = r.charCodeAt(c);
|
|
1991
1973
|
if (!l)
|
|
1992
1974
|
if (Z(f)) {
|
|
1993
|
-
|
|
1975
|
+
i++, f === 9 ? a += 4 - a % 4 : a++;
|
|
1994
1976
|
continue;
|
|
1995
1977
|
} else
|
|
1996
1978
|
l = !0;
|
|
1997
|
-
(f === 10 || c === s - 1) && (f !== 10 && c++, this.bMarks.push(
|
|
1979
|
+
(f === 10 || c === s - 1) && (f !== 10 && c++, this.bMarks.push(o), this.eMarks.push(c), this.tShift.push(i), this.sCount.push(a), this.bsCount.push(0), l = !1, i = 0, a = 0, o = c + 1);
|
|
1998
1980
|
}
|
|
1999
1981
|
this.bMarks.push(r.length), this.eMarks.push(r.length), this.tShift.push(0), this.sCount.push(0), this.bsCount.push(0), this.lineMax = this.bMarks.length - 1;
|
|
2000
1982
|
}
|
|
@@ -2042,24 +2024,24 @@ xu.prototype.skipCharsBack = function(e, t, n) {
|
|
|
2042
2024
|
xu.prototype.getLines = function(e, t, n, r) {
|
|
2043
2025
|
if (e >= t)
|
|
2044
2026
|
return "";
|
|
2045
|
-
const
|
|
2046
|
-
for (let c = 0,
|
|
2027
|
+
const o = new Array(t - e);
|
|
2028
|
+
for (let c = 0, i = e; i < t; i++, c++) {
|
|
2047
2029
|
let a = 0;
|
|
2048
|
-
const s = this.bMarks[
|
|
2030
|
+
const s = this.bMarks[i];
|
|
2049
2031
|
let l = s, f;
|
|
2050
|
-
for (
|
|
2051
|
-
const
|
|
2052
|
-
if (Z(
|
|
2053
|
-
|
|
2054
|
-
else if (l - s < this.tShift[
|
|
2032
|
+
for (i + 1 < t || r ? f = this.eMarks[i] + 1 : f = this.eMarks[i]; l < f && a < n; ) {
|
|
2033
|
+
const _ = this.src.charCodeAt(l);
|
|
2034
|
+
if (Z(_))
|
|
2035
|
+
_ === 9 ? a += 4 - (a + this.bsCount[i]) % 4 : a++;
|
|
2036
|
+
else if (l - s < this.tShift[i])
|
|
2055
2037
|
a++;
|
|
2056
2038
|
else
|
|
2057
2039
|
break;
|
|
2058
2040
|
l++;
|
|
2059
2041
|
}
|
|
2060
|
-
a > n ?
|
|
2042
|
+
a > n ? o[c] = new Array(a - n + 1).join(" ") + this.src.slice(l, f) : o[c] = this.src.slice(l, f);
|
|
2061
2043
|
}
|
|
2062
|
-
return
|
|
2044
|
+
return o.join("");
|
|
2063
2045
|
};
|
|
2064
2046
|
xu.prototype.Token = lu;
|
|
2065
2047
|
const Gn = 65536;
|
|
@@ -2069,10 +2051,10 @@ function xe(u, e) {
|
|
|
2069
2051
|
}
|
|
2070
2052
|
function Qe(u) {
|
|
2071
2053
|
const e = [], t = u.length;
|
|
2072
|
-
let n = 0, r = u.charCodeAt(n),
|
|
2054
|
+
let n = 0, r = u.charCodeAt(n), o = !1, c = 0, i = "";
|
|
2073
2055
|
for (; n < t; )
|
|
2074
|
-
r === 124 && (
|
|
2075
|
-
return e.push(
|
|
2056
|
+
r === 124 && (o ? (i += u.substring(c, n - 1), c = n) : (e.push(i + u.substring(c, n)), i = "", c = n + 1)), o = r === 92, n++, r = u.charCodeAt(n);
|
|
2057
|
+
return e.push(i + u.substring(c)), e;
|
|
2076
2058
|
}
|
|
2077
2059
|
function Kn(u, e, t, n) {
|
|
2078
2060
|
if (e + 2 > t)
|
|
@@ -2080,33 +2062,33 @@ function Kn(u, e, t, n) {
|
|
|
2080
2062
|
let r = e + 1;
|
|
2081
2063
|
if (u.sCount[r] < u.blkIndent || u.sCount[r] - u.blkIndent >= 4)
|
|
2082
2064
|
return !1;
|
|
2083
|
-
let
|
|
2084
|
-
if (
|
|
2065
|
+
let o = u.bMarks[r] + u.tShift[r];
|
|
2066
|
+
if (o >= u.eMarks[r])
|
|
2085
2067
|
return !1;
|
|
2086
|
-
const c = u.src.charCodeAt(
|
|
2087
|
-
if (c !== 124 && c !== 45 && c !== 58 ||
|
|
2068
|
+
const c = u.src.charCodeAt(o++);
|
|
2069
|
+
if (c !== 124 && c !== 45 && c !== 58 || o >= u.eMarks[r])
|
|
2088
2070
|
return !1;
|
|
2089
|
-
const
|
|
2090
|
-
if (
|
|
2071
|
+
const i = u.src.charCodeAt(o++);
|
|
2072
|
+
if (i !== 124 && i !== 45 && i !== 58 && !Z(i) || c === 45 && Z(i))
|
|
2091
2073
|
return !1;
|
|
2092
|
-
for (;
|
|
2093
|
-
const
|
|
2094
|
-
if (
|
|
2074
|
+
for (; o < u.eMarks[r]; ) {
|
|
2075
|
+
const b = u.src.charCodeAt(o);
|
|
2076
|
+
if (b !== 124 && b !== 45 && b !== 58 && !Z(b))
|
|
2095
2077
|
return !1;
|
|
2096
|
-
|
|
2078
|
+
o++;
|
|
2097
2079
|
}
|
|
2098
2080
|
let a = xe(u, e + 1), s = a.split("|");
|
|
2099
2081
|
const l = [];
|
|
2100
|
-
for (let
|
|
2101
|
-
const
|
|
2102
|
-
if (!
|
|
2103
|
-
if (
|
|
2082
|
+
for (let b = 0; b < s.length; b++) {
|
|
2083
|
+
const m = s[b].trim();
|
|
2084
|
+
if (!m) {
|
|
2085
|
+
if (b === 0 || b === s.length - 1)
|
|
2104
2086
|
continue;
|
|
2105
2087
|
return !1;
|
|
2106
2088
|
}
|
|
2107
|
-
if (!/^:?-+:?$/.test(
|
|
2089
|
+
if (!/^:?-+:?$/.test(m))
|
|
2108
2090
|
return !1;
|
|
2109
|
-
|
|
2091
|
+
m.charCodeAt(m.length - 1) === 58 ? l.push(m.charCodeAt(0) === 58 ? "center" : "right") : m.charCodeAt(0) === 58 ? l.push("left") : l.push("");
|
|
2110
2092
|
}
|
|
2111
2093
|
if (a = xe(u, e).trim(), a.indexOf("|") === -1 || u.sCount[e] - u.blkIndent >= 4)
|
|
2112
2094
|
return !1;
|
|
@@ -2116,7 +2098,7 @@ function Kn(u, e, t, n) {
|
|
|
2116
2098
|
return !1;
|
|
2117
2099
|
if (n)
|
|
2118
2100
|
return !0;
|
|
2119
|
-
const
|
|
2101
|
+
const _ = u.parentType;
|
|
2120
2102
|
u.parentType = "table";
|
|
2121
2103
|
const h = u.md.block.ruler.getRules("blockquote"), d = u.push("table_open", "table", 1), y = [e, 0];
|
|
2122
2104
|
d.map = y;
|
|
@@ -2124,38 +2106,38 @@ function Kn(u, e, t, n) {
|
|
|
2124
2106
|
v.map = [e, e + 1];
|
|
2125
2107
|
const C = u.push("tr_open", "tr", 1);
|
|
2126
2108
|
C.map = [e, e + 1];
|
|
2127
|
-
for (let
|
|
2128
|
-
const
|
|
2129
|
-
l[
|
|
2109
|
+
for (let b = 0; b < s.length; b++) {
|
|
2110
|
+
const m = u.push("th_open", "th", 1);
|
|
2111
|
+
l[b] && (m.attrs = [["style", "text-align:" + l[b]]]);
|
|
2130
2112
|
const O = u.push("inline", "", 0);
|
|
2131
|
-
O.content = s[
|
|
2113
|
+
O.content = s[b].trim(), O.children = [], u.push("th_close", "th", -1);
|
|
2132
2114
|
}
|
|
2133
2115
|
u.push("tr_close", "tr", -1), u.push("thead_close", "thead", -1);
|
|
2134
|
-
let k,
|
|
2116
|
+
let k, p = 0;
|
|
2135
2117
|
for (r = e + 2; r < t && !(u.sCount[r] < u.blkIndent); r++) {
|
|
2136
|
-
let
|
|
2137
|
-
for (let O = 0,
|
|
2118
|
+
let b = !1;
|
|
2119
|
+
for (let O = 0, E = h.length; O < E; O++)
|
|
2138
2120
|
if (h[O](u, r, t, !0)) {
|
|
2139
|
-
|
|
2121
|
+
b = !0;
|
|
2140
2122
|
break;
|
|
2141
2123
|
}
|
|
2142
|
-
if (
|
|
2124
|
+
if (b || (a = xe(u, r).trim(), !a) || u.sCount[r] - u.blkIndent >= 4 || (s = Qe(a), s.length && s[0] === "" && s.shift(), s.length && s[s.length - 1] === "" && s.pop(), p += f - s.length, p > Gn))
|
|
2143
2125
|
break;
|
|
2144
2126
|
if (r === e + 2) {
|
|
2145
2127
|
const O = u.push("tbody_open", "tbody", 1);
|
|
2146
2128
|
O.map = k = [e + 2, 0];
|
|
2147
2129
|
}
|
|
2148
|
-
const
|
|
2149
|
-
|
|
2130
|
+
const m = u.push("tr_open", "tr", 1);
|
|
2131
|
+
m.map = [r, r + 1];
|
|
2150
2132
|
for (let O = 0; O < f; O++) {
|
|
2151
|
-
const
|
|
2152
|
-
l[O] && (
|
|
2133
|
+
const E = u.push("td_open", "td", 1);
|
|
2134
|
+
l[O] && (E.attrs = [["style", "text-align:" + l[O]]]);
|
|
2153
2135
|
const P = u.push("inline", "", 0);
|
|
2154
2136
|
P.content = s[O] ? s[O].trim() : "", P.children = [], u.push("td_close", "td", -1);
|
|
2155
2137
|
}
|
|
2156
2138
|
u.push("tr_close", "tr", -1);
|
|
2157
2139
|
}
|
|
2158
|
-
return k && (u.push("tbody_close", "tbody", -1), k[1] = r), u.push("table_close", "table", -1), y[1] = r, u.parentType =
|
|
2140
|
+
return k && (u.push("tbody_close", "tbody", -1), k[1] = r), u.push("table_close", "table", -1), y[1] = r, u.parentType = _, u.line = r, !0;
|
|
2159
2141
|
}
|
|
2160
2142
|
function Jn(u, e, t) {
|
|
2161
2143
|
if (u.sCount[e] - u.blkIndent < 4)
|
|
@@ -2173,79 +2155,79 @@ function Jn(u, e, t) {
|
|
|
2173
2155
|
break;
|
|
2174
2156
|
}
|
|
2175
2157
|
u.line = r;
|
|
2176
|
-
const
|
|
2177
|
-
return
|
|
2178
|
-
`,
|
|
2158
|
+
const o = u.push("code_block", "code", 0);
|
|
2159
|
+
return o.content = u.getLines(e, r, 4 + u.blkIndent, !1) + `
|
|
2160
|
+
`, o.map = [e, u.line], !0;
|
|
2179
2161
|
}
|
|
2180
2162
|
function Qn(u, e, t, n) {
|
|
2181
|
-
let r = u.bMarks[e] + u.tShift[e],
|
|
2182
|
-
if (u.sCount[e] - u.blkIndent >= 4 || r + 3 >
|
|
2163
|
+
let r = u.bMarks[e] + u.tShift[e], o = u.eMarks[e];
|
|
2164
|
+
if (u.sCount[e] - u.blkIndent >= 4 || r + 3 > o)
|
|
2183
2165
|
return !1;
|
|
2184
2166
|
const c = u.src.charCodeAt(r);
|
|
2185
2167
|
if (c !== 126 && c !== 96)
|
|
2186
2168
|
return !1;
|
|
2187
|
-
let
|
|
2169
|
+
let i = r;
|
|
2188
2170
|
r = u.skipChars(r, c);
|
|
2189
|
-
let a = r -
|
|
2171
|
+
let a = r - i;
|
|
2190
2172
|
if (a < 3)
|
|
2191
2173
|
return !1;
|
|
2192
|
-
const s = u.src.slice(
|
|
2174
|
+
const s = u.src.slice(i, r), l = u.src.slice(r, o);
|
|
2193
2175
|
if (c === 96 && l.indexOf(String.fromCharCode(c)) >= 0)
|
|
2194
2176
|
return !1;
|
|
2195
2177
|
if (n)
|
|
2196
2178
|
return !0;
|
|
2197
|
-
let f = e,
|
|
2198
|
-
for (; f++, !(f >= t || (r =
|
|
2199
|
-
if (u.src.charCodeAt(r) === c && !(u.sCount[f] - u.blkIndent >= 4) && (r = u.skipChars(r, c), !(r -
|
|
2200
|
-
|
|
2179
|
+
let f = e, _ = !1;
|
|
2180
|
+
for (; f++, !(f >= t || (r = i = u.bMarks[f] + u.tShift[f], o = u.eMarks[f], r < o && u.sCount[f] < u.blkIndent)); )
|
|
2181
|
+
if (u.src.charCodeAt(r) === c && !(u.sCount[f] - u.blkIndent >= 4) && (r = u.skipChars(r, c), !(r - i < a) && (r = u.skipSpaces(r), !(r < o)))) {
|
|
2182
|
+
_ = !0;
|
|
2201
2183
|
break;
|
|
2202
2184
|
}
|
|
2203
|
-
a = u.sCount[e], u.line = f + (
|
|
2185
|
+
a = u.sCount[e], u.line = f + (_ ? 1 : 0);
|
|
2204
2186
|
const h = u.push("fence", "code", 0);
|
|
2205
2187
|
return h.info = l, h.content = u.getLines(e + 1, f, a, !0), h.markup = s, h.map = [e, u.line], !0;
|
|
2206
2188
|
}
|
|
2207
2189
|
function Wn(u, e, t, n) {
|
|
2208
|
-
let r = u.bMarks[e] + u.tShift[e],
|
|
2190
|
+
let r = u.bMarks[e] + u.tShift[e], o = u.eMarks[e];
|
|
2209
2191
|
const c = u.lineMax;
|
|
2210
2192
|
if (u.sCount[e] - u.blkIndent >= 4 || u.src.charCodeAt(r) !== 62)
|
|
2211
2193
|
return !1;
|
|
2212
2194
|
if (n)
|
|
2213
2195
|
return !0;
|
|
2214
|
-
const
|
|
2196
|
+
const i = [], a = [], s = [], l = [], f = u.md.block.ruler.getRules("blockquote"), _ = u.parentType;
|
|
2215
2197
|
u.parentType = "blockquote";
|
|
2216
2198
|
let h = !1, d;
|
|
2217
2199
|
for (d = e; d < t; d++) {
|
|
2218
|
-
const
|
|
2219
|
-
if (r = u.bMarks[d] + u.tShift[d],
|
|
2200
|
+
const p = u.sCount[d] < u.blkIndent;
|
|
2201
|
+
if (r = u.bMarks[d] + u.tShift[d], o = u.eMarks[d], r >= o)
|
|
2220
2202
|
break;
|
|
2221
|
-
if (u.src.charCodeAt(r++) === 62 && !
|
|
2222
|
-
let
|
|
2223
|
-
u.src.charCodeAt(r) === 32 ? (r++,
|
|
2224
|
-
let P =
|
|
2225
|
-
for (
|
|
2203
|
+
if (u.src.charCodeAt(r++) === 62 && !p) {
|
|
2204
|
+
let m = u.sCount[d] + 1, O, E;
|
|
2205
|
+
u.src.charCodeAt(r) === 32 ? (r++, m++, E = !1, O = !0) : u.src.charCodeAt(r) === 9 ? (O = !0, (u.bsCount[d] + m) % 4 === 3 ? (r++, m++, E = !1) : E = !0) : O = !1;
|
|
2206
|
+
let P = m;
|
|
2207
|
+
for (i.push(u.bMarks[d]), u.bMarks[d] = r; r < o; ) {
|
|
2226
2208
|
const j = u.src.charCodeAt(r);
|
|
2227
2209
|
if (Z(j))
|
|
2228
|
-
j === 9 ? P += 4 - (P + u.bsCount[d] + (
|
|
2210
|
+
j === 9 ? P += 4 - (P + u.bsCount[d] + (E ? 1 : 0)) % 4 : P++;
|
|
2229
2211
|
else
|
|
2230
2212
|
break;
|
|
2231
2213
|
r++;
|
|
2232
2214
|
}
|
|
2233
|
-
h = r >=
|
|
2215
|
+
h = r >= o, a.push(u.bsCount[d]), u.bsCount[d] = u.sCount[d] + 1 + (O ? 1 : 0), s.push(u.sCount[d]), u.sCount[d] = P - m, l.push(u.tShift[d]), u.tShift[d] = r - u.bMarks[d];
|
|
2234
2216
|
continue;
|
|
2235
2217
|
}
|
|
2236
2218
|
if (h)
|
|
2237
2219
|
break;
|
|
2238
|
-
let
|
|
2239
|
-
for (let
|
|
2240
|
-
if (f[
|
|
2241
|
-
|
|
2220
|
+
let b = !1;
|
|
2221
|
+
for (let m = 0, O = f.length; m < O; m++)
|
|
2222
|
+
if (f[m](u, d, t, !0)) {
|
|
2223
|
+
b = !0;
|
|
2242
2224
|
break;
|
|
2243
2225
|
}
|
|
2244
|
-
if (
|
|
2245
|
-
u.lineMax = d, u.blkIndent !== 0 && (
|
|
2226
|
+
if (b) {
|
|
2227
|
+
u.lineMax = d, u.blkIndent !== 0 && (i.push(u.bMarks[d]), a.push(u.bsCount[d]), l.push(u.tShift[d]), s.push(u.sCount[d]), u.sCount[d] -= u.blkIndent);
|
|
2246
2228
|
break;
|
|
2247
2229
|
}
|
|
2248
|
-
|
|
2230
|
+
i.push(u.bMarks[d]), a.push(u.bsCount[d]), l.push(u.tShift[d]), s.push(u.sCount[d]), u.sCount[d] = -1;
|
|
2249
2231
|
}
|
|
2250
2232
|
const y = u.blkIndent;
|
|
2251
2233
|
u.blkIndent = 0;
|
|
@@ -2254,33 +2236,33 @@ function Wn(u, e, t, n) {
|
|
|
2254
2236
|
const C = [e, 0];
|
|
2255
2237
|
v.map = C, u.md.block.tokenize(u, e, d);
|
|
2256
2238
|
const k = u.push("blockquote_close", "blockquote", -1);
|
|
2257
|
-
k.markup = ">", u.lineMax = c, u.parentType =
|
|
2258
|
-
for (let
|
|
2259
|
-
u.bMarks[
|
|
2239
|
+
k.markup = ">", u.lineMax = c, u.parentType = _, C[1] = u.line;
|
|
2240
|
+
for (let p = 0; p < l.length; p++)
|
|
2241
|
+
u.bMarks[p + e] = i[p], u.tShift[p + e] = l[p], u.sCount[p + e] = s[p], u.bsCount[p + e] = a[p];
|
|
2260
2242
|
return u.blkIndent = y, !0;
|
|
2261
2243
|
}
|
|
2262
2244
|
function Xn(u, e, t, n) {
|
|
2263
2245
|
const r = u.eMarks[e];
|
|
2264
2246
|
if (u.sCount[e] - u.blkIndent >= 4)
|
|
2265
2247
|
return !1;
|
|
2266
|
-
let
|
|
2267
|
-
const c = u.src.charCodeAt(
|
|
2248
|
+
let o = u.bMarks[e] + u.tShift[e];
|
|
2249
|
+
const c = u.src.charCodeAt(o++);
|
|
2268
2250
|
if (c !== 42 && c !== 45 && c !== 95)
|
|
2269
2251
|
return !1;
|
|
2270
|
-
let
|
|
2271
|
-
for (;
|
|
2272
|
-
const s = u.src.charCodeAt(
|
|
2252
|
+
let i = 1;
|
|
2253
|
+
for (; o < r; ) {
|
|
2254
|
+
const s = u.src.charCodeAt(o++);
|
|
2273
2255
|
if (s !== c && !Z(s))
|
|
2274
2256
|
return !1;
|
|
2275
|
-
s === c &&
|
|
2257
|
+
s === c && i++;
|
|
2276
2258
|
}
|
|
2277
|
-
if (
|
|
2259
|
+
if (i < 3)
|
|
2278
2260
|
return !1;
|
|
2279
2261
|
if (n)
|
|
2280
2262
|
return !0;
|
|
2281
2263
|
u.line = e + 1;
|
|
2282
2264
|
const a = u.push("hr", "hr", 0);
|
|
2283
|
-
return a.map = [e, u.line], a.markup = Array(
|
|
2265
|
+
return a.map = [e, u.line], a.markup = Array(i + 1).join(String.fromCharCode(c)), !0;
|
|
2284
2266
|
}
|
|
2285
2267
|
function We(u, e) {
|
|
2286
2268
|
const t = u.eMarks[e];
|
|
@@ -2289,8 +2271,8 @@ function We(u, e) {
|
|
|
2289
2271
|
if (r !== 42 && r !== 45 && r !== 43)
|
|
2290
2272
|
return -1;
|
|
2291
2273
|
if (n < t) {
|
|
2292
|
-
const
|
|
2293
|
-
if (!Z(
|
|
2274
|
+
const o = u.src.charCodeAt(n);
|
|
2275
|
+
if (!Z(o))
|
|
2294
2276
|
return -1;
|
|
2295
2277
|
}
|
|
2296
2278
|
return n;
|
|
@@ -2300,22 +2282,22 @@ function Xe(u, e) {
|
|
|
2300
2282
|
let r = t;
|
|
2301
2283
|
if (r + 1 >= n)
|
|
2302
2284
|
return -1;
|
|
2303
|
-
let
|
|
2304
|
-
if (
|
|
2285
|
+
let o = u.src.charCodeAt(r++);
|
|
2286
|
+
if (o < 48 || o > 57)
|
|
2305
2287
|
return -1;
|
|
2306
2288
|
for (; ; ) {
|
|
2307
2289
|
if (r >= n)
|
|
2308
2290
|
return -1;
|
|
2309
|
-
if (
|
|
2291
|
+
if (o = u.src.charCodeAt(r++), o >= 48 && o <= 57) {
|
|
2310
2292
|
if (r - t >= 10)
|
|
2311
2293
|
return -1;
|
|
2312
2294
|
continue;
|
|
2313
2295
|
}
|
|
2314
|
-
if (
|
|
2296
|
+
if (o === 41 || o === 46)
|
|
2315
2297
|
break;
|
|
2316
2298
|
return -1;
|
|
2317
2299
|
}
|
|
2318
|
-
return r < n && (
|
|
2300
|
+
return r < n && (o = u.src.charCodeAt(r), !Z(o)) ? -1 : r;
|
|
2319
2301
|
}
|
|
2320
2302
|
function Yn(u, e) {
|
|
2321
2303
|
const t = u.level + 2;
|
|
@@ -2323,14 +2305,14 @@ function Yn(u, e) {
|
|
|
2323
2305
|
u.tokens[n].level === t && u.tokens[n].type === "paragraph_open" && (u.tokens[n + 2].hidden = !0, u.tokens[n].hidden = !0, n += 2);
|
|
2324
2306
|
}
|
|
2325
2307
|
function ur(u, e, t, n) {
|
|
2326
|
-
let r,
|
|
2308
|
+
let r, o, c, i, a = e, s = !0;
|
|
2327
2309
|
if (u.sCount[a] - u.blkIndent >= 4 || u.listIndent >= 0 && u.sCount[a] - u.listIndent >= 4 && u.sCount[a] < u.blkIndent)
|
|
2328
2310
|
return !1;
|
|
2329
2311
|
let l = !1;
|
|
2330
2312
|
n && u.parentType === "paragraph" && u.sCount[a] >= u.blkIndent && (l = !0);
|
|
2331
|
-
let f,
|
|
2313
|
+
let f, _, h;
|
|
2332
2314
|
if ((h = Xe(u, a)) >= 0) {
|
|
2333
|
-
if (f = !0, c = u.bMarks[a] + u.tShift[a],
|
|
2315
|
+
if (f = !0, c = u.bMarks[a] + u.tShift[a], _ = Number(u.src.slice(c, h - 1)), l && _ !== 1) return !1;
|
|
2334
2316
|
} else if ((h = We(u, a)) >= 0)
|
|
2335
2317
|
f = !1;
|
|
2336
2318
|
else
|
|
@@ -2340,34 +2322,34 @@ function ur(u, e, t, n) {
|
|
|
2340
2322
|
if (n)
|
|
2341
2323
|
return !0;
|
|
2342
2324
|
const d = u.src.charCodeAt(h - 1), y = u.tokens.length;
|
|
2343
|
-
f ? (
|
|
2325
|
+
f ? (i = u.push("ordered_list_open", "ol", 1), _ !== 1 && (i.attrs = [["start", _]])) : i = u.push("bullet_list_open", "ul", 1);
|
|
2344
2326
|
const v = [a, 0];
|
|
2345
|
-
|
|
2327
|
+
i.map = v, i.markup = String.fromCharCode(d);
|
|
2346
2328
|
let C = !1;
|
|
2347
|
-
const k = u.md.block.ruler.getRules("list"),
|
|
2329
|
+
const k = u.md.block.ruler.getRules("list"), p = u.parentType;
|
|
2348
2330
|
for (u.parentType = "list"; a < t; ) {
|
|
2349
|
-
|
|
2350
|
-
const
|
|
2351
|
-
let
|
|
2352
|
-
for (;
|
|
2353
|
-
const fu = u.src.charCodeAt(
|
|
2331
|
+
o = h, r = u.eMarks[a];
|
|
2332
|
+
const b = u.sCount[a] + h - (u.bMarks[a] + u.tShift[a]);
|
|
2333
|
+
let m = b;
|
|
2334
|
+
for (; o < r; ) {
|
|
2335
|
+
const fu = u.src.charCodeAt(o);
|
|
2354
2336
|
if (fu === 9)
|
|
2355
|
-
|
|
2337
|
+
m += 4 - (m + u.bsCount[a]) % 4;
|
|
2356
2338
|
else if (fu === 32)
|
|
2357
|
-
|
|
2339
|
+
m++;
|
|
2358
2340
|
else
|
|
2359
2341
|
break;
|
|
2360
|
-
|
|
2342
|
+
o++;
|
|
2361
2343
|
}
|
|
2362
|
-
const O =
|
|
2363
|
-
let
|
|
2364
|
-
O >= r ?
|
|
2365
|
-
const P =
|
|
2366
|
-
|
|
2344
|
+
const O = o;
|
|
2345
|
+
let E;
|
|
2346
|
+
O >= r ? E = 1 : E = m - b, E > 4 && (E = 1);
|
|
2347
|
+
const P = b + E;
|
|
2348
|
+
i = u.push("list_item_open", "li", 1), i.markup = String.fromCharCode(d);
|
|
2367
2349
|
const j = [a, 0];
|
|
2368
|
-
|
|
2350
|
+
i.map = j, f && (i.info = u.src.slice(c, h - 1));
|
|
2369
2351
|
const K = u.tight, du = u.tShift[a], _u = u.sCount[a], gu = u.listIndent;
|
|
2370
|
-
if (u.listIndent = u.blkIndent, u.blkIndent = P, u.tight = !0, u.tShift[a] = O - u.bMarks[a], u.sCount[a] =
|
|
2352
|
+
if (u.listIndent = u.blkIndent, u.blkIndent = P, u.tight = !0, u.tShift[a] = O - u.bMarks[a], u.sCount[a] = m, O >= r && u.isEmpty(a + 1) ? u.line = Math.min(u.line + 2, t) : u.md.block.tokenize(u, a, t, !0), (!u.tight || C) && (s = !1), C = u.line - a > 1 && u.isEmpty(u.line - 1), u.blkIndent = u.listIndent, u.listIndent = gu, u.tShift[a] = du, u.sCount[a] = _u, u.tight = K, i = u.push("list_item_close", "li", -1), i.markup = String.fromCharCode(d), a = u.line, j[1] = a, a >= t || u.sCount[a] < u.blkIndent || u.sCount[a] - u.blkIndent >= 4)
|
|
2371
2353
|
break;
|
|
2372
2354
|
let wu = !1;
|
|
2373
2355
|
for (let fu = 0, Su = k.length; fu < Su; fu++)
|
|
@@ -2386,36 +2368,36 @@ function ur(u, e, t, n) {
|
|
|
2386
2368
|
if (d !== u.src.charCodeAt(h - 1))
|
|
2387
2369
|
break;
|
|
2388
2370
|
}
|
|
2389
|
-
return f ?
|
|
2371
|
+
return f ? i = u.push("ordered_list_close", "ol", -1) : i = u.push("bullet_list_close", "ul", -1), i.markup = String.fromCharCode(d), v[1] = a, u.line = a, u.parentType = p, s && Yn(u, y), !0;
|
|
2390
2372
|
}
|
|
2391
2373
|
function er(u, e, t, n) {
|
|
2392
|
-
let r = u.bMarks[e] + u.tShift[e],
|
|
2374
|
+
let r = u.bMarks[e] + u.tShift[e], o = u.eMarks[e], c = e + 1;
|
|
2393
2375
|
if (u.sCount[e] - u.blkIndent >= 4 || u.src.charCodeAt(r) !== 91)
|
|
2394
2376
|
return !1;
|
|
2395
|
-
function
|
|
2396
|
-
const
|
|
2397
|
-
if (k >=
|
|
2377
|
+
function i(k) {
|
|
2378
|
+
const p = u.lineMax;
|
|
2379
|
+
if (k >= p || u.isEmpty(k))
|
|
2398
2380
|
return null;
|
|
2399
|
-
let
|
|
2400
|
-
if (u.sCount[k] - u.blkIndent > 3 && (
|
|
2401
|
-
const
|
|
2381
|
+
let b = !1;
|
|
2382
|
+
if (u.sCount[k] - u.blkIndent > 3 && (b = !0), u.sCount[k] < 0 && (b = !0), !b) {
|
|
2383
|
+
const E = u.md.block.ruler.getRules("reference"), P = u.parentType;
|
|
2402
2384
|
u.parentType = "reference";
|
|
2403
2385
|
let j = !1;
|
|
2404
|
-
for (let K = 0, du =
|
|
2405
|
-
if (
|
|
2386
|
+
for (let K = 0, du = E.length; K < du; K++)
|
|
2387
|
+
if (E[K](u, k, p, !0)) {
|
|
2406
2388
|
j = !0;
|
|
2407
2389
|
break;
|
|
2408
2390
|
}
|
|
2409
2391
|
if (u.parentType = P, j)
|
|
2410
2392
|
return null;
|
|
2411
2393
|
}
|
|
2412
|
-
const
|
|
2413
|
-
return u.src.slice(
|
|
2394
|
+
const m = u.bMarks[k] + u.tShift[k], O = u.eMarks[k];
|
|
2395
|
+
return u.src.slice(m, O + 1);
|
|
2414
2396
|
}
|
|
2415
|
-
let a = u.src.slice(r,
|
|
2416
|
-
|
|
2397
|
+
let a = u.src.slice(r, o + 1);
|
|
2398
|
+
o = a.length;
|
|
2417
2399
|
let s = -1;
|
|
2418
|
-
for (r = 1; r <
|
|
2400
|
+
for (r = 1; r < o; r++) {
|
|
2419
2401
|
const k = a.charCodeAt(r);
|
|
2420
2402
|
if (k === 91)
|
|
2421
2403
|
return !1;
|
|
@@ -2423,58 +2405,58 @@ function er(u, e, t, n) {
|
|
|
2423
2405
|
s = r;
|
|
2424
2406
|
break;
|
|
2425
2407
|
} else if (k === 10) {
|
|
2426
|
-
const
|
|
2427
|
-
|
|
2428
|
-
} else if (k === 92 && (r++, r <
|
|
2429
|
-
const
|
|
2430
|
-
|
|
2408
|
+
const p = i(c);
|
|
2409
|
+
p !== null && (a += p, o = a.length, c++);
|
|
2410
|
+
} else if (k === 92 && (r++, r < o && a.charCodeAt(r) === 10)) {
|
|
2411
|
+
const p = i(c);
|
|
2412
|
+
p !== null && (a += p, o = a.length, c++);
|
|
2431
2413
|
}
|
|
2432
2414
|
}
|
|
2433
2415
|
if (s < 0 || a.charCodeAt(s + 1) !== 58)
|
|
2434
2416
|
return !1;
|
|
2435
|
-
for (r = s + 2; r <
|
|
2417
|
+
for (r = s + 2; r < o; r++) {
|
|
2436
2418
|
const k = a.charCodeAt(r);
|
|
2437
2419
|
if (k === 10) {
|
|
2438
|
-
const
|
|
2439
|
-
|
|
2420
|
+
const p = i(c);
|
|
2421
|
+
p !== null && (a += p, o = a.length, c++);
|
|
2440
2422
|
} else if (!Z(k)) break;
|
|
2441
2423
|
}
|
|
2442
|
-
const l = u.md.helpers.parseLinkDestination(a, r,
|
|
2424
|
+
const l = u.md.helpers.parseLinkDestination(a, r, o);
|
|
2443
2425
|
if (!l.ok)
|
|
2444
2426
|
return !1;
|
|
2445
2427
|
const f = u.md.normalizeLink(l.str);
|
|
2446
2428
|
if (!u.md.validateLink(f))
|
|
2447
2429
|
return !1;
|
|
2448
2430
|
r = l.pos;
|
|
2449
|
-
const
|
|
2450
|
-
for (; r <
|
|
2431
|
+
const _ = r, h = c, d = r;
|
|
2432
|
+
for (; r < o; r++) {
|
|
2451
2433
|
const k = a.charCodeAt(r);
|
|
2452
2434
|
if (k === 10) {
|
|
2453
|
-
const
|
|
2454
|
-
|
|
2435
|
+
const p = i(c);
|
|
2436
|
+
p !== null && (a += p, o = a.length, c++);
|
|
2455
2437
|
} else if (!Z(k)) break;
|
|
2456
2438
|
}
|
|
2457
|
-
let y = u.md.helpers.parseLinkTitle(a, r,
|
|
2439
|
+
let y = u.md.helpers.parseLinkTitle(a, r, o);
|
|
2458
2440
|
for (; y.can_continue; ) {
|
|
2459
|
-
const k =
|
|
2441
|
+
const k = i(c);
|
|
2460
2442
|
if (k === null) break;
|
|
2461
|
-
a += k, r =
|
|
2443
|
+
a += k, r = o, o = a.length, c++, y = u.md.helpers.parseLinkTitle(a, r, o, y);
|
|
2462
2444
|
}
|
|
2463
2445
|
let v;
|
|
2464
|
-
for (r <
|
|
2446
|
+
for (r < o && d !== r && y.ok ? (v = y.str, r = y.pos) : (v = "", r = _, c = h); r < o; ) {
|
|
2465
2447
|
const k = a.charCodeAt(r);
|
|
2466
2448
|
if (!Z(k))
|
|
2467
2449
|
break;
|
|
2468
2450
|
r++;
|
|
2469
2451
|
}
|
|
2470
|
-
if (r <
|
|
2471
|
-
for (v = "", r =
|
|
2452
|
+
if (r < o && a.charCodeAt(r) !== 10 && v)
|
|
2453
|
+
for (v = "", r = _, c = h; r < o; ) {
|
|
2472
2454
|
const k = a.charCodeAt(r);
|
|
2473
2455
|
if (!Z(k))
|
|
2474
2456
|
break;
|
|
2475
2457
|
r++;
|
|
2476
2458
|
}
|
|
2477
|
-
if (r <
|
|
2459
|
+
if (r < o && a.charCodeAt(r) !== 10)
|
|
2478
2460
|
return !1;
|
|
2479
2461
|
const C = se(a.slice(1, s));
|
|
2480
2462
|
return C ? (n || (typeof u.env.references > "u" && (u.env.references = {}), typeof u.env.references[C] > "u" && (u.env.references[C] = { title: v, href: f }), u.line = c), !0) : !1;
|
|
@@ -2542,7 +2524,7 @@ const tr = [
|
|
|
2542
2524
|
"tr",
|
|
2543
2525
|
"track",
|
|
2544
2526
|
"ul"
|
|
2545
|
-
], nr = "[a-zA-Z_:][a-zA-Z0-9:._-]*", rr = "[^\"'=<>`\\x00-\\x20]+",
|
|
2527
|
+
], nr = "[a-zA-Z_:][a-zA-Z0-9:._-]*", rr = "[^\"'=<>`\\x00-\\x20]+", or = "'[^']*'", ir = '"[^"]*"', cr = "(?:" + rr + "|" + or + "|" + ir + ")", ar = "(?:\\s+" + nr + "(?:\\s*=\\s*" + cr + ")?)", It = "<[A-Za-z][A-Za-z0-9\\-]*" + ar + "*\\s*\\/?>", Tt = "<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>", sr = "<!---?>|<!--(?:[^-]|-[^-]|--[^>])*-->", lr = "<[?][\\s\\S]*?[?]>", dr = "<![A-Za-z][^>]*>", fr = "<!\\[CDATA\\[[\\s\\S]*?\\]\\]>", hr = new RegExp("^(?:" + It + "|" + Tt + "|" + sr + "|" + lr + "|" + dr + "|" + fr + ")"), pr = new RegExp("^(?:" + It + "|" + Tt + ")"), Mu = [
|
|
2546
2528
|
[/^<(script|pre|style|textarea)(?=(\s|>|$))/i, /<\/(script|pre|style|textarea)>/i, !0],
|
|
2547
2529
|
[/^<!--/, /-->/, !0],
|
|
2548
2530
|
[/^<\?/, /\?>/, !0],
|
|
@@ -2552,20 +2534,20 @@ const tr = [
|
|
|
2552
2534
|
[new RegExp(pr.source + "\\s*$"), /^$/, !1]
|
|
2553
2535
|
];
|
|
2554
2536
|
function br(u, e, t, n) {
|
|
2555
|
-
let r = u.bMarks[e] + u.tShift[e],
|
|
2537
|
+
let r = u.bMarks[e] + u.tShift[e], o = u.eMarks[e];
|
|
2556
2538
|
if (u.sCount[e] - u.blkIndent >= 4 || !u.md.options.html || u.src.charCodeAt(r) !== 60)
|
|
2557
2539
|
return !1;
|
|
2558
|
-
let c = u.src.slice(r,
|
|
2559
|
-
for (;
|
|
2540
|
+
let c = u.src.slice(r, o), i = 0;
|
|
2541
|
+
for (; i < Mu.length && !Mu[i][0].test(c); i++)
|
|
2560
2542
|
;
|
|
2561
|
-
if (
|
|
2543
|
+
if (i === Mu.length)
|
|
2562
2544
|
return !1;
|
|
2563
2545
|
if (n)
|
|
2564
|
-
return Mu[
|
|
2546
|
+
return Mu[i][2];
|
|
2565
2547
|
let a = e + 1;
|
|
2566
|
-
if (!Mu[
|
|
2548
|
+
if (!Mu[i][1].test(c)) {
|
|
2567
2549
|
for (; a < t && !(u.sCount[a] < u.blkIndent); a++)
|
|
2568
|
-
if (r = u.bMarks[a] + u.tShift[a],
|
|
2550
|
+
if (r = u.bMarks[a] + u.tShift[a], o = u.eMarks[a], c = u.src.slice(r, o), Mu[i][1].test(c)) {
|
|
2569
2551
|
c.length !== 0 && a++;
|
|
2570
2552
|
break;
|
|
2571
2553
|
}
|
|
@@ -2575,28 +2557,28 @@ function br(u, e, t, n) {
|
|
|
2575
2557
|
return s.map = [e, a], s.content = u.getLines(e, a, u.blkIndent, !0), !0;
|
|
2576
2558
|
}
|
|
2577
2559
|
function mr(u, e, t, n) {
|
|
2578
|
-
let r = u.bMarks[e] + u.tShift[e],
|
|
2560
|
+
let r = u.bMarks[e] + u.tShift[e], o = u.eMarks[e];
|
|
2579
2561
|
if (u.sCount[e] - u.blkIndent >= 4)
|
|
2580
2562
|
return !1;
|
|
2581
2563
|
let c = u.src.charCodeAt(r);
|
|
2582
|
-
if (c !== 35 || r >=
|
|
2564
|
+
if (c !== 35 || r >= o)
|
|
2583
2565
|
return !1;
|
|
2584
|
-
let
|
|
2585
|
-
for (c = u.src.charCodeAt(++r); c === 35 && r <
|
|
2586
|
-
|
|
2587
|
-
if (
|
|
2566
|
+
let i = 1;
|
|
2567
|
+
for (c = u.src.charCodeAt(++r); c === 35 && r < o && i <= 6; )
|
|
2568
|
+
i++, c = u.src.charCodeAt(++r);
|
|
2569
|
+
if (i > 6 || r < o && !Z(c))
|
|
2588
2570
|
return !1;
|
|
2589
2571
|
if (n)
|
|
2590
2572
|
return !0;
|
|
2591
|
-
|
|
2592
|
-
const a = u.skipCharsBack(
|
|
2593
|
-
a > r && Z(u.src.charCodeAt(a - 1)) && (
|
|
2594
|
-
const s = u.push("heading_open", "h" + String(
|
|
2595
|
-
s.markup = "########".slice(0,
|
|
2573
|
+
o = u.skipSpacesBack(o, r);
|
|
2574
|
+
const a = u.skipCharsBack(o, 35, r);
|
|
2575
|
+
a > r && Z(u.src.charCodeAt(a - 1)) && (o = a), u.line = e + 1;
|
|
2576
|
+
const s = u.push("heading_open", "h" + String(i), 1);
|
|
2577
|
+
s.markup = "########".slice(0, i), s.map = [e, u.line];
|
|
2596
2578
|
const l = u.push("inline", "", 0);
|
|
2597
|
-
l.content = u.src.slice(r,
|
|
2598
|
-
const f = u.push("heading_close", "h" + String(
|
|
2599
|
-
return f.markup = "########".slice(0,
|
|
2579
|
+
l.content = u.src.slice(r, o).trim(), l.map = [e, u.line], l.children = [];
|
|
2580
|
+
const f = u.push("heading_close", "h" + String(i), -1);
|
|
2581
|
+
return f.markup = "########".slice(0, i), !0;
|
|
2600
2582
|
}
|
|
2601
2583
|
function xr(u, e, t) {
|
|
2602
2584
|
const n = u.md.block.ruler.getRules("paragraph");
|
|
@@ -2604,59 +2586,59 @@ function xr(u, e, t) {
|
|
|
2604
2586
|
return !1;
|
|
2605
2587
|
const r = u.parentType;
|
|
2606
2588
|
u.parentType = "paragraph";
|
|
2607
|
-
let
|
|
2608
|
-
for (;
|
|
2609
|
-
if (u.sCount[
|
|
2589
|
+
let o = 0, c, i = e + 1;
|
|
2590
|
+
for (; i < t && !u.isEmpty(i); i++) {
|
|
2591
|
+
if (u.sCount[i] - u.blkIndent > 3)
|
|
2610
2592
|
continue;
|
|
2611
|
-
if (u.sCount[
|
|
2612
|
-
let h = u.bMarks[
|
|
2613
|
-
const d = u.eMarks[
|
|
2593
|
+
if (u.sCount[i] >= u.blkIndent) {
|
|
2594
|
+
let h = u.bMarks[i] + u.tShift[i];
|
|
2595
|
+
const d = u.eMarks[i];
|
|
2614
2596
|
if (h < d && (c = u.src.charCodeAt(h), (c === 45 || c === 61) && (h = u.skipChars(h, c), h = u.skipSpaces(h), h >= d))) {
|
|
2615
|
-
|
|
2597
|
+
o = c === 61 ? 1 : 2;
|
|
2616
2598
|
break;
|
|
2617
2599
|
}
|
|
2618
2600
|
}
|
|
2619
|
-
if (u.sCount[
|
|
2601
|
+
if (u.sCount[i] < 0)
|
|
2620
2602
|
continue;
|
|
2621
|
-
let
|
|
2603
|
+
let _ = !1;
|
|
2622
2604
|
for (let h = 0, d = n.length; h < d; h++)
|
|
2623
|
-
if (n[h](u,
|
|
2624
|
-
|
|
2605
|
+
if (n[h](u, i, t, !0)) {
|
|
2606
|
+
_ = !0;
|
|
2625
2607
|
break;
|
|
2626
2608
|
}
|
|
2627
|
-
if (
|
|
2609
|
+
if (_)
|
|
2628
2610
|
break;
|
|
2629
2611
|
}
|
|
2630
|
-
if (!
|
|
2612
|
+
if (!o)
|
|
2631
2613
|
return !1;
|
|
2632
|
-
const a = u.getLines(e,
|
|
2633
|
-
u.line =
|
|
2634
|
-
const s = u.push("heading_open", "h" + String(
|
|
2614
|
+
const a = u.getLines(e, i, u.blkIndent, !1).trim();
|
|
2615
|
+
u.line = i + 1;
|
|
2616
|
+
const s = u.push("heading_open", "h" + String(o), 1);
|
|
2635
2617
|
s.markup = String.fromCharCode(c), s.map = [e, u.line];
|
|
2636
2618
|
const l = u.push("inline", "", 0);
|
|
2637
2619
|
l.content = a, l.map = [e, u.line - 1], l.children = [];
|
|
2638
|
-
const f = u.push("heading_close", "h" + String(
|
|
2620
|
+
const f = u.push("heading_close", "h" + String(o), -1);
|
|
2639
2621
|
return f.markup = String.fromCharCode(c), u.parentType = r, !0;
|
|
2640
2622
|
}
|
|
2641
2623
|
function _r(u, e, t) {
|
|
2642
2624
|
const n = u.md.block.ruler.getRules("paragraph"), r = u.parentType;
|
|
2643
|
-
let
|
|
2644
|
-
for (u.parentType = "paragraph";
|
|
2645
|
-
if (u.sCount[
|
|
2625
|
+
let o = e + 1;
|
|
2626
|
+
for (u.parentType = "paragraph"; o < t && !u.isEmpty(o); o++) {
|
|
2627
|
+
if (u.sCount[o] - u.blkIndent > 3 || u.sCount[o] < 0)
|
|
2646
2628
|
continue;
|
|
2647
2629
|
let s = !1;
|
|
2648
2630
|
for (let l = 0, f = n.length; l < f; l++)
|
|
2649
|
-
if (n[l](u,
|
|
2631
|
+
if (n[l](u, o, t, !0)) {
|
|
2650
2632
|
s = !0;
|
|
2651
2633
|
break;
|
|
2652
2634
|
}
|
|
2653
2635
|
if (s)
|
|
2654
2636
|
break;
|
|
2655
2637
|
}
|
|
2656
|
-
const c = u.getLines(e,
|
|
2657
|
-
u.line =
|
|
2658
|
-
const
|
|
2659
|
-
|
|
2638
|
+
const c = u.getLines(e, o, u.blkIndent, !1).trim();
|
|
2639
|
+
u.line = o;
|
|
2640
|
+
const i = u.push("paragraph_open", "p", 1);
|
|
2641
|
+
i.map = [e, u.line];
|
|
2660
2642
|
const a = u.push("inline", "", 0);
|
|
2661
2643
|
return a.content = c, a.map = [e, u.line], a.children = [], u.push("paragraph_close", "p", -1), u.parentType = r, !0;
|
|
2662
2644
|
}
|
|
@@ -2681,10 +2663,10 @@ function le() {
|
|
|
2681
2663
|
this.ruler.push(te[u][0], te[u][1], { alt: (te[u][2] || []).slice() });
|
|
2682
2664
|
}
|
|
2683
2665
|
le.prototype.tokenize = function(u, e, t) {
|
|
2684
|
-
const n = this.ruler.getRules(""), r = n.length,
|
|
2685
|
-
let c = e,
|
|
2666
|
+
const n = this.ruler.getRules(""), r = n.length, o = u.md.options.maxNesting;
|
|
2667
|
+
let c = e, i = !1;
|
|
2686
2668
|
for (; c < t && (u.line = c = u.skipEmptyLines(c), !(c >= t || u.sCount[c] < u.blkIndent)); ) {
|
|
2687
|
-
if (u.level >=
|
|
2669
|
+
if (u.level >= o) {
|
|
2688
2670
|
u.line = t;
|
|
2689
2671
|
break;
|
|
2690
2672
|
}
|
|
@@ -2697,7 +2679,7 @@ le.prototype.tokenize = function(u, e, t) {
|
|
|
2697
2679
|
break;
|
|
2698
2680
|
}
|
|
2699
2681
|
if (!s) throw new Error("none of the block rules matched");
|
|
2700
|
-
u.tight = !
|
|
2682
|
+
u.tight = !i, u.isEmpty(u.line - 1) && (i = !0), c = u.line, c < t && u.isEmpty(c) && (i = !0, c++, u.line = c);
|
|
2701
2683
|
}
|
|
2702
2684
|
};
|
|
2703
2685
|
le.prototype.parse = function(u, e, t, n) {
|
|
@@ -2722,11 +2704,11 @@ Xu.prototype.push = function(u, e, t) {
|
|
|
2722
2704
|
};
|
|
2723
2705
|
Xu.prototype.scanDelims = function(u, e) {
|
|
2724
2706
|
const t = this.posMax, n = this.src.charCodeAt(u), r = u > 0 ? this.src.charCodeAt(u - 1) : 32;
|
|
2725
|
-
let
|
|
2726
|
-
for (;
|
|
2727
|
-
|
|
2728
|
-
const c =
|
|
2729
|
-
return { can_open:
|
|
2707
|
+
let o = u;
|
|
2708
|
+
for (; o < t && this.src.charCodeAt(o) === n; )
|
|
2709
|
+
o++;
|
|
2710
|
+
const c = o - u, i = o < t ? this.src.charCodeAt(o) : 32, a = Gu(r) || Zu(String.fromCharCode(r)), s = Gu(i) || Zu(String.fromCharCode(i)), l = Uu(r), f = Uu(i), _ = !f && (!s || l || a), h = !l && (!a || f || s);
|
|
2711
|
+
return { can_open: _ && (e || !h || a), can_close: h && (e || !_ || s), length: c };
|
|
2730
2712
|
};
|
|
2731
2713
|
Xu.prototype.Token = lu;
|
|
2732
2714
|
function gr(u) {
|
|
@@ -2772,23 +2754,23 @@ function yr(u, e) {
|
|
|
2772
2754
|
if (t + 3 > n || u.src.charCodeAt(t) !== 58 || u.src.charCodeAt(t + 1) !== 47 || u.src.charCodeAt(t + 2) !== 47) return !1;
|
|
2773
2755
|
const r = u.pending.match(vr);
|
|
2774
2756
|
if (!r) return !1;
|
|
2775
|
-
const
|
|
2757
|
+
const o = r[1], c = u.md.linkify.matchAtStart(u.src.slice(t - o.length));
|
|
2776
2758
|
if (!c) return !1;
|
|
2777
|
-
let
|
|
2778
|
-
if (
|
|
2779
|
-
|
|
2780
|
-
const a = u.md.normalizeLink(
|
|
2759
|
+
let i = c.url;
|
|
2760
|
+
if (i.length <= o.length) return !1;
|
|
2761
|
+
i = i.replace(/\*+$/, "");
|
|
2762
|
+
const a = u.md.normalizeLink(i);
|
|
2781
2763
|
if (!u.md.validateLink(a)) return !1;
|
|
2782
2764
|
if (!e) {
|
|
2783
|
-
u.pending = u.pending.slice(0, -
|
|
2765
|
+
u.pending = u.pending.slice(0, -o.length);
|
|
2784
2766
|
const s = u.push("link_open", "a", 1);
|
|
2785
2767
|
s.attrs = [["href", a]], s.markup = "linkify", s.info = "auto";
|
|
2786
2768
|
const l = u.push("text", "", 0);
|
|
2787
|
-
l.content = u.md.normalizeLinkText(
|
|
2769
|
+
l.content = u.md.normalizeLinkText(i);
|
|
2788
2770
|
const f = u.push("link_close", "a", -1);
|
|
2789
2771
|
f.markup = "linkify", f.info = "auto";
|
|
2790
2772
|
}
|
|
2791
|
-
return u.pos +=
|
|
2773
|
+
return u.pos += i.length - o.length, !0;
|
|
2792
2774
|
}
|
|
2793
2775
|
function Ar(u, e) {
|
|
2794
2776
|
let t = u.pos;
|
|
@@ -2798,9 +2780,9 @@ function Ar(u, e) {
|
|
|
2798
2780
|
if (!e)
|
|
2799
2781
|
if (n >= 0 && u.pending.charCodeAt(n) === 32)
|
|
2800
2782
|
if (n >= 1 && u.pending.charCodeAt(n - 1) === 32) {
|
|
2801
|
-
let
|
|
2802
|
-
for (;
|
|
2803
|
-
u.pending = u.pending.slice(0,
|
|
2783
|
+
let o = n - 1;
|
|
2784
|
+
for (; o >= 1 && u.pending.charCodeAt(o - 1) === 32; ) o--;
|
|
2785
|
+
u.pending = u.pending.slice(0, o), u.push("hardbreak", "br", 0);
|
|
2804
2786
|
} else
|
|
2805
2787
|
u.pending = u.pending.slice(0, -1), u.push("softbreak", "br", 0);
|
|
2806
2788
|
else
|
|
@@ -2825,15 +2807,15 @@ function Cr(u, e) {
|
|
|
2825
2807
|
t++;
|
|
2826
2808
|
return u.pos = t, !0;
|
|
2827
2809
|
}
|
|
2828
|
-
let
|
|
2810
|
+
let o = u.src[t];
|
|
2829
2811
|
if (r >= 55296 && r <= 56319 && t + 1 < n) {
|
|
2830
|
-
const
|
|
2831
|
-
|
|
2812
|
+
const i = u.src.charCodeAt(t + 1);
|
|
2813
|
+
i >= 56320 && i <= 57343 && (o += u.src[t + 1], t++);
|
|
2832
2814
|
}
|
|
2833
|
-
const c = "\\" +
|
|
2815
|
+
const c = "\\" + o;
|
|
2834
2816
|
if (!e) {
|
|
2835
|
-
const
|
|
2836
|
-
r < 256 && Le[r] !== 0 ?
|
|
2817
|
+
const i = u.push("text_special", "", 0);
|
|
2818
|
+
r < 256 && Le[r] !== 0 ? i.content = o : i.content = c, i.markup = c, i.info = "escape";
|
|
2837
2819
|
}
|
|
2838
2820
|
return u.pos = t + 1, !0;
|
|
2839
2821
|
}
|
|
@@ -2843,18 +2825,18 @@ function Dr(u, e) {
|
|
|
2843
2825
|
return !1;
|
|
2844
2826
|
const r = t;
|
|
2845
2827
|
t++;
|
|
2846
|
-
const
|
|
2847
|
-
for (; t <
|
|
2828
|
+
const o = u.posMax;
|
|
2829
|
+
for (; t < o && u.src.charCodeAt(t) === 96; )
|
|
2848
2830
|
t++;
|
|
2849
|
-
const c = u.src.slice(r, t),
|
|
2850
|
-
if (u.backticksScanned && (u.backticks[
|
|
2851
|
-
return e || (u.pending += c), u.pos +=
|
|
2831
|
+
const c = u.src.slice(r, t), i = c.length;
|
|
2832
|
+
if (u.backticksScanned && (u.backticks[i] || 0) <= r)
|
|
2833
|
+
return e || (u.pending += c), u.pos += i, !0;
|
|
2852
2834
|
let a = t, s;
|
|
2853
2835
|
for (; (s = u.src.indexOf("`", a)) !== -1; ) {
|
|
2854
|
-
for (a = s + 1; a <
|
|
2836
|
+
for (a = s + 1; a < o && u.src.charCodeAt(a) === 96; )
|
|
2855
2837
|
a++;
|
|
2856
2838
|
const l = a - s;
|
|
2857
|
-
if (l ===
|
|
2839
|
+
if (l === i) {
|
|
2858
2840
|
if (!e) {
|
|
2859
2841
|
const f = u.push("code_inline", "code", 0);
|
|
2860
2842
|
f.markup = c, f.content = u.src.slice(t, s).replace(/\n/g, " ").replace(/^ (.+) $/, "$1");
|
|
@@ -2863,21 +2845,21 @@ function Dr(u, e) {
|
|
|
2863
2845
|
}
|
|
2864
2846
|
u.backticks[l] = s;
|
|
2865
2847
|
}
|
|
2866
|
-
return u.backticksScanned = !0, e || (u.pending += c), u.pos +=
|
|
2848
|
+
return u.backticksScanned = !0, e || (u.pending += c), u.pos += i, !0;
|
|
2867
2849
|
}
|
|
2868
2850
|
function Er(u, e) {
|
|
2869
2851
|
const t = u.pos, n = u.src.charCodeAt(t);
|
|
2870
2852
|
if (e || n !== 126)
|
|
2871
2853
|
return !1;
|
|
2872
2854
|
const r = u.scanDelims(u.pos, !0);
|
|
2873
|
-
let
|
|
2855
|
+
let o = r.length;
|
|
2874
2856
|
const c = String.fromCharCode(n);
|
|
2875
|
-
if (
|
|
2857
|
+
if (o < 2)
|
|
2876
2858
|
return !1;
|
|
2877
|
-
let
|
|
2878
|
-
|
|
2879
|
-
for (let a = 0; a <
|
|
2880
|
-
|
|
2859
|
+
let i;
|
|
2860
|
+
o % 2 && (i = u.push("text", "", 0), i.content = c, o--);
|
|
2861
|
+
for (let a = 0; a < o; a += 2)
|
|
2862
|
+
i = u.push("text", "", 0), i.content = c + c, u.delimiters.push({
|
|
2881
2863
|
marker: n,
|
|
2882
2864
|
length: 0,
|
|
2883
2865
|
// disable "rule of 3" length checks meant for emphasis
|
|
@@ -2891,19 +2873,19 @@ function Er(u, e) {
|
|
|
2891
2873
|
function Ye(u, e) {
|
|
2892
2874
|
let t;
|
|
2893
2875
|
const n = [], r = e.length;
|
|
2894
|
-
for (let
|
|
2895
|
-
const c = e[
|
|
2876
|
+
for (let o = 0; o < r; o++) {
|
|
2877
|
+
const c = e[o];
|
|
2896
2878
|
if (c.marker !== 126 || c.end === -1)
|
|
2897
2879
|
continue;
|
|
2898
|
-
const
|
|
2899
|
-
t = u.tokens[c.token], t.type = "s_open", t.tag = "s", t.nesting = 1, t.markup = "~~", t.content = "", t = u.tokens[
|
|
2880
|
+
const i = e[c.end];
|
|
2881
|
+
t = u.tokens[c.token], t.type = "s_open", t.tag = "s", t.nesting = 1, t.markup = "~~", t.content = "", t = u.tokens[i.token], t.type = "s_close", t.tag = "s", t.nesting = -1, t.markup = "~~", t.content = "", u.tokens[i.token - 1].type === "text" && u.tokens[i.token - 1].content === "~" && n.push(i.token - 1);
|
|
2900
2882
|
}
|
|
2901
2883
|
for (; n.length; ) {
|
|
2902
|
-
const
|
|
2903
|
-
let c =
|
|
2884
|
+
const o = n.pop();
|
|
2885
|
+
let c = o + 1;
|
|
2904
2886
|
for (; c < u.tokens.length && u.tokens[c].type === "s_close"; )
|
|
2905
2887
|
c++;
|
|
2906
|
-
c--,
|
|
2888
|
+
c--, o !== c && (t = u.tokens[c], u.tokens[c] = u.tokens[o], u.tokens[o] = t);
|
|
2907
2889
|
}
|
|
2908
2890
|
}
|
|
2909
2891
|
function Fr(u) {
|
|
@@ -2921,7 +2903,7 @@ function wr(u, e) {
|
|
|
2921
2903
|
if (e || n !== 95 && n !== 42)
|
|
2922
2904
|
return !1;
|
|
2923
2905
|
const r = u.scanDelims(u.pos, n === 42);
|
|
2924
|
-
for (let
|
|
2906
|
+
for (let o = 0; o < r.length; o++) {
|
|
2925
2907
|
const c = u.push("text", "", 0);
|
|
2926
2908
|
c.content = String.fromCharCode(n), u.delimiters.push({
|
|
2927
2909
|
// Char code of the starting marker (number).
|
|
@@ -2952,12 +2934,12 @@ function ut(u, e) {
|
|
|
2952
2934
|
const r = e[n];
|
|
2953
2935
|
if (r.marker !== 95 && r.marker !== 42 || r.end === -1)
|
|
2954
2936
|
continue;
|
|
2955
|
-
const
|
|
2937
|
+
const o = e[r.end], c = n > 0 && e[n - 1].end === r.end + 1 && // check that first two markers match and adjacent
|
|
2956
2938
|
e[n - 1].marker === r.marker && e[n - 1].token === r.token - 1 && // check that last two markers are adjacent (we can safely assume they match)
|
|
2957
|
-
e[r.end + 1].token ===
|
|
2958
|
-
a.type = c ? "strong_open" : "em_open", a.tag = c ? "strong" : "em", a.nesting = 1, a.markup = c ?
|
|
2959
|
-
const s = u.tokens[
|
|
2960
|
-
s.type = c ? "strong_close" : "em_close", s.tag = c ? "strong" : "em", s.nesting = -1, s.markup = c ?
|
|
2939
|
+
e[r.end + 1].token === o.token + 1, i = String.fromCharCode(r.marker), a = u.tokens[r.token];
|
|
2940
|
+
a.type = c ? "strong_open" : "em_open", a.tag = c ? "strong" : "em", a.nesting = 1, a.markup = c ? i + i : i, a.content = "";
|
|
2941
|
+
const s = u.tokens[o.token];
|
|
2942
|
+
s.type = c ? "strong_close" : "em_close", s.tag = c ? "strong" : "em", s.nesting = -1, s.markup = c ? i + i : i, s.content = "", c && (u.tokens[e[n - 1].token].content = "", u.tokens[e[r.end + 1].token].content = "", n--);
|
|
2961
2943
|
}
|
|
2962
2944
|
}
|
|
2963
2945
|
function Sr(u) {
|
|
@@ -2971,10 +2953,10 @@ const Ot = {
|
|
|
2971
2953
|
postProcess: Sr
|
|
2972
2954
|
};
|
|
2973
2955
|
function zr(u, e) {
|
|
2974
|
-
let t, n, r,
|
|
2956
|
+
let t, n, r, o, c = "", i = "", a = u.pos, s = !0;
|
|
2975
2957
|
if (u.src.charCodeAt(u.pos) !== 91)
|
|
2976
2958
|
return !1;
|
|
2977
|
-
const l = u.pos, f = u.posMax,
|
|
2959
|
+
const l = u.pos, f = u.posMax, _ = u.pos + 1, h = u.md.helpers.parseLinkLabel(u, u.pos, !0);
|
|
2978
2960
|
if (h < 0)
|
|
2979
2961
|
return !1;
|
|
2980
2962
|
let d = h + 1;
|
|
@@ -2987,7 +2969,7 @@ function zr(u, e) {
|
|
|
2987
2969
|
for (c = u.md.normalizeLink(r.str), u.md.validateLink(c) ? d = r.pos : c = "", a = d; d < f && (t = u.src.charCodeAt(d), !(!Z(t) && t !== 10)); d++)
|
|
2988
2970
|
;
|
|
2989
2971
|
if (r = u.md.helpers.parseLinkTitle(u.src, d, u.posMax), d < f && a !== d && r.ok)
|
|
2990
|
-
for (
|
|
2972
|
+
for (i = r.str, d = r.pos; d < f && (t = u.src.charCodeAt(d), !(!Z(t) && t !== 10)); d++)
|
|
2991
2973
|
;
|
|
2992
2974
|
}
|
|
2993
2975
|
(d >= f || u.src.charCodeAt(d) !== 41) && (s = !0), d++;
|
|
@@ -2995,44 +2977,44 @@ function zr(u, e) {
|
|
|
2995
2977
|
if (s) {
|
|
2996
2978
|
if (typeof u.env.references > "u")
|
|
2997
2979
|
return !1;
|
|
2998
|
-
if (d < f && u.src.charCodeAt(d) === 91 ? (a = d + 1, d = u.md.helpers.parseLinkLabel(u, d), d >= 0 ? n = u.src.slice(a, d++) : d = h + 1) : d = h + 1, n || (n = u.src.slice(
|
|
2980
|
+
if (d < f && u.src.charCodeAt(d) === 91 ? (a = d + 1, d = u.md.helpers.parseLinkLabel(u, d), d >= 0 ? n = u.src.slice(a, d++) : d = h + 1) : d = h + 1, n || (n = u.src.slice(_, h)), o = u.env.references[se(n)], !o)
|
|
2999
2981
|
return u.pos = l, !1;
|
|
3000
|
-
c =
|
|
2982
|
+
c = o.href, i = o.title;
|
|
3001
2983
|
}
|
|
3002
2984
|
if (!e) {
|
|
3003
|
-
u.pos =
|
|
2985
|
+
u.pos = _, u.posMax = h;
|
|
3004
2986
|
const y = u.push("link_open", "a", 1), v = [["href", c]];
|
|
3005
|
-
y.attrs = v,
|
|
2987
|
+
y.attrs = v, i && v.push(["title", i]), u.linkLevel++, u.md.inline.tokenize(u), u.linkLevel--, u.push("link_close", "a", -1);
|
|
3006
2988
|
}
|
|
3007
2989
|
return u.pos = d, u.posMax = f, !0;
|
|
3008
2990
|
}
|
|
3009
2991
|
function Ir(u, e) {
|
|
3010
|
-
let t, n, r,
|
|
3011
|
-
const f = u.pos,
|
|
2992
|
+
let t, n, r, o, c, i, a, s, l = "";
|
|
2993
|
+
const f = u.pos, _ = u.posMax;
|
|
3012
2994
|
if (u.src.charCodeAt(u.pos) !== 33 || u.src.charCodeAt(u.pos + 1) !== 91)
|
|
3013
2995
|
return !1;
|
|
3014
2996
|
const h = u.pos + 2, d = u.md.helpers.parseLinkLabel(u, u.pos + 1, !1);
|
|
3015
2997
|
if (d < 0)
|
|
3016
2998
|
return !1;
|
|
3017
|
-
if (
|
|
3018
|
-
for (
|
|
2999
|
+
if (o = d + 1, o < _ && u.src.charCodeAt(o) === 40) {
|
|
3000
|
+
for (o++; o < _ && (t = u.src.charCodeAt(o), !(!Z(t) && t !== 10)); o++)
|
|
3019
3001
|
;
|
|
3020
|
-
if (
|
|
3002
|
+
if (o >= _)
|
|
3021
3003
|
return !1;
|
|
3022
|
-
for (s =
|
|
3004
|
+
for (s = o, i = u.md.helpers.parseLinkDestination(u.src, o, u.posMax), i.ok && (l = u.md.normalizeLink(i.str), u.md.validateLink(l) ? o = i.pos : l = ""), s = o; o < _ && (t = u.src.charCodeAt(o), !(!Z(t) && t !== 10)); o++)
|
|
3023
3005
|
;
|
|
3024
|
-
if (
|
|
3025
|
-
for (a =
|
|
3006
|
+
if (i = u.md.helpers.parseLinkTitle(u.src, o, u.posMax), o < _ && s !== o && i.ok)
|
|
3007
|
+
for (a = i.str, o = i.pos; o < _ && (t = u.src.charCodeAt(o), !(!Z(t) && t !== 10)); o++)
|
|
3026
3008
|
;
|
|
3027
3009
|
else
|
|
3028
3010
|
a = "";
|
|
3029
|
-
if (
|
|
3011
|
+
if (o >= _ || u.src.charCodeAt(o) !== 41)
|
|
3030
3012
|
return u.pos = f, !1;
|
|
3031
|
-
|
|
3013
|
+
o++;
|
|
3032
3014
|
} else {
|
|
3033
3015
|
if (typeof u.env.references > "u")
|
|
3034
3016
|
return !1;
|
|
3035
|
-
if (
|
|
3017
|
+
if (o < _ && u.src.charCodeAt(o) === 91 ? (s = o + 1, o = u.md.helpers.parseLinkLabel(u, o), o >= 0 ? r = u.src.slice(s, o++) : o = d + 1) : o = d + 1, r || (r = u.src.slice(h, d)), c = u.env.references[se(r)], !c)
|
|
3036
3018
|
return u.pos = f, !1;
|
|
3037
3019
|
l = c.href, a = c.title;
|
|
3038
3020
|
}
|
|
@@ -3048,7 +3030,7 @@ function Ir(u, e) {
|
|
|
3048
3030
|
const v = u.push("image", "img", 0), C = [["src", l], ["alt", ""]];
|
|
3049
3031
|
v.attrs = C, v.children = y, v.content = n, a && C.push(["title", a]);
|
|
3050
3032
|
}
|
|
3051
|
-
return u.pos =
|
|
3033
|
+
return u.pos = o, u.posMax = _, !0;
|
|
3052
3034
|
}
|
|
3053
3035
|
const Tr = /^([a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/, Mr = /^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;
|
|
3054
3036
|
function Or(u, e) {
|
|
@@ -3062,34 +3044,34 @@ function Or(u, e) {
|
|
|
3062
3044
|
if (c === 60) return !1;
|
|
3063
3045
|
if (c === 62) break;
|
|
3064
3046
|
}
|
|
3065
|
-
const
|
|
3066
|
-
if (Mr.test(
|
|
3067
|
-
const c = u.md.normalizeLink(
|
|
3047
|
+
const o = u.src.slice(n + 1, t);
|
|
3048
|
+
if (Mr.test(o)) {
|
|
3049
|
+
const c = u.md.normalizeLink(o);
|
|
3068
3050
|
if (!u.md.validateLink(c))
|
|
3069
3051
|
return !1;
|
|
3070
3052
|
if (!e) {
|
|
3071
|
-
const
|
|
3072
|
-
|
|
3053
|
+
const i = u.push("link_open", "a", 1);
|
|
3054
|
+
i.attrs = [["href", c]], i.markup = "autolink", i.info = "auto";
|
|
3073
3055
|
const a = u.push("text", "", 0);
|
|
3074
|
-
a.content = u.md.normalizeLinkText(
|
|
3056
|
+
a.content = u.md.normalizeLinkText(o);
|
|
3075
3057
|
const s = u.push("link_close", "a", -1);
|
|
3076
3058
|
s.markup = "autolink", s.info = "auto";
|
|
3077
3059
|
}
|
|
3078
|
-
return u.pos +=
|
|
3060
|
+
return u.pos += o.length + 2, !0;
|
|
3079
3061
|
}
|
|
3080
|
-
if (Tr.test(
|
|
3081
|
-
const c = u.md.normalizeLink("mailto:" +
|
|
3062
|
+
if (Tr.test(o)) {
|
|
3063
|
+
const c = u.md.normalizeLink("mailto:" + o);
|
|
3082
3064
|
if (!u.md.validateLink(c))
|
|
3083
3065
|
return !1;
|
|
3084
3066
|
if (!e) {
|
|
3085
|
-
const
|
|
3086
|
-
|
|
3067
|
+
const i = u.push("link_open", "a", 1);
|
|
3068
|
+
i.attrs = [["href", c]], i.markup = "autolink", i.info = "auto";
|
|
3087
3069
|
const a = u.push("text", "", 0);
|
|
3088
|
-
a.content = u.md.normalizeLinkText(
|
|
3070
|
+
a.content = u.md.normalizeLinkText(o);
|
|
3089
3071
|
const s = u.push("link_close", "a", -1);
|
|
3090
3072
|
s.markup = "autolink", s.info = "auto";
|
|
3091
3073
|
}
|
|
3092
|
-
return u.pos +=
|
|
3074
|
+
return u.pos += o.length + 2, !0;
|
|
3093
3075
|
}
|
|
3094
3076
|
return !1;
|
|
3095
3077
|
}
|
|
@@ -3103,7 +3085,7 @@ function Br(u) {
|
|
|
3103
3085
|
const e = u | 32;
|
|
3104
3086
|
return e >= 97 && e <= 122;
|
|
3105
3087
|
}
|
|
3106
|
-
function
|
|
3088
|
+
function qr(u, e) {
|
|
3107
3089
|
if (!u.md.options.html)
|
|
3108
3090
|
return !1;
|
|
3109
3091
|
const t = u.posMax, n = u.pos;
|
|
@@ -3112,38 +3094,38 @@ function Rr(u, e) {
|
|
|
3112
3094
|
const r = u.src.charCodeAt(n + 1);
|
|
3113
3095
|
if (r !== 33 && r !== 63 && r !== 47 && !Br(r))
|
|
3114
3096
|
return !1;
|
|
3115
|
-
const
|
|
3116
|
-
if (!
|
|
3097
|
+
const o = u.src.slice(n).match(hr);
|
|
3098
|
+
if (!o)
|
|
3117
3099
|
return !1;
|
|
3118
3100
|
if (!e) {
|
|
3119
3101
|
const c = u.push("html_inline", "", 0);
|
|
3120
|
-
c.content =
|
|
3102
|
+
c.content = o[0], Nr(c.content) && u.linkLevel++, Lr(c.content) && u.linkLevel--;
|
|
3121
3103
|
}
|
|
3122
|
-
return u.pos +=
|
|
3104
|
+
return u.pos += o[0].length, !0;
|
|
3123
3105
|
}
|
|
3124
|
-
const
|
|
3106
|
+
const Rr = /^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i, Pr = /^&([a-z][a-z0-9]{1,31});/i;
|
|
3125
3107
|
function jr(u, e) {
|
|
3126
3108
|
const t = u.pos, n = u.posMax;
|
|
3127
3109
|
if (u.src.charCodeAt(t) !== 38 || t + 1 >= n) return !1;
|
|
3128
3110
|
if (u.src.charCodeAt(t + 1) === 35) {
|
|
3129
|
-
const
|
|
3130
|
-
if (
|
|
3111
|
+
const o = u.src.slice(t).match(Rr);
|
|
3112
|
+
if (o) {
|
|
3131
3113
|
if (!e) {
|
|
3132
|
-
const c =
|
|
3133
|
-
|
|
3114
|
+
const c = o[1][0].toLowerCase() === "x" ? parseInt(o[1].slice(1), 16) : parseInt(o[1], 10), i = u.push("text_special", "", 0);
|
|
3115
|
+
i.content = Oe(c) ? ie(c) : ie(65533), i.markup = o[0], i.info = "entity";
|
|
3134
3116
|
}
|
|
3135
|
-
return u.pos +=
|
|
3117
|
+
return u.pos += o[0].length, !0;
|
|
3136
3118
|
}
|
|
3137
3119
|
} else {
|
|
3138
|
-
const
|
|
3139
|
-
if (
|
|
3140
|
-
const c = Et(
|
|
3141
|
-
if (c !==
|
|
3120
|
+
const o = u.src.slice(t).match(Pr);
|
|
3121
|
+
if (o) {
|
|
3122
|
+
const c = Et(o[0]);
|
|
3123
|
+
if (c !== o[0]) {
|
|
3142
3124
|
if (!e) {
|
|
3143
|
-
const
|
|
3144
|
-
|
|
3125
|
+
const i = u.push("text_special", "", 0);
|
|
3126
|
+
i.content = c, i.markup = o[0], i.info = "entity";
|
|
3145
3127
|
}
|
|
3146
|
-
return u.pos +=
|
|
3128
|
+
return u.pos += o[0].length, !0;
|
|
3147
3129
|
}
|
|
3148
3130
|
}
|
|
3149
3131
|
}
|
|
@@ -3153,25 +3135,25 @@ function et(u) {
|
|
|
3153
3135
|
const e = {}, t = u.length;
|
|
3154
3136
|
if (!t) return;
|
|
3155
3137
|
let n = 0, r = -2;
|
|
3156
|
-
const
|
|
3138
|
+
const o = [];
|
|
3157
3139
|
for (let c = 0; c < t; c++) {
|
|
3158
|
-
const
|
|
3159
|
-
if (
|
|
3160
|
-
e.hasOwnProperty(
|
|
3161
|
-
const a = e[
|
|
3162
|
-
let s = n -
|
|
3163
|
-
for (; s > a; s -=
|
|
3140
|
+
const i = u[c];
|
|
3141
|
+
if (o.push(0), (u[n].marker !== i.marker || r !== i.token - 1) && (n = c), r = i.token, i.length = i.length || 0, !i.close) continue;
|
|
3142
|
+
e.hasOwnProperty(i.marker) || (e[i.marker] = [-1, -1, -1, -1, -1, -1]);
|
|
3143
|
+
const a = e[i.marker][(i.open ? 3 : 0) + i.length % 3];
|
|
3144
|
+
let s = n - o[n] - 1, l = s;
|
|
3145
|
+
for (; s > a; s -= o[s] + 1) {
|
|
3164
3146
|
const f = u[s];
|
|
3165
|
-
if (f.marker ===
|
|
3166
|
-
let
|
|
3167
|
-
if ((f.close ||
|
|
3168
|
-
const h = s > 0 && !u[s - 1].open ?
|
|
3169
|
-
|
|
3147
|
+
if (f.marker === i.marker && f.open && f.end < 0) {
|
|
3148
|
+
let _ = !1;
|
|
3149
|
+
if ((f.close || i.open) && (f.length + i.length) % 3 === 0 && (f.length % 3 !== 0 || i.length % 3 !== 0) && (_ = !0), !_) {
|
|
3150
|
+
const h = s > 0 && !u[s - 1].open ? o[s - 1] + 1 : 0;
|
|
3151
|
+
o[c] = c - s + h, o[s] = h, i.open = !1, f.end = c, f.close = !1, l = -1, r = -2;
|
|
3170
3152
|
break;
|
|
3171
3153
|
}
|
|
3172
3154
|
}
|
|
3173
3155
|
}
|
|
3174
|
-
l !== -1 && (e[
|
|
3156
|
+
l !== -1 && (e[i.marker][(i.open ? 3 : 0) + (i.length || 0) % 3] = l);
|
|
3175
3157
|
}
|
|
3176
3158
|
}
|
|
3177
3159
|
function Hr(u) {
|
|
@@ -3182,9 +3164,9 @@ function Hr(u) {
|
|
|
3182
3164
|
}
|
|
3183
3165
|
function $r(u) {
|
|
3184
3166
|
let e, t, n = 0;
|
|
3185
|
-
const r = u.tokens,
|
|
3186
|
-
for (e = t = 0; e <
|
|
3187
|
-
r[e].nesting < 0 && n--, r[e].level = n, r[e].nesting > 0 && n++, r[e].type === "text" && e + 1 <
|
|
3167
|
+
const r = u.tokens, o = u.tokens.length;
|
|
3168
|
+
for (e = t = 0; e < o; e++)
|
|
3169
|
+
r[e].nesting < 0 && n--, r[e].level = n, r[e].nesting > 0 && n++, r[e].type === "text" && e + 1 < o && r[e + 1].type === "text" ? r[e + 1].content = r[e].content + r[e + 1].content : (e !== t && (r[t] = r[e]), t++);
|
|
3188
3170
|
e !== t && (r.length = t);
|
|
3189
3171
|
}
|
|
3190
3172
|
const _e = [
|
|
@@ -3198,7 +3180,7 @@ const _e = [
|
|
|
3198
3180
|
["link", zr],
|
|
3199
3181
|
["image", Ir],
|
|
3200
3182
|
["autolink", Or],
|
|
3201
|
-
["html_inline",
|
|
3183
|
+
["html_inline", qr],
|
|
3202
3184
|
["entity", jr]
|
|
3203
3185
|
], ge = [
|
|
3204
3186
|
["balance_pairs", Hr],
|
|
@@ -3217,32 +3199,32 @@ function Yu() {
|
|
|
3217
3199
|
this.ruler2.push(ge[u][0], ge[u][1]);
|
|
3218
3200
|
}
|
|
3219
3201
|
Yu.prototype.skipToken = function(u) {
|
|
3220
|
-
const e = u.pos, t = this.ruler.getRules(""), n = t.length, r = u.md.options.maxNesting,
|
|
3221
|
-
if (typeof
|
|
3222
|
-
u.pos =
|
|
3202
|
+
const e = u.pos, t = this.ruler.getRules(""), n = t.length, r = u.md.options.maxNesting, o = u.cache;
|
|
3203
|
+
if (typeof o[e] < "u") {
|
|
3204
|
+
u.pos = o[e];
|
|
3223
3205
|
return;
|
|
3224
3206
|
}
|
|
3225
3207
|
let c = !1;
|
|
3226
3208
|
if (u.level < r) {
|
|
3227
|
-
for (let
|
|
3228
|
-
if (u.level++, c = t[
|
|
3209
|
+
for (let i = 0; i < n; i++)
|
|
3210
|
+
if (u.level++, c = t[i](u, !0), u.level--, c) {
|
|
3229
3211
|
if (e >= u.pos)
|
|
3230
3212
|
throw new Error("inline rule didn't increment state.pos");
|
|
3231
3213
|
break;
|
|
3232
3214
|
}
|
|
3233
3215
|
} else
|
|
3234
3216
|
u.pos = u.posMax;
|
|
3235
|
-
c || u.pos++,
|
|
3217
|
+
c || u.pos++, o[e] = u.pos;
|
|
3236
3218
|
};
|
|
3237
3219
|
Yu.prototype.tokenize = function(u) {
|
|
3238
3220
|
const e = this.ruler.getRules(""), t = e.length, n = u.posMax, r = u.md.options.maxNesting;
|
|
3239
3221
|
for (; u.pos < n; ) {
|
|
3240
|
-
const
|
|
3222
|
+
const o = u.pos;
|
|
3241
3223
|
let c = !1;
|
|
3242
3224
|
if (u.level < r) {
|
|
3243
|
-
for (let
|
|
3244
|
-
if (c = e[
|
|
3245
|
-
if (
|
|
3225
|
+
for (let i = 0; i < t; i++)
|
|
3226
|
+
if (c = e[i](u, !1), c) {
|
|
3227
|
+
if (o >= u.pos)
|
|
3246
3228
|
throw new Error("inline rule didn't increment state.pos");
|
|
3247
3229
|
break;
|
|
3248
3230
|
}
|
|
@@ -3259,9 +3241,9 @@ Yu.prototype.tokenize = function(u) {
|
|
|
3259
3241
|
Yu.prototype.parse = function(u, e, t, n) {
|
|
3260
3242
|
const r = new this.State(u, e, t, n);
|
|
3261
3243
|
this.tokenize(r);
|
|
3262
|
-
const
|
|
3263
|
-
for (let
|
|
3264
|
-
i
|
|
3244
|
+
const o = this.ruler2.getRules(""), c = o.length;
|
|
3245
|
+
for (let i = 0; i < c; i++)
|
|
3246
|
+
o[i](r);
|
|
3265
3247
|
};
|
|
3266
3248
|
Yu.prototype.State = Xu;
|
|
3267
3249
|
function Vr(u) {
|
|
@@ -3347,7 +3329,7 @@ const Qr = {
|
|
|
3347
3329
|
function Yr(u) {
|
|
3348
3330
|
u.__index__ = -1, u.__text_cache__ = "";
|
|
3349
3331
|
}
|
|
3350
|
-
function
|
|
3332
|
+
function uo(u) {
|
|
3351
3333
|
return function(e, t) {
|
|
3352
3334
|
const n = e.slice(t);
|
|
3353
3335
|
return u.test(n) ? n.match(u)[0].length : 0;
|
|
@@ -3361,46 +3343,46 @@ function nt() {
|
|
|
3361
3343
|
function ce(u) {
|
|
3362
3344
|
const e = u.re = Vr(u.__opts__), t = u.__tlds__.slice();
|
|
3363
3345
|
u.onCompile(), u.__tlds_replaced__ || t.push(Wr), t.push(e.src_xn), e.src_tlds = t.join("|");
|
|
3364
|
-
function n(
|
|
3365
|
-
return
|
|
3346
|
+
function n(i) {
|
|
3347
|
+
return i.replace("%TLDS%", e.src_tlds);
|
|
3366
3348
|
}
|
|
3367
3349
|
e.email_fuzzy = RegExp(n(e.tpl_email_fuzzy), "i"), e.link_fuzzy = RegExp(n(e.tpl_link_fuzzy), "i"), e.link_no_ip_fuzzy = RegExp(n(e.tpl_link_no_ip_fuzzy), "i"), e.host_fuzzy_test = RegExp(n(e.tpl_host_fuzzy_test), "i");
|
|
3368
3350
|
const r = [];
|
|
3369
3351
|
u.__compiled__ = {};
|
|
3370
|
-
function i
|
|
3371
|
-
throw new Error('(LinkifyIt) Invalid schema "' +
|
|
3352
|
+
function o(i, a) {
|
|
3353
|
+
throw new Error('(LinkifyIt) Invalid schema "' + i + '": ' + a);
|
|
3372
3354
|
}
|
|
3373
|
-
Object.keys(u.__schemas__).forEach(function(
|
|
3374
|
-
const a = u.__schemas__[
|
|
3355
|
+
Object.keys(u.__schemas__).forEach(function(i) {
|
|
3356
|
+
const a = u.__schemas__[i];
|
|
3375
3357
|
if (a === null)
|
|
3376
3358
|
return;
|
|
3377
3359
|
const s = { validate: null, link: null };
|
|
3378
|
-
if (u.__compiled__[
|
|
3379
|
-
Gr(a.validate) ? s.validate =
|
|
3360
|
+
if (u.__compiled__[i] = s, Zr(a)) {
|
|
3361
|
+
Gr(a.validate) ? s.validate = uo(a.validate) : tt(a.validate) ? s.validate = a.validate : o(i, a), tt(a.normalize) ? s.normalize = a.normalize : a.normalize ? o(i, a) : s.normalize = nt();
|
|
3380
3362
|
return;
|
|
3381
3363
|
}
|
|
3382
3364
|
if (Ur(a)) {
|
|
3383
|
-
r.push(
|
|
3365
|
+
r.push(i);
|
|
3384
3366
|
return;
|
|
3385
3367
|
}
|
|
3386
|
-
i
|
|
3387
|
-
}), r.forEach(function(
|
|
3388
|
-
u.__compiled__[u.__schemas__[
|
|
3368
|
+
o(i, a);
|
|
3369
|
+
}), r.forEach(function(i) {
|
|
3370
|
+
u.__compiled__[u.__schemas__[i]] && (u.__compiled__[i].validate = u.__compiled__[u.__schemas__[i]].validate, u.__compiled__[i].normalize = u.__compiled__[u.__schemas__[i]].normalize);
|
|
3389
3371
|
}), u.__compiled__[""] = { validate: null, normalize: nt() };
|
|
3390
|
-
const c = Object.keys(u.__compiled__).filter(function(
|
|
3391
|
-
return
|
|
3372
|
+
const c = Object.keys(u.__compiled__).filter(function(i) {
|
|
3373
|
+
return i.length > 0 && u.__compiled__[i];
|
|
3392
3374
|
}).map(Kr).join("|");
|
|
3393
3375
|
u.re.schema_test = RegExp("(^|(?!_)(?:[><|]|" + e.src_ZPCc + "))(" + c + ")", "i"), u.re.schema_search = RegExp("(^|(?!_)(?:[><|]|" + e.src_ZPCc + "))(" + c + ")", "ig"), u.re.schema_at_start = RegExp("^" + u.re.schema_search.source, "i"), u.re.pretest = RegExp(
|
|
3394
3376
|
"(" + u.re.schema_test.source + ")|(" + u.re.host_fuzzy_test.source + ")|@",
|
|
3395
3377
|
"i"
|
|
3396
3378
|
), Yr(u);
|
|
3397
3379
|
}
|
|
3398
|
-
function
|
|
3380
|
+
function eo(u, e) {
|
|
3399
3381
|
const t = u.__index__, n = u.__last_index__, r = u.__text_cache__.slice(t, n);
|
|
3400
3382
|
this.schema = u.__schema__.toLowerCase(), this.index = t + e, this.lastIndex = n + e, this.raw = r, this.text = r, this.url = r;
|
|
3401
3383
|
}
|
|
3402
3384
|
function De(u, e) {
|
|
3403
|
-
const t = new
|
|
3385
|
+
const t = new eo(u, e);
|
|
3404
3386
|
return u.__compiled__[t.schema].normalize(t, u), t;
|
|
3405
3387
|
}
|
|
3406
3388
|
function nu(u, e) {
|
|
@@ -3417,15 +3399,15 @@ nu.prototype.set = function(e) {
|
|
|
3417
3399
|
nu.prototype.test = function(e) {
|
|
3418
3400
|
if (this.__text_cache__ = e, this.__index__ = -1, !e.length)
|
|
3419
3401
|
return !1;
|
|
3420
|
-
let t, n, r,
|
|
3402
|
+
let t, n, r, o, c, i, a, s, l;
|
|
3421
3403
|
if (this.re.schema_test.test(e)) {
|
|
3422
3404
|
for (a = this.re.schema_search, a.lastIndex = 0; (t = a.exec(e)) !== null; )
|
|
3423
|
-
if (
|
|
3424
|
-
this.__schema__ = t[2], this.__index__ = t.index + t[1].length, this.__last_index__ = t.index + t[0].length +
|
|
3405
|
+
if (o = this.testSchemaAt(e, t[2], a.lastIndex), o) {
|
|
3406
|
+
this.__schema__ = t[2], this.__index__ = t.index + t[1].length, this.__last_index__ = t.index + t[0].length + o;
|
|
3425
3407
|
break;
|
|
3426
3408
|
}
|
|
3427
3409
|
}
|
|
3428
|
-
return this.__opts__.fuzzyLink && this.__compiled__["http:"] && (s = e.search(this.re.host_fuzzy_test), s >= 0 && (this.__index__ < 0 || s < this.__index__) && (n = e.match(this.__opts__.fuzzyIP ? this.re.link_fuzzy : this.re.link_no_ip_fuzzy)) !== null && (c = n.index + n[1].length, (this.__index__ < 0 || c < this.__index__) && (this.__schema__ = "", this.__index__ = c, this.__last_index__ = n.index + n[0].length))), this.__opts__.fuzzyEmail && this.__compiled__["mailto:"] && (l = e.indexOf("@"), l >= 0 && (r = e.match(this.re.email_fuzzy)) !== null && (c = r.index + r[1].length,
|
|
3410
|
+
return this.__opts__.fuzzyLink && this.__compiled__["http:"] && (s = e.search(this.re.host_fuzzy_test), s >= 0 && (this.__index__ < 0 || s < this.__index__) && (n = e.match(this.__opts__.fuzzyIP ? this.re.link_fuzzy : this.re.link_no_ip_fuzzy)) !== null && (c = n.index + n[1].length, (this.__index__ < 0 || c < this.__index__) && (this.__schema__ = "", this.__index__ = c, this.__last_index__ = n.index + n[0].length))), this.__opts__.fuzzyEmail && this.__compiled__["mailto:"] && (l = e.indexOf("@"), l >= 0 && (r = e.match(this.re.email_fuzzy)) !== null && (c = r.index + r[1].length, i = r.index + r[0].length, (this.__index__ < 0 || c < this.__index__ || c === this.__index__ && i > this.__last_index__) && (this.__schema__ = "mailto:", this.__index__ = c, this.__last_index__ = i))), this.__index__ >= 0;
|
|
3429
3411
|
};
|
|
3430
3412
|
nu.prototype.pretest = function(e) {
|
|
3431
3413
|
return this.re.pretest.test(e);
|
|
@@ -3450,8 +3432,8 @@ nu.prototype.matchAtStart = function(e) {
|
|
|
3450
3432
|
return n ? (this.__schema__ = t[2], this.__index__ = t.index + t[1].length, this.__last_index__ = t.index + t[0].length + n, De(this, 0)) : null;
|
|
3451
3433
|
};
|
|
3452
3434
|
nu.prototype.tlds = function(e, t) {
|
|
3453
|
-
return e = Array.isArray(e) ? e : [e], t ? (this.__tlds__ = this.__tlds__.concat(e).sort().filter(function(n, r,
|
|
3454
|
-
return n !==
|
|
3435
|
+
return e = Array.isArray(e) ? e : [e], t ? (this.__tlds__ = this.__tlds__.concat(e).sort().filter(function(n, r, o) {
|
|
3436
|
+
return n !== o[r - 1];
|
|
3455
3437
|
}).reverse(), ce(this), this) : (this.__tlds__ = e.slice(), this.__tlds_replaced__ = !0, ce(this), this);
|
|
3456
3438
|
};
|
|
3457
3439
|
nu.prototype.normalize = function(e) {
|
|
@@ -3459,27 +3441,27 @@ nu.prototype.normalize = function(e) {
|
|
|
3459
3441
|
};
|
|
3460
3442
|
nu.prototype.onCompile = function() {
|
|
3461
3443
|
};
|
|
3462
|
-
const Ou = 2147483647, hu = 36, Be = 1, Ku = 26,
|
|
3444
|
+
const Ou = 2147483647, hu = 36, Be = 1, Ku = 26, to = 38, no = 700, Lt = 72, Bt = 128, qt = "-", ro = /^xn--/, oo = /[^\0-\x7F]/, io = /[\x2E\u3002\uFF0E\uFF61]/g, co = {
|
|
3463
3445
|
overflow: "Overflow: input needs wider integers to process",
|
|
3464
3446
|
"not-basic": "Illegal input >= 0x80 (not a basic code point)",
|
|
3465
3447
|
"invalid-input": "Invalid input"
|
|
3466
3448
|
}, ke = hu - Be, pu = Math.floor, ve = String.fromCharCode;
|
|
3467
3449
|
function ku(u) {
|
|
3468
|
-
throw new RangeError(
|
|
3450
|
+
throw new RangeError(co[u]);
|
|
3469
3451
|
}
|
|
3470
|
-
function
|
|
3452
|
+
function ao(u, e) {
|
|
3471
3453
|
const t = [];
|
|
3472
3454
|
let n = u.length;
|
|
3473
3455
|
for (; n--; )
|
|
3474
3456
|
t[n] = e(u[n]);
|
|
3475
3457
|
return t;
|
|
3476
3458
|
}
|
|
3477
|
-
function
|
|
3459
|
+
function Rt(u, e) {
|
|
3478
3460
|
const t = u.split("@");
|
|
3479
3461
|
let n = "";
|
|
3480
|
-
t.length > 1 && (n = t[0] + "@", u = t[1]), u = u.replace(
|
|
3481
|
-
const r = u.split("."),
|
|
3482
|
-
return n +
|
|
3462
|
+
t.length > 1 && (n = t[0] + "@", u = t[1]), u = u.replace(io, ".");
|
|
3463
|
+
const r = u.split("."), o = ao(r, e).join(".");
|
|
3464
|
+
return n + o;
|
|
3483
3465
|
}
|
|
3484
3466
|
function Pt(u) {
|
|
3485
3467
|
const e = [];
|
|
@@ -3488,64 +3470,64 @@ function Pt(u) {
|
|
|
3488
3470
|
for (; t < n; ) {
|
|
3489
3471
|
const r = u.charCodeAt(t++);
|
|
3490
3472
|
if (r >= 55296 && r <= 56319 && t < n) {
|
|
3491
|
-
const
|
|
3492
|
-
(
|
|
3473
|
+
const o = u.charCodeAt(t++);
|
|
3474
|
+
(o & 64512) == 56320 ? e.push(((r & 1023) << 10) + (o & 1023) + 65536) : (e.push(r), t--);
|
|
3493
3475
|
} else
|
|
3494
3476
|
e.push(r);
|
|
3495
3477
|
}
|
|
3496
3478
|
return e;
|
|
3497
3479
|
}
|
|
3498
|
-
const
|
|
3480
|
+
const so = (u) => String.fromCodePoint(...u), lo = function(u) {
|
|
3499
3481
|
return u >= 48 && u < 58 ? 26 + (u - 48) : u >= 65 && u < 91 ? u - 65 : u >= 97 && u < 123 ? u - 97 : hu;
|
|
3500
3482
|
}, rt = function(u, e) {
|
|
3501
3483
|
return u + 22 + 75 * (u < 26) - ((e != 0) << 5);
|
|
3502
3484
|
}, jt = function(u, e, t) {
|
|
3503
3485
|
let n = 0;
|
|
3504
|
-
for (u = t ? pu(u /
|
|
3486
|
+
for (u = t ? pu(u / no) : u >> 1, u += pu(u / e); u > ke * Ku >> 1; n += hu)
|
|
3505
3487
|
u = pu(u / ke);
|
|
3506
|
-
return pu(n + (ke + 1) * u / (u +
|
|
3488
|
+
return pu(n + (ke + 1) * u / (u + to));
|
|
3507
3489
|
}, Ht = function(u) {
|
|
3508
3490
|
const e = [], t = u.length;
|
|
3509
|
-
let n = 0, r = Bt,
|
|
3491
|
+
let n = 0, r = Bt, o = Lt, c = u.lastIndexOf(qt);
|
|
3510
3492
|
c < 0 && (c = 0);
|
|
3511
|
-
for (let
|
|
3512
|
-
u.charCodeAt(
|
|
3513
|
-
for (let
|
|
3493
|
+
for (let i = 0; i < c; ++i)
|
|
3494
|
+
u.charCodeAt(i) >= 128 && ku("not-basic"), e.push(u.charCodeAt(i));
|
|
3495
|
+
for (let i = c > 0 ? c + 1 : 0; i < t; ) {
|
|
3514
3496
|
const a = n;
|
|
3515
3497
|
for (let l = 1, f = hu; ; f += hu) {
|
|
3516
|
-
|
|
3517
|
-
const
|
|
3518
|
-
|
|
3519
|
-
const h = f <=
|
|
3520
|
-
if (
|
|
3498
|
+
i >= t && ku("invalid-input");
|
|
3499
|
+
const _ = lo(u.charCodeAt(i++));
|
|
3500
|
+
_ >= hu && ku("invalid-input"), _ > pu((Ou - n) / l) && ku("overflow"), n += _ * l;
|
|
3501
|
+
const h = f <= o ? Be : f >= o + Ku ? Ku : f - o;
|
|
3502
|
+
if (_ < h)
|
|
3521
3503
|
break;
|
|
3522
3504
|
const d = hu - h;
|
|
3523
3505
|
l > pu(Ou / d) && ku("overflow"), l *= d;
|
|
3524
3506
|
}
|
|
3525
3507
|
const s = e.length + 1;
|
|
3526
|
-
|
|
3508
|
+
o = jt(n - a, s, a == 0), pu(n / s) > Ou - r && ku("overflow"), r += pu(n / s), n %= s, e.splice(n++, 0, r);
|
|
3527
3509
|
}
|
|
3528
3510
|
return String.fromCodePoint(...e);
|
|
3529
3511
|
}, $t = function(u) {
|
|
3530
3512
|
const e = [];
|
|
3531
3513
|
u = Pt(u);
|
|
3532
3514
|
const t = u.length;
|
|
3533
|
-
let n = Bt, r = 0,
|
|
3515
|
+
let n = Bt, r = 0, o = Lt;
|
|
3534
3516
|
for (const a of u)
|
|
3535
3517
|
a < 128 && e.push(ve(a));
|
|
3536
3518
|
const c = e.length;
|
|
3537
|
-
let
|
|
3538
|
-
for (c && e.push(
|
|
3519
|
+
let i = c;
|
|
3520
|
+
for (c && e.push(qt); i < t; ) {
|
|
3539
3521
|
let a = Ou;
|
|
3540
3522
|
for (const l of u)
|
|
3541
3523
|
l >= n && l < a && (a = l);
|
|
3542
|
-
const s =
|
|
3524
|
+
const s = i + 1;
|
|
3543
3525
|
a - n > pu((Ou - r) / s) && ku("overflow"), r += (a - n) * s, n = a;
|
|
3544
3526
|
for (const l of u)
|
|
3545
3527
|
if (l < n && ++r > Ou && ku("overflow"), l === n) {
|
|
3546
3528
|
let f = r;
|
|
3547
|
-
for (let
|
|
3548
|
-
const h =
|
|
3529
|
+
for (let _ = hu; ; _ += hu) {
|
|
3530
|
+
const h = _ <= o ? Be : _ >= o + Ku ? Ku : _ - o;
|
|
3549
3531
|
if (f < h)
|
|
3550
3532
|
break;
|
|
3551
3533
|
const d = f - h, y = hu - h;
|
|
@@ -3553,18 +3535,18 @@ const si = (u) => String.fromCodePoint(...u), li = function(u) {
|
|
|
3553
3535
|
ve(rt(h + d % y, 0))
|
|
3554
3536
|
), f = pu(d / y);
|
|
3555
3537
|
}
|
|
3556
|
-
e.push(ve(rt(f, 0))),
|
|
3538
|
+
e.push(ve(rt(f, 0))), o = jt(r, s, i === c), r = 0, ++i;
|
|
3557
3539
|
}
|
|
3558
3540
|
++r, ++n;
|
|
3559
3541
|
}
|
|
3560
3542
|
return e.join("");
|
|
3561
|
-
},
|
|
3562
|
-
return
|
|
3563
|
-
return
|
|
3543
|
+
}, fo = function(u) {
|
|
3544
|
+
return Rt(u, function(e) {
|
|
3545
|
+
return ro.test(e) ? Ht(e.slice(4).toLowerCase()) : e;
|
|
3564
3546
|
});
|
|
3565
|
-
},
|
|
3566
|
-
return
|
|
3567
|
-
return
|
|
3547
|
+
}, ho = function(u) {
|
|
3548
|
+
return Rt(u, function(e) {
|
|
3549
|
+
return oo.test(e) ? "xn--" + $t(e) : e;
|
|
3568
3550
|
});
|
|
3569
3551
|
}, Vt = {
|
|
3570
3552
|
/**
|
|
@@ -3582,13 +3564,13 @@ const si = (u) => String.fromCodePoint(...u), li = function(u) {
|
|
|
3582
3564
|
*/
|
|
3583
3565
|
ucs2: {
|
|
3584
3566
|
decode: Pt,
|
|
3585
|
-
encode:
|
|
3567
|
+
encode: so
|
|
3586
3568
|
},
|
|
3587
3569
|
decode: Ht,
|
|
3588
3570
|
encode: $t,
|
|
3589
|
-
toASCII:
|
|
3590
|
-
toUnicode:
|
|
3591
|
-
},
|
|
3571
|
+
toASCII: ho,
|
|
3572
|
+
toUnicode: fo
|
|
3573
|
+
}, po = {
|
|
3592
3574
|
options: {
|
|
3593
3575
|
// Enable HTML tags in source
|
|
3594
3576
|
html: !1,
|
|
@@ -3624,7 +3606,7 @@ const si = (u) => String.fromCodePoint(...u), li = function(u) {
|
|
|
3624
3606
|
block: {},
|
|
3625
3607
|
inline: {}
|
|
3626
3608
|
}
|
|
3627
|
-
},
|
|
3609
|
+
}, bo = {
|
|
3628
3610
|
options: {
|
|
3629
3611
|
// Enable HTML tags in source
|
|
3630
3612
|
html: !1,
|
|
@@ -3679,7 +3661,7 @@ const si = (u) => String.fromCodePoint(...u), li = function(u) {
|
|
|
3679
3661
|
]
|
|
3680
3662
|
}
|
|
3681
3663
|
}
|
|
3682
|
-
},
|
|
3664
|
+
}, mo = {
|
|
3683
3665
|
options: {
|
|
3684
3666
|
// Enable HTML tags in source
|
|
3685
3667
|
html: !0,
|
|
@@ -3753,17 +3735,17 @@ const si = (u) => String.fromCodePoint(...u), li = function(u) {
|
|
|
3753
3735
|
]
|
|
3754
3736
|
}
|
|
3755
3737
|
}
|
|
3756
|
-
},
|
|
3757
|
-
default:
|
|
3758
|
-
zero:
|
|
3759
|
-
commonmark:
|
|
3760
|
-
},
|
|
3761
|
-
function
|
|
3738
|
+
}, xo = {
|
|
3739
|
+
default: po,
|
|
3740
|
+
zero: bo,
|
|
3741
|
+
commonmark: mo
|
|
3742
|
+
}, _o = /^(vbscript|javascript|file|data):/, go = /^data:image\/(gif|png|jpeg|webp);/;
|
|
3743
|
+
function ko(u) {
|
|
3762
3744
|
const e = u.trim().toLowerCase();
|
|
3763
|
-
return
|
|
3745
|
+
return _o.test(e) ? go.test(e) : !0;
|
|
3764
3746
|
}
|
|
3765
3747
|
const Ut = ["http:", "https:", "mailto:"];
|
|
3766
|
-
function
|
|
3748
|
+
function vo(u) {
|
|
3767
3749
|
const e = Ie(u, !0);
|
|
3768
3750
|
if (e.hostname && (!e.protocol || Ut.indexOf(e.protocol) >= 0))
|
|
3769
3751
|
try {
|
|
@@ -3772,7 +3754,7 @@ function ki(u) {
|
|
|
3772
3754
|
}
|
|
3773
3755
|
return Wu(ze(e));
|
|
3774
3756
|
}
|
|
3775
|
-
function
|
|
3757
|
+
function yo(u) {
|
|
3776
3758
|
const e = Ie(u, !0);
|
|
3777
3759
|
if (e.hostname && (!e.protocol || Ut.indexOf(e.protocol) >= 0))
|
|
3778
3760
|
try {
|
|
@@ -3784,7 +3766,7 @@ function vi(u) {
|
|
|
3784
3766
|
function ru(u, e) {
|
|
3785
3767
|
if (!(this instanceof ru))
|
|
3786
3768
|
return new ru(u, e);
|
|
3787
|
-
e || Me(u) || (e = u || {}, u = "default"), this.inline = new Yu(), this.block = new le(), this.core = new Ne(), this.renderer = new Pu(), this.linkify = new nu(), this.validateLink =
|
|
3769
|
+
e || Me(u) || (e = u || {}, u = "default"), this.inline = new Yu(), this.block = new le(), this.core = new Ne(), this.renderer = new Pu(), this.linkify = new nu(), this.validateLink = ko, this.normalizeLink = vo, this.normalizeLinkText = yo, this.utils = An, this.helpers = ae({}, Fn), this.options = {}, this.configure(u), e && this.set(e);
|
|
3788
3770
|
}
|
|
3789
3771
|
ru.prototype.set = function(u) {
|
|
3790
3772
|
return ae(this.options, u), this;
|
|
@@ -3793,7 +3775,7 @@ ru.prototype.configure = function(u) {
|
|
|
3793
3775
|
const e = this;
|
|
3794
3776
|
if (Me(u)) {
|
|
3795
3777
|
const t = u;
|
|
3796
|
-
if (u =
|
|
3778
|
+
if (u = xo[t], !u)
|
|
3797
3779
|
throw new Error('Wrong `markdown-it` preset "' + t + '", check name');
|
|
3798
3780
|
}
|
|
3799
3781
|
if (!u)
|
|
@@ -3846,100 +3828,100 @@ ru.prototype.parseInline = function(u, e) {
|
|
|
3846
3828
|
ru.prototype.renderInline = function(u, e) {
|
|
3847
3829
|
return e = e || {}, this.renderer.render(this.parseInline(u, e), this.options, e);
|
|
3848
3830
|
};
|
|
3849
|
-
const
|
|
3831
|
+
const Ao = "data:image/gif;base64,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", Co = { class: "das-ai-chat" }, Do = { class: "das-ai-reference-content-content" }, Eo = { style: { "margin-right": "8px" } }, Fo = { class: "das-ai-answer-content" }, wo = {
|
|
3850
3832
|
key: 0,
|
|
3851
3833
|
class: "das-ai-chat-stop"
|
|
3852
|
-
},
|
|
3834
|
+
}, So = { class: "think-line-text" }, zo = { class: "think-line-icon" }, Io = ["innerHTML"], To = ["innerHTML"], Mo = {
|
|
3853
3835
|
key: 3,
|
|
3854
3836
|
class: "das-ai-chat-opt"
|
|
3855
|
-
},
|
|
3837
|
+
}, Oo = {
|
|
3856
3838
|
key: 1,
|
|
3857
3839
|
class: "audio-generated"
|
|
3858
|
-
},
|
|
3840
|
+
}, No = {
|
|
3859
3841
|
key: 2,
|
|
3860
3842
|
class: "audio-loading-img"
|
|
3861
|
-
},
|
|
3843
|
+
}, Lo = ["src"], Bo = {
|
|
3862
3844
|
key: 4,
|
|
3863
3845
|
class: "das-ai-chat-loading"
|
|
3864
|
-
},
|
|
3846
|
+
}, qo = {
|
|
3865
3847
|
name: "aiChat"
|
|
3866
|
-
},
|
|
3867
|
-
...
|
|
3848
|
+
}, Ro = /* @__PURE__ */ ou({
|
|
3849
|
+
...qo,
|
|
3868
3850
|
props: {
|
|
3869
3851
|
item: { default: {} },
|
|
3870
3852
|
isNew: { type: Boolean, default: !0 }
|
|
3871
3853
|
},
|
|
3872
3854
|
emits: ["aiChatEmit"],
|
|
3873
3855
|
setup(u, { emit: e }) {
|
|
3874
|
-
const t = u, n = M(""), r = M(""),
|
|
3856
|
+
const t = u, n = M(""), r = M(""), o = e, c = new ru(), i = M(), a = su(() => t.item.content), s = su(() => t.item.think), { toClipboard: l } = N0();
|
|
3875
3857
|
bu(
|
|
3876
3858
|
() => a.value,
|
|
3877
|
-
(
|
|
3878
|
-
if (!
|
|
3859
|
+
(p, b) => {
|
|
3860
|
+
if (!p) {
|
|
3879
3861
|
n.value = "";
|
|
3880
3862
|
return;
|
|
3881
3863
|
}
|
|
3882
|
-
n.value = c.render(
|
|
3864
|
+
n.value = c.render(p);
|
|
3883
3865
|
},
|
|
3884
3866
|
{ immediate: !0 }
|
|
3885
3867
|
), bu(
|
|
3886
3868
|
() => s.value,
|
|
3887
|
-
(
|
|
3888
|
-
if (!
|
|
3869
|
+
(p, b) => {
|
|
3870
|
+
if (!p) {
|
|
3889
3871
|
r.value = "";
|
|
3890
3872
|
return;
|
|
3891
3873
|
}
|
|
3892
|
-
r.value = c.render(
|
|
3874
|
+
r.value = c.render(p);
|
|
3893
3875
|
},
|
|
3894
3876
|
{ immediate: !0 }
|
|
3895
3877
|
);
|
|
3896
|
-
const f = M(!0),
|
|
3897
|
-
var
|
|
3898
|
-
return ((
|
|
3878
|
+
const f = M(!0), _ = su(() => t.item.file && t.item.file.length ? I("引用$0篇资料作为参考", t.item.file.length) : ""), h = su(() => t.item.loading && !n.value ? I("思考中…") : t.item.thinkTime ? I("已深度思考(用时$0秒)", t.item.thinkTime) : I("已深度思考")), d = su(() => !n.value && !r.value), y = () => {
|
|
3879
|
+
var p, b, m;
|
|
3880
|
+
return ((p = t.item) == null ? void 0 : p.audioStatus) == "normal" ? I("语音朗读") : ((b = t.item) == null ? void 0 : b.audioStatus) == "generated" || ((m = t.item) == null ? void 0 : m.audioStatus) == "loading" ? I("停止朗读") : I("语音朗读");
|
|
3899
3881
|
}, v = () => {
|
|
3900
|
-
var
|
|
3882
|
+
var p;
|
|
3901
3883
|
try {
|
|
3902
3884
|
if (!n.value) return;
|
|
3903
|
-
const
|
|
3904
|
-
l(
|
|
3885
|
+
const b = (p = i.value.textContent) == null ? void 0 : p.replace(/^\s*[\r\n]/gm, "");
|
|
3886
|
+
l(b), Pe.success(I("复制成功"));
|
|
3905
3887
|
} catch {
|
|
3906
3888
|
Pe.error(I("复制失败"));
|
|
3907
3889
|
}
|
|
3908
|
-
}, C = (
|
|
3909
|
-
if (
|
|
3890
|
+
}, C = (p) => {
|
|
3891
|
+
if (p == "copy") {
|
|
3910
3892
|
v();
|
|
3911
3893
|
return;
|
|
3912
3894
|
}
|
|
3913
|
-
if (
|
|
3895
|
+
if (p == "saveKnowledgebase") {
|
|
3914
3896
|
if (t.item.saved || !n.value) return;
|
|
3915
|
-
|
|
3897
|
+
o("aiChatEmit", p, { dom: i.value, item: t.item });
|
|
3916
3898
|
return;
|
|
3917
3899
|
}
|
|
3918
|
-
if (
|
|
3900
|
+
if (p == "play") {
|
|
3919
3901
|
if (t.item.audioStatus == "normal") {
|
|
3920
|
-
if (!
|
|
3921
|
-
|
|
3902
|
+
if (!i.value) return;
|
|
3903
|
+
o("aiChatEmit", p, { text: i.value.textContent, data: t.item });
|
|
3922
3904
|
return;
|
|
3923
3905
|
}
|
|
3924
|
-
|
|
3906
|
+
o("aiChatEmit", p, { data: t.item });
|
|
3925
3907
|
return;
|
|
3926
3908
|
}
|
|
3927
|
-
|
|
3909
|
+
o("aiChatEmit", p, t.item);
|
|
3928
3910
|
}, k = () => {
|
|
3929
|
-
|
|
3911
|
+
o("aiChatEmit", "reference", t.item);
|
|
3930
3912
|
};
|
|
3931
|
-
return (
|
|
3913
|
+
return (p, b) => (w(), R("div", Co, [
|
|
3932
3914
|
T(" 参考内容 "),
|
|
3933
|
-
g("div",
|
|
3934
|
-
|
|
3915
|
+
g("div", Do, [
|
|
3916
|
+
_.value ? (w(), R("div", {
|
|
3935
3917
|
key: 0,
|
|
3936
3918
|
onClick: k,
|
|
3937
3919
|
class: "das-ai-reference-content-line"
|
|
3938
3920
|
}, [
|
|
3939
3921
|
g(
|
|
3940
3922
|
"span",
|
|
3941
|
-
|
|
3942
|
-
V(
|
|
3923
|
+
Eo,
|
|
3924
|
+
V(_.value),
|
|
3943
3925
|
1
|
|
3944
3926
|
/* TEXT */
|
|
3945
3927
|
),
|
|
@@ -3977,7 +3959,7 @@ const yi = "data:image/gif;base64,R0lGODlhZABkAIABAABt8QAAACH/C05FVFNDQVBFMi4wAw
|
|
|
3977
3959
|
</div> `)
|
|
3978
3960
|
]),
|
|
3979
3961
|
T(" 回答 "),
|
|
3980
|
-
g("div",
|
|
3962
|
+
g("div", Fo, [
|
|
3981
3963
|
T(` <div class="ai-answer-top">\r
|
|
3982
3964
|
<DasIcon icon="huida" size="large" iconColor="#212121"></DasIcon>\r
|
|
3983
3965
|
<span style="margin-left: 8px">{{ t('回答') }}</span>\r
|
|
@@ -3987,14 +3969,14 @@ const yi = "data:image/gif;base64,R0lGODlhZABkAIABAABt8QAAACH/C05FVFNDQVBFMi4wAw
|
|
|
3987
3969
|
<div class="ai-answer-skeleton-item"></div>\r
|
|
3988
3970
|
<div class="ai-answer-skeleton-item" style="width: 50%"></div>\r
|
|
3989
3971
|
</div> `),
|
|
3990
|
-
!
|
|
3972
|
+
!p.item.loading && d.value && !p.item.file.length ? (w(), R(
|
|
3991
3973
|
"div",
|
|
3992
|
-
|
|
3974
|
+
wo,
|
|
3993
3975
|
V(A(I)("已暂停生成")),
|
|
3994
3976
|
1
|
|
3995
3977
|
/* TEXT */
|
|
3996
3978
|
)) : T("v-if", !0),
|
|
3997
|
-
r.value ? (w(),
|
|
3979
|
+
r.value ? (w(), R(
|
|
3998
3980
|
"div",
|
|
3999
3981
|
{
|
|
4000
3982
|
key: 1,
|
|
@@ -4002,17 +3984,17 @@ const yi = "data:image/gif;base64,R0lGODlhZABkAIABAABt8QAAACH/C05FVFNDQVBFMi4wAw
|
|
|
4002
3984
|
},
|
|
4003
3985
|
[
|
|
4004
3986
|
g("div", {
|
|
4005
|
-
onClick:
|
|
3987
|
+
onClick: b[0] || (b[0] = (m) => f.value = !f.value),
|
|
4006
3988
|
class: "think-line"
|
|
4007
3989
|
}, [
|
|
4008
3990
|
g(
|
|
4009
3991
|
"div",
|
|
4010
|
-
|
|
3992
|
+
So,
|
|
4011
3993
|
V(h.value),
|
|
4012
3994
|
1
|
|
4013
3995
|
/* TEXT */
|
|
4014
3996
|
),
|
|
4015
|
-
g("div",
|
|
3997
|
+
g("div", zo, [
|
|
4016
3998
|
f.value ? T("v-if", !0) : (w(), X(A(ht), {
|
|
4017
3999
|
key: 0,
|
|
4018
4000
|
size: "medium",
|
|
@@ -4028,20 +4010,20 @@ const yi = "data:image/gif;base64,R0lGODlhZABkAIABAABt8QAAACH/C05FVFNDQVBFMi4wAw
|
|
|
4028
4010
|
g("div", {
|
|
4029
4011
|
class: "das-ai-think-markdown",
|
|
4030
4012
|
innerHTML: r.value
|
|
4031
|
-
}, null, 8,
|
|
4013
|
+
}, null, 8, Io)
|
|
4032
4014
|
],
|
|
4033
4015
|
2
|
|
4034
4016
|
/* CLASS */
|
|
4035
4017
|
)) : T("v-if", !0),
|
|
4036
|
-
n.value ? (w(),
|
|
4018
|
+
n.value ? (w(), R("div", {
|
|
4037
4019
|
key: 2,
|
|
4038
4020
|
ref_key: "chatMarkdownRef",
|
|
4039
|
-
ref:
|
|
4021
|
+
ref: i,
|
|
4040
4022
|
class: "das-ai-chat-markdown",
|
|
4041
4023
|
innerHTML: n.value
|
|
4042
|
-
}, null, 8,
|
|
4043
|
-
|
|
4044
|
-
|
|
4024
|
+
}, null, 8, To)) : T("v-if", !0),
|
|
4025
|
+
p.isNew && !p.item.loading ? (w(), R("div", Mo, [
|
|
4026
|
+
p.isNew ? (w(), X(A(Cu), {
|
|
4045
4027
|
key: 0,
|
|
4046
4028
|
placement: "top",
|
|
4047
4029
|
type: "button"
|
|
@@ -4057,7 +4039,7 @@ const yi = "data:image/gif;base64,R0lGODlhZABkAIABAABt8QAAACH/C05FVFNDQVBFMi4wAw
|
|
|
4057
4039
|
]),
|
|
4058
4040
|
default: J(() => [
|
|
4059
4041
|
g("div", {
|
|
4060
|
-
onClick:
|
|
4042
|
+
onClick: b[1] || (b[1] = (m) => C("regenerate")),
|
|
4061
4043
|
class: "chat-opt-box"
|
|
4062
4044
|
}, [
|
|
4063
4045
|
H(A(a0), {
|
|
@@ -4084,7 +4066,7 @@ const yi = "data:image/gif;base64,R0lGODlhZABkAIABAABt8QAAACH/C05FVFNDQVBFMi4wAw
|
|
|
4084
4066
|
]),
|
|
4085
4067
|
default: J(() => [
|
|
4086
4068
|
g("div", {
|
|
4087
|
-
onClick:
|
|
4069
|
+
onClick: b[2] || (b[2] = (m) => C("copy")),
|
|
4088
4070
|
class: "chat-opt-box"
|
|
4089
4071
|
}, [
|
|
4090
4072
|
H(A(s0), {
|
|
@@ -4111,15 +4093,15 @@ const yi = "data:image/gif;base64,R0lGODlhZABkAIABAABt8QAAACH/C05FVFNDQVBFMi4wAw
|
|
|
4111
4093
|
]),
|
|
4112
4094
|
default: J(() => [
|
|
4113
4095
|
g("div", {
|
|
4114
|
-
onClick:
|
|
4096
|
+
onClick: b[3] || (b[3] = (m) => C("play")),
|
|
4115
4097
|
class: "chat-opt-box"
|
|
4116
4098
|
}, [
|
|
4117
|
-
|
|
4099
|
+
p.item.audioStatus == "normal" ? (w(), X(A(l0), {
|
|
4118
4100
|
key: 0,
|
|
4119
4101
|
size: "medium",
|
|
4120
4102
|
iconColor: "#666666"
|
|
4121
4103
|
})) : T("v-if", !0),
|
|
4122
|
-
|
|
4104
|
+
p.item.audioStatus == "generated" ? (w(), R("div", Oo, [...b[4] || (b[4] = [
|
|
4123
4105
|
g(
|
|
4124
4106
|
"span",
|
|
4125
4107
|
null,
|
|
@@ -4156,8 +4138,8 @@ const yi = "data:image/gif;base64,R0lGODlhZABkAIABAABt8QAAACH/C05FVFNDQVBFMi4wAw
|
|
|
4156
4138
|
<span style="width: 1.5px"></span>\r
|
|
4157
4139
|
<span style="width: 1.5px"></span>\r
|
|
4158
4140
|
</div> `),
|
|
4159
|
-
|
|
4160
|
-
g("img", { src: A(
|
|
4141
|
+
p.item.audioStatus == "loading" ? (w(), R("div", No, [
|
|
4142
|
+
g("img", { src: A(Ao) }, null, 8, Lo)
|
|
4161
4143
|
])) : T("v-if", !0)
|
|
4162
4144
|
])
|
|
4163
4145
|
]),
|
|
@@ -4177,7 +4159,7 @@ const yi = "data:image/gif;base64,R0lGODlhZABkAIABAABt8QAAACH/C05FVFNDQVBFMi4wAw
|
|
|
4177
4159
|
</div>\r
|
|
4178
4160
|
</das-tooltip> `)
|
|
4179
4161
|
])) : T("v-if", !0),
|
|
4180
|
-
|
|
4162
|
+
p.item.loading && d.value && !p.item.file.length ? (w(), R("div", Bo, [...b[5] || (b[5] = [
|
|
4181
4163
|
g(
|
|
4182
4164
|
"span",
|
|
4183
4165
|
null,
|
|
@@ -4203,26 +4185,26 @@ const yi = "data:image/gif;base64,R0lGODlhZABkAIABAABt8QAAACH/C05FVFNDQVBFMi4wAw
|
|
|
4203
4185
|
])
|
|
4204
4186
|
]));
|
|
4205
4187
|
}
|
|
4206
|
-
}),
|
|
4188
|
+
}), Po = /* @__PURE__ */ iu(Ro, [["__scopeId", "data-v-baade754"]]), jo = { class: "das-ai-chat-container" }, Ho = {
|
|
4207
4189
|
name: "chat"
|
|
4208
|
-
},
|
|
4209
|
-
...
|
|
4190
|
+
}, $o = /* @__PURE__ */ ou({
|
|
4191
|
+
...Ho,
|
|
4210
4192
|
props: {
|
|
4211
4193
|
chartList: { default: [] }
|
|
4212
4194
|
},
|
|
4213
4195
|
emits: ["chatEmit"],
|
|
4214
4196
|
setup(u, { emit: e }) {
|
|
4215
|
-
const t = u, n = su(() => t.chartList.filter((
|
|
4197
|
+
const t = u, n = su(() => t.chartList.filter((i) => i.role == "ai")), r = (i) => {
|
|
4216
4198
|
let a = !0;
|
|
4217
|
-
return n.value.length > 1 && (a = n.value[n.value.length - 1].id ==
|
|
4218
|
-
},
|
|
4219
|
-
|
|
4199
|
+
return n.value.length > 1 && (a = n.value[n.value.length - 1].id == i.id), a;
|
|
4200
|
+
}, o = e, c = (i, a) => {
|
|
4201
|
+
o("chatEmit", i, a);
|
|
4220
4202
|
};
|
|
4221
|
-
return (
|
|
4222
|
-
(w(!0),
|
|
4203
|
+
return (i, a) => (w(), R("div", jo, [
|
|
4204
|
+
(w(!0), R(
|
|
4223
4205
|
Nu,
|
|
4224
4206
|
null,
|
|
4225
|
-
Qu(
|
|
4207
|
+
Qu(i.chartList, (s) => (w(), R(
|
|
4226
4208
|
Nu,
|
|
4227
4209
|
{
|
|
4228
4210
|
key: s.id
|
|
@@ -4232,7 +4214,7 @@ const yi = "data:image/gif;base64,R0lGODlhZABkAIABAABt8QAAACH/C05FVFNDQVBFMi4wAw
|
|
|
4232
4214
|
key: 0,
|
|
4233
4215
|
item: s
|
|
4234
4216
|
}, null, 8, ["item"])) : T("v-if", !0),
|
|
4235
|
-
s.role == "ai" ? (w(), X(
|
|
4217
|
+
s.role == "ai" ? (w(), X(Po, {
|
|
4236
4218
|
key: 1,
|
|
4237
4219
|
onAiChatEmit: c,
|
|
4238
4220
|
isNew: r(s),
|
|
@@ -4247,29 +4229,29 @@ const yi = "data:image/gif;base64,R0lGODlhZABkAIABAABt8QAAACH/C05FVFNDQVBFMi4wAw
|
|
|
4247
4229
|
))
|
|
4248
4230
|
]));
|
|
4249
4231
|
}
|
|
4250
|
-
}),
|
|
4232
|
+
}), Vo = /* @__PURE__ */ iu($o, [["__scopeId", "data-v-06f04cf8"]]), Uo = { class: "das-ai-senderopt" }, Zo = { class: "int-opt-box-text" }, Go = {
|
|
4251
4233
|
name: "senderOpt"
|
|
4252
|
-
},
|
|
4253
|
-
...
|
|
4234
|
+
}, Ko = /* @__PURE__ */ ou({
|
|
4235
|
+
...Go,
|
|
4254
4236
|
setup(u) {
|
|
4255
4237
|
const e = () => {
|
|
4256
|
-
|
|
4238
|
+
x.deepseek = !x.deepseek, gt();
|
|
4257
4239
|
};
|
|
4258
|
-
return (t, n) => (w(),
|
|
4240
|
+
return (t, n) => (w(), R("div", Uo, [
|
|
4259
4241
|
g(
|
|
4260
4242
|
"div",
|
|
4261
4243
|
{
|
|
4262
|
-
class: Ju(["int-opt-box", { actived: A(
|
|
4244
|
+
class: Ju(["int-opt-box", { actived: A(x).deepseek }]),
|
|
4263
4245
|
onClick: e
|
|
4264
4246
|
},
|
|
4265
4247
|
[
|
|
4266
4248
|
H(A(f0), {
|
|
4267
4249
|
size: "medium",
|
|
4268
|
-
iconColor: A(
|
|
4250
|
+
iconColor: A(x).deepseek ? "#5582F3" : "#212121"
|
|
4269
4251
|
}, null, 8, ["iconColor"]),
|
|
4270
4252
|
g(
|
|
4271
4253
|
"span",
|
|
4272
|
-
|
|
4254
|
+
Zo,
|
|
4273
4255
|
V(A(I)("深度思考")),
|
|
4274
4256
|
1
|
|
4275
4257
|
/* TEXT */
|
|
@@ -4280,31 +4262,31 @@ const yi = "data:image/gif;base64,R0lGODlhZABkAIABAABt8QAAACH/C05FVFNDQVBFMi4wAw
|
|
|
4280
4262
|
)
|
|
4281
4263
|
]));
|
|
4282
4264
|
}
|
|
4283
|
-
}),
|
|
4265
|
+
}), Jo = /* @__PURE__ */ iu(Ko, [["__scopeId", "data-v-888bb15e"]]), Qo = { class: "das-ai-sender-container" }, Wo = { class: "das-ai-sender-content" }, Xo = { class: "das-ai-sender-box" }, Yo = { class: "das-ai-int-scoll-box" }, ui = { class: "das-ai-int-box" }, ei = ["placeholder", "disabled"], ti = { class: "das-ai-textarea-mask" }, ni = { class: "das-ai-int-opt-box" }, ri = { class: "int-opt-right" }, oi = {
|
|
4284
4266
|
name: "sender"
|
|
4285
|
-
},
|
|
4286
|
-
...
|
|
4267
|
+
}, ii = /* @__PURE__ */ ou({
|
|
4268
|
+
...oi,
|
|
4287
4269
|
props: {
|
|
4288
4270
|
isNew: { type: Boolean, default: !0 }
|
|
4289
4271
|
},
|
|
4290
4272
|
emits: ["senderEmit"],
|
|
4291
4273
|
setup(u, { emit: e }) {
|
|
4292
|
-
const t = u, n = e, r = M(null),
|
|
4293
|
-
if (
|
|
4274
|
+
const t = u, n = e, r = M(null), o = su(() => !x.senderValue), c = su(() => {
|
|
4275
|
+
if (x.loading)
|
|
4294
4276
|
return I("回答中...");
|
|
4295
4277
|
if (t.isNew) {
|
|
4296
|
-
if (
|
|
4297
|
-
if (
|
|
4298
|
-
if (
|
|
4278
|
+
if (x.searchType == "0") return I("基于物联应用提问");
|
|
4279
|
+
if (x.searchType == "1") return I("基于知识库提问");
|
|
4280
|
+
if (x.searchType == "2") return I("基于全网提问");
|
|
4299
4281
|
} else
|
|
4300
4282
|
return I("继续提问");
|
|
4301
|
-
}),
|
|
4283
|
+
}), i = () => {
|
|
4302
4284
|
var h;
|
|
4303
4285
|
(h = r.value) == null || h.focus();
|
|
4304
4286
|
}, a = (h) => {
|
|
4305
4287
|
};
|
|
4306
4288
|
bu(
|
|
4307
|
-
() =>
|
|
4289
|
+
() => x.senderValue,
|
|
4308
4290
|
(h) => {
|
|
4309
4291
|
!h && r.value && (r.value.style.height = "21px");
|
|
4310
4292
|
}
|
|
@@ -4314,23 +4296,23 @@ const yi = "data:image/gif;base64,R0lGODlhZABkAIABAABt8QAAACH/C05FVFNDQVBFMi4wAw
|
|
|
4314
4296
|
d.style.height = "auto", d.style.height = d.scrollHeight + "px";
|
|
4315
4297
|
}, l = () => {
|
|
4316
4298
|
}, f = (h) => {
|
|
4317
|
-
h.preventDefault(), !(
|
|
4318
|
-
},
|
|
4299
|
+
h.preventDefault(), !(x.senderValue && !x.senderValue.trim()) && (n("senderEmit", "sender", x.senderValue), x.senderValue = "");
|
|
4300
|
+
}, _ = () => {
|
|
4319
4301
|
n("senderEmit", "stopMsg");
|
|
4320
4302
|
};
|
|
4321
|
-
return (h, d) => (w(),
|
|
4322
|
-
g("div",
|
|
4303
|
+
return (h, d) => (w(), R("div", Qo, [
|
|
4304
|
+
g("div", Wo, [
|
|
4323
4305
|
g("div", {
|
|
4324
|
-
onClick:
|
|
4306
|
+
onClick: i,
|
|
4325
4307
|
class: "focus-mask-top"
|
|
4326
4308
|
}),
|
|
4327
|
-
g("div",
|
|
4328
|
-
g("div",
|
|
4329
|
-
g("div",
|
|
4309
|
+
g("div", Xo, [
|
|
4310
|
+
g("div", Yo, [
|
|
4311
|
+
g("div", ui, [
|
|
4330
4312
|
yu(g("textarea", {
|
|
4331
4313
|
class: "das-ai-textarea",
|
|
4332
4314
|
onKeydown: Jt(f, ["enter"]),
|
|
4333
|
-
"onUpdate:modelValue": d[0] || (d[0] = (y) => A(
|
|
4315
|
+
"onUpdate:modelValue": d[0] || (d[0] = (y) => A(x).senderValue = y),
|
|
4334
4316
|
placeholder: c.value,
|
|
4335
4317
|
rows: "8",
|
|
4336
4318
|
maxlength: "512",
|
|
@@ -4339,45 +4321,45 @@ const yi = "data:image/gif;base64,R0lGODlhZABkAIABAABt8QAAACH/C05FVFNDQVBFMi4wAw
|
|
|
4339
4321
|
onFocus: l,
|
|
4340
4322
|
onInput: s,
|
|
4341
4323
|
onChange: a,
|
|
4342
|
-
disabled: A(
|
|
4343
|
-
}, null, 40,
|
|
4344
|
-
[Qt, A(
|
|
4324
|
+
disabled: A(x).loading
|
|
4325
|
+
}, null, 40, ei), [
|
|
4326
|
+
[Qt, A(x).senderValue]
|
|
4345
4327
|
]),
|
|
4346
4328
|
g(
|
|
4347
4329
|
"div",
|
|
4348
|
-
|
|
4349
|
-
V(A(
|
|
4330
|
+
ti,
|
|
4331
|
+
V(A(x).senderValue),
|
|
4350
4332
|
1
|
|
4351
4333
|
/* TEXT */
|
|
4352
4334
|
)
|
|
4353
4335
|
])
|
|
4354
4336
|
]),
|
|
4355
|
-
g("div",
|
|
4337
|
+
g("div", ni, [
|
|
4356
4338
|
g("div", {
|
|
4357
|
-
onClick:
|
|
4339
|
+
onClick: i,
|
|
4358
4340
|
class: "focus-mask-bottom"
|
|
4359
4341
|
}),
|
|
4360
|
-
H(
|
|
4361
|
-
g("div",
|
|
4362
|
-
A(
|
|
4342
|
+
H(Jo),
|
|
4343
|
+
g("div", ri, [
|
|
4344
|
+
A(x).loading ? T("v-if", !0) : (w(), R(
|
|
4363
4345
|
"div",
|
|
4364
4346
|
{
|
|
4365
4347
|
key: 0,
|
|
4366
4348
|
onClick: f,
|
|
4367
|
-
class: Ju(["int-opt-right-icon", { disabled:
|
|
4349
|
+
class: Ju(["int-opt-right-icon", { disabled: o.value }])
|
|
4368
4350
|
},
|
|
4369
4351
|
[
|
|
4370
4352
|
H(A(d0), {
|
|
4371
4353
|
customSize: "12px",
|
|
4372
|
-
iconColor:
|
|
4354
|
+
iconColor: o.value ? "#fafafa" : "#fff"
|
|
4373
4355
|
}, null, 8, ["iconColor"])
|
|
4374
4356
|
],
|
|
4375
4357
|
2
|
|
4376
4358
|
/* CLASS */
|
|
4377
4359
|
)),
|
|
4378
|
-
A(
|
|
4360
|
+
A(x).loading ? (w(), R("div", {
|
|
4379
4361
|
key: 1,
|
|
4380
|
-
onClick: Fe(
|
|
4362
|
+
onClick: Fe(_, ["stop"]),
|
|
4381
4363
|
class: "loading-btn"
|
|
4382
4364
|
}, [
|
|
4383
4365
|
T(' <das-spin type="component"> </das-spin> '),
|
|
@@ -4395,22 +4377,22 @@ const yi = "data:image/gif;base64,R0lGODlhZABkAIABAABt8QAAACH/C05FVFNDQVBFMi4wAw
|
|
|
4395
4377
|
])
|
|
4396
4378
|
]));
|
|
4397
4379
|
}
|
|
4398
|
-
}),
|
|
4380
|
+
}), ci = /* @__PURE__ */ iu(ii, [["__scopeId", "data-v-d92771fb"]]), ai = { class: "das-ai-addtbn-box" }, si = {
|
|
4399
4381
|
style: { "margin-left": "4px" },
|
|
4400
4382
|
class: "add-text"
|
|
4401
|
-
},
|
|
4383
|
+
}, li = {
|
|
4402
4384
|
name: "addNew"
|
|
4403
|
-
},
|
|
4404
|
-
...
|
|
4385
|
+
}, di = /* @__PURE__ */ ou({
|
|
4386
|
+
...li,
|
|
4405
4387
|
emits: ["addNewEmit"],
|
|
4406
4388
|
setup(u, { emit: e }) {
|
|
4407
4389
|
const t = e, n = (r) => {
|
|
4408
4390
|
t("addNewEmit", r);
|
|
4409
4391
|
};
|
|
4410
|
-
return (r,
|
|
4392
|
+
return (r, o) => (w(), R("div", ai, [
|
|
4411
4393
|
g("div", {
|
|
4412
4394
|
class: "add-box",
|
|
4413
|
-
onClick:
|
|
4395
|
+
onClick: o[0] || (o[0] = (c) => n("addNew"))
|
|
4414
4396
|
}, [
|
|
4415
4397
|
H(A(p0), {
|
|
4416
4398
|
size: "medium",
|
|
@@ -4418,16 +4400,16 @@ const yi = "data:image/gif;base64,R0lGODlhZABkAIABAABt8QAAACH/C05FVFNDQVBFMi4wAw
|
|
|
4418
4400
|
}),
|
|
4419
4401
|
g(
|
|
4420
4402
|
"span",
|
|
4421
|
-
|
|
4403
|
+
si,
|
|
4422
4404
|
V(A(I)("开启新对话")),
|
|
4423
4405
|
1
|
|
4424
4406
|
/* TEXT */
|
|
4425
4407
|
)
|
|
4426
4408
|
]),
|
|
4427
|
-
A(
|
|
4409
|
+
A(x).showScrollBom ? (w(), R("div", {
|
|
4428
4410
|
key: 0,
|
|
4429
4411
|
class: "scroll-opt-box",
|
|
4430
|
-
onClick:
|
|
4412
|
+
onClick: o[1] || (o[1] = (c) => n("scrollBom"))
|
|
4431
4413
|
}, [
|
|
4432
4414
|
H(A(h0), {
|
|
4433
4415
|
size: "large",
|
|
@@ -4436,13 +4418,13 @@ const yi = "data:image/gif;base64,R0lGODlhZABkAIABAABt8QAAACH/C05FVFNDQVBFMi4wAw
|
|
|
4436
4418
|
])) : T("v-if", !0)
|
|
4437
4419
|
]));
|
|
4438
4420
|
}
|
|
4439
|
-
}),
|
|
4421
|
+
}), fi = /* @__PURE__ */ iu(di, [["__scopeId", "data-v-c94020e2"]]), hi = { class: "das-ai-prompt" }, pi = { class: "das-ai-prompt-title" }, bi = { class: "das-ai-prompt-tip" }, mi = {
|
|
4440
4422
|
key: 0,
|
|
4441
4423
|
class: "das-ai-prompt-small"
|
|
4442
|
-
},
|
|
4424
|
+
}, xi = ["onClick"], _i = {
|
|
4443
4425
|
name: "useChat"
|
|
4444
|
-
},
|
|
4445
|
-
...
|
|
4426
|
+
}, gi = /* @__PURE__ */ ou({
|
|
4427
|
+
..._i,
|
|
4446
4428
|
props: {
|
|
4447
4429
|
list: { default: [] }
|
|
4448
4430
|
},
|
|
@@ -4451,62 +4433,62 @@ const yi = "data:image/gif;base64,R0lGODlhZABkAIABAABt8QAAACH/C05FVFNDQVBFMi4wAw
|
|
|
4451
4433
|
const t = e, n = (r) => {
|
|
4452
4434
|
t("click", r);
|
|
4453
4435
|
};
|
|
4454
|
-
return
|
|
4455
|
-
}), (r,
|
|
4436
|
+
return qu(() => {
|
|
4437
|
+
}), (r, o) => (w(), R("div", hi, [
|
|
4456
4438
|
g(
|
|
4457
4439
|
"div",
|
|
4458
|
-
|
|
4440
|
+
pi,
|
|
4459
4441
|
V(A(I)("嗨!我是AI助手")),
|
|
4460
4442
|
1
|
|
4461
4443
|
/* TEXT */
|
|
4462
4444
|
),
|
|
4463
4445
|
g(
|
|
4464
4446
|
"div",
|
|
4465
|
-
|
|
4447
|
+
bi,
|
|
4466
4448
|
V(A(I)("我可以帮你分析,写报告,调节设备,预订会议室,请把你的任务交给我吧~")),
|
|
4467
4449
|
1
|
|
4468
4450
|
/* TEXT */
|
|
4469
4451
|
),
|
|
4470
|
-
|
|
4452
|
+
r.list.length ? (w(), R(
|
|
4471
4453
|
"div",
|
|
4472
|
-
|
|
4454
|
+
mi,
|
|
4473
4455
|
V(A(I)("你可以这样说")),
|
|
4474
4456
|
1
|
|
4475
4457
|
/* TEXT */
|
|
4476
4458
|
)) : T("v-if", !0),
|
|
4477
|
-
(w(!0),
|
|
4459
|
+
(w(!0), R(
|
|
4478
4460
|
Nu,
|
|
4479
4461
|
null,
|
|
4480
|
-
Qu(
|
|
4481
|
-
onClick: (
|
|
4462
|
+
Qu(r.list, (c) => (w(), R("div", {
|
|
4463
|
+
onClick: (i) => n(c),
|
|
4482
4464
|
class: "das-ai-prompt-item"
|
|
4483
|
-
}, V(c.text), 9,
|
|
4465
|
+
}, V(c.text), 9, xi))),
|
|
4484
4466
|
256
|
|
4485
4467
|
/* UNKEYED_FRAGMENT */
|
|
4486
4468
|
))
|
|
4487
4469
|
]));
|
|
4488
4470
|
}
|
|
4489
|
-
}),
|
|
4471
|
+
}), ki = /* @__PURE__ */ iu(gi, [["__scopeId", "data-v-9820bbca"]]), Zt = "v1", Fu = mt(`/api/llm/knowledge/${Zt}`), vi = mt(`/api/llm/vector/${Zt}`);
|
|
4490
4472
|
xt.get("token");
|
|
4491
4473
|
xt.post("putObject");
|
|
4492
|
-
const
|
|
4493
|
-
|
|
4494
|
-
const La =
|
|
4495
|
-
|
|
4496
|
-
|
|
4497
|
-
const
|
|
4474
|
+
const yi = vi.get("/large-model/general-question"), Ai = Fu.post("/chat/stop"), Ci = Fu.post("/chat/save-knowledge"), Di = Fu.get("/chat"), Ei = Fu.get("/chat/chat-details"), Fi = Fu.delete("/chat/delete-by-user"), wi = Fu.delete("/chat"), Si = Fu.get("/chat/delete-by-query-id");
|
|
4475
|
+
Ru.post("/file");
|
|
4476
|
+
const La = Ru.post("/file/save-file"), zi = Ru.get("/folder"), Ii = Ru.post("/folder/listAllByCondition");
|
|
4477
|
+
Ru.post("/folder/lazy-tree");
|
|
4478
|
+
Ru.post("/folder/tree-search");
|
|
4479
|
+
const Ti = { class: "das-ai-select-container" }, Mi = { class: "das-ai-select-text-box" }, Oi = { class: "das-ai-select-text" }, Ni = { class: "das-ai-select-box" }, Li = {
|
|
4498
4480
|
key: 0,
|
|
4499
4481
|
class: "das-ai-select-text"
|
|
4500
|
-
},
|
|
4482
|
+
}, Bi = { class: "das-ai-type-list" }, qi = ["onClick"], Ri = { class: "das-ai-type-icon" }, Pi = { class: "das-ai-type-box" }, ji = { class: "das-ai-type-name" }, Hi = { class: "das-ai-type-desc" }, $i = ["onClick"], Vi = { class: "das-ai-type-tree" }, Ui = {
|
|
4501
4483
|
name: "selectType"
|
|
4502
|
-
},
|
|
4503
|
-
...
|
|
4484
|
+
}, Zi = /* @__PURE__ */ ou({
|
|
4485
|
+
...Ui,
|
|
4504
4486
|
props: {
|
|
4505
4487
|
listLength: { default: 0 }
|
|
4506
4488
|
},
|
|
4507
4489
|
emits: ["back"],
|
|
4508
4490
|
setup(u, { emit: e }) {
|
|
4509
|
-
const t = M(!1), n = M(!1), r = M(!1),
|
|
4491
|
+
const t = M(!1), n = M(!1), r = M(!1), o = M({
|
|
4510
4492
|
modifiers: [
|
|
4511
4493
|
{
|
|
4512
4494
|
name: "offset",
|
|
@@ -4519,61 +4501,61 @@ const To = { class: "das-ai-select-container" }, Mo = { class: "das-ai-select-te
|
|
|
4519
4501
|
{ id: "1", name: I("知识库"), desc: I("选择在某个知识库中搜索"), icon: "knowOpen" },
|
|
4520
4502
|
{ id: "0", name: I("物联应用"), desc: I("在权限范围内的应用中搜索"), icon: "yingyong" },
|
|
4521
4503
|
{ id: "2", name: I("全网"), desc: I("在整个大模型中搜索"), icon: "intnet" }
|
|
4522
|
-
]),
|
|
4504
|
+
]), i = M(!1), a = M([]), s = M(""), l = M(""), f = e, _ = () => {
|
|
4523
4505
|
f("back");
|
|
4524
|
-
}, h = su(() => c.value.find((
|
|
4525
|
-
}, C = (
|
|
4506
|
+
}, h = su(() => c.value.find((E) => E.id === x.searchType)), d = su(() => x.searchType == "1" ? I("基于知识库") : x.searchType == "0" ? I("基于物联应用") : x.searchType == "2" ? I("基于全网") : I("基于全部")), y = su(() => x.folderId && x.folderName ? x.folderName : I("选择在某个知识库中搜索")), v = (E) => {
|
|
4507
|
+
}, C = (E) => {
|
|
4526
4508
|
r.value = !1;
|
|
4527
|
-
}, k = (
|
|
4528
|
-
l.value =
|
|
4529
|
-
},
|
|
4530
|
-
|
|
4531
|
-
},
|
|
4532
|
-
|
|
4533
|
-
},
|
|
4534
|
-
const
|
|
4509
|
+
}, k = (E) => {
|
|
4510
|
+
l.value = E.id, x.folderId = E.id == x.allKnowId ? "" : E.id, x.folderName = x.folderId ? E.folderName : "", r.value = !1, n.value = !1;
|
|
4511
|
+
}, p = (E) => {
|
|
4512
|
+
x.searchType = E.id, Vu(), l.value = x.folderId ? x.folderId : x.allKnowId, r.value = !0, m();
|
|
4513
|
+
}, b = async (E) => {
|
|
4514
|
+
x.searchType = E.id, n.value = !1, Vu();
|
|
4515
|
+
}, m = async () => {
|
|
4516
|
+
const E = {
|
|
4535
4517
|
folderName: "",
|
|
4536
4518
|
// 文件夹名称
|
|
4537
4519
|
// authority:true,//权限标识 true:有 false:无
|
|
4538
4520
|
excludeType: !0
|
|
4539
4521
|
// 是否排除内置文件夹 默认不排除
|
|
4540
4522
|
};
|
|
4541
|
-
|
|
4542
|
-
const [P, j] = await
|
|
4543
|
-
if (
|
|
4523
|
+
i.value = !0;
|
|
4524
|
+
const [P, j] = await Ii(E).run();
|
|
4525
|
+
if (i.value = !1, P)
|
|
4544
4526
|
return;
|
|
4545
4527
|
let K = j;
|
|
4546
4528
|
K && K.length ? (K = [
|
|
4547
4529
|
{
|
|
4548
4530
|
disabled: !1,
|
|
4549
4531
|
authority: !0,
|
|
4550
|
-
id:
|
|
4532
|
+
id: x.allKnowId,
|
|
4551
4533
|
folderName: I("全部"),
|
|
4552
4534
|
childFolderList: j,
|
|
4553
|
-
folderPath:
|
|
4535
|
+
folderPath: x.allKnowId,
|
|
4554
4536
|
pathName: I("全部")
|
|
4555
4537
|
}
|
|
4556
4538
|
], K.forEach((du) => {
|
|
4557
4539
|
O(du);
|
|
4558
|
-
})) : (l.value = "",
|
|
4559
|
-
}, O = (
|
|
4560
|
-
|
|
4561
|
-
O(K,
|
|
4540
|
+
})) : (l.value = "", x.folderId = "", x.folderName = ""), a.value = K;
|
|
4541
|
+
}, O = (E, P, j) => {
|
|
4542
|
+
E.disabled = !E.authority, E.path = P ? P + `/${E.id}` : E.id, E.pathName = j ? j + `/${E.folderName}` : E.folderName, x.folderId && x.folderId == E.id && !E.authority && (x.folderId = "", x.folderName = "", l.value = ""), E.childFolderList && E.childFolderList.length && E.childFolderList.forEach((K) => {
|
|
4543
|
+
O(K, E.path, E.pathName);
|
|
4562
4544
|
});
|
|
4563
4545
|
};
|
|
4564
|
-
return (
|
|
4546
|
+
return (E, P) => (w(), R("div", Ti, [
|
|
4565
4547
|
yu(g(
|
|
4566
4548
|
"div",
|
|
4567
|
-
|
|
4549
|
+
Mi,
|
|
4568
4550
|
[
|
|
4569
4551
|
H(A(Se), {
|
|
4570
|
-
onClick:
|
|
4552
|
+
onClick: _,
|
|
4571
4553
|
size: "large",
|
|
4572
4554
|
iconColor: "#666666"
|
|
4573
4555
|
}),
|
|
4574
4556
|
g(
|
|
4575
4557
|
"div",
|
|
4576
|
-
|
|
4558
|
+
Oi,
|
|
4577
4559
|
V(d.value),
|
|
4578
4560
|
1
|
|
4579
4561
|
/* TEXT */
|
|
@@ -4582,11 +4564,11 @@ const To = { class: "das-ai-select-container" }, Mo = { class: "das-ai-select-te
|
|
|
4582
4564
|
512
|
|
4583
4565
|
/* NEED_PATCH */
|
|
4584
4566
|
), [
|
|
4585
|
-
[Hu,
|
|
4567
|
+
[Hu, E.listLength]
|
|
4586
4568
|
]),
|
|
4587
4569
|
H(A(m0), {
|
|
4588
4570
|
popperClass: "das-ai-select-popover",
|
|
4589
|
-
"popper-options":
|
|
4571
|
+
"popper-options": o.value,
|
|
4590
4572
|
"show-arrow": !1,
|
|
4591
4573
|
width: 428,
|
|
4592
4574
|
trigger: "click",
|
|
@@ -4599,12 +4581,12 @@ const To = { class: "das-ai-select-container" }, Mo = { class: "das-ai-select-te
|
|
|
4599
4581
|
reference: J(() => [
|
|
4600
4582
|
yu(g(
|
|
4601
4583
|
"div",
|
|
4602
|
-
|
|
4584
|
+
Ni,
|
|
4603
4585
|
[
|
|
4604
4586
|
T(' <DasIcon v-if="currentItem" :icon="currentItem.icon" size="medium" iconColor="inherit"></DasIcon> '),
|
|
4605
|
-
h.value ? (w(),
|
|
4587
|
+
h.value ? (w(), R(
|
|
4606
4588
|
"span",
|
|
4607
|
-
|
|
4589
|
+
Li,
|
|
4608
4590
|
V(h.value.name),
|
|
4609
4591
|
1
|
|
4610
4592
|
/* TEXT */
|
|
@@ -4623,55 +4605,55 @@ const To = { class: "das-ai-select-container" }, Mo = { class: "das-ai-select-te
|
|
|
4623
4605
|
512
|
|
4624
4606
|
/* NEED_PATCH */
|
|
4625
4607
|
), [
|
|
4626
|
-
[Hu, !
|
|
4608
|
+
[Hu, !E.listLength]
|
|
4627
4609
|
])
|
|
4628
4610
|
]),
|
|
4629
4611
|
default: J(() => [
|
|
4630
4612
|
yu(g(
|
|
4631
4613
|
"div",
|
|
4632
|
-
|
|
4614
|
+
Bi,
|
|
4633
4615
|
[
|
|
4634
|
-
(w(!0),
|
|
4616
|
+
(w(!0), R(
|
|
4635
4617
|
Nu,
|
|
4636
4618
|
null,
|
|
4637
|
-
Qu(c.value, (j) => (w(),
|
|
4638
|
-
onClick: (K) =>
|
|
4639
|
-
class: Ju(["das-ai-type-item", { selected: A(
|
|
4619
|
+
Qu(c.value, (j) => (w(), R("div", {
|
|
4620
|
+
onClick: (K) => b(j),
|
|
4621
|
+
class: Ju(["das-ai-type-item", { selected: A(x).searchType == j.id }])
|
|
4640
4622
|
}, [
|
|
4641
|
-
g("div",
|
|
4642
|
-
A(
|
|
4623
|
+
g("div", Ri, [
|
|
4624
|
+
A(x).searchType == j.id ? (w(), X(A(b0), {
|
|
4643
4625
|
key: 0,
|
|
4644
4626
|
customSize: "18px",
|
|
4645
4627
|
iconColor: "#FFFFFF"
|
|
4646
4628
|
})) : T("v-if", !0)
|
|
4647
4629
|
]),
|
|
4648
|
-
g("div",
|
|
4630
|
+
g("div", Pi, [
|
|
4649
4631
|
g(
|
|
4650
4632
|
"div",
|
|
4651
|
-
|
|
4633
|
+
ji,
|
|
4652
4634
|
V(j.name),
|
|
4653
4635
|
1
|
|
4654
4636
|
/* TEXT */
|
|
4655
4637
|
),
|
|
4656
4638
|
g(
|
|
4657
4639
|
"div",
|
|
4658
|
-
|
|
4640
|
+
Hi,
|
|
4659
4641
|
V(j.id == 1 ? y.value : j.desc),
|
|
4660
4642
|
1
|
|
4661
4643
|
/* TEXT */
|
|
4662
4644
|
)
|
|
4663
4645
|
]),
|
|
4664
|
-
j.id == "1" ? (w(),
|
|
4646
|
+
j.id == "1" ? (w(), R("div", {
|
|
4665
4647
|
key: 0,
|
|
4666
|
-
onClick: Fe((K) =>
|
|
4648
|
+
onClick: Fe((K) => p(j), ["stop"]),
|
|
4667
4649
|
class: "know-entry"
|
|
4668
4650
|
}, [
|
|
4669
4651
|
H(A(ft), {
|
|
4670
4652
|
customSize: "18px",
|
|
4671
4653
|
iconColor: "#666666"
|
|
4672
4654
|
})
|
|
4673
|
-
], 8, $
|
|
4674
|
-
], 10,
|
|
4655
|
+
], 8, $i)) : T("v-if", !0)
|
|
4656
|
+
], 10, qi))),
|
|
4675
4657
|
256
|
|
4676
4658
|
/* UNKEYED_FRAGMENT */
|
|
4677
4659
|
))
|
|
@@ -4681,7 +4663,7 @@ const To = { class: "das-ai-select-container" }, Mo = { class: "das-ai-select-te
|
|
|
4681
4663
|
), [
|
|
4682
4664
|
[Hu, !r.value]
|
|
4683
4665
|
]),
|
|
4684
|
-
yu((w(),
|
|
4666
|
+
yu((w(), R("div", Vi, [
|
|
4685
4667
|
H(A(x0), {
|
|
4686
4668
|
ref: "folderTreeRef",
|
|
4687
4669
|
data: a.value,
|
|
@@ -4697,7 +4679,7 @@ const To = { class: "das-ai-select-container" }, Mo = { class: "das-ai-select-te
|
|
|
4697
4679
|
onNodeClick: k
|
|
4698
4680
|
}, null, 8, ["data", "inputOptions", "modelValue", "filter-value"])
|
|
4699
4681
|
])), [
|
|
4700
|
-
[A(bt),
|
|
4682
|
+
[A(bt), i.value],
|
|
4701
4683
|
[Hu, r.value]
|
|
4702
4684
|
])
|
|
4703
4685
|
]),
|
|
@@ -4706,12 +4688,12 @@ const To = { class: "das-ai-select-container" }, Mo = { class: "das-ai-select-te
|
|
|
4706
4688
|
}, 8, ["popper-options", "visible", "disabled"])
|
|
4707
4689
|
]));
|
|
4708
4690
|
}
|
|
4709
|
-
}),
|
|
4691
|
+
}), Gi = /* @__PURE__ */ iu(Zi, [["__scopeId", "data-v-f508fe5b"]]), Ki = { class: "das-ai-reference-content-page" }, Ji = { class: "reference-header" }, Qi = { style: { "margin-left": "16px" } }, Wi = { class: "reference-list" }, Xi = { class: "reference-file-scroll" }, Yi = ["onClick"], uc = { class: "reference-file-title" }, ec = { style: { "margin-right": "4px" } }, tc = {
|
|
4710
4692
|
class: "reference-file-title-text",
|
|
4711
4693
|
style: { "margin-left": "4px" }
|
|
4712
4694
|
}, nc = { class: "reference-file-summary" }, rc = {
|
|
4713
4695
|
name: "referenceContent"
|
|
4714
|
-
},
|
|
4696
|
+
}, oc = /* @__PURE__ */ ou({
|
|
4715
4697
|
...rc,
|
|
4716
4698
|
props: {
|
|
4717
4699
|
item: { default: {} }
|
|
@@ -4720,45 +4702,45 @@ const To = { class: "das-ai-select-container" }, Mo = { class: "das-ai-select-te
|
|
|
4720
4702
|
setup(u, { emit: e }) {
|
|
4721
4703
|
const t = e;
|
|
4722
4704
|
M();
|
|
4723
|
-
const n = M(-1), r = M([]),
|
|
4705
|
+
const n = M(-1), r = M([]), o = () => {
|
|
4724
4706
|
t("back");
|
|
4725
4707
|
};
|
|
4726
|
-
|
|
4708
|
+
qu(() => {
|
|
4727
4709
|
});
|
|
4728
4710
|
const c = (a) => {
|
|
4729
4711
|
const s = `${st().baseURL}/oss/`;
|
|
4730
4712
|
return a.includes(s);
|
|
4731
|
-
},
|
|
4713
|
+
}, i = (a, s) => {
|
|
4732
4714
|
if (n.value = s, r.value.includes(s) || r.value.push(s), a.type == "url") {
|
|
4733
4715
|
a.webUrl && t("toApp", a.webUrl);
|
|
4734
4716
|
return;
|
|
4735
4717
|
}
|
|
4736
4718
|
c(a.url) ? t("preview", a.url) : window.open(a.url, "_blank");
|
|
4737
4719
|
};
|
|
4738
|
-
return (a, s) => (w(),
|
|
4739
|
-
g("div",
|
|
4720
|
+
return (a, s) => (w(), R("div", Ki, [
|
|
4721
|
+
g("div", Ji, [
|
|
4740
4722
|
H(A(Se), {
|
|
4741
|
-
onClick:
|
|
4723
|
+
onClick: o,
|
|
4742
4724
|
size: "large",
|
|
4743
4725
|
iconColor: "#666666"
|
|
4744
4726
|
}),
|
|
4745
4727
|
g(
|
|
4746
4728
|
"span",
|
|
4747
|
-
|
|
4748
|
-
V(A(I)("参考内容(共$0条)",
|
|
4729
|
+
Qi,
|
|
4730
|
+
V(A(I)("参考内容(共$0条)", a.item.file.length)),
|
|
4749
4731
|
1
|
|
4750
4732
|
/* TEXT */
|
|
4751
4733
|
)
|
|
4752
4734
|
]),
|
|
4753
|
-
g("div",
|
|
4735
|
+
g("div", Wi, [
|
|
4754
4736
|
H(A(we), null, {
|
|
4755
4737
|
default: J(() => [
|
|
4756
|
-
g("div",
|
|
4757
|
-
(w(!0),
|
|
4738
|
+
g("div", Xi, [
|
|
4739
|
+
(w(!0), R(
|
|
4758
4740
|
Nu,
|
|
4759
4741
|
null,
|
|
4760
|
-
Qu(
|
|
4761
|
-
onClick: (
|
|
4742
|
+
Qu(a.item.file, (l, f) => (w(), R("div", {
|
|
4743
|
+
onClick: (_) => i(l, f),
|
|
4762
4744
|
class: Ju(["reference-file-item", { current: n.value == f, selected: r.value.includes(f) }])
|
|
4763
4745
|
}, [
|
|
4764
4746
|
T(" v-das-tooltip "),
|
|
@@ -4790,7 +4772,7 @@ const To = { class: "das-ai-select-container" }, Mo = { class: "das-ai-select-te
|
|
|
4790
4772
|
1
|
|
4791
4773
|
/* TEXT */
|
|
4792
4774
|
)
|
|
4793
|
-
], 10,
|
|
4775
|
+
], 10, Yi))),
|
|
4794
4776
|
256
|
|
4795
4777
|
/* UNKEYED_FRAGMENT */
|
|
4796
4778
|
))
|
|
@@ -4802,11 +4784,11 @@ const To = { class: "das-ai-select-container" }, Mo = { class: "das-ai-select-te
|
|
|
4802
4784
|
])
|
|
4803
4785
|
]));
|
|
4804
4786
|
}
|
|
4805
|
-
}),
|
|
4787
|
+
}), ic = /* @__PURE__ */ iu(oc, [["__scopeId", "data-v-48ac5af8"]]), cc = ot(() => import("./index-DCyDBdoc.js")), ac = () => {
|
|
4806
4788
|
const u = M(null), e = M(!1);
|
|
4807
4789
|
let t = "", n = "";
|
|
4808
4790
|
return {
|
|
4809
|
-
deletaDialogVue: () =>
|
|
4791
|
+
deletaDialogVue: () => it(cc, {
|
|
4810
4792
|
ref: u,
|
|
4811
4793
|
onConfirm: (c) => {
|
|
4812
4794
|
n = !0, e.value = !1;
|
|
@@ -4819,8 +4801,8 @@ const To = { class: "das-ai-select-container" }, Mo = { class: "das-ai-select-te
|
|
|
4819
4801
|
}
|
|
4820
4802
|
}),
|
|
4821
4803
|
showDeleteDialog: async (c) => {
|
|
4822
|
-
var
|
|
4823
|
-
return t = c || I("删除后将无法恢复"), (
|
|
4804
|
+
var i;
|
|
4805
|
+
return t = c || I("删除后将无法恢复"), (i = u.value) == null || i.open(t), e.value = !0, new Promise((a, s) => {
|
|
4824
4806
|
const l = bu(() => e.value, (f) => {
|
|
4825
4807
|
n ? a(n) : s(n), l();
|
|
4826
4808
|
});
|
|
@@ -4836,57 +4818,57 @@ const To = { class: "das-ai-select-container" }, Mo = { class: "das-ai-select-te
|
|
|
4836
4818
|
class: "history-dialogue-scroll"
|
|
4837
4819
|
}, bc = ["onClick"], mc = { class: "item-title" }, xc = { class: "item-bottom" }, _c = { class: "item-bottom-left" }, gc = { class: "item-type" }, kc = {
|
|
4838
4820
|
name: "history"
|
|
4839
|
-
}, vc = /* @__PURE__ */
|
|
4821
|
+
}, vc = /* @__PURE__ */ ou({
|
|
4840
4822
|
...kc,
|
|
4841
4823
|
props: {
|
|
4842
4824
|
chatId: { default: "" }
|
|
4843
4825
|
},
|
|
4844
4826
|
emits: ["back", "record"],
|
|
4845
4827
|
setup(u, { emit: e }) {
|
|
4846
|
-
const t = M(!1), { deletaDialogVue: n, showDeleteDialog: r } = ac(),
|
|
4828
|
+
const t = M(!1), { deletaDialogVue: n, showDeleteDialog: r } = ac(), o = M([]), c = e, i = () => {
|
|
4847
4829
|
c("back");
|
|
4848
4830
|
}, a = (k) => {
|
|
4849
|
-
let
|
|
4850
|
-
return
|
|
4831
|
+
let p = k.replace(/^(#+)\s/gm, "");
|
|
4832
|
+
return p = p.replace(/^([-*+]|\d+\.)\s/gm, ""), p = p.replace(/([*_]{1,2})(.*?)\1/g, "$2"), p = p.replace(/```[\s\S]*?```/g, ""), p = p.replace(/`(.*?)`/g, "$1"), p = p.replace(/\[([^\]]+)\]\([^)]+\)/g, "$1"), p = p.replace(/!\[([^\]]+)\]\([^)]+\)/g, "$1"), p = p.replace(/<[^>]*>/g, ""), p;
|
|
4851
4833
|
}, s = (k) => {
|
|
4852
|
-
const
|
|
4853
|
-
|
|
4854
|
-
}, l = M(1), f = M(1),
|
|
4834
|
+
const p = document.querySelector("#history-dialogue-scrollbox .das-ai-wrap-class");
|
|
4835
|
+
p.scrollHeight - p.clientHeight - k.scrollTop <= 20 && !t.value && l.value < f.value && (l.value = l.value + 1, h());
|
|
4836
|
+
}, l = M(1), f = M(1), _ = M(20), h = async () => {
|
|
4855
4837
|
t.value = !0;
|
|
4856
4838
|
const k = {
|
|
4857
4839
|
pageIndex: l.value,
|
|
4858
|
-
pageSize:
|
|
4859
|
-
}, [
|
|
4860
|
-
t.value = !1, !
|
|
4861
|
-
|
|
4862
|
-
}), l.value == 1 ?
|
|
4840
|
+
pageSize: _.value
|
|
4841
|
+
}, [p, b] = await Di(k).run();
|
|
4842
|
+
t.value = !1, !p && (b.data && b.data.length && b.data.forEach((m) => {
|
|
4843
|
+
m.time = m.createdAt ? dt(m.createdAt).format("YYYY-MM-DD HH:mm:ss") : "", m.answerText = m.answer ? a(m.answer) : "";
|
|
4844
|
+
}), l.value == 1 ? o.value = b.data : o.value = o.value.concat(b.data), f.value = b.totalPage);
|
|
4863
4845
|
}, d = (k) => k.searchType == 0 ? I("物联应用") : k.searchType == 1 ? I("知识库") : k.searchType == 2 ? I("全网") : I("全部"), y = async (k) => {
|
|
4864
4846
|
c("record", k);
|
|
4865
4847
|
}, v = async (k) => {
|
|
4866
4848
|
await r(I("删除后,该会话将不可恢复,")), k.id, t.value = !0;
|
|
4867
|
-
const [
|
|
4868
|
-
if (
|
|
4849
|
+
const [p, b] = await wi({ id: k.id }).run();
|
|
4850
|
+
if (p) {
|
|
4869
4851
|
t.value = !1;
|
|
4870
4852
|
return;
|
|
4871
4853
|
}
|
|
4872
4854
|
h();
|
|
4873
4855
|
}, C = async (k) => {
|
|
4874
|
-
if (!
|
|
4856
|
+
if (!o.value.length) return;
|
|
4875
4857
|
await r(I("清空后,所有历史将无法找回,")), t.value = !0;
|
|
4876
|
-
const [
|
|
4877
|
-
if (
|
|
4858
|
+
const [p, b] = await Fi().run();
|
|
4859
|
+
if (p) {
|
|
4878
4860
|
t.value = !1;
|
|
4879
4861
|
return;
|
|
4880
4862
|
}
|
|
4881
4863
|
h();
|
|
4882
4864
|
};
|
|
4883
|
-
return
|
|
4865
|
+
return qu(() => {
|
|
4884
4866
|
h();
|
|
4885
|
-
}), (k,
|
|
4867
|
+
}), (k, p) => yu((w(), R("div", sc, [
|
|
4886
4868
|
g("div", lc, [
|
|
4887
4869
|
g("div", dc, [
|
|
4888
4870
|
H(A(Se), {
|
|
4889
|
-
onClick:
|
|
4871
|
+
onClick: i,
|
|
4890
4872
|
size: "large",
|
|
4891
4873
|
iconColor: "#666666"
|
|
4892
4874
|
}),
|
|
@@ -4928,18 +4910,18 @@ const To = { class: "das-ai-select-container" }, Mo = { class: "das-ai-select-te
|
|
|
4928
4910
|
onScroll: s
|
|
4929
4911
|
}, {
|
|
4930
4912
|
default: J(() => [
|
|
4931
|
-
|
|
4932
|
-
(w(!0),
|
|
4913
|
+
o.value.length ? (w(), R("div", pc, [
|
|
4914
|
+
(w(!0), R(
|
|
4933
4915
|
Nu,
|
|
4934
4916
|
null,
|
|
4935
|
-
Qu(
|
|
4917
|
+
Qu(o.value, (b, m) => (w(), R("div", {
|
|
4936
4918
|
class: "history-dialogue-item",
|
|
4937
|
-
onClick: (O) => y(
|
|
4919
|
+
onClick: (O) => y(b)
|
|
4938
4920
|
}, [
|
|
4939
4921
|
g(
|
|
4940
4922
|
"div",
|
|
4941
4923
|
mc,
|
|
4942
|
-
V(
|
|
4924
|
+
V(b.title),
|
|
4943
4925
|
1
|
|
4944
4926
|
/* TEXT */
|
|
4945
4927
|
),
|
|
@@ -4949,7 +4931,7 @@ const To = { class: "das-ai-select-container" }, Mo = { class: "das-ai-select-te
|
|
|
4949
4931
|
H(A(Cu), {
|
|
4950
4932
|
placement: "top-start",
|
|
4951
4933
|
disabled: !0,
|
|
4952
|
-
text:
|
|
4934
|
+
text: b.answerText,
|
|
4953
4935
|
row: "2"
|
|
4954
4936
|
}, null, 8, ["text"]),
|
|
4955
4937
|
g("div", xc, [
|
|
@@ -4957,14 +4939,14 @@ const To = { class: "das-ai-select-container" }, Mo = { class: "das-ai-select-te
|
|
|
4957
4939
|
g(
|
|
4958
4940
|
"div",
|
|
4959
4941
|
gc,
|
|
4960
|
-
V(d(
|
|
4942
|
+
V(d(b)),
|
|
4961
4943
|
1
|
|
4962
4944
|
/* TEXT */
|
|
4963
4945
|
),
|
|
4964
4946
|
g(
|
|
4965
4947
|
"span",
|
|
4966
4948
|
null,
|
|
4967
|
-
V(
|
|
4949
|
+
V(b.time),
|
|
4968
4950
|
1
|
|
4969
4951
|
/* TEXT */
|
|
4970
4952
|
)
|
|
@@ -4987,7 +4969,7 @@ const To = { class: "das-ai-select-container" }, Mo = { class: "das-ai-select-te
|
|
|
4987
4969
|
]),
|
|
4988
4970
|
default: J(() => [
|
|
4989
4971
|
H(A(k0), {
|
|
4990
|
-
onClick: Fe((O) => v(
|
|
4972
|
+
onClick: Fe((O) => v(b), ["stop"]),
|
|
4991
4973
|
size: "medium",
|
|
4992
4974
|
iconColor: "#666666"
|
|
4993
4975
|
}, null, 8, ["onClick"])
|
|
@@ -5014,7 +4996,7 @@ const To = { class: "das-ai-select-container" }, Mo = { class: "das-ai-select-te
|
|
|
5014
4996
|
[A(bt), t.value]
|
|
5015
4997
|
]);
|
|
5016
4998
|
}
|
|
5017
|
-
}), yc = /* @__PURE__ */
|
|
4999
|
+
}), yc = /* @__PURE__ */ iu(vc, [["__scopeId", "data-v-3d211ef4"]]);
|
|
5018
5000
|
/*! js-cookie v3.0.5 | MIT */
|
|
5019
5001
|
function ne(u) {
|
|
5020
5002
|
for (var e = 1; e < arguments.length; e++) {
|
|
@@ -5036,19 +5018,19 @@ var Ac = {
|
|
|
5036
5018
|
}
|
|
5037
5019
|
};
|
|
5038
5020
|
function Ee(u, e) {
|
|
5039
|
-
function t(r,
|
|
5021
|
+
function t(r, o, c) {
|
|
5040
5022
|
if (!(typeof document > "u")) {
|
|
5041
5023
|
c = ne({}, e, c), typeof c.expires == "number" && (c.expires = new Date(Date.now() + c.expires * 864e5)), c.expires && (c.expires = c.expires.toUTCString()), r = encodeURIComponent(r).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape);
|
|
5042
|
-
var
|
|
5024
|
+
var i = "";
|
|
5043
5025
|
for (var a in c)
|
|
5044
|
-
c[a] && (
|
|
5045
|
-
return document.cookie = r + "=" + u.write(
|
|
5026
|
+
c[a] && (i += "; " + a, c[a] !== !0 && (i += "=" + c[a].split(";")[0]));
|
|
5027
|
+
return document.cookie = r + "=" + u.write(o, r) + i;
|
|
5046
5028
|
}
|
|
5047
5029
|
}
|
|
5048
5030
|
function n(r) {
|
|
5049
5031
|
if (!(typeof document > "u" || arguments.length && !r)) {
|
|
5050
|
-
for (var
|
|
5051
|
-
var a = i
|
|
5032
|
+
for (var o = document.cookie ? document.cookie.split("; ") : [], c = {}, i = 0; i < o.length; i++) {
|
|
5033
|
+
var a = o[i].split("="), s = a.slice(1).join("=");
|
|
5052
5034
|
try {
|
|
5053
5035
|
var l = decodeURIComponent(a[0]);
|
|
5054
5036
|
if (c[l] = u.read(s, l), r === l)
|
|
@@ -5063,11 +5045,11 @@ function Ee(u, e) {
|
|
|
5063
5045
|
{
|
|
5064
5046
|
set: t,
|
|
5065
5047
|
get: n,
|
|
5066
|
-
remove: function(r,
|
|
5048
|
+
remove: function(r, o) {
|
|
5067
5049
|
t(
|
|
5068
5050
|
r,
|
|
5069
5051
|
"",
|
|
5070
|
-
ne({},
|
|
5052
|
+
ne({}, o, {
|
|
5071
5053
|
expires: -1
|
|
5072
5054
|
})
|
|
5073
5055
|
);
|
|
@@ -5087,36 +5069,36 @@ function Ee(u, e) {
|
|
|
5087
5069
|
}
|
|
5088
5070
|
var Cc = Ee(Ac, { path: "/" });
|
|
5089
5071
|
const Dc = () => {
|
|
5090
|
-
let u = 0, e = -1, t = [], n = "", r = -1,
|
|
5091
|
-
const a = M(!1), s = M(), l = M(!1), f = M(""),
|
|
5092
|
-
const C = re() ? re() : Cc.get("accessToken"), k = lt().id,
|
|
5093
|
-
return C && (
|
|
5094
|
-
}, h = (C = 0, k,
|
|
5095
|
-
if (n = k, r == 1 && C == 1 &&
|
|
5096
|
-
|
|
5072
|
+
let u = 0, e = -1, t = [], n = "", r = -1, o = !1, c = "", i = "";
|
|
5073
|
+
const a = M(!1), s = M(), l = M(!1), f = M(""), _ = () => {
|
|
5074
|
+
const C = re() ? re() : Cc.get("accessToken"), k = lt().id, p = {};
|
|
5075
|
+
return C && (p.token = C), k && (p.project = k), p;
|
|
5076
|
+
}, h = (C = 0, k, p) => {
|
|
5077
|
+
if (n = k, r == 1 && C == 1 && i) {
|
|
5078
|
+
i.send(JSON.stringify({ text: p, taskId: c, taskType: C, overFlag: !n.loading, ..._() }));
|
|
5097
5079
|
return;
|
|
5098
5080
|
}
|
|
5099
|
-
n.audioStatus = "generated",
|
|
5081
|
+
n.audioStatus = "generated", i = new y0({
|
|
5100
5082
|
url: "/socket/api/speech/v1/tts",
|
|
5101
5083
|
reconnectWhenClose: !0,
|
|
5102
5084
|
opened: () => {
|
|
5103
|
-
c = $u(), C == 0 &&
|
|
5085
|
+
c = $u(), C == 0 && i.send(JSON.stringify({ text: n.content, taskId: c, taskType: C, ..._() })), C == 1 && i.send(JSON.stringify({ text: n.content, taskId: c, taskType: C, overFlag: !n.loading, ..._() })), r = C;
|
|
5104
5086
|
},
|
|
5105
|
-
message: async (
|
|
5106
|
-
if ((
|
|
5107
|
-
if (!(
|
|
5108
|
-
|
|
5087
|
+
message: async (b) => {
|
|
5088
|
+
if ((b == null ? void 0 : b.taskId) == c) {
|
|
5089
|
+
if (!(b != null && b.baseData)) return;
|
|
5090
|
+
b != null && b.baseData && t.push(b == null ? void 0 : b.baseData), r == 1 && (o = b.overFlag), e < 0 && (r == 0 && (u = b.totalCount, e = 0, n.audioStatus = "loading", f.value = `data:audio/mpeg;base64,${b == null ? void 0 : b.baseData}`, l.value = !0, v()), r == 1 && x.autoAudio && (e = 0, n.audioStatus = "loading", f.value = `data:audio/mpeg;base64,${b == null ? void 0 : b.baseData}`, l.value = !0, n.havePlayAutoAudio = !0, v())), a.value && (a.value = !1);
|
|
5109
5091
|
}
|
|
5110
5092
|
},
|
|
5111
|
-
error: (
|
|
5093
|
+
error: (b) => {
|
|
5112
5094
|
d();
|
|
5113
5095
|
},
|
|
5114
|
-
close: (
|
|
5096
|
+
close: (b) => {
|
|
5115
5097
|
}
|
|
5116
5098
|
});
|
|
5117
5099
|
}, d = () => {
|
|
5118
5100
|
var C;
|
|
5119
|
-
r = -1, e = -1, u = 0,
|
|
5101
|
+
r = -1, e = -1, u = 0, o = !1, t = [], i && i.disconnect(), i = "", (C = s.value) == null || C.pause(), f.value = "", a.value = !1, l.value = !1, n && (n.audioStatus = "normal", n = "");
|
|
5120
5102
|
}, y = () => {
|
|
5121
5103
|
if (r == 0) {
|
|
5122
5104
|
const C = e + 1;
|
|
@@ -5133,7 +5115,7 @@ const Dc = () => {
|
|
|
5133
5115
|
d();
|
|
5134
5116
|
}
|
|
5135
5117
|
if (r == 1) {
|
|
5136
|
-
if (
|
|
5118
|
+
if (o) {
|
|
5137
5119
|
if (e++, t[e]) {
|
|
5138
5120
|
f.value = `data:audio/mpeg;base64,${t[e]}`;
|
|
5139
5121
|
return;
|
|
@@ -5174,17 +5156,17 @@ const Dc = () => {
|
|
|
5174
5156
|
}, Tc = {
|
|
5175
5157
|
key: 3,
|
|
5176
5158
|
class: "das-ai-chat-new"
|
|
5177
|
-
}, Mc = { class: "das-ai-chat-input-box" }, Oc = { class: "sendervue-box" }, Nc = ["src", "muted"], Lc = "/api/llm/vector/v1/large-model/chat", Bc = /* @__PURE__ */
|
|
5159
|
+
}, Mc = { class: "das-ai-chat-input-box" }, Oc = { class: "sendervue-box" }, Nc = ["src", "muted"], Lc = "/api/llm/vector/v1/large-model/chat", Bc = /* @__PURE__ */ ou({
|
|
5178
5160
|
__name: "index",
|
|
5179
5161
|
emits: ["toApp"],
|
|
5180
5162
|
setup(u, { expose: e, emit: t }) {
|
|
5181
|
-
const n = t, r = M(0),
|
|
5163
|
+
const n = t, r = M(0), o = M(0), c = M(""), i = M(), a = M(""), s = M(null), l = M(!1), f = M(null), _ = M([
|
|
5182
5164
|
{ id: "1", text: I("介绍达实公司及核心产品") },
|
|
5183
5165
|
{ id: "2", text: I("介绍达实公司行业案例") },
|
|
5184
5166
|
{ id: "3", text: I("预订上午9:00的会议室") }
|
|
5185
|
-
]), h = M({}), d = M([]), y = M(["A100", "A002", "A003", "A005"]), v = M(!1), C = M(!1), { folderDialogVue: k, showFolderDialog:
|
|
5167
|
+
]), h = M({}), d = M([]), y = M(["A100", "A002", "A003", "A005"]), v = M(!1), C = M(!1), { folderDialogVue: k, showFolderDialog: p } = D0(), { aiAudioRef: b, isAudioplay: m, audioSrc: O, playAudio: E, pauseAudio: P } = Dc();
|
|
5186
5168
|
let j = 0;
|
|
5187
|
-
|
|
5169
|
+
qu(() => {
|
|
5188
5170
|
gt(!0), Vu(), du();
|
|
5189
5171
|
}), at(() => {
|
|
5190
5172
|
pe(), P();
|
|
@@ -5193,27 +5175,27 @@ const Dc = () => {
|
|
|
5193
5175
|
P();
|
|
5194
5176
|
};
|
|
5195
5177
|
bu(
|
|
5196
|
-
() =>
|
|
5178
|
+
() => x.loading,
|
|
5197
5179
|
(z) => {
|
|
5198
|
-
s.value && (s.value.loading =
|
|
5180
|
+
s.value && (s.value.loading = x.loading);
|
|
5199
5181
|
}
|
|
5200
5182
|
), bu(
|
|
5201
|
-
() =>
|
|
5183
|
+
() => x.searchType,
|
|
5202
5184
|
(z) => {
|
|
5203
5185
|
du();
|
|
5204
5186
|
}
|
|
5205
5187
|
);
|
|
5206
5188
|
const du = async () => {
|
|
5207
|
-
if (!
|
|
5208
|
-
if (h.value[`${
|
|
5209
|
-
|
|
5189
|
+
if (!x.searchType) return;
|
|
5190
|
+
if (h.value[`${x.searchType}`]) {
|
|
5191
|
+
_.value = h.value[`${x.searchType}`];
|
|
5210
5192
|
return;
|
|
5211
5193
|
}
|
|
5212
|
-
const [z, D] = await
|
|
5213
|
-
z || D && (h.value[`${
|
|
5194
|
+
const [z, D] = await yi({ type: x.searchType }, { ignoreErrorMessage: !0 }).run();
|
|
5195
|
+
z || D && (h.value[`${x.searchType}`] = D.map((G) => ({
|
|
5214
5196
|
id: $u(),
|
|
5215
5197
|
text: G
|
|
5216
|
-
})),
|
|
5198
|
+
})), _.value = h.value[`${x.searchType}`]);
|
|
5217
5199
|
}, _u = () => {
|
|
5218
5200
|
ye(() => {
|
|
5219
5201
|
if (C.value) return;
|
|
@@ -5231,7 +5213,7 @@ const Dc = () => {
|
|
|
5231
5213
|
const D = document.querySelector("#das-ai-chat-scrollbox .das-ai-wrap-class");
|
|
5232
5214
|
r.value = D.scrollHeight - D.clientHeight;
|
|
5233
5215
|
}
|
|
5234
|
-
|
|
5216
|
+
x.showScrollBom = r.value - z.scrollTop > 50, v.value || (C.value = !0, wu()), v.value = !1;
|
|
5235
5217
|
}, Su = () => ({
|
|
5236
5218
|
id: $u(),
|
|
5237
5219
|
role: "user",
|
|
@@ -5254,13 +5236,13 @@ const Dc = () => {
|
|
|
5254
5236
|
urls: []
|
|
5255
5237
|
}), zu = async (z) => {
|
|
5256
5238
|
a.value = "", l.value = !0;
|
|
5257
|
-
const [D, G] = await
|
|
5239
|
+
const [D, G] = await Ei({ chatId: z.id }).run();
|
|
5258
5240
|
if (!D)
|
|
5259
5241
|
if (G) {
|
|
5260
5242
|
const Y = [];
|
|
5261
|
-
let
|
|
5243
|
+
let q = "", cu = "", au = "";
|
|
5262
5244
|
G && !G.status && G.forEach((U) => {
|
|
5263
|
-
|
|
5245
|
+
q || (q = U.chat_id), cu || (cu = U.searchType), au || (au = U.fold_id), U.fromType == 0 && Y.push({
|
|
5264
5246
|
...Su(),
|
|
5265
5247
|
content: U.content
|
|
5266
5248
|
}), U.fromType == 1 && (U.files || (U.files = []), U.urls || (U.urls = []), U.urls.length && (U.urls = U.urls.map((Tu) => ({
|
|
@@ -5279,24 +5261,24 @@ const Dc = () => {
|
|
|
5279
5261
|
intention: U.intention,
|
|
5280
5262
|
showSave: !y.value.includes(U.intention)
|
|
5281
5263
|
}));
|
|
5282
|
-
}), Iu(), d.value = Y,
|
|
5264
|
+
}), Iu(), d.value = Y, o.value = q, x.searchType = cu || "1", cu == "1" && (x.folderId = au, au ? ju(au) : x.folderName = ""), Vu(), _u(), l.value = !1;
|
|
5283
5265
|
} else
|
|
5284
5266
|
l.value = !1;
|
|
5285
5267
|
}, ju = async (z) => {
|
|
5286
5268
|
if (!z) return;
|
|
5287
|
-
const [D, G] = await
|
|
5288
|
-
D || G && (
|
|
5269
|
+
const [D, G] = await zi({ id: z }).run();
|
|
5270
|
+
D || G && (x.folderName = G.folderName);
|
|
5289
5271
|
}, Iu = () => {
|
|
5290
|
-
f.value = null,
|
|
5272
|
+
f.value = null, x.loading = !1, P(), r.value = 0, d.value = [], s.value = null, v.value = !1, C.value = !1, o.value = null, E0();
|
|
5291
5273
|
}, fe = (z) => {
|
|
5292
5274
|
z == "addNew" && Iu(), z == "scrollBom" && (C.value = !1, _u());
|
|
5293
5275
|
}, B = () => {
|
|
5294
|
-
|
|
5276
|
+
x.autoAudio = !x.autoAudio, x.autoAudio || P();
|
|
5295
5277
|
}, S = (z) => {
|
|
5296
|
-
|
|
5297
|
-
},
|
|
5278
|
+
F("sender", z.text);
|
|
5279
|
+
}, F = async (z, D) => {
|
|
5298
5280
|
if (z == "sender") {
|
|
5299
|
-
if (
|
|
5281
|
+
if (x.loading) return;
|
|
5300
5282
|
P(), C.value = !1;
|
|
5301
5283
|
const G = {
|
|
5302
5284
|
...Su(),
|
|
@@ -5305,46 +5287,46 @@ const Dc = () => {
|
|
|
5305
5287
|
...ue(),
|
|
5306
5288
|
loading: !0
|
|
5307
5289
|
};
|
|
5308
|
-
d.value.push(G), d.value.push(Y), s.value = Y,
|
|
5290
|
+
d.value.push(G), d.value.push(Y), s.value = Y, Re(D);
|
|
5309
5291
|
}
|
|
5310
|
-
z == "stopMsg" && pe(), z == "upload" && await
|
|
5292
|
+
z == "stopMsg" && pe(), z == "upload" && await p();
|
|
5311
5293
|
}, N = async (z, D) => {
|
|
5312
5294
|
var G, Y;
|
|
5313
5295
|
if (z == "regenerate" && D) {
|
|
5314
|
-
if (
|
|
5296
|
+
if (x.loading) return;
|
|
5315
5297
|
if (P(), D.queryId) {
|
|
5316
|
-
const au = { queryId: D.queryId }, [U, Tu] = await
|
|
5298
|
+
const au = { queryId: D.queryId }, [U, Tu] = await Si(au).run();
|
|
5317
5299
|
if (U) return;
|
|
5318
5300
|
}
|
|
5319
5301
|
D.queryId = "", D.think = "", D.thinkTime = 0, D.intention = "", D.content = "", D.audioStatus = "normal", D.file = [], D.urls = [], D.havePlayAutoAudio = !1, D.saved = !1, D.loading = !0, s.value = D;
|
|
5320
|
-
const
|
|
5321
|
-
|
|
5302
|
+
const q = d.value.findIndex((au) => au.id == D.id), cu = (G = d.value[q - 1]) == null ? void 0 : G.content;
|
|
5303
|
+
Re(cu);
|
|
5322
5304
|
}
|
|
5323
5305
|
if (z == "saveKnowledgebase") {
|
|
5324
|
-
const
|
|
5325
|
-
await
|
|
5326
|
-
currentItem:
|
|
5306
|
+
const q = D.item, cu = d.value.findIndex((Tu) => Tu.id == q.id), au = (Y = d.value[cu - 1]) == null ? void 0 : Y.content;
|
|
5307
|
+
await p({
|
|
5308
|
+
currentItem: q,
|
|
5327
5309
|
sendVal: au.slice(0, 20),
|
|
5328
5310
|
// 知识库标题限制长度
|
|
5329
5311
|
dom: D.dom
|
|
5330
|
-
}) && (
|
|
5312
|
+
}) && (q.saved = !0, q.queryId && Ci({ QueryId: q.queryId }).run());
|
|
5331
5313
|
}
|
|
5332
|
-
z == "reference" && (s.value = D, a.value = "reference"), z == "play" && (D.data.audioStatus == "normal" ? (P(),
|
|
5314
|
+
z == "reference" && (s.value = D, a.value = "reference"), z == "play" && (D.data.audioStatus == "normal" ? (P(), E(0, D.data)) : (s.value && (s.value.audioStatus = "normal"), P())), z == "preview" && $(D);
|
|
5333
5315
|
}, L = (z) => {
|
|
5334
5316
|
n("toApp", z);
|
|
5335
5317
|
}, $ = (z) => {
|
|
5336
5318
|
c.value = z, ye(() => {
|
|
5337
5319
|
var D;
|
|
5338
|
-
(D =
|
|
5320
|
+
(D = i.value) == null || D.preview();
|
|
5339
5321
|
});
|
|
5340
5322
|
}, eu = (z) => {
|
|
5341
5323
|
P(), a.value = "history";
|
|
5342
5324
|
}, Eu = () => {
|
|
5343
5325
|
a.value = "";
|
|
5344
|
-
},
|
|
5326
|
+
}, qe = (z) => {
|
|
5345
5327
|
const D = {
|
|
5346
5328
|
query: z,
|
|
5347
|
-
deepThinkFlag:
|
|
5329
|
+
deepThinkFlag: x.deepseek ? "1" : "0",
|
|
5348
5330
|
// project: getProjectInfo().id,
|
|
5349
5331
|
isInnerSearch: "0",
|
|
5350
5332
|
//应用内搜索(0否1是)
|
|
@@ -5353,7 +5335,7 @@ const Dc = () => {
|
|
|
5353
5335
|
isGlobalSearch: "0"
|
|
5354
5336
|
//是否搜索全网(0否1是)
|
|
5355
5337
|
};
|
|
5356
|
-
return
|
|
5338
|
+
return o.value || (o.value = (/* @__PURE__ */ new Date()).getTime()), D.chatId = o.value, x.searchType == "0" && (D.isInnerSearch = "1"), x.searchType == "1" && (D.isKnowledgeSearch = "1", D.foldId = x.folderId == x.allKnowId ? "" : x.folderId), x.searchType == "2" && (D.isGlobalSearch = "1"), JSON.stringify(D);
|
|
5357
5339
|
}, Gt = () => {
|
|
5358
5340
|
const z = {
|
|
5359
5341
|
// Authorization: `Bearer ${getToken()}`,
|
|
@@ -5363,13 +5345,13 @@ const Dc = () => {
|
|
|
5363
5345
|
return re() && (z.Authorization = `Bearer ${re()}`), z;
|
|
5364
5346
|
};
|
|
5365
5347
|
let he = "";
|
|
5366
|
-
const
|
|
5367
|
-
|
|
5348
|
+
const Re = (z) => {
|
|
5349
|
+
x.loading = !0, _u();
|
|
5368
5350
|
const D = new tu(`${st().baseURL}${Lc}?project=${lt().id}`, {
|
|
5369
5351
|
method: "POST",
|
|
5370
5352
|
// 使用 POST 请求
|
|
5371
5353
|
headers: Gt(),
|
|
5372
|
-
payload:
|
|
5354
|
+
payload: qe(z),
|
|
5373
5355
|
// POST 请求体
|
|
5374
5356
|
//重连时间间隔,单位:毫秒,默认45000毫秒,这里设置为10分钟
|
|
5375
5357
|
heartbeatTimeout: 10 * 60 * 1e3
|
|
@@ -5379,32 +5361,32 @@ const Dc = () => {
|
|
|
5379
5361
|
D.onmessage = (Y) => {
|
|
5380
5362
|
if (G != he) return;
|
|
5381
5363
|
if (Y.data == "[DONE]") {
|
|
5382
|
-
D.close(),
|
|
5364
|
+
D.close(), x.loading = !1, s.value.loading = !1, x.autoAudio && s.value.content && s.value.audioStatus != "normal" && E(1, s.value, ""), _u();
|
|
5383
5365
|
return;
|
|
5384
5366
|
}
|
|
5385
|
-
const
|
|
5386
|
-
if (s.value.intention || (s.value.intention =
|
|
5367
|
+
const q = JSON.parse(Y.data);
|
|
5368
|
+
if (s.value.intention || (s.value.intention = q.intention, s.value.showSave = !y.value.includes(q.intention)), q.type == "queryId" && (s.value.queryId || (s.value.queryId = q.content)), q.type == "think" && (s.value.think || (j = (/* @__PURE__ */ new Date()).getTime()), s.value.think = s.value.think + q.content), q.type == "text") {
|
|
5387
5369
|
if (j && s.value.think && !s.value.content) {
|
|
5388
5370
|
const cu = (/* @__PURE__ */ new Date()).getTime() - j;
|
|
5389
5371
|
j = 0, s.value.thinkTime = parseInt(`${cu / 1e3}`);
|
|
5390
5372
|
}
|
|
5391
|
-
s.value.content = s.value.content +
|
|
5373
|
+
s.value.content = s.value.content + q.content, s.value.showSave, x.autoAudio && (s.value.audioStatus == "normal" ? E(1, s.value, s.value.content) : E(1, s.value, q.content));
|
|
5392
5374
|
}
|
|
5393
|
-
|
|
5375
|
+
q.type == "file" && s.value.file.push(q), q.type == "url" && (q.webUrl && (q.webUrl = decodeURIComponent(q.webUrl)), q.name = q.content, s.value.file.push(q), s.value.urls.push(q)), _u();
|
|
5394
5376
|
}, D.onerror = (Y) => {
|
|
5395
|
-
D.close(),
|
|
5377
|
+
D.close(), x.loading = !1, s.value.content = I("连接错误");
|
|
5396
5378
|
}, f.value = D;
|
|
5397
5379
|
}, pe = () => {
|
|
5398
5380
|
var z;
|
|
5399
|
-
if ((z = f.value) == null || z.close(),
|
|
5381
|
+
if ((z = f.value) == null || z.close(), x.loading = !1, Kt(), s.value && (s.value.loading = !1, s.value.think && !s.value.thinkTime)) {
|
|
5400
5382
|
const D = (/* @__PURE__ */ new Date()).getTime() - j;
|
|
5401
5383
|
j = 0, s.value.thinkTime = parseInt(`${D / 1e3}`);
|
|
5402
5384
|
}
|
|
5403
5385
|
}, Kt = async () => {
|
|
5404
5386
|
if (s.value && s.value.loading && s.value.queryId && s.value.content) {
|
|
5405
|
-
let z = s.value.file ? s.value.file.filter((
|
|
5387
|
+
let z = s.value.file ? s.value.file.filter((q) => q.type != "url") : [];
|
|
5406
5388
|
const D = {
|
|
5407
|
-
chat_id:
|
|
5389
|
+
chat_id: o.value,
|
|
5408
5390
|
//会话id
|
|
5409
5391
|
content: s.value.content,
|
|
5410
5392
|
//对话内容
|
|
@@ -5412,51 +5394,51 @@ const Dc = () => {
|
|
|
5412
5394
|
//来源(0:用户,1:AI)
|
|
5413
5395
|
intention: s.value.intention,
|
|
5414
5396
|
//意图(A001:企业能耗,A002:楼控,A003:会议室,A004:能源管理,A005:IOC,A006:知识库)
|
|
5415
|
-
searchType:
|
|
5397
|
+
searchType: x.searchType,
|
|
5416
5398
|
//搜索类型(0:应用,1:知识库,2:全网)
|
|
5417
5399
|
fold_id: "",
|
|
5418
5400
|
QueryId: s.value.queryId,
|
|
5419
5401
|
//queryId,即问答id
|
|
5420
5402
|
think: s.value.think,
|
|
5421
5403
|
//思考
|
|
5422
|
-
urls: s.value.urls ? s.value.urls.map((
|
|
5423
|
-
name:
|
|
5424
|
-
app_url:
|
|
5425
|
-
web_url:
|
|
5404
|
+
urls: s.value.urls ? s.value.urls.map((q) => ({
|
|
5405
|
+
name: q.name,
|
|
5406
|
+
app_url: q.appUrl,
|
|
5407
|
+
web_url: q.webUrl
|
|
5426
5408
|
})) : [],
|
|
5427
5409
|
//
|
|
5428
|
-
files: z.map((
|
|
5429
|
-
name:
|
|
5430
|
-
summary:
|
|
5431
|
-
url:
|
|
5410
|
+
files: z.map((q) => ({
|
|
5411
|
+
name: q.name,
|
|
5412
|
+
summary: q.summary,
|
|
5413
|
+
url: q.url
|
|
5432
5414
|
}))
|
|
5433
5415
|
//
|
|
5434
5416
|
};
|
|
5435
|
-
D.searchType == "1" && (D.fold_id =
|
|
5436
|
-
const [G, Y] = await
|
|
5417
|
+
D.searchType == "1" && (D.fold_id = x.folderId == x.allKnowId ? "" : x.folderId);
|
|
5418
|
+
const [G, Y] = await Ai(D).run();
|
|
5437
5419
|
if (G) return;
|
|
5438
5420
|
}
|
|
5439
5421
|
};
|
|
5440
5422
|
return e({
|
|
5441
5423
|
senderVal: (z) => {
|
|
5442
|
-
|
|
5424
|
+
x.senderValue = `${x.senderValue}${z}`;
|
|
5443
5425
|
},
|
|
5444
5426
|
outSendMsg: () => {
|
|
5445
|
-
|
|
5427
|
+
x.senderValue && F("sender", x.senderValue);
|
|
5446
5428
|
},
|
|
5447
5429
|
hideFn: K,
|
|
5448
5430
|
playAudioFn: () => {
|
|
5449
5431
|
const z = d.value.length - 1 - [...d.value].reverse().findIndex((G) => G.role == "ai"), D = d.value[z] ? d.value[z] : null;
|
|
5450
|
-
D &&
|
|
5432
|
+
D && E(0, D);
|
|
5451
5433
|
},
|
|
5452
5434
|
pauseAudio: P,
|
|
5453
5435
|
stopMsg: pe,
|
|
5454
5436
|
openNewChat: Iu
|
|
5455
5437
|
}), (z, D) => {
|
|
5456
5438
|
const G = Wt("dasLoading");
|
|
5457
|
-
return yu((w(),
|
|
5458
|
-
a.value ? (w(),
|
|
5459
|
-
a.value == "reference" ? (w(), X(
|
|
5439
|
+
return yu((w(), R("div", Ec, [
|
|
5440
|
+
a.value ? (w(), R("div", Fc, [
|
|
5441
|
+
a.value == "reference" ? (w(), X(ic, {
|
|
5460
5442
|
key: 0,
|
|
5461
5443
|
item: s.value,
|
|
5462
5444
|
onPreview: $,
|
|
@@ -5465,14 +5447,14 @@ const Dc = () => {
|
|
|
5465
5447
|
}, null, 8, ["item"])) : T("v-if", !0),
|
|
5466
5448
|
a.value == "history" ? (w(), X(yc, {
|
|
5467
5449
|
key: 1,
|
|
5468
|
-
chatId:
|
|
5450
|
+
chatId: o.value,
|
|
5469
5451
|
onRecord: zu,
|
|
5470
5452
|
onBack: Eu
|
|
5471
5453
|
}, null, 8, ["chatId"])) : T("v-if", !0)
|
|
5472
5454
|
])) : T("v-if", !0),
|
|
5473
5455
|
g("div", wc, [
|
|
5474
5456
|
g("div", Sc, [
|
|
5475
|
-
H(
|
|
5457
|
+
H(Gi, {
|
|
5476
5458
|
onBack: Iu,
|
|
5477
5459
|
listLength: d.value.length
|
|
5478
5460
|
}, null, 8, ["listLength"])
|
|
@@ -5497,12 +5479,12 @@ const Dc = () => {
|
|
|
5497
5479
|
style: { "margin-right": "16px" },
|
|
5498
5480
|
class: "ai-top-right-icon"
|
|
5499
5481
|
}, [
|
|
5500
|
-
A(
|
|
5482
|
+
A(x).autoAudio ? (w(), X(A(r0), {
|
|
5501
5483
|
key: 0,
|
|
5502
5484
|
customSize: "20",
|
|
5503
5485
|
iconColor: "#006DF1"
|
|
5504
5486
|
})) : T("v-if", !0),
|
|
5505
|
-
A(
|
|
5487
|
+
A(x).autoAudio ? T("v-if", !0) : (w(), X(A(o0), {
|
|
5506
5488
|
key: 1,
|
|
5507
5489
|
customSize: "20",
|
|
5508
5490
|
iconColor: "#333333"
|
|
@@ -5530,7 +5512,7 @@ const Dc = () => {
|
|
|
5530
5512
|
onClick: eu,
|
|
5531
5513
|
class: "ai-top-right-icon"
|
|
5532
5514
|
}, [
|
|
5533
|
-
H(A(
|
|
5515
|
+
H(A(i0), {
|
|
5534
5516
|
customSize: "20",
|
|
5535
5517
|
iconColor: "#666666"
|
|
5536
5518
|
})
|
|
@@ -5541,13 +5523,13 @@ const Dc = () => {
|
|
|
5541
5523
|
})
|
|
5542
5524
|
])
|
|
5543
5525
|
]),
|
|
5544
|
-
d.value.length ? (w(),
|
|
5526
|
+
d.value.length ? (w(), R("div", Ic, [
|
|
5545
5527
|
H(A(we), {
|
|
5546
5528
|
"wrap-class": "das-ai-wrap-class",
|
|
5547
5529
|
onScroll: fu
|
|
5548
5530
|
}, {
|
|
5549
5531
|
default: J(() => [
|
|
5550
|
-
H(
|
|
5532
|
+
H(Vo, {
|
|
5551
5533
|
onChatEmit: N,
|
|
5552
5534
|
chartList: d.value
|
|
5553
5535
|
}, null, 8, ["chartList"])
|
|
@@ -5556,13 +5538,13 @@ const Dc = () => {
|
|
|
5556
5538
|
/* STABLE */
|
|
5557
5539
|
})
|
|
5558
5540
|
])) : T("v-if", !0),
|
|
5559
|
-
d.value.length ? T("v-if", !0) : (w(), X(
|
|
5541
|
+
d.value.length ? T("v-if", !0) : (w(), X(ki, {
|
|
5560
5542
|
key: 2,
|
|
5561
|
-
list:
|
|
5543
|
+
list: _.value,
|
|
5562
5544
|
onClick: S
|
|
5563
5545
|
}, null, 8, ["list"])),
|
|
5564
5546
|
T(' v-if="currentList.length && !dasAiData.loading" '),
|
|
5565
|
-
d.value.length ? (w(),
|
|
5547
|
+
d.value.length ? (w(), R("div", Tc, [
|
|
5566
5548
|
D[0] || (D[0] = g(
|
|
5567
5549
|
"div",
|
|
5568
5550
|
{ class: "chat-new-top-mask" },
|
|
@@ -5570,7 +5552,7 @@ const Dc = () => {
|
|
|
5570
5552
|
-1
|
|
5571
5553
|
/* CACHED */
|
|
5572
5554
|
)),
|
|
5573
|
-
H(
|
|
5555
|
+
H(fi, { onAddNewEmit: fe })
|
|
5574
5556
|
])) : T("v-if", !0),
|
|
5575
5557
|
T(' :class="{ full: !currentList.length }" '),
|
|
5576
5558
|
g("div", Mc, [
|
|
@@ -5586,9 +5568,9 @@ const Dc = () => {
|
|
|
5586
5568
|
</div> `),
|
|
5587
5569
|
T(' v-show="!dasAiData.loading" '),
|
|
5588
5570
|
g("div", Oc, [
|
|
5589
|
-
H(
|
|
5571
|
+
H(ci, {
|
|
5590
5572
|
isNew: !d.value.length,
|
|
5591
|
-
onSenderEmit:
|
|
5573
|
+
onSenderEmit: F
|
|
5592
5574
|
}, null, 8, ["isNew"])
|
|
5593
5575
|
]),
|
|
5594
5576
|
T(` <div v-show="dasAiData.loading" class="loading-content">\r
|
|
@@ -5607,15 +5589,15 @@ const Dc = () => {
|
|
|
5607
5589
|
H(A(k)),
|
|
5608
5590
|
H(A(c0), {
|
|
5609
5591
|
ref_key: "dasPreviewRef",
|
|
5610
|
-
ref:
|
|
5592
|
+
ref: i,
|
|
5611
5593
|
"file-url": c.value
|
|
5612
5594
|
}, null, 8, ["file-url"]),
|
|
5613
5595
|
g("audio", {
|
|
5614
5596
|
src: A(O),
|
|
5615
5597
|
class: "ai-audio-class",
|
|
5616
5598
|
ref_key: "aiAudioRef",
|
|
5617
|
-
ref:
|
|
5618
|
-
muted: !A(
|
|
5599
|
+
ref: b,
|
|
5600
|
+
muted: !A(m),
|
|
5619
5601
|
autoplay: ""
|
|
5620
5602
|
}, null, 8, Nc)
|
|
5621
5603
|
])), [
|
|
@@ -5623,74 +5605,74 @@ const Dc = () => {
|
|
|
5623
5605
|
]);
|
|
5624
5606
|
};
|
|
5625
5607
|
}
|
|
5626
|
-
}),
|
|
5608
|
+
}), qc = /* @__PURE__ */ iu(Bc, [["__scopeId", "data-v-399821d3"]]), Rc = { class: "das-ai-panel-div 2" }, Pc = { class: "das-ai-panel-coantainer-header" }, jc = { class: "das-ai-panel-header-title" }, Hc = { class: "das-ai-panel-coantainer-body" }, $c = /* @__PURE__ */ ou({
|
|
5627
5609
|
__name: "index",
|
|
5628
5610
|
emits: ["confirm", "toApp", "getStatus"],
|
|
5629
5611
|
setup(u, { expose: e, emit: t }) {
|
|
5630
|
-
const n = t, r = e0(),
|
|
5612
|
+
const n = t, r = e0(), o = M(), c = M(0), i = M(), a = M(!1);
|
|
5631
5613
|
bu(
|
|
5632
5614
|
() => r == null ? void 0 : r.path,
|
|
5633
|
-
(
|
|
5615
|
+
(m, O) => {
|
|
5634
5616
|
f();
|
|
5635
5617
|
}
|
|
5636
|
-
),
|
|
5618
|
+
), qu(() => {
|
|
5637
5619
|
setTimeout(() => {
|
|
5638
5620
|
ye(() => {
|
|
5639
|
-
let
|
|
5640
|
-
|
|
5621
|
+
let m = document.getElementsByClassName("das-web-app-header")[0];
|
|
5622
|
+
m && (c.value = m.clientHeight), m && !i.value && (i.value = A0((O) => {
|
|
5641
5623
|
c.value = O.height;
|
|
5642
|
-
},
|
|
5624
|
+
}, m));
|
|
5643
5625
|
});
|
|
5644
5626
|
}, 1e3);
|
|
5645
5627
|
}), at(() => {
|
|
5646
|
-
var
|
|
5647
|
-
(
|
|
5628
|
+
var m;
|
|
5629
|
+
(m = i.value) == null || m.disconnect(), i.value = null;
|
|
5648
5630
|
});
|
|
5649
|
-
const s = (
|
|
5650
|
-
n("toApp",
|
|
5631
|
+
const s = (m) => {
|
|
5632
|
+
n("toApp", m);
|
|
5651
5633
|
}, l = () => {
|
|
5652
5634
|
a.value || (a.value = !0, n("getStatus", !0));
|
|
5653
5635
|
}, f = () => {
|
|
5654
|
-
var
|
|
5655
|
-
a.value = !1, (
|
|
5636
|
+
var m;
|
|
5637
|
+
a.value = !1, (m = o.value) == null || m.hideFn(), n("getStatus", !1);
|
|
5656
5638
|
};
|
|
5657
5639
|
return e({
|
|
5658
|
-
setAutoAudio: (
|
|
5659
|
-
|
|
5640
|
+
setAutoAudio: (m) => {
|
|
5641
|
+
x.autoAudio = m;
|
|
5660
5642
|
},
|
|
5661
|
-
setConfig: (
|
|
5662
|
-
|
|
5643
|
+
setConfig: (m) => {
|
|
5644
|
+
m != null && m.searchType && (x.searchType = m == null ? void 0 : m.searchType), (m == null ? void 0 : m.searchType) == "1" && (x.folderId = m.folderId ? m.folderId : "", x.folderName = m.folderName ? m.folderName : ""), Vu();
|
|
5663
5645
|
},
|
|
5664
5646
|
stopMsg: () => {
|
|
5665
|
-
var
|
|
5666
|
-
(
|
|
5647
|
+
var m;
|
|
5648
|
+
(m = o.value) == null || m.stopMsg();
|
|
5667
5649
|
},
|
|
5668
5650
|
playAudio: () => {
|
|
5669
|
-
var
|
|
5670
|
-
(
|
|
5651
|
+
var m;
|
|
5652
|
+
(m = o.value) == null || m.playAudioFn();
|
|
5671
5653
|
},
|
|
5672
5654
|
pauseAudio: () => {
|
|
5673
|
-
var
|
|
5674
|
-
(
|
|
5655
|
+
var m;
|
|
5656
|
+
(m = o.value) == null || m.pauseAudio();
|
|
5675
5657
|
},
|
|
5676
5658
|
openNewChat: () => {
|
|
5677
|
-
var
|
|
5678
|
-
(
|
|
5659
|
+
var m;
|
|
5660
|
+
(m = o.value) == null || m.openNewChat();
|
|
5679
5661
|
},
|
|
5680
5662
|
send: () => {
|
|
5681
|
-
var
|
|
5682
|
-
(
|
|
5663
|
+
var m;
|
|
5664
|
+
(m = o.value) == null || m.outSendMsg();
|
|
5683
5665
|
},
|
|
5684
|
-
senderVal: (
|
|
5666
|
+
senderVal: (m) => {
|
|
5685
5667
|
var O;
|
|
5686
|
-
(O =
|
|
5668
|
+
(O = o.value) == null || O.senderVal(m);
|
|
5687
5669
|
},
|
|
5688
5670
|
clearSenderVal: () => {
|
|
5689
|
-
|
|
5671
|
+
x.senderValue = "";
|
|
5690
5672
|
},
|
|
5691
5673
|
openPanel: l,
|
|
5692
5674
|
closePanel: f
|
|
5693
|
-
}), (
|
|
5675
|
+
}), (m, O) => (w(), R("div", Rc, [
|
|
5694
5676
|
H(Xt, {
|
|
5695
5677
|
name: "das-ai-panel",
|
|
5696
5678
|
persisted: ""
|
|
@@ -5723,10 +5705,10 @@ const Dc = () => {
|
|
|
5723
5705
|
]),
|
|
5724
5706
|
g("div", Hc, [
|
|
5725
5707
|
H(
|
|
5726
|
-
|
|
5708
|
+
qc,
|
|
5727
5709
|
{
|
|
5728
5710
|
ref_key: "dasAiVueRef",
|
|
5729
|
-
ref:
|
|
5711
|
+
ref: o,
|
|
5730
5712
|
onToApp: s
|
|
5731
5713
|
},
|
|
5732
5714
|
null,
|
|
@@ -5765,7 +5747,7 @@ const Dc = () => {
|
|
|
5765
5747
|
</das-drawer>`)
|
|
5766
5748
|
]));
|
|
5767
5749
|
}
|
|
5768
|
-
}), Vc = /* @__PURE__ */
|
|
5750
|
+
}), Vc = /* @__PURE__ */ iu($c, [["__scopeId", "data-v-66d7afca"]]), Uc = {
|
|
5769
5751
|
AI助手: { "zh-CN": "AI助手", en: "AI Assistant", "zh-MO": "AI助手", _appCode: "framework" },
|
|
5770
5752
|
自动播报: { "zh-CN": "自动播报", en: "Auto Broadcast", "zh-MO": "自動播報" },
|
|
5771
5753
|
历史会话: { "zh-CN": "历史会话", en: "History Sessions", "zh-MO": "歷史會話" },
|
|
@@ -5860,11 +5842,11 @@ const Dc = () => {
|
|
|
5860
5842
|
}
|
|
5861
5843
|
};
|
|
5862
5844
|
n0(Uc);
|
|
5863
|
-
const Ba = () => M(null),
|
|
5845
|
+
const Ba = () => M(null), qa = u0(Vc);
|
|
5864
5846
|
export {
|
|
5865
|
-
|
|
5866
|
-
|
|
5847
|
+
qa as D,
|
|
5848
|
+
iu as _,
|
|
5867
5849
|
Ba as a,
|
|
5868
|
-
|
|
5850
|
+
Ii as g,
|
|
5869
5851
|
La as s
|
|
5870
5852
|
};
|