@8wave/ai-elements 0.125.0-beta.39 → 0.125.0-beta.40
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_chunks/{PkChatbotFilePreview-Dt0ygdJM.js → PkChatbotFilePreview-o0zIuCgN.js} +2 -2
- package/dist/_chunks/{PkChatbotFilePreview-Dt0ygdJM.js.map → PkChatbotFilePreview-o0zIuCgN.js.map} +1 -1
- package/dist/_chunks/{PkFilePreview-CT3_vRcU.js → PkFilePreview-D_1ZgiiA.js} +438 -438
- package/dist/_chunks/{PkFilePreview-CT3_vRcU.js.map → PkFilePreview-D_1ZgiiA.js.map} +1 -1
- package/dist/_chunks/{PkFilePreviewDialog-BOKJCapN.js → PkFilePreviewDialog-CI22huzK.js} +2 -2
- package/dist/_chunks/{PkFilePreviewDialog-BOKJCapN.js.map → PkFilePreviewDialog-CI22huzK.js.map} +1 -1
- package/dist/_chunks/{PkImageEditorDialog-D-ikpGo8.js → PkImageEditorDialog-CAEninFi.js} +152 -130
- package/dist/_chunks/PkImageEditorDialog-CAEninFi.js.map +1 -0
- package/dist/_chunks/{PkSelectionActions-CXQTnSXQ.js → PkSelectionActions-BriGyWCi.js} +2 -2
- package/dist/_chunks/{PkSelectionActions-CXQTnSXQ.js.map → PkSelectionActions-BriGyWCi.js.map} +1 -1
- package/dist/_chunks/{PkStreamingMarkdown-5fgxYt_s.js → PkStreamingMarkdown--9i0feuM.js} +3 -3
- package/dist/_chunks/{PkStreamingMarkdown-5fgxYt_s.js.map → PkStreamingMarkdown--9i0feuM.js.map} +1 -1
- package/dist/_chunks/{PkToolChatFile-Cbmu6I0S.js → PkToolChatFile-BKGUnWrj.js} +3 -3
- package/dist/_chunks/{PkToolChatFile-Cbmu6I0S.js.map → PkToolChatFile-BKGUnWrj.js.map} +1 -1
- package/dist/_chunks/{PkToolShareDocument-Bxm1pSpj.js → PkToolShareDocument-BUg-uDTO.js} +2 -2
- package/dist/_chunks/{PkToolShareDocument-Bxm1pSpj.js.map → PkToolShareDocument-BUg-uDTO.js.map} +1 -1
- package/dist/_chunks/{PkToolShowArtifact-CGUmoTfN.js → PkToolShowArtifact-BfLpz2-W.js} +2 -2
- package/dist/_chunks/{PkToolShowArtifact-CGUmoTfN.js.map → PkToolShowArtifact-BfLpz2-W.js.map} +1 -1
- package/dist/_chunks/{PkToolShowContactForm-DZ-kgXa6.js → PkToolShowContactForm-BsF6DFzV.js} +2 -2
- package/dist/_chunks/{PkToolShowContactForm-DZ-kgXa6.js.map → PkToolShowContactForm-BsF6DFzV.js.map} +1 -1
- package/dist/_chunks/{PkToolShowDiagram-CwINVecL.js → PkToolShowDiagram-CcRJNDHo.js} +2 -2
- package/dist/_chunks/{PkToolShowDiagram-CwINVecL.js.map → PkToolShowDiagram-CcRJNDHo.js.map} +1 -1
- package/dist/_chunks/{PkToolShowForm-BrxNGFCH.js → PkToolShowForm-w6RvbKEB.js} +3 -3
- package/dist/_chunks/{PkToolShowForm-BrxNGFCH.js.map → PkToolShowForm-w6RvbKEB.js.map} +1 -1
- package/dist/_chunks/{PkToolShowImageGallery-BGTncXxq.js → PkToolShowImageGallery-BEddh4He.js} +2 -2
- package/dist/_chunks/{PkToolShowImageGallery-BGTncXxq.js.map → PkToolShowImageGallery-BEddh4He.js.map} +1 -1
- package/dist/_chunks/{PkToolShowSources-B3RSUWP7.js → PkToolShowSources-CGESvGrm.js} +2 -2
- package/dist/_chunks/{PkToolShowSources-B3RSUWP7.js.map → PkToolShowSources-CGESvGrm.js.map} +1 -1
- package/dist/_chunks/{useLightbox-C54BCSbU.js → useLightbox-TagJmiah.js} +38 -37
- package/dist/_chunks/useLightbox-TagJmiah.js.map +1 -0
- package/dist/_chunks/{utils-Do6urHUh.js → utils-zkq8kMz-.js} +7 -4
- package/{dist-vue/_chunks/utils-Do3JWPJe.js.map → dist/_chunks/utils-zkq8kMz-.js.map} +1 -1
- package/dist/ai-elements.es.js +2711 -2711
- package/dist/ai-elements.es.js.map +1 -1
- package/dist-vue/PkChatbot.js +1 -1
- package/dist-vue/PkChatbotEmptyState.js +1 -1
- package/dist-vue/PkChatbotFilePreview.js +1 -1
- package/dist-vue/PkChatbotInput.js +1 -1
- package/dist-vue/PkChatbotMessages.js +1 -1
- package/dist-vue/PkChatbotStepPayload.js +1 -1
- package/dist-vue/PkChatbotStepToolDetail.js +1 -1
- package/dist-vue/PkChatbotSteps.js +1 -1
- package/dist-vue/PkChatbotViewChat.js +1 -1
- package/dist-vue/PkChatbotViewConversations.js +1 -1
- package/dist-vue/_chunks/{PkChart-BsF3OtnS.js → PkChart-DyyBXkd3.js} +2 -2
- package/dist-vue/_chunks/{PkChart-BsF3OtnS.js.map → PkChart-DyyBXkd3.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbot-BIQh81cA.js → PkChatbot-wsqj3EpU.js} +5 -5
- package/dist-vue/_chunks/{PkChatbot-BIQh81cA.js.map → PkChatbot-wsqj3EpU.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotEmptyState-pAeFPPQc.js → PkChatbotEmptyState-DcgIfNkX.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotEmptyState-pAeFPPQc.js.map → PkChatbotEmptyState-DcgIfNkX.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotFilePreview-BIta8Yg-.js → PkChatbotFilePreview-BDU2vY0F.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotFilePreview-BIta8Yg-.js.map → PkChatbotFilePreview-BDU2vY0F.js.map} +1 -1
- package/dist-vue/_chunks/PkChatbotInput-CN4rmNgu.js +520 -0
- package/dist-vue/_chunks/PkChatbotInput-CN4rmNgu.js.map +1 -0
- package/dist-vue/_chunks/PkChatbotMessages-BlF4Xp0_.js +1054 -0
- package/dist-vue/_chunks/{PkChatbotMessages-CZu8feEz.js.map → PkChatbotMessages-BlF4Xp0_.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotStepPayload-r25JHO7_.js → PkChatbotStepPayload-q9uXE5mr.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotStepPayload-r25JHO7_.js.map → PkChatbotStepPayload-q9uXE5mr.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotStepToolDetail-C897BpRX.js → PkChatbotStepToolDetail-BJz6Qwh3.js} +3 -3
- package/dist-vue/_chunks/{PkChatbotStepToolDetail-C897BpRX.js.map → PkChatbotStepToolDetail-BJz6Qwh3.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotSteps-CRtIVwJV.js → PkChatbotSteps-DvJYNl_k.js} +5 -5
- package/dist-vue/_chunks/{PkChatbotSteps-CRtIVwJV.js.map → PkChatbotSteps-DvJYNl_k.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewChat-BBCxj4Qz.js → PkChatbotViewChat-tmHyxxT3.js} +23 -23
- package/dist-vue/_chunks/{PkChatbotViewChat-BBCxj4Qz.js.map → PkChatbotViewChat-tmHyxxT3.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewConversations-rXGl7NKA.js → PkChatbotViewConversations-DOzUh_A7.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotViewConversations-rXGl7NKA.js.map → PkChatbotViewConversations-DOzUh_A7.js.map} +1 -1
- package/dist-vue/_chunks/{PkFilePreview-1ZNyDAo5.js → PkFilePreview-Bp5-Pl54.js} +227 -227
- package/dist-vue/_chunks/{PkFilePreview-1ZNyDAo5.js.map → PkFilePreview-Bp5-Pl54.js.map} +1 -1
- package/dist-vue/_chunks/{PkFilePreviewDialog-DnbUHGG2.js → PkFilePreviewDialog-CS885vBR.js} +2 -2
- package/dist-vue/_chunks/{PkFilePreviewDialog-DnbUHGG2.js.map → PkFilePreviewDialog-CS885vBR.js.map} +1 -1
- package/dist-vue/_chunks/{PkImageEditorDialog-Dn3HV_ny.js → PkImageEditorDialog-BhfdnsmX.js} +300 -278
- package/dist-vue/_chunks/PkImageEditorDialog-BhfdnsmX.js.map +1 -0
- package/dist-vue/_chunks/{PkStreamingMarkdown-COQLmP8b.js → PkStreamingMarkdown-NgrJUZPI.js} +3 -3
- package/dist-vue/_chunks/{PkStreamingMarkdown-COQLmP8b.js.map → PkStreamingMarkdown-NgrJUZPI.js.map} +1 -1
- package/dist-vue/_chunks/{PkSvgViewer-vkd5Dluw.js → PkSvgViewer-CRNwb6Yn.js} +2 -2
- package/dist-vue/_chunks/{PkSvgViewer-vkd5Dluw.js.map → PkSvgViewer-CRNwb6Yn.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolChatFile-e-7a0k7l.js → PkToolChatFile-DnmiNGF4.js} +3 -3
- package/dist-vue/_chunks/{PkToolChatFile-e-7a0k7l.js.map → PkToolChatFile-DnmiNGF4.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShareDocument-CspvFwRR.js → PkToolShareDocument-Bf7OE8XA.js} +2 -2
- package/dist-vue/_chunks/{PkToolShareDocument-CspvFwRR.js.map → PkToolShareDocument-Bf7OE8XA.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowArtifact-CUP3VaC9.js → PkToolShowArtifact-C8ueuIGQ.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowArtifact-CUP3VaC9.js.map → PkToolShowArtifact-C8ueuIGQ.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowChart-X6JZDAWD.js → PkToolShowChart-BWO6Hzlq.js} +3 -3
- package/dist-vue/_chunks/{PkToolShowChart-X6JZDAWD.js.map → PkToolShowChart-BWO6Hzlq.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowContactForm-BM8d9M5a.js → PkToolShowContactForm-BBcDsLEO.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowContactForm-BM8d9M5a.js.map → PkToolShowContactForm-BBcDsLEO.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowDiagram-DOdzpndK.js → PkToolShowDiagram-BzUcxOKy.js} +3 -3
- package/dist-vue/_chunks/{PkToolShowDiagram-DOdzpndK.js.map → PkToolShowDiagram-BzUcxOKy.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowForm-TYBf8q6g.js → PkToolShowForm-B6uhHzJ8.js} +3 -3
- package/dist-vue/_chunks/{PkToolShowForm-TYBf8q6g.js.map → PkToolShowForm-B6uhHzJ8.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowImageGallery-BvwuoyF6.js → PkToolShowImageGallery-C39nlJrJ.js} +3 -3
- package/dist-vue/_chunks/{PkToolShowImageGallery-BvwuoyF6.js.map → PkToolShowImageGallery-C39nlJrJ.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowLocation-WdRqG8Wi.js → PkToolShowLocation-Nhh_LwmN.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowLocation-WdRqG8Wi.js.map → PkToolShowLocation-Nhh_LwmN.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowProductList-_MHBAgNI.js → PkToolShowProductList-FLLkRCnm.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowProductList-_MHBAgNI.js.map → PkToolShowProductList-FLLkRCnm.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowSources-CHw7qZtw.js → PkToolShowSources-Cb7r5jrX.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowSources-CHw7qZtw.js.map → PkToolShowSources-Cb7r5jrX.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowVideo-D7oiBe4p.js → PkToolShowVideo-QDLhVlau.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowVideo-D7oiBe4p.js.map → PkToolShowVideo-QDLhVlau.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowWebPages-CRq9Jhmw.js → PkToolShowWebPages-P6PdJTEE.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowWebPages-CRq9Jhmw.js.map → PkToolShowWebPages-P6PdJTEE.js.map} +1 -1
- package/dist-vue/_chunks/{useLightbox-Ctl9zaMX.js → useLightbox-DmtNa8bJ.js} +38 -37
- package/dist-vue/_chunks/useLightbox-DmtNa8bJ.js.map +1 -0
- package/dist-vue/_chunks/{utils-Do3JWPJe.js → utils-D4B1FVGF.js} +6 -3
- package/dist-vue/_chunks/utils-D4B1FVGF.js.map +1 -0
- package/dist-vue/composables.js +1 -1
- package/dist-vue/index.js +61 -61
- package/dist-vue/index.js.map +1 -1
- package/dist-vue/packages/components/src/chat/imageEdits.d.ts +3 -1
- package/dist-vue/packages/components/src/chat/utils.d.ts +6 -0
- package/dist-vue/packages/components/src/composables/useLightbox.d.ts +6 -0
- package/package.json +1 -1
- package/dist/_chunks/PkImageEditorDialog-D-ikpGo8.js.map +0 -1
- package/dist/_chunks/useLightbox-C54BCSbU.js.map +0 -1
- package/dist/_chunks/utils-Do6urHUh.js.map +0 -1
- package/dist-vue/_chunks/PkChatbotInput-DSyIo0xB.js +0 -520
- package/dist-vue/_chunks/PkChatbotInput-DSyIo0xB.js.map +0 -1
- package/dist-vue/_chunks/PkChatbotMessages-CZu8feEz.js +0 -1054
- package/dist-vue/_chunks/PkImageEditorDialog-Dn3HV_ny.js.map +0 -1
- package/dist-vue/_chunks/useLightbox-Ctl9zaMX.js.map +0 -1
|
@@ -2,18 +2,18 @@ import { t as e } from "./rolldown-runtime-CGnMp29N.js";
|
|
|
2
2
|
import { t } from "./PkEditorRadioButtons-Bw576DPQ.js";
|
|
3
3
|
import { i as n, n as r, r as i } from "./excelNumberFormat-C1sCQrOz.js";
|
|
4
4
|
import { t as a } from "./VvButtonLocalized-C-vx25u4.js";
|
|
5
|
-
import {
|
|
6
|
-
import { r as ee } from "./PkChatbotViewChat-
|
|
5
|
+
import { B as o, G as s, J as c, K as l, U as u, W as d, X as f, Y as p, o as m, q as h } from "./utils-D4B1FVGF.js";
|
|
6
|
+
import { r as ee } from "./PkChatbotViewChat-tmHyxxT3.js";
|
|
7
7
|
import { VvIcon as g } from "@volverjs/ui-vue/components";
|
|
8
|
-
import { Fragment as _, computed as v, createBlock as y, createCommentVNode as b, createElementBlock as x, createElementVNode as S, createTextVNode as C, createVNode as w, defineComponent as T, inject as E, isMemoSame as D, mergeModels as O, nextTick as te, normalizeClass as k, normalizeStyle as A, onBeforeUnmount as ne, onMounted as re, onScopeDispose as j, openBlock as M, provide as ie, ref as N, renderList as P, shallowRef as F, toDisplayString as I, unref as L, useModel as R, useTemplateRef as
|
|
9
|
-
import { useI18n as
|
|
10
|
-
import { useElementSize as
|
|
8
|
+
import { Fragment as _, computed as v, createBlock as y, createCommentVNode as b, createElementBlock as x, createElementVNode as S, createTextVNode as C, createVNode as w, defineComponent as T, inject as E, isMemoSame as D, mergeModels as O, nextTick as te, normalizeClass as k, normalizeStyle as A, onBeforeUnmount as ne, onMounted as re, onScopeDispose as j, openBlock as M, provide as ie, ref as N, renderList as P, shallowRef as F, toDisplayString as I, unref as L, useModel as R, useTemplateRef as ae, vModelText as oe, watch as z, withCtx as B, withDirectives as se, withKeys as ce, withModifiers as V } from "vue";
|
|
9
|
+
import { useI18n as le } from "vue-i18n";
|
|
10
|
+
import { useElementSize as ue, useEventListener as H } from "@vueuse/core";
|
|
11
11
|
// ../../packages/composable/src/useSettledSelection.ts
|
|
12
|
-
var
|
|
13
|
-
function
|
|
14
|
-
return typeof matchMedia == "function" && matchMedia(
|
|
12
|
+
var de = "(hover: hover) and (pointer: fine)", U = "(hover: none) and (pointer: coarse)", fe = 400;
|
|
13
|
+
function W() {
|
|
14
|
+
return typeof matchMedia == "function" && matchMedia(U).matches;
|
|
15
15
|
}
|
|
16
|
-
function
|
|
16
|
+
function pe(e) {
|
|
17
17
|
let t = document.getSelection();
|
|
18
18
|
if (!t || t.rangeCount === 0) return;
|
|
19
19
|
if (e.nodeType === Node.DOCUMENT_NODE) return t.getRangeAt(0).cloneRange();
|
|
@@ -33,13 +33,13 @@ function de(e) {
|
|
|
33
33
|
let r = n.getSelection?.();
|
|
34
34
|
return r && r.rangeCount > 0 ? r.getRangeAt(0).cloneRange() : void 0;
|
|
35
35
|
}
|
|
36
|
-
function
|
|
36
|
+
function me({ root: e, enabled: t = () => !0, delay: n = 150, minChars: r = 2, touch: i = !1 }) {
|
|
37
37
|
let a = F(), o, s = () => {
|
|
38
38
|
clearTimeout(o), a.value = void 0;
|
|
39
39
|
}, c = () => {
|
|
40
40
|
let n = e();
|
|
41
41
|
if (!n || !t()) return;
|
|
42
|
-
let i =
|
|
42
|
+
let i = pe(n);
|
|
43
43
|
if (!i || i.collapsed || i.toString().trim().length < r) return;
|
|
44
44
|
let a = i.getBoundingClientRect();
|
|
45
45
|
return {
|
|
@@ -47,7 +47,7 @@ function fe({ root: e, enabled: t = () => !0, delay: n = 150, minChars: r = 2, t
|
|
|
47
47
|
start: i.getClientRects()[0] ?? a,
|
|
48
48
|
box: a
|
|
49
49
|
};
|
|
50
|
-
}, l = typeof document < "u" && typeof matchMedia == "function" && matchMedia(
|
|
50
|
+
}, l = typeof document < "u" && typeof matchMedia == "function" && matchMedia(de).matches, u = i && typeof document < "u" && W(), d = u ? Math.max(n, fe) : n, f = () => {
|
|
51
51
|
s(), o = setTimeout(() => {
|
|
52
52
|
a.value = c();
|
|
53
53
|
}, d);
|
|
@@ -60,7 +60,7 @@ function fe({ root: e, enabled: t = () => !0, delay: n = 150, minChars: r = 2, t
|
|
|
60
60
|
};
|
|
61
61
|
}
|
|
62
62
|
// ../../packages/components/src/chat/fileSelection.ts
|
|
63
|
-
var
|
|
63
|
+
var he = 2e3, G = 1e3, K = 60, ge = 1400, _e = 20, q = 100, ve = (e) => Number(e.slice(1)), ye = (e) => {
|
|
64
64
|
let t = [...new Set(e)].sort((e, t) => ve(e) - ve(t)), n = [];
|
|
65
65
|
for (let e of t) {
|
|
66
66
|
let t = n[n.length - 1];
|
|
@@ -79,7 +79,7 @@ var pe = 2e3, q = 1e3, me = 60, he = 1400, ge = 20, _e = 100, ve = (e) => Number
|
|
|
79
79
|
let r = be(e, e.slice(t, t + n));
|
|
80
80
|
if (r.length < 2) return {};
|
|
81
81
|
let i = t, a = t + n;
|
|
82
|
-
for (let t = !0; a - i <=
|
|
82
|
+
for (let t = !0; a - i <= ge; t = !t) {
|
|
83
83
|
if (be(e, e.slice(i, a)).length === 1) return { find: e.slice(i, a) };
|
|
84
84
|
if (t && i > 0) i = e.slice(0, i).replace(/\S*\s*$/, "").length;
|
|
85
85
|
else if (a < e.length) {
|
|
@@ -91,7 +91,7 @@ var pe = 2e3, q = 1e3, me = 60, he = 1400, ge = 20, _e = 100, ve = (e) => Number
|
|
|
91
91
|
index: r.indexOf(t) + 1 || 1,
|
|
92
92
|
of: r.length
|
|
93
93
|
} };
|
|
94
|
-
}, Se = (e) => (e.querySelectorAll("[data-quote-skip]").forEach((e) => e.remove()), e.querySelectorAll("[data-paragraph]").forEach((e) => e.append("\n")), e.textContent ?? ""), Ce = (e) => e.length >
|
|
94
|
+
}, Se = (e) => (e.querySelectorAll("[data-quote-skip]").forEach((e) => e.remove()), e.querySelectorAll("[data-paragraph]").forEach((e) => e.append("\n")), e.textContent ?? ""), Ce = (e) => e.length > G ? `${e.slice(0, G / 2)} […] ${e.slice(-500)}` : e, we = (e) => {
|
|
95
95
|
let t = e.startContainer.getRootNode().getSelection?.() ?? document.getSelection();
|
|
96
96
|
try {
|
|
97
97
|
t?.setBaseAndExtent(e.startContainer, e.startOffset, e.endContainer, e.endOffset);
|
|
@@ -126,7 +126,7 @@ var pe = 2e3, q = 1e3, me = 60, he = 1400, ge = 20, _e = 100, ve = (e) => Number
|
|
|
126
126
|
let r = Se(n.cloneContents()).replace(/\n$/, ""), a = document.createRange();
|
|
127
127
|
a.setStart(e, 0), a.setEnd(t.startContainer, t.startOffset);
|
|
128
128
|
let l = Se(a.cloneContents()).length + (o.length - o.trimStart().length);
|
|
129
|
-
c.before = r.slice(Math.max(0, l -
|
|
129
|
+
c.before = r.slice(Math.max(0, l - K), l), c.after = r.slice(l + s.length, l + s.length + K), Object.assign(c, xe(r, l, s.length));
|
|
130
130
|
}
|
|
131
131
|
return c;
|
|
132
132
|
}, Ee = (e) => {
|
|
@@ -144,7 +144,7 @@ var pe = 2e3, q = 1e3, me = 60, he = 1400, ge = 20, _e = 100, ve = (e) => Number
|
|
|
144
144
|
e = !1;
|
|
145
145
|
for (let t of r) t.r1 <= n.r2 && t.r2 >= n.r1 && t.c1 <= n.c2 && t.c2 >= n.c1 && (t.r1 < n.r1 || t.r2 > n.r2 || t.c1 < n.c1 || t.c2 > n.c2) && (n.r1 = Math.min(n.r1, t.r1), n.r2 = Math.max(n.r2, t.r2), n.c1 = Math.min(n.c1, t.c1), n.c2 = Math.max(n.c2, t.c2), e = !0);
|
|
146
146
|
}
|
|
147
|
-
let i = `${Ee(n.c1)}${n.r1}`, a = `${Ee(n.c2)}${n.r2}`, o = (e.hiddenRows ?? []).filter((e) => e >= n.r1 && e <= n.r2).slice(0,
|
|
147
|
+
let i = `${Ee(n.c1)}${n.r1}`, a = `${Ee(n.c2)}${n.r2}`, o = (e.hiddenRows ?? []).filter((e) => e >= n.r1 && e <= n.r2).slice(0, q), s = e.columns.filter((e) => e.hidden && e.col >= n.c1 && e.col <= n.c2).map((e) => Ee(e.col)).slice(0, q), c = e.rows.filter((e) => e.row >= n.r1 && e.row <= n.r2).flatMap((e) => e.cells.filter((e) => e.col >= n.c1 && e.col <= n.c2 && e.value !== void 0 && e.value !== "")).slice(0, _e).map((e) => String(e.value)).join("; ").slice(0, 500);
|
|
148
148
|
return {
|
|
149
149
|
format: "xlsx",
|
|
150
150
|
sheet: e.name,
|
|
@@ -189,76 +189,76 @@ var pe = 2e3, q = 1e3, me = 60, he = 1400, ge = 20, _e = 100, ve = (e) => Number
|
|
|
189
189
|
proofread: "ri:check-double-line",
|
|
190
190
|
translate: "ri:translate-2",
|
|
191
191
|
chart: "ri:bar-chart-2-line"
|
|
192
|
-
}, r = e, i = t, a = R(e, "asking"), { t:
|
|
192
|
+
}, r = e, i = t, a = R(e, "asking"), { t: s } = le({ useScope: "global" }), c = ae("barEl"), l = ae("inputEl"), { width: u, height: d } = ue(c, void 0, { box: "border-box" }), f = v(() => o({
|
|
193
193
|
...r.anchor,
|
|
194
194
|
bar: {
|
|
195
|
-
width:
|
|
196
|
-
height:
|
|
195
|
+
width: u.value,
|
|
196
|
+
height: d.value
|
|
197
197
|
},
|
|
198
198
|
touch: r.touch
|
|
199
|
-
})),
|
|
200
|
-
|
|
199
|
+
})), p = N(), m = N(""), h = async (e, t) => {
|
|
200
|
+
p.value = {
|
|
201
201
|
id: e,
|
|
202
202
|
placeholder: t
|
|
203
|
-
},
|
|
203
|
+
}, m.value = "", a.value = !0, await te(), l.value?.focus();
|
|
204
204
|
}, ee = () => {
|
|
205
|
-
|
|
206
|
-
}, y = () =>
|
|
207
|
-
e.asks ?
|
|
205
|
+
p.value = void 0, a.value = !1;
|
|
206
|
+
}, y = () => h(void 0, s("selectionActions.askPlaceholder")), T = (e) => n[e.id] ?? Ae, E = (e) => {
|
|
207
|
+
e.asks ? h(e.id, e.asks) : i("action", e.id);
|
|
208
208
|
}, D = (e, t) => {
|
|
209
209
|
let n = e.currentTarget, r = e.changedTouches[0], i = n.getRootNode(), a = r && i.elementFromPoint(r.clientX, r.clientY);
|
|
210
210
|
a && n.contains(a) && t();
|
|
211
211
|
}, O = () => {
|
|
212
|
-
let e =
|
|
213
|
-
e &&
|
|
212
|
+
let e = m.value.trim();
|
|
213
|
+
e && p.value && (p.value.id ? i("action", p.value.id, e) : i("ask", e), ee());
|
|
214
214
|
}, ne = (e) => {
|
|
215
|
-
e.isComposing || (e.stopPropagation(), e.preventDefault(),
|
|
215
|
+
e.isComposing || (e.stopPropagation(), e.preventDefault(), p.value ? ee() : i("close"));
|
|
216
216
|
};
|
|
217
217
|
return (t, n) => {
|
|
218
218
|
let r = g;
|
|
219
219
|
return M(), x("div", {
|
|
220
220
|
class: k(["pk-selection-actions", {
|
|
221
221
|
"pk-selection-actions--fixed": e.strategy === "fixed",
|
|
222
|
-
"pk-selection-actions--asking": !!
|
|
222
|
+
"pk-selection-actions--asking": !!p.value
|
|
223
223
|
}]),
|
|
224
224
|
style: A({
|
|
225
|
-
top: `${
|
|
226
|
-
left: `${
|
|
225
|
+
top: `${f.value.top}px`,
|
|
226
|
+
left: `${f.value.left}px`
|
|
227
227
|
}),
|
|
228
|
-
onKeydown:
|
|
229
|
-
}, [
|
|
228
|
+
onKeydown: ce(ne, ["esc"])
|
|
229
|
+
}, [p.value ? (M(), x("form", {
|
|
230
230
|
key: 0,
|
|
231
231
|
ref_key: "barEl",
|
|
232
|
-
ref:
|
|
232
|
+
ref: c,
|
|
233
233
|
class: "pk-selection-actions__menu pk-selection-actions__menu--field",
|
|
234
|
-
onSubmit:
|
|
235
|
-
}, [
|
|
234
|
+
onSubmit: V(O, ["prevent"])
|
|
235
|
+
}, [se(S("input", {
|
|
236
236
|
ref_key: "inputEl",
|
|
237
|
-
ref:
|
|
238
|
-
"onUpdate:modelValue": n[0] ||= (e) =>
|
|
237
|
+
ref: l,
|
|
238
|
+
"onUpdate:modelValue": n[0] ||= (e) => m.value = e,
|
|
239
239
|
class: "pk-selection-actions__input",
|
|
240
240
|
type: "text",
|
|
241
241
|
maxlength: "500",
|
|
242
|
-
placeholder:
|
|
243
|
-
"aria-label":
|
|
244
|
-
}, null, 8, Oe), [[
|
|
242
|
+
placeholder: p.value.placeholder,
|
|
243
|
+
"aria-label": p.value.placeholder
|
|
244
|
+
}, null, 8, Oe), [[oe, m.value]]), S("button", {
|
|
245
245
|
type: "submit",
|
|
246
246
|
class: "pk-selection-actions__button pk-selection-actions__button--send",
|
|
247
|
-
disabled: !
|
|
248
|
-
}, I(L(
|
|
247
|
+
disabled: !m.value.trim()
|
|
248
|
+
}, I(L(s)("action.send")), 9, J)], 544)) : (M(), x("div", {
|
|
249
249
|
key: 1,
|
|
250
250
|
ref_key: "barEl",
|
|
251
|
-
ref:
|
|
251
|
+
ref: c,
|
|
252
252
|
class: "pk-selection-actions__menu",
|
|
253
253
|
role: "toolbar",
|
|
254
254
|
"aria-orientation": "vertical",
|
|
255
|
-
"aria-label": L(
|
|
256
|
-
onTouchstart: n[7] ||=
|
|
255
|
+
"aria-label": L(s)("selectionActions.label"),
|
|
256
|
+
onTouchstart: n[7] ||= V(() => {}, ["prevent"])
|
|
257
257
|
}, [e.note ? (M(), x(_, { key: 0 }, [S("p", Y, I(e.note), 1), e.noteAction ? (M(), x("button", {
|
|
258
258
|
key: 0,
|
|
259
259
|
type: "button",
|
|
260
260
|
class: "pk-selection-actions__button",
|
|
261
|
-
onMousedown: n[1] ||=
|
|
261
|
+
onMousedown: n[1] ||= V(() => {}, ["prevent"]),
|
|
262
262
|
onClick: n[2] ||= (e) => i("note"),
|
|
263
263
|
onTouchend: n[3] ||= (e) => D(e, () => i("note"))
|
|
264
264
|
}, [w(r, {
|
|
@@ -270,7 +270,7 @@ var pe = 2e3, q = 1e3, me = 60, he = 1400, ge = 20, _e = 100, ve = (e) => Number
|
|
|
270
270
|
key: e.id,
|
|
271
271
|
type: "button",
|
|
272
272
|
class: "pk-selection-actions__button",
|
|
273
|
-
onMousedown: n[4] ||=
|
|
273
|
+
onMousedown: n[4] ||= V(() => {}, ["prevent"]),
|
|
274
274
|
onClick: (t) => E(e),
|
|
275
275
|
onTouchend: (t) => D(t, () => E(e))
|
|
276
276
|
}, [w(r, {
|
|
@@ -281,13 +281,13 @@ var pe = 2e3, q = 1e3, me = 60, he = 1400, ge = 20, _e = 100, ve = (e) => Number
|
|
|
281
281
|
S("button", {
|
|
282
282
|
type: "button",
|
|
283
283
|
class: "pk-selection-actions__button",
|
|
284
|
-
onMousedown: n[5] ||=
|
|
284
|
+
onMousedown: n[5] ||= V(() => {}, ["prevent"]),
|
|
285
285
|
onClick: y,
|
|
286
286
|
onTouchend: n[6] ||= (e) => D(e, y)
|
|
287
287
|
}, [w(r, {
|
|
288
288
|
name: "ri:chat-1-line",
|
|
289
289
|
class: "pk-selection-actions__icon"
|
|
290
|
-
}), C(" " + I(L(
|
|
290
|
+
}), C(" " + I(L(s)("selectionActions.ask")), 1)], 32)
|
|
291
291
|
], 64))], 40, ke))], 38);
|
|
292
292
|
};
|
|
293
293
|
}
|
|
@@ -321,11 +321,11 @@ var pe = 2e3, q = 1e3, me = 60, he = 1400, ge = 20, _e = 100, ve = (e) => Number
|
|
|
321
321
|
}),
|
|
322
322
|
emits: /*@__PURE__*/ O(["select"], ["update:sheet", "update:zoom"]),
|
|
323
323
|
setup(e, { emit: t }) {
|
|
324
|
-
let o = e, s = t, { t: c, locale: l } =
|
|
324
|
+
let o = e, s = t, { t: c, locale: l } = le({ useScope: "global" }), u = R(e, "sheet"), d = R(e, "zoom"), f = ae("scrollEl"), { width: p, height: m } = ue(f, {
|
|
325
325
|
width: 0,
|
|
326
326
|
height: 0
|
|
327
327
|
}, { box: "border-box" }), h = v(() => o.preview.sheets[u.value] ?? o.preview.sheets[0]);
|
|
328
|
-
|
|
328
|
+
z(() => o.preview, () => {
|
|
329
329
|
u.value = 0;
|
|
330
330
|
});
|
|
331
331
|
let g = v(() => o.marked?.get(h.value?.name ?? "")), y = v(() => {
|
|
@@ -336,13 +336,13 @@ var pe = 2e3, q = 1e3, me = 60, he = 1400, ge = 20, _e = 100, ve = (e) => Number
|
|
|
336
336
|
}
|
|
337
337
|
return e;
|
|
338
338
|
}), T = (e, t) => !!g.value?.has(`${e}:${t}`);
|
|
339
|
-
|
|
339
|
+
z(() => o.marked, (e) => {
|
|
340
340
|
if (!e || g.value) return;
|
|
341
341
|
let t = o.preview.sheets.findIndex((t) => e.has(t.name));
|
|
342
342
|
t >= 0 && (u.value = t);
|
|
343
343
|
}, { immediate: !0 });
|
|
344
344
|
let E = () => ee(f.value, ".pk-spreadsheet-preview__cell--marked");
|
|
345
|
-
|
|
345
|
+
z(g, E, { flush: "post" }), re(E);
|
|
346
346
|
let O = (e) => {
|
|
347
347
|
let t = "";
|
|
348
348
|
for (let n = e; n > 0; n = Math.floor((n - 1) / 26)) t = String.fromCharCode(65 + (n - 1) % 26) + t;
|
|
@@ -360,11 +360,11 @@ var pe = 2e3, q = 1e3, me = 60, he = 1400, ge = 20, _e = 100, ve = (e) => Number
|
|
|
360
360
|
}), i += e;
|
|
361
361
|
}
|
|
362
362
|
return r;
|
|
363
|
-
}), ie = v(() => j.value.reduce((e, t) => e + t.width, $e)), F = v(() => j.value.map((e) => `${e.col}:${e.width}`).join(",")),
|
|
363
|
+
}), ie = v(() => j.value.reduce((e, t) => e + t.width, $e)), F = v(() => j.value.map((e) => `${e.col}:${e.width}`).join(",")), oe = /* @__PURE__ */ new WeakMap(), B = v(() => {
|
|
364
364
|
let e = h.value;
|
|
365
365
|
if (!e) return [];
|
|
366
|
-
let t = new Set(e.hiddenRows ?? []), n = new Map(e.rows.map((e) => [e.row, e.height])), r = Math.ceil((m.value / d.value - Qe) / Ze), i = e.moreRows ? e.lastRow : Math.max(e.lastRow + 5, r + t.size), a =
|
|
367
|
-
a || (a = /* @__PURE__ */ new Map(),
|
|
366
|
+
let t = new Set(e.hiddenRows ?? []), n = new Map(e.rows.map((e) => [e.row, e.height])), r = Math.ceil((m.value / d.value - Qe) / Ze), i = e.moreRows ? e.lastRow : Math.max(e.lastRow + 5, r + t.size), a = oe.get(e);
|
|
367
|
+
a || (a = /* @__PURE__ */ new Map(), oe.set(e, a));
|
|
368
368
|
let o = a;
|
|
369
369
|
return Array.from({ length: i }, (e, t) => t + 1).filter((e) => !t.has(e)).map((e) => {
|
|
370
370
|
let t = o.get(e);
|
|
@@ -373,32 +373,32 @@ var pe = 2e3, q = 1e3, me = 60, he = 1400, ge = 20, _e = 100, ve = (e) => Number
|
|
|
373
373
|
height: n.get(e) ?? Ze
|
|
374
374
|
}, o.set(e, t)), t;
|
|
375
375
|
});
|
|
376
|
-
}),
|
|
376
|
+
}), se = v(() => {
|
|
377
377
|
let e = /* @__PURE__ */ new Map();
|
|
378
378
|
for (let t of h.value?.rows ?? []) for (let n of t.cells) e.set(`${t.row},${n.col}`, n);
|
|
379
379
|
return e;
|
|
380
|
-
}),
|
|
380
|
+
}), ce = v(() => {
|
|
381
381
|
let e = /* @__PURE__ */ new Map();
|
|
382
382
|
for (let t of h.value?.rows ?? []) for (let n of t.cells) if (n.span) for (let r = 0; r < n.span.rows; r++) for (let i = 0; i < n.span.cols; i++) (r || i) && e.set(`${t.row + r},${n.col + i}`, {
|
|
383
383
|
row: t.row,
|
|
384
384
|
col: n.col
|
|
385
385
|
});
|
|
386
386
|
return e;
|
|
387
|
-
}),
|
|
388
|
-
let n =
|
|
387
|
+
}), H = (e, t) => se.value.get(`${e},${t}`), de = (e, t) => {
|
|
388
|
+
let n = H(e, t)?.span;
|
|
389
389
|
if (n) return {
|
|
390
|
-
rows:
|
|
390
|
+
rows: B.value.filter((t) => t.row >= e && t.row < e + n.rows).length,
|
|
391
391
|
cols: j.value.filter((e) => e.col >= t && e.col < t + n.cols).length
|
|
392
392
|
};
|
|
393
|
-
},
|
|
393
|
+
}, U = (e) => e?.style === void 0 ? void 0 : o.preview.styles[e.style], fe = (e) => {
|
|
394
394
|
let t = e.numFmt === void 0 ? void 0 : o.preview.numberFormats?.[e.numFmt], a = e.value;
|
|
395
395
|
if (t !== void 0) try {
|
|
396
396
|
return e.format === "date" ? e.serial === void 0 ? void 0 : r(t, e.serial, l.value, o.preview.date1904) : typeof a == "number" ? n(t) ? r(t, a, l.value, o.preview.date1904) : i(t, a, l.value) : void 0;
|
|
397
397
|
} catch {
|
|
398
398
|
return;
|
|
399
399
|
}
|
|
400
|
-
},
|
|
401
|
-
let n =
|
|
400
|
+
}, W = (e, t) => {
|
|
401
|
+
let n = fe(e);
|
|
402
402
|
if (n) return n.text;
|
|
403
403
|
let r = e.decimals === void 0 ? { maximumFractionDigits: 10 } : {
|
|
404
404
|
minimumFractionDigits: e.decimals,
|
|
@@ -413,18 +413,18 @@ var pe = 2e3, q = 1e3, me = 60, he = 1400, ge = 20, _e = 100, ve = (e) => Number
|
|
|
413
413
|
currency: e.currency
|
|
414
414
|
} : {}
|
|
415
415
|
}).format(t);
|
|
416
|
-
},
|
|
416
|
+
}, pe = (e) => {
|
|
417
417
|
let t = /* @__PURE__ */ new Date(`${e}T00:00:00Z`);
|
|
418
418
|
return Number.isNaN(t.getTime()) ? e : new Intl.DateTimeFormat(l.value, {
|
|
419
419
|
dateStyle: "short",
|
|
420
420
|
timeZone: "UTC"
|
|
421
421
|
}).format(t);
|
|
422
|
-
},
|
|
422
|
+
}, me = (e) => {
|
|
423
423
|
if (!e) return "";
|
|
424
424
|
if (e.missing) return "—";
|
|
425
425
|
let t = e.value;
|
|
426
|
-
return t === void 0 ? "" : typeof t == "boolean" ? c(t ? "chatFilePreview.true" : "chatFilePreview.false") : e.format === "date" && typeof t == "string" ?
|
|
427
|
-
},
|
|
426
|
+
return t === void 0 ? "" : typeof t == "boolean" ? c(t ? "chatFilePreview.true" : "chatFilePreview.false") : e.format === "date" && typeof t == "string" ? fe(e)?.text ?? pe(t) : typeof t == "number" ? W(e, t) : t;
|
|
427
|
+
}, he = (e) => {
|
|
428
428
|
if (!e) return "";
|
|
429
429
|
if (e.formula) return `=${e.formula}`;
|
|
430
430
|
let t = e.value;
|
|
@@ -432,9 +432,9 @@ var pe = 2e3, q = 1e3, me = 60, he = 1400, ge = 20, _e = 100, ve = (e) => Number
|
|
|
432
432
|
useGrouping: !1,
|
|
433
433
|
maximumFractionDigits: 15,
|
|
434
434
|
...e.format === "percent" ? { style: "percent" } : {}
|
|
435
|
-
}).format(t) :
|
|
436
|
-
},
|
|
437
|
-
let r =
|
|
435
|
+
}).format(t) : me(e);
|
|
436
|
+
}, G = (e) => e ? `${e.width}px solid ${e.color}` : void 0, K = (e, t, n) => {
|
|
437
|
+
let r = U(e), i = e?.value, a = typeof i == "number" || e?.format === "date" || !!e?.missing, o = {
|
|
438
438
|
textAlign: r?.align ?? (a ? "right" : typeof i == "boolean" || e?.format === "error" ? "center" : "left"),
|
|
439
439
|
verticalAlign: r?.valign === "top" ? "top" : r?.valign === "middle" ? "middle" : "bottom",
|
|
440
440
|
whiteSpace: r?.wrap ? "pre-wrap" : "nowrap"
|
|
@@ -442,25 +442,25 @@ var pe = 2e3, q = 1e3, me = 60, he = 1400, ge = 20, _e = 100, ve = (e) => Number
|
|
|
442
442
|
r?.bold && (o.fontWeight = 700), r?.italic && (o.fontStyle = "italic");
|
|
443
443
|
let s = [r?.underline ? "underline" : "", r?.strike ? "line-through" : ""].filter(Boolean).join(" ");
|
|
444
444
|
s && (o.textDecoration = s), r?.size && (o.fontSize = `${r.size}pt`);
|
|
445
|
-
let c = e ?
|
|
445
|
+
let c = e ? fe(e)?.color : void 0;
|
|
446
446
|
if ((c ?? r?.color) && (o.color = c ?? r?.color), r?.fill && (o.backgroundColor = r.fill), r?.indent) {
|
|
447
447
|
let e = `${4 + r.indent * 9}px`;
|
|
448
448
|
o.textAlign === "right" ? o.paddingRight = e : o.paddingLeft = e;
|
|
449
449
|
}
|
|
450
450
|
let l = rt(t, n);
|
|
451
|
-
return
|
|
452
|
-
},
|
|
451
|
+
return ge(t, n) ? (o.borderStyle = "hidden", o.boxShadow = [...l, Te(e, t, n)].filter(Boolean).join(", ")) : (o.borderTop = G(r?.borders?.top), o.borderRight = G(r?.borders?.right), o.borderBottom = G(r?.borders?.bottom), o.borderLeft = G(r?.borders?.left), o.boxShadow = [...l, ...ve(e, t, n)].join(", ")), Object.assign(o, ke(t, n)), o;
|
|
452
|
+
}, ge = (e, t) => {
|
|
453
453
|
let n = h.value?.frozen;
|
|
454
454
|
return !!n && (e <= n.rows || t <= n.cols);
|
|
455
|
-
},
|
|
455
|
+
}, _e = {
|
|
456
456
|
top: (e) => `inset 0 ${e.width}px 0 ${e.color}`,
|
|
457
457
|
right: (e) => `inset -${e.width}px 0 0 ${e.color}`,
|
|
458
458
|
bottom: (e) => `inset 0 -${e.width}px 0 ${e.color}`,
|
|
459
459
|
left: (e) => `inset ${e.width}px 0 0 ${e.color}`
|
|
460
|
-
},
|
|
461
|
-
let r =
|
|
462
|
-
return [t ===
|
|
463
|
-
}, ye = v(() =>
|
|
460
|
+
}, q = (...e) => e.reduce((e, t) => t && (!e || t.width > e.width) ? t : e, void 0), ve = (e, t, n) => {
|
|
461
|
+
let r = U(e)?.borders;
|
|
462
|
+
return [t === B.value[0]?.row && r?.top && _e.top(r.top), n === j.value[0]?.col && r?.left && _e.left(r.left)].filter((e) => !!e);
|
|
463
|
+
}, ye = v(() => B.value.map((e) => e.row)), be = v(() => j.value.map((e) => e.col)), xe = v(() => new Map(ye.value.map((e, t) => [e, t]))), Se = v(() => new Map(be.value.map((e, t) => [e, t]))), Ce = (e, t, n, r) => {
|
|
464
464
|
let i = [], a = t.get(n) ?? e.length;
|
|
465
465
|
for (; a < e.length && e[a] < n + r; a++) i.push(e[a]);
|
|
466
466
|
return {
|
|
@@ -476,17 +476,17 @@ var pe = 2e3, q = 1e3, me = 60, he = 1400, ge = 20, _e = 100, ve = (e) => Number
|
|
|
476
476
|
row: a,
|
|
477
477
|
col: e
|
|
478
478
|
}))).map((e) => {
|
|
479
|
-
let t =
|
|
480
|
-
return
|
|
479
|
+
let t = ce.value.get(`${e.row},${e.col}`) ?? e;
|
|
480
|
+
return H(t.row, t.col);
|
|
481
481
|
});
|
|
482
482
|
}, Te = (e, t, n) => {
|
|
483
|
-
let r =
|
|
483
|
+
let r = U(e)?.borders, i = q(r?.right, ...we(e, t, n, "right").map((e) => U(e)?.borders?.left)), a = q(r?.bottom, ...we(e, t, n, "bottom").map((e) => U(e)?.borders?.top)), o = h.value?.gridlines;
|
|
484
484
|
return [
|
|
485
|
-
i ?
|
|
486
|
-
a ?
|
|
485
|
+
i ? _e.right(i) : o && "inset calc(var(--border) * -1) 0 0 var(--pk-spreadsheet-gridline)",
|
|
486
|
+
a ? _e.bottom(a) : o && "inset 0 calc(var(--border) * -1) 0 var(--pk-spreadsheet-gridline)",
|
|
487
487
|
...ve(e, t, n)
|
|
488
488
|
].filter(Boolean).join(", ");
|
|
489
|
-
}, Ee = (e) => Qe +
|
|
489
|
+
}, Ee = (e) => Qe + B.value.filter((t) => t.row < e).reduce((e, t) => e + t.height, 0), Oe = (e) => $e + j.value.filter((t) => t.col < e).reduce((e, t) => e + t.width, 0), J = v(() => {
|
|
490
490
|
let e = h.value?.frozen;
|
|
491
491
|
return {
|
|
492
492
|
top: Ee((e?.rows ?? 0) + 1),
|
|
@@ -504,7 +504,7 @@ var pe = 2e3, q = 1e3, me = 60, he = 1400, ge = 20, _e = 100, ve = (e) => Number
|
|
|
504
504
|
row: 1,
|
|
505
505
|
col: 1
|
|
506
506
|
});
|
|
507
|
-
|
|
507
|
+
z(h, () => {
|
|
508
508
|
Y.value = {
|
|
509
509
|
row: 1,
|
|
510
510
|
col: 1
|
|
@@ -521,7 +521,7 @@ var pe = 2e3, q = 1e3, me = 60, he = 1400, ge = 20, _e = 100, ve = (e) => Number
|
|
|
521
521
|
})), Ae = (e, t) => e >= Z.value.r1 && e <= Z.value.r2 && t >= Z.value.c1 && t <= Z.value.c2, je = (e, t) => X.value.row === e && X.value.col === t, nt = (e) => e >= Z.value.r1 && e <= Z.value.r2 ? `${Z.value.c1}:${Z.value.c2}:${X.value.row === e ? X.value.col : 0}:${e === Z.value.r1 ? "t" : ""}${e === Z.value.r2 ? "b" : ""}` : "", rt = (e, t) => {
|
|
522
522
|
let { r1: n, r2: r, c1: i, c2: a } = Z.value;
|
|
523
523
|
if (n === r && i === a || !Ae(e, t)) return [];
|
|
524
|
-
let o =
|
|
524
|
+
let o = H(e, t)?.span, s = e + (o?.rows ?? 1) - 1, c = t + (o?.cols ?? 1) - 1, l = "var(--spacing-2)", u = "var(--pk-spreadsheet-green)";
|
|
525
525
|
return [
|
|
526
526
|
e === n && `inset 0 ${l} 0 ${u}`,
|
|
527
527
|
s >= r && `inset 0 calc(${l} * -1) 0 ${u}`,
|
|
@@ -554,7 +554,7 @@ var pe = 2e3, q = 1e3, me = 60, he = 1400, ge = 20, _e = 100, ve = (e) => Number
|
|
|
554
554
|
...De(h.value, Z.value),
|
|
555
555
|
measure: st
|
|
556
556
|
} : void 0;
|
|
557
|
-
|
|
557
|
+
z([Z, Q], () => {
|
|
558
558
|
clearTimeout(ot), !Q.value && (ot = setTimeout(() => {
|
|
559
559
|
let e = Z.value, t = e.r2 > e.r1 || e.c2 > e.c1;
|
|
560
560
|
s("select", t ? ct() : void 0);
|
|
@@ -563,7 +563,7 @@ var pe = 2e3, q = 1e3, me = 60, he = 1400, ge = 20, _e = 100, ve = (e) => Number
|
|
|
563
563
|
let lt = () => {
|
|
564
564
|
clearTimeout(ot), s("select", ct());
|
|
565
565
|
}, $, ut;
|
|
566
|
-
|
|
566
|
+
z(h, () => {
|
|
567
567
|
ut = void 0;
|
|
568
568
|
});
|
|
569
569
|
let dt = (e) => {
|
|
@@ -634,7 +634,7 @@ var pe = 2e3, q = 1e3, me = 60, he = 1400, ge = 20, _e = 100, ve = (e) => Number
|
|
|
634
634
|
}[e.key];
|
|
635
635
|
if (!t) return;
|
|
636
636
|
e.preventDefault();
|
|
637
|
-
let n =
|
|
637
|
+
let n = B.value.map((e) => e.row), r = j.value.map((e) => e.col), i = (e) => ce.value.get(`${e.row},${e.col}`) ?? e, a = i(X.value), o = n.indexOf(X.value.row), s = r.indexOf(X.value.col), c = a;
|
|
638
638
|
for (;;) {
|
|
639
639
|
let e = Math.min(n.length - 1, Math.max(0, o + t[0])), l = Math.min(r.length - 1, Math.max(0, s + t[1]));
|
|
640
640
|
if (e === o && l === s || (o = e, s = l, c = i({
|
|
@@ -646,18 +646,18 @@ var pe = 2e3, q = 1e3, me = 60, he = 1400, ge = 20, _e = 100, ve = (e) => Number
|
|
|
646
646
|
block: "nearest",
|
|
647
647
|
inline: "nearest"
|
|
648
648
|
}));
|
|
649
|
-
}, vt = v(() =>
|
|
649
|
+
}, vt = v(() => H(X.value.row, X.value.col)), yt = v(() => {
|
|
650
650
|
let { r1: e, r2: t, c1: n, c2: r } = Z.value;
|
|
651
651
|
if (e === t && n === r) return;
|
|
652
652
|
let i = 0, a = 0, o = 0, s;
|
|
653
653
|
for (let c = e; c <= t; c++) for (let e = n; e <= r; e++) {
|
|
654
|
-
let t =
|
|
654
|
+
let t = H(c, e);
|
|
655
655
|
t && (t.value !== void 0 || t.missing) && (i++, typeof t.value == "number" && (a += t.value, o++, s ??= t));
|
|
656
656
|
}
|
|
657
657
|
if (i) return {
|
|
658
658
|
count: i,
|
|
659
|
-
sum: s ?
|
|
660
|
-
average: s ?
|
|
659
|
+
sum: s ? W(s, a) : void 0,
|
|
660
|
+
average: s ? W(s, a / o) : void 0
|
|
661
661
|
};
|
|
662
662
|
}), bt = (e) => {
|
|
663
663
|
d.value = Math.min(2, Math.max(.5, Math.round((d.value + e) * 10) / 10));
|
|
@@ -677,7 +677,7 @@ var pe = 2e3, q = 1e3, me = 60, he = 1400, ge = 20, _e = 100, ve = (e) => Number
|
|
|
677
677
|
S("output", {
|
|
678
678
|
class: "pk-spreadsheet-preview__formula",
|
|
679
679
|
"aria-label": L(c)("chatFilePreview.formulaBar")
|
|
680
|
-
}, I(
|
|
680
|
+
}, I(he(vt.value)), 9, Fe)
|
|
681
681
|
]),
|
|
682
682
|
S("div", {
|
|
683
683
|
ref_key: "scrollEl",
|
|
@@ -716,7 +716,7 @@ var pe = 2e3, q = 1e3, me = 60, he = 1400, ge = 20, _e = 100, ve = (e) => Number
|
|
|
716
716
|
zIndex: 2
|
|
717
717
|
} : void 0)
|
|
718
718
|
}, I(O(e.col)), 7))), 128))], 4)]),
|
|
719
|
-
S("tbody", null, [(M(!0), x(_, null, P(
|
|
719
|
+
S("tbody", null, [(M(!0), x(_, null, P(B.value, (e, t, n, r) => {
|
|
720
720
|
let i = [
|
|
721
721
|
e,
|
|
722
722
|
h.value,
|
|
@@ -737,23 +737,23 @@ var pe = 2e3, q = 1e3, me = 60, he = 1400, ge = 20, _e = 100, ve = (e) => Number
|
|
|
737
737
|
left: 0,
|
|
738
738
|
zIndex: 4
|
|
739
739
|
} : void 0)
|
|
740
|
-
}, I(e.row), 7), (M(!0), x(_, null, P(j.value, (t) => (M(), x(_, { key: t.col }, [
|
|
740
|
+
}, I(e.row), 7), (M(!0), x(_, null, P(j.value, (t) => (M(), x(_, { key: t.col }, [ce.value.has(`${e.row},${t.col}`) ? b("", !0) : (M(), x("td", {
|
|
741
741
|
key: 0,
|
|
742
|
-
rowspan:
|
|
743
|
-
colspan:
|
|
742
|
+
rowspan: de(e.row, t.col)?.rows,
|
|
743
|
+
colspan: de(e.row, t.col)?.cols,
|
|
744
744
|
class: k(["pk-spreadsheet-preview__cell", {
|
|
745
745
|
"pk-spreadsheet-preview__cell--range": Ae(e.row, t.col) && !je(e.row, t.col),
|
|
746
|
-
"pk-spreadsheet-preview__cell--missing":
|
|
746
|
+
"pk-spreadsheet-preview__cell--missing": H(e.row, t.col)?.missing,
|
|
747
747
|
"pk-spreadsheet-preview__cell--marked": T(e.row, t.col)
|
|
748
748
|
}]),
|
|
749
|
-
style: A(
|
|
749
|
+
style: A(K(H(e.row, t.col), e.row, t.col)),
|
|
750
750
|
"data-focus": je(e.row, t.col) ? "" : void 0,
|
|
751
751
|
"data-cell": `${e.row}:${t.col}`,
|
|
752
|
-
title:
|
|
753
|
-
onMousedown:
|
|
752
|
+
title: H(e.row, t.col)?.missing ? L(c)("chatFilePreview.missingValue") : void 0,
|
|
753
|
+
onMousedown: V((n) => it(e.row, t.col, n), ["prevent"]),
|
|
754
754
|
onMouseenter: (n) => at(e.row, t.col),
|
|
755
755
|
onDblclick: lt
|
|
756
|
-
}, I(
|
|
756
|
+
}, I(me(H(e.row, t.col))), 47, Le))], 64))), 128))], 4));
|
|
757
757
|
return a.memo = i, a;
|
|
758
758
|
}, n, 0), 128))])
|
|
759
759
|
], 6)) : b("", !0), h.value && (h.value.moreRows || h.value.moreColumns) ? (M(), x("p", Re, [h.value.moreRows ? (M(), x(_, { key: 0 }, [C(I(L(c)("chatFilePreview.moreRows", h.value.moreRows)), 1)], 64)) : b("", !0), h.value.moreColumns ? (M(), x(_, { key: 1 }, [C(I(L(c)("chatFilePreview.moreColumns", h.value.moreColumns)), 1)], 64)) : b("", !0)])) : b("", !0)], 40, Ie),
|
|
@@ -812,13 +812,13 @@ var pe = 2e3, q = 1e3, me = 60, he = 1400, ge = 20, _e = 100, ve = (e) => Number
|
|
|
812
812
|
numbers: {}
|
|
813
813
|
},
|
|
814
814
|
setup(e) {
|
|
815
|
-
let t = e, { t: n } =
|
|
815
|
+
let t = e, { t: n } = le({ useScope: "global" }), r = E(m, void 0), i = (e) => e.picture ? f(r?.value, e.picture.ref) : void 0, a = (e) => t.page ? p(e) : "inline", o = (e) => {
|
|
816
816
|
let n = {
|
|
817
817
|
width: `${e.width}pt`,
|
|
818
818
|
aspectRatio: `${e.width} / ${e.height}`
|
|
819
819
|
}, r = e.anchor, i = t.page;
|
|
820
820
|
if (!r || !i) return n;
|
|
821
|
-
let a = r.xFrom === "page" ? r.x - i.margins.left : r.x, o =
|
|
821
|
+
let a = r.xFrom === "page" ? r.x - i.margins.left : r.x, o = p(e);
|
|
822
822
|
if (o === "around") {
|
|
823
823
|
let t = i.width - i.margins.left - i.margins.right, o = a + e.width / 2 < t / 2;
|
|
824
824
|
return {
|
|
@@ -839,12 +839,12 @@ var pe = 2e3, q = 1e3, me = 60, he = 1400, ge = 20, _e = 100, ve = (e) => Number
|
|
|
839
839
|
top: `${r.y}pt`,
|
|
840
840
|
zIndex: r.wrap === "behind" ? -1 : 1
|
|
841
841
|
};
|
|
842
|
-
},
|
|
843
|
-
let e =
|
|
842
|
+
}, c = (e) => e.field && t.numbers ? String(t.numbers[e.field]) : e.text, l = v(() => {
|
|
843
|
+
let e = s(t.runs, t.mode ?? "markup"), n = (e) => !!e.picture && !!t.page && ["around", "block"].includes(p(e.picture));
|
|
844
844
|
return [...e.filter(n), ...e.filter((e) => !n(e))];
|
|
845
|
-
}),
|
|
845
|
+
}), u = v(() => !t.mode || t.mode === "markup"), h = (e) => {
|
|
846
846
|
let t = {};
|
|
847
|
-
e.font && (t.fontFamily =
|
|
847
|
+
e.font && (t.fontFamily = d(e.font)), t.fontSize = e.size ? `${e.size}pt` : "var(--pk-word-size)", e.color && (t.color = e.color), e.highlight && (t.backgroundColor = e.highlight), e.bold && (t.fontWeight = 700), e.italic && (t.fontStyle = "italic");
|
|
848
848
|
let n = [e.underline ? "underline" : "", e.strike ? "line-through" : ""].filter(Boolean).join(" ");
|
|
849
849
|
return n && (t.textDecoration = n), e.caps && (t.textTransform = "uppercase"), e.vertAlign && (t.verticalAlign = e.vertAlign, t.fontSize = `${(e.size ?? 11) * .65}pt`), t;
|
|
850
850
|
}, ee = (e) => {
|
|
@@ -860,22 +860,22 @@ var pe = 2e3, q = 1e3, me = 60, he = 1400, ge = 20, _e = 100, ve = (e) => Number
|
|
|
860
860
|
style: A(o(e.picture)),
|
|
861
861
|
src: i(e),
|
|
862
862
|
alt: ""
|
|
863
|
-
}, null, 14, rt))], 64)) : (M(), x("span", Q, I(L(n)("chatFilePreview.image")), 1))], 64)) :
|
|
863
|
+
}, null, 14, rt))], 64)) : (M(), x("span", Q, I(L(n)("chatFilePreview.image")), 1))], 64)) : u.value && e.change === "deleted" ? (M(), x("del", {
|
|
864
864
|
key: 1,
|
|
865
865
|
class: "pk-word-preview__removed",
|
|
866
866
|
"data-quote-skip": "",
|
|
867
867
|
style: A(ee(e)),
|
|
868
868
|
title: g(e)
|
|
869
|
-
}, I(
|
|
869
|
+
}, I(c(e)), 13, it)) : u.value && e.change === "inserted" ? (M(), x("ins", {
|
|
870
870
|
key: 2,
|
|
871
871
|
class: "pk-word-preview__added",
|
|
872
872
|
style: A(ee(e)),
|
|
873
873
|
title: g(e)
|
|
874
|
-
}, I(
|
|
874
|
+
}, I(c(e)), 13, at)) : (M(), x("span", {
|
|
875
875
|
key: 3,
|
|
876
876
|
style: A(h(e)),
|
|
877
877
|
"data-quote-skip": e.label ? "" : void 0
|
|
878
|
-
}, I(
|
|
878
|
+
}, I(c(e)), 13, ot))], 64))), 128));
|
|
879
879
|
}
|
|
880
880
|
}), ct = { key: 0 }, lt = ["data-paragraph", "colspan"], $ = [
|
|
881
881
|
"data-paragraph",
|
|
@@ -984,11 +984,11 @@ var pe = 2e3, q = 1e3, me = 60, he = 1400, ge = 20, _e = 100, ve = (e) => Number
|
|
|
984
984
|
numbers: {}
|
|
985
985
|
},
|
|
986
986
|
setup(e) {
|
|
987
|
-
let t = e, n = E(
|
|
987
|
+
let t = e, n = E(m, void 0), r = v(() => u(t.blocks, t.mode)), i = v(() => c(t.blocks, t.mode).flatMap((e) => {
|
|
988
988
|
let r = f(n?.value, e.ref);
|
|
989
989
|
return r ? [{
|
|
990
990
|
src: r,
|
|
991
|
-
css:
|
|
991
|
+
css: h(e, t.section.page)
|
|
992
992
|
}] : [];
|
|
993
993
|
})), a = v(() => {
|
|
994
994
|
let { margins: e } = t.section.page;
|
|
@@ -1069,24 +1069,24 @@ var pe = 2e3, q = 1e3, me = 60, he = 1400, ge = 20, _e = 100, ve = (e) => Number
|
|
|
1069
1069
|
}),
|
|
1070
1070
|
emits: /*@__PURE__*/ O(["select"], ["update:fit", "update:zoom"]),
|
|
1071
1071
|
setup(e, { emit: t }) {
|
|
1072
|
-
let n = e, r = t, { t: i } =
|
|
1073
|
-
ie(
|
|
1074
|
-
let
|
|
1072
|
+
let n = e, r = t, { t: i } = le({ useScope: "global" });
|
|
1073
|
+
ie(m, v(() => n.preview.images));
|
|
1074
|
+
let o = (e) => s(e, n.mode), p = v(() => u(n.preview.blocks, n.mode)), g = ae("rootEl"), C = ae("scrollEl"), T = ae("measureEl"), { width: E } = ue(g), { width: D } = ue(C), O = v(() => E.value >= 1e3), j = v(() => n.preview.sections?.length ? n.preview.sections : [{
|
|
1075
1075
|
page: n.preview.page,
|
|
1076
1076
|
headerDistance: 0,
|
|
1077
1077
|
footerDistance: 0,
|
|
1078
1078
|
headers: {},
|
|
1079
1079
|
footers: {}
|
|
1080
|
-
}]), F = v(() => j.value[0].page),
|
|
1081
|
-
fontFamily:
|
|
1080
|
+
}]), F = v(() => j.value[0].page), oe = v(() => (D.value - 48) / (F.value.width * Vt)), B = v(() => E.value === 0 || D.value === 0 || oe.value >= Ht), se = v(() => ({
|
|
1081
|
+
fontFamily: d(n.preview.defaults.font),
|
|
1082
1082
|
fontSize: `${n.preview.defaults.size}pt`,
|
|
1083
1083
|
color: n.preview.defaults.color ?? "#000000",
|
|
1084
|
-
"--pk-word-line":
|
|
1084
|
+
"--pk-word-line": l(n.preview.defaults.font),
|
|
1085
1085
|
"--pk-word-size": `${n.preview.defaults.size}pt`
|
|
1086
|
-
})),
|
|
1087
|
-
...
|
|
1088
|
-
width: `${
|
|
1089
|
-
})),
|
|
1086
|
+
})), ce = v(() => F.value.width - F.value.margins.left - F.value.margins.right), V = v(() => ({
|
|
1087
|
+
...se.value,
|
|
1088
|
+
width: `${ce.value}pt`
|
|
1089
|
+
})), H = ae("flowEl"), { width: de } = ue(H), U = v(() => {
|
|
1090
1090
|
let e = /* @__PURE__ */ new Map(), t = 0;
|
|
1091
1091
|
for (let r of n.preview.blocks) {
|
|
1092
1092
|
if (r.kind === "table") continue;
|
|
@@ -1099,27 +1099,27 @@ var pe = 2e3, q = 1e3, me = 60, he = 1400, ge = 20, _e = 100, ve = (e) => Number
|
|
|
1099
1099
|
let r = 0;
|
|
1100
1100
|
for (let [n, i] of [...e].sort((e, t) => e[0] - t[0])) if (r += i, r > t / 10) return n;
|
|
1101
1101
|
return 0;
|
|
1102
|
-
}),
|
|
1103
|
-
...
|
|
1104
|
-
"--pk-word-indent-shared": `${
|
|
1105
|
-
"--pk-word-indent-scale":
|
|
1106
|
-
})),
|
|
1102
|
+
}), fe = v(() => ({
|
|
1103
|
+
...se.value,
|
|
1104
|
+
"--pk-word-indent-shared": `${U.value}pt`,
|
|
1105
|
+
"--pk-word-indent-scale": de.value ? Math.min(1, de.value / (ce.value * Vt)) : 1
|
|
1106
|
+
})), W = N([]), pe = N({}), he = async () => {
|
|
1107
1107
|
await te();
|
|
1108
1108
|
let e = T.value?.querySelectorAll("[data-item]");
|
|
1109
|
-
|
|
1109
|
+
W.value = [...e ?? []].map((e) => e.getBoundingClientRect().height);
|
|
1110
1110
|
let t = T.value?.querySelectorAll("[data-part]");
|
|
1111
|
-
|
|
1111
|
+
pe.value = Object.fromEntries([...t ?? []].map((e) => [e.dataset.part ?? "", e.getBoundingClientRect().height]));
|
|
1112
1112
|
};
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1113
|
+
z([
|
|
1114
|
+
p,
|
|
1115
|
+
B,
|
|
1116
1116
|
() => n.preview.parts
|
|
1117
|
-
],
|
|
1118
|
-
|
|
1117
|
+
], he, { flush: "post" }), re(() => {
|
|
1118
|
+
he(), document.fonts?.ready.then(he);
|
|
1119
1119
|
});
|
|
1120
|
-
let
|
|
1121
|
-
if (!
|
|
1122
|
-
items:
|
|
1120
|
+
let G = v(() => {
|
|
1121
|
+
if (!B.value || W.value.length !== p.value.length) return [{
|
|
1122
|
+
items: p.value.map((e, t) => t),
|
|
1123
1123
|
section: 0,
|
|
1124
1124
|
number: 1,
|
|
1125
1125
|
top: F.value.margins.top,
|
|
@@ -1129,7 +1129,7 @@ var pe = 2e3, q = 1e3, me = 60, he = 1400, ge = 20, _e = 100, ve = (e) => Number
|
|
|
1129
1129
|
let n = j.value[t];
|
|
1130
1130
|
return r && n.pageStart !== void 0 ? n.pageStart : (a ?? e[e.length - 1]?.number ?? 0) + 1;
|
|
1131
1131
|
}, s = (e) => {
|
|
1132
|
-
let i = j.value[t], a = (t) => r && i.titlePage ? t.first : n.preview.evenAndOddHeaders && e % 2 == 0 ? t.even : t.default, o = a(i.headers), s = a(i.footers), c = (e) => e ? (
|
|
1132
|
+
let i = j.value[t], a = (t) => r && i.titlePage ? t.first : n.preview.evenAndOddHeaders && e % 2 == 0 ? t.even : t.default, o = a(i.headers), s = a(i.footers), c = (e) => e ? (pe.value[e] ?? 0) / Vt : 0;
|
|
1133
1133
|
return {
|
|
1134
1134
|
header: o,
|
|
1135
1135
|
footer: s,
|
|
@@ -1145,42 +1145,42 @@ var pe = 2e3, q = 1e3, me = 60, he = 1400, ge = 20, _e = 100, ve = (e) => Number
|
|
|
1145
1145
|
...s(n)
|
|
1146
1146
|
}), r = !1, i = 0;
|
|
1147
1147
|
};
|
|
1148
|
-
return
|
|
1148
|
+
return p.value.forEach((n, l) => {
|
|
1149
1149
|
n.section !== void 0 && n.section !== t && j.value[n.section] && (t = n.section, r = n.breakBefore || !e.length, r || (a = j.value[t].pageStart));
|
|
1150
|
-
let u = e[e.length - 1], d = u && j.value[u.section].page, f = d ? (d.height - u.top - u.bottom) * Vt : 0,
|
|
1151
|
-
for (let e = l;
|
|
1152
|
-
(!u || u.items.length && (n.breakBefore || i +
|
|
1150
|
+
let u = e[e.length - 1], d = u && j.value[u.section].page, f = d ? (d.height - u.top - u.bottom) * Vt : 0, m = W.value[l];
|
|
1151
|
+
for (let e = l; p.value[e]?.keepNext && e + 1 < p.value.length && !p.value[e + 1].breakBefore; e++) m += W.value[e + 1];
|
|
1152
|
+
(!u || u.items.length && (n.breakBefore || i + W.value[l] > f || i + m > f && m <= (() => {
|
|
1153
1153
|
let e = s(o());
|
|
1154
1154
|
return (j.value[t].page.height - e.top - e.bottom) * Vt;
|
|
1155
|
-
})())) && c(), e[e.length - 1].items.push(l), i +=
|
|
1155
|
+
})())) && c(), e[e.length - 1].items.push(l), i += W.value[l];
|
|
1156
1156
|
}), e.length || c(), e;
|
|
1157
|
-
}),
|
|
1157
|
+
}), K = v(() => {
|
|
1158
1158
|
let e = /* @__PURE__ */ new Map();
|
|
1159
|
-
for (let t of
|
|
1160
|
-
return
|
|
1159
|
+
for (let t of G.value) e.set(t.section, (e.get(t.section) ?? 0) + 1);
|
|
1160
|
+
return G.value.map((t) => ({
|
|
1161
1161
|
page: t.number,
|
|
1162
|
-
pages:
|
|
1162
|
+
pages: G.value.length,
|
|
1163
1163
|
sectionPages: e.get(t.section) ?? 1
|
|
1164
1164
|
}));
|
|
1165
|
-
}),
|
|
1165
|
+
}), ge = (e) => {
|
|
1166
1166
|
let t = j.value[e.section].page;
|
|
1167
1167
|
return {
|
|
1168
|
-
...
|
|
1168
|
+
...se.value,
|
|
1169
1169
|
width: `${t.width}pt`,
|
|
1170
1170
|
minHeight: `${t.height}pt`,
|
|
1171
1171
|
padding: `${e.top}pt ${t.margins.right}pt ${e.bottom}pt ${t.margins.left}pt`
|
|
1172
1172
|
};
|
|
1173
|
-
},
|
|
1174
|
-
let t = [...new Set(e.items.map((e) =>
|
|
1175
|
-
return
|
|
1173
|
+
}, _e = (e) => {
|
|
1174
|
+
let t = [...new Set(e.items.map((e) => p.value[e].block))];
|
|
1175
|
+
return c(t.map((e) => n.preview.blocks[e]), n.mode).flatMap((t) => {
|
|
1176
1176
|
let r = f(n.preview.images, t.ref);
|
|
1177
1177
|
return r ? [{
|
|
1178
1178
|
src: r,
|
|
1179
|
-
css:
|
|
1179
|
+
css: h(t, j.value[e.section].page)
|
|
1180
1180
|
}] : [];
|
|
1181
1181
|
});
|
|
1182
|
-
},
|
|
1183
|
-
ve.value = Math.min(2, Math.max(.3, Math.round((ye.value + e) * 10) / 10)),
|
|
1182
|
+
}, q = R(e, "fit"), ve = R(e, "zoom"), ye = v(() => q.value ? Math.min(1.25, Math.max(.3, oe.value)) : ve.value), be = (e) => {
|
|
1183
|
+
ve.value = Math.min(2, Math.max(.3, Math.round((ye.value + e) * 10) / 10)), q.value = !1;
|
|
1184
1184
|
}, xe = N(0), Se = N(), Ce = () => {
|
|
1185
1185
|
let e = C.value?.getBoundingClientRect();
|
|
1186
1186
|
if (!e) return;
|
|
@@ -1204,23 +1204,23 @@ var pe = 2e3, q = 1e3, me = 60, he = 1400, ge = 20, _e = 100, ve = (e) => Number
|
|
|
1204
1204
|
we = 0, Ce();
|
|
1205
1205
|
});
|
|
1206
1206
|
};
|
|
1207
|
-
ne(() => cancelAnimationFrame(we)),
|
|
1208
|
-
let { selection: De } =
|
|
1207
|
+
ne(() => cancelAnimationFrame(we)), z(G, () => te(Ee));
|
|
1208
|
+
let { selection: De } = me({
|
|
1209
1209
|
root: () => C.value?.getRootNode(),
|
|
1210
1210
|
touch: !0
|
|
1211
1211
|
});
|
|
1212
|
-
|
|
1212
|
+
z(De, (e) => {
|
|
1213
1213
|
let t = C.value;
|
|
1214
1214
|
r("select", e && t ? Te(t, e.range, ".pk-word-preview__measure, .pk-word-preview__part") : void 0);
|
|
1215
1215
|
});
|
|
1216
|
-
let Oe = (e) =>
|
|
1216
|
+
let Oe = (e) => o(e).map((e) => e.text).join("").replace(/\s+/g, " ").trim(), J = v(() => p.value.flatMap((e) => {
|
|
1217
1217
|
let t = n.preview.blocks[e.block], r = t.kind === "heading" ? [t.label, Oe(t.runs)].filter(Boolean).join(" ") : "";
|
|
1218
1218
|
return t.kind === "heading" && t.level <= 3 && r ? [{
|
|
1219
1219
|
key: e.key,
|
|
1220
1220
|
level: t.level,
|
|
1221
1221
|
text: r
|
|
1222
1222
|
}] : [];
|
|
1223
|
-
})), ke = (e) => e.length > 60 ? `${e.slice(0, 60)}…` : e, Y = v(() =>
|
|
1223
|
+
})), ke = (e) => e.length > 60 ? `${e.slice(0, 60)}…` : e, Y = v(() => p.value.flatMap((e) => {
|
|
1224
1224
|
let t = n.preview.blocks[e.block], r = t.kind === "table" ? (t.rows[e.row ?? 0] ?? []).flatMap((e) => e.runs) : t.runs, i = r.filter((e) => e.change === "deleted").map((e) => e.text).join(" ").trim(), a = r.filter((e) => e.change === "inserted").map((e) => e.text).join(" ").trim();
|
|
1225
1225
|
return i || a ? [{
|
|
1226
1226
|
key: e.key,
|
|
@@ -1228,8 +1228,8 @@ var pe = 2e3, q = 1e3, me = 60, he = 1400, ge = 20, _e = 100, ve = (e) => Number
|
|
|
1228
1228
|
added: ke(a)
|
|
1229
1229
|
}] : [];
|
|
1230
1230
|
})), X;
|
|
1231
|
-
|
|
1232
|
-
!e || e === X ||
|
|
1231
|
+
z([() => n.marked, G], ([e]) => {
|
|
1232
|
+
!e || e === X || B.value && W.value.length !== p.value.length || ee(C.value, ".pk-word-preview__marked") && (X = e);
|
|
1233
1233
|
}, {
|
|
1234
1234
|
flush: "post",
|
|
1235
1235
|
immediate: !0
|
|
@@ -1245,7 +1245,7 @@ var pe = 2e3, q = 1e3, me = 60, he = 1400, ge = 20, _e = 100, ve = (e) => Number
|
|
|
1245
1245
|
return M(), x("div", {
|
|
1246
1246
|
ref_key: "rootEl",
|
|
1247
1247
|
ref: g,
|
|
1248
|
-
class: k(["pk-word-preview", { "pk-word-preview--paged":
|
|
1248
|
+
class: k(["pk-word-preview", { "pk-word-preview--paged": B.value }])
|
|
1249
1249
|
}, [
|
|
1250
1250
|
(O.value || Ae.value) && (J.value.length || Y.value.length) ? (M(), x("aside", {
|
|
1251
1251
|
key: 0,
|
|
@@ -1281,19 +1281,19 @@ var pe = 2e3, q = 1e3, me = 60, he = 1400, ge = 20, _e = 100, ve = (e) => Number
|
|
|
1281
1281
|
ref: C,
|
|
1282
1282
|
class: "pk-word-preview__scroll",
|
|
1283
1283
|
onScroll: Ee
|
|
1284
|
-
}, [
|
|
1284
|
+
}, [B.value ? (M(), x("div", {
|
|
1285
1285
|
key: 0,
|
|
1286
1286
|
class: "pk-word-preview__pages",
|
|
1287
1287
|
style: A({ zoom: ye.value })
|
|
1288
|
-
}, [(M(!0), x(_, null, P(
|
|
1288
|
+
}, [(M(!0), x(_, null, P(G.value, (t, n) => (M(), x("article", {
|
|
1289
1289
|
key: n,
|
|
1290
1290
|
"data-page": "",
|
|
1291
1291
|
class: "pk-word-preview__page",
|
|
1292
1292
|
"aria-label": L(i)("chatFilePreview.pageOf", {
|
|
1293
1293
|
page: n + 1,
|
|
1294
|
-
count:
|
|
1294
|
+
count: G.value.length
|
|
1295
1295
|
}),
|
|
1296
|
-
style: A(
|
|
1296
|
+
style: A(ge(t))
|
|
1297
1297
|
}, [
|
|
1298
1298
|
t.header && e.preview.parts?.[t.header] ? (M(), y(mt, {
|
|
1299
1299
|
key: 0,
|
|
@@ -1301,7 +1301,7 @@ var pe = 2e3, q = 1e3, me = 60, he = 1400, ge = 20, _e = 100, ve = (e) => Number
|
|
|
1301
1301
|
where: "header",
|
|
1302
1302
|
section: j.value[t.section],
|
|
1303
1303
|
mode: e.mode,
|
|
1304
|
-
numbers:
|
|
1304
|
+
numbers: K.value[n]
|
|
1305
1305
|
}, null, 8, [
|
|
1306
1306
|
"blocks",
|
|
1307
1307
|
"section",
|
|
@@ -1309,13 +1309,13 @@ var pe = 2e3, q = 1e3, me = 60, he = 1400, ge = 20, _e = 100, ve = (e) => Number
|
|
|
1309
1309
|
"numbers"
|
|
1310
1310
|
])) : b("", !0),
|
|
1311
1311
|
(M(!0), x(_, null, P(t.items, (r) => (M(), y(dt, {
|
|
1312
|
-
key:
|
|
1313
|
-
"data-key":
|
|
1314
|
-
block: e.preview.blocks[
|
|
1315
|
-
row:
|
|
1312
|
+
key: p.value[r].key,
|
|
1313
|
+
"data-key": p.value[r].key,
|
|
1314
|
+
block: e.preview.blocks[p.value[r].block],
|
|
1315
|
+
row: p.value[r].row,
|
|
1316
1316
|
mode: e.mode,
|
|
1317
1317
|
page: j.value[t.section].page,
|
|
1318
|
-
numbers:
|
|
1318
|
+
numbers: K.value[n],
|
|
1319
1319
|
marked: e.marked
|
|
1320
1320
|
}, null, 8, [
|
|
1321
1321
|
"data-key",
|
|
@@ -1326,7 +1326,7 @@ var pe = 2e3, q = 1e3, me = 60, he = 1400, ge = 20, _e = 100, ve = (e) => Number
|
|
|
1326
1326
|
"numbers",
|
|
1327
1327
|
"marked"
|
|
1328
1328
|
]))), 128)),
|
|
1329
|
-
(M(!0), x(_, null, P(
|
|
1329
|
+
(M(!0), x(_, null, P(_e(t), (e, t) => (M(), x("img", {
|
|
1330
1330
|
key: `image-${t}`,
|
|
1331
1331
|
class: "pk-word-preview__float",
|
|
1332
1332
|
style: A(e.css),
|
|
@@ -1339,7 +1339,7 @@ var pe = 2e3, q = 1e3, me = 60, he = 1400, ge = 20, _e = 100, ve = (e) => Number
|
|
|
1339
1339
|
where: "footer",
|
|
1340
1340
|
section: j.value[t.section],
|
|
1341
1341
|
mode: e.mode,
|
|
1342
|
-
numbers:
|
|
1342
|
+
numbers: K.value[n]
|
|
1343
1343
|
}, null, 8, [
|
|
1344
1344
|
"blocks",
|
|
1345
1345
|
"section",
|
|
@@ -1349,10 +1349,10 @@ var pe = 2e3, q = 1e3, me = 60, he = 1400, ge = 20, _e = 100, ve = (e) => Number
|
|
|
1349
1349
|
], 12, kt))), 128))], 4)) : (M(), x("article", {
|
|
1350
1350
|
key: 1,
|
|
1351
1351
|
ref_key: "flowEl",
|
|
1352
|
-
ref:
|
|
1352
|
+
ref: H,
|
|
1353
1353
|
class: "pk-word-preview__page pk-word-preview__page--flow",
|
|
1354
|
-
style: A(
|
|
1355
|
-
}, [(M(!0), x(_, null, P(
|
|
1354
|
+
style: A(fe.value)
|
|
1355
|
+
}, [(M(!0), x(_, null, P(p.value, (t) => (M(), y(dt, {
|
|
1356
1356
|
key: t.key,
|
|
1357
1357
|
"data-key": t.key,
|
|
1358
1358
|
block: e.preview.blocks[t.block],
|
|
@@ -1366,9 +1366,9 @@ var pe = 2e3, q = 1e3, me = 60, he = 1400, ge = 20, _e = 100, ve = (e) => Number
|
|
|
1366
1366
|
"mode",
|
|
1367
1367
|
"marked"
|
|
1368
1368
|
]))), 128))], 4)), e.preview.truncated ? (M(), x("p", jt, I(L(i)("chatFilePreview.truncated")), 1)) : b("", !0)], 544), S("div", Mt, [
|
|
1369
|
-
|
|
1369
|
+
B.value ? (M(), x("span", Nt, I(L(i)("chatFilePreview.pageOf", {
|
|
1370
1370
|
page: xe.value + 1,
|
|
1371
|
-
count:
|
|
1371
|
+
count: G.value.length
|
|
1372
1372
|
})), 1)) : b("", !0),
|
|
1373
1373
|
S("span", Pt, I(L(i)("chatFilePreview.words", Me.value)), 1),
|
|
1374
1374
|
e.mode === "markup" && e.preview.revisionAuthors.length ? (M(), x("span", Ft, [
|
|
@@ -1396,7 +1396,7 @@ var pe = 2e3, q = 1e3, me = 60, he = 1400, ge = 20, _e = 100, ve = (e) => Number
|
|
|
1396
1396
|
"aria-label",
|
|
1397
1397
|
"aria-expanded"
|
|
1398
1398
|
])) : b("", !0),
|
|
1399
|
-
|
|
1399
|
+
B.value ? (M(), x(_, { key: 3 }, [
|
|
1400
1400
|
w(r, {
|
|
1401
1401
|
class: "pk-word-preview__fit",
|
|
1402
1402
|
modifiers: "action-quiet",
|
|
@@ -1404,8 +1404,8 @@ var pe = 2e3, q = 1e3, me = 60, he = 1400, ge = 20, _e = 100, ve = (e) => Number
|
|
|
1404
1404
|
label: L(i)("chatFilePreview.fitWidth"),
|
|
1405
1405
|
title: L(i)("chatFilePreview.fitWidth"),
|
|
1406
1406
|
"aria-label": L(i)("chatFilePreview.fitWidth"),
|
|
1407
|
-
disabled:
|
|
1408
|
-
onClick: n[3] ||= (e) =>
|
|
1407
|
+
disabled: q.value,
|
|
1408
|
+
onClick: n[3] ||= (e) => q.value = !0
|
|
1409
1409
|
}, null, 8, [
|
|
1410
1410
|
"label",
|
|
1411
1411
|
"title",
|
|
@@ -1429,14 +1429,14 @@ var pe = 2e3, q = 1e3, me = 60, he = 1400, ge = 20, _e = 100, ve = (e) => Number
|
|
|
1429
1429
|
}, null, 8, ["aria-label", "disabled"])
|
|
1430
1430
|
], 64)) : b("", !0)
|
|
1431
1431
|
])]),
|
|
1432
|
-
|
|
1432
|
+
B.value ? (M(), x("div", {
|
|
1433
1433
|
key: 1,
|
|
1434
1434
|
ref_key: "measureEl",
|
|
1435
1435
|
ref: T,
|
|
1436
1436
|
class: "pk-word-preview__measure",
|
|
1437
1437
|
"aria-hidden": "true",
|
|
1438
|
-
style: A(
|
|
1439
|
-
}, [(M(!0), x(_, null, P(
|
|
1438
|
+
style: A(V.value)
|
|
1439
|
+
}, [(M(!0), x(_, null, P(p.value, (t) => (M(), x("div", {
|
|
1440
1440
|
key: t.key,
|
|
1441
1441
|
"data-item": ""
|
|
1442
1442
|
}, [w(dt, {
|
|
@@ -1452,7 +1452,7 @@ var pe = 2e3, q = 1e3, me = 60, he = 1400, ge = 20, _e = 100, ve = (e) => Number
|
|
|
1452
1452
|
])]))), 128)), (M(!0), x(_, null, P(e.preview.parts, (t, n) => (M(), x("div", {
|
|
1453
1453
|
key: n,
|
|
1454
1454
|
"data-part": n
|
|
1455
|
-
}, [(M(!0), x(_, null, P(L(
|
|
1455
|
+
}, [(M(!0), x(_, null, P(L(u)(t, e.mode), (n) => (M(), y(dt, {
|
|
1456
1456
|
key: n.key,
|
|
1457
1457
|
block: t[n.block],
|
|
1458
1458
|
row: n.row,
|
|
@@ -1522,7 +1522,7 @@ var pe = 2e3, q = 1e3, me = 60, he = 1400, ge = 20, _e = 100, ve = (e) => Number
|
|
|
1522
1522
|
"update:fit"
|
|
1523
1523
|
]),
|
|
1524
1524
|
setup(e, { emit: n }) {
|
|
1525
|
-
let r = e, i = n, { t: o, locale: s } =
|
|
1525
|
+
let r = e, i = n, { t: o, locale: s } = le({ useScope: "global" }), c = v(() => r.versions ?? []), l = v(() => r.version ? c.value.indexOf(r.version) : -1), u = v(() => l.value > 0 ? c.value[l.value - 1] : void 0), d = v(() => l.value >= 0 && l.value < c.value.length - 1 ? c.value[l.value + 1] : void 0), f = R(e, "mode"), p = R(e, "sheet"), m = R(e, "zoom"), h = R(e, "fit"), ee = v(() => [
|
|
1526
1526
|
{
|
|
1527
1527
|
value: "markup",
|
|
1528
1528
|
label: o("chatFilePreview.modeMarkup")
|
|
@@ -1536,13 +1536,13 @@ var pe = 2e3, q = 1e3, me = 60, he = 1400, ge = 20, _e = 100, ve = (e) => Number
|
|
|
1536
1536
|
label: o("chatFilePreview.modeOriginal")
|
|
1537
1537
|
}
|
|
1538
1538
|
]), C = v(() => r.preview?.kind === "word" && r.preview.revisionAuthors.length > 0);
|
|
1539
|
-
|
|
1539
|
+
z(() => r.version, () => {
|
|
1540
1540
|
f.value = "markup";
|
|
1541
1541
|
});
|
|
1542
|
-
let T =
|
|
1542
|
+
let T = ae("rootEl"), E = F(), D = N(!1), O = () => {
|
|
1543
1543
|
E.value = void 0, D.value = !1;
|
|
1544
1544
|
};
|
|
1545
|
-
|
|
1545
|
+
z(() => [
|
|
1546
1546
|
r.version,
|
|
1547
1547
|
r.preview,
|
|
1548
1548
|
f.value,
|
|
@@ -1550,8 +1550,8 @@ var pe = 2e3, q = 1e3, me = 60, he = 1400, ge = 20, _e = 100, ve = (e) => Number
|
|
|
1550
1550
|
], O);
|
|
1551
1551
|
let A = (e) => {
|
|
1552
1552
|
D.value || (E.value = e);
|
|
1553
|
-
}, ne = v(() => E.value?.format === "docx" &&
|
|
1554
|
-
|
|
1553
|
+
}, ne = v(() => E.value?.format === "docx" && W());
|
|
1554
|
+
z(D, async (e, t) => {
|
|
1555
1555
|
let n = E.value;
|
|
1556
1556
|
t && !e && n?.format === "docx" && (await te(), n.restore());
|
|
1557
1557
|
});
|
|
@@ -1560,22 +1560,22 @@ var pe = 2e3, q = 1e3, me = 60, he = 1400, ge = 20, _e = 100, ve = (e) => Number
|
|
|
1560
1560
|
e && i("version", e);
|
|
1561
1561
|
}, ie = v(() => {
|
|
1562
1562
|
let e = E.value;
|
|
1563
|
-
return e?.format === "docx" ? e.paragraphCount > 200 : (e?.cells ?? 0) >
|
|
1564
|
-
}),
|
|
1563
|
+
return e?.format === "docx" ? e.paragraphCount > 200 : (e?.cells ?? 0) > he;
|
|
1564
|
+
}), oe = v(() => E.value?.format === "docx" && f.value === "original"), se = v(() => ie.value || oe.value), ce = v(() => oe.value ? o("selectionActions.hintOriginal") : ie.value ? o(E.value?.format === "docx" ? "selectionActions.hintParagraphs" : "selectionActions.hintCells", { count: E.value?.format === "docx" ? 200 : he }) : void 0), V = (e) => e[s.value] ?? e[s.value.split("-")[0]] ?? Object.values(e)[0] ?? "", ue = ["explain", "summarize"], de = v(() => {
|
|
1565
1565
|
let e = E.value, t = r.selectionActions;
|
|
1566
1566
|
if (!e || !t) return [];
|
|
1567
1567
|
let n = e.format;
|
|
1568
|
-
return [...(n === "docx" &&
|
|
1568
|
+
return [...(n === "docx" && se.value ? ue : t.builtIns).map((e) => ({
|
|
1569
1569
|
id: e,
|
|
1570
1570
|
label: o(`selectionActions.builtIn.${e}`),
|
|
1571
1571
|
...e === "translate" && { asks: o("selectionActions.translateAsks") },
|
|
1572
1572
|
prompt: (t) => o(`selectionActions.prompt.${n}.${e}`, { language: t ?? "" })
|
|
1573
|
-
})), ...(
|
|
1573
|
+
})), ...(se.value ? [] : t.actions).map((e) => ({
|
|
1574
1574
|
id: e.id,
|
|
1575
|
-
label:
|
|
1576
|
-
prompt: () =>
|
|
1575
|
+
label: V(e.label),
|
|
1576
|
+
prompt: () => V(e.prompt)
|
|
1577
1577
|
}))];
|
|
1578
|
-
}),
|
|
1578
|
+
}), U = (e) => {
|
|
1579
1579
|
if (e.format === "docx") return o("selectionActions.labelParagraphs", {
|
|
1580
1580
|
file: r.filename,
|
|
1581
1581
|
count: e.paragraphCount
|
|
@@ -1591,20 +1591,20 @@ var pe = 2e3, q = 1e3, me = 60, he = 1400, ge = 20, _e = 100, ve = (e) => Number
|
|
|
1591
1591
|
sheet: e.sheet,
|
|
1592
1592
|
cell: t
|
|
1593
1593
|
});
|
|
1594
|
-
},
|
|
1594
|
+
}, fe = (e) => {
|
|
1595
1595
|
if (!r.fileId || !r.storedFileName) return;
|
|
1596
1596
|
let t = {
|
|
1597
1597
|
fileId: r.fileId,
|
|
1598
1598
|
version: r.version ?? 1,
|
|
1599
1599
|
storedFileName: r.storedFileName,
|
|
1600
|
-
label:
|
|
1600
|
+
label: U(e).slice(0, 200)
|
|
1601
1601
|
};
|
|
1602
1602
|
if (e.format === "docx") {
|
|
1603
1603
|
let { measure: n, ...r } = e;
|
|
1604
1604
|
return {
|
|
1605
1605
|
...t,
|
|
1606
1606
|
...r,
|
|
1607
|
-
...
|
|
1607
|
+
...oe.value && { original: !0 }
|
|
1608
1608
|
};
|
|
1609
1609
|
}
|
|
1610
1610
|
let { measure: n, cells: i, ...a } = e;
|
|
@@ -1612,22 +1612,22 @@ var pe = 2e3, q = 1e3, me = 60, he = 1400, ge = 20, _e = 100, ve = (e) => Number
|
|
|
1612
1612
|
...t,
|
|
1613
1613
|
...a
|
|
1614
1614
|
};
|
|
1615
|
-
},
|
|
1616
|
-
let n = E.value, r = n &&
|
|
1615
|
+
}, pe = (e, t) => {
|
|
1616
|
+
let n = E.value, r = n && fe(n);
|
|
1617
1617
|
r && (i("selectionSend", e, r, {
|
|
1618
1618
|
id: t,
|
|
1619
1619
|
size: n.format === "docx" ? n.paragraphCount : n.cells
|
|
1620
1620
|
}), O(), document.getSelection()?.removeAllRanges());
|
|
1621
|
-
},
|
|
1622
|
-
let n =
|
|
1623
|
-
n &&
|
|
1624
|
-
},
|
|
1625
|
-
|
|
1621
|
+
}, me = (e, t) => {
|
|
1622
|
+
let n = de.value.find((t) => t.id === e);
|
|
1623
|
+
n && pe(n.prompt(t), e);
|
|
1624
|
+
}, G = N(0);
|
|
1625
|
+
H(T, "scroll", () => G.value++, {
|
|
1626
1626
|
capture: !0,
|
|
1627
1627
|
passive: !0
|
|
1628
|
-
}),
|
|
1629
|
-
let
|
|
1630
|
-
|
|
1628
|
+
}), H(window, "resize", () => G.value++, { passive: !0 });
|
|
1629
|
+
let K = v(() => {
|
|
1630
|
+
G.value;
|
|
1631
1631
|
let e = E.value?.measure(), t = T.value?.getBoundingClientRect();
|
|
1632
1632
|
if (e && t) return {
|
|
1633
1633
|
start: {
|
|
@@ -1691,7 +1691,7 @@ var pe = 2e3, q = 1e3, me = 60, he = 1400, ge = 20, _e = 100, ve = (e) => Number
|
|
|
1691
1691
|
"aria-label": L(o)("chatFilePreview.modes"),
|
|
1692
1692
|
options: ee.value
|
|
1693
1693
|
}, {
|
|
1694
|
-
markup:
|
|
1694
|
+
markup: B(() => [S("span", en, I(L(o)("chatFilePreview.modeMarkup")), 1), S("span", tn, I(L(o)("chatFilePreview.modeMarkupShort")), 1)]),
|
|
1695
1695
|
_: 1
|
|
1696
1696
|
}, 8, [
|
|
1697
1697
|
"modelValue",
|
|
@@ -1776,19 +1776,19 @@ var pe = 2e3, q = 1e3, me = 60, he = 1400, ge = 20, _e = 100, ve = (e) => Number
|
|
|
1776
1776
|
"preview",
|
|
1777
1777
|
"marked"
|
|
1778
1778
|
]))]),
|
|
1779
|
-
e.selectionActions && E.value &&
|
|
1779
|
+
e.selectionActions && E.value && K.value ? (M(), y(je, {
|
|
1780
1780
|
key: 0,
|
|
1781
1781
|
asking: D.value,
|
|
1782
1782
|
"onUpdate:asking": r[11] ||= (e) => D.value = e,
|
|
1783
1783
|
strategy: "absolute",
|
|
1784
|
-
anchor:
|
|
1785
|
-
actions:
|
|
1786
|
-
hint:
|
|
1784
|
+
anchor: K.value,
|
|
1785
|
+
actions: de.value,
|
|
1786
|
+
hint: ce.value,
|
|
1787
1787
|
touch: ne.value,
|
|
1788
1788
|
note: re.value ? void 0 : L(o)("selectionActions.notLatest", { version: e.version }),
|
|
1789
1789
|
"note-action": L(o)("selectionActions.openLatest"),
|
|
1790
|
-
onAction:
|
|
1791
|
-
onAsk: r[12] ||= (e) =>
|
|
1790
|
+
onAction: me,
|
|
1791
|
+
onAsk: r[12] ||= (e) => pe(e, "ask"),
|
|
1792
1792
|
onNote: j,
|
|
1793
1793
|
onClose: O
|
|
1794
1794
|
}, null, 8, [
|
|
@@ -1806,4 +1806,4 @@ var pe = 2e3, q = 1e3, me = 60, he = 1400, ge = 20, _e = 100, ve = (e) => Number
|
|
|
1806
1806
|
}), cn = /* @__PURE__ */ e({ default: () => ln }), ln = sn;
|
|
1807
1807
|
export { cn as n, ln as t };
|
|
1808
1808
|
|
|
1809
|
-
//# sourceMappingURL=PkFilePreview-
|
|
1809
|
+
//# sourceMappingURL=PkFilePreview-Bp5-Pl54.js.map
|