x-block-lib 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/index.d.ts +2 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +664 -541
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,471 +1,478 @@
|
|
|
1
|
-
import { B as
|
|
2
|
-
import { getCurrentInstance as
|
|
1
|
+
import { B as ke } from "./blockly-ByC0ID0H.js";
|
|
2
|
+
import { getCurrentInstance as se, inject as G, hasInjectionContext as Oe, ref as O, watch as M, reactive as Ne, markRaw as V, effectScope as Ce, isRef as R, isReactive as H, toRef as F, toRaw as Se, nextTick as U, computed as X, getCurrentScope as Te, onScopeDispose as Pe, toRefs as ee, onMounted as ce, onBeforeUnmount as ie, defineComponent as we, openBlock as De, createElementBlock as Ve, withDirectives as xe, createElementVNode as Me } from "vue";
|
|
3
3
|
const {
|
|
4
|
-
ASTNode:
|
|
5
|
-
BasicCursor:
|
|
6
|
-
Block:
|
|
7
|
-
BlockSvg:
|
|
8
|
-
Blocks:
|
|
9
|
-
COLLAPSED_FIELD_NAME:
|
|
10
|
-
COLLAPSED_INPUT_NAME:
|
|
11
|
-
COLLAPSE_CHARS:
|
|
12
|
-
CodeGenerator:
|
|
13
|
-
CollapsibleToolboxCategory:
|
|
14
|
-
ComponentManager:
|
|
15
|
-
Connection:
|
|
16
|
-
ConnectionChecker:
|
|
17
|
-
ConnectionDB:
|
|
18
|
-
ConnectionType:
|
|
19
|
-
ContextMenu:
|
|
20
|
-
ContextMenuItems:
|
|
21
|
-
ContextMenuRegistry:
|
|
22
|
-
Css:
|
|
23
|
-
Cursor:
|
|
24
|
-
DELETE_VARIABLE_ID:
|
|
25
|
-
DeleteArea:
|
|
26
|
-
DragTarget:
|
|
27
|
-
DropDownDiv:
|
|
28
|
-
Events:
|
|
29
|
-
Extensions:
|
|
30
|
-
Field:
|
|
31
|
-
FieldCheckbox:
|
|
32
|
-
FieldDropdown:
|
|
33
|
-
FieldImage:
|
|
34
|
-
FieldLabel:
|
|
35
|
-
FieldLabelSerializable:
|
|
36
|
-
FieldNumber:
|
|
37
|
-
FieldTextInput:
|
|
38
|
-
FieldVariable:
|
|
39
|
-
Flyout:
|
|
40
|
-
FlyoutButton:
|
|
41
|
-
FlyoutMetricsManager:
|
|
42
|
-
Generator:
|
|
43
|
-
Gesture:
|
|
44
|
-
Grid:
|
|
45
|
-
HorizontalFlyout:
|
|
46
|
-
INPUT_VALUE:
|
|
47
|
-
Input:
|
|
48
|
-
InsertionMarkerManager:
|
|
49
|
-
InsertionMarkerPreviewer:
|
|
50
|
-
Marker:
|
|
51
|
-
MarkerManager:
|
|
52
|
-
Menu:
|
|
53
|
-
MenuItem:
|
|
54
|
-
MetricsManager:
|
|
55
|
-
Msg:
|
|
56
|
-
NEXT_STATEMENT:
|
|
57
|
-
Names:
|
|
58
|
-
OPPOSITE_TYPE:
|
|
59
|
-
OUTPUT_VALUE:
|
|
60
|
-
Options:
|
|
61
|
-
PREVIOUS_STATEMENT:
|
|
62
|
-
PROCEDURE_CATEGORY_NAME:
|
|
63
|
-
Procedures:
|
|
64
|
-
RENAME_VARIABLE_ID:
|
|
65
|
-
RenderedConnection:
|
|
66
|
-
Scrollbar:
|
|
67
|
-
ScrollbarPair:
|
|
68
|
-
ShortcutItems:
|
|
69
|
-
ShortcutRegistry:
|
|
70
|
-
TOOLBOX_AT_BOTTOM:
|
|
71
|
-
TOOLBOX_AT_LEFT:
|
|
72
|
-
TOOLBOX_AT_RIGHT:
|
|
73
|
-
TOOLBOX_AT_TOP:
|
|
74
|
-
TabNavigateCursor:
|
|
75
|
-
Theme:
|
|
76
|
-
ThemeManager:
|
|
77
|
-
Themes:
|
|
78
|
-
Toolbox:
|
|
79
|
-
ToolboxCategory:
|
|
80
|
-
ToolboxItem:
|
|
81
|
-
ToolboxSeparator:
|
|
82
|
-
Tooltip:
|
|
83
|
-
Touch:
|
|
84
|
-
Trashcan:
|
|
85
|
-
UnattachedFieldError:
|
|
86
|
-
VARIABLE_CATEGORY_NAME:
|
|
87
|
-
VARIABLE_DYNAMIC_CATEGORY_NAME:
|
|
88
|
-
VERSION:
|
|
89
|
-
VariableMap:
|
|
90
|
-
VariableModel:
|
|
91
|
-
Variables:
|
|
92
|
-
VariablesDynamic:
|
|
93
|
-
VerticalFlyout:
|
|
94
|
-
WidgetDiv:
|
|
95
|
-
Workspace:
|
|
96
|
-
WorkspaceAudio:
|
|
97
|
-
WorkspaceDragger:
|
|
98
|
-
WorkspaceSvg:
|
|
99
|
-
Xml:
|
|
100
|
-
ZoomControls:
|
|
101
|
-
blockAnimations:
|
|
102
|
-
blockRendering:
|
|
103
|
-
browserEvents:
|
|
104
|
-
bubbles:
|
|
105
|
-
bumpObjects:
|
|
106
|
-
clipboard:
|
|
107
|
-
comments:
|
|
108
|
-
common:
|
|
109
|
-
config:
|
|
110
|
-
constants:
|
|
111
|
-
defineBlocksWithJsonArray:
|
|
112
|
-
dialog:
|
|
113
|
-
dragging:
|
|
114
|
-
fieldRegistry:
|
|
115
|
-
geras:
|
|
116
|
-
getMainWorkspace:
|
|
117
|
-
getSelected:
|
|
118
|
-
hasBubble:
|
|
119
|
-
hideChaff:
|
|
120
|
-
icons:
|
|
121
|
-
inject:
|
|
122
|
-
inputs:
|
|
123
|
-
isCopyable:
|
|
124
|
-
isDeletable:
|
|
125
|
-
isDraggable:
|
|
126
|
-
isIcon:
|
|
127
|
-
isObservable:
|
|
128
|
-
isPaster:
|
|
129
|
-
isRenderedElement:
|
|
130
|
-
isSelectable:
|
|
131
|
-
isSerializable:
|
|
132
|
-
isVariableBackedParameterModel:
|
|
133
|
-
procedures:
|
|
134
|
-
registry:
|
|
135
|
-
renderManagement:
|
|
136
|
-
serialization:
|
|
137
|
-
setLocale:
|
|
138
|
-
setParentContainer:
|
|
139
|
-
svgResize:
|
|
140
|
-
thrasos:
|
|
141
|
-
uiPosition:
|
|
142
|
-
utils:
|
|
143
|
-
zelos:
|
|
144
|
-
} =
|
|
145
|
-
function
|
|
146
|
-
const o =
|
|
4
|
+
ASTNode: mt,
|
|
5
|
+
BasicCursor: yt,
|
|
6
|
+
Block: ht,
|
|
7
|
+
BlockSvg: pt,
|
|
8
|
+
Blocks: bt,
|
|
9
|
+
COLLAPSED_FIELD_NAME: gt,
|
|
10
|
+
COLLAPSED_INPUT_NAME: _t,
|
|
11
|
+
COLLAPSE_CHARS: vt,
|
|
12
|
+
CodeGenerator: Et,
|
|
13
|
+
CollapsibleToolboxCategory: kt,
|
|
14
|
+
ComponentManager: Ot,
|
|
15
|
+
Connection: Nt,
|
|
16
|
+
ConnectionChecker: Ct,
|
|
17
|
+
ConnectionDB: St,
|
|
18
|
+
ConnectionType: Tt,
|
|
19
|
+
ContextMenu: Pt,
|
|
20
|
+
ContextMenuItems: wt,
|
|
21
|
+
ContextMenuRegistry: Dt,
|
|
22
|
+
Css: Vt,
|
|
23
|
+
Cursor: xt,
|
|
24
|
+
DELETE_VARIABLE_ID: Mt,
|
|
25
|
+
DeleteArea: At,
|
|
26
|
+
DragTarget: Rt,
|
|
27
|
+
DropDownDiv: It,
|
|
28
|
+
Events: Ae,
|
|
29
|
+
Extensions: jt,
|
|
30
|
+
Field: Lt,
|
|
31
|
+
FieldCheckbox: Bt,
|
|
32
|
+
FieldDropdown: Ft,
|
|
33
|
+
FieldImage: $t,
|
|
34
|
+
FieldLabel: zt,
|
|
35
|
+
FieldLabelSerializable: Ut,
|
|
36
|
+
FieldNumber: Wt,
|
|
37
|
+
FieldTextInput: qt,
|
|
38
|
+
FieldVariable: Gt,
|
|
39
|
+
Flyout: Ht,
|
|
40
|
+
FlyoutButton: Xt,
|
|
41
|
+
FlyoutMetricsManager: Yt,
|
|
42
|
+
Generator: Jt,
|
|
43
|
+
Gesture: Qt,
|
|
44
|
+
Grid: Zt,
|
|
45
|
+
HorizontalFlyout: Kt,
|
|
46
|
+
INPUT_VALUE: eo,
|
|
47
|
+
Input: to,
|
|
48
|
+
InsertionMarkerManager: oo,
|
|
49
|
+
InsertionMarkerPreviewer: ro,
|
|
50
|
+
Marker: no,
|
|
51
|
+
MarkerManager: ao,
|
|
52
|
+
Menu: so,
|
|
53
|
+
MenuItem: co,
|
|
54
|
+
MetricsManager: io,
|
|
55
|
+
Msg: lo,
|
|
56
|
+
NEXT_STATEMENT: uo,
|
|
57
|
+
Names: fo,
|
|
58
|
+
OPPOSITE_TYPE: mo,
|
|
59
|
+
OUTPUT_VALUE: yo,
|
|
60
|
+
Options: ho,
|
|
61
|
+
PREVIOUS_STATEMENT: po,
|
|
62
|
+
PROCEDURE_CATEGORY_NAME: bo,
|
|
63
|
+
Procedures: go,
|
|
64
|
+
RENAME_VARIABLE_ID: _o,
|
|
65
|
+
RenderedConnection: vo,
|
|
66
|
+
Scrollbar: Eo,
|
|
67
|
+
ScrollbarPair: ko,
|
|
68
|
+
ShortcutItems: Oo,
|
|
69
|
+
ShortcutRegistry: No,
|
|
70
|
+
TOOLBOX_AT_BOTTOM: Co,
|
|
71
|
+
TOOLBOX_AT_LEFT: So,
|
|
72
|
+
TOOLBOX_AT_RIGHT: To,
|
|
73
|
+
TOOLBOX_AT_TOP: Po,
|
|
74
|
+
TabNavigateCursor: wo,
|
|
75
|
+
Theme: le,
|
|
76
|
+
ThemeManager: Do,
|
|
77
|
+
Themes: B,
|
|
78
|
+
Toolbox: Vo,
|
|
79
|
+
ToolboxCategory: xo,
|
|
80
|
+
ToolboxItem: Mo,
|
|
81
|
+
ToolboxSeparator: Ao,
|
|
82
|
+
Tooltip: Ro,
|
|
83
|
+
Touch: Io,
|
|
84
|
+
Trashcan: jo,
|
|
85
|
+
UnattachedFieldError: Lo,
|
|
86
|
+
VARIABLE_CATEGORY_NAME: Bo,
|
|
87
|
+
VARIABLE_DYNAMIC_CATEGORY_NAME: Fo,
|
|
88
|
+
VERSION: $o,
|
|
89
|
+
VariableMap: zo,
|
|
90
|
+
VariableModel: Uo,
|
|
91
|
+
Variables: Wo,
|
|
92
|
+
VariablesDynamic: qo,
|
|
93
|
+
VerticalFlyout: Go,
|
|
94
|
+
WidgetDiv: Ho,
|
|
95
|
+
Workspace: Xo,
|
|
96
|
+
WorkspaceAudio: Yo,
|
|
97
|
+
WorkspaceDragger: Jo,
|
|
98
|
+
WorkspaceSvg: Qo,
|
|
99
|
+
Xml: Zo,
|
|
100
|
+
ZoomControls: Ko,
|
|
101
|
+
blockAnimations: er,
|
|
102
|
+
blockRendering: tr,
|
|
103
|
+
browserEvents: or,
|
|
104
|
+
bubbles: rr,
|
|
105
|
+
bumpObjects: nr,
|
|
106
|
+
clipboard: ar,
|
|
107
|
+
comments: sr,
|
|
108
|
+
common: cr,
|
|
109
|
+
config: ir,
|
|
110
|
+
constants: lr,
|
|
111
|
+
defineBlocksWithJsonArray: ur,
|
|
112
|
+
dialog: ue,
|
|
113
|
+
dragging: dr,
|
|
114
|
+
fieldRegistry: fr,
|
|
115
|
+
geras: mr,
|
|
116
|
+
getMainWorkspace: Re,
|
|
117
|
+
getSelected: yr,
|
|
118
|
+
hasBubble: hr,
|
|
119
|
+
hideChaff: pr,
|
|
120
|
+
icons: br,
|
|
121
|
+
inject: Ie,
|
|
122
|
+
inputs: gr,
|
|
123
|
+
isCopyable: _r,
|
|
124
|
+
isDeletable: vr,
|
|
125
|
+
isDraggable: Er,
|
|
126
|
+
isIcon: kr,
|
|
127
|
+
isObservable: Or,
|
|
128
|
+
isPaster: Nr,
|
|
129
|
+
isRenderedElement: Cr,
|
|
130
|
+
isSelectable: Sr,
|
|
131
|
+
isSerializable: Tr,
|
|
132
|
+
isVariableBackedParameterModel: Pr,
|
|
133
|
+
procedures: wr,
|
|
134
|
+
registry: Dr,
|
|
135
|
+
renderManagement: Vr,
|
|
136
|
+
serialization: xr,
|
|
137
|
+
setLocale: je,
|
|
138
|
+
setParentContainer: Mr,
|
|
139
|
+
svgResize: Le,
|
|
140
|
+
thrasos: Ar,
|
|
141
|
+
uiPosition: Rr,
|
|
142
|
+
utils: Ir,
|
|
143
|
+
zelos: jr
|
|
144
|
+
} = ke;
|
|
145
|
+
function Be(e, r) {
|
|
146
|
+
const o = se();
|
|
147
147
|
if (!o)
|
|
148
148
|
throw new Error(`[Vuetify] ${e} must be called from inside a setup function`);
|
|
149
149
|
return o;
|
|
150
150
|
}
|
|
151
|
-
const
|
|
152
|
-
function
|
|
153
|
-
|
|
154
|
-
|
|
151
|
+
const Fe = Symbol.for("vuetify:locale");
|
|
152
|
+
function $e() {
|
|
153
|
+
const e = G(Fe);
|
|
154
|
+
if (!e)
|
|
155
|
+
throw new Error("[Vuetify] Could not find injected locale instance");
|
|
156
|
+
return e;
|
|
157
|
+
}
|
|
158
|
+
const ze = Symbol.for("vuetify:theme");
|
|
159
|
+
function de() {
|
|
160
|
+
Be("useTheme");
|
|
161
|
+
const e = G(ze, null);
|
|
155
162
|
if (!e)
|
|
156
163
|
throw new Error("Could not find Vuetify theme injection");
|
|
157
164
|
return e;
|
|
158
165
|
}
|
|
159
|
-
var
|
|
160
|
-
function
|
|
166
|
+
var Ue = !1;
|
|
167
|
+
function j(e, r, o) {
|
|
161
168
|
return Array.isArray(e) ? (e.length = Math.max(e.length, r), e.splice(r, 1, o), o) : (e[r] = o, o);
|
|
162
169
|
}
|
|
163
|
-
function
|
|
170
|
+
function $(e, r) {
|
|
164
171
|
if (Array.isArray(e)) {
|
|
165
172
|
e.splice(r, 1);
|
|
166
173
|
return;
|
|
167
174
|
}
|
|
168
175
|
delete e[r];
|
|
169
176
|
}
|
|
170
|
-
var
|
|
171
|
-
let
|
|
172
|
-
const
|
|
177
|
+
var u = {};
|
|
178
|
+
let x;
|
|
179
|
+
const L = (e) => x = e, We = u.NODE_ENV !== "production" ? Symbol("pinia") : (
|
|
173
180
|
/* istanbul ignore next */
|
|
174
181
|
Symbol()
|
|
175
182
|
);
|
|
176
|
-
function
|
|
183
|
+
function T(e) {
|
|
177
184
|
return e && typeof e == "object" && Object.prototype.toString.call(e) === "[object Object]" && typeof e.toJSON != "function";
|
|
178
185
|
}
|
|
179
|
-
var
|
|
186
|
+
var A;
|
|
180
187
|
(function(e) {
|
|
181
188
|
e.direct = "direct", e.patchObject = "patch object", e.patchFunction = "patch function";
|
|
182
|
-
})(
|
|
183
|
-
const
|
|
184
|
-
function
|
|
189
|
+
})(A || (A = {}));
|
|
190
|
+
const Y = typeof window < "u", z = (u.NODE_ENV !== "production" || !1) && u.NODE_ENV !== "test" && Y;
|
|
191
|
+
function fe(e, r) {
|
|
185
192
|
for (const o in r) {
|
|
186
193
|
const t = r[o];
|
|
187
194
|
if (!(o in e))
|
|
188
195
|
continue;
|
|
189
|
-
const
|
|
190
|
-
|
|
196
|
+
const n = e[o];
|
|
197
|
+
T(n) && T(t) && !R(t) && !H(t) ? e[o] = fe(n, t) : e[o] = t;
|
|
191
198
|
}
|
|
192
199
|
return e;
|
|
193
200
|
}
|
|
194
|
-
const
|
|
201
|
+
const me = () => {
|
|
195
202
|
};
|
|
196
|
-
function
|
|
203
|
+
function te(e, r, o, t = me) {
|
|
197
204
|
e.push(r);
|
|
198
|
-
const
|
|
199
|
-
const
|
|
200
|
-
|
|
205
|
+
const n = () => {
|
|
206
|
+
const i = e.indexOf(r);
|
|
207
|
+
i > -1 && (e.splice(i, 1), t());
|
|
201
208
|
};
|
|
202
|
-
return !o &&
|
|
209
|
+
return !o && Te() && Pe(n), n;
|
|
203
210
|
}
|
|
204
|
-
function
|
|
211
|
+
function P(e, ...r) {
|
|
205
212
|
e.slice().forEach((o) => {
|
|
206
213
|
o(...r);
|
|
207
214
|
});
|
|
208
215
|
}
|
|
209
|
-
const
|
|
210
|
-
function
|
|
216
|
+
const qe = (e) => e();
|
|
217
|
+
function W(e, r) {
|
|
211
218
|
e instanceof Map && r instanceof Map && r.forEach((o, t) => e.set(t, o)), e instanceof Set && r instanceof Set && r.forEach(e.add, e);
|
|
212
219
|
for (const o in r) {
|
|
213
220
|
if (!r.hasOwnProperty(o))
|
|
214
221
|
continue;
|
|
215
|
-
const t = r[o],
|
|
216
|
-
|
|
222
|
+
const t = r[o], n = e[o];
|
|
223
|
+
T(n) && T(t) && e.hasOwnProperty(o) && !R(t) && !H(t) ? e[o] = W(n, t) : e[o] = t;
|
|
217
224
|
}
|
|
218
225
|
return e;
|
|
219
226
|
}
|
|
220
|
-
const
|
|
227
|
+
const Ge = u.NODE_ENV !== "production" ? Symbol("pinia:skipHydration") : (
|
|
221
228
|
/* istanbul ignore next */
|
|
222
229
|
Symbol()
|
|
223
230
|
);
|
|
224
|
-
function
|
|
225
|
-
return !
|
|
231
|
+
function He(e) {
|
|
232
|
+
return !T(e) || !e.hasOwnProperty(Ge);
|
|
226
233
|
}
|
|
227
|
-
const { assign:
|
|
228
|
-
function
|
|
229
|
-
return !!(
|
|
234
|
+
const { assign: k } = Object;
|
|
235
|
+
function oe(e) {
|
|
236
|
+
return !!(R(e) && e.effect);
|
|
230
237
|
}
|
|
231
|
-
function
|
|
232
|
-
const { state:
|
|
233
|
-
let
|
|
234
|
-
function
|
|
235
|
-
!
|
|
236
|
-
const
|
|
238
|
+
function re(e, r, o, t) {
|
|
239
|
+
const { state: n, actions: i, getters: h } = r, l = o.state.value[e];
|
|
240
|
+
let m;
|
|
241
|
+
function y() {
|
|
242
|
+
!l && (u.NODE_ENV === "production" || !t) && (o.state.value[e] = n ? n() : {});
|
|
243
|
+
const b = u.NODE_ENV !== "production" && t ? (
|
|
237
244
|
// use ref() to unwrap refs inside state TODO: check if this is still necessary
|
|
238
|
-
|
|
239
|
-
) :
|
|
240
|
-
return
|
|
241
|
-
|
|
242
|
-
const
|
|
243
|
-
return h[
|
|
244
|
-
})),
|
|
245
|
+
ee(O(n ? n() : {}).value)
|
|
246
|
+
) : ee(o.state.value[e]);
|
|
247
|
+
return k(b, i, Object.keys(h || {}).reduce((p, g) => (u.NODE_ENV !== "production" && g in b && console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with "${g}" in store "${e}".`), p[g] = V(X(() => {
|
|
248
|
+
L(o);
|
|
249
|
+
const d = o._s.get(e);
|
|
250
|
+
return h[g].call(d, d);
|
|
251
|
+
})), p), {}));
|
|
245
252
|
}
|
|
246
|
-
return
|
|
253
|
+
return m = q(e, y, r, o, t, !0), m;
|
|
247
254
|
}
|
|
248
|
-
function
|
|
255
|
+
function q(e, r, o = {}, t, n, i) {
|
|
249
256
|
let h;
|
|
250
|
-
const
|
|
251
|
-
if (
|
|
257
|
+
const l = k({ actions: {} }, o);
|
|
258
|
+
if (u.NODE_ENV !== "production" && !t._e.active)
|
|
252
259
|
throw new Error("Pinia destroyed");
|
|
253
|
-
const
|
|
260
|
+
const m = {
|
|
254
261
|
deep: !0
|
|
255
262
|
// flush: 'post',
|
|
256
263
|
};
|
|
257
|
-
|
|
258
|
-
|
|
264
|
+
u.NODE_ENV !== "production" && !Ue && (m.onTrigger = (s) => {
|
|
265
|
+
y ? d = s : y == !1 && !c._hotUpdating && (Array.isArray(d) ? d.push(s) : console.error("🍍 debuggerEvents should be an array. This is most likely an internal Pinia bug."));
|
|
259
266
|
});
|
|
260
|
-
let
|
|
261
|
-
const
|
|
262
|
-
!
|
|
263
|
-
const
|
|
264
|
-
let
|
|
265
|
-
function
|
|
266
|
-
let
|
|
267
|
-
|
|
268
|
-
type:
|
|
267
|
+
let y, b, p = [], g = [], d;
|
|
268
|
+
const _ = t.state.value[e];
|
|
269
|
+
!i && !_ && (u.NODE_ENV === "production" || !n) && (t.state.value[e] = {});
|
|
270
|
+
const S = O({});
|
|
271
|
+
let J;
|
|
272
|
+
function Q(s) {
|
|
273
|
+
let a;
|
|
274
|
+
y = b = !1, u.NODE_ENV !== "production" && (d = []), typeof s == "function" ? (s(t.state.value[e]), a = {
|
|
275
|
+
type: A.patchFunction,
|
|
269
276
|
storeId: e,
|
|
270
|
-
events:
|
|
271
|
-
}) : (
|
|
272
|
-
type:
|
|
273
|
-
payload:
|
|
277
|
+
events: d
|
|
278
|
+
}) : (W(t.state.value[e], s), a = {
|
|
279
|
+
type: A.patchObject,
|
|
280
|
+
payload: s,
|
|
274
281
|
storeId: e,
|
|
275
|
-
events:
|
|
282
|
+
events: d
|
|
276
283
|
});
|
|
277
|
-
const
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
}),
|
|
284
|
+
const f = J = Symbol();
|
|
285
|
+
U().then(() => {
|
|
286
|
+
J === f && (y = !0);
|
|
287
|
+
}), b = !0, P(p, a, t.state.value[e]);
|
|
281
288
|
}
|
|
282
|
-
const
|
|
283
|
-
const { state:
|
|
284
|
-
this.$patch((
|
|
285
|
-
v
|
|
289
|
+
const ge = i ? function() {
|
|
290
|
+
const { state: a } = o, f = a ? a() : {};
|
|
291
|
+
this.$patch((v) => {
|
|
292
|
+
k(v, f);
|
|
286
293
|
});
|
|
287
294
|
} : (
|
|
288
295
|
/* istanbul ignore next */
|
|
289
|
-
|
|
296
|
+
u.NODE_ENV !== "production" ? () => {
|
|
290
297
|
throw new Error(`🍍: Store "${e}" is built using the setup syntax and does not implement $reset().`);
|
|
291
|
-
} :
|
|
298
|
+
} : me
|
|
292
299
|
);
|
|
293
|
-
function
|
|
294
|
-
h.stop(),
|
|
300
|
+
function _e() {
|
|
301
|
+
h.stop(), p = [], g = [], t._s.delete(e);
|
|
295
302
|
}
|
|
296
|
-
function
|
|
303
|
+
function Z(s, a) {
|
|
297
304
|
return function() {
|
|
298
|
-
|
|
299
|
-
const
|
|
300
|
-
function
|
|
301
|
-
|
|
305
|
+
L(t);
|
|
306
|
+
const f = Array.from(arguments), v = [], w = [];
|
|
307
|
+
function ve(E) {
|
|
308
|
+
v.push(E);
|
|
302
309
|
}
|
|
303
|
-
function
|
|
304
|
-
|
|
310
|
+
function Ee(E) {
|
|
311
|
+
w.push(E);
|
|
305
312
|
}
|
|
306
|
-
|
|
307
|
-
args:
|
|
308
|
-
name:
|
|
313
|
+
P(g, {
|
|
314
|
+
args: f,
|
|
315
|
+
name: s,
|
|
309
316
|
store: c,
|
|
310
|
-
after:
|
|
311
|
-
onError:
|
|
317
|
+
after: ve,
|
|
318
|
+
onError: Ee
|
|
312
319
|
});
|
|
313
320
|
let D;
|
|
314
321
|
try {
|
|
315
|
-
D =
|
|
322
|
+
D = a.apply(this && this.$id === e ? this : c, f);
|
|
316
323
|
} catch (E) {
|
|
317
|
-
throw
|
|
324
|
+
throw P(w, E), E;
|
|
318
325
|
}
|
|
319
|
-
return D instanceof Promise ? D.then((E) => (
|
|
326
|
+
return D instanceof Promise ? D.then((E) => (P(v, E), E)).catch((E) => (P(w, E), Promise.reject(E))) : (P(v, D), D);
|
|
320
327
|
};
|
|
321
328
|
}
|
|
322
|
-
const
|
|
329
|
+
const I = /* @__PURE__ */ V({
|
|
323
330
|
actions: {},
|
|
324
331
|
getters: {},
|
|
325
332
|
state: [],
|
|
326
|
-
hotState:
|
|
327
|
-
}),
|
|
333
|
+
hotState: S
|
|
334
|
+
}), K = {
|
|
328
335
|
_p: t,
|
|
329
336
|
// _s: scope,
|
|
330
337
|
$id: e,
|
|
331
|
-
$onAction:
|
|
332
|
-
$patch:
|
|
333
|
-
$reset:
|
|
334
|
-
$subscribe(
|
|
335
|
-
const
|
|
336
|
-
(
|
|
338
|
+
$onAction: te.bind(null, g),
|
|
339
|
+
$patch: Q,
|
|
340
|
+
$reset: ge,
|
|
341
|
+
$subscribe(s, a = {}) {
|
|
342
|
+
const f = te(p, s, a.detached, () => v()), v = h.run(() => M(() => t.state.value[e], (w) => {
|
|
343
|
+
(a.flush === "sync" ? b : y) && s({
|
|
337
344
|
storeId: e,
|
|
338
|
-
type:
|
|
339
|
-
events:
|
|
340
|
-
},
|
|
341
|
-
},
|
|
342
|
-
return
|
|
345
|
+
type: A.direct,
|
|
346
|
+
events: d
|
|
347
|
+
}, w);
|
|
348
|
+
}, k({}, m, a)));
|
|
349
|
+
return f;
|
|
343
350
|
},
|
|
344
|
-
$dispose:
|
|
345
|
-
}, c =
|
|
351
|
+
$dispose: _e
|
|
352
|
+
}, c = Ne(u.NODE_ENV !== "production" || z ? k(
|
|
346
353
|
{
|
|
347
|
-
_hmrPayload:
|
|
354
|
+
_hmrPayload: I,
|
|
348
355
|
_customProperties: V(/* @__PURE__ */ new Set())
|
|
349
356
|
// devtools custom properties
|
|
350
357
|
},
|
|
351
|
-
|
|
358
|
+
K
|
|
352
359
|
// must be added later
|
|
353
360
|
// setupStore
|
|
354
|
-
) :
|
|
361
|
+
) : K);
|
|
355
362
|
t._s.set(e, c);
|
|
356
|
-
const N = (t._a && t._a.runWithContext ||
|
|
357
|
-
for (const
|
|
358
|
-
const
|
|
359
|
-
if (
|
|
360
|
-
|
|
361
|
-
else if (typeof
|
|
362
|
-
const
|
|
363
|
-
N[
|
|
363
|
+
const N = (t._a && t._a.runWithContext || qe)(() => t._e.run(() => (h = Ce()).run(r)));
|
|
364
|
+
for (const s in N) {
|
|
365
|
+
const a = N[s];
|
|
366
|
+
if (R(a) && !oe(a) || H(a))
|
|
367
|
+
u.NODE_ENV !== "production" && n ? j(S.value, s, F(N, s)) : i || (_ && He(a) && (R(a) ? a.value = _[s] : W(a, _[s])), t.state.value[e][s] = a), u.NODE_ENV !== "production" && I.state.push(s);
|
|
368
|
+
else if (typeof a == "function") {
|
|
369
|
+
const f = u.NODE_ENV !== "production" && n ? a : Z(s, a);
|
|
370
|
+
N[s] = f, u.NODE_ENV !== "production" && (I.actions[s] = a), l.actions[s] = a;
|
|
364
371
|
} else
|
|
365
|
-
|
|
372
|
+
u.NODE_ENV !== "production" && oe(a) && (I.getters[s] = i ? (
|
|
366
373
|
// @ts-expect-error
|
|
367
|
-
o.getters[
|
|
368
|
-
) :
|
|
369
|
-
(N._getters = V([]))).push(
|
|
374
|
+
o.getters[s]
|
|
375
|
+
) : a, Y && (N._getters || // @ts-expect-error: same
|
|
376
|
+
(N._getters = V([]))).push(s));
|
|
370
377
|
}
|
|
371
|
-
if (
|
|
372
|
-
get: () =>
|
|
373
|
-
set: (
|
|
374
|
-
if (
|
|
378
|
+
if (k(c, N), k(Se(c), N), Object.defineProperty(c, "$state", {
|
|
379
|
+
get: () => u.NODE_ENV !== "production" && n ? S.value : t.state.value[e],
|
|
380
|
+
set: (s) => {
|
|
381
|
+
if (u.NODE_ENV !== "production" && n)
|
|
375
382
|
throw new Error("cannot set hotState");
|
|
376
|
-
|
|
377
|
-
|
|
383
|
+
Q((a) => {
|
|
384
|
+
k(a, s);
|
|
378
385
|
});
|
|
379
386
|
}
|
|
380
|
-
}),
|
|
381
|
-
c._hotUpdating = !0,
|
|
382
|
-
if (
|
|
383
|
-
const
|
|
384
|
-
typeof
|
|
387
|
+
}), u.NODE_ENV !== "production" && (c._hotUpdate = V((s) => {
|
|
388
|
+
c._hotUpdating = !0, s._hmrPayload.state.forEach((a) => {
|
|
389
|
+
if (a in c.$state) {
|
|
390
|
+
const f = s.$state[a], v = c.$state[a];
|
|
391
|
+
typeof f == "object" && T(f) && T(v) ? fe(f, v) : s.$state[a] = v;
|
|
385
392
|
}
|
|
386
|
-
|
|
387
|
-
}), Object.keys(c.$state).forEach((
|
|
388
|
-
|
|
389
|
-
}),
|
|
390
|
-
|
|
393
|
+
j(c, a, F(s.$state, a));
|
|
394
|
+
}), Object.keys(c.$state).forEach((a) => {
|
|
395
|
+
a in s.$state || $(c, a);
|
|
396
|
+
}), y = !1, b = !1, t.state.value[e] = F(s._hmrPayload, "hotState"), b = !0, U().then(() => {
|
|
397
|
+
y = !0;
|
|
391
398
|
});
|
|
392
|
-
for (const
|
|
393
|
-
const
|
|
394
|
-
|
|
399
|
+
for (const a in s._hmrPayload.actions) {
|
|
400
|
+
const f = s[a];
|
|
401
|
+
j(c, a, Z(a, f));
|
|
395
402
|
}
|
|
396
|
-
for (const
|
|
397
|
-
const
|
|
403
|
+
for (const a in s._hmrPayload.getters) {
|
|
404
|
+
const f = s._hmrPayload.getters[a], v = i ? (
|
|
398
405
|
// special handling of options api
|
|
399
|
-
|
|
400
|
-
) :
|
|
401
|
-
|
|
406
|
+
X(() => (L(t), f.call(c, c)))
|
|
407
|
+
) : f;
|
|
408
|
+
j(c, a, v);
|
|
402
409
|
}
|
|
403
|
-
Object.keys(c._hmrPayload.getters).forEach((
|
|
404
|
-
|
|
405
|
-
}), Object.keys(c._hmrPayload.actions).forEach((
|
|
406
|
-
|
|
407
|
-
}), c._hmrPayload =
|
|
408
|
-
})),
|
|
409
|
-
const
|
|
410
|
+
Object.keys(c._hmrPayload.getters).forEach((a) => {
|
|
411
|
+
a in s._hmrPayload.getters || $(c, a);
|
|
412
|
+
}), Object.keys(c._hmrPayload.actions).forEach((a) => {
|
|
413
|
+
a in s._hmrPayload.actions || $(c, a);
|
|
414
|
+
}), c._hmrPayload = s._hmrPayload, c._getters = s._getters, c._hotUpdating = !1;
|
|
415
|
+
})), z) {
|
|
416
|
+
const s = {
|
|
410
417
|
writable: !0,
|
|
411
418
|
configurable: !0,
|
|
412
419
|
// avoid warning on devtools trying to display this property
|
|
413
420
|
enumerable: !1
|
|
414
421
|
};
|
|
415
|
-
["_p", "_hmrPayload", "_getters", "_customProperties"].forEach((
|
|
416
|
-
Object.defineProperty(c,
|
|
422
|
+
["_p", "_hmrPayload", "_getters", "_customProperties"].forEach((a) => {
|
|
423
|
+
Object.defineProperty(c, a, k({ value: c[a] }, s));
|
|
417
424
|
});
|
|
418
425
|
}
|
|
419
|
-
return t._p.forEach((
|
|
420
|
-
if (
|
|
421
|
-
const
|
|
426
|
+
return t._p.forEach((s) => {
|
|
427
|
+
if (z) {
|
|
428
|
+
const a = h.run(() => s({
|
|
422
429
|
store: c,
|
|
423
430
|
app: t._a,
|
|
424
431
|
pinia: t,
|
|
425
|
-
options:
|
|
432
|
+
options: l
|
|
426
433
|
}));
|
|
427
|
-
Object.keys(
|
|
434
|
+
Object.keys(a || {}).forEach((f) => c._customProperties.add(f)), k(c, a);
|
|
428
435
|
} else
|
|
429
|
-
|
|
436
|
+
k(c, h.run(() => s({
|
|
430
437
|
store: c,
|
|
431
438
|
app: t._a,
|
|
432
439
|
pinia: t,
|
|
433
|
-
options:
|
|
440
|
+
options: l
|
|
434
441
|
})));
|
|
435
|
-
}),
|
|
442
|
+
}), u.NODE_ENV !== "production" && c.$state && typeof c.$state == "object" && typeof c.$state.constructor == "function" && !c.$state.constructor.toString().includes("[native code]") && console.warn(`[🍍]: The "state" must be a plain object. It cannot be
|
|
436
443
|
state: () => new MyClass()
|
|
437
|
-
Found in store "${c.$id}".`),
|
|
444
|
+
Found in store "${c.$id}".`), _ && i && o.hydrate && o.hydrate(c.$state, _), y = !0, b = !0, c;
|
|
438
445
|
}
|
|
439
|
-
function
|
|
440
|
-
let t,
|
|
441
|
-
const
|
|
446
|
+
function ye(e, r, o) {
|
|
447
|
+
let t, n;
|
|
448
|
+
const i = typeof r == "function";
|
|
442
449
|
if (typeof e == "string")
|
|
443
|
-
t = e,
|
|
444
|
-
else if (
|
|
450
|
+
t = e, n = i ? o : r;
|
|
451
|
+
else if (n = e, t = e.id, u.NODE_ENV !== "production" && typeof t != "string")
|
|
445
452
|
throw new Error('[🍍]: "defineStore()" must be passed a store id as its first argument.');
|
|
446
|
-
function h(
|
|
447
|
-
const
|
|
448
|
-
if (
|
|
453
|
+
function h(l, m) {
|
|
454
|
+
const y = Oe();
|
|
455
|
+
if (l = // in test mode, ignore the argument provided as we can always retrieve a
|
|
449
456
|
// pinia instance with getActivePinia()
|
|
450
|
-
(
|
|
457
|
+
(u.NODE_ENV === "test" && x && x._testing ? null : l) || (y ? G(We, null) : null), l && L(l), u.NODE_ENV !== "production" && !x)
|
|
451
458
|
throw new Error(`[🍍]: "getActivePinia()" was called but there was no active Pinia. Are you trying to use a store before calling "app.use(pinia)"?
|
|
452
459
|
See https://pinia.vuejs.org/core-concepts/outside-component-usage.html for help.
|
|
453
460
|
This will fail in production.`);
|
|
454
|
-
|
|
455
|
-
const
|
|
456
|
-
if (
|
|
457
|
-
const
|
|
458
|
-
|
|
461
|
+
l = x, l._s.has(t) || (i ? q(t, r, n, l) : re(t, n, l), u.NODE_ENV !== "production" && (h._pinia = l));
|
|
462
|
+
const b = l._s.get(t);
|
|
463
|
+
if (u.NODE_ENV !== "production" && m) {
|
|
464
|
+
const p = "__hot:" + t, g = i ? q(p, r, n, l, !0) : re(p, k({}, n), l, !0);
|
|
465
|
+
m._hotUpdate(g), delete l.state.value[p], l._s.delete(p);
|
|
459
466
|
}
|
|
460
|
-
if (
|
|
461
|
-
const
|
|
462
|
-
if (
|
|
463
|
-
!
|
|
464
|
-
const
|
|
465
|
-
|
|
467
|
+
if (u.NODE_ENV !== "production" && Y) {
|
|
468
|
+
const p = se();
|
|
469
|
+
if (p && p.proxy && // avoid adding stores that are just built for hot module replacement
|
|
470
|
+
!m) {
|
|
471
|
+
const g = p.proxy, d = "_pStores" in g ? g._pStores : g._pStores = {};
|
|
472
|
+
d[t] = b;
|
|
466
473
|
}
|
|
467
474
|
}
|
|
468
|
-
return
|
|
475
|
+
return b;
|
|
469
476
|
}
|
|
470
477
|
return h.$id = t, h;
|
|
471
478
|
}
|
|
@@ -479,35 +486,35 @@ This will fail in production.`);
|
|
|
479
486
|
console.error("vite-plugin-css-injected-by-js", r);
|
|
480
487
|
}
|
|
481
488
|
})();
|
|
482
|
-
|
|
489
|
+
const Xe = ye("viewMgr", () => {
|
|
483
490
|
const e = O([]);
|
|
484
491
|
function r() {
|
|
485
492
|
return e.value.length <= 0;
|
|
486
493
|
}
|
|
487
494
|
function o() {
|
|
488
|
-
const
|
|
489
|
-
if (
|
|
490
|
-
return e.value[
|
|
495
|
+
const m = e.value.length;
|
|
496
|
+
if (m > 0)
|
|
497
|
+
return e.value[m - 1];
|
|
491
498
|
}
|
|
492
|
-
function t(
|
|
493
|
-
return e.value.find((
|
|
499
|
+
function t(m) {
|
|
500
|
+
return e.value.find((y) => y === m) !== void 0;
|
|
494
501
|
}
|
|
495
|
-
function
|
|
496
|
-
|
|
502
|
+
function n(m) {
|
|
503
|
+
i(m), e.value.push(m);
|
|
497
504
|
}
|
|
498
|
-
function
|
|
499
|
-
const
|
|
500
|
-
|
|
505
|
+
function i(m) {
|
|
506
|
+
const y = e.value.findIndex((b) => b === m);
|
|
507
|
+
y !== -1 && e.value.splice(y, 1);
|
|
501
508
|
}
|
|
502
509
|
function h() {
|
|
503
510
|
e.value.pop();
|
|
504
511
|
}
|
|
505
|
-
function
|
|
512
|
+
function l() {
|
|
506
513
|
e.value = [];
|
|
507
514
|
}
|
|
508
|
-
return { isEmpty: r, lastView: o, hasView: t, addView:
|
|
515
|
+
return { isEmpty: r, lastView: o, hasView: t, addView: n, delView: i, popView: h, clearViews: l };
|
|
509
516
|
});
|
|
510
|
-
function
|
|
517
|
+
function Ye(e) {
|
|
511
518
|
return { all: e = e || /* @__PURE__ */ new Map(), on: function(r, o) {
|
|
512
519
|
var t = e.get(r);
|
|
513
520
|
t ? t.push(o) : e.set(r, [o]);
|
|
@@ -516,30 +523,47 @@ function Ie(e) {
|
|
|
516
523
|
t && (o ? t.splice(t.indexOf(o) >>> 0, 1) : e.set(r, []));
|
|
517
524
|
}, emit: function(r, o) {
|
|
518
525
|
var t = e.get(r);
|
|
519
|
-
t && t.slice().map(function(
|
|
520
|
-
|
|
521
|
-
}), (t = e.get("*")) && t.slice().map(function(
|
|
522
|
-
|
|
526
|
+
t && t.slice().map(function(n) {
|
|
527
|
+
n(o);
|
|
528
|
+
}), (t = e.get("*")) && t.slice().map(function(n) {
|
|
529
|
+
n(r, o);
|
|
523
530
|
});
|
|
524
531
|
} };
|
|
525
532
|
}
|
|
526
|
-
const
|
|
527
|
-
async function
|
|
533
|
+
const C = Ye();
|
|
534
|
+
async function he(e, r, o) {
|
|
528
535
|
return new Promise((t) => {
|
|
529
|
-
const
|
|
530
|
-
e() ? t(!0) : setTimeout(
|
|
536
|
+
const n = async () => {
|
|
537
|
+
e() ? t(!0) : setTimeout(n, 30);
|
|
531
538
|
};
|
|
532
|
-
|
|
539
|
+
n();
|
|
533
540
|
});
|
|
534
541
|
}
|
|
535
|
-
|
|
542
|
+
function Je(e, r) {
|
|
543
|
+
const o = Xe(), t = X({
|
|
544
|
+
get() {
|
|
545
|
+
return o.hasView(e);
|
|
546
|
+
},
|
|
547
|
+
set(i) {
|
|
548
|
+
i ? o.addView(e) : o.delView(e);
|
|
549
|
+
}
|
|
550
|
+
}), n = (i) => {
|
|
551
|
+
t.value = !0;
|
|
552
|
+
};
|
|
553
|
+
return ce(() => {
|
|
554
|
+
C.on(e, n);
|
|
555
|
+
}), ie(() => {
|
|
556
|
+
C.off(e, n);
|
|
557
|
+
}), { open: t };
|
|
558
|
+
}
|
|
559
|
+
ye(
|
|
536
560
|
"global",
|
|
537
561
|
() => {
|
|
538
562
|
const e = O();
|
|
539
|
-
|
|
563
|
+
M(
|
|
540
564
|
e,
|
|
541
|
-
(
|
|
542
|
-
|
|
565
|
+
(n) => {
|
|
566
|
+
de().global.name.value = n ? "dark" : "light";
|
|
543
567
|
},
|
|
544
568
|
{
|
|
545
569
|
immediate: !0
|
|
@@ -563,60 +587,60 @@ ue(
|
|
|
563
587
|
}
|
|
564
588
|
);
|
|
565
589
|
require("js-cookie");
|
|
566
|
-
let
|
|
567
|
-
function
|
|
590
|
+
let ne = Date.now();
|
|
591
|
+
function pe() {
|
|
568
592
|
const e = Date.now();
|
|
569
|
-
return e -
|
|
593
|
+
return e - ne > 500 ? (ne = e, !0) : !1;
|
|
570
594
|
}
|
|
571
|
-
let
|
|
572
|
-
function
|
|
573
|
-
return ++
|
|
595
|
+
let Qe = 0;
|
|
596
|
+
function be() {
|
|
597
|
+
return ++Qe;
|
|
574
598
|
}
|
|
575
|
-
async function
|
|
576
|
-
if (!
|
|
599
|
+
async function Ze(e) {
|
|
600
|
+
if (!pe())
|
|
577
601
|
return;
|
|
578
602
|
let r = !1, o;
|
|
579
|
-
const t = (
|
|
580
|
-
o =
|
|
581
|
-
},
|
|
582
|
-
return
|
|
603
|
+
const t = (i) => {
|
|
604
|
+
o = i, r = !0;
|
|
605
|
+
}, n = be();
|
|
606
|
+
return C.on("confirmDlgResult" + n, t), C.emit("confirmDlg", { ...e, seq: n }), await he(() => r), C.off("confirmDlgResult" + n, t), o;
|
|
583
607
|
}
|
|
584
|
-
async function
|
|
585
|
-
if (!
|
|
608
|
+
async function Ke(e) {
|
|
609
|
+
if (!pe())
|
|
586
610
|
return;
|
|
587
611
|
let r = !1, o;
|
|
588
|
-
const t = (
|
|
589
|
-
o =
|
|
590
|
-
},
|
|
591
|
-
return
|
|
612
|
+
const t = (i) => {
|
|
613
|
+
o = i, r = !0;
|
|
614
|
+
}, n = be();
|
|
615
|
+
return C.on("promptDlgResult" + n, t), C.emit("promptDlg", { ...e, seq: n }), await he(() => r), C.off("promptDlgResult" + n, t), o;
|
|
592
616
|
}
|
|
593
617
|
require("js-cookie");
|
|
594
618
|
O("");
|
|
595
|
-
|
|
596
|
-
const o = await
|
|
619
|
+
ue.setConfirm(async (e, r) => {
|
|
620
|
+
const o = await Ze({
|
|
597
621
|
title: "",
|
|
598
622
|
text: e
|
|
599
623
|
});
|
|
600
624
|
r(!!o);
|
|
601
625
|
});
|
|
602
|
-
|
|
603
|
-
const t = await
|
|
626
|
+
ue.setPrompt(async (e, r, o) => {
|
|
627
|
+
const t = await Ke({
|
|
604
628
|
title: "",
|
|
605
629
|
value: r
|
|
606
630
|
});
|
|
607
631
|
o(t);
|
|
608
632
|
});
|
|
609
|
-
const
|
|
633
|
+
const et = (e, r) => {
|
|
610
634
|
const o = e[r];
|
|
611
|
-
return o ? typeof o == "function" ? o() : Promise.resolve(o) : new Promise((t,
|
|
612
|
-
(typeof queueMicrotask == "function" ? queueMicrotask : setTimeout)(
|
|
635
|
+
return o ? typeof o == "function" ? o() : Promise.resolve(o) : new Promise((t, n) => {
|
|
636
|
+
(typeof queueMicrotask == "function" ? queueMicrotask : setTimeout)(n.bind(null, new Error("Unknown variable dynamic import: " + r)));
|
|
613
637
|
});
|
|
614
638
|
};
|
|
615
|
-
async function
|
|
616
|
-
const r = await
|
|
617
|
-
|
|
639
|
+
async function ae(e) {
|
|
640
|
+
const r = await et(/* @__PURE__ */ Object.assign({ "./msg/en.ts": () => import("./en-DYxpcVy9.js"), "./msg/zhHans.ts": () => import("./zhHans-DjWw6Iqb.js") }), `./msg/${e}.ts`);
|
|
641
|
+
je(r);
|
|
618
642
|
}
|
|
619
|
-
|
|
643
|
+
B.Classic.blockStyles = {
|
|
620
644
|
color_blocks: {
|
|
621
645
|
colourPrimary: "#a5745b",
|
|
622
646
|
colourSecondary: "#ede3de",
|
|
@@ -690,7 +714,7 @@ R.Classic.blockStyles = {
|
|
|
690
714
|
hat: ""
|
|
691
715
|
}
|
|
692
716
|
};
|
|
693
|
-
|
|
717
|
+
B.Classic.categoryStyles = {
|
|
694
718
|
calc_category: {
|
|
695
719
|
colour: "#757575"
|
|
696
720
|
},
|
|
@@ -740,9 +764,9 @@ R.Classic.categoryStyles = {
|
|
|
740
764
|
colour: "#a55b80"
|
|
741
765
|
}
|
|
742
766
|
};
|
|
743
|
-
const
|
|
767
|
+
const tt = le.defineTheme("light", {
|
|
744
768
|
name: "light",
|
|
745
|
-
base:
|
|
769
|
+
base: B.Classic,
|
|
746
770
|
componentStyles: {
|
|
747
771
|
workspaceBackgroundColour: "#ffffff",
|
|
748
772
|
toolboxBackgroundColour: "#eeeeee",
|
|
@@ -756,9 +780,9 @@ const Fe = se.defineTheme("light", {
|
|
|
756
780
|
scrollbarOpacity: 0.4,
|
|
757
781
|
cursorColour: ""
|
|
758
782
|
}
|
|
759
|
-
}),
|
|
783
|
+
}), ot = le.defineTheme("dark", {
|
|
760
784
|
name: "dark",
|
|
761
|
-
base:
|
|
785
|
+
base: B.Classic,
|
|
762
786
|
componentStyles: {
|
|
763
787
|
workspaceBackgroundColour: "#1e1e1e",
|
|
764
788
|
toolboxBackgroundColour: "#272727",
|
|
@@ -773,158 +797,257 @@ const Fe = se.defineTheme("light", {
|
|
|
773
797
|
cursorColour: ""
|
|
774
798
|
}
|
|
775
799
|
});
|
|
776
|
-
function
|
|
777
|
-
const r =
|
|
800
|
+
function rt(e) {
|
|
801
|
+
const r = Re();
|
|
778
802
|
switch (console.log(r), e) {
|
|
779
803
|
case "light":
|
|
780
|
-
r.setTheme(
|
|
804
|
+
r.setTheme(tt);
|
|
781
805
|
break;
|
|
782
806
|
case "dark":
|
|
783
|
-
r.setTheme(
|
|
807
|
+
r.setTheme(ot);
|
|
784
808
|
break;
|
|
785
809
|
}
|
|
786
810
|
}
|
|
811
|
+
function nt(e, r) {
|
|
812
|
+
var n, i;
|
|
813
|
+
const o = r.value, t = {
|
|
814
|
+
passive: !((n = r.modifiers) != null && n.active)
|
|
815
|
+
};
|
|
816
|
+
window.addEventListener("resize", o, t), e._onResize = Object(e._onResize), e._onResize[r.instance.$.uid] = {
|
|
817
|
+
handler: o,
|
|
818
|
+
options: t
|
|
819
|
+
}, (i = r.modifiers) != null && i.quiet || o();
|
|
820
|
+
}
|
|
821
|
+
function at(e, r) {
|
|
822
|
+
var n;
|
|
823
|
+
if (!((n = e._onResize) != null && n[r.instance.$.uid]))
|
|
824
|
+
return;
|
|
825
|
+
const {
|
|
826
|
+
handler: o,
|
|
827
|
+
options: t
|
|
828
|
+
} = e._onResize[r.instance.$.uid];
|
|
829
|
+
window.removeEventListener("resize", o, t), delete e._onResize[r.instance.$.uid];
|
|
830
|
+
}
|
|
831
|
+
const st = {
|
|
832
|
+
mounted: nt,
|
|
833
|
+
unmounted: at
|
|
834
|
+
}, ct = { class: "position-relative w-100 h-100" }, it = /* @__PURE__ */ we({
|
|
835
|
+
__name: "index",
|
|
836
|
+
emits: ["ready", "change"],
|
|
837
|
+
setup(e, { emit: r }) {
|
|
838
|
+
const o = $e(), t = de(), { open: n } = Je("blocklyEditorFlyout"), i = r, h = O(null);
|
|
839
|
+
let l;
|
|
840
|
+
const m = {
|
|
841
|
+
grid: {
|
|
842
|
+
length: 2,
|
|
843
|
+
snap: !0,
|
|
844
|
+
spacing: 20
|
|
845
|
+
},
|
|
846
|
+
media: "https://cdn.z9os.com/lib/blockly/v10.4.2/media/",
|
|
847
|
+
move: {
|
|
848
|
+
drag: !0,
|
|
849
|
+
scrollbars: !0,
|
|
850
|
+
wheel: !0
|
|
851
|
+
},
|
|
852
|
+
theme: t.current.value.dark ? "dark" : "light",
|
|
853
|
+
trashcan: !1,
|
|
854
|
+
zoom: {
|
|
855
|
+
maxScale: 1,
|
|
856
|
+
minScale: 0.1,
|
|
857
|
+
scaleSpeed: 1.25,
|
|
858
|
+
startScale: 1,
|
|
859
|
+
wheel: !0
|
|
860
|
+
}
|
|
861
|
+
};
|
|
862
|
+
ce(async () => {
|
|
863
|
+
h.value && (await ae(o.current.value), l = Ie(h.value, m), l.addChangeListener(Ae.disableOrphans), l.addChangeListener(b), await U(), i("ready", l));
|
|
864
|
+
});
|
|
865
|
+
function y() {
|
|
866
|
+
l && Le(l);
|
|
867
|
+
}
|
|
868
|
+
function b(d) {
|
|
869
|
+
i("change", d);
|
|
870
|
+
}
|
|
871
|
+
ie(() => {
|
|
872
|
+
n.value = !1;
|
|
873
|
+
});
|
|
874
|
+
const p = new MutationObserver((d) => {
|
|
875
|
+
d.forEach((_) => {
|
|
876
|
+
if (_.type === "attributes" && _.attributeName === "style") {
|
|
877
|
+
const S = l.getFlyout();
|
|
878
|
+
n.value = (S == null ? void 0 : S.isVisible()) ?? !1;
|
|
879
|
+
}
|
|
880
|
+
});
|
|
881
|
+
}), g = document.querySelector("#blocklyEditor .blocklyFlyout");
|
|
882
|
+
return p.observe(g, { attributes: !0 }), M(n, (d) => {
|
|
883
|
+
var _;
|
|
884
|
+
d || (_ = l.getToolbox()) == null || _.clearSelection();
|
|
885
|
+
}), M(
|
|
886
|
+
() => o.current.value,
|
|
887
|
+
(d) => {
|
|
888
|
+
ae(d);
|
|
889
|
+
}
|
|
890
|
+
), M(
|
|
891
|
+
() => t.current.value.dark,
|
|
892
|
+
(d) => {
|
|
893
|
+
rt(d ? "dark" : "light");
|
|
894
|
+
}
|
|
895
|
+
), (d, _) => (De(), Ve("div", ct, [
|
|
896
|
+
xe(Me("div", {
|
|
897
|
+
class: "w-100 h-100",
|
|
898
|
+
ref_key: "blocklyDiv",
|
|
899
|
+
ref: h,
|
|
900
|
+
id: "blocklyEditor"
|
|
901
|
+
}, null, 512), [
|
|
902
|
+
[st, y]
|
|
903
|
+
])
|
|
904
|
+
]));
|
|
905
|
+
}
|
|
906
|
+
}), lt = (e) => {
|
|
907
|
+
e.component("x-blockly", it);
|
|
908
|
+
}, Lr = { install: lt };
|
|
787
909
|
export {
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
910
|
+
mt as ASTNode,
|
|
911
|
+
yt as BasicCursor,
|
|
912
|
+
ht as Block,
|
|
913
|
+
pt as BlockSvg,
|
|
914
|
+
bt as Blocks,
|
|
915
|
+
gt as COLLAPSED_FIELD_NAME,
|
|
916
|
+
_t as COLLAPSED_INPUT_NAME,
|
|
917
|
+
vt as COLLAPSE_CHARS,
|
|
918
|
+
Et as CodeGenerator,
|
|
919
|
+
kt as CollapsibleToolboxCategory,
|
|
920
|
+
Ot as ComponentManager,
|
|
921
|
+
Nt as Connection,
|
|
922
|
+
Ct as ConnectionChecker,
|
|
923
|
+
St as ConnectionDB,
|
|
924
|
+
Tt as ConnectionType,
|
|
925
|
+
Pt as ContextMenu,
|
|
926
|
+
wt as ContextMenuItems,
|
|
927
|
+
Dt as ContextMenuRegistry,
|
|
928
|
+
Vt as Css,
|
|
929
|
+
xt as Cursor,
|
|
930
|
+
Mt as DELETE_VARIABLE_ID,
|
|
931
|
+
At as DeleteArea,
|
|
932
|
+
Rt as DragTarget,
|
|
933
|
+
It as DropDownDiv,
|
|
934
|
+
Ae as Events,
|
|
935
|
+
jt as Extensions,
|
|
936
|
+
Lt as Field,
|
|
937
|
+
Bt as FieldCheckbox,
|
|
938
|
+
Ft as FieldDropdown,
|
|
939
|
+
$t as FieldImage,
|
|
940
|
+
zt as FieldLabel,
|
|
941
|
+
Ut as FieldLabelSerializable,
|
|
942
|
+
Wt as FieldNumber,
|
|
943
|
+
qt as FieldTextInput,
|
|
944
|
+
Gt as FieldVariable,
|
|
945
|
+
Ht as Flyout,
|
|
946
|
+
Xt as FlyoutButton,
|
|
947
|
+
Yt as FlyoutMetricsManager,
|
|
948
|
+
Jt as Generator,
|
|
949
|
+
Qt as Gesture,
|
|
950
|
+
Zt as Grid,
|
|
951
|
+
Kt as HorizontalFlyout,
|
|
952
|
+
eo as INPUT_VALUE,
|
|
953
|
+
to as Input,
|
|
954
|
+
oo as InsertionMarkerManager,
|
|
955
|
+
ro as InsertionMarkerPreviewer,
|
|
956
|
+
no as Marker,
|
|
957
|
+
ao as MarkerManager,
|
|
958
|
+
so as Menu,
|
|
959
|
+
co as MenuItem,
|
|
960
|
+
io as MetricsManager,
|
|
961
|
+
lo as Msg,
|
|
962
|
+
uo as NEXT_STATEMENT,
|
|
963
|
+
fo as Names,
|
|
964
|
+
mo as OPPOSITE_TYPE,
|
|
965
|
+
yo as OUTPUT_VALUE,
|
|
966
|
+
ho as Options,
|
|
967
|
+
po as PREVIOUS_STATEMENT,
|
|
968
|
+
bo as PROCEDURE_CATEGORY_NAME,
|
|
969
|
+
go as Procedures,
|
|
970
|
+
_o as RENAME_VARIABLE_ID,
|
|
971
|
+
vo as RenderedConnection,
|
|
972
|
+
Eo as Scrollbar,
|
|
973
|
+
ko as ScrollbarPair,
|
|
974
|
+
Oo as ShortcutItems,
|
|
975
|
+
No as ShortcutRegistry,
|
|
976
|
+
Co as TOOLBOX_AT_BOTTOM,
|
|
977
|
+
So as TOOLBOX_AT_LEFT,
|
|
978
|
+
To as TOOLBOX_AT_RIGHT,
|
|
979
|
+
Po as TOOLBOX_AT_TOP,
|
|
980
|
+
wo as TabNavigateCursor,
|
|
981
|
+
le as Theme,
|
|
982
|
+
Do as ThemeManager,
|
|
983
|
+
B as Themes,
|
|
984
|
+
Vo as Toolbox,
|
|
985
|
+
xo as ToolboxCategory,
|
|
986
|
+
Mo as ToolboxItem,
|
|
987
|
+
Ao as ToolboxSeparator,
|
|
988
|
+
Ro as Tooltip,
|
|
989
|
+
Io as Touch,
|
|
990
|
+
jo as Trashcan,
|
|
991
|
+
Lo as UnattachedFieldError,
|
|
992
|
+
Bo as VARIABLE_CATEGORY_NAME,
|
|
993
|
+
Fo as VARIABLE_DYNAMIC_CATEGORY_NAME,
|
|
994
|
+
$o as VERSION,
|
|
995
|
+
zo as VariableMap,
|
|
996
|
+
Uo as VariableModel,
|
|
997
|
+
Wo as Variables,
|
|
998
|
+
qo as VariablesDynamic,
|
|
999
|
+
Go as VerticalFlyout,
|
|
1000
|
+
Ho as WidgetDiv,
|
|
1001
|
+
Xo as Workspace,
|
|
1002
|
+
Yo as WorkspaceAudio,
|
|
1003
|
+
Jo as WorkspaceDragger,
|
|
1004
|
+
Qo as WorkspaceSvg,
|
|
1005
|
+
Zo as Xml,
|
|
1006
|
+
Ko as ZoomControls,
|
|
1007
|
+
er as blockAnimations,
|
|
1008
|
+
tr as blockRendering,
|
|
1009
|
+
or as browserEvents,
|
|
1010
|
+
rr as bubbles,
|
|
1011
|
+
nr as bumpObjects,
|
|
1012
|
+
ar as clipboard,
|
|
1013
|
+
sr as comments,
|
|
1014
|
+
cr as common,
|
|
1015
|
+
ir as config,
|
|
1016
|
+
lr as constants,
|
|
1017
|
+
Lr as default,
|
|
1018
|
+
ur as defineBlocksWithJsonArray,
|
|
1019
|
+
ue as dialog,
|
|
1020
|
+
dr as dragging,
|
|
1021
|
+
fr as fieldRegistry,
|
|
1022
|
+
mr as geras,
|
|
1023
|
+
Re as getMainWorkspace,
|
|
1024
|
+
yr as getSelected,
|
|
1025
|
+
hr as hasBubble,
|
|
1026
|
+
pr as hideChaff,
|
|
1027
|
+
br as icons,
|
|
1028
|
+
Ie as inject,
|
|
1029
|
+
gr as inputs,
|
|
1030
|
+
_r as isCopyable,
|
|
1031
|
+
vr as isDeletable,
|
|
1032
|
+
Er as isDraggable,
|
|
1033
|
+
kr as isIcon,
|
|
1034
|
+
Or as isObservable,
|
|
1035
|
+
Nr as isPaster,
|
|
1036
|
+
Cr as isRenderedElement,
|
|
1037
|
+
Sr as isSelectable,
|
|
1038
|
+
Tr as isSerializable,
|
|
1039
|
+
Pr as isVariableBackedParameterModel,
|
|
1040
|
+
wr as procedures,
|
|
1041
|
+
Dr as registry,
|
|
1042
|
+
Vr as renderManagement,
|
|
1043
|
+
xr as serialization,
|
|
1044
|
+
je as setLocale,
|
|
1045
|
+
ae as setLocaleAsync,
|
|
1046
|
+
Mr as setParentContainer,
|
|
1047
|
+
rt as setTheme,
|
|
1048
|
+
Le as svgResize,
|
|
1049
|
+
Ar as thrasos,
|
|
1050
|
+
Rr as uiPosition,
|
|
1051
|
+
Ir as utils,
|
|
1052
|
+
jr as zelos
|
|
930
1053
|
};
|