@chili-publish/studio-sdk 1.25.1 → 1.26.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/_bundles/main.es.js +2391 -0
- package/_bundles/main.es.js.map +1 -0
- package/_bundles/main.js +22 -2
- package/_bundles/main.js.map +1 -1
- package/connector-types/src/Connector.Shared.d.ts +30 -0
- package/connector-types/src/Connector.Shared.js +2 -0
- package/connector-types/src/Connector.Shared.js.map +1 -0
- package/connector-types/src/DataConnector.d.ts +34 -0
- package/connector-types/src/DataConnector.js +2 -0
- package/connector-types/src/DataConnector.js.map +1 -0
- package/connector-types/src/FontConnector.d.ts +20 -0
- package/connector-types/src/FontConnector.js +2 -0
- package/connector-types/src/FontConnector.js.map +1 -0
- package/connector-types/src/MediaConnector.d.ts +20 -0
- package/connector-types/src/MediaConnector.js +2 -0
- package/connector-types/src/MediaConnector.js.map +1 -0
- package/connector-types/src/index.d.ts +4 -0
- package/connector-types/src/index.js +5 -0
- package/connector-types/src/index.js.map +1 -0
- package/lib/editor-engine.json +1 -1
- package/lib/package.json +10 -18
- package/lib/src/controllers/ActionController.d.ts +13 -13
- package/lib/src/controllers/ActionController.js.map +1 -1
- package/lib/src/controllers/AnimationController.d.ts +10 -10
- package/lib/src/controllers/AnimationController.js.map +1 -1
- package/lib/src/controllers/BarcodeController.d.ts +15 -15
- package/lib/src/controllers/BarcodeController.js.map +1 -1
- package/lib/src/controllers/BrandKitController.d.ts +57 -0
- package/lib/src/controllers/BrandKitController.js +275 -0
- package/lib/src/controllers/BrandKitController.js.map +1 -0
- package/lib/src/controllers/CanvasController.d.ts +4 -4
- package/lib/src/controllers/CanvasController.js.map +1 -1
- package/lib/src/controllers/CharacterStyleController.d.ts +8 -8
- package/lib/src/controllers/CharacterStyleController.js.map +1 -1
- package/lib/src/controllers/ClipboardController.d.ts +4 -4
- package/lib/src/controllers/ClipboardController.js.map +1 -1
- package/lib/src/controllers/ColorConversionController.d.ts +1 -1
- package/lib/src/controllers/ColorConversionController.js.map +1 -1
- package/lib/src/controllers/ColorStyleController.d.ts +8 -8
- package/lib/src/controllers/ColorStyleController.js.map +1 -1
- package/lib/src/controllers/ConfigurationController.d.ts +4 -4
- package/lib/src/controllers/ConfigurationController.js.map +1 -1
- package/lib/src/controllers/ConnectorController.d.ts +3 -3
- package/lib/src/controllers/ConnectorController.js +1 -1
- package/lib/src/controllers/ConnectorController.js.map +1 -1
- package/lib/src/controllers/DataConnectorController.d.ts +4 -3
- package/lib/src/controllers/DataConnectorController.js.map +1 -1
- package/lib/src/controllers/DataSourceController.d.ts +4 -4
- package/lib/src/controllers/DataSourceController.js.map +1 -1
- package/lib/src/controllers/DebugController.d.ts +4 -4
- package/lib/src/controllers/DebugController.js.map +1 -1
- package/lib/src/controllers/DocumentController.d.ts +4 -4
- package/lib/src/controllers/DocumentController.js.map +1 -1
- package/lib/src/controllers/ExperimentController.d.ts +8 -8
- package/lib/src/controllers/ExperimentController.js.map +1 -1
- package/lib/src/controllers/FontConnectorController.d.ts +2 -2
- package/lib/src/controllers/FontConnectorController.js +1 -1
- package/lib/src/controllers/FontConnectorController.js.map +1 -1
- package/lib/src/controllers/FontController.d.ts +13 -13
- package/lib/src/controllers/FontController.js.map +1 -1
- package/lib/src/controllers/FrameController.d.ts +1 -1
- package/lib/src/controllers/FrameController.js.map +1 -1
- package/lib/src/controllers/InfoController.js.map +1 -1
- package/lib/src/controllers/LayoutController.d.ts +1 -1
- package/lib/src/controllers/LayoutController.js.map +1 -1
- package/lib/src/controllers/MediaConnectorController.d.ts +9 -9
- package/lib/src/controllers/MediaConnectorController.js +8 -8
- package/lib/src/controllers/MediaConnectorController.js.map +1 -1
- package/lib/src/controllers/PageController.js.map +1 -1
- package/lib/src/controllers/ParagraphStyleController.d.ts +8 -8
- package/lib/src/controllers/ParagraphStyleController.js.map +1 -1
- package/lib/src/controllers/ShapeController.d.ts +11 -11
- package/lib/src/controllers/ShapeController.js.map +1 -1
- package/lib/src/controllers/SubscriberController.js.map +1 -1
- package/lib/src/controllers/TextStyleController.d.ts +3 -3
- package/lib/src/controllers/TextStyleController.js.map +1 -1
- package/lib/src/controllers/ToolController.d.ts +11 -11
- package/lib/src/controllers/ToolController.js.map +1 -1
- package/lib/src/controllers/UndoManagerController.d.ts +9 -9
- package/lib/src/controllers/UndoManagerController.js.map +1 -1
- package/lib/src/controllers/UtilsController.d.ts +3 -3
- package/lib/src/controllers/UtilsController.js.map +1 -1
- package/lib/src/controllers/VariableController.d.ts +50 -50
- package/lib/src/controllers/VariableController.js +3 -1
- package/lib/src/controllers/VariableController.js.map +1 -1
- package/lib/src/index.d.ts +5 -3
- package/lib/src/index.js +3 -2
- package/lib/src/index.js.map +1 -1
- package/lib/src/interactions/Connector.js.map +1 -1
- package/lib/src/next/NextInitiator.js.map +1 -1
- package/lib/src/next/controllers/CanvasController.d.ts +1 -1
- package/lib/src/next/controllers/CanvasController.js.map +1 -1
- package/lib/src/next/controllers/ConnectorController.d.ts +3 -3
- package/lib/src/next/controllers/ConnectorController.js.map +1 -1
- package/lib/src/next/controllers/PageController.d.ts +2 -2
- package/lib/src/next/controllers/PageController.js.map +1 -1
- package/lib/src/next/controllers/SubscriberController.js.map +1 -1
- package/lib/src/next/controllers/VariableController.d.ts +8 -8
- package/lib/src/next/controllers/VariableController.js +3 -1
- package/lib/src/next/controllers/VariableController.js.map +1 -1
- package/lib/src/next/index.d.ts +2 -2
- package/lib/src/next/index.js.map +1 -1
- package/lib/src/next/tests/controllers/CanvasController.test.js.map +1 -1
- package/lib/src/next/tests/controllers/ConnectorController.test.js.map +1 -1
- package/lib/src/next/tests/controllers/PageController.test.js.map +1 -1
- package/lib/src/next/tests/controllers/SubscriberContoller.test.js.map +1 -1
- package/lib/src/next/tests/controllers/VariableController.test.js.map +1 -1
- package/lib/src/next/types/ConnectorTypes.js.map +1 -1
- package/lib/src/next/types/NextSubscribers.js.map +1 -1
- package/lib/src/next/types/PageTypes.js.map +1 -1
- package/lib/src/next/types/VariableTypes.js.map +1 -1
- package/lib/src/sdk.d.ts +3 -1
- package/lib/src/sdk.js +3 -0
- package/lib/src/sdk.js.map +1 -1
- package/lib/src/setupTests.js.map +1 -1
- package/lib/src/tests/__mocks__/Animations.js.map +1 -1
- package/lib/src/tests/__mocks__/Brandkit.js +374 -0
- package/lib/src/tests/__mocks__/Brandkit.js.map +1 -0
- package/lib/src/tests/__mocks__/Config.js.map +1 -1
- package/lib/src/tests/__mocks__/FrameProperties.js.map +1 -1
- package/lib/src/tests/__mocks__/MockImageFrameSource.js.map +1 -1
- package/lib/src/tests/__mocks__/localConfig.js.map +1 -1
- package/lib/src/tests/__mocks__/mockDocument.js.map +1 -1
- package/lib/src/tests/controllers/ActionController.test.js.map +1 -1
- package/lib/src/tests/controllers/AnimationController.test.js.map +1 -1
- package/lib/src/tests/controllers/BarcodeController.test.js.map +1 -1
- package/lib/src/tests/controllers/BrandKitController.test.js +213 -0
- package/lib/src/tests/controllers/BrandKitController.test.js.map +1 -0
- package/lib/src/tests/controllers/CanvasController.test.js.map +1 -1
- package/lib/src/tests/controllers/CharacterStyleController.test.js +22 -0
- package/lib/src/tests/controllers/CharacterStyleController.test.js.map +1 -1
- package/lib/src/tests/controllers/ClipboardController.test.js.map +1 -1
- package/lib/src/tests/controllers/ColorConversionController.test.js.map +1 -1
- package/lib/src/tests/controllers/ColorStyleController.test.js.map +1 -1
- package/lib/src/tests/controllers/ConnectorController.test.js.map +1 -1
- package/lib/src/tests/controllers/DataConnectorController.test.js +1 -1
- package/lib/src/tests/controllers/DataConnectorController.test.js.map +1 -1
- package/lib/src/tests/controllers/DataSourceController.test.js.map +1 -1
- package/lib/src/tests/controllers/DebugController.test.js.map +1 -1
- package/lib/src/tests/controllers/DocumentController.test.js.map +1 -1
- package/lib/src/tests/controllers/ExperimentController.test.js.map +1 -1
- package/lib/src/tests/controllers/FontConnectorController.test.js.map +1 -1
- package/lib/src/tests/controllers/FontController.test.js.map +1 -1
- package/lib/src/tests/controllers/FrameController.test.js.map +1 -1
- package/lib/src/tests/controllers/InfoController.test.js.map +1 -1
- package/lib/src/tests/controllers/LayoutController.test.js.map +1 -1
- package/lib/src/tests/controllers/MediaConnectorController.test.js.map +1 -1
- package/lib/src/tests/controllers/PageController.test.js.map +1 -1
- package/lib/src/tests/controllers/ParagraphStyleController.test.js +25 -0
- package/lib/src/tests/controllers/ParagraphStyleController.test.js.map +1 -1
- package/lib/src/tests/controllers/ShapeController.test.js.map +1 -1
- package/lib/src/tests/controllers/SubscriberContoller.test.js.map +1 -1
- package/lib/src/tests/controllers/TextStyleController.test.js.map +1 -1
- package/lib/src/tests/controllers/ToolController.test.js.map +1 -1
- package/lib/src/tests/controllers/UndoManagerController.test.js.map +1 -1
- package/lib/src/tests/controllers/UtilsController.test.js.map +1 -1
- package/lib/src/tests/controllers/VariableController.test.js.map +1 -1
- package/lib/src/tests/index.test.js.map +1 -1
- package/lib/src/tests/interactions/Connector.test.js.map +1 -1
- package/lib/src/tests/utils/ConnectorCompatibilityTools.test.js.map +1 -1
- package/lib/src/tests/utils/EditorResponseData.test.js.map +1 -1
- package/lib/src/tests/utils/EventSubscription.test.js.map +1 -1
- package/lib/src/tests/utils/LocalConfigurationDecorator.test.js.map +1 -1
- package/lib/src/tests/utils/Logging.test.js.map +1 -1
- package/lib/src/tests/utils/Round.test.js.map +1 -1
- package/lib/src/types/ActionTypes.js.map +1 -1
- package/lib/src/types/AnimationTypes.js.map +1 -1
- package/lib/src/types/BarcodeTypes.js.map +1 -1
- package/lib/src/types/BrandKitTypes.d.ts +122 -0
- package/lib/src/types/BrandKitTypes.js +2 -0
- package/lib/src/types/BrandKitTypes.js.map +1 -0
- package/lib/src/types/CharacterStyleTypes.d.ts +29 -14
- package/lib/src/types/CharacterStyleTypes.js.map +1 -1
- package/lib/src/types/ClipboardTypes.js.map +1 -1
- package/lib/src/types/ColorStyleTypes.d.ts +20 -5
- package/lib/src/types/ColorStyleTypes.js +18 -2
- package/lib/src/types/ColorStyleTypes.js.map +1 -1
- package/lib/src/types/CommonTypes.d.ts +1 -28
- package/lib/src/types/CommonTypes.js +0 -10
- package/lib/src/types/CommonTypes.js.map +1 -1
- package/lib/src/types/ConfigurationTypes.js.map +1 -1
- package/lib/src/types/ConnectorTypes.d.ts +16 -13
- package/lib/src/types/ConnectorTypes.js +10 -0
- package/lib/src/types/ConnectorTypes.js.map +1 -1
- package/lib/src/types/DataConnectorTypes.d.ts +2 -32
- package/lib/src/types/DataConnectorTypes.js.map +1 -1
- package/lib/src/types/DebugTypes.js.map +1 -1
- package/lib/src/types/DocumentTypes.d.ts +83 -4
- package/lib/src/types/DocumentTypes.js +6 -0
- package/lib/src/types/DocumentTypes.js.map +1 -1
- package/lib/src/types/EngineEditModeTypes.js.map +1 -1
- package/lib/src/types/FontConnectorTypes.d.ts +1 -19
- package/lib/src/types/FontConnectorTypes.js.map +1 -1
- package/lib/src/types/FontTypes.js.map +1 -1
- package/lib/src/types/FrameTypes.js +0 -1
- package/lib/src/types/FrameTypes.js.map +1 -1
- package/lib/src/types/LayoutTypes.d.ts +18 -17
- package/lib/src/types/LayoutTypes.js.map +1 -1
- package/lib/src/types/MediaConnectorTypes.d.ts +7 -23
- package/lib/src/types/MediaConnectorTypes.js +2 -0
- package/lib/src/types/MediaConnectorTypes.js.map +1 -1
- package/lib/src/types/PageTypes.js.map +1 -1
- package/lib/src/types/ParagraphStyleTypes.d.ts +35 -17
- package/lib/src/types/ParagraphStyleTypes.js.map +1 -1
- package/lib/src/types/ShapeTypes.js.map +1 -1
- package/lib/src/types/TextStyleTypes.d.ts +8 -2
- package/lib/src/types/TextStyleTypes.js +2 -0
- package/lib/src/types/TextStyleTypes.js.map +1 -1
- package/lib/src/types/TextTypes.js.map +1 -1
- package/lib/src/types/VariableTypes.js.map +1 -1
- package/lib/src/types/ViewModeTypes.js.map +1 -1
- package/lib/src/types/ViewportTypes.js.map +1 -1
- package/lib/src/utils/BrandKitHelper.d.ts +9 -0
- package/lib/src/utils/BrandKitHelper.js +72 -0
- package/lib/src/utils/BrandKitHelper.js.map +1 -0
- package/lib/src/utils/ConfigHelper.js.map +1 -1
- package/lib/src/utils/ConnectorCompatibilityTools.js.map +1 -1
- package/lib/src/utils/DataItemMappingTools.js.map +1 -1
- package/lib/src/utils/EditorResponseData.d.ts +1 -1
- package/lib/src/utils/EditorResponseData.js.map +1 -1
- package/lib/src/utils/EngineCallbackHandler.js.map +1 -1
- package/lib/src/utils/EngineEvent.js.map +1 -1
- package/lib/src/utils/EngineEventTrigger.js.map +1 -1
- package/lib/src/utils/Enums.js.map +1 -1
- package/lib/src/utils/LocalConfigurationDecorator.d.ts +2 -2
- package/lib/src/utils/LocalConfigurationDecorator.js.map +1 -1
- package/lib/src/utils/MathUtils.js.map +1 -1
- package/package.json +10 -18
- package/_bundles/report.html +0 -38
- package/lib/src/next/tests/controllers/CanvasController.test.d.ts +0 -1
- package/lib/src/next/tests/controllers/ConnectorController.test.d.ts +0 -1
- package/lib/src/next/tests/controllers/PageController.test.d.ts +0 -1
- package/lib/src/next/tests/controllers/SubscriberContoller.test.d.ts +0 -1
- package/lib/src/next/tests/controllers/VariableController.test.d.ts +0 -1
- package/lib/src/setupTests.d.ts +0 -1
- package/lib/src/tests/__mocks__/Animations.d.ts +0 -2
- package/lib/src/tests/__mocks__/Config.d.ts +0 -4
- package/lib/src/tests/__mocks__/FrameProperties.d.ts +0 -52
- package/lib/src/tests/__mocks__/MockImageFrameSource.d.ts +0 -4
- package/lib/src/tests/__mocks__/localConfig.d.ts +0 -2
- package/lib/src/tests/__mocks__/mockDocument.d.ts +0 -1
- package/lib/src/tests/controllers/ActionController.test.d.ts +0 -1
- package/lib/src/tests/controllers/AnimationController.test.d.ts +0 -1
- package/lib/src/tests/controllers/BarcodeController.test.d.ts +0 -1
- package/lib/src/tests/controllers/CanvasController.test.d.ts +0 -1
- package/lib/src/tests/controllers/CharacterStyleController.test.d.ts +0 -1
- package/lib/src/tests/controllers/ClipboardController.test.d.ts +0 -1
- package/lib/src/tests/controllers/ColorConversionController.test.d.ts +0 -1
- package/lib/src/tests/controllers/ColorStyleController.test.d.ts +0 -1
- package/lib/src/tests/controllers/ConnectorController.test.d.ts +0 -1
- package/lib/src/tests/controllers/DataConnectorController.test.d.ts +0 -1
- package/lib/src/tests/controllers/DataSourceController.test.d.ts +0 -1
- package/lib/src/tests/controllers/DebugController.test.d.ts +0 -1
- package/lib/src/tests/controllers/DocumentController.test.d.ts +0 -1
- package/lib/src/tests/controllers/ExperimentController.test.d.ts +0 -1
- package/lib/src/tests/controllers/FontConnectorController.test.d.ts +0 -1
- package/lib/src/tests/controllers/FontController.test.d.ts +0 -1
- package/lib/src/tests/controllers/FrameController.test.d.ts +0 -1
- package/lib/src/tests/controllers/InfoController.test.d.ts +0 -1
- package/lib/src/tests/controllers/LayoutController.test.d.ts +0 -1
- package/lib/src/tests/controllers/MediaConnectorController.test.d.ts +0 -1
- package/lib/src/tests/controllers/PageController.test.d.ts +0 -1
- package/lib/src/tests/controllers/ParagraphStyleController.test.d.ts +0 -1
- package/lib/src/tests/controllers/ShapeController.test.d.ts +0 -1
- package/lib/src/tests/controllers/SubscriberContoller.test.d.ts +0 -1
- package/lib/src/tests/controllers/TextStyleController.test.d.ts +0 -1
- package/lib/src/tests/controllers/ToolController.test.d.ts +0 -1
- package/lib/src/tests/controllers/UndoManagerController.test.d.ts +0 -1
- package/lib/src/tests/controllers/UtilsController.test.d.ts +0 -1
- package/lib/src/tests/controllers/VariableController.test.d.ts +0 -1
- package/lib/src/tests/index.test.d.ts +0 -1
- package/lib/src/tests/interactions/Connector.test.d.ts +0 -1
- package/lib/src/tests/utils/ConnectorCompatibilityTools.test.d.ts +0 -1
- package/lib/src/tests/utils/EditorResponseData.test.d.ts +0 -1
- package/lib/src/tests/utils/EventSubscription.test.d.ts +0 -1
- package/lib/src/tests/utils/LocalConfigurationDecorator.test.d.ts +0 -1
- package/lib/src/tests/utils/Logging.test.d.ts +0 -1
- package/lib/src/tests/utils/Round.test.d.ts +0 -1
|
@@ -0,0 +1,2391 @@
|
|
|
1
|
+
var Ie = (s) => {
|
|
2
|
+
throw TypeError(s);
|
|
3
|
+
};
|
|
4
|
+
var ve = (s, a, t) => a.has(s) || Ie("Cannot " + t);
|
|
5
|
+
var i = (s, a, t) => (ve(s, a, "read from private field"), t ? t.call(s) : a.get(s)), u = (s, a, t) => a.has(s) ? Ie("Cannot add the same private member more than once") : a instanceof WeakSet ? a.add(s) : a.set(s, t), g = (s, a, t, e) => (ve(s, a, "write to private field"), e ? e.call(s, t) : a.set(s, t), t);
|
|
6
|
+
const bs = "2.9.latest", cs = {
|
|
7
|
+
current: bs
|
|
8
|
+
}, Is = "1.26.0", hs = {
|
|
9
|
+
version: Is
|
|
10
|
+
};
|
|
11
|
+
var H;
|
|
12
|
+
(function(s) {
|
|
13
|
+
s.Call = "call", s.Reply = "reply", s.Syn = "syn", s.SynAck = "synAck", s.Ack = "ack";
|
|
14
|
+
})(H || (H = {}));
|
|
15
|
+
var it;
|
|
16
|
+
(function(s) {
|
|
17
|
+
s.Fulfilled = "fulfilled", s.Rejected = "rejected";
|
|
18
|
+
})(it || (it = {}));
|
|
19
|
+
var Rt;
|
|
20
|
+
(function(s) {
|
|
21
|
+
s.ConnectionDestroyed = "ConnectionDestroyed", s.ConnectionTimeout = "ConnectionTimeout", s.NoIframeSrc = "NoIframeSrc";
|
|
22
|
+
})(Rt || (Rt = {}));
|
|
23
|
+
var Yt;
|
|
24
|
+
(function(s) {
|
|
25
|
+
s.DataCloneError = "DataCloneError";
|
|
26
|
+
})(Yt || (Yt = {}));
|
|
27
|
+
var at;
|
|
28
|
+
(function(s) {
|
|
29
|
+
s.Message = "message";
|
|
30
|
+
})(at || (at = {}));
|
|
31
|
+
const vs = (s, a) => {
|
|
32
|
+
const t = [];
|
|
33
|
+
let e = !1;
|
|
34
|
+
return {
|
|
35
|
+
destroy(r) {
|
|
36
|
+
e || (e = !0, a(`${s}: Destroying connection`), t.forEach((n) => {
|
|
37
|
+
n(r);
|
|
38
|
+
}));
|
|
39
|
+
},
|
|
40
|
+
onDestroy(r) {
|
|
41
|
+
e ? r() : t.push(r);
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
}, Ps = (s) => (...a) => {
|
|
45
|
+
s && console.log("[Penpal]", ...a);
|
|
46
|
+
}, As = {
|
|
47
|
+
"http:": "80",
|
|
48
|
+
"https:": "443"
|
|
49
|
+
}, Fs = /^(https?:)?\/\/([^/:]+)?(:(\d+))?/, Es = ["file:", "data:"], Ls = (s) => {
|
|
50
|
+
if (s && Es.find((l) => s.startsWith(l)))
|
|
51
|
+
return "null";
|
|
52
|
+
const a = document.location, t = Fs.exec(s);
|
|
53
|
+
let e, r, n;
|
|
54
|
+
t ? (e = t[1] ? t[1] : a.protocol, r = t[2], n = t[4]) : (e = a.protocol, r = a.hostname, n = a.port);
|
|
55
|
+
const c = n && n !== As[e] ? `:${n}` : "";
|
|
56
|
+
return `${e}//${r}${c}`;
|
|
57
|
+
}, Pe = ({ name: s, message: a, stack: t }) => ({
|
|
58
|
+
name: s,
|
|
59
|
+
message: a,
|
|
60
|
+
stack: t
|
|
61
|
+
}), Ds = (s) => {
|
|
62
|
+
const a = new Error();
|
|
63
|
+
return Object.keys(s).forEach((t) => a[t] = s[t]), a;
|
|
64
|
+
}, Os = (s, a, t) => {
|
|
65
|
+
const { localName: e, local: r, remote: n, originForSending: c, originForReceiving: l } = s;
|
|
66
|
+
let h = !1;
|
|
67
|
+
const y = (p) => {
|
|
68
|
+
if (p.source !== n || p.data.penpal !== H.Call)
|
|
69
|
+
return;
|
|
70
|
+
if (p.origin !== l) {
|
|
71
|
+
t(`${e} received message from origin ${p.origin} which did not match expected origin ${l}`);
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
const m = p.data, { methodName: S, args: b, id: v } = m;
|
|
75
|
+
t(`${e}: Received ${S}() call`);
|
|
76
|
+
const J = (A) => (k) => {
|
|
77
|
+
if (t(`${e}: Sending ${S}() reply`), h) {
|
|
78
|
+
t(`${e}: Unable to send ${S}() reply due to destroyed connection`);
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
const D = {
|
|
82
|
+
penpal: H.Reply,
|
|
83
|
+
id: v,
|
|
84
|
+
resolution: A,
|
|
85
|
+
returnValue: k
|
|
86
|
+
};
|
|
87
|
+
A === it.Rejected && k instanceof Error && (D.returnValue = Pe(k), D.returnValueIsError = !0);
|
|
88
|
+
try {
|
|
89
|
+
n.postMessage(D, c);
|
|
90
|
+
} catch (I) {
|
|
91
|
+
if (I.name === Yt.DataCloneError) {
|
|
92
|
+
const _ = {
|
|
93
|
+
penpal: H.Reply,
|
|
94
|
+
id: v,
|
|
95
|
+
resolution: it.Rejected,
|
|
96
|
+
returnValue: Pe(I),
|
|
97
|
+
returnValueIsError: !0
|
|
98
|
+
};
|
|
99
|
+
n.postMessage(_, c);
|
|
100
|
+
}
|
|
101
|
+
throw I;
|
|
102
|
+
}
|
|
103
|
+
};
|
|
104
|
+
new Promise((A) => A(a[S].apply(a, b))).then(J(it.Fulfilled), J(it.Rejected));
|
|
105
|
+
};
|
|
106
|
+
return r.addEventListener(at.Message, y), () => {
|
|
107
|
+
h = !0, r.removeEventListener(at.Message, y);
|
|
108
|
+
};
|
|
109
|
+
};
|
|
110
|
+
let Ns = 0;
|
|
111
|
+
const xs = () => ++Ns, ls = ".", ds = (s) => s ? s.split(ls) : [], Rs = (s) => s.join(ls), Ms = (s, a) => {
|
|
112
|
+
const t = ds(a || "");
|
|
113
|
+
return t.push(s), Rs(t);
|
|
114
|
+
}, Vs = (s, a, t) => {
|
|
115
|
+
const e = ds(a);
|
|
116
|
+
return e.reduce((r, n, c) => (typeof r[n] > "u" && (r[n] = {}), c === e.length - 1 && (r[n] = t), r[n]), s), s;
|
|
117
|
+
}, us = (s, a) => {
|
|
118
|
+
const t = {};
|
|
119
|
+
return Object.keys(s).forEach((e) => {
|
|
120
|
+
const r = s[e], n = Ms(e, a);
|
|
121
|
+
typeof r == "object" && Object.assign(t, us(r, n)), typeof r == "function" && (t[n] = r);
|
|
122
|
+
}), t;
|
|
123
|
+
}, Js = (s) => {
|
|
124
|
+
const a = {};
|
|
125
|
+
for (const t in s)
|
|
126
|
+
Vs(a, t, s[t]);
|
|
127
|
+
return a;
|
|
128
|
+
}, Bs = (s, a, t, e, r) => {
|
|
129
|
+
const { localName: n, local: c, remote: l, originForSending: h, originForReceiving: y } = a;
|
|
130
|
+
let p = !1;
|
|
131
|
+
r(`${n}: Connecting call sender`);
|
|
132
|
+
const m = (b) => (...v) => {
|
|
133
|
+
r(`${n}: Sending ${b}() call`);
|
|
134
|
+
let J;
|
|
135
|
+
try {
|
|
136
|
+
l.closed && (J = !0);
|
|
137
|
+
} catch {
|
|
138
|
+
J = !0;
|
|
139
|
+
}
|
|
140
|
+
if (J && e(), p) {
|
|
141
|
+
const A = new Error(`Unable to send ${b}() call due to destroyed connection`);
|
|
142
|
+
throw A.code = Rt.ConnectionDestroyed, A;
|
|
143
|
+
}
|
|
144
|
+
return new Promise((A, k) => {
|
|
145
|
+
const D = xs(), I = ($) => {
|
|
146
|
+
if ($.source !== l || $.data.penpal !== H.Reply || $.data.id !== D)
|
|
147
|
+
return;
|
|
148
|
+
if ($.origin !== y) {
|
|
149
|
+
r(`${n} received message from origin ${$.origin} which did not match expected origin ${y}`);
|
|
150
|
+
return;
|
|
151
|
+
}
|
|
152
|
+
const Ct = $.data;
|
|
153
|
+
r(`${n}: Received ${b}() reply`), c.removeEventListener(at.Message, I);
|
|
154
|
+
let mt = Ct.returnValue;
|
|
155
|
+
Ct.returnValueIsError && (mt = Ds(mt)), (Ct.resolution === it.Fulfilled ? A : k)(mt);
|
|
156
|
+
};
|
|
157
|
+
c.addEventListener(at.Message, I);
|
|
158
|
+
const _ = {
|
|
159
|
+
penpal: H.Call,
|
|
160
|
+
id: D,
|
|
161
|
+
methodName: b,
|
|
162
|
+
args: v
|
|
163
|
+
};
|
|
164
|
+
l.postMessage(_, h);
|
|
165
|
+
});
|
|
166
|
+
}, S = t.reduce((b, v) => (b[v] = m(v), b), {});
|
|
167
|
+
return Object.assign(s, Js(S)), () => {
|
|
168
|
+
p = !0;
|
|
169
|
+
};
|
|
170
|
+
}, Us = (s, a, t, e, r) => {
|
|
171
|
+
const { destroy: n, onDestroy: c } = e;
|
|
172
|
+
let l, h;
|
|
173
|
+
const y = {};
|
|
174
|
+
return (p) => {
|
|
175
|
+
if (p.origin !== a) {
|
|
176
|
+
r(`Parent: Handshake - Received ACK message from origin ${p.origin} which did not match expected origin ${a}`);
|
|
177
|
+
return;
|
|
178
|
+
}
|
|
179
|
+
r("Parent: Handshake - Received ACK");
|
|
180
|
+
const m = {
|
|
181
|
+
localName: "Parent",
|
|
182
|
+
local: window,
|
|
183
|
+
remote: p.source,
|
|
184
|
+
originForSending: t,
|
|
185
|
+
originForReceiving: a
|
|
186
|
+
};
|
|
187
|
+
l && l(), l = Os(m, s, r), c(l), h && h.forEach((b) => {
|
|
188
|
+
delete y[b];
|
|
189
|
+
}), h = p.data.methodNames;
|
|
190
|
+
const S = Bs(y, m, h, n, r);
|
|
191
|
+
return c(S), y;
|
|
192
|
+
};
|
|
193
|
+
}, ks = (s, a, t, e) => (r) => {
|
|
194
|
+
if (r.origin !== t) {
|
|
195
|
+
s(`Parent: Handshake - Received SYN message from origin ${r.origin} which did not match expected origin ${t}`);
|
|
196
|
+
return;
|
|
197
|
+
}
|
|
198
|
+
s("Parent: Handshake - Received SYN, responding with SYN-ACK");
|
|
199
|
+
const n = {
|
|
200
|
+
penpal: H.SynAck,
|
|
201
|
+
methodNames: Object.keys(a)
|
|
202
|
+
};
|
|
203
|
+
r.source.postMessage(n, e);
|
|
204
|
+
}, Ts = 6e4, Gs = (s, a) => {
|
|
205
|
+
const { destroy: t, onDestroy: e } = a, r = setInterval(() => {
|
|
206
|
+
s.isConnected || (clearInterval(r), t());
|
|
207
|
+
}, Ts);
|
|
208
|
+
e(() => {
|
|
209
|
+
clearInterval(r);
|
|
210
|
+
});
|
|
211
|
+
}, Hs = (s, a) => {
|
|
212
|
+
let t;
|
|
213
|
+
return s !== void 0 && (t = window.setTimeout(() => {
|
|
214
|
+
const e = new Error(`Connection timed out after ${s}ms`);
|
|
215
|
+
e.code = Rt.ConnectionTimeout, a(e);
|
|
216
|
+
}, s)), () => {
|
|
217
|
+
clearTimeout(t);
|
|
218
|
+
};
|
|
219
|
+
}, _s = (s) => {
|
|
220
|
+
if (!s.src && !s.srcdoc) {
|
|
221
|
+
const a = new Error("Iframe must have src or srcdoc property defined.");
|
|
222
|
+
throw a.code = Rt.NoIframeSrc, a;
|
|
223
|
+
}
|
|
224
|
+
}, $s = (s) => {
|
|
225
|
+
let { iframe: a, methods: t = {}, childOrigin: e, timeout: r, debug: n = !1 } = s;
|
|
226
|
+
const c = Ps(n), l = vs("Parent", c), { onDestroy: h, destroy: y } = l;
|
|
227
|
+
e || (_s(a), e = Ls(a.src));
|
|
228
|
+
const p = e === "null" ? "*" : e, m = us(t), S = ks(c, m, e, p), b = Us(m, e, p, l, c);
|
|
229
|
+
return {
|
|
230
|
+
promise: new Promise((J, A) => {
|
|
231
|
+
const k = Hs(r, y), D = (I) => {
|
|
232
|
+
if (!(I.source !== a.contentWindow || !I.data)) {
|
|
233
|
+
if (I.data.penpal === H.Syn) {
|
|
234
|
+
S(I);
|
|
235
|
+
return;
|
|
236
|
+
}
|
|
237
|
+
if (I.data.penpal === H.Ack) {
|
|
238
|
+
const _ = b(I);
|
|
239
|
+
_ && (k(), J(_));
|
|
240
|
+
return;
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
};
|
|
244
|
+
window.addEventListener(at.Message, D), c("Parent: Awaiting handshake"), Gs(a, l), h((I) => {
|
|
245
|
+
window.removeEventListener(at.Message, D), I && A(I);
|
|
246
|
+
});
|
|
247
|
+
}),
|
|
248
|
+
destroy() {
|
|
249
|
+
y();
|
|
250
|
+
}
|
|
251
|
+
};
|
|
252
|
+
}, zs = (s) => {
|
|
253
|
+
const a = new RegExp(/^(?:http(s)?:\/\/)?[\w.-]+(?:\.[\w.-]+)+[\w]+\/$/);
|
|
254
|
+
let t = "";
|
|
255
|
+
return a.test(s) ? t = s : s.indexOf("/index.html") > -1 ? t = s.replace("/index.html", "/") : s.charAt(-1) !== "/" && (t = `${s}/`), t;
|
|
256
|
+
}, Ks = (s, a, t) => {
|
|
257
|
+
const e = zs(a), n = `<html>
|
|
258
|
+
<head>
|
|
259
|
+
<base href="/" />
|
|
260
|
+
<meta charset="UTF-8"/>
|
|
261
|
+
<!-- use this property to pass the StudioStyling to the engine -->
|
|
262
|
+
<meta name="studio-styling" content='${JSON.stringify(t || {})}'>
|
|
263
|
+
</head>
|
|
264
|
+
<body>
|
|
265
|
+
<script>
|
|
266
|
+
<\/script>
|
|
267
|
+
<script src="${e}init.js" async><\/script>
|
|
268
|
+
<script src="${e}init_engine.js"><\/script>
|
|
269
|
+
<script>
|
|
270
|
+
initializeStudioEngine({
|
|
271
|
+
assetBase: '${e}',
|
|
272
|
+
entryPointUrl: '${e}main.dart.js',
|
|
273
|
+
});
|
|
274
|
+
<\/script>
|
|
275
|
+
</body>
|
|
276
|
+
</html>
|
|
277
|
+
`;
|
|
278
|
+
s.srcdoc = n;
|
|
279
|
+
}, Ws = (s, a, t, e = "chili-editor", r) => {
|
|
280
|
+
const n = `#${e}`, c = document.createElement("iframe");
|
|
281
|
+
c.setAttribute("srcdoc", " "), c.setAttribute("title", "Chili-Editor"), c.setAttribute("style", "width: 100%; height: 100%;"), c.setAttribute("frameBorder", "0"), c.setAttribute("referrerpolicy", "origin");
|
|
282
|
+
const l = () => {
|
|
283
|
+
const h = document.querySelector(n);
|
|
284
|
+
h && (h == null || h.appendChild(c), Ks(c, s, r));
|
|
285
|
+
};
|
|
286
|
+
document.readyState === "complete" || document.readyState === "interactive" ? l() : document.addEventListener("DOMContentLoaded", () => {
|
|
287
|
+
l();
|
|
288
|
+
}), t(
|
|
289
|
+
$s({
|
|
290
|
+
// The iframe to which a connection should be made
|
|
291
|
+
iframe: c,
|
|
292
|
+
// All the methods that we want to expose to the child should be inside the methods object
|
|
293
|
+
// f.e. stateChange(documentJson)
|
|
294
|
+
methods: {
|
|
295
|
+
actionsChanged: a.onActionsChanged,
|
|
296
|
+
stateChanged: a.onStateChanged,
|
|
297
|
+
documentLoaded: a.onDocumentLoaded,
|
|
298
|
+
authExpired: a.onAuthExpired,
|
|
299
|
+
viewportRequested: a.onViewportRequested,
|
|
300
|
+
selectedFramesContent: a.onSelectedFramesContentChanged,
|
|
301
|
+
selectedFramesLayout: a.onSelectedFramesLayoutChanged,
|
|
302
|
+
allFramesLayout: a.onFramesLayoutChanged,
|
|
303
|
+
selectedLayoutProperties: a.onSelectedLayoutPropertiesChanged,
|
|
304
|
+
openLayoutPropertiesPanel: a.onPageSelectionChanged,
|
|
305
|
+
selectedLayoutUnit: a.onSelectedLayoutUnitChanged,
|
|
306
|
+
scrubberPositionChanged: a.onScrubberPositionChanged,
|
|
307
|
+
frameAnimationsChanged: a.onFrameAnimationsChanged,
|
|
308
|
+
selectedToolChanged: a.onSelectedToolChanged,
|
|
309
|
+
variableListChanged: a.onVariableListChanged,
|
|
310
|
+
undoStackStateChanged: a.onUndoStateChanged,
|
|
311
|
+
selectedLayoutFramesChanged: a.onSelectedLayoutFramesChanged,
|
|
312
|
+
selectedTextStyleChanged: a.onSelectedTextStyleChanged,
|
|
313
|
+
colorsChanged: a.onColorsChanged,
|
|
314
|
+
paragraphStylesChanged: a.onParagraphStylesChanged,
|
|
315
|
+
characterStylesChanged: a.onCharacterStylesChanged,
|
|
316
|
+
fontFamiliesChanged: a.onFontFamiliesChanged,
|
|
317
|
+
selectedLayoutId: a.onSelectedLayoutIdChanged,
|
|
318
|
+
layoutListChanged: a.onLayoutsChanged,
|
|
319
|
+
connectorEvent: a.onConnectorEvent,
|
|
320
|
+
connectorsChanged: a.onConnectorsChanged,
|
|
321
|
+
zoomChanged: a.onZoomChanged,
|
|
322
|
+
pageSnapshotInvalidated: a.onPageSnapshotInvalidated,
|
|
323
|
+
pagesChanged: a.onPagesChanged,
|
|
324
|
+
pageSizeChanged: a.onPageSizeChanged,
|
|
325
|
+
shapeCornerRadiusChanged: a.onShapeCornerRadiusChanged,
|
|
326
|
+
cropActiveFrameIdChanged: a.onCropActiveFrameIdChanged,
|
|
327
|
+
asyncError: a.onAsyncError,
|
|
328
|
+
viewModeChanged: a.onViewModeChanged,
|
|
329
|
+
barcodeValidationChanged: a.onBarcodeValidationChanged,
|
|
330
|
+
selectedPageIdChanged: a.onSelectedPageIdChanged,
|
|
331
|
+
dataSourceIdChanged: a.onDataSourceIdChanged,
|
|
332
|
+
documentIssueListChanged: a.onDocumentIssueListChanged,
|
|
333
|
+
customUndoDataChanged: a.onCustomUndoDataChanged,
|
|
334
|
+
engineEditingModeChanged: a.onEngineEditModeChanged
|
|
335
|
+
}
|
|
336
|
+
})
|
|
337
|
+
);
|
|
338
|
+
};
|
|
339
|
+
var Y = /* @__PURE__ */ ((s) => (s.GraFxStudioEnvironmentApiUrl = "ENVIRONMENT_API", s.GraFxStudioSdkVersion = "SDK_VERSION", s.GraFxStudioDocumentType = "DOCUMENT_TYPE", s.GraFxStudioTemplateId = "TEMPLATE_ID", s.GraFxStudioAuthToken = "GRAFX_AUTH_TOKEN", s.QueryCallCacheEnabled = "ENABLE_QUERY_CALL_CACHE", s))(Y || {});
|
|
340
|
+
const js = {
|
|
341
|
+
shortcutOptions: {
|
|
342
|
+
debugPanel: { enabled: !1 },
|
|
343
|
+
ellipse: { enabled: !1 },
|
|
344
|
+
hand: { enabled: !1 },
|
|
345
|
+
image: { enabled: !1 },
|
|
346
|
+
polygon: { enabled: !1 },
|
|
347
|
+
rectangle: { enabled: !1 },
|
|
348
|
+
select: { enabled: !1 },
|
|
349
|
+
text: { enabled: !1 },
|
|
350
|
+
zoom: { enabled: !1 },
|
|
351
|
+
copyPaste: { enabled: !1 },
|
|
352
|
+
viewMode: { enabled: !1 }
|
|
353
|
+
}
|
|
354
|
+
};
|
|
355
|
+
var qs = /* @__PURE__ */ ((s) => (s.overflow = "overflow", s.fontLoading = "fontLoading", s.actionRegister = "actionRegister", s.actionExecution = "actionExecution", s.actionCircular = "actionCircular", s))(qs || {}), gs = /* @__PURE__ */ ((s) => (s.project = "project", s.template = "template", s))(gs || {});
|
|
356
|
+
const Ys = 404075;
|
|
357
|
+
function o(s, a = !0) {
|
|
358
|
+
try {
|
|
359
|
+
if (!s.success) {
|
|
360
|
+
const e = s.error ?? "Yikes, something went wrong", r = {
|
|
361
|
+
cause: {
|
|
362
|
+
name: String(s.status),
|
|
363
|
+
message: s.error ?? "Yikes, something went wrong"
|
|
364
|
+
}
|
|
365
|
+
};
|
|
366
|
+
if (s.status === Ys) {
|
|
367
|
+
const c = JSON.parse(s.data).statusCode;
|
|
368
|
+
throw new Zs(c, e, r);
|
|
369
|
+
} else
|
|
370
|
+
throw new Error(e, r);
|
|
371
|
+
}
|
|
372
|
+
const t = s.data && a;
|
|
373
|
+
return {
|
|
374
|
+
...s,
|
|
375
|
+
parsedData: t ? JSON.parse(s.data) : s.data
|
|
376
|
+
};
|
|
377
|
+
} catch (t) {
|
|
378
|
+
throw console.error(t), t;
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
class Zs extends Error {
|
|
382
|
+
constructor(a, t, e) {
|
|
383
|
+
super(t, e), this.statusCode = a;
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
var L;
|
|
387
|
+
class Ae {
|
|
388
|
+
/**
|
|
389
|
+
* @ignore
|
|
390
|
+
*/
|
|
391
|
+
constructor(a) {
|
|
392
|
+
/**
|
|
393
|
+
* @ignore
|
|
394
|
+
*/
|
|
395
|
+
u(this, L);
|
|
396
|
+
this.getAll = async () => (await i(this, L)).getActions().then((e) => o(e)), this.getById = async (t) => (await i(this, L)).getActionById(t).then((r) => o(r)), this.create = async () => (await i(this, L)).createAction().then((e) => o(e)), this.duplicate = async (t) => (await i(this, L)).duplicateAction(t).then((r) => o(r)), this.remove = async (t) => (await i(this, L)).removeAction(t).then((r) => o(r)), this.update = async (t, e) => (await i(this, L)).updateAction(t, JSON.stringify(e)).then((n) => o(n)), this.rename = async (t, e) => this.update(t, { name: e }), this.updateScript = async (t, e) => this.update(t, { script: e }), this.updateTriggers = async (t, e) => this.update(t, { triggers: e }), this.move = async (t, e) => (await i(this, L)).moveActions(t, e).then((n) => o(n)), this.setTypeError = async (t, e) => this.update(t, { hasTypeError: e }), this.disable = async () => (await i(this, L)).disableActions().then((e) => o(e)), this.enable = async () => (await i(this, L)).enableActions().then((e) => o(e)), g(this, L, a);
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
L = new WeakMap();
|
|
400
|
+
var E;
|
|
401
|
+
class Fe {
|
|
402
|
+
/**
|
|
403
|
+
* @ignore
|
|
404
|
+
*/
|
|
405
|
+
constructor(a) {
|
|
406
|
+
/**
|
|
407
|
+
* @ignore
|
|
408
|
+
*/
|
|
409
|
+
u(this, E);
|
|
410
|
+
this.getAllOnSelectedLayout = async () => (await i(this, E)).getAnimationsOnSelectedLayout().then((e) => o(e)), this.getByFrameId = async (t, e) => (await i(this, E)).getAnimationByFrameId(t, e).then((n) => o(n)), this.getByLayoutId = async (t) => (await i(this, E)).getAnimationsByLayoutId(t).then((r) => o(r)), this.setFrameAnimation = async (t) => (await i(this, E)).setFrameAnimation(JSON.stringify(t)).then(
|
|
411
|
+
(r) => o({ ...r, data: JSON.stringify(t) })
|
|
412
|
+
), this.play = async () => (await i(this, E)).playAnimation().then((e) => o(e)), this.pause = async () => (await i(this, E)).pauseAnimation().then((e) => o(e)), this.setScrubberPosition = async (t) => (await i(this, E)).setScrubberPosition(t).then((r) => o(r)), this.setDuration = async (t) => (await i(this, E)).setAnimationDuration(t).then((r) => o(r)), this.resetFrameAnimation = async (t) => (await i(this, E)).resetFrameAnimation(t).then((r) => o(r)), this.reset = async () => (await i(this, E)).resetAnimation().then((e) => o(e)), g(this, E, a);
|
|
413
|
+
}
|
|
414
|
+
}
|
|
415
|
+
E = new WeakMap();
|
|
416
|
+
var T = /* @__PURE__ */ ((s) => (s.code39 = "code39", s.code93 = "code93", s.code128 = "code128", s.dataMatrix = "dataMatrix", s.ean13 = "ean13", s.ean8 = "ean8", s.qr = "qr", s.upca = "upca", s.upce = "upce", s.gs1128 = "gs1128", s))(T || {}), Ot = /* @__PURE__ */ ((s) => (s.low = "low", s.medium = "medium", s.quartile = "quartile", s.high = "high", s))(Ot || {}), wt = /* @__PURE__ */ ((s) => (s.utf8 = "utf8", s.iso8859_1 = "iso8859_1", s.code128a = "code128a", s.code128b = "code128b", s.code128c = "code128c", s))(wt || {}), Qs = /* @__PURE__ */ ((s) => (s.success = "success", s.empty = "empty", s.invalidLength = "invalidLength", s.invalidCharacters = "invalidCharacters", s.invalidChecksum = "invalidChecksum", s.invalidUPCE = "invalidUPCE", s.otherError = "otherError", s))(Qs || {}), q = /* @__PURE__ */ ((s) => (s.top = "top", s.right = "right", s.bottom = "bottom", s.left = "left", s))(q || {}), Xs = /* @__PURE__ */ ((s) => (s.top = "top", s.child = "child", s))(Xs || {}), tr = /* @__PURE__ */ ((s) => (s.px = "px", s.mm = "mm", s.cm = "cm", s.inch = "inch", s.pt = "pt", s))(tr || {}), er = /* @__PURE__ */ ((s) => (s.print = "print", s.digitalStatic = "digitalStatic", s.digitalAnimated = "digitalAnimated", s))(er || {}), B;
|
|
417
|
+
class Ee {
|
|
418
|
+
/**
|
|
419
|
+
* @ignore
|
|
420
|
+
*/
|
|
421
|
+
constructor(a) {
|
|
422
|
+
/**
|
|
423
|
+
* @ignore
|
|
424
|
+
*/
|
|
425
|
+
u(this, B);
|
|
426
|
+
this.setBarcodeProperties = async (t, e) => (await i(this, B)).setBarcodeProperties(t, JSON.stringify(e)).then((n) => o(n)), this.setEnableBackground = async (t, e) => {
|
|
427
|
+
const r = { enableBackground: e };
|
|
428
|
+
return this.setBarcodeProperties(t, r);
|
|
429
|
+
}, this.setBackgroundColor = async (t, e) => {
|
|
430
|
+
const r = { backgroundColor: e };
|
|
431
|
+
return this.setBarcodeProperties(t, r);
|
|
432
|
+
}, this.setEnableBars = async (t, e) => {
|
|
433
|
+
const r = { enableBars: e };
|
|
434
|
+
return this.setBarcodeProperties(t, r);
|
|
435
|
+
}, this.setBarColor = async (t, e) => {
|
|
436
|
+
const r = { barColor: e };
|
|
437
|
+
return this.setBarcodeProperties(t, r);
|
|
438
|
+
}, this.setBarcodeSource = async (t, e) => (await i(this, B)).setBarcodeSource(t, JSON.stringify(e)).then((n) => o(n)), this.removeBarcodeSource = async (t) => (await i(this, B)).setBarcodeSource(t, null).then((r) => o(r)), this.setEnableText = async (t, e) => {
|
|
439
|
+
const r = { enableText: e };
|
|
440
|
+
return this.setBarcodeProperties(t, r);
|
|
441
|
+
}, this.setBarHeight = async (t, e) => {
|
|
442
|
+
const r = { barHeight: e };
|
|
443
|
+
return this.setBarcodeProperties(t, r);
|
|
444
|
+
}, this.setMagnification = async (t, e) => {
|
|
445
|
+
const r = { magnification: e };
|
|
446
|
+
return this.setBarcodeProperties(t, r);
|
|
447
|
+
}, this.setQuietZoneValue = async (t, e, r) => {
|
|
448
|
+
const n = r ? {
|
|
449
|
+
left: r === q.left ? e : void 0,
|
|
450
|
+
top: r === q.top ? e : void 0,
|
|
451
|
+
right: r === q.right ? e : void 0,
|
|
452
|
+
bottom: r === q.bottom ? e : void 0
|
|
453
|
+
} : { left: e, top: e, right: e, bottom: e };
|
|
454
|
+
return (await i(this, B)).setBarcodeProperties(t, JSON.stringify({ quietZone: n })).then((l) => o(l));
|
|
455
|
+
}, this.setAreQuietZoneValuesCombined = async (t, e) => {
|
|
456
|
+
const r = { areQuietZoneValuesCombined: e };
|
|
457
|
+
return (await i(this, B)).setBarcodeProperties(t, JSON.stringify({ quietZone: r })).then((c) => o(c));
|
|
458
|
+
}, this.setErrorCorrectionLevel = async (t, e) => (await i(this, B)).setBarcodeProperties(t, JSON.stringify({ errorCorrectionLevel: e })).then((n) => o(n)), this.setCharacterSet = async (t, e) => (await i(this, B)).setBarcodeProperties(t, JSON.stringify({ characterSet: e })).then((n) => o(n)), this.setDrawLightMarginIndicator = async (t, e) => {
|
|
459
|
+
const r = { drawStartStopChars: e };
|
|
460
|
+
return this.setBarcodeProperties(t, r);
|
|
461
|
+
}, this.setDrawStartStopChars = async (t, e) => {
|
|
462
|
+
const r = { drawStartStopChars: e };
|
|
463
|
+
return this.setBarcodeProperties(t, r);
|
|
464
|
+
}, this.getBarcodeConfigationOptions = (t) => {
|
|
465
|
+
let e = !0, r = !0, n = !0, c, l, h = !1, y = !1, p = !1;
|
|
466
|
+
switch (t) {
|
|
467
|
+
case T.qr:
|
|
468
|
+
c = [wt.iso8859_1, wt.utf8], l = [
|
|
469
|
+
Ot.low,
|
|
470
|
+
Ot.medium,
|
|
471
|
+
Ot.quartile,
|
|
472
|
+
Ot.high
|
|
473
|
+
];
|
|
474
|
+
case T.dataMatrix:
|
|
475
|
+
e = !1, r = !1, n = !1, h = !0;
|
|
476
|
+
break;
|
|
477
|
+
case T.ean13:
|
|
478
|
+
e = !1, y = !0;
|
|
479
|
+
break;
|
|
480
|
+
case T.ean8:
|
|
481
|
+
y = !0;
|
|
482
|
+
case T.upca:
|
|
483
|
+
case T.upce:
|
|
484
|
+
e = !1;
|
|
485
|
+
break;
|
|
486
|
+
case T.code128:
|
|
487
|
+
case T.gs1128:
|
|
488
|
+
c = [
|
|
489
|
+
wt.code128a,
|
|
490
|
+
wt.code128b,
|
|
491
|
+
wt.code128c
|
|
492
|
+
];
|
|
493
|
+
break;
|
|
494
|
+
case T.code39:
|
|
495
|
+
p = !0;
|
|
496
|
+
break;
|
|
497
|
+
}
|
|
498
|
+
return {
|
|
499
|
+
allowEnableMagnification: n,
|
|
500
|
+
allowBarHeight: r,
|
|
501
|
+
allowQuietZone: !0,
|
|
502
|
+
allowedCharacterSets: c,
|
|
503
|
+
allowedErrorCorrectionLevels: l,
|
|
504
|
+
allowToggleText: e,
|
|
505
|
+
quietZoneAlwaysCombined: h,
|
|
506
|
+
allowToggleLightMarginIndicator: y,
|
|
507
|
+
allowToggleDrawStartAndEndChar: p
|
|
508
|
+
};
|
|
509
|
+
}, g(this, B, a);
|
|
510
|
+
}
|
|
511
|
+
}
|
|
512
|
+
B = new WeakMap();
|
|
513
|
+
var U = /* @__PURE__ */ ((s) => (s.rgb = "rgb", s.hex = "hex", s.cmyk = "cmyk", s.spotCmyk = "spotCmyk", s.spotRgb = "spotRgb", s.spotHex = "spotHex", s))(U || {}), z = /* @__PURE__ */ ((s) => (s.rgb = "rgb", s.hex = "hex", s.cmyk = "cmyk", s.gray = "gray", s.hsl = "hsl", s.spot = "spot", s.spotCMYK = "spotCMYK", s.spotRGB = "spotRGB", s.spotHEX = "spotHEX", s))(z || {}), ys = /* @__PURE__ */ ((s) => (s.local = "local", s.brandKit = "brandKit", s.stylekit = "brandKit", s))(ys || {});
|
|
514
|
+
const Le = (s) => s.type === U.hex, Zt = (s) => s.type === U.spotHex, sr = (s) => s.type === U.spotRgb, rr = (s) => s.type === U.spotCmyk, nr = (s) => sr(s) || rr(s) || Zt(s), ar = (s) => {
|
|
515
|
+
const a = ir(s.type);
|
|
516
|
+
return nr(s) ? {
|
|
517
|
+
...Zt(s) && { value: s.displayValue },
|
|
518
|
+
...!Zt(s) && { ...s.displayValue },
|
|
519
|
+
spotName: s.value,
|
|
520
|
+
type: a
|
|
521
|
+
} : {
|
|
522
|
+
...Le(s) && { value: s.value },
|
|
523
|
+
...!Le(s) && { ...s.value },
|
|
524
|
+
type: a
|
|
525
|
+
};
|
|
526
|
+
}, De = (s, a, t) => {
|
|
527
|
+
const { brandKitColorGuid: e, brandKitFontFamilyGuid: r, fontStyleId: n, ...c } = s;
|
|
528
|
+
return {
|
|
529
|
+
...Object.keys(c).reduce((h, y) => ({ ...h, [y]: { value: s[y] } }), {}),
|
|
530
|
+
...a && {
|
|
531
|
+
color: {
|
|
532
|
+
value: {
|
|
533
|
+
id: a.id,
|
|
534
|
+
color: a.color,
|
|
535
|
+
type: ys.brandKit,
|
|
536
|
+
isApplied: c.fillColorApplied
|
|
537
|
+
}
|
|
538
|
+
}
|
|
539
|
+
},
|
|
540
|
+
fontKey: {
|
|
541
|
+
value: t ?? null
|
|
542
|
+
}
|
|
543
|
+
};
|
|
544
|
+
}, ir = (s) => {
|
|
545
|
+
switch (s) {
|
|
546
|
+
case U.rgb:
|
|
547
|
+
return z.rgb;
|
|
548
|
+
case U.cmyk:
|
|
549
|
+
return z.cmyk;
|
|
550
|
+
case U.hex:
|
|
551
|
+
return z.hex;
|
|
552
|
+
case U.spotRgb:
|
|
553
|
+
return z.spotRGB;
|
|
554
|
+
case U.spotCmyk:
|
|
555
|
+
return z.spotCMYK;
|
|
556
|
+
case U.spotHex:
|
|
557
|
+
return z.spotHEX;
|
|
558
|
+
}
|
|
559
|
+
}, Oe = (s, a) => {
|
|
560
|
+
if (!(s === null || a === void 0))
|
|
561
|
+
return (s || []).find((t) => t.id === a);
|
|
562
|
+
}, Ne = (s, a, t) => {
|
|
563
|
+
var e, r;
|
|
564
|
+
if (!(s === null || a === void 0 || t === void 0))
|
|
565
|
+
return (r = (e = (s || []).find((n) => n.id === a)) == null ? void 0 : e.fontStyles.find((n) => n.fontStyleId === t)) == null ? void 0 : r.id;
|
|
566
|
+
};
|
|
567
|
+
var ot;
|
|
568
|
+
class xe {
|
|
569
|
+
/**
|
|
570
|
+
* @ignore
|
|
571
|
+
*/
|
|
572
|
+
constructor(a, t) {
|
|
573
|
+
/**
|
|
574
|
+
* @ignore
|
|
575
|
+
*/
|
|
576
|
+
u(this, ot);
|
|
577
|
+
this.getId = async () => (await i(this, ot)).getBrandKitId().then((r) => o(r)), this.getVersion = async () => (await i(this, ot)).getBrandKitVersion().then((r) => o(r)), this.updateIdAndVersion = async (e, r) => (await i(this, ot)).updateBrandKitIdAndVersion(e, r).then((c) => o(c)), this.get = async () => {
|
|
578
|
+
const e = await this.getId(), r = await this.getVersion(), n = this.colorStyleController.getAll(), c = this.fontController.getFontFamilies(), l = this.characterStyleController.getAll(), h = this.paragraphStyleController.getAll(), [y, p, m, S] = await Promise.all([
|
|
579
|
+
n,
|
|
580
|
+
c,
|
|
581
|
+
h,
|
|
582
|
+
l
|
|
583
|
+
]), b = {
|
|
584
|
+
id: e.parsedData,
|
|
585
|
+
brandKit: {
|
|
586
|
+
id: e.parsedData,
|
|
587
|
+
lastModifiedDate: r.parsedData,
|
|
588
|
+
colors: y.parsedData,
|
|
589
|
+
fonts: p.parsedData,
|
|
590
|
+
paragraphStyles: m.parsedData,
|
|
591
|
+
characterStyles: S.parsedData
|
|
592
|
+
}
|
|
593
|
+
}, v = {
|
|
594
|
+
success: !0,
|
|
595
|
+
data: JSON.stringify(b),
|
|
596
|
+
parsedData: b,
|
|
597
|
+
status: 200
|
|
598
|
+
};
|
|
599
|
+
return o(v);
|
|
600
|
+
}, this.remove = async () => {
|
|
601
|
+
const r = (await this.colorStyleController.getAll()).parsedData || [], c = (await this.paragraphStyleController.getAll()).parsedData || [], h = (await this.characterStyleController.getAll()).parsedData || [], p = (await this.fontController.getFontFamilies()).parsedData || [];
|
|
602
|
+
try {
|
|
603
|
+
await this.undoManagerController.record("brandKit.remove", async (m) => {
|
|
604
|
+
for (const S of r)
|
|
605
|
+
await m.colorStyle.remove(S.id);
|
|
606
|
+
for (const S of c)
|
|
607
|
+
await m.paragraphStyle.remove(S.id);
|
|
608
|
+
for (const S of h)
|
|
609
|
+
await m.characterStyle.remove(S.id);
|
|
610
|
+
for (const S of p)
|
|
611
|
+
await m.font.removeFontFamily(S.id);
|
|
612
|
+
});
|
|
613
|
+
} catch (m) {
|
|
614
|
+
throw this.undoManagerController.undo(), m;
|
|
615
|
+
}
|
|
616
|
+
}, this.set = async (e) => {
|
|
617
|
+
try {
|
|
618
|
+
let r = {
|
|
619
|
+
success: !0,
|
|
620
|
+
status: 200,
|
|
621
|
+
parsedData: {
|
|
622
|
+
id: e.id,
|
|
623
|
+
version: e.brandKit.lastModifiedDate,
|
|
624
|
+
colors: [],
|
|
625
|
+
fonts: [],
|
|
626
|
+
paragraphStyles: [],
|
|
627
|
+
characterStyles: []
|
|
628
|
+
}
|
|
629
|
+
};
|
|
630
|
+
return await this.undoManagerController.record("brandKit.set", async (n) => {
|
|
631
|
+
const c = await this.setColors(e, n), l = await this.setFonts(e, n), { parsedData: h = [] } = await n.colorStyle.getAll(), { parsedData: y } = await n.font.getFontFamilies();
|
|
632
|
+
await this.setParagraphStyles(e, n, {
|
|
633
|
+
localColors: h,
|
|
634
|
+
localFonts: y,
|
|
635
|
+
localColorGuidMap: c,
|
|
636
|
+
localFontGuidMap: l
|
|
637
|
+
}), await this.setCharacterStyles(e, n, {
|
|
638
|
+
localColors: h,
|
|
639
|
+
localFonts: y,
|
|
640
|
+
localColorGuidMap: c,
|
|
641
|
+
localFontGuidMap: l
|
|
642
|
+
});
|
|
643
|
+
const { parsedData: p } = await n.paragraphStyle.getAll(), { parsedData: m } = await n.characterStyle.getAll();
|
|
644
|
+
await n.brandKit.updateIdAndVersion(e.id, e.brandKit.lastModifiedDate), r = {
|
|
645
|
+
success: !0,
|
|
646
|
+
status: 200,
|
|
647
|
+
parsedData: {
|
|
648
|
+
id: e.id,
|
|
649
|
+
version: e.brandKit.lastModifiedDate,
|
|
650
|
+
colors: h || [],
|
|
651
|
+
fonts: y || [],
|
|
652
|
+
paragraphStyles: p || [],
|
|
653
|
+
characterStyles: m || []
|
|
654
|
+
}
|
|
655
|
+
};
|
|
656
|
+
}), r;
|
|
657
|
+
} catch (r) {
|
|
658
|
+
throw this.undoManagerController.undo(), r;
|
|
659
|
+
}
|
|
660
|
+
}, g(this, ot, a), this.colorStyleController = t.colorStyle, this.fontController = t.font, this.mediaController = t.mediaConnector, this.paragraphStyleController = t.paragraphStyle, this.characterStyleController = t.characterStyle, this.undoManagerController = t.undoManager;
|
|
661
|
+
}
|
|
662
|
+
async setColors(a, t) {
|
|
663
|
+
const e = /* @__PURE__ */ new Map();
|
|
664
|
+
for (const r of a.brandKit.colors || []) {
|
|
665
|
+
const { parsedData: n } = await t.colorStyle.create();
|
|
666
|
+
if (!n) continue;
|
|
667
|
+
e.set(r.guid, n);
|
|
668
|
+
const c = ar(r);
|
|
669
|
+
await t.colorStyle.rename(n, r.name), await t.colorStyle.update(n, c);
|
|
670
|
+
}
|
|
671
|
+
return e;
|
|
672
|
+
}
|
|
673
|
+
async setFonts(a, t) {
|
|
674
|
+
const e = a.fontConnectorId, r = /* @__PURE__ */ new Map();
|
|
675
|
+
for (const n of a.brandKit.fonts || []) {
|
|
676
|
+
const { parsedData: c = [] } = await t.fontConnector.detail(e, n.fontFamilyId);
|
|
677
|
+
if (!(c != null && c[0])) throw new Error(`No font styles for family ID: ${n.fontFamilyId}`);
|
|
678
|
+
const { parsedData: l } = await t.font.addFontFamily(e, {
|
|
679
|
+
name: c[0].familyName,
|
|
680
|
+
fontFamilyId: n.fontFamilyId
|
|
681
|
+
});
|
|
682
|
+
l && r.set(n.fontFamilyBrandKitGuid, l);
|
|
683
|
+
}
|
|
684
|
+
return r;
|
|
685
|
+
}
|
|
686
|
+
async setParagraphStyles(a, t, e) {
|
|
687
|
+
const { localColors: r, localFonts: n, localColorGuidMap: c, localFontGuidMap: l } = e;
|
|
688
|
+
for (const h of a.brandKit.paragraphStyles || []) {
|
|
689
|
+
const y = c.get(h.brandKitColorGuid), p = l.get(h.brandKitFontFamilyGuid), m = Ne(n, p, h.fontStyleId);
|
|
690
|
+
if (!p || !m)
|
|
691
|
+
throw new Error(`Paragraph style could not be created with an empty font family: ${h.name}`);
|
|
692
|
+
const S = Oe(r, y);
|
|
693
|
+
if (!S) throw new Error(`Paragraph style could not be created with an empty color: ${h.name}`);
|
|
694
|
+
const { parsedData: b } = await t.paragraphStyle.create(), v = De(
|
|
695
|
+
h,
|
|
696
|
+
S,
|
|
697
|
+
`${m}`
|
|
698
|
+
);
|
|
699
|
+
await t.paragraphStyle.rename(b, h.name), await t.paragraphStyle.update(b, v);
|
|
700
|
+
}
|
|
701
|
+
}
|
|
702
|
+
async setCharacterStyles(a, t, e) {
|
|
703
|
+
const { localColors: r, localFonts: n, localColorGuidMap: c, localFontGuidMap: l } = e;
|
|
704
|
+
for (const h of a.brandKit.characterStyles || []) {
|
|
705
|
+
const y = h.brandKitColorGuid ? c.get(h.brandKitColorGuid) : void 0, p = h.brandKitFontFamilyGuid ? l.get(h.brandKitFontFamilyGuid) : void 0, m = Oe(r, y), S = Ne(n, p, h.fontStyleId), { parsedData: b } = await t.characterStyle.create(), v = De(
|
|
706
|
+
h,
|
|
707
|
+
m,
|
|
708
|
+
S
|
|
709
|
+
);
|
|
710
|
+
await t.characterStyle.rename(b, h.name), await t.characterStyle.update(b, v);
|
|
711
|
+
}
|
|
712
|
+
}
|
|
713
|
+
}
|
|
714
|
+
ot = new WeakMap();
|
|
715
|
+
var Q;
|
|
716
|
+
class Qt {
|
|
717
|
+
/**
|
|
718
|
+
* @ignore
|
|
719
|
+
*/
|
|
720
|
+
constructor(a) {
|
|
721
|
+
/**
|
|
722
|
+
* @ignore
|
|
723
|
+
*/
|
|
724
|
+
u(this, Q);
|
|
725
|
+
this.zoomToPage = async (t, e, r, n, c) => (t !== void 0 && console.warn("id has no effect and will be deprecated in the future"), (await i(this, Q)).zoomToPage(e, r, n, c).then((h) => o(h))), this.getZoomPercentage = async () => (await i(this, Q)).getZoomPercentage().then((e) => o(e)), this.setZoomPercentage = async (t) => (await i(this, Q)).setZoomPercentage(t).then((r) => o(r)), this.setViewMode = async (t) => (await i(this, Q)).setViewMode(t).then((r) => o(r)), g(this, Q, a);
|
|
726
|
+
}
|
|
727
|
+
}
|
|
728
|
+
Q = new WeakMap();
|
|
729
|
+
var N;
|
|
730
|
+
class Re {
|
|
731
|
+
/**
|
|
732
|
+
* @ignore
|
|
733
|
+
*/
|
|
734
|
+
constructor(a) {
|
|
735
|
+
/**
|
|
736
|
+
* @ignore
|
|
737
|
+
*/
|
|
738
|
+
u(this, N);
|
|
739
|
+
this.getAll = async () => (await i(this, N)).getCharacterStyles().then((e) => o(e)), this.getById = async (t) => (await i(this, N)).getCharacterStyleById(t).then((r) => o(r)), this.create = async () => (await i(this, N)).createCharacterStyle().then((e) => o(e)), this.update = async (t, e) => (await i(this, N)).updateCharacterStyle(t, JSON.stringify(e)).then((n) => o(n)), this.remove = async (t) => (await i(this, N)).removeCharacterStyle(t).then((r) => o(r)), this.duplicate = async (t) => (await i(this, N)).duplicateCharacterStyle(t).then((r) => o(r)), this.rename = async (t, e) => (await i(this, N)).renameCharacterStyle(t, e).then((n) => o(n)), this.move = async (t, e) => (await i(this, N)).moveCharacterStyles(t, e).then((n) => o(n)), g(this, N, a);
|
|
740
|
+
}
|
|
741
|
+
}
|
|
742
|
+
N = new WeakMap();
|
|
743
|
+
var X;
|
|
744
|
+
class Me {
|
|
745
|
+
/**
|
|
746
|
+
* @ignore
|
|
747
|
+
*/
|
|
748
|
+
constructor(a) {
|
|
749
|
+
/**
|
|
750
|
+
* @ignore
|
|
751
|
+
*/
|
|
752
|
+
u(this, X);
|
|
753
|
+
this.copyFrames = async (t) => {
|
|
754
|
+
const r = await (await i(this, X)).copyFrames(t);
|
|
755
|
+
return r.data && await navigator.clipboard.writeText(r.data), o(r);
|
|
756
|
+
}, this.cutFrames = async (t) => {
|
|
757
|
+
const r = await (await i(this, X)).cutFrames(t);
|
|
758
|
+
return r.data && await navigator.clipboard.writeText(r.data), o(r);
|
|
759
|
+
}, this.pasteFrames = async () => {
|
|
760
|
+
const t = await i(this, X), e = await navigator.clipboard.readText(), r = await t.pasteFrames(e);
|
|
761
|
+
return o(r);
|
|
762
|
+
}, this.getContentType = async () => {
|
|
763
|
+
const t = await i(this, X), e = await navigator.clipboard.readText(), r = await t.getClipboardContentType(e);
|
|
764
|
+
return o(r);
|
|
765
|
+
}, g(this, X, a);
|
|
766
|
+
}
|
|
767
|
+
}
|
|
768
|
+
X = new WeakMap();
|
|
769
|
+
var Bt;
|
|
770
|
+
class Ve {
|
|
771
|
+
/**
|
|
772
|
+
* @ignore
|
|
773
|
+
*/
|
|
774
|
+
constructor(a) {
|
|
775
|
+
/**
|
|
776
|
+
* @ignore
|
|
777
|
+
*/
|
|
778
|
+
u(this, Bt);
|
|
779
|
+
this.convertToRgb = async (t) => (await i(this, Bt)).colorToRgb(JSON.stringify(t)).then((r) => o(r)), g(this, Bt, a);
|
|
780
|
+
}
|
|
781
|
+
}
|
|
782
|
+
Bt = new WeakMap();
|
|
783
|
+
var x;
|
|
784
|
+
class Je {
|
|
785
|
+
/**
|
|
786
|
+
* @ignore
|
|
787
|
+
*/
|
|
788
|
+
constructor(a) {
|
|
789
|
+
/**
|
|
790
|
+
* @ignore
|
|
791
|
+
*/
|
|
792
|
+
u(this, x);
|
|
793
|
+
this.getAll = async () => (await i(this, x)).getColors().then((e) => o(e)), this.getById = async (t) => (await i(this, x)).getColorById(t).then((r) => o(r)), this.create = async () => (await i(this, x)).createColor().then((e) => o(e)), this.duplicate = async (t) => (await i(this, x)).duplicateColor(t).then((r) => o(r)), this.move = async (t, e) => (await i(this, x)).moveColors(t, e).then((n) => o(n)), this.rename = async (t, e) => (await i(this, x)).renameColor(t, e).then((n) => o(n)), this.update = async (t, e) => {
|
|
794
|
+
const r = await i(this, x), n = e;
|
|
795
|
+
return n.type === z.spot && (n.type = z.spotCMYK), r.updateColor(t, JSON.stringify(n)).then((c) => o(c));
|
|
796
|
+
}, this.remove = async (t) => (await i(this, x)).removeColor(t).then((r) => o(r)), g(this, x, a);
|
|
797
|
+
}
|
|
798
|
+
}
|
|
799
|
+
x = new WeakMap();
|
|
800
|
+
var Mt = /* @__PURE__ */ ((s) => (s[s.file = 0] = "file", s[s.collection = 1] = "collection", s))(Mt || {}), Xt = /* @__PURE__ */ ((s) => (s.LowResolutionWeb = "lowresWeb", s.HighResolutionWeb = "highresWeb", s))(Xt || {}), Vt = /* @__PURE__ */ ((s) => (s.file = "file", s.collection = "collection", s))(Vt || {}), or = /* @__PURE__ */ ((s) => (s.media = "media", s.fonts = "fonts", s.data = "data", s))(or || {}), cr = /* @__PURE__ */ ((s) => (s.name = "name", s.path = "relativePath", s.id = "id", s))(cr || {}), hr = /* @__PURE__ */ ((s) => (s.ascending = "asc", s.descending = "desc", s))(hr || {}), lr = /* @__PURE__ */ ((s) => (s.text = "text", s.boolean = "boolean", s))(lr || {}), dr = /* @__PURE__ */ ((s) => (s.query = "query", s.upload = "upload", s))(dr || {}), Nt = /* @__PURE__ */ ((s) => (s.url = "url", s.grafx = "grafx", s.local = "local", s))(Nt || {});
|
|
801
|
+
class bn {
|
|
802
|
+
constructor(a, t, e, r = "engineToConnector") {
|
|
803
|
+
this.direction = "engineToConnector", this.name = a, this.direction = r, t === "var" ? this.value = `${t}.${e}` : this.value = e;
|
|
804
|
+
}
|
|
805
|
+
}
|
|
806
|
+
var ur = /* @__PURE__ */ ((s) => (s.variable = "var", s.value = "value", s))(ur || {}), gr = /* @__PURE__ */ ((s) => (s.engineToConnector = "engineToConnector", s.connectorToEngine = "connectorToEngine", s))(gr || {}), te = /* @__PURE__ */ ((s) => (s.loading = "loading", s.loaded = "loaded", s.running = "running", s.ready = "ready", s.error = "error", s))(te || {}), yr = /* @__PURE__ */ ((s) => (s.stateChanged = "stateChanged", s.authChanged = "authChanged", s.reloadRequired = "reloadRequired", s.unloaded = "unloaded", s))(yr || {});
|
|
807
|
+
const In = {
|
|
808
|
+
url: "grafx-media.json",
|
|
809
|
+
source: "local"
|
|
810
|
+
/* local */
|
|
811
|
+
};
|
|
812
|
+
class vn {
|
|
813
|
+
constructor(a) {
|
|
814
|
+
this.type = "grafxToken", this.token = a;
|
|
815
|
+
}
|
|
816
|
+
}
|
|
817
|
+
class Pn {
|
|
818
|
+
constructor() {
|
|
819
|
+
this.type = "refreshed";
|
|
820
|
+
}
|
|
821
|
+
}
|
|
822
|
+
var pr = /* @__PURE__ */ ((s) => (s.grafxToken = "grafxToken", s.refreshed = "refreshed", s))(pr || {}), Cr = /* @__PURE__ */ ((s) => (s.grafxToken = "grafxToken", s.any = "any", s))(Cr || {}), ps = /* @__PURE__ */ ((s) => (s.minDimension = "minDimension", s))(ps || {});
|
|
823
|
+
class mr extends Error {
|
|
824
|
+
constructor(a, t) {
|
|
825
|
+
super(a), this.type = t;
|
|
826
|
+
}
|
|
827
|
+
}
|
|
828
|
+
class ne {
|
|
829
|
+
constructor() {
|
|
830
|
+
this.makeConnectorSourceForwardsCompatible = (a) => {
|
|
831
|
+
if (a.source != Nt.grafx || this.isSourceMigrated(a))
|
|
832
|
+
return a;
|
|
833
|
+
let t = a.url;
|
|
834
|
+
for (; t.endsWith("/"); )
|
|
835
|
+
t = t.substring(0, t.length - 1);
|
|
836
|
+
const e = t.split("/");
|
|
837
|
+
return { id: e[e.length - 1], source: Nt.grafx };
|
|
838
|
+
}, this.makeMultipleConnectorsBackwardsCompatible = (a, t) => a.map((e) => this.makeSingleConnectorBackwardsCompatible(e, t)), this.makeSingleConnectorBackwardsCompatible = (a, t) => a.source.source != Nt.grafx ? a : {
|
|
839
|
+
id: a.id,
|
|
840
|
+
name: a.name,
|
|
841
|
+
iconUrl: a.iconUrl,
|
|
842
|
+
source: this.makeConnectorSourceBackwardsCompatible(a.source, t)
|
|
843
|
+
}, this.makeConnectorSourceBackwardsCompatible = (a, t) => {
|
|
844
|
+
let e = t;
|
|
845
|
+
for (; e != null && e.endsWith("/"); )
|
|
846
|
+
e = e.substring(0, e.length - 1);
|
|
847
|
+
return {
|
|
848
|
+
url: `${e}/connectors/${a.id}`,
|
|
849
|
+
source: Nt.grafx
|
|
850
|
+
};
|
|
851
|
+
}, this.isSourceMigrated = (a) => "id" in a;
|
|
852
|
+
}
|
|
853
|
+
}
|
|
854
|
+
var R, ft, ct, as;
|
|
855
|
+
let Be = (as = class {
|
|
856
|
+
/**
|
|
857
|
+
* @ignore
|
|
858
|
+
*/
|
|
859
|
+
constructor(a, t) {
|
|
860
|
+
/**
|
|
861
|
+
* @ignore
|
|
862
|
+
*/
|
|
863
|
+
u(this, R);
|
|
864
|
+
u(this, ft);
|
|
865
|
+
u(this, ct);
|
|
866
|
+
this.getById = async (e) => (await i(this, R)).getConnectorById(e).then((n) => o(n)).then((n) => {
|
|
867
|
+
const c = { ...n, parsedData: null };
|
|
868
|
+
return n.parsedData && (c.parsedData = i(this, ct).makeSingleConnectorBackwardsCompatible(
|
|
869
|
+
n.parsedData,
|
|
870
|
+
i(this, ft).get(Y.GraFxStudioEnvironmentApiUrl)
|
|
871
|
+
)), c;
|
|
872
|
+
}), this.getAllByType = async (e) => (await i(this, R)).getConnectors(e).then((n) => o(n)).then((n) => {
|
|
873
|
+
const c = { ...n, parsedData: null };
|
|
874
|
+
return n.parsedData && (c.parsedData = i(this, ct).makeMultipleConnectorsBackwardsCompatible(
|
|
875
|
+
n.parsedData,
|
|
876
|
+
i(this, ft).get(Y.GraFxStudioEnvironmentApiUrl)
|
|
877
|
+
)), c;
|
|
878
|
+
}), this.register = async (e) => {
|
|
879
|
+
const r = await i(this, R), n = i(this, ct).makeConnectorSourceForwardsCompatible(e);
|
|
880
|
+
return r.registerConnector(JSON.stringify(n)).then((c) => o(c));
|
|
881
|
+
}, this.unregister = async (e) => (await i(this, R)).unregisterConnector(e).then((n) => o(n)), this.configure = async (e, r) => {
|
|
882
|
+
const n = await i(this, R);
|
|
883
|
+
return await this.waitToBeReady(e), await r(new wr(e, n)), n.updateConnectorConfiguration(e).then((c) => o(c));
|
|
884
|
+
}, this.getState = async (e) => (await i(this, R)).getConnectorState(e).then((n) => o(n)), this.getOptions = async (e) => (await i(this, R)).getConnectorOptions(e).then((n) => o(n)), this.waitToBeReady = async (e, r = 2e3) => {
|
|
885
|
+
let n = Math.max(r, 500);
|
|
886
|
+
n = Math.min(n, 5e3);
|
|
887
|
+
const c = 100;
|
|
888
|
+
let l = 0;
|
|
889
|
+
try {
|
|
890
|
+
for (; l * c < n; ) {
|
|
891
|
+
const h = await this.getState(e);
|
|
892
|
+
if (h.success && h.parsedData && (h.parsedData.type === te.running || h.parsedData.type === te.ready))
|
|
893
|
+
return o(
|
|
894
|
+
{ data: null, success: !0, error: void 0, status: 0, parsedData: void 0 },
|
|
895
|
+
!1
|
|
896
|
+
);
|
|
897
|
+
await new Promise((y) => setTimeout(y, c)), l++;
|
|
898
|
+
}
|
|
899
|
+
} catch (h) {
|
|
900
|
+
return o(
|
|
901
|
+
{
|
|
902
|
+
data: null,
|
|
903
|
+
success: !1,
|
|
904
|
+
error: `Error while getting connector state ${h}`,
|
|
905
|
+
status: 5e4,
|
|
906
|
+
parsedData: void 0
|
|
907
|
+
},
|
|
908
|
+
!1
|
|
909
|
+
);
|
|
910
|
+
}
|
|
911
|
+
return o(
|
|
912
|
+
{
|
|
913
|
+
data: null,
|
|
914
|
+
success: !1,
|
|
915
|
+
error: "Timed out waiting for connector",
|
|
916
|
+
status: 5e4,
|
|
917
|
+
parsedData: void 0
|
|
918
|
+
},
|
|
919
|
+
!1
|
|
920
|
+
);
|
|
921
|
+
}, this.updateMappings = async (e, r) => await this.configure(e, async (n) => {
|
|
922
|
+
const { parsedData: c } = await this.getMappings(e), l = (c == null ? void 0 : c.filter(
|
|
923
|
+
(p) => !r.some(
|
|
924
|
+
(m) => m.name === p.name && m.direction === p.direction
|
|
925
|
+
)
|
|
926
|
+
)) ?? [], h = r.filter((p) => p.name !== "" && p.value !== ""), y = [...l, ...h];
|
|
927
|
+
await n.setMappings(y);
|
|
928
|
+
}), g(this, R, a), g(this, ft, t), g(this, ct, new ne());
|
|
929
|
+
}
|
|
930
|
+
async getMappings(a, t) {
|
|
931
|
+
return (await i(this, R)).getConnectorMappings(a).then((r) => o(r)).then(
|
|
932
|
+
(r) => {
|
|
933
|
+
var n;
|
|
934
|
+
return t ? {
|
|
935
|
+
...r,
|
|
936
|
+
parsedData: (n = r.parsedData) == null ? void 0 : n.filter((c) => c.direction === t)
|
|
937
|
+
} : r;
|
|
938
|
+
}
|
|
939
|
+
);
|
|
940
|
+
}
|
|
941
|
+
}, R = new WeakMap(), ft = new WeakMap(), ct = new WeakMap(), as);
|
|
942
|
+
var ht, lt;
|
|
943
|
+
class wr {
|
|
944
|
+
/**
|
|
945
|
+
* @ignore
|
|
946
|
+
*/
|
|
947
|
+
constructor(a, t) {
|
|
948
|
+
/**
|
|
949
|
+
* @ignore
|
|
950
|
+
*/
|
|
951
|
+
u(this, ht);
|
|
952
|
+
u(this, lt);
|
|
953
|
+
this.setOptions = async (e) => i(this, lt).setConnectorOptions(i(this, ht), JSON.stringify(e)).then((r) => o(r)), this.setMappings = async (e) => {
|
|
954
|
+
const r = await i(this, lt).setConnectorMappings(
|
|
955
|
+
i(this, ht),
|
|
956
|
+
e.map(function(n) {
|
|
957
|
+
return JSON.stringify(n);
|
|
958
|
+
})
|
|
959
|
+
);
|
|
960
|
+
return o(r);
|
|
961
|
+
}, this.setHttpHeader = async (e, r) => i(this, lt).connectorAuthenticationSetHttpHeader(i(this, ht), e, r).then((n) => o(n)), g(this, ht, a), g(this, lt, t);
|
|
962
|
+
}
|
|
963
|
+
}
|
|
964
|
+
ht = new WeakMap(), lt = new WeakMap();
|
|
965
|
+
var tt, Ut;
|
|
966
|
+
class Ue {
|
|
967
|
+
/**
|
|
968
|
+
* @ignore
|
|
969
|
+
*/
|
|
970
|
+
constructor(a, t) {
|
|
971
|
+
/**
|
|
972
|
+
* @ignore
|
|
973
|
+
*/
|
|
974
|
+
u(this, tt);
|
|
975
|
+
u(this, Ut);
|
|
976
|
+
this.getPage = async (e, r, n = {}) => (await i(this, tt)).dataConnectorGetPage(e, JSON.stringify(r), JSON.stringify(n)).then((l) => o(l)).then((l) => {
|
|
977
|
+
const h = { ...l, parsedData: null };
|
|
978
|
+
return l.parsedData && (h.parsedData = {
|
|
979
|
+
data: l.parsedData.data.map(
|
|
980
|
+
(y) => i(this, Ut).mapEngineToDataItem(y)
|
|
981
|
+
),
|
|
982
|
+
continuationToken: l.parsedData.continuationToken
|
|
983
|
+
}), h;
|
|
984
|
+
}), this.getModel = async (e, r = {}) => (await i(this, tt)).dataConnectorGetModel(e, JSON.stringify(r)).then((c) => o(c)), this.getConfigurationOptions = async (e) => (await i(this, tt)).dataConnectorGetConfigurationOptions(e).then((n) => o(n)), this.getCapabilities = async (e) => (await i(this, tt)).dataConnectorGetCapabilities(e).then((n) => o(n)), g(this, tt, a), g(this, Ut, t);
|
|
985
|
+
}
|
|
986
|
+
}
|
|
987
|
+
tt = new WeakMap(), Ut = new WeakMap();
|
|
988
|
+
var et, kt;
|
|
989
|
+
class ke {
|
|
990
|
+
/**
|
|
991
|
+
* @ignore
|
|
992
|
+
*/
|
|
993
|
+
constructor(a, t) {
|
|
994
|
+
/**
|
|
995
|
+
* @ignore
|
|
996
|
+
*/
|
|
997
|
+
u(this, et);
|
|
998
|
+
u(this, kt);
|
|
999
|
+
this.setDataSource = async (e) => (await i(this, et)).setDataSource(e).then((n) => o(n)), this.getDataSource = async () => (await i(this, et)).getDataSource().then((r) => o(r)), this.removeDataSource = async () => (await i(this, et)).removeDataSource().then((r) => o(r)), this.setDataRow = async (e) => {
|
|
1000
|
+
const r = await i(this, et), n = i(this, kt).mapDataItemToEngine(e);
|
|
1001
|
+
return r.setDataRow(JSON.stringify(n)).then((c) => o(c));
|
|
1002
|
+
}, g(this, et, a), g(this, kt, t);
|
|
1003
|
+
}
|
|
1004
|
+
}
|
|
1005
|
+
et = new WeakMap(), kt = new WeakMap();
|
|
1006
|
+
var st;
|
|
1007
|
+
class Te {
|
|
1008
|
+
/**
|
|
1009
|
+
* @ignore
|
|
1010
|
+
*/
|
|
1011
|
+
constructor(a) {
|
|
1012
|
+
/**
|
|
1013
|
+
* @ignore
|
|
1014
|
+
*/
|
|
1015
|
+
u(this, st);
|
|
1016
|
+
this.getAllLogs = async () => (await i(this, st)).getLogs().then((e) => o(e)), this.toggleDebugPanel = async () => (await i(this, st)).toggleDebugPanel().then((e) => o(e)), this.enableDebug = async () => (await i(this, st)).enableDebug().then((e) => o(e)), this.disableDebug = async () => (await i(this, st)).disableDebug().then((e) => o(e)), g(this, st, a);
|
|
1017
|
+
}
|
|
1018
|
+
}
|
|
1019
|
+
st = new WeakMap();
|
|
1020
|
+
var dt;
|
|
1021
|
+
class Ge {
|
|
1022
|
+
/**
|
|
1023
|
+
* @ignore
|
|
1024
|
+
*/
|
|
1025
|
+
constructor(a) {
|
|
1026
|
+
/**
|
|
1027
|
+
* @ignore
|
|
1028
|
+
*/
|
|
1029
|
+
u(this, dt);
|
|
1030
|
+
this.getCurrentState = async () => (await i(this, dt)).getCurrentDocumentState().then((e) => o(e)), this.load = async (t, e = { keepConnectors: !1 }) => {
|
|
1031
|
+
const r = await i(this, dt), n = typeof t != "string" ? JSON.stringify(t) : t;
|
|
1032
|
+
return r.loadDocument(n, JSON.stringify(e)).then((c) => o(c));
|
|
1033
|
+
}, this.createAndLoad = async (t) => {
|
|
1034
|
+
const e = await i(this, dt), r = JSON.stringify(t);
|
|
1035
|
+
return e.createAndLoadDocument(r).then((n) => o(n));
|
|
1036
|
+
}, g(this, dt, a);
|
|
1037
|
+
}
|
|
1038
|
+
}
|
|
1039
|
+
dt = new WeakMap();
|
|
1040
|
+
var fr = /* @__PURE__ */ ((s) => (s.top = "top", s.bottom = "bottom", s.left = "left", s.right = "right", s))(fr || {}), Kt = /* @__PURE__ */ ((s) => (s.url = "url", s.variable = "variable", s.connector = "connector", s))(Kt || {}), Sr = /* @__PURE__ */ ((s) => (s.text = "text", s.image = "image", s.shape = "shape", s.barcode = "barcode", s))(Sr || {}), br = /* @__PURE__ */ ((s) => (s.variable = "variable", s.text = "text", s))(br || {}), Ir = /* @__PURE__ */ ((s) => (s.leftToRight = "leftToRight", s.rightToLeft = "rightToLeft", s.weak = "weak", s))(Ir || {}), vr = /* @__PURE__ */ ((s) => (s.horizontal = "horizontal", s.vertical = "vertical", s.onPath = "onPath", s))(vr || {}), Pr = /* @__PURE__ */ ((s) => (s.top = "top", s.bottom = "bottom", s.middle = "middle", s.justify = "justify", s))(Pr || {}), Ar = /* @__PURE__ */ ((s) => (s.normal = "normal", s.screen = "screen", s.overlay = "overlay", s.darken = "darken", s.lighten = "lighten", s.colorDodge = "colorDodge", s.colorBurn = "colorBurn", s.hardLight = "hardLight", s.softLight = "softLight", s.difference = "difference", s.exclusion = "exclusion", s.multiply = "multiply", s.hue = "hue", s.saturation = "saturation", s.color = "color", s.luminosity = "luminosity", s))(Ar || {}), Fr = /* @__PURE__ */ ((s) => (s.fill = "fill", s.fit = "fit", s.smartCrop = "smartCrop", s.manualCrop = "manualCrop", s))(Fr || {}), Er = /* @__PURE__ */ ((s) => (s.topLeft = "topLeft", s.topCenter = "topCenter", s.topRight = "topRight", s.centerLeft = "centerLeft", s.center = "center", s.centerRight = "centerRight", s.bottomLeft = "bottomLeft", s.bottomCenter = "bottomCenter", s.bottomRight = "bottomRight", s))(Er || {}), Lr = /* @__PURE__ */ ((s) => (s.bringToFront = "bringToFront", s.sendToBack = "sendToBack", s.bringForward = "bringForward", s.sendBackward = "sendBackward", s))(Lr || {}), Dr = /* @__PURE__ */ ((s) => (s.relative = "relative", s.start = "start", s.end = "end", s.startAndEnd = "startAndEnd", s.center = "center", s))(Dr || {}), Or = /* @__PURE__ */ ((s) => (s.page = "page", s.frame = "frame", s))(Or || {}), Nr = /* @__PURE__ */ ((s) => (s.start = "start", s.end = "end", s.center = "center", s))(Nr || {});
|
|
1041
|
+
class Fn {
|
|
1042
|
+
constructor() {
|
|
1043
|
+
this.type = "page";
|
|
1044
|
+
}
|
|
1045
|
+
}
|
|
1046
|
+
class En {
|
|
1047
|
+
constructor(a, t) {
|
|
1048
|
+
this.type = "frame", this.frameId = a, this.edge = t;
|
|
1049
|
+
}
|
|
1050
|
+
}
|
|
1051
|
+
var Cs = /* @__PURE__ */ ((s) => (s.frameCrop = "frameCrop", s.assetCrop = "assetCrop", s))(Cs || {}), M;
|
|
1052
|
+
class He {
|
|
1053
|
+
/**
|
|
1054
|
+
* @ignore
|
|
1055
|
+
*/
|
|
1056
|
+
constructor(a) {
|
|
1057
|
+
/**
|
|
1058
|
+
* @ignore
|
|
1059
|
+
*/
|
|
1060
|
+
u(this, M);
|
|
1061
|
+
this.insertImageVariableToFrame = async (t, e) => {
|
|
1062
|
+
const r = await i(this, M), n = { id: e, type: Kt.variable };
|
|
1063
|
+
return r.setImageSource(t, JSON.stringify(n)).then((c) => o(c));
|
|
1064
|
+
}, this.insertTextVariable = async (t) => (await i(this, M)).insertTextVariable(t).then((r) => o(r)), this.enterTextEditMode = async (t) => (await i(this, M)).enterTextEditMode(t).then((r) => o(r)), this.exitTextEditMode = async () => (await i(this, M)).exitTextEditMode().then((e) => o(e)), this.getText = async (t, e) => (await i(this, M)).getTextByFrameId(t, e).then((n) => o(n)), this.setText = async (t, e) => (await i(this, M)).setTextByFrameId(t, e).then((n) => o(n)), this.selectText = async (t, e, r) => (await i(this, M)).selectTextById(t, e, r).then((c) => o(c)), this.addCustomUndoData = async (t, e, r) => (await i(this, M)).setCustomUndoData(t, e, r ?? !1).then((c) => o(c)), g(this, M, a);
|
|
1065
|
+
}
|
|
1066
|
+
}
|
|
1067
|
+
M = new WeakMap();
|
|
1068
|
+
var rt, St;
|
|
1069
|
+
class _e {
|
|
1070
|
+
/**
|
|
1071
|
+
* @ignore
|
|
1072
|
+
*/
|
|
1073
|
+
constructor(a) {
|
|
1074
|
+
/**
|
|
1075
|
+
* @ignore
|
|
1076
|
+
*/
|
|
1077
|
+
u(this, rt);
|
|
1078
|
+
u(this, St);
|
|
1079
|
+
this.query = async (t, e, r = {}) => (await i(this, rt)).fontConnectorQuery(t, JSON.stringify(e), JSON.stringify(r)).then((c) => o(c)), this.detail = async (t, e, r = {}) => (await i(this, rt)).fontConnectorDetail(t, e, JSON.stringify(r)).then((c) => o(c)), this.download = async (t, e, r = {}) => (await i(this, St)).fontConnectorDownload(t, e, JSON.stringify(r)).then((c) => c ?? c), this.preview = async (t, e, r, n = {}) => (await i(this, St)).fontConnectorPreview(t, e, r, JSON.stringify(n)).then((l) => l ?? l), this.getConfigurationOptions = async (t) => (await i(this, rt)).fontConnectorGetConfigurationOptions(t).then((r) => o(r)), this.getCapabilities = async (t) => (await i(this, rt)).fontConnectorGetCapabilities(t).then((r) => o(r)), this.parseDeprecatedFontType = (t) => {
|
|
1080
|
+
if (t === Mt.file) return Vt.file;
|
|
1081
|
+
if (t === Mt.collection) return Vt.collection;
|
|
1082
|
+
}, g(this, rt, a), g(this, St, a);
|
|
1083
|
+
}
|
|
1084
|
+
}
|
|
1085
|
+
rt = new WeakMap(), St = new WeakMap();
|
|
1086
|
+
var P;
|
|
1087
|
+
class $e {
|
|
1088
|
+
/**
|
|
1089
|
+
* @ignore
|
|
1090
|
+
*/
|
|
1091
|
+
constructor(a) {
|
|
1092
|
+
/**
|
|
1093
|
+
* @ignore
|
|
1094
|
+
*/
|
|
1095
|
+
u(this, P);
|
|
1096
|
+
this.addFontFamily = async (t, e) => (await i(this, P)).addFontFamily(t, JSON.stringify(e)).then((n) => o(n)), this.removeFontFamily = async (t) => (await i(this, P)).removeFontFamily(t).then((r) => o(r)), this.addFontStyle = async (t, e) => (await i(this, P)).addFontStyle(t, JSON.stringify(e)).then((n) => o(n)), this.removeFontStyle = async (t) => (await i(this, P)).removeFontStyle(t).then((r) => o(r)), this.getFontFamilies = async () => (await i(this, P)).getFontFamilies().then((e) => o(e)), this.getFontStyles = async (t) => (await i(this, P)).getFontStyles(t).then((r) => o(r)), this.getFontFamilyById = async (t) => (await i(this, P)).getFontFamilyById(t).then((r) => o(r)), this.getFontStyleById = async (t) => (await i(this, P)).getFontStyleById(t).then((r) => o(r)), this.getDefaultFontStyle = async () => (await i(this, P)).getDefaultFontStyle().then((e) => o(e)), this.getDefaultFontFamily = async () => (await i(this, P)).getDefaultFontFamily().then((e) => o(e)), this.isFontFamilyUsed = async (t) => (await i(this, P)).isFontFamilyUsed(t).then((r) => o(r)), this.isFontStyleUsed = async (t) => (await i(this, P)).isFontStyleUsed(t).then((r) => o(r)), this.moveFontFamilies = async (t, e) => (await i(this, P)).moveFontFamilies(t, e).then((n) => o(n)), g(this, P, a);
|
|
1097
|
+
}
|
|
1098
|
+
}
|
|
1099
|
+
P = new WeakMap();
|
|
1100
|
+
var bt;
|
|
1101
|
+
class ee {
|
|
1102
|
+
/**
|
|
1103
|
+
* @ignore
|
|
1104
|
+
*/
|
|
1105
|
+
constructor(a) {
|
|
1106
|
+
/**
|
|
1107
|
+
* @ignore
|
|
1108
|
+
*/
|
|
1109
|
+
u(this, bt);
|
|
1110
|
+
this.setShapeProperties = async (t, e) => (await i(this, bt)).setShapeProperties(t, JSON.stringify(e)).then((n) => o(n)), this.setEnableFill = async (t, e) => {
|
|
1111
|
+
const r = { enableFill: e };
|
|
1112
|
+
return this.setShapeProperties(t, r);
|
|
1113
|
+
}, this.setFillColor = async (t, e) => {
|
|
1114
|
+
const r = { fillColor: e };
|
|
1115
|
+
return this.setShapeProperties(t, r);
|
|
1116
|
+
}, this.setEnableStroke = async (t, e) => {
|
|
1117
|
+
const r = { enableStroke: e };
|
|
1118
|
+
return this.setShapeProperties(t, r);
|
|
1119
|
+
}, this.setStrokeColor = async (t, e) => {
|
|
1120
|
+
const r = { strokeColor: e };
|
|
1121
|
+
return this.setShapeProperties(t, r);
|
|
1122
|
+
}, this.setStrokeWeight = async (t, e) => {
|
|
1123
|
+
const r = { strokeWeight: e };
|
|
1124
|
+
return this.setShapeProperties(t, r);
|
|
1125
|
+
}, this.setFlagAllCornersSame = async (t, e) => {
|
|
1126
|
+
const r = { allCornersSame: e };
|
|
1127
|
+
return this.setShapeProperties(t, r);
|
|
1128
|
+
}, this.setShapeCorners = async (t, e) => (await i(this, bt)).setShapeCorners(t, JSON.stringify(e)).then((n) => o(n)), this.setRadiusAll = async (t, e) => {
|
|
1129
|
+
const r = { radiusAll: e };
|
|
1130
|
+
return this.setShapeCorners(t, r);
|
|
1131
|
+
}, this.setRadiusTopLeft = async (t, e) => {
|
|
1132
|
+
const r = { topLeft: e };
|
|
1133
|
+
return this.setShapeCorners(t, r);
|
|
1134
|
+
}, this.setRadiusBottomLeft = async (t, e) => {
|
|
1135
|
+
const r = { bottomLeft: e };
|
|
1136
|
+
return this.setShapeCorners(t, r);
|
|
1137
|
+
}, this.setRadiusTopRight = async (t, e) => {
|
|
1138
|
+
const r = { topRight: e };
|
|
1139
|
+
return this.setShapeCorners(t, r);
|
|
1140
|
+
}, this.setRadiusBottomRight = async (t, e) => {
|
|
1141
|
+
const r = { bottomRight: e };
|
|
1142
|
+
return this.setShapeCorners(t, r);
|
|
1143
|
+
}, g(this, bt, a);
|
|
1144
|
+
}
|
|
1145
|
+
}
|
|
1146
|
+
bt = new WeakMap();
|
|
1147
|
+
var d;
|
|
1148
|
+
class ze {
|
|
1149
|
+
/**
|
|
1150
|
+
* @ignore
|
|
1151
|
+
*/
|
|
1152
|
+
constructor(a) {
|
|
1153
|
+
/**
|
|
1154
|
+
* @ignore
|
|
1155
|
+
*/
|
|
1156
|
+
u(this, d);
|
|
1157
|
+
this.getAll = async () => (await i(this, d)).getFrames().then((e) => o(e)), this.getSelected = async () => (await i(this, d)).getSelectedFrames().then((e) => o(e)), this.getAllByPageId = async (t) => (await i(this, d)).getFramesByPageId(t).then((r) => o(r)), this.getByName = async (t) => (await i(this, d)).getFrameByName(t).then((r) => o(r)), this.getById = async (t) => (await i(this, d)).getFrameById(t).then((r) => o(r)), this.getPropertiesOnSelectedLayout = async () => (await i(this, d)).getFramePropertiesOnSelectedLayout().then((e) => o(e)), this.getLayoutProperties = async (t, e) => (await i(this, d)).getFramePropertiesByFrameId(t, e).then((n) => o(n)), this.getAllLayoutProperties = async (t) => (await i(this, d)).getFramesProperties(t).then((r) => o(r)), this.resetTransformation = async (t) => (await i(this, d)).resetFrameTransformation(t).then((r) => o(r)), this.resetSize = async (t) => (await i(this, d)).resetFrameTransformation(t).then((r) => o(r)), this.select = async (t) => (await i(this, d)).selectFrames([t]).then((r) => o(r)), this.selectMultiple = async (t) => (await i(this, d)).selectFrames(t).then((r) => o(r)), this.deselectAll = async () => (await i(this, d)).deselectFrames().then((e) => o(e)), this.reorderFrames = async (t, e) => (await i(this, d)).reorderFrames(t, e).then((n) => o(n)), this.setZIndex = async (t, e) => (await i(this, d)).setFrameZIndex(t, e).then((n) => o(n)), this.setHeight = async (t, e) => (await i(this, d)).setFrameHeight(t, e).then((n) => o(n)), this.setRotation = async (t, e) => (await i(this, d)).setFrameRotation(t, e).then((n) => o(n)), this.setWidth = async (t, e) => (await i(this, d)).setFrameWidth(t, e).then((n) => o(n)), this.setX = async (t, e) => (await i(this, d)).setFrameX(t, e).then((n) => o(n)), this.setY = async (t, e) => (await i(this, d)).setFrameY(t, e).then((n) => o(n)), this.rename = async (t, e) => (await i(this, d)).renameFrame(t, e).then((n) => o(n)), this.reset = async (t) => (await i(this, d)).resetFrame(t).then((r) => o(r)), this.resetX = async (t) => (await i(this, d)).resetFrameTransformation(t).then((r) => o(r)), this.resetY = async (t) => (await i(this, d)).resetFrameTransformation(t).then((r) => o(r)), this.resetRotation = async (t) => (await i(this, d)).resetFrameTransformation(t).then((r) => o(r)), this.resetWidth = async (t) => (await i(this, d)).resetFrameTransformation(t).then((r) => o(r)), this.resetHeight = async (t) => (await i(this, d)).resetFrameTransformation(t).then((r) => o(r)), this.resetImageFrameFitMode = async (t) => (await i(this, d)).resetImageFrameFitMode(t).then((r) => o(r)), this.setVisibility = async (t, e) => (await i(this, d)).setFrameIsVisible(t, e).then((n) => o(n)), this.setIsVisible = async (t, e) => (await i(this, d)).setFrameIsVisible(t, e).then((n) => o(n)), this.remove = async (t) => (await i(this, d)).removeFrames([t]).then((r) => o(r)), this.removeFrames = async (t) => (await i(this, d)).removeFrames(t).then((r) => o(r)), this.create = async (t, e, r, n, c) => (await i(this, d)).addFrame(t, e, r, n, c).then((h) => o(h)), this.createShapeFrame = async (t, e, r, n, c) => (await i(this, d)).addFrame(t, e, r, n, c).then((h) => o(h)), this.createBarcodeFrame = async (t, e) => (await i(this, d)).addBarcodeFrame(t, e == null ? void 0 : e.x, e == null ? void 0 : e.y).then((n) => o(n)), this.duplicateFrames = async (t) => (await i(this, d)).duplicateFrames(t).then((r) => o(r)), this.updateImageSource = async (t, e) => {
|
|
1158
|
+
const r = await i(this, d), n = e !== null ? JSON.stringify(e) : null;
|
|
1159
|
+
return r.setImageSource(t, n).then((c) => o(c));
|
|
1160
|
+
}, this.removeImageSource = async (t) => this.updateImageSource(t, null), this.setImageFromConnector = async (t, e, r) => {
|
|
1161
|
+
const n = {
|
|
1162
|
+
id: e,
|
|
1163
|
+
assetId: r,
|
|
1164
|
+
type: Kt.connector
|
|
1165
|
+
};
|
|
1166
|
+
return this.updateImageSource(t, n);
|
|
1167
|
+
}, this.setImageFromUrl = async (t, e) => {
|
|
1168
|
+
const r = { url: e, type: Kt.url };
|
|
1169
|
+
return this.updateImageSource(t, r);
|
|
1170
|
+
}, this.setImageFrameFitMode = async (t, e) => (await i(this, d)).setImageFrameFitMode(t, e).then((n) => o(n)), this.setImageFrameFitModePosition = async (t, e) => (await i(this, d)).setImageFrameFitModePosition(t, e).then((n) => o(n)), this.setFrameConstrainProportions = async (t, e) => (console.error("setFrameConstrainProportions is not supported anymore"), o({
|
|
1171
|
+
success: !1,
|
|
1172
|
+
status: 0,
|
|
1173
|
+
error: "setFrameConstrainProportions is not supported anymore",
|
|
1174
|
+
parsedData: null
|
|
1175
|
+
})), this.setVerticalAlign = async (t, e) => (await i(this, d)).setVerticalAlignment(t, e).then((n) => o(n)), this.setMinCopyfitting = async (t, e) => (await i(this, d)).setMinCopyfitting(t, e).then((n) => o(n)), this.setMaxCopyfitting = async (t, e) => (await i(this, d)).setMaxCopyfitting(t, e).then((n) => o(n)), this.setEnableCopyfitting = async (t, e) => (await i(this, d)).setEnableCopyfitting(t, e).then((n) => o(n)), this.resetMinCopyfitting = async (t) => (await i(this, d)).resetMinCopyfitting(t).then((r) => o(r)), this.resetMaxCopyfitting = async (t) => (await i(this, d)).resetMaxCopyfitting(t).then((r) => o(r)), this.resetEnableCopyfitting = async (t) => (await i(this, d)).resetEnableCopyfitting(t).then((r) => o(r)), this.setShapeFrameEnableFill = async (t, e) => this.shapeController.setEnableFill(t, e), this.setShapeFrameFillColor = async (t, e) => this.shapeController.setFillColor(t, e), this.setShapeFrameEnableStroke = async (t, e) => this.shapeController.setEnableStroke(t, e), this.setShapeFrameStrokeColor = async (t, e) => this.shapeController.setStrokeColor(t, e), this.setShapeFrameStrokeWeight = async (t, e) => this.shapeController.setStrokeWeight(t, e), this.setBlendMode = async (t, e) => (await i(this, d)).setFrameBlendMode(t, e).then((n) => o(n)), this.enterCropMode = async (t, e = Cs.frameCrop) => (await i(this, d)).enterCropMode(t, e).then((n) => o(n)), this.applyCropMode = async () => (await i(this, d)).applyCropMode().then((e) => o(e)), this.exitCropMode = async () => (await i(this, d)).cancelCropMode().then((e) => o(e)), this.enterSubjectMode = async (t) => (await i(this, d)).enterSubjectMode(t).then((r) => o(r)), this.applySubjectMode = async () => (await i(this, d)).applySubjectMode().then((e) => o(e)), this.exitSubjectMode = async () => (await i(this, d)).cancelSubjectMode().then((e) => o(e)), this.resetCropMode = async (t) => (console.error("resetCropMode is not supported anymore"), o({
|
|
1176
|
+
success: !1,
|
|
1177
|
+
status: 0,
|
|
1178
|
+
error: "resetCropMode is not supported anymore",
|
|
1179
|
+
parsedData: null
|
|
1180
|
+
})), this.setEnableAutoGrow = async (t, e) => {
|
|
1181
|
+
const r = { enabled: { value: e } };
|
|
1182
|
+
return (await i(this, d)).updateAutoGrowSettings(t, JSON.stringify(r)).then((c) => o(c));
|
|
1183
|
+
}, this.setAutoGrowMinWidth = async (t, e) => {
|
|
1184
|
+
const r = { minWidth: { value: e } };
|
|
1185
|
+
return (await i(this, d)).updateAutoGrowSettings(t, JSON.stringify(r)).then((c) => o(c));
|
|
1186
|
+
}, this.setAutoGrowMaxWidth = async (t, e) => {
|
|
1187
|
+
const r = { maxWidth: { value: e } };
|
|
1188
|
+
return (await i(this, d)).updateAutoGrowSettings(t, JSON.stringify(r)).then((c) => o(c));
|
|
1189
|
+
}, this.setAutoGrowMinHeight = async (t, e) => {
|
|
1190
|
+
const r = { minHeight: { value: e } };
|
|
1191
|
+
return (await i(this, d)).updateAutoGrowSettings(t, JSON.stringify(r)).then((c) => o(c));
|
|
1192
|
+
}, this.setAutoGrowMaxHeight = async (t, e) => {
|
|
1193
|
+
const r = { maxHeight: { value: e } };
|
|
1194
|
+
return (await i(this, d)).updateAutoGrowSettings(t, JSON.stringify(r)).then((c) => o(c));
|
|
1195
|
+
}, this.setAutoGrowDirections = async (t, e) => {
|
|
1196
|
+
const r = { directions: { value: e } };
|
|
1197
|
+
return (await i(this, d)).updateAutoGrowSettings(t, JSON.stringify(r)).then((c) => o(c));
|
|
1198
|
+
}, this.resetAutoGrowSettingsEnabled = async (t) => (console.error("resetAutoGrowSettingsEnabled is not supported anymore"), o({
|
|
1199
|
+
success: !1,
|
|
1200
|
+
status: 0,
|
|
1201
|
+
error: "resetAutoGrowSettingsEnabled is not supported anymore",
|
|
1202
|
+
parsedData: null
|
|
1203
|
+
})), this.resetAutoGrowMinWidth = async (t) => (console.error("resetAutoGrowMinWidth is not supported anymore"), o({
|
|
1204
|
+
success: !1,
|
|
1205
|
+
status: 0,
|
|
1206
|
+
error: "resetAutoGrowMinWidth is not supported anymore",
|
|
1207
|
+
parsedData: null
|
|
1208
|
+
})), this.resetAutoGrowMaxWidth = async (t) => (console.error("resetAutoGrowMaxWidth is not supported anymore"), o({
|
|
1209
|
+
success: !1,
|
|
1210
|
+
status: 0,
|
|
1211
|
+
error: "resetAutoGrowMaxWidth is not supported anymore",
|
|
1212
|
+
parsedData: null
|
|
1213
|
+
})), this.resetAutoGrowMinHeight = async (t) => (console.error("resetAutoGrowMinHeight is not supported anymore"), o({
|
|
1214
|
+
success: !1,
|
|
1215
|
+
status: 0,
|
|
1216
|
+
error: "resetAutoGrowMinHeight is not supported anymore",
|
|
1217
|
+
parsedData: null
|
|
1218
|
+
})), this.resetAutoGrowMaxHeight = async (t) => (console.error("resetAutoGrowMaxHeight is not supported anymore"), o({
|
|
1219
|
+
success: !1,
|
|
1220
|
+
status: 0,
|
|
1221
|
+
error: "resetAutoGrowMaxHeight is not supported anymore",
|
|
1222
|
+
parsedData: null
|
|
1223
|
+
})), this.resetAutoGrowDirections = async (t) => (console.error("resetAutoGrowDirections is not supported anymore"), o({
|
|
1224
|
+
success: !1,
|
|
1225
|
+
status: 0,
|
|
1226
|
+
error: "resetAutoGrowDirections is not supported anymore",
|
|
1227
|
+
parsedData: null
|
|
1228
|
+
})), this.resetAutoGrow = async (t) => (console.error("resetAutoGrow is not supported anymore"), o({
|
|
1229
|
+
success: !1,
|
|
1230
|
+
status: 0,
|
|
1231
|
+
error: "resetAutoGrow is not supported anymore",
|
|
1232
|
+
parsedData: null
|
|
1233
|
+
})), this.setAnchor = async (t, e, r, n, c) => {
|
|
1234
|
+
const l = {
|
|
1235
|
+
horizontal: e,
|
|
1236
|
+
type: r,
|
|
1237
|
+
target: n,
|
|
1238
|
+
endTarget: c
|
|
1239
|
+
};
|
|
1240
|
+
return (await i(this, d)).setAnchorProperties(t, JSON.stringify(l)).then((y) => o(y));
|
|
1241
|
+
}, this.setVerticalAnchor = async (t, e, r, n) => this.setAnchor(t, !1, e, r, n), this.setHorizontalAnchor = async (t, e, r, n) => this.setAnchor(t, !0, e, r, n), this.resetAnchoring = async (t) => (await i(this, d)).resetFrameTransformation(t).then((r) => o(r)), this.resetVisibility = async (t) => (await i(this, d)).setFrameIsVisible(t, null).then((r) => o(r)), this.getConfiguration = async (t) => (await i(this, d)).getFrameConfiguration(t).then((r) => o(r)), this.resetAssetCropOverride = async (t) => (await i(this, d)).resetAssetCropOverride(t).then((r) => o(r)), this.resetAllAssetCropOverrides = async (t) => (await i(this, d)).resetAllAssetCropOverrides(t).then((r) => o(r)), g(this, d, a), this.shapeController = new ee(i(this, d));
|
|
1242
|
+
}
|
|
1243
|
+
}
|
|
1244
|
+
d = new WeakMap();
|
|
1245
|
+
class Ke {
|
|
1246
|
+
constructor() {
|
|
1247
|
+
this.currentEngineVersion = cs.current, this.currentSDKVersion = hs.version;
|
|
1248
|
+
}
|
|
1249
|
+
}
|
|
1250
|
+
var w, Tt;
|
|
1251
|
+
class We {
|
|
1252
|
+
/**
|
|
1253
|
+
* @ignore
|
|
1254
|
+
*/
|
|
1255
|
+
constructor(a) {
|
|
1256
|
+
/**
|
|
1257
|
+
* @ignore
|
|
1258
|
+
*/
|
|
1259
|
+
u(this, w);
|
|
1260
|
+
u(this, Tt);
|
|
1261
|
+
this.getAll = async () => (await i(this, w)).getLayouts().then((e) => o(e)), this.getById = async (t) => (await i(this, w)).getLayoutById(t).then((r) => o(r)), this.getByName = async (t) => (await i(this, w)).getLayoutByName(t).then((r) => o(r)), this.getSelected = async () => (await i(this, w)).getSelectedLayout().then((e) => o(e)), this.remove = async (t) => (await i(this, w)).removeLayout(t).then((r) => o(r)), this.create = async (t, e) => {
|
|
1262
|
+
const r = await i(this, w);
|
|
1263
|
+
return e != null && e.length ? r.addLayouts(t, JSON.stringify(e)).then((n) => o(n)) : r.addLayout(t).then((n) => o(n));
|
|
1264
|
+
}, this.rename = async (t, e) => (await i(this, w)).renameLayout(t, e).then((n) => o(n)), this.select = async (t) => (await i(this, w)).selectLayout(t).then((r) => o(r)), this.duplicate = async (t) => (await i(this, w)).duplicateLayout(t).then((r) => o(r)), this.reset = async (t) => (await i(this, w)).resetLayout(t).then((r) => o(r)), this.setHeight = async (t, e) => (await i(this, w)).setLayoutHeight(t, e).then((n) => o(n)), this.setWidth = async (t, e) => (await i(this, w)).setLayoutWidth(t, e).then((n) => o(n)), this.setUnit = async (t, e) => (await i(this, w)).setLayoutUnit(t, e).then((n) => o(n)), this.resetHeight = async (t) => (await i(this, w)).resetLayoutHeight(t).then((r) => o(r)), this.resetWidth = async (t) => (await i(this, w)).resetLayoutWidth(t).then((r) => o(r)), this.resetUnit = async (t) => (await i(this, w)).resetLayoutUnit(t).then((r) => o(r)), this.getSelectedSnapshot = async () => (await i(this, Tt)).getPageSnapshot().then((e) => e ?? e), this.setIntent = async (t, e) => (await i(this, w)).setLayoutIntent(t, e).then((n) => o(n)), this.resetIntent = async (t) => (await i(this, w)).resetLayoutIntent(t).then((r) => o(r)), this.setFillColor = async (t, e) => (await i(this, w)).setLayoutFillColor(t, JSON.stringify(e)).then((n) => o(n)), this.setFillColorEnabled = async (t, e) => (await i(this, w)).setLayoutFillColorEnabled(t, e).then((n) => o(n)), this.resetFillColor = async (t) => (await i(this, w)).resetLayoutFillColor(t).then((r) => o(r)), this.setBleedValue = async (t, e, r) => {
|
|
1265
|
+
const n = r ? {
|
|
1266
|
+
left: r === q.left ? e : void 0,
|
|
1267
|
+
top: r === q.top ? e : void 0,
|
|
1268
|
+
right: r === q.right ? e : void 0,
|
|
1269
|
+
bottom: r === q.bottom ? e : void 0
|
|
1270
|
+
} : { left: e, top: e, right: e, bottom: e };
|
|
1271
|
+
return (await i(this, w)).updateLayoutBleed(t, JSON.stringify(n)).then((l) => o(l));
|
|
1272
|
+
}, this.setAreBleedValuesCombined = async (t, e) => {
|
|
1273
|
+
const r = { areBleedValuesCombined: e };
|
|
1274
|
+
return (await i(this, w)).updateLayoutBleed(t, JSON.stringify(r)).then((c) => o(c));
|
|
1275
|
+
}, this.resetBleedValues = async (t) => (await i(this, w)).updateLayoutBleed(t, null).then((r) => o(r)), this.setPrivateData = async (t, e) => (await i(this, w)).setLayoutPrivateData(t, JSON.stringify(e)).then((n) => o(n)), this.getPrivateData = async (t) => (await i(this, w)).getLayoutPrivateData(t).then((r) => o(r)), this.setDisplayName = async (t, e) => (await i(this, w)).setLayoutDisplayName(t, e).then((n) => o(n)), this.getDisplayName = async (t) => (await i(this, w)).getLayoutDisplayName(t).then((r) => o(r)), this.resetDisplayName = async (t) => (await i(this, w)).setLayoutDisplayName(t, null).then((r) => o(r)), this.setAvailableForUser = async (t, e) => (await i(this, w)).setLayoutAvailableForUser(t, e).then((n) => o(n)), this.setSelectedByUser = async (t, e) => (await i(this, w)).setLayoutSelectedByUser(t, e).then((n) => o(n)), this.setResizableByUser = async (t, e) => (await i(this, w)).setLayoutResizableByUser(t, JSON.stringify(e)).then((n) => o(n)), g(this, w, a), g(this, Tt, a);
|
|
1276
|
+
}
|
|
1277
|
+
}
|
|
1278
|
+
w = new WeakMap(), Tt = new WeakMap();
|
|
1279
|
+
var se = /* @__PURE__ */ ((s) => (s.thumbnail = "thumbnail", s.mediumres = "mediumres", s.highres = "highres", s.original = "original", s))(se || {}), ms = /* @__PURE__ */ ((s) => (s.web = "web", s.print = "print", s.animation = "animation", s))(ms || {}), K, Gt;
|
|
1280
|
+
class je {
|
|
1281
|
+
/**
|
|
1282
|
+
* @ignore
|
|
1283
|
+
*/
|
|
1284
|
+
constructor(a) {
|
|
1285
|
+
/**
|
|
1286
|
+
* @ignore
|
|
1287
|
+
*/
|
|
1288
|
+
u(this, K);
|
|
1289
|
+
u(this, Gt);
|
|
1290
|
+
this.query = async (t, e, r = {}) => (await i(this, K)).mediaConnectorQuery(t, JSON.stringify(e), JSON.stringify(r)).then((c) => o(c)), this.detail = async (t, e, r = {}) => (await i(this, K)).mediaConnectorDetail(t, e, JSON.stringify(r)).then((c) => o(c)), this.download = async (t, e, r, n = {}) => {
|
|
1291
|
+
const c = this.parseDeprecatedMediaDownloadType(
|
|
1292
|
+
r
|
|
1293
|
+
);
|
|
1294
|
+
return (await i(this, Gt)).mediaConnectorDownload(
|
|
1295
|
+
t,
|
|
1296
|
+
e,
|
|
1297
|
+
c,
|
|
1298
|
+
ms.web,
|
|
1299
|
+
JSON.stringify(n)
|
|
1300
|
+
).then((h) => h ?? h);
|
|
1301
|
+
}, this.getConfigurationOptions = async (t) => (await i(this, K)).mediaConnectorGetConfigurationOptions(t).then((r) => o(r)), this.getCapabilities = async (t) => (await i(this, K)).mediaConnectorGetCapabilities(t).then((r) => o(r)), this.parseDeprecatedMediaType = (t) => {
|
|
1302
|
+
if (t === Mt.file) return Vt.file;
|
|
1303
|
+
if (t === Mt.collection) return Vt.collection;
|
|
1304
|
+
}, this.upload = async (t, e, r = {}) => (await i(this, K)).mediaConnectorUpload(t, JSON.stringify(e), JSON.stringify(r)).then((c) => o(c)), g(this, K, a), g(this, Gt, a);
|
|
1305
|
+
}
|
|
1306
|
+
/**
|
|
1307
|
+
* This method will parse the deprecatedMediaDownloadType to the new media download type.
|
|
1308
|
+
* This method will be removed once the deprecatedMediaDownloadType is out of use
|
|
1309
|
+
* @param deprecatedMediaDownloadType legacy download type
|
|
1310
|
+
* @returns MediaDownloadType
|
|
1311
|
+
*/
|
|
1312
|
+
parseDeprecatedMediaDownloadType(a) {
|
|
1313
|
+
switch (a) {
|
|
1314
|
+
case Xt.HighResolutionWeb:
|
|
1315
|
+
return se.highres;
|
|
1316
|
+
case Xt.LowResolutionWeb:
|
|
1317
|
+
return se.thumbnail;
|
|
1318
|
+
default:
|
|
1319
|
+
return a;
|
|
1320
|
+
}
|
|
1321
|
+
}
|
|
1322
|
+
}
|
|
1323
|
+
K = new WeakMap(), Gt = new WeakMap();
|
|
1324
|
+
var F, Ht, is;
|
|
1325
|
+
let qe = (is = class {
|
|
1326
|
+
/**
|
|
1327
|
+
* @ignore
|
|
1328
|
+
*/
|
|
1329
|
+
constructor(a) {
|
|
1330
|
+
/**
|
|
1331
|
+
* @ignore
|
|
1332
|
+
*/
|
|
1333
|
+
u(this, F);
|
|
1334
|
+
/**
|
|
1335
|
+
* @ignore
|
|
1336
|
+
*/
|
|
1337
|
+
u(this, Ht);
|
|
1338
|
+
this.add = async () => (await i(this, F)).addPage().then((e) => o(e)), this.remove = async (t) => (await i(this, F)).removePage(t).then((r) => o(r)), this.select = async (t) => (await i(this, F)).selectPage(t).then((r) => o(r)), this.setVisibility = async (t, e) => (await i(this, F)).setPageIsVisible(t, e).then((n) => o(n)), this.duplicate = async (t) => (await i(this, F)).duplicatePage(t).then((r) => o(r)), this.getAll = async () => (await i(this, F)).getPages().then((e) => o(e)), this.getById = async (t) => (await i(this, F)).getPageById(t).then((r) => o(r)), this.getSnapshot = async (t, e) => (await i(this, Ht)).getPageSnapshotWithSettings(t, e == null ? null : JSON.stringify(e)).then((n) => n ?? n), this.setWidth = async (t, e) => (t !== void 0 && console.warn("pageId has no effect since all pages are being updated simultaneously."), (await i(this, F)).setPageWidth(e).then((n) => o(n))), this.setHeight = async (t, e) => (t !== void 0 && console.warn("pageId has no effect since all pages are being updated simultaneously."), (await i(this, F)).setPageHeight(e).then((n) => o(n))), this.setSize = async (t, e) => (await i(this, F)).setPageSize(t, e).then((n) => o(n)), this.move = async (t, e) => (await i(this, F)).reorderPages(t, e).then((n) => o(n)), g(this, F, a), g(this, Ht, a);
|
|
1339
|
+
}
|
|
1340
|
+
}, F = new WeakMap(), Ht = new WeakMap(), is);
|
|
1341
|
+
var V;
|
|
1342
|
+
class Ye {
|
|
1343
|
+
/**
|
|
1344
|
+
* @ignore
|
|
1345
|
+
*/
|
|
1346
|
+
constructor(a) {
|
|
1347
|
+
/**
|
|
1348
|
+
* @ignore
|
|
1349
|
+
*/
|
|
1350
|
+
u(this, V);
|
|
1351
|
+
this.getAll = async () => (await i(this, V)).getParagraphStyles().then((e) => o(e)), this.getById = async (t) => (await i(this, V)).getParagraphStyleById(t).then((r) => o(r)), this.create = async () => (await i(this, V)).createParagraphStyle().then((e) => o(e)), this.duplicate = async (t) => (await i(this, V)).duplicateParagraphStyle(t).then((r) => o(r)), this.update = async (t, e) => (await i(this, V)).updateParagraphStyle(t, JSON.stringify(e)).then((n) => o(n)), this.rename = async (t, e) => (await i(this, V)).renameParagraphStyle(t, e).then((n) => o(n)), this.remove = async (t) => (await i(this, V)).removeParagraphStyle(t).then((r) => o(r)), this.move = async (t, e) => (await i(this, V)).moveParagraphStyles(t, e).then((n) => o(n)), g(this, V, a);
|
|
1352
|
+
}
|
|
1353
|
+
}
|
|
1354
|
+
V = new WeakMap();
|
|
1355
|
+
var O = /* @__PURE__ */ ((s) => (s.info = "info", s.warn = "warn", s.error = "error", s))(O || {}), ws = /* @__PURE__ */ ((s) => (s.general = "general", s.connector = "connector", s.event = "event", s.engine = "engine", s))(ws || {}), Jt = /* @__PURE__ */ ((s) => (s.throw = "throw", s.log = "log", s))(Jt || {});
|
|
1356
|
+
class xr {
|
|
1357
|
+
constructor(a, t, e, r) {
|
|
1358
|
+
this.type = "action", this.message = a, this.id = t, this.event = e, this.eventChain = r;
|
|
1359
|
+
}
|
|
1360
|
+
}
|
|
1361
|
+
class Rr {
|
|
1362
|
+
constructor(a, t, e) {
|
|
1363
|
+
this.type = "dataRow", this.count = a, this.message = t, this.exceptions = e;
|
|
1364
|
+
}
|
|
1365
|
+
}
|
|
1366
|
+
var ae = /* @__PURE__ */ ((s) => (s.shortText = "shortText", s.longText = "longText", s.image = "image", s.list = "list", s.boolean = "boolean", s.group = "group", s.number = "number", s.date = "date", s))(ae || {}), Mr = /* @__PURE__ */ ((s) => (s.Monday = "monday", s.Tuesday = "tuesday", s.Wednesday = "wednesday", s.Thursday = "thursday", s.Friday = "friday", s.Saturday = "saturday", s.Sunday = "sunday", s))(Mr || {}), Vr = /* @__PURE__ */ ((s) => (s.en_US = "en_US", s.cs = "cs", s.da = "da", s.nl = "nl", s.fi = "fi", s.fr = "fr", s.de = "de", s.it = "it", s.no = "no", s.pl = "pl", s.pt_PT = "pt_PT", s.es_ES = "es_ES", s.sv = "sv", s))(Vr || {}), xt = /* @__PURE__ */ ((s) => (s.visible = "visible", s.invisible = "invisible", s.conditional = "conditional", s))(xt || {}), Jr = /* @__PURE__ */ ((s) => (s.boolean = "boolean", s.text = "text", s.number = "number", s))(Jr || {}), Br = /* @__PURE__ */ ((s) => (s.equals = "=", s.notEquals = "!=", s.greaterThan = ">", s.greaterThanOrEquals = ">=", s.lessThan = "<", s.lessThanOrEquals = "<=", s))(Br || {});
|
|
1367
|
+
let Ur = class {
|
|
1368
|
+
/**
|
|
1369
|
+
* @ignore
|
|
1370
|
+
*/
|
|
1371
|
+
constructor(a, t) {
|
|
1372
|
+
this.onActionsChanged = (e) => {
|
|
1373
|
+
this.config.events.onActionsChanged.trigger(JSON.parse(e));
|
|
1374
|
+
}, this.onAnimationChanged = (e) => {
|
|
1375
|
+
this.config.events.onFrameAnimationsChanged.trigger(JSON.parse(e));
|
|
1376
|
+
}, this.onAnimationPlaybackChanged = (e) => {
|
|
1377
|
+
this.config.events.onScrubberPositionChanged.trigger(JSON.parse(e));
|
|
1378
|
+
}, this.onSelectedLayoutPropertiesChanged = (e) => {
|
|
1379
|
+
this.config.events.onSelectedLayoutPropertiesChanged.trigger(JSON.parse(e));
|
|
1380
|
+
}, this.onSelectedLayoutUnitChanged = (e) => {
|
|
1381
|
+
this.config.events.onSelectedLayoutUnitChanged.trigger(e);
|
|
1382
|
+
}, this.onFramesLayoutChanged = (e) => {
|
|
1383
|
+
const r = JSON.parse(e);
|
|
1384
|
+
this.config.events.onFramesLayoutChanged.trigger(r);
|
|
1385
|
+
}, this.onSelectedFramesLayoutChanged = (e) => {
|
|
1386
|
+
const r = JSON.parse(e);
|
|
1387
|
+
this.config.events.onSelectedFramesLayoutChanged.trigger(r);
|
|
1388
|
+
const n = this.config.onSelectedFrameLayoutChanged;
|
|
1389
|
+
n && n(r.length > 1 ? void 0 : r[0]);
|
|
1390
|
+
}, this.onSelectedFramesContentChanged = (e) => {
|
|
1391
|
+
const r = JSON.parse(e);
|
|
1392
|
+
this.config.events.onSelectedFramesContentChanged.trigger(r);
|
|
1393
|
+
const n = this.config.onSelectedFrameContentChanged;
|
|
1394
|
+
n && n(r.length > 1 ? null : r[0]);
|
|
1395
|
+
}, this.onStateChanged = () => {
|
|
1396
|
+
this.config.events.onStateChanged.trigger();
|
|
1397
|
+
}, this.onAuthExpired = async (e) => {
|
|
1398
|
+
const r = await this.config.handlers.onAuthExpired.trigger(JSON.parse(e));
|
|
1399
|
+
return r != null ? JSON.stringify(r) : null;
|
|
1400
|
+
}, this.onViewportRequested = () => {
|
|
1401
|
+
const e = this.config.handlers.onViewportRequested.trigger();
|
|
1402
|
+
return e != null ? JSON.stringify(e) : null;
|
|
1403
|
+
}, this.onDocumentLoaded = () => {
|
|
1404
|
+
this.config.events.onDocumentLoaded.trigger();
|
|
1405
|
+
}, this.onPageSelectionChanged = (e) => {
|
|
1406
|
+
this.config.events.onPageSelectionChanged.trigger(e);
|
|
1407
|
+
}, this.onVariableListChanged = (e) => {
|
|
1408
|
+
const n = JSON.parse(e).map(
|
|
1409
|
+
(c) => {
|
|
1410
|
+
var l;
|
|
1411
|
+
return c.type === ae.list ? {
|
|
1412
|
+
...c,
|
|
1413
|
+
items: c.items.map(
|
|
1414
|
+
(h) => h.value
|
|
1415
|
+
),
|
|
1416
|
+
selected: (l = c.selected) == null ? void 0 : l.value
|
|
1417
|
+
} : c;
|
|
1418
|
+
}
|
|
1419
|
+
);
|
|
1420
|
+
this.config.events.onVariableListChanged.trigger(n);
|
|
1421
|
+
}, this.onSelectedToolChanged = (e) => {
|
|
1422
|
+
this.config.events.onSelectedToolChanged.trigger(e);
|
|
1423
|
+
}, this.onUndoStateChanged = (e) => {
|
|
1424
|
+
this.config.events.onUndoStackStateChanged.trigger(JSON.parse(e));
|
|
1425
|
+
}, this.onCustomUndoDataChanged = (e) => {
|
|
1426
|
+
this.config.events.onCustomUndoDataChanged.trigger(JSON.parse(e));
|
|
1427
|
+
}, this.onSelectedLayoutFramesChanged = (e) => {
|
|
1428
|
+
this.config.events.onSelectedLayoutFramesChanged.trigger(JSON.parse(e));
|
|
1429
|
+
}, this.onSelectedTextStyleChanged = (e) => {
|
|
1430
|
+
this.config.events.onSelectedTextStyleChanged.trigger(JSON.parse(e));
|
|
1431
|
+
}, this.onColorsChanged = (e) => {
|
|
1432
|
+
this.config.events.onColorsChanged.trigger(JSON.parse(e));
|
|
1433
|
+
}, this.onParagraphStylesChanged = (e) => {
|
|
1434
|
+
this.config.events.onParagraphStylesChanged.trigger(JSON.parse(e));
|
|
1435
|
+
}, this.onCharacterStylesChanged = (e) => {
|
|
1436
|
+
this.config.events.onCharacterStylesChanged.trigger(JSON.parse(e));
|
|
1437
|
+
}, this.onFontFamiliesChanged = (e) => {
|
|
1438
|
+
this.config.events.onFontFamiliesChanged.trigger(JSON.parse(e));
|
|
1439
|
+
}, this.onSelectedLayoutIdChanged = (e) => {
|
|
1440
|
+
this.config.events.onSelectedLayoutIdChanged.trigger(e);
|
|
1441
|
+
}, this.onLayoutsChanged = (e) => {
|
|
1442
|
+
this.config.events.onLayoutsChanged.trigger(JSON.parse(e));
|
|
1443
|
+
}, this.onZoomChanged = (e) => {
|
|
1444
|
+
this.config.events.onZoomChanged.trigger(JSON.parse(e));
|
|
1445
|
+
}, this.onConnectorEvent = (e) => {
|
|
1446
|
+
this.config.events.onConnectorEvent.trigger(JSON.parse(e));
|
|
1447
|
+
}, this.onConnectorsChanged = (e) => {
|
|
1448
|
+
const n = new ne().makeMultipleConnectorsBackwardsCompatible(
|
|
1449
|
+
JSON.parse(e),
|
|
1450
|
+
this.localConfig.get(Y.GraFxStudioEnvironmentApiUrl)
|
|
1451
|
+
);
|
|
1452
|
+
this.config.events.onConnectorsChanged.trigger(n);
|
|
1453
|
+
}, this.onSelectedPageIdChanged = (e) => {
|
|
1454
|
+
this.config.events.onSelectedPageIdChanged.trigger(e);
|
|
1455
|
+
}, this.onPagesChanged = (e) => {
|
|
1456
|
+
this.config.events.onPagesChanged.trigger(JSON.parse(e));
|
|
1457
|
+
}, this.onPageSnapshotInvalidated = (e) => {
|
|
1458
|
+
this.config.events.onPageSnapshotInvalidated.trigger(JSON.parse(e));
|
|
1459
|
+
}, this.onPageSizeChanged = (e) => {
|
|
1460
|
+
this.config.events.onPageSizeChanged.trigger(JSON.parse(e));
|
|
1461
|
+
}, this.onShapeCornerRadiusChanged = (e) => {
|
|
1462
|
+
this.config.events.onShapeCornerRadiusChanged.trigger(JSON.parse(e));
|
|
1463
|
+
}, this.onCropActiveFrameIdChanged = (e) => {
|
|
1464
|
+
this.config.events.onCropActiveFrameIdChanged.trigger(e);
|
|
1465
|
+
}, this.onAsyncError = (e) => {
|
|
1466
|
+
const r = JSON.parse(e);
|
|
1467
|
+
if ((r == null ? void 0 : r.type) === "dataRow") {
|
|
1468
|
+
const n = new Rr(
|
|
1469
|
+
r.count,
|
|
1470
|
+
r.message,
|
|
1471
|
+
r.exceptions
|
|
1472
|
+
);
|
|
1473
|
+
this.config.events.onAsyncError.trigger(n);
|
|
1474
|
+
} else if ((r == null ? void 0 : r.type) === "action") {
|
|
1475
|
+
const n = new xr(
|
|
1476
|
+
r.message,
|
|
1477
|
+
r.id,
|
|
1478
|
+
r.event,
|
|
1479
|
+
r.eventChain
|
|
1480
|
+
);
|
|
1481
|
+
this.config.events.onAsyncError.trigger(n);
|
|
1482
|
+
} else
|
|
1483
|
+
this.config.events.onAsyncError.trigger(r);
|
|
1484
|
+
}, this.onViewModeChanged = (e) => {
|
|
1485
|
+
this.config.events.onViewModeChanged.trigger(e);
|
|
1486
|
+
}, this.onBarcodeValidationChanged = (e) => {
|
|
1487
|
+
this.config.events.onBarcodeValidationChanged.trigger(JSON.parse(e));
|
|
1488
|
+
}, this.onDataSourceIdChanged = (e) => {
|
|
1489
|
+
this.config.events.onDataSourceIdChanged.trigger(e);
|
|
1490
|
+
}, this.onDocumentIssueListChanged = (e) => {
|
|
1491
|
+
this.config.events.onDocumentIssueListChanged.trigger(JSON.parse(e));
|
|
1492
|
+
}, this.onEngineEditModeChanged = (e) => {
|
|
1493
|
+
this.config.events.onEngineEditModeChanged.trigger(JSON.parse(e));
|
|
1494
|
+
}, this.config = a, this.localConfig = t;
|
|
1495
|
+
}
|
|
1496
|
+
};
|
|
1497
|
+
var ut;
|
|
1498
|
+
class Ze {
|
|
1499
|
+
/**
|
|
1500
|
+
* @ignore
|
|
1501
|
+
*/
|
|
1502
|
+
constructor(a) {
|
|
1503
|
+
/**
|
|
1504
|
+
* @ignore
|
|
1505
|
+
*/
|
|
1506
|
+
u(this, ut);
|
|
1507
|
+
this.set = async (t) => (await i(this, ut)).selectedTextStyleDeltaUpdate(JSON.stringify(t)).then((r) => o(r)), this.removeSelected = async () => (await i(this, ut)).selectedTextStyleClean().then((e) => o(e)), this.getSelected = async () => (await i(this, ut)).getSelectedTextStyle().then((e) => o(e)), g(this, ut, a);
|
|
1508
|
+
}
|
|
1509
|
+
}
|
|
1510
|
+
ut = new WeakMap();
|
|
1511
|
+
var kr = /* @__PURE__ */ ((s) => (s.FRAME_X = "frameX", s.FRAME_Y = "frameY", s.WIDTH = "width", s.HEIGHT = "height", s.FRAME_ROTATION = "frameRotation", s))(kr || {}), Tr = /* @__PURE__ */ ((s) => (s.LAYOUT_HEIGHT = "layoutHeight", s.LAYOUT_WIDTH = "layoutWidth", s.BLEED_TOP = "bleedTop", s.BLEED_BOTTOM = "bleedBottom", s.BLEED_LEFT = "bleedLeft", s.BLEED_RIGHT = "bleedRight", s.BLEED_VALUES_COMBINED = "areBleedValuesCombined", s))(Tr || {}), G = /* @__PURE__ */ ((s) => (s.SELECT = "select", s.ZOOM = "zoom", s.HAND = "hand", s.IMAGE_FRAME = "imageFrame", s.TEXT_FRAME = "textFrame", s.SHAPE_RECT = "rect", s.SHAPE_ELLIPSE = "ellipse", s.SHAPE_POLYGON = "polygon", s))(G || {}), Gr = /* @__PURE__ */ ((s) => (s.MP4 = "mp4", s.GIF = "gif", s.PNG = "png", s.JPG = "jpg", s.PDF = "pdf", s))(Gr || {}), re = /* @__PURE__ */ ((s) => (s.SANDBOX = "sandbox", s.PRODUCTION = "online", s))(re || {}), It;
|
|
1512
|
+
class Qe {
|
|
1513
|
+
/**
|
|
1514
|
+
* @ignore
|
|
1515
|
+
*/
|
|
1516
|
+
constructor(a) {
|
|
1517
|
+
/**
|
|
1518
|
+
* @ignore
|
|
1519
|
+
*/
|
|
1520
|
+
u(this, It);
|
|
1521
|
+
this.setTool = async (t) => (await i(this, It)).setTool(t).then((r) => o(r)), this.getSelected = async () => (await i(this, It)).getSelectedTool().then((e) => o(e)), this.setPointer = async () => this.setTool(G.SELECT), this.setSelect = async () => this.setTool(G.SELECT), this.setHand = async () => this.setTool(G.HAND), this.setZoom = async () => this.setTool(G.ZOOM), this.setTextFrame = async () => this.setTool(G.TEXT_FRAME), this.setImageFrame = async () => this.setTool(G.IMAGE_FRAME), this.setShapeRect = async () => this.setTool(G.SHAPE_RECT), this.setShapeEllipse = async () => this.setTool(G.SHAPE_ELLIPSE), this.setShapePolygon = async () => this.setTool(G.SHAPE_POLYGON), g(this, It, a);
|
|
1522
|
+
}
|
|
1523
|
+
}
|
|
1524
|
+
It = new WeakMap();
|
|
1525
|
+
var W, vt, _t;
|
|
1526
|
+
class Xe {
|
|
1527
|
+
/**
|
|
1528
|
+
* @ignore
|
|
1529
|
+
*/
|
|
1530
|
+
constructor(a, t) {
|
|
1531
|
+
/**
|
|
1532
|
+
* @ignore
|
|
1533
|
+
*/
|
|
1534
|
+
u(this, W);
|
|
1535
|
+
u(this, vt);
|
|
1536
|
+
u(this, _t);
|
|
1537
|
+
this.undo = async () => (await i(this, W)).undo().then((r) => o(r)), this.redo = async () => (await i(this, W)).redo().then((r) => o(r)), this.addCustomData = async (e, r) => (await i(this, W)).setCustomUndoData(e, r, !1).then((c) => o(c)), this.record = async (e, r) => {
|
|
1538
|
+
try {
|
|
1539
|
+
await i(this, vt).beginIfNoneActive(e), await r(i(this, _t));
|
|
1540
|
+
} catch (n) {
|
|
1541
|
+
throw n;
|
|
1542
|
+
} finally {
|
|
1543
|
+
await i(this, vt).end();
|
|
1544
|
+
}
|
|
1545
|
+
}, this.pause = async () => (await i(this, W)).pause().then((r) => o(r)), this.resume = async () => (await i(this, W)).resume().then((r) => o(r)), g(this, W, a), g(this, _t, t), g(this, vt, new Hr(a));
|
|
1546
|
+
}
|
|
1547
|
+
}
|
|
1548
|
+
W = new WeakMap(), vt = new WeakMap(), _t = new WeakMap();
|
|
1549
|
+
var gt;
|
|
1550
|
+
class Hr {
|
|
1551
|
+
/**
|
|
1552
|
+
* @ignore
|
|
1553
|
+
*/
|
|
1554
|
+
constructor(a) {
|
|
1555
|
+
/**
|
|
1556
|
+
* @ignore
|
|
1557
|
+
*/
|
|
1558
|
+
u(this, gt);
|
|
1559
|
+
this.begin = async (t) => (await i(this, gt)).begin(t).then((r) => o(r)), this.beginIfNoneActive = async (t) => (await i(this, gt)).beginIfNoneActive(t).then((r) => o(r)), this.end = async () => (await i(this, gt)).end().then((e) => o(e)), g(this, gt, a);
|
|
1560
|
+
}
|
|
1561
|
+
}
|
|
1562
|
+
gt = new WeakMap();
|
|
1563
|
+
const _r = (s, a = 2) => {
|
|
1564
|
+
const t = Math.pow(10, a);
|
|
1565
|
+
return Math.round(s * t) / t;
|
|
1566
|
+
};
|
|
1567
|
+
var Pt;
|
|
1568
|
+
class ts {
|
|
1569
|
+
constructor(a) {
|
|
1570
|
+
u(this, Pt);
|
|
1571
|
+
this.round = (t, e) => o({
|
|
1572
|
+
data: String(_r(t, e)),
|
|
1573
|
+
success: !0,
|
|
1574
|
+
status: 200,
|
|
1575
|
+
parsedData: null
|
|
1576
|
+
}), this.createEnvironmentBaseURL = (t) => {
|
|
1577
|
+
const { type: e = re.SANDBOX, environment: r = "ft-nostress", version: n = "1" } = t, c = e == re.SANDBOX ? "chili-publish-sandbox" : "chili-publish";
|
|
1578
|
+
return `https://${r}.${c}.online/grafx/api/v${n}/environment/${r}`;
|
|
1579
|
+
}, this.stageFiles = async (t, e, r) => {
|
|
1580
|
+
const n = i(this, Pt).get(Y.GraFxStudioEnvironmentApiUrl);
|
|
1581
|
+
if (!n)
|
|
1582
|
+
throw new Error("GraFx Studio Environment API URL is not set");
|
|
1583
|
+
const c = `${n}connectors/${e}/stage`, l = i(this, Pt).get(Y.GraFxStudioAuthToken);
|
|
1584
|
+
if (!l)
|
|
1585
|
+
throw new Error("GraFx Studio Auth Token is not set");
|
|
1586
|
+
const h = new FormData();
|
|
1587
|
+
t.forEach((m, S) => {
|
|
1588
|
+
const b = m instanceof File ? m.name : `blob-${S}`;
|
|
1589
|
+
h.append("files", m, b);
|
|
1590
|
+
}), r && h.append(
|
|
1591
|
+
"validationJson",
|
|
1592
|
+
JSON.stringify({
|
|
1593
|
+
allowedMimeTypes: r.mimeTypes,
|
|
1594
|
+
minDimensions: {
|
|
1595
|
+
width: r.minWidthPixels,
|
|
1596
|
+
height: r.minHeightPixels
|
|
1597
|
+
}
|
|
1598
|
+
})
|
|
1599
|
+
);
|
|
1600
|
+
const y = await fetch(c, {
|
|
1601
|
+
method: "POST",
|
|
1602
|
+
body: h,
|
|
1603
|
+
headers: {
|
|
1604
|
+
Authorization: `Bearer ${l}`
|
|
1605
|
+
}
|
|
1606
|
+
});
|
|
1607
|
+
if (y.status === 422) {
|
|
1608
|
+
const m = await y.json();
|
|
1609
|
+
throw new mr(m.message, ps.minDimension);
|
|
1610
|
+
}
|
|
1611
|
+
if (!y.ok)
|
|
1612
|
+
throw new Error("Failed to stage files");
|
|
1613
|
+
return await y.json();
|
|
1614
|
+
}, g(this, Pt, a);
|
|
1615
|
+
}
|
|
1616
|
+
}
|
|
1617
|
+
Pt = new WeakMap();
|
|
1618
|
+
var $t;
|
|
1619
|
+
class $r {
|
|
1620
|
+
constructor(a) {
|
|
1621
|
+
u(this, $t);
|
|
1622
|
+
this.setMinimum = async (t, e) => {
|
|
1623
|
+
const r = { minValue: { value: e } };
|
|
1624
|
+
return this.applyPropertiesUpdate(t, r);
|
|
1625
|
+
}, this.setMaximum = async (t, e) => {
|
|
1626
|
+
const r = { maxValue: { value: e } };
|
|
1627
|
+
return this.applyPropertiesUpdate(t, r);
|
|
1628
|
+
}, this.setShowStepper = async (t, e) => {
|
|
1629
|
+
const r = { showStepper: { value: e } };
|
|
1630
|
+
return this.applyPropertiesUpdate(t, r);
|
|
1631
|
+
}, this.setStepSize = async (t, e) => {
|
|
1632
|
+
const r = { stepSize: { value: e } };
|
|
1633
|
+
return this.applyPropertiesUpdate(t, r);
|
|
1634
|
+
}, this.setThousandsSeparator = async (t, e) => {
|
|
1635
|
+
const r = { thousandsSeparator: { value: e } };
|
|
1636
|
+
return this.applyPropertiesUpdate(t, r);
|
|
1637
|
+
}, this.setDecimalSeparator = async (t, e) => {
|
|
1638
|
+
const r = { decimalSeparator: { value: e } };
|
|
1639
|
+
return this.applyPropertiesUpdate(t, r);
|
|
1640
|
+
}, this.setDecimalCharacterStyle = async (t, e) => {
|
|
1641
|
+
const r = { decimalCharacterStyleId: { value: e } };
|
|
1642
|
+
return this.applyPropertiesUpdate(t, r);
|
|
1643
|
+
}, this.setNumberOfDecimals = async (t, e) => {
|
|
1644
|
+
const r = { numberOfDecimals: { value: e } };
|
|
1645
|
+
return this.applyPropertiesUpdate(t, r);
|
|
1646
|
+
}, g(this, $t, a);
|
|
1647
|
+
}
|
|
1648
|
+
async applyPropertiesUpdate(a, t) {
|
|
1649
|
+
const r = await (await i(this, $t)).updateNumberVariableProperties(a, JSON.stringify(t));
|
|
1650
|
+
return o(r);
|
|
1651
|
+
}
|
|
1652
|
+
}
|
|
1653
|
+
$t = new WeakMap();
|
|
1654
|
+
var zt;
|
|
1655
|
+
class zr {
|
|
1656
|
+
constructor(a) {
|
|
1657
|
+
u(this, zt);
|
|
1658
|
+
this.setDisplayFormat = async (t, e) => {
|
|
1659
|
+
const r = { displayFormat: { value: e } };
|
|
1660
|
+
return this.applyPropertiesUpdate(t, r);
|
|
1661
|
+
}, this.setLocale = async (t, e) => {
|
|
1662
|
+
const r = { locale: { value: e } };
|
|
1663
|
+
return this.applyPropertiesUpdate(t, r);
|
|
1664
|
+
}, this.setStartDate = async (t, e) => {
|
|
1665
|
+
const r = { startDate: { value: e } };
|
|
1666
|
+
return this.applyPropertiesUpdate(t, r);
|
|
1667
|
+
}, this.setEndDate = async (t, e) => {
|
|
1668
|
+
const r = { endDate: { value: e } };
|
|
1669
|
+
return this.applyPropertiesUpdate(t, r);
|
|
1670
|
+
}, this.setExcludedDays = async (t, e) => {
|
|
1671
|
+
const r = { excludedDays: { value: e } };
|
|
1672
|
+
return this.applyPropertiesUpdate(t, r);
|
|
1673
|
+
}, g(this, zt, a);
|
|
1674
|
+
}
|
|
1675
|
+
async applyPropertiesUpdate(a, t) {
|
|
1676
|
+
const r = await (await i(this, zt)).updateDateVariableProperties(a, JSON.stringify(t));
|
|
1677
|
+
return o(r);
|
|
1678
|
+
}
|
|
1679
|
+
}
|
|
1680
|
+
zt = new WeakMap();
|
|
1681
|
+
var f, At, Ft, os;
|
|
1682
|
+
let es = (os = class {
|
|
1683
|
+
/**
|
|
1684
|
+
* @ignore
|
|
1685
|
+
*/
|
|
1686
|
+
constructor(a) {
|
|
1687
|
+
/**
|
|
1688
|
+
* @ignore
|
|
1689
|
+
*/
|
|
1690
|
+
u(this, f);
|
|
1691
|
+
u(this, At);
|
|
1692
|
+
u(this, Ft);
|
|
1693
|
+
this.getAll = async () => (await i(this, f)).getVariables().then((e) => o(e)).then((e) => {
|
|
1694
|
+
const r = e;
|
|
1695
|
+
return r.parsedData && (r.parsedData = this.makeVariablesBackwardsCompatible(r.parsedData)), r;
|
|
1696
|
+
}), this.getById = async (t) => (await i(this, f)).getVariableById(t).then((r) => o(r)).then((r) => {
|
|
1697
|
+
const n = r;
|
|
1698
|
+
return n.parsedData && (n.parsedData = this.makeVariableBackwardsCompatible(n.parsedData)), n;
|
|
1699
|
+
}), this.getByName = async (t) => (await i(this, f)).getVariableByName(t).then((r) => o(r)).then((r) => {
|
|
1700
|
+
const n = r;
|
|
1701
|
+
return n.parsedData && (n.parsedData = this.makeVariableBackwardsCompatible(n.parsedData)), n;
|
|
1702
|
+
}), this.create = async (t, e) => (await i(this, f)).addVariable(t, e).then((n) => o(n)), this.remove = async (t) => (await i(this, f)).removeVariables(t).then((r) => o(r)), this.rename = async (t, e) => (await i(this, f)).setVariableName(t, e).then((n) => o(n)), this.setLabel = async (t, e) => (await i(this, f)).setVariableLabel(t, e).then((n) => o(n)), g(this, At, async (t, e) => (await i(this, f)).setVariablePlaceholder(t, e).then((n) => o(n))), this.setPlaceholder = async (t, e) => i(this, At).call(this, t, e), this.resetPlaceholder = async (t) => i(this, At).call(this, t, null), g(this, Ft, async (t, e) => (await i(this, f)).setVariableHelpText(t, e).then((n) => o(n))), this.setHelpText = async (t, e) => i(this, Ft).call(this, t, e), this.resetHelpText = async (t) => i(this, Ft).call(this, t, null), this.setType = async (t, e) => (await i(this, f)).setVariableType(t, e).then((n) => o(n)), this.setListVariable = async (t, e) => (await i(this, f)).setListVariableItems(
|
|
1703
|
+
t,
|
|
1704
|
+
e.map((n) => JSON.stringify({ value: n }))
|
|
1705
|
+
).then((n) => o(n)), this.setValue = async (t, e) => (await i(this, f)).setVariableValue(t, e).then((n) => o(n)), this.duplicate = async (t) => (await i(this, f)).duplicateVariable(t).then((r) => o(r)), this.groupVariables = async (t, e) => (await i(this, f)).groupVariables(t, e).then((n) => o(n)), this.ungroupVariables = async (t) => (await i(this, f)).ungroupVariable(t).then((r) => o(r)), this.move = async (t, e, r) => (await i(this, f)).moveVariable(e, r, t).then((c) => o(c)), this.moveVariables = async (t, e, r) => (await i(this, f)).moveVariables(e, r, t).then((c) => o(c)), this.setIsVisible = async (t, e) => {
|
|
1706
|
+
const r = e ? { type: xt.visible } : { type: xt.invisible };
|
|
1707
|
+
return this.setVariableVisibility(t, r);
|
|
1708
|
+
}, this.setIsHidden = async (t, e) => {
|
|
1709
|
+
const r = e ? { type: xt.invisible } : { type: xt.visible };
|
|
1710
|
+
return this.setVariableVisibility(t, r);
|
|
1711
|
+
}, this.setVariableVisibility = async (t, e) => (await i(this, f)).setVariableVisibility(t, JSON.stringify(e)).then((n) => o(n)), this.setLayoutsForVariableVisibility = async (t) => (await i(this, f)).setLayoutsForVariableVisibility(t ? JSON.stringify(t) : null).then((r) => o(r)), this.setIsRequired = async (t, e) => (await i(this, f)).setVariableIsRequired(t, e).then((n) => o(n)), this.setIsReadonly = async (t, e) => (await i(this, f)).setVariableIsReadonly(t, e).then((n) => o(n)), this.getImageVariableConnectorId = async (t) => (await i(this, f)).getImageVariableConnectorId(t).then((r) => o(r)), this.setImageVariableConnector = async (t, e) => {
|
|
1712
|
+
const r = await i(this, f), c = new ne().makeConnectorSourceForwardsCompatible(e);
|
|
1713
|
+
return r.setImageVariableConnector(t, JSON.stringify(c)).then((l) => o(l));
|
|
1714
|
+
}, this.removeSource = async (t) => this.setValue(t, null), this.setPrefix = async (t, e) => {
|
|
1715
|
+
const r = { prefix: { value: e } };
|
|
1716
|
+
return this.applyPrefixSuffixDeltaUpdate(t, r);
|
|
1717
|
+
}, this.setSuffix = async (t, e) => {
|
|
1718
|
+
const r = { suffix: { value: e } };
|
|
1719
|
+
return this.applyPrefixSuffixDeltaUpdate(t, r);
|
|
1720
|
+
}, this.setPrefixCharacterStyle = async (t, e) => {
|
|
1721
|
+
const r = { prefixCharacterStyleId: { value: e } };
|
|
1722
|
+
return this.applyPrefixSuffixDeltaUpdate(t, r);
|
|
1723
|
+
}, this.setSuffixCharacterStyle = async (t, e) => {
|
|
1724
|
+
const r = { suffixCharacterStyleId: { value: e } };
|
|
1725
|
+
return this.applyPrefixSuffixDeltaUpdate(t, r);
|
|
1726
|
+
}, this.setPrivateData = async (t, e) => (await i(this, f)).setVariablePrivateData(t, JSON.stringify(e)).then((n) => o(n)), this.getPrivateData = async (t) => (await i(this, f)).getVariablePrivateData(t).then((r) => o(r)), this.setAllowImageQuery = async (t, e) => (await i(this, f)).setImageVariableAllowQuery(t, e).then((n) => o(n)), this.setAllowImageUpload = async (t, e) => (await i(this, f)).setImageVariableAllowUpload(t, e).then((n) => o(n)), this.setMinImageUploadSize = async (t, e, r) => (await i(this, f)).setImageVariableUploadMinSize(t, e, r).then((c) => o(c)), g(this, f, a), this.number = new $r(i(this, f)), this.date = new zr(i(this, f));
|
|
1727
|
+
}
|
|
1728
|
+
makeVariablesBackwardsCompatible(a) {
|
|
1729
|
+
return a.map((t) => this.makeVariableBackwardsCompatible(t));
|
|
1730
|
+
}
|
|
1731
|
+
makeVariableBackwardsCompatible(a) {
|
|
1732
|
+
return a.type !== ae.list ? a : this.makeListVariableBackwardsCompatible(a);
|
|
1733
|
+
}
|
|
1734
|
+
makeListVariableBackwardsCompatible(a) {
|
|
1735
|
+
const t = a, e = a.items, r = a.selected, n = e.map((c) => c.value);
|
|
1736
|
+
return t.items = n, t.selected = r == null ? void 0 : r.value, t;
|
|
1737
|
+
}
|
|
1738
|
+
async applyPrefixSuffixDeltaUpdate(a, t) {
|
|
1739
|
+
const r = await (await i(this, f)).updateVariablePrefixSuffixProperties(a, JSON.stringify(t));
|
|
1740
|
+
return o(r);
|
|
1741
|
+
}
|
|
1742
|
+
}, f = new WeakMap(), At = new WeakMap(), Ft = new WeakMap(), os);
|
|
1743
|
+
class Kr {
|
|
1744
|
+
/**
|
|
1745
|
+
* @ignore
|
|
1746
|
+
*/
|
|
1747
|
+
constructor(a) {
|
|
1748
|
+
this.onVariableListChanged = (t) => {
|
|
1749
|
+
this.config.events.onVariableListChanged.trigger(JSON.parse(t));
|
|
1750
|
+
}, this.onConnectorsChanged = (t) => {
|
|
1751
|
+
this.config.events.onConnectorsChanged.trigger(JSON.parse(t));
|
|
1752
|
+
}, this.onPageSizeChanged = (t) => {
|
|
1753
|
+
this.config.events.onPageSizeChanged.trigger(JSON.parse(t));
|
|
1754
|
+
}, this.config = a;
|
|
1755
|
+
}
|
|
1756
|
+
}
|
|
1757
|
+
var j;
|
|
1758
|
+
class Wr {
|
|
1759
|
+
/**
|
|
1760
|
+
* @ignore
|
|
1761
|
+
*/
|
|
1762
|
+
constructor(a) {
|
|
1763
|
+
/**
|
|
1764
|
+
* @ignore
|
|
1765
|
+
*/
|
|
1766
|
+
u(this, j);
|
|
1767
|
+
this.getAll = async () => (await i(this, j)).getVariables().then((e) => o(e)), this.getById = async (t) => (await i(this, j)).getVariableById(t).then((r) => o(r)), this.getByName = async (t) => (await i(this, j)).getVariableByName(t).then((r) => o(r)), this.setListVariable = async (t, e) => (await i(this, j)).setListVariableItems(
|
|
1768
|
+
t,
|
|
1769
|
+
e.map((n) => JSON.stringify(n))
|
|
1770
|
+
).then((n) => o(n)), this.setImageVariableConnector = async (t, e) => (await i(this, j)).setImageVariableConnector(t, JSON.stringify(e)).then((n) => o(n)), g(this, j, a), this.image = new jr(a);
|
|
1771
|
+
}
|
|
1772
|
+
}
|
|
1773
|
+
j = new WeakMap();
|
|
1774
|
+
var yt;
|
|
1775
|
+
class jr {
|
|
1776
|
+
constructor(a) {
|
|
1777
|
+
u(this, yt);
|
|
1778
|
+
this.setAllowQuery = async (t, e) => (await i(this, yt)).setImageVariableAllowQuery(t, e).then((n) => o(n)), this.setAllowUpload = async (t, e) => (await i(this, yt)).setImageVariableAllowUpload(t, e).then((n) => o(n)), this.setMinUploadSize = async (t, e, r) => (await i(this, yt)).setImageVariableUploadMinSize(t, e, r).then((c) => o(c)), g(this, yt, a);
|
|
1779
|
+
}
|
|
1780
|
+
}
|
|
1781
|
+
yt = new WeakMap();
|
|
1782
|
+
var pt;
|
|
1783
|
+
class qr {
|
|
1784
|
+
/**
|
|
1785
|
+
* @ignore
|
|
1786
|
+
*/
|
|
1787
|
+
constructor(a) {
|
|
1788
|
+
/**
|
|
1789
|
+
* @ignore
|
|
1790
|
+
*/
|
|
1791
|
+
u(this, pt);
|
|
1792
|
+
this.register = async (t) => (await i(this, pt)).registerConnector(JSON.stringify(t)).then((r) => o(r)), this.getById = async (t) => (await i(this, pt)).getConnectorById(t).then((r) => o(r)), this.getAllByType = async (t) => (await i(this, pt)).getConnectors(t).then((r) => o(r)), g(this, pt, a);
|
|
1793
|
+
}
|
|
1794
|
+
}
|
|
1795
|
+
pt = new WeakMap();
|
|
1796
|
+
var Et, Wt;
|
|
1797
|
+
class Yr {
|
|
1798
|
+
/**
|
|
1799
|
+
* @ignore
|
|
1800
|
+
*/
|
|
1801
|
+
constructor(a) {
|
|
1802
|
+
/**
|
|
1803
|
+
* @ignore
|
|
1804
|
+
*/
|
|
1805
|
+
u(this, Et);
|
|
1806
|
+
/**
|
|
1807
|
+
* @ignore
|
|
1808
|
+
*/
|
|
1809
|
+
u(this, Wt);
|
|
1810
|
+
this.setWidth = async (t) => (await i(this, Et)).setPageWidth(t).then((r) => o(r)), this.setHeight = async (t) => (await i(this, Et)).setPageHeight(t).then((r) => o(r)), g(this, Et, a), g(this, Wt, a);
|
|
1811
|
+
}
|
|
1812
|
+
}
|
|
1813
|
+
Et = new WeakMap(), Wt = new WeakMap();
|
|
1814
|
+
class ss {
|
|
1815
|
+
/**
|
|
1816
|
+
* The next initiator is a split off on SDK level to tag next features
|
|
1817
|
+
* The SDK should be configured clientside and it exposes all controllers to work with in other applications
|
|
1818
|
+
* @param config The configuration object where the SDK and editor can get configured
|
|
1819
|
+
*/
|
|
1820
|
+
constructor(a, t, e) {
|
|
1821
|
+
this.config = a, this.connection = t, this.editorAPI = e, this.subscriber = new Kr(a), this.variable = new Wr(this.editorAPI), this.connector = new qr(this.editorAPI), this.page = new Yr(this.editorAPI), this.canvas = new Qt(this.editorAPI);
|
|
1822
|
+
}
|
|
1823
|
+
}
|
|
1824
|
+
class fs {
|
|
1825
|
+
constructor(a) {
|
|
1826
|
+
this.logger = a;
|
|
1827
|
+
}
|
|
1828
|
+
createEventHandlerFn(a, t) {
|
|
1829
|
+
return (...r) => {
|
|
1830
|
+
try {
|
|
1831
|
+
const n = a(...r);
|
|
1832
|
+
return n instanceof Promise ? n.catch((c) => this.handleError(c, t, a.name)) : n;
|
|
1833
|
+
} catch (n) {
|
|
1834
|
+
this.handleError(n, t, a.name);
|
|
1835
|
+
}
|
|
1836
|
+
};
|
|
1837
|
+
}
|
|
1838
|
+
handleError(a, t, e) {
|
|
1839
|
+
var r;
|
|
1840
|
+
if (t === Jt.log)
|
|
1841
|
+
(r = this.logger) == null || r.call(this, O.error, ws.event, `Error in callback ${e}: ${a}`);
|
|
1842
|
+
else
|
|
1843
|
+
throw a;
|
|
1844
|
+
}
|
|
1845
|
+
}
|
|
1846
|
+
class rs extends fs {
|
|
1847
|
+
constructor(a, t) {
|
|
1848
|
+
super(t), this.handler = a;
|
|
1849
|
+
}
|
|
1850
|
+
/**
|
|
1851
|
+
* Executes the defined handler with the provided arguments.
|
|
1852
|
+
*
|
|
1853
|
+
* @param args The arguments to pass to the callbacks.
|
|
1854
|
+
* @returns The result of executing the callbacks.
|
|
1855
|
+
*/
|
|
1856
|
+
trigger(...a) {
|
|
1857
|
+
const t = this.handler();
|
|
1858
|
+
if (t)
|
|
1859
|
+
return this.createEventHandlerFn(t, Jt.throw)(...a);
|
|
1860
|
+
}
|
|
1861
|
+
}
|
|
1862
|
+
class C extends fs {
|
|
1863
|
+
constructor(a, t) {
|
|
1864
|
+
super(t), this.legacyHandler = a, this.subscriptions = /* @__PURE__ */ new Set();
|
|
1865
|
+
}
|
|
1866
|
+
/**
|
|
1867
|
+
* Executes the registered callbacks with provided arguments
|
|
1868
|
+
*
|
|
1869
|
+
* @param args The arguments to pass to the callbacks.
|
|
1870
|
+
* @returns The result of executing the callbacks.
|
|
1871
|
+
*/
|
|
1872
|
+
trigger(...a) {
|
|
1873
|
+
const t = this.legacyHandler();
|
|
1874
|
+
t && this.createEventHandlerFn(t, Jt.log)(...a);
|
|
1875
|
+
for (const e of this.subscriptions)
|
|
1876
|
+
e(...a);
|
|
1877
|
+
}
|
|
1878
|
+
/**
|
|
1879
|
+
* Registers a callback function.
|
|
1880
|
+
*
|
|
1881
|
+
* @param callback - The callback function to register. This function will be invoked when the event occurs.
|
|
1882
|
+
* @param errorBehavior - An optional parameter to define how to handle errors that appear in the callback function.
|
|
1883
|
+
* Accepted values are:
|
|
1884
|
+
* - "log": Logs the error to the console (default behavior)
|
|
1885
|
+
* - "throw": Throws an error. Keep in mind that throwing of error in one of the callback will prevent calling of others
|
|
1886
|
+
* @returns A function to unsubscribe the callback, preventing it from being invoked in the future.
|
|
1887
|
+
*/
|
|
1888
|
+
registerCallback(a, t = Jt.log) {
|
|
1889
|
+
const e = this.createEventHandlerFn(a, t);
|
|
1890
|
+
return this.subscriptions.add(e), () => {
|
|
1891
|
+
this.subscriptions.delete(e);
|
|
1892
|
+
};
|
|
1893
|
+
}
|
|
1894
|
+
}
|
|
1895
|
+
class ie {
|
|
1896
|
+
/**
|
|
1897
|
+
* Creates a runtime configuration object from the provided configuration object.
|
|
1898
|
+
*
|
|
1899
|
+
* @param config The configuration object to create the runtime configuration object from.
|
|
1900
|
+
* @returns The runtime configuration object.
|
|
1901
|
+
*/
|
|
1902
|
+
static createRuntimeConfig(a) {
|
|
1903
|
+
var e, r, n, c, l, h, y, p, m, S, b, v, J, A, k, D, I, _, $, Ct, mt, oe, ce, he, le, de, ue, ge, ye, pe, Ce, me, we, fe, Se;
|
|
1904
|
+
const t = { ...a };
|
|
1905
|
+
return t.logging = {
|
|
1906
|
+
logLevel: ((e = a.logging) == null ? void 0 : e.logLevel) || O.error,
|
|
1907
|
+
logger: ((r = a.logging) == null ? void 0 : r.logger) || ((Dt, jt, qt) => {
|
|
1908
|
+
var be;
|
|
1909
|
+
if (ie.isLoggingEnabled(Dt, ((be = t.logging) == null ? void 0 : be.logLevel) ?? O.error))
|
|
1910
|
+
switch (Dt) {
|
|
1911
|
+
case O.error:
|
|
1912
|
+
console.error(`[${jt}] [${Dt}] ${qt}`);
|
|
1913
|
+
break;
|
|
1914
|
+
case O.warn:
|
|
1915
|
+
console.warn(`[${jt}] [${Dt}] ${qt}`);
|
|
1916
|
+
break;
|
|
1917
|
+
default:
|
|
1918
|
+
console.log(`[${jt}] [${Dt}] ${qt}`);
|
|
1919
|
+
}
|
|
1920
|
+
})
|
|
1921
|
+
}, t.handlers = {
|
|
1922
|
+
onAuthExpired: new rs(() => t.onAuthExpired, (n = t.logging) == null ? void 0 : n.logger),
|
|
1923
|
+
onViewportRequested: new rs(
|
|
1924
|
+
() => t.onViewportRequested,
|
|
1925
|
+
(c = t.logging) == null ? void 0 : c.logger
|
|
1926
|
+
)
|
|
1927
|
+
}, t.events = {
|
|
1928
|
+
onActionsChanged: new C(
|
|
1929
|
+
() => t.onActionsChanged,
|
|
1930
|
+
(l = t.logging) == null ? void 0 : l.logger
|
|
1931
|
+
),
|
|
1932
|
+
onStateChanged: new C(
|
|
1933
|
+
() => t.onStateChanged,
|
|
1934
|
+
(h = t.logging) == null ? void 0 : h.logger
|
|
1935
|
+
),
|
|
1936
|
+
onDocumentLoaded: new C(
|
|
1937
|
+
() => t.onDocumentLoaded,
|
|
1938
|
+
(y = t.logging) == null ? void 0 : y.logger
|
|
1939
|
+
),
|
|
1940
|
+
onSelectedFramesLayoutChanged: new C(
|
|
1941
|
+
() => t.onSelectedFramesLayoutChanged,
|
|
1942
|
+
(p = t.logging) == null ? void 0 : p.logger
|
|
1943
|
+
),
|
|
1944
|
+
onFramesLayoutChanged: new C(
|
|
1945
|
+
() => t.onFramesLayoutChanged,
|
|
1946
|
+
(m = t.logging) == null ? void 0 : m.logger
|
|
1947
|
+
),
|
|
1948
|
+
onSelectedFramesContentChanged: new C(
|
|
1949
|
+
() => t.onSelectedFramesContentChanged,
|
|
1950
|
+
(S = t.logging) == null ? void 0 : S.logger
|
|
1951
|
+
),
|
|
1952
|
+
onPageSelectionChanged: new C(
|
|
1953
|
+
() => t.onPageSelectionChanged,
|
|
1954
|
+
(b = t.logging) == null ? void 0 : b.logger
|
|
1955
|
+
),
|
|
1956
|
+
onSelectedLayoutPropertiesChanged: new C(
|
|
1957
|
+
() => t.onSelectedLayoutPropertiesChanged,
|
|
1958
|
+
(v = t.logging) == null ? void 0 : v.logger
|
|
1959
|
+
),
|
|
1960
|
+
onSelectedLayoutUnitChanged: new C(
|
|
1961
|
+
() => t.onSelectedLayoutUnitChanged,
|
|
1962
|
+
(J = t.logging) == null ? void 0 : J.logger
|
|
1963
|
+
),
|
|
1964
|
+
onScrubberPositionChanged: new C(
|
|
1965
|
+
() => t.onScrubberPositionChanged,
|
|
1966
|
+
(A = t.logging) == null ? void 0 : A.logger
|
|
1967
|
+
),
|
|
1968
|
+
onFrameAnimationsChanged: new C(
|
|
1969
|
+
() => t.onFrameAnimationsChanged,
|
|
1970
|
+
(k = t.logging) == null ? void 0 : k.logger
|
|
1971
|
+
),
|
|
1972
|
+
onVariableListChanged: new C(
|
|
1973
|
+
() => t.onVariableListChanged,
|
|
1974
|
+
(D = t.logging) == null ? void 0 : D.logger
|
|
1975
|
+
),
|
|
1976
|
+
onSelectedToolChanged: new C(
|
|
1977
|
+
() => t.onSelectedToolChanged,
|
|
1978
|
+
(I = t.logging) == null ? void 0 : I.logger
|
|
1979
|
+
),
|
|
1980
|
+
onUndoStackStateChanged: new C(
|
|
1981
|
+
() => t.onUndoStackStateChanged,
|
|
1982
|
+
(_ = t.logging) == null ? void 0 : _.logger
|
|
1983
|
+
),
|
|
1984
|
+
onSelectedLayoutFramesChanged: new C(
|
|
1985
|
+
() => t.onSelectedLayoutFramesChanged,
|
|
1986
|
+
($ = t.logging) == null ? void 0 : $.logger
|
|
1987
|
+
),
|
|
1988
|
+
onSelectedTextStyleChanged: new C(
|
|
1989
|
+
() => t.onSelectedTextStyleChanged,
|
|
1990
|
+
(Ct = t.logging) == null ? void 0 : Ct.logger
|
|
1991
|
+
),
|
|
1992
|
+
onColorsChanged: new C(
|
|
1993
|
+
() => t.onColorsChanged,
|
|
1994
|
+
(mt = t.logging) == null ? void 0 : mt.logger
|
|
1995
|
+
),
|
|
1996
|
+
onParagraphStylesChanged: new C(
|
|
1997
|
+
() => t.onParagraphStylesChanged,
|
|
1998
|
+
(oe = t.logging) == null ? void 0 : oe.logger
|
|
1999
|
+
),
|
|
2000
|
+
onCharacterStylesChanged: new C(
|
|
2001
|
+
() => t.onCharacterStylesChanged,
|
|
2002
|
+
(ce = t.logging) == null ? void 0 : ce.logger
|
|
2003
|
+
),
|
|
2004
|
+
onFontFamiliesChanged: new C(
|
|
2005
|
+
() => t.onFontFamiliesChanged,
|
|
2006
|
+
(he = t.logging) == null ? void 0 : he.logger
|
|
2007
|
+
),
|
|
2008
|
+
onSelectedLayoutIdChanged: new C(
|
|
2009
|
+
() => t.onSelectedLayoutIdChanged,
|
|
2010
|
+
(le = t.logging) == null ? void 0 : le.logger
|
|
2011
|
+
),
|
|
2012
|
+
onLayoutsChanged: new C(
|
|
2013
|
+
() => t.onLayoutsChanged,
|
|
2014
|
+
(de = t.logging) == null ? void 0 : de.logger
|
|
2015
|
+
),
|
|
2016
|
+
onConnectorEvent: new C(
|
|
2017
|
+
() => t.onConnectorEvent,
|
|
2018
|
+
(ue = t.logging) == null ? void 0 : ue.logger
|
|
2019
|
+
),
|
|
2020
|
+
onConnectorsChanged: new C(
|
|
2021
|
+
() => t.onConnectorsChanged,
|
|
2022
|
+
(ge = t.logging) == null ? void 0 : ge.logger
|
|
2023
|
+
),
|
|
2024
|
+
onZoomChanged: new C(
|
|
2025
|
+
() => t.onZoomChanged,
|
|
2026
|
+
(ye = t.logging) == null ? void 0 : ye.logger
|
|
2027
|
+
),
|
|
2028
|
+
onSelectedPageIdChanged: new C(
|
|
2029
|
+
() => t.onSelectedPageIdChanged,
|
|
2030
|
+
t.logging.logger
|
|
2031
|
+
),
|
|
2032
|
+
onPagesChanged: new C(
|
|
2033
|
+
() => t.onPagesChanged,
|
|
2034
|
+
t.logging.logger
|
|
2035
|
+
),
|
|
2036
|
+
onPageSnapshotInvalidated: new C(
|
|
2037
|
+
() => t.onPageSnapshotInvalidated,
|
|
2038
|
+
t.logging.logger
|
|
2039
|
+
),
|
|
2040
|
+
onPageSizeChanged: new C(
|
|
2041
|
+
() => t.onPageSizeChanged,
|
|
2042
|
+
(pe = t.logging) == null ? void 0 : pe.logger
|
|
2043
|
+
),
|
|
2044
|
+
onShapeCornerRadiusChanged: new C(
|
|
2045
|
+
() => t.onShapeCornerRadiusChanged,
|
|
2046
|
+
(Ce = t.logging) == null ? void 0 : Ce.logger
|
|
2047
|
+
),
|
|
2048
|
+
onCropActiveFrameIdChanged: new C(
|
|
2049
|
+
() => t.onCropActiveFrameIdChanged,
|
|
2050
|
+
(me = t.logging) == null ? void 0 : me.logger
|
|
2051
|
+
),
|
|
2052
|
+
onAsyncError: new C(
|
|
2053
|
+
() => t.onAsyncError,
|
|
2054
|
+
(we = t.logging) == null ? void 0 : we.logger
|
|
2055
|
+
),
|
|
2056
|
+
onViewModeChanged: new C(
|
|
2057
|
+
() => t.onViewModeChanged,
|
|
2058
|
+
(fe = t.logging) == null ? void 0 : fe.logger
|
|
2059
|
+
),
|
|
2060
|
+
onBarcodeValidationChanged: new C(() => t.onBarcodeValidationChanged, (Se = t.logging) == null ? void 0 : Se.logger),
|
|
2061
|
+
onDataSourceIdChanged: new C(
|
|
2062
|
+
() => t.onDataSourceIdChanged,
|
|
2063
|
+
t.logging.logger
|
|
2064
|
+
),
|
|
2065
|
+
onDocumentIssueListChanged: new C(
|
|
2066
|
+
() => t.onDocumentIssueListChanged,
|
|
2067
|
+
t.logging.logger
|
|
2068
|
+
),
|
|
2069
|
+
onCustomUndoDataChanged: new C(
|
|
2070
|
+
() => t.onCustomUndoDataChanged,
|
|
2071
|
+
t.logging.logger
|
|
2072
|
+
),
|
|
2073
|
+
onEngineEditModeChanged: new C(
|
|
2074
|
+
() => t.onEngineEditModeChanged,
|
|
2075
|
+
t.logging.logger
|
|
2076
|
+
)
|
|
2077
|
+
}, t;
|
|
2078
|
+
}
|
|
2079
|
+
static isLoggingEnabled(a, t) {
|
|
2080
|
+
return t == O.info || t == O.warn && (a == O.warn || a == O.error) ? !0 : t == O.error && a == O.error;
|
|
2081
|
+
}
|
|
2082
|
+
}
|
|
2083
|
+
class Zr {
|
|
2084
|
+
/**
|
|
2085
|
+
* Checks if the given value is a `DatePropertyWrapper`.
|
|
2086
|
+
*
|
|
2087
|
+
* @param value The value to check.
|
|
2088
|
+
* @returns `true` if the value is a `DatePropertyWrapper`, otherwise `false`.
|
|
2089
|
+
*/
|
|
2090
|
+
isDatePropertyWrapper(a) {
|
|
2091
|
+
return typeof a == "object" && (a == null ? void 0 : a.type) === "date";
|
|
2092
|
+
}
|
|
2093
|
+
/**
|
|
2094
|
+
* Checks if the given value is a `Date` object instance.
|
|
2095
|
+
*
|
|
2096
|
+
* @param value The value to check.
|
|
2097
|
+
* @returns `true` if the value is a `Date` object, otherwise `false`.
|
|
2098
|
+
*/
|
|
2099
|
+
isDateObject(a) {
|
|
2100
|
+
return a instanceof Date;
|
|
2101
|
+
}
|
|
2102
|
+
/**
|
|
2103
|
+
* Transforms an `EngineDataItem` into a `DataItem`.
|
|
2104
|
+
*
|
|
2105
|
+
* Converts `DatePropertyWrapper` values to JavaScript `Date` objects
|
|
2106
|
+
* while keeping other values unchanged.
|
|
2107
|
+
*
|
|
2108
|
+
* @param dataItem the EngineDataItem to transform.
|
|
2109
|
+
* @returns the resulting `DataItem` with parsed date properties.
|
|
2110
|
+
*/
|
|
2111
|
+
mapEngineToDataItem(a) {
|
|
2112
|
+
const t = {};
|
|
2113
|
+
return Object.entries(a).forEach(([e, r]) => {
|
|
2114
|
+
t[e] = this.isDatePropertyWrapper(r) ? new Date(r.value) : r;
|
|
2115
|
+
}), t;
|
|
2116
|
+
}
|
|
2117
|
+
/**
|
|
2118
|
+
* Transforms a `DataItem` into an `EngineDataItem`.
|
|
2119
|
+
*
|
|
2120
|
+
* Converts JavaScript `Date` objects to `DatePropertyWrapper` objects
|
|
2121
|
+
* while keeping other values unchanged.
|
|
2122
|
+
*
|
|
2123
|
+
* @param dataItem the `DataItem` to transform.
|
|
2124
|
+
* @returns the resulting `EngineDataItem` with parsed date properties.
|
|
2125
|
+
*/
|
|
2126
|
+
mapDataItemToEngine(a) {
|
|
2127
|
+
const t = {};
|
|
2128
|
+
return Object.entries(a).forEach(([e, r]) => {
|
|
2129
|
+
t[e] = this.isDateObject(r) ? { value: r.getTime(), type: "date" } : r;
|
|
2130
|
+
}), t;
|
|
2131
|
+
}
|
|
2132
|
+
}
|
|
2133
|
+
var nt;
|
|
2134
|
+
class Qr {
|
|
2135
|
+
/**
|
|
2136
|
+
* @ignore
|
|
2137
|
+
*/
|
|
2138
|
+
constructor(a) {
|
|
2139
|
+
/**
|
|
2140
|
+
* @ignore
|
|
2141
|
+
*/
|
|
2142
|
+
u(this, nt);
|
|
2143
|
+
g(this, nt, a);
|
|
2144
|
+
}
|
|
2145
|
+
/**
|
|
2146
|
+
* This method returns the value for a given configuration key. If a value was not found in the configuration store
|
|
2147
|
+
* this method returns an error. The key cannot be null.
|
|
2148
|
+
* @returns value for a given configuration key
|
|
2149
|
+
*/
|
|
2150
|
+
async getValue(a) {
|
|
2151
|
+
return (await i(this, nt)).getConfigValue(a).then((e) => o(e));
|
|
2152
|
+
}
|
|
2153
|
+
/**
|
|
2154
|
+
* This method sets, or overrides the value for a given key. Null values are not allowed for both key and value,
|
|
2155
|
+
* using them will result in an error.
|
|
2156
|
+
* @returns
|
|
2157
|
+
*/
|
|
2158
|
+
async setValue(a, t) {
|
|
2159
|
+
return (await i(this, nt)).setConfigValue(a, t).then((r) => o(r));
|
|
2160
|
+
}
|
|
2161
|
+
/**
|
|
2162
|
+
* This method updates the studio options. Only defined options are updated, null values are ignored.
|
|
2163
|
+
* @returns
|
|
2164
|
+
*/
|
|
2165
|
+
async updateStudioOptions(a) {
|
|
2166
|
+
return (await i(this, nt)).updateStudioOptions(JSON.stringify(a)).then((e) => o(e));
|
|
2167
|
+
}
|
|
2168
|
+
/**
|
|
2169
|
+
* This method returns the engine session id. This id is unique for this engine session
|
|
2170
|
+
* @returns the engine session id
|
|
2171
|
+
*/
|
|
2172
|
+
async getEngineSessionId() {
|
|
2173
|
+
return (await i(this, nt)).getEngineSessionId().then((t) => o(t));
|
|
2174
|
+
}
|
|
2175
|
+
}
|
|
2176
|
+
nt = new WeakMap();
|
|
2177
|
+
var Lt;
|
|
2178
|
+
class ns extends Qr {
|
|
2179
|
+
/**
|
|
2180
|
+
* @ignore
|
|
2181
|
+
*/
|
|
2182
|
+
constructor(t, e) {
|
|
2183
|
+
super(t);
|
|
2184
|
+
/**
|
|
2185
|
+
* @ignore
|
|
2186
|
+
*/
|
|
2187
|
+
u(this, Lt);
|
|
2188
|
+
g(this, Lt, e);
|
|
2189
|
+
}
|
|
2190
|
+
/**
|
|
2191
|
+
* This method returns the value for a given configuration key. If a value was not found in the configuration store,
|
|
2192
|
+
* this method returns an error. The key cannot be null.
|
|
2193
|
+
* @returns value for a given configuration key
|
|
2194
|
+
*/
|
|
2195
|
+
async getValue(t) {
|
|
2196
|
+
const e = i(this, Lt).get(t);
|
|
2197
|
+
return e != null ? o(
|
|
2198
|
+
{
|
|
2199
|
+
status: 200,
|
|
2200
|
+
success: !0,
|
|
2201
|
+
parsedData: e,
|
|
2202
|
+
data: e
|
|
2203
|
+
},
|
|
2204
|
+
!1
|
|
2205
|
+
) : super.getValue(t);
|
|
2206
|
+
}
|
|
2207
|
+
/**
|
|
2208
|
+
* This method sets or overrides the value for a given key.
|
|
2209
|
+
* Null values are not allowed for both key and value,
|
|
2210
|
+
* using them will result in an error.
|
|
2211
|
+
* @returns
|
|
2212
|
+
*/
|
|
2213
|
+
async setValue(t, e) {
|
|
2214
|
+
const r = super.setValue(t, e);
|
|
2215
|
+
return i(this, Lt).set(t, e), r;
|
|
2216
|
+
}
|
|
2217
|
+
}
|
|
2218
|
+
Lt = new WeakMap();
|
|
2219
|
+
const Xr = "studio-cdn.chiligrafx.com", tn = `https://${Xr}/editor/${cs.current}/web`;
|
|
2220
|
+
let Z;
|
|
2221
|
+
class Nn {
|
|
2222
|
+
/**
|
|
2223
|
+
* The SDK should be configured clientside and it exposes all controllers to work with in other applications
|
|
2224
|
+
* @param config The configuration object where the SDK and editor can get configured
|
|
2225
|
+
*/
|
|
2226
|
+
constructor(a) {
|
|
2227
|
+
this.localConfig = /* @__PURE__ */ new Map(), this.dataItemMappingTools = new Zr(), this.loadEditor = () => {
|
|
2228
|
+
var t;
|
|
2229
|
+
Ws(
|
|
2230
|
+
this.config.editorLink || tn,
|
|
2231
|
+
{
|
|
2232
|
+
onActionsChanged: this.subscriber.onActionsChanged,
|
|
2233
|
+
onStateChanged: this.subscriber.onStateChanged,
|
|
2234
|
+
onAuthExpired: this.subscriber.onAuthExpired,
|
|
2235
|
+
onViewportRequested: this.subscriber.onViewportRequested,
|
|
2236
|
+
onDocumentLoaded: this.subscriber.onDocumentLoaded,
|
|
2237
|
+
onSelectedFramesContentChanged: this.subscriber.onSelectedFramesContentChanged,
|
|
2238
|
+
onSelectedFramesLayoutChanged: this.subscriber.onSelectedFramesLayoutChanged,
|
|
2239
|
+
onFramesLayoutChanged: this.subscriber.onFramesLayoutChanged,
|
|
2240
|
+
onSelectedLayoutPropertiesChanged: this.subscriber.onSelectedLayoutPropertiesChanged,
|
|
2241
|
+
onSelectedLayoutUnitChanged: this.subscriber.onSelectedLayoutUnitChanged,
|
|
2242
|
+
onPageSelectionChanged: this.subscriber.onPageSelectionChanged,
|
|
2243
|
+
onScrubberPositionChanged: this.subscriber.onAnimationPlaybackChanged,
|
|
2244
|
+
onFrameAnimationsChanged: this.subscriber.onAnimationChanged,
|
|
2245
|
+
onVariableListChanged: (e) => {
|
|
2246
|
+
var r;
|
|
2247
|
+
(r = this.enabledNextSubscribers) != null && r.onVariableListChanged ? this.next.subscriber.onVariableListChanged(e) : this.subscriber.onVariableListChanged(e);
|
|
2248
|
+
},
|
|
2249
|
+
onSelectedToolChanged: this.subscriber.onSelectedToolChanged,
|
|
2250
|
+
onUndoStateChanged: this.subscriber.onUndoStateChanged,
|
|
2251
|
+
onSelectedLayoutFramesChanged: this.subscriber.onSelectedLayoutFramesChanged,
|
|
2252
|
+
onSelectedTextStyleChanged: this.subscriber.onSelectedTextStyleChanged,
|
|
2253
|
+
onColorsChanged: this.subscriber.onColorsChanged,
|
|
2254
|
+
onParagraphStylesChanged: this.subscriber.onParagraphStylesChanged,
|
|
2255
|
+
onCharacterStylesChanged: this.subscriber.onCharacterStylesChanged,
|
|
2256
|
+
onFontFamiliesChanged: this.subscriber.onFontFamiliesChanged,
|
|
2257
|
+
onSelectedLayoutIdChanged: this.subscriber.onSelectedLayoutIdChanged,
|
|
2258
|
+
onLayoutsChanged: this.subscriber.onLayoutsChanged,
|
|
2259
|
+
onConnectorEvent: this.subscriber.onConnectorEvent,
|
|
2260
|
+
onConnectorsChanged: (e) => {
|
|
2261
|
+
var r;
|
|
2262
|
+
(r = this.enabledNextSubscribers) != null && r.onConnectorsChanged ? this.next.subscriber.onConnectorsChanged(e) : this.subscriber.onConnectorsChanged(e);
|
|
2263
|
+
},
|
|
2264
|
+
onZoomChanged: this.subscriber.onZoomChanged,
|
|
2265
|
+
onSelectedPageIdChanged: this.subscriber.onSelectedPageIdChanged,
|
|
2266
|
+
onPagesChanged: this.subscriber.onPagesChanged,
|
|
2267
|
+
onPageSnapshotInvalidated: this.subscriber.onPageSnapshotInvalidated,
|
|
2268
|
+
onPageSizeChanged: (e) => {
|
|
2269
|
+
var r;
|
|
2270
|
+
(r = this.enabledNextSubscribers) != null && r.onPageSizeChanged ? this.next.subscriber.onPageSizeChanged(e) : this.subscriber.onPageSizeChanged(e);
|
|
2271
|
+
},
|
|
2272
|
+
onShapeCornerRadiusChanged: this.subscriber.onShapeCornerRadiusChanged,
|
|
2273
|
+
onCropActiveFrameIdChanged: this.subscriber.onCropActiveFrameIdChanged,
|
|
2274
|
+
onAsyncError: this.subscriber.onAsyncError,
|
|
2275
|
+
onViewModeChanged: this.subscriber.onViewModeChanged,
|
|
2276
|
+
onBarcodeValidationChanged: this.subscriber.onBarcodeValidationChanged,
|
|
2277
|
+
onDataSourceIdChanged: this.subscriber.onDataSourceIdChanged,
|
|
2278
|
+
onDocumentIssueListChanged: this.subscriber.onDocumentIssueListChanged,
|
|
2279
|
+
onCustomUndoDataChanged: this.subscriber.onCustomUndoDataChanged,
|
|
2280
|
+
onEngineEditModeChanged: this.subscriber.onEngineEditModeChanged
|
|
2281
|
+
},
|
|
2282
|
+
this.setConnection,
|
|
2283
|
+
this.config.editorId,
|
|
2284
|
+
this.config.studioStyling
|
|
2285
|
+
), this.editorAPI = Z == null ? void 0 : Z.promise.then((e) => e), this.action = new Ae(this.editorAPI), this.layout = new We(this.editorAPI), this.frame = new ze(this.editorAPI), this.barcode = new Ee(this.editorAPI), this.animation = new Fe(this.editorAPI), this.document = new Ge(this.editorAPI), this.configuration = new ns(this.editorAPI, this.localConfig), this.utils = new ts(this.localConfig), this.tool = new Qe(this.editorAPI), this.page = new qe(this.editorAPI), this.debug = new Te(this.editorAPI), this.undoManager = new Xe(this.editorAPI, this), this.textSelection = new Ze(this.editorAPI), this.colorStyle = new Je(this.editorAPI), this.paragraphStyle = new Ye(this.editorAPI), this.characterStyle = new Re(this.editorAPI), this.mediaConnector = new je(this.editorAPI), this.fontConnector = new _e(this.editorAPI), this.dataConnector = new Ue(this.editorAPI, this.dataItemMappingTools), this.dataSource = new ke(this.editorAPI, this.dataItemMappingTools), this.connector = new Be(this.editorAPI, this.localConfig), this.variable = new es(this.editorAPI), this.font = new $e(this.editorAPI), this.experiment = new He(this.editorAPI), this.canvas = new Qt(this.editorAPI), this.shape = new ee(this.editorAPI), this.colorConversion = new Ve(this.editorAPI), this.info = new Ke(), this.clipboard = new Me(this.editorAPI), this.brandKit = new xe(this.editorAPI, this), this.next = new ss(this.config, this.connection, this.editorAPI), this.configuration.setValue(Y.GraFxStudioSdkVersion, hs.version), this.configuration.setValue(
|
|
2286
|
+
Y.GraFxStudioDocumentType,
|
|
2287
|
+
this.config.documentType || gs.template
|
|
2288
|
+
), this.configuration.updateStudioOptions(this.config.studioOptions || js), this.configuration.setValue(
|
|
2289
|
+
Y.QueryCallCacheEnabled,
|
|
2290
|
+
((t = this.config.enableQueryCallCache) == null ? void 0 : t.toString()) || "false"
|
|
2291
|
+
);
|
|
2292
|
+
}, this.setConnection = (t) => {
|
|
2293
|
+
Z = t;
|
|
2294
|
+
}, this.config = ie.createRuntimeConfig(a), this.connection = Z, this.editorAPI = Z == null ? void 0 : Z.promise.then((t) => t), this.action = new Ae(this.editorAPI), this.layout = new We(this.editorAPI), this.frame = new ze(this.editorAPI), this.shape = new ee(this.editorAPI), this.barcode = new Ee(this.editorAPI), this.undoManager = new Xe(this.editorAPI, this), this.connector = new Be(this.editorAPI, this.localConfig), this.mediaConnector = new je(this.editorAPI), this.fontConnector = new _e(this.editorAPI), this.dataConnector = new Ue(this.editorAPI, this.dataItemMappingTools), this.dataSource = new ke(this.editorAPI, this.dataItemMappingTools), this.animation = new Fe(this.editorAPI), this.document = new Ge(this.editorAPI), this.configuration = new ns(this.editorAPI, this.localConfig), this.variable = new es(this.editorAPI), this.utils = new ts(this.localConfig), this.subscriber = new Ur(this.config, this.localConfig), this.tool = new Qe(this.editorAPI), this.page = new qe(this.editorAPI), this.debug = new Te(this.editorAPI), this.textSelection = new Ze(this.editorAPI), this.colorStyle = new Je(this.editorAPI), this.paragraphStyle = new Ye(this.editorAPI), this.characterStyle = new Re(this.editorAPI), this.font = new $e(this.editorAPI), this.experiment = new He(this.editorAPI), this.canvas = new Qt(this.editorAPI), this.colorConversion = new Ve(this.editorAPI), this.info = new Ke(), this.clipboard = new Me(this.editorAPI), this.next = new ss(this.config, this.connection, this.editorAPI), this.enabledNextSubscribers = this.config.enableNextSubscribers, this.brandKit = new xe(this.editorAPI, this);
|
|
2295
|
+
}
|
|
2296
|
+
}
|
|
2297
|
+
var en = /* @__PURE__ */ ((s) => (s.top = "top", s.left = "left", s.right = "right", s.bottom = "bottom", s.topLeft = "topLeft", s.topRight = "topRight", s.bottomLeft = "bottomLeft", s.bottomRight = "bottomRight", s))(en || {}), sn = /* @__PURE__ */ ((s) => (s.horizontal = "horizontal", s.vertical = "vertical", s))(sn || {}), rn = /* @__PURE__ */ ((s) => (s.easeIn = "easeIn", s.easeOut = "easeOut", s.easeInOut = "easeInOut", s))(rn || {}), nn = /* @__PURE__ */ ((s) => (s.quadratic = "Quadratic", s.cubic = "Cubic", s.quartic = "Quartic", s.quintic = "Quintic", s.sine = "Sine", s.exponential = "Exponential", s.circular = "Circular", s.elastic = "Elastic", s.bounce = "Bounce", s.back = "Back", s))(nn || {}), an = /* @__PURE__ */ ((s) => (s.bounce = "bounce", s.flash = "flash", s.headshake = "headShake", s.heartbeat = "heartbeat", s.pulse = "pulse", s.rubberBand = "rubberBand", s.vertical = "vertical", s.horizontal = "horizontal", s.swing = "swing", s.tada = "tada", s))(an || {}), on = /* @__PURE__ */ ((s) => (s.preview = "preview", s.normal = "normal", s))(on || {}), cn = /* @__PURE__ */ ((s) => (s.Square = "square", s.Line = "line", s))(cn || {}), hn = /* @__PURE__ */ ((s) => (s.BOLD = "Bold", s.ITALIC = "Italic", s.REGULAR = "Regular", s))(hn || {}), ln = /* @__PURE__ */ ((s) => (s.LEFT = "left", s.CENTER = "center", s.RIGHT = "right", s.JUSTIFY = "justify", s))(ln || {}), dn = /* @__PURE__ */ ((s) => (s.TOP = "top", s.CENTER = "center", s.BOTTOM = "bottom", s))(dn || {}), un = /* @__PURE__ */ ((s) => (s.TO_LOWER_CASE = "lowercase", s.TO_UPPER_CASE = "uppercase", s.NORMAL = "normal", s))(un || {}), gn = /* @__PURE__ */ ((s) => (s.SUPERSCRIPT = "superscript", s.SUBSCRIPT = "subscript", s.NORMAL = "normal", s))(gn || {}), yn = /* @__PURE__ */ ((s) => (s.STYLE = "textStyle", s.PROPERTIES = "textProperties", s.APPEARANCE = "appearance", s))(yn || {}), pn = /* @__PURE__ */ ((s) => (s.PARAGRAPH = "paragraphStyleId", s.CHARACTER = "characterStyleId", s.FONT_FAMILY = "fontKey", s.FONT_STYLE = "fontStyle", s.FONT_SIZE = "fontSize", s.LETTER_SPACING = "letterSpacing", s.LINE_HEIGHT = "lineHeight", s.TEXT_ALIGN = "textAlign", s.VERTICAL_ALIGN = "verticalAlign", s.TYPOGRAPHIC_CASE = "typographicCase", s.SUB_SUPER_SCRIPT = "subSuperScript", s.UNDERLINE = "underline", s.LINE_THROUGH = "lineThrough", s.FILL_COLOR = "fillColor", s.COLOR = "color", s.FILL_COLOR_APPLIED = "fillColorApplied", s.STROKE_COLOR = "strokeColor", s.STROKE_COLOR_APPLIED = "strokeColorApplied", s.DROP_SHADOW_COLOR = "dropShadowColor", s.BLEND_MODE = "blendMode", s.OPACITY = "opacity", s.TRACKING_RIGHT = "trackingRight", s.BASELINE_SHIFT = "baselineShiftValue", s.STROKE_WIDTH = "strokeWidth", s))(pn || {}), Cn = /* @__PURE__ */ ((s) => (s.selectedLayoutChanged = "selectedLayoutChanged", s.frameMoved = "frameMoved", s.pageSizeChanged = "pageSizeChanged", s.documentLoaded = "documentLoaded", s.variableValueChanged = "variableValueChanged", s))(Cn || {}), mn = /* @__PURE__ */ ((s) => (s.ellipse = "ellipse", s.rectangle = "rectangle", s.polygon = "polygon", s))(mn || {}), wn = /* @__PURE__ */ ((s) => (s.all = "all", s.only = "only", s.none = "none", s))(wn || {}), fn = /* @__PURE__ */ ((s) => (s.normal = "normal", s.textEdit = "textEdit", s.customCrop = "customCrop", s.frameSubjectArea = "frameSubjectArea", s.perAssetCrop = "perAssetCrop", s))(fn || {}), Ss = /* @__PURE__ */ ((s) => (s.url = "url", s.grafx = "grafx", s.local = "local", s))(Ss || {});
|
|
2298
|
+
const xn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2299
|
+
__proto__: null,
|
|
2300
|
+
ConnectorRegistrationSource: Ss
|
|
2301
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
2302
|
+
export {
|
|
2303
|
+
xr as ActionAsyncError,
|
|
2304
|
+
Cn as ActionEditorEvent,
|
|
2305
|
+
ln as Alignment,
|
|
2306
|
+
Nr as AnchorTargetEdgeType,
|
|
2307
|
+
Or as AnchorTargetType,
|
|
2308
|
+
pr as AuthCredentialsTypeEnum,
|
|
2309
|
+
Cr as AuthRefreshTypeEnum,
|
|
2310
|
+
fr as AutoGrowDirection,
|
|
2311
|
+
wt as BarcodeCharacterSet,
|
|
2312
|
+
Ot as BarcodeErrorCorrectionLevel,
|
|
2313
|
+
br as BarcodeSourceTypeEnum,
|
|
2314
|
+
T as BarcodeType,
|
|
2315
|
+
Qs as BarcodeValidationResult,
|
|
2316
|
+
an as BasicAnimationsEmphasisStyles,
|
|
2317
|
+
Ar as BlendMode,
|
|
2318
|
+
un as Case,
|
|
2319
|
+
z as ColorType,
|
|
2320
|
+
ys as ColorUsageType,
|
|
2321
|
+
dr as ConnectorConfigContextType,
|
|
2322
|
+
lr as ConnectorConfigValueType,
|
|
2323
|
+
yr as ConnectorEventType,
|
|
2324
|
+
Zs as ConnectorHttpError,
|
|
2325
|
+
bn as ConnectorMapping,
|
|
2326
|
+
gr as ConnectorMappingDirection,
|
|
2327
|
+
ur as ConnectorMappingSource,
|
|
2328
|
+
Nt as ConnectorRegistrationSource,
|
|
2329
|
+
te as ConnectorStateType,
|
|
2330
|
+
or as ConnectorType,
|
|
2331
|
+
wn as CornerRadiusType,
|
|
2332
|
+
Cs as CropType,
|
|
2333
|
+
Rr as DataRowAsyncError,
|
|
2334
|
+
Mr as Day,
|
|
2335
|
+
Xt as DeprecatedMediaConnectorDownloadType,
|
|
2336
|
+
Mt as DeprecatedMediaType,
|
|
2337
|
+
qs as DocumentIssueTypeEnum,
|
|
2338
|
+
gs as DocumentType,
|
|
2339
|
+
Gr as DownloadFormats,
|
|
2340
|
+
rn as EaseTypes,
|
|
2341
|
+
fn as EngineEditModeType,
|
|
2342
|
+
re as EnvironmentType,
|
|
2343
|
+
Fr as FitMode,
|
|
2344
|
+
Er as FitModePosition,
|
|
2345
|
+
vr as FlowDirection,
|
|
2346
|
+
cn as FontPreviewFormat,
|
|
2347
|
+
hn as FontWeights,
|
|
2348
|
+
En as FrameAnchorTarget,
|
|
2349
|
+
Dr as FrameAnchorType,
|
|
2350
|
+
kr as FramePropertyNames,
|
|
2351
|
+
Sr as FrameTypeEnum,
|
|
2352
|
+
vn as GrafxTokenAuthCredentials,
|
|
2353
|
+
Kt as ImageSourceTypeEnum,
|
|
2354
|
+
er as LayoutIntent,
|
|
2355
|
+
Tr as LayoutPropertyNames,
|
|
2356
|
+
Xs as LayoutType,
|
|
2357
|
+
Vr as Locale,
|
|
2358
|
+
tr as MeasurementUnit,
|
|
2359
|
+
ms as MediaDownloadIntent,
|
|
2360
|
+
se as MediaDownloadType,
|
|
2361
|
+
Vt as MediaType,
|
|
2362
|
+
xn as Next,
|
|
2363
|
+
Fn as PageAnchorTarget,
|
|
2364
|
+
q as PositionEnum,
|
|
2365
|
+
Pn as RefreshedAuthCredendentials,
|
|
2366
|
+
gn as Scripting,
|
|
2367
|
+
yn as SelectedTextStyleSections,
|
|
2368
|
+
pn as SelectedTextStyles,
|
|
2369
|
+
sn as ShakeDirections,
|
|
2370
|
+
mn as ShapeType,
|
|
2371
|
+
en as SlideDirections,
|
|
2372
|
+
cr as SortBy,
|
|
2373
|
+
hr as SortOrder,
|
|
2374
|
+
Ir as TextDirection,
|
|
2375
|
+
dn as TextPosition,
|
|
2376
|
+
G as ToolType,
|
|
2377
|
+
nn as TweenTypes,
|
|
2378
|
+
Lr as UpdateZIndexMethod,
|
|
2379
|
+
mr as UploadAssetValidationError,
|
|
2380
|
+
ps as UploadAssetValidationErrorType,
|
|
2381
|
+
ae as VariableType,
|
|
2382
|
+
Br as VariableVisibilityOperator,
|
|
2383
|
+
Jr as VariableVisibilityTargetType,
|
|
2384
|
+
xt as VariableVisibilityType,
|
|
2385
|
+
Pr as VerticalAlign,
|
|
2386
|
+
on as ViewMode,
|
|
2387
|
+
Y as WellKnownConfigurationKeys,
|
|
2388
|
+
Nn as default,
|
|
2389
|
+
In as grafxMediaConnectorRegistration
|
|
2390
|
+
};
|
|
2391
|
+
//# sourceMappingURL=main.es.js.map
|