layerpro 2.2.5 → 2.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.cjs CHANGED
@@ -6,14 +6,14 @@ function o(e) {
6
6
  };
7
7
  }
8
8
 
9
- var t, i, n, p, s, r, c, a = o(require("jquery")), d = Object.defineProperty, u = Object.getOwnPropertyNames, l = (e, o) => function() {
10
- return e && (o = (0, e[u(e)[0]])(e = 0)), o;
9
+ var t, i, p, n, s, r, c, a = o(require("jquery")), d = Object.defineProperty, l = Object.getOwnPropertyNames, u = (e, o) => function() {
10
+ return e && (o = (0, e[l(e)[0]])(e = 0)), o;
11
11
  }, h = (e, o) => {
12
12
  for (var t in o) d(e, t, {
13
13
  get: o[t],
14
14
  enumerable: !0
15
15
  });
16
- }, m = l({
16
+ }, m = u({
17
17
  "core/credits.ts"() {
18
18
  t = e => {}, Object.defineProperty(layerpro, "credits", {
19
19
  value: t,
@@ -28,13 +28,13 @@ h({}, {
28
28
  mouseCoord: () => i
29
29
  });
30
30
 
31
- var b, _, f, v, g, w, y, z, k, x, C, E, S, M, N, T, O, I, A, L, P, j, H, R, W, q, D, X, Y, U, K, B, F, J, Q, G, V, Z, ee = l({
31
+ var b, _, f, v, g, y, w, z, k, x, T, C, E, S, M, I, N, O, A, L, P, j, H, R, W, q, D, X, Y, U, B, K, F, J, Q, G, V, Z, ee = u({
32
32
  "core/mouseCoords.ts"() {
33
- i = e => [ e.clientX, e.clientY, e.screenX, e.screenY, e.pageX, e.pageY ], n = 0,
34
- p = "", s = 0, r = 0, c = e => (n = s < e.pageX ? 1 : 0, p = r < e.pageY ? "down" : "up",
35
- s = e.pageX, r = e.pageY, [ n, p ]);
33
+ i = e => [ e.clientX, e.clientY, e.screenX, e.screenY, e.pageX, e.pageY ], p = 0,
34
+ n = "", s = 0, r = 0, c = e => (p = s < e.pageX ? 1 : 0, n = r < e.pageY ? "down" : "up",
35
+ s = e.pageX, r = e.pageY, [ p, n ]);
36
36
  }
37
- }), oe = l({
37
+ }), oe = u({
38
38
  "core/message.ts"() {
39
39
  b = {
40
40
  "&": "&amp;",
@@ -43,7 +43,7 @@ var b, _, f, v, g, w, y, z, k, x, C, E, S, M, N, T, O, I, A, L, P, j, H, R, W, q
43
43
  '"': "&quot;",
44
44
  "'": "&#39;"
45
45
  }, _ = e => e.replace(/[&<>"']/g, e => b[e]), f = e => {
46
- const o = _(String(e)), t = window.layerpro.popup.open({
46
+ const o = _(String(e)), t = layerpro.popup.open({
47
47
  id: "__alert",
48
48
  name: "Warning",
49
49
  icon: "&#9888;",
@@ -59,10 +59,10 @@ var b, _, f, v, g, w, y, z, k, x, C, E, S, M, N, T, O, I, A, L, P, j, H, R, W, q
59
59
  resizable: !1
60
60
  }), i = `\n <div class='popup_prompt'>\n <div class="popup_message_body">\n <center>${o}</center>\n </div>\n <div class="buttons">\n <button id="${"a_" + t.id}" type="button">CLOSE</button>\n </div>\n </div>\n `;
61
61
  $(".popup_body_" + t.id).html(i), $("#a_" + t.id).on("click", () => {
62
- window.layerpro.popup.close(t);
62
+ layerpro.popup.close(t);
63
63
  });
64
64
  }, v = (e, o) => {
65
- const t = _(String(e)), i = window.layerpro.popup.open({
65
+ const t = _(String(e)), i = layerpro.popup.open({
66
66
  id: "__message",
67
67
  name: "Message",
68
68
  icon: "&#9965;",
@@ -76,13 +76,13 @@ var b, _, f, v, g, w, y, z, k, x, C, E, S, M, N, T, O, I, A, L, P, j, H, R, W, q
76
76
  raised: !0,
77
77
  movable: !0,
78
78
  resizable: !1
79
- }), n = `\n <div class='popup_prompt'>\n <div class="popup_message_body">\n <center>${t}</center>\n </div>\n <div class="buttons">\n <button id="${"a_" + i.id}" type="button">CLOSE</button>\n </div>\n </div>\n `;
80
- $(".popup_body_" + i.id).html(n), $("#a_" + i.id).on("click", () => {
81
- o && o(), window.layerpro.popup.close(i);
79
+ }), p = `\n <div class='popup_prompt'>\n <div class="popup_message_body">\n <center>${t}</center>\n </div>\n <div class="buttons">\n <button id="${"a_" + i.id}" type="button">CLOSE</button>\n </div>\n </div>\n `;
80
+ $(".popup_body_" + i.id).html(p), $("#a_" + i.id).on("click", () => {
81
+ o && o(), layerpro.popup.close(i);
82
82
  });
83
83
  }, g = (e, o, t) => {
84
84
  if (0 === $(".confirm").length) {
85
- const i = _(String(e)), n = window.layerpro.popup.open({
85
+ const i = _(String(e)), p = layerpro.popup.open({
86
86
  id: "__confirm",
87
87
  name: "Confirm",
88
88
  icon: "&#9745;",
@@ -96,15 +96,15 @@ var b, _, f, v, g, w, y, z, k, x, C, E, S, M, N, T, O, I, A, L, P, j, H, R, W, q
96
96
  raised: !0,
97
97
  movable: !0,
98
98
  resizable: !1
99
- }), p = `\n <div class='popup_prompt'>\n <div class="popup_message_body">\n <center>${i}</center>\n </div>\n <div class="buttons">\n <button id="${"a_" + n.id}" type="button">CONFIRM</button>\n <button id="${"b_" + n.id}" type="button">CANCEL</button>\n </div>\n </div>\n `;
100
- $(".popup_body_" + n.id).html(p), $("#a_" + n.id).on("click", () => {
101
- o && o(), window.layerpro.popup.close(n);
102
- }), $("#b_" + n.id).on("click", () => {
103
- t && t(), window.layerpro.popup.close(n);
99
+ }), n = `\n <div class='popup_prompt'>\n <div class="popup_message_body">\n <center>${i}</center>\n </div>\n <div class="buttons">\n <button id="${"a_" + p.id}" type="button">CONFIRM</button>\n <button id="${"b_" + p.id}" type="button">CANCEL</button>\n </div>\n </div>\n `;
100
+ $(".popup_body_" + p.id).html(n), $("#a_" + p.id).on("click", () => {
101
+ o && o(), layerpro.popup.close(p);
102
+ }), $("#b_" + p.id).on("click", () => {
103
+ t && t(), layerpro.popup.close(p);
104
104
  });
105
105
  }
106
- }, w = (e, o) => {
107
- const t = o || "_prompt", i = _(String(e)), n = window.layerpro.popup.open({
106
+ }, y = (e, o) => {
107
+ const t = o || "_prompt", i = _(String(e)), p = layerpro.popup.open({
108
108
  id: "__prompt",
109
109
  name: "Prompt",
110
110
  icon: "&#9998;",
@@ -118,22 +118,25 @@ var b, _, f, v, g, w, y, z, k, x, C, E, S, M, N, T, O, I, A, L, P, j, H, R, W, q
118
118
  raised: !0,
119
119
  movable: !0,
120
120
  resizable: !1
121
- }), p = `\n <div class='popup_prompt'>\n\n <div class="popup_message_body">\n <center>\n ${i}\n </center>\n </div>\n\n <input id="input_${n.id}" type="text" placeholder="write here" />\n <br/>\n\n <div class="buttons">\n <button id="a_${n.id}" type="button">OK</button>\n <button id="b_${n.id}" type="button">CANCEL</button>\n </div>\n\n </div>\n `;
122
- $(".popup_body_" + n.id).html(p), $("#input_" + n.id).on("focus", function() {
121
+ }), n = `\n <div class='popup_prompt'>\n\n <div class="popup_message_body">\n <center>\n ${i}\n </center>\n </div>\n\n <input id="input_${p.id}" type="text" placeholder="write here" />\n <br/>\n\n <div class="buttons">\n <button id="a_${p.id}" type="button">OK</button>\n <button id="b_${p.id}" type="button">CANCEL</button>\n </div>\n\n </div>\n `;
122
+ $(".popup_body_" + p.id).html(n), $("#input_" + p.id).on("focus", function() {
123
123
  $(this).attr("placeholder", "");
124
124
  }).on("blur", function() {
125
125
  $(this).attr("placeholder", "write here");
126
- }), $("#a_" + n.id).on("click", () => {
127
- if ($("#input_" + n.id).val() > "") {
128
- "function" == typeof t && t();
129
- if (String(t) === t) return JSON.stringify($("#input_" + n.id).val());
130
- window.layerpro.popup.close(n);
126
+ }), $("#a_" + p.id).on("click", () => {
127
+ if ($("#input_" + p.id).val() > "") {
128
+ if ("function" == typeof t) {
129
+ const e = String(document.getElementById("input___prompt"));
130
+ t(e);
131
+ }
132
+ if (String(t) === t) return JSON.stringify($("#input_" + p.id).val());
133
+ layerpro.popup.close(p);
131
134
  } else alert("input can't be empty!");
132
- }), $("#b_" + n.id).on("click", () => {
133
- window.layerpro.popup.close(n);
135
+ }), $("#b_" + p.id).on("click", () => {
136
+ layerpro.popup.close(p);
134
137
  });
135
- }, window.message = (e, o) => window.layerpro.message(e, o), window.alert = e => window.layerpro.alert(e),
136
- window.confirm = (e, o, t) => window.layerpro.confirm(e, o, t), window.prompt = (e, o, t) => window.layerpro.prompt(e, o, t),
138
+ }, globalThis.message = (e, o) => layerpro.message(e, o), globalThis.alert = e => layerpro.alert(e),
139
+ globalThis.confirm = (e, o, t) => layerpro.confirm(e, o, t), globalThis.prompt = (e, o, t) => layerpro.prompt(e, o, t),
137
140
  Object.defineProperty(window, "alert", {
138
141
  enumerable: !1
139
142
  }), Object.defineProperty(window, "prompt", {
@@ -142,9 +145,9 @@ var b, _, f, v, g, w, y, z, k, x, C, E, S, M, N, T, O, I, A, L, P, j, H, R, W, q
142
145
  enumerable: !1
143
146
  }), Object.defineProperty(window, "confirm", {
144
147
  enumerable: !1
145
- }), Object.defineProperties(window.layerpro, {
148
+ }), Object.defineProperties(layerpro, {
146
149
  prompt: {
147
- value: w
150
+ value: y
148
151
  },
149
152
  alert: {
150
153
  value: f
@@ -157,15 +160,15 @@ var b, _, f, v, g, w, y, z, k, x, C, E, S, M, N, T, O, I, A, L, P, j, H, R, W, q
157
160
  }
158
161
  });
159
162
  }
160
- }), te = l({
163
+ }), te = u({
161
164
  "core/genLayer.ts"() {
162
- oe(), y = new Map, z = new Map, k = {
165
+ oe(), w = new Map, z = new Map, k = {
163
166
  "&": "&amp;",
164
167
  "<": "&lt;",
165
168
  ">": "&gt;",
166
169
  '"': "&quot;",
167
170
  "'": "&#39;"
168
- }, x = e => e.replace(/[&<>"']/g, e => k[e]), C = o => {
171
+ }, x = e => e.replace(/[&<>"']/g, e => k[e]), T = o => {
169
172
  if ("function" == typeof o.body) return;
170
173
  const t = !0 === o.raised ? ".popup_raised_" + o.id : "#popup", i = "#popup" === t ? document.querySelector("#popup") : document.querySelector(t);
171
174
  i?.querySelectorAll('[class^="popup_window_"]').forEach(e => e.classList.remove("zHigh")),
@@ -190,23 +193,23 @@ var b, _, f, v, g, w, y, z, k, x, C, E, S, M, N, T, O, I, A, L, P, j, H, R, W, q
190
193
  }).on("mousedown", e => {
191
194
  layerpro.popup.index(o);
192
195
  }).hide().fadeIn(o.fadeIn);
193
- const n = $('<div class="popup_window_' + o.id + '">', t).appendTo(".popup_overflow_" + o.id).css({
196
+ const p = $('<div class="popup_window_' + o.id + '">', t).appendTo(".popup_overflow_" + o.id).css({
194
197
  "pointer-events": "auto"
195
198
  }).addClass("zHigh").addClass(o.class);
196
199
  0 === [ o.top, o.left, o.bottom, o.right ].reduce((e, o) => "number" == typeof o && isFinite(o) ? Number(e) + o : e, 0) && layerpro.popup.center(o),
197
200
  layerpro.popup.unmount = e => {
198
- const o = y.get(e);
199
- o && (o.unmount(), y.delete(e));
201
+ const o = w.get(e);
202
+ o && (o.unmount(), w.delete(e));
200
203
  }, layerpro.popup.cleanupEvents = e => {
201
204
  const o = z.get(e);
202
205
  o && (o.iconClick && $(".icon_" + e, "#popup_dock").find("span").off("click"), o.iconClose && $(".icon_close_" + e, "#popup_dock").off("click"),
203
206
  o.buttonIconize && $(".button_iconize_" + e).off("click"), o.buttonMaximize && $(".button_maximize_" + e).off("click"),
204
207
  o.buttonClose && $(".button_close_" + e).off("click"), o.escKey && $(document).off("keydown"),
205
208
  z.delete(e));
206
- }, layerpro.popup.getReactRoot = e => y.get(e), $('<div class="popup_bar_' + o.id + '">', t).appendTo(n).addClass("popup_bar_selected"),
209
+ }, layerpro.popup.getReactRoot = e => w.get(e), $('<div class="popup_bar_' + o.id + '">', t).appendTo(p).addClass("popup_bar_selected"),
207
210
  o.icon && $('<div class="popup_icon_' + o.id + '">' + o.icon + "</div>", t).appendTo(".popup_bar_" + o.id);
208
- const p = x(String(o.name));
209
- if ($('<div class="popup_drag_' + o.id + '">' + p + "</div>", t).appendTo(".popup_bar_" + o.id),
211
+ const n = x(String(o.name));
212
+ if ($('<div class="popup_drag_' + o.id + '">' + n + "</div>", t).appendTo(".popup_bar_" + o.id),
210
213
  $('<div class="popup_option_' + o.id + '">', t).appendTo(".popup_bar_" + o.id),
211
214
  !0 === o.iconize && 0 === $("#popup_dock").length) {
212
215
  $("#root").css("margin", "0 0 var( --dock-height ) 0");
@@ -216,17 +219,17 @@ var b, _, f, v, g, w, y, z, k, x, C, E, S, M, N, T, O, I, A, L, P, j, H, R, W, q
216
219
  });
217
220
  }
218
221
  if ($("#popup_dock").length > 0 && !0 === o.dockable) {
219
- const e = String(o.id), t = `\n <div class="icon_${o.id}">\n <span>${o.icon ? o.icon : ""}</span>\n <span>${p}</span>\n `, i = function(e) {
222
+ const e = String(o.id), t = `\n <div class="icon_${o.id}">\n <span>${o.icon ? o.icon : ""}</span>\n <span>${n}</span>\n `, i = function(e) {
220
223
  $(".popup_overflow_" + o.id + ":hidden") ? (layerpro.popup.iconize(o), layerpro.popup.index(o)) : layerpro.popup.iconize(o),
221
224
  layerpro.popup.index(o);
222
- }, n = function(e) {
225
+ }, p = function(e) {
223
226
  o?.buttons?.cancel?.cb && o?.buttons?.cancel?.cb(), layerpro.popup.close(o);
224
227
  };
225
228
  z.set(e, {
226
229
  iconClick: !0,
227
230
  iconClose: !0
228
231
  }), $(t, "#popup_dock").appendTo("#popup_dock_list").addClass("popup_bar_selected").find("span").on("click", i),
229
- $(`<button class="icon_close_${o.id}">X</button>`, "#popup_dock").appendTo(`.icon_${o.id}`).on("click", n);
232
+ $(`<button class="icon_close_${o.id}">X</button>`, "#popup_dock").appendTo(`.icon_${o.id}`).on("click", p);
230
233
  }
231
234
  if (!0 === o.iconize) {
232
235
  const e = String(o.id), t = function(e) {
@@ -277,7 +280,7 @@ var b, _, f, v, g, w, y, z, k, x, C, E, S, M, N, T, O, I, A, L, P, j, H, R, W, q
277
280
  o.movable && layerpro.popup.movable(o), o.resizable && layerpro.popup.resizable(o),
278
281
  o.isMaximize && layerpro.popup.maximize(o);
279
282
  const c = $('<div class="popup_overflow_' + o.id + '">', "#popup");
280
- $('<div class="popup_internal_' + o.id + '">', c).appendTo(n), $('<div class="popup_body_' + o.id + '">', c).appendTo(".popup_internal_" + o.id).hide().fadeIn(o.fadeIn, function() {
283
+ $('<div class="popup_internal_' + o.id + '">', c).appendTo(p), $('<div class="popup_body_' + o.id + '">', c).appendTo(".popup_internal_" + o.id).hide().fadeIn(o.fadeIn, function() {
281
284
  (() => {
282
285
  if (o.body && !o.source) {
283
286
  const t = o.body, i = "object" == typeof t && null !== t && void 0 !== t.type && "object" == typeof t.props && null !== t.props;
@@ -287,7 +290,7 @@ var b, _, f, v, g, w, y, z, k, x, C, E, S, M, N, T, O, I, A, L, P, j, H, R, W, q
287
290
  if (!t) return;
288
291
  try {
289
292
  const i = e.createRoot(t);
290
- i.render(o.body), y.set(String(o.id), i);
293
+ i.render(o.body), w.set(String(o.id), i);
291
294
  } catch (e) {
292
295
  const o = e?.message || String(e);
293
296
  o.includes("Invalid hook call") || o.includes("hooks");
@@ -316,28 +319,28 @@ var b, _, f, v, g, w, y, z, k, x, C, E, S, M, N, T, O, I, A, L, P, j, H, R, W, q
316
319
  });
317
320
  };
318
321
  }
319
- }), ie = l({
322
+ }), ie = u({
320
323
  "core/mobile.ts"() {
321
- if (E = () => "undefined" != typeof window && window.matchMedia("(max-width: 1024px)").matches,
322
- S = () => {
324
+ if (C = () => "undefined" != typeof window && window.matchMedia("(max-width: 1024px)").matches,
325
+ E = () => {
323
326
  if ("undefined" == typeof navigator) return !1;
324
327
  const e = navigator.userAgent;
325
328
  return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(e);
326
- }, M = () => "ontouchstart" in window || navigator.maxTouchPoints > 0, (N = () => {
329
+ }, S = () => "ontouchstart" in window || navigator.maxTouchPoints > 0, (M = () => {
327
330
  if (!0 === window.__FORCE_TOUCH_MODE__) return "touch";
328
- const e = S() || E();
329
- return M() && e ? "touch" : "mouse";
330
- })(), T = !E(), "undefined" != typeof window) {
331
+ const e = E() || C();
332
+ return S() && e ? "touch" : "mouse";
333
+ })(), I = !C(), "undefined" != typeof window) {
331
334
  const e = window.matchMedia("(max-width: 1024px)"), o = () => {
332
- const e = N(), o = !E();
333
- T !== o && (T = o);
335
+ const e = M(), o = !C();
336
+ I !== o && (I = o);
334
337
  };
335
338
  let t;
336
339
  e.addListener ? e.addListener(o) : e.addEventListener("change", o), window.addEventListener("resize", () => {
337
340
  clearTimeout(t), t = setTimeout(o, 150);
338
341
  });
339
342
  }
340
- O = () => "pointerdown", I = () => "pointermove", A = () => "pointerup", L = e => void 0 !== e.clientX ? e.clientX : e.touches && e.touches.length > 0 ? e.touches[0].clientX : e.clientX,
343
+ N = () => "pointerdown", O = () => "pointermove", A = () => "pointerup", L = e => void 0 !== e.clientX ? e.clientX : e.touches && e.touches.length > 0 ? e.touches[0].clientX : e.clientX,
341
344
  P = e => void 0 !== e.clientY ? e.clientY : e.touches && e.touches.length > 0 ? e.touches[0].clientY : e.clientY;
342
345
  }
343
346
  });
@@ -346,7 +349,7 @@ h({}, {
346
349
  popup: () => Z
347
350
  });
348
351
 
349
- var ne, pe = l({
352
+ var pe = u({
350
353
  "core/properties.ts"() {
351
354
  te(), ie(), j = 250, H = 150, W = 1e3, J = new Map, Q = new Map, G = $(window),
352
355
  V = $("body"), Z = {
@@ -364,8 +367,7 @@ var ne, pe = l({
364
367
  "auto" === e.height && (e.height = "100%"), 0 === $("#popup").length && $('<div id="popup">', "#popup").appendTo("body").css({
365
368
  "pointer-events": "none",
366
369
  "z-index": Z.zIndex($("*")) + 1
367
- }), 0 === $(".popup_window_" + e.id, "#popup").length && C(e), layerpro.purge(document),
368
- e;
370
+ }), 0 === $(".popup_window_" + e.id, "#popup").length && T(e), e;
369
371
  },
370
372
  dispatch: e => {
371
373
  layerpro.popup.store(e);
@@ -396,7 +398,7 @@ var ne, pe = l({
396
398
  const e = {
397
399
  passive: !1
398
400
  };
399
- t.move && document.removeEventListener(I(), t.move, e), t.up && document.removeEventListener(A(), t.up, e),
401
+ t.move && document.removeEventListener(O(), t.move, e), t.up && document.removeEventListener(A(), t.up, e),
400
402
  J.delete(String(o));
401
403
  }
402
404
  const i = Q.get(String(o));
@@ -404,7 +406,7 @@ var ne, pe = l({
404
406
  const e = {
405
407
  passive: !1
406
408
  };
407
- i.move && document.removeEventListener(I(), i.move, e), i.up && document.removeEventListener(A(), i.up, e),
409
+ i.move && document.removeEventListener(O(), i.move, e), i.up && document.removeEventListener(A(), i.up, e),
408
410
  Q.delete(String(o));
409
411
  }
410
412
  !0 === e.raised ? $(".popup_raised_" + o).fadeOut(e.fadeOut || 500, e => {
@@ -417,7 +419,7 @@ var ne, pe = l({
417
419
  } else $("#popup").fadeOut(() => {
418
420
  $(void 0).remove();
419
421
  });
420
- layerpro.purge(document), setTimeout(() => Z.removeDock(e), 300);
422
+ setTimeout(() => Z.removeDock(e), 300);
421
423
  },
422
424
  removeDock: e => {
423
425
  $(".icon_" + e.id).remove(), $('[class^="popup_overflow_"]', "#popup").length < 1 && ($("#root").css("margin", "0"),
@@ -454,14 +456,14 @@ var ne, pe = l({
454
456
  const o = $(".popup_overflow_" + e.id, "#popup"), t = $('[class^="resize_"]', o), i = $('[class^="popup_drag_"]', o);
455
457
  if (Z.vfx(o, !1, !0), o.data("store")) {
456
458
  if (o.data("store")) {
457
- const n = o.data("store");
459
+ const p = o.data("store");
458
460
  o.animate({
459
- top: n.y,
460
- left: n.x,
461
- width: n.w,
462
- height: n.h
461
+ top: p.y,
462
+ left: p.x,
463
+ width: p.w,
464
+ height: p.h
463
465
  }, () => {
464
- i.css("pointer-events", "auto"), t.on(O(), function(o) {
466
+ i.css("pointer-events", "auto"), t.on(N(), function(o) {
465
467
  Z.resizeModals(o, this, e);
466
468
  }), G.off("layerProResize.eventItem"), Z.vfx(o, !0);
467
469
  }), o.removeData("store");
@@ -485,43 +487,43 @@ var ne, pe = l({
485
487
  width: G.width() + 12,
486
488
  height: G.height() + 12 - 40
487
489
  });
488
- }), i.css("pointer-events", "none"), t.off(O()), Z.vfx(o, !0, !0);
490
+ }), i.css("pointer-events", "none"), t.off(N()), Z.vfx(o, !0, !0);
489
491
  });
490
492
  },
491
493
  movable: e => {
492
494
  if (!1 === e.movable) return;
493
- const o = String(e.id), t = $(".popup_overflow_" + e.id, "#popup"), i = $(".popup_drag_" + e.id, t), n = $(".popup_body_" + e.id, t);
495
+ const o = String(e.id), t = $(".popup_overflow_" + e.id, "#popup"), i = $(".popup_drag_" + e.id, t), p = $(".popup_body_" + e.id, t);
494
496
  t.css("touch-action", "none");
495
- let p = 0, s = 0, r = 0, c = 0;
497
+ let n = 0, s = 0, r = 0, c = 0;
496
498
  const a = e => {
497
499
  e.preventDefault();
498
500
  const o = L(e), i = P(e);
499
- p = r - o, s = c - i, r = o, c = i, Z.checkArea(e)[1] < Z.checkArea(e)[4] && 1 === Math.sign(Z.checkArea(e)[1]) && t.css("top", t.offset().top - s),
500
- Z.checkArea(e)[0] < Z.checkArea(e)[5] && 1 === Math.sign(Z.checkArea(e)[0]) && t.css("left", t.offset().left - p);
501
+ n = r - o, s = c - i, r = o, c = i, Z.checkArea(e)[1] < Z.checkArea(e)[4] && 1 === Math.sign(Z.checkArea(e)[1]) && t.css("top", t.offset().top - s),
502
+ Z.checkArea(e)[0] < Z.checkArea(e)[5] && 1 === Math.sign(Z.checkArea(e)[0]) && t.css("left", t.offset().left - n);
501
503
  }, d = e => {
502
504
  const i = {
503
505
  passive: !1
504
506
  };
505
- document.removeEventListener(I(), a, i), document.removeEventListener(A(), d, i),
506
- J.delete(o), n.css("pointer-events", "auto"), Z.vfx(t, !0);
507
+ document.removeEventListener(O(), a, i), document.removeEventListener(A(), d, i),
508
+ J.delete(o), p.css("pointer-events", "auto"), Z.vfx(t, !0);
507
509
  };
508
510
  J.set(o, {
509
511
  move: a,
510
512
  up: d
511
513
  });
512
- i[0].addEventListener(O(), e => {
513
- e.preventDefault(), n.css("pointer-events", "none"), u(e), Z.vfx(t, !1);
514
+ i[0].addEventListener(N(), e => {
515
+ e.preventDefault(), p.css("pointer-events", "none"), l(e), Z.vfx(t, !1);
514
516
  }, {
515
517
  passive: !1
516
518
  }), e.maximize && i.on("dblclick", o => {
517
519
  layerpro.popup.maximize(e);
518
520
  });
519
- const u = e => {
521
+ const l = e => {
520
522
  r = L(e), c = P(e);
521
523
  const o = {
522
524
  passive: !1
523
525
  };
524
- document.addEventListener(I(), a, o), document.addEventListener(A(), d, o);
526
+ document.addEventListener(O(), a, o), document.addEventListener(A(), d, o);
525
527
  };
526
528
  },
527
529
  resizable: e => {
@@ -533,41 +535,41 @@ var ne, pe = l({
533
535
  i.down = function(o) {
534
536
  Z.resizeModals(o, this, e);
535
537
  }, Q.set(o, i);
536
- const n = {
538
+ const p = {
537
539
  passive: !1
538
540
  };
539
541
  $("[class^=resize_]").each((o, t) => {
540
- t.addEventListener(O(), o => {
542
+ t.addEventListener(N(), o => {
541
543
  o.preventDefault(), Z.resizeModals(o, t, e);
542
- }, n);
544
+ }, p);
543
545
  });
544
546
  },
545
547
  resizeModals: (e, o, t) => {
546
- const i = $(o).parent(), n = String(t.id), p = L(e), s = P(e), r = [ p - G.scrollLeft(), s - G.scrollTop() ];
548
+ const i = $(o).parent(), p = String(t.id), n = L(e), s = P(e), r = [ n - G.scrollLeft(), s - G.scrollTop() ];
547
549
  t.minWidth, V.css("pointer-events", "none"), i.css("pointer-events", "none"), Z.vfx(i, !1);
548
550
  const c = e => {
549
551
  Z.doRes(e, o);
550
552
  }, a = e => {
551
553
  Z.stopRes(o);
552
- }, d = Q.get(n) || {};
553
- d.move = c, d.up = a, Q.set(n, d);
554
- const u = {
554
+ }, d = Q.get(p) || {};
555
+ d.move = c, d.up = a, Q.set(p, d);
556
+ const l = {
555
557
  passive: !1
556
558
  };
557
- document.addEventListener(I(), c, u), document.addEventListener(A(), a, u), q = r[0],
558
- D = r[1], X = i.width(), Y = i.height(), U = i.position().left, K = i.position().top,
559
- B = K + Y + 1, F = U + X + 1, R = o;
559
+ document.addEventListener(O(), c, l), document.addEventListener(A(), a, l), q = r[0],
560
+ D = r[1], X = i.width(), Y = i.height(), U = i.position().left, B = i.position().top,
561
+ K = B + Y + 1, F = U + X + 1, R = o;
560
562
  },
561
563
  doRes: (e, o) => {
562
564
  dispatchEvent(new Event("layerProResize"));
563
- const t = $(o), i = t.parent(), n = L(e), p = P(e), s = [ n - G.scrollLeft(), p - G.scrollTop() ];
565
+ const t = $(o), i = t.parent(), p = L(e), n = P(e), s = [ p - G.scrollLeft(), n - G.scrollTop() ];
564
566
  if (o === R) {
565
- let o = X + s[0] - q, n = Y + s[1] - D;
566
- const p = X - s[0] + q, r = Y - s[1] + D;
567
- o <= 0 && (o = 0), n <= 0 && (n = 0), Z.checkArea(e)[1] < Z.checkArea(e)[4] && 1 === Math.sign(Z.checkArea(e)[1]) && t.hasClass("resize_0") && (i.height() <= H && r > H && i.css({
567
+ let o = X + s[0] - q, p = Y + s[1] - D;
568
+ const n = X - s[0] + q, r = Y - s[1] + D;
569
+ o <= 0 && (o = 0), p <= 0 && (p = 0), Z.checkArea(e)[1] < Z.checkArea(e)[4] && 1 === Math.sign(Z.checkArea(e)[1]) && t.hasClass("resize_0") && (i.height() <= H && r > H && i.css({
568
570
  height: Number(H + 1)
569
571
  }), i.height() > H && H <= r && i.css({
570
- top: Number(B - r),
572
+ top: Number(K - r),
571
573
  height: parseInt(r)
572
574
  })), Z.checkArea(e)[0] < Z.checkArea(e)[5] && 1 === Math.sign(Z.checkArea(e)[0]) && t.hasClass("resize_1") && (i.width() >= j && i.css({
573
575
  width: Number(o),
@@ -575,51 +577,51 @@ var ne, pe = l({
575
577
  }), i.width() <= j && i.css({
576
578
  width: Number(j + 1)
577
579
  })), Z.checkArea(e)[1] < Z.checkArea(e)[4] && 1 === Math.sign(Z.checkArea(e)[1]) && t.hasClass("resize_2") && (i.height() >= H && i.css({
578
- height: Number(n)
579
- }), i.height() <= H && n > H && i.css({
580
+ height: Number(p)
581
+ }), i.height() <= H && p > H && i.css({
580
582
  height: Number(H + 1)
581
- })), Z.checkArea(e)[0] < Z.checkArea(e)[5] && 1 === Math.sign(Z.checkArea(e)[0]) && t.hasClass("resize_3") && (i.width() <= j && p > j && i.css({
583
+ })), Z.checkArea(e)[0] < Z.checkArea(e)[5] && 1 === Math.sign(Z.checkArea(e)[0]) && t.hasClass("resize_3") && (i.width() <= j && n > j && i.css({
582
584
  width: Number(j + 1)
583
- }), i.width() > j && j <= p && i.css({
584
- width: parseInt(p),
585
- left: Number(F - p)
585
+ }), i.width() > j && j <= n && i.css({
586
+ width: parseInt(n),
587
+ left: Number(F - n)
586
588
  })), Z.checkArea(e)[1] < Z.checkArea(e)[4] && Z.checkArea(e)[0] < Z.checkArea(e)[5] && 1 === Math.sign(Z.checkArea(e)[0]) && 1 === Math.sign(Z.checkArea(e)[1]) && (t.hasClass("resize_corner_0") && (i.height() >= H && r > H && i.css({
587
- top: Number(B - r),
589
+ top: Number(K - r),
588
590
  height: parseInt(r)
589
591
  }), i.height() <= H && r > H && i.css({
590
592
  height: Number(H + 1)
591
- }), i.width() >= j && p > j && i.css({
592
- width: parseInt(p),
593
- left: Number(F - p)
594
- }), i.width() <= j && p > j && i.css({
593
+ }), i.width() >= j && n > j && i.css({
594
+ width: parseInt(n),
595
+ left: Number(F - n)
596
+ }), i.width() <= j && n > j && i.css({
595
597
  width: Number(j + 1)
596
598
  })), t.hasClass("resize_corner_1") && (i.height() >= H && r > H && i.css({
597
- top: Number(B - r),
599
+ top: Number(K - r),
598
600
  height: Number(r)
599
601
  }), i.height() <= H && r > H && i.css({
600
602
  height: Number(H + 1)
601
603
  }), i.width() >= j && i.css({
602
604
  width: Number(o),
603
605
  right: Number(U - o)
604
- }), i.width() <= j && p > j && i.css({
606
+ }), i.width() <= j && n > j && i.css({
605
607
  width: Number(j + 1)
606
608
  })), t.hasClass("resize_corner_2") && (i.height() >= H && i.css({
607
- height: Number(n)
608
- }), i.height() <= H && n > H && i.css({
609
+ height: Number(p)
610
+ }), i.height() <= H && p > H && i.css({
609
611
  height: Number(H + 1)
610
612
  }), i.width() >= j && i.css({
611
613
  width: Number(o),
612
614
  right: Number(U - o)
613
615
  }), i.width() <= j && i.css({
614
616
  width: Number(j + 1)
615
- })), t.hasClass("resize_corner_3") && (i.height() >= H && n > H && i.css({
616
- height: Number(n)
617
- }), i.height() <= H && n > H && i.css({
617
+ })), t.hasClass("resize_corner_3") && (i.height() >= H && p > H && i.css({
618
+ height: Number(p)
619
+ }), i.height() <= H && p > H && i.css({
618
620
  height: Number(H + 1)
619
- }), i.width() >= j && p > j && i.css({
620
- width: Number(p),
621
- left: Number(F - p)
622
- }), i.width() <= j && p > j && i.css({
621
+ }), i.width() >= j && n > j && i.css({
622
+ width: Number(n),
623
+ left: Number(F - n)
624
+ }), i.width() <= j && n > j && i.css({
623
625
  width: Number(j + 1)
624
626
  })));
625
627
  }
@@ -633,7 +635,7 @@ var ne, pe = l({
633
635
  const o = {
634
636
  passive: !1
635
637
  };
636
- t.move && document.removeEventListener(I(), t.move, o), t.up && document.removeEventListener(A(), t.up, o),
638
+ t.move && document.removeEventListener(O(), t.move, o), t.up && document.removeEventListener(A(), t.up, o),
637
639
  Q.delete(String(e));
638
640
  }
639
641
  },
@@ -652,19 +654,7 @@ var ne, pe = l({
652
654
  configurable: !1
653
655
  });
654
656
  }
655
- }), se = l({
656
- "core/purge.ts"() {
657
- ne = e => {
658
- let o, t, i = e.attributes;
659
- if (i) for (t = i.length, o = 0; o < t; o += 1) i[o].name;
660
- if (i = e.childNodes, i) for (t = i.length, o = 0; o < t; o += 1) layerpro.purge(e.childNodes[o]);
661
- }, Object.defineProperty(layerpro, "purge", {
662
- value: new Proxy(ne, {}),
663
- writable: !1,
664
- configurable: !1
665
- });
666
- }
667
- }), re = l({
657
+ }), ne = u({
668
658
  "core/window.ts"() {
669
659
  window.offScreenBuffering = !0, addEventListener("wheel", e => {}, {
670
660
  capture: !0,
@@ -680,7 +670,7 @@ window.layerpro || (Object.defineProperty(window, "layerpro", {
680
670
  writable: !1,
681
671
  configurable: !1,
682
672
  enumerable: !1
683
- }), m(), ee(), pe(), se(), re(), layerpro.setProps = (e, o) => {
673
+ }), m(), ee(), pe(), ne(), layerpro.setProps = (e, o) => {
684
674
  Reflect.ownKeys(e).forEach(t => {
685
675
  const i = Object.getOwnPropertyDescriptor(e, t);
686
676
  i && (i.enumerable = o?.enumerable || !1, i.configurable = o?.enumerable || !1,
package/index.js CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  import o from "jquery";
4
4
 
5
- var t, i, n, p, s, r, c, a = Object.defineProperty, d = Object.getOwnPropertyNames, l = (e, o) => function() {
5
+ var t, i, p, n, s, r, c, a = Object.defineProperty, d = Object.getOwnPropertyNames, l = (e, o) => function() {
6
6
  return e && (o = (0, e[d(e)[0]])(e = 0)), o;
7
7
  }, u = (e, o) => {
8
8
  for (var t in o) a(e, t, {
@@ -24,11 +24,11 @@ u({}, {
24
24
  mouseCoord: () => i
25
25
  });
26
26
 
27
- var m, b, _, f, v, g, w, y, z, k, x, C, E, S, M, N, T, O, I, A, L, P, j, H, R, W, D, X, q, Y, U, K, B, F, J, Q, G, V, Z = l({
27
+ var m, b, _, f, v, g, y, w, z, k, x, T, C, E, S, M, I, N, O, A, L, P, j, H, R, W, D, X, q, Y, U, B, K, F, J, Q, G, V, Z = l({
28
28
  "core/mouseCoords.ts"() {
29
- i = e => [ e.clientX, e.clientY, e.screenX, e.screenY, e.pageX, e.pageY ], n = 0,
30
- p = "", s = 0, r = 0, c = e => (n = s < e.pageX ? 1 : 0, p = r < e.pageY ? "down" : "up",
31
- s = e.pageX, r = e.pageY, [ n, p ]);
29
+ i = e => [ e.clientX, e.clientY, e.screenX, e.screenY, e.pageX, e.pageY ], p = 0,
30
+ n = "", s = 0, r = 0, c = e => (p = s < e.pageX ? 1 : 0, n = r < e.pageY ? "down" : "up",
31
+ s = e.pageX, r = e.pageY, [ p, n ]);
32
32
  }
33
33
  }), ee = l({
34
34
  "core/message.ts"() {
@@ -39,7 +39,7 @@ var m, b, _, f, v, g, w, y, z, k, x, C, E, S, M, N, T, O, I, A, L, P, j, H, R, W
39
39
  '"': "&quot;",
40
40
  "'": "&#39;"
41
41
  }, b = e => e.replace(/[&<>"']/g, e => m[e]), _ = e => {
42
- const o = b(String(e)), t = window.layerpro.popup.open({
42
+ const o = b(String(e)), t = layerpro.popup.open({
43
43
  id: "__alert",
44
44
  name: "Warning",
45
45
  icon: "&#9888;",
@@ -55,10 +55,10 @@ var m, b, _, f, v, g, w, y, z, k, x, C, E, S, M, N, T, O, I, A, L, P, j, H, R, W
55
55
  resizable: !1
56
56
  }), i = `\n <div class='popup_prompt'>\n <div class="popup_message_body">\n <center>${o}</center>\n </div>\n <div class="buttons">\n <button id="${"a_" + t.id}" type="button">CLOSE</button>\n </div>\n </div>\n `;
57
57
  $(".popup_body_" + t.id).html(i), $("#a_" + t.id).on("click", () => {
58
- window.layerpro.popup.close(t);
58
+ layerpro.popup.close(t);
59
59
  });
60
60
  }, f = (e, o) => {
61
- const t = b(String(e)), i = window.layerpro.popup.open({
61
+ const t = b(String(e)), i = layerpro.popup.open({
62
62
  id: "__message",
63
63
  name: "Message",
64
64
  icon: "&#9965;",
@@ -72,13 +72,13 @@ var m, b, _, f, v, g, w, y, z, k, x, C, E, S, M, N, T, O, I, A, L, P, j, H, R, W
72
72
  raised: !0,
73
73
  movable: !0,
74
74
  resizable: !1
75
- }), n = `\n <div class='popup_prompt'>\n <div class="popup_message_body">\n <center>${t}</center>\n </div>\n <div class="buttons">\n <button id="${"a_" + i.id}" type="button">CLOSE</button>\n </div>\n </div>\n `;
76
- $(".popup_body_" + i.id).html(n), $("#a_" + i.id).on("click", () => {
77
- o && o(), window.layerpro.popup.close(i);
75
+ }), p = `\n <div class='popup_prompt'>\n <div class="popup_message_body">\n <center>${t}</center>\n </div>\n <div class="buttons">\n <button id="${"a_" + i.id}" type="button">CLOSE</button>\n </div>\n </div>\n `;
76
+ $(".popup_body_" + i.id).html(p), $("#a_" + i.id).on("click", () => {
77
+ o && o(), layerpro.popup.close(i);
78
78
  });
79
79
  }, v = (e, o, t) => {
80
80
  if (0 === $(".confirm").length) {
81
- const i = b(String(e)), n = window.layerpro.popup.open({
81
+ const i = b(String(e)), p = layerpro.popup.open({
82
82
  id: "__confirm",
83
83
  name: "Confirm",
84
84
  icon: "&#9745;",
@@ -92,15 +92,15 @@ var m, b, _, f, v, g, w, y, z, k, x, C, E, S, M, N, T, O, I, A, L, P, j, H, R, W
92
92
  raised: !0,
93
93
  movable: !0,
94
94
  resizable: !1
95
- }), p = `\n <div class='popup_prompt'>\n <div class="popup_message_body">\n <center>${i}</center>\n </div>\n <div class="buttons">\n <button id="${"a_" + n.id}" type="button">CONFIRM</button>\n <button id="${"b_" + n.id}" type="button">CANCEL</button>\n </div>\n </div>\n `;
96
- $(".popup_body_" + n.id).html(p), $("#a_" + n.id).on("click", () => {
97
- o && o(), window.layerpro.popup.close(n);
98
- }), $("#b_" + n.id).on("click", () => {
99
- t && t(), window.layerpro.popup.close(n);
95
+ }), n = `\n <div class='popup_prompt'>\n <div class="popup_message_body">\n <center>${i}</center>\n </div>\n <div class="buttons">\n <button id="${"a_" + p.id}" type="button">CONFIRM</button>\n <button id="${"b_" + p.id}" type="button">CANCEL</button>\n </div>\n </div>\n `;
96
+ $(".popup_body_" + p.id).html(n), $("#a_" + p.id).on("click", () => {
97
+ o && o(), layerpro.popup.close(p);
98
+ }), $("#b_" + p.id).on("click", () => {
99
+ t && t(), layerpro.popup.close(p);
100
100
  });
101
101
  }
102
102
  }, g = (e, o) => {
103
- const t = o || "_prompt", i = b(String(e)), n = window.layerpro.popup.open({
103
+ const t = o || "_prompt", i = b(String(e)), p = layerpro.popup.open({
104
104
  id: "__prompt",
105
105
  name: "Prompt",
106
106
  icon: "&#9998;",
@@ -114,22 +114,25 @@ var m, b, _, f, v, g, w, y, z, k, x, C, E, S, M, N, T, O, I, A, L, P, j, H, R, W
114
114
  raised: !0,
115
115
  movable: !0,
116
116
  resizable: !1
117
- }), p = `\n <div class='popup_prompt'>\n\n <div class="popup_message_body">\n <center>\n ${i}\n </center>\n </div>\n\n <input id="input_${n.id}" type="text" placeholder="write here" />\n <br/>\n\n <div class="buttons">\n <button id="a_${n.id}" type="button">OK</button>\n <button id="b_${n.id}" type="button">CANCEL</button>\n </div>\n\n </div>\n `;
118
- $(".popup_body_" + n.id).html(p), $("#input_" + n.id).on("focus", function() {
117
+ }), n = `\n <div class='popup_prompt'>\n\n <div class="popup_message_body">\n <center>\n ${i}\n </center>\n </div>\n\n <input id="input_${p.id}" type="text" placeholder="write here" />\n <br/>\n\n <div class="buttons">\n <button id="a_${p.id}" type="button">OK</button>\n <button id="b_${p.id}" type="button">CANCEL</button>\n </div>\n\n </div>\n `;
118
+ $(".popup_body_" + p.id).html(n), $("#input_" + p.id).on("focus", function() {
119
119
  $(this).attr("placeholder", "");
120
120
  }).on("blur", function() {
121
121
  $(this).attr("placeholder", "write here");
122
- }), $("#a_" + n.id).on("click", () => {
123
- if ($("#input_" + n.id).val() > "") {
124
- "function" == typeof t && t();
125
- if (String(t) === t) return JSON.stringify($("#input_" + n.id).val());
126
- window.layerpro.popup.close(n);
122
+ }), $("#a_" + p.id).on("click", () => {
123
+ if ($("#input_" + p.id).val() > "") {
124
+ if ("function" == typeof t) {
125
+ const e = String(document.getElementById("input___prompt"));
126
+ t(e);
127
+ }
128
+ if (String(t) === t) return JSON.stringify($("#input_" + p.id).val());
129
+ layerpro.popup.close(p);
127
130
  } else alert("input can't be empty!");
128
- }), $("#b_" + n.id).on("click", () => {
129
- window.layerpro.popup.close(n);
131
+ }), $("#b_" + p.id).on("click", () => {
132
+ layerpro.popup.close(p);
130
133
  });
131
- }, window.message = (e, o) => window.layerpro.message(e, o), window.alert = e => window.layerpro.alert(e),
132
- window.confirm = (e, o, t) => window.layerpro.confirm(e, o, t), window.prompt = (e, o, t) => window.layerpro.prompt(e, o, t),
134
+ }, globalThis.message = (e, o) => layerpro.message(e, o), globalThis.alert = e => layerpro.alert(e),
135
+ globalThis.confirm = (e, o, t) => layerpro.confirm(e, o, t), globalThis.prompt = (e, o, t) => layerpro.prompt(e, o, t),
133
136
  Object.defineProperty(window, "alert", {
134
137
  enumerable: !1
135
138
  }), Object.defineProperty(window, "prompt", {
@@ -138,7 +141,7 @@ var m, b, _, f, v, g, w, y, z, k, x, C, E, S, M, N, T, O, I, A, L, P, j, H, R, W
138
141
  enumerable: !1
139
142
  }), Object.defineProperty(window, "confirm", {
140
143
  enumerable: !1
141
- }), Object.defineProperties(window.layerpro, {
144
+ }), Object.defineProperties(layerpro, {
142
145
  prompt: {
143
146
  value: g
144
147
  },
@@ -155,7 +158,7 @@ var m, b, _, f, v, g, w, y, z, k, x, C, E, S, M, N, T, O, I, A, L, P, j, H, R, W
155
158
  }
156
159
  }), oe = l({
157
160
  "core/genLayer.ts"() {
158
- ee(), w = new Map, y = new Map, z = {
161
+ ee(), y = new Map, w = new Map, z = {
159
162
  "&": "&amp;",
160
163
  "<": "&lt;",
161
164
  ">": "&gt;",
@@ -186,23 +189,23 @@ var m, b, _, f, v, g, w, y, z, k, x, C, E, S, M, N, T, O, I, A, L, P, j, H, R, W
186
189
  }).on("mousedown", e => {
187
190
  layerpro.popup.index(o);
188
191
  }).hide().fadeIn(o.fadeIn);
189
- const n = $('<div class="popup_window_' + o.id + '">', t).appendTo(".popup_overflow_" + o.id).css({
192
+ const p = $('<div class="popup_window_' + o.id + '">', t).appendTo(".popup_overflow_" + o.id).css({
190
193
  "pointer-events": "auto"
191
194
  }).addClass("zHigh").addClass(o.class);
192
195
  0 === [ o.top, o.left, o.bottom, o.right ].reduce((e, o) => "number" == typeof o && isFinite(o) ? Number(e) + o : e, 0) && layerpro.popup.center(o),
193
196
  layerpro.popup.unmount = e => {
194
- const o = w.get(e);
195
- o && (o.unmount(), w.delete(e));
196
- }, layerpro.popup.cleanupEvents = e => {
197
197
  const o = y.get(e);
198
+ o && (o.unmount(), y.delete(e));
199
+ }, layerpro.popup.cleanupEvents = e => {
200
+ const o = w.get(e);
198
201
  o && (o.iconClick && $(".icon_" + e, "#popup_dock").find("span").off("click"), o.iconClose && $(".icon_close_" + e, "#popup_dock").off("click"),
199
202
  o.buttonIconize && $(".button_iconize_" + e).off("click"), o.buttonMaximize && $(".button_maximize_" + e).off("click"),
200
203
  o.buttonClose && $(".button_close_" + e).off("click"), o.escKey && $(document).off("keydown"),
201
- y.delete(e));
202
- }, layerpro.popup.getReactRoot = e => w.get(e), $('<div class="popup_bar_' + o.id + '">', t).appendTo(n).addClass("popup_bar_selected"),
204
+ w.delete(e));
205
+ }, layerpro.popup.getReactRoot = e => y.get(e), $('<div class="popup_bar_' + o.id + '">', t).appendTo(p).addClass("popup_bar_selected"),
203
206
  o.icon && $('<div class="popup_icon_' + o.id + '">' + o.icon + "</div>", t).appendTo(".popup_bar_" + o.id);
204
- const p = k(String(o.name));
205
- if ($('<div class="popup_drag_' + o.id + '">' + p + "</div>", t).appendTo(".popup_bar_" + o.id),
207
+ const n = k(String(o.name));
208
+ if ($('<div class="popup_drag_' + o.id + '">' + n + "</div>", t).appendTo(".popup_bar_" + o.id),
206
209
  $('<div class="popup_option_' + o.id + '">', t).appendTo(".popup_bar_" + o.id),
207
210
  !0 === o.iconize && 0 === $("#popup_dock").length) {
208
211
  $("#root").css("margin", "0 0 var( --dock-height ) 0");
@@ -212,38 +215,38 @@ var m, b, _, f, v, g, w, y, z, k, x, C, E, S, M, N, T, O, I, A, L, P, j, H, R, W
212
215
  });
213
216
  }
214
217
  if ($("#popup_dock").length > 0 && !0 === o.dockable) {
215
- const e = String(o.id), t = `\n <div class="icon_${o.id}">\n <span>${o.icon ? o.icon : ""}</span>\n <span>${p}</span>\n `, i = function(e) {
218
+ const e = String(o.id), t = `\n <div class="icon_${o.id}">\n <span>${o.icon ? o.icon : ""}</span>\n <span>${n}</span>\n `, i = function(e) {
216
219
  $(".popup_overflow_" + o.id + ":hidden") ? (layerpro.popup.iconize(o), layerpro.popup.index(o)) : layerpro.popup.iconize(o),
217
220
  layerpro.popup.index(o);
218
- }, n = function(e) {
221
+ }, p = function(e) {
219
222
  o?.buttons?.cancel?.cb && o?.buttons?.cancel?.cb(), layerpro.popup.close(o);
220
223
  };
221
- y.set(e, {
224
+ w.set(e, {
222
225
  iconClick: !0,
223
226
  iconClose: !0
224
227
  }), $(t, "#popup_dock").appendTo("#popup_dock_list").addClass("popup_bar_selected").find("span").on("click", i),
225
- $(`<button class="icon_close_${o.id}">X</button>`, "#popup_dock").appendTo(`.icon_${o.id}`).on("click", n);
228
+ $(`<button class="icon_close_${o.id}">X</button>`, "#popup_dock").appendTo(`.icon_${o.id}`).on("click", p);
226
229
  }
227
230
  if (!0 === o.iconize) {
228
231
  const e = String(o.id), t = function(e) {
229
232
  layerpro.popup.iconize(o);
230
- }, i = y.get(e) || {};
231
- i.buttonIconize = !0, y.set(e, i), $('<button class="button_iconize_' + o.id + ' iconize">', "#popup").appendTo(".popup_option_" + o.id).on("click", t);
233
+ }, i = w.get(e) || {};
234
+ i.buttonIconize = !0, w.set(e, i), $('<button class="button_iconize_' + o.id + ' iconize">', "#popup").appendTo(".popup_option_" + o.id).on("click", t);
232
235
  }
233
236
  if (!0 === o.maximize) {
234
237
  const e = String(o.id), t = function(e) {
235
238
  layerpro.popup.maximize(o);
236
- }, i = y.get(e) || {};
237
- i.buttonMaximize = !0, y.set(e, i), $('<button class="button_maximize_' + o.id + ' maximize">', "#popup").appendTo(".popup_option_" + o.id).on("click", t);
239
+ }, i = w.get(e) || {};
240
+ i.buttonMaximize = !0, w.set(e, i), $('<button class="button_maximize_' + o.id + ' maximize">', "#popup").appendTo(".popup_option_" + o.id).on("click", t);
238
241
  }
239
242
  if (!0 === o.close) {
240
243
  const e = String(o.id), t = function(e) {
241
244
  o?.buttons?.cancel?.cb && o?.buttons?.cancel?.cb(), layerpro.popup.close(o);
242
- }, i = y.get(e) || {};
243
- i.buttonClose = !0, y.set(e, i), $('<button class="button_close_' + o.id + ' close">', "#popup").appendTo(".popup_option_" + o.id).on("click", t);
245
+ }, i = w.get(e) || {};
246
+ i.buttonClose = !0, w.set(e, i), $('<button class="button_close_' + o.id + ' close">', "#popup").appendTo(".popup_option_" + o.id).on("click", t);
244
247
  }
245
- const s = String(o.id), r = y.get(s) || {};
246
- if (r.escKey = !0, y.set(s, r), $(document).on("keydown", function(e) {
248
+ const s = String(o.id), r = w.get(s) || {};
249
+ if (r.escKey = !0, w.set(s, r), $(document).on("keydown", function(e) {
247
250
  "Escape" !== e.key && 27 !== e.keyCode || (o?.buttons?.cancel?.cb && o?.buttons?.cancel?.cb(),
248
251
  layerpro.popup.close(o));
249
252
  }), o.timer > 0) {
@@ -273,7 +276,7 @@ var m, b, _, f, v, g, w, y, z, k, x, C, E, S, M, N, T, O, I, A, L, P, j, H, R, W
273
276
  o.movable && layerpro.popup.movable(o), o.resizable && layerpro.popup.resizable(o),
274
277
  o.isMaximize && layerpro.popup.maximize(o);
275
278
  const c = $('<div class="popup_overflow_' + o.id + '">', "#popup");
276
- $('<div class="popup_internal_' + o.id + '">', c).appendTo(n), $('<div class="popup_body_' + o.id + '">', c).appendTo(".popup_internal_" + o.id).hide().fadeIn(o.fadeIn, function() {
279
+ $('<div class="popup_internal_' + o.id + '">', c).appendTo(p), $('<div class="popup_body_' + o.id + '">', c).appendTo(".popup_internal_" + o.id).hide().fadeIn(o.fadeIn, function() {
277
280
  (() => {
278
281
  if (o.body && !o.source) {
279
282
  const t = o.body, i = "object" == typeof t && null !== t && void 0 !== t.type && "object" == typeof t.props && null !== t.props;
@@ -283,7 +286,7 @@ var m, b, _, f, v, g, w, y, z, k, x, C, E, S, M, N, T, O, I, A, L, P, j, H, R, W
283
286
  if (!t) return;
284
287
  try {
285
288
  const i = e(t);
286
- i.render(o.body), w.set(String(o.id), i);
289
+ i.render(o.body), y.set(String(o.id), i);
287
290
  } catch (e) {
288
291
  const o = e?.message || String(e);
289
292
  o.includes("Invalid hook call") || o.includes("hooks");
@@ -314,26 +317,26 @@ var m, b, _, f, v, g, w, y, z, k, x, C, E, S, M, N, T, O, I, A, L, P, j, H, R, W
314
317
  }
315
318
  }), te = l({
316
319
  "core/mobile.ts"() {
317
- if (C = () => "undefined" != typeof window && window.matchMedia("(max-width: 1024px)").matches,
318
- E = () => {
320
+ if (T = () => "undefined" != typeof window && window.matchMedia("(max-width: 1024px)").matches,
321
+ C = () => {
319
322
  if ("undefined" == typeof navigator) return !1;
320
323
  const e = navigator.userAgent;
321
324
  return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(e);
322
- }, S = () => "ontouchstart" in window || navigator.maxTouchPoints > 0, (M = () => {
325
+ }, E = () => "ontouchstart" in window || navigator.maxTouchPoints > 0, (S = () => {
323
326
  if (!0 === window.__FORCE_TOUCH_MODE__) return "touch";
324
- const e = E() || C();
325
- return S() && e ? "touch" : "mouse";
326
- })(), N = !C(), "undefined" != typeof window) {
327
+ const e = C() || T();
328
+ return E() && e ? "touch" : "mouse";
329
+ })(), M = !T(), "undefined" != typeof window) {
327
330
  const e = window.matchMedia("(max-width: 1024px)"), o = () => {
328
- const e = M(), o = !C();
329
- N !== o && (N = o);
331
+ const e = S(), o = !T();
332
+ M !== o && (M = o);
330
333
  };
331
334
  let t;
332
335
  e.addListener ? e.addListener(o) : e.addEventListener("change", o), window.addEventListener("resize", () => {
333
336
  clearTimeout(t), t = setTimeout(o, 150);
334
337
  });
335
338
  }
336
- T = () => "pointerdown", O = () => "pointermove", I = () => "pointerup", A = e => void 0 !== e.clientX ? e.clientX : e.touches && e.touches.length > 0 ? e.touches[0].clientX : e.clientX,
339
+ I = () => "pointerdown", N = () => "pointermove", O = () => "pointerup", A = e => void 0 !== e.clientX ? e.clientX : e.touches && e.touches.length > 0 ? e.touches[0].clientX : e.clientX,
337
340
  L = e => void 0 !== e.clientY ? e.clientY : e.touches && e.touches.length > 0 ? e.touches[0].clientY : e.clientY;
338
341
  }
339
342
  });
@@ -342,7 +345,7 @@ u({}, {
342
345
  popup: () => V
343
346
  });
344
347
 
345
- var ie, ne = l({
348
+ var ie = l({
346
349
  "core/properties.ts"() {
347
350
  oe(), te(), P = 250, j = 150, R = 1e3, F = new Map, J = new Map, Q = $(window),
348
351
  G = $("body"), V = {
@@ -360,8 +363,7 @@ var ie, ne = l({
360
363
  "auto" === e.height && (e.height = "100%"), 0 === $("#popup").length && $('<div id="popup">', "#popup").appendTo("body").css({
361
364
  "pointer-events": "none",
362
365
  "z-index": V.zIndex($("*")) + 1
363
- }), 0 === $(".popup_window_" + e.id, "#popup").length && x(e), layerpro.purge(document),
364
- e;
366
+ }), 0 === $(".popup_window_" + e.id, "#popup").length && x(e), e;
365
367
  },
366
368
  dispatch: e => {
367
369
  layerpro.popup.store(e);
@@ -392,7 +394,7 @@ var ie, ne = l({
392
394
  const e = {
393
395
  passive: !1
394
396
  };
395
- t.move && document.removeEventListener(O(), t.move, e), t.up && document.removeEventListener(I(), t.up, e),
397
+ t.move && document.removeEventListener(N(), t.move, e), t.up && document.removeEventListener(O(), t.up, e),
396
398
  F.delete(String(o));
397
399
  }
398
400
  const i = J.get(String(o));
@@ -400,7 +402,7 @@ var ie, ne = l({
400
402
  const e = {
401
403
  passive: !1
402
404
  };
403
- i.move && document.removeEventListener(O(), i.move, e), i.up && document.removeEventListener(I(), i.up, e),
405
+ i.move && document.removeEventListener(N(), i.move, e), i.up && document.removeEventListener(O(), i.up, e),
404
406
  J.delete(String(o));
405
407
  }
406
408
  !0 === e.raised ? $(".popup_raised_" + o).fadeOut(e.fadeOut || 500, e => {
@@ -413,7 +415,7 @@ var ie, ne = l({
413
415
  } else $("#popup").fadeOut(() => {
414
416
  $(void 0).remove();
415
417
  });
416
- layerpro.purge(document), setTimeout(() => V.removeDock(e), 300);
418
+ setTimeout(() => V.removeDock(e), 300);
417
419
  },
418
420
  removeDock: e => {
419
421
  $(".icon_" + e.id).remove(), $('[class^="popup_overflow_"]', "#popup").length < 1 && ($("#root").css("margin", "0"),
@@ -450,14 +452,14 @@ var ie, ne = l({
450
452
  const o = $(".popup_overflow_" + e.id, "#popup"), t = $('[class^="resize_"]', o), i = $('[class^="popup_drag_"]', o);
451
453
  if (V.vfx(o, !1, !0), o.data("store")) {
452
454
  if (o.data("store")) {
453
- const n = o.data("store");
455
+ const p = o.data("store");
454
456
  o.animate({
455
- top: n.y,
456
- left: n.x,
457
- width: n.w,
458
- height: n.h
457
+ top: p.y,
458
+ left: p.x,
459
+ width: p.w,
460
+ height: p.h
459
461
  }, () => {
460
- i.css("pointer-events", "auto"), t.on(T(), function(o) {
462
+ i.css("pointer-events", "auto"), t.on(I(), function(o) {
461
463
  V.resizeModals(o, this, e);
462
464
  }), Q.off("layerProResize.eventItem"), V.vfx(o, !0);
463
465
  }), o.removeData("store");
@@ -481,32 +483,32 @@ var ie, ne = l({
481
483
  width: Q.width() + 12,
482
484
  height: Q.height() + 12 - 40
483
485
  });
484
- }), i.css("pointer-events", "none"), t.off(T()), V.vfx(o, !0, !0);
486
+ }), i.css("pointer-events", "none"), t.off(I()), V.vfx(o, !0, !0);
485
487
  });
486
488
  },
487
489
  movable: e => {
488
490
  if (!1 === e.movable) return;
489
- const o = String(e.id), t = $(".popup_overflow_" + e.id, "#popup"), i = $(".popup_drag_" + e.id, t), n = $(".popup_body_" + e.id, t);
491
+ const o = String(e.id), t = $(".popup_overflow_" + e.id, "#popup"), i = $(".popup_drag_" + e.id, t), p = $(".popup_body_" + e.id, t);
490
492
  t.css("touch-action", "none");
491
- let p = 0, s = 0, r = 0, c = 0;
493
+ let n = 0, s = 0, r = 0, c = 0;
492
494
  const a = e => {
493
495
  e.preventDefault();
494
496
  const o = A(e), i = L(e);
495
- p = r - o, s = c - i, r = o, c = i, V.checkArea(e)[1] < V.checkArea(e)[4] && 1 === Math.sign(V.checkArea(e)[1]) && t.css("top", t.offset().top - s),
496
- V.checkArea(e)[0] < V.checkArea(e)[5] && 1 === Math.sign(V.checkArea(e)[0]) && t.css("left", t.offset().left - p);
497
+ n = r - o, s = c - i, r = o, c = i, V.checkArea(e)[1] < V.checkArea(e)[4] && 1 === Math.sign(V.checkArea(e)[1]) && t.css("top", t.offset().top - s),
498
+ V.checkArea(e)[0] < V.checkArea(e)[5] && 1 === Math.sign(V.checkArea(e)[0]) && t.css("left", t.offset().left - n);
497
499
  }, d = e => {
498
500
  const i = {
499
501
  passive: !1
500
502
  };
501
- document.removeEventListener(O(), a, i), document.removeEventListener(I(), d, i),
502
- F.delete(o), n.css("pointer-events", "auto"), V.vfx(t, !0);
503
+ document.removeEventListener(N(), a, i), document.removeEventListener(O(), d, i),
504
+ F.delete(o), p.css("pointer-events", "auto"), V.vfx(t, !0);
503
505
  };
504
506
  F.set(o, {
505
507
  move: a,
506
508
  up: d
507
509
  });
508
- i[0].addEventListener(T(), e => {
509
- e.preventDefault(), n.css("pointer-events", "none"), l(e), V.vfx(t, !1);
510
+ i[0].addEventListener(I(), e => {
511
+ e.preventDefault(), p.css("pointer-events", "none"), l(e), V.vfx(t, !1);
510
512
  }, {
511
513
  passive: !1
512
514
  }), e.maximize && i.on("dblclick", o => {
@@ -517,7 +519,7 @@ var ie, ne = l({
517
519
  const o = {
518
520
  passive: !1
519
521
  };
520
- document.addEventListener(O(), a, o), document.addEventListener(I(), d, o);
522
+ document.addEventListener(N(), a, o), document.addEventListener(O(), d, o);
521
523
  };
522
524
  },
523
525
  resizable: e => {
@@ -529,41 +531,41 @@ var ie, ne = l({
529
531
  i.down = function(o) {
530
532
  V.resizeModals(o, this, e);
531
533
  }, J.set(o, i);
532
- const n = {
534
+ const p = {
533
535
  passive: !1
534
536
  };
535
537
  $("[class^=resize_]").each((o, t) => {
536
- t.addEventListener(T(), o => {
538
+ t.addEventListener(I(), o => {
537
539
  o.preventDefault(), V.resizeModals(o, t, e);
538
- }, n);
540
+ }, p);
539
541
  });
540
542
  },
541
543
  resizeModals: (e, o, t) => {
542
- const i = $(o).parent(), n = String(t.id), p = A(e), s = L(e), r = [ p - Q.scrollLeft(), s - Q.scrollTop() ];
544
+ const i = $(o).parent(), p = String(t.id), n = A(e), s = L(e), r = [ n - Q.scrollLeft(), s - Q.scrollTop() ];
543
545
  t.minWidth, G.css("pointer-events", "none"), i.css("pointer-events", "none"), V.vfx(i, !1);
544
546
  const c = e => {
545
547
  V.doRes(e, o);
546
548
  }, a = e => {
547
549
  V.stopRes(o);
548
- }, d = J.get(n) || {};
549
- d.move = c, d.up = a, J.set(n, d);
550
+ }, d = J.get(p) || {};
551
+ d.move = c, d.up = a, J.set(p, d);
550
552
  const l = {
551
553
  passive: !1
552
554
  };
553
- document.addEventListener(O(), c, l), document.addEventListener(I(), a, l), W = r[0],
555
+ document.addEventListener(N(), c, l), document.addEventListener(O(), a, l), W = r[0],
554
556
  D = r[1], X = i.width(), q = i.height(), Y = i.position().left, U = i.position().top,
555
- K = U + q + 1, B = Y + X + 1, H = o;
557
+ B = U + q + 1, K = Y + X + 1, H = o;
556
558
  },
557
559
  doRes: (e, o) => {
558
560
  dispatchEvent(new Event("layerProResize"));
559
- const t = $(o), i = t.parent(), n = A(e), p = L(e), s = [ n - Q.scrollLeft(), p - Q.scrollTop() ];
561
+ const t = $(o), i = t.parent(), p = A(e), n = L(e), s = [ p - Q.scrollLeft(), n - Q.scrollTop() ];
560
562
  if (o === H) {
561
- let o = X + s[0] - W, n = q + s[1] - D;
562
- const p = X - s[0] + W, r = q - s[1] + D;
563
- o <= 0 && (o = 0), n <= 0 && (n = 0), V.checkArea(e)[1] < V.checkArea(e)[4] && 1 === Math.sign(V.checkArea(e)[1]) && t.hasClass("resize_0") && (i.height() <= j && r > j && i.css({
563
+ let o = X + s[0] - W, p = q + s[1] - D;
564
+ const n = X - s[0] + W, r = q - s[1] + D;
565
+ o <= 0 && (o = 0), p <= 0 && (p = 0), V.checkArea(e)[1] < V.checkArea(e)[4] && 1 === Math.sign(V.checkArea(e)[1]) && t.hasClass("resize_0") && (i.height() <= j && r > j && i.css({
564
566
  height: Number(j + 1)
565
567
  }), i.height() > j && j <= r && i.css({
566
- top: Number(K - r),
568
+ top: Number(B - r),
567
569
  height: parseInt(r)
568
570
  })), V.checkArea(e)[0] < V.checkArea(e)[5] && 1 === Math.sign(V.checkArea(e)[0]) && t.hasClass("resize_1") && (i.width() >= P && i.css({
569
571
  width: Number(o),
@@ -571,51 +573,51 @@ var ie, ne = l({
571
573
  }), i.width() <= P && i.css({
572
574
  width: Number(P + 1)
573
575
  })), V.checkArea(e)[1] < V.checkArea(e)[4] && 1 === Math.sign(V.checkArea(e)[1]) && t.hasClass("resize_2") && (i.height() >= j && i.css({
574
- height: Number(n)
575
- }), i.height() <= j && n > j && i.css({
576
+ height: Number(p)
577
+ }), i.height() <= j && p > j && i.css({
576
578
  height: Number(j + 1)
577
- })), V.checkArea(e)[0] < V.checkArea(e)[5] && 1 === Math.sign(V.checkArea(e)[0]) && t.hasClass("resize_3") && (i.width() <= P && p > P && i.css({
579
+ })), V.checkArea(e)[0] < V.checkArea(e)[5] && 1 === Math.sign(V.checkArea(e)[0]) && t.hasClass("resize_3") && (i.width() <= P && n > P && i.css({
578
580
  width: Number(P + 1)
579
- }), i.width() > P && P <= p && i.css({
580
- width: parseInt(p),
581
- left: Number(B - p)
581
+ }), i.width() > P && P <= n && i.css({
582
+ width: parseInt(n),
583
+ left: Number(K - n)
582
584
  })), V.checkArea(e)[1] < V.checkArea(e)[4] && V.checkArea(e)[0] < V.checkArea(e)[5] && 1 === Math.sign(V.checkArea(e)[0]) && 1 === Math.sign(V.checkArea(e)[1]) && (t.hasClass("resize_corner_0") && (i.height() >= j && r > j && i.css({
583
- top: Number(K - r),
585
+ top: Number(B - r),
584
586
  height: parseInt(r)
585
587
  }), i.height() <= j && r > j && i.css({
586
588
  height: Number(j + 1)
587
- }), i.width() >= P && p > P && i.css({
588
- width: parseInt(p),
589
- left: Number(B - p)
590
- }), i.width() <= P && p > P && i.css({
589
+ }), i.width() >= P && n > P && i.css({
590
+ width: parseInt(n),
591
+ left: Number(K - n)
592
+ }), i.width() <= P && n > P && i.css({
591
593
  width: Number(P + 1)
592
594
  })), t.hasClass("resize_corner_1") && (i.height() >= j && r > j && i.css({
593
- top: Number(K - r),
595
+ top: Number(B - r),
594
596
  height: Number(r)
595
597
  }), i.height() <= j && r > j && i.css({
596
598
  height: Number(j + 1)
597
599
  }), i.width() >= P && i.css({
598
600
  width: Number(o),
599
601
  right: Number(Y - o)
600
- }), i.width() <= P && p > P && i.css({
602
+ }), i.width() <= P && n > P && i.css({
601
603
  width: Number(P + 1)
602
604
  })), t.hasClass("resize_corner_2") && (i.height() >= j && i.css({
603
- height: Number(n)
604
- }), i.height() <= j && n > j && i.css({
605
+ height: Number(p)
606
+ }), i.height() <= j && p > j && i.css({
605
607
  height: Number(j + 1)
606
608
  }), i.width() >= P && i.css({
607
609
  width: Number(o),
608
610
  right: Number(Y - o)
609
611
  }), i.width() <= P && i.css({
610
612
  width: Number(P + 1)
611
- })), t.hasClass("resize_corner_3") && (i.height() >= j && n > j && i.css({
612
- height: Number(n)
613
- }), i.height() <= j && n > j && i.css({
613
+ })), t.hasClass("resize_corner_3") && (i.height() >= j && p > j && i.css({
614
+ height: Number(p)
615
+ }), i.height() <= j && p > j && i.css({
614
616
  height: Number(j + 1)
615
- }), i.width() >= P && p > P && i.css({
616
- width: Number(p),
617
- left: Number(B - p)
618
- }), i.width() <= P && p > P && i.css({
617
+ }), i.width() >= P && n > P && i.css({
618
+ width: Number(n),
619
+ left: Number(K - n)
620
+ }), i.width() <= P && n > P && i.css({
619
621
  width: Number(P + 1)
620
622
  })));
621
623
  }
@@ -629,7 +631,7 @@ var ie, ne = l({
629
631
  const o = {
630
632
  passive: !1
631
633
  };
632
- t.move && document.removeEventListener(O(), t.move, o), t.up && document.removeEventListener(I(), t.up, o),
634
+ t.move && document.removeEventListener(N(), t.move, o), t.up && document.removeEventListener(O(), t.up, o),
633
635
  J.delete(String(e));
634
636
  }
635
637
  },
@@ -649,18 +651,6 @@ var ie, ne = l({
649
651
  });
650
652
  }
651
653
  }), pe = l({
652
- "core/purge.ts"() {
653
- ie = e => {
654
- let o, t, i = e.attributes;
655
- if (i) for (t = i.length, o = 0; o < t; o += 1) i[o].name;
656
- if (i = e.childNodes, i) for (t = i.length, o = 0; o < t; o += 1) layerpro.purge(e.childNodes[o]);
657
- }, Object.defineProperty(layerpro, "purge", {
658
- value: new Proxy(ie, {}),
659
- writable: !1,
660
- configurable: !1
661
- });
662
- }
663
- }), se = l({
664
654
  "core/window.ts"() {
665
655
  window.offScreenBuffering = !0, addEventListener("wheel", e => {}, {
666
656
  capture: !0,
@@ -676,7 +666,7 @@ window.layerpro || (Object.defineProperty(window, "layerpro", {
676
666
  writable: !1,
677
667
  configurable: !1,
678
668
  enumerable: !1
679
- }), h(), Z(), ne(), pe(), se(), layerpro.setProps = (e, o) => {
669
+ }), h(), Z(), ie(), pe(), layerpro.setProps = (e, o) => {
680
670
  Reflect.ownKeys(e).forEach(t => {
681
671
  const i = Object.getOwnPropertyDescriptor(e, t);
682
672
  i && (i.enumerable = o?.enumerable || !1, i.configurable = o?.enumerable || !1,
package/package.json CHANGED
@@ -1,13 +1,12 @@
1
1
  {
2
2
  "name": "layerpro",
3
- "code": "layerpro",
4
- "version": "2.2.5",
3
+ "codeName": "layerpro",
4
+ "version": "2.5.0",
5
5
  "description": "The real custom modals, alert, confirm, prompt... for your browser",
6
6
  "main": "./index.cjs",
7
7
  "browser": "./index.cjs",
8
8
  "types": "./index.d.ts",
9
9
  "typing": "./types/*",
10
- "homepage": "https://a51.gitbook.io/layerpro",
11
10
  "license": "MIT",
12
11
  "copyright": "Dario Passariello",
13
12
  "author": "Dario Passariello",
@@ -38,19 +37,15 @@
38
37
  "url": "https://www.patreon.com/passariello"
39
38
  }
40
39
  ],
40
+ "workspaces": [
41
+ "tests"
42
+ ],
41
43
  "engines": {
42
44
  "node": ">=18.0.0"
43
45
  },
44
46
  "files": [
45
47
  "**/*"
46
48
  ],
47
- "repository": {
48
- "type": "git",
49
- "url": "git+https://github.com/a51-dev/a51.layerpro.git"
50
- },
51
- "bugs": {
52
- "url": "https://github.com/a51-dev/a51.layerpro/issues"
53
- },
54
49
  "support": {
55
50
  "name": "Dario Passariello",
56
51
  "url": "https://dario.passariello.ca/",
@@ -80,7 +80,6 @@ interface _layerpro {
80
80
  readonly prompt: (txt: string, callback: (input: string) => void, event: Event) => void
81
81
  readonly message: (txt: string, callback: () => void) => void
82
82
  readonly confirm: (txt: string, yesCallback: () => void, noCallback: () => void) => void
83
- readonly purge: (document: Document) => void
84
83
  readonly credits: (txt: string) => void
85
84
 
86
85
  setProps: (obj, options?) => void