@owp/core 2.1.5 → 2.1.6

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 (31) hide show
  1. package/dist/Close-BvQGZ-9D.js +960 -0
  2. package/dist/Close-BvQGZ-9D.js.map +1 -0
  3. package/dist/contexts.js +4 -4
  4. package/dist/getStartPagePath-Dxtn_J32.js +21 -0
  5. package/dist/getStartPagePath-Dxtn_J32.js.map +1 -0
  6. package/dist/hooks.js +52 -52
  7. package/dist/hooks.js.map +1 -1
  8. package/dist/index.js +4212 -4195
  9. package/dist/index.js.map +1 -1
  10. package/dist/owp-app.css +1 -1
  11. package/dist/types/components/OwpErrorStatusPage/OwpErrorStatusPage.d.ts +5 -0
  12. package/dist/types/components/OwpErrorStatusPage/index.d.ts +2 -0
  13. package/dist/types/hooks/useInitApp.d.ts +3 -1
  14. package/dist/types/index.d.ts +1 -0
  15. package/dist/types/utils/getStartPagePath.d.ts +5 -0
  16. package/dist/types/utils/index.d.ts +1 -0
  17. package/dist/{usePageLockLoading-BGODEt_k.js → usePageLockLoading-BhgLOg3R.js} +2 -2
  18. package/dist/{usePageLockLoading-BGODEt_k.js.map → usePageLockLoading-BhgLOg3R.js.map} +1 -1
  19. package/dist/useShortcuts-BcLEOM-d.js +228 -0
  20. package/dist/useShortcuts-BcLEOM-d.js.map +1 -0
  21. package/dist/{useTreeGridExcelExport-Bfxx0cps.js → useTreeGridExcelExport-HRm8p-7o.js} +2 -2
  22. package/dist/{useTreeGridExcelExport-Bfxx0cps.js.map → useTreeGridExcelExport-HRm8p-7o.js.map} +1 -1
  23. package/dist/utils.js +11 -9
  24. package/dist/utils.js.map +1 -1
  25. package/package.json +1 -1
  26. package/dist/Close-DvFvpcJW.js +0 -981
  27. package/dist/Close-DvFvpcJW.js.map +0 -1
  28. package/dist/toUpper-D96_nWkI.js +0 -16
  29. package/dist/toUpper-D96_nWkI.js.map +0 -1
  30. package/dist/useShortcuts-BjtlXprQ.js +0 -236
  31. package/dist/useShortcuts-BjtlXprQ.js.map +0 -1
