@trintel/zooy 1.0.20 → 1.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (224) 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-HYODt48Q.js +1 -0
  5. package/dist/chunks/register-aF5kN8wT.js +1379 -0
  6. package/dist/chunks/register-uV9z3usH.js +1 -0
  7. package/dist/chunks/{tree-utils-D7kpr-Wj.js → tree-utils-B2JEGXHR.js} +2 -1
  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 +4 -4
  12. package/dist/zooy.es.js +226 -237
  13. package/package.json +1 -1
  14. package/dist/chunks/16-B2HVhDIW.js +0 -1
  15. package/dist/chunks/16-B9Ad4Fob.js +0 -19
  16. package/dist/chunks/16-BXsOcjPx.js +0 -19
  17. package/dist/chunks/16-BZCBqUx6.js +0 -1
  18. package/dist/chunks/16-BmOXGjZf.js +0 -1
  19. package/dist/chunks/16-BsQdCz_w.js +0 -27
  20. package/dist/chunks/16-C-Rp3Nso.js +0 -1
  21. package/dist/chunks/16-C36sVk5F.js +0 -26
  22. package/dist/chunks/16-CZycT1I8.js +0 -1
  23. package/dist/chunks/16-Ce_hDgPW.js +0 -1
  24. package/dist/chunks/16-CinLDpNC.js +0 -19
  25. package/dist/chunks/16-Cj0hOjaI.js +0 -1
  26. package/dist/chunks/16-Cx-PCMJJ.js +0 -26
  27. package/dist/chunks/16-D8XFc44J.js +0 -110
  28. package/dist/chunks/16-DVx7Niko.js +0 -33
  29. package/dist/chunks/16-DZJZDJYY.js +0 -1
  30. package/dist/chunks/16-DoCnqtvj.js +0 -35
  31. package/dist/chunks/16-DyCV3lkl.js +0 -19
  32. package/dist/chunks/16-SwMpxJpB.js +0 -19
  33. package/dist/chunks/16-jVjxC8Bu.js +0 -1
  34. package/dist/chunks/16-ma2Q_204.js +0 -1
  35. package/dist/chunks/16-qZ3FOIw0.js +0 -1
  36. package/dist/chunks/20-BwzzGcZC.js +0 -80
  37. package/dist/chunks/20-CqNSki3g.js +0 -1
  38. package/dist/chunks/accordion-0mybViUv.js +0 -236
  39. package/dist/chunks/accordion-CvcaulG8.js +0 -45
  40. package/dist/chunks/badge-indicator-BUdDkz6Z.js +0 -18
  41. package/dist/chunks/badge-indicator-DuYbJV5o.js +0 -1
  42. package/dist/chunks/breadcrumb-CYKgjbdB.js +0 -19
  43. package/dist/chunks/breadcrumb-DB0PkiBX.js +0 -140
  44. package/dist/chunks/button-1g5b3tWS.js +0 -268
  45. package/dist/chunks/button-BKj8189A.js +0 -4
  46. package/dist/chunks/button-DAOoyQ8b.js +0 -67
  47. package/dist/chunks/button-DfRkC-OR.js +0 -72
  48. package/dist/chunks/button-skeleton-C0mW3D7v.js +0 -44
  49. package/dist/chunks/button-skeleton-KFGdwtUH.js +0 -21
  50. package/dist/chunks/carbon-element-BsPGNbmz.js +0 -1
  51. package/dist/chunks/carbon-element-Z5iEnFdr.js +0 -24
  52. package/dist/chunks/checkbox-CBD8Qmjx.js +0 -37
  53. package/dist/chunks/checkbox-CewERWBu.js +0 -40
  54. package/dist/chunks/checkbox-CxxD4wgP.js +0 -176
  55. package/dist/chunks/checkbox-DKS7fw29.js +0 -168
  56. package/dist/chunks/class-map-BwUbMyhc.js +0 -1
  57. package/dist/chunks/class-map-qeLb1IA_.js +0 -27
  58. package/dist/chunks/code-snippet-BJhK27fG.js +0 -205
  59. package/dist/chunks/code-snippet-BUQFh_v7.js +0 -53
  60. package/dist/chunks/collection-helpers-DPVzwwb8.js +0 -7
  61. package/dist/chunks/collection-helpers-g7DrZSRQ.js +0 -1
  62. package/dist/chunks/combo-box-BCOUQHyG.js +0 -39
  63. package/dist/chunks/combo-box-Bms5blM6.js +0 -325
  64. package/dist/chunks/combo-button-BSBAvBIW.js +0 -15
  65. package/dist/chunks/combo-button-Bc3hx7VJ.js +0 -92
  66. package/dist/chunks/component-library-registry-CJ1Yb_8E.js +0 -98
  67. package/dist/chunks/component-library-registry-Co7WzTfw.js +0 -1
  68. package/dist/chunks/content-switcher-BuLZ3Aae.js +0 -1
  69. package/dist/chunks/content-switcher-DIODRHwc.js +0 -2
  70. package/dist/chunks/content-switcher-item-0YPDXW1z.js +0 -27
  71. package/dist/chunks/content-switcher-item-DkRD8k8n.js +0 -272
  72. package/dist/chunks/copy-button-XD4reiTK.js +0 -121
  73. package/dist/chunks/copy-button-eI9B8iKc.js +0 -17
  74. package/dist/chunks/data-table-BImLEoIA.js +0 -1243
  75. package/dist/chunks/data-table-YLNCQhJx.js +0 -158
  76. package/dist/chunks/date-picker-CWIAwkKj.js +0 -66
  77. package/dist/chunks/date-picker-CXjiOkZH.js +0 -2167
  78. package/dist/chunks/decorate-Cnz2C5jL.js +0 -62
  79. package/dist/chunks/decorate-DT052P_1.js +0 -72
  80. package/dist/chunks/decorators-CHZSYVOk.js +0 -1
  81. package/dist/chunks/decorators-CK8kfuyw.js +0 -87
  82. package/dist/chunks/deep-shadow-contains-BlQ_KSu4.js +0 -15
  83. package/dist/chunks/deep-shadow-contains-OTuAt1VE.js +0 -1
  84. package/dist/chunks/directive-CtTB8jL3.js +0 -31
  85. package/dist/chunks/directive-DWoJrOxt.js +0 -1
  86. package/dist/chunks/dropdown-Cg9JduA5.js +0 -4
  87. package/dist/chunks/dropdown-item-CYwutWei.js +0 -677
  88. package/dist/chunks/dropdown-item-H53zayYk.js +0 -73
  89. package/dist/chunks/dropdown-jdFaaXEa.js +0 -32
  90. package/dist/chunks/file-uploader-6FOP_GAh.js +0 -79
  91. package/dist/chunks/file-uploader-BTk1MqcJ.js +0 -342
  92. package/dist/chunks/floating-controller-BphaSUPY.js +0 -1012
  93. package/dist/chunks/floating-controller-C4ivnNvp.js +0 -1
  94. package/dist/chunks/focus-C1mbe9-i.js +0 -1
  95. package/dist/chunks/focus-Dpis0wA_.js +0 -13
  96. package/dist/chunks/form-BEmId1-D.js +0 -20
  97. package/dist/chunks/form-BmSVyKnm.js +0 -1
  98. package/dist/chunks/form-DUzcwJO9.js +0 -23
  99. package/dist/chunks/form-crnrWPVH.js +0 -3
  100. package/dist/chunks/form-group-Dax3eYD4.js +0 -43
  101. package/dist/chunks/form-group-dIvuqjw2.js +0 -12
  102. package/dist/chunks/heading-BbB6mvMG.js +0 -47
  103. package/dist/chunks/heading-UN9MO1TN.js +0 -5
  104. package/dist/chunks/host-listener-BBI7oAFw.js +0 -37
  105. package/dist/chunks/host-listener-BzjpIsFF.js +0 -1
  106. package/dist/chunks/host-listener-CtA1D-wt.js +0 -1
  107. package/dist/chunks/host-listener-DJEakRMM.js +0 -17
  108. package/dist/chunks/icon-B_S1_kDJ.js +0 -1
  109. package/dist/chunks/icon-CINf5Icb.js +0 -28
  110. package/dist/chunks/icon-button-BtE0-oCE.js +0 -1
  111. package/dist/chunks/icon-button-CACU21y5.js +0 -16
  112. package/dist/chunks/icon-button-D2STrB4d.js +0 -6
  113. package/dist/chunks/icon-button-D569kvcZ.js +0 -84
  114. package/dist/chunks/icon-indicator-BkILzP5o.js +0 -1
  115. package/dist/chunks/icon-indicator-D_IHkSon.js +0 -445
  116. package/dist/chunks/icon-loader-B9uu2SkP.js +0 -7
  117. package/dist/chunks/icon-loader-CZ8MQjNl.js +0 -1
  118. package/dist/chunks/icon-loader-utils-BKulYpY6.js +0 -110
  119. package/dist/chunks/icon-loader-utils-C-vWa1iy.js +0 -1
  120. package/dist/chunks/if-defined-C4rY5CqG.js +0 -1
  121. package/dist/chunks/if-defined-DvPh-nZx.js +0 -5
  122. package/dist/chunks/if-non-empty-CqihXhSU.js +0 -1
  123. package/dist/chunks/if-non-empty-DIcT03Pc.js +0 -5
  124. package/dist/chunks/inline-loading-BIB-coVZ.js +0 -83
  125. package/dist/chunks/inline-loading-C4MpPNzv.js +0 -12
  126. package/dist/chunks/link-Bz8knkhr.js +0 -1
  127. package/dist/chunks/link-CyrOt3Yx.js +0 -24
  128. package/dist/chunks/link-DlDoN1r0.js +0 -1
  129. package/dist/chunks/link-MrslkhR7.js +0 -106
  130. package/dist/chunks/lit-BNk7ncU9.js +0 -3
  131. package/dist/chunks/lit-uyM4-HrV.js +0 -552
  132. package/dist/chunks/loading-CUUY8ITP.js +0 -68
  133. package/dist/chunks/loading-CX_B-YYv.js +0 -1
  134. package/dist/chunks/loading-SDDHeWof.js +0 -1
  135. package/dist/chunks/loading-icon-BsInpAjb.js +0 -16
  136. package/dist/chunks/loading-icon-iCI-C5ZG.js +0 -24
  137. package/dist/chunks/loading-xKooWNUJ.js +0 -2
  138. package/dist/chunks/menu-D2kFhclQ.js +0 -56
  139. package/dist/chunks/menu-DG7s9yXJ.js +0 -682
  140. package/dist/chunks/modal-C2EEHjQh.js +0 -27
  141. package/dist/chunks/modal-DEGWE2iT.js +0 -414
  142. package/dist/chunks/multi-select-BXST526m.js +0 -63
  143. package/dist/chunks/multi-select-CgDCOBWa.js +0 -384
  144. package/dist/chunks/notification-BEvb6zBP.js +0 -89
  145. package/dist/chunks/notification-DLOgEfr6.js +0 -426
  146. package/dist/chunks/number-input-CRIgLD3k.js +0 -284
  147. package/dist/chunks/number-input-CiXkIGVz.js +0 -76
  148. package/dist/chunks/on-D2_IwJad.js +0 -8
  149. package/dist/chunks/on-_BJL2XbM.js +0 -1
  150. package/dist/chunks/overflow-menu-BSMy7pUY.js +0 -34
  151. package/dist/chunks/overflow-menu-CGghH3Mz.js +0 -387
  152. package/dist/chunks/pagination-4SuGaSx6.js +0 -77
  153. package/dist/chunks/pagination-D7VFRyN2.js +0 -293
  154. package/dist/chunks/password-input-Cx2ItLqG.js +0 -68
  155. package/dist/chunks/password-input-NoZg_DjL.js +0 -210
  156. package/dist/chunks/popover--wvkgqdv.js +0 -1
  157. package/dist/chunks/popover-Ca4f4ZCE.js +0 -6
  158. package/dist/chunks/popover-content-BOaLSQt3.js +0 -15
  159. package/dist/chunks/popover-content-Bi-ydBhZ.js +0 -277
  160. package/dist/chunks/progress-bar-BTHREDPK.js +0 -101
  161. package/dist/chunks/progress-bar-p0YwLsuh.js +0 -22
  162. package/dist/chunks/progress-indicator-BP8k-xTC.js +0 -252
  163. package/dist/chunks/progress-indicator-cr687P29.js +0 -35
  164. package/dist/chunks/radio-button-CNOPBUK8.js +0 -396
  165. package/dist/chunks/radio-button-CU2ngHxo.js +0 -44
  166. package/dist/chunks/radio-group-manager-iPCcbWB8.js +0 -60
  167. package/dist/chunks/radio-group-manager-zfU1GLIW.js +0 -1
  168. package/dist/chunks/register-BXKEXKsC.js +0 -15
  169. package/dist/chunks/register-Bx7SlevL.js +0 -8198
  170. package/dist/chunks/register-CnJjkv07.js +0 -1
  171. package/dist/chunks/register-DqgfpeXv.js +0 -1399
  172. package/dist/chunks/search-BYWQ80wI.js +0 -4
  173. package/dist/chunks/search-BgSG9LA9.js +0 -22
  174. package/dist/chunks/search-CET7sHGW.js +0 -173
  175. package/dist/chunks/search-CUuRRsTX.js +0 -31
  176. package/dist/chunks/select-BifhTIxt.js +0 -37
  177. package/dist/chunks/select-Dh4AFZ2v.js +0 -4
  178. package/dist/chunks/select-item-BvwJ4Wc-.js +0 -77
  179. package/dist/chunks/select-item-DLWdT1CE.js +0 -272
  180. package/dist/chunks/shared-enums-BdDASwq-.js +0 -1
  181. package/dist/chunks/shared-enums-Cd0vBQFM.js +0 -6
  182. package/dist/chunks/skeleton-placeholder-Czj5sAeI.js +0 -28
  183. package/dist/chunks/skeleton-placeholder-aS-woCl8.js +0 -1
  184. package/dist/chunks/skeleton-text-BIHdj7Jx.js +0 -1
  185. package/dist/chunks/skeleton-text-CZ2bSuDE.js +0 -6
  186. package/dist/chunks/skeleton-text-DJrow5mh.js +0 -1
  187. package/dist/chunks/skeleton-text-INjLvc2Y.js +0 -71
  188. package/dist/chunks/slider-CoHP_UJ2.js +0 -878
  189. package/dist/chunks/slider-DhIZP9Ms.js +0 -246
  190. package/dist/chunks/stack-C66k74Zo.js +0 -1
  191. package/dist/chunks/stack-vrK3hQYJ.js +0 -85
  192. package/dist/chunks/structured-list-BWjXHFbX.js +0 -19
  193. package/dist/chunks/structured-list-lqhD2RqL.js +0 -234
  194. package/dist/chunks/tabs-DixpRz83.js +0 -58
  195. package/dist/chunks/tabs-DkIGB3cC.js +0 -316
  196. package/dist/chunks/tag-DpezbQqm.js +0 -93
  197. package/dist/chunks/tag-rQOD2v2s.js +0 -412
  198. package/dist/chunks/text-input-BYjtsh0H.js +0 -26
  199. package/dist/chunks/text-input-C2jRG8Lb.js +0 -72
  200. package/dist/chunks/text-input-DvygxhCJ.js +0 -4
  201. package/dist/chunks/text-input-DzSNpORC.js +0 -309
  202. package/dist/chunks/textarea-BZ34-RaT.js +0 -190
  203. package/dist/chunks/textarea-Be3YTme6.js +0 -57
  204. package/dist/chunks/tile-CQ9nINGM.js +0 -524
  205. package/dist/chunks/tile-DNWy90OU.js +0 -74
  206. package/dist/chunks/time-picker-CJ_ONMZi.js +0 -267
  207. package/dist/chunks/time-picker-DK_Lu3AK.js +0 -52
  208. package/dist/chunks/toggle-BBdusHAx.js +0 -36
  209. package/dist/chunks/toggle-Bfx6cOUM.js +0 -156
  210. package/dist/chunks/toggle-tip-CkH7fFX4.js +0 -46
  211. package/dist/chunks/toggle-tip-DF_GKfoM.js +0 -169
  212. package/dist/chunks/tooltip-COwRDvmc.js +0 -85
  213. package/dist/chunks/tooltip-DbGsUOZ8.js +0 -23
  214. package/dist/chunks/tooltip-content-BDcgoT6r.js +0 -1
  215. package/dist/chunks/tooltip-content-CkxKIMDr.js +0 -116
  216. package/dist/chunks/tree-utils-AeNlEhIR.js +0 -1
  217. package/dist/chunks/tree-view-BmoD8n0Y.js +0 -292
  218. package/dist/chunks/tree-view-Drfa7DNm.js +0 -82
  219. package/dist/chunks/unsafe-html-BP-z2WTp.js +0 -26
  220. package/dist/chunks/unsafe-html-Dego4Lbw.js +0 -1
  221. package/dist/chunks/validity-CMW3OiFU.js +0 -31
  222. package/dist/chunks/validity-zT-XWh2t.js +0 -1
  223. package/dist/chunks/zoo-Bb5HHyrn.js +0 -721
  224. package/dist/chunks/zoo-C_CBOaHL.js +0 -52
