@wisemen/vue-core-custom-views 0.1.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.
Files changed (35) hide show
  1. package/LICENSE.md +59 -0
  2. package/dist/actions/customViewCreateView.action.d.ts +1 -0
  3. package/dist/actions/customViewDeleteView.action.d.ts +1 -0
  4. package/dist/actions/customViewEditView.action.d.ts +1 -0
  5. package/dist/actions/customViewSaveToCurrentView.action.d.ts +1 -0
  6. package/dist/adapters/state/customViewFilterStateAdapter.d.ts +2 -0
  7. package/dist/adapters/state/customViewSearchStateAdapter.d.ts +2 -0
  8. package/dist/adapters/state/customViewTableColumnsStateAdapter.d.ts +2 -0
  9. package/dist/adapters/storage/customViewLocalStorageAdapter.d.ts +2 -0
  10. package/dist/components/CustomViewColorPicker.d.ts +7 -0
  11. package/dist/components/CustomViewCreateDialog.d.ts +7 -0
  12. package/dist/components/CustomViewIconPicker.d.ts +7 -0
  13. package/dist/components/CustomViewUpdateDialog.d.ts +10 -0
  14. package/dist/components/views/CustomViewViews.d.ts +2 -0
  15. package/dist/components/views/CustomViewViewsItem.d.ts +12 -0
  16. package/dist/composables/context.composable.d.ts +8 -0
  17. package/dist/composables/customViewManager.composable.d.ts +22 -0
  18. package/dist/context/customViewManager.context.d.ts +5 -0
  19. package/dist/index.cjs +1 -0
  20. package/dist/index.d.ts +18 -0
  21. package/dist/index.js +2063 -0
  22. package/dist/locales/en-US.json.d.ts +27 -0
  23. package/dist/locales/nl-BE.json.d.ts +27 -0
  24. package/dist/locales.cjs +1 -0
  25. package/dist/locales.d.ts +50 -0
  26. package/dist/locales.js +54 -0
  27. package/dist/style.css +2 -0
  28. package/dist/types/customView.type.d.ts +20 -0
  29. package/dist/types/customViewColor.type.d.ts +10 -0
  30. package/dist/types/customViewIcon.type.d.ts +38 -0
  31. package/dist/types/customViewStateAdapter.type.d.ts +13 -0
  32. package/dist/types/customViewStorageAdapter.type.d.ts +5 -0
  33. package/dist/utils/customViewColor.util.d.ts +3 -0
  34. package/dist/utils/customViewIcon.util.d.ts +4 -0
  35. package/package.json +103 -0
