@lofcz/pptist 2.0.23 → 2.0.24
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.
|
@@ -116649,29 +116649,36 @@ var l5e = _({
|
|
|
116649
116649
|
]);
|
|
116650
116650
|
};
|
|
116651
116651
|
}
|
|
116652
|
-
}), [["__scopeId", "data-v-51f4119c"]]), Y5e = {
|
|
116652
|
+
}), [["__scopeId", "data-v-51f4119c"]]), Y5e = {
|
|
116653
|
+
class: "pptist-embed-root",
|
|
116654
|
+
style: {
|
|
116655
|
+
position: "fixed",
|
|
116656
|
+
inset: "0",
|
|
116657
|
+
"z-index": "2147483000"
|
|
116658
|
+
}
|
|
116659
|
+
}, X5e = { class: "pptist-screen" }, Z5e = /* @__PURE__ */ Y(/* @__PURE__ */ p({
|
|
116653
116660
|
__name: "index",
|
|
116654
116661
|
setup(e) {
|
|
116655
|
-
let
|
|
116656
|
-
|
|
116657
|
-
}, { exitScreening:
|
|
116658
|
-
|
|
116659
|
-
},
|
|
116660
|
-
e.key.toUpperCase() === zs.ESC &&
|
|
116662
|
+
let n = new URLSearchParams(window.location.search).get("mode") === "audience", r = O("base"), i = (e) => {
|
|
116663
|
+
r.value = e;
|
|
116664
|
+
}, { exitScreening: a } = sf(), c = n ? null : new BroadcastChannel("pptist-audience-sync"), u = () => {
|
|
116665
|
+
c?.postMessage({ type: "EXIT" }), a();
|
|
116666
|
+
}, d = (e) => {
|
|
116667
|
+
e.key.toUpperCase() === zs.ESC && u();
|
|
116661
116668
|
};
|
|
116662
116669
|
return w(() => {
|
|
116663
|
-
|
|
116670
|
+
n || document.addEventListener("keydown", d);
|
|
116664
116671
|
}), T(() => {
|
|
116665
|
-
|
|
116666
|
-
}), (e,
|
|
116672
|
+
n || document.removeEventListener("keydown", d), c?.close();
|
|
116673
|
+
}), (e, a) => (E(), o(t, { to: "body" }, [l("div", Y5e, [l("div", X5e, [n ? (E(), o(u8e, { key: 0 })) : r.value === "base" ? (E(), o(z5e, {
|
|
116667
116674
|
key: 1,
|
|
116668
|
-
changeViewMode:
|
|
116669
|
-
})) :
|
|
116675
|
+
changeViewMode: i
|
|
116676
|
+
})) : r.value === "presenter" ? (E(), o(J5e, {
|
|
116670
116677
|
key: 2,
|
|
116671
|
-
changeViewMode:
|
|
116672
|
-
})) : s("", !0)]));
|
|
116678
|
+
changeViewMode: i
|
|
116679
|
+
})) : s("", !0)])])]));
|
|
116673
116680
|
}
|
|
116674
|
-
}), [["__scopeId", "data-v-
|
|
116681
|
+
}), [["__scopeId", "data-v-ea518454"]]), Q5e = /* @__PURE__ */ p({
|
|
116675
116682
|
__name: "MobileEditableElement",
|
|
116676
116683
|
props: {
|
|
116677
116684
|
elementInfo: {},
|
|
@@ -116699,7 +116706,7 @@ var l5e = _({
|
|
|
116699
116706
|
contextmenus: () => null
|
|
116700
116707
|
}, null, 8, ["elementInfo", "selectElement"]))], 4));
|
|
116701
116708
|
}
|
|
116702
|
-
}),
|
|
116709
|
+
}), $5e = /* @__PURE__ */ Y(/* @__PURE__ */ p({
|
|
116703
116710
|
__name: "MobileOperate",
|
|
116704
116711
|
props: {
|
|
116705
116712
|
elementInfo: {},
|
|
@@ -116750,14 +116757,14 @@ var l5e = _({
|
|
|
116750
116757
|
}, null, 8, ["style"]))
|
|
116751
116758
|
], 64)) : s("", !0)], 4));
|
|
116752
116759
|
}
|
|
116753
|
-
}), [["__scopeId", "data-v-8809b306"]]),
|
|
116760
|
+
}), [["__scopeId", "data-v-8809b306"]]), e7e = {
|
|
116754
116761
|
class: "i-icon",
|
|
116755
116762
|
viewBox: "0 0 48 48",
|
|
116756
116763
|
width: "1em",
|
|
116757
116764
|
height: "1em"
|
|
116758
116765
|
};
|
|
116759
|
-
function
|
|
116760
|
-
return E(), c("svg",
|
|
116766
|
+
function t7e(e, t) {
|
|
116767
|
+
return E(), c("svg", e7e, t[0] || (t[0] = [l("g", {
|
|
116761
116768
|
fill: "none",
|
|
116762
116769
|
stroke: "currentColor",
|
|
116763
116770
|
"stroke-linejoin": "round",
|
|
@@ -116767,10 +116774,10 @@ function e7e(e, t) {
|
|
|
116767
116774
|
d: "M13 12.432v-4.62A2.813 2.813 0 0 1 15.813 5h24.374A2.813 2.813 0 0 1 43 7.813v24.375A2.813 2.813 0 0 1 40.188 35h-4.672"
|
|
116768
116775
|
}), l("path", { d: "M32.188 13H7.811A2.813 2.813 0 0 0 5 15.813v24.374A2.813 2.813 0 0 0 7.813 43h24.375A2.813 2.813 0 0 0 35 40.188V15.811A2.813 2.813 0 0 0 32.188 13Z" })], -1)]));
|
|
116769
116776
|
}
|
|
116770
|
-
var
|
|
116777
|
+
var n7e = _({
|
|
116771
116778
|
name: "icon-park-outline-copy",
|
|
116772
|
-
render:
|
|
116773
|
-
}),
|
|
116779
|
+
render: t7e
|
|
116780
|
+
}), r7e = ["onClick"], i7e = { class: "label" }, a7e = /* @__PURE__ */ Y(/* @__PURE__ */ p({
|
|
116774
116781
|
__name: "MobileThumbnails",
|
|
116775
116782
|
setup(e) {
|
|
116776
116783
|
let t = ss(), { slides: n, slideIndex: r } = G(t), { sortSlides: i } = Yd(), { slidesLoadLimit: a } = G4(), s = (e) => {
|
|
@@ -116793,16 +116800,16 @@ var t7e = _({
|
|
|
116793
116800
|
item: H(({ element: e, index: t }) => [l("div", {
|
|
116794
116801
|
class: b(["thumbnail-item", { active: L(r) === t }]),
|
|
116795
116802
|
onClick: (e) => s(t)
|
|
116796
|
-
}, [l("div",
|
|
116803
|
+
}, [l("div", i7e, F(t + 1), 1), f(E0, {
|
|
116797
116804
|
class: "thumbnail",
|
|
116798
116805
|
slide: e,
|
|
116799
116806
|
size: 120,
|
|
116800
116807
|
visible: t < L(a)
|
|
116801
|
-
}, null, 8, ["slide", "visible"])], 10,
|
|
116808
|
+
}, null, 8, ["slide", "visible"])], 10, r7e)]),
|
|
116802
116809
|
_: 1
|
|
116803
116810
|
}, 8, ["modelValue"]));
|
|
116804
116811
|
}
|
|
116805
|
-
}), [["__scopeId", "data-v-2fd38eb8"]]),
|
|
116812
|
+
}), [["__scopeId", "data-v-2fd38eb8"]]), o7e = { class: "slide-toolbar" }, s7e = { class: "remark" }, c7e = ["value", "placeholder"], l7e = { class: "toolbar" }, u7e = /* @__PURE__ */ Y(/* @__PURE__ */ p({
|
|
116806
116813
|
__name: "SlideToolbar",
|
|
116807
116814
|
setup(e) {
|
|
116808
116815
|
let { LL: t } = Jd(), n = ss(), { viewportRatio: r, currentSlide: a, viewportSize: o } = G(n), { createSlide: s, copyAndPasteSlide: u, deleteSlide: p } = Yd(), { createTextElement: m, createImageElement: h, createShapeElement: g } = md(), _ = () => {
|
|
@@ -116835,14 +116842,14 @@ var t7e = _({
|
|
|
116835
116842
|
n.updateSlide({ remark: t });
|
|
116836
116843
|
};
|
|
116837
116844
|
return (e, n) => {
|
|
116838
|
-
let r = w4, i =
|
|
116839
|
-
return E(), c("div",
|
|
116840
|
-
l("div",
|
|
116845
|
+
let r = w4, i = n7e, a = d7, o = T4, m = fFe, h = l5e, g = o5e;
|
|
116846
|
+
return E(), c("div", o7e, [
|
|
116847
|
+
l("div", s7e, [l("textarea", {
|
|
116841
116848
|
value: b.value,
|
|
116842
116849
|
placeholder: L(t).mobile.slideToolbar.remarkPlaceholder(),
|
|
116843
116850
|
onInput: n[0] || (n[0] = (e) => x(e))
|
|
116844
|
-
}, null, 40,
|
|
116845
|
-
l("div",
|
|
116851
|
+
}, null, 40, c7e)]),
|
|
116852
|
+
l("div", l7e, [f(O4, { class: "row" }, {
|
|
116846
116853
|
default: H(() => [
|
|
116847
116854
|
f(o0, {
|
|
116848
116855
|
style: { flex: "1" },
|
|
@@ -116900,26 +116907,26 @@ var t7e = _({
|
|
|
116900
116907
|
]),
|
|
116901
116908
|
_: 1
|
|
116902
116909
|
})]),
|
|
116903
|
-
f(
|
|
116910
|
+
f(a7e)
|
|
116904
116911
|
]);
|
|
116905
116912
|
};
|
|
116906
116913
|
}
|
|
116907
|
-
}), [["__scopeId", "data-v-d2fff840"]]),
|
|
116914
|
+
}), [["__scopeId", "data-v-d2fff840"]]), d7e = { class: "element-toolbar" }, f7e = { class: "content" }, p7e = {
|
|
116908
116915
|
key: 0,
|
|
116909
116916
|
class: "style"
|
|
116910
|
-
},
|
|
116917
|
+
}, m7e = {
|
|
116911
116918
|
key: 1,
|
|
116912
116919
|
class: "row-block"
|
|
116913
|
-
},
|
|
116920
|
+
}, h7e = { class: "label" }, g7e = { class: "colors" }, _7e = ["onClick"], v7e = { class: "color custom" }, y7e = {
|
|
116914
116921
|
key: 2,
|
|
116915
116922
|
class: "row-block"
|
|
116916
|
-
},
|
|
116923
|
+
}, b7e = { class: "label" }, x7e = { class: "colors" }, S7e = ["onClick"], C7e = { class: "color custom" }, w7e = {
|
|
116917
116924
|
key: 3,
|
|
116918
116925
|
class: "tip"
|
|
116919
|
-
},
|
|
116926
|
+
}, T7e = {
|
|
116920
116927
|
key: 1,
|
|
116921
116928
|
class: "common"
|
|
116922
|
-
},
|
|
116929
|
+
}, E7e = /* @__PURE__ */ Y(/* @__PURE__ */ p({
|
|
116923
116930
|
__name: "ElementToolbar",
|
|
116924
116931
|
setup(t) {
|
|
116925
116932
|
let { LL: n } = Jd(), r = [
|
|
@@ -116991,8 +116998,8 @@ var t7e = _({
|
|
|
116991
116998
|
}
|
|
116992
116999
|
};
|
|
116993
117000
|
return (t, i) => {
|
|
116994
|
-
let a = R1, o = L1, p = I1, h = v8, g = T4, T = F1, O = P1, R = N1, z =
|
|
116995
|
-
return E(), c("div",
|
|
117001
|
+
let a = R1, o = L1, p = I1, h = v8, g = T4, T = F1, O = P1, R = N1, z = n7e, B = d7, V = HJe, ee = zJe, U = IJe, te = NJe, W = k8, ne = O8, re = D8, G = E8, ie = T8, ae = w8;
|
|
117002
|
+
return E(), c("div", d7e, [f(x4, {
|
|
116996
117003
|
tabs: _.value,
|
|
116997
117004
|
value: v.value,
|
|
116998
117005
|
"onUpdate:value": i[0] || (i[0] = (e) => v.value = e),
|
|
@@ -117001,7 +117008,7 @@ var t7e = _({
|
|
|
117001
117008
|
width: "30%",
|
|
117002
117009
|
margin: "0 10%"
|
|
117003
117010
|
}
|
|
117004
|
-
}, null, 8, ["tabs", "value"]), l("div",
|
|
117011
|
+
}, null, 8, ["tabs", "value"]), l("div", f7e, [v.value === "style" ? (E(), c("div", p7e, [
|
|
117005
117012
|
y.value ? (E(), c(e, { key: 0 }, [
|
|
117006
117013
|
f(O4, { class: "row" }, {
|
|
117007
117014
|
default: H(() => [
|
|
@@ -117090,14 +117097,14 @@ var t7e = _({
|
|
|
117090
117097
|
_: 1
|
|
117091
117098
|
}, 8, ["value"])
|
|
117092
117099
|
], 64)) : s("", !0),
|
|
117093
|
-
b.value ? (E(), c("div",
|
|
117100
|
+
b.value ? (E(), c("div", m7e, [l("div", h7e, F(L(n).mobile.elementToolbar.textColorLabel()), 1), l("div", g7e, [(E(), c(e, null, A(r, (e) => l("div", {
|
|
117094
117101
|
class: "color",
|
|
117095
117102
|
key: e,
|
|
117096
117103
|
onClick: (t) => N(e)
|
|
117097
117104
|
}, [l("div", {
|
|
117098
117105
|
class: "color-block",
|
|
117099
117106
|
style: x({ backgroundColor: e })
|
|
117100
|
-
}, null, 4)], 8,
|
|
117107
|
+
}, null, 4)], 8, _7e)), 64)), l("div", v7e, [f(DA, { trigger: "click" }, {
|
|
117101
117108
|
content: H(() => [f(n0, {
|
|
117102
117109
|
modelValue: M.value,
|
|
117103
117110
|
"onUpdate:modelValue": i[8] || (i[8] = (e) => N(e))
|
|
@@ -117106,14 +117113,14 @@ var t7e = _({
|
|
|
117106
117113
|
_: 1,
|
|
117107
117114
|
__: [24]
|
|
117108
117115
|
})])])])) : s("", !0),
|
|
117109
|
-
S.value ? (E(), c("div",
|
|
117116
|
+
S.value ? (E(), c("div", y7e, [l("div", b7e, F(L(n).mobile.elementToolbar.fillColorLabel()), 1), l("div", x7e, [(E(), c(e, null, A(r, (e) => l("div", {
|
|
117110
117117
|
class: "color",
|
|
117111
117118
|
key: e,
|
|
117112
117119
|
onClick: (t) => I(e)
|
|
117113
117120
|
}, [l("div", {
|
|
117114
117121
|
class: "color-block",
|
|
117115
117122
|
style: x({ backgroundColor: e })
|
|
117116
|
-
}, null, 4)], 8,
|
|
117123
|
+
}, null, 4)], 8, S7e)), 64)), l("div", C7e, [f(DA, { trigger: "click" }, {
|
|
117117
117124
|
content: H(() => [f(n0, {
|
|
117118
117125
|
modelValue: P.value,
|
|
117119
117126
|
"onUpdate:modelValue": i[9] || (i[9] = (e) => I(e))
|
|
@@ -117122,8 +117129,8 @@ var t7e = _({
|
|
|
117122
117129
|
_: 1,
|
|
117123
117130
|
__: [25]
|
|
117124
117131
|
})])])])) : s("", !0),
|
|
117125
|
-
!y.value && !b.value && !S.value ? (E(), c("div",
|
|
117126
|
-
])) : s("", !0), v.value === "common" ? (E(), c("div",
|
|
117132
|
+
!y.value && !b.value && !S.value ? (E(), c("div", w7e, F(L(n).mobile.elementToolbar.noProperties()), 1)) : s("", !0)
|
|
117133
|
+
])) : s("", !0), v.value === "common" ? (E(), c("div", T7e, [
|
|
117127
117134
|
f(O4, { class: "row" }, {
|
|
117128
117135
|
default: H(() => [f(o0, {
|
|
117129
117136
|
style: { flex: "1" },
|
|
@@ -117230,14 +117237,14 @@ var t7e = _({
|
|
|
117230
117237
|
])) : s("", !0)])]);
|
|
117231
117238
|
};
|
|
117232
117239
|
}
|
|
117233
|
-
}), [["__scopeId", "data-v-06b39efa"]]),
|
|
117240
|
+
}), [["__scopeId", "data-v-06b39efa"]]), D7e = {
|
|
117234
117241
|
class: "i-icon",
|
|
117235
117242
|
viewBox: "0 0 48 48",
|
|
117236
117243
|
width: "1em",
|
|
117237
117244
|
height: "1em"
|
|
117238
117245
|
};
|
|
117239
|
-
function
|
|
117240
|
-
return E(), c("svg",
|
|
117246
|
+
function O7e(e, t) {
|
|
117247
|
+
return E(), c("svg", D7e, t[0] || (t[0] = [l("path", {
|
|
117241
117248
|
fill: "none",
|
|
117242
117249
|
stroke: "currentColor",
|
|
117243
117250
|
"stroke-linecap": "round",
|
|
@@ -117246,17 +117253,17 @@ function D7e(e, t) {
|
|
|
117246
117253
|
d: "M23.992 6H6v36h18m9-9l9-9l-9-9m-17 8.992h26"
|
|
117247
117254
|
}, null, -1)]));
|
|
117248
117255
|
}
|
|
117249
|
-
var
|
|
117256
|
+
var k7e = _({
|
|
117250
117257
|
name: "icon-park-outline-logout",
|
|
117251
|
-
render:
|
|
117252
|
-
}),
|
|
117258
|
+
render: O7e
|
|
117259
|
+
}), A7e = { class: "mobile-editor-header" }, j7e = { class: "history" }, M7e = /* @__PURE__ */ Y(/* @__PURE__ */ p({
|
|
117253
117260
|
__name: "Header",
|
|
117254
117261
|
props: { changeMode: { type: Function } },
|
|
117255
117262
|
setup(e) {
|
|
117256
117263
|
let { LL: t } = Jd(), { canUndo: n, canRedo: r } = G(Es()), { redo: i, undo: a } = pd();
|
|
117257
117264
|
return (e, o) => {
|
|
117258
|
-
let s = VFe, u = RFe, p =
|
|
117259
|
-
return E(), c("div",
|
|
117265
|
+
let s = VFe, u = RFe, p = k7e;
|
|
117266
|
+
return E(), c("div", A7e, [l("div", j7e, [l("div", {
|
|
117260
117267
|
class: b(["history-item", { disable: !L(n) }]),
|
|
117261
117268
|
onClick: o[0] || (o[0] = W((e) => L(a)(), ["stop"]))
|
|
117262
117269
|
}, [f(s), d(" " + F(L(t).mobile.editorHeader.undo()), 1)], 2), l("div", {
|
|
@@ -117268,7 +117275,7 @@ var O7e = _({
|
|
|
117268
117275
|
}, [f(p), d(" " + F(L(t).mobile.editorHeader.exitEdit()), 1)])]);
|
|
117269
117276
|
};
|
|
117270
117277
|
}
|
|
117271
|
-
}), [["__scopeId", "data-v-a59bfd5a"]]),
|
|
117278
|
+
}), [["__scopeId", "data-v-a59bfd5a"]]), N7e = { class: "mobile-editor" }, P7e = /* @__PURE__ */ Y(/* @__PURE__ */ p({
|
|
117272
117279
|
__name: "index",
|
|
117273
117280
|
props: { changeMode: { type: Function } },
|
|
117274
117281
|
setup(t) {
|
|
@@ -117292,8 +117299,8 @@ var O7e = _({
|
|
|
117292
117299
|
}, M = () => {
|
|
117293
117300
|
r.setActiveElementIdList([]);
|
|
117294
117301
|
};
|
|
117295
|
-
return (t, n) => (E(), c("div",
|
|
117296
|
-
f(
|
|
117302
|
+
return (t, n) => (E(), c("div", N7e, [
|
|
117303
|
+
f(M7e, { changeMode: t.changeMode }, null, 8, ["changeMode"]),
|
|
117297
117304
|
l("div", {
|
|
117298
117305
|
class: "content",
|
|
117299
117306
|
ref_key: "contentRef",
|
|
@@ -117319,7 +117326,7 @@ var O7e = _({
|
|
|
117319
117326
|
"length",
|
|
117320
117327
|
"canvasScale"
|
|
117321
117328
|
]))), 128)),
|
|
117322
|
-
(E(!0), c(e, null, A(C.value, (t) => (E(), c(e, { key: t.id }, [t.type === "line" ? s("", !0) : (E(), o(
|
|
117329
|
+
(E(!0), c(e, null, A(C.value, (t) => (E(), c(e, { key: t.id }, [t.type === "line" ? s("", !0) : (E(), o($5e, {
|
|
117323
117330
|
key: 0,
|
|
117324
117331
|
elementInfo: t,
|
|
117325
117332
|
isSelected: L(m).includes(t.id),
|
|
@@ -117338,18 +117345,18 @@ var O7e = _({
|
|
|
117338
117345
|
ref_key: "viewportRef",
|
|
117339
117346
|
ref: _,
|
|
117340
117347
|
style: x({ transform: `scale(${b.value})` })
|
|
117341
|
-
}, [(E(!0), c(e, null, A(C.value, (e, t) => (E(), o(
|
|
117348
|
+
}, [(E(!0), c(e, null, A(C.value, (e, t) => (E(), o(Q5e, {
|
|
117342
117349
|
key: e.id,
|
|
117343
117350
|
elementInfo: e,
|
|
117344
117351
|
elementIndex: t + 1,
|
|
117345
117352
|
selectElement: j
|
|
117346
117353
|
}, null, 8, ["elementInfo", "elementIndex"]))), 128))], 4)
|
|
117347
117354
|
], 4)], 544),
|
|
117348
|
-
f(
|
|
117349
|
-
L(h) ? (E(), o(
|
|
117355
|
+
f(u7e),
|
|
117356
|
+
L(h) ? (E(), o(E7e, { key: 0 })) : s("", !0)
|
|
117350
117357
|
]));
|
|
117351
117358
|
}
|
|
117352
|
-
}), [["__scopeId", "data-v-f5ba0a8f"]]),
|
|
117359
|
+
}), [["__scopeId", "data-v-f5ba0a8f"]]), F7e = { class: "header" }, I7e = /* @__PURE__ */ Y(/* @__PURE__ */ p({
|
|
117353
117360
|
__name: "MobilePlayer",
|
|
117354
117361
|
props: { changeMode: { type: Function } },
|
|
117355
117362
|
setup(t) {
|
|
@@ -117380,7 +117387,7 @@ var O7e = _({
|
|
|
117380
117387
|
i > s && i > 50 && (t < 0 && o.value > 0 && r.updateSlideIndex(o.value - 1), t > 0 && o.value < a.value.length - 1 && r.updateSlideIndex(o.value + 1)), s > i && s > 50 && (n > 0 && o.value > 0 && r.updateSlideIndex(o.value - 1), n < 0 && o.value < a.value.length - 1 && r.updateSlideIndex(o.value + 1));
|
|
117381
117388
|
};
|
|
117382
117389
|
return (t, r) => {
|
|
117383
|
-
let i =
|
|
117390
|
+
let i = k7e;
|
|
117384
117391
|
return E(), c("div", {
|
|
117385
117392
|
class: "mobile-player",
|
|
117386
117393
|
style: x({
|
|
@@ -117417,20 +117424,20 @@ var O7e = _({
|
|
|
117417
117424
|
}, [f(E0, {
|
|
117418
117425
|
slide: e,
|
|
117419
117426
|
size: g.value.width
|
|
117420
|
-
}, null, 8, ["slide", "size"])], 4)) : s("", !0)], 2))), 128))], 32), m.value ? (E(), c(e, { key: 0 }, [l("div",
|
|
117427
|
+
}, null, 8, ["slide", "size"])], 4)) : s("", !0)], 2))), 128))], 32), m.value ? (E(), c(e, { key: 0 }, [l("div", F7e, [l("div", {
|
|
117421
117428
|
class: "back",
|
|
117422
117429
|
onClick: r[3] || (r[3] = (e) => t.changeMode("preview"))
|
|
117423
|
-
}, [f(i), d(" " + F(L(n).mobile.player.exitPlayback()), 1)])]), f(
|
|
117430
|
+
}, [f(i), d(" " + F(L(n).mobile.player.exitPlayback()), 1)])]), f(a7e, { class: "thumbnails" })], 64)) : s("", !0)], 4);
|
|
117424
117431
|
};
|
|
117425
117432
|
}
|
|
117426
|
-
}), [["__scopeId", "data-v-293ece02"]]),
|
|
117433
|
+
}), [["__scopeId", "data-v-293ece02"]]), L7e = {
|
|
117427
117434
|
class: "i-icon",
|
|
117428
117435
|
viewBox: "0 0 48 48",
|
|
117429
117436
|
width: "1em",
|
|
117430
117437
|
height: "1em"
|
|
117431
117438
|
};
|
|
117432
|
-
function
|
|
117433
|
-
return E(), c("svg",
|
|
117439
|
+
function R7e(e, t) {
|
|
117440
|
+
return E(), c("svg", L7e, t[0] || (t[0] = [l("g", {
|
|
117434
117441
|
fill: "none",
|
|
117435
117442
|
stroke: "currentColor",
|
|
117436
117443
|
"stroke-linejoin": "round",
|
|
@@ -117440,10 +117447,10 @@ function L7e(e, t) {
|
|
|
117440
117447
|
d: "M16 40H6a2 2 0 0 1-2-2V10a2 2 0 0 1 2-2h36a2 2 0 0 1 2 2v6"
|
|
117441
117448
|
}), l("path", { d: "M42 24H26a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V26a2 2 0 0 0-2-2Z" })], -1)]));
|
|
117442
117449
|
}
|
|
117443
|
-
var
|
|
117450
|
+
var z7e = _({
|
|
117444
117451
|
name: "icon-park-outline-full-screen-play",
|
|
117445
|
-
render:
|
|
117446
|
-
}),
|
|
117452
|
+
render: R7e
|
|
117453
|
+
}), B7e = { class: "thumbnail-list" }, V7e = { class: "menu" }, H7e = /* @__PURE__ */ Y(/* @__PURE__ */ p({
|
|
117447
117454
|
__name: "MobilePreview",
|
|
117448
117455
|
props: { changeMode: { type: Function } },
|
|
117449
117456
|
setup(t) {
|
|
@@ -117451,12 +117458,12 @@ var R7e = _({
|
|
|
117451
117458
|
return w(() => {
|
|
117452
117459
|
h.value && (g.value = h.value.clientWidth, _.value = document.body.clientWidth - 20);
|
|
117453
117460
|
}), (t, a) => {
|
|
117454
|
-
let v = _0, y =
|
|
117461
|
+
let v = _0, y = z7e;
|
|
117455
117462
|
return E(), c(e, null, [l("div", {
|
|
117456
117463
|
class: "mobile-preview",
|
|
117457
117464
|
ref_key: "mobileRef",
|
|
117458
117465
|
ref: h
|
|
117459
|
-
}, [l("div",
|
|
117466
|
+
}, [l("div", B7e, [(E(!0), c(e, null, A(L(r), (e, t) => (E(), c("div", {
|
|
117460
117467
|
class: "thumbnail-item",
|
|
117461
117468
|
key: e.id
|
|
117462
117469
|
}, [f(E0, {
|
|
@@ -117467,7 +117474,7 @@ var R7e = _({
|
|
|
117467
117474
|
"slide",
|
|
117468
117475
|
"size",
|
|
117469
117476
|
"visible"
|
|
117470
|
-
])]))), 128))]), l("div",
|
|
117477
|
+
])]))), 128))]), l("div", V7e, [
|
|
117471
117478
|
l("div", {
|
|
117472
117479
|
class: "menu-item",
|
|
117473
117480
|
onClick: a[0] || (a[0] = (e) => t.changeMode("editor"))
|
|
@@ -117506,22 +117513,22 @@ var R7e = _({
|
|
|
117506
117513
|
])) : s("", !0)], 64);
|
|
117507
117514
|
};
|
|
117508
117515
|
}
|
|
117509
|
-
}), [["__scopeId", "data-v-3b20a1eb"]]),
|
|
117516
|
+
}), [["__scopeId", "data-v-3b20a1eb"]]), U7e = { class: "mobile" }, W7e = /* @__PURE__ */ Y(/* @__PURE__ */ p({
|
|
117510
117517
|
__name: "index",
|
|
117511
117518
|
setup(e) {
|
|
117512
117519
|
let t = O("preview"), n = (e) => t.value = e, r = i(() => ({
|
|
117513
|
-
editor:
|
|
117514
|
-
player:
|
|
117515
|
-
preview:
|
|
117520
|
+
editor: P7e,
|
|
117521
|
+
player: I7e,
|
|
117522
|
+
preview: H7e
|
|
117516
117523
|
})[t.value] || null);
|
|
117517
|
-
return (e, t) => (E(), c("div",
|
|
117524
|
+
return (e, t) => (E(), c("div", U7e, [(E(), o(P(r.value), { changeMode: n }))]));
|
|
117518
117525
|
}
|
|
117519
|
-
}), [["__scopeId", "data-v-d02011cb"]]),
|
|
117526
|
+
}), [["__scopeId", "data-v-d02011cb"]]), G7e = {
|
|
117520
117527
|
cs: () => Promise.resolve().then(() => wa),
|
|
117521
117528
|
en: () => Promise.resolve().then(() => Ea),
|
|
117522
117529
|
pl: () => Promise.resolve().then(() => Oa),
|
|
117523
117530
|
sk: () => Promise.resolve().then(() => Aa)
|
|
117524
|
-
},
|
|
117531
|
+
}, K7e = {
|
|
117525
117532
|
cs: {
|
|
117526
117533
|
canvas: () => Promise.resolve().then(() => Ma),
|
|
117527
117534
|
common: () => Promise.resolve().then(() => Pa),
|
|
@@ -117562,27 +117569,27 @@ var R7e = _({
|
|
|
117562
117569
|
mobile: () => Promise.resolve().then(() => zo),
|
|
117563
117570
|
screen: () => Promise.resolve().then(() => Vo)
|
|
117564
117571
|
}
|
|
117565
|
-
},
|
|
117572
|
+
}, q7e = (e, t) => ga[e] = {
|
|
117566
117573
|
...ga[e],
|
|
117567
117574
|
...t
|
|
117568
|
-
},
|
|
117569
|
-
|
|
117570
|
-
},
|
|
117571
|
-
function
|
|
117572
|
-
|
|
117575
|
+
}, J7e = async (e) => (await G7e[e]()).default, Y7e = async (e) => {
|
|
117576
|
+
q7e(e, await J7e(e)), X7e(e);
|
|
117577
|
+
}, X7e = (e) => void (_a[e] = Ca(e)), Z7e = async (e, t) => (await K7e[e][t]()).default, Q7e = async (e, t) => void q7e(e, { [t]: await Z7e(e, t) }), $7e = null;
|
|
117578
|
+
function e9e(e) {
|
|
117579
|
+
$7e = e;
|
|
117573
117580
|
}
|
|
117574
|
-
function
|
|
117575
|
-
|
|
117581
|
+
function t9e() {
|
|
117582
|
+
$7e = null;
|
|
117576
117583
|
}
|
|
117577
|
-
async function
|
|
117578
|
-
Zo(e), es(), await
|
|
117584
|
+
async function n9e(e) {
|
|
117585
|
+
Zo(e), es(), await Y7e(e), await Promise.all(ma.map((t) => Q7e(e, t))), $7e?.(e);
|
|
117579
117586
|
}
|
|
117580
117587
|
//#endregion
|
|
117581
117588
|
//#region src/embed/EmbedRoot.vue?vue&type=script&setup=true&lang.ts
|
|
117582
|
-
var
|
|
117589
|
+
var r9e = {
|
|
117583
117590
|
key: 2,
|
|
117584
117591
|
class: "pptist-empty-host-state"
|
|
117585
|
-
},
|
|
117592
|
+
}, i9e = /* @__PURE__ */ p({
|
|
117586
117593
|
__name: "EmbedRoot",
|
|
117587
117594
|
props: { init: {} },
|
|
117588
117595
|
setup(t) {
|
|
@@ -117610,17 +117617,17 @@ var n9e = {
|
|
|
117610
117617
|
p(Cd(r.value, n.init.starterPresentation));
|
|
117611
117618
|
}
|
|
117612
117619
|
return w(async () => {
|
|
117613
|
-
|
|
117620
|
+
e9e(i), n.init.templates?.length && s.setTemplates(n.init.templates), await m(), await ws(), l.initSnapshotDatabase();
|
|
117614
117621
|
}), T(() => {
|
|
117615
|
-
|
|
117616
|
-
}), (t, n) => L(d).length ? (E(), c(e, { key: 0 }, [L(f) ? (E(), o(
|
|
117622
|
+
t9e();
|
|
117623
|
+
}), (t, n) => L(d).length ? (E(), c(e, { key: 0 }, [L(f) ? (E(), o(Z5e, { key: 0 })) : L(a) ? (E(), o(K6e, { key: 1 })) : (E(), o(W7e, { key: 2 }))], 64)) : t.init.showLoadingData === !1 ? (E(), c("div", r9e)) : (E(), o(mD, {
|
|
117617
117624
|
key: 1,
|
|
117618
117625
|
tip: L(r).common.loadingData(),
|
|
117619
117626
|
loading: "",
|
|
117620
117627
|
mask: !1
|
|
117621
117628
|
}, null, 8, ["tip"]));
|
|
117622
117629
|
}
|
|
117623
|
-
}), z7 = "TOOLTIP_INSTANCE",
|
|
117630
|
+
}), z7 = "TOOLTIP_INSTANCE", a9e = {
|
|
117624
117631
|
mounted(e, t) {
|
|
117625
117632
|
let n = "", r = "top", i = [300, 0];
|
|
117626
117633
|
typeof t.value == "string" ? n = t.value : (n = t.value.content, t.value.placement !== void 0 && (r = t.value.placement), t.value.delay !== void 0 && (i = t.value.delay)), e[z7] = EA(e, {
|
|
@@ -117641,24 +117648,24 @@ var n9e = {
|
|
|
117641
117648
|
unmounted(e) {
|
|
117642
117649
|
e[z7] && e[z7].destroy();
|
|
117643
117650
|
}
|
|
117644
|
-
},
|
|
117651
|
+
}, o9e = { class: "menu-content" }, s9e = ["onClick"], c9e = { class: "text" }, l9e = {
|
|
117645
117652
|
key: 0,
|
|
117646
117653
|
class: "sub-text"
|
|
117647
|
-
},
|
|
117654
|
+
}, u9e = /* @__PURE__ */ Y(/* @__PURE__ */ p({
|
|
117648
117655
|
__name: "MenuContent",
|
|
117649
117656
|
props: {
|
|
117650
117657
|
menus: {},
|
|
117651
117658
|
handleClickMenuItem: { type: Function }
|
|
117652
117659
|
},
|
|
117653
117660
|
setup(t) {
|
|
117654
|
-
let n =
|
|
117661
|
+
let n = a9e, r = (e) => e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'"), i = (e) => ({
|
|
117655
117662
|
content: e ? `<span class="contextmenu-tooltip">${r(e)}</span>` : "",
|
|
117656
117663
|
placement: "right",
|
|
117657
117664
|
delay: [400, 0]
|
|
117658
117665
|
});
|
|
117659
117666
|
return (t, r) => {
|
|
117660
117667
|
let a = M("menu-content", !0);
|
|
117661
|
-
return E(), c("ul",
|
|
117668
|
+
return E(), c("ul", o9e, [(E(!0), c(e, null, A(t.menus, (r, l) => (E(), c(e, { key: r.text || l }, [r.hide ? s("", !0) : (E(), c("li", {
|
|
117662
117669
|
key: 0,
|
|
117663
117670
|
class: b(["menu-item", {
|
|
117664
117671
|
divider: r.divider,
|
|
@@ -117672,18 +117679,18 @@ var n9e = {
|
|
|
117672
117679
|
"has-handler": r.handler
|
|
117673
117680
|
}])
|
|
117674
117681
|
}, [
|
|
117675
|
-
U((E(), c("span",
|
|
117676
|
-
r.subText && !r.children ? U((E(), c("span",
|
|
117682
|
+
U((E(), c("span", c9e, [d(F(r.text), 1)])), [[L(n), i(r.text)]]),
|
|
117683
|
+
r.subText && !r.children ? U((E(), c("span", l9e, [d(F(r.subText), 1)])), [[L(n), i(r.subText)]]) : s("", !0),
|
|
117677
117684
|
r.children && r.children.length ? (E(), o(a, {
|
|
117678
117685
|
key: 1,
|
|
117679
117686
|
class: "sub-menu",
|
|
117680
117687
|
menus: r.children,
|
|
117681
117688
|
handleClickMenuItem: t.handleClickMenuItem
|
|
117682
117689
|
}, null, 8, ["menus", "handleClickMenuItem"])) : s("", !0)
|
|
117683
|
-
], 2))], 10,
|
|
117690
|
+
], 2))], 10, s9e))], 64))), 128))]);
|
|
117684
117691
|
};
|
|
117685
117692
|
}
|
|
117686
|
-
}), [["__scopeId", "data-v-4ace596e"]]),
|
|
117693
|
+
}), [["__scopeId", "data-v-4ace596e"]]), d9e = /* @__PURE__ */ p({
|
|
117687
117694
|
__name: "index",
|
|
117688
117695
|
props: {
|
|
117689
117696
|
axis: {},
|
|
@@ -117712,12 +117719,12 @@ var n9e = {
|
|
|
117712
117719
|
top: r.value.top + "px"
|
|
117713
117720
|
}),
|
|
117714
117721
|
onContextmenu: n[2] || (n[2] = W(() => {}, ["prevent"]))
|
|
117715
|
-
}, [f(
|
|
117722
|
+
}, [f(u9e, {
|
|
117716
117723
|
menus: t.menus,
|
|
117717
117724
|
handleClickMenuItem: a
|
|
117718
117725
|
}, null, 8, ["menus"])], 36)], 64));
|
|
117719
117726
|
}
|
|
117720
|
-
}), B7 = "CTX_CONTEXTMENU_HANDLER",
|
|
117727
|
+
}), B7 = "CTX_CONTEXTMENU_HANDLER", f9e = (e, t, n) => {
|
|
117721
117728
|
t.stopPropagation(), t.preventDefault();
|
|
117722
117729
|
let r = n.value(e);
|
|
117723
117730
|
if (!r) return;
|
|
@@ -117732,47 +117739,47 @@ var n9e = {
|
|
|
117732
117739
|
menus: r,
|
|
117733
117740
|
removeContextmenu: o
|
|
117734
117741
|
};
|
|
117735
|
-
i = document.createElement("div"), k(f(
|
|
117736
|
-
},
|
|
117742
|
+
i = document.createElement("div"), k(f(d9e, s, null), i), a.appendChild(i), e.classList.add("contextmenu-active"), a.addEventListener("scroll", o), window.addEventListener("resize", o);
|
|
117743
|
+
}, p9e = {
|
|
117737
117744
|
mounted(e, t) {
|
|
117738
|
-
e[B7] = (n) =>
|
|
117745
|
+
e[B7] = (n) => f9e(e, n, t), e.addEventListener("contextmenu", e[B7]);
|
|
117739
117746
|
},
|
|
117740
117747
|
unmounted(e) {
|
|
117741
117748
|
e && e[B7] && (e.removeEventListener("contextmenu", e[B7]), delete e[B7]);
|
|
117742
117749
|
}
|
|
117743
|
-
}, V7 = "CTX_CLICK_OUTSIDE_HANDLER",
|
|
117750
|
+
}, V7 = "CTX_CLICK_OUTSIDE_HANDLER", m9e = (e, t, n) => {
|
|
117744
117751
|
let r = n.value, i = t.composedPath();
|
|
117745
117752
|
(i ? i.indexOf(e) < 0 : !e.contains(t.target)) && r(t);
|
|
117746
|
-
},
|
|
117753
|
+
}, h9e = {
|
|
117747
117754
|
mounted(e, t) {
|
|
117748
|
-
e[V7] = (n) =>
|
|
117755
|
+
e[V7] = (n) => m9e(e, n, t), setTimeout(() => {
|
|
117749
117756
|
document.addEventListener("click", e[V7]);
|
|
117750
117757
|
}, 0);
|
|
117751
117758
|
},
|
|
117752
117759
|
unmounted(e) {
|
|
117753
117760
|
e[V7] && (document.removeEventListener("click", e[V7]), delete e[V7]);
|
|
117754
117761
|
}
|
|
117755
|
-
},
|
|
117762
|
+
}, g9e = {
|
|
117756
117763
|
mounted(e, t) {
|
|
117757
|
-
|
|
117764
|
+
v9e(e, t.value);
|
|
117758
117765
|
},
|
|
117759
117766
|
updated(e, t) {
|
|
117760
|
-
|
|
117767
|
+
v9e(e, t.value);
|
|
117761
117768
|
},
|
|
117762
117769
|
unmounted(e) {
|
|
117763
|
-
|
|
117770
|
+
_9e(e);
|
|
117764
117771
|
}
|
|
117765
|
-
},
|
|
117772
|
+
}, _9e = (e) => {
|
|
117766
117773
|
let t = e.querySelector(".directive-loading-overlay");
|
|
117767
117774
|
t && t.remove(), e._vLoadingAddedPosition && (e.style.removeProperty("position"), delete e._vLoadingAddedPosition);
|
|
117768
|
-
},
|
|
117775
|
+
}, v9e = (e, t) => {
|
|
117769
117776
|
let n = !1, r = "";
|
|
117770
117777
|
typeof t == "boolean" ? n = t : (t.text && (r = t.text), n = t.state);
|
|
117771
117778
|
let i = e.querySelector(".directive-loading-overlay");
|
|
117772
117779
|
n ? (getComputedStyle(e).position === "static" && (e.style.position = "relative", e._vLoadingAddedPosition = !0), i || (i = document.createElement("div"), i.className = "directive-loading-overlay", e.appendChild(i)), r ? (i.classList.add("has-text"), i.style.setProperty("--directive-loading-text", `"${r}"`)) : (i.classList.remove("has-text"), i.style.removeProperty("--directive-loading-text"))) : (i && i.remove(), e._vLoadingAddedPosition && (e.style.removeProperty("position"), delete e._vLoadingAddedPosition));
|
|
117773
|
-
},
|
|
117774
|
-
e.directive("contextmenu",
|
|
117775
|
-
} },
|
|
117780
|
+
}, y9e = { install(e) {
|
|
117781
|
+
e.directive("contextmenu", p9e), e.directive("click-outside", h9e), e.directive("tooltip", a9e), e.directive("loading", g9e);
|
|
117782
|
+
} }, b9e = [
|
|
117776
117783
|
"text",
|
|
117777
117784
|
"image",
|
|
117778
117785
|
"shape",
|
|
@@ -117782,7 +117789,7 @@ var n9e = {
|
|
|
117782
117789
|
"latex",
|
|
117783
117790
|
"video",
|
|
117784
117791
|
"audio"
|
|
117785
|
-
],
|
|
117792
|
+
], x9e = new Set([
|
|
117786
117793
|
"backcolor",
|
|
117787
117794
|
"backgroundColor",
|
|
117788
117795
|
"borderColor",
|
|
@@ -117793,8 +117800,8 @@ var n9e = {
|
|
|
117793
117800
|
"fontColor",
|
|
117794
117801
|
"lineColor",
|
|
117795
117802
|
"textColor"
|
|
117796
|
-
]),
|
|
117797
|
-
function
|
|
117803
|
+
]), S9e = /^(#[0-9a-f]{3,8}|(?:rgb|hsl)a?\([^;{}<>]+\)|var\(--[a-z0-9_-]+\)|transparent|currentColor|none|[a-z]+)$/i;
|
|
117804
|
+
function C9e(e) {
|
|
117798
117805
|
return !!e && typeof e == "object" && !Array.isArray(e);
|
|
117799
117806
|
}
|
|
117800
117807
|
function H7(e, t) {
|
|
@@ -117809,10 +117816,10 @@ function U7(e, t, n = !1) {
|
|
|
117809
117816
|
function W7(e, t = "id") {
|
|
117810
117817
|
return U7(e, t);
|
|
117811
117818
|
}
|
|
117812
|
-
function
|
|
117819
|
+
function w9e(e, t) {
|
|
117813
117820
|
if (e !== void 0) return W7(e, t);
|
|
117814
117821
|
}
|
|
117815
|
-
function
|
|
117822
|
+
function T9e(e, t = "id") {
|
|
117816
117823
|
let n = Array.isArray(e) ? e : [e];
|
|
117817
117824
|
if (!n.length) throw Error(`${t} must include at least one ID`);
|
|
117818
117825
|
return n.map((n, r) => W7(n, `${t}${Array.isArray(e) ? `[${r}]` : ""}`));
|
|
@@ -117832,16 +117839,16 @@ function q7(e, t, n = "index") {
|
|
|
117832
117839
|
if (i < 0 || i >= t) throw Error(`${n} is out of bounds`);
|
|
117833
117840
|
return i;
|
|
117834
117841
|
}
|
|
117835
|
-
function
|
|
117842
|
+
function E9e(e, t, n = "index") {
|
|
117836
117843
|
if (e === void 0) return t;
|
|
117837
117844
|
let r = G7(e, n), i = Math.trunc(r);
|
|
117838
117845
|
if (i !== r) throw Error(`${n} must be an integer`);
|
|
117839
117846
|
if (i < 0 || i > t) throw Error(`${n} is out of bounds`);
|
|
117840
117847
|
return i;
|
|
117841
117848
|
}
|
|
117842
|
-
function
|
|
117849
|
+
function D9e(e, t = "color") {
|
|
117843
117850
|
let n = U7(e, t);
|
|
117844
|
-
if (!
|
|
117851
|
+
if (!S9e.test(n.trim())) throw Error(`${t} must be a valid color string`);
|
|
117845
117852
|
return n;
|
|
117846
117853
|
}
|
|
117847
117854
|
function J7(e, t = "value") {
|
|
@@ -117852,64 +117859,64 @@ function J7(e, t = "value") {
|
|
|
117852
117859
|
}
|
|
117853
117860
|
for (let [n, r] of Object.entries(e)) {
|
|
117854
117861
|
let e = `${t}.${n}`;
|
|
117855
|
-
|
|
117862
|
+
x9e.has(n) && r !== void 0 ? D9e(r, e) : n === "themeColors" && Array.isArray(r) ? r.forEach((t, n) => D9e(t, `${e}[${n}]`)) : r && typeof r == "object" && J7(r, e);
|
|
117856
117863
|
}
|
|
117857
117864
|
}
|
|
117858
117865
|
}
|
|
117859
|
-
function
|
|
117860
|
-
if (!
|
|
117866
|
+
function O9e(e, t = "element.type") {
|
|
117867
|
+
if (!b9e.includes(e)) throw Error(`${t} is not supported`);
|
|
117861
117868
|
return e;
|
|
117862
117869
|
}
|
|
117863
117870
|
function Y7(e, t = "element") {
|
|
117864
117871
|
"left" in e && e.left !== void 0 && G7(e.left, `${t}.left`), "top" in e && e.top !== void 0 && G7(e.top, `${t}.top`), "width" in e && e.width !== void 0 && K7(e.width, `${t}.width`), "height" in e && e.height !== void 0 && K7(e.height, `${t}.height`), "rotate" in e && e.rotate !== void 0 && G7(e.rotate, `${t}.rotate`);
|
|
117865
117872
|
}
|
|
117866
|
-
function
|
|
117873
|
+
function k9e(e, t) {
|
|
117867
117874
|
if (!Array.isArray(e) || e.length !== 2) throw Error(`${t} must be a two-value point`);
|
|
117868
117875
|
G7(e[0], `${t}[0]`), G7(e[1], `${t}[1]`);
|
|
117869
117876
|
}
|
|
117870
|
-
function
|
|
117877
|
+
function A9e(e, t) {
|
|
117871
117878
|
if (!Array.isArray(e) || e.length !== 2) throw Error(`${t} must be a two-value viewBox`);
|
|
117872
117879
|
K7(e[0], `${t}[0]`), K7(e[1], `${t}[1]`);
|
|
117873
117880
|
}
|
|
117874
|
-
function
|
|
117875
|
-
let n =
|
|
117881
|
+
function j9e(e, t = "element") {
|
|
117882
|
+
let n = O9e(e.type, `${t}.type`);
|
|
117876
117883
|
if (n === "text") U7(H7(e.content, `${t}.content`), `${t}.content`, !0);
|
|
117877
117884
|
else if (n === "image" || n === "video" || n === "audio") U7(H7(e.src, `${t}.src`), `${t}.src`);
|
|
117878
|
-
else if (n === "shape")
|
|
117879
|
-
else if (n === "line")
|
|
117885
|
+
else if (n === "shape") A9e(H7(e.viewBox, `${t}.viewBox`), `${t}.viewBox`), U7(H7(e.path, `${t}.path`), `${t}.path`);
|
|
117886
|
+
else if (n === "line") k9e(H7(e.start, `${t}.start`), `${t}.start`), k9e(H7(e.end, `${t}.end`), `${t}.end`);
|
|
117880
117887
|
else if (n === "chart") {
|
|
117881
|
-
if (U7(H7(e.chartType, `${t}.chartType`), `${t}.chartType`), !
|
|
117888
|
+
if (U7(H7(e.chartType, `${t}.chartType`), `${t}.chartType`), !C9e(e.data)) throw Error(`${t}.data is required`);
|
|
117882
117889
|
} else if (n === "table") {
|
|
117883
117890
|
if (!Array.isArray(e.data)) throw Error(`${t}.data is required`);
|
|
117884
117891
|
} else n === "latex" && (U7(H7(e.latex, `${t}.latex`), `${t}.latex`, !0), U7(H7(e.path, `${t}.path`), `${t}.path`));
|
|
117885
117892
|
}
|
|
117886
117893
|
function X7(e, t = "element") {
|
|
117887
|
-
e.id !== void 0 && W7(e.id, `${t}.id`), Y7(e, t),
|
|
117894
|
+
e.id !== void 0 && W7(e.id, `${t}.id`), Y7(e, t), j9e(e, t), J7(e, t);
|
|
117888
117895
|
}
|
|
117889
|
-
function
|
|
117896
|
+
function M9e(e, t, n = "patch") {
|
|
117890
117897
|
if (e.type !== void 0 && e.type !== t.type) throw Error(`${n}.type cannot change element type from ${t.type} to ${e.type}`);
|
|
117891
117898
|
Y7(e, n), J7(e, n);
|
|
117892
117899
|
}
|
|
117893
117900
|
//#endregion
|
|
117894
117901
|
//#region src/embed/agentic/helpers.ts
|
|
117895
|
-
var
|
|
117902
|
+
var N9e = /^[a-z][A-Za-z0-9]*\.[a-z][A-Za-z0-9]*$/, P9e = 2, F9e = 2, I9e = 100, L9e = 36, R9e = {
|
|
117896
117903
|
width: 2,
|
|
117897
117904
|
style: "solid",
|
|
117898
117905
|
color: "#eeece1"
|
|
117899
|
-
},
|
|
117906
|
+
}, z9e = {
|
|
117900
117907
|
color: "#5b9bd5",
|
|
117901
117908
|
rowHeader: !0,
|
|
117902
117909
|
rowFooter: !1,
|
|
117903
117910
|
colHeader: !1,
|
|
117904
117911
|
colFooter: !1
|
|
117905
|
-
},
|
|
117912
|
+
}, B9e = [
|
|
117906
117913
|
"#5b9bd5",
|
|
117907
117914
|
"#ed7d31",
|
|
117908
117915
|
"#a5a5a5",
|
|
117909
117916
|
"#ffc000",
|
|
117910
117917
|
"#4472c4",
|
|
117911
117918
|
"#70ad47"
|
|
117912
|
-
],
|
|
117919
|
+
], V9e = "#333", H9e = "#e8ecf4", U9e = "#000000", W9e = 2, G9e = {
|
|
117913
117920
|
"image/avif": "avif",
|
|
117914
117921
|
"image/bmp": "bmp",
|
|
117915
117922
|
"image/gif": "gif",
|
|
@@ -117918,11 +117925,11 @@ var M9e = /^[a-z][A-Za-z0-9]*\.[a-z][A-Za-z0-9]*$/, N9e = 2, P9e = 2, F9e = 100,
|
|
|
117918
117925
|
"image/svg+xml": "svg",
|
|
117919
117926
|
"image/webp": "webp",
|
|
117920
117927
|
"image/x-icon": "ico"
|
|
117921
|
-
},
|
|
117928
|
+
}, K9e = {
|
|
117922
117929
|
...uf,
|
|
117923
|
-
...
|
|
117930
|
+
...G9e
|
|
117924
117931
|
}, Z7 = {};
|
|
117925
|
-
for (let [e, t] of Object.entries(
|
|
117932
|
+
for (let [e, t] of Object.entries(K9e)) Z7[t] = e;
|
|
117926
117933
|
Z7.aiff = "audio/x-aiff", Z7.jpeg = "image/jpeg", Z7.m4a = "audio/mp4", Z7.m4v = "video/mp4", Z7.midi = "audio/midi", Z7.mp3 = "audio/mpeg", Z7.ogg = "audio/ogg", Z7.svg = "image/svg+xml";
|
|
117927
117934
|
function $(e) {
|
|
117928
117935
|
return JSON.parse(JSON.stringify(e));
|
|
@@ -117946,21 +117953,21 @@ function e9(e, t, n, r = !1) {
|
|
|
117946
117953
|
recoverable: r
|
|
117947
117954
|
};
|
|
117948
117955
|
}
|
|
117949
|
-
function
|
|
117956
|
+
function q9e(e) {
|
|
117950
117957
|
return e?.trim().replace(/^\./, "").toLowerCase() || void 0;
|
|
117951
117958
|
}
|
|
117952
|
-
function
|
|
117959
|
+
function J9e(e) {
|
|
117953
117960
|
let t = e?.trim().toLowerCase();
|
|
117954
|
-
return t ?
|
|
117961
|
+
return t ? K9e[t] : void 0;
|
|
117955
117962
|
}
|
|
117956
|
-
function
|
|
117957
|
-
let t =
|
|
117963
|
+
function Y9e(e) {
|
|
117964
|
+
let t = q9e(e);
|
|
117958
117965
|
return t ? Z7[t] : void 0;
|
|
117959
117966
|
}
|
|
117960
|
-
function
|
|
117967
|
+
function X9e(e) {
|
|
117961
117968
|
return /^data:([^;,]+)/i.exec(e.trim())?.[1]?.toLowerCase();
|
|
117962
117969
|
}
|
|
117963
|
-
function
|
|
117970
|
+
function Z9e(e) {
|
|
117964
117971
|
let t = e.trim();
|
|
117965
117972
|
if (!t || t.startsWith("data:")) return "";
|
|
117966
117973
|
try {
|
|
@@ -117969,19 +117976,19 @@ function X9e(e) {
|
|
|
117969
117976
|
return t.split(/[?#]/)[0];
|
|
117970
117977
|
}
|
|
117971
117978
|
}
|
|
117972
|
-
function
|
|
117973
|
-
let n =
|
|
117979
|
+
function Q9e(e, t) {
|
|
117980
|
+
let n = J9e(t || X9e(e));
|
|
117974
117981
|
if (n) return n;
|
|
117975
|
-
let r =
|
|
117976
|
-
return
|
|
117982
|
+
let r = Z9e(e).replace(/\\/g, "/").split("/").pop() || "";
|
|
117983
|
+
return q9e(/\.([a-z0-9]+)$/i.exec(r)?.[1]);
|
|
117977
117984
|
}
|
|
117978
|
-
function
|
|
117979
|
-
return
|
|
117985
|
+
function $9e(e, t) {
|
|
117986
|
+
return X9e(e) || Y9e(t || Q9e(e));
|
|
117980
117987
|
}
|
|
117981
117988
|
function t9(e, t) {
|
|
117982
117989
|
let n = typeof e == "string" ? e : e.src;
|
|
117983
117990
|
if (typeof n != "string" || !n.trim()) throw Error("Media asset src is required");
|
|
117984
|
-
let r = typeof e == "string" ? {} : $(e), i = n.trim(), a =
|
|
117991
|
+
let r = typeof e == "string" ? {} : $(e), i = n.trim(), a = q9e(r.ext) || Q9e(i, r.mimeType) || (r.filename ? Q9e(r.filename, r.mimeType) : void 0), o = r.mimeType?.trim().toLowerCase() || $9e(i, a) || (r.filename ? $9e(r.filename, a) : void 0);
|
|
117985
117992
|
return $({
|
|
117986
117993
|
...r,
|
|
117987
117994
|
src: i,
|
|
@@ -117990,20 +117997,20 @@ function t9(e, t) {
|
|
|
117990
117997
|
...o ? { mimeType: o } : {}
|
|
117991
117998
|
});
|
|
117992
117999
|
}
|
|
117993
|
-
function
|
|
117994
|
-
return
|
|
118000
|
+
function eet(e) {
|
|
118001
|
+
return N9e.test(e);
|
|
117995
118002
|
}
|
|
117996
118003
|
function n9(e) {
|
|
117997
|
-
return
|
|
118004
|
+
return T9e(e);
|
|
117998
118005
|
}
|
|
117999
118006
|
function r9(e, t) {
|
|
118000
118007
|
return !Number.isFinite(e) || t <= 0 ? 0 : Math.max(0, Math.min(Math.trunc(e), t - 1));
|
|
118001
118008
|
}
|
|
118002
118009
|
function i9(e, t) {
|
|
118003
|
-
return
|
|
118010
|
+
return E9e(e, t);
|
|
118004
118011
|
}
|
|
118005
118012
|
function a9(e, t, n = 0) {
|
|
118006
|
-
let r =
|
|
118013
|
+
let r = w9e(t, "slideId");
|
|
118007
118014
|
if (r) {
|
|
118008
118015
|
let t = e.findIndex((e) => e.id === r);
|
|
118009
118016
|
if (t === -1) throw Error(`Slide not found: ${r}`);
|
|
@@ -118020,7 +118027,7 @@ function a9(e, t, n = 0) {
|
|
|
118020
118027
|
};
|
|
118021
118028
|
}
|
|
118022
118029
|
function o9(e, t, n, r = 0) {
|
|
118023
|
-
let i = W7(t, "elementId"), a =
|
|
118030
|
+
let i = W7(t, "elementId"), a = w9e(n, "slideId");
|
|
118024
118031
|
if (a) {
|
|
118025
118032
|
let { slide: t, index: n } = a9(e, a, r), o = t.elements.findIndex((e) => e.id === i);
|
|
118026
118033
|
if (o === -1) throw Error(`Element not found: ${i}`);
|
|
@@ -118046,16 +118053,16 @@ function s9(e, t) {
|
|
|
118046
118053
|
let n = W7(t, "elementId");
|
|
118047
118054
|
if (!e.elements.some((e) => e.id === n)) throw Error(`Element not found on slide ${e.id}: ${n}`);
|
|
118048
118055
|
}
|
|
118049
|
-
function
|
|
118056
|
+
function tet(e) {
|
|
118050
118057
|
return e.reduce((e, t) => (e[t.id] = $7("slide"), e), {});
|
|
118051
118058
|
}
|
|
118052
|
-
function
|
|
118059
|
+
function net(e) {
|
|
118053
118060
|
return e.reduce((e, t) => (e.elementIdMap[t.id] = $7("el"), t.groupId && !e.groupIdMap[t.groupId] && (e.groupIdMap[t.groupId] = $7("group")), e), {
|
|
118054
118061
|
elementIdMap: {},
|
|
118055
118062
|
groupIdMap: {}
|
|
118056
118063
|
});
|
|
118057
118064
|
}
|
|
118058
|
-
function
|
|
118065
|
+
function ret(e, t, n) {
|
|
118059
118066
|
if (!e) return;
|
|
118060
118067
|
if (e.type !== "slide") return $(e);
|
|
118061
118068
|
let r = t[e.target];
|
|
@@ -118064,7 +118071,7 @@ function net(e, t, n) {
|
|
|
118064
118071
|
target: r
|
|
118065
118072
|
} : n ? $(e) : void 0;
|
|
118066
118073
|
}
|
|
118067
|
-
function
|
|
118074
|
+
function iet(e, t) {
|
|
118068
118075
|
if (!e) return;
|
|
118069
118076
|
let n = U7(e.target, "link.target").trim();
|
|
118070
118077
|
if (!n) throw Error("Link target is required");
|
|
@@ -118089,7 +118096,7 @@ function ret(e, t) {
|
|
|
118089
118096
|
}
|
|
118090
118097
|
throw Error(`Unsupported link type: ${e.type}`);
|
|
118091
118098
|
}
|
|
118092
|
-
function
|
|
118099
|
+
function aet(e, t) {
|
|
118093
118100
|
let n = [];
|
|
118094
118101
|
for (let r of e) for (let e of r.elements) e.link?.type === "slide" && (t && !t.has(e.link.target) || n.push({
|
|
118095
118102
|
slideId: r.id,
|
|
@@ -118098,7 +118105,7 @@ function iet(e, t) {
|
|
|
118098
118105
|
}));
|
|
118099
118106
|
return n;
|
|
118100
118107
|
}
|
|
118101
|
-
function
|
|
118108
|
+
function oet(e) {
|
|
118102
118109
|
return typeof e.offset == "number" ? {
|
|
118103
118110
|
left: e.offset,
|
|
118104
118111
|
top: e.offset
|
|
@@ -118107,19 +118114,19 @@ function aet(e) {
|
|
|
118107
118114
|
top: e.offset?.top ?? 0
|
|
118108
118115
|
};
|
|
118109
118116
|
}
|
|
118110
|
-
function
|
|
118111
|
-
let r =
|
|
118117
|
+
function set(e, t = [], n = {}) {
|
|
118118
|
+
let r = net(e), i = {
|
|
118112
118119
|
...r.elementIdMap,
|
|
118113
118120
|
...n.elementIdMap
|
|
118114
118121
|
}, a = {
|
|
118115
118122
|
...r.groupIdMap,
|
|
118116
118123
|
...n.groupIdMap
|
|
118117
|
-
}, o = { ...n.animationIdMap || {} }, s = n.slideIdMap || {}, c = n.preserveExternalSlideLinks ?? !0, l =
|
|
118124
|
+
}, o = { ...n.animationIdMap || {} }, s = n.slideIdMap || {}, c = n.preserveExternalSlideLinks ?? !0, l = oet(n);
|
|
118118
118125
|
return {
|
|
118119
118126
|
elements: e.map((e) => {
|
|
118120
118127
|
let t = $(e);
|
|
118121
118128
|
t.id = i[e.id] || $7("el"), t.left += l.left, t.top += l.top, t.groupId && (t.groupId = a[t.groupId] || $7("group"));
|
|
118122
|
-
let n =
|
|
118129
|
+
let n = ret(t.link, s, c);
|
|
118123
118130
|
return n ? t.link = n : delete t.link, t;
|
|
118124
118131
|
}),
|
|
118125
118132
|
animations: t.flatMap((e) => {
|
|
@@ -118133,12 +118140,12 @@ function oet(e, t = [], n = {}) {
|
|
|
118133
118140
|
animationIdMap: o
|
|
118134
118141
|
};
|
|
118135
118142
|
}
|
|
118136
|
-
function
|
|
118143
|
+
function cet(e, t = {}) {
|
|
118137
118144
|
let n = {
|
|
118138
|
-
...
|
|
118145
|
+
...tet(e),
|
|
118139
118146
|
...t.slideIdMap
|
|
118140
118147
|
}, r = {}, i = {}, a = {}, o = e.map((e) => {
|
|
118141
|
-
let o = $(e), s =
|
|
118148
|
+
let o = $(e), s = set(o.elements, o.animations || [], {
|
|
118142
118149
|
animationIdMap: a,
|
|
118143
118150
|
elementIdMap: r,
|
|
118144
118151
|
groupIdMap: i,
|
|
@@ -118156,7 +118163,7 @@ function set(e, t = {}) {
|
|
|
118156
118163
|
id: $7("reply")
|
|
118157
118164
|
}))), t;
|
|
118158
118165
|
});
|
|
118159
|
-
return
|
|
118166
|
+
return uet({
|
|
118160
118167
|
...o,
|
|
118161
118168
|
id: n[e.id],
|
|
118162
118169
|
elements: s.elements,
|
|
@@ -118174,7 +118181,7 @@ function set(e, t = {}) {
|
|
|
118174
118181
|
animations: o.flatMap((e) => e.animations || [])
|
|
118175
118182
|
};
|
|
118176
118183
|
}
|
|
118177
|
-
function
|
|
118184
|
+
function uet(e = {}) {
|
|
118178
118185
|
return e.id !== void 0 && W7(e.id, "slide.id"), J7(e, "slide"), {
|
|
118179
118186
|
id: e.id || $7("slide"),
|
|
118180
118187
|
elements: $(e.elements || []),
|
|
@@ -118187,7 +118194,7 @@ function cet(e = {}) {
|
|
|
118187
118194
|
...e.type ? { type: e.type } : {}
|
|
118188
118195
|
};
|
|
118189
118196
|
}
|
|
118190
|
-
function
|
|
118197
|
+
function det(e, t) {
|
|
118191
118198
|
let n = e.chartType || "bar", r = e.outline ? {
|
|
118192
118199
|
...t?.outline || {},
|
|
118193
118200
|
...e.outline
|
|
@@ -118210,26 +118217,26 @@ function uet(e, t) {
|
|
|
118210
118217
|
},
|
|
118211
118218
|
...e.fill === void 0 ? {} : { fill: e.fill },
|
|
118212
118219
|
...r ? { outline: r } : {},
|
|
118213
|
-
themeColors: $(e.themeColors || t?.themeColors ||
|
|
118214
|
-
textColor: e.textColor ?? t?.fontColor ??
|
|
118215
|
-
lineColor: e.lineColor ??
|
|
118220
|
+
themeColors: $(e.themeColors || t?.themeColors || B9e),
|
|
118221
|
+
textColor: e.textColor ?? t?.fontColor ?? V9e,
|
|
118222
|
+
lineColor: e.lineColor ?? H9e
|
|
118216
118223
|
});
|
|
118217
118224
|
}
|
|
118218
118225
|
function c9(e, t) {
|
|
118219
|
-
if (
|
|
118220
|
-
let t =
|
|
118226
|
+
if (O9e(e.type), Y7(e), J7(e, "element"), e.type === "line") {
|
|
118227
|
+
let t = Det(e);
|
|
118221
118228
|
return X7(t), t;
|
|
118222
118229
|
}
|
|
118223
118230
|
if (e.type === "table") {
|
|
118224
|
-
let n =
|
|
118231
|
+
let n = zet(e, t);
|
|
118225
118232
|
return X7(n), n;
|
|
118226
118233
|
}
|
|
118227
118234
|
if (e.type === "latex") {
|
|
118228
|
-
let t =
|
|
118235
|
+
let t = Cet(e);
|
|
118229
118236
|
return X7(t), t;
|
|
118230
118237
|
}
|
|
118231
118238
|
if (e.type === "chart") {
|
|
118232
|
-
let n =
|
|
118239
|
+
let n = det(e, t);
|
|
118233
118240
|
return X7(n), n;
|
|
118234
118241
|
}
|
|
118235
118242
|
let n = e, r = e, i = e.type === "text" ? {
|
|
@@ -118251,15 +118258,15 @@ function c9(e, t) {
|
|
|
118251
118258
|
});
|
|
118252
118259
|
return X7(o), o;
|
|
118253
118260
|
}
|
|
118254
|
-
function
|
|
118261
|
+
function fet(e) {
|
|
118255
118262
|
let { transform: t, ...n } = e;
|
|
118256
118263
|
return Q7({
|
|
118257
118264
|
...n,
|
|
118258
118265
|
...t || {}
|
|
118259
118266
|
});
|
|
118260
118267
|
}
|
|
118261
|
-
function
|
|
118262
|
-
let n = e.source ? t9(e.source, "audio") : void 0, { source: r, slideId: i, index: a, select: o, ...s } =
|
|
118268
|
+
function pet(e, t) {
|
|
118269
|
+
let n = e.source ? t9(e.source, "audio") : void 0, { source: r, slideId: i, index: a, select: o, ...s } = fet({
|
|
118263
118270
|
...e,
|
|
118264
118271
|
src: n?.src ?? e.src,
|
|
118265
118272
|
ext: n?.ext ?? e.ext
|
|
@@ -118276,11 +118283,11 @@ function fet(e, t) {
|
|
|
118276
118283
|
color: s.color ?? t
|
|
118277
118284
|
});
|
|
118278
118285
|
}
|
|
118279
|
-
function
|
|
118280
|
-
return
|
|
118286
|
+
function met(e) {
|
|
118287
|
+
return fet(e);
|
|
118281
118288
|
}
|
|
118282
|
-
var
|
|
118283
|
-
function
|
|
118289
|
+
var het = [200, 200], get = "M 0 0 L 200 0 L 200 200 L 0 200 Z";
|
|
118290
|
+
function _et(e) {
|
|
118284
118291
|
if (!e.pathFormula) return $(e);
|
|
118285
118292
|
let t = ed[e.pathFormula];
|
|
118286
118293
|
if (!t) throw Error(`Shape path formula not found: ${e.pathFormula}`);
|
|
@@ -118293,17 +118300,17 @@ function get(e) {
|
|
|
118293
118300
|
};
|
|
118294
118301
|
return n && (r.keypoints = $(n)), $(r);
|
|
118295
118302
|
}
|
|
118296
|
-
function
|
|
118297
|
-
return
|
|
118303
|
+
function vet(e = {}) {
|
|
118304
|
+
return _et(c9({
|
|
118298
118305
|
type: "shape",
|
|
118299
|
-
viewBox:
|
|
118300
|
-
path:
|
|
118306
|
+
viewBox: het,
|
|
118307
|
+
path: get,
|
|
118301
118308
|
fixedRatio: !1,
|
|
118302
118309
|
fill: "#ffffff",
|
|
118303
118310
|
...e
|
|
118304
118311
|
}));
|
|
118305
118312
|
}
|
|
118306
|
-
function
|
|
118313
|
+
function yet(e, t) {
|
|
118307
118314
|
let n = {
|
|
118308
118315
|
...e,
|
|
118309
118316
|
...Q7(t),
|
|
@@ -118315,11 +118322,11 @@ function vet(e, t) {
|
|
|
118315
118322
|
} : void 0), "text" in t && (n.text = t.text ? {
|
|
118316
118323
|
...e.text || {},
|
|
118317
118324
|
...$(t.text)
|
|
118318
|
-
} : void 0), "gradient" in t && (n.gradient = t.gradient ? $(t.gradient) : void 0), "pattern" in t && (n.pattern = t.pattern), "path" in t && !("pathFormula" in t) && (n.pathFormula = void 0, n.keypoints = void 0), n.pathFormula && ("pathFormula" in t || "keypoints" in t || "width" in t || "height" in t) ?
|
|
118325
|
+
} : void 0), "gradient" in t && (n.gradient = t.gradient ? $(t.gradient) : void 0), "pattern" in t && (n.pattern = t.pattern), "path" in t && !("pathFormula" in t) && (n.pathFormula = void 0, n.keypoints = void 0), n.pathFormula && ("pathFormula" in t || "keypoints" in t || "width" in t || "height" in t) ? _et(n) : $(n);
|
|
118319
118326
|
}
|
|
118320
|
-
var
|
|
118321
|
-
function
|
|
118322
|
-
let t = new H4(e), n = t.pathd({}), r = t.box({}), i = r.w +
|
|
118327
|
+
var bet = 32;
|
|
118328
|
+
function xet(e) {
|
|
118329
|
+
let t = new H4(e), n = t.pathd({}), r = t.box({}), i = r.w + bet, a = r.h + bet;
|
|
118323
118330
|
return {
|
|
118324
118331
|
path: n,
|
|
118325
118332
|
viewBox: [i, a],
|
|
@@ -118327,13 +118334,13 @@ function bet(e) {
|
|
|
118327
118334
|
height: a
|
|
118328
118335
|
};
|
|
118329
118336
|
}
|
|
118330
|
-
function
|
|
118337
|
+
function Cet(e) {
|
|
118331
118338
|
e.id !== void 0 && W7(e.id, "element.id"), Y7(e, "element"), J7(e, "element");
|
|
118332
118339
|
let t = typeof e.latex == "string" ? e.latex.trim() : "", n = typeof e.path == "string" ? e.path.trim() : "", r = null;
|
|
118333
118340
|
if (t && !n) {
|
|
118334
118341
|
if (typeof window > "u") throw Error("LaTeX rendering is only available in the browser runtime.");
|
|
118335
118342
|
try {
|
|
118336
|
-
r =
|
|
118343
|
+
r = xet(t);
|
|
118337
118344
|
} catch (e) {
|
|
118338
118345
|
throw Error(`Failed to render LaTeX "${t}": ${e instanceof Error ? e.message : String(e)}`);
|
|
118339
118346
|
}
|
|
@@ -118349,14 +118356,14 @@ function xet(e) {
|
|
|
118349
118356
|
rotate: e.rotate ?? 0,
|
|
118350
118357
|
latex: t,
|
|
118351
118358
|
path: o,
|
|
118352
|
-
color: e.color ??
|
|
118353
|
-
strokeWidth: e.strokeWidth ??
|
|
118359
|
+
color: e.color ?? U9e,
|
|
118360
|
+
strokeWidth: e.strokeWidth ?? W9e,
|
|
118354
118361
|
viewBox: $(s),
|
|
118355
118362
|
fixedRatio: e.fixedRatio ?? !0
|
|
118356
118363
|
});
|
|
118357
118364
|
return X7(c), c;
|
|
118358
118365
|
}
|
|
118359
|
-
var
|
|
118366
|
+
var wet = new Set([
|
|
118360
118367
|
"lock",
|
|
118361
118368
|
"groupId",
|
|
118362
118369
|
"link",
|
|
@@ -118371,13 +118378,13 @@ var Cet = new Set([
|
|
|
118371
118378
|
function l9(e, t) {
|
|
118372
118379
|
return e ? [e[0], e[1]] : [...t];
|
|
118373
118380
|
}
|
|
118374
|
-
function
|
|
118381
|
+
function Tet(e) {
|
|
118375
118382
|
if (e) return [l9(e[0], [0, 0]), l9(e[1], [0, 0])];
|
|
118376
118383
|
}
|
|
118377
|
-
function
|
|
118384
|
+
function Eet(e) {
|
|
118378
118385
|
return e ? [e[0], e[1]] : ["", ""];
|
|
118379
118386
|
}
|
|
118380
|
-
function
|
|
118387
|
+
function Det(e) {
|
|
118381
118388
|
e.id !== void 0 && W7(e.id, "element.id"), Y7(e, "element"), J7(e, "element");
|
|
118382
118389
|
let t = {
|
|
118383
118390
|
id: e.id || $7("el"),
|
|
@@ -118389,37 +118396,37 @@ function Eet(e) {
|
|
|
118389
118396
|
end: l9(e.end, [200, 0]),
|
|
118390
118397
|
style: e.style ?? "solid",
|
|
118391
118398
|
color: e.color ?? "#000000",
|
|
118392
|
-
points:
|
|
118399
|
+
points: Eet(e.points)
|
|
118393
118400
|
};
|
|
118394
|
-
return e.lock !== void 0 && (t.lock = e.lock), e.groupId !== void 0 && (t.groupId = e.groupId), e.link !== void 0 && (t.link = $(e.link)), e.name !== void 0 && (t.name = e.name), e.shadow !== void 0 && (t.shadow = $(e.shadow)), e.broken !== void 0 && (t.broken = l9(e.broken, [0, 0])), e.broken2 !== void 0 && (t.broken2 = l9(e.broken2, [0, 0])), e.broken2Direction !== void 0 && (t.broken2Direction = e.broken2Direction), e.curve !== void 0 && (t.curve = l9(e.curve, [0, 0])), e.cubic !== void 0 && (t.cubic =
|
|
118401
|
+
return e.lock !== void 0 && (t.lock = e.lock), e.groupId !== void 0 && (t.groupId = e.groupId), e.link !== void 0 && (t.link = $(e.link)), e.name !== void 0 && (t.name = e.name), e.shadow !== void 0 && (t.shadow = $(e.shadow)), e.broken !== void 0 && (t.broken = l9(e.broken, [0, 0])), e.broken2 !== void 0 && (t.broken2 = l9(e.broken2, [0, 0])), e.broken2Direction !== void 0 && (t.broken2Direction = e.broken2Direction), e.curve !== void 0 && (t.curve = l9(e.curve, [0, 0])), e.cubic !== void 0 && (t.cubic = Tet(e.cubic)), X7(t), t;
|
|
118395
118402
|
}
|
|
118396
|
-
function
|
|
118403
|
+
function Oet(e, t) {
|
|
118397
118404
|
Y7(t, "patch"), J7(t, "patch");
|
|
118398
118405
|
let n = $(e);
|
|
118399
118406
|
for (let e of Object.keys(t)) {
|
|
118400
118407
|
if (e === "id" || e === "type") continue;
|
|
118401
118408
|
let r = t[e];
|
|
118402
118409
|
if (r === void 0) {
|
|
118403
|
-
|
|
118410
|
+
wet.has(e) && delete n[e];
|
|
118404
118411
|
continue;
|
|
118405
118412
|
}
|
|
118406
118413
|
Object.assign(n, { [e]: $(r) });
|
|
118407
118414
|
}
|
|
118408
|
-
return
|
|
118415
|
+
return Det(n);
|
|
118409
118416
|
}
|
|
118410
|
-
var
|
|
118417
|
+
var ket = [
|
|
118411
118418
|
"in",
|
|
118412
118419
|
"out",
|
|
118413
118420
|
"attention"
|
|
118414
|
-
],
|
|
118421
|
+
], Aet = [
|
|
118415
118422
|
"click",
|
|
118416
118423
|
"meantime",
|
|
118417
118424
|
"auto"
|
|
118418
118425
|
];
|
|
118419
|
-
function
|
|
118420
|
-
if (e.id !== void 0 && W7(e.id, "animation.id"), W7(e.elId, "animation.elId"), U7(e.effect, "animation.effect"), !
|
|
118426
|
+
function jet(e) {
|
|
118427
|
+
if (e.id !== void 0 && W7(e.id, "animation.id"), W7(e.elId, "animation.elId"), U7(e.effect, "animation.effect"), !ket.includes(e.type)) throw Error(`Invalid animation type: ${String(e.type)}`);
|
|
118421
118428
|
let t = e.trigger ?? "click";
|
|
118422
|
-
if (!
|
|
118429
|
+
if (!Aet.includes(t)) throw Error(`Invalid animation trigger: ${String(t)}`);
|
|
118423
118430
|
return {
|
|
118424
118431
|
id: e.id || $7("anim"),
|
|
118425
118432
|
elId: e.elId,
|
|
@@ -118429,21 +118436,21 @@ function Aet(e) {
|
|
|
118429
118436
|
trigger: t
|
|
118430
118437
|
};
|
|
118431
118438
|
}
|
|
118432
|
-
function
|
|
118439
|
+
function Met(e) {
|
|
118433
118440
|
return e.id !== void 0 && W7(e.id, "note.id"), U7(e.content, "note.content"), U7(e.user, "note.user"), {
|
|
118434
118441
|
id: e.id || $7("note"),
|
|
118435
118442
|
content: e.content,
|
|
118436
118443
|
user: e.user,
|
|
118437
118444
|
time: e.time ?? Date.now(),
|
|
118438
118445
|
...e.elId ? { elId: e.elId } : {},
|
|
118439
|
-
...e.replies ? { replies: e.replies.map((e) =>
|
|
118446
|
+
...e.replies ? { replies: e.replies.map((e) => Pet(e)) } : {}
|
|
118440
118447
|
};
|
|
118441
118448
|
}
|
|
118442
|
-
function
|
|
118449
|
+
function Net(e) {
|
|
118443
118450
|
let t = $(e);
|
|
118444
|
-
return e.replies && (t.replies = e.replies.map((e) =>
|
|
118451
|
+
return e.replies && (t.replies = e.replies.map((e) => Pet(e))), t;
|
|
118445
118452
|
}
|
|
118446
|
-
function
|
|
118453
|
+
function Pet(e) {
|
|
118447
118454
|
return e.id !== void 0 && W7(e.id, "reply.id"), U7(e.content, "reply.content"), U7(e.user, "reply.user"), {
|
|
118448
118455
|
id: e.id || $7("reply"),
|
|
118449
118456
|
content: e.content,
|
|
@@ -118451,7 +118458,7 @@ function Net(e) {
|
|
|
118451
118458
|
time: e.time ?? Date.now()
|
|
118452
118459
|
};
|
|
118453
118460
|
}
|
|
118454
|
-
function
|
|
118461
|
+
function Fet(e = "", t) {
|
|
118455
118462
|
return U7(e, "cell.text", !0), t && J7(t, "cell.style"), {
|
|
118456
118463
|
id: $7("cell"),
|
|
118457
118464
|
colspan: 1,
|
|
@@ -118460,7 +118467,7 @@ function Pet(e = "", t) {
|
|
|
118460
118467
|
...t ? { style: $(t) } : {}
|
|
118461
118468
|
};
|
|
118462
118469
|
}
|
|
118463
|
-
function
|
|
118470
|
+
function Iet(e, t) {
|
|
118464
118471
|
return e?.id !== void 0 && W7(e.id, "cell.id"), e?.colspan !== void 0 && K7(e.colspan, "cell.colspan"), e?.rowspan !== void 0 && K7(e.rowspan, "cell.rowspan"), e?.style ? J7(e.style, "cell.style") : t && J7(t, "cell.defaultStyle"), {
|
|
118465
118472
|
id: e?.id || $7("cell"),
|
|
118466
118473
|
colspan: e?.colspan ?? 1,
|
|
@@ -118469,7 +118476,7 @@ function Fet(e, t) {
|
|
|
118469
118476
|
...e?.style ? { style: $(e.style) } : t ? { style: $(t) } : {}
|
|
118470
118477
|
};
|
|
118471
118478
|
}
|
|
118472
|
-
function
|
|
118479
|
+
function Let(e, t) {
|
|
118473
118480
|
K7(t, "colCount"), e?.forEach((e, t) => K7(e, `colWidths[${t}]`));
|
|
118474
118481
|
let n = Math.max(1, Math.trunc(t));
|
|
118475
118482
|
if (!e?.length) return Array(n).fill(1 / n);
|
|
@@ -118478,13 +118485,13 @@ function Iet(e, t) {
|
|
|
118478
118485
|
let i = r.reduce((e, t) => e + t, 0);
|
|
118479
118486
|
return i <= 0 ? Array(n).fill(1 / n) : r.map((e) => e / i);
|
|
118480
118487
|
}
|
|
118481
|
-
function
|
|
118488
|
+
function Ret(e, t, n, r) {
|
|
118482
118489
|
let i = Math.max(1, Math.trunc(t)), a = Math.max(1, Math.trunc(n));
|
|
118483
|
-
return Array.from({ length: i }, (t, n) => Array.from({ length: a }, (t, i) =>
|
|
118490
|
+
return Array.from({ length: i }, (t, n) => Array.from({ length: a }, (t, i) => Iet(e?.[n]?.[i], r)));
|
|
118484
118491
|
}
|
|
118485
|
-
function
|
|
118492
|
+
function zet(e = {}, t) {
|
|
118486
118493
|
e.id !== void 0 && W7(e.id, "element.id"), Y7(e, "element"), J7(e, "element"), e.cellMinHeight !== void 0 && K7(e.cellMinHeight, "element.cellMinHeight");
|
|
118487
|
-
let n = e.colWidths?.length || 0, r = Math.max(...e.data?.map((e) => e.length) || [0]), i = Math.max(e.data?.length ||
|
|
118494
|
+
let n = e.colWidths?.length || 0, r = Math.max(...e.data?.map((e) => e.length) || [0]), i = Math.max(e.data?.length || P9e, 1), a = Math.max(n, r, F9e, 1), o = e.cellMinHeight ?? L9e, s = e.width ?? a * I9e, c = {
|
|
118488
118495
|
fontname: t?.fontName ?? "",
|
|
118489
118496
|
color: t?.fontColor ?? "#333"
|
|
118490
118497
|
}, l = $({
|
|
@@ -118500,41 +118507,41 @@ function Ret(e = {}, t) {
|
|
|
118500
118507
|
name: e.name,
|
|
118501
118508
|
link: e.link ? $(e.link) : void 0,
|
|
118502
118509
|
outline: {
|
|
118503
|
-
...
|
|
118510
|
+
...R9e,
|
|
118504
118511
|
...e.outline || {}
|
|
118505
118512
|
},
|
|
118506
118513
|
theme: {
|
|
118507
|
-
...
|
|
118508
|
-
color: t?.themeColors[0] ??
|
|
118514
|
+
...z9e,
|
|
118515
|
+
color: t?.themeColors[0] ?? z9e.color,
|
|
118509
118516
|
...e.theme || {}
|
|
118510
118517
|
},
|
|
118511
|
-
colWidths:
|
|
118518
|
+
colWidths: Let(e.colWidths, a),
|
|
118512
118519
|
cellMinHeight: o,
|
|
118513
|
-
data:
|
|
118520
|
+
data: Ret(e.data, i, a, c)
|
|
118514
118521
|
});
|
|
118515
118522
|
return X7(l), l;
|
|
118516
118523
|
}
|
|
118517
|
-
function
|
|
118524
|
+
function Bet(e, t) {
|
|
118518
118525
|
let n = $(t);
|
|
118519
118526
|
t.outline && (n.outline = {
|
|
118520
118527
|
...e.outline,
|
|
118521
118528
|
...t.outline
|
|
118522
118529
|
}), t.theme && (n.theme = {
|
|
118523
|
-
...e.theme ||
|
|
118530
|
+
...e.theme || z9e,
|
|
118524
118531
|
...t.theme
|
|
118525
118532
|
});
|
|
118526
118533
|
let r = t.data;
|
|
118527
118534
|
if (r) {
|
|
118528
118535
|
let t = Math.max(r.length, 1), i = Math.max(...r.map((e) => e.length), n.colWidths?.length || e.colWidths.length, 1);
|
|
118529
|
-
n.data =
|
|
118536
|
+
n.data = Ret(r, t, i), !n.colWidths && i !== e.colWidths.length && (n.colWidths = Let(e.colWidths, i));
|
|
118530
118537
|
}
|
|
118531
118538
|
if (t.colWidths) {
|
|
118532
118539
|
let r = Math.max(t.colWidths.length, n.data?.[0]?.length || e.data[0]?.length || 1);
|
|
118533
|
-
n.colWidths =
|
|
118540
|
+
n.colWidths = Let(t.colWidths, r);
|
|
118534
118541
|
}
|
|
118535
118542
|
return n;
|
|
118536
118543
|
}
|
|
118537
|
-
function
|
|
118544
|
+
function Vet(e, t) {
|
|
118538
118545
|
return J7(t, "theme"), t.shadow?.blur !== void 0 && K7(t.shadow.blur, "theme.shadow.blur"), $({
|
|
118539
118546
|
...e,
|
|
118540
118547
|
...t,
|
|
@@ -118550,30 +118557,30 @@ function Bet(e, t) {
|
|
|
118550
118557
|
}
|
|
118551
118558
|
//#endregion
|
|
118552
118559
|
//#region src/embed/agentic/templates.ts
|
|
118553
|
-
var
|
|
118560
|
+
var Het = [
|
|
118554
118561
|
"cover",
|
|
118555
118562
|
"contents",
|
|
118556
118563
|
"transition",
|
|
118557
118564
|
"content",
|
|
118558
118565
|
"end"
|
|
118559
|
-
],
|
|
118560
|
-
function Uet(e) {
|
|
118561
|
-
return e.replace(/<br\s*\/?>/gi, " ").replace(/<[^>]+>/g, " ").replace(/ /g, " ").replace(/\s+/g, " ").trim();
|
|
118562
|
-
}
|
|
118566
|
+
], Uet = /* @__PURE__ */ new Map();
|
|
118563
118567
|
function Wet(e) {
|
|
118564
|
-
|
|
118565
|
-
if (e.type === "shape" && e.text?.content) return Uet(e.text.content) || void 0;
|
|
118568
|
+
return e.replace(/<br\s*\/?>/gi, " ").replace(/<[^>]+>/g, " ").replace(/ /g, " ").replace(/\s+/g, " ").trim();
|
|
118566
118569
|
}
|
|
118567
118570
|
function Get(e) {
|
|
118568
|
-
|
|
118571
|
+
if (e.type === "text") return Wet(e.content) || void 0;
|
|
118572
|
+
if (e.type === "shape" && e.text?.content) return Wet(e.text.content) || void 0;
|
|
118573
|
+
}
|
|
118574
|
+
function Ket(e) {
|
|
118575
|
+
let t = e.elements.map(Get).filter((e) => !!e).slice(0, 3);
|
|
118569
118576
|
if (t.length) return t.join(" · ");
|
|
118570
118577
|
let n = e.type ?? "content", r = e.elements.some((e) => e.type === "image"), i = e.elements.some((e) => e.type === "chart"), a = [`${n} layout`, `${e.elements.length} elements`];
|
|
118571
118578
|
return r && a.push("includes image"), i && a.push("includes chart"), a.join(", ");
|
|
118572
118579
|
}
|
|
118573
|
-
function
|
|
118580
|
+
function qet(e, t) {
|
|
118574
118581
|
return `${e}_${t}`;
|
|
118575
118582
|
}
|
|
118576
|
-
function
|
|
118583
|
+
function Jet() {
|
|
118577
118584
|
return is().map((e) => ({
|
|
118578
118585
|
id: e.id,
|
|
118579
118586
|
name: e.name,
|
|
@@ -118581,17 +118588,17 @@ function qet() {
|
|
|
118581
118588
|
...e.origin ? { origin: e.origin } : {}
|
|
118582
118589
|
}));
|
|
118583
118590
|
}
|
|
118584
|
-
async function
|
|
118585
|
-
let t =
|
|
118591
|
+
async function Yet(e) {
|
|
118592
|
+
let t = Uet.get(e);
|
|
118586
118593
|
if (t) return t;
|
|
118587
118594
|
let n = pVe(e).then(async (t) => {
|
|
118588
118595
|
if (!t) throw Error(`Unknown template "${e}". Call templates.catalog for valid ids.`);
|
|
118589
118596
|
return bVe(t, $o());
|
|
118590
118597
|
});
|
|
118591
|
-
return
|
|
118598
|
+
return Uet.set(e, n), n;
|
|
118592
118599
|
}
|
|
118593
|
-
async function
|
|
118594
|
-
let t = await
|
|
118600
|
+
async function Xet(e) {
|
|
118601
|
+
let t = await Yet(e), n = Jet().find((t) => t.id === e)?.name ?? e, r = {
|
|
118595
118602
|
cover: 0,
|
|
118596
118603
|
contents: 0,
|
|
118597
118604
|
transition: 0,
|
|
@@ -118605,13 +118612,13 @@ async function Yet(e) {
|
|
|
118605
118612
|
end: []
|
|
118606
118613
|
};
|
|
118607
118614
|
for (let e of t.slides) {
|
|
118608
|
-
let t = e.type &&
|
|
118615
|
+
let t = e.type && Het.includes(e.type) ? e.type : "content";
|
|
118609
118616
|
r[t] += 1;
|
|
118610
|
-
let n =
|
|
118617
|
+
let n = qet(t, r[t]);
|
|
118611
118618
|
i[t].push({
|
|
118612
118619
|
slug: n,
|
|
118613
118620
|
type: t,
|
|
118614
|
-
description:
|
|
118621
|
+
description: Ket(e),
|
|
118615
118622
|
elementCount: e.elements.length
|
|
118616
118623
|
});
|
|
118617
118624
|
}
|
|
@@ -118622,7 +118629,7 @@ async function Yet(e) {
|
|
|
118622
118629
|
byType: i
|
|
118623
118630
|
};
|
|
118624
118631
|
}
|
|
118625
|
-
function
|
|
118632
|
+
function Zet(e, t) {
|
|
118626
118633
|
let n = {
|
|
118627
118634
|
cover: 0,
|
|
118628
118635
|
contents: 0,
|
|
@@ -118631,47 +118638,47 @@ function Xet(e, t) {
|
|
|
118631
118638
|
end: 0
|
|
118632
118639
|
};
|
|
118633
118640
|
for (let r of e.slides) {
|
|
118634
|
-
let e = r.type &&
|
|
118635
|
-
if (n[e] += 1,
|
|
118641
|
+
let e = r.type && Het.includes(r.type) ? r.type : "content";
|
|
118642
|
+
if (n[e] += 1, qet(e, n[e]) === t) return {
|
|
118636
118643
|
slide: structuredClone(r),
|
|
118637
118644
|
type: e
|
|
118638
118645
|
};
|
|
118639
118646
|
}
|
|
118640
118647
|
throw Error(`Slide slug "${t}" not found in template. Call templates.slidesCatalog for valid slugs.`);
|
|
118641
118648
|
}
|
|
118642
|
-
function
|
|
118649
|
+
function Qet(e) {
|
|
118643
118650
|
if (!dVe(e)) throw Error(`Unknown template "${e}". Use a built-in id from templates.catalog (template_1 … template_8).`);
|
|
118644
118651
|
}
|
|
118645
|
-
function
|
|
118652
|
+
function $et(e) {
|
|
118646
118653
|
return e.theme ? structuredClone(e.theme) : void 0;
|
|
118647
118654
|
}
|
|
118648
118655
|
//#endregion
|
|
118649
118656
|
//#region src/embed/agentic/layouts.ts
|
|
118650
118657
|
var u9 = Math.round;
|
|
118651
|
-
function $et(e) {
|
|
118652
|
-
return typeof e == "string" ? w1(e) : Array.isArray(e) ? e.some($et) : e && typeof e == "object" ? Object.values(e).some($et) : !1;
|
|
118653
|
-
}
|
|
118654
118658
|
function ett(e) {
|
|
118655
|
-
return Object.values(e).some(
|
|
118659
|
+
return typeof e == "string" ? w1(e) : Array.isArray(e) ? e.some(ett) : e && typeof e == "object" ? Object.values(e).some(ett) : !1;
|
|
118660
|
+
}
|
|
118661
|
+
function ttt(e) {
|
|
118662
|
+
return Object.values(e).some(ett);
|
|
118656
118663
|
}
|
|
118657
|
-
function
|
|
118664
|
+
function ntt(e, t) {
|
|
118658
118665
|
let n = t.bold ? `<strong>${ITe(e)}</strong>` : ITe(e);
|
|
118659
118666
|
return `<span style="font-size:${u9(t.size)}px;color:${t.color};font-family:${t.font}">${n}</span>`;
|
|
118660
118667
|
}
|
|
118661
|
-
function
|
|
118668
|
+
function rtt(e) {
|
|
118662
118669
|
return MTe(e).map((e) => e.trim()).filter(Boolean);
|
|
118663
118670
|
}
|
|
118664
|
-
function
|
|
118665
|
-
let n =
|
|
118671
|
+
function itt(e, t) {
|
|
118672
|
+
let n = rtt(e);
|
|
118666
118673
|
if (!n.length) return "";
|
|
118667
118674
|
let r = t.align ?? "left";
|
|
118668
|
-
return n.map((e) => `<p style="text-align:${r}">${
|
|
118675
|
+
return n.map((e) => `<p style="text-align:${r}">${ntt(e, t)}</p>`).join("");
|
|
118669
118676
|
}
|
|
118670
|
-
function
|
|
118677
|
+
function att(e, t, n = !1) {
|
|
118671
118678
|
let r = n ? "ol" : "ul";
|
|
118672
|
-
return `<${r}>${e.map((e) => `<li>${
|
|
118679
|
+
return `<${r}>${e.map((e) => `<li>${ntt(e, t)}</li>`).join("")}</${r}>`;
|
|
118673
118680
|
}
|
|
118674
|
-
function
|
|
118681
|
+
function ott(e) {
|
|
118675
118682
|
return Array.isArray(e) ? e.map((e) => String(e).trim()).filter(Boolean) : e == null ? [] : MTe(String(e)).map((e) => e.replace(/^\s*(?:[-*•]\s+|\d+[.)]\s+)/, "").trim()).filter(Boolean);
|
|
118676
118683
|
}
|
|
118677
118684
|
function d9(e, t, n) {
|
|
@@ -118683,8 +118690,8 @@ function f9(e, t) {
|
|
|
118683
118690
|
let n = e[t];
|
|
118684
118691
|
return n == null || String(n).trim() === "" ? void 0 : String(n);
|
|
118685
118692
|
}
|
|
118686
|
-
var
|
|
118687
|
-
function
|
|
118693
|
+
var stt = 10, ctt = 28, ltt = 6, utt = 4;
|
|
118694
|
+
function dtt(e, t, n, r) {
|
|
118688
118695
|
return lP(e.map((e) => ({
|
|
118689
118696
|
text: e,
|
|
118690
118697
|
size: t,
|
|
@@ -118697,11 +118704,11 @@ function utt(e, t, n, r) {
|
|
|
118697
118704
|
blockSpace: r.blockSpace
|
|
118698
118705
|
});
|
|
118699
118706
|
}
|
|
118700
|
-
function
|
|
118701
|
-
let t = Math.max(1, u9(e.maxSize)), n = Math.max(1, Math.min(t, u9(e.minSize ?? Math.min(t, 12)))), r = e.blocks.map((e) => e.trim()).filter(Boolean), i = e.width -
|
|
118707
|
+
function ftt(e) {
|
|
118708
|
+
let t = Math.max(1, u9(e.maxSize)), n = Math.max(1, Math.min(t, u9(e.minSize ?? Math.min(t, 12)))), r = e.blocks.map((e) => e.trim()).filter(Boolean), i = e.width - stt * 2 - (e.bulletIndent ?? 0), a = e.height - stt * 2;
|
|
118702
118709
|
if (!r.length || i <= 2 || a <= 2) return t;
|
|
118703
118710
|
try {
|
|
118704
|
-
let o = (t) =>
|
|
118711
|
+
let o = (t) => dtt(r, t, i, e) <= a;
|
|
118705
118712
|
if (o(t)) return t;
|
|
118706
118713
|
let s = n, c = t - 1, l = n;
|
|
118707
118714
|
for (; s <= c;) {
|
|
@@ -118714,7 +118721,7 @@ function dtt(e) {
|
|
|
118714
118721
|
}
|
|
118715
118722
|
}
|
|
118716
118723
|
function p9(e, t, n) {
|
|
118717
|
-
return Math.ceil(e * n) * t +
|
|
118724
|
+
return Math.ceil(e * n) * t + stt * 2;
|
|
118718
118725
|
}
|
|
118719
118726
|
function m9(e) {
|
|
118720
118727
|
let t = e.preset.palette;
|
|
@@ -118736,7 +118743,7 @@ function m9(e) {
|
|
|
118736
118743
|
onAccent: t.onAccent
|
|
118737
118744
|
};
|
|
118738
118745
|
}
|
|
118739
|
-
function
|
|
118746
|
+
function ptt(e) {
|
|
118740
118747
|
return {
|
|
118741
118748
|
type: "text",
|
|
118742
118749
|
left: u9(e.left),
|
|
@@ -118753,8 +118760,8 @@ function ftt(e) {
|
|
|
118753
118760
|
};
|
|
118754
118761
|
}
|
|
118755
118762
|
function h9(e, t, n) {
|
|
118756
|
-
let r =
|
|
118757
|
-
blocks:
|
|
118763
|
+
let r = ftt({
|
|
118764
|
+
blocks: rtt(t),
|
|
118758
118765
|
width: e.width,
|
|
118759
118766
|
height: e.height,
|
|
118760
118767
|
fontFamily: n.font,
|
|
@@ -118763,11 +118770,11 @@ function h9(e, t, n) {
|
|
|
118763
118770
|
lineHeight: n.lineHeight,
|
|
118764
118771
|
maxSize: n.maxSize,
|
|
118765
118772
|
minSize: n.minSize,
|
|
118766
|
-
blockSpace:
|
|
118773
|
+
blockSpace: ltt
|
|
118767
118774
|
});
|
|
118768
|
-
return
|
|
118775
|
+
return ptt({
|
|
118769
118776
|
...e,
|
|
118770
|
-
content:
|
|
118777
|
+
content: itt(t, {
|
|
118771
118778
|
size: r,
|
|
118772
118779
|
color: n.color,
|
|
118773
118780
|
font: n.font,
|
|
@@ -118780,8 +118787,8 @@ function h9(e, t, n) {
|
|
|
118780
118787
|
vAlign: n.vAlign
|
|
118781
118788
|
});
|
|
118782
118789
|
}
|
|
118783
|
-
function
|
|
118784
|
-
let r =
|
|
118790
|
+
function mtt(e, t, n) {
|
|
118791
|
+
let r = ftt({
|
|
118785
118792
|
blocks: t,
|
|
118786
118793
|
width: e.width,
|
|
118787
118794
|
height: e.height,
|
|
@@ -118789,12 +118796,12 @@ function ptt(e, t, n) {
|
|
|
118789
118796
|
lineHeight: n.lineHeight,
|
|
118790
118797
|
maxSize: n.maxSize,
|
|
118791
118798
|
minSize: n.minSize,
|
|
118792
|
-
bulletIndent:
|
|
118793
|
-
blockSpace:
|
|
118799
|
+
bulletIndent: ctt,
|
|
118800
|
+
blockSpace: utt
|
|
118794
118801
|
});
|
|
118795
|
-
return
|
|
118802
|
+
return ptt({
|
|
118796
118803
|
...e,
|
|
118797
|
-
content:
|
|
118804
|
+
content: att(t, {
|
|
118798
118805
|
size: r,
|
|
118799
118806
|
color: n.color,
|
|
118800
118807
|
font: n.font
|
|
@@ -118805,7 +118812,7 @@ function ptt(e, t, n) {
|
|
|
118805
118812
|
vAlign: n.vAlign
|
|
118806
118813
|
});
|
|
118807
118814
|
}
|
|
118808
|
-
var
|
|
118815
|
+
var htt = [200, 200], gtt = "M 0 0 L 200 0 L 200 200 L 0 200 Z";
|
|
118809
118816
|
function g9(e) {
|
|
118810
118817
|
return {
|
|
118811
118818
|
type: "shape",
|
|
@@ -118814,13 +118821,13 @@ function g9(e) {
|
|
|
118814
118821
|
width: u9(e.width),
|
|
118815
118822
|
height: u9(e.height),
|
|
118816
118823
|
rotate: 0,
|
|
118817
|
-
viewBox:
|
|
118818
|
-
path:
|
|
118824
|
+
viewBox: htt,
|
|
118825
|
+
path: gtt,
|
|
118819
118826
|
fixedRatio: !1,
|
|
118820
118827
|
fill: e.fill
|
|
118821
118828
|
};
|
|
118822
118829
|
}
|
|
118823
|
-
function
|
|
118830
|
+
function _tt(e) {
|
|
118824
118831
|
return {
|
|
118825
118832
|
type: "image",
|
|
118826
118833
|
left: u9(e.left),
|
|
@@ -118832,7 +118839,7 @@ function gtt(e) {
|
|
|
118832
118839
|
fixedRatio: !1
|
|
118833
118840
|
};
|
|
118834
118841
|
}
|
|
118835
|
-
function
|
|
118842
|
+
function vtt(e) {
|
|
118836
118843
|
let t = Math.max(11, u9(e.size * .44));
|
|
118837
118844
|
return {
|
|
118838
118845
|
...g9({
|
|
@@ -118948,11 +118955,11 @@ function v9(e, t, n, r) {
|
|
|
118948
118955
|
}
|
|
118949
118956
|
return s;
|
|
118950
118957
|
}
|
|
118951
|
-
function
|
|
118952
|
-
let { elements: n, contentTop: r } = _9(e, t, "bullets"), i = m9(e), a = e.preset.scale, o =
|
|
118958
|
+
function ytt(e, t) {
|
|
118959
|
+
let { elements: n, contentTop: r } = _9(e, t, "bullets"), i = m9(e), a = e.preset.scale, o = ott(t.bullets);
|
|
118953
118960
|
if (!o.length) throw Error("Layout \"bullets\" requires a non-empty \"bullets\" slot (array or newline-separated string).");
|
|
118954
118961
|
let s = t.ordered === !0;
|
|
118955
|
-
return n.push(
|
|
118962
|
+
return n.push(mtt({
|
|
118956
118963
|
left: e.m,
|
|
118957
118964
|
top: r,
|
|
118958
118965
|
width: e.cw,
|
|
@@ -118966,7 +118973,7 @@ function vtt(e, t) {
|
|
|
118966
118973
|
ordered: s
|
|
118967
118974
|
})), n;
|
|
118968
118975
|
}
|
|
118969
|
-
function
|
|
118976
|
+
function btt(e, t, n, r, i, a, o) {
|
|
118970
118977
|
let s = m9(e), c = e.preset.scale, l = e.preset.fonts, u = [], d = i, f = f9(t, `${n}Heading`);
|
|
118971
118978
|
if (f) {
|
|
118972
118979
|
let e = p9(c.sectionHeader, 2, 1.2);
|
|
@@ -118984,8 +118991,8 @@ function ytt(e, t, n, r, i, a, o) {
|
|
|
118984
118991
|
minSize: 18
|
|
118985
118992
|
})), d += e;
|
|
118986
118993
|
}
|
|
118987
|
-
let p =
|
|
118988
|
-
return p.length ? u.push(
|
|
118994
|
+
let p = ott(t[`${n}Bullets`]), m = f9(t, `${n}Body`), h = i + o - d;
|
|
118995
|
+
return p.length ? u.push(mtt({
|
|
118989
118996
|
left: r,
|
|
118990
118997
|
top: d,
|
|
118991
118998
|
width: a,
|
|
@@ -119009,14 +119016,14 @@ function ytt(e, t, n, r, i, a, o) {
|
|
|
119009
119016
|
minSize: 13
|
|
119010
119017
|
})), u;
|
|
119011
119018
|
}
|
|
119012
|
-
function
|
|
119019
|
+
function xtt(e, t) {
|
|
119013
119020
|
let { elements: n, contentTop: r } = _9(e, t, "twoColumn"), i = u9(e.W * .04), a = u9((e.cw - i) / 2), o = e.H - e.m - r;
|
|
119014
|
-
return n.push(...
|
|
119021
|
+
return n.push(...btt(e, t, "left", e.m, r, a, o)), n.push(...btt(e, t, "right", e.m + a + i, r, a, o)), n;
|
|
119015
119022
|
}
|
|
119016
|
-
function
|
|
119023
|
+
function Stt(e, t, n) {
|
|
119017
119024
|
let { elements: r, contentTop: i } = _9(e, t, "imageText"), a = m9(e), o = e.preset.scale, s = e.preset.fonts, c = u9(e.W * .04), l = e.H - e.m - i, u = f9(t, "image") ?? f9(t, "imageSrc") ?? f9(t, "src"), d = f9(t, "imageSide") === "left" ? "left" : "right", f = (e, n, c) => {
|
|
119018
|
-
let l =
|
|
119019
|
-
l.length ? r.push(
|
|
119025
|
+
let l = ott(t.bullets), u = f9(t, "body");
|
|
119026
|
+
l.length ? r.push(mtt({
|
|
119020
119027
|
left: e,
|
|
119021
119028
|
top: i,
|
|
119022
119029
|
width: n,
|
|
@@ -119042,7 +119049,7 @@ function xtt(e, t, n) {
|
|
|
119042
119049
|
};
|
|
119043
119050
|
if (!u) return n.push("Layout \"imageText\" has no \"image\" src — rendering text full width. Add an image url to use the split layout."), f(e.m, e.cw, l), r;
|
|
119044
119051
|
let p = u9(e.cw * .44), m = e.cw - p - c, h = f9(t, "caption"), g = h ? u9(o.caption * 2) : 0, _ = l - g - (h ? 8 : 0), v = d === "left" ? e.m : e.m + m + c, y = d === "left" ? e.m + p + c : e.m;
|
|
119045
|
-
return r.push(
|
|
119052
|
+
return r.push(_tt({
|
|
119046
119053
|
left: v,
|
|
119047
119054
|
top: i,
|
|
119048
119055
|
width: p,
|
|
@@ -119061,7 +119068,7 @@ function xtt(e, t, n) {
|
|
|
119061
119068
|
minSize: 10
|
|
119062
119069
|
})), f(y, m, l), r;
|
|
119063
119070
|
}
|
|
119064
|
-
function
|
|
119071
|
+
function Ctt(e) {
|
|
119065
119072
|
if (Array.isArray(e.stats)) return e.stats.map((e) => {
|
|
119066
119073
|
let t = e ?? {}, n = t.value ?? t.stat ?? t.number;
|
|
119067
119074
|
return {
|
|
@@ -119075,8 +119082,8 @@ function Stt(e) {
|
|
|
119075
119082
|
label: f9(e, "statLabel") ?? f9(e, "label")
|
|
119076
119083
|
}] : [];
|
|
119077
119084
|
}
|
|
119078
|
-
function
|
|
119079
|
-
let n =
|
|
119085
|
+
function wtt(e, t) {
|
|
119086
|
+
let n = Ctt(t);
|
|
119080
119087
|
if (!n.length) throw Error("Layout \"bigStat\" requires a \"stat\" string or a \"stats\" array of { value, label }.");
|
|
119081
119088
|
let r = m9(e), i = e.preset.scale, a = e.preset.fonts, o = [], s = e.m, c = f9(t, "title");
|
|
119082
119089
|
if (c) {
|
|
@@ -119128,7 +119135,7 @@ function Ctt(e, t) {
|
|
|
119128
119135
|
minSize: 10
|
|
119129
119136
|
})), o;
|
|
119130
119137
|
}
|
|
119131
|
-
function
|
|
119138
|
+
function Ttt(e, t) {
|
|
119132
119139
|
let n = d9(t, "quote", "quote"), r = m9(e), i = e.preset.scale, a = e.preset.fonts, o = [], s = u9(i.sectionHeader * 1.15), c = u9(e.cw * .82), l = e.m + u9((e.cw - c) / 2), u = u9(e.H * .26), d = u9(i.sectionHeader * 4.5);
|
|
119133
119140
|
o.push(g9({
|
|
119134
119141
|
left: l,
|
|
@@ -119162,7 +119169,7 @@ function wtt(e, t) {
|
|
|
119162
119169
|
minSize: 13
|
|
119163
119170
|
})), o;
|
|
119164
119171
|
}
|
|
119165
|
-
var
|
|
119172
|
+
var Ett = {
|
|
119166
119173
|
bar: "bar",
|
|
119167
119174
|
column: "column",
|
|
119168
119175
|
line: "line",
|
|
@@ -119173,14 +119180,14 @@ var Ttt = {
|
|
|
119173
119180
|
radar: "radar",
|
|
119174
119181
|
scatter: "scatter"
|
|
119175
119182
|
};
|
|
119176
|
-
function
|
|
119183
|
+
function Dtt(e, t) {
|
|
119177
119184
|
let { elements: n, contentTop: r } = _9(e, t, "chart"), i = m9(e), a = e.preset.scale, o = e.preset.fonts, s = Array.isArray(t.labels) ? t.labels.map(String) : [];
|
|
119178
119185
|
if (!s.length) throw Error("Layout \"chart\" requires a non-empty \"labels\" array.");
|
|
119179
119186
|
let c = t.series, l;
|
|
119180
119187
|
if (Array.isArray(c) && c.length && Array.isArray(c[0])) l = c.map((e) => e.map((e) => Number(e) || 0));
|
|
119181
119188
|
else if (Array.isArray(c)) l = [c.map((e) => Number(e) || 0)];
|
|
119182
119189
|
else throw Error("Layout \"chart\" requires a \"series\" array of numbers (or array of number arrays for multi-series).");
|
|
119183
|
-
let u = Array.isArray(t.legends) && t.legends.length ? t.legends.map(String) : l.map((e, t) => `Series ${t + 1}`), d =
|
|
119190
|
+
let u = Array.isArray(t.legends) && t.legends.length ? t.legends.map(String) : l.map((e, t) => `Series ${t + 1}`), d = Ett[String(t.chartType ?? "column").toLowerCase()] ?? "column", f = f9(t, "caption"), p = f ? u9(a.caption * 2.2) : 0, m = e.H - e.m - r - p - (f ? 8 : 0), h = {
|
|
119184
119191
|
labels: s,
|
|
119185
119192
|
legends: u,
|
|
119186
119193
|
series: l
|
|
@@ -119209,7 +119216,7 @@ function Ett(e, t) {
|
|
|
119209
119216
|
minSize: 10
|
|
119210
119217
|
})), n;
|
|
119211
119218
|
}
|
|
119212
|
-
function
|
|
119219
|
+
function Ott(e, t) {
|
|
119213
119220
|
let { elements: n, contentTop: r } = _9(e, t, "comparison"), i = m9(e), a = e.preset.scale, o = e.preset.fonts, s = Array.isArray(t.headers) ? t.headers.map(String) : [], c = Array.isArray(t.rows) ? t.rows.map((e) => Array.isArray(e) ? e.map(String) : [String(e)]) : [];
|
|
119214
119221
|
if (!c.length) throw Error("Layout \"comparison\" requires a non-empty \"rows\" array of row arrays.");
|
|
119215
119222
|
let l = Math.max(s.length, ...c.map((e) => e.length), 1), u = {
|
|
@@ -119246,7 +119253,7 @@ function Dtt(e, t) {
|
|
|
119246
119253
|
colWidths: Array(l).fill(1 / l)
|
|
119247
119254
|
}), n;
|
|
119248
119255
|
}
|
|
119249
|
-
function
|
|
119256
|
+
function ktt(e) {
|
|
119250
119257
|
return Array.isArray(e) ? e.map((e) => {
|
|
119251
119258
|
if (e == null) return null;
|
|
119252
119259
|
if (typeof e == "string") {
|
|
@@ -119260,8 +119267,8 @@ function Ott(e) {
|
|
|
119260
119267
|
};
|
|
119261
119268
|
}).filter((e) => e != null) : [];
|
|
119262
119269
|
}
|
|
119263
|
-
function
|
|
119264
|
-
let { elements: n, contentTop: r } = _9(e, t, "cards"), i =
|
|
119270
|
+
function Att(e, t) {
|
|
119271
|
+
let { elements: n, contentTop: r } = _9(e, t, "cards"), i = ktt(t.cards ?? t.items ?? t.columns);
|
|
119265
119272
|
if (!i.length) throw Error("Layout \"cards\" requires a non-empty \"cards\" array of { heading, body } (or strings).");
|
|
119266
119273
|
let a = m9(e), o = e.preset.scale, s = e.preset.fonts, c = e.preset.palette, l = Math.min(i.length, 6), u = i.slice(0, l), d = l <= 3 ? l : Math.ceil(l / 2), f = Math.ceil(l / d), p = u9(e.W * .025), m = e.H - e.m - r, h = u9((e.cw - p * (d - 1)) / d), g = u9((m - p * (f - 1)) / f), _ = Math.max(12, u9(Math.min(h, g) * .1));
|
|
119267
119274
|
return u.forEach((t, i) => {
|
|
@@ -119310,13 +119317,13 @@ function ktt(e, t) {
|
|
|
119310
119317
|
}));
|
|
119311
119318
|
}), n;
|
|
119312
119319
|
}
|
|
119313
|
-
function
|
|
119314
|
-
let { elements: n, contentTop: r } = _9(e, t, "numbered"), i =
|
|
119320
|
+
function jtt(e, t) {
|
|
119321
|
+
let { elements: n, contentTop: r } = _9(e, t, "numbered"), i = ktt(t.steps ?? t.items ?? t.bullets);
|
|
119315
119322
|
if (!i.length) throw Error("Layout \"numbered\" requires a non-empty \"steps\" array of { heading, body } (or strings).");
|
|
119316
119323
|
let a = m9(e), o = e.preset.scale, s = e.preset.fonts, c = Math.min(i.length, 6), l = i.slice(0, c), u = e.H - e.m - r, d = u9(u * .035), f = u9((u - d * (c - 1)) / c), p = Math.min(f, u9(o.title * 1.3)), m = e.m + p + u9(e.W * .022), h = e.m + e.cw - m;
|
|
119317
119324
|
return l.forEach((t, i) => {
|
|
119318
119325
|
let c = r + i * (f + d);
|
|
119319
|
-
n.push(
|
|
119326
|
+
n.push(vtt({
|
|
119320
119327
|
left: e.m,
|
|
119321
119328
|
top: c,
|
|
119322
119329
|
size: p,
|
|
@@ -119356,11 +119363,11 @@ function Att(e, t) {
|
|
|
119356
119363
|
}));
|
|
119357
119364
|
}), n;
|
|
119358
119365
|
}
|
|
119359
|
-
function
|
|
119366
|
+
function Mtt(e, t, n) {
|
|
119360
119367
|
let r = f9(t, "image") ?? f9(t, "imageSrc") ?? f9(t, "src");
|
|
119361
119368
|
if (!r) return n.push("Layout \"imageFull\" has no \"image\" src — falling back to a text-only feature slide. Add an image url for the full-bleed cover."), v9(e, t, "section", u9(e.preset.scale.display * .86));
|
|
119362
119369
|
let i = e.preset.scale, a = e.preset.fonts, o = e.preset.palette, s = [];
|
|
119363
|
-
s.push(
|
|
119370
|
+
s.push(_tt({
|
|
119364
119371
|
left: 0,
|
|
119365
119372
|
top: 0,
|
|
119366
119373
|
width: e.W,
|
|
@@ -119407,21 +119414,21 @@ function jtt(e, t, n) {
|
|
|
119407
119414
|
minSize: 12
|
|
119408
119415
|
})), s;
|
|
119409
119416
|
}
|
|
119410
|
-
var
|
|
119417
|
+
var Ntt = {
|
|
119411
119418
|
title: (e, t) => v9(e, t, "title", e.preset.scale.display),
|
|
119412
119419
|
section: (e, t) => v9(e, t, "section", u9(e.preset.scale.display * .86)),
|
|
119413
119420
|
closing: (e, t) => v9(e, t, "closing", u9(e.preset.scale.display * .9)),
|
|
119414
|
-
bullets:
|
|
119415
|
-
twoColumn:
|
|
119416
|
-
imageText:
|
|
119417
|
-
bigStat:
|
|
119418
|
-
quote:
|
|
119419
|
-
chart:
|
|
119420
|
-
comparison:
|
|
119421
|
-
cards:
|
|
119422
|
-
numbered:
|
|
119423
|
-
imageFull:
|
|
119424
|
-
},
|
|
119421
|
+
bullets: ytt,
|
|
119422
|
+
twoColumn: xtt,
|
|
119423
|
+
imageText: Stt,
|
|
119424
|
+
bigStat: wtt,
|
|
119425
|
+
quote: Ttt,
|
|
119426
|
+
chart: Dtt,
|
|
119427
|
+
comparison: Ott,
|
|
119428
|
+
cards: Att,
|
|
119429
|
+
numbered: jtt,
|
|
119430
|
+
imageFull: Mtt
|
|
119431
|
+
}, Ptt = [
|
|
119425
119432
|
{
|
|
119426
119433
|
id: "title",
|
|
119427
119434
|
label: "Title",
|
|
@@ -119842,18 +119849,18 @@ var Mtt = {
|
|
|
119842
119849
|
}
|
|
119843
119850
|
]
|
|
119844
119851
|
}
|
|
119845
|
-
],
|
|
119846
|
-
function
|
|
119847
|
-
return
|
|
119852
|
+
], Ftt = new Map(Ptt.map((e) => [e.id, e]));
|
|
119853
|
+
function Itt() {
|
|
119854
|
+
return Ptt.map((e) => ({
|
|
119848
119855
|
...e,
|
|
119849
119856
|
slots: e.slots.map((e) => ({ ...e }))
|
|
119850
119857
|
}));
|
|
119851
119858
|
}
|
|
119852
|
-
async function
|
|
119853
|
-
let a =
|
|
119859
|
+
async function Ltt(e, t, n, r, i = "auto") {
|
|
119860
|
+
let a = Ftt.get(e);
|
|
119854
119861
|
if (!a) throw Error(`Unknown layout "${e}". Call layouts.catalog to list available layouts.`);
|
|
119855
|
-
|
|
119856
|
-
let o =
|
|
119862
|
+
ttt(t) && await PTe();
|
|
119863
|
+
let o = Ntt[e], s = r.width, c = r.height, l = u9(s * .06), u = i === "feature" ? !0 : i === "plain" ? !1 : a.feature, d = {
|
|
119857
119864
|
W: s,
|
|
119858
119865
|
H: c,
|
|
119859
119866
|
m: l,
|
|
@@ -119872,7 +119879,7 @@ async function Itt(e, t, n, r, i = "auto") {
|
|
|
119872
119879
|
warnings: f
|
|
119873
119880
|
};
|
|
119874
119881
|
}
|
|
119875
|
-
var
|
|
119882
|
+
var Rtt = [
|
|
119876
119883
|
{
|
|
119877
119884
|
id: "academic",
|
|
119878
119885
|
label: "Academic",
|
|
@@ -120037,15 +120044,15 @@ var Ltt = [
|
|
|
120037
120044
|
"#7FB069"
|
|
120038
120045
|
]
|
|
120039
120046
|
}
|
|
120040
|
-
],
|
|
120041
|
-
function ztt(e) {
|
|
120042
|
-
if (e) return Rtt.get(e);
|
|
120043
|
-
}
|
|
120047
|
+
], ztt = new Map(Rtt.map((e) => [e.id, e]));
|
|
120044
120048
|
function Btt(e) {
|
|
120045
|
-
|
|
120049
|
+
if (e) return ztt.get(e);
|
|
120050
|
+
}
|
|
120051
|
+
function Vtt(e) {
|
|
120052
|
+
return Btt(e) ?? ztt.get("academic");
|
|
120046
120053
|
}
|
|
120047
|
-
function
|
|
120048
|
-
return
|
|
120054
|
+
function Htt() {
|
|
120055
|
+
return Rtt.map((e) => ({
|
|
120049
120056
|
id: e.id,
|
|
120050
120057
|
label: e.label,
|
|
120051
120058
|
description: e.description,
|
|
@@ -120059,7 +120066,7 @@ function Vtt() {
|
|
|
120059
120066
|
}
|
|
120060
120067
|
}));
|
|
120061
120068
|
}
|
|
120062
|
-
function
|
|
120069
|
+
function Utt(e) {
|
|
120063
120070
|
return {
|
|
120064
120071
|
backgroundColor: e.palette.background,
|
|
120065
120072
|
themeColors: [...e.chartColors],
|
|
@@ -120416,20 +120423,20 @@ var y9 = {
|
|
|
120416
120423
|
}
|
|
120417
120424
|
]
|
|
120418
120425
|
};
|
|
120419
|
-
function
|
|
120426
|
+
function Wtt(e) {
|
|
120420
120427
|
return JSON.parse(JSON.stringify(e));
|
|
120421
120428
|
}
|
|
120422
|
-
function
|
|
120429
|
+
function Gtt(e, t) {
|
|
120423
120430
|
let n = y9.commands[t], r = e.has(t);
|
|
120424
120431
|
return !n && !r ? null : {
|
|
120425
120432
|
name: t,
|
|
120426
120433
|
domain: t.includes(".") ? t.split(".")[0] : t,
|
|
120427
120434
|
registered: r,
|
|
120428
120435
|
mutates: e.get(t)?.mutates ?? !1,
|
|
120429
|
-
...n ?
|
|
120436
|
+
...n ? Wtt(n) : {}
|
|
120430
120437
|
};
|
|
120431
120438
|
}
|
|
120432
|
-
function
|
|
120439
|
+
function Ktt(e) {
|
|
120433
120440
|
let t = /* @__PURE__ */ new Map(), n = (e) => {
|
|
120434
120441
|
if (!e.includes(".")) return;
|
|
120435
120442
|
let n = e.split(".")[0];
|
|
@@ -120454,7 +120461,7 @@ function Gtt(e) {
|
|
|
120454
120461
|
}
|
|
120455
120462
|
//#endregion
|
|
120456
120463
|
//#region src/embed/agentic/createAgenticApi.ts
|
|
120457
|
-
var
|
|
120464
|
+
var qtt = new Set([
|
|
120458
120465
|
"text",
|
|
120459
120466
|
"image",
|
|
120460
120467
|
"shape",
|
|
@@ -120464,18 +120471,18 @@ var Ktt = new Set([
|
|
|
120464
120471
|
"latex",
|
|
120465
120472
|
"video",
|
|
120466
120473
|
"audio"
|
|
120467
|
-
]),
|
|
120474
|
+
]), Jtt = [
|
|
120468
120475
|
"text",
|
|
120469
120476
|
"image",
|
|
120470
120477
|
"shape",
|
|
120471
120478
|
"chart",
|
|
120472
120479
|
"table"
|
|
120473
|
-
],
|
|
120480
|
+
], Ytt = [
|
|
120474
120481
|
"text",
|
|
120475
120482
|
"image",
|
|
120476
120483
|
"shape",
|
|
120477
120484
|
"line"
|
|
120478
|
-
],
|
|
120485
|
+
], Xtt = [
|
|
120479
120486
|
"text",
|
|
120480
120487
|
"shape",
|
|
120481
120488
|
"chart"
|
|
@@ -120484,10 +120491,10 @@ var Ktt = new Set([
|
|
|
120484
120491
|
super(t), zT(this, "code", void 0), zT(this, "path", void 0), zT(this, "recoverable", void 0), this.code = e, this.path = n, this.recoverable = r, this.name = e;
|
|
120485
120492
|
}
|
|
120486
120493
|
};
|
|
120487
|
-
function
|
|
120494
|
+
function Ztt(e) {
|
|
120488
120495
|
return e instanceof b9 ? e9(e.code, e.message, e.path, e.recoverable) : e9(e instanceof Error && e.name || "CommandError", e instanceof Error ? e.message : String(e));
|
|
120489
120496
|
}
|
|
120490
|
-
function
|
|
120497
|
+
function Qtt(e) {
|
|
120491
120498
|
return {
|
|
120492
120499
|
slides: ss(e),
|
|
120493
120500
|
main: ls(e),
|
|
@@ -120495,16 +120502,16 @@ function Ztt(e) {
|
|
|
120495
120502
|
screen: Os(e)
|
|
120496
120503
|
};
|
|
120497
120504
|
}
|
|
120498
|
-
function
|
|
120505
|
+
function $tt(e) {
|
|
120499
120506
|
return {
|
|
120500
120507
|
size: e.slides.viewportSize,
|
|
120501
120508
|
ratio: e.slides.viewportRatio
|
|
120502
120509
|
};
|
|
120503
120510
|
}
|
|
120504
120511
|
function x9(e, t) {
|
|
120505
|
-
return t ?
|
|
120512
|
+
return t ? Vet(e, t) : $(e);
|
|
120506
120513
|
}
|
|
120507
|
-
var
|
|
120514
|
+
var ent = 6;
|
|
120508
120515
|
function S9(e, t, n) {
|
|
120509
120516
|
let r = t?.trim(), i = r?.toLowerCase();
|
|
120510
120517
|
!r || i === "#00000000" || i === "transparent" || (e[r] = (e[r] || 0) + Math.max(n, 1));
|
|
@@ -120512,27 +120519,27 @@ function S9(e, t, n) {
|
|
|
120512
120519
|
function C9(e) {
|
|
120513
120520
|
return Object.keys(e).sort((t, n) => e[n] - e[t]);
|
|
120514
120521
|
}
|
|
120515
|
-
function
|
|
120522
|
+
function tnt(e) {
|
|
120516
120523
|
let t = Number.isFinite(e.width) ? e.width : 1, n = "height" in e && Number.isFinite(e.height) ? e.height : 1;
|
|
120517
120524
|
return Math.max(t * n, 1);
|
|
120518
120525
|
}
|
|
120519
|
-
function
|
|
120526
|
+
function nnt(e, t) {
|
|
120520
120527
|
if (!e) return [];
|
|
120521
120528
|
let n = [], r = RegExp(`${t}\\s*:\\s*([^;"']+)`, "gi"), i = r.exec(e);
|
|
120522
120529
|
for (; i;) n.push(i[1].trim().replace(/^['"]|['"]$/g, "")), i = r.exec(e);
|
|
120523
120530
|
return n;
|
|
120524
120531
|
}
|
|
120525
|
-
function
|
|
120532
|
+
function rnt(e, t, n, r, i, a) {
|
|
120526
120533
|
S9(i, t, r), S9(a, n, r);
|
|
120527
|
-
for (let t of
|
|
120528
|
-
for (let t of
|
|
120534
|
+
for (let t of nnt(e, "color")) S9(i, t, r);
|
|
120535
|
+
for (let t of nnt(e, "font-family")) S9(a, t, r);
|
|
120529
120536
|
}
|
|
120530
|
-
function
|
|
120531
|
-
let i =
|
|
120537
|
+
function int(e, t, n, r) {
|
|
120538
|
+
let i = tnt(e);
|
|
120532
120539
|
if (e.type === "shape") {
|
|
120533
120540
|
if (S9(t, e.fill, i), e.gradient) for (let n of e.gradient.colors) S9(t, n.color, i / Math.max(e.gradient.colors.length, 1));
|
|
120534
|
-
|
|
120535
|
-
} else if (e.type === "text") S9(t, e.fill, i),
|
|
120541
|
+
rnt(e.text?.content, e.text?.defaultColor, e.text?.defaultFontName, i, n, r);
|
|
120542
|
+
} else if (e.type === "text") S9(t, e.fill, i), rnt(e.content, e.defaultColor, e.defaultFontName, i, n, r);
|
|
120536
120543
|
else if (e.type === "image") S9(t, e.colorMask, i);
|
|
120537
120544
|
else if (e.type === "table") {
|
|
120538
120545
|
S9(t, e.theme?.color, i);
|
|
@@ -120543,17 +120550,17 @@ function rnt(e, t, n, r) {
|
|
|
120543
120550
|
S9(n, e.textColor, i);
|
|
120544
120551
|
} else e.type === "line" || e.type === "audio" ? S9(t, e.color, i) : e.type === "latex" && S9(n, e.color, i);
|
|
120545
120552
|
}
|
|
120546
|
-
function
|
|
120553
|
+
function ant(e, t = {}) {
|
|
120547
120554
|
let n = t.slideIds?.length ? t.slideIds.map((t) => a9(e.slides.slides, t, e.slides.slideIndex).slide) : e.slides.slides, r = {}, i = {}, a = {}, o = {};
|
|
120548
120555
|
for (let e of n) {
|
|
120549
120556
|
if (e.background?.type === "solid") S9(r, e.background.color, 1);
|
|
120550
120557
|
else if (e.background?.type === "gradient" && e.background.gradient) for (let t of e.background.gradient.colors) S9(r, t.color, 1 / Math.max(e.background.gradient.colors.length, 1));
|
|
120551
|
-
for (let t of e.elements)
|
|
120558
|
+
for (let t of e.elements) int(t, i, a, o);
|
|
120552
120559
|
}
|
|
120553
|
-
let s = Math.max(1, Math.trunc(t.maxThemeColors ||
|
|
120560
|
+
let s = Math.max(1, Math.trunc(t.maxThemeColors || ent)), c = $(e.slides.theme), [l] = C9(r), u = C9(i).slice(0, s), [d] = C9(a), [f] = C9(o);
|
|
120554
120561
|
return l && (c.backgroundColor = l), u.length && (c.themeColors = u), d && (c.fontColor = d), f && (c.fontName = f), $(c);
|
|
120555
120562
|
}
|
|
120556
|
-
function
|
|
120563
|
+
function ont(e, t) {
|
|
120557
120564
|
t && (t.size !== void 0 && e.slides.setViewportSize(t.size), t.ratio !== void 0 && e.slides.setViewportRatio(t.ratio));
|
|
120558
120565
|
}
|
|
120559
120566
|
function w9(e) {
|
|
@@ -120561,13 +120568,13 @@ function w9(e) {
|
|
|
120561
120568
|
title: e.slides.title,
|
|
120562
120569
|
slides: $(e.slides.slides),
|
|
120563
120570
|
theme: $(e.slides.theme),
|
|
120564
|
-
viewport:
|
|
120571
|
+
viewport: $tt(e),
|
|
120565
120572
|
templates: $(e.slides.templates)
|
|
120566
120573
|
};
|
|
120567
120574
|
}
|
|
120568
|
-
function
|
|
120575
|
+
function snt(e, t, n = 0) {
|
|
120569
120576
|
let r = $(t);
|
|
120570
|
-
e.slides.setTitle(r.title), e.slides.setSlides($(r.slides), x9(e.slides.theme, r.theme)),
|
|
120577
|
+
e.slides.setTitle(r.title), e.slides.setSlides($(r.slides), x9(e.slides.theme, r.theme)), ont(e, r.viewport), r.templates && e.slides.setTemplates($(r.templates)), e.slides.updateSlideIndex(r9(n, e.slides.slides.length)), e.main.setActiveElementIdList([]), e.main.setActiveGroupElementId("");
|
|
120571
120578
|
}
|
|
120572
120579
|
function T9(e) {
|
|
120573
120580
|
return {
|
|
@@ -120586,9 +120593,9 @@ function T9(e) {
|
|
|
120586
120593
|
};
|
|
120587
120594
|
}
|
|
120588
120595
|
function E9(e, t) {
|
|
120589
|
-
|
|
120596
|
+
snt(e, t.document, t.slideIndex), e.main.updateSelectedSlidesIndex([...t.selectedSlidesIndex]), e.main.setActiveElementIdList([...t.activeElementIdList]), e.main.setHandleElementId(t.handleElementId), e.main.setActiveGroupElementId(t.activeGroupElementId), e.main.setHiddenElementIdList([...t.hiddenElementIdList]), e.main.setCanvasScale(t.canvasScale), e.main.setCanvasPercentage(t.canvasPercentage), e.screen.setScreening(t.screening), e.snapshot.setSnapshotCursor(t.snapshotCursor), e.snapshot.setSnapshotLength(t.snapshotLength);
|
|
120590
120597
|
}
|
|
120591
|
-
function
|
|
120598
|
+
function cnt(e) {
|
|
120592
120599
|
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
120593
120600
|
}
|
|
120594
120601
|
function D9(e, t) {
|
|
@@ -120600,8 +120607,8 @@ function D9(e, t) {
|
|
|
120600
120607
|
throw new b9("InvalidDocument", "Document payload must be JSON-serializable", t);
|
|
120601
120608
|
}
|
|
120602
120609
|
}
|
|
120603
|
-
function
|
|
120604
|
-
return
|
|
120610
|
+
function lnt(e) {
|
|
120611
|
+
return cnt(e) && Object.prototype.hasOwnProperty.call(e, "document") ? {
|
|
120605
120612
|
document: e.document,
|
|
120606
120613
|
path: "payload.document"
|
|
120607
120614
|
} : {
|
|
@@ -120610,12 +120617,12 @@ function cnt(e) {
|
|
|
120610
120617
|
};
|
|
120611
120618
|
}
|
|
120612
120619
|
function O9(e, t) {
|
|
120613
|
-
if (!
|
|
120620
|
+
if (!cnt(e)) throw new b9("InvalidDocument", "Document payload must be an object", t);
|
|
120614
120621
|
return e;
|
|
120615
120622
|
}
|
|
120616
120623
|
function k9(e, t) {
|
|
120617
120624
|
if (e !== void 0) {
|
|
120618
|
-
if (!
|
|
120625
|
+
if (!cnt(e)) throw new b9("InvalidDocument", "Expected an object", t);
|
|
120619
120626
|
return e;
|
|
120620
120627
|
}
|
|
120621
120628
|
}
|
|
@@ -120625,21 +120632,21 @@ function A9(e, t) {
|
|
|
120625
120632
|
return e;
|
|
120626
120633
|
}
|
|
120627
120634
|
}
|
|
120628
|
-
function
|
|
120635
|
+
function unt(e, t) {
|
|
120629
120636
|
let n = O9(e, t);
|
|
120630
120637
|
if (n.id !== void 0 && typeof n.id != "string") throw new b9("InvalidDocument", "Element id must be a string when provided", `${t}.id`);
|
|
120631
|
-
if (typeof n.type != "string" || !
|
|
120638
|
+
if (typeof n.type != "string" || !qtt.has(n.type)) throw new b9("InvalidDocument", "Element type must be a supported string", `${t}.type`);
|
|
120632
120639
|
return c9(n);
|
|
120633
120640
|
}
|
|
120634
|
-
function
|
|
120641
|
+
function dnt(e, t) {
|
|
120635
120642
|
if (!Array.isArray(e)) throw new b9("InvalidDocument", "Document slides must be an array", t);
|
|
120636
120643
|
return e.map((e, n) => {
|
|
120637
120644
|
let r = `${t}[${n}]`, i = O9(e, r);
|
|
120638
120645
|
if (i.id !== void 0 && typeof i.id != "string") throw new b9("InvalidDocument", "Slide id must be a string when provided", `${r}.id`);
|
|
120639
120646
|
if (i.remark !== void 0 && typeof i.remark != "string") throw new b9("InvalidDocument", "Slide remark must be a string when provided", `${r}.remark`);
|
|
120640
120647
|
k9(i.background, `${r}.background`), k9(i.sectionTag, `${r}.sectionTag`), A9(i.notes, `${r}.notes`), A9(i.animations, `${r}.animations`);
|
|
120641
|
-
let a = (A9(i.elements, `${r}.elements`) || []).map((e, t) =>
|
|
120642
|
-
return
|
|
120648
|
+
let a = (A9(i.elements, `${r}.elements`) || []).map((e, t) => unt(e, `${r}.elements[${t}]`));
|
|
120649
|
+
return uet({
|
|
120643
120650
|
...i,
|
|
120644
120651
|
elements: a
|
|
120645
120652
|
});
|
|
@@ -120649,7 +120656,7 @@ function j9(e, t) {
|
|
|
120649
120656
|
let n = k9(e, t);
|
|
120650
120657
|
return n ? $(n) : void 0;
|
|
120651
120658
|
}
|
|
120652
|
-
function
|
|
120659
|
+
function fnt(e, t) {
|
|
120653
120660
|
let n = k9(e, t);
|
|
120654
120661
|
if (!n) return;
|
|
120655
120662
|
let r = {};
|
|
@@ -120663,7 +120670,7 @@ function dnt(e, t) {
|
|
|
120663
120670
|
}
|
|
120664
120671
|
return r;
|
|
120665
120672
|
}
|
|
120666
|
-
function
|
|
120673
|
+
function pnt(e, t) {
|
|
120667
120674
|
let n = A9(e, t);
|
|
120668
120675
|
if (n) return n.map((e, n) => {
|
|
120669
120676
|
let r = `${t}[${n}]`, i = O9(e, r);
|
|
@@ -120679,10 +120686,10 @@ function fnt(e, t) {
|
|
|
120679
120686
|
};
|
|
120680
120687
|
});
|
|
120681
120688
|
}
|
|
120682
|
-
function
|
|
120689
|
+
function mnt(e, t = "payload") {
|
|
120683
120690
|
let n = O9(D9(e, t), t);
|
|
120684
120691
|
if (typeof n.title != "string") throw new b9("InvalidDocument", "Document title must be a string", `${t}.title`);
|
|
120685
|
-
let r =
|
|
120692
|
+
let r = dnt(n.slides, `${t}.slides`), i = j9(n.theme, `${t}.theme`), a = fnt(n.viewport, `${t}.viewport`), o = pnt(n.templates, `${t}.templates`);
|
|
120686
120693
|
return {
|
|
120687
120694
|
title: n.title,
|
|
120688
120695
|
slides: r,
|
|
@@ -120691,17 +120698,17 @@ function pnt(e, t = "payload") {
|
|
|
120691
120698
|
...o ? { templates: o } : {}
|
|
120692
120699
|
};
|
|
120693
120700
|
}
|
|
120694
|
-
function
|
|
120701
|
+
function hnt(e) {
|
|
120695
120702
|
let t = O9(D9(e, "payload"), "payload"), n = {};
|
|
120696
120703
|
if (t.title !== void 0) {
|
|
120697
120704
|
if (typeof t.title != "string") throw new b9("InvalidDocument", "Document title must be a string", "payload.title");
|
|
120698
120705
|
n.title = t.title;
|
|
120699
120706
|
}
|
|
120700
|
-
return t.slides !== void 0 && (n.slides =
|
|
120707
|
+
return t.slides !== void 0 && (n.slides = dnt(t.slides, "payload.slides")), t.theme !== void 0 && (n.theme = j9(t.theme, "payload.theme")), t.viewport !== void 0 && (n.viewport = fnt(t.viewport, "payload.viewport")), t.templates !== void 0 && (n.templates = pnt(t.templates, "payload.templates")), n;
|
|
120701
120708
|
}
|
|
120702
|
-
function
|
|
120703
|
-
let t =
|
|
120704
|
-
return
|
|
120709
|
+
function gnt(e) {
|
|
120710
|
+
let t = lnt(e);
|
|
120711
|
+
return mnt(t.document, t.path);
|
|
120705
120712
|
}
|
|
120706
120713
|
function M9(e, t) {
|
|
120707
120714
|
let n = e.slides.slides[e.slides.slideIndex];
|
|
@@ -120738,14 +120745,14 @@ function N9(e, t, n) {
|
|
|
120738
120745
|
function P9(e, t, n, r) {
|
|
120739
120746
|
let i = $(e.slides.slides), a = i[t], o = a?.elements[n];
|
|
120740
120747
|
if (!a || !o) throw Error("Element location is invalid");
|
|
120741
|
-
|
|
120748
|
+
M9e(r, o);
|
|
120742
120749
|
let s = {
|
|
120743
120750
|
...o,
|
|
120744
120751
|
...Q7(r)
|
|
120745
120752
|
};
|
|
120746
120753
|
return a.elements[n] = s, e.slides.setSlides(i), $(s);
|
|
120747
120754
|
}
|
|
120748
|
-
var
|
|
120755
|
+
var _nt = [[0, 0], [100, 100]];
|
|
120749
120756
|
function F9(e, t, n) {
|
|
120750
120757
|
let r = o9(e.slides.slides, t, n, e.slides.slideIndex);
|
|
120751
120758
|
if (r.element.type !== "image") throw Error(`Element is not an image: ${t}`);
|
|
@@ -120762,12 +120769,12 @@ function I9(e, t, n, r, i = []) {
|
|
|
120762
120769
|
for (let e of i) delete c[e];
|
|
120763
120770
|
return o.elements[n] = c, e.slides.setSlides(a), $(c);
|
|
120764
120771
|
}
|
|
120765
|
-
function
|
|
120772
|
+
function vnt(e, t) {
|
|
120766
120773
|
if (typeof t == "string") return t;
|
|
120767
120774
|
if (!Number.isFinite(t)) throw Error(`Image filter ${String(e)} must be finite`);
|
|
120768
120775
|
return e === "blur" ? `${t}px` : e === "hue-rotate" ? `${t}deg` : `${e === "opacity" && t >= 0 && t <= 1 ? t * 100 : t}%`;
|
|
120769
120776
|
}
|
|
120770
|
-
function
|
|
120777
|
+
function ynt(e, t, n, r) {
|
|
120771
120778
|
let i = $(e.slides.slides), a = i[t];
|
|
120772
120779
|
if (!a || !a.elements[n]) throw Error("Element location is invalid");
|
|
120773
120780
|
return a.elements[n] = $(r), e.slides.setSlides(i), $(a.elements[n]);
|
|
@@ -120805,11 +120812,11 @@ function z9(e, t) {
|
|
|
120805
120812
|
}
|
|
120806
120813
|
return n;
|
|
120807
120814
|
}
|
|
120808
|
-
function
|
|
120815
|
+
function bnt(e, t) {
|
|
120809
120816
|
let n = {};
|
|
120810
120817
|
return t.left === void 0 ? t.dx !== void 0 && (n.left = e.left + t.dx) : n.left = t.left, t.top === void 0 ? t.dy !== void 0 && (n.top = e.top + t.dy) : n.top = t.top, n;
|
|
120811
120818
|
}
|
|
120812
|
-
function
|
|
120819
|
+
function xnt(e, t) {
|
|
120813
120820
|
let n = {};
|
|
120814
120821
|
if (t.width === void 0 ? t.dw !== void 0 && (n.width = e.width + t.dw) : n.width = t.width, t.height !== void 0) {
|
|
120815
120822
|
if (!("height" in e)) throw Error(`Element does not support height: ${e.id}`);
|
|
@@ -120823,33 +120830,33 @@ function bnt(e, t) {
|
|
|
120823
120830
|
function B9(e, t, n = "", r = "") {
|
|
120824
120831
|
e.main.setActiveElementIdList(t), n && e.main.setHandleElementId(n), e.main.setActiveGroupElementId(r);
|
|
120825
120832
|
}
|
|
120826
|
-
function
|
|
120833
|
+
function Snt(e, t) {
|
|
120827
120834
|
let n = n9(t.elementId);
|
|
120828
120835
|
for (let r of n) o9(e.slides.slides, r, t.slideId, e.slides.slideIndex);
|
|
120829
120836
|
B9(e, n, n[0] || "");
|
|
120830
120837
|
}
|
|
120831
|
-
function
|
|
120838
|
+
function Cnt(e, t) {
|
|
120832
120839
|
let { slide: n } = a9(e.slides.slides, t.slideId, e.slides.slideIndex), r = n.elements.find((e) => e.id === t.groupIdOrElementId), i = r?.groupId || t.groupIdOrElementId, a = n.elements.filter((e) => e.groupId === i);
|
|
120833
120840
|
if (!a.length) throw Error(`Element group not found: ${t.groupIdOrElementId}`);
|
|
120834
120841
|
let o = r?.id || a[0].id;
|
|
120835
120842
|
B9(e, a.map((e) => e.id), o, o);
|
|
120836
120843
|
}
|
|
120837
|
-
function
|
|
120844
|
+
function wnt(e, t) {
|
|
120838
120845
|
let n = o9(e.slides.slides, t.elementId, t.slideId, e.slides.slideIndex), r = $(n.slide.elements), [i] = r.splice(n.elementIndex, 1);
|
|
120839
120846
|
if (!i) throw Error(`Element not found: ${t.elementId}`);
|
|
120840
120847
|
return r.splice(i9(t.toIndex, r.length), 0, i), N9(e, n.slideIndex, { elements: r }), r;
|
|
120841
120848
|
}
|
|
120842
120849
|
function V9(e, t, n) {
|
|
120843
120850
|
let r = o9(e.slides.slides, t.elementId, t.slideId, e.slides.slideIndex), i = r.slide.elements.length - 1, a = n === "front" ? i : n === "back" ? 0 : n === "forward" ? Math.min(r.elementIndex + 1, i) : Math.max(r.elementIndex - 1, 0);
|
|
120844
|
-
return
|
|
120851
|
+
return wnt(e, {
|
|
120845
120852
|
...t,
|
|
120846
120853
|
toIndex: a
|
|
120847
120854
|
});
|
|
120848
120855
|
}
|
|
120849
|
-
function
|
|
120856
|
+
function Tnt(e) {
|
|
120850
120857
|
if (e) return J7(e, "background"), $(e);
|
|
120851
120858
|
}
|
|
120852
|
-
function
|
|
120859
|
+
function Ent(e) {
|
|
120853
120860
|
return td.filter((t) => !e || t.categoryKey === e).flatMap((e) => e.children.map((t, n) => ({
|
|
120854
120861
|
...$(t),
|
|
120855
120862
|
id: `${e.categoryKey}.${n}`,
|
|
@@ -120857,7 +120864,7 @@ function Tnt(e) {
|
|
|
120857
120864
|
index: n
|
|
120858
120865
|
})));
|
|
120859
120866
|
}
|
|
120860
|
-
function
|
|
120867
|
+
function Dnt(e = {}) {
|
|
120861
120868
|
if (e.preset) return $(e.preset);
|
|
120862
120869
|
if (e.presetId) {
|
|
120863
120870
|
let t = e.presetId.lastIndexOf(".");
|
|
@@ -120874,7 +120881,7 @@ function Ent(e = {}) {
|
|
|
120874
120881
|
return $(n);
|
|
120875
120882
|
}
|
|
120876
120883
|
}
|
|
120877
|
-
function
|
|
120884
|
+
function Ont(e, ...t) {
|
|
120878
120885
|
let n = Object.assign({}, ...t.filter(Boolean));
|
|
120879
120886
|
if (Object.keys(n).length) return {
|
|
120880
120887
|
content: n.content ?? "",
|
|
@@ -120884,7 +120891,7 @@ function Dnt(e, ...t) {
|
|
|
120884
120891
|
...n
|
|
120885
120892
|
};
|
|
120886
120893
|
}
|
|
120887
|
-
function
|
|
120894
|
+
function knt(e) {
|
|
120888
120895
|
return typeof e == "string" ? {
|
|
120889
120896
|
fill: e,
|
|
120890
120897
|
gradient: void 0,
|
|
@@ -120895,32 +120902,32 @@ function Ont(e) {
|
|
|
120895
120902
|
pattern: void 0
|
|
120896
120903
|
} : Q7(e);
|
|
120897
120904
|
}
|
|
120898
|
-
function
|
|
120905
|
+
function Ant(e, t, n) {
|
|
120899
120906
|
let { slide: r } = a9(e.slides.slides, t, e.slides.slideIndex), i = r.animations || [];
|
|
120900
120907
|
return $(n ? i.filter((e) => e.elId === n) : i);
|
|
120901
120908
|
}
|
|
120902
|
-
var
|
|
120909
|
+
var jnt = [
|
|
120903
120910
|
"click",
|
|
120904
120911
|
"meantime",
|
|
120905
120912
|
"auto"
|
|
120906
120913
|
];
|
|
120907
|
-
function
|
|
120914
|
+
function Mnt(e) {
|
|
120908
120915
|
let t = $(e);
|
|
120909
|
-
if (t.trigger !== void 0 && !
|
|
120916
|
+
if (t.trigger !== void 0 && !jnt.includes(t.trigger)) throw Error(`Invalid animation trigger: ${String(t.trigger)}`);
|
|
120910
120917
|
if (t.duration !== void 0 && (typeof t.duration != "number" || !Number.isFinite(t.duration) || t.duration < 0)) throw Error("Animation duration must be a non-negative finite number");
|
|
120911
120918
|
return t;
|
|
120912
120919
|
}
|
|
120913
|
-
function
|
|
120920
|
+
function Nnt(e, t, n, r) {
|
|
120914
120921
|
let { slide: i, index: a } = a9(e.slides.slides, t, e.slides.slideIndex), o = $(i.animations || []), s = o.findIndex((e) => e.id === n);
|
|
120915
120922
|
if (s === -1) throw Error(`Animation not found: ${n}`);
|
|
120916
|
-
let c =
|
|
120923
|
+
let c = jet({
|
|
120917
120924
|
...o[s],
|
|
120918
|
-
...
|
|
120925
|
+
...Mnt(H9(r))
|
|
120919
120926
|
});
|
|
120920
120927
|
return s9(i, c.elId), o[s] = c, N9(e, a, { animations: o }), $(c);
|
|
120921
120928
|
}
|
|
120922
|
-
function
|
|
120923
|
-
let n =
|
|
120929
|
+
function Pnt(e, t) {
|
|
120930
|
+
let n = Ant(e, t), r = [];
|
|
120924
120931
|
for (let e of n) {
|
|
120925
120932
|
let t = $(e);
|
|
120926
120933
|
if (t.trigger === "click" || !r.length) r.push({
|
|
@@ -120945,7 +120952,7 @@ function Nnt(e, t) {
|
|
|
120945
120952
|
function H9(e) {
|
|
120946
120953
|
return Object.fromEntries(Object.entries(e).filter(([, e]) => e !== void 0));
|
|
120947
120954
|
}
|
|
120948
|
-
function
|
|
120955
|
+
function Fnt() {
|
|
120949
120956
|
return $({
|
|
120950
120957
|
enter: I8,
|
|
120951
120958
|
exit: L8,
|
|
@@ -120953,22 +120960,22 @@ function Pnt() {
|
|
|
120953
120960
|
slide: z8
|
|
120954
120961
|
});
|
|
120955
120962
|
}
|
|
120956
|
-
var
|
|
120957
|
-
function Int(e) {
|
|
120958
|
-
return typeof e == "string" && Fnt.includes(e);
|
|
120959
|
-
}
|
|
120963
|
+
var Int = z8.map((e) => e.value);
|
|
120960
120964
|
function Lnt(e) {
|
|
120965
|
+
return typeof e == "string" && Int.includes(e);
|
|
120966
|
+
}
|
|
120967
|
+
function Rnt(e) {
|
|
120961
120968
|
if (e !== void 0) {
|
|
120962
|
-
if (
|
|
120969
|
+
if (Lnt(e)) return e;
|
|
120963
120970
|
throw Error(`Invalid turningMode: ${String(e)}`);
|
|
120964
120971
|
}
|
|
120965
120972
|
}
|
|
120966
|
-
function
|
|
120973
|
+
function znt(e, t = {}) {
|
|
120967
120974
|
if (!e) throw Error("Search query is required");
|
|
120968
120975
|
let n = t.regex ? e : e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
120969
120976
|
return new RegExp(n, t.caseSensitive ? "g" : "gi");
|
|
120970
120977
|
}
|
|
120971
|
-
function
|
|
120978
|
+
function Bnt(e, t, n) {
|
|
120972
120979
|
let r = [];
|
|
120973
120980
|
t.lastIndex = 0;
|
|
120974
120981
|
let i = t.exec(e);
|
|
@@ -120980,7 +120987,7 @@ function znt(e, t, n) {
|
|
|
120980
120987
|
}), i.index === t.lastIndex && t.lastIndex++, i = t.exec(e);
|
|
120981
120988
|
return t.lastIndex = 0, r;
|
|
120982
120989
|
}
|
|
120983
|
-
function
|
|
120990
|
+
function Vnt(e, t) {
|
|
120984
120991
|
let n = e[t];
|
|
120985
120992
|
if (!n?.sectionTag) throw Error(`Section start not found at slide index: ${t}`);
|
|
120986
120993
|
let r = e.findIndex((e, n) => n > t && !!e.sectionTag), i = r === -1 ? e.length - 1 : r - 1;
|
|
@@ -120993,11 +121000,11 @@ function Bnt(e, t) {
|
|
|
120993
121000
|
slideIds: e.slice(t, i + 1).map((e) => e.id)
|
|
120994
121001
|
};
|
|
120995
121002
|
}
|
|
120996
|
-
function
|
|
120997
|
-
return e.flatMap((t, n) => t.sectionTag ? [
|
|
121003
|
+
function Hnt(e) {
|
|
121004
|
+
return e.flatMap((t, n) => t.sectionTag ? [Vnt(e, n)] : []);
|
|
120998
121005
|
}
|
|
120999
121006
|
function U9(e, t) {
|
|
121000
|
-
let n =
|
|
121007
|
+
let n = Hnt(e).find((e) => e.section.id === t || e.slideId === t);
|
|
121001
121008
|
if (!n) throw Error(`Section not found: ${t}`);
|
|
121002
121009
|
return n;
|
|
121003
121010
|
}
|
|
@@ -121014,7 +121021,7 @@ function G9(e, t) {
|
|
|
121014
121021
|
function K9(e, t) {
|
|
121015
121022
|
return e.map((e) => {
|
|
121016
121023
|
let n = [...e];
|
|
121017
|
-
for (; n.length < t;) n.push(
|
|
121024
|
+
for (; n.length < t;) n.push(Fet());
|
|
121018
121025
|
return n.length > t && (n.length = t), n;
|
|
121019
121026
|
});
|
|
121020
121027
|
}
|
|
@@ -121028,7 +121035,7 @@ function q9(e, t, n = e.colWidths) {
|
|
|
121028
121035
|
function J9(e) {
|
|
121029
121036
|
return Number.isFinite(e) ? Math.max(1, Math.trunc(e)) : 1;
|
|
121030
121037
|
}
|
|
121031
|
-
function
|
|
121038
|
+
function Unt(e, t, n) {
|
|
121032
121039
|
for (let r = 0; r < e.length; r++) for (let i = 0; i < e[r].length; i++) {
|
|
121033
121040
|
let a = e[r][i], o = J9(a.rowspan), s = J9(a.colspan);
|
|
121034
121041
|
if (r <= t && t < r + o && i <= n && n < i + s) return {
|
|
@@ -121039,7 +121046,7 @@ function Hnt(e, t, n) {
|
|
|
121039
121046
|
}
|
|
121040
121047
|
return null;
|
|
121041
121048
|
}
|
|
121042
|
-
function
|
|
121049
|
+
function Wnt(e, t) {
|
|
121043
121050
|
if (typeof document > "u") throw Error("Paragraph attrs require a DOM environment");
|
|
121044
121051
|
let n = document.createElement("template");
|
|
121045
121052
|
n.innerHTML = e;
|
|
@@ -121061,7 +121068,7 @@ function Unt(e, t) {
|
|
|
121061
121068
|
}
|
|
121062
121069
|
return n.innerHTML;
|
|
121063
121070
|
}
|
|
121064
|
-
function
|
|
121071
|
+
function Gnt(e, t, n, r, i, a) {
|
|
121065
121072
|
let o = [];
|
|
121066
121073
|
t.lastIndex = 0;
|
|
121067
121074
|
let s = e.replace(t, (e, ...t) => {
|
|
@@ -121086,7 +121093,7 @@ function Y9(e, t) {
|
|
|
121086
121093
|
noteIndex: n
|
|
121087
121094
|
};
|
|
121088
121095
|
}
|
|
121089
|
-
function
|
|
121096
|
+
function Knt(e, t) {
|
|
121090
121097
|
let n = e.findIndex((e) => e.id === t);
|
|
121091
121098
|
if (n === -1) throw Error(`Note reply not found: ${t}`);
|
|
121092
121099
|
return {
|
|
@@ -121094,13 +121101,13 @@ function Gnt(e, t) {
|
|
|
121094
121101
|
replyIndex: n
|
|
121095
121102
|
};
|
|
121096
121103
|
}
|
|
121097
|
-
function
|
|
121104
|
+
function qnt(e) {
|
|
121098
121105
|
return typeof e != "object" || !e ? e : e.slideIdOrIndex ?? e.slideId ?? e.index;
|
|
121099
121106
|
}
|
|
121100
121107
|
function X9(e, t) {
|
|
121101
121108
|
let n = e.slides.slides, r = t && typeof t == "object" && t.slideIdOrIndex === void 0 ? t.slideId === void 0 ? t.index === void 0 ? "slideIdOrIndex" : "index" : "slideId" : "slideIdOrIndex";
|
|
121102
121109
|
if (!n.length) throw new b9("SlideUnavailable", "No slide is available", r);
|
|
121103
|
-
let i =
|
|
121110
|
+
let i = qnt(t);
|
|
121104
121111
|
if (i === void 0) return r9(e.slides.slideIndex, n.length);
|
|
121105
121112
|
if (typeof i == "number") return q7(i, n.length, r);
|
|
121106
121113
|
if (!i) throw new b9("InvalidSlideId", "Slide ID is required", r);
|
|
@@ -121116,28 +121123,28 @@ function Z9(e, t) {
|
|
|
121116
121123
|
index: n
|
|
121117
121124
|
};
|
|
121118
121125
|
}
|
|
121119
|
-
function
|
|
121126
|
+
function Jnt(e) {
|
|
121120
121127
|
let t = $(e || {});
|
|
121121
|
-
return
|
|
121128
|
+
return uet({
|
|
121122
121129
|
...t,
|
|
121123
121130
|
elements: (t.elements || []).map((e) => c9(e))
|
|
121124
121131
|
});
|
|
121125
121132
|
}
|
|
121126
|
-
function
|
|
121133
|
+
function Ynt(e) {
|
|
121127
121134
|
let t = $(e);
|
|
121128
121135
|
return t.elements && (t.elements = t.elements.map((e) => c9(e))), t;
|
|
121129
121136
|
}
|
|
121130
|
-
function
|
|
121137
|
+
function Xnt(e) {
|
|
121131
121138
|
return e ? e.replace(/<br\s*\/?>/gi, " ").replace(/<[^>]+>/g, " ").replace(/ /g, " ").replace(/\s+/g, " ").trim() : "";
|
|
121132
121139
|
}
|
|
121133
|
-
function
|
|
121140
|
+
function Znt(e) {
|
|
121134
121141
|
let t = e?.elements ?? [];
|
|
121135
|
-
return t.length === 0 ? !0 : t.every((e) => e.type === "text" &&
|
|
121142
|
+
return t.length === 0 ? !0 : t.every((e) => e.type === "text" && Xnt(e.content) === "");
|
|
121136
121143
|
}
|
|
121137
|
-
function
|
|
121144
|
+
function Qnt(e, t, n) {
|
|
121138
121145
|
if (t !== n && e.some((e) => e.id === t)) throw new b9("DuplicateSlideId", `Slide ID already exists: ${t}`, "slide.id");
|
|
121139
121146
|
}
|
|
121140
|
-
function
|
|
121147
|
+
function $nt(e) {
|
|
121141
121148
|
let t = n9(e);
|
|
121142
121149
|
if (!t.length) throw new b9("InvalidSlideId", "At least one slide ID is required", "slideId");
|
|
121143
121150
|
let n = [], r = /* @__PURE__ */ new Set();
|
|
@@ -121146,15 +121153,15 @@ function Qnt(e) {
|
|
|
121146
121153
|
r.has(e) || (r.add(e), n.push(e));
|
|
121147
121154
|
}), n;
|
|
121148
121155
|
}
|
|
121149
|
-
function
|
|
121150
|
-
return
|
|
121156
|
+
function ert(e) {
|
|
121157
|
+
return cet([e], { preserveExternalSlideLinks: !0 }).slides[0];
|
|
121151
121158
|
}
|
|
121152
121159
|
function Q9(e, t) {
|
|
121153
121160
|
let n = X9(e, t);
|
|
121154
121161
|
e.slides.updateSlideIndex(n), e.main.updateSelectedSlidesIndex([n]), e.main.setActiveElementIdList([]);
|
|
121155
121162
|
}
|
|
121156
|
-
function
|
|
121157
|
-
let r =
|
|
121163
|
+
function trt(e, t, n = {}) {
|
|
121164
|
+
let r = Qtt(e), i = /* @__PURE__ */ new Set(), a = [], o = !1, s = 0, c = 0, l = null, u = (e) => {
|
|
121158
121165
|
if (o && e.type !== "destroyed") return;
|
|
121159
121166
|
let t = {
|
|
121160
121167
|
...e,
|
|
@@ -121183,7 +121190,7 @@ function ert(e, t, n = {}) {
|
|
|
121183
121190
|
type: e.type,
|
|
121184
121191
|
changed: !1,
|
|
121185
121192
|
documentVersion: s,
|
|
121186
|
-
errors: [
|
|
121193
|
+
errors: [Ztt(t)]
|
|
121187
121194
|
}), g = (e) => ({
|
|
121188
121195
|
ok: !1,
|
|
121189
121196
|
commandId: e.id,
|
|
@@ -121266,14 +121273,14 @@ function ert(e, t, n = {}) {
|
|
|
121266
121273
|
"view.exitPresentation",
|
|
121267
121274
|
"view.setLocale"
|
|
121268
121275
|
]), T = (e) => e.endsWith(".get") || e.endsWith(".list") || C.has(e), E = (e) => !w.has(e.type), D = /* @__PURE__ */ new Map(), O = (e, t) => {
|
|
121269
|
-
if (
|
|
121276
|
+
if (!eet(e)) throw Error(`Command type must use domain.action format: ${e}`);
|
|
121270
121277
|
if (D.has(e)) throw Error(`Duplicate command registration: ${e}`);
|
|
121271
121278
|
D.set(e, {
|
|
121272
121279
|
type: e,
|
|
121273
121280
|
handler: t,
|
|
121274
121281
|
mutates: !T(e)
|
|
121275
121282
|
});
|
|
121276
|
-
}, k = (e) =>
|
|
121283
|
+
}, k = (e) => eet(String(e.type)) ? D.has(e.type) ? null : h(e, new b9("UnsupportedCommand", `Unsupported command: ${e.type}`, "type")) : h(e, new b9("InvalidCommandType", `Command type must use domain.action format: ${String(e.type)}`, "type")), A = (e, t) => {
|
|
121277
121284
|
let n = o9(r.slides.slides, e, t, r.slides.slideIndex);
|
|
121278
121285
|
if (n.element.type !== "text" && n.element.type !== "shape") throw Error(`Element does not support rich text: ${e}`);
|
|
121279
121286
|
return n;
|
|
@@ -121308,45 +121315,45 @@ function ert(e, t, n = {}) {
|
|
|
121308
121315
|
return P9(r, t.slideIndex, t.elementIndex, { text: n });
|
|
121309
121316
|
}, I = (e) => {
|
|
121310
121317
|
let t = A(e.elementId, e.slideId);
|
|
121311
|
-
if (t.element.type === "text") return P9(r, t.slideIndex, t.elementIndex, { content:
|
|
121318
|
+
if (t.element.type === "text") return P9(r, t.slideIndex, t.elementIndex, { content: Wnt(t.element.content, e.attrs) });
|
|
121312
121319
|
let n = {
|
|
121313
121320
|
...j(),
|
|
121314
121321
|
...t.element.text
|
|
121315
121322
|
}, i = {
|
|
121316
121323
|
...n,
|
|
121317
|
-
content:
|
|
121324
|
+
content: Wnt(n.content, e.attrs)
|
|
121318
121325
|
};
|
|
121319
121326
|
return P9(r, t.slideIndex, t.elementIndex, { text: i });
|
|
121320
121327
|
};
|
|
121321
|
-
O("deck.get", () => w9(r)), O("deck.set", (e) => (
|
|
121322
|
-
let L = (e) => (
|
|
121328
|
+
O("deck.get", () => w9(r)), O("deck.set", (e) => (snt(r, mnt(e)), w9(r)));
|
|
121329
|
+
let L = (e) => (snt(r, gnt(e)), w9(r));
|
|
121323
121330
|
O("import.json", L), O("import.pptist", L), O("import.pptxSafe", L), O("export.json", () => w9(r)), O("deck.patch", (e) => {
|
|
121324
|
-
let t =
|
|
121325
|
-
return t.title !== void 0 && r.slides.setTitle(t.title), t.slides ? r.slides.setSlides($(t.slides), t.theme ? x9(r.slides.theme, t.theme) : void 0) : t.theme && r.slides.setTheme(x9(r.slides.theme, t.theme)),
|
|
121331
|
+
let t = hnt(e);
|
|
121332
|
+
return t.title !== void 0 && r.slides.setTitle(t.title), t.slides ? r.slides.setSlides($(t.slides), t.theme ? x9(r.slides.theme, t.theme) : void 0) : t.theme && r.slides.setTheme(x9(r.slides.theme, t.theme)), ont(r, t.viewport), t.templates && r.slides.setTemplates($(t.templates)), w9(r);
|
|
121326
121333
|
}), O("deck.setTitle", (e) => (r.slides.setTitle(e.title), { title: r.slides.title })), O("deck.setTheme", (e) => {
|
|
121327
121334
|
let t = j9(e.theme, "payload.theme") || {};
|
|
121328
121335
|
return r.slides.setTheme(x9(r.slides.theme, t)), $(r.slides.theme);
|
|
121329
121336
|
}), O("deck.applyTemplate", async (e = { templateId: "" }) => {
|
|
121330
121337
|
if (!e?.templateId) throw new b9("InvalidTemplate", "templateId is required. Call templates.catalog.", "payload.templateId");
|
|
121331
|
-
|
|
121332
|
-
let t = await
|
|
121338
|
+
Qet(e.templateId);
|
|
121339
|
+
let t = await Yet(e.templateId), n = $et(t);
|
|
121333
121340
|
return n && r.slides.setTheme(x9(r.slides.theme, n)), t.width && r.slides.setViewportSize(t.width), t.width && t.height && r.slides.setViewportRatio(t.height / t.width), {
|
|
121334
121341
|
templateId: e.templateId,
|
|
121335
121342
|
theme: $(r.slides.theme)
|
|
121336
121343
|
};
|
|
121337
|
-
}), O("templates.catalog", () =>
|
|
121344
|
+
}), O("templates.catalog", () => Jet()), O("templates.slidesCatalog", async (e = { templateId: "" }) => {
|
|
121338
121345
|
if (!e?.templateId) throw new b9("InvalidTemplate", "templateId is required. Call templates.catalog.", "payload.templateId");
|
|
121339
|
-
return
|
|
121340
|
-
}), O("styles.catalog", () =>
|
|
121346
|
+
return Qet(e.templateId), Xet(e.templateId);
|
|
121347
|
+
}), O("styles.catalog", () => Htt()), O("layouts.catalog", () => Itt()), O("deck.applyStyle", (e = { styleId: "" }) => {
|
|
121341
121348
|
if (!e?.styleId) throw new b9("InvalidStyle", "styleId is required. Call styles.catalog.", "payload.styleId");
|
|
121342
|
-
|
|
121343
|
-
let t =
|
|
121344
|
-
return r.slides.setTheme(x9(r.slides.theme,
|
|
121349
|
+
Btt(e.styleId) || _(e9("UnknownStyle", `Unknown style "${e.styleId}"; falling back to the default style. Call styles.catalog for valid ids.`, "payload.styleId", !0));
|
|
121350
|
+
let t = Vtt(e.styleId);
|
|
121351
|
+
return r.slides.setTheme(x9(r.slides.theme, Utt(t))), {
|
|
121345
121352
|
styleId: t.id,
|
|
121346
121353
|
theme: $(r.slides.theme)
|
|
121347
121354
|
};
|
|
121348
|
-
}), O("deck.setViewport", (e) => (
|
|
121349
|
-
let t =
|
|
121355
|
+
}), O("deck.setViewport", (e) => (ont(r, fnt(D9(e, "payload"), "payload")), M9(r, s))), O("deck.setTemplates", (e) => {
|
|
121356
|
+
let t = pnt(O9(D9(e, "payload"), "payload").templates, "payload.templates");
|
|
121350
121357
|
if (!t) throw new b9("InvalidDocument", "Templates must be an array", "payload.templates");
|
|
121351
121358
|
return r.slides.setTemplates(t), $(r.slides.templates);
|
|
121352
121359
|
}), O("slides.list", () => $(r.slides.slides)), O("slides.get", (e = {}) => {
|
|
@@ -121359,20 +121366,20 @@ function ert(e, t, n = {}) {
|
|
|
121359
121366
|
let t = Z9(r, e);
|
|
121360
121367
|
return t ? $(t.slide) : null;
|
|
121361
121368
|
}), O("slides.create", (e = {}) => {
|
|
121362
|
-
let t =
|
|
121363
|
-
|
|
121369
|
+
let t = Jnt(e.slide), n = $(r.slides.slides);
|
|
121370
|
+
Qnt(n, t.id);
|
|
121364
121371
|
let i = i9(e.index, n.length);
|
|
121365
121372
|
return n.splice(i, 0, t), r.slides.setSlides(n), e.select !== !1 && Q9(r, i), $(t);
|
|
121366
121373
|
}), O("slides.createFromLayout", async (e = { layoutId: "" }) => {
|
|
121367
121374
|
if (!e?.layoutId) throw new b9("InvalidLayout", "layoutId is required. Call layouts.catalog.", "payload.layoutId");
|
|
121368
|
-
let t =
|
|
121375
|
+
let t = Vtt(r.slides.theme.styleId), n = $tt(r), i = await Ltt(e.layoutId, e.slots ?? {}, t, {
|
|
121369
121376
|
width: n.size,
|
|
121370
121377
|
height: n.size * n.ratio
|
|
121371
121378
|
}, e.backgroundMode ?? "auto");
|
|
121372
121379
|
for (let e of i.warnings) _(e9("LayoutContent", e, void 0, !0));
|
|
121373
|
-
let a =
|
|
121374
|
-
|
|
121375
|
-
let s = e.index === void 0 && o.length === 1 &&
|
|
121380
|
+
let a = Jnt(i.slide), o = $(r.slides.slides);
|
|
121381
|
+
Qnt(o, a.id);
|
|
121382
|
+
let s = e.index === void 0 && o.length === 1 && Znt(o[0]), c;
|
|
121376
121383
|
s ? (c = 0, o.splice(0, 1, a)) : (c = i9(e.index, o.length), o.splice(c, 0, a)), r.slides.setSlides(o), e.select !== !1 && Q9(r, c);
|
|
121377
121384
|
let l = a.elements.filter((e) => e.type === "text").map((e) => e.id);
|
|
121378
121385
|
return {
|
|
@@ -121388,16 +121395,16 @@ function ert(e, t, n = {}) {
|
|
|
121388
121395
|
}) => {
|
|
121389
121396
|
if (!e?.templateId) throw new b9("InvalidTemplate", "templateId is required.", "payload.templateId");
|
|
121390
121397
|
if (!e?.slug) throw new b9("InvalidTemplateSlide", "slug is required. Call templates.slidesCatalog.", "payload.slug");
|
|
121391
|
-
|
|
121392
|
-
let t = await
|
|
121398
|
+
Qet(e.templateId);
|
|
121399
|
+
let t = await Yet(e.templateId);
|
|
121393
121400
|
if (e.applyTemplateTheme !== !1 && r.slides.slides.length === 0) {
|
|
121394
|
-
let e =
|
|
121401
|
+
let e = $et(t);
|
|
121395
121402
|
e && r.slides.setTheme({
|
|
121396
121403
|
...r.slides.theme,
|
|
121397
121404
|
...e
|
|
121398
121405
|
});
|
|
121399
121406
|
}
|
|
121400
|
-
let { slide: n } =
|
|
121407
|
+
let { slide: n } = Zet(t, e.slug), i = Jnt(n), a = $(r.slides.slides), o = i9(e.index, a.length);
|
|
121401
121408
|
a.splice(o, 0, i), r.slides.setSlides(a), e.select !== !1 && Q9(r, o);
|
|
121402
121409
|
let s = i.elements.filter((e) => e.type === "text").map((e) => e.id), c = i.elements.filter((e) => e.type === "text" && !!e.placeholder).map((e) => e.id);
|
|
121403
121410
|
return {
|
|
@@ -121411,7 +121418,7 @@ function ert(e, t, n = {}) {
|
|
|
121411
121418
|
}), O("slides.insert", (e) => {
|
|
121412
121419
|
let t = Array.isArray(e.slides) ? e.slides : [e.slides];
|
|
121413
121420
|
if (!t.length) throw Error("At least one slide is required");
|
|
121414
|
-
let n =
|
|
121421
|
+
let n = cet(t, { preserveExternalSlideLinks: e.preserveExternalSlideLinks }), i = $(r.slides.slides), a = i9(e.index, i.length);
|
|
121415
121422
|
return i.splice(a, 0, ...n.slides), r.slides.setSlides(i), e.select !== !1 && Q9(r, a), {
|
|
121416
121423
|
slides: n.slides,
|
|
121417
121424
|
remap: {
|
|
@@ -121422,10 +121429,10 @@ function ert(e, t, n = {}) {
|
|
|
121422
121429
|
}
|
|
121423
121430
|
};
|
|
121424
121431
|
}), O("slides.update", (e) => {
|
|
121425
|
-
let t = X9(r, { slideId: e.slideId }), n =
|
|
121426
|
-
return n.id &&
|
|
121432
|
+
let t = X9(r, { slideId: e.slideId }), n = Ynt(e.patch);
|
|
121433
|
+
return n.id && Qnt(r.slides.slides, n.id, e.slideId), N9(r, t, n);
|
|
121427
121434
|
}), O("slides.delete", (e) => {
|
|
121428
|
-
let t =
|
|
121435
|
+
let t = $nt(e.slideId), n = t.map((e) => X9(r, { slideId: e })), i = r.slides.currentSlide?.id, a = new Set(t), o = aet(r.slides.slides.filter((e) => !a.has(e.id)), a);
|
|
121429
121436
|
r.slides.deleteSlide(t);
|
|
121430
121437
|
let s = i ? r.slides.slides.findIndex((e) => e.id === i) : -1, c = r.slides.slides.length ? s >= 0 ? s : r9(Math.min(...n), r.slides.slides.length) : 0;
|
|
121431
121438
|
r.slides.updateSlideIndex(c), r.main.setActiveElementIdList([]), r.main.updateSelectedSlidesIndex(r.slides.slides.length ? [c] : []);
|
|
@@ -121438,20 +121445,20 @@ function ert(e, t, n = {}) {
|
|
|
121438
121445
|
}), O("slides.duplicate", (e = {}) => {
|
|
121439
121446
|
let t = Z9(r, e);
|
|
121440
121447
|
if (!t) throw new b9("SlideUnavailable", "No slide is available", "slideIdOrIndex");
|
|
121441
|
-
let { slide: n, index: i } = t, a =
|
|
121448
|
+
let { slide: n, index: i } = t, a = ert(n), o = $(r.slides.slides), s = i9(i + 1, o.length);
|
|
121442
121449
|
return o.splice(s, 0, a), r.slides.setSlides(o), e.select !== !1 && Q9(r, s), a;
|
|
121443
121450
|
}), O("slides.move", (e) => {
|
|
121444
121451
|
let t = $(r.slides.slides), n = X9(r, e), [i] = t.splice(n, 1);
|
|
121445
121452
|
if (!i) throw Error(`Slide index not found: ${n}`);
|
|
121446
121453
|
let a = i9(e.toIndex, t.length);
|
|
121447
121454
|
return t.splice(a, 0, i), r.slides.setSlides(t), Q9(r, a), $(t);
|
|
121448
|
-
}), O("slides.select", (e) => (Q9(r,
|
|
121455
|
+
}), O("slides.select", (e) => (Q9(r, qnt(e) ?? r.slides.slideIndex), M9(r, s))), O("slides.setBackground", (e) => {
|
|
121449
121456
|
let { index: t } = a9(r.slides.slides, e.slideId, r.slides.slideIndex);
|
|
121450
|
-
return N9(r, t, { background:
|
|
121457
|
+
return N9(r, t, { background: Tnt(e.background) });
|
|
121451
121458
|
}), O("slides.applyBackground", (e) => {
|
|
121452
121459
|
let t = $(r.slides.slides), n = e.slideIds?.length ? new Set(e.slideIds) : null, i = t.map((t) => n && !n.has(t.id) ? t : {
|
|
121453
121460
|
...t,
|
|
121454
|
-
background:
|
|
121461
|
+
background: Tnt(e.background)
|
|
121455
121462
|
});
|
|
121456
121463
|
return r.slides.setSlides(i), i;
|
|
121457
121464
|
}), O("slides.getTransition", (e = {}) => {
|
|
@@ -121462,7 +121469,7 @@ function ert(e, t, n = {}) {
|
|
|
121462
121469
|
};
|
|
121463
121470
|
}), O("slides.setTransition", (e) => {
|
|
121464
121471
|
let { index: t } = a9(r.slides.slides, e.slideId, r.slides.slideIndex);
|
|
121465
|
-
return N9(r, t, { turningMode:
|
|
121472
|
+
return N9(r, t, { turningMode: Rnt(e.turningMode) });
|
|
121466
121473
|
}), O("slides.getRemark", (e = {}) => {
|
|
121467
121474
|
let { slide: t } = a9(r.slides.slides, e.slideId, r.slides.slideIndex);
|
|
121468
121475
|
return t.remark || "";
|
|
@@ -121475,7 +121482,7 @@ function ert(e, t, n = {}) {
|
|
|
121475
121482
|
}), O("elements.insert", (e) => {
|
|
121476
121483
|
let t = Array.isArray(e.elements) ? e.elements : [e.elements];
|
|
121477
121484
|
if (!t.length) throw Error("At least one element is required");
|
|
121478
|
-
let { slide: n, index: i } = a9(r.slides.slides, e.slideId, r.slides.slideIndex), a =
|
|
121485
|
+
let { slide: n, index: i } = a9(r.slides.slides, e.slideId, r.slides.slideIndex), a = set(t, e.animations || [], {
|
|
121479
121486
|
offset: e.offset,
|
|
121480
121487
|
preserveExternalSlideLinks: e.preserveExternalSlideLinks,
|
|
121481
121488
|
slideIdMap: e.slideIdMap
|
|
@@ -121501,7 +121508,7 @@ function ert(e, t, n = {}) {
|
|
|
121501
121508
|
n.push(P9(r, t.slideIndex, t.elementIndex, e.patch));
|
|
121502
121509
|
}
|
|
121503
121510
|
return n;
|
|
121504
|
-
}), O("elements.setTransform", (e) => L9(r, e, (t) => z9(t, e.transform))), O("elements.move", (e) => L9(r, e, (t) =>
|
|
121511
|
+
}), O("elements.setTransform", (e) => L9(r, e, (t) => z9(t, e.transform))), O("elements.move", (e) => L9(r, e, (t) => bnt(t, e.position))), O("elements.resize", (e) => L9(r, e, (t) => xnt(t, e.size))), O("elements.rotate", (e) => L9(r, e, (t) => z9(t, { rotate: e.rotate }))), O("elements.setOpacity", (e) => L9(r, e, (t) => z9(t, { opacity: e.opacity }))), O("elements.setFlip", (e) => L9(r, e, (t) => z9(t, e.flip))), O("elements.delete", (e) => {
|
|
121505
121512
|
let t = n9(e.elementId), n = /* @__PURE__ */ new Map();
|
|
121506
121513
|
for (let i of t) {
|
|
121507
121514
|
let t = o9(r.slides.slides, i, e.slideId, r.slides.slideIndex), a = n.get(t.slideIndex) || /* @__PURE__ */ new Set();
|
|
@@ -121514,7 +121521,7 @@ function ert(e, t, n = {}) {
|
|
|
121514
121521
|
n.elements = n.elements.filter((e) => !t.has(e.id));
|
|
121515
121522
|
}
|
|
121516
121523
|
return r.slides.setSlides(i), r.main.setActiveElementIdList(r.main.activeElementIdList.filter((e) => !t.includes(e))), t.includes(r.main.activeGroupElementId) && r.main.setActiveGroupElementId(""), { deleted: t };
|
|
121517
|
-
}), O("elements.reorder", (e) =>
|
|
121524
|
+
}), O("elements.reorder", (e) => wnt(r, e)), O("elements.bringForward", (e) => V9(r, e, "forward")), O("elements.sendBackward", (e) => V9(r, e, "backward")), O("elements.bringToFront", (e) => V9(r, e, "front")), O("elements.sendToBack", (e) => V9(r, e, "back")), O("elements.select", (e) => (Snt(r, e), M9(r, s))), O("elements.selectGroup", (e) => (Cnt(r, e), M9(r, s))), O("elements.clearSelection", () => (B9(r, []), M9(r, s))), O("elements.setHandle", (e) => (o9(r.slides.slides, e.elementId, e.slideId, r.slides.slideIndex), r.main.activeElementIdList.includes(e.elementId) || Snt(r, e), r.main.setHandleElementId(e.elementId), r.main.activeElementIdList.includes(r.main.activeGroupElementId) || r.main.setActiveGroupElementId(""), M9(r, s))), O("elements.group", (e) => {
|
|
121518
121525
|
let t = [...new Set(e.elementIds)];
|
|
121519
121526
|
if (!t.length) throw new b9("InvalidElementId", "At least one element ID is required", "elementIds");
|
|
121520
121527
|
let n = o9(r.slides.slides, t[0], e.slideId, r.slides.slideIndex), i = e.groupId || $7("group"), a = $(n.slide.elements), o = [];
|
|
@@ -121560,7 +121567,7 @@ function ert(e, t, n = {}) {
|
|
|
121560
121567
|
slideId: e.slideId,
|
|
121561
121568
|
hidden: !1
|
|
121562
121569
|
})), O("elements.setLink", (e) => {
|
|
121563
|
-
let t = o9(r.slides.slides, e.elementId, e.slideId, r.slides.slideIndex), n =
|
|
121570
|
+
let t = o9(r.slides.slides, e.elementId, e.slideId, r.slides.slideIndex), n = iet(e.link, r.slides.slides);
|
|
121564
121571
|
if (!n) {
|
|
121565
121572
|
let e = $(r.slides.slides), n = e[t.slideIndex]?.elements[t.elementIndex];
|
|
121566
121573
|
if (!n) throw Error("Element location is invalid");
|
|
@@ -121573,7 +121580,7 @@ function ert(e, t, n = {}) {
|
|
|
121573
121580
|
if (n.element.type !== "shape") throw Error(`Element is not a shape: ${e}`);
|
|
121574
121581
|
return n;
|
|
121575
121582
|
}, ee = (e = {}) => {
|
|
121576
|
-
let { slideId: t, index: n, select: i, presetId: a, categoryKey: o, presetIndex: s, preset: c, element: l, ...u } = e, d =
|
|
121583
|
+
let { slideId: t, index: n, select: i, presetId: a, categoryKey: o, presetIndex: s, preset: c, element: l, ...u } = e, d = Dnt(e), f = d ? {
|
|
121577
121584
|
viewBox: $(d.viewBox),
|
|
121578
121585
|
path: d.path,
|
|
121579
121586
|
...d.special ? { special: !0 } : {},
|
|
@@ -121582,8 +121589,8 @@ function ert(e, t, n = {}) {
|
|
|
121582
121589
|
...h || {},
|
|
121583
121590
|
...l?.outline || {},
|
|
121584
121591
|
...u.outline
|
|
121585
|
-
} : void 0 : l?.outline || h, _ = m ? u.text ?
|
|
121586
|
-
return
|
|
121592
|
+
} : void 0 : l?.outline || h, _ = m ? u.text ? Ont(r.slides.theme, l?.text, u.text) : void 0 : Ont(r.slides.theme, l?.text);
|
|
121593
|
+
return vet({
|
|
121587
121594
|
fill: r.slides.theme.themeColors[0] || "#ffffff",
|
|
121588
121595
|
fixedRatio: !1,
|
|
121589
121596
|
...f,
|
|
@@ -121594,9 +121601,9 @@ function ert(e, t, n = {}) {
|
|
|
121594
121601
|
});
|
|
121595
121602
|
}, H = (e, t, n) => {
|
|
121596
121603
|
let i = B(e, t), a = Q7(n);
|
|
121597
|
-
"text" in n && (a.text = n.text ?
|
|
121598
|
-
let o =
|
|
121599
|
-
return
|
|
121604
|
+
"text" in n && (a.text = n.text ? Ont(r.slides.theme, i.element.text, n.text) : void 0);
|
|
121605
|
+
let o = yet(i.element, a);
|
|
121606
|
+
return ynt(r, i.slideIndex, i.elementIndex, o);
|
|
121600
121607
|
}, U = (e, t) => {
|
|
121601
121608
|
let n = o9(r.slides.slides, e, t, r.slides.slideIndex);
|
|
121602
121609
|
if (n.element.type !== "latex") throw Error(`Element is not a LaTeX element: ${e}`);
|
|
@@ -121606,7 +121613,7 @@ function ert(e, t, n = {}) {
|
|
|
121606
121613
|
let t = o9(r.slides.slides, e.elementId, e.slideId, r.slides.slideIndex).element;
|
|
121607
121614
|
return t.type === "latex" ? $(t) : null;
|
|
121608
121615
|
}), O("latex.create", (e) => {
|
|
121609
|
-
let { slide: t, index: n } = a9(r.slides.slides, e.slideId, r.slides.slideIndex), i =
|
|
121616
|
+
let { slide: t, index: n } = a9(r.slides.slides, e.slideId, r.slides.slideIndex), i = Cet(e.element), a = $(t.elements);
|
|
121610
121617
|
return a.splice(i9(e.index, a.length), 0, i), N9(r, n, { elements: a }), e.select !== !1 && r.main.setActiveElementIdList([i.id]), i;
|
|
121611
121618
|
}), O("latex.update", (e) => {
|
|
121612
121619
|
let t = U(e.elementId, e.slideId), n = {
|
|
@@ -121614,13 +121621,13 @@ function ert(e, t, n = {}) {
|
|
|
121614
121621
|
type: "latex"
|
|
121615
121622
|
}, i = typeof n.latex == "string" ? n.latex.trim() : "", a = typeof n.path == "string" && n.path.trim().length > 0;
|
|
121616
121623
|
if (i && i !== t.element.latex && !a) {
|
|
121617
|
-
let e =
|
|
121624
|
+
let e = xet(i);
|
|
121618
121625
|
n.latex = i, n.path = e.path, n.viewBox === void 0 && (n.viewBox = e.viewBox);
|
|
121619
121626
|
}
|
|
121620
121627
|
return P9(r, t.slideIndex, t.elementIndex, n);
|
|
121621
|
-
}), O("elements.setOutline", (e) => n9(e.elementId).map((t) => R9(r, t, e.slideId,
|
|
121628
|
+
}), O("elements.setOutline", (e) => n9(e.elementId).map((t) => R9(r, t, e.slideId, Jtt, "Outline", { outline: e.outline }))), O("elements.setShadow", (e) => n9(e.elementId).map((t) => R9(r, t, e.slideId, Ytt, "Shadow", { shadow: e.shadow }))), O("elements.setFill", (e) => n9(e.elementId).map((t) => {
|
|
121622
121629
|
let n = o9(r.slides.slides, t, e.slideId, r.slides.slideIndex);
|
|
121623
|
-
if (!
|
|
121630
|
+
if (!Xtt.includes(n.element.type)) throw Error(`Fill is not supported for ${n.element.type} element: ${t}`);
|
|
121624
121631
|
let i = n.element.type === "shape" ? {
|
|
121625
121632
|
fill: e.fill,
|
|
121626
121633
|
gradient: void 0,
|
|
@@ -121684,24 +121691,24 @@ function ert(e, t, n = {}) {
|
|
|
121684
121691
|
if (n.element.type !== "line") throw Error(`Element is not a line: ${e}`);
|
|
121685
121692
|
return n;
|
|
121686
121693
|
}, re = (e, t, n) => {
|
|
121687
|
-
let i = ne(e, t), a =
|
|
121688
|
-
return
|
|
121694
|
+
let i = ne(e, t), a = Oet(i.element, n);
|
|
121695
|
+
return ynt(r, i.slideIndex, i.elementIndex, a);
|
|
121689
121696
|
};
|
|
121690
121697
|
O("lines.get", (e) => {
|
|
121691
121698
|
let t = o9(r.slides.slides, e.elementId, e.slideId, r.slides.slideIndex).element;
|
|
121692
121699
|
return t.type === "line" ? $(t) : null;
|
|
121693
121700
|
}), O("lines.create", (e) => {
|
|
121694
|
-
let { slide: t, index: n } = a9(r.slides.slides, e.slideId, r.slides.slideIndex), i =
|
|
121701
|
+
let { slide: t, index: n } = a9(r.slides.slides, e.slideId, r.slides.slideIndex), i = Det(e.element), a = $(t.elements);
|
|
121695
121702
|
return a.splice(i9(e.index, a.length), 0, i), N9(r, n, { elements: a }), e.select !== !1 && r.main.setActiveElementIdList([i.id]), i;
|
|
121696
121703
|
}), O("lines.update", (e) => re(e.elementId, e.slideId, e.patch)), O("lines.setStyle", (e) => re(e.elementId, e.slideId, e.style)), O("lines.setArrowheads", (e) => re(e.elementId, e.slideId, { points: e.points })), O("lines.setDirection", (e) => {
|
|
121697
121704
|
let t = e.direction === "auto" ? void 0 : e.direction;
|
|
121698
121705
|
return re(e.elementId, e.slideId, { broken2Direction: t });
|
|
121699
|
-
}), O("richText.setContent", (e) => P(e)), O("richText.setStyle", (e) => F(e)), O("richText.setParagraphAttrs", (e) => I(e)), O("animations.list", (e = {}) =>
|
|
121706
|
+
}), O("richText.setContent", (e) => P(e)), O("richText.setStyle", (e) => F(e)), O("richText.setParagraphAttrs", (e) => I(e)), O("animations.list", (e = {}) => Ant(r, e.slideId, e.elementId)), O("animations.catalog", () => Fnt()), O("animations.sequence", (e = {}) => Pnt(r, e.slideId)), O("animations.create", (e) => {
|
|
121700
121707
|
let { slide: t, index: n } = a9(r.slides.slides, e.slideId, r.slides.slideIndex);
|
|
121701
121708
|
s9(t, e.animation.elId);
|
|
121702
|
-
let i =
|
|
121709
|
+
let i = jet(e.animation);
|
|
121703
121710
|
return N9(r, n, { animations: [...t.animations || [], i] }), i;
|
|
121704
|
-
}), O("animations.update", (e) =>
|
|
121711
|
+
}), O("animations.update", (e) => Nnt(r, e.slideId, e.animationId, e.patch)), O("animations.setTrigger", (e) => Nnt(r, e.slideId, e.animationId, { trigger: e.trigger })), O("animations.setDuration", (e) => Nnt(r, e.slideId, e.animationId, { duration: e.duration })), O("animations.delete", (e) => {
|
|
121705
121712
|
let t = n9(e.animationId), { slide: n, index: i } = a9(r.slides.slides, e.slideId, r.slides.slideIndex);
|
|
121706
121713
|
for (let e of t) {
|
|
121707
121714
|
let t = (n.animations || []).find((t) => t.id === e);
|
|
@@ -121729,7 +121736,7 @@ function ert(e, t, n = {}) {
|
|
|
121729
121736
|
}, r.slides.theme), u = $(s.elements);
|
|
121730
121737
|
return u.splice(i9(n, u.length), 0, l), N9(r, c, { elements: u }), i !== !1 && r.main.setActiveElementIdList([l.id]), l;
|
|
121731
121738
|
}), O("tables.update", (e) => {
|
|
121732
|
-
let t = G(e.elementId, e.slideId), n =
|
|
121739
|
+
let t = G(e.elementId, e.slideId), n = Bet(t.element, e.patch);
|
|
121733
121740
|
return P9(r, t.slideIndex, t.elementIndex, n);
|
|
121734
121741
|
}), O("tables.setCell", (e) => {
|
|
121735
121742
|
let t = G(e.elementId, e.slideId), { data: n, colWidths: i } = q9(t.element, $(t.element.data)), a = q7(e.row, n.length, "row"), o = q7(e.col, n[a]?.length || 0, "col");
|
|
@@ -121751,7 +121758,7 @@ function ert(e, t, n = {}) {
|
|
|
121751
121758
|
});
|
|
121752
121759
|
}), O("tables.insertRow", (e) => {
|
|
121753
121760
|
let t = G(e.elementId, e.slideId), n = Math.max(W9(t.element), 1), i = K9($(t.element.data), n);
|
|
121754
|
-
i.splice(i9(e.rowIndex, i.length), 0, Array.from({ length: n }, () =>
|
|
121761
|
+
i.splice(i9(e.rowIndex, i.length), 0, Array.from({ length: n }, () => Fet()));
|
|
121755
121762
|
let a = G9(t.element.colWidths, n);
|
|
121756
121763
|
return P9(r, t.slideIndex, t.elementIndex, {
|
|
121757
121764
|
data: i,
|
|
@@ -121768,7 +121775,7 @@ function ert(e, t, n = {}) {
|
|
|
121768
121775
|
});
|
|
121769
121776
|
}), O("tables.insertColumn", (e) => {
|
|
121770
121777
|
let t = G(e.elementId, e.slideId), n = W9(t.element), i = i9(e.colIndex, n), a = K9($(t.element.data), n);
|
|
121771
|
-
for (let e of a) e.splice(i, 0,
|
|
121778
|
+
for (let e of a) e.splice(i, 0, Fet());
|
|
121772
121779
|
let o = G9(t.element.colWidths, n);
|
|
121773
121780
|
return o.splice(i, 0, n > 0 ? 1 / n : 1), P9(r, t.slideIndex, t.elementIndex, {
|
|
121774
121781
|
data: a,
|
|
@@ -121799,7 +121806,7 @@ function ert(e, t, n = {}) {
|
|
|
121799
121806
|
colWidths: i
|
|
121800
121807
|
});
|
|
121801
121808
|
}), O("tables.splitCell", (e) => {
|
|
121802
|
-
let t = G(e.elementId, e.slideId), { data: n, colWidths: i } = q9(t.element, $(t.element.data)), a = q7(e.row, n.length, "row"), o = q7(e.col, n[a]?.length || 0, "col"), s =
|
|
121809
|
+
let t = G(e.elementId, e.slideId), { data: n, colWidths: i } = q9(t.element, $(t.element.data)), a = q7(e.row, n.length, "row"), o = q7(e.col, n[a]?.length || 0, "col"), s = Unt(n, a, o);
|
|
121803
121810
|
if (!s) throw Error(`Table cell not found: ${a},${o}`);
|
|
121804
121811
|
return s.cell.rowspan = 1, s.cell.colspan = 1, P9(r, t.slideIndex, t.elementIndex, {
|
|
121805
121812
|
data: n,
|
|
@@ -121934,7 +121941,7 @@ function ert(e, t, n = {}) {
|
|
|
121934
121941
|
let t = F9(r, e.elementId, e.slideId), n = {
|
|
121935
121942
|
...t.element.clip || {
|
|
121936
121943
|
shape: "rect",
|
|
121937
|
-
range: $(
|
|
121944
|
+
range: $(_nt)
|
|
121938
121945
|
},
|
|
121939
121946
|
range: $(e.range),
|
|
121940
121947
|
...e.shape ? { shape: e.shape } : {}
|
|
@@ -121945,7 +121952,7 @@ function ert(e, t, n = {}) {
|
|
|
121945
121952
|
return "shape" in e.mask && (e.mask.shape === void 0 ? i.push("clip") : n.clip = {
|
|
121946
121953
|
...t.element.clip || {
|
|
121947
121954
|
shape: "rect",
|
|
121948
|
-
range: $(
|
|
121955
|
+
range: $(_nt)
|
|
121949
121956
|
},
|
|
121950
121957
|
shape: e.mask.shape
|
|
121951
121958
|
}), "radius" in e.mask && (e.mask.radius === void 0 ? i.push("radius") : n.radius = e.mask.radius), "colorMask" in e.mask && (e.mask.colorMask === void 0 ? i.push("colorMask") : n.colorMask = e.mask.colorMask), I9(r, t.slideIndex, t.elementIndex, n, i);
|
|
@@ -121957,11 +121964,11 @@ function ert(e, t, n = {}) {
|
|
|
121957
121964
|
return I9(r, t.slideIndex, t.elementIndex, e.filters === void 0 ? {} : { filters: e.filters }, e.filters === void 0 ? ["filters"] : []);
|
|
121958
121965
|
}), O("images.setFilter", (e) => {
|
|
121959
121966
|
let t = F9(r, e.elementId, e.slideId), n = { ...t.element.filters || {} };
|
|
121960
|
-
return e.value === void 0 ? delete n[e.key] : n[e.key] =
|
|
121967
|
+
return e.value === void 0 ? delete n[e.key] : n[e.key] = vnt(e.key, e.value), I9(r, t.slideIndex, t.elementIndex, { filters: n });
|
|
121961
121968
|
}), O("images.setOpacity", (e) => {
|
|
121962
121969
|
let t = F9(r, e.elementId, e.slideId), n = {
|
|
121963
121970
|
...t.element.filters || {},
|
|
121964
|
-
opacity:
|
|
121971
|
+
opacity: vnt("opacity", e.opacity)
|
|
121965
121972
|
};
|
|
121966
121973
|
return I9(r, t.slideIndex, t.elementIndex, { filters: n });
|
|
121967
121974
|
}), O("images.setFlip", (e) => {
|
|
@@ -122046,14 +122053,14 @@ function ert(e, t, n = {}) {
|
|
|
122046
122053
|
ext: t.ext
|
|
122047
122054
|
});
|
|
122048
122055
|
}, ge = (e) => {
|
|
122049
|
-
let t = me(e.elementId, e.slideId), n = H9(
|
|
122056
|
+
let t = me(e.elementId, e.slideId), n = H9(met(e.patch));
|
|
122050
122057
|
return P9(r, t.slideIndex, t.elementIndex, {
|
|
122051
122058
|
...n,
|
|
122052
122059
|
type: "audio"
|
|
122053
122060
|
});
|
|
122054
122061
|
};
|
|
122055
122062
|
O("audio.get", (e) => $(me(e.elementId, e.slideId).element)), O("audio.create", (e) => {
|
|
122056
|
-
let { slide: t, index: n } = a9(r.slides.slides, e.slideId, r.slides.slideIndex), i =
|
|
122063
|
+
let { slide: t, index: n } = a9(r.slides.slides, e.slideId, r.slides.slideIndex), i = pet(e, r.slides.theme.themeColors[0] || "#4472c4"), a = $(t.elements);
|
|
122057
122064
|
return a.splice(i9(e.index, a.length), 0, i), N9(r, n, { elements: a }), e.select !== !1 && r.main.setActiveElementIdList([i.id]), i;
|
|
122058
122065
|
}), O("audio.update", (e) => ge(e)), O("audio.setSource", (e) => ge({
|
|
122059
122066
|
elementId: e.elementId,
|
|
@@ -122072,10 +122079,10 @@ function ert(e, t, n = {}) {
|
|
|
122072
122079
|
slideId: e.slideId,
|
|
122073
122080
|
patch: { transform: e.transform }
|
|
122074
122081
|
})), O("notes.create", (e) => {
|
|
122075
|
-
let { slide: t, index: n } = a9(r.slides.slides, e.slideId, r.slides.slideIndex), i =
|
|
122082
|
+
let { slide: t, index: n } = a9(r.slides.slides, e.slideId, r.slides.slideIndex), i = Met(e.note);
|
|
122076
122083
|
return i.elId && s9(t, i.elId), N9(r, n, { notes: [...t.notes || [], i] }), i;
|
|
122077
122084
|
}), O("notes.update", (e) => {
|
|
122078
|
-
let { slide: t, index: n } = a9(r.slides.slides, e.slideId, r.slides.slideIndex), i = $(t.notes || []), { noteIndex: a } = Y9(i, e.noteId), o =
|
|
122085
|
+
let { slide: t, index: n } = a9(r.slides.slides, e.slideId, r.slides.slideIndex), i = $(t.notes || []), { noteIndex: a } = Y9(i, e.noteId), o = Net(e.patch);
|
|
122079
122086
|
return o.elId && s9(t, o.elId), i[a] = {
|
|
122080
122087
|
...i[a],
|
|
122081
122088
|
...o
|
|
@@ -122084,9 +122091,9 @@ function ert(e, t, n = {}) {
|
|
|
122084
122091
|
let t = n9(e.noteId), { slide: n, index: i } = a9(r.slides.slides, e.slideId, r.slides.slideIndex);
|
|
122085
122092
|
return N9(r, i, { notes: (n.notes || []).filter((e) => !t.includes(e.id)) }), { deleted: t };
|
|
122086
122093
|
}), O("notes.reply", (e) => {
|
|
122087
|
-
let { slide: t, index: n } = a9(r.slides.slides, e.slideId, r.slides.slideIndex), i = $(t.notes || []), { note: a } = Y9(i, e.noteId), o =
|
|
122094
|
+
let { slide: t, index: n } = a9(r.slides.slides, e.slideId, r.slides.slideIndex), i = $(t.notes || []), { note: a } = Y9(i, e.noteId), o = Pet(e.reply);
|
|
122088
122095
|
return a.replies = [...a.replies || [], o], N9(r, n, { notes: i }), o;
|
|
122089
|
-
}), O("sections.list", () =>
|
|
122096
|
+
}), O("sections.list", () => Hnt(r.slides.slides)), O("sections.set", (e) => {
|
|
122090
122097
|
if (!e.section?.id) throw Error("Section id is required");
|
|
122091
122098
|
let { index: t } = a9(r.slides.slides, e.slideId, r.slides.slideIndex), n = $(r.slides.slides);
|
|
122092
122099
|
for (let r = 0; r < n.length; r++) r !== t && n[r].sectionTag?.id === e.section.id && delete n[r].sectionTag;
|
|
@@ -122118,19 +122125,19 @@ function ert(e, t, n = {}) {
|
|
|
122118
122125
|
let a = t.splice(n.startIndex, n.slideIds.length), o = i > n.startIndex ? i - a.length : i;
|
|
122119
122126
|
return t.splice(i9(o, t.length), 0, ...a), r.slides.setSlides(t), r.slides.updateSlideIndex(r9(o, t.length)), $(t);
|
|
122120
122127
|
}), O("search.find", (e) => {
|
|
122121
|
-
let t =
|
|
122122
|
-
for (let e of r.slides.slides) for (let r of e.elements) r.type === "text" ? n.push(...
|
|
122128
|
+
let t = znt(e.query, e.options), n = [];
|
|
122129
|
+
for (let e of r.slides.slides) for (let r of e.elements) r.type === "text" ? n.push(...Bnt(r.content, t, {
|
|
122123
122130
|
slideId: e.id,
|
|
122124
122131
|
elementId: r.id,
|
|
122125
122132
|
elementType: r.type,
|
|
122126
122133
|
path: "content"
|
|
122127
|
-
})) : r.type === "shape" && r.text?.content ? n.push(...
|
|
122134
|
+
})) : r.type === "shape" && r.text?.content ? n.push(...Bnt(r.text.content, t, {
|
|
122128
122135
|
slideId: e.id,
|
|
122129
122136
|
elementId: r.id,
|
|
122130
122137
|
elementType: r.type,
|
|
122131
122138
|
path: "text.content"
|
|
122132
122139
|
})) : r.type === "table" && r.data.forEach((i, a) => i.forEach((i, o) => {
|
|
122133
|
-
n.push(...
|
|
122140
|
+
n.push(...Bnt(i.text, t, {
|
|
122134
122141
|
slideId: e.id,
|
|
122135
122142
|
elementId: r.id,
|
|
122136
122143
|
elementType: r.type,
|
|
@@ -122144,8 +122151,8 @@ function ert(e, t, n = {}) {
|
|
|
122144
122151
|
results: n
|
|
122145
122152
|
};
|
|
122146
122153
|
}), O("search.replace", (e) => {
|
|
122147
|
-
let t =
|
|
122148
|
-
let a =
|
|
122154
|
+
let t = znt(e.query, e.options), n = $(r.slides.slides), i = [], a = (n, r) => {
|
|
122155
|
+
let a = Gnt(n, t, e.replacement, e.options, r, (e) => i.length + e > 0);
|
|
122149
122156
|
return i.push(...a.results), a.text;
|
|
122150
122157
|
};
|
|
122151
122158
|
for (let e of n) for (let t of e.elements) t.type === "text" ? t.content = a(t.content, {
|
|
@@ -122172,7 +122179,7 @@ function ert(e, t, n = {}) {
|
|
|
122172
122179
|
count: i.length,
|
|
122173
122180
|
results: i
|
|
122174
122181
|
};
|
|
122175
|
-
}), O("history.commit", async () => M9(r, s)), O("history.undo", async () => (await r.snapshot.unDo(), M9(r, s))), O("history.redo", async () => (await r.snapshot.reDo(), M9(r, s))), O("view.goToSlide", (e) => (Q9(r, e.slideIdOrIndex), M9(r, s))), O("view.nextSlide", () => (Q9(r, r.slides.slideIndex + 1), M9(r, s))), O("view.previousSlide", () => (Q9(r, r.slides.slideIndex - 1), M9(r, s))), O("view.setZoom", (e) => (r.main.setCanvasScale(e.scale), M9(r, s))), O("view.enterPresentation", () => (r.screen.setScreening(!0), M9(r, s))), O("view.exitPresentation", () => (r.screen.setScreening(!1), M9(r, s))), O("view.setLocale", async (e) => (await (n.setLocale ||
|
|
122182
|
+
}), O("history.commit", async () => M9(r, s)), O("history.undo", async () => (await r.snapshot.unDo(), M9(r, s))), O("history.redo", async () => (await r.snapshot.reDo(), M9(r, s))), O("view.goToSlide", (e) => (Q9(r, e.slideIdOrIndex), M9(r, s))), O("view.nextSlide", () => (Q9(r, r.slides.slideIndex + 1), M9(r, s))), O("view.previousSlide", () => (Q9(r, r.slides.slideIndex - 1), M9(r, s))), O("view.setZoom", (e) => (r.main.setCanvasScale(e.scale), M9(r, s))), O("view.enterPresentation", () => (r.screen.setScreening(!0), M9(r, s))), O("view.exitPresentation", () => (r.screen.setScreening(!1), M9(r, s))), O("view.setLocale", async (e) => (await (n.setLocale || n9e)(e.locale), { locale: e.locale }));
|
|
122176
122183
|
let _e = async (e) => {
|
|
122177
122184
|
if (o) return h(e, /* @__PURE__ */ Error("PPTist controller has been destroyed"));
|
|
122178
122185
|
let t = T9(r), n = s;
|
|
@@ -122345,8 +122352,8 @@ function ert(e, t, n = {}) {
|
|
|
122345
122352
|
},
|
|
122346
122353
|
markdownToHtml: (e) => T1(e),
|
|
122347
122354
|
docs: () => $(y9),
|
|
122348
|
-
domains: () =>
|
|
122349
|
-
describe: (e) =>
|
|
122355
|
+
domains: () => Ktt(D),
|
|
122356
|
+
describe: (e) => Gtt(D, e),
|
|
122350
122357
|
guides: (e) => $(e ? y9.guides.find((t) => t.id === e) ?? null : y9.guides),
|
|
122351
122358
|
deck: {
|
|
122352
122359
|
get: () => w9(r),
|
|
@@ -122361,7 +122368,7 @@ function ert(e, t, n = {}) {
|
|
|
122361
122368
|
theme: e,
|
|
122362
122369
|
options: t
|
|
122363
122370
|
}, n),
|
|
122364
|
-
extractTheme: (e) =>
|
|
122371
|
+
extractTheme: (e) => ant(r, e),
|
|
122365
122372
|
setViewport: (e, t) => q("deck.setViewport", e, t),
|
|
122366
122373
|
setTemplates: (e, t) => q("deck.setTemplates", { templates: e }, t)
|
|
122367
122374
|
},
|
|
@@ -122418,11 +122425,11 @@ function ert(e, t, n = {}) {
|
|
|
122418
122425
|
}, n)
|
|
122419
122426
|
},
|
|
122420
122427
|
templates: {
|
|
122421
|
-
catalog: () =>
|
|
122428
|
+
catalog: () => Jet(),
|
|
122422
122429
|
slidesCatalog: (e, t) => q("templates.slidesCatalog", { templateId: e }, t)
|
|
122423
122430
|
},
|
|
122424
|
-
styles: { catalog: () =>
|
|
122425
|
-
layouts: { catalog: () =>
|
|
122431
|
+
styles: { catalog: () => Htt() },
|
|
122432
|
+
layouts: { catalog: () => Itt() },
|
|
122426
122433
|
elements: {
|
|
122427
122434
|
list: (e) => $(a9(r.slides.slides, e, r.slides.slideIndex).slide.elements),
|
|
122428
122435
|
get: (e, t) => $(o9(r.slides.slides, e, t, r.slides.slideIndex).element),
|
|
@@ -122604,7 +122611,7 @@ function ert(e, t, n = {}) {
|
|
|
122604
122611
|
}, n)
|
|
122605
122612
|
},
|
|
122606
122613
|
shapes: {
|
|
122607
|
-
presets: (e) =>
|
|
122614
|
+
presets: (e) => Ent(e),
|
|
122608
122615
|
get: (e, t) => {
|
|
122609
122616
|
let n = o9(r.slides.slides, e, t, r.slides.slideIndex).element;
|
|
122610
122617
|
return n.type === "shape" ? $(n) : null;
|
|
@@ -122669,7 +122676,7 @@ function ert(e, t, n = {}) {
|
|
|
122669
122676
|
fill: t
|
|
122670
122677
|
},
|
|
122671
122678
|
meta: n
|
|
122672
|
-
}, () => H(e, n?.slideId,
|
|
122679
|
+
}, () => H(e, n?.slideId, knt(t))),
|
|
122673
122680
|
setOutline: (e, t, n) => S({
|
|
122674
122681
|
type: "shapes.setOutline",
|
|
122675
122682
|
payload: {
|
|
@@ -122763,9 +122770,9 @@ function ert(e, t, n = {}) {
|
|
|
122763
122770
|
audio: (e, t, n) => Se("audio", e, t, n)
|
|
122764
122771
|
},
|
|
122765
122772
|
animations: {
|
|
122766
|
-
list: (e, t) =>
|
|
122767
|
-
catalog: () =>
|
|
122768
|
-
sequence: (e) =>
|
|
122773
|
+
list: (e, t) => Ant(r, e, t),
|
|
122774
|
+
catalog: () => Fnt(),
|
|
122775
|
+
sequence: (e) => Pnt(r, e),
|
|
122769
122776
|
create: (e, t, n) => q("animations.create", {
|
|
122770
122777
|
slideId: e,
|
|
122771
122778
|
animation: t
|
|
@@ -123141,7 +123148,7 @@ function ert(e, t, n = {}) {
|
|
|
123141
123148
|
meta: a
|
|
123142
123149
|
};
|
|
123143
123150
|
try {
|
|
123144
|
-
let { note: o } = Y9(a9(r.slides.slides, e, r.slides.slideIndex).slide.notes || [], t), s = $(o.replies || []), { replyIndex: c } =
|
|
123151
|
+
let { note: o } = Y9(a9(r.slides.slides, e, r.slides.slideIndex).slide.notes || [], t), s = $(o.replies || []), { replyIndex: c } = Knt(s, n), l = {
|
|
123145
123152
|
...s[c],
|
|
123146
123153
|
...$(i)
|
|
123147
123154
|
};
|
|
@@ -123176,7 +123183,7 @@ function ert(e, t, n = {}) {
|
|
|
123176
123183
|
};
|
|
123177
123184
|
try {
|
|
123178
123185
|
let a = n9(n), { note: o } = Y9(a9(r.slides.slides, e, r.slides.slideIndex).slide.notes || [], t), s = $(o.replies || []);
|
|
123179
|
-
for (let e of a)
|
|
123186
|
+
for (let e of a) Knt(s, e);
|
|
123180
123187
|
let c = await q("notes.update", {
|
|
123181
123188
|
slideId: e,
|
|
123182
123189
|
noteId: t,
|
|
@@ -123216,7 +123223,7 @@ function ert(e, t, n = {}) {
|
|
|
123216
123223
|
sectionId: e,
|
|
123217
123224
|
toIndex: t
|
|
123218
123225
|
}, n),
|
|
123219
|
-
list: () =>
|
|
123226
|
+
list: () => Hnt(r.slides.slides)
|
|
123220
123227
|
},
|
|
123221
123228
|
search: {
|
|
123222
123229
|
find: (e, t) => q("search.find", {
|
|
@@ -123281,23 +123288,23 @@ function ert(e, t, n = {}) {
|
|
|
123281
123288
|
}
|
|
123282
123289
|
//#endregion
|
|
123283
123290
|
//#region src/embed/createController.ts
|
|
123284
|
-
function
|
|
123291
|
+
function nrt(e, t) {
|
|
123285
123292
|
let n, r = ((...r) => {
|
|
123286
123293
|
clearTimeout(n), n = setTimeout(() => e(...r), t);
|
|
123287
123294
|
});
|
|
123288
123295
|
return r.cancel = () => clearTimeout(n), r;
|
|
123289
123296
|
}
|
|
123290
|
-
function
|
|
123297
|
+
function rrt(e, t) {
|
|
123291
123298
|
return Number.isFinite(e) ? Math.max(0, Math.min(Math.trunc(e), Math.max(t - 1, 0))) : 0;
|
|
123292
123299
|
}
|
|
123293
|
-
async function
|
|
123300
|
+
async function irt(e) {
|
|
123294
123301
|
let t = await e;
|
|
123295
123302
|
if (!t.ok) throw Error(t.errors?.map((e) => e.message).join("; ") || "PPTist command failed");
|
|
123296
123303
|
}
|
|
123297
|
-
function
|
|
123298
|
-
let r = ss(e), i = Os(e), a =
|
|
123299
|
-
await
|
|
123300
|
-
} }), o = n.onChange ?
|
|
123304
|
+
function art(e, t, n) {
|
|
123305
|
+
let r = ss(e), i = Os(e), a = trt(e, t, { async setLocale(e) {
|
|
123306
|
+
await n9e(e), r.setTemplates(is());
|
|
123307
|
+
} }), o = n.onChange ? nrt(() => {
|
|
123301
123308
|
n.onChange?.({
|
|
123302
123309
|
title: r.title,
|
|
123303
123310
|
slides: JSON.parse(JSON.stringify(r.slides)),
|
|
@@ -123308,7 +123315,7 @@ function irt(e, t, n) {
|
|
|
123308
123315
|
r.slides,
|
|
123309
123316
|
r.theme
|
|
123310
123317
|
], () => o(), { deep: !0 }) : null, c = n.onPresentationModeChange ? V(() => i.screening, (e) => n.onPresentationModeChange?.(e)) : null, l = !1, u = (e) => {
|
|
123311
|
-
let t = typeof e == "number" ?
|
|
123318
|
+
let t = typeof e == "number" ? rrt(e, r.slides.length) : r.slides.findIndex((t) => t.id === e);
|
|
123312
123319
|
if (t < 0) throw Error(`Slide not found: ${e}`);
|
|
123313
123320
|
return t;
|
|
123314
123321
|
};
|
|
@@ -123324,7 +123331,7 @@ function irt(e, t, n) {
|
|
|
123324
123331
|
l || a.api.deck.setTitle(e, { source: "host" });
|
|
123325
123332
|
},
|
|
123326
123333
|
async setLocale(e) {
|
|
123327
|
-
l || await
|
|
123334
|
+
l || await irt(a.api.view.setLocale(e));
|
|
123328
123335
|
},
|
|
123329
123336
|
goToSlide(e) {
|
|
123330
123337
|
l || (u(e), a.api.view.goToSlide(e, { source: "host" }));
|
|
@@ -123352,7 +123359,7 @@ function irt(e, t, n) {
|
|
|
123352
123359
|
//#endregion
|
|
123353
123360
|
//#region src/embed/mount.ts
|
|
123354
123361
|
var $9 = /* @__PURE__ */ new WeakMap();
|
|
123355
|
-
function
|
|
123362
|
+
function ort(e) {
|
|
123356
123363
|
if (typeof e == "string") {
|
|
123357
123364
|
let t = document.querySelector(e);
|
|
123358
123365
|
if (!t) throw Error(`PPTist mount target not found: ${e}`);
|
|
@@ -123360,8 +123367,8 @@ function art(e) {
|
|
|
123360
123367
|
}
|
|
123361
123368
|
return e;
|
|
123362
123369
|
}
|
|
123363
|
-
async function
|
|
123364
|
-
let n =
|
|
123370
|
+
async function srt(e, t = {}) {
|
|
123371
|
+
let n = ort(e), r = $9.get(n);
|
|
123365
123372
|
if (r) try {
|
|
123366
123373
|
(await r).controller.destroy();
|
|
123367
123374
|
} catch {}
|
|
@@ -123372,10 +123379,10 @@ async function ort(e, t = {}) {
|
|
|
123372
123379
|
let r = document.createElement("div");
|
|
123373
123380
|
r.className = "pptist-embed-portal", n.appendChild(e), n.appendChild(r), Mc(r), ns(t.assetBaseUrl), Fi(t.exportTabs), lVe(t.templateLoaders);
|
|
123374
123381
|
let o = t.locale ?? Xo();
|
|
123375
|
-
Zo(o), await
|
|
123376
|
-
let s = ne(), c = a(
|
|
123377
|
-
c.use(
|
|
123378
|
-
let l =
|
|
123382
|
+
Zo(o), await n9e(o);
|
|
123383
|
+
let s = ne(), c = a(i9e, { init: t });
|
|
123384
|
+
c.use(y9e), c.use(s), c.use(qd, o), c.mount(e);
|
|
123385
|
+
let l = art(s, c, {
|
|
123379
123386
|
onChange: t.onChange,
|
|
123380
123387
|
onChangeDebounceMs: t.onChangeDebounceMs,
|
|
123381
123388
|
onPresentationModeChange: t.onPresentationModeChange
|
|
@@ -123395,8 +123402,8 @@ async function ort(e, t = {}) {
|
|
|
123395
123402
|
throw $9.get(n) === i && $9.delete(n), e;
|
|
123396
123403
|
}
|
|
123397
123404
|
}
|
|
123398
|
-
async function
|
|
123405
|
+
async function crt(e) {
|
|
123399
123406
|
e.controller.destroy();
|
|
123400
123407
|
}
|
|
123401
123408
|
//#endregion
|
|
123402
|
-
export { me as i,
|
|
123409
|
+
export { me as i, srt as mountPptist, ue as n, de as r, K as t, crt as unmountPptist };
|