package/dist/zooy.cjs.js CHANGED
@@ -1,6 +1,6 @@
1
- Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("./chunks/component-library-registry-Co7WzTfw.js"),p=require("./chunks/tree-utils-AeNlEhIR.js"),I=require("./chunks/zoo-C_CBOaHL.js");var y=class extends EventTarget{#e=!1;#t=!1;#s=new Map;#r=new Set;#i=new Set;static makeEvent(e,t){return new CustomEvent(e,{detail:t})}set debugMode(e){if(typeof e!="boolean")throw new Error("This must be a boolean");this.#e=e}get debugMode(){return this.#e}get disposed(){return this.#t}get listeningTo(){return this.#s}get isObservedBy(){return this.#r}get activeIntervals(){return this.#i}debugMe(...e){this.#e&&console.log.apply(null,[this.constructor.name,"DEBUG:",...e])}isListenedToBy(e){this.#r.add(e)}listen(e,t,s,r=!1){e.addEventListener(t,s,r);const i=this.listeningTo.get(e)||{};i[t]=()=>e.removeEventListener(t,s,r),this.listeningTo.set(e,i),a.isDef(e.isListenedToBy)&&e.isListenedToBy(this)}stopBeingListenedTo(){for(const e of this.isObservedBy)e.stopListeningTo(this),this.isObservedBy.delete(e)}stopListeningTo(e,t){e&&this.listeningTo.has(e)&&(a.isDef(e.isObservedBy)&&e.isObservedBy.delete(this),a.isDef(t)?(Object.entries(this.listeningTo.get(e)).forEach(([s,r])=>{s===t&&r()}),Object.keys(this.listeningTo.get(e)).length||this.listeningTo.delete(e)):(Object.values(this.listeningTo.get(e)).forEach(s=>s()),this.listeningTo.delete(e)))}removeAllListener(){for(const e of this.listeningTo.keys())this.stopListeningTo(e)}clearAllIntervals(){for(const e of this.activeIntervals)clearInterval(e),this.activeIntervals.delete(e)}doOnBeat(e,t){const s=setInterval(e,t);this.activeIntervals.add(s)}disposeInternal(){this.stopBeingListenedTo(),this.removeAllListener(),this.clearAllIntervals(),this.#t=!0}dispose(){this.disposeInternal()}},z=class{constructor(e,t){this.value_=e,this.data_=t||{}}getValue(){return this.value_}getData(){return this.data_}},u={COMP:a.randomId(),COMP_DRAG_START:a.randomId(),COMP_DRAG_MOVE:a.randomId(),COMP_DRAG_END:a.randomId(),PANEL:a.randomId(),VIEW:a.randomId(),SPLIT:a.randomId(),SPLIT_WILL_OPEN:a.randomId(),SPLIT_DID_OPEN:a.randomId(),SPLIT_WILL_CLOSE:a.randomId(),SPLIT_DID_CLOSE:a.randomId(),SPLIT_TRANSITION_END:a.randomId(),READY:a.randomId(),PANEL_MINIMIZE:a.randomId(),FORM_SUBMIT_SUCCESS:a.randomId()},A={NOT_SUPPORTED:"Method not supported",DECORATE_INVALID:"Invalid element to decorate",ALREADY_RENDERED:"Component already rendered",ALREADY_DISPOSED:"Component already disposed",PARENT_UNABLE_TO_BE_SET:"Unable to set parent component",CHILD_INDEX_OUT_OF_BOUNDS:"Child component index out of bounds",NOT_OUR_CHILD:"Child is not in parent component",NOT_IN_DOCUMENT:"Operation not supported while component is not in document",STATE_INVALID:"Invalid component state"},L=class extends y{static compEventCode(){return u.COMP}static compReadyCode(){return u.READY}static compErrors(){return A}#e;#t;#s;#r;#i;#n;#o;#a;constructor(){super(),this.#e=()=>document.createElement("div"),this.#t=!1,this.#s=void 0,this.#r=void 0,this.#i=void 0,this.#n=void 0,this.#o=new Map,this.outOfTreeElements=[],this.placeholderDom=void 0,this.#a=()=>{}}set target(e){this.#i=e}get target(){return this.#i}set model(e){this.#r=e}get model(){return this.#r}set isInDocument(e){this.#t=e}get isInDocument(){return this.#t}set domFunc(e){this.#e=e}set readyFunc(e){this.#a=e}setElementInternal_(e){this.#s=e}getElement(){return this.#s}createDom(){this.#s=this.#e()}assertCanRenderAsync(){if(this.disposed)throw new Error(A.ALREADY_DISPOSED)}render(e){this.render_(e)}render_(e){if(this.disposed)throw new Error(A.ALREADY_DISPOSED);if(this.isInDocument)throw new Error(A.ALREADY_RENDERED);this.#s||this.createDom();const t=this.#s;e&&(this.#i=e),this.placeholderDom&&p.removeNode(this.placeholderDom),this.#i?p.isInPage(t)||this.#i.insertBefore(t,null):p.isInPage(t)||document.body.appendChild(t),(!this.#n||this.#n.isInDocument)&&this.enterDocument()}hoist(e,t=void 0){t||(t=document.querySelector("body")),t.appendChild(e),this.outOfTreeElements.push(e)}executeBeforeReady(){this.#a()}enterDocument(){this.disposed?p.removeNode(this.getElement()):(this.isInDocument=!0,[...this.#o.values()].forEach(e=>{!e.isInDocument&&e.getElement()&&e.enterDocument()}),this.executeBeforeReady(),this.dispatchCompEvent(u.READY))}exitDocument(){[...this.#o.values()].forEach(e=>{e.isInDocument&&e.exitDocument()}),this.stopBeingListenedTo(),this.removeAllListener(),this.isInDocument=!1,p.removeNode(this.getElement()),this.placeholderDom&&p.removeNode(this.placeholderDom)}disposeInternal(){this.isInDocument&&this.exitDocument(),this.#o&&[...this.#o.values()].forEach(e=>e.disposeInternal()),this.outOfTreeElements.forEach(p.removeNode),this.#s&&p.removeNode(this.#s),this.placeholderDom&&p.removeNode(this.placeholderDom),this.#o=null,this.#s=void 0,this.#r=null,this.#n=null,super.disposeInternal()}dispose(){this.abortController&&this.abortController.abort();const e=this.getElement();if(e)for(const t of a.ComponentLibraryRegistry.getRegisteredLibraries())try{const s=a.ComponentLibraryRegistry.get(t);s.dispose&&s.dispose(e)}catch(s){console.debug(`[${t}] Cleanup error during component disposal (non-critical):`,s)}super.dispose()}dispatchCompEvent(e,t){const s=new z(e,t),r=y.makeEvent(u.COMP,s);return this.dispatchEvent(r)}},c={CLICK:"click",RIGHTCLICK:"rightclick",DBLCLICK:"dblclick",MOUSEDOWN:"mousedown",MOUSEUP:"mouseup",MOUSEOVER:"mouseover",MOUSEOUT:"mouseout",MOUSEMOVE:"mousemove",MOUSEENTER:"mouseenter",MOUSELEAVE:"mouseleave",TOUCHSTART:"touchstart",TOUCHMOVE:"touchmove",TOUCHEND:"touchend",TOUCHCANCEL:"touchcancel",SUBMIT:"submit",CHANGE:"change",INPUT:"input",INVALID:"invalid",DRAGSTART:"dragstart",DRAGEND:"dragend",DRAGOVER:"dragover",DRAGENTER:"dragenter",DRAGEXIT:"dragexit",DRAGLEAVE:"dragleave",DROP:"drop",TRANSITIONEND:"transitionend",ANIMATIONEND:"animationend"},Se=[c.TOUCHMOVE,c.TOUCHSTART,c.TOUCHEND],De=e=>Se.includes(e.type),k=e=>(De(e)&&(e.clientX=e.targetTouches[0].clientX,e.clientY=e.targetTouches[0].clientY),e),Ce=(e,t,s,r)=>i=>{i.preventDefault();const n=k(i),h=n.currentTarget,[g,_]=p.getPos(h),E=n.clientX-g,D=n.clientY-_,o=e(g,_,E,D,h),l=s(g,_,E,D,h),d=t(g,_,E,D,h);let m=be(d,h,E,D);["x","ew"].includes(r)?m=Me(d,h,E,D):["y","ns"].includes(r)&&(m=Te(d,h,E,D));let f=!1;const v=b=>{f=!0,m(b)},S=b=>{document.removeEventListener(c.MOUSEMOVE,v,!0),document.removeEventListener(c.TOUCHMOVE,v,!0),document.removeEventListener(c.MOUSEUP,S,!0),document.removeEventListener(c.TOUCHEND,S,!0),f&&l(b)};return document.addEventListener(c.MOUSEUP,S,!0),document.addEventListener(c.TOUCHEND,S,!0),document.addEventListener(c.MOUSEMOVE,v,!0),document.addEventListener(c.TOUCHMOVE,v,!0),o(i),S},be=(e,t,s,r)=>i=>{i.preventDefault();const n=k(i);t.style.left=`${n.clientX-s}px`,t.style.top=`${n.clientY-r}px`,e(n)},Me=(e,t,s,r)=>i=>{i.preventDefault();const n=k(i);t.style.left=`${n.clientX-s}px`,e(n)},Te=(e,t,s,r)=>i=>{i.preventDefault();const n=k(i);t.style.top=`${n.clientY-r}px`,e(n)},F=(e,t)=>(s,r,i,n,h)=>g=>{e.dispatchCompEvent(t,{component:e,browserEvent:g,left:s,top:r,clientX:g.clientX,clientY:g.clientY,xOrg:i,yOrg:n,deltaX:g.clientX-i-s,deltaY:g.clientY-n-r,target:h})},U=class extends L{#e;#t;#s;#r;constructor(e="xy"){super(),this.#e=["x","y","xy","ew","ns"].includes(e.toLowerCase())?e.toLowerCase():"xy",this.#t=void 0,this.#s=!0,this.#r=t=>null}cancelDrag(e){this.#r(e)}set moveFreedom(e){this.#e=e,this.#s||(this.lock(),this.unlock())}get moveFreedom(){return this.#e}executeBeforeReady(){this.unlock(),super.executeBeforeReady()}unlock(){const e=t=>s=>{this.#r=t(s)};if(this.isInDocument&&this.#s){const t=F(this,u.COMP_DRAG_MOVE),s=Ce(F(this,u.COMP_DRAG_START),t,F(this,u.COMP_DRAG_END),this.#e);this.#s=!1,this.#t=this.#t||this.getElement(),this.listen(this.#t,c.MOUSEDOWN,e(s)),this.listen(this.#t,c.TOUCHSTART,s),this.#t.classList.remove("locked")}}lock(){this.stopListeningTo(this.#t,c.MOUSEDOWN),this.stopListeningTo(this.#t,c.TOUCHSTART),this.#s=!0,this.#t.classList.add("locked")}},te=a.__exportAll({getPath:()=>q,getQueryData:()=>ne,objectToUrlParms:()=>oe,queryDataToMap:()=>ae}),ye=new RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#([\\s\\S]*))?$"),se={SCHEME:1,USER_INFO:2,DOMAIN:3,PORT:4,PATH:5,QUERY_DATA:6,FRAGMENT:7},re=e=>e.match(ye),ie=(e,t)=>e?t?decodeURI(e.replace(/%25/g,"%2525")):decodeURIComponent(e):"",q=e=>ie(re(e)[se.PATH],!0),ne=e=>ie(re(e)[se.QUERY_DATA],!0),oe=e=>[...Object.entries(e)].map(t=>`${t[0]}=${t[1]}`).join("&"),Q=e=>e!=null&&e!=="",ae=e=>e.split("&").reduce((t,s)=>{const[r,i]=s.split("=");return Q(r)&&Q(i)&&t.set(r,i),t},new Map),Le=a.stripLeadingChar(" "),we=a.stripLeadingChar("/"),Ie=e=>document.cookie.split(";").map(t=>t.split("=")).reduce((t,s)=>t.set(Le(s[0]),s[1]),new Map).get(e),Oe=e=>{let t=0,s;const r=i=>{const n=i>0;return n?t+=1:t-=1,n?t===1:t===0};return i=>{s=s||document.getElementById(e),s&&r(i)&&s.classList.toggle("viz",t>0)}},le=Oe("the_loader"),j=()=>Promise.resolve(le(1)),V=e=>(le(0),Promise.resolve(e)),w=e=>e.ok?Promise.resolve(e):Promise.reject(new Error(`${e.url} ${e.status} (${e.statusText})`)),Re=e=>t=>{if(t.type==="opaqueredirect"||t.redirected){const s=we(q(t.url));e.setIsRedirected(!0,s),console.log("Redirect detected",s)}return w(t)},R=e=>e.json(),$=e=>e.text().then(t=>Promise.resolve(t),t=>Promise.reject(new Error(`Could not get text from response: ${t}`))),Pe=e=>e.headers.get("Content-Type")==="application/json"?R(e):$(e),N=(e,t,s="POST",r=void 0)=>{const i=new Headers;i.append("Content-type","application/json"),i.append("X-Requested-With","XMLHttpRequest"),e&&e!==""&&i.append("Authorization",`Bearer ${e}`);const n={cache:"no-cache",method:s,headers:i,credentials:"include",body:JSON.stringify(t)};return r&&(n.signal=r),n},ce=(e,t,s=!1,r=void 0)=>{const i=new Headers;if(t&&t!==""&&i.append("Authorization",`Bearer ${t}`),i.append("X-Requested-With","XMLHttpRequest"),s){const h=Ie("csrftoken");h&&s&&i.append("X-CSRFToken",h)}const n={cache:"no-cache",method:e,headers:i,redirect:"follow",credentials:"include"};return r&&(n.signal=r),n},Ae=(e,t,s=void 0)=>{const r=ce("POST",e,!1,s);return r.body=new FormData(t.formEl),r},K=(e,t=void 0)=>{const s=new Headers;s.append("Authorization",`Bearer ${e}`),s.append("X-Requested-With","XMLHttpRequest");const r={cache:"no-cache",headers:s,credentials:"include"};return t&&(r.signal=t),r},Ne=(e,t)=>{const s=new Request(e);return fetch(s,t).then(w).then($)},T=(e,t=void 0)=>s=>(V("").then(a.identity),s.name==="AbortError"?console.info(e,"ABORTED!"):console.error(e,s),t),P=class{constructor(e){this.user_={},this.jwt="",e&&this.updateProfileFromJwt(e).then(()=>{})}updateProfileFromJwt(e,t=!1){return t&&this.jwt!==""?Promise.resolve("User Profile Already exists"):e.non_field_errors?Promise.reject(new Error(`JWT ${e.non_field_errors}`)):(this.updateToken(e.token),this.updateProfile(e.user),Promise.resolve("User Profile Updated"))}updateProfile(e){this.user_=e}updateToken(e){this.jwt=e}get id(){return this.user_.id}get name(){return this.user_.name}get surname(){return this.user_.surname}get salutation(){let e=this.name;const t=this.surname;return t&&(e=e+" "+t),e}formSubmit(e){const t=new Request(e.uri.toString()),s=e.processSubmitReply.bind(e),r=T("Form submit error");return j().then(()=>fetch(t,Ae(this.jwt,e,e.abortController.signal))).then(Re(e)).then(V).then(Pe).then(s).catch(r)}putNoBody(e,t=void 0,s=!1){const r=T("putNobody error");return Ne(e,ce("PUT",this.jwt,s,t)).catch(r)}fetch(e,t=void 0){const s=new Request(e.toString()),r=T(`UMan Text GET Fetch: ${e}`);return j().then(()=>fetch(s,K(this.jwt,t))).then(w).then(V).then($).catch(r)}fetchAndSplit(e,t=void 0){const s=T(`fetchAndSplit: ${e}`);return this.fetch(e,t).then(p.handleTemplateProm).catch(s)}async fetchJson(e,t=void 0,s=void 0){const r=new Request(e.toString()),i=T(`fetchJson: ${e}`,s),n=K(this.jwt,t);await j();let h;try{h=await(await fetch(r,n)).json()}catch(g){return i(g)}return await V(),h}patchJson(e,t,s=void 0){const r=new Request(e.toString()),i=T(`patchJson: ${e}`),n=N(this.jwt,t,"PATCH",s);return fetch(r,n).then(w).then(R).catch(i)}postJson(e,t,s=void 0){const r=new Request(e.toString()),i=T(`postJson: ${e}`),n=N(this.jwt,t,"POST",s);return fetch(r,n).then(w).then(R).catch(i)}putJson(e,t,s=void 0){const r=new Request(e.toString()),i=T(`putJson: ${e}`),n=N(this.jwt,t,"PUT",s);return fetch(r,n).then(w).then(R).catch(i)}delJson(e,t,s=void 0){const r=new Request(e.toString()),i=T(`delJson: ${e}`),n=N(this.jwt,t,"DELETE",s);return fetch(r,n).then(w).then(R).catch(i)}},B=class extends L{static panelEventCode(){return u.PANEL}static compReadyCode(){return u.READY}constructor(e){super(),this.qParamMap_=new Map,this.uri_="",e&&this.parseUri(e),this.evalScripts=p.evalScripts(this),this.evalModules=p.evalModules(this),this.redirected=!1,this.responseObject={html:null,scripts:null},this.user_=void 0,"AbortController"in window?this.abortController=new AbortController:this.abortController={signal:void 0,abort:()=>{}},this.listMap=new Map}get uri(){const e=this.qParamMap_.size>0?"?"+oe(Object.fromEntries(this.qParamMap_)):"";return this.uri_+e}set user(e){this.user_=e}get user(){return this.user_||(this.user_=new P),this.user_}parseUri(e){this.uri_=q(e),this.qParamMap_=ae(ne(e))}addToQParams(e,t){this.qParamMap_.set(e,t)}removeFromQParams(e){this.qParamMap_.delete(e)}clearQParams(){this.qParamMap_.clear()}getCarbonComponents(e){return this.carbonComponents?.get(e)||[]}getCarbonComponentById(e){if(this.carbonComponents)for(const t of this.carbonComponents.values()){const s=t.find(r=>r.id===e);if(s)return s}}renderPlaceHolder(e){this.target&&(this.placeholderDom=e,this.target.insertBefore(this.placeholderDom,null))}renderWithTemplate(e){const t=this.user;return t?t.fetch(this.uri,this.abortController.signal).then(s=>(this.assertCanRenderAsync(),e&&e(this),this.onRenderWithTemplateReply(s).catch(r=>{r.message!==L.compErrors().ALREADY_DISPOSED&&console.error("RenderWithTemplate Err:",r)}),this)).catch(s=>{throw console.error("Panel.renderWithTemplate fetch failed:",s),s}):Promise.reject(new Error("No UserManager instance available for Panel.renderWithTemplate()"))}onRenderWithTemplateReply(e){return this.responseObject=p.splitScripts(e),this.domFunc=()=>this.responseObject.html,this.render(),Promise.resolve(this)}onReplacePartialDom(e,t){const s=this.getElement();if(a.isUndefined(s))return;const r=e.html;if(t.startsWith("."))[...s.querySelectorAll(t)].filter(i=>a.isDefAndNotNull(i.id)).map(i=>[i,r.querySelector(`#${i.id}`)]).filter(([i,n])=>a.isDefAndNotNull(n)).forEach(([i,n])=>{i.parentNode.replaceChild(n,i),this.parseContent(n)});else if(t.startsWith("#")){const i=r.querySelector(t),n=s.querySelector(t);n.parentNode.replaceChild(i,n),this.parseContent(i)}this.evalScripts(e.scripts),this.evalModules(e.modules)}renderWithJSON(e){return this.user?this.user.fetchJson(this.uri_,this.abortController.signal).then(t=>{this.assertCanRenderAsync(),e&&e(t,this),this.onRenderWithJSON(t).then(a.identity)}).catch(t=>{throw console.error("Panel.renderWithJSON fetch failed:",t),t}):Promise.reject(new Error("No UserManager instance available for Panel.renderWithJSON()"))}onRenderWithJSON(e){return Promise.resolve(this)}onAsyncJsonReply(e,t,s){}onAsyncHtmlReply(e,t){}onViewDataBroadcast(e){}parseContent(e){if(this.debugMe("Enable interactions. Panel:",e),typeof window.customElements<"u"&&a.ComponentLibraryRegistry.has("carbon")){const o=a.ComponentLibraryRegistry.get("carbon");o.render.call(this,e,o.cache).catch(l=>console.error("[Zooy] Carbon initialization failed:",l))}if(a.ComponentLibraryRegistry.has("mdc")){const o=a.ComponentLibraryRegistry.get("mdc");o.render.call(this,e,o.cache)}e.classList.contains("zoo__modal-base")&&e.classList.contains("close_on_click")&&this.listen(e,c.CLICK,o=>{o.target===e&&this.dispatchPanelEvent("destroy_me")}),[...e.querySelectorAll(".zoo__button:not(.external):not(.mdc-data-table__row)")].forEach(o=>{this.listen(o,c.CLICK,l=>{l.stopPropagation();const d=l.currentTarget,m=p.getElDataMap(d);this.dispatchPanelEvent(m.zv,Object.assign({orgEvt:l,trigger:d,href:d.href||m.href},m))})}),[...e.querySelectorAll("[href]:not(.external)")].forEach(o=>{this.listen(o,c.CLICK,l=>{const d=l.currentTarget;l.preventDefault(),l.stopPropagation();const m=p.getElDataMap(d),f=m.zv||"href";this.dispatchPanelEvent(f,Object.assign({orgEvt:l,trigger:l.target,href:d.href||m.href},m))})}),[...e.querySelectorAll("form.intercept_submit")].forEach(o=>{o.noValidate=!0,this.listen(o,c.SUBMIT,l=>{l.preventDefault(),l.stopPropagation();const d=p.getElDataMap(o),m=p.formToJSON(o.elements);this.dispatchPanelEvent(d.zv,Object.assign({orgEvt:l,trigger:l.target,formData:m,href:d.href},d))})}),[...e.querySelectorAll(".zoo__toggle_class_driver")].forEach(o=>{const l=p.getElDataMap(o),d=l.toggle_class_target_id,m=l.toggle_class,f=e.querySelector(`#${d}`);f&&m&&o.addEventListener(c.CLICK,v=>{v.stopPropagation(),f.classList.toggle(m)})});const t=Array.from(e.querySelectorAll(".folder_drop_zone")),s=Array.from(e.querySelectorAll("[draggable]")),r=o=>{o.preventDefault(),o.target.classList.add("drag_over")},i=o=>{o.preventDefault()},n=o=>{o.preventDefault(),o.target.classList.remove("drag_over")},h=o=>{o.preventDefault(),o.target.classList.remove("drag_over")},g=o=>{o.preventDefault(),o.target.classList.remove("drag_over")},_=o=>{o.dataTransfer.dropEffect="move";const l=p.getElDataMap(o.target);o.dataTransfer.setData("text/plain",JSON.stringify(l)),o.target.classList.add("drag_in_progress")},E=o=>{o.target.classList.remove("drag_in_progress")},D=o=>{g(o),o.stopPropagation();const l=JSON.parse(o.dataTransfer.getData("text/plain")),d=p.getElDataMap(o.target);return this.dispatchPanelEvent("drop_on",{custom:{on:d,from:l}}),!1};t.forEach(o=>{this.listen(o,c.DRAGOVER,i),this.listen(o,c.DRAGENTER,r),this.listen(o,c.DRAGEXIT,h),this.listen(o,c.DRAGLEAVE,n),this.listen(o,c.DROP,D)}),s.forEach(o=>{this.listen(o,c.DRAGSTART,_),this.listen(o,c.DRAGEND,E)}),[...e.querySelectorAll(".zoo_async_json")].forEach(o=>{const l=p.getElDataMap(o),d=l.href,m=this.onAsyncJsonReply.bind(this,o,l);this.user.fetchJson(d,this.abortController.signal).then(m);const f=l.z_json_reusable;f&&(this.jsonCallFuncs=this.jsonCallFuncs||{},this.jsonCallFuncs[f]=()=>{this.user.fetchJson(d,this.abortController.signal).then(m)});const v=a.toNumber(l.z_interval);a.isNumber(v)&&this.doOnBeat(()=>{this.user.fetchJson(d,this.abortController.signal).then(m)},v*60*1e3)}),[...e.querySelectorAll(".zoo_async_html")].forEach(o=>{const l=p.getElDataMap(o),d=l.href;this.user.fetchAndSplit(d,this.abortController.signal).then(f=>{o.appendChild(f.html),this.parseContent(o),this.evalScripts(f.scripts),this.evalModules(f.modules),this.onAsyncHtmlReply(o,l)});const m=a.toNumber(l.z_interval);a.isNumber(m)&&this.doOnBeat(()=>{this.user.fetchAndSplit(d,this.abortController.signal).then(f=>{o.replaceChildren(f.html),this.parseContent(o),this.evalScripts(f.scripts),this.evalModules(f.modules)})},m*60*1e3)})}enterDocument(){const e=this.getElement();this.parseContent(e),this.evalScripts(this.responseObject.scripts),this.evalModules(this.responseObject.modules),super.enterDocument()}exitDocument(){this.abortController.abort(),super.exitDocument()}setIsRedirected(e,t){this.redirected=e,this.redirected&&t&&(this.uri_=t)}dispatchPanelEvent(e,t){const s=new z(e,t),r=y.makeEvent(u.PANEL,s);return this.debugMe(`PANEL EVENT FIRED:
1
+ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const b=require("./chunks/component-library-registry-BBQV6Kpv.js"),p=require("./chunks/tree-utils-BYnipT-p.js"),U=require("./chunks/zoo-CY2QpG41.js");let a=require("badu"),De=require("ramda");var L=class extends EventTarget{#e=!1;#t=!1;#s=new Map;#r=new Set;#i=new Set;static makeEvent(e,t){return new CustomEvent(e,{detail:t})}set debugMode(e){if(typeof e!="boolean")throw new Error("This must be a boolean");this.#e=e}get debugMode(){return this.#e}get disposed(){return this.#t}get listeningTo(){return this.#s}get isObservedBy(){return this.#r}get activeIntervals(){return this.#i}debugMe(...e){this.#e&&console.log.apply(null,[this.constructor.name,"DEBUG:",...e])}isListenedToBy(e){this.#r.add(e)}listen(e,t,s,r=!1){e.addEventListener(t,s,r);const i=this.listeningTo.get(e)||{};i[t]=()=>e.removeEventListener(t,s,r),this.listeningTo.set(e,i),(0,a.isDef)(e.isListenedToBy)&&e.isListenedToBy(this)}stopBeingListenedTo(){for(const e of this.isObservedBy)e.stopListeningTo(this),this.isObservedBy.delete(e)}stopListeningTo(e,t){e&&this.listeningTo.has(e)&&((0,a.isDef)(e.isObservedBy)&&e.isObservedBy.delete(this),(0,a.isDef)(t)?(Object.entries(this.listeningTo.get(e)).forEach(([s,r])=>{s===t&&r()}),Object.keys(this.listeningTo.get(e)).length||this.listeningTo.delete(e)):(Object.values(this.listeningTo.get(e)).forEach(s=>s()),this.listeningTo.delete(e)))}removeAllListener(){for(const e of this.listeningTo.keys())this.stopListeningTo(e)}clearAllIntervals(){for(const e of this.activeIntervals)clearInterval(e),this.activeIntervals.delete(e)}doOnBeat(e,t){const s=setInterval(e,t);this.activeIntervals.add(s)}disposeInternal(){this.stopBeingListenedTo(),this.removeAllListener(),this.clearAllIntervals(),this.#t=!0}dispose(){this.disposeInternal()}},k=class{constructor(e,t){this.value_=e,this.data_=t||{}}getValue(){return this.value_}getData(){return this.data_}},u={COMP:(0,a.randomId)(),COMP_DRAG_START:(0,a.randomId)(),COMP_DRAG_MOVE:(0,a.randomId)(),COMP_DRAG_END:(0,a.randomId)(),PANEL:(0,a.randomId)(),VIEW:(0,a.randomId)(),SPLIT:(0,a.randomId)(),SPLIT_WILL_OPEN:(0,a.randomId)(),SPLIT_DID_OPEN:(0,a.randomId)(),SPLIT_WILL_CLOSE:(0,a.randomId)(),SPLIT_DID_CLOSE:(0,a.randomId)(),SPLIT_TRANSITION_END:(0,a.randomId)(),READY:(0,a.randomId)(),PANEL_MINIMIZE:(0,a.randomId)(),FORM_SUBMIT_SUCCESS:(0,a.randomId)()},A={NOT_SUPPORTED:"Method not supported",DECORATE_INVALID:"Invalid element to decorate",ALREADY_RENDERED:"Component already rendered",ALREADY_DISPOSED:"Component already disposed",PARENT_UNABLE_TO_BE_SET:"Unable to set parent component",CHILD_INDEX_OUT_OF_BOUNDS:"Child component index out of bounds",NOT_OUR_CHILD:"Child is not in parent component",NOT_IN_DOCUMENT:"Operation not supported while component is not in document",STATE_INVALID:"Invalid component state"},w=class extends L{static compEventCode(){return u.COMP}static compReadyCode(){return u.READY}static compErrors(){return A}#e;#t;#s;#r;#i;#n;#o;#a;constructor(){super(),this.#e=()=>document.createElement("div"),this.#t=!1,this.#s=void 0,this.#r=void 0,this.#i=void 0,this.#n=void 0,this.#o=new Map,this.outOfTreeElements=[],this.placeholderDom=void 0,this.#a=()=>{}}set target(e){this.#i=e}get target(){return this.#i}set model(e){this.#r=e}get model(){return this.#r}set isInDocument(e){this.#t=e}get isInDocument(){return this.#t}set domFunc(e){this.#e=e}set readyFunc(e){this.#a=e}setElementInternal_(e){this.#s=e}getElement(){return this.#s}createDom(){this.#s=this.#e()}assertCanRenderAsync(){if(this.disposed)throw new Error(A.ALREADY_DISPOSED)}render(e){this.render_(e)}render_(e){if(this.disposed)throw new Error(A.ALREADY_DISPOSED);if(this.isInDocument)throw new Error(A.ALREADY_RENDERED);this.#s||this.createDom();const t=this.#s;e&&(this.#i=e),this.placeholderDom&&p.removeNode(this.placeholderDom),this.#i?p.isInPage(t)||this.#i.insertBefore(t,null):p.isInPage(t)||document.body.appendChild(t),(!this.#n||this.#n.isInDocument)&&this.enterDocument()}hoist(e,t=void 0){t||(t=document.querySelector("body")),t.appendChild(e),this.outOfTreeElements.push(e)}executeBeforeReady(){this.#a()}enterDocument(){this.disposed?p.removeNode(this.getElement()):(this.isInDocument=!0,[...this.#o.values()].forEach(e=>{!e.isInDocument&&e.getElement()&&e.enterDocument()}),this.executeBeforeReady(),this.dispatchCompEvent(u.READY))}exitDocument(){[...this.#o.values()].forEach(e=>{e.isInDocument&&e.exitDocument()}),this.stopBeingListenedTo(),this.removeAllListener(),this.isInDocument=!1,p.removeNode(this.getElement()),this.placeholderDom&&p.removeNode(this.placeholderDom)}disposeInternal(){this.isInDocument&&this.exitDocument(),this.#o&&[...this.#o.values()].forEach(e=>e.disposeInternal()),this.outOfTreeElements.forEach(p.removeNode),this.#s&&p.removeNode(this.#s),this.placeholderDom&&p.removeNode(this.placeholderDom),this.#o=null,this.#s=void 0,this.#r=null,this.#n=null,super.disposeInternal()}dispose(){this.abortController&&this.abortController.abort();const e=this.getElement();if(e)for(const t of b.ComponentLibraryRegistry.getRegisteredLibraries())try{const s=b.ComponentLibraryRegistry.get(t);s.dispose&&s.dispose(e)}catch(s){console.debug(`[${t}] Cleanup error during component disposal (non-critical):`,s)}super.dispose()}dispatchCompEvent(e,t){const s=new k(e,t),r=L.makeEvent(u.COMP,s);return this.dispatchEvent(r)}},c={CLICK:"click",RIGHTCLICK:"rightclick",DBLCLICK:"dblclick",MOUSEDOWN:"mousedown",MOUSEUP:"mouseup",MOUSEOVER:"mouseover",MOUSEOUT:"mouseout",MOUSEMOVE:"mousemove",MOUSEENTER:"mouseenter",MOUSELEAVE:"mouseleave",TOUCHSTART:"touchstart",TOUCHMOVE:"touchmove",TOUCHEND:"touchend",TOUCHCANCEL:"touchcancel",SUBMIT:"submit",CHANGE:"change",INPUT:"input",INVALID:"invalid",DRAGSTART:"dragstart",DRAGEND:"dragend",DRAGOVER:"dragover",DRAGENTER:"dragenter",DRAGEXIT:"dragexit",DRAGLEAVE:"dragleave",DROP:"drop",TRANSITIONEND:"transitionend",ANIMATIONEND:"animationend"},Ce=[c.TOUCHMOVE,c.TOUCHSTART,c.TOUCHEND],be=e=>Ce.includes(e.type),x=e=>(be(e)&&(e.clientX=e.targetTouches[0].clientX,e.clientY=e.targetTouches[0].clientY),e),Me=(e,t,s,r)=>i=>{i.preventDefault();const o=x(i),h=o.currentTarget,[g,_]=p.getPos(h),E=o.clientX-g,D=o.clientY-_,n=e(g,_,E,D,h),l=s(g,_,E,D,h),d=t(g,_,E,D,h);let m=Te(d,h,E,D);["x","ew"].includes(r)?m=ye(d,h,E,D):["y","ns"].includes(r)&&(m=Le(d,h,E,D));let v=!1;const f=M=>{v=!0,m(M)},S=M=>{document.removeEventListener(c.MOUSEMOVE,f,!0),document.removeEventListener(c.TOUCHMOVE,f,!0),document.removeEventListener(c.MOUSEUP,S,!0),document.removeEventListener(c.TOUCHEND,S,!0),v&&l(M)};return document.addEventListener(c.MOUSEUP,S,!0),document.addEventListener(c.TOUCHEND,S,!0),document.addEventListener(c.MOUSEMOVE,f,!0),document.addEventListener(c.TOUCHMOVE,f,!0),n(i),S},Te=(e,t,s,r)=>i=>{i.preventDefault();const o=x(i);t.style.left=`${o.clientX-s}px`,t.style.top=`${o.clientY-r}px`,e(o)},ye=(e,t,s,r)=>i=>{i.preventDefault();const o=x(i);t.style.left=`${o.clientX-s}px`,e(o)},Le=(e,t,s,r)=>i=>{i.preventDefault();const o=x(i);t.style.top=`${o.clientY-r}px`,e(o)},q=(e,t)=>(s,r,i,o,h)=>g=>{e.dispatchCompEvent(t,{component:e,browserEvent:g,left:s,top:r,clientX:g.clientX,clientY:g.clientY,xOrg:i,yOrg:o,deltaX:g.clientX-i-s,deltaY:g.clientY-o-r,target:h})},z=class extends w{#e;#t;#s;#r;constructor(e="xy"){super(),this.#e=["x","y","xy","ew","ns"].includes(e.toLowerCase())?e.toLowerCase():"xy",this.#t=void 0,this.#s=!0,this.#r=t=>null}cancelDrag(e){this.#r(e)}set moveFreedom(e){this.#e=e,this.#s||(this.lock(),this.unlock())}get moveFreedom(){return this.#e}executeBeforeReady(){this.unlock(),super.executeBeforeReady()}unlock(){const e=t=>s=>{this.#r=t(s)};if(this.isInDocument&&this.#s){const t=q(this,u.COMP_DRAG_MOVE),s=Me(q(this,u.COMP_DRAG_START),t,q(this,u.COMP_DRAG_END),this.#e);this.#s=!1,this.#t=this.#t||this.getElement(),this.listen(this.#t,c.MOUSEDOWN,e(s)),this.listen(this.#t,c.TOUCHSTART,s),this.#t.classList.remove("locked")}}lock(){this.stopListeningTo(this.#t,c.MOUSEDOWN),this.stopListeningTo(this.#t,c.TOUCHSTART),this.#s=!0,this.#t.classList.add("locked")}},se=b.__exportAll({getPath:()=>j,getQueryData:()=>oe,objectToUrlParms:()=>ae,queryDataToMap:()=>le}),we=new RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#([\\s\\S]*))?$"),re={SCHEME:1,USER_INFO:2,DOMAIN:3,PORT:4,PATH:5,QUERY_DATA:6,FRAGMENT:7},ie=e=>e.match(we),ne=(e,t)=>e?t?decodeURI(e.replace(/%25/g,"%2525")):decodeURIComponent(e):"",j=e=>ne(ie(e)[re.PATH],!0),oe=e=>ne(ie(e)[re.QUERY_DATA],!0),ae=e=>[...Object.entries(e)].map(t=>`${t[0]}=${t[1]}`).join("&"),Q=e=>e!=null&&e!=="",le=e=>e.split("&").reduce((t,s)=>{const[r,i]=s.split("=");return Q(r)&&Q(i)&&t.set(r,i),t},new Map),Ie=(0,a.stripLeadingChar)(" "),Oe=(0,a.stripLeadingChar)("/"),Re=e=>document.cookie.split(";").map(t=>t.split("=")).reduce((t,s)=>t.set(Ie(s[0]),s[1]),new Map).get(e),Pe=e=>{let t=0,s;const r=i=>{const o=i>0;return o?t+=1:t-=1,o?t===1:t===0};return i=>{s=s||document.getElementById(e),s&&r(i)&&s.classList.toggle("viz",t>0)}},ce=Pe("the_loader"),$=()=>Promise.resolve(ce(1)),V=e=>(ce(0),Promise.resolve(e)),I=e=>e.ok?Promise.resolve(e):Promise.reject(new Error(`${e.url} ${e.status} (${e.statusText})`)),Ae=e=>t=>{if(t.type==="opaqueredirect"||t.redirected){const s=Oe(j(t.url));e.setIsRedirected(!0,s),console.log("Redirect detected",s)}return I(t)},R=e=>e.json(),H=e=>e.text().then(t=>Promise.resolve(t),t=>Promise.reject(new Error(`Could not get text from response: ${t}`))),Ne=e=>e.headers.get("Content-Type")==="application/json"?R(e):H(e),N=(e,t,s="POST",r=void 0)=>{const i=new Headers;i.append("Content-type","application/json"),i.append("X-Requested-With","XMLHttpRequest"),e&&e!==""&&i.append("Authorization",`Bearer ${e}`);const o={cache:"no-cache",method:s,headers:i,credentials:"include",body:JSON.stringify(t)};return r&&(o.signal=r),o},he=(e,t,s=!1,r=void 0)=>{const i=new Headers;if(t&&t!==""&&i.append("Authorization",`Bearer ${t}`),i.append("X-Requested-With","XMLHttpRequest"),s){const h=Re("csrftoken");h&&s&&i.append("X-CSRFToken",h)}const o={cache:"no-cache",method:e,headers:i,redirect:"follow",credentials:"include"};return r&&(o.signal=r),o},Ve=(e,t,s=void 0)=>{const r=he("POST",e,!1,s);return r.body=new FormData(t.formEl),r},Z=(e,t=void 0)=>{const s=new Headers;s.append("Authorization",`Bearer ${e}`),s.append("X-Requested-With","XMLHttpRequest");const r={cache:"no-cache",headers:s,credentials:"include"};return t&&(r.signal=t),r},Ue=(e,t)=>{const s=new Request(e);return fetch(s,t).then(I).then(H)},y=(e,t=void 0)=>s=>(V("").then(a.identity),s.name==="AbortError"?console.info(e,"ABORTED!"):console.error(e,s),t),P=class{constructor(e){this.user_={},this.jwt="",e&&this.updateProfileFromJwt(e).then(()=>{})}updateProfileFromJwt(e,t=!1){return t&&this.jwt!==""?Promise.resolve("User Profile Already exists"):e.non_field_errors?Promise.reject(new Error(`JWT ${e.non_field_errors}`)):(this.updateToken(e.token),this.updateProfile(e.user),Promise.resolve("User Profile Updated"))}updateProfile(e){this.user_=e}updateToken(e){this.jwt=e}get id(){return this.user_.id}get name(){return this.user_.name}get surname(){return this.user_.surname}get salutation(){let e=this.name;const t=this.surname;return t&&(e=e+" "+t),e}formSubmit(e){const t=new Request(e.uri.toString()),s=e.processSubmitReply.bind(e),r=y("Form submit error");return $().then(()=>fetch(t,Ve(this.jwt,e,e.abortController.signal))).then(Ae(e)).then(V).then(Ne).then(s).catch(r)}putNoBody(e,t=void 0,s=!1){const r=y("putNobody error");return Ue(e,he("PUT",this.jwt,s,t)).catch(r)}fetch(e,t=void 0){const s=new Request(e.toString()),r=y(`UMan Text GET Fetch: ${e}`);return $().then(()=>fetch(s,Z(this.jwt,t))).then(I).then(V).then(H).catch(r)}fetchAndSplit(e,t=void 0){const s=y(`fetchAndSplit: ${e}`);return this.fetch(e,t).then(p.handleTemplateProm).catch(s)}async fetchJson(e,t=void 0,s=void 0){const r=new Request(e.toString()),i=y(`fetchJson: ${e}`,s),o=Z(this.jwt,t);await $();let h;try{h=await(await fetch(r,o)).json()}catch(g){return i(g)}return await V(),h}patchJson(e,t,s=void 0){const r=new Request(e.toString()),i=y(`patchJson: ${e}`),o=N(this.jwt,t,"PATCH",s);return fetch(r,o).then(I).then(R).catch(i)}postJson(e,t,s=void 0){const r=new Request(e.toString()),i=y(`postJson: ${e}`),o=N(this.jwt,t,"POST",s);return fetch(r,o).then(I).then(R).catch(i)}putJson(e,t,s=void 0){const r=new Request(e.toString()),i=y(`putJson: ${e}`),o=N(this.jwt,t,"PUT",s);return fetch(r,o).then(I).then(R).catch(i)}delJson(e,t,s=void 0){const r=new Request(e.toString()),i=y(`delJson: ${e}`),o=N(this.jwt,t,"DELETE",s);return fetch(r,o).then(I).then(R).catch(i)}},B=class extends w{static panelEventCode(){return u.PANEL}static compReadyCode(){return u.READY}constructor(e){super(),this.qParamMap_=new Map,this.uri_="",e&&this.parseUri(e),this.evalScripts=p.evalScripts(this),this.evalModules=p.evalModules(this),this.redirected=!1,this.responseObject={html:null,scripts:null},this.user_=void 0,"AbortController"in window?this.abortController=new AbortController:this.abortController={signal:void 0,abort:()=>{}},this.listMap=new Map}get uri(){const e=this.qParamMap_.size>0?"?"+ae(Object.fromEntries(this.qParamMap_)):"";return this.uri_+e}set user(e){this.user_=e}get user(){return this.user_||(this.user_=new P),this.user_}parseUri(e){this.uri_=j(e),this.qParamMap_=le(oe(e))}addToQParams(e,t){this.qParamMap_.set(e,t)}removeFromQParams(e){this.qParamMap_.delete(e)}clearQParams(){this.qParamMap_.clear()}getCarbonComponents(e){return this.carbonComponents?.get(e)||[]}getCarbonComponentById(e){if(this.carbonComponents)for(const t of this.carbonComponents.values()){const s=t.find(r=>r.id===e);if(s)return s}}renderPlaceHolder(e){this.target&&(this.placeholderDom=e,this.target.insertBefore(this.placeholderDom,null))}renderWithTemplate(e){const t=this.user;return t?t.fetch(this.uri,this.abortController.signal).then(s=>(this.assertCanRenderAsync(),e&&e(this),this.onRenderWithTemplateReply(s).catch(r=>{r.message!==w.compErrors().ALREADY_DISPOSED&&console.error("RenderWithTemplate Err:",r)}),this)).catch(s=>{throw console.error("Panel.renderWithTemplate fetch failed:",s),s}):Promise.reject(new Error("No UserManager instance available for Panel.renderWithTemplate()"))}onRenderWithTemplateReply(e){return this.responseObject=p.splitScripts(e),this.domFunc=()=>this.responseObject.html,this.render(),Promise.resolve(this)}onReplacePartialDom(e,t){const s=this.getElement();if((0,a.isUndefined)(s))return;const r=e.html;if(t.startsWith("."))[...s.querySelectorAll(t)].filter(i=>(0,a.isDefAndNotNull)(i.id)).map(i=>[i,r.querySelector(`#${i.id}`)]).filter(([i,o])=>(0,a.isDefAndNotNull)(o)).forEach(([i,o])=>{i.parentNode.replaceChild(o,i),this.parseContent(o)});else if(t.startsWith("#")){const i=r.querySelector(t),o=s.querySelector(t);o.parentNode.replaceChild(i,o),this.parseContent(i)}this.evalScripts(e.scripts),this.evalModules(e.modules)}renderWithJSON(e){return this.user?this.user.fetchJson(this.uri_,this.abortController.signal).then(t=>{this.assertCanRenderAsync(),e&&e(t,this),this.onRenderWithJSON(t).then(a.identity)}).catch(t=>{throw console.error("Panel.renderWithJSON fetch failed:",t),t}):Promise.reject(new Error("No UserManager instance available for Panel.renderWithJSON()"))}onRenderWithJSON(e){return Promise.resolve(this)}onAsyncJsonReply(e,t,s){}onAsyncHtmlReply(e,t){}onViewDataBroadcast(e){}parseContent(e){if(this.debugMe("Enable interactions. Panel:",e),typeof window.customElements<"u"&&b.ComponentLibraryRegistry.has("carbon")){const n=b.ComponentLibraryRegistry.get("carbon");n.render.call(this,e,n.cache).catch(l=>console.error("[Zooy] Carbon initialization failed:",l))}if(b.ComponentLibraryRegistry.has("mdc")){const n=b.ComponentLibraryRegistry.get("mdc");n.render.call(this,e,n.cache)}e.classList.contains("zoo__modal-base")&&e.classList.contains("close_on_click")&&this.listen(e,c.CLICK,n=>{n.target===e&&this.dispatchPanelEvent("destroy_me")}),[...e.querySelectorAll(".zoo__button:not(.external):not(.mdc-data-table__row)")].forEach(n=>{this.listen(n,c.CLICK,l=>{l.stopPropagation();const d=l.currentTarget,m=p.getElDataMap(d);this.dispatchPanelEvent(m.zv,Object.assign({orgEvt:l,trigger:d,href:d.href||m.href},m))})}),[...e.querySelectorAll("[href]:not(.external):not([event])")].forEach(n=>{this.listen(n,c.CLICK,l=>{const d=l.currentTarget;l.preventDefault(),l.stopPropagation();const m=p.getElDataMap(d),v=m.zv||"href";this.dispatchPanelEvent(v,Object.assign({orgEvt:l,trigger:l.target,href:d.href||m.href},m))})}),[...e.querySelectorAll("form.intercept_submit")].forEach(n=>{n.noValidate=!0,this.listen(n,c.SUBMIT,l=>{l.preventDefault(),l.stopPropagation();const d=p.getElDataMap(n),m=p.formToJSON(n.elements);this.dispatchPanelEvent(d.zv,Object.assign({orgEvt:l,trigger:l.target,formData:m,href:d.href},d))})}),[...e.querySelectorAll(".zoo__toggle_class_driver")].forEach(n=>{const l=p.getElDataMap(n),d=l.toggle_class_target_id,m=l.toggle_class,v=e.querySelector(`#${d}`);v&&m&&n.addEventListener(c.CLICK,f=>{f.stopPropagation(),v.classList.toggle(m)})});const t=Array.from(e.querySelectorAll(".folder_drop_zone")),s=Array.from(e.querySelectorAll("[draggable]")),r=n=>{n.preventDefault(),n.target.classList.add("drag_over")},i=n=>{n.preventDefault()},o=n=>{n.preventDefault(),n.target.classList.remove("drag_over")},h=n=>{n.preventDefault(),n.target.classList.remove("drag_over")},g=n=>{n.preventDefault(),n.target.classList.remove("drag_over")},_=n=>{n.dataTransfer.dropEffect="move";const l=p.getElDataMap(n.target);n.dataTransfer.setData("text/plain",JSON.stringify(l)),n.target.classList.add("drag_in_progress")},E=n=>{n.target.classList.remove("drag_in_progress")},D=n=>{g(n),n.stopPropagation();const l=JSON.parse(n.dataTransfer.getData("text/plain")),d=p.getElDataMap(n.target);return this.dispatchPanelEvent("drop_on",{custom:{on:d,from:l}}),!1};t.forEach(n=>{this.listen(n,c.DRAGOVER,i),this.listen(n,c.DRAGENTER,r),this.listen(n,c.DRAGEXIT,h),this.listen(n,c.DRAGLEAVE,o),this.listen(n,c.DROP,D)}),s.forEach(n=>{this.listen(n,c.DRAGSTART,_),this.listen(n,c.DRAGEND,E)}),[...e.querySelectorAll(".zoo_async_json")].forEach(n=>{const l=p.getElDataMap(n),d=l.href,m=this.onAsyncJsonReply.bind(this,n,l);this.user.fetchJson(d,this.abortController.signal).then(m);const v=l.z_json_reusable;v&&(this.jsonCallFuncs=this.jsonCallFuncs||{},this.jsonCallFuncs[v]=()=>{this.user.fetchJson(d,this.abortController.signal).then(m)});const f=(0,a.toNumber)(l.z_interval);(0,a.isNumber)(f)&&this.doOnBeat(()=>{this.user.fetchJson(d,this.abortController.signal).then(m)},f*60*1e3)}),[...e.querySelectorAll(".zoo_async_html")].forEach(n=>{const l=p.getElDataMap(n),d=l.href;this.user.fetchAndSplit(d,this.abortController.signal).then(v=>{n.appendChild(v.html),this.parseContent(n),this.evalScripts(v.scripts),this.evalModules(v.modules),this.onAsyncHtmlReply(n,l)});const m=(0,a.toNumber)(l.z_interval);(0,a.isNumber)(m)&&this.doOnBeat(()=>{this.user.fetchAndSplit(d,this.abortController.signal).then(v=>{n.replaceChildren(v.html),this.parseContent(n),this.evalScripts(v.scripts),this.evalModules(v.modules)})},m*60*1e3)})}enterDocument(){const e=this.getElement();this.parseContent(e),this.evalScripts(this.responseObject.scripts),this.evalModules(this.responseObject.modules),super.enterDocument()}exitDocument(){this.abortController.abort(),super.exitDocument()}setIsRedirected(e,t){this.redirected=e,this.redirected&&t&&(this.uri_=t)}dispatchPanelEvent(e,t){const s=new k(e,t),r=L.makeEvent(u.PANEL,s);return this.debugMe(`PANEL EVENT FIRED:
2
2
  value:${e}
3
- data:${t}`),this.dispatchEvent(r)}},he=class extends B{#e=null;#t=new Map;#s=!0;constructor(e,t=!0){super(e),this.#s=t,this.onSubmitSucFunc=(s,r)=>null}get formEl(){return this.#e}enterDocument(){super.enterDocument(),this.formIdElementToForm_()}formIdElementToForm_(){this.#e=this.getFormFromId(),this.#e&&(this.#a(this.#e),this.#r())}getFormFromId(e){let t=null,s=this.getElement().querySelector("form");return e&&(s=document.getElementById(e)||s),s&&s.tagName.toLowerCase()==="form"&&(t=s),t}#r(){this.#e&&(this.listen(this.#e,c.CHANGE,e=>{this.#o(e)},{passive:!0}),this.listen(this.#e,c.INPUT,e=>{this.clearAllValidationErrors(),this.#o(e)}),this.listen(this.#e,c.INVALID,e=>{e.preventDefault();const t=e.target;this.#n(t),this.displayFieldError(t)},{passive:!0}))}checkAllFields(){const e=[...this.#e.elements].map(t=>[this.#i(t),t]).filter(t=>!t[0]);return e.forEach(t=>this.displayFieldError(t[1])),e.length===0}clearAllValidationErrors(){[...this.#e?this.#e.elements:[]].forEach(e=>this.#n(e)),[...this.#e.querySelectorAll(".non-field-errors")].forEach(e=>e.classList.remove("alert-error"))}displayAlert_(e,t,s){const r=document.getElementById(`${e.id}-helper-text`)||document.createElement("p");r.textContent=t,this.#t.set(e,r)}#i(e){this.#n(e);let t=!e.willValidate;return e.willValidate&&(t=e.checkValidity()),t}#n(e){e.classList.remove("error"),this.#t.has(e)&&(this.#t.get(e).textContent=""),this.#t.delete(e)}displayFieldError(e,t){const s=t||e.validationMessage;e.classList.add("error"),this.displayAlert_(e,s,"alert-error")}displayFieldSuccess(e,t){this.displayAlert_(e,t,"alert-success")}displayFieldInfo(e,t){this.displayAlert_(e,t,"alert-info")}#o(e){this.#i(e.target)}#a(e){if(e&&this.#s){e.noValidate=!0;const t=this.user;this.listen(e,c.SUBMIT,s=>{s.preventDefault(),this.debugMe("Intercepted from SUBMIT"),this.checkAllFields()&&t&&t.formSubmit(this)})}return e}onSubmitSuccess(e){this.onSubmitSucFunc=e}replaceForm(e){if(this.responseObject=p.splitScripts(e),this.responseObject.html){if(this.redirected){this.removeAllListener();const t=this.getElement(),s=t.parentNode;this.setElementInternal_(this.responseObject.html),s.replaceChild(this.getElement(),t)}else{const t=this.responseObject.html.querySelector("form");t&&p.replaceNode(t,this.#e);const s=this.responseObject.html.querySelector('button[type="submit"]'),r=this.getElement().querySelector('button[type="submit"]');s&&r&&p.replaceNode(s,r)}this.enterDocument()}}refreshFromFromServer(){const e=this.user,t=this.uri;return e?e.fetch(t,this.abortController.signal).then(s=>this.replaceForm(s)):Promise.reject(new Error("No UserManager instance available for FormPanel.refreshFromFromServer()"))}processSubmitReply(e){this.clearAllValidationErrors();let t=!1;if(a.whatType(e)==="object"&&e.success)return Promise.resolve(this).then(()=>{this.onSubmitSucFunc(this,e),this.dispatchCompEvent(u.FORM_SUBMIT_SUCCESS)});if(e==="success"?(this.debugMe(`
3
+ data:${t}`),this.dispatchEvent(r)}},de=class extends B{#e=null;#t=new Map;#s=!0;constructor(e,t=!0){super(e),this.#s=t,this.onSubmitSucFunc=(s,r)=>null}get formEl(){return this.#e}enterDocument(){super.enterDocument(),this.formIdElementToForm_()}formIdElementToForm_(){this.#e=this.getFormFromId(),this.#e&&(this.#a(this.#e),this.#r())}getFormFromId(e){let t=null,s=this.getElement().querySelector("form");return e&&(s=document.getElementById(e)||s),s&&s.tagName.toLowerCase()==="form"&&(t=s),t}#r(){this.#e&&(this.listen(this.#e,c.CHANGE,e=>{this.#o(e)},{passive:!0}),this.listen(this.#e,c.INPUT,e=>{this.clearAllValidationErrors(),this.#o(e)}),this.listen(this.#e,c.INVALID,e=>{e.preventDefault();const t=e.target;this.#n(t),this.displayFieldError(t)},{passive:!0}))}checkAllFields(){const e=[...this.#e.elements].map(t=>[this.#i(t),t]).filter(t=>!t[0]);return e.forEach(t=>this.displayFieldError(t[1])),e.length===0}clearAllValidationErrors(){[...this.#e?this.#e.elements:[]].forEach(e=>this.#n(e)),[...this.#e.querySelectorAll(".non-field-errors")].forEach(e=>e.classList.remove("alert-error"))}displayAlert_(e,t,s){const r=document.getElementById(`${e.id}-helper-text`)||document.createElement("p");r.textContent=t,this.#t.set(e,r)}#i(e){this.#n(e);let t=!e.willValidate;return e.willValidate&&(t=e.checkValidity()),t}#n(e){e.classList.remove("error"),this.#t.has(e)&&(this.#t.get(e).textContent=""),this.#t.delete(e)}displayFieldError(e,t){const s=t||e.validationMessage;e.classList.add("error"),this.displayAlert_(e,s,"alert-error")}displayFieldSuccess(e,t){this.displayAlert_(e,t,"alert-success")}displayFieldInfo(e,t){this.displayAlert_(e,t,"alert-info")}#o(e){this.#i(e.target)}#a(e){if(e&&this.#s){e.noValidate=!0;const t=this.user;this.listen(e,c.SUBMIT,s=>{s.preventDefault(),this.debugMe("Intercepted from SUBMIT"),this.checkAllFields()&&t&&t.formSubmit(this)})}return e}onSubmitSuccess(e){this.onSubmitSucFunc=e}replaceForm(e){if(this.responseObject=p.splitScripts(e),this.responseObject.html){if(this.redirected){this.removeAllListener();const t=this.getElement(),s=t.parentNode;this.setElementInternal_(this.responseObject.html),s.replaceChild(this.getElement(),t)}else{const t=this.responseObject.html.querySelector("form");t&&p.replaceNode(t,this.#e);const s=this.responseObject.html.querySelector('button[type="submit"]'),r=this.getElement().querySelector('button[type="submit"]');s&&r&&p.replaceNode(s,r)}this.enterDocument()}}refreshFromFromServer(){const e=this.user,t=this.uri;return e?e.fetch(t,this.abortController.signal).then(s=>this.replaceForm(s)):Promise.reject(new Error("No UserManager instance available for FormPanel.refreshFromFromServer()"))}processSubmitReply(e){this.clearAllValidationErrors();let t=!1;if((0,a.whatType)(e)==="object"&&e.success)return Promise.resolve(this).then(()=>{this.onSubmitSucFunc(this,e),this.dispatchCompEvent(u.FORM_SUBMIT_SUCCESS)});if(e==="success"?(this.debugMe(`
4
4
  1.REDIRECTED: ${this.redirected}
5
5
  REPLY: ${e}`),t=!0):e===`redirected_success
6
6
  `?(this.debugMe(`
@@ -13,7 +13,7 @@ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{val
13
13
  5.REDIRECTED: ${this.redirected}
14
14
  SUCCESS: ${t}`),Promise.resolve(this).then(()=>{this.onSubmitSucFunc(this),this.dispatchCompEvent(u.FORM_SUBMIT_SUCCESS)});this.debugMe(`
15
15
  6.REDIRECTED: ${this.redirected}
16
- SUCCESS: ${t}`)}},de=class extends L{static splitEventCode(){return u.SPLIT}constructor(){super(),this.dragImage_=document.createElement("canvas"),this.nestMap_=new Map,this.nestCallbackMap_=new Map,this.splitNests_=new Set}get nests(){return[...this.nestMap_.entries()].filter(([e,{nestEl:t}])=>t)}getNest(e){return this.nestMap_.get(e)?.nestEl}get nestNames(){return[...this.nestMap_.entries()].filter(([e,t])=>!this.splitNests_.has(t)).map(([e])=>e)}closeAndLockAll(e=a.identity,t=!1){this.nestNames.forEach(s=>this.closeAndLock(s,e,t))}openAndUnlockAll(e=a.identity,t=!1){this.nestNames.forEach(s=>this.openAndUnlock(s,e,t))}lock(e){const{dragEl:t}=this.nestMap_.get(e);t.classList.add("locked")}unlock(e){const{dragEl:t}=this.nestMap_.get(e);t.classList.remove("locked")}resize(e,t,s=a.identity,r=!1){const{sizeNow:i,nestEl:n,canResize:h}=this.nestMap_.get(e);h&&(r||i===t?(n.classList.remove("animated"),n.style.flexBasis=`${t}px`,this.nestMap_.get(e).sizeNow=t,s()):(n.classList.add("animated"),this.nestCallbackMap_.set(e,()=>{n.classList.remove("animated"),this.nestMap_.get(e).sizeNow=t,s()}),n.style.flexBasis=`${t}px`))}closeAndLock(e,t=a.identity,s=!1){const{nestEl:r,dragEl:i,canResize:n}=this.nestMap_.get(e);if(!n)return;const h=()=>{i.classList.add("locked","closed"),r.classList.add("closed"),t()};this.resize(e,0,h,s)}closeAndUnlock(e,t=a.identity,s=!1){const{nestEl:r,dragEl:i,canResize:n}=this.nestMap_.get(e);if(!n)return;const h=()=>{r.classList.remove("closed"),i.classList.remove("closed","locked"),i.classList.add("collapsed"),t()};this.resize(e,0,h,s)}openAndUnlock(e,t,s,r=!1){const{nestEl:i,dragEl:n,defSize:h,lastSize:g,canResize:_}=this.nestMap_.get(e);if(!_)return;const E=t||g||h;i.classList.remove("closed"),n.classList.remove("closed","locked","collapsed"),setTimeout(()=>{this.resize(e,E,s,r)},50)}openAndLock(e,t,s,r=!1){const{nestEl:i,dragEl:n,defSize:h,lastSize:g,canResize:_}=this.nestMap_.get(e);if(!_)return;const E=t||g||h;i.classList.remove("closed"),n.classList.remove("closed","collapsed"),setTimeout(()=>{this.resize(e,E,s,r)},50)}close(e,t=a.identity,s=!1){const{dragEl:r,canResize:i,nestEl:n}=this.nestMap_.get(e);if(!i)return;this.dispatchSplitEvent(u.SPLIT_WILL_CLOSE,{nestName:e,nestEl:n});const h=()=>{r.classList.add("collapsed"),this.dispatchSplitEvent(u.SPLIT_DID_CLOSE,{nestName:e,nestEl:n}),t()};this.resize(e,0,h,s)}open(e,t=a.identity,s=!1){const{defSize:r,lastSize:i,dragEl:n,canResize:h,nestEl:g}=this.nestMap_.get(e);if(!h)return;this.dispatchSplitEvent(u.SPLIT_WILL_OPEN,{nestName:e,nestEl:g}),n.classList.remove("collapsed","closed");const _=i||r,E=()=>{this.dispatchSplitEvent(u.SPLIT_DID_OPEN,{nestName:e,nestEl:g}),t()};this.resize(e,_,E,s)}toggle(e,t,s=!1){this.nestMap_.get(e).sizeNow===0?this.open(e,t,s):this.close(e,t,s)}addSplit(e=void 0,t="EW",s=100,r=100,i=[],n=[],h=[],g=[],_=[]){const E=e||this.getElement();if(this.splitNests_.has(E))return["Already used!",E];Ve(E,t),this.splitNests_.add(E);let D="";if(e){const C=[...this.nestMap_.entries()].find(([M,{nestEl:O}])=>O===e);if(C)D=C[0];else return["Element not managed by this component",e]}const o=`${D}A`,l=Z(s,["zoo_nest__A",o,...i]),d=new U(t);d.domFunc=ee([`zoo_drag_${o}`,...g],_),d.render(E),this.nestMap_.set(o,{side:"A",nestEl:l,dragger:d,dragEl:d.getElement(),defSize:s,sizeNow:-1,canResize:!0});const m=`${D}B`,f=Ue(["zoo_nest__B",m,...n]);this.nestMap_.set(m,{nestEl:f,canResize:!1});const v=`${D}C`,S=new U(t);S.domFunc=ee([`zoo_drag_${v}`,...g],_),S.render(E);const b=Z(r,["zoo_nest__C",v,...h]);this.nestMap_.set(v,{side:"C",nestEl:b,dragger:S,dragEl:S.getElement(),defSize:r,sizeNow:-1,canResize:!0}),[l,d.getElement(),f,S.getElement(),b].forEach(C=>E.appendChild(C));let W=0;const J=(C,M,O,ve)=>{let x;const G=C==="NS"?"height":"width",_e=C==="NS"?"deltaY":"deltaX";return Y=>{switch(Y.detail.value_){case u.COMP_DRAG_START:x=M.getBoundingClientRect()[G],W=f.getBoundingClientRect()[G]+x,this.nestMap_.get(O).dragEl.classList.remove("collapsed");break;case u.COMP_DRAG_MOVE:{const X=Math.min(W,x+ve*Y.detail.data_[_e]);this.nestMap_.get(O).lastSize=X,M.style.flexBasis=X+"px";break}case u.COMP_DRAG_END:this.dispatchSplitEvent(u.COMP_DRAG_END,this.nestMap_.get(O));break;default:break}}};this.listen(d,L.compEventCode(),J(t,l,o,1)),this.listen(S,L.compEventCode(),J(t,b,v,-1)),this.listen(d.getElement(),c.DBLCLICK,()=>this.toggle(o)),this.listen(S.getElement(),c.DBLCLICK,()=>this.toggle(v)),this.listen(d.getElement().querySelector(".zoo_grabber"),c.CLICK,()=>this.toggle(o)),this.listen(S.getElement().querySelector(".zoo_grabber"),c.CLICK,()=>this.toggle(v)),this.listen(l,c.TRANSITIONEND,C=>{if(C.propertyName==="flex-basis"&&C.target===l){const M=this.nestCallbackMap_.get(o);this.nestCallbackMap_.delete(o),M&&M(),this.dispatchSplitEvent(u.SPLIT_TRANSITION_END,this.nestMap_.get(o))}}),this.listen(b,c.TRANSITIONEND,C=>{if(C.propertyName==="flex-basis"&&C.target===b){const M=this.nestCallbackMap_.get(v);this.nestCallbackMap_.delete(v),M&&M(),this.dispatchSplitEvent(u.SPLIT_TRANSITION_END,this.nestMap_.get(v))}})}dispatchSplitEvent(e,t){const s=new z(e,t),r=y.makeEvent(u.SPLIT,s);return this.dispatchEvent(r)}},Ve=(e,t)=>(e.classList.add("zoo_split",`zoo_split__${t.toLowerCase()}`),e),Z=(e,t=[])=>{const s=document.createElement("div");return s.setAttribute("id",a.randomId(7)),s.classList.add("zoo_nest","zoo_nest__outer",...t),s.style.flexBasis=e+"px",s},Ue=(e=[])=>{const t=document.createElement("div");return t.setAttribute("id",a.randomId(7)),t.classList.add("zoo_nest","zoo_nest__inner",...e),t},ee=(e=[],t=[])=>()=>{const s=document.createElement("div");s.setAttribute("id",a.randomId(7)),s.classList.add("zoo_dragger",...e);const r=document.createElement("div");return r.classList.add("zoo_grabber",...t),s.appendChild(r),s},ze={toggle_tree:function(e,t){p.toggleTree(e,t)},"tree_toggle-children":function(e,t){p.toggleTreeChildren(t,e)}},ue={search:function(e,t){let s=`${e.href}`;const r=e.formData.q,i=e.targetval;if(r!==""&&(s=`${s}?q=${r}`),i!==""){let n=i;i.includes("page=")&&(n=i.split("&").filter(h=>!h.includes("page=")).join("&")),s=r!==""?`${s}&${n}`:`${s}?${n}`}this.user.fetchAndSplit(s,t.abortController.signal).then(n=>t.onReplacePartialDom(n,e.zvptarget))},reset_search:function(e,t){const s=e.trigger.closest("form");t.removeFromQParams("q"),s.elements.q.value="",s.dispatchEvent(new Event("submit"))}},pe={paginate:function(e,t){const s=`${e.href}?${e.targetval}`;this.user.fetchAndSplit(s,t.abortController.signal).then(r=>t.onReplacePartialDom(r,e.zvptarget))},list_filter:function(e,t){const s=`${e.href}?${e.targetval}`;this.user.fetchAndSplit(s,t.abortController.signal).then(r=>t.onReplacePartialDom(r,e.zvptarget))}},me=a.__exportAll({MdcTreeHandlers:()=>ze,QueryParamHandlers:()=>pe,SearchHandlers:()=>ue}),H=class extends y{#e=void 0;#t=void 0;#s={};static viewEventCode(){return u.VIEW}constructor(){super(),this.panelMap=new Map,this.user_=void 0,this.split_=void 0,this.panelEventMap_=this.initPanelEventsInternal_(),this.switchViewMap_=new Map,this.metaData_=new Map}set recordHistory(e){this.#t=e}get recordHistory(){return this.#t}set registerViewConstructor(e){this.#e=e}get registerViewConstructor(){return this.#e}set utils(e){this.#s=e}get utils(){return this.#s}set split(e){this.split_=e,this.listen(this.split_,u.SPLIT,t=>{const s=t.detail.getValue(),r=t.detail.getData();switch(s){case u.SPLIT_WILL_OPEN:this.onSplitWillOpen(r);break;case u.SPLIT_WILL_CLOSE:this.onSplitWillClose(r);break;case u.SPLIT_DID_CLOSE:this.onSplitDidClose(r);break;case u.SPLIT_DID_OPEN:this.onSplitDidOpen(r);break;case u.SPLIT_TRANSITION_END:break;default:a.identity()}})}get split(){if(!this.split_)throw new Error("No SPLIT component available");return this.split_}set user(e){this.user_=e,this.panelMap.forEach(t=>t.user=e)}get user(){return this.user_||(this.user_=new P),this.user_}render(){this.initPanelEvents(),this.preRender(),this.configurePanels(),this.displayPanels(),this.postRender()}initPanelEvents(){}preRender(){}configurePanels(){}displayPanels(){}postRender(){}dispose(){[...this.panelMap.values()].forEach(e=>e.dispose()),super.dispose()}addPanelToView(e,t){t.user=this.user,this.removePanelByName(e),this.panelMap.set(e,t),this.listen(t,B.panelEventCode(),this.onPanelEvent.bind(this))}removePanelByName(e){this.panelMap.has(e)&&this.panelMap.get(e).dispose()}removePanel(e){const[t,s]=[...this.panelMap.entries()].find(([r,i])=>i===e);t&&s&&(s.dispose(),this.panelMap.delete(t))}getPanelByName(e){return this.panelMap.get(e)}broadcastToPanels(e){[...this.panelMap.values()].forEach(t=>t.onViewDataBroadcast(e))}initPanelEventsInternal_(){const e=new Map;return e.set("destroy_me",(t,s)=>{this.removePanel(s)}),e.set("switch_view",(t,s)=>{this.debugMe("switch_view received: eventData",t);const r=t.view;this.switchViewMap_.has(r)?this.switchViewMap_.get(r)(t,s):this.debugMe("NO VIEW FOUND FOR:",r,this.switchViewMap_)}),Object.entries({...ue,...pe}).forEach(([t,s])=>{e.set(t,s.bind(this))}),e}mapPanEv(e,t){this.panelEventMap_.set(e,t)}mapSwitchView(e,t){this.switchViewMap_.set(e,t)}onPanelEvent(e){let t=e.detail.getValue();if(this.debugMe(`PanelEvent Value: ${t}`),!a.isDefAndNotNull(t)){this.debugMe(`The panel received an event without a value.
16
+ SUCCESS: ${t}`)}},ue=class extends w{static splitEventCode(){return u.SPLIT}constructor(){super(),this.dragImage_=document.createElement("canvas"),this.nestMap_=new Map,this.nestCallbackMap_=new Map,this.splitNests_=new Set}get nests(){return[...this.nestMap_.entries()].filter(([e,{nestEl:t}])=>t)}getNest(e){return this.nestMap_.get(e)?.nestEl}get nestNames(){return[...this.nestMap_.entries()].filter(([e,t])=>!this.splitNests_.has(t)).map(([e])=>e)}closeAndLockAll(e=a.identity,t=!1){this.nestNames.forEach(s=>this.closeAndLock(s,e,t))}openAndUnlockAll(e=a.identity,t=!1){this.nestNames.forEach(s=>this.openAndUnlock(s,e,t))}lock(e){const{dragEl:t}=this.nestMap_.get(e);t.classList.add("locked")}unlock(e){const{dragEl:t}=this.nestMap_.get(e);t.classList.remove("locked")}resize(e,t,s=a.identity,r=!1){const{sizeNow:i,nestEl:o,canResize:h}=this.nestMap_.get(e);h&&(r||i===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,()=>{o.classList.remove("animated"),this.nestMap_.get(e).sizeNow=t,s()}),o.style.flexBasis=`${t}px`))}closeAndLock(e,t=a.identity,s=!1){const{nestEl:r,dragEl:i,canResize:o}=this.nestMap_.get(e);if(!o)return;const h=()=>{i.classList.add("locked","closed"),r.classList.add("closed"),t()};this.resize(e,0,h,s)}closeAndUnlock(e,t=a.identity,s=!1){const{nestEl:r,dragEl:i,canResize:o}=this.nestMap_.get(e);if(!o)return;const h=()=>{r.classList.remove("closed"),i.classList.remove("closed","locked"),i.classList.add("collapsed"),t()};this.resize(e,0,h,s)}openAndUnlock(e,t,s,r=!1){const{nestEl:i,dragEl:o,defSize:h,lastSize:g,canResize:_}=this.nestMap_.get(e);if(!_)return;const E=t||g||h;i.classList.remove("closed"),o.classList.remove("closed","locked","collapsed"),setTimeout(()=>{this.resize(e,E,s,r)},50)}openAndLock(e,t,s,r=!1){const{nestEl:i,dragEl:o,defSize:h,lastSize:g,canResize:_}=this.nestMap_.get(e);if(!_)return;const E=t||g||h;i.classList.remove("closed"),o.classList.remove("closed","collapsed"),setTimeout(()=>{this.resize(e,E,s,r)},50)}close(e,t=a.identity,s=!1){const{dragEl:r,canResize:i,nestEl:o}=this.nestMap_.get(e);if(!i)return;this.dispatchSplitEvent(u.SPLIT_WILL_CLOSE,{nestName:e,nestEl:o});const h=()=>{r.classList.add("collapsed"),this.dispatchSplitEvent(u.SPLIT_DID_CLOSE,{nestName:e,nestEl:o}),t()};this.resize(e,0,h,s)}open(e,t=a.identity,s=!1){const{defSize:r,lastSize:i,dragEl:o,canResize:h,nestEl:g}=this.nestMap_.get(e);if(!h)return;this.dispatchSplitEvent(u.SPLIT_WILL_OPEN,{nestName:e,nestEl:g}),o.classList.remove("collapsed","closed");const _=i||r,E=()=>{this.dispatchSplitEvent(u.SPLIT_DID_OPEN,{nestName:e,nestEl:g}),t()};this.resize(e,_,E,s)}toggle(e,t,s=!1){this.nestMap_.get(e).sizeNow===0?this.open(e,t,s):this.close(e,t,s)}addSplit(e=void 0,t="EW",s=100,r=100,i=[],o=[],h=[],g=[],_=[]){const E=e||this.getElement();if(this.splitNests_.has(E))return["Already used!",E];ze(E,t),this.splitNests_.add(E);let D="";if(e){const C=[...this.nestMap_.entries()].find(([T,{nestEl:O}])=>O===e);if(C)D=C[0];else return["Element not managed by this component",e]}const n=`${D}A`,l=ee(s,["zoo_nest__A",n,...i]),d=new z(t);d.domFunc=te([`zoo_drag_${n}`,...g],_),d.render(E),this.nestMap_.set(n,{side:"A",nestEl:l,dragger:d,dragEl:d.getElement(),defSize:s,sizeNow:-1,canResize:!0});const m=`${D}B`,v=ke(["zoo_nest__B",m,...o]);this.nestMap_.set(m,{nestEl:v,canResize:!1});const f=`${D}C`,S=new z(t);S.domFunc=te([`zoo_drag_${f}`,...g],_),S.render(E);const M=ee(r,["zoo_nest__C",f,...h]);this.nestMap_.set(f,{side:"C",nestEl:M,dragger:S,dragEl:S.getElement(),defSize:r,sizeNow:-1,canResize:!0}),[l,d.getElement(),v,S.getElement(),M].forEach(C=>E.appendChild(C));let J=0;const G=(C,T,O,_e)=>{let F;const Y=C==="NS"?"height":"width",Se=C==="NS"?"deltaY":"deltaX";return X=>{switch(X.detail.value_){case u.COMP_DRAG_START:F=T.getBoundingClientRect()[Y],J=v.getBoundingClientRect()[Y]+F,this.nestMap_.get(O).dragEl.classList.remove("collapsed");break;case u.COMP_DRAG_MOVE:{const K=Math.min(J,F+_e*X.detail.data_[Se]);this.nestMap_.get(O).lastSize=K,T.style.flexBasis=K+"px";break}case u.COMP_DRAG_END:this.dispatchSplitEvent(u.COMP_DRAG_END,this.nestMap_.get(O));break;default:break}}};this.listen(d,w.compEventCode(),G(t,l,n,1)),this.listen(S,w.compEventCode(),G(t,M,f,-1)),this.listen(d.getElement(),c.DBLCLICK,()=>this.toggle(n)),this.listen(S.getElement(),c.DBLCLICK,()=>this.toggle(f)),this.listen(d.getElement().querySelector(".zoo_grabber"),c.CLICK,()=>this.toggle(n)),this.listen(S.getElement().querySelector(".zoo_grabber"),c.CLICK,()=>this.toggle(f)),this.listen(l,c.TRANSITIONEND,C=>{if(C.propertyName==="flex-basis"&&C.target===l){const T=this.nestCallbackMap_.get(n);this.nestCallbackMap_.delete(n),T&&T(),this.dispatchSplitEvent(u.SPLIT_TRANSITION_END,this.nestMap_.get(n))}}),this.listen(M,c.TRANSITIONEND,C=>{if(C.propertyName==="flex-basis"&&C.target===M){const T=this.nestCallbackMap_.get(f);this.nestCallbackMap_.delete(f),T&&T(),this.dispatchSplitEvent(u.SPLIT_TRANSITION_END,this.nestMap_.get(f))}})}dispatchSplitEvent(e,t){const s=new k(e,t),r=L.makeEvent(u.SPLIT,s);return this.dispatchEvent(r)}},ze=(e,t)=>(e.classList.add("zoo_split",`zoo_split__${t.toLowerCase()}`),e),ee=(e,t=[])=>{const s=document.createElement("div");return s.setAttribute("id",(0,a.randomId)(7)),s.classList.add("zoo_nest","zoo_nest__outer",...t),s.style.flexBasis=e+"px",s},ke=(e=[])=>{const t=document.createElement("div");return t.setAttribute("id",(0,a.randomId)(7)),t.classList.add("zoo_nest","zoo_nest__inner",...e),t},te=(e=[],t=[])=>()=>{const s=document.createElement("div");s.setAttribute("id",(0,a.randomId)(7)),s.classList.add("zoo_dragger",...e);const r=document.createElement("div");return r.classList.add("zoo_grabber",...t),s.appendChild(r),s},xe={toggle_tree:function(e,t){p.toggleTree(e,t)},"tree_toggle-children":function(e,t){p.toggleTreeChildren(t,e)}},pe={search:function(e,t){let s=`${e.href}`;const r=e.formData.q,i=e.targetval;if(r!==""&&(s=`${s}?q=${r}`),i!==""){let o=i;i.includes("page=")&&(o=i.split("&").filter(h=>!h.includes("page=")).join("&")),s=r!==""?`${s}&${o}`:`${s}?${o}`}this.user.fetchAndSplit(s,t.abortController.signal).then(o=>t.onReplacePartialDom(o,e.zvptarget))},reset_search:function(e,t){const s=e.trigger.closest("form");t.removeFromQParams("q"),s.elements.q.value="",s.dispatchEvent(new Event("submit"))}},me={paginate:function(e,t){const s=`${e.href}?${e.targetval}`;this.user.fetchAndSplit(s,t.abortController.signal).then(r=>t.onReplacePartialDom(r,e.zvptarget))},list_filter:function(e,t){const s=`${e.href}?${e.targetval}`;this.user.fetchAndSplit(s,t.abortController.signal).then(r=>t.onReplacePartialDom(r,e.zvptarget))}},ge=b.__exportAll({MdcTreeHandlers:()=>xe,QueryParamHandlers:()=>me,SearchHandlers:()=>pe}),W=class extends L{#e=void 0;#t=void 0;#s={};static viewEventCode(){return u.VIEW}constructor(){super(),this.panelMap=new Map,this.user_=void 0,this.split_=void 0,this.panelEventMap_=this.initPanelEventsInternal_(),this.switchViewMap_=new Map,this.metaData_=new Map}set recordHistory(e){this.#t=e}get recordHistory(){return this.#t}set registerViewConstructor(e){this.#e=e}get registerViewConstructor(){return this.#e}set utils(e){this.#s=e}get utils(){return this.#s}set split(e){this.split_=e,this.listen(this.split_,u.SPLIT,t=>{const s=t.detail.getValue(),r=t.detail.getData();switch(s){case u.SPLIT_WILL_OPEN:this.onSplitWillOpen(r);break;case u.SPLIT_WILL_CLOSE:this.onSplitWillClose(r);break;case u.SPLIT_DID_CLOSE:this.onSplitDidClose(r);break;case u.SPLIT_DID_OPEN:this.onSplitDidOpen(r);break;case u.SPLIT_TRANSITION_END:break;default:(0,a.identity)()}})}get split(){if(!this.split_)throw new Error("No SPLIT component available");return this.split_}set user(e){this.user_=e,this.panelMap.forEach(t=>t.user=e)}get user(){return this.user_||(this.user_=new P),this.user_}render(){this.initPanelEvents(),this.preRender(),this.configurePanels(),this.displayPanels(),this.postRender()}initPanelEvents(){}preRender(){}configurePanels(){}displayPanels(){}postRender(){}dispose(){[...this.panelMap.values()].forEach(e=>e.dispose()),super.dispose()}addPanelToView(e,t){t.user=this.user,this.removePanelByName(e),this.panelMap.set(e,t),this.listen(t,B.panelEventCode(),this.onPanelEvent.bind(this))}removePanelByName(e){this.panelMap.has(e)&&this.panelMap.get(e).dispose()}removePanel(e){const[t,s]=[...this.panelMap.entries()].find(([r,i])=>i===e);t&&s&&(s.dispose(),this.panelMap.delete(t))}getPanelByName(e){return this.panelMap.get(e)}broadcastToPanels(e){[...this.panelMap.values()].forEach(t=>t.onViewDataBroadcast(e))}initPanelEventsInternal_(){const e=new Map;return e.set("destroy_me",(t,s)=>{this.removePanel(s)}),e.set("switch_view",(t,s)=>{this.debugMe("switch_view received: eventData",t);const r=t.view;this.switchViewMap_.has(r)?this.switchViewMap_.get(r)(t,s):this.debugMe("NO VIEW FOUND FOR:",r,this.switchViewMap_)}),Object.entries({...pe,...me}).forEach(([t,s])=>{e.set(t,s.bind(this))}),e}mapPanEv(e,t){this.panelEventMap_.set(e,t)}mapSwitchView(e,t){this.switchViewMap_.set(e,t)}onPanelEvent(e){let t=e.detail.getValue();if(this.debugMe(`PanelEvent Value: ${t}`),!(0,a.isDefAndNotNull)(t)){this.debugMe(`The panel received an event without a value.
17
17
  There is nothing we can do with that.`);return}const s=e.detail.getData();t?.startsWith("switch_view:")&&(s.view=t.split(":")[1],t="switch_view");const r=e.target;this.panelEventMap_.has(t)?this.panelEventMap_.get(t)(s,r):this.debugMe(`NO EVENT MATCH - This usually you are missing
18
18
  a "mapPanEv(${t} ..." statement in your panel JS
19
- or you have a "event='${t}'" attribute in your panel HTML`,{event:e,eventValue:t,eventData:s,panel:r.constructor.name})}onSplitWillOpen(e){}onSplitWillClose(e){}onSplitDidClose(e){}onSplitDidOpen(e){}dispatchViewEvent(e,t){const s=new z(e,t),r=y.makeEvent(u.VIEW,s);return this.dispatchEvent(r)}get metaData(){return this.metaData_}setMetaData(e,t){return this.metaData_.set(e,t),this.metaData}getMetaData(e){return this.metaData_.get(e)}hasMetaData(e){return this.metaData_.has(e)}};function ke(e){if(e==null)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),s=1,r=arguments.length;s<r;){var i=arguments[s];if(i!=null)for(var n in i)I._has(n,i)&&(t[n]=i[n]);s+=1}return t}var Be=typeof Object.assign=="function"?Object.assign:ke,xe=I._curry2(function(t,s){return Be({},t,s)}),ge=class extends y{#e=new Map;#t=null;#s=void 0;#r=void 0;#i=new Map;#n={};constructor(){super(),this.#i=this.#o(),window.addEventListener("popstate",e=>{e.state!==null&&this.navTo(e.state)}),this.doOnBeat(()=>{document.dispatchEvent(new CustomEvent("zoo-tick-60",{detail:{timestamp:Date.now()}}))},6e4)}set split(e){this.#r=e}get split(){if(!this.#r)throw new Error("No SPLIT component available");return this.#r}set user(e){this.#s=e,this.#t&&(this.#t.user=this.user)}get user(){return this.#s||(this.#s=new P),this.#s}get utils(){return this.#n}registerUtil(e){this.#n=xe(this.#n,e)}#o(){return new Map().set("switch_view",(e,t)=>{if(this.#e.has(e.view)){const s=this.#e.get(e.view)(e.pk||e.recordId,e);this.switchView(s)}})}mapViewEv(e,t){this.#i.set(e,t)}registerViewConstructor(e,t){this.#e.set(e,t)}onViewEvent(e){const t=e.detail.getValue(),s=e.detail.getData(),r=e.target;this.#i.has(t)?this.#i.get(t)(s,r):console.warn("Unhandled VIEW Event:",e,t,s,r)}setActiveView(e){this.#t&&(this.stopListeningTo(this.#t),this.#t.dispose(),this.#t=null),this.#t=e,this.#t.render()}initView(e){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,H.viewEventCode(),this.onViewEvent.bind(this)),e}switchView(e){this.setActiveView(this.initView(e))}recordHistory(e){this.debugMe("HISTORY",e),e.init?history.replaceState(e,"",document.location.href):e.history||history.pushState(e,"",null)}navTo=e=>{e.history=!0;const t=e.view,s=this.#t;if(s.switchViewMap_.has(t))this.debugMe("NAV:VIEW:MAP",e),s.switchViewMap_.get(t)(e);else if(this.#e.has(t)){const r=this.#e.get(t)(e.pk,e);this.debugMe("NAV:NEW:VIEW",e),this.switchView(r)}}};async function Ee(e={}){const{registerCarbonLibrary:t}=await Promise.resolve().then(()=>require("./chunks/register-CnJjkv07.js"));return t(e)}async function fe(){const{registerMdcLibrary:e}=await Promise.resolve().then(()=>require("./chunks/register-BXKEXKsC.js"));return e()}var Fe={Evt:y,Component:L,Dragger:U,Panel:B,FormPanel:he,Split:de,UserManager:P,View:H,Conductor:ge,DataBinder:I.Binder,UiEventType:u,domUtils:p.utils_exports,uriUtils:te,registerCarbonLibrary:Ee,registerMdcLibrary:fe,ComponentLibraryRegistry:a.ComponentLibraryRegistry,handlers:me,zoo:I.zoo_exports};exports.Binder=I.Binder;exports.Component=L;exports.ComponentLibraryRegistry=a.ComponentLibraryRegistry;exports.Conductor=ge;exports.Dragger=U;exports.Evt=y;exports.FormPanel=he;exports.Panel=B;exports.Split=de;exports.UiEventType=u;exports.UserManager=P;exports.View=H;exports.default=Fe;Object.defineProperty(exports,"domUtils",{enumerable:!0,get:function(){return p.utils_exports}});Object.defineProperty(exports,"handlers",{enumerable:!0,get:function(){return me}});exports.registerCarbonLibrary=Ee;exports.registerMdcLibrary=fe;Object.defineProperty(exports,"uriUtils",{enumerable:!0,get:function(){return te}});Object.defineProperty(exports,"zoo",{enumerable:!0,get:function(){return I.zoo_exports}});
19
+ or you have a "event='${t}'" attribute in your panel HTML`,{event:e,eventValue:t,eventData:s,panel:r.constructor.name})}onSplitWillOpen(e){}onSplitWillClose(e){}onSplitDidClose(e){}onSplitDidOpen(e){}dispatchViewEvent(e,t){const s=new k(e,t),r=L.makeEvent(u.VIEW,s);return this.dispatchEvent(r)}get metaData(){return this.metaData_}setMetaData(e,t){return this.metaData_.set(e,t),this.metaData}getMetaData(e){return this.metaData_.get(e)}hasMetaData(e){return this.metaData_.has(e)}},Ee=class extends L{#e=new Map;#t=null;#s=void 0;#r=void 0;#i=new Map;#n={};constructor(){super(),this.#i=this.#o(),window.addEventListener("popstate",e=>{e.state!==null&&this.navTo(e.state)}),this.doOnBeat(()=>{document.dispatchEvent(new CustomEvent("zoo-tick-60",{detail:{timestamp:Date.now()}}))},6e4)}set split(e){this.#r=e}get split(){if(!this.#r)throw new Error("No SPLIT component available");return this.#r}set user(e){this.#s=e,this.#t&&(this.#t.user=this.user)}get user(){return this.#s||(this.#s=new P),this.#s}get utils(){return this.#n}registerUtil(e){this.#n=(0,De.mergeRight)(this.#n,e)}#o(){return new Map().set("switch_view",(e,t)=>{if(this.#e.has(e.view)){const s=this.#e.get(e.view)(e.pk||e.recordId,e);this.switchView(s)}})}mapViewEv(e,t){this.#i.set(e,t)}registerViewConstructor(e,t){this.#e.set(e,t)}onViewEvent(e){const t=e.detail.getValue(),s=e.detail.getData(),r=e.target;this.#i.has(t)?this.#i.get(t)(s,r):console.warn("Unhandled VIEW Event:",e,t,s,r)}setActiveView(e){this.#t&&(this.stopListeningTo(this.#t),this.#t.dispose(),this.#t=null),this.#t=e,this.#t.render()}initView(e){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,W.viewEventCode(),this.onViewEvent.bind(this)),e}switchView(e){this.setActiveView(this.initView(e))}recordHistory(e){this.debugMe("HISTORY",e),e.init?history.replaceState(e,"",document.location.href):e.history||history.pushState(e,"",null)}navTo=e=>{e.history=!0;const t=e.view,s=this.#t;if(s.switchViewMap_.has(t))this.debugMe("NAV:VIEW:MAP",e),s.switchViewMap_.get(t)(e);else if(this.#e.has(t)){const r=this.#e.get(t)(e.pk,e);this.debugMe("NAV:NEW:VIEW",e),this.switchView(r)}}};async function ve(e={}){const{registerCarbonLibrary:t}=await Promise.resolve().then(()=>require("./chunks/register-uV9z3usH.js"));return t(e)}async function fe(){const{registerMdcLibrary:e}=await Promise.resolve().then(()=>require("./chunks/register-HYODt48Q.js"));return e()}var Be={Evt:L,Component:w,Dragger:z,Panel:B,FormPanel:de,Split:ue,UserManager:P,View:W,Conductor:Ee,DataBinder:U.Binder,UiEventType:u,domUtils:p.utils_exports,uriUtils:se,registerCarbonLibrary:ve,registerMdcLibrary:fe,ComponentLibraryRegistry:b.ComponentLibraryRegistry,handlers:ge,zoo:U.zoo_exports};exports.Binder=U.Binder;exports.Component=w;exports.ComponentLibraryRegistry=b.ComponentLibraryRegistry;exports.Conductor=Ee;exports.Dragger=z;exports.Evt=L;exports.FormPanel=de;exports.Panel=B;exports.Split=ue;exports.UiEventType=u;exports.UserManager=P;exports.View=W;exports.default=Be;Object.defineProperty(exports,"domUtils",{enumerable:!0,get:function(){return p.utils_exports}});Object.defineProperty(exports,"handlers",{enumerable:!0,get:function(){return ge}});exports.registerCarbonLibrary=ve;exports.registerMdcLibrary=fe;Object.defineProperty(exports,"uriUtils",{enumerable:!0,get:function(){return se}});Object.defineProperty(exports,"zoo",{enumerable:!0,get:function(){return U.zoo_exports}});