package/dist/index.js ADDED
@@ -0,0 +1,2063 @@
1
+ import { Temporal as e } from "temporal-polyfill";
2
+ import { useLocalStorage as t } from "@vueuse/core";
3
+ import { Fragment as n, computed as r, createBlock as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, createVNode as c, defineComponent as l, getCurrentInstance as u, h as d, inject as f, isRef as p, mergeProps as m, nextTick as h, normalizeClass as g, normalizeStyle as _, onMounted as v, onUnmounted as y, openBlock as b, provide as x, reactive as S, ref as ee, renderList as C, resolveDynamicComponent as w, shallowRef as te, toDisplayString as ne, toRefs as re, unref as T, watch as ie, withCtx as E } from "vue";
4
+ import { UIActionContextMenu as ae, UIActionDropdownMenu as oe, UIActionTooltip as se, UIButton as ce, UIClickableElement as le, UIConfirmDialog as ue, UIDialogBody as de, UIDialogFooter as fe, UIDialogFooterCancel as pe, UIDialogFooterSubmit as me, UIDialogHeader as he, UIFormDialog as ge, UIFormLayout as _e, UIIconButton as ve, UIInputWrapper as ye, UIPopover as be, UIRowLayout as xe, UISeparator as Se, UITextField as Ce, toFormField as we, useOverlay as Te } from "@wisemen/vue-core-design-system";
5
+ import { ActivityIcon as Ee, AlertTriangleIcon as De, BookmarkAddIcon as Oe, BookmarkCheckIcon as ke, BookmarkIcon as Ae, CalendarIcon as je, CheckCircleIcon as Me, CheckIcon as Ne, CheckSquareIcon as Pe, ChevronDownIcon as Fe, ClockIcon as Ie, ClockRewindIcon as Le, Cube01Icon as Re, Database01Icon as ze, Edit01Icon as Be, Flag01Icon as Ve, HeartIcon as He, Home01Icon as Ue, Hourglass01Icon as We, InfoSquareIcon as Ge, LayersTwo01Icon as Ke, Link04Icon as qe, Lock01Icon as Je, LockUnlocked01Icon as Ye, MagicWand01Icon as Xe, Mail01Icon as Ze, Mail04Icon as Qe, MarkerPin01Icon as $e, Pin01Icon as et, PlaceholderIcon as tt, PlaneIcon as nt, RouteIcon as rt, Star01Icon as it, Stars01Icon as at, Trash01Icon as ot, TrendDown01Icon as st, TrendUp01Icon as ct, User01Icon as lt, ZapIcon as ut } from "@wisemen/vue-core-icons";
6
+ import { RadioGroupIndicator as dt, RadioGroupItem as ft, RadioGroupRoot as pt, useId as mt } from "reka-ui";
7
+ import { useI18n as D } from "vue-i18n";
8
+ import { useForm as ht } from "formango";
9
+ import gt from "zod";
10
+ import { GroupPriority as _t, createAction as vt } from "@wisemen/vue-core-actions";
11
+ import { useHotkey as yt } from "@tanstack/vue-hotkeys";
12
+ import { useRouteQuery as bt } from "@vueuse/router";
13
+ import { StringUtil as xt, assert as St } from "@wisemen/vue-core-utils";
14
+ //#region src/types/customViewStateAdapter.type.ts
15
+ function Ct(e) {
16
+ return e;
17
+ }
18
+ //#endregion
19
+ //#region src/adapters/state/customViewFilterStateAdapter.ts
20
+ function wt(e) {
21
+ return typeof e != "object" || !e ? !1 : "from" in e && "until" in e;
22
+ }
23
+ function Tt(e) {
24
+ return wt(e) ? {
25
+ from: e.from?.toString() ?? null,
26
+ until: e.until?.toString() ?? null
27
+ } : e;
28
+ }
29
+ function Et(t) {
30
+ return wt(t) ? {
31
+ from: typeof t.from == "string" ? e.PlainDate.from(t.from) : null,
32
+ until: typeof t.until == "string" ? e.PlainDate.from(t.until) : null
33
+ } : t;
34
+ }
35
+ function Dt(e) {
36
+ return Object.fromEntries(Object.entries(e).map(([e, t]) => [e, Tt(t)]));
37
+ }
38
+ function Ot(e, t) {
39
+ return Ct({
40
+ isDirty: (e, n) => {
41
+ let r = Dt(e ?? t), i = Dt(n);
42
+ return Object.keys(r).some((e) => JSON.stringify(i[e]) !== JSON.stringify(r[e]));
43
+ },
44
+ apply: (n) => {
45
+ e.values.value = {
46
+ ...t,
47
+ ...n
48
+ };
49
+ },
50
+ deserialize: (e) => Object.fromEntries(Object.entries(e).map(([e, t]) => [e, Et(t)])),
51
+ getCurrentState: () => e.values.value,
52
+ getDefaultState: () => ({ ...t }),
53
+ key: "filters",
54
+ serialize: (e) => Dt(e)
55
+ });
56
+ }
57
+ //#endregion
58
+ //#region src/adapters/state/customViewSearchStateAdapter.ts
59
+ function kt(e) {
60
+ return Ct({
61
+ isDirty: (e, t) => (e ?? "").trim() !== t.trim(),
62
+ apply: (t) => e.updateSearch(t ?? "", !0),
63
+ deserialize: (e) => e,
64
+ getCurrentState: () => e.search.value,
65
+ getDefaultState: () => "",
66
+ key: "search",
67
+ serialize: (e) => e
68
+ });
69
+ }
70
+ //#endregion
71
+ //#region src/adapters/state/customViewTableColumnsStateAdapter.ts
72
+ function At(e) {
73
+ let t = e.customizedColumns.value.map((e) => e.key);
74
+ return Ct({
75
+ isDirty: (e, n) => JSON.stringify(e ?? t) !== JSON.stringify(n),
76
+ apply: (n) => {
77
+ e.setState(n ?? t);
78
+ },
79
+ deserialize: (e) => [...e],
80
+ getCurrentState: () => e.customizedColumns.value.map((e) => e.key),
81
+ getDefaultState: () => t,
82
+ key: "columns",
83
+ serialize: (e) => e
84
+ });
85
+ }
86
+ //#endregion
87
+ //#region src/adapters/storage/customViewLocalStorageAdapter.ts
88
+ function jt(e) {
89
+ let n = t(e, [], { deep: !0 });
90
+ return {
91
+ load: () => {
92
+ try {
93
+ return n.value ?? [];
94
+ } catch {
95
+ return [];
96
+ }
97
+ },
98
+ save: (e) => {
99
+ n.value = e;
100
+ }
101
+ };
102
+ }
103
+ //#endregion
104
+ //#region src/types/customViewColor.type.ts
105
+ var O = {
106
+ CYAN: "cyan",
107
+ DEFAULT: "default",
108
+ GREEN: "green",
109
+ PINK: "pink",
110
+ PURPLE: "purple",
111
+ RED: "red",
112
+ YELLOW: "yellow"
113
+ }, Mt = new Map([
114
+ [O.DEFAULT, "var(--fg-secondary)"],
115
+ [O.PURPLE, "oklch(0.44 0.17 287)"],
116
+ [O.CYAN, "oklch(0.71 0.12 213)"],
117
+ [O.GREEN, "oklch(0.70 0.13 159)"],
118
+ [O.YELLOW, "oklch(0.82 0.18 91)"],
119
+ [O.PINK, "oklch(0.87 0.05 22)"],
120
+ [O.RED, "oklch(0.58 0.19 25)"]
121
+ ]);
122
+ function Nt(e) {
123
+ return Mt.get(e) ?? "var(--fg-secondary)";
124
+ }
125
+ //#endregion
126
+ //#region src/components/CustomViewColorPicker.vue
127
+ var Pt = /* @__PURE__ */ l({
128
+ __name: "CustomViewColorPicker",
129
+ props: { field: {} },
130
+ setup(e) {
131
+ let t = e, r = D(), a = mt();
132
+ return (s, l) => (b(), i(T(ye), {
133
+ for: T(a),
134
+ label: T(r).t("component.custom_view_color_picker.label")
135
+ }, {
136
+ default: E(() => [c(T(pt), {
137
+ id: T(a),
138
+ "model-value": t.field.value.value,
139
+ "onUpdate:modelValue": l[0] ||= (t) => e.field.setValue(t)
140
+ }, {
141
+ default: E(() => [c(T(xe), { class: "flex-wrap" }, {
142
+ default: E(() => [(b(!0), o(n, null, C(T(Mt), ([e]) => (b(), i(T(le), { key: e }, {
143
+ default: E(() => [c(T(ft), {
144
+ value: e,
145
+ style: _({ backgroundColor: T(Nt)(e) }),
146
+ class: "flex size-6.5 items-center justify-center rounded-md! ring-offset-1"
147
+ }, {
148
+ default: E(() => [c(T(dt), null, {
149
+ default: E(() => [c(T(Ne), { class: "size-4 text-white dark:text-black" })]),
150
+ _: 1
151
+ })]),
152
+ _: 1
153
+ }, 8, ["value", "style"])]),
154
+ _: 2
155
+ }, 1024))), 128))]),
156
+ _: 1
157
+ })]),
158
+ _: 1
159
+ }, 8, ["id", "model-value"])]),
160
+ _: 1
161
+ }, 8, ["for", "label"]));
162
+ }
163
+ }), k = {
164
+ ACTIVITY: "activity",
165
+ ALERT_TRIANGLE: "alertTriangle",
166
+ BOOKMARK: "bookmark",
167
+ CALENDAR: "calendar",
168
+ CHECK_CIRCLE: "checkCircle",
169
+ CHECK_SQUARE: "checkSquare",
170
+ CLOCK: "clock",
171
+ CLOCK_REWIND: "clockRewind",
172
+ CUBE: "cube",
173
+ DATABASE: "database",
174
+ EDIT: "edit",
175
+ FLAG: "flag",
176
+ HEART: "heart",
177
+ HOME: "home",
178
+ HOURGLASS: "hourglass",
179
+ INFO_SQUARE: "infoSquare",
180
+ LAYERS: "layers",
181
+ LINK_04: "link04",
182
+ LOCK: "lock",
183
+ MAGIC_WAND: "magicWand",
184
+ MAIL_01: "mail01",
185
+ MAIL_04: "mail04",
186
+ MARKER_PIN: "markerPin",
187
+ PIN: "pin",
188
+ PLACEHOLDER: "placeholder",
189
+ PLANE: "plane",
190
+ ROUTE: "route",
191
+ STAR: "star",
192
+ STARS: "stars",
193
+ TRASH: "trash",
194
+ TREND_DOWN: "trendDown",
195
+ TREND_UP: "trendUp",
196
+ UNLOCK: "unlock",
197
+ USER: "user",
198
+ ZAP: "zap"
199
+ }, Ft = new Map([
200
+ [k.LAYERS, Ke],
201
+ [k.ACTIVITY, Ee],
202
+ [k.ALERT_TRIANGLE, De],
203
+ [k.BOOKMARK, Ae],
204
+ [k.CALENDAR, je],
205
+ [k.CHECK_CIRCLE, Me],
206
+ [k.CHECK_SQUARE, Pe],
207
+ [k.CLOCK, Ie],
208
+ [k.CLOCK_REWIND, Le],
209
+ [k.CUBE, Re],
210
+ [k.DATABASE, ze],
211
+ [k.EDIT, Be],
212
+ [k.FLAG, Ve],
213
+ [k.HEART, He],
214
+ [k.HOME, Ue],
215
+ [k.HOURGLASS, We],
216
+ [k.INFO_SQUARE, Ge],
217
+ [k.LINK_04, qe],
218
+ [k.LOCK, Je],
219
+ [k.MAGIC_WAND, Xe],
220
+ [k.MAIL_01, Ze],
221
+ [k.MAIL_04, Qe],
222
+ [k.MARKER_PIN, $e],
223
+ [k.UNLOCK, Ye],
224
+ [k.PLANE, nt],
225
+ [k.PIN, et],
226
+ [k.PLACEHOLDER, tt],
227
+ [k.ROUTE, rt],
228
+ [k.STAR, it],
229
+ [k.STARS, at],
230
+ [k.TRASH, ot],
231
+ [k.TREND_DOWN, st],
232
+ [k.TREND_UP, ct],
233
+ [k.USER, lt],
234
+ [k.ZAP, ut]
235
+ ]);
236
+ function It(e) {
237
+ return Ft.get(e) ?? Ke;
238
+ }
239
+ //#endregion
240
+ //#region src/components/CustomViewIconPicker.vue?vue&type=script&setup=true&lang.ts
241
+ var Lt = { class: "p-sm" }, Rt = { class: "grid grid-cols-8 gap-xxs" }, zt = ["onClick"], Bt = /* @__PURE__ */ l({
242
+ __name: "CustomViewIconPicker",
243
+ props: { field: {} },
244
+ setup(e) {
245
+ let t = e, r = D(), a = ee(!1);
246
+ function l(e) {
247
+ t.field.setValue(e), a.value = !1;
248
+ }
249
+ return (e, u) => (b(), i(T(be), {
250
+ "is-open": a.value,
251
+ "onUpdate:isOpen": u[0] ||= (e) => a.value = e,
252
+ "popover-side-offset": 4,
253
+ "popover-align": "start",
254
+ "popover-side": "bottom"
255
+ }, {
256
+ trigger: E(() => [c(T(ye), { label: T(r).t("component.custom_view_icon_picker.label") }, {
257
+ default: E(() => [c(T(ve), {
258
+ icon: T(It)(t.field.value.value),
259
+ "is-tooltip-disabled": !0,
260
+ label: T(r).t("component.custom_view_icon_picker.view_icon_label"),
261
+ variant: "secondary"
262
+ }, null, 8, ["icon", "label"])]),
263
+ _: 1
264
+ }, 8, ["label"])]),
265
+ content: E(() => [s("div", Lt, [s("ul", Rt, [(b(!0), o(n, null, C(T(Ft), ([e, n]) => (b(), o("li", { key: e }, [c(T(le), null, {
266
+ default: E(() => [s("button", {
267
+ class: g([{
268
+ "bg-tertiary": e === t.field.value.value,
269
+ "hover:bg-secondary": e !== t.field.value.value
270
+ }, "p-md"]),
271
+ type: "button",
272
+ onClick: (t) => l(e)
273
+ }, [(b(), i(w(n), { class: "size-4 text-tertiary" }))], 10, zt)]),
274
+ _: 2
275
+ }, 1024)]))), 128))])])]),
276
+ _: 1
277
+ }, 8, ["is-open"]));
278
+ }
279
+ }), Vt = /* @__PURE__ */ l({
280
+ __name: "CustomViewCreateDialog",
281
+ emits: ["save"],
282
+ setup(e, { emit: t }) {
283
+ let n = t, r = D(), a = ht({
284
+ schema: gt.object({
285
+ name: gt.string().min(1).max(20),
286
+ color: gt.enum(O),
287
+ icon: gt.enum(k)
288
+ }),
289
+ onSubmit: (e) => {
290
+ n("save", e);
291
+ }
292
+ }), o = a.register("name", "Untitled"), s = a.register("icon", k.LAYERS), l = a.register("color", O.DEFAULT);
293
+ return (e, t) => (b(), i(T(ge), {
294
+ form: T(a),
295
+ size: "xs"
296
+ }, {
297
+ default: E(() => [
298
+ c(T(he), {
299
+ title: T(r).t("component.custom_view_create_dialog.title"),
300
+ description: T(r).t("component.custom_view_create_dialog.description"),
301
+ "hide-description": !0
302
+ }, null, 8, ["title", "description"]),
303
+ c(T(de), null, {
304
+ default: E(() => [c(T(_e), null, {
305
+ default: E(() => [c(T(Ce), m(T(we)(T(o)), {
306
+ "is-required": !0,
307
+ placeholder: T(r).t("component.custom_view_create_dialog.name_placeholder"),
308
+ label: T(r).t("component.custom_view_create_dialog.name_label")
309
+ }), null, 16, ["placeholder", "label"]), c(T(xe), { gap: "2xl" }, {
310
+ default: E(() => [c(Bt, { field: T(s) }, null, 8, ["field"]), c(Pt, { field: T(l) }, null, 8, ["field"])]),
311
+ _: 1
312
+ })]),
313
+ _: 1
314
+ })]),
315
+ _: 1
316
+ }),
317
+ c(T(fe), null, {
318
+ default: E(() => [c(T(pe)), c(T(me), { label: T(r).t("component.custom_view_create_dialog.submit") }, null, 8, ["label"])]),
319
+ _: 1
320
+ })
321
+ ]),
322
+ _: 1
323
+ }, 8, ["form"]));
324
+ }
325
+ }), Ht = /* @__PURE__ */ l({
326
+ __name: "CustomViewUpdateDialog",
327
+ props: { view: {} },
328
+ emits: ["save"],
329
+ setup(e, { emit: t }) {
330
+ let n = e, r = t, a = ht({
331
+ initialState: () => ({
332
+ ...n.view,
333
+ icon: n.view.icon ?? k.ACTIVITY
334
+ }),
335
+ schema: gt.object({
336
+ name: gt.string().min(1).max(20),
337
+ color: gt.enum(O),
338
+ icon: gt.enum(k)
339
+ }),
340
+ onSubmit: (e) => {
341
+ r("save", e);
342
+ }
343
+ }), o = D(), s = a.register("name"), l = a.register("icon", k.ACTIVITY), u = a.register("color");
344
+ return (e, t) => (b(), i(T(ge), {
345
+ form: T(a),
346
+ size: "xs"
347
+ }, {
348
+ default: E(() => [
349
+ c(T(he), {
350
+ "hide-description": !0,
351
+ title: T(o).t("component.custom_view_update_dialog.title"),
352
+ description: T(o).t("component.custom_view_update_dialog.description")
353
+ }, null, 8, ["title", "description"]),
354
+ c(T(de), null, {
355
+ default: E(() => [c(T(_e), null, {
356
+ default: E(() => [c(T(Ce), m(T(we)(T(s)), {
357
+ "is-required": !0,
358
+ placeholder: T(o).t("component.custom_view_update_dialog.name_placeholder"),
359
+ label: T(o).t("component.custom_view_update_dialog.name_label")
360
+ }), null, 16, ["placeholder", "label"]), c(T(xe), { gap: "2xl" }, {
361
+ default: E(() => [c(Bt, { field: T(l) }, null, 8, ["field"]), c(Pt, { field: T(u) }, null, 8, ["field"])]),
362
+ _: 1
363
+ })]),
364
+ _: 1
365
+ })]),
366
+ _: 1
367
+ }),
368
+ c(T(fe), null, {
369
+ default: E(() => [c(T(pe)), c(T(me), { label: T(o).t("component.custom_view_update_dialog.submit") }, null, 8, ["label"])]),
370
+ _: 1
371
+ })
372
+ ]),
373
+ _: 1
374
+ }, 8, ["form"]));
375
+ }
376
+ }), Ut = Object.defineProperty, Wt = Object.getOwnPropertySymbols, Gt = Object.prototype.hasOwnProperty, Kt = Object.prototype.propertyIsEnumerable, qt = (e, t, n) => t in e ? Ut(e, t, {
377
+ enumerable: !0,
378
+ configurable: !0,
379
+ writable: !0,
380
+ value: n
381
+ }) : e[t] = n, Jt = (e, t) => {
382
+ for (var n in t ||= {}) Gt.call(t, n) && qt(e, n, t[n]);
383
+ if (Wt) for (var n of Wt(t)) Kt.call(t, n) && qt(e, n, t[n]);
384
+ return e;
385
+ }, Yt = (e, t) => {
386
+ var n = {};
387
+ for (var r in e) Gt.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
388
+ if (e != null && Wt) for (var r of Wt(e)) t.indexOf(r) < 0 && Kt.call(e, r) && (n[r] = e[r]);
389
+ return n;
390
+ }, Xt = "[vue-draggable-plus]: ";
391
+ function Zt(e) {
392
+ console.warn(Xt + e);
393
+ }
394
+ function Qt(e) {
395
+ console.error(Xt + e);
396
+ }
397
+ function $t(e, t, n) {
398
+ return n >= 0 && n < e.length && e.splice(n, 0, e.splice(t, 1)[0]), e;
399
+ }
400
+ function en(e) {
401
+ return e.replace(/-(\w)/g, (e, t) => t ? t.toUpperCase() : "");
402
+ }
403
+ function tn(e) {
404
+ return Object.keys(e).reduce((t, n) => (e[n] !== void 0 && (t[en(n)] = e[n]), t), {});
405
+ }
406
+ function nn(e, t) {
407
+ return Array.isArray(e) && e.splice(t, 1), e;
408
+ }
409
+ function rn(e, t, n) {
410
+ return Array.isArray(e) && e.splice(t, 0, n), e;
411
+ }
412
+ function an(e) {
413
+ return e === void 0;
414
+ }
415
+ function on(e) {
416
+ return typeof e == "string";
417
+ }
418
+ function sn(e, t, n) {
419
+ let r = e.children[n];
420
+ e.insertBefore(t, r);
421
+ }
422
+ function cn(e) {
423
+ e.parentNode && e.parentNode.removeChild(e);
424
+ }
425
+ function ln(e, t = document) {
426
+ let n = null;
427
+ return n = typeof t?.querySelector == "function" ? (t?.querySelector)?.call(t, e) : document.querySelector(e), n || Zt(`Element not found: ${e}`), n;
428
+ }
429
+ function un(e, t, n = null) {
430
+ return function(...r) {
431
+ return e.apply(n, r), t.apply(n, r);
432
+ };
433
+ }
434
+ function dn(e, t) {
435
+ let n = Jt({}, e);
436
+ return Object.keys(t).forEach((r) => {
437
+ n[r] ? n[r] = un(e[r], t[r]) : n[r] = t[r];
438
+ }), n;
439
+ }
440
+ function fn(e) {
441
+ return e instanceof HTMLElement;
442
+ }
443
+ function pn(e, t) {
444
+ Object.keys(e).forEach((n) => {
445
+ t(n, e[n]);
446
+ });
447
+ }
448
+ function mn(e) {
449
+ return e.charCodeAt(0) === 111 && e.charCodeAt(1) === 110 && (e.charCodeAt(2) > 122 || e.charCodeAt(2) < 97);
450
+ }
451
+ var hn = Object.assign;
452
+ function gn(e, t) {
453
+ var n = Object.keys(e);
454
+ if (Object.getOwnPropertySymbols) {
455
+ var r = Object.getOwnPropertySymbols(e);
456
+ t && (r = r.filter(function(t) {
457
+ return Object.getOwnPropertyDescriptor(e, t).enumerable;
458
+ })), n.push.apply(n, r);
459
+ }
460
+ return n;
461
+ }
462
+ function A(e) {
463
+ for (var t = 1; t < arguments.length; t++) {
464
+ var n = arguments[t] == null ? {} : arguments[t];
465
+ t % 2 ? gn(Object(n), !0).forEach(function(t) {
466
+ vn(e, t, n[t]);
467
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : gn(Object(n)).forEach(function(t) {
468
+ Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
469
+ });
470
+ }
471
+ return e;
472
+ }
473
+ function _n(e) {
474
+ "@babel/helpers - typeof";
475
+ return _n = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
476
+ return typeof e;
477
+ } : function(e) {
478
+ return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
479
+ }, _n(e);
480
+ }
481
+ function vn(e, t, n) {
482
+ return t in e ? Object.defineProperty(e, t, {
483
+ value: n,
484
+ enumerable: !0,
485
+ configurable: !0,
486
+ writable: !0
487
+ }) : e[t] = n, e;
488
+ }
489
+ function j() {
490
+ return j = Object.assign || function(e) {
491
+ for (var t = 1; t < arguments.length; t++) {
492
+ var n = arguments[t];
493
+ for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
494
+ }
495
+ return e;
496
+ }, j.apply(this, arguments);
497
+ }
498
+ function yn(e, t) {
499
+ if (e == null) return {};
500
+ var n = {}, r = Object.keys(e), i, a;
501
+ for (a = 0; a < r.length; a++) i = r[a], !(t.indexOf(i) >= 0) && (n[i] = e[i]);
502
+ return n;
503
+ }
504
+ function bn(e, t) {
505
+ if (e == null) return {};
506
+ var n = yn(e, t), r, i;
507
+ if (Object.getOwnPropertySymbols) {
508
+ var a = Object.getOwnPropertySymbols(e);
509
+ for (i = 0; i < a.length; i++) r = a[i], !(t.indexOf(r) >= 0) && Object.prototype.propertyIsEnumerable.call(e, r) && (n[r] = e[r]);
510
+ }
511
+ return n;
512
+ }
513
+ var xn = "1.15.2";
514
+ function Sn(e) {
515
+ if (typeof window < "u" && window.navigator) return !!/* @__PURE__ */ navigator.userAgent.match(e);
516
+ }
517
+ var Cn = Sn(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i), wn = Sn(/Edge/i), Tn = Sn(/firefox/i), En = Sn(/safari/i) && !Sn(/chrome/i) && !Sn(/android/i), Dn = Sn(/iP(ad|od|hone)/i), On = Sn(/chrome/i) && Sn(/android/i), kn = {
518
+ capture: !1,
519
+ passive: !1
520
+ };
521
+ function M(e, t, n) {
522
+ e.addEventListener(t, n, !Cn && kn);
523
+ }
524
+ function N(e, t, n) {
525
+ e.removeEventListener(t, n, !Cn && kn);
526
+ }
527
+ function An(e, t) {
528
+ if (t) {
529
+ if (t[0] === ">" && (t = t.substring(1)), e) try {
530
+ if (e.matches) return e.matches(t);
531
+ if (e.msMatchesSelector) return e.msMatchesSelector(t);
532
+ if (e.webkitMatchesSelector) return e.webkitMatchesSelector(t);
533
+ } catch {
534
+ return !1;
535
+ }
536
+ return !1;
537
+ }
538
+ }
539
+ function jn(e) {
540
+ return e.host && e !== document && e.host.nodeType ? e.host : e.parentNode;
541
+ }
542
+ function P(e, t, n, r) {
543
+ if (e) {
544
+ n ||= document;
545
+ do {
546
+ if (t != null && (t[0] === ">" ? e.parentNode === n && An(e, t) : An(e, t)) || r && e === n) return e;
547
+ if (e === n) break;
548
+ } while (e = jn(e));
549
+ }
550
+ return null;
551
+ }
552
+ var Mn = /\s+/g;
553
+ function F(e, t, n) {
554
+ e && t && (e.classList ? e.classList[n ? "add" : "remove"](t) : e.className = ((" " + e.className + " ").replace(Mn, " ").replace(" " + t + " ", " ") + (n ? " " + t : "")).replace(Mn, " "));
555
+ }
556
+ function I(e, t, n) {
557
+ var r = e && e.style;
558
+ if (r) {
559
+ if (n === void 0) return document.defaultView && document.defaultView.getComputedStyle ? n = document.defaultView.getComputedStyle(e, "") : e.currentStyle && (n = e.currentStyle), t === void 0 ? n : n[t];
560
+ !(t in r) && t.indexOf("webkit") === -1 && (t = "-webkit-" + t), r[t] = n + (typeof n == "string" ? "" : "px");
561
+ }
562
+ }
563
+ function Nn(e, t) {
564
+ var n = "";
565
+ if (typeof e == "string") n = e;
566
+ else do {
567
+ var r = I(e, "transform");
568
+ r && r !== "none" && (n = r + " " + n);
569
+ } while (!t && (e = e.parentNode));
570
+ var i = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;
571
+ return i && new i(n);
572
+ }
573
+ function Pn(e, t, n) {
574
+ if (e) {
575
+ var r = e.getElementsByTagName(t), i = 0, a = r.length;
576
+ if (n) for (; i < a; i++) n(r[i], i);
577
+ return r;
578
+ }
579
+ return [];
580
+ }
581
+ function L() {
582
+ return document.scrollingElement || document.documentElement;
583
+ }
584
+ function R(e, t, n, r, i) {
585
+ if (!(!e.getBoundingClientRect && e !== window)) {
586
+ var a, o, s, c, l, u, d;
587
+ if (e !== window && e.parentNode && e !== L() ? (a = e.getBoundingClientRect(), o = a.top, s = a.left, c = a.bottom, l = a.right, u = a.height, d = a.width) : (o = 0, s = 0, c = window.innerHeight, l = window.innerWidth, u = window.innerHeight, d = window.innerWidth), (t || n) && e !== window && (i ||= e.parentNode, !Cn)) do
588
+ if (i && i.getBoundingClientRect && (I(i, "transform") !== "none" || n && I(i, "position") !== "static")) {
589
+ var f = i.getBoundingClientRect();
590
+ o -= f.top + parseInt(I(i, "border-top-width")), s -= f.left + parseInt(I(i, "border-left-width")), c = o + a.height, l = s + a.width;
591
+ break;
592
+ }
593
+ while (i = i.parentNode);
594
+ if (r && e !== window) {
595
+ var p = Nn(i || e), m = p && p.a, h = p && p.d;
596
+ p && (o /= h, s /= m, d /= m, u /= h, c = o + u, l = s + d);
597
+ }
598
+ return {
599
+ top: o,
600
+ left: s,
601
+ bottom: c,
602
+ right: l,
603
+ width: d,
604
+ height: u
605
+ };
606
+ }
607
+ }
608
+ function Fn(e, t, n) {
609
+ for (var r = Bn(e, !0), i = R(e)[t]; r;) {
610
+ var a = R(r)[n], o = void 0;
611
+ if (o = i >= a, !o) return r;
612
+ if (r === L()) break;
613
+ r = Bn(r, !1);
614
+ }
615
+ return !1;
616
+ }
617
+ function In(e, t, n, r) {
618
+ for (var i = 0, a = 0, o = e.children; a < o.length;) {
619
+ if (o[a].style.display !== "none" && o[a] !== Q.ghost && (r || o[a] !== Q.dragged) && P(o[a], n.draggable, e, !1)) {
620
+ if (i === t) return o[a];
621
+ i++;
622
+ }
623
+ a++;
624
+ }
625
+ return null;
626
+ }
627
+ function Ln(e, t) {
628
+ for (var n = e.lastElementChild; n && (n === Q.ghost || I(n, "display") === "none" || t && !An(n, t));) n = n.previousElementSibling;
629
+ return n || null;
630
+ }
631
+ function z(e, t) {
632
+ var n = 0;
633
+ if (!e || !e.parentNode) return -1;
634
+ for (; e = e.previousElementSibling;) e.nodeName.toUpperCase() !== "TEMPLATE" && e !== Q.clone && (!t || An(e, t)) && n++;
635
+ return n;
636
+ }
637
+ function Rn(e) {
638
+ var t = 0, n = 0, r = L();
639
+ if (e) do {
640
+ var i = Nn(e), a = i.a, o = i.d;
641
+ t += e.scrollLeft * a, n += e.scrollTop * o;
642
+ } while (e !== r && (e = e.parentNode));
643
+ return [t, n];
644
+ }
645
+ function zn(e, t) {
646
+ for (var n in e) if (e.hasOwnProperty(n)) {
647
+ for (var r in t) if (t.hasOwnProperty(r) && t[r] === e[n][r]) return Number(n);
648
+ }
649
+ return -1;
650
+ }
651
+ function Bn(e, t) {
652
+ if (!e || !e.getBoundingClientRect) return L();
653
+ var n = e, r = !1;
654
+ do
655
+ if (n.clientWidth < n.scrollWidth || n.clientHeight < n.scrollHeight) {
656
+ var i = I(n);
657
+ if (n.clientWidth < n.scrollWidth && (i.overflowX == "auto" || i.overflowX == "scroll") || n.clientHeight < n.scrollHeight && (i.overflowY == "auto" || i.overflowY == "scroll")) {
658
+ if (!n.getBoundingClientRect || n === document.body) return L();
659
+ if (r || t) return n;
660
+ r = !0;
661
+ }
662
+ }
663
+ while (n = n.parentNode);
664
+ return L();
665
+ }
666
+ function Vn(e, t) {
667
+ if (e && t) for (var n in t) t.hasOwnProperty(n) && (e[n] = t[n]);
668
+ return e;
669
+ }
670
+ function Hn(e, t) {
671
+ return Math.round(e.top) === Math.round(t.top) && Math.round(e.left) === Math.round(t.left) && Math.round(e.height) === Math.round(t.height) && Math.round(e.width) === Math.round(t.width);
672
+ }
673
+ var Un;
674
+ function Wn(e, t) {
675
+ return function() {
676
+ if (!Un) {
677
+ var n = arguments, r = this;
678
+ n.length === 1 ? e.call(r, n[0]) : e.apply(r, n), Un = setTimeout(function() {
679
+ Un = void 0;
680
+ }, t);
681
+ }
682
+ };
683
+ }
684
+ function Gn() {
685
+ clearTimeout(Un), Un = void 0;
686
+ }
687
+ function Kn(e, t, n) {
688
+ e.scrollLeft += t, e.scrollTop += n;
689
+ }
690
+ function qn(e) {
691
+ var t = window.Polymer, n = window.jQuery || window.Zepto;
692
+ return t && t.dom ? t.dom(e).cloneNode(!0) : n ? n(e).clone(!0)[0] : e.cloneNode(!0);
693
+ }
694
+ function Jn(e, t, n) {
695
+ var r = {};
696
+ return Array.from(e.children).forEach(function(i) {
697
+ if (!(!P(i, t.draggable, e, !1) || i.animated || i === n)) {
698
+ var a = R(i);
699
+ r.left = Math.min(r.left ?? Infinity, a.left), r.top = Math.min(r.top ?? Infinity, a.top), r.right = Math.max(r.right ?? -Infinity, a.right), r.bottom = Math.max(r.bottom ?? -Infinity, a.bottom);
700
+ }
701
+ }), r.width = r.right - r.left, r.height = r.bottom - r.top, r.x = r.left, r.y = r.top, r;
702
+ }
703
+ var B = "Sortable" + (/* @__PURE__ */ new Date()).getTime();
704
+ function Yn() {
705
+ var e = [], t;
706
+ return {
707
+ captureAnimationState: function() {
708
+ e = [], this.options.animation && [].slice.call(this.el.children).forEach(function(t) {
709
+ if (!(I(t, "display") === "none" || t === Q.ghost)) {
710
+ e.push({
711
+ target: t,
712
+ rect: R(t)
713
+ });
714
+ var n = A({}, e[e.length - 1].rect);
715
+ if (t.thisAnimationDuration) {
716
+ var r = Nn(t, !0);
717
+ r && (n.top -= r.f, n.left -= r.e);
718
+ }
719
+ t.fromRect = n;
720
+ }
721
+ });
722
+ },
723
+ addAnimationState: function(t) {
724
+ e.push(t);
725
+ },
726
+ removeAnimationState: function(t) {
727
+ e.splice(zn(e, { target: t }), 1);
728
+ },
729
+ animateAll: function(n) {
730
+ var r = this;
731
+ if (!this.options.animation) {
732
+ clearTimeout(t), typeof n == "function" && n();
733
+ return;
734
+ }
735
+ var i = !1, a = 0;
736
+ e.forEach(function(e) {
737
+ var t = 0, n = e.target, o = n.fromRect, s = R(n), c = n.prevFromRect, l = n.prevToRect, u = e.rect, d = Nn(n, !0);
738
+ d && (s.top -= d.f, s.left -= d.e), n.toRect = s, n.thisAnimationDuration && Hn(c, s) && !Hn(o, s) && (u.top - s.top) / (u.left - s.left) === (o.top - s.top) / (o.left - s.left) && (t = Zn(u, c, l, r.options)), Hn(s, o) || (n.prevFromRect = o, n.prevToRect = s, t ||= r.options.animation, r.animate(n, u, s, t)), t && (i = !0, a = Math.max(a, t), clearTimeout(n.animationResetTimer), n.animationResetTimer = setTimeout(function() {
739
+ n.animationTime = 0, n.prevFromRect = null, n.fromRect = null, n.prevToRect = null, n.thisAnimationDuration = null;
740
+ }, t), n.thisAnimationDuration = t);
741
+ }), clearTimeout(t), i ? t = setTimeout(function() {
742
+ typeof n == "function" && n();
743
+ }, a) : typeof n == "function" && n(), e = [];
744
+ },
745
+ animate: function(e, t, n, r) {
746
+ if (r) {
747
+ I(e, "transition", ""), I(e, "transform", "");
748
+ var i = Nn(this.el), a = i && i.a, o = i && i.d, s = (t.left - n.left) / (a || 1), c = (t.top - n.top) / (o || 1);
749
+ e.animatingX = !!s, e.animatingY = !!c, I(e, "transform", "translate3d(" + s + "px," + c + "px,0)"), this.forRepaintDummy = Xn(e), I(e, "transition", "transform " + r + "ms" + (this.options.easing ? " " + this.options.easing : "")), I(e, "transform", "translate3d(0,0,0)"), typeof e.animated == "number" && clearTimeout(e.animated), e.animated = setTimeout(function() {
750
+ I(e, "transition", ""), I(e, "transform", ""), e.animated = !1, e.animatingX = !1, e.animatingY = !1;
751
+ }, r);
752
+ }
753
+ }
754
+ };
755
+ }
756
+ function Xn(e) {
757
+ return e.offsetWidth;
758
+ }
759
+ function Zn(e, t, n, r) {
760
+ return Math.sqrt((t.top - e.top) ** 2 + (t.left - e.left) ** 2) / Math.sqrt((t.top - n.top) ** 2 + (t.left - n.left) ** 2) * r.animation;
761
+ }
762
+ var Qn = [], $n = { initializeByDefault: !0 }, er = {
763
+ mount: function(e) {
764
+ for (var t in $n) $n.hasOwnProperty(t) && !(t in e) && (e[t] = $n[t]);
765
+ Qn.forEach(function(t) {
766
+ if (t.pluginName === e.pluginName) throw `Sortable: Cannot mount plugin ${e.pluginName} more than once`;
767
+ }), Qn.push(e);
768
+ },
769
+ pluginEvent: function(e, t, n) {
770
+ var r = this;
771
+ this.eventCanceled = !1, n.cancel = function() {
772
+ r.eventCanceled = !0;
773
+ };
774
+ var i = e + "Global";
775
+ Qn.forEach(function(r) {
776
+ t[r.pluginName] && (t[r.pluginName][i] && t[r.pluginName][i](A({ sortable: t }, n)), t.options[r.pluginName] && t[r.pluginName][e] && t[r.pluginName][e](A({ sortable: t }, n)));
777
+ });
778
+ },
779
+ initializePlugins: function(e, t, n, r) {
780
+ for (var i in Qn.forEach(function(r) {
781
+ var i = r.pluginName;
782
+ if (!(!e.options[i] && !r.initializeByDefault)) {
783
+ var a = new r(e, t, e.options);
784
+ a.sortable = e, a.options = e.options, e[i] = a, j(n, a.defaults);
785
+ }
786
+ }), e.options) if (e.options.hasOwnProperty(i)) {
787
+ var a = this.modifyOption(e, i, e.options[i]);
788
+ a !== void 0 && (e.options[i] = a);
789
+ }
790
+ },
791
+ getEventProperties: function(e, t) {
792
+ var n = {};
793
+ return Qn.forEach(function(r) {
794
+ typeof r.eventProperties == "function" && j(n, r.eventProperties.call(t[r.pluginName], e));
795
+ }), n;
796
+ },
797
+ modifyOption: function(e, t, n) {
798
+ var r;
799
+ return Qn.forEach(function(i) {
800
+ e[i.pluginName] && i.optionListeners && typeof i.optionListeners[t] == "function" && (r = i.optionListeners[t].call(e[i.pluginName], n));
801
+ }), r;
802
+ }
803
+ };
804
+ function tr(e) {
805
+ var t = e.sortable, n = e.rootEl, r = e.name, i = e.targetEl, a = e.cloneEl, o = e.toEl, s = e.fromEl, c = e.oldIndex, l = e.newIndex, u = e.oldDraggableIndex, d = e.newDraggableIndex, f = e.originalEvent, p = e.putSortable, m = e.extraEventProperties;
806
+ if (t ||= n && n[B], t) {
807
+ var h, g = t.options, _ = "on" + r.charAt(0).toUpperCase() + r.substr(1);
808
+ window.CustomEvent && !Cn && !wn ? h = new CustomEvent(r, {
809
+ bubbles: !0,
810
+ cancelable: !0
811
+ }) : (h = document.createEvent("Event"), h.initEvent(r, !0, !0)), h.to = o || n, h.from = s || n, h.item = i || n, h.clone = a, h.oldIndex = c, h.newIndex = l, h.oldDraggableIndex = u, h.newDraggableIndex = d, h.originalEvent = f, h.pullMode = p ? p.lastPutMode : void 0;
812
+ var v = A(A({}, m), er.getEventProperties(r, t));
813
+ for (var y in v) h[y] = v[y];
814
+ n && n.dispatchEvent(h), g[_] && g[_].call(t, h);
815
+ }
816
+ }
817
+ var nr = ["evt"], V = function(e, t) {
818
+ var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = n.evt, i = bn(n, nr);
819
+ er.pluginEvent.bind(Q)(e, t, A({
820
+ dragEl: U,
821
+ parentEl: W,
822
+ ghostEl: G,
823
+ rootEl: K,
824
+ nextEl: rr,
825
+ lastDownEl: ir,
826
+ cloneEl: q,
827
+ cloneHidden: ar,
828
+ dragStarted: vr,
829
+ putSortable: Y,
830
+ activeSortable: Q.active,
831
+ originalEvent: r,
832
+ oldIndex: or,
833
+ oldDraggableIndex: sr,
834
+ newIndex: J,
835
+ newDraggableIndex: cr,
836
+ hideGhostForTarget: Ir,
837
+ unhideGhostForTarget: Lr,
838
+ cloneNowHidden: function() {
839
+ ar = !0;
840
+ },
841
+ cloneNowShown: function() {
842
+ ar = !1;
843
+ },
844
+ dispatchSortableEvent: function(e) {
845
+ H({
846
+ sortable: t,
847
+ name: e,
848
+ originalEvent: r
849
+ });
850
+ }
851
+ }, i));
852
+ };
853
+ function H(e) {
854
+ tr(A({
855
+ putSortable: Y,
856
+ cloneEl: q,
857
+ targetEl: U,
858
+ rootEl: K,
859
+ oldIndex: or,
860
+ oldDraggableIndex: sr,
861
+ newIndex: J,
862
+ newDraggableIndex: cr
863
+ }, e));
864
+ }
865
+ var U, W, G, K, rr, ir, q, ar, or, J, sr, cr, lr, Y, ur = !1, dr = !1, fr = [], pr, X, mr, hr, gr, _r, vr, yr, br, xr = !1, Sr = !1, Cr, Z, wr = [], Tr = !1, Er = [], Dr = typeof document < "u", Or = Dn, kr = wn || Cn ? "cssFloat" : "float", Ar = Dr && !On && !Dn && "draggable" in document.createElement("div"), jr = function() {
866
+ if (Dr) {
867
+ if (Cn) return !1;
868
+ var e = document.createElement("x");
869
+ return e.style.cssText = "pointer-events:auto", e.style.pointerEvents === "auto";
870
+ }
871
+ }(), Mr = function(e, t) {
872
+ var n = I(e), r = parseInt(n.width) - parseInt(n.paddingLeft) - parseInt(n.paddingRight) - parseInt(n.borderLeftWidth) - parseInt(n.borderRightWidth), i = In(e, 0, t), a = In(e, 1, t), o = i && I(i), s = a && I(a), c = o && parseInt(o.marginLeft) + parseInt(o.marginRight) + R(i).width, l = s && parseInt(s.marginLeft) + parseInt(s.marginRight) + R(a).width;
873
+ if (n.display === "flex") return n.flexDirection === "column" || n.flexDirection === "column-reverse" ? "vertical" : "horizontal";
874
+ if (n.display === "grid") return n.gridTemplateColumns.split(" ").length <= 1 ? "vertical" : "horizontal";
875
+ if (i && o.float && o.float !== "none") {
876
+ var u = o.float === "left" ? "left" : "right";
877
+ return a && (s.clear === "both" || s.clear === u) ? "vertical" : "horizontal";
878
+ }
879
+ return i && (o.display === "block" || o.display === "flex" || o.display === "table" || o.display === "grid" || c >= r && n[kr] === "none" || a && n[kr] === "none" && c + l > r) ? "vertical" : "horizontal";
880
+ }, Nr = function(e, t, n) {
881
+ var r = n ? e.left : e.top, i = n ? e.right : e.bottom, a = n ? e.width : e.height, o = n ? t.left : t.top, s = n ? t.right : t.bottom, c = n ? t.width : t.height;
882
+ return r === o || i === s || r + a / 2 === o + c / 2;
883
+ }, Pr = function(e, t) {
884
+ var n;
885
+ return fr.some(function(r) {
886
+ var i = r[B].options.emptyInsertThreshold;
887
+ if (!(!i || Ln(r))) {
888
+ var a = R(r), o = e >= a.left - i && e <= a.right + i, s = t >= a.top - i && t <= a.bottom + i;
889
+ if (o && s) return n = r;
890
+ }
891
+ }), n;
892
+ }, Fr = function(e) {
893
+ function t(e, n) {
894
+ return function(r, i, a, o) {
895
+ var s = r.options.group.name && i.options.group.name && r.options.group.name === i.options.group.name;
896
+ if (e == null && (n || s)) return !0;
897
+ if (e == null || e === !1) return !1;
898
+ if (n && e === "clone") return e;
899
+ if (typeof e == "function") return t(e(r, i, a, o), n)(r, i, a, o);
900
+ var c = (n ? r : i).options.group.name;
901
+ return e === !0 || typeof e == "string" && e === c || e.join && e.indexOf(c) > -1;
902
+ };
903
+ }
904
+ var n = {}, r = e.group;
905
+ (!r || _n(r) != "object") && (r = { name: r }), n.name = r.name, n.checkPull = t(r.pull, !0), n.checkPut = t(r.put), n.revertClone = r.revertClone, e.group = n;
906
+ }, Ir = function() {
907
+ !jr && G && I(G, "display", "none");
908
+ }, Lr = function() {
909
+ !jr && G && I(G, "display", "");
910
+ };
911
+ Dr && !On && document.addEventListener("click", function(e) {
912
+ if (dr) return e.preventDefault(), e.stopPropagation && e.stopPropagation(), e.stopImmediatePropagation && e.stopImmediatePropagation(), dr = !1, !1;
913
+ }, !0);
914
+ var Rr = function(e) {
915
+ if (U) {
916
+ e = e.touches ? e.touches[0] : e;
917
+ var t = Pr(e.clientX, e.clientY);
918
+ if (t) {
919
+ var n = {};
920
+ for (var r in e) e.hasOwnProperty(r) && (n[r] = e[r]);
921
+ n.target = n.rootEl = t, n.preventDefault = void 0, n.stopPropagation = void 0, t[B]._onDragOver(n);
922
+ }
923
+ }
924
+ }, zr = function(e) {
925
+ U && U.parentNode[B]._isOutsideThisEl(e.target);
926
+ };
927
+ function Q(e, t) {
928
+ if (!(e && e.nodeType && e.nodeType === 1)) throw `Sortable: \`el\` must be an HTMLElement, not ${{}.toString.call(e)}`;
929
+ this.el = e, this.options = t = j({}, t), e[B] = this;
930
+ var n = {
931
+ group: null,
932
+ sort: !0,
933
+ disabled: !1,
934
+ store: null,
935
+ handle: null,
936
+ draggable: /^[uo]l$/i.test(e.nodeName) ? ">li" : ">*",
937
+ swapThreshold: 1,
938
+ invertSwap: !1,
939
+ invertedSwapThreshold: null,
940
+ removeCloneOnHide: !0,
941
+ direction: function() {
942
+ return Mr(e, this.options);
943
+ },
944
+ ghostClass: "sortable-ghost",
945
+ chosenClass: "sortable-chosen",
946
+ dragClass: "sortable-drag",
947
+ ignore: "a, img",
948
+ filter: null,
949
+ preventOnFilter: !0,
950
+ animation: 0,
951
+ easing: null,
952
+ setData: function(e, t) {
953
+ e.setData("Text", t.textContent);
954
+ },
955
+ dropBubble: !1,
956
+ dragoverBubble: !1,
957
+ dataIdAttr: "data-id",
958
+ delay: 0,
959
+ delayOnTouchOnly: !1,
960
+ touchStartThreshold: (Number.parseInt ? Number : window).parseInt(window.devicePixelRatio, 10) || 1,
961
+ forceFallback: !1,
962
+ fallbackClass: "sortable-fallback",
963
+ fallbackOnBody: !1,
964
+ fallbackTolerance: 0,
965
+ fallbackOffset: {
966
+ x: 0,
967
+ y: 0
968
+ },
969
+ supportPointer: Q.supportPointer !== !1 && "PointerEvent" in window && !En,
970
+ emptyInsertThreshold: 5
971
+ };
972
+ for (var r in er.initializePlugins(this, e, n), n) !(r in t) && (t[r] = n[r]);
973
+ for (var i in Fr(t), this) i.charAt(0) === "_" && typeof this[i] == "function" && (this[i] = this[i].bind(this));
974
+ this.nativeDraggable = t.forceFallback ? !1 : Ar, this.nativeDraggable && (this.options.touchStartThreshold = 1), t.supportPointer ? M(e, "pointerdown", this._onTapStart) : (M(e, "mousedown", this._onTapStart), M(e, "touchstart", this._onTapStart)), this.nativeDraggable && (M(e, "dragover", this), M(e, "dragenter", this)), fr.push(this.el), t.store && t.store.get && this.sort(t.store.get(this) || []), j(this, Yn());
975
+ }
976
+ Q.prototype = {
977
+ constructor: Q,
978
+ _isOutsideThisEl: function(e) {
979
+ !this.el.contains(e) && e !== this.el && (yr = null);
980
+ },
981
+ _getDirection: function(e, t) {
982
+ return typeof this.options.direction == "function" ? this.options.direction.call(this, e, t, U) : this.options.direction;
983
+ },
984
+ _onTapStart: function(e) {
985
+ if (e.cancelable) {
986
+ var t = this, n = this.el, r = this.options, i = r.preventOnFilter, a = e.type, o = e.touches && e.touches[0] || e.pointerType && e.pointerType === "touch" && e, s = (o || e).target, c = e.target.shadowRoot && (e.path && e.path[0] || e.composedPath && e.composedPath()[0]) || s, l = r.filter;
987
+ if (Yr(n), !U && !(/mousedown|pointerdown/.test(a) && e.button !== 0 || r.disabled) && !c.isContentEditable && !(!this.nativeDraggable && En && s && s.tagName.toUpperCase() === "SELECT") && (s = P(s, r.draggable, n, !1), !(s && s.animated) && ir !== s)) {
988
+ if (or = z(s), sr = z(s, r.draggable), typeof l == "function") {
989
+ if (l.call(this, e, s, this)) {
990
+ H({
991
+ sortable: t,
992
+ rootEl: c,
993
+ name: "filter",
994
+ targetEl: s,
995
+ toEl: n,
996
+ fromEl: n
997
+ }), V("filter", t, { evt: e }), i && e.cancelable && e.preventDefault();
998
+ return;
999
+ }
1000
+ } else if (l && (l = l.split(",").some(function(r) {
1001
+ if (r = P(c, r.trim(), n, !1), r) return H({
1002
+ sortable: t,
1003
+ rootEl: r,
1004
+ name: "filter",
1005
+ targetEl: s,
1006
+ fromEl: n,
1007
+ toEl: n
1008
+ }), V("filter", t, { evt: e }), !0;
1009
+ }), l)) {
1010
+ i && e.cancelable && e.preventDefault();
1011
+ return;
1012
+ }
1013
+ r.handle && !P(c, r.handle, n, !1) || this._prepareDragStart(e, o, s);
1014
+ }
1015
+ }
1016
+ },
1017
+ _prepareDragStart: function(e, t, n) {
1018
+ var r = this, i = r.el, a = r.options, o = i.ownerDocument, s;
1019
+ if (n && !U && n.parentNode === i) {
1020
+ var c = R(n);
1021
+ if (K = i, U = n, W = U.parentNode, rr = U.nextSibling, ir = n, lr = a.group, Q.dragged = U, pr = {
1022
+ target: U,
1023
+ clientX: (t || e).clientX,
1024
+ clientY: (t || e).clientY
1025
+ }, gr = pr.clientX - c.left, _r = pr.clientY - c.top, this._lastX = (t || e).clientX, this._lastY = (t || e).clientY, U.style["will-change"] = "all", s = function() {
1026
+ if (V("delayEnded", r, { evt: e }), Q.eventCanceled) {
1027
+ r._onDrop();
1028
+ return;
1029
+ }
1030
+ r._disableDelayedDragEvents(), !Tn && r.nativeDraggable && (U.draggable = !0), r._triggerDragStart(e, t), H({
1031
+ sortable: r,
1032
+ name: "choose",
1033
+ originalEvent: e
1034
+ }), F(U, a.chosenClass, !0);
1035
+ }, a.ignore.split(",").forEach(function(e) {
1036
+ Pn(U, e.trim(), Hr);
1037
+ }), M(o, "dragover", Rr), M(o, "mousemove", Rr), M(o, "touchmove", Rr), M(o, "mouseup", r._onDrop), M(o, "touchend", r._onDrop), M(o, "touchcancel", r._onDrop), Tn && this.nativeDraggable && (this.options.touchStartThreshold = 4, U.draggable = !0), V("delayStart", this, { evt: e }), a.delay && (!a.delayOnTouchOnly || t) && (!this.nativeDraggable || !(wn || Cn))) {
1038
+ if (Q.eventCanceled) {
1039
+ this._onDrop();
1040
+ return;
1041
+ }
1042
+ M(o, "mouseup", r._disableDelayedDrag), M(o, "touchend", r._disableDelayedDrag), M(o, "touchcancel", r._disableDelayedDrag), M(o, "mousemove", r._delayedDragTouchMoveHandler), M(o, "touchmove", r._delayedDragTouchMoveHandler), a.supportPointer && M(o, "pointermove", r._delayedDragTouchMoveHandler), r._dragStartTimer = setTimeout(s, a.delay);
1043
+ } else s();
1044
+ }
1045
+ },
1046
+ _delayedDragTouchMoveHandler: function(e) {
1047
+ var t = e.touches ? e.touches[0] : e;
1048
+ Math.max(Math.abs(t.clientX - this._lastX), Math.abs(t.clientY - this._lastY)) >= Math.floor(this.options.touchStartThreshold / (this.nativeDraggable && window.devicePixelRatio || 1)) && this._disableDelayedDrag();
1049
+ },
1050
+ _disableDelayedDrag: function() {
1051
+ U && Hr(U), clearTimeout(this._dragStartTimer), this._disableDelayedDragEvents();
1052
+ },
1053
+ _disableDelayedDragEvents: function() {
1054
+ var e = this.el.ownerDocument;
1055
+ N(e, "mouseup", this._disableDelayedDrag), N(e, "touchend", this._disableDelayedDrag), N(e, "touchcancel", this._disableDelayedDrag), N(e, "mousemove", this._delayedDragTouchMoveHandler), N(e, "touchmove", this._delayedDragTouchMoveHandler), N(e, "pointermove", this._delayedDragTouchMoveHandler);
1056
+ },
1057
+ _triggerDragStart: function(e, t) {
1058
+ t ||= e.pointerType == "touch" && e, !this.nativeDraggable || t ? this.options.supportPointer ? M(document, "pointermove", this._onTouchMove) : t ? M(document, "touchmove", this._onTouchMove) : M(document, "mousemove", this._onTouchMove) : (M(U, "dragend", this), M(K, "dragstart", this._onDragStart));
1059
+ try {
1060
+ document.selection ? Xr(function() {
1061
+ document.selection.empty();
1062
+ }) : window.getSelection().removeAllRanges();
1063
+ } catch {}
1064
+ },
1065
+ _dragStarted: function(e, t) {
1066
+ if (ur = !1, K && U) {
1067
+ V("dragStarted", this, { evt: t }), this.nativeDraggable && M(document, "dragover", zr);
1068
+ var n = this.options;
1069
+ !e && F(U, n.dragClass, !1), F(U, n.ghostClass, !0), Q.active = this, e && this._appendGhost(), H({
1070
+ sortable: this,
1071
+ name: "start",
1072
+ originalEvent: t
1073
+ });
1074
+ } else this._nulling();
1075
+ },
1076
+ _emulateDragOver: function() {
1077
+ if (X) {
1078
+ this._lastX = X.clientX, this._lastY = X.clientY, Ir();
1079
+ for (var e = document.elementFromPoint(X.clientX, X.clientY), t = e; e && e.shadowRoot && (e = e.shadowRoot.elementFromPoint(X.clientX, X.clientY), e !== t);) t = e;
1080
+ if (U.parentNode[B]._isOutsideThisEl(e), t) do {
1081
+ if (t[B]) {
1082
+ var n = void 0;
1083
+ if (n = t[B]._onDragOver({
1084
+ clientX: X.clientX,
1085
+ clientY: X.clientY,
1086
+ target: e,
1087
+ rootEl: t
1088
+ }), n && !this.options.dragoverBubble) break;
1089
+ }
1090
+ e = t;
1091
+ } while (t = t.parentNode);
1092
+ Lr();
1093
+ }
1094
+ },
1095
+ _onTouchMove: function(e) {
1096
+ if (pr) {
1097
+ var t = this.options, n = t.fallbackTolerance, r = t.fallbackOffset, i = e.touches ? e.touches[0] : e, a = G && Nn(G, !0), o = G && a && a.a, s = G && a && a.d, c = Or && Z && Rn(Z), l = (i.clientX - pr.clientX + r.x) / (o || 1) + (c ? c[0] - wr[0] : 0) / (o || 1), u = (i.clientY - pr.clientY + r.y) / (s || 1) + (c ? c[1] - wr[1] : 0) / (s || 1);
1098
+ if (!Q.active && !ur) {
1099
+ if (n && Math.max(Math.abs(i.clientX - this._lastX), Math.abs(i.clientY - this._lastY)) < n) return;
1100
+ this._onDragStart(e, !0);
1101
+ }
1102
+ if (G) {
1103
+ a ? (a.e += l - (mr || 0), a.f += u - (hr || 0)) : a = {
1104
+ a: 1,
1105
+ b: 0,
1106
+ c: 0,
1107
+ d: 1,
1108
+ e: l,
1109
+ f: u
1110
+ };
1111
+ var d = `matrix(${a.a},${a.b},${a.c},${a.d},${a.e},${a.f})`;
1112
+ I(G, "webkitTransform", d), I(G, "mozTransform", d), I(G, "msTransform", d), I(G, "transform", d), mr = l, hr = u, X = i;
1113
+ }
1114
+ e.cancelable && e.preventDefault();
1115
+ }
1116
+ },
1117
+ _appendGhost: function() {
1118
+ if (!G) {
1119
+ var e = this.options.fallbackOnBody ? document.body : K, t = R(U, !0, Or, !0, e), n = this.options;
1120
+ if (Or) {
1121
+ for (Z = e; I(Z, "position") === "static" && I(Z, "transform") === "none" && Z !== document;) Z = Z.parentNode;
1122
+ Z !== document.body && Z !== document.documentElement ? (Z === document && (Z = L()), t.top += Z.scrollTop, t.left += Z.scrollLeft) : Z = L(), wr = Rn(Z);
1123
+ }
1124
+ G = U.cloneNode(!0), F(G, n.ghostClass, !1), F(G, n.fallbackClass, !0), F(G, n.dragClass, !0), I(G, "transition", ""), I(G, "transform", ""), I(G, "box-sizing", "border-box"), I(G, "margin", 0), I(G, "top", t.top), I(G, "left", t.left), I(G, "width", t.width), I(G, "height", t.height), I(G, "opacity", "0.8"), I(G, "position", Or ? "absolute" : "fixed"), I(G, "zIndex", "100000"), I(G, "pointerEvents", "none"), Q.ghost = G, e.appendChild(G), I(G, "transform-origin", gr / parseInt(G.style.width) * 100 + "% " + _r / parseInt(G.style.height) * 100 + "%");
1125
+ }
1126
+ },
1127
+ _onDragStart: function(e, t) {
1128
+ var n = this, r = e.dataTransfer, i = n.options;
1129
+ if (V("dragStart", this, { evt: e }), Q.eventCanceled) {
1130
+ this._onDrop();
1131
+ return;
1132
+ }
1133
+ V("setupClone", this), Q.eventCanceled || (q = qn(U), q.removeAttribute("id"), q.draggable = !1, q.style["will-change"] = "", this._hideClone(), F(q, this.options.chosenClass, !1), Q.clone = q), n.cloneId = Xr(function() {
1134
+ V("clone", n), !Q.eventCanceled && (n.options.removeCloneOnHide || K.insertBefore(q, U), n._hideClone(), H({
1135
+ sortable: n,
1136
+ name: "clone"
1137
+ }));
1138
+ }), !t && F(U, i.dragClass, !0), t ? (dr = !0, n._loopId = setInterval(n._emulateDragOver, 50)) : (N(document, "mouseup", n._onDrop), N(document, "touchend", n._onDrop), N(document, "touchcancel", n._onDrop), r && (r.effectAllowed = "move", i.setData && i.setData.call(n, r, U)), M(document, "drop", n), I(U, "transform", "translateZ(0)")), ur = !0, n._dragStartId = Xr(n._dragStarted.bind(n, t, e)), M(document, "selectstart", n), vr = !0, En && I(document.body, "user-select", "none");
1139
+ },
1140
+ _onDragOver: function(e) {
1141
+ var t = this.el, n = e.target, r, i, a, o = this.options, s = o.group, c = Q.active, l = lr === s, u = o.sort, d = Y || c, f, p = this, m = !1;
1142
+ if (Tr) return;
1143
+ function h(o, s) {
1144
+ V(o, p, A({
1145
+ evt: e,
1146
+ isOwner: l,
1147
+ axis: f ? "vertical" : "horizontal",
1148
+ revert: a,
1149
+ dragRect: r,
1150
+ targetRect: i,
1151
+ canSort: u,
1152
+ fromSortable: d,
1153
+ target: n,
1154
+ completed: _,
1155
+ onMove: function(n, i) {
1156
+ return Vr(K, t, U, r, n, R(n), e, i);
1157
+ },
1158
+ changed: v
1159
+ }, s));
1160
+ }
1161
+ function g() {
1162
+ h("dragOverAnimationCapture"), p.captureAnimationState(), p !== d && d.captureAnimationState();
1163
+ }
1164
+ function _(r) {
1165
+ return h("dragOverCompleted", { insertion: r }), r && (l ? c._hideClone() : c._showClone(p), p !== d && (F(U, Y ? Y.options.ghostClass : c.options.ghostClass, !1), F(U, o.ghostClass, !0)), Y !== p && p !== Q.active ? Y = p : p === Q.active && Y && (Y = null), d === p && (p._ignoreWhileAnimating = n), p.animateAll(function() {
1166
+ h("dragOverAnimationComplete"), p._ignoreWhileAnimating = null;
1167
+ }), p !== d && (d.animateAll(), d._ignoreWhileAnimating = null)), (n === U && !U.animated || n === t && !n.animated) && (yr = null), !o.dragoverBubble && !e.rootEl && n !== document && (U.parentNode[B]._isOutsideThisEl(e.target), !r && Rr(e)), !o.dragoverBubble && e.stopPropagation && e.stopPropagation(), m = !0;
1168
+ }
1169
+ function v() {
1170
+ J = z(U), cr = z(U, o.draggable), H({
1171
+ sortable: p,
1172
+ name: "change",
1173
+ toEl: t,
1174
+ newIndex: J,
1175
+ newDraggableIndex: cr,
1176
+ originalEvent: e
1177
+ });
1178
+ }
1179
+ if (e.preventDefault !== void 0 && e.cancelable && e.preventDefault(), n = P(n, o.draggable, t, !0), h("dragOver"), Q.eventCanceled) return m;
1180
+ if (U.contains(e.target) || n.animated && n.animatingX && n.animatingY || p._ignoreWhileAnimating === n) return _(!1);
1181
+ if (dr = !1, c && !o.disabled && (l ? u || (a = W !== K) : Y === this || (this.lastPutMode = lr.checkPull(this, c, U, e)) && s.checkPut(this, c, U, e))) {
1182
+ if (f = this._getDirection(e, n) === "vertical", r = R(U), h("dragOverValid"), Q.eventCanceled) return m;
1183
+ if (a) return W = K, g(), this._hideClone(), h("revert"), Q.eventCanceled || (rr ? K.insertBefore(U, rr) : K.appendChild(U)), _(!0);
1184
+ var y = Ln(t, o.draggable);
1185
+ if (!y || Gr(e, f, this) && !y.animated) {
1186
+ if (y === U) return _(!1);
1187
+ if (y && t === e.target && (n = y), n && (i = R(n)), Vr(K, t, U, r, n, i, e, !!n) !== !1) return g(), y && y.nextSibling ? t.insertBefore(U, y.nextSibling) : t.appendChild(U), W = t, v(), _(!0);
1188
+ } else if (y && Wr(e, f, this)) {
1189
+ var b = In(t, 0, o, !0);
1190
+ if (b === U) return _(!1);
1191
+ if (n = b, i = R(n), Vr(K, t, U, r, n, i, e, !1) !== !1) return g(), t.insertBefore(U, b), W = t, v(), _(!0);
1192
+ } else if (n.parentNode === t) {
1193
+ i = R(n);
1194
+ var x = 0, S, ee = U.parentNode !== t, C = !Nr(U.animated && U.toRect || r, n.animated && n.toRect || i, f), w = f ? "top" : "left", te = Fn(n, "top", "top") || Fn(U, "top", "top"), ne = te ? te.scrollTop : void 0;
1195
+ yr !== n && (S = i[w], xr = !1, Sr = !C && o.invertSwap || ee), x = Kr(e, n, i, f, C ? 1 : o.swapThreshold, o.invertedSwapThreshold == null ? o.swapThreshold : o.invertedSwapThreshold, Sr, yr === n);
1196
+ var re;
1197
+ if (x !== 0) {
1198
+ var T = z(U);
1199
+ do
1200
+ T -= x, re = W.children[T];
1201
+ while (re && (I(re, "display") === "none" || re === G));
1202
+ }
1203
+ if (x === 0 || re === n) return _(!1);
1204
+ yr = n, br = x;
1205
+ var ie = n.nextElementSibling, E = !1;
1206
+ E = x === 1;
1207
+ var ae = Vr(K, t, U, r, n, i, e, E);
1208
+ if (ae !== !1) return (ae === 1 || ae === -1) && (E = ae === 1), Tr = !0, setTimeout(Ur, 30), g(), E && !ie ? t.appendChild(U) : n.parentNode.insertBefore(U, E ? ie : n), te && Kn(te, 0, ne - te.scrollTop), W = U.parentNode, S !== void 0 && !Sr && (Cr = Math.abs(S - R(n)[w])), v(), _(!0);
1209
+ }
1210
+ if (t.contains(U)) return _(!1);
1211
+ }
1212
+ return !1;
1213
+ },
1214
+ _ignoreWhileAnimating: null,
1215
+ _offMoveEvents: function() {
1216
+ N(document, "mousemove", this._onTouchMove), N(document, "touchmove", this._onTouchMove), N(document, "pointermove", this._onTouchMove), N(document, "dragover", Rr), N(document, "mousemove", Rr), N(document, "touchmove", Rr);
1217
+ },
1218
+ _offUpEvents: function() {
1219
+ var e = this.el.ownerDocument;
1220
+ N(e, "mouseup", this._onDrop), N(e, "touchend", this._onDrop), N(e, "pointerup", this._onDrop), N(e, "touchcancel", this._onDrop), N(document, "selectstart", this);
1221
+ },
1222
+ _onDrop: function(e) {
1223
+ var t = this.el, n = this.options;
1224
+ if (J = z(U), cr = z(U, n.draggable), V("drop", this, { evt: e }), W = U && U.parentNode, J = z(U), cr = z(U, n.draggable), Q.eventCanceled) {
1225
+ this._nulling();
1226
+ return;
1227
+ }
1228
+ ur = !1, Sr = !1, xr = !1, clearInterval(this._loopId), clearTimeout(this._dragStartTimer), Zr(this.cloneId), Zr(this._dragStartId), this.nativeDraggable && (N(document, "drop", this), N(t, "dragstart", this._onDragStart)), this._offMoveEvents(), this._offUpEvents(), En && I(document.body, "user-select", ""), I(U, "transform", ""), e && (vr && (e.cancelable && e.preventDefault(), !n.dropBubble && e.stopPropagation()), G && G.parentNode && G.parentNode.removeChild(G), (K === W || Y && Y.lastPutMode !== "clone") && q && q.parentNode && q.parentNode.removeChild(q), U && (this.nativeDraggable && N(U, "dragend", this), Hr(U), U.style["will-change"] = "", vr && !ur && F(U, Y ? Y.options.ghostClass : this.options.ghostClass, !1), F(U, this.options.chosenClass, !1), H({
1229
+ sortable: this,
1230
+ name: "unchoose",
1231
+ toEl: W,
1232
+ newIndex: null,
1233
+ newDraggableIndex: null,
1234
+ originalEvent: e
1235
+ }), K === W ? J !== or && J >= 0 && (H({
1236
+ sortable: this,
1237
+ name: "update",
1238
+ toEl: W,
1239
+ originalEvent: e
1240
+ }), H({
1241
+ sortable: this,
1242
+ name: "sort",
1243
+ toEl: W,
1244
+ originalEvent: e
1245
+ })) : (J >= 0 && (H({
1246
+ rootEl: W,
1247
+ name: "add",
1248
+ toEl: W,
1249
+ fromEl: K,
1250
+ originalEvent: e
1251
+ }), H({
1252
+ sortable: this,
1253
+ name: "remove",
1254
+ toEl: W,
1255
+ originalEvent: e
1256
+ }), H({
1257
+ rootEl: W,
1258
+ name: "sort",
1259
+ toEl: W,
1260
+ fromEl: K,
1261
+ originalEvent: e
1262
+ }), H({
1263
+ sortable: this,
1264
+ name: "sort",
1265
+ toEl: W,
1266
+ originalEvent: e
1267
+ })), Y && Y.save()), Q.active && ((J == null || J === -1) && (J = or, cr = sr), H({
1268
+ sortable: this,
1269
+ name: "end",
1270
+ toEl: W,
1271
+ originalEvent: e
1272
+ }), this.save()))), this._nulling();
1273
+ },
1274
+ _nulling: function() {
1275
+ V("nulling", this), K = U = W = G = rr = q = ir = ar = pr = X = vr = J = cr = or = sr = yr = br = Y = lr = Q.dragged = Q.ghost = Q.clone = Q.active = null, Er.forEach(function(e) {
1276
+ e.checked = !0;
1277
+ }), Er.length = mr = hr = 0;
1278
+ },
1279
+ handleEvent: function(e) {
1280
+ switch (e.type) {
1281
+ case "drop":
1282
+ case "dragend":
1283
+ this._onDrop(e);
1284
+ break;
1285
+ case "dragenter":
1286
+ case "dragover":
1287
+ U && (this._onDragOver(e), Br(e));
1288
+ break;
1289
+ case "selectstart":
1290
+ e.preventDefault();
1291
+ break;
1292
+ }
1293
+ },
1294
+ toArray: function() {
1295
+ for (var e = [], t, n = this.el.children, r = 0, i = n.length, a = this.options; r < i; r++) t = n[r], P(t, a.draggable, this.el, !1) && e.push(t.getAttribute(a.dataIdAttr) || Jr(t));
1296
+ return e;
1297
+ },
1298
+ sort: function(e, t) {
1299
+ var n = {}, r = this.el;
1300
+ this.toArray().forEach(function(e, t) {
1301
+ var i = r.children[t];
1302
+ P(i, this.options.draggable, r, !1) && (n[e] = i);
1303
+ }, this), t && this.captureAnimationState(), e.forEach(function(e) {
1304
+ n[e] && (r.removeChild(n[e]), r.appendChild(n[e]));
1305
+ }), t && this.animateAll();
1306
+ },
1307
+ save: function() {
1308
+ var e = this.options.store;
1309
+ e && e.set && e.set(this);
1310
+ },
1311
+ closest: function(e, t) {
1312
+ return P(e, t || this.options.draggable, this.el, !1);
1313
+ },
1314
+ option: function(e, t) {
1315
+ var n = this.options;
1316
+ if (t === void 0) return n[e];
1317
+ var r = er.modifyOption(this, e, t);
1318
+ r === void 0 ? n[e] = t : n[e] = r, e === "group" && Fr(n);
1319
+ },
1320
+ destroy: function() {
1321
+ V("destroy", this);
1322
+ var e = this.el;
1323
+ e[B] = null, N(e, "mousedown", this._onTapStart), N(e, "touchstart", this._onTapStart), N(e, "pointerdown", this._onTapStart), this.nativeDraggable && (N(e, "dragover", this), N(e, "dragenter", this)), Array.prototype.forEach.call(e.querySelectorAll("[draggable]"), function(e) {
1324
+ e.removeAttribute("draggable");
1325
+ }), this._onDrop(), this._disableDelayedDragEvents(), fr.splice(fr.indexOf(this.el), 1), this.el = e = null;
1326
+ },
1327
+ _hideClone: function() {
1328
+ if (!ar) {
1329
+ if (V("hideClone", this), Q.eventCanceled) return;
1330
+ I(q, "display", "none"), this.options.removeCloneOnHide && q.parentNode && q.parentNode.removeChild(q), ar = !0;
1331
+ }
1332
+ },
1333
+ _showClone: function(e) {
1334
+ if (e.lastPutMode !== "clone") {
1335
+ this._hideClone();
1336
+ return;
1337
+ }
1338
+ if (ar) {
1339
+ if (V("showClone", this), Q.eventCanceled) return;
1340
+ U.parentNode == K && !this.options.group.revertClone ? K.insertBefore(q, U) : rr ? K.insertBefore(q, rr) : K.appendChild(q), this.options.group.revertClone && this.animate(U, q), I(q, "display", ""), ar = !1;
1341
+ }
1342
+ }
1343
+ };
1344
+ function Br(e) {
1345
+ e.dataTransfer && (e.dataTransfer.dropEffect = "move"), e.cancelable && e.preventDefault();
1346
+ }
1347
+ function Vr(e, t, n, r, i, a, o, s) {
1348
+ var c, l = e[B], u = l.options.onMove, d;
1349
+ return window.CustomEvent && !Cn && !wn ? c = new CustomEvent("move", {
1350
+ bubbles: !0,
1351
+ cancelable: !0
1352
+ }) : (c = document.createEvent("Event"), c.initEvent("move", !0, !0)), c.to = t, c.from = e, c.dragged = n, c.draggedRect = r, c.related = i || t, c.relatedRect = a || R(t), c.willInsertAfter = s, c.originalEvent = o, e.dispatchEvent(c), u && (d = u.call(l, c, o)), d;
1353
+ }
1354
+ function Hr(e) {
1355
+ e.draggable = !1;
1356
+ }
1357
+ function Ur() {
1358
+ Tr = !1;
1359
+ }
1360
+ function Wr(e, t, n) {
1361
+ var r = R(In(n.el, 0, n.options, !0)), i = Jn(n.el, n.options, G), a = 10;
1362
+ return t ? e.clientX < i.left - a || e.clientY < r.top && e.clientX < r.right : e.clientY < i.top - a || e.clientY < r.bottom && e.clientX < r.left;
1363
+ }
1364
+ function Gr(e, t, n) {
1365
+ var r = R(Ln(n.el, n.options.draggable)), i = Jn(n.el, n.options, G), a = 10;
1366
+ return t ? e.clientX > i.right + a || e.clientY > r.bottom && e.clientX > r.left : e.clientY > i.bottom + a || e.clientX > r.right && e.clientY > r.top;
1367
+ }
1368
+ function Kr(e, t, n, r, i, a, o, s) {
1369
+ var c = r ? e.clientY : e.clientX, l = r ? n.height : n.width, u = r ? n.top : n.left, d = r ? n.bottom : n.right, f = !1;
1370
+ if (!o) {
1371
+ if (s && Cr < l * i) {
1372
+ if (!xr && (br === 1 ? c > u + l * a / 2 : c < d - l * a / 2) && (xr = !0), xr) f = !0;
1373
+ else if (br === 1 ? c < u + Cr : c > d - Cr) return -br;
1374
+ } else if (c > u + l * (1 - i) / 2 && c < d - l * (1 - i) / 2) return qr(t);
1375
+ }
1376
+ return f ||= o, f && (c < u + l * a / 2 || c > d - l * a / 2) ? c > u + l / 2 ? 1 : -1 : 0;
1377
+ }
1378
+ function qr(e) {
1379
+ return z(U) < z(e) ? 1 : -1;
1380
+ }
1381
+ function Jr(e) {
1382
+ for (var t = e.tagName + e.className + e.src + e.href + e.textContent, n = t.length, r = 0; n--;) r += t.charCodeAt(n);
1383
+ return r.toString(36);
1384
+ }
1385
+ function Yr(e) {
1386
+ Er.length = 0;
1387
+ for (var t = e.getElementsByTagName("input"), n = t.length; n--;) {
1388
+ var r = t[n];
1389
+ r.checked && Er.push(r);
1390
+ }
1391
+ }
1392
+ function Xr(e) {
1393
+ return setTimeout(e, 0);
1394
+ }
1395
+ function Zr(e) {
1396
+ return clearTimeout(e);
1397
+ }
1398
+ Dr && M(document, "touchmove", function(e) {
1399
+ (Q.active || ur) && e.cancelable && e.preventDefault();
1400
+ }), Q.utils = {
1401
+ on: M,
1402
+ off: N,
1403
+ css: I,
1404
+ find: Pn,
1405
+ is: function(e, t) {
1406
+ return !!P(e, t, e, !1);
1407
+ },
1408
+ extend: Vn,
1409
+ throttle: Wn,
1410
+ closest: P,
1411
+ toggleClass: F,
1412
+ clone: qn,
1413
+ index: z,
1414
+ nextTick: Xr,
1415
+ cancelNextTick: Zr,
1416
+ detectDirection: Mr,
1417
+ getChild: In
1418
+ }, Q.get = function(e) {
1419
+ return e[B];
1420
+ }, Q.mount = function() {
1421
+ var e = [...arguments];
1422
+ e[0].constructor === Array && (e = e[0]), e.forEach(function(e) {
1423
+ if (!e.prototype || !e.prototype.constructor) throw `Sortable: Mounted plugin must be a constructor function, not ${{}.toString.call(e)}`;
1424
+ e.utils && (Q.utils = A(A({}, Q.utils), e.utils)), er.mount(e);
1425
+ });
1426
+ }, Q.create = function(e, t) {
1427
+ return new Q(e, t);
1428
+ }, Q.version = xn;
1429
+ var $ = [], Qr, $r, ei = !1, ti, ni, ri, ii;
1430
+ function ai() {
1431
+ function e() {
1432
+ for (var e in this.defaults = {
1433
+ scroll: !0,
1434
+ forceAutoScrollFallback: !1,
1435
+ scrollSensitivity: 30,
1436
+ scrollSpeed: 10,
1437
+ bubbleScroll: !0
1438
+ }, this) e.charAt(0) === "_" && typeof this[e] == "function" && (this[e] = this[e].bind(this));
1439
+ }
1440
+ return e.prototype = {
1441
+ dragStarted: function(e) {
1442
+ var t = e.originalEvent;
1443
+ this.sortable.nativeDraggable ? M(document, "dragover", this._handleAutoScroll) : this.options.supportPointer ? M(document, "pointermove", this._handleFallbackAutoScroll) : t.touches ? M(document, "touchmove", this._handleFallbackAutoScroll) : M(document, "mousemove", this._handleFallbackAutoScroll);
1444
+ },
1445
+ dragOverCompleted: function(e) {
1446
+ var t = e.originalEvent;
1447
+ !this.options.dragOverBubble && !t.rootEl && this._handleAutoScroll(t);
1448
+ },
1449
+ drop: function() {
1450
+ this.sortable.nativeDraggable ? N(document, "dragover", this._handleAutoScroll) : (N(document, "pointermove", this._handleFallbackAutoScroll), N(document, "touchmove", this._handleFallbackAutoScroll), N(document, "mousemove", this._handleFallbackAutoScroll)), si(), oi(), Gn();
1451
+ },
1452
+ nulling: function() {
1453
+ ri = $r = Qr = ei = ii = ti = ni = null, $.length = 0;
1454
+ },
1455
+ _handleFallbackAutoScroll: function(e) {
1456
+ this._handleAutoScroll(e, !0);
1457
+ },
1458
+ _handleAutoScroll: function(e, t) {
1459
+ var n = this, r = (e.touches ? e.touches[0] : e).clientX, i = (e.touches ? e.touches[0] : e).clientY, a = document.elementFromPoint(r, i);
1460
+ if (ri = e, t || this.options.forceAutoScrollFallback || wn || Cn || En) {
1461
+ ci(e, this.options, a, t);
1462
+ var o = Bn(a, !0);
1463
+ ei && (!ii || r !== ti || i !== ni) && (ii && si(), ii = setInterval(function() {
1464
+ var a = Bn(document.elementFromPoint(r, i), !0);
1465
+ a !== o && (o = a, oi()), ci(e, n.options, a, t);
1466
+ }, 10), ti = r, ni = i);
1467
+ } else {
1468
+ if (!this.options.bubbleScroll || Bn(a, !0) === L()) {
1469
+ oi();
1470
+ return;
1471
+ }
1472
+ ci(e, this.options, Bn(a, !1), !1);
1473
+ }
1474
+ }
1475
+ }, j(e, {
1476
+ pluginName: "scroll",
1477
+ initializeByDefault: !0
1478
+ });
1479
+ }
1480
+ function oi() {
1481
+ $.forEach(function(e) {
1482
+ clearInterval(e.pid);
1483
+ }), $ = [];
1484
+ }
1485
+ function si() {
1486
+ clearInterval(ii);
1487
+ }
1488
+ var ci = Wn(function(e, t, n, r) {
1489
+ if (t.scroll) {
1490
+ var i = (e.touches ? e.touches[0] : e).clientX, a = (e.touches ? e.touches[0] : e).clientY, o = t.scrollSensitivity, s = t.scrollSpeed, c = L(), l = !1, u;
1491
+ $r !== n && ($r = n, oi(), Qr = t.scroll, u = t.scrollFn, Qr === !0 && (Qr = Bn(n, !0)));
1492
+ var d = 0, f = Qr;
1493
+ do {
1494
+ var p = f, m = R(p), h = m.top, g = m.bottom, _ = m.left, v = m.right, y = m.width, b = m.height, x = void 0, S = void 0, ee = p.scrollWidth, C = p.scrollHeight, w = I(p), te = p.scrollLeft, ne = p.scrollTop;
1495
+ p === c ? (x = y < ee && (w.overflowX === "auto" || w.overflowX === "scroll" || w.overflowX === "visible"), S = b < C && (w.overflowY === "auto" || w.overflowY === "scroll" || w.overflowY === "visible")) : (x = y < ee && (w.overflowX === "auto" || w.overflowX === "scroll"), S = b < C && (w.overflowY === "auto" || w.overflowY === "scroll"));
1496
+ var re = x && (Math.abs(v - i) <= o && te + y < ee) - (Math.abs(_ - i) <= o && !!te), T = S && (Math.abs(g - a) <= o && ne + b < C) - (Math.abs(h - a) <= o && !!ne);
1497
+ if (!$[d]) for (var ie = 0; ie <= d; ie++) $[ie] || ($[ie] = {});
1498
+ ($[d].vx != re || $[d].vy != T || $[d].el !== p) && ($[d].el = p, $[d].vx = re, $[d].vy = T, clearInterval($[d].pid), (re != 0 || T != 0) && (l = !0, $[d].pid = setInterval(function() {
1499
+ r && this.layer === 0 && Q.active._onTouchMove(ri);
1500
+ var t = $[this.layer].vy ? $[this.layer].vy * s : 0, n = $[this.layer].vx ? $[this.layer].vx * s : 0;
1501
+ typeof u == "function" && u.call(Q.dragged.parentNode[B], n, t, e, ri, $[this.layer].el) !== "continue" || Kn($[this.layer].el, n, t);
1502
+ }.bind({ layer: d }), 24))), d++;
1503
+ } while (t.bubbleScroll && f !== c && (f = Bn(f, !1)));
1504
+ ei = l;
1505
+ }
1506
+ }, 30), li = function(e) {
1507
+ var t = e.originalEvent, n = e.putSortable, r = e.dragEl, i = e.activeSortable, a = e.dispatchSortableEvent, o = e.hideGhostForTarget, s = e.unhideGhostForTarget;
1508
+ if (t) {
1509
+ var c = n || i;
1510
+ o();
1511
+ var l = t.changedTouches && t.changedTouches.length ? t.changedTouches[0] : t, u = document.elementFromPoint(l.clientX, l.clientY);
1512
+ s(), c && !c.el.contains(u) && (a("spill"), this.onSpill({
1513
+ dragEl: r,
1514
+ putSortable: n
1515
+ }));
1516
+ }
1517
+ };
1518
+ function ui() {}
1519
+ ui.prototype = {
1520
+ startIndex: null,
1521
+ dragStart: function(e) {
1522
+ var t = e.oldDraggableIndex;
1523
+ this.startIndex = t;
1524
+ },
1525
+ onSpill: function(e) {
1526
+ var t = e.dragEl, n = e.putSortable;
1527
+ this.sortable.captureAnimationState(), n && n.captureAnimationState();
1528
+ var r = In(this.sortable.el, this.startIndex, this.options);
1529
+ r ? this.sortable.el.insertBefore(t, r) : this.sortable.el.appendChild(t), this.sortable.animateAll(), n && n.animateAll();
1530
+ },
1531
+ drop: li
1532
+ }, j(ui, { pluginName: "revertOnSpill" });
1533
+ function di() {}
1534
+ di.prototype = {
1535
+ onSpill: function(e) {
1536
+ var t = e.dragEl, n = e.putSortable || this.sortable;
1537
+ n.captureAnimationState(), t.parentNode && t.parentNode.removeChild(t), n.animateAll();
1538
+ },
1539
+ drop: li
1540
+ }, j(di, { pluginName: "removeOnSpill" }), Q.mount(new ai()), Q.mount(di, ui);
1541
+ function fi(e) {
1542
+ return e == null ? e : JSON.parse(JSON.stringify(e));
1543
+ }
1544
+ function pi(e) {
1545
+ u() && y(e);
1546
+ }
1547
+ function mi(e) {
1548
+ u() ? v(e) : h(e);
1549
+ }
1550
+ var hi = null, gi = null;
1551
+ function _i(e = null, t = null) {
1552
+ hi = e, gi = t;
1553
+ }
1554
+ function vi() {
1555
+ return {
1556
+ data: hi,
1557
+ clonedData: gi
1558
+ };
1559
+ }
1560
+ var yi = Symbol("cloneElement");
1561
+ function bi(...e) {
1562
+ let t = u()?.proxy, n = null, r = e[0], [, i, a] = e;
1563
+ Array.isArray(T(i)) || (a = i, i = null);
1564
+ let o = null, { immediate: s = !0, clone: c = fi, forceFallback: l, fallbackOnBody: d, customUpdate: f } = T(a) ?? {};
1565
+ function m(e) {
1566
+ let { from: t, oldIndex: r, item: a } = e, o = Array.from(t.childNodes);
1567
+ n = l && !d ? o.slice(0, -1) : o;
1568
+ let s = T(T(i)?.[r]), u = c(s);
1569
+ _i(s, u), a[yi] = u;
1570
+ }
1571
+ function g(e) {
1572
+ let t = e.item[yi];
1573
+ if (!an(t)) {
1574
+ if (cn(e.item), p(i)) {
1575
+ let n = [...T(i)];
1576
+ i.value = rn(n, e.newDraggableIndex, t);
1577
+ return;
1578
+ }
1579
+ rn(T(i), e.newDraggableIndex, t);
1580
+ }
1581
+ }
1582
+ function _(e) {
1583
+ let { from: t, item: n, oldIndex: r, oldDraggableIndex: a, pullMode: o, clone: s } = e;
1584
+ if (sn(t, n, r), o === "clone") {
1585
+ cn(s);
1586
+ return;
1587
+ }
1588
+ if (p(i)) {
1589
+ let e = [...T(i)];
1590
+ i.value = nn(e, a);
1591
+ return;
1592
+ }
1593
+ nn(T(i), a);
1594
+ }
1595
+ function v(e) {
1596
+ if (f) {
1597
+ f(e);
1598
+ return;
1599
+ }
1600
+ let { from: t, item: n, oldIndex: r, oldDraggableIndex: a, newDraggableIndex: o } = e;
1601
+ if (cn(n), sn(t, n, r), p(i)) {
1602
+ let e = [...T(i)];
1603
+ i.value = $t(e, a, o);
1604
+ return;
1605
+ }
1606
+ $t(T(i), a, o);
1607
+ }
1608
+ function y(e) {
1609
+ let { newIndex: t, oldIndex: r, from: i, to: a } = e, o = null, s = t === r && i === a;
1610
+ try {
1611
+ if (s) {
1612
+ let e = null;
1613
+ n?.some((t, r) => {
1614
+ if (e && n?.length !== a.childNodes.length) return i.insertBefore(e, t.nextSibling), !0;
1615
+ let o = a.childNodes[r];
1616
+ e = a?.replaceChild(t, o);
1617
+ });
1618
+ }
1619
+ } catch (e) {
1620
+ o = e;
1621
+ } finally {
1622
+ n = null;
1623
+ }
1624
+ h(() => {
1625
+ if (_i(), o) throw o;
1626
+ });
1627
+ }
1628
+ let b = {
1629
+ onUpdate: v,
1630
+ onStart: m,
1631
+ onAdd: g,
1632
+ onRemove: _,
1633
+ onEnd: y
1634
+ };
1635
+ function x(e) {
1636
+ let n = T(r);
1637
+ return e ||= on(n) ? ln(n, t?.$el) : n, e && !fn(e) && (e = e.$el), e || Qt("Root element not found"), e;
1638
+ }
1639
+ function S() {
1640
+ let e = T(a) ?? {}, { immediate: t, clone: n } = e, r = Yt(e, ["immediate", "clone"]);
1641
+ return pn(r, (e, t) => {
1642
+ mn(e) && (r[e] = (e, ...n) => (hn(e, vi()), t(e, ...n)));
1643
+ }), dn(i === null ? {} : b, r);
1644
+ }
1645
+ let ee = (e) => {
1646
+ e = x(e), o && C.destroy(), o = new Q(e, S());
1647
+ };
1648
+ ie(() => a, () => {
1649
+ o && pn(S(), (e, t) => {
1650
+ o?.option(e, t);
1651
+ });
1652
+ }, { deep: !0 });
1653
+ let C = {
1654
+ option: (e, t) => o?.option(e, t),
1655
+ destroy: () => {
1656
+ o?.destroy(), o = null;
1657
+ },
1658
+ save: () => o?.save(),
1659
+ toArray: () => o?.toArray(),
1660
+ closest: (...e) => o?.closest(...e)
1661
+ };
1662
+ return mi(() => {
1663
+ s && ee();
1664
+ }), pi(C.destroy), Jt({
1665
+ start: ee,
1666
+ pause: () => C?.option("disabled", !0),
1667
+ resume: () => C?.option("disabled", !1)
1668
+ }, C);
1669
+ }
1670
+ var xi = [
1671
+ "update",
1672
+ "start",
1673
+ "add",
1674
+ "remove",
1675
+ "choose",
1676
+ "unchoose",
1677
+ "end",
1678
+ "sort",
1679
+ "filter",
1680
+ "clone",
1681
+ "move",
1682
+ "change"
1683
+ ], Si = l({
1684
+ name: "VueDraggable",
1685
+ model: {
1686
+ prop: "modelValue",
1687
+ event: "update:modelValue"
1688
+ },
1689
+ props: [
1690
+ "clone",
1691
+ "animation",
1692
+ "ghostClass",
1693
+ "group",
1694
+ "sort",
1695
+ "disabled",
1696
+ "store",
1697
+ "handle",
1698
+ "draggable",
1699
+ "swapThreshold",
1700
+ "invertSwap",
1701
+ "invertedSwapThreshold",
1702
+ "removeCloneOnHide",
1703
+ "direction",
1704
+ "chosenClass",
1705
+ "dragClass",
1706
+ "ignore",
1707
+ "filter",
1708
+ "preventOnFilter",
1709
+ "easing",
1710
+ "setData",
1711
+ "dropBubble",
1712
+ "dragoverBubble",
1713
+ "dataIdAttr",
1714
+ "delay",
1715
+ "delayOnTouchOnly",
1716
+ "touchStartThreshold",
1717
+ "forceFallback",
1718
+ "fallbackClass",
1719
+ "fallbackOnBody",
1720
+ "fallbackTolerance",
1721
+ "fallbackOffset",
1722
+ "supportPointer",
1723
+ "emptyInsertThreshold",
1724
+ "scroll",
1725
+ "forceAutoScrollFallback",
1726
+ "scrollSensitivity",
1727
+ "scrollSpeed",
1728
+ "bubbleScroll",
1729
+ "modelValue",
1730
+ "tag",
1731
+ "target",
1732
+ "customUpdate",
1733
+ ...xi.map((e) => `on${e.replace(/^\S/, (e) => e.toUpperCase())}`)
1734
+ ],
1735
+ emits: ["update:modelValue", ...xi],
1736
+ setup(e, { slots: t, emit: n, expose: i, attrs: a }) {
1737
+ let o = xi.reduce((e, t) => {
1738
+ let r = `on${t.replace(/^\S/, (e) => e.toUpperCase())}`;
1739
+ return e[r] = (...e) => n(t, ...e), e;
1740
+ }, {}), s = r(() => {
1741
+ let t = re(e), { modelValue: n } = t, r = Yt(t, ["modelValue"]), i = Object.entries(r).reduce((e, [t, n]) => {
1742
+ let r = T(n);
1743
+ return r !== void 0 && (e[t] = r), e;
1744
+ }, {});
1745
+ return Jt(Jt({}, o), tn(Jt(Jt({}, a), i)));
1746
+ }), c = r({
1747
+ get: () => e.modelValue,
1748
+ set: (e) => n("update:modelValue", e)
1749
+ }), l = ee(), u = S(bi(e.target || l, c, s));
1750
+ return i(u), () => d(e.tag || "div", { ref: l }, (t?.default)?.call(t, u));
1751
+ }
1752
+ }), Ci = {
1753
+ mounted: "mounted",
1754
+ unmounted: "unmounted"
1755
+ };
1756
+ Ci.mounted, Ci.unmounted;
1757
+ //#endregion
1758
+ //#region src/composables/context.composable.ts
1759
+ function wi(e) {
1760
+ let t = Symbol(e);
1761
+ function n(e) {
1762
+ return x(t, e), e;
1763
+ }
1764
+ function r(n) {
1765
+ let r = f(t, n ?? void 0);
1766
+ if (r === void 0 && n === void 0) throw Error(`${e} context is not provided.`);
1767
+ return r ?? null;
1768
+ }
1769
+ return [n, r];
1770
+ }
1771
+ //#endregion
1772
+ //#region src/context/customViewManager.context.ts
1773
+ var [Ti, Ei] = wi("customViewManagerContext");
1774
+ //#endregion
1775
+ //#region src/actions/customViewCreateView.action.ts
1776
+ function Di() {
1777
+ let e = D(), t = Te().create(Vt), n = Ei();
1778
+ return vt({
1779
+ id: "custom-view-save-to-new-view",
1780
+ name: () => e.t("action.custom_view.create"),
1781
+ execute: () => {
1782
+ t.open({ onSave: (e) => {
1783
+ n.createView(e), t.close();
1784
+ } });
1785
+ },
1786
+ group: n.actionGroup,
1787
+ icon: () => Oe
1788
+ });
1789
+ }
1790
+ //#endregion
1791
+ //#region src/actions/customViewSaveToCurrentView.action.ts
1792
+ function Oi() {
1793
+ let e = D(), t = Ei();
1794
+ return vt({
1795
+ id: "custom-view-save-to-current-view",
1796
+ isApplicable: () => t.activeView.value.isEditable,
1797
+ name: () => e.t("action.custom_view.save_to_current"),
1798
+ execute: () => {
1799
+ t.saveToCurrentView();
1800
+ },
1801
+ group: t.actionGroup,
1802
+ icon: () => ke
1803
+ });
1804
+ }
1805
+ //#endregion
1806
+ //#region src/actions/customViewDeleteView.action.ts
1807
+ function ki() {
1808
+ let e = D(), t = Te().create(ue), n = Ei();
1809
+ return vt({
1810
+ id: "custom-view-delete-view",
1811
+ isApplicable: (e) => {
1812
+ if (n.views.value.length === 1) return !1;
1813
+ let t = e.targetedModelOfType("CustomView");
1814
+ return t === null ? !1 : t.isEditable;
1815
+ },
1816
+ name: () => e.t("action.custom_view.delete"),
1817
+ execute: (r) => {
1818
+ let i = r.targetedModelOfTypeOrThrow("CustomView");
1819
+ t.open({
1820
+ title: e.t("action.custom_view.delete_confirm_title"),
1821
+ isDestructive: !0,
1822
+ confirmLabel: e.t("action.custom_view.delete_confirm_label"),
1823
+ description: e.t("action.custom_view.delete_confirm_description", { name: i.name }),
1824
+ onConfirm: () => {
1825
+ n.deleteView(i.id), t.close();
1826
+ }
1827
+ });
1828
+ },
1829
+ group: n.actionGroup,
1830
+ icon: () => ot,
1831
+ separatorGroup: "delete"
1832
+ });
1833
+ }
1834
+ //#endregion
1835
+ //#region src/actions/customViewEditView.action.ts
1836
+ function Ai() {
1837
+ let e = D(), t = Te().create(Ht), n = Ei();
1838
+ return vt({
1839
+ id: "custom-view-edit-view",
1840
+ isApplicable: (e) => {
1841
+ let t = e.targetedModelOfType("CustomView");
1842
+ return t === null ? !1 : t.isEditable;
1843
+ },
1844
+ name: () => e.t("action.custom_view.edit"),
1845
+ execute: (e) => {
1846
+ let r = e.targetedModelOfTypeOrThrow("CustomView");
1847
+ t.open({
1848
+ view: r,
1849
+ onSave: (e) => {
1850
+ n.updateViewMeta(r.id, e), t.close();
1851
+ }
1852
+ });
1853
+ },
1854
+ group: n.actionGroup,
1855
+ icon: () => Be
1856
+ });
1857
+ }
1858
+ //#endregion
1859
+ //#region src/components/views/CustomViewViewsItem.vue?vue&type=script&setup=true&lang.ts
1860
+ var ji = { class: "flex h-6 items-center overflow-hidden rounded-sm border border-secondary duration-100 hover:bg-secondary" }, Mi = { class: "text-xs text-primary" }, Ni = /* @__PURE__ */ l({
1861
+ __name: "CustomViewViewsItem",
1862
+ props: {
1863
+ isSelected: { type: Boolean },
1864
+ view: {},
1865
+ viewIndex: {}
1866
+ },
1867
+ emits: ["select"],
1868
+ setup(e, { emit: t }) {
1869
+ let n = e, r = t, o = Ai(), l = ki();
1870
+ return (t, u) => (b(), i(T(se), {
1871
+ label: n.view.name,
1872
+ "keyboard-shortcut": e.viewIndex < 9 ? { key: `${e.viewIndex + 1}` } : null
1873
+ }, {
1874
+ default: E(() => [s("div", ji, [c(T(ae), {
1875
+ "current-context-only": !0,
1876
+ actions: [T(o), T(l)],
1877
+ models: [{
1878
+ modelName: "CustomView",
1879
+ ...n.view,
1880
+ key: n.view.id
1881
+ }]
1882
+ }, {
1883
+ default: E(() => [c(T(le), { class: "h-full rounded-none" }, {
1884
+ default: E(() => [s("button", {
1885
+ class: g({ "bg-tertiary": n.isSelected }),
1886
+ onClick: u[0] ||= (e) => r("select", n.view.id)
1887
+ }, [c(T(xe), {
1888
+ gap: "none",
1889
+ class: "duration-100 active:scale-98 active:will-change-transform"
1890
+ }, {
1891
+ default: E(() => [c(T(xe), {
1892
+ gap: "xs",
1893
+ class: "px-sm"
1894
+ }, {
1895
+ default: E(() => [n.view.icon === null ? a("", !0) : (b(), i(w(T(It)(n.view.icon)), {
1896
+ key: 0,
1897
+ style: _({ color: T(Nt)(n.view.color) }),
1898
+ class: "size-3"
1899
+ }, null, 8, ["style"])), s("span", Mi, ne(n.view.name), 1)]),
1900
+ _: 1
1901
+ })]),
1902
+ _: 1
1903
+ })], 2)]),
1904
+ _: 1
1905
+ })]),
1906
+ _: 1
1907
+ }, 8, ["actions", "models"])])]),
1908
+ _: 1
1909
+ }, 8, ["label", "keyboard-shortcut"]));
1910
+ }
1911
+ }), Pi = /* @__PURE__ */ l({
1912
+ __name: "CustomViewViews",
1913
+ setup(e) {
1914
+ let t = D(), r = Ei(), s = Di(), l = Oi(), u = ee([...r.views.value]);
1915
+ ie(() => r.views.value, (e) => {
1916
+ u.value = [...e];
1917
+ });
1918
+ function d() {
1919
+ r.reorderViews(u.value);
1920
+ }
1921
+ return (e, f) => (b(), i(T(xe), null, {
1922
+ default: E(() => [c(T(Si), {
1923
+ modelValue: u.value,
1924
+ "onUpdate:modelValue": f[0] ||= (e) => u.value = e,
1925
+ animation: 150,
1926
+ class: "flex flex-row items-center gap-1",
1927
+ onEnd: d
1928
+ }, {
1929
+ default: E(() => [(b(!0), o(n, null, C(u.value, (e, t) => (b(), i(Ni, {
1930
+ key: e.id,
1931
+ view: e,
1932
+ "is-selected": e.id === T(r).activeView.value.id,
1933
+ "view-index": t,
1934
+ onSelect: T(r).setActiveView
1935
+ }, null, 8, [
1936
+ "view",
1937
+ "is-selected",
1938
+ "view-index",
1939
+ "onSelect"
1940
+ ]))), 128))]),
1941
+ _: 1
1942
+ }, 8, ["modelValue"]), T(r).isDirty.value ? (b(), o(n, { key: 0 }, [c(T(Se), {
1943
+ class: "h-5",
1944
+ orientation: "vertical"
1945
+ }), c(T(oe), {
1946
+ "current-context-only": !1,
1947
+ actions: [T(l), T(s)],
1948
+ "popover-side": "bottom",
1949
+ "popover-align": "end"
1950
+ }, {
1951
+ default: E(() => [c(T(ce), {
1952
+ "icon-right": T(Fe),
1953
+ label: T(t).t("component.custom_view_list.save"),
1954
+ size: "sm",
1955
+ variant: "secondary"
1956
+ }, null, 8, ["icon-right", "label"])]),
1957
+ _: 1
1958
+ }, 8, ["actions"])], 64)) : a("", !0)]),
1959
+ _: 1
1960
+ }));
1961
+ }
1962
+ });
1963
+ //#endregion
1964
+ //#region src/composables/customViewManager.composable.ts
1965
+ function Fi({ seedViews: e, state: t, storageAdapter: n }) {
1966
+ let i = D(), a = te(d());
1967
+ St(a.value.length > 0, "At least 1 view is required");
1968
+ let o = bt("view", null), s = {
1969
+ name: () => i.t("action.custom_view.group_name"),
1970
+ priority: _t.VIEW
1971
+ }, c = r(() => a.value.find((e) => e.id === o.value) ?? a.value[0]), l = r(() => t.some((e) => {
1972
+ let t = c.value.state[e.key], n = t == null ? null : e.deserialize(t);
1973
+ return e.isDirty(n, e.getCurrentState());
1974
+ }));
1975
+ function u(e, t) {
1976
+ return t.some((t) => t.id === e.id);
1977
+ }
1978
+ function d() {
1979
+ let t = n.load();
1980
+ return [...e.filter((e) => !u(e, t)), ...t];
1981
+ }
1982
+ function f(e) {
1983
+ let t = new Set(a.value.map((e) => e.id)), n = xt.slugify(e.name), r = n, i = 1;
1984
+ for (; t.has(r);) r = `${n}-${i}`, i++;
1985
+ let o = {
1986
+ id: r,
1987
+ isEditable: !0,
1988
+ name: e.name,
1989
+ color: e.color,
1990
+ icon: e.icon,
1991
+ state: v()
1992
+ };
1993
+ a.value = [...a.value, o], y(), h(r);
1994
+ }
1995
+ function p() {
1996
+ let e = c.value;
1997
+ e.isEditable && (a.value = a.value.map((t) => t.id === e.id ? {
1998
+ ...t,
1999
+ state: v()
2000
+ } : t), y());
2001
+ }
2002
+ function m(e) {
2003
+ o.value === e && (o.value = null), a.value = a.value.filter((t) => t.id !== e), y();
2004
+ }
2005
+ function h(e) {
2006
+ o.value = e;
2007
+ }
2008
+ function g(e, t) {
2009
+ a.value = a.value.map((n) => n.id === e ? {
2010
+ ...n,
2011
+ ...t
2012
+ } : n), y();
2013
+ }
2014
+ function _(e) {
2015
+ a.value = e, y();
2016
+ }
2017
+ function v() {
2018
+ let e = {};
2019
+ for (let n of t) {
2020
+ let t = n.getCurrentState();
2021
+ e[n.key] = n.serialize(t);
2022
+ }
2023
+ return e;
2024
+ }
2025
+ function y() {
2026
+ n.save(a.value);
2027
+ }
2028
+ function b(e) {
2029
+ x(e);
2030
+ }
2031
+ function x(e) {
2032
+ for (let n of t) {
2033
+ let t = e.state[n.key], r = t == null ? null : n.deserialize(t);
2034
+ n.apply(r);
2035
+ }
2036
+ }
2037
+ ie(c, b, { immediate: !0 });
2038
+ for (let e = 0; e < 9; e += 1) yt({
2039
+ key: `${e + 1}`,
2040
+ shift: !0
2041
+ }, () => {
2042
+ let t = a.value[e] ?? null;
2043
+ t !== null && h(t.id);
2044
+ }, { conflictBehavior: "replace" }), yt({ key: `${e + 1}` }, () => {
2045
+ let t = a.value[e] ?? null;
2046
+ t !== null && h(t.id);
2047
+ }, { conflictBehavior: "replace" });
2048
+ let S = {
2049
+ isDirty: l,
2050
+ actionGroup: s,
2051
+ activeView: c,
2052
+ createView: f,
2053
+ deleteView: m,
2054
+ reorderViews: _,
2055
+ saveToCurrentView: p,
2056
+ setActiveView: h,
2057
+ updateViewMeta: g,
2058
+ views: r(() => a.value)
2059
+ };
2060
+ return Ti(S), S;
2061
+ }
2062
+ //#endregion
2063
+ export { O as CUSTOM_VIEW_COLOR, Mt as CUSTOM_VIEW_COLORS_MAP, k as CUSTOM_VIEW_ICON, Ft as CUSTOM_VIEW_ICONS_MAP, Pt as CustomViewColorPicker, Vt as CustomViewCreateDialog, Bt as CustomViewIconPicker, Pi as CustomViewList, Ht as CustomViewUpdateDialog, Ot as createCustomViewFilterStateAdapter, jt as createCustomViewLocalStorageAdapter, kt as createCustomViewSearchStateAdapter, Ct as createCustomViewStateAdapter, At as createCustomViewTableColumnsStateAdapter, Nt as getCustomViewColor, It as getCustomViewIconComponent, Fi as useCustomViewManager, Ei as useInjectCustomViewManagerContext, Ti as useProvideCustomViewManagerContext };