@trintel/zooy 1.0.16 → 1.1.1

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 (213) hide show
  1. package/dist/chunks/component-library-registry-BBQV6Kpv.js +1 -0
  2. package/dist/chunks/component-library-registry-DB5UeqC2.js +58 -0
  3. package/dist/chunks/register-D3pWAXhm.js +266 -0
  4. package/dist/chunks/register-D7SMu1Gy.js +1372 -0
  5. package/dist/chunks/register-HYODt48Q.js +1 -0
  6. package/dist/chunks/register-g5KUNRdI.js +1 -0
  7. package/dist/chunks/tree-utils-B2JEGXHR.js +267 -0
  8. package/dist/chunks/tree-utils-BYnipT-p.js +1 -0
  9. package/dist/chunks/zoo-CY2QpG41.js +52 -0
  10. package/dist/chunks/zoo-DgdxBjlN.js +390 -0
  11. package/dist/zooy.cjs.js +19 -1
  12. package/dist/zooy.es.js +1298 -20
  13. package/package.json +8 -6
  14. package/dist/chunks/16-30f5E9no.js +0 -1
  15. package/dist/chunks/16-4Ffg4DOO.js +0 -1
  16. package/dist/chunks/16-8pr5mbIO.js +0 -28
  17. package/dist/chunks/16-B56B50XT.js +0 -1
  18. package/dist/chunks/16-BFJN6B6d.js +0 -39
  19. package/dist/chunks/16-BTonF5Je.js +0 -29
  20. package/dist/chunks/16-BXti8Tu-.js +0 -62
  21. package/dist/chunks/16-BiShwKPX.js +0 -28
  22. package/dist/chunks/16-BwDdccyH.js +0 -33
  23. package/dist/chunks/16-C7Xs-wKv.js +0 -1
  24. package/dist/chunks/16-CDRTWf-C.js +0 -21
  25. package/dist/chunks/16-CMCRqVYz.js +0 -1
  26. package/dist/chunks/16-CSWwhDUY.js +0 -21
  27. package/dist/chunks/16-CpNRIuiB.js +0 -1
  28. package/dist/chunks/16-CqC9427V.js +0 -21
  29. package/dist/chunks/16-Cubm18Em.js +0 -1
  30. package/dist/chunks/16-D3Ol0pdg.js +0 -21
  31. package/dist/chunks/16-DH311Of_.js +0 -1
  32. package/dist/chunks/16-Dlq3qxDh.js +0 -1
  33. package/dist/chunks/16-Drl9-5Gn.js +0 -21
  34. package/dist/chunks/16-Dt4v0bcc.js +0 -1
  35. package/dist/chunks/16-DylBiJnm.js +0 -1
  36. package/dist/chunks/20-CQLnFcRb.js +0 -84
  37. package/dist/chunks/20-Df0dXwyx.js +0 -1
  38. package/dist/chunks/button-D3QMXGP6.js +0 -66
  39. package/dist/chunks/button-cEVHuDC9.js +0 -272
  40. package/dist/chunks/button-skeleton-BuDQrAgi.js +0 -21
  41. package/dist/chunks/button-skeleton-CxKOKEQr.js +0 -49
  42. package/dist/chunks/carbon-element-CbfPUYRT.js +0 -1
  43. package/dist/chunks/carbon-element-DzDuXiyl.js +0 -25
  44. package/dist/chunks/checkbox-B_b_oOJ5.js +0 -40
  45. package/dist/chunks/checkbox-CsuLOYIT.js +0 -201
  46. package/dist/chunks/class-map-BwrbvkxB.js +0 -5
  47. package/dist/chunks/class-map-CgGieoOz.js +0 -32
  48. package/dist/chunks/collection-helpers-Bk68Vaau.js +0 -7
  49. package/dist/chunks/collection-helpers-afBvMQaC.js +0 -1
  50. package/dist/chunks/content-switcher-item-C1gdd6k4.js +0 -351
  51. package/dist/chunks/content-switcher-item-c0sXBGJ-.js +0 -27
  52. package/dist/chunks/defs-C88lSWuJ.js +0 -1
  53. package/dist/chunks/defs-Do0OvCKd.js +0 -1165
  54. package/dist/chunks/directive-Dp4ZTz-F.js +0 -5
  55. package/dist/chunks/directive-kLG6oqUu.js +0 -27
  56. package/dist/chunks/dropdown-item-T1jCm1fo.js +0 -69
  57. package/dist/chunks/dropdown-item-Wc8Nj3w-.js +0 -632
  58. package/dist/chunks/focus-B3iymVyL.js +0 -1
  59. package/dist/chunks/focus-WnKGH_xB.js +0 -20
  60. package/dist/chunks/form-D6Tce4-W.js +0 -1
  61. package/dist/chunks/form-DpI-v6DA.js +0 -20
  62. package/dist/chunks/host-listener-CN245INl.js +0 -37
  63. package/dist/chunks/host-listener-DD3oGxvg.js +0 -16
  64. package/dist/chunks/host-listener-gxrTpxgv.js +0 -1
  65. package/dist/chunks/host-listener-rUcT_LUW.js +0 -1
  66. package/dist/chunks/icon-loader-CTCoE5GC.js +0 -7
  67. package/dist/chunks/icon-loader-C_ze306U.js +0 -1
  68. package/dist/chunks/icon-loader-utils-DSajrZop.js +0 -117
  69. package/dist/chunks/icon-loader-utils-DxaQOvJB.js +0 -5
  70. package/dist/chunks/if-defined-7syLabv-.js +0 -10
  71. package/dist/chunks/if-defined-CfI-rREy.js +0 -5
  72. package/dist/chunks/if-non-empty-CsjL_4Ck.js +0 -5
  73. package/dist/chunks/if-non-empty-Dp8CFMva.js +0 -1
  74. package/dist/chunks/index-24ucriY6.js +0 -4
  75. package/dist/chunks/index-5uuGFlSc.js +0 -1
  76. package/dist/chunks/index-ACUVets3.js +0 -188
  77. package/dist/chunks/index-B-VOos8Q.js +0 -108
  78. package/dist/chunks/index-B-qA_3dy.js +0 -52
  79. package/dist/chunks/index-B0PkuE0I.js +0 -188
  80. package/dist/chunks/index-B1QlHHpn.js +0 -381
  81. package/dist/chunks/index-B2dVOGmx.js +0 -458
  82. package/dist/chunks/index-BEAD73rD.js +0 -17
  83. package/dist/chunks/index-BEyeMcZh.js +0 -25
  84. package/dist/chunks/index-BJ3okuBC.js +0 -78
  85. package/dist/chunks/index-BJNdKx6x.js +0 -23
  86. package/dist/chunks/index-BL8xz2V4.js +0 -161
  87. package/dist/chunks/index-BL_Y57_H.js +0 -57
  88. package/dist/chunks/index-BLxE94Et.js +0 -3
  89. package/dist/chunks/index-BP0bDhTG.js +0 -2340
  90. package/dist/chunks/index-BUXzbqzT.js +0 -364
  91. package/dist/chunks/index-BVDZj6Fh.js +0 -76
  92. package/dist/chunks/index-BWqDKfds.js +0 -62
  93. package/dist/chunks/index-BaVSzIan.js +0 -79
  94. package/dist/chunks/index-BatQ1Mfz.js +0 -25
  95. package/dist/chunks/index-BefBe_sK.js +0 -19
  96. package/dist/chunks/index-BekoThXC.js +0 -49
  97. package/dist/chunks/index-BnOH6_4r.js +0 -103
  98. package/dist/chunks/index-Bnfa6YBY.js +0 -71
  99. package/dist/chunks/index-BrtdLKIG.js +0 -455
  100. package/dist/chunks/index-BtFYirUg.js +0 -44
  101. package/dist/chunks/index-BtHVJn7K.js +0 -75
  102. package/dist/chunks/index-Bu7ZAHDG.js +0 -12
  103. package/dist/chunks/index-BxRbUwdY.js +0 -30
  104. package/dist/chunks/index-ByQl0Dwz.js +0 -9
  105. package/dist/chunks/index-C-PAoN2Y.js +0 -25
  106. package/dist/chunks/index-C2-pFkgT.js +0 -406
  107. package/dist/chunks/index-C2r3MkpB.js +0 -252
  108. package/dist/chunks/index-C5DwYOee.js +0 -89
  109. package/dist/chunks/index-C5euLddc.js +0 -46
  110. package/dist/chunks/index-C89rc2i5.js +0 -35
  111. package/dist/chunks/index-C8IUL9KS.js +0 -22
  112. package/dist/chunks/index-C99Nf_aK.js +0 -15
  113. package/dist/chunks/index-CDaECc1q.js +0 -12
  114. package/dist/chunks/index-CIeU44CB.js +0 -97
  115. package/dist/chunks/index-CL8Un64Y.js +0 -150
  116. package/dist/chunks/index-CQ1zfW-Z.js +0 -22
  117. package/dist/chunks/index-CR6HxSEn.js +0 -15
  118. package/dist/chunks/index-CSH8oUIN.js +0 -36
  119. package/dist/chunks/index-CTB8Esah.js +0 -1
  120. package/dist/chunks/index-CX6f-3xD.js +0 -563
  121. package/dist/chunks/index-CXSCYGFC.js +0 -452
  122. package/dist/chunks/index-CZQ45Dj9.js +0 -1
  123. package/dist/chunks/index-Cc-HBEN2.js +0 -150
  124. package/dist/chunks/index-Cf3ALdZ-.js +0 -4
  125. package/dist/chunks/index-Cid77wr3.js +0 -45
  126. package/dist/chunks/index-ClBPGpC0.js +0 -129
  127. package/dist/chunks/index-CmXHpydu.js +0 -121
  128. package/dist/chunks/index-CsaKV6jI.js +0 -511
  129. package/dist/chunks/index-CvxrJ8vE.js +0 -39
  130. package/dist/chunks/index-Cy6EogCp.js +0 -429
  131. package/dist/chunks/index-CyTN35KA.js +0 -424
  132. package/dist/chunks/index-D3hwHwSn.js +0 -243
  133. package/dist/chunks/index-D6Eg6Zh4.js +0 -22
  134. package/dist/chunks/index-D7GY2E-B.js +0 -8
  135. package/dist/chunks/index-DCqxl0e0.js +0 -26
  136. package/dist/chunks/index-DDKqKtU4.js +0 -15
  137. package/dist/chunks/index-DHksIe-y.js +0 -1
  138. package/dist/chunks/index-DI-PunST.js +0 -224
  139. package/dist/chunks/index-DIWoAC3Z.js +0 -74
  140. package/dist/chunks/index-DLWyvZrE.js +0 -21
  141. package/dist/chunks/index-DLa-KLg_.js +0 -881
  142. package/dist/chunks/index-DLwGUJd2.js +0 -25
  143. package/dist/chunks/index-DMIKb9St.js +0 -2
  144. package/dist/chunks/index-DOfvb1f6.js +0 -79
  145. package/dist/chunks/index-DQoGlgyI.js +0 -1
  146. package/dist/chunks/index-DR8UmItB.js +0 -1
  147. package/dist/chunks/index-DUiT0Yz_.js +0 -57
  148. package/dist/chunks/index-DW1p-hc-.js +0 -1604
  149. package/dist/chunks/index-DbPU3mfX.js +0 -368
  150. package/dist/chunks/index-DgI4_4yz.js +0 -37
  151. package/dist/chunks/index-DhPg7DCD.js +0 -1
  152. package/dist/chunks/index-Dj-7w7wt.js +0 -65
  153. package/dist/chunks/index-DjSdHUmw.js +0 -284
  154. package/dist/chunks/index-DpCo2duE.js +0 -87
  155. package/dist/chunks/index-DqLDehu6.js +0 -111
  156. package/dist/chunks/index-Ds3e0NlH.js +0 -285
  157. package/dist/chunks/index-DsKNYemW.js +0 -295
  158. package/dist/chunks/index-DwGKd66A.js +0 -259
  159. package/dist/chunks/index-FAwjNd-C.js +0 -4
  160. package/dist/chunks/index-HTZtnvAV.js +0 -81
  161. package/dist/chunks/index-JUJu4Jsu.js +0 -235
  162. package/dist/chunks/index-JmiGhJR9.js +0 -1
  163. package/dist/chunks/index-K3aE8_a_.js +0 -45
  164. package/dist/chunks/index-LVNWqV95.js +0 -683
  165. package/dist/chunks/index-NduNWecG.js +0 -88
  166. package/dist/chunks/index-QOHPo0v8.js +0 -19
  167. package/dist/chunks/index-TnoTOPwm.js +0 -158
  168. package/dist/chunks/index-UIEjSWhu.js +0 -58
  169. package/dist/chunks/index-WQ40q6Fp.js +0 -77
  170. package/dist/chunks/index-a_56_OA-.js +0 -776
  171. package/dist/chunks/index-azaqRvif.js +0 -27
  172. package/dist/chunks/index-dT_yGOFJ.js +0 -1
  173. package/dist/chunks/index-kjtnf5Y1.js +0 -66
  174. package/dist/chunks/index-lOiJBnZe.js +0 -160
  175. package/dist/chunks/index-sl9jQQX-.js +0 -36
  176. package/dist/chunks/index-vkfOeAd5.js +0 -260
  177. package/dist/chunks/index-z2pAR1iR.js +0 -337
  178. package/dist/chunks/loading-icon-9-L_8sVv.js +0 -16
  179. package/dist/chunks/loading-icon-CMPQny72.js +0 -24
  180. package/dist/chunks/main-CXPn-jnk.js +0 -4260
  181. package/dist/chunks/main-CZIPBRMI.js +0 -88
  182. package/dist/chunks/on-BPhwbVf3.js +0 -10
  183. package/dist/chunks/on-XRofyGQh.js +0 -1
  184. package/dist/chunks/property-BIgIlh0E.js +0 -5
  185. package/dist/chunks/property-CTp3Zz2M.js +0 -36
  186. package/dist/chunks/query-CbRg6ZGy.js +0 -23
  187. package/dist/chunks/query-Dh8joWcT.js +0 -9
  188. package/dist/chunks/radio-group-manager-DBAEmhDM.js +0 -1
  189. package/dist/chunks/radio-group-manager-Du5wSOS1.js +0 -102
  190. package/dist/chunks/register-BgvWUC9m.js +0 -11035
  191. package/dist/chunks/register-CFDNay1l.js +0 -1
  192. package/dist/chunks/register-DyYwnhHb.js +0 -2157
  193. package/dist/chunks/register-HH_4Uw0Q.js +0 -1678
  194. package/dist/chunks/search-CC47funo.js +0 -241
  195. package/dist/chunks/search-DB4cjN-w.js +0 -31
  196. package/dist/chunks/select-item-D6rKfA9z.js +0 -80
  197. package/dist/chunks/select-item-Dj2fYOn6.js +0 -364
  198. package/dist/chunks/settings-Bgpv8zuU.js +0 -62
  199. package/dist/chunks/settings-jvP7vP60.js +0 -66
  200. package/dist/chunks/shared-enums-BJDDuJr7.js +0 -1
  201. package/dist/chunks/shared-enums-DALKjQ7e.js +0 -7
  202. package/dist/chunks/state-4XYw1ZN5.js +0 -12
  203. package/dist/chunks/state-BoZ0xvIn.js +0 -5
  204. package/dist/chunks/text-input-BUBwT5gK.js +0 -68
  205. package/dist/chunks/text-input-Dpl3TIYz.js +0 -372
  206. package/dist/chunks/tooltip-content-BV1N7BVi.js +0 -3
  207. package/dist/chunks/tooltip-content-UQcG3dlT.js +0 -135
  208. package/dist/chunks/tslib.es6-B07k2eac.js +0 -1
  209. package/dist/chunks/tslib.es6-C5gLNDSD.js +0 -160
  210. package/dist/chunks/unsafe-html-CCJqBESk.js +0 -5
  211. package/dist/chunks/unsafe-html-KUWR4Xn7.js +0 -27
  212. package/dist/chunks/validity-BMLNCMmP.js +0 -1
  213. package/dist/chunks/validity-CTz7ivUd.js +0 -59