@@ -0,0 +1,960 @@
1
+ var Jt = Object.defineProperty;
2
+ var n = (e, t) => Jt(e, "name", { value: t, configurable: !0 });
3
+ import { a as Be, j as P, b as Yt } from "./emotion-react-jsx-runtime.browser.esm-BMvSswBW.js";
4
+ import { b as Fe, l as qt, t as Wt } from "./useShortcuts-BcLEOM-d.js";
5
+ import { DialogContent as Ht, DialogActions as Kt, Dialog as Xt, DialogTitle as $t, Box as Zt, Button as wt, Typography as kt } from "@mui/material";
6
+ import { forwardRef as Qt, createContext as er, useRef as v, useEffect as w, useCallback as g, useMemo as tr, Component as rr, useState as Ge } from "react";
7
+ import { u as nr } from "./isString-Codtu20I.js";
8
+ import { useNavigate as ir, useLocation as or } from "react-router-dom";
9
+ import ur from "@mui/material/Box";
10
+ import ar from "@mui/material/LinearProgress";
11
+ import sr from "@mui/material/Backdrop";
12
+ import cr from "@mui/material/CircularProgress";
13
+ import { createSvgIcon as lr } from "@mui/material/utils";
14
+ function Me(e) {
15
+ return typeof e == "number" || e instanceof Number;
16
+ }
17
+ n(Me, "isNumber");
18
+ const Je = Qt(
19
+ ({
20
+ title: e,
21
+ children: t,
22
+ canCancel: r = !0,
23
+ canConfirm: i = !0,
24
+ onConfirm: o,
25
+ onCancel: h,
26
+ onClose: s,
27
+ useSubmit: a,
28
+ actions: c,
29
+ contentProps: l,
30
+ ...y
31
+ }, B) => {
32
+ const { t: G } = Fe(), I = (y == null ? void 0 : y.confirmText) ?? G("Button.저장"), T = (y == null ? void 0 : y.cancelText) ?? G(i ? "Button.취소" : "Button.닫기");
33
+ return /* @__PURE__ */ Be(
34
+ Xt,
35
+ {
36
+ ref: B,
37
+ fullWidth: !0,
38
+ component: a ? "form" : void 0,
39
+ onClose: /* @__PURE__ */ n((m, R) => {
40
+ R !== "backdropClick" && (s == null || s(m, R));
41
+ }, "onClose"),
42
+ ...y,
43
+ children: [
44
+ e && /* @__PURE__ */ P($t, { children: e }),
45
+ /* @__PURE__ */ P(Ht, { dividers: !0, ...l, children: t }),
46
+ /* @__PURE__ */ Be(Kt, { children: [
47
+ c && /* @__PURE__ */ P(Zt, { className: "flex w-full items-start", children: c }),
48
+ r && /* @__PURE__ */ P(
49
+ wt,
50
+ {
51
+ variant: "outlined",
52
+ onClick: /* @__PURE__ */ n(() => {
53
+ if (typeof h == "function") {
54
+ h();
55
+ return;
56
+ }
57
+ s == null || s({}, "escapeKeyDown");
58
+ }, "onClick"),
59
+ children: T
60
+ }
61
+ ),
62
+ i && /* @__PURE__ */ P(
63
+ wt,
64
+ {
65
+ variant: "contained",
66
+ color: "secondary",
67
+ type: a ? "submit" : "button",
68
+ onClick: /* @__PURE__ */ n(() => {
69
+ if (!a) {
70
+ if (typeof o == "function") {
71
+ o();
72
+ return;
73
+ }
74
+ s == null || s({}, "escapeKeyDown");
75
+ }
76
+ }, "onClick"),
77
+ children: I
78
+ }
79
+ )
80
+ ] })
81
+ ]
82
+ }
83
+ );
84
+ }
85
+ );
86
+ Je.displayName = "OwpDialog";
87
+ const rn = Je;
88
+ var fr = Object.create, Lt = Object.defineProperty, hr = Object.getOwnPropertyDescriptor, dr = Object.getOwnPropertyNames, vr = Object.getPrototypeOf, mr = Object.prototype.hasOwnProperty, pr = /* @__PURE__ */ n(function(e, t) {
89
+ return function() {
90
+ return t || e((t = { exports: {} }).exports, t), t.exports;
91
+ };
92
+ }, "yr"), gr = /* @__PURE__ */ n(function(e, t, r, i) {
93
+ if (t && typeof t == "object" || typeof t == "function") for (var o = dr(t), h = 0, s = o.length, a; h < s; h++) a = o[h], !mr.call(e, a) && a !== r && Lt(e, a, { get: (function(c) {
94
+ return t[c];
95
+ }).bind(null, a), enumerable: !(i = hr(t, a)) || i.enumerable });
96
+ return e;
97
+ }, "gr"), yr = /* @__PURE__ */ n(function(e, t, r) {
98
+ return r = e != null ? fr(vr(e)) : {}, gr(!e || !e.__esModule ? Lt(r, "default", { value: e, enumerable: !0 }) : r, e);
99
+ }, "wr"), Er = pr(function(e, t) {
100
+ (function(r, i) {
101
+ typeof e == "object" && typeof t < "u" ? i(e) : typeof define == "function" && define.amd ? define(["exports"], i) : (r = typeof globalThis < "u" ? globalThis : r || self, i(r.fastUniqueNumbers = {}));
102
+ })(e, function(r) {
103
+ var i = /* @__PURE__ */ n(function(I) {
104
+ return function(T) {
105
+ var m = I(T);
106
+ return T.add(m), m;
107
+ };
108
+ }, "r"), o = /* @__PURE__ */ n(function(I) {
109
+ return function(T, m) {
110
+ return I.set(T, m), m;
111
+ };
112
+ }, "t"), h = Number.MAX_SAFE_INTEGER === void 0 ? 9007199254740991 : Number.MAX_SAFE_INTEGER, s = 536870912, a = s * 2, c = /* @__PURE__ */ n(function(I, T) {
113
+ return function(m) {
114
+ var R = T.get(m), x = R === void 0 ? m.size : R < a ? R + 1 : 0;
115
+ if (!m.has(x)) return I(m, x);
116
+ if (m.size < s) {
117
+ for (; m.has(x); ) x = Math.floor(Math.random() * a);
118
+ return I(m, x);
119
+ }
120
+ if (m.size > h) throw new Error("Congratulations, you created a collection of unique numbers which uses all available integers!");
121
+ for (; m.has(x); ) x = Math.floor(Math.random() * h);
122
+ return I(m, x);
123
+ };
124
+ }, "s"), l = /* @__PURE__ */ new WeakMap(), y = o(l), B = c(y, l), G = i(B);
125
+ r.addUniqueNumber = G, r.generateUniqueNumber = B;
126
+ });
127
+ });
128
+ function te(e) {
129
+ if (e === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
130
+ return e;
131
+ }
132
+ n(te, "Y");
133
+ function St(e, t) {
134
+ return t != null && typeof Symbol < "u" && t[Symbol.hasInstance] ? !!t[Symbol.hasInstance](e) : St(e, t);
135
+ }
136
+ n(St, "je");
137
+ function ge(e, t) {
138
+ if (!St(e, t)) throw new TypeError("Cannot call a class as a function");
139
+ }
140
+ n(ge, "z");
141
+ function Ue(e, t) {
142
+ return Ue = Object.setPrototypeOf || function(r, i) {
143
+ return r.__proto__ = i, r;
144
+ }, Ue(e, t);
145
+ }
146
+ n(Ue, "De");
147
+ function Ot(e, t) {
148
+ if (typeof t != "function" && t !== null) throw new TypeError("Super expression must either be null or a function");
149
+ e.prototype = Object.create(t && t.prototype, { constructor: { value: e, writable: !0, configurable: !0 } }), t && Ue(e, t);
150
+ }
151
+ n(Ot, "Ke");
152
+ function b(e, t, r) {
153
+ return t in e ? Object.defineProperty(e, t, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = r, e;
154
+ }
155
+ n(b, "h");
156
+ function Pe(e) {
157
+ return Pe = Object.setPrototypeOf ? Object.getPrototypeOf : function(t) {
158
+ return t.__proto__ || Object.getPrototypeOf(t);
159
+ }, Pe(e);
160
+ }
161
+ n(Pe, "be");
162
+ function br() {
163
+ if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham) return !1;
164
+ if (typeof Proxy == "function") return !0;
165
+ try {
166
+ return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
167
+ })), !0;
168
+ } catch {
169
+ return !1;
170
+ }
171
+ }
172
+ n(br, "Pt");
173
+ function Mt(e) {
174
+ "@swc/helpers - typeof";
175
+ return e && typeof Symbol < "u" && e.constructor === Symbol ? "symbol" : typeof e;
176
+ }
177
+ n(Mt, "Ne");
178
+ function wr(e, t) {
179
+ return t && (Mt(t) === "object" || typeof t == "function") ? t : te(e);
180
+ }
181
+ n(wr, "kt");
182
+ function Pt(e) {
183
+ var t = br();
184
+ return function() {
185
+ var r = Pe(e), i;
186
+ if (t) {
187
+ var o = Pe(this).constructor;
188
+ i = Reflect.construct(r, arguments, o);
189
+ } else i = r.apply(this, arguments);
190
+ return wr(this, i);
191
+ };
192
+ }
193
+ n(Pt, "Ze");
194
+ var Tr = (function(e) {
195
+ Ot(r, e);
196
+ var t = Pt(r);
197
+ function r() {
198
+ return ge(this, r), t.apply(this, arguments);
199
+ }
200
+ return n(r, "t"), r;
201
+ })(rr);
202
+ (function(e) {
203
+ Ot(r, e);
204
+ var t = Pt(r);
205
+ function r(i) {
206
+ ge(this, r);
207
+ var o;
208
+ return o = t.call(this, i), o.onPresenceChange && i.setOnPresenceChange(o.onPresenceChange.bind(te(o))), o.onPrompt && i.setOnPrompt(o.onPrompt.bind(te(o))), o.onIdle && i.setOnIdle(o.onIdle.bind(te(o))), o.onActive && i.setOnActive(o.onActive.bind(te(o))), o.onAction && i.setOnAction(o.onAction.bind(te(o))), o.onMessage && i.setOnMessage(o.onMessage.bind(te(o))), o;
209
+ }
210
+ return n(r, "t"), r;
211
+ })(Tr);
212
+ function ze(e, t) {
213
+ (t == null || t > e.length) && (t = e.length);
214
+ for (var r = 0, i = new Array(t); r < t; r++) i[r] = e[r];
215
+ return i;
216
+ }
217
+ n(ze, "Ee");
218
+ function Ar(e) {
219
+ if (Array.isArray(e)) return ze(e);
220
+ }
221
+ n(Ar, "At");
222
+ function Ir(e) {
223
+ if (typeof Symbol < "u" && e[Symbol.iterator] != null || e["@@iterator"] != null) return Array.from(e);
224
+ }
225
+ n(Ir, "Rt");
226
+ function kr() {
227
+ throw new TypeError(`Invalid attempt to spread non-iterable instance.
228
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
229
+ }
230
+ n(kr, "Mt");
231
+ function Lr(e, t) {
232
+ if (e) {
233
+ if (typeof e == "string") return ze(e, t);
234
+ var r = Object.prototype.toString.call(e).slice(8, -1);
235
+ if (r === "Object" && e.constructor && (r = e.constructor.name), r === "Map" || r === "Set") return Array.from(r);
236
+ if (r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)) return ze(e, t);
237
+ }
238
+ }
239
+ n(Lr, "Ct");
240
+ function _(e) {
241
+ return Ar(e) || Ir(e) || Lr(e) || kr();
242
+ }
243
+ n(_, "O");
244
+ function Sr(e, t) {
245
+ for (var r = 0; r < t.length; r++) {
246
+ var i = t[r];
247
+ i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(e, i.key, i);
248
+ }
249
+ }
250
+ n(Sr, "jt");
251
+ function Ye(e, t, r) {
252
+ return t && Sr(e.prototype, t), e;
253
+ }
254
+ n(Ye, "ce");
255
+ yr(Er());
256
+ var W = (typeof window > "u" || typeof window > "u" ? "undefined" : Mt(window)) === "object", V = { setTimeout: W ? setTimeout.bind(window) : setTimeout, clearTimeout: W ? clearTimeout.bind(window) : clearTimeout, setInterval: W ? setInterval.bind(window) : setInterval, clearInterval: W ? clearInterval.bind(window) : clearInterval };
257
+ function Or(e) {
258
+ V.setTimeout = e.setTimeout, V.clearTimeout = e.clearTimeout, V.setInterval = e.setInterval, V.clearInterval = e.clearInterval;
259
+ }
260
+ n(Or, "Jt");
261
+ var ue = {}, Mr = (function() {
262
+ function e(t) {
263
+ ge(this, e), b(this, "name", void 0), b(this, "closed", !1), b(this, "mc", new MessageChannel()), this.name = t, ue[t] = ue[t] || [], ue[t].push(this), this.mc.port1.start(), this.mc.port2.start(), this.onStorage = this.onStorage.bind(this), window.addEventListener("storage", this.onStorage);
264
+ }
265
+ return n(e, "e"), Ye(e, [{ key: "onStorage", value: /* @__PURE__ */ n(function(t) {
266
+ if (t.storageArea === window.localStorage && t.key.substring(0, this.name.length) === this.name && t.newValue !== null) {
267
+ var r = JSON.parse(t.newValue);
268
+ this.mc.port2.postMessage(r);
269
+ }
270
+ }, "value") }, { key: "postMessage", value: /* @__PURE__ */ n(function(t) {
271
+ var r = this;
272
+ if (this.closed) throw new Error("InvalidStateError");
273
+ var i = JSON.stringify(t), o = "".concat(this.name, ":").concat(String(Date.now())).concat(String(Math.random()));
274
+ window.localStorage.setItem(o, i), V.setTimeout(function() {
275
+ window.localStorage.removeItem(o);
276
+ }, 500), ue[this.name].forEach(function(h) {
277
+ h !== r && h.mc.port2.postMessage(JSON.parse(i));
278
+ });
279
+ }, "value") }, { key: "close", value: /* @__PURE__ */ n(function() {
280
+ if (!this.closed) {
281
+ this.closed = !0, this.mc.port1.close(), this.mc.port2.close(), window.removeEventListener("storage", this.onStorage);
282
+ var t = ue[this.name].indexOf(this);
283
+ ue[this.name].splice(t, 1);
284
+ }
285
+ }, "value") }, { key: "onmessage", get: /* @__PURE__ */ n(function() {
286
+ return this.mc.port1.onmessage;
287
+ }, "get"), set: /* @__PURE__ */ n(function(t) {
288
+ this.mc.port1.onmessage = t;
289
+ }, "set") }, { key: "onmessageerror", get: /* @__PURE__ */ n(function() {
290
+ return this.mc.port1.onmessageerror;
291
+ }, "get"), set: /* @__PURE__ */ n(function(t) {
292
+ this.mc.port1.onmessageerror = t;
293
+ }, "set") }, { key: "addEventListener", value: /* @__PURE__ */ n(function(t, r) {
294
+ return this.mc.port1.addEventListener(t, r);
295
+ }, "value") }, { key: "removeEventListener", value: /* @__PURE__ */ n(function(t, r) {
296
+ return this.mc.port1.removeEventListener(t, r);
297
+ }, "value") }, { key: "dispatchEvent", value: /* @__PURE__ */ n(function(t) {
298
+ return this.mc.port1.dispatchEvent(t);
299
+ }, "value") }]), e;
300
+ })(), Pr = typeof window > "u" ? void 0 : typeof window.BroadcastChannel == "function" ? window.BroadcastChannel : Mr;
301
+ function Tt(e, t, r, i, o, h, s) {
302
+ try {
303
+ var a = e[h](s), c = a.value;
304
+ } catch (l) {
305
+ r(l);
306
+ return;
307
+ }
308
+ a.done ? t(c) : Promise.resolve(c).then(i, o);
309
+ }
310
+ n(Tt, "Xt");
311
+ function Rr(e) {
312
+ return function() {
313
+ var t = this, r = arguments;
314
+ return new Promise(function(i, o) {
315
+ var h = e.apply(t, r);
316
+ function s(c) {
317
+ Tt(h, i, o, s, a, "next", c);
318
+ }
319
+ n(s, "s");
320
+ function a(c) {
321
+ Tt(h, i, o, s, a, "throw", c);
322
+ }
323
+ n(a, "a"), s(void 0);
324
+ });
325
+ };
326
+ }
327
+ n(Rr, "$t");
328
+ function xr(e, t) {
329
+ var r = /* @__PURE__ */ n(function(l) {
330
+ return function(y) {
331
+ return i([l, y]);
332
+ };
333
+ }, "t"), i = /* @__PURE__ */ n(function(l) {
334
+ if (h) throw new TypeError("Generator is already executing.");
335
+ for (; c && (c = 0, l[0] && (o = 0)), o; ) try {
336
+ if (h = 1, s && (a = l[0] & 2 ? s.return : l[0] ? s.throw || ((a = s.return) && a.call(s), 0) : s.next) && !(a = a.call(s, l[1])).done) return a;
337
+ switch (s = 0, a && (l = [l[0] & 2, a.value]), l[0]) {
338
+ case 0:
339
+ case 1:
340
+ a = l;
341
+ break;
342
+ case 4:
343
+ return o.label++, { value: l[1], done: !1 };
344
+ case 5:
345
+ o.label++, s = l[1], l = [0];
346
+ continue;
347
+ case 7:
348
+ l = o.ops.pop(), o.trys.pop();
349
+ continue;
350
+ default:
351
+ if (a = o.trys, !(a = a.length > 0 && a[a.length - 1]) && (l[0] === 6 || l[0] === 2)) {
352
+ o = 0;
353
+ continue;
354
+ }
355
+ if (l[0] === 3 && (!a || l[1] > a[0] && l[1] < a[3])) {
356
+ o.label = l[1];
357
+ break;
358
+ }
359
+ if (l[0] === 6 && o.label < a[1]) {
360
+ o.label = a[1], a = l;
361
+ break;
362
+ }
363
+ if (a && o.label < a[2]) {
364
+ o.label = a[2], o.ops.push(l);
365
+ break;
366
+ }
367
+ a[2] && o.ops.pop(), o.trys.pop();
368
+ continue;
369
+ }
370
+ l = t.call(e, o);
371
+ } catch (y) {
372
+ l = [6, y], s = 0;
373
+ } finally {
374
+ h = a = 0;
375
+ }
376
+ if (l[0] & 5) throw l[1];
377
+ return { value: l[0] ? l[1] : void 0, done: !0 };
378
+ }, "o"), o = { label: 0, sent: /* @__PURE__ */ n(function() {
379
+ if (a[0] & 1) throw a[1];
380
+ return a[1];
381
+ }, "sent"), trys: [], ops: [] }, h, s, a, c;
382
+ return c = { next: r(0), throw: r(1), return: r(2) }, typeof Symbol == "function" && (c[Symbol.iterator] = function() {
383
+ return this;
384
+ }), c;
385
+ }
386
+ n(xr, "Ve");
387
+ function Cr() {
388
+ var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0;
389
+ return new Promise(function(t) {
390
+ return V.setTimeout(t, e);
391
+ });
392
+ }
393
+ n(Cr, "Kt");
394
+ function Rt() {
395
+ return Math.random().toString(36).substring(2);
396
+ }
397
+ n(Rt, "Ge");
398
+ var d;
399
+ (function(e) {
400
+ e[e.APPLY = 0] = "APPLY", e[e.TELL = 1] = "TELL", e[e.CLOSE = 2] = "CLOSE", e[e.REGISTER = 3] = "REGISTER", e[e.DEREGISTER = 4] = "DEREGISTER", e[e.IDLE = 5] = "IDLE", e[e.ACTIVE = 6] = "ACTIVE", e[e.PROMPT = 7] = "PROMPT", e[e.START = 8] = "START", e[e.RESET = 9] = "RESET", e[e.ACTIVATE = 10] = "ACTIVATE", e[e.PAUSE = 11] = "PAUSE", e[e.RESUME = 12] = "RESUME", e[e.MESSAGE = 13] = "MESSAGE";
401
+ })(d || (d = {}));
402
+ var Dr = (function() {
403
+ function e(t, r) {
404
+ ge(this, e), b(this, "options", void 0), b(this, "channel", void 0), b(this, "token", Rt()), b(this, "isLeader", !1), b(this, "isDead", !1), b(this, "isApplying", !1), b(this, "reApply", !1), b(this, "intervals", []), b(this, "listeners", []), b(this, "deferred", void 0), this.channel = t, this.options = r, this.apply = this.apply.bind(this), this.awaitLeadership = this.awaitLeadership.bind(this), this.sendAction = this.sendAction.bind(this);
405
+ }
406
+ return n(e, "e"), Ye(e, [{ key: "apply", value: /* @__PURE__ */ n(function() {
407
+ var t = this;
408
+ return Rr(function() {
409
+ var r, i;
410
+ return xr(this, function(o) {
411
+ switch (o.label) {
412
+ case 0:
413
+ if (t.isLeader) return [2, !1];
414
+ if (t.isDead) return [2, !1];
415
+ if (t.isApplying) return t.reApply = !0, [2, !1];
416
+ t.isApplying = !0, r = !1, i = /* @__PURE__ */ n(function(h) {
417
+ var s = h.data, a = s.token, c = s.action;
418
+ a !== t.token && (c === d.APPLY && a > t.token && (r = !0), c === d.TELL && (r = !0));
419
+ }, "n"), t.channel.addEventListener("message", i), o.label = 1;
420
+ case 1:
421
+ return o.trys.push([1, 3, , 4]), t.sendAction(d.APPLY), [4, Cr(t.options.responseTime)];
422
+ case 2:
423
+ return o.sent(), t.channel.removeEventListener("message", i), t.isApplying = !1, r ? t.reApply ? [2, t.apply()] : [2, !1] : (t.assumeLead(), [2, !0]);
424
+ case 3:
425
+ return o.sent(), [2, !1];
426
+ case 4:
427
+ return [2];
428
+ }
429
+ });
430
+ })();
431
+ }, "value") }, { key: "awaitLeadership", value: /* @__PURE__ */ n(function() {
432
+ var t = this;
433
+ if (this.isLeader) return Promise.resolve();
434
+ var r = !1, i = null;
435
+ return new Promise(function(o) {
436
+ var h = /* @__PURE__ */ n(function() {
437
+ if (!r) {
438
+ r = !0;
439
+ try {
440
+ V.clearInterval(i);
441
+ } catch {
442
+ }
443
+ var a = t.intervals.indexOf(i);
444
+ a >= 0 && t.intervals.splice(a, 1), t.channel.removeEventListener("message", s), o();
445
+ }
446
+ }, "s");
447
+ i = V.setInterval(function() {
448
+ t.apply().then(function() {
449
+ t.isLeader && h();
450
+ });
451
+ }, t.options.fallbackInterval), t.intervals.push(i);
452
+ var s = /* @__PURE__ */ n(function(a) {
453
+ var c = a.data.action;
454
+ c === d.CLOSE && t.apply().then(function() {
455
+ t.isLeader && h();
456
+ });
457
+ }, "a");
458
+ t.channel.addEventListener("message", s);
459
+ });
460
+ }, "value") }, { key: "sendAction", value: /* @__PURE__ */ n(function(t) {
461
+ this.channel.postMessage({ action: t, token: this.token });
462
+ }, "value") }, { key: "assumeLead", value: /* @__PURE__ */ n(function() {
463
+ var t = this;
464
+ this.isLeader = !0;
465
+ var r = /* @__PURE__ */ n(function(i) {
466
+ var o = i.data.action;
467
+ o === d.APPLY && t.sendAction(d.TELL);
468
+ }, "o");
469
+ return this.channel.addEventListener("message", r), this.listeners.push(r), this.sendAction(d.TELL);
470
+ }, "value") }, { key: "waitForLeadership", value: /* @__PURE__ */ n(function() {
471
+ return this.deferred ? this.deferred : (this.deferred = this.awaitLeadership(), this.deferred);
472
+ }, "value") }, { key: "close", value: /* @__PURE__ */ n(function() {
473
+ var t = this;
474
+ if (!this.isDead) {
475
+ this.isDead = !0, this.isLeader = !1, this.sendAction(d.CLOSE);
476
+ try {
477
+ this.listeners.forEach(function(r) {
478
+ return t.channel.removeEventListener("message", r);
479
+ }), this.intervals.forEach(function(r) {
480
+ return V.clearInterval(r);
481
+ });
482
+ } catch {
483
+ }
484
+ }
485
+ }, "value") }]), e;
486
+ })(), O;
487
+ (function(e) {
488
+ e[e.PROMPTED = 0] = "PROMPTED", e[e.ACTIVE = 1] = "ACTIVE", e[e.IDLE = 2] = "IDLE";
489
+ })(O || (O = {}));
490
+ var jr = (function() {
491
+ function e(t) {
492
+ var r = this;
493
+ ge(this, e), b(this, "channel", void 0), b(this, "options", void 0), b(this, "elector", void 0), b(this, "token", Rt()), b(this, "registry", /* @__PURE__ */ new Map()), b(this, "allIdle", !1), b(this, "isLastActive", !1);
494
+ var i = t.channelName;
495
+ if (this.options = t, this.channel = new Pr(i), this.registry.set(this.token, O.ACTIVE), t.leaderElection) {
496
+ var o = { fallbackInterval: 2e3, responseTime: 100 };
497
+ this.elector = new Dr(this.channel, o), this.elector.waitForLeadership();
498
+ }
499
+ this.channel.addEventListener("message", function(h) {
500
+ var s = h.data, a = s.action, c = s.token, l = s.data;
501
+ switch (a) {
502
+ case d.REGISTER:
503
+ r.registry.set(c, O.IDLE);
504
+ break;
505
+ case d.DEREGISTER:
506
+ r.registry.delete(c);
507
+ break;
508
+ case d.IDLE:
509
+ r.idle(c);
510
+ break;
511
+ case d.ACTIVE:
512
+ r.active(c);
513
+ break;
514
+ case d.PROMPT:
515
+ r.prompt(c);
516
+ break;
517
+ case d.START:
518
+ r.start(c);
519
+ break;
520
+ case d.RESET:
521
+ r.reset(c);
522
+ break;
523
+ case d.ACTIVATE:
524
+ r.activate(c);
525
+ break;
526
+ case d.PAUSE:
527
+ r.pause(c);
528
+ break;
529
+ case d.RESUME:
530
+ r.resume(c);
531
+ break;
532
+ case d.MESSAGE:
533
+ r.options.onMessage(l);
534
+ break;
535
+ }
536
+ }), this.send(d.REGISTER);
537
+ }
538
+ return n(e, "e"), Ye(e, [{ key: "isLeader", get: /* @__PURE__ */ n(function() {
539
+ if (!this.elector) throw new Error('❌ Leader election is not enabled. To Enable it set the "leaderElection" property to true.');
540
+ return this.elector.isLeader;
541
+ }, "get") }, { key: "prompt", value: /* @__PURE__ */ n(function() {
542
+ var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : this.token;
543
+ this.registry.set(t, O.PROMPTED);
544
+ var r = _(this.registry.values()).every(function(i) {
545
+ return i === O.PROMPTED;
546
+ });
547
+ t === this.token && this.send(d.PROMPT), r && this.options.onPrompt();
548
+ }, "value") }, { key: "idle", value: /* @__PURE__ */ n(function() {
549
+ var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : this.token;
550
+ this.registry.set(t, O.IDLE);
551
+ var r = _(this.registry.values()).every(function(i) {
552
+ return i === O.IDLE;
553
+ });
554
+ t === this.token && this.send(d.IDLE), !this.allIdle && r && (this.allIdle = !0, this.options.onIdle());
555
+ }, "value") }, { key: "active", value: /* @__PURE__ */ n(function() {
556
+ var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : this.token;
557
+ this.allIdle = !1, this.registry.set(t, O.ACTIVE);
558
+ var r = _(this.registry.values()).some(function(i) {
559
+ return i === O.ACTIVE;
560
+ });
561
+ t === this.token && this.send(d.ACTIVE), r && this.options.onActive(), this.isLastActive = t === this.token;
562
+ }, "value") }, { key: "start", value: /* @__PURE__ */ n(function() {
563
+ var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : this.token;
564
+ this.allIdle = !1, this.registry.set(t, O.ACTIVE), t === this.token ? this.send(d.START) : this.options.start(!0), this.isLastActive = t === this.token;
565
+ }, "value") }, { key: "reset", value: /* @__PURE__ */ n(function() {
566
+ var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : this.token;
567
+ this.allIdle = !1, this.registry.set(t, O.ACTIVE), t === this.token ? this.send(d.RESET) : this.options.reset(!0), this.isLastActive = t === this.token;
568
+ }, "value") }, { key: "activate", value: /* @__PURE__ */ n(function() {
569
+ var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : this.token;
570
+ this.allIdle = !1, this.registry.set(t, O.ACTIVE), t === this.token ? this.send(d.ACTIVATE) : this.options.activate(!0), this.isLastActive = t === this.token;
571
+ }, "value") }, { key: "pause", value: /* @__PURE__ */ n(function() {
572
+ var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : this.token;
573
+ t === this.token ? this.send(d.PAUSE) : this.options.pause(!0);
574
+ }, "value") }, { key: "resume", value: /* @__PURE__ */ n(function() {
575
+ var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : this.token;
576
+ t === this.token ? this.send(d.RESUME) : this.options.resume(!0);
577
+ }, "value") }, { key: "message", value: /* @__PURE__ */ n(function(t) {
578
+ try {
579
+ this.channel.postMessage({ action: d.MESSAGE, token: this.token, data: t });
580
+ } catch {
581
+ }
582
+ }, "value") }, { key: "send", value: /* @__PURE__ */ n(function(t) {
583
+ try {
584
+ this.channel.postMessage({ action: t, token: this.token });
585
+ } catch {
586
+ }
587
+ }, "value") }, { key: "close", value: /* @__PURE__ */ n(function() {
588
+ this.options.leaderElection && this.elector.close(), this.send(d.DEREGISTER), this.channel.close();
589
+ }, "value") }]), e;
590
+ })(), Nr = W ? document : null, _r = ["mousemove", "keydown", "wheel", "DOMMouseScroll", "mousewheel", "mousedown", "touchstart", "touchmove", "MSPointerDown", "MSPointerMove", "visibilitychange", "focus"];
591
+ function Vr(e, t) {
592
+ var r = /* @__PURE__ */ n(function() {
593
+ for (var o = arguments.length, h = new Array(o), s = 0; s < o; s++) h[s] = arguments[s];
594
+ i && clearTimeout(i), i = setTimeout(function() {
595
+ e.apply(void 0, _(h)), i = null;
596
+ }, t);
597
+ }, "t"), i;
598
+ return r.cancel = function() {
599
+ clearTimeout(i);
600
+ }, r;
601
+ }
602
+ n(Vr, "tr");
603
+ function Ve(e, t) {
604
+ var r = 0;
605
+ return function() {
606
+ for (var i = arguments.length, o = new Array(i), h = 0; h < i; h++) o[h] = arguments[h];
607
+ var s = (/* @__PURE__ */ new Date()).getTime();
608
+ if (!(s - r < t)) return r = s, e.apply(void 0, _(o));
609
+ };
610
+ }
611
+ n(Ve, "Fe");
612
+ var E = /* @__PURE__ */ n(function() {
613
+ return Date.now();
614
+ }, "g"), ae = 2147483647;
615
+ function Br() {
616
+ var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t = e.timeout, r = t === void 0 ? 1e3 * 60 * 20 : t, i = e.promptTimeout, o = i === void 0 ? 0 : i, h = e.promptBeforeIdle, s = h === void 0 ? 0 : h, a = e.element, c = a === void 0 ? Nr : a, l = e.events, y = l === void 0 ? _r : l, B = e.timers, G = B === void 0 ? void 0 : B, I = e.immediateEvents, T = I === void 0 ? [] : I, m = e.onPresenceChange, R = m === void 0 ? function() {
617
+ } : m, x = e.onPrompt, ye = x === void 0 ? function() {
618
+ } : x, qe = e.onIdle, Ee = qe === void 0 ? function() {
619
+ } : qe, We = e.onActive, be = We === void 0 ? function() {
620
+ } : We, He = e.onAction, we = He === void 0 ? function() {
621
+ } : He, Ke = e.onMessage, se = Ke === void 0 ? function() {
622
+ } : Ke, Xe = e.debounce, ce = Xe === void 0 ? 0 : Xe, $e = e.throttle, le = $e === void 0 ? 0 : $e, Ze = e.eventsThrottle, Re = Ze === void 0 ? 200 : Ze, Qe = e.startOnMount, fe = Qe === void 0 ? !0 : Qe, et = e.startManually, z = et === void 0 ? !1 : et, tt = e.stopOnIdle, Te = tt === void 0 ? !1 : tt, rt = e.crossTab, re = rt === void 0 ? !1 : rt, nt = e.name, it = nt === void 0 ? "idle-timer" : nt, ot = e.syncTimers, he = ot === void 0 ? 0 : ot, ut = e.leaderElection, at = ut === void 0 ? !1 : ut, st = e.disabled, U = st === void 0 ? !1 : st, ct = v(E()), Ae = v(E()), k = v(null), C = v(null), H = v(0), de = v(0), F = v(0), M = v(0), p = v(!1), A = v(!1), J = v(!1), Y = v(!0), ve = v(!1), q = v(null), f = v(null), D = v(r), X = v(0);
623
+ w(function() {
624
+ if (o && console.warn("⚠️ IdleTimer -- The `promptTimeout` property has been deprecated in favor of `promptBeforeIdle`. It will be removed in the next major release."), s && o) throw new Error("❌ Both promptTimeout and promptBeforeIdle can not be set. The promptTimeout property will be deprecated in a future version.");
625
+ if (r >= ae) throw new Error("❌ The value for the timeout property must fit in a 32 bit signed integer, ".concat(ae, "."));
626
+ if (o >= ae) throw new Error("❌ The value for the promptTimeout property must fit in a 32 bit signed integer, ".concat(ae, "."));
627
+ if (s >= ae) throw new Error("❌ The value for the promptBeforeIdle property must fit in a 32 bit signed integer, ".concat(ae, "."));
628
+ if (s >= r) throw new Error("❌ The value for the promptBeforeIdle property must be less than the timeout property, ".concat(r, "."));
629
+ if (s ? (D.current = r - s, X.current = s) : (D.current = r, X.current = o), !Y.current) {
630
+ if (z || U) return;
631
+ p.current && (ne.current(null, S), f.current && f.current.active()), ee();
632
+ }
633
+ }, [r, o, s, z, U]);
634
+ var lt = v(Te);
635
+ w(function() {
636
+ lt.current = Te;
637
+ }, [Te]);
638
+ var ft = v(T), me = v(c), xe = v(_(new Set(_(y).concat(_(T))).values())), j = v(U);
639
+ w(function() {
640
+ j.current = U, !Y.current && (U ? Oe() : z || ee());
641
+ }, [U]);
642
+ var pe = v(R);
643
+ w(function() {
644
+ pe.current = R;
645
+ }, [R]);
646
+ var Ie = v(ye);
647
+ w(function() {
648
+ Ie.current = ye;
649
+ }, [ye]);
650
+ var ke = v(Ee);
651
+ w(function() {
652
+ ke.current = Ee;
653
+ }, [Ee]);
654
+ var ne = v(be);
655
+ w(function() {
656
+ ne.current = be;
657
+ }, [be]);
658
+ var Le = v(we);
659
+ w(function() {
660
+ Le.current = we;
661
+ }, [we]);
662
+ var ie = v(se);
663
+ w(function() {
664
+ ie.current = se;
665
+ }, [se]);
666
+ var $ = tr(function() {
667
+ var u = /* @__PURE__ */ n(function(L, oe) {
668
+ return Le.current(L, oe);
669
+ }, "i");
670
+ return ce > 0 ? Vr(u, ce) : le > 0 ? Ve(u, le) : u;
671
+ }, [le, ce]), ht = v();
672
+ w(function() {
673
+ re && he && (ht.current = Ve(function() {
674
+ f.current.active();
675
+ }, he));
676
+ }, [re, he]);
677
+ var N = /* @__PURE__ */ n(function() {
678
+ q.current !== null && (V.clearTimeout(q.current), q.current = null);
679
+ }, "N"), Z = /* @__PURE__ */ n(function(u) {
680
+ var L = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0;
681
+ N(), q.current = V.setTimeout(De, u || D.current), L && (C.current = E());
682
+ }, "Z"), dt = /* @__PURE__ */ n(function(u) {
683
+ !A.current && !p.current && (Ie.current(u, S), pe.current({ type: "active", prompted: !0 }, S)), M.current = 0, F.current = E(), A.current = !0, Z(X.current, !1);
684
+ }, "wt"), vt = /* @__PURE__ */ n(function() {
685
+ N(), p.current || (ke.current(null, S), pe.current({ type: "idle" }, S)), p.current = !0, k.current = E(), lt.current ? Q() : A.current && (F.current = 0, A.current = !1);
686
+ }, "bt"), Ce = /* @__PURE__ */ n(function(u) {
687
+ N(), (p.current || A.current) && (ne.current(u, S), pe.current({ type: "active", prompted: !1 }, S)), A.current = !1, F.current = 0, p.current = !1, H.current += E() - k.current, de.current += E() - k.current, K(), Z();
688
+ }, "ze"), De = /* @__PURE__ */ n(function(u) {
689
+ var L = !p.current;
690
+ if (L) {
691
+ $.cancel && $.cancel();
692
+ var oe = E() - C.current, Ft = D.current + X.current < oe;
693
+ if (!Ft && X.current > 0 && !A.current) {
694
+ f.current ? f.current.prompt() : dt(u);
695
+ return;
696
+ }
697
+ f.current ? f.current.idle() : vt();
698
+ return;
699
+ }
700
+ f.current ? f.current.active() : Ce(u);
701
+ }, "Je"), je = /* @__PURE__ */ n(function(u) {
702
+ if (!fe && !C.current && (C.current = E(), ne.current(null, S)), $(u, S), !A.current) {
703
+ if (N(), !p.current && ft.current.includes(u.type)) {
704
+ De(u);
705
+ return;
706
+ }
707
+ var L = E() - C.current;
708
+ if (p.current && !Te || !p.current && L >= D.current) {
709
+ De(u);
710
+ return;
711
+ }
712
+ J.current = !1, M.current = 0, F.current = 0, Z(), re && he && ht.current();
713
+ }
714
+ }, "He"), Se = v(je);
715
+ w(function() {
716
+ var u = ve.current;
717
+ u && Q(), Re > 0 ? Se.current = Ve(je, Re) : Se.current = je, u && K();
718
+ }, [Re, le, ce, Le, re, he]);
719
+ var K = /* @__PURE__ */ n(function() {
720
+ W && me.current && (ve.current || (xe.current.forEach(function(u) {
721
+ me.current.addEventListener(u, Se.current, { capture: !0, passive: !0 });
722
+ }), ve.current = !0));
723
+ }, "H"), Q = /* @__PURE__ */ n(function() {
724
+ var u = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1;
725
+ W && me.current && (ve.current || u) && (xe.current.forEach(function(L) {
726
+ me.current.removeEventListener(L, Se.current, { capture: !0 });
727
+ }), ve.current = !1);
728
+ }, "ee"), ee = g(function(u) {
729
+ return j.current ? !1 : (N(), K(), p.current = !1, A.current = !1, J.current = !1, M.current = 0, F.current = 0, f.current && !u && f.current.start(), Z(), !0);
730
+ }, [q, p, j, D, f]), Ne = g(function(u) {
731
+ return j.current ? !1 : (N(), K(), Ae.current = E(), H.current += E() - k.current, de.current += E() - k.current, H.current = 0, p.current = !1, A.current = !1, J.current = !1, M.current = 0, F.current = 0, f.current && !u && f.current.reset(), z || Z(), !0);
732
+ }, [q, p, D, z, j, f]), mt = g(function(u) {
733
+ return j.current ? !1 : (N(), K(), (p.current || A.current) && Ce(), p.current = !1, A.current = !1, J.current = !1, M.current = 0, F.current = 0, Ae.current = E(), f.current && !u && f.current.activate(), Z(), !0);
734
+ }, [q, p, A, j, D, f]), Oe = g(function() {
735
+ var u = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1;
736
+ return j.current || J.current ? !1 : (M.current = pt(), J.current = !0, Q(), N(), f.current && !u && f.current.pause(), !0);
737
+ }, [q, j, f]), _e = g(function() {
738
+ var u = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1;
739
+ return j.current || !J.current ? !1 : (J.current = !1, A.current || K(), p.current || Z(M.current), F.current && (F.current = E()), f.current && !u && f.current.resume(), !0);
740
+ }, [q, D, j, M, f]), Ct = g(function(u, L) {
741
+ return f.current ? (L && ie.current(u, S), f.current.message(u)) : L && ie.current(u, S), !0;
742
+ }, [se]), Dt = g(function() {
743
+ return p.current;
744
+ }, [p]), jt = g(function() {
745
+ return A.current;
746
+ }, [A]), Nt = g(function() {
747
+ return f.current ? f.current.isLeader : null;
748
+ }, [f]), _t = g(function() {
749
+ return f.current ? f.current.isLastActive : null;
750
+ }, [f]), Vt = g(function() {
751
+ return f.current ? f.current.token : null;
752
+ }, [f]), pt = g(function() {
753
+ if (J.current) return M.current;
754
+ var u = M.current ? M.current : X.current + D.current, L = C.current ? E() - C.current : 0, oe = Math.floor(u - L);
755
+ return oe < 0 ? 0 : Math.abs(oe);
756
+ }, [D, X, A, M, C]), gt = g(function() {
757
+ return Math.round(E() - Ae.current);
758
+ }, [Ae]), yt = g(function() {
759
+ return Math.round(E() - ct.current);
760
+ }, [ct]), Bt = g(function() {
761
+ return k.current ? new Date(k.current) : null;
762
+ }, [k]), Gt = g(function() {
763
+ return C.current ? new Date(C.current) : null;
764
+ }, [C]), Et = g(function() {
765
+ return p.current ? Math.round(E() - k.current + H.current) : Math.round(H.current);
766
+ }, [k, H]), bt = g(function() {
767
+ return p.current ? Math.round(E() - k.current + de.current) : Math.round(de.current);
768
+ }, [k, de]), Ut = g(function() {
769
+ var u = Math.round(gt() - Et());
770
+ return u >= 0 ? u : 0;
771
+ }, [k, H]), zt = g(function() {
772
+ var u = Math.round(yt() - bt());
773
+ return u >= 0 ? u : 0;
774
+ }, [k, H]);
775
+ w(function() {
776
+ if (ce > 0 && le > 0) throw new Error("❌ onAction can either be throttled or debounced, not both.");
777
+ G && Or(G);
778
+ var u = /* @__PURE__ */ n(function() {
779
+ f.current && f.current.close(), $.cancel && $.cancel(), N(), Q(!0);
780
+ }, "i");
781
+ return W && window.addEventListener("beforeunload", u), function() {
782
+ W && window.removeEventListener("beforeunload", u), f.current && f.current.close(), $.cancel && $.cancel(), N(), Q(!0);
783
+ };
784
+ }, []), w(function() {
785
+ f.current && f.current.close(), re ? f.current = new jr({ channelName: it, leaderElection: at, onPrompt: /* @__PURE__ */ n(function() {
786
+ dt();
787
+ }, "onPrompt"), onIdle: /* @__PURE__ */ n(function() {
788
+ vt();
789
+ }, "onIdle"), onActive: /* @__PURE__ */ n(function() {
790
+ Ce();
791
+ }, "onActive"), onMessage: /* @__PURE__ */ n(function(u) {
792
+ ie.current(u, S);
793
+ }, "onMessage"), start: ee, reset: Ne, activate: mt, pause: Oe, resume: _e }) : f.current = null;
794
+ }, [re, it, at, Ie, ke, ne, ie, ee, Ne, Oe, _e]), w(function() {
795
+ Y.current || (N(), Q(!0)), !(z || U) && (fe ? ee() : K());
796
+ }, [z, fe, U, Y]), w(function() {
797
+ if (!Y.current) {
798
+ var u = _(new Set(_(y).concat(_(T))).values());
799
+ if (Q(), xe.current = u, me.current = c, ft.current = T, z || U) return;
800
+ fe ? ee() : K();
801
+ }
802
+ }, [c, JSON.stringify(y), JSON.stringify(T), Y, U, z, fe]), w(function() {
803
+ Y.current && (Y.current = !1);
804
+ }, [Y]);
805
+ var S = { message: Ct, start: ee, reset: Ne, activate: mt, pause: Oe, resume: _e, isIdle: Dt, isPrompted: jt, isLeader: Nt, isLastActiveTab: _t, getTabId: Vt, getRemainingTime: pt, getElapsedTime: gt, getTotalElapsedTime: yt, getLastIdleTime: Bt, getLastActiveTime: Gt, getIdleTime: Et, getTotalIdleTime: bt, getActiveTime: Ut, getTotalActiveTime: zt, setOnPresenceChange: /* @__PURE__ */ n(function(u) {
806
+ R = u, pe.current = u;
807
+ }, "setOnPresenceChange"), setOnPrompt: /* @__PURE__ */ n(function(u) {
808
+ ye = u, Ie.current = u;
809
+ }, "setOnPrompt"), setOnIdle: /* @__PURE__ */ n(function(u) {
810
+ Ee = u, ke.current = u;
811
+ }, "setOnIdle"), setOnActive: /* @__PURE__ */ n(function(u) {
812
+ be = u, ne.current = u;
813
+ }, "setOnActive"), setOnAction: /* @__PURE__ */ n(function(u) {
814
+ we = u, Le.current = u;
815
+ }, "setOnAction"), setOnMessage: /* @__PURE__ */ n(function(u) {
816
+ se = u, ie.current = u;
817
+ }, "setOnMessage") };
818
+ return S;
819
+ }
820
+ n(Br, "Te");
821
+ var Gr = er(null);
822
+ Gr.Consumer;
823
+ const At = 6e4, Ur = 36e5, It = "/auth/login";
824
+ function zr(e) {
825
+ return Me(e) ? Math.floor(e / 1e3) : "";
826
+ }
827
+ n(zr, "millisToSeconds");
828
+ function nn({ timeout: e }) {
829
+ const t = ir(), { pathname: r } = or(), { t: i } = Fe(), { confirmInfo: o } = qt(), { resetStorage: h } = nr(), [s, a] = Ge(!1), [c, l] = Ge(null), y = v(!1), { getRemainingTime: B, reset: G } = Br({
830
+ timeout: e ?? Ur,
831
+ events: [
832
+ "mousemove",
833
+ "keydown",
834
+ "wheel",
835
+ "DOMMouseScroll",
836
+ "mousewheel",
837
+ "mousedown",
838
+ "touchstart",
839
+ "touchmove",
840
+ "MSPointerDown",
841
+ "MSPointerMove",
842
+ "visibilitychange"
843
+ ],
844
+ throttle: 500
845
+ });
846
+ w(() => {
847
+ const m = setInterval(() => {
848
+ l(B());
849
+ }, 500);
850
+ return () => {
851
+ clearInterval(m);
852
+ };
853
+ }, [B]);
854
+ const I = g(() => {
855
+ a(!1), G();
856
+ }, [G]), T = g(async () => {
857
+ y.current || (y.current = !0, l(null), a(!1), await o({
858
+ title: i("Message.로그인 페이지로 이동합니다.")
859
+ }), h(), t(It));
860
+ }, [o, t, h, i]);
861
+ return w(() => {
862
+ if (r === It) {
863
+ a(!1);
864
+ return;
865
+ }
866
+ if (!s && Me(c) && c > 0 && c <= At) {
867
+ a(!0);
868
+ return;
869
+ }
870
+ if (s && Me(c) && c > At) {
871
+ I();
872
+ return;
873
+ }
874
+ Me(c) && c <= 0 && T();
875
+ }, [s, c, r, I, T]), /* @__PURE__ */ P(
876
+ Je,
877
+ {
878
+ title: i("Title.로그인 연장"),
879
+ canConfirm: !1,
880
+ open: s,
881
+ onClose: /* @__PURE__ */ n(() => I(), "onClose"),
882
+ maxWidth: "xs",
883
+ fullWidth: !0,
884
+ children: /* @__PURE__ */ P(kt, { variant: "h6", children: i("Message.자동 로그아웃 남은 시간 안내", {
885
+ defaultValue: "{{seconds}}초 후 로그인 페이지로 이동합니다.",
886
+ seconds: zr(c)
887
+ }) })
888
+ }
889
+ );
890
+ }
891
+ n(nn, "OwpAutoLogoutDialog");
892
+ function xt(e) {
893
+ var t, r, i = "";
894
+ if (typeof e == "string" || typeof e == "number") i += e;
895
+ else if (typeof e == "object") if (Array.isArray(e)) {
896
+ var o = e.length;
897
+ for (t = 0; t < o; t++) e[t] && (r = xt(e[t])) && (i && (i += " "), i += r);
898
+ } else for (r in e) e[r] && (i && (i += " "), i += r);
899
+ return i;
900
+ }
901
+ n(xt, "r");
902
+ function Fr() {
903
+ for (var e, t, r = 0, i = "", o = arguments.length; r < o; r++) (e = arguments[r]) && (t = xt(e)) && (i && (i += " "), i += t);
904
+ return i;
905
+ }
906
+ n(Fr, "clsx");
907
+ function on(e) {
908
+ const { delay: t = 0, className: r } = e, [i, o] = Ge(!t);
909
+ return Wt(() => {
910
+ o(!0);
911
+ }, t), /* @__PURE__ */ P(
912
+ "div",
913
+ {
914
+ className: Fr(
915
+ r,
916
+ "box-border flex h-full min-h-0 w-full flex-1 flex-col items-center justify-center p-24",
917
+ i ? "" : "hidden"
918
+ ),
919
+ children: /* @__PURE__ */ P(ur, { sx: { width: "40%" }, children: /* @__PURE__ */ P(
920
+ ar,
921
+ {
922
+ color: "secondary",
923
+ sx: {
924
+ height: "4px",
925
+ borderRadius: "999px"
926
+ }
927
+ }
928
+ ) })
929
+ }
930
+ );
931
+ }
932
+ n(on, "OwpLoading");
933
+ const un = /* @__PURE__ */ n(({ loading: e, title: t }) => {
934
+ const { t: r } = Fe(), i = t ?? r("Common.로딩 중...");
935
+ return /* @__PURE__ */ Be(
936
+ sr,
937
+ {
938
+ className: "flex flex-1 flex-col space-y-12",
939
+ sx: /* @__PURE__ */ n((o) => ({ color: "#fff", zIndex: o.zIndex.tooltip + 1 }), "sx"),
940
+ open: !!e,
941
+ children: [
942
+ /* @__PURE__ */ P(cr, { color: "inherit" }),
943
+ i && /* @__PURE__ */ P(kt, { variant: "h6", children: i })
944
+ ]
945
+ }
946
+ );
947
+ }, "OwpPageLockLoading"), an = lr(/* @__PURE__ */ Yt.jsx("path", {
948
+ d: "M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"
949
+ }), "Close");
950
+ export {
951
+ an as C,
952
+ on as O,
953
+ un as a,
954
+ nn as b,
955
+ Fr as c,
956
+ Je as d,
957
+ rn as e,
958
+ Me as i
959
+ };
960
+ //# sourceMappingURL=Close-BvQGZ-9D.js.map