package/dist/zooy.es.js CHANGED
@@ -1,22 +1,1300 @@
1
- import { h as r, s as e, C as i, w as n, D as o, q as t, F as l, P as d, S as g, v as y, U as m, V as p, z as C, y as U, G as b, r as u, n as v, A as L, H as P } from "./chunks/main-CXPn-jnk.js";
1
+ import { n as le, t as R } from "./chunks/component-library-registry-DB5UeqC2.js";
2
+ import { a as Me, c as be, d as O, f as ee, i as we, l as Le, m as Oe, n as Ie, o as Re, p as ce, s as w, t as ye, u as te } from "./chunks/tree-utils-B2JEGXHR.js";
3
+ import { i as Ae, t as Pe } from "./chunks/zoo-DgdxBjlN.js";
4
+ import { identity as C, isDef as F, isDefAndNotNull as j, isNumber as se, isUndefined as Ne, randomId as f, stripLeadingChar as he, toNumber as ie, whatType as Ve } from "badu";
5
+ import { mergeRight as Ue } from "ramda";
6
+ var L = class extends EventTarget {
7
+ #e = !1;
8
+ #t = !1;
9
+ #s = /* @__PURE__ */ new Map();
10
+ #i = /* @__PURE__ */ new Set();
11
+ #r = /* @__PURE__ */ new Set();
12
+ static makeEvent(e, t) {
13
+ return new CustomEvent(e, { detail: t });
14
+ }
15
+ set debugMode(e) {
16
+ if (typeof e != "boolean") throw new Error("This must be a boolean");
17
+ this.#e = e;
18
+ }
19
+ get debugMode() {
20
+ return this.#e;
21
+ }
22
+ get disposed() {
23
+ return this.#t;
24
+ }
25
+ get listeningTo() {
26
+ return this.#s;
27
+ }
28
+ get isObservedBy() {
29
+ return this.#i;
30
+ }
31
+ get activeIntervals() {
32
+ return this.#r;
33
+ }
34
+ debugMe(...e) {
35
+ this.#e && console.log.apply(null, [
36
+ this.constructor.name,
37
+ "DEBUG:",
38
+ ...e
39
+ ]);
40
+ }
41
+ isListenedToBy(e) {
42
+ this.#i.add(e);
43
+ }
44
+ listen(e, t, s, i = !1) {
45
+ e.addEventListener(t, s, i);
46
+ const r = this.listeningTo.get(e) || {};
47
+ r[t] = () => e.removeEventListener(t, s, i), this.listeningTo.set(e, r), F(e.isListenedToBy) && e.isListenedToBy(this);
48
+ }
49
+ stopBeingListenedTo() {
50
+ for (const e of this.isObservedBy)
51
+ e.stopListeningTo(this), this.isObservedBy.delete(e);
52
+ }
53
+ stopListeningTo(e, t) {
54
+ e && this.listeningTo.has(e) && (F(e.isObservedBy) && e.isObservedBy.delete(this), F(t) ? (Object.entries(this.listeningTo.get(e)).forEach(([s, i]) => {
55
+ s === t && i();
56
+ }), Object.keys(this.listeningTo.get(e)).length || this.listeningTo.delete(e)) : (Object.values(this.listeningTo.get(e)).forEach((s) => s()), this.listeningTo.delete(e)));
57
+ }
58
+ removeAllListener() {
59
+ for (const e of this.listeningTo.keys()) this.stopListeningTo(e);
60
+ }
61
+ clearAllIntervals() {
62
+ for (const e of this.activeIntervals)
63
+ clearInterval(e), this.activeIntervals.delete(e);
64
+ }
65
+ doOnBeat(e, t) {
66
+ const s = setInterval(e, t);
67
+ this.activeIntervals.add(s);
68
+ }
69
+ disposeInternal() {
70
+ this.stopBeingListenedTo(), this.removeAllListener(), this.clearAllIntervals(), this.#t = !0;
71
+ }
72
+ dispose() {
73
+ this.disposeInternal();
74
+ }
75
+ }, k = class {
76
+ constructor(e, t) {
77
+ this.value_ = e, this.data_ = t || {};
78
+ }
79
+ getValue() {
80
+ return this.value_;
81
+ }
82
+ getData() {
83
+ return this.data_;
84
+ }
85
+ }, d = {
86
+ COMP: f(),
87
+ COMP_DRAG_START: f(),
88
+ COMP_DRAG_MOVE: f(),
89
+ COMP_DRAG_END: f(),
90
+ PANEL: f(),
91
+ VIEW: f(),
92
+ SPLIT: f(),
93
+ SPLIT_WILL_OPEN: f(),
94
+ SPLIT_DID_OPEN: f(),
95
+ SPLIT_WILL_CLOSE: f(),
96
+ SPLIT_DID_CLOSE: f(),
97
+ SPLIT_TRANSITION_END: f(),
98
+ READY: f(),
99
+ PANEL_MINIMIZE: f(),
100
+ FORM_SUBMIT_SUCCESS: f()
101
+ }, N = {
102
+ NOT_SUPPORTED: "Method not supported",
103
+ DECORATE_INVALID: "Invalid element to decorate",
104
+ ALREADY_RENDERED: "Component already rendered",
105
+ ALREADY_DISPOSED: "Component already disposed",
106
+ PARENT_UNABLE_TO_BE_SET: "Unable to set parent component",
107
+ CHILD_INDEX_OUT_OF_BOUNDS: "Child component index out of bounds",
108
+ NOT_OUR_CHILD: "Child is not in parent component",
109
+ NOT_IN_DOCUMENT: "Operation not supported while component is not in document",
110
+ STATE_INVALID: "Invalid component state"
111
+ }, y = class extends L {
112
+ static compEventCode() {
113
+ return d.COMP;
114
+ }
115
+ static compReadyCode() {
116
+ return d.READY;
117
+ }
118
+ static compErrors() {
119
+ return N;
120
+ }
121
+ #e;
122
+ #t;
123
+ #s;
124
+ #i;
125
+ #r;
126
+ #n;
127
+ #o;
128
+ #a;
129
+ constructor() {
130
+ super(), this.#e = () => document.createElement("div"), this.#t = !1, this.#s = void 0, this.#i = void 0, this.#r = void 0, this.#n = void 0, this.#o = /* @__PURE__ */ new Map(), this.outOfTreeElements = [], this.placeholderDom = void 0, this.#a = () => {
131
+ };
132
+ }
133
+ set target(e) {
134
+ this.#r = e;
135
+ }
136
+ get target() {
137
+ return this.#r;
138
+ }
139
+ set model(e) {
140
+ this.#i = e;
141
+ }
142
+ get model() {
143
+ return this.#i;
144
+ }
145
+ set isInDocument(e) {
146
+ this.#t = e;
147
+ }
148
+ get isInDocument() {
149
+ return this.#t;
150
+ }
151
+ set domFunc(e) {
152
+ this.#e = e;
153
+ }
154
+ set readyFunc(e) {
155
+ this.#a = e;
156
+ }
157
+ setElementInternal_(e) {
158
+ this.#s = e;
159
+ }
160
+ getElement() {
161
+ return this.#s;
162
+ }
163
+ createDom() {
164
+ this.#s = this.#e();
165
+ }
166
+ assertCanRenderAsync() {
167
+ if (this.disposed) throw new Error(N.ALREADY_DISPOSED);
168
+ }
169
+ render(e) {
170
+ this.render_(e);
171
+ }
172
+ render_(e) {
173
+ if (this.disposed) throw new Error(N.ALREADY_DISPOSED);
174
+ if (this.isInDocument) throw new Error(N.ALREADY_RENDERED);
175
+ this.#s || this.createDom();
176
+ const t = this.#s;
177
+ e && (this.#r = e), this.placeholderDom && O(this.placeholderDom), this.#r ? te(t) || this.#r.insertBefore(t, null) : te(t) || document.body.appendChild(t), (!this.#n || this.#n.isInDocument) && this.enterDocument();
178
+ }
179
+ hoist(e, t = void 0) {
180
+ t || (t = document.querySelector("body")), t.appendChild(e), this.outOfTreeElements.push(e);
181
+ }
182
+ executeBeforeReady() {
183
+ this.#a();
184
+ }
185
+ enterDocument() {
186
+ this.disposed ? O(this.getElement()) : (this.isInDocument = !0, [...this.#o.values()].forEach((e) => {
187
+ !e.isInDocument && e.getElement() && e.enterDocument();
188
+ }), this.executeBeforeReady(), this.dispatchCompEvent(d.READY));
189
+ }
190
+ exitDocument() {
191
+ [...this.#o.values()].forEach((e) => {
192
+ e.isInDocument && e.exitDocument();
193
+ }), this.stopBeingListenedTo(), this.removeAllListener(), this.isInDocument = !1, O(this.getElement()), this.placeholderDom && O(this.placeholderDom);
194
+ }
195
+ disposeInternal() {
196
+ this.isInDocument && this.exitDocument(), this.#o && [...this.#o.values()].forEach((e) => e.disposeInternal()), this.outOfTreeElements.forEach(O), this.#s && O(this.#s), this.placeholderDom && O(this.placeholderDom), this.#o = null, this.#s = void 0, this.#i = null, this.#n = null, super.disposeInternal();
197
+ }
198
+ dispose() {
199
+ this.abortController && this.abortController.abort();
200
+ const e = this.getElement();
201
+ if (e) for (const t of R.getRegisteredLibraries()) try {
202
+ const s = R.get(t);
203
+ s.dispose && s.dispose(e);
204
+ } catch (s) {
205
+ console.debug(`[${t}] Cleanup error during component disposal (non-critical):`, s);
206
+ }
207
+ super.dispose();
208
+ }
209
+ dispatchCompEvent(e, t) {
210
+ const s = new k(e, t), i = L.makeEvent(d.COMP, s);
211
+ return this.dispatchEvent(i);
212
+ }
213
+ }, l = {
214
+ CLICK: "click",
215
+ RIGHTCLICK: "rightclick",
216
+ DBLCLICK: "dblclick",
217
+ MOUSEDOWN: "mousedown",
218
+ MOUSEUP: "mouseup",
219
+ MOUSEOVER: "mouseover",
220
+ MOUSEOUT: "mouseout",
221
+ MOUSEMOVE: "mousemove",
222
+ MOUSEENTER: "mouseenter",
223
+ MOUSELEAVE: "mouseleave",
224
+ TOUCHSTART: "touchstart",
225
+ TOUCHMOVE: "touchmove",
226
+ TOUCHEND: "touchend",
227
+ TOUCHCANCEL: "touchcancel",
228
+ SUBMIT: "submit",
229
+ CHANGE: "change",
230
+ INPUT: "input",
231
+ INVALID: "invalid",
232
+ DRAGSTART: "dragstart",
233
+ DRAGEND: "dragend",
234
+ DRAGOVER: "dragover",
235
+ DRAGENTER: "dragenter",
236
+ DRAGEXIT: "dragexit",
237
+ DRAGLEAVE: "dragleave",
238
+ DROP: "drop",
239
+ TRANSITIONEND: "transitionend",
240
+ ANIMATIONEND: "animationend"
241
+ }, ke = [
242
+ l.TOUCHMOVE,
243
+ l.TOUCHSTART,
244
+ l.TOUCHEND
245
+ ], ze = (e) => ke.includes(e.type), z = (e) => (ze(e) && (e.clientX = e.targetTouches[0].clientX, e.clientY = e.targetTouches[0].clientY), e), xe = (e, t, s, i) => (r) => {
246
+ r.preventDefault();
247
+ const o = z(r), c = o.currentTarget, [p, v] = be(c), m = o.clientX - p, S = o.clientY - v, n = e(p, v, m, S, c), a = s(p, v, m, S, c), h = t(p, v, m, S, c);
248
+ let u = Be(h, c, m, S);
249
+ ["x", "ew"].includes(i) ? u = Fe(h, c, m, S) : ["y", "ns"].includes(i) && (u = $e(h, c, m, S));
250
+ let E = !1;
251
+ const g = (T) => {
252
+ E = !0, u(T);
253
+ }, _ = (T) => {
254
+ document.removeEventListener(l.MOUSEMOVE, g, !0), document.removeEventListener(l.TOUCHMOVE, g, !0), document.removeEventListener(l.MOUSEUP, _, !0), document.removeEventListener(l.TOUCHEND, _, !0), E && a(T);
255
+ };
256
+ return document.addEventListener(l.MOUSEUP, _, !0), document.addEventListener(l.TOUCHEND, _, !0), document.addEventListener(l.MOUSEMOVE, g, !0), document.addEventListener(l.TOUCHMOVE, g, !0), n(r), _;
257
+ }, Be = (e, t, s, i) => (r) => {
258
+ r.preventDefault();
259
+ const o = z(r);
260
+ t.style.left = `${o.clientX - s}px`, t.style.top = `${o.clientY - i}px`, e(o);
261
+ }, Fe = (e, t, s, i) => (r) => {
262
+ r.preventDefault();
263
+ const o = z(r);
264
+ t.style.left = `${o.clientX - s}px`, e(o);
265
+ }, $e = (e, t, s, i) => (r) => {
266
+ r.preventDefault();
267
+ const o = z(r);
268
+ t.style.top = `${o.clientY - i}px`, e(o);
269
+ }, $ = (e, t) => (s, i, r, o, c) => (p) => {
270
+ e.dispatchCompEvent(t, {
271
+ component: e,
272
+ browserEvent: p,
273
+ left: s,
274
+ top: i,
275
+ clientX: p.clientX,
276
+ clientY: p.clientY,
277
+ xOrg: r,
278
+ yOrg: o,
279
+ deltaX: p.clientX - r - s,
280
+ deltaY: p.clientY - o - i,
281
+ target: c
282
+ });
283
+ }, H = class extends y {
284
+ #e;
285
+ #t;
286
+ #s;
287
+ #i;
288
+ constructor(e = "xy") {
289
+ super(), this.#e = [
290
+ "x",
291
+ "y",
292
+ "xy",
293
+ "ew",
294
+ "ns"
295
+ ].includes(e.toLowerCase()) ? e.toLowerCase() : "xy", this.#t = void 0, this.#s = !0, this.#i = (t) => null;
296
+ }
297
+ cancelDrag(e) {
298
+ this.#i(e);
299
+ }
300
+ set moveFreedom(e) {
301
+ this.#e = e, this.#s || (this.lock(), this.unlock());
302
+ }
303
+ get moveFreedom() {
304
+ return this.#e;
305
+ }
306
+ executeBeforeReady() {
307
+ this.unlock(), super.executeBeforeReady();
308
+ }
309
+ unlock() {
310
+ const e = (t) => (s) => {
311
+ this.#i = t(s);
312
+ };
313
+ if (this.isInDocument && this.#s) {
314
+ const t = $(this, d.COMP_DRAG_MOVE), s = xe($(this, d.COMP_DRAG_START), t, $(this, d.COMP_DRAG_END), this.#e);
315
+ this.#s = !1, this.#t = this.#t || this.getElement(), this.listen(this.#t, l.MOUSEDOWN, e(s)), this.listen(this.#t, l.TOUCHSTART, s), this.#t.classList.remove("locked");
316
+ }
317
+ }
318
+ lock() {
319
+ this.stopListeningTo(this.#t, l.MOUSEDOWN), this.stopListeningTo(this.#t, l.TOUCHSTART), this.#s = !0, this.#t.classList.add("locked");
320
+ }
321
+ }, qe = /* @__PURE__ */ le({
322
+ getPath: () => W,
323
+ getQueryData: () => me,
324
+ objectToUrlParms: () => Ee,
325
+ queryDataToMap: () => ge
326
+ }), je = new RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#([\\s\\S]*))?$"), de = {
327
+ SCHEME: 1,
328
+ USER_INFO: 2,
329
+ DOMAIN: 3,
330
+ PORT: 4,
331
+ PATH: 5,
332
+ QUERY_DATA: 6,
333
+ FRAGMENT: 7
334
+ }, ue = (e) => e.match(je), pe = (e, t) => e ? t ? decodeURI(e.replace(/%25/g, "%2525")) : decodeURIComponent(e) : "", W = (e) => pe(ue(e)[de.PATH], !0), me = (e) => pe(ue(e)[de.QUERY_DATA], !0), Ee = (e) => [...Object.entries(e)].map((t) => `${t[0]}=${t[1]}`).join("&"), re = (e) => e != null && e !== "", ge = (e) => e.split("&").reduce((t, s) => {
335
+ const [i, r] = s.split("=");
336
+ return re(i) && re(r) && t.set(i, r), t;
337
+ }, /* @__PURE__ */ new Map()), He = he(" "), We = he("/"), Je = (e) => document.cookie.split(";").map((t) => t.split("=")).reduce((t, s) => t.set(He(s[0]), s[1]), /* @__PURE__ */ new Map()).get(e), Ge = (e) => {
338
+ let t = 0, s;
339
+ const i = (r) => {
340
+ const o = r > 0;
341
+ return o ? t += 1 : t -= 1, o ? t === 1 : t === 0;
342
+ };
343
+ return (r) => {
344
+ s = s || document.getElementById(e), s && i(r) && s.classList.toggle("viz", t > 0);
345
+ };
346
+ }, fe = Ge("the_loader"), q = () => Promise.resolve(fe(1)), U = (e) => (fe(0), Promise.resolve(e)), I = (e) => e.ok ? Promise.resolve(e) : Promise.reject(/* @__PURE__ */ new Error(`${e.url} ${e.status} (${e.statusText})`)), Ye = (e) => (t) => {
347
+ if (t.type === "opaqueredirect" || t.redirected) {
348
+ const s = We(W(t.url));
349
+ e.setIsRedirected(!0, s), console.log("Redirect detected", s);
350
+ }
351
+ return I(t);
352
+ }, P = (e) => e.json(), J = (e) => e.text().then((t) => Promise.resolve(t), (t) => Promise.reject(/* @__PURE__ */ new Error(`Could not get text from response: ${t}`))), Xe = (e) => e.headers.get("Content-Type") === "application/json" ? P(e) : J(e), V = (e, t, s = "POST", i = void 0) => {
353
+ const r = new Headers();
354
+ r.append("Content-type", "application/json"), r.append("X-Requested-With", "XMLHttpRequest"), e && e !== "" && r.append("Authorization", `Bearer ${e}`);
355
+ const o = {
356
+ cache: "no-cache",
357
+ method: s,
358
+ headers: r,
359
+ credentials: "include",
360
+ body: JSON.stringify(t)
361
+ };
362
+ return i && (o.signal = i), o;
363
+ }, ve = (e, t, s = !1, i = void 0) => {
364
+ const r = new Headers();
365
+ if (t && t !== "" && r.append("Authorization", `Bearer ${t}`), r.append("X-Requested-With", "XMLHttpRequest"), s) {
366
+ const c = Je("csrftoken");
367
+ c && s && r.append("X-CSRFToken", c);
368
+ }
369
+ const o = {
370
+ cache: "no-cache",
371
+ method: e,
372
+ headers: r,
373
+ redirect: "follow",
374
+ credentials: "include"
375
+ };
376
+ return i && (o.signal = i), o;
377
+ }, Ke = (e, t, s = void 0) => {
378
+ const i = ve("POST", e, !1, s);
379
+ return i.body = new FormData(t.formEl), i;
380
+ }, ne = (e, t = void 0) => {
381
+ const s = new Headers();
382
+ s.append("Authorization", `Bearer ${e}`), s.append("X-Requested-With", "XMLHttpRequest");
383
+ const i = {
384
+ cache: "no-cache",
385
+ headers: s,
386
+ credentials: "include"
387
+ };
388
+ return t && (i.signal = t), i;
389
+ }, Qe = (e, t) => {
390
+ const s = new Request(e);
391
+ return fetch(s, t).then(I).then(J);
392
+ }, b = (e, t = void 0) => (s) => (U("").then(C), s.name === "AbortError" ? console.info(e, "ABORTED!") : console.error(e, s), t), x = class {
393
+ constructor(e) {
394
+ this.user_ = {}, this.jwt = "", e && this.updateProfileFromJwt(e).then(() => {
395
+ });
396
+ }
397
+ updateProfileFromJwt(e, t = !1) {
398
+ return t && this.jwt !== "" ? Promise.resolve("User Profile Already exists") : e.non_field_errors ? Promise.reject(/* @__PURE__ */ new Error(`JWT ${e.non_field_errors}`)) : (this.updateToken(e.token), this.updateProfile(e.user), Promise.resolve("User Profile Updated"));
399
+ }
400
+ updateProfile(e) {
401
+ this.user_ = e;
402
+ }
403
+ updateToken(e) {
404
+ this.jwt = e;
405
+ }
406
+ get id() {
407
+ return this.user_.id;
408
+ }
409
+ get name() {
410
+ return this.user_.name;
411
+ }
412
+ get surname() {
413
+ return this.user_.surname;
414
+ }
415
+ get salutation() {
416
+ let e = this.name;
417
+ const t = this.surname;
418
+ return t && (e = e + " " + t), e;
419
+ }
420
+ formSubmit(e) {
421
+ const t = new Request(e.uri.toString()), s = e.processSubmitReply.bind(e), i = b("Form submit error");
422
+ return q().then(() => fetch(t, Ke(this.jwt, e, e.abortController.signal))).then(Ye(e)).then(U).then(Xe).then(s).catch(i);
423
+ }
424
+ putNoBody(e, t = void 0, s = !1) {
425
+ const i = b("putNobody error");
426
+ return Qe(e, ve("PUT", this.jwt, s, t)).catch(i);
427
+ }
428
+ fetch(e, t = void 0) {
429
+ const s = new Request(e.toString()), i = b(`UMan Text GET Fetch: ${e}`);
430
+ return q().then(() => fetch(s, ne(this.jwt, t))).then(I).then(U).then(J).catch(i);
431
+ }
432
+ fetchAndSplit(e, t = void 0) {
433
+ const s = b(`fetchAndSplit: ${e}`);
434
+ return this.fetch(e, t).then(Le).catch(s);
435
+ }
436
+ async fetchJson(e, t = void 0, s = void 0) {
437
+ const i = new Request(e.toString()), r = b(`fetchJson: ${e}`, s), o = ne(this.jwt, t);
438
+ await q();
439
+ let c;
440
+ try {
441
+ c = await (await fetch(i, o)).json();
442
+ } catch (p) {
443
+ return r(p);
444
+ }
445
+ return await U(), c;
446
+ }
447
+ patchJson(e, t, s = void 0) {
448
+ const i = new Request(e.toString()), r = b(`patchJson: ${e}`), o = V(this.jwt, t, "PATCH", s);
449
+ return fetch(i, o).then(I).then(P).catch(r);
450
+ }
451
+ postJson(e, t, s = void 0) {
452
+ const i = new Request(e.toString()), r = b(`postJson: ${e}`), o = V(this.jwt, t, "POST", s);
453
+ return fetch(i, o).then(I).then(P).catch(r);
454
+ }
455
+ putJson(e, t, s = void 0) {
456
+ const i = new Request(e.toString()), r = b(`putJson: ${e}`), o = V(this.jwt, t, "PUT", s);
457
+ return fetch(i, o).then(I).then(P).catch(r);
458
+ }
459
+ delJson(e, t, s = void 0) {
460
+ const i = new Request(e.toString()), r = b(`delJson: ${e}`), o = V(this.jwt, t, "DELETE", s);
461
+ return fetch(i, o).then(I).then(P).catch(r);
462
+ }
463
+ }, G = class extends y {
464
+ static panelEventCode() {
465
+ return d.PANEL;
466
+ }
467
+ static compReadyCode() {
468
+ return d.READY;
469
+ }
470
+ constructor(e) {
471
+ super(), this.qParamMap_ = /* @__PURE__ */ new Map(), this.uri_ = "", e && this.parseUri(e), this.evalScripts = Me(this), this.evalModules = we(this), this.redirected = !1, this.responseObject = {
472
+ html: null,
473
+ scripts: null
474
+ }, this.user_ = void 0, "AbortController" in window ? this.abortController = new AbortController() : this.abortController = {
475
+ signal: void 0,
476
+ abort: () => {
477
+ }
478
+ }, this.listMap = /* @__PURE__ */ new Map();
479
+ }
480
+ get uri() {
481
+ const e = this.qParamMap_.size > 0 ? "?" + Ee(Object.fromEntries(this.qParamMap_)) : "";
482
+ return this.uri_ + e;
483
+ }
484
+ set user(e) {
485
+ this.user_ = e;
486
+ }
487
+ get user() {
488
+ return this.user_ || (this.user_ = new x()), this.user_;
489
+ }
490
+ parseUri(e) {
491
+ this.uri_ = W(e), this.qParamMap_ = ge(me(e));
492
+ }
493
+ addToQParams(e, t) {
494
+ this.qParamMap_.set(e, t);
495
+ }
496
+ removeFromQParams(e) {
497
+ this.qParamMap_.delete(e);
498
+ }
499
+ clearQParams() {
500
+ this.qParamMap_.clear();
501
+ }
502
+ getCarbonComponents(e) {
503
+ return this.carbonComponents?.get(e) || [];
504
+ }
505
+ getCarbonComponentById(e) {
506
+ if (this.carbonComponents)
507
+ for (const t of this.carbonComponents.values()) {
508
+ const s = t.find((i) => i.id === e);
509
+ if (s) return s;
510
+ }
511
+ }
512
+ renderPlaceHolder(e) {
513
+ this.target && (this.placeholderDom = e, this.target.insertBefore(this.placeholderDom, null));
514
+ }
515
+ renderWithTemplate(e) {
516
+ const t = this.user;
517
+ return t ? t.fetch(this.uri, this.abortController.signal).then((s) => (this.assertCanRenderAsync(), e && e(this), this.onRenderWithTemplateReply(s).catch((i) => {
518
+ i.message !== y.compErrors().ALREADY_DISPOSED && console.error("RenderWithTemplate Err:", i);
519
+ }), this)).catch((s) => {
520
+ throw console.error("Panel.renderWithTemplate fetch failed:", s), s;
521
+ }) : Promise.reject(/* @__PURE__ */ new Error("No UserManager instance available for Panel.renderWithTemplate()"));
522
+ }
523
+ onRenderWithTemplateReply(e) {
524
+ return this.responseObject = ce(e), this.domFunc = () => this.responseObject.html, this.render(), Promise.resolve(this);
525
+ }
526
+ onReplacePartialDom(e, t) {
527
+ const s = this.getElement();
528
+ if (Ne(s)) return;
529
+ const i = e.html;
530
+ if (t.startsWith(".")) [...s.querySelectorAll(t)].filter((r) => j(r.id)).map((r) => [r, i.querySelector(`#${r.id}`)]).filter(([r, o]) => j(o)).forEach(([r, o]) => {
531
+ r.parentNode.replaceChild(o, r), this.parseContent(o);
532
+ });
533
+ else if (t.startsWith("#")) {
534
+ const r = i.querySelector(t), o = s.querySelector(t);
535
+ o.parentNode.replaceChild(r, o), this.parseContent(r);
536
+ }
537
+ this.evalScripts(e.scripts), this.evalModules(e.modules);
538
+ }
539
+ renderWithJSON(e) {
540
+ return this.user ? this.user.fetchJson(this.uri_, this.abortController.signal).then((t) => {
541
+ this.assertCanRenderAsync(), e && e(t, this), this.onRenderWithJSON(t).then(C);
542
+ }).catch((t) => {
543
+ throw console.error("Panel.renderWithJSON fetch failed:", t), t;
544
+ }) : Promise.reject(/* @__PURE__ */ new Error("No UserManager instance available for Panel.renderWithJSON()"));
545
+ }
546
+ onRenderWithJSON(e) {
547
+ return Promise.resolve(this);
548
+ }
549
+ onAsyncJsonReply(e, t, s) {
550
+ }
551
+ onAsyncHtmlReply(e, t) {
552
+ }
553
+ onViewDataBroadcast(e) {
554
+ }
555
+ parseContent(e) {
556
+ if (this.debugMe("Enable interactions. Panel:", e), typeof window.customElements < "u" && R.has("carbon")) {
557
+ const n = R.get("carbon");
558
+ n.render.call(this, e, n.cache).catch((a) => console.error("[Zooy] Carbon initialization failed:", a));
559
+ }
560
+ if (R.has("mdc")) {
561
+ const n = R.get("mdc");
562
+ n.render.call(this, e, n.cache);
563
+ }
564
+ e.classList.contains("zoo__modal-base") && e.classList.contains("close_on_click") && this.listen(e, l.CLICK, (n) => {
565
+ n.target === e && this.dispatchPanelEvent("destroy_me");
566
+ }), [...e.querySelectorAll(".zoo__button:not(.external):not(.mdc-data-table__row)")].forEach((n) => {
567
+ this.listen(n, l.CLICK, (a) => {
568
+ a.stopPropagation();
569
+ const h = a.currentTarget, u = w(h);
570
+ this.dispatchPanelEvent(u.zv, Object.assign({
571
+ orgEvt: a,
572
+ trigger: h,
573
+ href: h.href || u.href
574
+ }, u));
575
+ });
576
+ }), [...e.querySelectorAll("[href]:not(.external)")].forEach((n) => {
577
+ this.listen(n, l.CLICK, (a) => {
578
+ const h = a.currentTarget;
579
+ a.preventDefault(), a.stopPropagation();
580
+ const u = w(h), E = u.zv || "href";
581
+ this.dispatchPanelEvent(E, Object.assign({
582
+ orgEvt: a,
583
+ trigger: a.target,
584
+ href: h.href || u.href
585
+ }, u));
586
+ });
587
+ }), [...e.querySelectorAll("form.intercept_submit")].forEach((n) => {
588
+ n.noValidate = !0, this.listen(n, l.SUBMIT, (a) => {
589
+ a.preventDefault(), a.stopPropagation();
590
+ const h = w(n), u = Re(n.elements);
591
+ this.dispatchPanelEvent(h.zv, Object.assign({
592
+ orgEvt: a,
593
+ trigger: a.target,
594
+ formData: u,
595
+ href: h.href
596
+ }, h));
597
+ });
598
+ }), [...e.querySelectorAll(".zoo__toggle_class_driver")].forEach((n) => {
599
+ const a = w(n), h = a.toggle_class_target_id, u = a.toggle_class, E = e.querySelector(`#${h}`);
600
+ E && u && n.addEventListener(l.CLICK, (g) => {
601
+ g.stopPropagation(), E.classList.toggle(u);
602
+ });
603
+ });
604
+ const t = Array.from(e.querySelectorAll(".folder_drop_zone")), s = Array.from(e.querySelectorAll("[draggable]")), i = (n) => {
605
+ n.preventDefault(), n.target.classList.add("drag_over");
606
+ }, r = (n) => {
607
+ n.preventDefault();
608
+ }, o = (n) => {
609
+ n.preventDefault(), n.target.classList.remove("drag_over");
610
+ }, c = (n) => {
611
+ n.preventDefault(), n.target.classList.remove("drag_over");
612
+ }, p = (n) => {
613
+ n.preventDefault(), n.target.classList.remove("drag_over");
614
+ }, v = (n) => {
615
+ n.dataTransfer.dropEffect = "move";
616
+ const a = w(n.target);
617
+ n.dataTransfer.setData("text/plain", JSON.stringify(a)), n.target.classList.add("drag_in_progress");
618
+ }, m = (n) => {
619
+ n.target.classList.remove("drag_in_progress");
620
+ }, S = (n) => {
621
+ p(n), n.stopPropagation();
622
+ const a = JSON.parse(n.dataTransfer.getData("text/plain")), h = w(n.target);
623
+ return this.dispatchPanelEvent("drop_on", { custom: {
624
+ on: h,
625
+ from: a
626
+ } }), !1;
627
+ };
628
+ t.forEach((n) => {
629
+ this.listen(n, l.DRAGOVER, r), this.listen(n, l.DRAGENTER, i), this.listen(n, l.DRAGEXIT, c), this.listen(n, l.DRAGLEAVE, o), this.listen(n, l.DROP, S);
630
+ }), s.forEach((n) => {
631
+ this.listen(n, l.DRAGSTART, v), this.listen(n, l.DRAGEND, m);
632
+ }), [...e.querySelectorAll(".zoo_async_json")].forEach((n) => {
633
+ const a = w(n), h = a.href, u = this.onAsyncJsonReply.bind(this, n, a);
634
+ this.user.fetchJson(h, this.abortController.signal).then(u);
635
+ const E = a.z_json_reusable;
636
+ E && (this.jsonCallFuncs = this.jsonCallFuncs || {}, this.jsonCallFuncs[E] = () => {
637
+ this.user.fetchJson(h, this.abortController.signal).then(u);
638
+ });
639
+ const g = ie(a.z_interval);
640
+ se(g) && this.doOnBeat(() => {
641
+ this.user.fetchJson(h, this.abortController.signal).then(u);
642
+ }, g * 60 * 1e3);
643
+ }), [...e.querySelectorAll(".zoo_async_html")].forEach((n) => {
644
+ const a = w(n), h = a.href;
645
+ this.user.fetchAndSplit(h, this.abortController.signal).then((E) => {
646
+ n.appendChild(E.html), this.parseContent(n), this.evalScripts(E.scripts), this.evalModules(E.modules), this.onAsyncHtmlReply(n, a);
647
+ });
648
+ const u = ie(a.z_interval);
649
+ se(u) && this.doOnBeat(() => {
650
+ this.user.fetchAndSplit(h, this.abortController.signal).then((E) => {
651
+ n.replaceChildren(E.html), this.parseContent(n), this.evalScripts(E.scripts), this.evalModules(E.modules);
652
+ });
653
+ }, u * 60 * 1e3);
654
+ });
655
+ }
656
+ enterDocument() {
657
+ const e = this.getElement();
658
+ this.parseContent(e), this.evalScripts(this.responseObject.scripts), this.evalModules(this.responseObject.modules), super.enterDocument();
659
+ }
660
+ exitDocument() {
661
+ this.abortController.abort(), super.exitDocument();
662
+ }
663
+ setIsRedirected(e, t) {
664
+ this.redirected = e, this.redirected && t && (this.uri_ = t);
665
+ }
666
+ dispatchPanelEvent(e, t) {
667
+ const s = new k(e, t), i = L.makeEvent(d.PANEL, s);
668
+ return this.debugMe(`PANEL EVENT FIRED:
669
+ value:${e}
670
+ data:${t}`), this.dispatchEvent(i);
671
+ }
672
+ }, Ze = class extends G {
673
+ #e = null;
674
+ #t = /* @__PURE__ */ new Map();
675
+ #s = !0;
676
+ constructor(e, t = !0) {
677
+ super(e), this.#s = t, this.onSubmitSucFunc = (s, i) => null;
678
+ }
679
+ get formEl() {
680
+ return this.#e;
681
+ }
682
+ enterDocument() {
683
+ super.enterDocument(), this.formIdElementToForm_();
684
+ }
685
+ formIdElementToForm_() {
686
+ this.#e = this.getFormFromId(), this.#e && (this.#a(this.#e), this.#i());
687
+ }
688
+ getFormFromId(e) {
689
+ let t = null, s = this.getElement().querySelector("form");
690
+ return e && (s = document.getElementById(e) || s), s && s.tagName.toLowerCase() === "form" && (t = s), t;
691
+ }
692
+ #i() {
693
+ this.#e && (this.listen(this.#e, l.CHANGE, (e) => {
694
+ this.#o(e);
695
+ }, { passive: !0 }), this.listen(this.#e, l.INPUT, (e) => {
696
+ this.clearAllValidationErrors(), this.#o(e);
697
+ }), this.listen(this.#e, l.INVALID, (e) => {
698
+ e.preventDefault();
699
+ const t = e.target;
700
+ this.#n(t), this.displayFieldError(t);
701
+ }, { passive: !0 }));
702
+ }
703
+ checkAllFields() {
704
+ const e = [...this.#e.elements].map((t) => [this.#r(t), t]).filter((t) => !t[0]);
705
+ return e.forEach((t) => this.displayFieldError(t[1])), e.length === 0;
706
+ }
707
+ clearAllValidationErrors() {
708
+ [...this.#e ? this.#e.elements : []].forEach((e) => this.#n(e)), [...this.#e.querySelectorAll(".non-field-errors")].forEach((e) => e.classList.remove("alert-error"));
709
+ }
710
+ displayAlert_(e, t, s) {
711
+ const i = document.getElementById(`${e.id}-helper-text`) || document.createElement("p");
712
+ i.textContent = t, this.#t.set(e, i);
713
+ }
714
+ #r(e) {
715
+ this.#n(e);
716
+ let t = !e.willValidate;
717
+ return e.willValidate && (t = e.checkValidity()), t;
718
+ }
719
+ #n(e) {
720
+ e.classList.remove("error"), this.#t.has(e) && (this.#t.get(e).textContent = ""), this.#t.delete(e);
721
+ }
722
+ displayFieldError(e, t) {
723
+ const s = t || e.validationMessage;
724
+ e.classList.add("error"), this.displayAlert_(e, s, "alert-error");
725
+ }
726
+ displayFieldSuccess(e, t) {
727
+ this.displayAlert_(e, t, "alert-success");
728
+ }
729
+ displayFieldInfo(e, t) {
730
+ this.displayAlert_(e, t, "alert-info");
731
+ }
732
+ #o(e) {
733
+ this.#r(e.target);
734
+ }
735
+ #a(e) {
736
+ if (e && this.#s) {
737
+ e.noValidate = !0;
738
+ const t = this.user;
739
+ this.listen(e, l.SUBMIT, (s) => {
740
+ s.preventDefault(), this.debugMe("Intercepted from SUBMIT"), this.checkAllFields() && t && t.formSubmit(this);
741
+ });
742
+ }
743
+ return e;
744
+ }
745
+ onSubmitSuccess(e) {
746
+ this.onSubmitSucFunc = e;
747
+ }
748
+ replaceForm(e) {
749
+ if (this.responseObject = ce(e), this.responseObject.html) {
750
+ if (this.redirected) {
751
+ this.removeAllListener();
752
+ const t = this.getElement(), s = t.parentNode;
753
+ this.setElementInternal_(this.responseObject.html), s.replaceChild(this.getElement(), t);
754
+ } else {
755
+ const t = this.responseObject.html.querySelector("form");
756
+ t && ee(t, this.#e);
757
+ const s = this.responseObject.html.querySelector('button[type="submit"]'), i = this.getElement().querySelector('button[type="submit"]');
758
+ s && i && ee(s, i);
759
+ }
760
+ this.enterDocument();
761
+ }
762
+ }
763
+ refreshFromFromServer() {
764
+ const e = this.user, t = this.uri;
765
+ return e ? e.fetch(t, this.abortController.signal).then((s) => this.replaceForm(s)) : Promise.reject(/* @__PURE__ */ new Error("No UserManager instance available for FormPanel.refreshFromFromServer()"));
766
+ }
767
+ processSubmitReply(e) {
768
+ this.clearAllValidationErrors();
769
+ let t = !1;
770
+ if (Ve(e) === "object" && e.success) return Promise.resolve(this).then(() => {
771
+ this.onSubmitSucFunc(this, e), this.dispatchCompEvent(d.FORM_SUBMIT_SUCCESS);
772
+ });
773
+ if (e === "success" ? (this.debugMe(`
774
+ 1.REDIRECTED: ${this.redirected}
775
+ REPLY: ${e}`), t = !0) : e === `redirected_success
776
+ ` ? (this.debugMe(`
777
+ 2.REDIRECTED: ${this.redirected}
778
+ REPLY: ${e}`), t = !0, this.redirected = !1) : (this.debugMe(`
779
+ 3.REDIRECTED: ${this.redirected}
780
+ REPLY: Some form HTML`), this.replaceForm(e)), t && this.redirected)
781
+ return this.debugMe(`
782
+ 4.REDIRECTED: ${this.redirected}
783
+ SUCCESS: ${t}`), this.redirected = !1, Promise.resolve(this);
784
+ if (t)
785
+ return this.debugMe(`
786
+ 5.REDIRECTED: ${this.redirected}
787
+ SUCCESS: ${t}`), Promise.resolve(this).then(() => {
788
+ this.onSubmitSucFunc(this), this.dispatchCompEvent(d.FORM_SUBMIT_SUCCESS);
789
+ });
790
+ this.debugMe(`
791
+ 6.REDIRECTED: ${this.redirected}
792
+ SUCCESS: ${t}`);
793
+ }
794
+ }, et = class extends y {
795
+ static splitEventCode() {
796
+ return d.SPLIT;
797
+ }
798
+ constructor() {
799
+ super(), this.dragImage_ = document.createElement("canvas"), this.nestMap_ = /* @__PURE__ */ new Map(), this.nestCallbackMap_ = /* @__PURE__ */ new Map(), this.splitNests_ = /* @__PURE__ */ new Set();
800
+ }
801
+ get nests() {
802
+ return [...this.nestMap_.entries()].filter(([e, { nestEl: t }]) => t);
803
+ }
804
+ getNest(e) {
805
+ return this.nestMap_.get(e)?.nestEl;
806
+ }
807
+ get nestNames() {
808
+ return [...this.nestMap_.entries()].filter(([e, t]) => !this.splitNests_.has(t)).map(([e]) => e);
809
+ }
810
+ closeAndLockAll(e = C, t = !1) {
811
+ this.nestNames.forEach((s) => this.closeAndLock(s, e, t));
812
+ }
813
+ openAndUnlockAll(e = C, t = !1) {
814
+ this.nestNames.forEach((s) => this.openAndUnlock(s, e, t));
815
+ }
816
+ lock(e) {
817
+ const { dragEl: t } = this.nestMap_.get(e);
818
+ t.classList.add("locked");
819
+ }
820
+ unlock(e) {
821
+ const { dragEl: t } = this.nestMap_.get(e);
822
+ t.classList.remove("locked");
823
+ }
824
+ resize(e, t, s = C, i = !1) {
825
+ const { sizeNow: r, nestEl: o, canResize: c } = this.nestMap_.get(e);
826
+ c && (i || r === t ? (o.classList.remove("animated"), o.style.flexBasis = `${t}px`, this.nestMap_.get(e).sizeNow = t, s()) : (o.classList.add("animated"), this.nestCallbackMap_.set(e, () => {
827
+ o.classList.remove("animated"), this.nestMap_.get(e).sizeNow = t, s();
828
+ }), o.style.flexBasis = `${t}px`));
829
+ }
830
+ closeAndLock(e, t = C, s = !1) {
831
+ const { nestEl: i, dragEl: r, canResize: o } = this.nestMap_.get(e);
832
+ if (!o) return;
833
+ const c = () => {
834
+ r.classList.add("locked", "closed"), i.classList.add("closed"), t();
835
+ };
836
+ this.resize(e, 0, c, s);
837
+ }
838
+ closeAndUnlock(e, t = C, s = !1) {
839
+ const { nestEl: i, dragEl: r, canResize: o } = this.nestMap_.get(e);
840
+ if (!o) return;
841
+ const c = () => {
842
+ i.classList.remove("closed"), r.classList.remove("closed", "locked"), r.classList.add("collapsed"), t();
843
+ };
844
+ this.resize(e, 0, c, s);
845
+ }
846
+ openAndUnlock(e, t, s, i = !1) {
847
+ const { nestEl: r, dragEl: o, defSize: c, lastSize: p, canResize: v } = this.nestMap_.get(e);
848
+ if (!v) return;
849
+ const m = t || p || c;
850
+ r.classList.remove("closed"), o.classList.remove("closed", "locked", "collapsed"), setTimeout(() => {
851
+ this.resize(e, m, s, i);
852
+ }, 50);
853
+ }
854
+ openAndLock(e, t, s, i = !1) {
855
+ const { nestEl: r, dragEl: o, defSize: c, lastSize: p, canResize: v } = this.nestMap_.get(e);
856
+ if (!v) return;
857
+ const m = t || p || c;
858
+ r.classList.remove("closed"), o.classList.remove("closed", "collapsed"), setTimeout(() => {
859
+ this.resize(e, m, s, i);
860
+ }, 50);
861
+ }
862
+ close(e, t = C, s = !1) {
863
+ const { dragEl: i, canResize: r, nestEl: o } = this.nestMap_.get(e);
864
+ if (!r) return;
865
+ this.dispatchSplitEvent(d.SPLIT_WILL_CLOSE, {
866
+ nestName: e,
867
+ nestEl: o
868
+ });
869
+ const c = () => {
870
+ i.classList.add("collapsed"), this.dispatchSplitEvent(d.SPLIT_DID_CLOSE, {
871
+ nestName: e,
872
+ nestEl: o
873
+ }), t();
874
+ };
875
+ this.resize(e, 0, c, s);
876
+ }
877
+ open(e, t = C, s = !1) {
878
+ const { defSize: i, lastSize: r, dragEl: o, canResize: c, nestEl: p } = this.nestMap_.get(e);
879
+ if (!c) return;
880
+ this.dispatchSplitEvent(d.SPLIT_WILL_OPEN, {
881
+ nestName: e,
882
+ nestEl: p
883
+ }), o.classList.remove("collapsed", "closed");
884
+ const v = r || i, m = () => {
885
+ this.dispatchSplitEvent(d.SPLIT_DID_OPEN, {
886
+ nestName: e,
887
+ nestEl: p
888
+ }), t();
889
+ };
890
+ this.resize(e, v, m, s);
891
+ }
892
+ toggle(e, t, s = !1) {
893
+ this.nestMap_.get(e).sizeNow === 0 ? this.open(e, t, s) : this.close(e, t, s);
894
+ }
895
+ addSplit(e = void 0, t = "EW", s = 100, i = 100, r = [], o = [], c = [], p = [], v = []) {
896
+ const m = e || this.getElement();
897
+ if (this.splitNests_.has(m)) return ["Already used!", m];
898
+ tt(m, t), this.splitNests_.add(m);
899
+ let S = "";
900
+ if (e) {
901
+ const D = [...this.nestMap_.entries()].find(([M, { nestEl: A }]) => A === e);
902
+ if (D) S = D[0];
903
+ else return ["Element not managed by this component", e];
904
+ }
905
+ const n = `${S}A`, a = oe(s, ["zoo_nest__A", n, ...r]), h = new H(t);
906
+ h.domFunc = ae([`zoo_drag_${n}`, ...p], v), h.render(m), this.nestMap_.set(n, {
907
+ side: "A",
908
+ nestEl: a,
909
+ dragger: h,
910
+ dragEl: h.getElement(),
911
+ defSize: s,
912
+ sizeNow: -1,
913
+ canResize: !0
914
+ });
915
+ const u = `${S}B`, E = st(["zoo_nest__B", u, ...o]);
916
+ this.nestMap_.set(u, {
917
+ nestEl: E,
918
+ canResize: !1
919
+ });
920
+ const g = `${S}C`, _ = new H(t);
921
+ _.domFunc = ae([`zoo_drag_${g}`, ...p], v), _.render(m);
922
+ const T = oe(i, ["zoo_nest__C", g, ...c]);
923
+ this.nestMap_.set(g, {
924
+ side: "C",
925
+ nestEl: T,
926
+ dragger: _,
927
+ dragEl: _.getElement(),
928
+ defSize: i,
929
+ sizeNow: -1,
930
+ canResize: !0
931
+ }), [
932
+ a,
933
+ h.getElement(),
934
+ E,
935
+ _.getElement(),
936
+ T
937
+ ].forEach((D) => m.appendChild(D));
938
+ let Y = 0;
939
+ const X = (D, M, A, Ce) => {
940
+ let B;
941
+ const K = D === "NS" ? "height" : "width", Te = D === "NS" ? "deltaY" : "deltaX";
942
+ return (Q) => {
943
+ switch (Q.detail.value_) {
944
+ case d.COMP_DRAG_START:
945
+ B = M.getBoundingClientRect()[K], Y = E.getBoundingClientRect()[K] + B, this.nestMap_.get(A).dragEl.classList.remove("collapsed");
946
+ break;
947
+ case d.COMP_DRAG_MOVE: {
948
+ const Z = Math.min(Y, B + Ce * Q.detail.data_[Te]);
949
+ this.nestMap_.get(A).lastSize = Z, M.style.flexBasis = Z + "px";
950
+ break;
951
+ }
952
+ case d.COMP_DRAG_END:
953
+ this.dispatchSplitEvent(d.COMP_DRAG_END, this.nestMap_.get(A));
954
+ break;
955
+ default:
956
+ break;
957
+ }
958
+ };
959
+ };
960
+ this.listen(h, y.compEventCode(), X(t, a, n, 1)), this.listen(_, y.compEventCode(), X(t, T, g, -1)), this.listen(h.getElement(), l.DBLCLICK, () => this.toggle(n)), this.listen(_.getElement(), l.DBLCLICK, () => this.toggle(g)), this.listen(h.getElement().querySelector(".zoo_grabber"), l.CLICK, () => this.toggle(n)), this.listen(_.getElement().querySelector(".zoo_grabber"), l.CLICK, () => this.toggle(g)), this.listen(a, l.TRANSITIONEND, (D) => {
961
+ if (D.propertyName === "flex-basis" && D.target === a) {
962
+ const M = this.nestCallbackMap_.get(n);
963
+ this.nestCallbackMap_.delete(n), M && M(), this.dispatchSplitEvent(d.SPLIT_TRANSITION_END, this.nestMap_.get(n));
964
+ }
965
+ }), this.listen(T, l.TRANSITIONEND, (D) => {
966
+ if (D.propertyName === "flex-basis" && D.target === T) {
967
+ const M = this.nestCallbackMap_.get(g);
968
+ this.nestCallbackMap_.delete(g), M && M(), this.dispatchSplitEvent(d.SPLIT_TRANSITION_END, this.nestMap_.get(g));
969
+ }
970
+ });
971
+ }
972
+ dispatchSplitEvent(e, t) {
973
+ const s = new k(e, t), i = L.makeEvent(d.SPLIT, s);
974
+ return this.dispatchEvent(i);
975
+ }
976
+ }, tt = (e, t) => (e.classList.add("zoo_split", `zoo_split__${t.toLowerCase()}`), e), oe = (e, t = []) => {
977
+ const s = document.createElement("div");
978
+ return s.setAttribute("id", f(7)), s.classList.add("zoo_nest", "zoo_nest__outer", ...t), s.style.flexBasis = e + "px", s;
979
+ }, st = (e = []) => {
980
+ const t = document.createElement("div");
981
+ return t.setAttribute("id", f(7)), t.classList.add("zoo_nest", "zoo_nest__inner", ...e), t;
982
+ }, ae = (e = [], t = []) => () => {
983
+ const s = document.createElement("div");
984
+ s.setAttribute("id", f(7)), s.classList.add("zoo_dragger", ...e);
985
+ const i = document.createElement("div");
986
+ return i.classList.add("zoo_grabber", ...t), s.appendChild(i), s;
987
+ }, it = {
988
+ toggle_tree: function(e, t) {
989
+ ye(e, t);
990
+ },
991
+ "tree_toggle-children": function(e, t) {
992
+ Ie(t, e);
993
+ }
994
+ }, _e = {
995
+ search: function(e, t) {
996
+ let s = `${e.href}`;
997
+ const i = e.formData.q, r = e.targetval;
998
+ if (i !== "" && (s = `${s}?q=${i}`), r !== "") {
999
+ let o = r;
1000
+ r.includes("page=") && (o = r.split("&").filter((c) => !c.includes("page=")).join("&")), s = i !== "" ? `${s}&${o}` : `${s}?${o}`;
1001
+ }
1002
+ this.user.fetchAndSplit(s, t.abortController.signal).then((o) => t.onReplacePartialDom(o, e.zvptarget));
1003
+ },
1004
+ reset_search: function(e, t) {
1005
+ const s = e.trigger.closest("form");
1006
+ t.removeFromQParams("q"), s.elements.q.value = "", s.dispatchEvent(new Event("submit"));
1007
+ }
1008
+ }, Se = {
1009
+ paginate: function(e, t) {
1010
+ const s = `${e.href}?${e.targetval}`;
1011
+ this.user.fetchAndSplit(s, t.abortController.signal).then((i) => t.onReplacePartialDom(i, e.zvptarget));
1012
+ },
1013
+ list_filter: function(e, t) {
1014
+ const s = `${e.href}?${e.targetval}`;
1015
+ this.user.fetchAndSplit(s, t.abortController.signal).then((i) => t.onReplacePartialDom(i, e.zvptarget));
1016
+ }
1017
+ }, rt = /* @__PURE__ */ le({
1018
+ MdcTreeHandlers: () => it,
1019
+ QueryParamHandlers: () => Se,
1020
+ SearchHandlers: () => _e
1021
+ }), De = class extends L {
1022
+ #e = void 0;
1023
+ #t = void 0;
1024
+ #s = {};
1025
+ static viewEventCode() {
1026
+ return d.VIEW;
1027
+ }
1028
+ constructor() {
1029
+ super(), this.panelMap = /* @__PURE__ */ new Map(), this.user_ = void 0, this.split_ = void 0, this.panelEventMap_ = this.initPanelEventsInternal_(), this.switchViewMap_ = /* @__PURE__ */ new Map(), this.metaData_ = /* @__PURE__ */ new Map();
1030
+ }
1031
+ set recordHistory(e) {
1032
+ this.#t = e;
1033
+ }
1034
+ get recordHistory() {
1035
+ return this.#t;
1036
+ }
1037
+ set registerViewConstructor(e) {
1038
+ this.#e = e;
1039
+ }
1040
+ get registerViewConstructor() {
1041
+ return this.#e;
1042
+ }
1043
+ set utils(e) {
1044
+ this.#s = e;
1045
+ }
1046
+ get utils() {
1047
+ return this.#s;
1048
+ }
1049
+ set split(e) {
1050
+ this.split_ = e, this.listen(this.split_, d.SPLIT, (t) => {
1051
+ const s = t.detail.getValue(), i = t.detail.getData();
1052
+ switch (s) {
1053
+ case d.SPLIT_WILL_OPEN:
1054
+ this.onSplitWillOpen(i);
1055
+ break;
1056
+ case d.SPLIT_WILL_CLOSE:
1057
+ this.onSplitWillClose(i);
1058
+ break;
1059
+ case d.SPLIT_DID_CLOSE:
1060
+ this.onSplitDidClose(i);
1061
+ break;
1062
+ case d.SPLIT_DID_OPEN:
1063
+ this.onSplitDidOpen(i);
1064
+ break;
1065
+ case d.SPLIT_TRANSITION_END:
1066
+ break;
1067
+ default:
1068
+ C();
1069
+ }
1070
+ });
1071
+ }
1072
+ get split() {
1073
+ if (!this.split_) throw new Error("No SPLIT component available");
1074
+ return this.split_;
1075
+ }
1076
+ set user(e) {
1077
+ this.user_ = e, this.panelMap.forEach((t) => t.user = e);
1078
+ }
1079
+ get user() {
1080
+ return this.user_ || (this.user_ = new x()), this.user_;
1081
+ }
1082
+ render() {
1083
+ this.initPanelEvents(), this.preRender(), this.configurePanels(), this.displayPanels(), this.postRender();
1084
+ }
1085
+ initPanelEvents() {
1086
+ }
1087
+ preRender() {
1088
+ }
1089
+ configurePanels() {
1090
+ }
1091
+ displayPanels() {
1092
+ }
1093
+ postRender() {
1094
+ }
1095
+ dispose() {
1096
+ [...this.panelMap.values()].forEach((e) => e.dispose()), super.dispose();
1097
+ }
1098
+ addPanelToView(e, t) {
1099
+ t.user = this.user, this.removePanelByName(e), this.panelMap.set(e, t), this.listen(t, G.panelEventCode(), this.onPanelEvent.bind(this));
1100
+ }
1101
+ removePanelByName(e) {
1102
+ this.panelMap.has(e) && this.panelMap.get(e).dispose();
1103
+ }
1104
+ removePanel(e) {
1105
+ const [t, s] = [...this.panelMap.entries()].find(([i, r]) => r === e);
1106
+ t && s && (s.dispose(), this.panelMap.delete(t));
1107
+ }
1108
+ getPanelByName(e) {
1109
+ return this.panelMap.get(e);
1110
+ }
1111
+ broadcastToPanels(e) {
1112
+ [...this.panelMap.values()].forEach((t) => t.onViewDataBroadcast(e));
1113
+ }
1114
+ initPanelEventsInternal_() {
1115
+ const e = /* @__PURE__ */ new Map();
1116
+ return e.set("destroy_me", (t, s) => {
1117
+ this.removePanel(s);
1118
+ }), e.set("switch_view", (t, s) => {
1119
+ this.debugMe("switch_view received: eventData", t);
1120
+ const i = t.view;
1121
+ this.switchViewMap_.has(i) ? this.switchViewMap_.get(i)(t, s) : this.debugMe("NO VIEW FOUND FOR:", i, this.switchViewMap_);
1122
+ }), Object.entries({
1123
+ ..._e,
1124
+ ...Se
1125
+ }).forEach(([t, s]) => {
1126
+ e.set(t, s.bind(this));
1127
+ }), e;
1128
+ }
1129
+ mapPanEv(e, t) {
1130
+ this.panelEventMap_.set(e, t);
1131
+ }
1132
+ mapSwitchView(e, t) {
1133
+ this.switchViewMap_.set(e, t);
1134
+ }
1135
+ onPanelEvent(e) {
1136
+ let t = e.detail.getValue();
1137
+ if (this.debugMe(`PanelEvent Value: ${t}`), !j(t)) {
1138
+ this.debugMe(`The panel received an event without a value.
1139
+ There is nothing we can do with that.`);
1140
+ return;
1141
+ }
1142
+ const s = e.detail.getData();
1143
+ t?.startsWith("switch_view:") && (s.view = t.split(":")[1], t = "switch_view");
1144
+ const i = e.target;
1145
+ this.panelEventMap_.has(t) ? this.panelEventMap_.get(t)(s, i) : this.debugMe(`NO EVENT MATCH - This usually you are missing
1146
+ a "mapPanEv(${t} ..." statement in your panel JS
1147
+ or you have a "event='${t}'" attribute in your panel HTML`, {
1148
+ event: e,
1149
+ eventValue: t,
1150
+ eventData: s,
1151
+ panel: i.constructor.name
1152
+ });
1153
+ }
1154
+ onSplitWillOpen(e) {
1155
+ }
1156
+ onSplitWillClose(e) {
1157
+ }
1158
+ onSplitDidClose(e) {
1159
+ }
1160
+ onSplitDidOpen(e) {
1161
+ }
1162
+ dispatchViewEvent(e, t) {
1163
+ const s = new k(e, t), i = L.makeEvent(d.VIEW, s);
1164
+ return this.dispatchEvent(i);
1165
+ }
1166
+ get metaData() {
1167
+ return this.metaData_;
1168
+ }
1169
+ setMetaData(e, t) {
1170
+ return this.metaData_.set(e, t), this.metaData;
1171
+ }
1172
+ getMetaData(e) {
1173
+ return this.metaData_.get(e);
1174
+ }
1175
+ hasMetaData(e) {
1176
+ return this.metaData_.has(e);
1177
+ }
1178
+ }, nt = class extends L {
1179
+ #e = /* @__PURE__ */ new Map();
1180
+ #t = null;
1181
+ #s = void 0;
1182
+ #i = void 0;
1183
+ #r = /* @__PURE__ */ new Map();
1184
+ #n = {};
1185
+ constructor() {
1186
+ super(), this.#r = this.#o(), window.addEventListener("popstate", (e) => {
1187
+ e.state !== null && this.navTo(e.state);
1188
+ }), this.doOnBeat(() => {
1189
+ document.dispatchEvent(new CustomEvent("zoo-tick-60", { detail: { timestamp: Date.now() } }));
1190
+ }, 6e4);
1191
+ }
1192
+ set split(e) {
1193
+ this.#i = e;
1194
+ }
1195
+ get split() {
1196
+ if (!this.#i) throw new Error("No SPLIT component available");
1197
+ return this.#i;
1198
+ }
1199
+ set user(e) {
1200
+ this.#s = e, this.#t && (this.#t.user = this.user);
1201
+ }
1202
+ get user() {
1203
+ return this.#s || (this.#s = new x()), this.#s;
1204
+ }
1205
+ get utils() {
1206
+ return this.#n;
1207
+ }
1208
+ registerUtil(e) {
1209
+ this.#n = Ue(this.#n, e);
1210
+ }
1211
+ #o() {
1212
+ return (/* @__PURE__ */ new Map()).set("switch_view", (e, t) => {
1213
+ if (this.#e.has(e.view)) {
1214
+ const s = this.#e.get(e.view)(e.pk || e.recordId, e);
1215
+ this.switchView(s);
1216
+ }
1217
+ });
1218
+ }
1219
+ mapViewEv(e, t) {
1220
+ this.#r.set(e, t);
1221
+ }
1222
+ registerViewConstructor(e, t) {
1223
+ this.#e.set(e, t);
1224
+ }
1225
+ onViewEvent(e) {
1226
+ const t = e.detail.getValue(), s = e.detail.getData(), i = e.target;
1227
+ this.#r.has(t) ? this.#r.get(t)(s, i) : console.warn("Unhandled VIEW Event:", e, t, s, i);
1228
+ }
1229
+ setActiveView(e) {
1230
+ this.#t && (this.stopListeningTo(this.#t), this.#t.dispose(), this.#t = null), this.#t = e, this.#t.render();
1231
+ }
1232
+ initView(e) {
1233
+ return e.user = this.user, e.split = this.split, e.utils = this.utils, e.recordHistory = this.recordHistory.bind(this), e.registerViewConstructor = this.registerViewConstructor.bind(this), this.listen(e, De.viewEventCode(), this.onViewEvent.bind(this)), e;
1234
+ }
1235
+ switchView(e) {
1236
+ this.setActiveView(this.initView(e));
1237
+ }
1238
+ recordHistory(e) {
1239
+ this.debugMe("HISTORY", e), e.init ? history.replaceState(e, "", document.location.href) : e.history || history.pushState(e, "", null);
1240
+ }
1241
+ navTo = (e) => {
1242
+ e.history = !0;
1243
+ const t = e.view, s = this.#t;
1244
+ if (s.switchViewMap_.has(t))
1245
+ this.debugMe("NAV:VIEW:MAP", e), s.switchViewMap_.get(t)(e);
1246
+ else if (this.#e.has(t)) {
1247
+ const i = this.#e.get(t)(e.pk, e);
1248
+ this.debugMe("NAV:NEW:VIEW", e), this.switchView(i);
1249
+ }
1250
+ };
1251
+ };
1252
+ async function ot(e = {}) {
1253
+ const { registerCarbonLibrary: t } = await import("./chunks/register-D7SMu1Gy.js");
1254
+ return t(e);
1255
+ }
1256
+ async function at() {
1257
+ const { registerMdcLibrary: e } = await import("./chunks/register-D3pWAXhm.js");
1258
+ return e();
1259
+ }
1260
+ var pt = {
1261
+ Evt: L,
1262
+ Component: y,
1263
+ Dragger: H,
1264
+ Panel: G,
1265
+ FormPanel: Ze,
1266
+ Split: et,
1267
+ UserManager: x,
1268
+ View: De,
1269
+ Conductor: nt,
1270
+ DataBinder: Ae,
1271
+ UiEventType: d,
1272
+ domUtils: Oe,
1273
+ uriUtils: qe,
1274
+ registerCarbonLibrary: ot,
1275
+ registerMdcLibrary: at,
1276
+ ComponentLibraryRegistry: R,
1277
+ handlers: rt,
1278
+ zoo: Pe
1279
+ };
2
1280
  export {
3
- r as Binder,
4
- e as Component,
5
- i as ComponentLibraryRegistry,
6
- n as Conductor,
7
- o as Dragger,
8
- t as Evt,
9
- l as FormPanel,
10
- d as Panel,
11
- g as Split,
12
- y as UiEventType,
13
- m as UserManager,
14
- p as View,
15
- C as default,
16
- U as domUtils,
17
- b as handlers,
18
- u as registerCarbonLibrary,
19
- v as registerMdcLibrary,
20
- L as uriUtils,
21
- P as zoo
1281
+ Ae as Binder,
1282
+ y as Component,
1283
+ R as ComponentLibraryRegistry,
1284
+ nt as Conductor,
1285
+ H as Dragger,
1286
+ L as Evt,
1287
+ Ze as FormPanel,
1288
+ G as Panel,
1289
+ et as Split,
1290
+ d as UiEventType,
1291
+ x as UserManager,
1292
+ De as View,
1293
+ pt as default,
1294
+ Oe as domUtils,
1295
+ rt as handlers,
1296
+ ot as registerCarbonLibrary,
1297
+ at as registerMdcLibrary,
1298
+ qe as uriUtils,
1299
+ Pe as zoo
22
1300
  };