react-big-schedule 2.0.0 → 3.0.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.
@@ -1,15 +1,18 @@
1
- var Yt = Object.defineProperty;
2
- var qt = (b, t, e) => t in b ? Yt(b, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : b[t] = e;
3
- var M = (b, t, e) => (qt(b, typeof t != "symbol" ? t + "" : t, e), e);
4
- import st, { Component as _e, createElement as he, useState as $t } from "react";
5
- import u, { PropTypes as oe } from "prop-types";
6
- import { MinusSquareOutlined as Bt, PlusSquareOutlined as Vt, CloseOutlined as Gt, LeftOutlined as Ut, RightOutlined as Xt } from "@ant-design/icons";
7
- import { Col as ee, Row as ue, Popover as He, Radio as it, Calendar as Qt } from "antd";
8
- import { DragSource as Jt, DropTarget as Kt, DndProvider as Zt } from "react-dnd";
9
- import ke from "moment";
10
- import { rrulestr as je, RRuleSet as er } from "rrule";
11
- import { HTML5Backend as tr } from "react-dnd-html5-backend";
12
- var We = { exports: {} }, me = {};
1
+ var Qt = Object.defineProperty;
2
+ var Jt = (R, t, e) => t in R ? Qt(R, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : R[t] = e;
3
+ var P = (R, t, e) => (Jt(R, typeof t != "symbol" ? t + "" : t, e), e);
4
+ import ze, { Component as We, createElement as be, useState as ke } from "react";
5
+ import p, { PropTypes as Y } from "prop-types";
6
+ import { Row as we, Col as de, Popover as Fe, Radio as ut, Calendar as Zt, Space as it, Spin as at } from "antd";
7
+ import { DragSource as Kt, DropTarget as es, DndProvider as ts } from "react-dnd";
8
+ import { MinusSquareOutlined as ss, PlusSquareOutlined as rs, CloseOutlined as ns, LeftOutlined as is, RightOutlined as as } from "@ant-design/icons";
9
+ import { rrulestr as Ae, RRuleSet as os } from "rrule";
10
+ import { HTML5Backend as ls } from "react-dnd-html5-backend";
11
+ var _e = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
12
+ function Oe(R) {
13
+ return R && R.__esModule && Object.prototype.hasOwnProperty.call(R, "default") ? R.default : R;
14
+ }
15
+ var Ye = { exports: {} }, Se = {};
13
16
  /**
14
17
  * @license React
15
18
  * react-jsx-runtime.production.min.js
@@ -19,25 +22,25 @@ var We = { exports: {} }, me = {};
19
22
  * This source code is licensed under the MIT license found in the
20
23
  * LICENSE file in the root directory of this source tree.
21
24
  */
22
- var et;
23
- function rr() {
24
- if (et)
25
- return me;
26
- et = 1;
27
- var b = st, t = Symbol.for("react.element"), e = Symbol.for("react.fragment"), r = Object.prototype.hasOwnProperty, n = b.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, i = { key: !0, ref: !0, __self: !0, __source: !0 };
28
- function o(a, d, c) {
29
- var h, p = {}, f = null, m = null;
30
- c !== void 0 && (f = "" + c), d.key !== void 0 && (f = "" + d.key), d.ref !== void 0 && (m = d.ref);
31
- for (h in d)
32
- r.call(d, h) && !i.hasOwnProperty(h) && (p[h] = d[h]);
33
- if (a && a.defaultProps)
34
- for (h in d = a.defaultProps, d)
35
- p[h] === void 0 && (p[h] = d[h]);
36
- return { $$typeof: t, type: a, key: f, ref: m, props: p, _owner: n.current };
37
- }
38
- return me.Fragment = e, me.jsx = o, me.jsxs = o, me;
25
+ var ot;
26
+ function cs() {
27
+ if (ot)
28
+ return Se;
29
+ ot = 1;
30
+ var R = ze, t = Symbol.for("react.element"), e = Symbol.for("react.fragment"), s = Object.prototype.hasOwnProperty, r = R.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, n = { key: !0, ref: !0, __self: !0, __source: !0 };
31
+ function i(o, l, u) {
32
+ var c, f = {}, h = null, v = null;
33
+ u !== void 0 && (h = "" + u), l.key !== void 0 && (h = "" + l.key), l.ref !== void 0 && (v = l.ref);
34
+ for (c in l)
35
+ s.call(l, c) && !n.hasOwnProperty(c) && (f[c] = l[c]);
36
+ if (o && o.defaultProps)
37
+ for (c in l = o.defaultProps, l)
38
+ f[c] === void 0 && (f[c] = l[c]);
39
+ return { $$typeof: t, type: o, key: h, ref: v, props: f, _owner: r.current };
40
+ }
41
+ return Se.Fragment = e, Se.jsx = i, Se.jsxs = i, Se;
39
42
  }
40
- var ge = {};
43
+ var Re = {};
41
44
  /**
42
45
  * @license React
43
46
  * react-jsx-runtime.development.js
@@ -47,91 +50,91 @@ var ge = {};
47
50
  * This source code is licensed under the MIT license found in the
48
51
  * LICENSE file in the root directory of this source tree.
49
52
  */
50
- var tt;
51
- function nr() {
52
- return tt || (tt = 1, process.env.NODE_ENV !== "production" && function() {
53
- var b = st, t = Symbol.for("react.element"), e = Symbol.for("react.portal"), r = Symbol.for("react.fragment"), n = Symbol.for("react.strict_mode"), i = Symbol.for("react.profiler"), o = Symbol.for("react.provider"), a = Symbol.for("react.context"), d = Symbol.for("react.forward_ref"), c = Symbol.for("react.suspense"), h = Symbol.for("react.suspense_list"), p = Symbol.for("react.memo"), f = Symbol.for("react.lazy"), m = Symbol.for("react.offscreen"), E = Symbol.iterator, R = "@@iterator";
54
- function C(s) {
55
- if (s === null || typeof s != "object")
53
+ var lt;
54
+ function ds() {
55
+ return lt || (lt = 1, process.env.NODE_ENV !== "production" && function() {
56
+ var R = ze, t = Symbol.for("react.element"), e = Symbol.for("react.portal"), s = Symbol.for("react.fragment"), r = Symbol.for("react.strict_mode"), n = Symbol.for("react.profiler"), i = Symbol.for("react.provider"), o = Symbol.for("react.context"), l = Symbol.for("react.forward_ref"), u = Symbol.for("react.suspense"), c = Symbol.for("react.suspense_list"), f = Symbol.for("react.memo"), h = Symbol.for("react.lazy"), v = Symbol.for("react.offscreen"), D = Symbol.iterator, g = "@@iterator";
57
+ function w(a) {
58
+ if (a === null || typeof a != "object")
56
59
  return null;
57
- var g = E && s[E] || s[R];
58
- return typeof g == "function" ? g : null;
60
+ var E = D && a[D] || a[g];
61
+ return typeof E == "function" ? E : null;
59
62
  }
60
- var x = b.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
61
- function v(s) {
63
+ var T = R.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
64
+ function b(a) {
62
65
  {
63
- for (var g = arguments.length, y = new Array(g > 1 ? g - 1 : 0), I = 1; I < g; I++)
64
- y[I - 1] = arguments[I];
65
- k("error", s, y);
66
+ for (var E = arguments.length, I = new Array(E > 1 ? E - 1 : 0), L = 1; L < E; L++)
67
+ I[L - 1] = arguments[L];
68
+ k("error", a, I);
66
69
  }
67
70
  }
68
- function k(s, g, y) {
71
+ function k(a, E, I) {
69
72
  {
70
- var I = x.ReactDebugCurrentFrame, F = I.getStackAddendum();
71
- F !== "" && (g += "%s", y = y.concat([F]));
72
- var B = y.map(function(L) {
73
- return String(L);
73
+ var L = T.ReactDebugCurrentFrame, G = L.getStackAddendum();
74
+ G !== "" && (E += "%s", I = I.concat([G]));
75
+ var K = I.map(function(B) {
76
+ return String(B);
74
77
  });
75
- B.unshift("Warning: " + g), Function.prototype.apply.call(console[s], console, B);
78
+ K.unshift("Warning: " + E), Function.prototype.apply.call(console[a], console, K);
76
79
  }
77
80
  }
78
- var T = !1, D = !1, j = !1, N = !1, A = !1, S;
79
- S = Symbol.for("react.module.reference");
80
- function _(s) {
81
- return !!(typeof s == "string" || typeof s == "function" || s === r || s === i || A || s === n || s === c || s === h || N || s === m || T || D || j || typeof s == "object" && s !== null && (s.$$typeof === f || s.$$typeof === p || s.$$typeof === o || s.$$typeof === a || s.$$typeof === d || // This needs to include all possible module reference object
81
+ var A = !1, $ = !1, H = !1, N = !1, z = !1, W;
82
+ W = Symbol.for("react.module.reference");
83
+ function C(a) {
84
+ return !!(typeof a == "string" || typeof a == "function" || a === s || a === n || z || a === r || a === u || a === c || N || a === v || A || $ || H || typeof a == "object" && a !== null && (a.$$typeof === h || a.$$typeof === f || a.$$typeof === i || a.$$typeof === o || a.$$typeof === l || // This needs to include all possible module reference object
82
85
  // types supported by any Flight configuration anywhere since
83
86
  // we don't know which Flight build this will end up being used
84
87
  // with.
85
- s.$$typeof === S || s.getModuleId !== void 0));
88
+ a.$$typeof === W || a.getModuleId !== void 0));
86
89
  }
87
- function q(s, g, y) {
88
- var I = s.displayName;
89
- if (I)
90
- return I;
91
- var F = g.displayName || g.name || "";
92
- return F !== "" ? y + "(" + F + ")" : y;
90
+ function X(a, E, I) {
91
+ var L = a.displayName;
92
+ if (L)
93
+ return L;
94
+ var G = E.displayName || E.name || "";
95
+ return G !== "" ? I + "(" + G + ")" : I;
93
96
  }
94
- function Q(s) {
95
- return s.displayName || "Context";
97
+ function Z(a) {
98
+ return a.displayName || "Context";
96
99
  }
97
- function G(s) {
98
- if (s == null)
100
+ function S(a) {
101
+ if (a == null)
99
102
  return null;
100
- if (typeof s.tag == "number" && v("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof s == "function")
101
- return s.displayName || s.name || null;
102
- if (typeof s == "string")
103
- return s;
104
- switch (s) {
105
- case r:
103
+ if (typeof a.tag == "number" && b("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof a == "function")
104
+ return a.displayName || a.name || null;
105
+ if (typeof a == "string")
106
+ return a;
107
+ switch (a) {
108
+ case s:
106
109
  return "Fragment";
107
110
  case e:
108
111
  return "Portal";
109
- case i:
110
- return "Profiler";
111
112
  case n:
113
+ return "Profiler";
114
+ case r:
112
115
  return "StrictMode";
113
- case c:
116
+ case u:
114
117
  return "Suspense";
115
- case h:
118
+ case c:
116
119
  return "SuspenseList";
117
120
  }
118
- if (typeof s == "object")
119
- switch (s.$$typeof) {
120
- case a:
121
- var g = s;
122
- return Q(g) + ".Consumer";
121
+ if (typeof a == "object")
122
+ switch (a.$$typeof) {
123
123
  case o:
124
- var y = s;
125
- return Q(y._context) + ".Provider";
126
- case d:
127
- return q(s, s.render, "ForwardRef");
128
- case p:
129
- var I = s.displayName || null;
130
- return I !== null ? I : G(s.type) || "Memo";
131
- case f: {
132
- var F = s, B = F._payload, L = F._init;
124
+ var E = a;
125
+ return Z(E) + ".Consumer";
126
+ case i:
127
+ var I = a;
128
+ return Z(I._context) + ".Provider";
129
+ case l:
130
+ return X(a, a.render, "ForwardRef");
131
+ case f:
132
+ var L = a.displayName || null;
133
+ return L !== null ? L : S(a.type) || "Memo";
134
+ case h: {
135
+ var G = a, K = G._payload, B = G._init;
133
136
  try {
134
- return G(L(B));
137
+ return S(B(K));
135
138
  } catch {
136
139
  return null;
137
140
  }
@@ -139,1228 +142,1271 @@ function nr() {
139
142
  }
140
143
  return null;
141
144
  }
142
- var K = Object.assign, U = 0, z, Y, $, V, ne, Le, Pe;
143
- function Ae() {
145
+ var x = Object.assign, y = 0, j, m, M, _, F, Q, J;
146
+ function ee() {
144
147
  }
145
- Ae.__reactDisabledLog = !0;
146
- function vt() {
148
+ ee.__reactDisabledLog = !0;
149
+ function ae() {
147
150
  {
148
- if (U === 0) {
149
- z = console.log, Y = console.info, $ = console.warn, V = console.error, ne = console.group, Le = console.groupCollapsed, Pe = console.groupEnd;
150
- var s = {
151
+ if (y === 0) {
152
+ j = console.log, m = console.info, M = console.warn, _ = console.error, F = console.group, Q = console.groupCollapsed, J = console.groupEnd;
153
+ var a = {
151
154
  configurable: !0,
152
155
  enumerable: !0,
153
- value: Ae,
156
+ value: ee,
154
157
  writable: !0
155
158
  };
156
159
  Object.defineProperties(console, {
157
- info: s,
158
- log: s,
159
- warn: s,
160
- error: s,
161
- group: s,
162
- groupCollapsed: s,
163
- groupEnd: s
160
+ info: a,
161
+ log: a,
162
+ warn: a,
163
+ error: a,
164
+ group: a,
165
+ groupCollapsed: a,
166
+ groupEnd: a
164
167
  });
165
168
  }
166
- U++;
169
+ y++;
167
170
  }
168
171
  }
169
- function Et() {
172
+ function ne() {
170
173
  {
171
- if (U--, U === 0) {
172
- var s = {
174
+ if (y--, y === 0) {
175
+ var a = {
173
176
  configurable: !0,
174
177
  enumerable: !0,
175
178
  writable: !0
176
179
  };
177
180
  Object.defineProperties(console, {
178
- log: K({}, s, {
179
- value: z
181
+ log: x({}, a, {
182
+ value: j
180
183
  }),
181
- info: K({}, s, {
182
- value: Y
184
+ info: x({}, a, {
185
+ value: m
183
186
  }),
184
- warn: K({}, s, {
185
- value: $
187
+ warn: x({}, a, {
188
+ value: M
186
189
  }),
187
- error: K({}, s, {
188
- value: V
190
+ error: x({}, a, {
191
+ value: _
189
192
  }),
190
- group: K({}, s, {
191
- value: ne
193
+ group: x({}, a, {
194
+ value: F
192
195
  }),
193
- groupCollapsed: K({}, s, {
194
- value: Le
196
+ groupCollapsed: x({}, a, {
197
+ value: Q
195
198
  }),
196
- groupEnd: K({}, s, {
197
- value: Pe
199
+ groupEnd: x({}, a, {
200
+ value: J
198
201
  })
199
202
  });
200
203
  }
201
- U < 0 && v("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
204
+ y < 0 && b("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
202
205
  }
203
206
  }
204
- var Ce = x.ReactCurrentDispatcher, Re;
205
- function ve(s, g, y) {
207
+ var le = T.ReactCurrentDispatcher, he;
208
+ function ue(a, E, I) {
206
209
  {
207
- if (Re === void 0)
210
+ if (he === void 0)
208
211
  try {
209
212
  throw Error();
210
- } catch (F) {
211
- var I = F.stack.trim().match(/\n( *(at )?)/);
212
- Re = I && I[1] || "";
213
+ } catch (G) {
214
+ var L = G.stack.trim().match(/\n( *(at )?)/);
215
+ he = L && L[1] || "";
213
216
  }
214
217
  return `
215
- ` + Re + s;
218
+ ` + he + a;
216
219
  }
217
220
  }
218
- var Se = !1, Ee;
221
+ var re = !1, oe;
219
222
  {
220
- var bt = typeof WeakMap == "function" ? WeakMap : Map;
221
- Ee = new bt();
223
+ var xe = typeof WeakMap == "function" ? WeakMap : Map;
224
+ oe = new xe();
222
225
  }
223
- function ze(s, g) {
224
- if (!s || Se)
226
+ function De(a, E) {
227
+ if (!a || re)
225
228
  return "";
226
229
  {
227
- var y = Ee.get(s);
228
- if (y !== void 0)
229
- return y;
230
+ var I = oe.get(a);
231
+ if (I !== void 0)
232
+ return I;
230
233
  }
231
- var I;
232
- Se = !0;
233
- var F = Error.prepareStackTrace;
234
+ var L;
235
+ re = !0;
236
+ var G = Error.prepareStackTrace;
234
237
  Error.prepareStackTrace = void 0;
235
- var B;
236
- B = Ce.current, Ce.current = null, vt();
238
+ var K;
239
+ K = le.current, le.current = null, ae();
237
240
  try {
238
- if (g) {
239
- var L = function() {
241
+ if (E) {
242
+ var B = function() {
240
243
  throw Error();
241
244
  };
242
- if (Object.defineProperty(L.prototype, "props", {
245
+ if (Object.defineProperty(B.prototype, "props", {
243
246
  set: function() {
244
247
  throw Error();
245
248
  }
246
249
  }), typeof Reflect == "object" && Reflect.construct) {
247
250
  try {
248
- Reflect.construct(L, []);
249
- } catch (se) {
250
- I = se;
251
+ Reflect.construct(B, []);
252
+ } catch (fe) {
253
+ L = fe;
251
254
  }
252
- Reflect.construct(s, [], L);
255
+ Reflect.construct(a, [], B);
253
256
  } else {
254
257
  try {
255
- L.call();
256
- } catch (se) {
257
- I = se;
258
+ B.call();
259
+ } catch (fe) {
260
+ L = fe;
258
261
  }
259
- s.call(L.prototype);
262
+ a.call(B.prototype);
260
263
  }
261
264
  } else {
262
265
  try {
263
266
  throw Error();
264
- } catch (se) {
265
- I = se;
267
+ } catch (fe) {
268
+ L = fe;
266
269
  }
267
- s();
270
+ a();
268
271
  }
269
- } catch (se) {
270
- if (se && I && typeof se.stack == "string") {
271
- for (var H = se.stack.split(`
272
- `), Z = I.stack.split(`
273
- `), X = H.length - 1, J = Z.length - 1; X >= 1 && J >= 0 && H[X] !== Z[J]; )
274
- J--;
275
- for (; X >= 1 && J >= 0; X--, J--)
276
- if (H[X] !== Z[J]) {
277
- if (X !== 1 || J !== 1)
272
+ } catch (fe) {
273
+ if (fe && L && typeof fe.stack == "string") {
274
+ for (var q = fe.stack.split(`
275
+ `), ie = L.stack.split(`
276
+ `), te = q.length - 1, se = ie.length - 1; te >= 1 && se >= 0 && q[te] !== ie[se]; )
277
+ se--;
278
+ for (; te >= 1 && se >= 0; te--, se--)
279
+ if (q[te] !== ie[se]) {
280
+ if (te !== 1 || se !== 1)
278
281
  do
279
- if (X--, J--, J < 0 || H[X] !== Z[J]) {
280
- var te = `
281
- ` + H[X].replace(" at new ", " at ");
282
- return s.displayName && te.includes("<anonymous>") && (te = te.replace("<anonymous>", s.displayName)), typeof s == "function" && Ee.set(s, te), te;
282
+ if (te--, se--, se < 0 || q[te] !== ie[se]) {
283
+ var ce = `
284
+ ` + q[te].replace(" at new ", " at ");
285
+ return a.displayName && ce.includes("<anonymous>") && (ce = ce.replace("<anonymous>", a.displayName)), typeof a == "function" && oe.set(a, ce), ce;
283
286
  }
284
- while (X >= 1 && J >= 0);
287
+ while (te >= 1 && se >= 0);
285
288
  break;
286
289
  }
287
290
  }
288
291
  } finally {
289
- Se = !1, Ce.current = B, Et(), Error.prepareStackTrace = F;
292
+ re = !1, le.current = K, ne(), Error.prepareStackTrace = G;
290
293
  }
291
- var ce = s ? s.displayName || s.name : "", Ze = ce ? ve(ce) : "";
292
- return typeof s == "function" && Ee.set(s, Ze), Ze;
294
+ var Ee = a ? a.displayName || a.name : "", nt = Ee ? ue(Ee) : "";
295
+ return typeof a == "function" && oe.set(a, nt), nt;
293
296
  }
294
- function yt(s, g, y) {
295
- return ze(s, !1);
297
+ function jt(a, E, I) {
298
+ return De(a, !1);
296
299
  }
297
- function xt(s) {
298
- var g = s.prototype;
299
- return !!(g && g.isReactComponent);
300
+ function It(a) {
301
+ var E = a.prototype;
302
+ return !!(E && E.isReactComponent);
300
303
  }
301
- function be(s, g, y) {
302
- if (s == null)
304
+ function je(a, E, I) {
305
+ if (a == null)
303
306
  return "";
304
- if (typeof s == "function")
305
- return ze(s, xt(s));
306
- if (typeof s == "string")
307
- return ve(s);
308
- switch (s) {
307
+ if (typeof a == "function")
308
+ return De(a, It(a));
309
+ if (typeof a == "string")
310
+ return ue(a);
311
+ switch (a) {
312
+ case u:
313
+ return ue("Suspense");
309
314
  case c:
310
- return ve("Suspense");
311
- case h:
312
- return ve("SuspenseList");
315
+ return ue("SuspenseList");
313
316
  }
314
- if (typeof s == "object")
315
- switch (s.$$typeof) {
316
- case d:
317
- return yt(s.render);
318
- case p:
319
- return be(s.type, g, y);
320
- case f: {
321
- var I = s, F = I._payload, B = I._init;
317
+ if (typeof a == "object")
318
+ switch (a.$$typeof) {
319
+ case l:
320
+ return jt(a.render);
321
+ case f:
322
+ return je(a.type, E, I);
323
+ case h: {
324
+ var L = a, G = L._payload, K = L._init;
322
325
  try {
323
- return be(B(F), g, y);
326
+ return je(K(G), E, I);
324
327
  } catch {
325
328
  }
326
329
  }
327
330
  }
328
331
  return "";
329
332
  }
330
- var ye = Object.prototype.hasOwnProperty, Fe = {}, Ye = x.ReactDebugCurrentFrame;
331
- function xe(s) {
332
- if (s) {
333
- var g = s._owner, y = be(s.type, s._source, g ? g.type : null);
334
- Ye.setExtraStackFrame(y);
333
+ var Ie = Object.prototype.hasOwnProperty, Ve = {}, Ue = T.ReactDebugCurrentFrame;
334
+ function Me(a) {
335
+ if (a) {
336
+ var E = a._owner, I = je(a.type, a._source, E ? E.type : null);
337
+ Ue.setExtraStackFrame(I);
335
338
  } else
336
- Ye.setExtraStackFrame(null);
339
+ Ue.setExtraStackFrame(null);
337
340
  }
338
- function Ct(s, g, y, I, F) {
341
+ function Mt(a, E, I, L, G) {
339
342
  {
340
- var B = Function.call.bind(ye);
341
- for (var L in s)
342
- if (B(s, L)) {
343
- var H = void 0;
343
+ var K = Function.call.bind(Ie);
344
+ for (var B in a)
345
+ if (K(a, B)) {
346
+ var q = void 0;
344
347
  try {
345
- if (typeof s[L] != "function") {
346
- var Z = Error((I || "React class") + ": " + y + " type `" + L + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof s[L] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
347
- throw Z.name = "Invariant Violation", Z;
348
+ if (typeof a[B] != "function") {
349
+ var ie = Error((L || "React class") + ": " + I + " type `" + B + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof a[B] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
350
+ throw ie.name = "Invariant Violation", ie;
348
351
  }
349
- H = s[L](g, L, I, y, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
350
- } catch (X) {
351
- H = X;
352
+ q = a[B](E, B, L, I, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
353
+ } catch (te) {
354
+ q = te;
352
355
  }
353
- H && !(H instanceof Error) && (xe(F), v("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", I || "React class", y, L, typeof H), xe(null)), H instanceof Error && !(H.message in Fe) && (Fe[H.message] = !0, xe(F), v("Failed %s type: %s", y, H.message), xe(null));
356
+ q && !(q instanceof Error) && (Me(G), b("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", L || "React class", I, B, typeof q), Me(null)), q instanceof Error && !(q.message in Ve) && (Ve[q.message] = !0, Me(G), b("Failed %s type: %s", I, q.message), Me(null));
354
357
  }
355
358
  }
356
359
  }
357
- var Rt = Array.isArray;
358
- function we(s) {
359
- return Rt(s);
360
+ var kt = Array.isArray;
361
+ function He(a) {
362
+ return kt(a);
360
363
  }
361
- function St(s) {
364
+ function Wt(a) {
362
365
  {
363
- var g = typeof Symbol == "function" && Symbol.toStringTag, y = g && s[Symbol.toStringTag] || s.constructor.name || "Object";
364
- return y;
366
+ var E = typeof Symbol == "function" && Symbol.toStringTag, I = E && a[Symbol.toStringTag] || a.constructor.name || "Object";
367
+ return I;
365
368
  }
366
369
  }
367
- function wt(s) {
370
+ function _t(a) {
368
371
  try {
369
- return qe(s), !1;
372
+ return Xe(a), !1;
370
373
  } catch {
371
374
  return !0;
372
375
  }
373
376
  }
374
- function qe(s) {
375
- return "" + s;
377
+ function Xe(a) {
378
+ return "" + a;
376
379
  }
377
- function $e(s) {
378
- if (wt(s))
379
- return v("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", St(s)), qe(s);
380
+ function Ge(a) {
381
+ if (_t(a))
382
+ return b("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Wt(a)), Xe(a);
380
383
  }
381
- var fe = x.ReactCurrentOwner, Dt = {
384
+ var Ce = T.ReactCurrentOwner, Ot = {
382
385
  key: !0,
383
386
  ref: !0,
384
387
  __self: !0,
385
388
  __source: !0
386
- }, Be, Ve, De;
387
- De = {};
388
- function Tt(s) {
389
- if (ye.call(s, "ref")) {
390
- var g = Object.getOwnPropertyDescriptor(s, "ref").get;
391
- if (g && g.isReactWarning)
389
+ }, Qe, Je, $e;
390
+ $e = {};
391
+ function Ht(a) {
392
+ if (Ie.call(a, "ref")) {
393
+ var E = Object.getOwnPropertyDescriptor(a, "ref").get;
394
+ if (E && E.isReactWarning)
392
395
  return !1;
393
396
  }
394
- return s.ref !== void 0;
397
+ return a.ref !== void 0;
395
398
  }
396
- function Mt(s) {
397
- if (ye.call(s, "key")) {
398
- var g = Object.getOwnPropertyDescriptor(s, "key").get;
399
- if (g && g.isReactWarning)
399
+ function $t(a) {
400
+ if (Ie.call(a, "key")) {
401
+ var E = Object.getOwnPropertyDescriptor(a, "key").get;
402
+ if (E && E.isReactWarning)
400
403
  return !1;
401
404
  }
402
- return s.key !== void 0;
405
+ return a.key !== void 0;
403
406
  }
404
- function It(s, g) {
405
- if (typeof s.ref == "string" && fe.current && g && fe.current.stateNode !== g) {
406
- var y = G(fe.current.type);
407
- De[y] || (v('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', G(fe.current.type), s.ref), De[y] = !0);
407
+ function Pt(a, E) {
408
+ if (typeof a.ref == "string" && Ce.current && E && Ce.current.stateNode !== E) {
409
+ var I = S(Ce.current.type);
410
+ $e[I] || (b('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', S(Ce.current.type), a.ref), $e[I] = !0);
408
411
  }
409
412
  }
410
- function kt(s, g) {
413
+ function Lt(a, E) {
411
414
  {
412
- var y = function() {
413
- Be || (Be = !0, v("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", g));
415
+ var I = function() {
416
+ Qe || (Qe = !0, b("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", E));
414
417
  };
415
- y.isReactWarning = !0, Object.defineProperty(s, "key", {
416
- get: y,
418
+ I.isReactWarning = !0, Object.defineProperty(a, "key", {
419
+ get: I,
417
420
  configurable: !0
418
421
  });
419
422
  }
420
423
  }
421
- function jt(s, g) {
424
+ function Nt(a, E) {
422
425
  {
423
- var y = function() {
424
- Ve || (Ve = !0, v("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", g));
426
+ var I = function() {
427
+ Je || (Je = !0, b("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", E));
425
428
  };
426
- y.isReactWarning = !0, Object.defineProperty(s, "ref", {
427
- get: y,
429
+ I.isReactWarning = !0, Object.defineProperty(a, "ref", {
430
+ get: I,
428
431
  configurable: !0
429
432
  });
430
433
  }
431
434
  }
432
- var Wt = function(s, g, y, I, F, B, L) {
433
- var H = {
435
+ var At = function(a, E, I, L, G, K, B) {
436
+ var q = {
434
437
  // This tag allows us to uniquely identify this as a React Element
435
438
  $$typeof: t,
436
439
  // Built-in properties that belong on the element
437
- type: s,
438
- key: g,
439
- ref: y,
440
- props: L,
440
+ type: a,
441
+ key: E,
442
+ ref: I,
443
+ props: B,
441
444
  // Record the component responsible for creating this element.
442
- _owner: B
445
+ _owner: K
443
446
  };
444
- return H._store = {}, Object.defineProperty(H._store, "validated", {
447
+ return q._store = {}, Object.defineProperty(q._store, "validated", {
445
448
  configurable: !1,
446
449
  enumerable: !1,
447
450
  writable: !0,
448
451
  value: !1
449
- }), Object.defineProperty(H, "_self", {
452
+ }), Object.defineProperty(q, "_self", {
450
453
  configurable: !1,
451
454
  enumerable: !1,
452
455
  writable: !1,
453
- value: I
454
- }), Object.defineProperty(H, "_source", {
456
+ value: L
457
+ }), Object.defineProperty(q, "_source", {
455
458
  configurable: !1,
456
459
  enumerable: !1,
457
460
  writable: !1,
458
- value: F
459
- }), Object.freeze && (Object.freeze(H.props), Object.freeze(H)), H;
461
+ value: G
462
+ }), Object.freeze && (Object.freeze(q.props), Object.freeze(q)), q;
460
463
  };
461
- function _t(s, g, y, I, F) {
464
+ function Yt(a, E, I, L, G) {
462
465
  {
463
- var B, L = {}, H = null, Z = null;
464
- y !== void 0 && ($e(y), H = "" + y), Mt(g) && ($e(g.key), H = "" + g.key), Tt(g) && (Z = g.ref, It(g, F));
465
- for (B in g)
466
- ye.call(g, B) && !Dt.hasOwnProperty(B) && (L[B] = g[B]);
467
- if (s && s.defaultProps) {
468
- var X = s.defaultProps;
469
- for (B in X)
470
- L[B] === void 0 && (L[B] = X[B]);
466
+ var K, B = {}, q = null, ie = null;
467
+ I !== void 0 && (Ge(I), q = "" + I), $t(E) && (Ge(E.key), q = "" + E.key), Ht(E) && (ie = E.ref, Pt(E, G));
468
+ for (K in E)
469
+ Ie.call(E, K) && !Ot.hasOwnProperty(K) && (B[K] = E[K]);
470
+ if (a && a.defaultProps) {
471
+ var te = a.defaultProps;
472
+ for (K in te)
473
+ B[K] === void 0 && (B[K] = te[K]);
471
474
  }
472
- if (H || Z) {
473
- var J = typeof s == "function" ? s.displayName || s.name || "Unknown" : s;
474
- H && kt(L, J), Z && jt(L, J);
475
+ if (q || ie) {
476
+ var se = typeof a == "function" ? a.displayName || a.name || "Unknown" : a;
477
+ q && Lt(B, se), ie && Nt(B, se);
475
478
  }
476
- return Wt(s, H, Z, F, I, fe.current, L);
479
+ return At(a, q, ie, G, L, Ce.current, B);
477
480
  }
478
481
  }
479
- var Te = x.ReactCurrentOwner, Ge = x.ReactDebugCurrentFrame;
480
- function de(s) {
481
- if (s) {
482
- var g = s._owner, y = be(s.type, s._source, g ? g.type : null);
483
- Ge.setExtraStackFrame(y);
482
+ var Pe = T.ReactCurrentOwner, Ze = T.ReactDebugCurrentFrame;
483
+ function ye(a) {
484
+ if (a) {
485
+ var E = a._owner, I = je(a.type, a._source, E ? E.type : null);
486
+ Ze.setExtraStackFrame(I);
484
487
  } else
485
- Ge.setExtraStackFrame(null);
488
+ Ze.setExtraStackFrame(null);
486
489
  }
487
- var Me;
488
- Me = !1;
489
- function Ie(s) {
490
- return typeof s == "object" && s !== null && s.$$typeof === t;
490
+ var Le;
491
+ Le = !1;
492
+ function Ne(a) {
493
+ return typeof a == "object" && a !== null && a.$$typeof === t;
491
494
  }
492
- function Ue() {
495
+ function Ke() {
493
496
  {
494
- if (Te.current) {
495
- var s = G(Te.current.type);
496
- if (s)
497
+ if (Pe.current) {
498
+ var a = S(Pe.current.type);
499
+ if (a)
497
500
  return `
498
501
 
499
- Check the render method of \`` + s + "`.";
502
+ Check the render method of \`` + a + "`.";
500
503
  }
501
504
  return "";
502
505
  }
503
506
  }
504
- function Ht(s) {
507
+ function zt(a) {
505
508
  {
506
- if (s !== void 0) {
507
- var g = s.fileName.replace(/^.*[\\\/]/, ""), y = s.lineNumber;
509
+ if (a !== void 0) {
510
+ var E = a.fileName.replace(/^.*[\\\/]/, ""), I = a.lineNumber;
508
511
  return `
509
512
 
510
- Check your code at ` + g + ":" + y + ".";
513
+ Check your code at ` + E + ":" + I + ".";
511
514
  }
512
515
  return "";
513
516
  }
514
517
  }
515
- var Xe = {};
516
- function Ot(s) {
518
+ var et = {};
519
+ function Ft(a) {
517
520
  {
518
- var g = Ue();
519
- if (!g) {
520
- var y = typeof s == "string" ? s : s.displayName || s.name;
521
- y && (g = `
521
+ var E = Ke();
522
+ if (!E) {
523
+ var I = typeof a == "string" ? a : a.displayName || a.name;
524
+ I && (E = `
522
525
 
523
- Check the top-level render call using <` + y + ">.");
526
+ Check the top-level render call using <` + I + ">.");
524
527
  }
525
- return g;
528
+ return E;
526
529
  }
527
530
  }
528
- function Qe(s, g) {
531
+ function tt(a, E) {
529
532
  {
530
- if (!s._store || s._store.validated || s.key != null)
533
+ if (!a._store || a._store.validated || a.key != null)
531
534
  return;
532
- s._store.validated = !0;
533
- var y = Ot(g);
534
- if (Xe[y])
535
+ a._store.validated = !0;
536
+ var I = Ft(E);
537
+ if (et[I])
535
538
  return;
536
- Xe[y] = !0;
537
- var I = "";
538
- s && s._owner && s._owner !== Te.current && (I = " It was passed a child from " + G(s._owner.type) + "."), de(s), v('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', y, I), de(null);
539
+ et[I] = !0;
540
+ var L = "";
541
+ a && a._owner && a._owner !== Pe.current && (L = " It was passed a child from " + S(a._owner.type) + "."), ye(a), b('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', I, L), ye(null);
539
542
  }
540
543
  }
541
- function Je(s, g) {
544
+ function st(a, E) {
542
545
  {
543
- if (typeof s != "object")
546
+ if (typeof a != "object")
544
547
  return;
545
- if (we(s))
546
- for (var y = 0; y < s.length; y++) {
547
- var I = s[y];
548
- Ie(I) && Qe(I, g);
548
+ if (He(a))
549
+ for (var I = 0; I < a.length; I++) {
550
+ var L = a[I];
551
+ Ne(L) && tt(L, E);
549
552
  }
550
- else if (Ie(s))
551
- s._store && (s._store.validated = !0);
552
- else if (s) {
553
- var F = C(s);
554
- if (typeof F == "function" && F !== s.entries)
555
- for (var B = F.call(s), L; !(L = B.next()).done; )
556
- Ie(L.value) && Qe(L.value, g);
553
+ else if (Ne(a))
554
+ a._store && (a._store.validated = !0);
555
+ else if (a) {
556
+ var G = w(a);
557
+ if (typeof G == "function" && G !== a.entries)
558
+ for (var K = G.call(a), B; !(B = K.next()).done; )
559
+ Ne(B.value) && tt(B.value, E);
557
560
  }
558
561
  }
559
562
  }
560
- function Nt(s) {
563
+ function qt(a) {
561
564
  {
562
- var g = s.type;
563
- if (g == null || typeof g == "string")
565
+ var E = a.type;
566
+ if (E == null || typeof E == "string")
564
567
  return;
565
- var y;
566
- if (typeof g == "function")
567
- y = g.propTypes;
568
- else if (typeof g == "object" && (g.$$typeof === d || // Note: Memo only checks outer props here.
568
+ var I;
569
+ if (typeof E == "function")
570
+ I = E.propTypes;
571
+ else if (typeof E == "object" && (E.$$typeof === l || // Note: Memo only checks outer props here.
569
572
  // Inner props are checked in the reconciler.
570
- g.$$typeof === p))
571
- y = g.propTypes;
573
+ E.$$typeof === f))
574
+ I = E.propTypes;
572
575
  else
573
576
  return;
574
- if (y) {
575
- var I = G(g);
576
- Ct(y, s.props, "prop", I, s);
577
- } else if (g.PropTypes !== void 0 && !Me) {
578
- Me = !0;
579
- var F = G(g);
580
- v("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", F || "Unknown");
577
+ if (I) {
578
+ var L = S(E);
579
+ Mt(I, a.props, "prop", L, a);
580
+ } else if (E.PropTypes !== void 0 && !Le) {
581
+ Le = !0;
582
+ var G = S(E);
583
+ b("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", G || "Unknown");
581
584
  }
582
- typeof g.getDefaultProps == "function" && !g.getDefaultProps.isReactClassApproved && v("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
585
+ typeof E.getDefaultProps == "function" && !E.getDefaultProps.isReactClassApproved && b("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
583
586
  }
584
587
  }
585
- function Lt(s) {
588
+ function Bt(a) {
586
589
  {
587
- for (var g = Object.keys(s.props), y = 0; y < g.length; y++) {
588
- var I = g[y];
589
- if (I !== "children" && I !== "key") {
590
- de(s), v("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", I), de(null);
590
+ for (var E = Object.keys(a.props), I = 0; I < E.length; I++) {
591
+ var L = E[I];
592
+ if (L !== "children" && L !== "key") {
593
+ ye(a), b("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", L), ye(null);
591
594
  break;
592
595
  }
593
596
  }
594
- s.ref !== null && (de(s), v("Invalid attribute `ref` supplied to `React.Fragment`."), de(null));
597
+ a.ref !== null && (ye(a), b("Invalid attribute `ref` supplied to `React.Fragment`."), ye(null));
595
598
  }
596
599
  }
597
- function Ke(s, g, y, I, F, B) {
600
+ function rt(a, E, I, L, G, K) {
598
601
  {
599
- var L = _(s);
600
- if (!L) {
601
- var H = "";
602
- (s === void 0 || typeof s == "object" && s !== null && Object.keys(s).length === 0) && (H += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
603
- var Z = Ht(F);
604
- Z ? H += Z : H += Ue();
605
- var X;
606
- s === null ? X = "null" : we(s) ? X = "array" : s !== void 0 && s.$$typeof === t ? (X = "<" + (G(s.type) || "Unknown") + " />", H = " Did you accidentally export a JSX literal instead of a component?") : X = typeof s, v("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", X, H);
602
+ var B = C(a);
603
+ if (!B) {
604
+ var q = "";
605
+ (a === void 0 || typeof a == "object" && a !== null && Object.keys(a).length === 0) && (q += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
606
+ var ie = zt(G);
607
+ ie ? q += ie : q += Ke();
608
+ var te;
609
+ a === null ? te = "null" : He(a) ? te = "array" : a !== void 0 && a.$$typeof === t ? (te = "<" + (S(a.type) || "Unknown") + " />", q = " Did you accidentally export a JSX literal instead of a component?") : te = typeof a, b("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", te, q);
607
610
  }
608
- var J = _t(s, g, y, F, B);
609
- if (J == null)
610
- return J;
611
- if (L) {
612
- var te = g.children;
613
- if (te !== void 0)
614
- if (I)
615
- if (we(te)) {
616
- for (var ce = 0; ce < te.length; ce++)
617
- Je(te[ce], s);
618
- Object.freeze && Object.freeze(te);
611
+ var se = Yt(a, E, I, G, K);
612
+ if (se == null)
613
+ return se;
614
+ if (B) {
615
+ var ce = E.children;
616
+ if (ce !== void 0)
617
+ if (L)
618
+ if (He(ce)) {
619
+ for (var Ee = 0; Ee < ce.length; Ee++)
620
+ st(ce[Ee], a);
621
+ Object.freeze && Object.freeze(ce);
619
622
  } else
620
- v("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
623
+ b("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
621
624
  else
622
- Je(te, s);
625
+ st(ce, a);
623
626
  }
624
- return s === r ? Lt(J) : Nt(J), J;
627
+ return a === s ? Bt(se) : qt(se), se;
625
628
  }
626
629
  }
627
- function Pt(s, g, y) {
628
- return Ke(s, g, y, !0);
630
+ function Vt(a, E, I) {
631
+ return rt(a, E, I, !0);
629
632
  }
630
- function At(s, g, y) {
631
- return Ke(s, g, y, !1);
633
+ function Ut(a, E, I) {
634
+ return rt(a, E, I, !1);
632
635
  }
633
- var zt = At, Ft = Pt;
634
- ge.Fragment = r, ge.jsx = zt, ge.jsxs = Ft;
635
- }()), ge;
636
+ var Xt = Ut, Gt = Vt;
637
+ Re.Fragment = s, Re.jsx = Xt, Re.jsxs = Gt;
638
+ }()), Re;
636
639
  }
637
- process.env.NODE_ENV === "production" ? We.exports = rr() : We.exports = nr();
638
- var l = We.exports;
639
- function Oe({
640
- schedulerData: b,
640
+ process.env.NODE_ENV === "production" ? Ye.exports = cs() : Ye.exports = ds();
641
+ var d = Ye.exports;
642
+ const qe = ({
643
+ schedulerData: R,
641
644
  eventItem: t,
642
645
  title: e,
643
- startTime: r,
644
- endTime: n,
645
- statusColor: i,
646
- subtitleGetter: o,
647
- viewEventClick: a,
648
- viewEventText: d,
649
- viewEvent2Click: c,
650
- viewEvent2Text: h,
651
- eventItemPopoverTemplateResolver: p
652
- }) {
653
- const { localeMoment: f, config: m } = b, E = f(r), R = f(n);
654
- if (p != null)
655
- return p(b, t, e, E, R, i);
656
- let C = /* @__PURE__ */ l.jsx("div", {});
657
- if (o !== void 0) {
658
- let D = o(b, t);
659
- D != null && (C = /* @__PURE__ */ l.jsxs(ue, { align: "middle", children: [
660
- /* @__PURE__ */ l.jsx(ee, { span: 2, children: /* @__PURE__ */ l.jsx("div", {}) }),
661
- /* @__PURE__ */ l.jsx(ee, { span: 22, className: "overflow-text", children: /* @__PURE__ */ l.jsx("span", { className: "header2-text", title: D, children: D }) })
662
- ] }));
663
- }
664
- let x = /* @__PURE__ */ l.jsx("div", {});
665
- if (d !== void 0 && a !== void 0 && (t.clickable1 == null || t.clickable1)) {
666
- let D = /* @__PURE__ */ l.jsx(ee, { span: 22, children: /* @__PURE__ */ l.jsx("span", { className: "header2-text", style: { color: "#108EE9", cursor: "pointer" }, onClick: () => a(b, t), children: d }) });
667
- h !== void 0 && c !== void 0 && (t.clickable2 == null || t.clickable2) && (D = /* @__PURE__ */ l.jsxs(ee, { span: 22, children: [
668
- /* @__PURE__ */ l.jsx("span", { className: "header2-text", style: { color: "#108EE9", cursor: "pointer" }, onClick: () => a(b, t), children: d }),
669
- /* @__PURE__ */ l.jsx("span", { className: "header2-text", style: { color: "#108EE9", cursor: "pointer", marginLeft: "16px" }, onClick: () => c(b, t), children: h })
670
- ] })), x = /* @__PURE__ */ l.jsxs(ue, { align: "middle", children: [
671
- /* @__PURE__ */ l.jsx(ee, { span: 2, children: /* @__PURE__ */ l.jsx("div", {}) }),
672
- D
673
- ] });
674
- } else if (h !== void 0 && c !== void 0 && (t.clickable2 == null || t.clickable2)) {
675
- let D = /* @__PURE__ */ l.jsx(ee, { span: 22, children: /* @__PURE__ */ l.jsx("span", { className: "header2-text", style: { color: "#108EE9", cursor: "pointer" }, onClick: () => c(b, t), children: h }) });
676
- x = /* @__PURE__ */ l.jsxs(ue, { align: "middle", children: [
677
- /* @__PURE__ */ l.jsx(ee, { span: 2, children: /* @__PURE__ */ l.jsx("div", {}) }),
678
- D
679
- ] });
680
- }
681
- const v = m.eventItemPopoverDateFormat, k = m.eventItemPopoverShowColor ? /* @__PURE__ */ l.jsx(ee, { span: 2, children: /* @__PURE__ */ l.jsx("div", { className: "status-dot", style: { backgroundColor: i } }) }) : /* @__PURE__ */ l.jsx(l.Fragment, {}), T = /* @__PURE__ */ l.jsxs(ee, { span: 22, children: [
682
- /* @__PURE__ */ l.jsx("span", { className: "header1-text", children: E.format("HH:mm") }),
683
- v && /* @__PURE__ */ l.jsx("span", { className: "help-text", style: { marginLeft: "8px" }, children: E.format(v) }),
684
- /* @__PURE__ */ l.jsx("span", { className: "header2-text", style: { marginLeft: "8px" }, children: "-" }),
685
- /* @__PURE__ */ l.jsx("span", { className: "header1-text", style: { marginLeft: "8px" }, children: R.format("HH:mm") }),
686
- v && /* @__PURE__ */ l.jsx("span", { className: "help-text", style: { marginLeft: "8px" }, children: R.format(v) })
687
- ] });
688
- return /* @__PURE__ */ l.jsxs("div", { style: { width: "300px" }, children: [
689
- /* @__PURE__ */ l.jsxs(ue, { align: "middle", children: [
690
- k,
691
- /* @__PURE__ */ l.jsx(ee, { span: 22, className: "overflow-text", children: /* @__PURE__ */ l.jsx("span", { className: "header2-text", title: e, children: e }) })
646
+ startTime: s,
647
+ endTime: r,
648
+ statusColor: n,
649
+ subtitleGetter: i,
650
+ viewEventClick: o,
651
+ viewEventText: l,
652
+ viewEvent2Click: u,
653
+ viewEvent2Text: c,
654
+ eventItemPopoverTemplateResolver: f
655
+ }) => {
656
+ const { localeDayjs: h, config: v } = R, D = h(new Date(s)), g = h(new Date(r));
657
+ if (f)
658
+ return f(R, t, e, D, g, n);
659
+ const w = i ? i(R, t) : null, T = l && o && (t.clickable1 === void 0 || t.clickable1), b = c && u && (t.clickable2 === void 0 || t.clickable2), k = () => /* @__PURE__ */ d.jsx("span", { className: "header2-text", style: { color: "#108EE9", cursor: "pointer" }, onClick: () => o(R, t), children: l }), A = () => /* @__PURE__ */ d.jsx("span", { className: "header2-text", style: { color: "#108EE9", cursor: "pointer", marginLeft: "16px" }, onClick: () => u(R, t), children: c });
660
+ return /* @__PURE__ */ d.jsxs("div", { style: { width: v.eventItemPopoverWidth }, children: [
661
+ /* @__PURE__ */ d.jsxs(we, { type: "flex", align: "middle", children: [
662
+ v.eventItemPopoverShowColor && /* @__PURE__ */ d.jsx(de, { span: 2, children: /* @__PURE__ */ d.jsx("div", { className: "status-dot", style: { backgroundColor: n } }) }),
663
+ /* @__PURE__ */ d.jsx(de, { span: 22, className: "overflow-text", children: /* @__PURE__ */ d.jsx("span", { className: "header2-text", title: e, children: `${e}` }) })
692
664
  ] }),
693
- C,
694
- /* @__PURE__ */ l.jsxs(ue, { align: "middle", children: [
695
- /* @__PURE__ */ l.jsx(ee, { span: 2, children: /* @__PURE__ */ l.jsx("div", {}) }),
696
- T
665
+ w && /* @__PURE__ */ d.jsxs(we, { type: "flex", align: "middle", children: [
666
+ /* @__PURE__ */ d.jsx(de, { span: 2, children: /* @__PURE__ */ d.jsx("div", {}) }),
667
+ /* @__PURE__ */ d.jsx(de, { span: 22, className: "overflow-text", children: /* @__PURE__ */ d.jsx("span", { className: "header2-text", title: w, children: w }) })
697
668
  ] }),
698
- x
669
+ /* @__PURE__ */ d.jsxs(we, { type: "flex", align: "middle", children: [
670
+ /* @__PURE__ */ d.jsx(de, { span: 2, children: /* @__PURE__ */ d.jsx("div", {}) }),
671
+ /* @__PURE__ */ d.jsxs(de, { span: 22, children: [
672
+ /* @__PURE__ */ d.jsx("span", { className: "header1-text", children: D.format("HH:mm") }),
673
+ v.eventItemPopoverDateFormat && /* @__PURE__ */ d.jsx("span", { className: "help-text", style: { marginLeft: "8px" }, children: D.format(v.eventItemPopoverDateFormat) }),
674
+ /* @__PURE__ */ d.jsx("span", { className: "header2-text", style: { marginLeft: "8px" }, children: "-" }),
675
+ /* @__PURE__ */ d.jsx("span", { className: "header1-text", style: { marginLeft: "8px" }, children: g.format("HH:mm") }),
676
+ v.eventItemPopoverDateFormat && /* @__PURE__ */ d.jsx("span", { className: "help-text", style: { marginLeft: "8px" }, children: g.format(v.eventItemPopoverDateFormat) })
677
+ ] })
678
+ ] }),
679
+ (T || b) && /* @__PURE__ */ d.jsxs(we, { type: "flex", align: "middle", children: [
680
+ /* @__PURE__ */ d.jsx(de, { span: 2, children: /* @__PURE__ */ d.jsx("div", {}) }),
681
+ /* @__PURE__ */ d.jsxs(de, { span: 22, children: [
682
+ T && k(),
683
+ b && A()
684
+ ] })
685
+ ] })
699
686
  ] });
700
- }
701
- Oe.propTypes = {
702
- schedulerData: u.object.isRequired,
703
- eventItem: u.object.isRequired,
704
- title: u.string.isRequired,
705
- startTime: u.string.isRequired,
706
- endTime: u.string.isRequired,
707
- statusColor: u.string.isRequired,
708
- subtitleGetter: u.func,
709
- viewEventClick: u.func,
710
- viewEventText: u.string,
711
- viewEvent2Click: u.func,
712
- viewEvent2Text: u.string,
713
- eventItemPopoverTemplateResolver: u.func
714
687
  };
715
- const W = "YYYY-MM-DD", P = "YYYY-MM-DD HH:mm:ss", w = { Day: 0, Week: 1, Month: 2, Quarter: 3, Year: 4, Custom: 5, Custom1: 6, Custom2: 7 }, O = { Day: 0, Hour: 1, Week: 2, Month: 3, Year: 4 }, ae = { Top: 0, TopRight: 1, TopLeft: 2, Bottom: 3, BottomRight: 4, BottomLeft: 5 }, ie = { EVENT: "event" }, re = "ontouchstart" in window;
716
- class Ne extends _e {
688
+ qe.propTypes = {
689
+ schedulerData: p.object.isRequired,
690
+ eventItem: p.object.isRequired,
691
+ title: p.string.isRequired,
692
+ startTime: p.string.isRequired,
693
+ endTime: p.string.isRequired,
694
+ statusColor: p.string.isRequired,
695
+ subtitleGetter: p.func,
696
+ viewEventClick: p.func,
697
+ viewEventText: p.string,
698
+ viewEvent2Click: p.func,
699
+ viewEvent2Text: p.string,
700
+ eventItemPopoverTemplateResolver: p.func
701
+ };
702
+ const ge = "YYYY-MM-DD", V = "YYYY-MM-DD HH:mm:ss", O = { Day: 0, Week: 1, Month: 2, Quarter: 3, Year: 4, Custom: 5, Custom1: 6, Custom2: 7 }, U = { Day: 0, Hour: 1, Week: 2, Month: 3, Year: 4 }, me = { Top: 0, TopRight: 1, TopLeft: 2, Bottom: 3, BottomRight: 4, BottomLeft: 5 }, pe = { EVENT: "event" };
703
+ class Be extends We {
717
704
  constructor(e) {
718
705
  super(e);
719
- M(this, "initStartDrag", (e) => {
720
- const { schedulerData: r, eventItem: n } = this.props;
721
- let i = r._getEventSlotId(n), o = r.getSlotById(i);
722
- if (o && o.groupOnly || r._isResizing())
706
+ P(this, "initStartDrag", (e) => {
707
+ const { schedulerData: s, eventItem: r } = this.props;
708
+ let n = s._getEventSlotId(r), i = s.getSlotById(n);
709
+ if (i && i.groupOnly || s._isResizing())
723
710
  return;
724
711
  e.stopPropagation();
725
- let a = 0;
726
- if (re) {
712
+ let o = 0;
713
+ if (this.supportTouch) {
727
714
  if (e.changedTouches.length == 0)
728
715
  return;
729
- a = e.changedTouches[0].pageX;
716
+ o = e.changedTouches[0].pageX;
730
717
  } else {
731
718
  if (e.buttons !== void 0 && e.buttons !== 1)
732
719
  return;
733
- a = e.clientX;
720
+ o = e.clientX;
734
721
  }
735
722
  this.setState({
736
- startX: a
737
- }), r._startResizing(), re ? (this.startResizer.addEventListener("touchmove", this.doStartDrag, !1), this.startResizer.addEventListener("touchend", this.stopStartDrag, !1), this.startResizer.addEventListener("touchcancel", this.cancelStartDrag, !1)) : (document.documentElement.addEventListener("mousemove", this.doStartDrag, !1), document.documentElement.addEventListener("mouseup", this.stopStartDrag, !1)), document.onselectstart = function() {
723
+ startX: o
724
+ }), s._startResizing(), this.supportTouch ? (this.startResizer.addEventListener("touchmove", this.doStartDrag, !1), this.startResizer.addEventListener("touchend", this.stopStartDrag, !1), this.startResizer.addEventListener("touchcancel", this.cancelStartDrag, !1)) : (document.documentElement.addEventListener("mousemove", this.doStartDrag, !1), document.documentElement.addEventListener("mouseup", this.stopStartDrag, !1)), document.onselectstart = function() {
738
725
  return !1;
739
726
  }, document.ondragstart = function() {
740
727
  return !1;
741
728
  };
742
729
  });
743
- M(this, "doStartDrag", (e) => {
730
+ P(this, "doStartDrag", (e) => {
744
731
  e.stopPropagation();
745
- let r = 0;
746
- if (re) {
732
+ let s = 0;
733
+ if (this.supportTouch) {
747
734
  if (e.changedTouches.length == 0)
748
735
  return;
749
- r = e.changedTouches[0].pageX;
736
+ s = e.changedTouches[0].pageX;
750
737
  } else
751
- r = e.clientX;
752
- const { left: n, width: i, leftIndex: o, rightIndex: a, schedulerData: d } = this.props;
753
- let c = d.getContentCellWidth(), h = o > 0 ? 5 : 6, p = c - h, f = a * c - h;
754
- const { startX: m } = this.state;
755
- let E = n + r - m, R = i + m - r;
756
- R < p ? (R = p, E = (a - 1) * c + (a - 1 > 0 ? 2 : 3)) : R > f && (R = f, E = 3), this.setState({ left: E, width: R });
738
+ s = e.clientX;
739
+ const { left: r, width: n, leftIndex: i, rightIndex: o, schedulerData: l } = this.props;
740
+ let u = l.getContentCellWidth(), c = i > 0 ? 5 : 6, f = u - c, h = o * u - c;
741
+ const { startX: v } = this.state;
742
+ let D = r + s - v, g = n + v - s;
743
+ g < f ? (g = f, D = (o - 1) * u + (o - 1 > 0 ? 2 : 3)) : g > h && (g = h, D = 3), this.setState({ left: D, width: g });
757
744
  });
758
- M(this, "stopStartDrag", (e) => {
759
- e.stopPropagation(), re ? (this.startResizer.removeEventListener("touchmove", this.doStartDrag, !1), this.startResizer.removeEventListener("touchend", this.stopStartDrag, !1), this.startResizer.removeEventListener("touchcancel", this.cancelStartDrag, !1)) : (document.documentElement.removeEventListener("mousemove", this.doStartDrag, !1), document.documentElement.removeEventListener("mouseup", this.stopStartDrag, !1)), document.onselectstart = null, document.ondragstart = null;
760
- const { width: r, left: n, top: i, leftIndex: o, rightIndex: a, schedulerData: d, eventItem: c, updateEventStart: h, conflictOccurred: p } = this.props;
761
- if (d._stopResizing(), this.state.width === r)
745
+ P(this, "stopStartDrag", (e) => {
746
+ e.stopPropagation(), this.supportTouch ? (this.startResizer.removeEventListener("touchmove", this.doStartDrag, !1), this.startResizer.removeEventListener("touchend", this.stopStartDrag, !1), this.startResizer.removeEventListener("touchcancel", this.cancelStartDrag, !1)) : (document.documentElement.removeEventListener("mousemove", this.doStartDrag, !1), document.documentElement.removeEventListener("mouseup", this.stopStartDrag, !1)), document.onselectstart = null, document.ondragstart = null;
747
+ const { width: s, left: r, top: n, leftIndex: i, rightIndex: o, schedulerData: l, eventItem: u, updateEventStart: c, conflictOccurred: f } = this.props;
748
+ if (l._stopResizing(), this.state.width === s)
762
749
  return;
763
- let f = 0;
764
- if (re) {
750
+ let h = 0;
751
+ if (this.supportTouch) {
765
752
  if (e.changedTouches.length == 0) {
766
753
  this.setState({
767
- left: n,
768
- top: i,
769
- width: r
754
+ left: r,
755
+ top: n,
756
+ width: s
770
757
  });
771
758
  return;
772
759
  }
773
- f = e.changedTouches[0].pageX;
760
+ h = e.changedTouches[0].pageX;
774
761
  } else
775
- f = e.clientX;
776
- const { cellUnit: m, events: E, config: R, localeMoment: C } = d;
777
- let x = d.getContentCellWidth(), v = o > 0 ? 5 : 6, k = x - v, T = a * x - v;
778
- const { startX: D } = this.state;
779
- let j = r + D - f, N = f - D, A = N < 0 ? -1 : N === 0 ? 0 : 1, S = (A > 0 ? Math.floor(Math.abs(N) / x) : Math.ceil(Math.abs(N) / x)) * A;
780
- j < k ? S = a - o - 1 : j > T && (S = -o);
781
- let _ = C(c.start).add(m === O.Hour ? S * R.minuteStep : S, m === O.Hour ? "minutes" : "days").format(P);
782
- if (S !== 0 && m !== O.Hour && R.displayWeekend === !1)
783
- if (S > 0) {
784
- let U = 0, z = 0;
762
+ h = e.clientX;
763
+ const { cellUnit: v, events: D, config: g, localeDayjs: w } = l;
764
+ let T = l.getContentCellWidth(), b = i > 0 ? 5 : 6, k = T - b, A = o * T - b;
765
+ const { startX: $ } = this.state;
766
+ let H = s + $ - h, N = h - $, z = N < 0 ? -1 : N === 0 ? 0 : 1, W = (z > 0 ? Math.floor(Math.abs(N) / T) : Math.ceil(Math.abs(N) / T)) * z;
767
+ H < k ? W = o - i - 1 : H > A && (W = -i);
768
+ let C = w(new Date(u.start)).add(v === U.Hour ? W * g.minuteStep : W, v === U.Hour ? "minutes" : "days").format(V);
769
+ if (W !== 0 && v !== U.Hour && g.displayWeekend === !1)
770
+ if (W > 0) {
771
+ let y = 0, j = 0;
785
772
  for (; ; ) {
786
- z++;
787
- let Y = C(c.start).add(z, "days"), $ = Y.weekday();
788
- if ($ !== 0 && $ !== 6 && (U++, U === S)) {
789
- _ = Y.format(P);
773
+ j++;
774
+ let m = w(new Date(u.start)).add(j, "days"), M = m.weekday();
775
+ if (M !== 0 && M !== 6 && (y++, y === W)) {
776
+ C = m.format(V);
790
777
  break;
791
778
  }
792
779
  }
793
780
  } else {
794
- let U = 0, z = 0;
781
+ let y = 0, j = 0;
795
782
  for (; ; ) {
796
- z--;
797
- let Y = C(c.start).add(z, "days"), $ = Y.weekday();
798
- if ($ !== 0 && $ !== 6 && (U--, U === S)) {
799
- _ = Y.format(P);
783
+ j--;
784
+ let m = w(new Date(u.start)).add(j, "days"), M = m.weekday();
785
+ if (M !== 0 && M !== 6 && (y--, y === W)) {
786
+ C = m.format(V);
800
787
  break;
801
788
  }
802
789
  }
803
790
  }
804
- let q = !1, Q = d._getEventSlotId(c), G, K = d.getSlotById(Q);
805
- if (K && (G = K.name), R.checkConflict) {
806
- let U = C(_), z = C(c.end);
807
- E.forEach((Y) => {
808
- if (d._getEventSlotId(Y) === Q && Y.id !== c.id) {
809
- let $ = C(Y.start), V = C(Y.end);
810
- (U >= $ && U < V || z > $ && z <= V || $ >= U && $ < z || V > U && V <= z) && (q = !0);
791
+ let X = !1, Z = l._getEventSlotId(u), S, x = l.getSlotById(Z);
792
+ if (x && (S = x.name), g.checkConflict) {
793
+ let y = w(new Date(C)), j = w(new Date(u.end));
794
+ D.forEach((m) => {
795
+ if (l._getEventSlotId(m) === Z && m.id !== u.id) {
796
+ let M = w(new Date(m.start)), _ = w(new Date(m.end));
797
+ (y >= M && y < _ || j > M && j <= _ || M >= y && M < j || _ > y && _ <= j) && (X = !0);
811
798
  }
812
799
  });
813
800
  }
814
- q ? (this.setState({
815
- left: n,
816
- top: i,
817
- width: r
818
- }), p != null ? p(d, "StartResize", c, ie.EVENT, Q, G, _, c.end) : console.log("Conflict occurred, set conflictOccurred func in Scheduler to handle it"), this.subscribeResizeEvent(this.props)) : h != null && h(d, c, _);
801
+ X ? (this.setState({
802
+ left: r,
803
+ top: n,
804
+ width: s
805
+ }), f != null ? f(l, "StartResize", u, pe.EVENT, Z, S, C, u.end) : console.log("Conflict occurred, set conflictOccurred func in Scheduler to handle it"), this.subscribeResizeEvent(this.props)) : c != null && c(l, u, C);
819
806
  });
820
- M(this, "cancelStartDrag", (e) => {
807
+ P(this, "cancelStartDrag", (e) => {
821
808
  e.stopPropagation(), this.startResizer.removeEventListener("touchmove", this.doStartDrag, !1), this.startResizer.removeEventListener("touchend", this.stopStartDrag, !1), this.startResizer.removeEventListener("touchcancel", this.cancelStartDrag, !1), document.onselectstart = null, document.ondragstart = null;
822
- const { schedulerData: r, left: n, top: i, width: o } = this.props;
823
- r._stopResizing(), this.setState({
824
- left: n,
825
- top: i,
826
- width: o
809
+ const { schedulerData: s, left: r, top: n, width: i } = this.props;
810
+ s._stopResizing(), this.setState({
811
+ left: r,
812
+ top: n,
813
+ width: i
827
814
  });
828
815
  });
829
- M(this, "initEndDrag", (e) => {
830
- const { schedulerData: r, eventItem: n } = this.props;
831
- let i = r._getEventSlotId(n), o = r.getSlotById(i);
832
- if (o && o.groupOnly || r._isResizing())
816
+ P(this, "initEndDrag", (e) => {
817
+ const { schedulerData: s, eventItem: r } = this.props;
818
+ let n = s._getEventSlotId(r), i = s.getSlotById(n);
819
+ if (i && i.groupOnly || s._isResizing())
833
820
  return;
834
821
  e.stopPropagation();
835
- let a = 0;
836
- if (re) {
822
+ let o = 0;
823
+ if (this.supportTouch) {
837
824
  if (e.changedTouches.length == 0)
838
825
  return;
839
- a = e.changedTouches[0].pageX;
826
+ o = e.changedTouches[0].pageX;
840
827
  } else {
841
828
  if (e.buttons !== void 0 && e.buttons !== 1)
842
829
  return;
843
- a = e.clientX;
830
+ o = e.clientX;
844
831
  }
845
832
  this.setState({
846
- endX: a
847
- }), r._startResizing(), re ? (this.endResizer.addEventListener("touchmove", this.doEndDrag, !1), this.endResizer.addEventListener("touchend", this.stopEndDrag, !1), this.endResizer.addEventListener("touchcancel", this.cancelEndDrag, !1)) : (document.documentElement.addEventListener("mousemove", this.doEndDrag, !1), document.documentElement.addEventListener("mouseup", this.stopEndDrag, !1)), document.onselectstart = function() {
833
+ endX: o
834
+ }), s._startResizing(), this.supportTouch ? (this.endResizer.addEventListener("touchmove", this.doEndDrag, !1), this.endResizer.addEventListener("touchend", this.stopEndDrag, !1), this.endResizer.addEventListener("touchcancel", this.cancelEndDrag, !1)) : (document.documentElement.addEventListener("mousemove", this.doEndDrag, !1), document.documentElement.addEventListener("mouseup", this.stopEndDrag, !1)), document.onselectstart = function() {
848
835
  return !1;
849
836
  }, document.ondragstart = function() {
850
837
  return !1;
851
838
  };
852
839
  });
853
- M(this, "doEndDrag", (e) => {
840
+ P(this, "doEndDrag", (e) => {
854
841
  e.stopPropagation();
855
- let r = 0;
856
- if (re) {
842
+ let s = 0;
843
+ if (this.supportTouch) {
857
844
  if (e.changedTouches.length == 0)
858
845
  return;
859
- r = e.changedTouches[0].pageX;
846
+ s = e.changedTouches[0].pageX;
860
847
  } else
861
- r = e.clientX;
862
- const { width: n, leftIndex: i, schedulerData: o } = this.props, { headers: a } = o;
863
- let d = o.getContentCellWidth(), c = i > 0 ? 5 : 6, h = d - c, p = (a.length - i) * d - c;
864
- const { endX: f } = this.state;
865
- let m = n + r - f;
866
- m < h ? m = h : m > p && (m = p), this.setState({ width: m });
848
+ s = e.clientX;
849
+ const { width: r, leftIndex: n, schedulerData: i } = this.props, { headers: o } = i;
850
+ let l = i.getContentCellWidth(), u = n > 0 ? 5 : 6, c = l - u, f = (o.length - n) * l - u;
851
+ const { endX: h } = this.state;
852
+ let v = r + s - h;
853
+ v < c ? v = c : v > f && (v = f), this.setState({ width: v });
867
854
  });
868
- M(this, "stopEndDrag", (e) => {
869
- e.stopPropagation(), re ? (this.endResizer.removeEventListener("touchmove", this.doEndDrag, !1), this.endResizer.removeEventListener("touchend", this.stopEndDrag, !1), this.endResizer.removeEventListener("touchcancel", this.cancelEndDrag, !1)) : (document.documentElement.removeEventListener("mousemove", this.doEndDrag, !1), document.documentElement.removeEventListener("mouseup", this.stopEndDrag, !1)), document.onselectstart = null, document.ondragstart = null;
870
- const { width: r, left: n, top: i, leftIndex: o, rightIndex: a, schedulerData: d, eventItem: c, updateEventEnd: h, conflictOccurred: p } = this.props;
871
- if (d._stopResizing(), this.state.width === r)
855
+ P(this, "stopEndDrag", (e) => {
856
+ e.stopPropagation(), this.supportTouch ? (this.endResizer.removeEventListener("touchmove", this.doEndDrag, !1), this.endResizer.removeEventListener("touchend", this.stopEndDrag, !1), this.endResizer.removeEventListener("touchcancel", this.cancelEndDrag, !1)) : (document.documentElement.removeEventListener("mousemove", this.doEndDrag, !1), document.documentElement.removeEventListener("mouseup", this.stopEndDrag, !1)), document.onselectstart = null, document.ondragstart = null;
857
+ const { width: s, left: r, top: n, leftIndex: i, rightIndex: o, schedulerData: l, eventItem: u, updateEventEnd: c, conflictOccurred: f } = this.props;
858
+ if (l._stopResizing(), this.state.width === s)
872
859
  return;
873
- let f = 0;
874
- if (re) {
860
+ let h = 0;
861
+ if (this.supportTouch) {
875
862
  if (e.changedTouches.length == 0) {
876
863
  this.setState({
877
- left: n,
878
- top: i,
879
- width: r
864
+ left: r,
865
+ top: n,
866
+ width: s
880
867
  });
881
868
  return;
882
869
  }
883
- f = e.changedTouches[0].pageX;
870
+ h = e.changedTouches[0].pageX;
884
871
  } else
885
- f = e.clientX;
886
- const { headers: m, cellUnit: E, events: R, config: C, localeMoment: x } = d;
887
- let v = d.getContentCellWidth(), k = o > 0 ? 5 : 6, T = v - k, D = (m.length - o) * v - k;
888
- const { endX: j } = this.state;
889
- let N = r + f - j, A = N - r, S = A < 0 ? -1 : A === 0 ? 0 : 1, _ = (S < 0 ? Math.floor(Math.abs(A) / v) : Math.ceil(Math.abs(A) / v)) * S;
890
- N < T ? _ = o - a + 1 : N > D && (_ = m.length - a);
891
- let q = x(c.end).add(E === O.Hour ? _ * C.minuteStep : _, E === O.Hour ? "minutes" : "days").format(P);
892
- if (_ !== 0 && E !== O.Hour && C.displayWeekend === !1)
893
- if (_ > 0) {
894
- let z = 0, Y = 0;
872
+ h = e.clientX;
873
+ const { headers: v, cellUnit: D, events: g, config: w, localeDayjs: T } = l;
874
+ let b = l.getContentCellWidth(), k = i > 0 ? 5 : 6, A = b - k, $ = (v.length - i) * b - k;
875
+ const { endX: H } = this.state;
876
+ let N = s + h - H, z = N - s, W = z < 0 ? -1 : z === 0 ? 0 : 1, C = (W < 0 ? Math.floor(Math.abs(z) / b) : Math.ceil(Math.abs(z) / b)) * W;
877
+ N < A ? C = i - o + 1 : N > $ && (C = v.length - o);
878
+ let X = T(new Date(u.end)).add(D === U.Hour ? C * w.minuteStep : C, D === U.Hour ? "minutes" : "days").format(V);
879
+ if (C !== 0 && D !== U.Hour && w.displayWeekend === !1)
880
+ if (C > 0) {
881
+ let j = 0, m = 0;
895
882
  for (; ; ) {
896
- Y++;
897
- let $ = x(c.end).add(Y, "days"), V = $.weekday();
898
- if (V !== 0 && V !== 6 && (z++, z === _)) {
899
- q = $.format(P);
883
+ m++;
884
+ let M = T(new Date(u.end)).add(m, "days"), _ = M.weekday();
885
+ if (_ !== 0 && _ !== 6 && (j++, j === C)) {
886
+ X = M.format(V);
900
887
  break;
901
888
  }
902
889
  }
903
890
  } else {
904
- let z = 0, Y = 0;
891
+ let j = 0, m = 0;
905
892
  for (; ; ) {
906
- Y--;
907
- let $ = x(c.end).add(Y, "days"), V = $.weekday();
908
- if (V !== 0 && V !== 6 && (z--, z === _)) {
909
- q = $.format(P);
893
+ m--;
894
+ let M = T(new Date(u.end)).add(m, "days"), _ = M.weekday();
895
+ if (_ !== 0 && _ !== 6 && (j--, j === C)) {
896
+ X = M.format(V);
910
897
  break;
911
898
  }
912
899
  }
913
900
  }
914
- let Q = !1, G = d._getEventSlotId(c), K, U = d.getSlotById(G);
915
- if (U && (K = U.name), C.checkConflict) {
916
- let z = x(c.start), Y = x(q);
917
- R.forEach(($) => {
918
- if (d._getEventSlotId($) === G && $.id !== c.id) {
919
- let V = x($.start), ne = x($.end);
920
- (z >= V && z < ne || Y > V && Y <= ne || V >= z && V < Y || ne > z && ne <= Y) && (Q = !0);
901
+ let Z = !1, S = l._getEventSlotId(u), x, y = l.getSlotById(S);
902
+ if (y && (x = y.name), w.checkConflict) {
903
+ let j = T(new Date(u.start)), m = T(new Date(X));
904
+ g.forEach((M) => {
905
+ if (l._getEventSlotId(M) === S && M.id !== u.id) {
906
+ let _ = T(new Date(M.start)), F = T(new Date(M.end));
907
+ (j >= _ && j < F || m > _ && m <= F || _ >= j && _ < m || F > j && F <= m) && (Z = !0);
921
908
  }
922
909
  });
923
910
  }
924
- Q ? (this.setState({
925
- left: n,
926
- top: i,
927
- width: r
928
- }), p != null ? p(d, "EndResize", c, ie.EVENT, G, K, c.start, q) : console.log("Conflict occurred, set conflictOccurred func in Scheduler to handle it"), this.subscribeResizeEvent(this.props)) : h != null && h(d, c, q);
911
+ Z ? (this.setState({
912
+ left: r,
913
+ top: n,
914
+ width: s
915
+ }), f != null ? f(l, "EndResize", u, pe.EVENT, S, x, u.start, X) : console.log("Conflict occurred, set conflictOccurred func in Scheduler to handle it"), this.subscribeResizeEvent(this.props)) : c != null && c(l, u, X);
929
916
  });
930
- M(this, "cancelEndDrag", (e) => {
917
+ P(this, "cancelEndDrag", (e) => {
931
918
  e.stopPropagation(), this.endResizer.removeEventListener("touchmove", this.doEndDrag, !1), this.endResizer.removeEventListener("touchend", this.stopEndDrag, !1), this.endResizer.removeEventListener("touchcancel", this.cancelEndDrag, !1), document.onselectstart = null, document.ondragstart = null;
932
- const { schedulerData: r, left: n, top: i, width: o } = this.props;
933
- r._stopResizing(), this.setState({
934
- left: n,
935
- top: i,
936
- width: o
919
+ const { schedulerData: s, left: r, top: n, width: i } = this.props;
920
+ s._stopResizing(), this.setState({
921
+ left: r,
922
+ top: n,
923
+ width: i
937
924
  });
938
925
  });
939
- M(this, "startResizable", (e) => {
940
- const { eventItem: r, isInPopover: n, schedulerData: i } = e, { config: o } = i;
941
- return o.startResizable === !0 && n === !1 && (r.resizable == null || r.resizable !== !1) && (r.startResizable == null || r.startResizable !== !1);
926
+ P(this, "handleMouseMove", (e) => {
927
+ const s = this.eventItemRef.current.getBoundingClientRect();
928
+ this.setState({
929
+ contentMousePosX: e.clientX,
930
+ eventItemLeftRect: s.left,
931
+ eventItemRightRect: s.right
932
+ });
942
933
  });
943
- M(this, "endResizable", (e) => {
944
- const { eventItem: r, isInPopover: n, schedulerData: i } = e, { config: o } = i;
945
- return o.endResizable === !0 && n === !1 && (r.resizable == null || r.resizable !== !1) && (r.endResizable == null || r.endResizable !== !1);
934
+ P(this, "startResizable", (e) => {
935
+ const { eventItem: s, isInPopover: r, schedulerData: n } = e, { config: i } = n;
936
+ return i.startResizable === !0 && r === !1 && (s.resizable == null || s.resizable !== !1) && (s.startResizable == null || s.startResizable !== !1);
946
937
  });
947
- M(this, "subscribeResizeEvent", (e) => {
948
- this.startResizer != null && (re || (this.startResizer.removeEventListener("mousedown", this.initStartDrag, !1), this.startResizable(e) && this.startResizer.addEventListener("mousedown", this.initStartDrag, !1))), this.endResizer != null && (re || (this.endResizer.removeEventListener("mousedown", this.initEndDrag, !1), this.endResizable(e) && this.endResizer.addEventListener("mousedown", this.initEndDrag, !1)));
938
+ P(this, "endResizable", (e) => {
939
+ const { eventItem: s, isInPopover: r, schedulerData: n } = e, { config: i } = n;
940
+ return i.endResizable === !0 && r === !1 && (s.resizable == null || s.resizable !== !1) && (s.endResizable == null || s.endResizable !== !1);
949
941
  });
950
- const { left: r, top: n, width: i } = e;
942
+ P(this, "subscribeResizeEvent", (e) => {
943
+ this.startResizer != null && (this.supportTouch || (this.startResizer.removeEventListener("mousedown", this.initStartDrag, !1), this.startResizable(e) && this.startResizer.addEventListener("mousedown", this.initStartDrag, !1))), this.endResizer != null && (this.supportTouch || (this.endResizer.removeEventListener("mousedown", this.initEndDrag, !1), this.endResizable(e) && this.endResizer.addEventListener("mousedown", this.initEndDrag, !1)));
944
+ });
945
+ const { left: s, top: r, width: n } = e;
951
946
  this.state = {
952
- left: r,
953
- top: n,
954
- width: i
955
- }, this.startResizer = null, this.endResizer = null;
956
- }
957
- UNSAFE_componentWillReceiveProps(e) {
958
- const { left: r, top: n, width: i } = e;
959
- this.setState({
960
- left: r,
961
- top: n,
962
- width: i
963
- }), this.subscribeResizeEvent(e);
947
+ left: s,
948
+ top: r,
949
+ width: n,
950
+ contentMousePosX: 0,
951
+ eventItemLeftRect: 0,
952
+ eventItemRightRect: 0
953
+ }, this.startResizer = null, this.endResizer = null, this.supportTouch = !1, this.eventItemRef = ze.createRef(), this._isMounted = !1;
954
+ }
955
+ componentDidUpdate(e, s) {
956
+ if (e !== this.props) {
957
+ const { left: r, top: n, width: i } = this.props;
958
+ this.setState({
959
+ left: r,
960
+ top: n,
961
+ width: i
962
+ }), this.subscribeResizeEvent(this.props);
963
+ }
964
964
  }
965
965
  componentDidMount() {
966
- this.subscribeResizeEvent(this.props);
966
+ this._isMounted = !0, this.supportTouch = "ontouchstart" in window, this.subscribeResizeEvent(this.props);
967
967
  }
968
968
  render() {
969
- const { eventItem: e, isStart: r, isEnd: n, isInPopover: i, eventItemClick: o, schedulerData: a, isDragging: d, connectDragSource: c, connectDragPreview: h, eventItemTemplateResolver: p } = this.props, { config: f, localeMoment: m } = a, { left: E, width: R, top: C } = this.state;
970
- let x = r ? n ? "round-all" : "round-head" : n ? "round-tail" : "round-none", v = f.defaultEventBgColor;
971
- e.bgColor && (v = e.bgColor);
972
- let k = a.behaviors.getEventTextFunc(a, e), T = /* @__PURE__ */ l.jsx(Oe, { ...this.props, eventItem: e, title: e.title, startTime: e.start, endTime: e.end, statusColor: v }), D = m(e.start), j = i ? `${D.format("HH:mm")} ${k}` : k, N = /* @__PURE__ */ l.jsx("div", {});
973
- this.startResizable(this.props) && (N = /* @__PURE__ */ l.jsx("div", { className: "event-resizer event-start-resizer", ref: (q) => this.startResizer = q }));
974
- let A = /* @__PURE__ */ l.jsx("div", {});
975
- this.endResizable(this.props) && (A = /* @__PURE__ */ l.jsx("div", { className: "event-resizer event-end-resizer", ref: (q) => this.endResizer = q }));
976
- let S = /* @__PURE__ */ l.jsx("div", { className: x + " event-item", style: { height: f.eventItemHeight, backgroundColor: v }, children: /* @__PURE__ */ l.jsx("span", { style: { marginLeft: "10px", lineHeight: `${f.eventItemHeight}px` }, children: j }) }, e.id);
977
- p != null && (S = p(a, e, v, r, n, "event-item", f.eventItemHeight, void 0));
978
- let _ = /* @__PURE__ */ l.jsxs(
969
+ const { eventItem: e, isStart: s, isEnd: r, isInPopover: n, eventItemClick: i, schedulerData: o, isDragging: l, connectDragSource: u, connectDragPreview: c, eventItemTemplateResolver: f } = this.props, { config: h, localeDayjs: v } = o, { left: D, width: g, top: w } = this.state;
970
+ let T = s ? r ? "round-all" : "round-head" : r ? "round-tail" : "round-none", b = h.defaultEventBgColor;
971
+ const k = h.eventItemPopoverPlacement, A = /(top|bottom)(Right|Left)MousePosition/.test(k);
972
+ e.bgColor && (b = e.bgColor);
973
+ let $ = o.behaviors.getEventTextFunc(o, e), H = /* @__PURE__ */ d.jsx(qe, { ...this.props, eventItem: e, title: e.title, startTime: e.start, endTime: e.end, statusColor: b }), N = v(new Date(e.start)), z = n ? `${N.format("HH:mm")} ${$}` : $, W = /* @__PURE__ */ d.jsx("div", {});
974
+ this.startResizable(this.props) && (W = /* @__PURE__ */ d.jsx("div", { className: "event-resizer event-start-resizer", ref: (m) => this.startResizer = m }));
975
+ let C = /* @__PURE__ */ d.jsx("div", {});
976
+ this.endResizable(this.props) && (C = /* @__PURE__ */ d.jsx("div", { className: "event-resizer event-end-resizer", ref: (m) => this.endResizer = m }));
977
+ let X = /* @__PURE__ */ d.jsx("div", { className: T + " event-item", style: { height: h.eventItemHeight, backgroundColor: b }, children: /* @__PURE__ */ d.jsx("span", { style: { marginLeft: "10px", lineHeight: `${h.eventItemHeight}px` }, children: z }) }, e.id);
978
+ f != null && (X = f(o, e, b, s, r, "event-item", h.eventItemHeight, void 0));
979
+ let Z = /* @__PURE__ */ d.jsxs(
979
980
  "a",
980
981
  {
981
982
  className: "timeline-event",
982
- style: { left: E, width: R, top: C },
983
+ ref: this.eventItemRef,
984
+ onMouseMove: A ? this.handleMouseMove : void 0,
985
+ style: { left: D, width: g, top: w },
983
986
  onClick: () => {
984
- o && o(a, e);
987
+ i && i(o, e);
985
988
  },
986
989
  children: [
987
- S,
988
- N,
989
- A
990
+ X,
991
+ W,
992
+ C
990
993
  ]
991
994
  }
992
995
  );
993
- return d ? null : a._isResizing() || f.eventItemPopoverEnabled == !1 || e.showPopover == !1 ? /* @__PURE__ */ l.jsx("div", { children: h(c(_)) }) : /* @__PURE__ */ l.jsx(He, { placement: "bottomLeft", content: T, trigger: "hover", children: h(c(_)) });
996
+ const S = () => {
997
+ let m = 0, M = "";
998
+ if (A) {
999
+ const _ = k.includes("Left"), F = this.state.contentMousePosX, Q = h.eventItemPopoverWidth, J = this.state.eventItemLeftRect, ee = this.state.eventItemRightRect;
1000
+ let ae = _ ? J : ee, ne = _ ? 1 : -1;
1001
+ M = k.replace("MousePosition", "");
1002
+ const le = 10;
1003
+ _ && this._isMounted ? F + Q + le > window.innerWidth && (M = `${k.replace(/(Right|Left).*/, "")}Right`, ae = ee, ne = -1) : F - Q - le < 0 && (M = `${k.replace(/(Right|Left).*/, "")}Left`, ae = J, ne = 1), m = F - ae - 20 * ne;
1004
+ }
1005
+ return {
1006
+ popoverOffsetX: m,
1007
+ mousePositionPlacement: M
1008
+ };
1009
+ }, { popoverOffsetX: x, mousePositionPlacement: y } = S(), j = h.dragAndDropEnabled ? c(u(Z)) : Z;
1010
+ return l ? null : o._isResizing() || h.eventItemPopoverEnabled == !1 || e.showPopover == !1 ? /* @__PURE__ */ d.jsx("div", { children: j }) : /* @__PURE__ */ d.jsx(
1011
+ Fe,
1012
+ {
1013
+ transitionName: A ? "" : void 0,
1014
+ align: A ? {
1015
+ offset: [x, k.includes("top") ? -10 : 10],
1016
+ overflow: {
1017
+ // shiftX: true,
1018
+ // shiftY: true,
1019
+ }
1020
+ } : void 0,
1021
+ placement: A ? y : k,
1022
+ content: H,
1023
+ trigger: h.eventItemPopoverTrigger,
1024
+ children: j
1025
+ }
1026
+ );
994
1027
  }
995
1028
  }
996
- M(Ne, "propTypes", {
997
- schedulerData: u.object.isRequired,
998
- eventItem: u.object.isRequired,
999
- isStart: u.bool.isRequired,
1000
- isEnd: u.bool.isRequired,
1001
- left: u.number.isRequired,
1002
- width: u.number.isRequired,
1003
- top: u.number.isRequired,
1004
- isInPopover: u.bool.isRequired,
1005
- leftIndex: u.number.isRequired,
1006
- rightIndex: u.number.isRequired,
1007
- isDragging: u.bool.isRequired,
1008
- connectDragSource: u.func.isRequired,
1009
- connectDragPreview: u.func.isRequired,
1010
- updateEventStart: u.func,
1011
- updateEventEnd: u.func,
1012
- moveEvent: u.func,
1013
- subtitleGetter: u.func,
1014
- eventItemClick: u.func,
1015
- viewEventClick: u.func,
1016
- viewEventText: u.string,
1017
- viewEvent2Click: u.func,
1018
- viewEvent2Text: u.string,
1019
- conflictOccurred: u.func,
1020
- eventItemTemplateResolver: u.func
1029
+ P(Be, "propTypes", {
1030
+ schedulerData: Y.object.isRequired,
1031
+ eventItem: Y.object.isRequired,
1032
+ isStart: Y.bool.isRequired,
1033
+ isEnd: Y.bool.isRequired,
1034
+ left: Y.number.isRequired,
1035
+ width: Y.number.isRequired,
1036
+ top: Y.number.isRequired,
1037
+ isInPopover: Y.bool.isRequired,
1038
+ leftIndex: Y.number.isRequired,
1039
+ rightIndex: Y.number.isRequired,
1040
+ isDragging: Y.bool,
1041
+ connectDragSource: Y.func,
1042
+ connectDragPreview: Y.func,
1043
+ updateEventStart: Y.func,
1044
+ updateEventEnd: Y.func,
1045
+ moveEvent: Y.func,
1046
+ subtitleGetter: Y.func,
1047
+ eventItemClick: Y.func,
1048
+ viewEventClick: Y.func,
1049
+ viewEventText: Y.string,
1050
+ viewEvent2Click: Y.func,
1051
+ viewEvent2Text: Y.string,
1052
+ conflictOccurred: Y.func,
1053
+ eventItemTemplateResolver: Y.func
1021
1054
  });
1022
- class ot {
1023
- constructor(t, e, r = ie.EVENT) {
1024
- M(this, "getDragSpec", () => ({
1025
- beginDrag: (t, e, r) => this.resolveDragObjFunc(t),
1026
- endDrag: (t, e, r) => {
1055
+ class ht {
1056
+ constructor(t, e, s, r = pe.EVENT) {
1057
+ P(this, "getDragSpec", () => ({
1058
+ beginDrag: (t, e, s) => this.resolveDragObjFunc(t),
1059
+ endDrag: (t, e, s) => {
1027
1060
  if (!e.didDrop())
1028
1061
  return;
1029
- const { moveEvent: n, newEvent: i, schedulerData: o } = t, { events: a, config: d, viewType: c, localeMoment: h } = o, p = e.getItem(), f = e.getItemType(), m = e.getDropResult();
1030
- let E = m.slotId, R = m.slotName, C = m.start, x = m.end, v = m.initialStart;
1031
- m.initialEnd;
1032
- let k = "New", T = f === ie.EVENT;
1033
- if (T) {
1034
- const j = p;
1035
- if (d.relativeMove)
1036
- C = h(j.start).add(h(C).diff(h(v)), "ms").format(P);
1037
- else if (c !== w.Day) {
1038
- let N = h(C);
1039
- C = h(j.start).year(N.year()).month(N.month()).date(N.date()).format(P);
1062
+ const { moveEvent: r, newEvent: n, schedulerData: i } = t, { events: o, config: l, viewType: u, localeDayjs: c } = i, f = e.getItem(), h = e.getItemType(), v = e.getDropResult();
1063
+ let D = v.slotId, g = v.slotName, w = v.start, T = v.end, b = v.initialStart;
1064
+ v.initialEnd;
1065
+ let k = "New", A = h === pe.EVENT;
1066
+ if (A) {
1067
+ const H = f;
1068
+ if (l.relativeMove)
1069
+ w = c(H.start).add(c(w).diff(c(new Date(b))), "ms").format(V);
1070
+ else if (u !== O.Day) {
1071
+ let N = c(w);
1072
+ w = c(H.start).year(N.year()).month(N.month()).date(N.date()).format(V);
1040
1073
  }
1041
- if (x = h(C).add(h(j.end).diff(h(j.start)), "ms").format(P), d.crossResourceMove === !1) {
1042
- E = o._getEventSlotId(p), R = void 0;
1043
- let N = o.getSlotById(E);
1044
- N && (R = N.name);
1074
+ if (T = c(w).add(c(H.end).diff(c(H.start)), "ms").format(V), l.crossResourceMove === !1) {
1075
+ D = i._getEventSlotId(f), g = void 0;
1076
+ let N = i.getSlotById(D);
1077
+ N && (g = N.name);
1045
1078
  }
1046
1079
  k = "Move";
1047
1080
  }
1048
- let D = !1;
1049
- if (d.checkConflict) {
1050
- let j = h(C), N = h(x);
1051
- a.forEach((A) => {
1052
- if (o._getEventSlotId(A) === E && (!T || A.id !== p.id)) {
1053
- let S = h(A.start), _ = h(A.end);
1054
- (j >= S && j < _ || N > S && N <= _ || S >= j && S < N || _ > j && _ <= N) && (D = !0);
1081
+ let $ = !1;
1082
+ if (l.checkConflict) {
1083
+ let H = c(w), N = c(T);
1084
+ o.forEach((z) => {
1085
+ if (i._getEventSlotId(z) === D && (!A || z.id !== f.id)) {
1086
+ let W = c(z.start), C = c(z.end);
1087
+ (H >= W && H < C || N > W && N <= C || W >= H && W < N || C > H && C <= N) && ($ = !0);
1055
1088
  }
1056
1089
  });
1057
1090
  }
1058
- if (D) {
1059
- const { conflictOccurred: j } = t;
1060
- j != null ? j(o, k, p, f, E, R, C, x) : console.log("Conflict occurred, set conflictOccurred func in Scheduler to handle it");
1091
+ if ($) {
1092
+ const { conflictOccurred: H } = t;
1093
+ H != null ? H(i, k, f, h, D, g, w, T) : console.log("Conflict occurred, set conflictOccurred func in Scheduler to handle it");
1061
1094
  } else
1062
- T ? n !== void 0 && n(o, p, E, R, C, x) : i !== void 0 && i(o, E, R, C, x, f, p);
1095
+ A ? r !== void 0 && r(i, f, D, g, w, T) : n !== void 0 && n(i, D, g, w, T, h, f);
1063
1096
  },
1064
1097
  canDrag: (t) => {
1065
- const { schedulerData: e, resourceEvents: r } = t, n = this.resolveDragObjFunc(t);
1098
+ const { schedulerData: e, resourceEvents: s } = t, r = this.resolveDragObjFunc(t);
1066
1099
  if (e._isResizing())
1067
1100
  return !1;
1068
- const { config: i } = e;
1069
- return i.movable && (r == null || !r.groupOnly) && (n.movable == null || n.movable !== !1);
1101
+ const { config: n } = e;
1102
+ return n.movable && (s == null || !s.groupOnly) && (r.movable == null || r.movable !== !1);
1070
1103
  }
1071
1104
  }));
1072
- M(this, "getDragCollect", (t, e) => ({
1105
+ P(this, "getDragCollect", (t, e) => ({
1073
1106
  connectDragSource: t.dragSource(),
1074
1107
  isDragging: e.isDragging(),
1075
1108
  connectDragPreview: t.dragPreview()
1076
1109
  }));
1077
- M(this, "getDragSource", () => this.dragSource);
1078
- this.resolveDragObjFunc = t, this.DecoratedComponent = e, this.dndType = r, this.dragSource = Jt(this.dndType, this.getDragSpec(), this.getDragCollect)(this.DecoratedComponent);
1110
+ P(this, "getDragSource", () => this.dragSource);
1111
+ this.resolveDragObjFunc = t, this.DecoratedComponent = e, this.dndType = r, this.dragSource = s ? Kt(this.dndType, this.getDragSpec(), this.getDragCollect)(this.DecoratedComponent) : this.DecoratedComponent;
1079
1112
  }
1080
1113
  }
1081
- function pe(b) {
1082
- let t = 0, e = 0, r = b;
1083
- for (; r; )
1084
- t += r.offsetLeft - r.scrollLeft, e += r.offsetTop - r.scrollTop, r = r.offsetParent;
1114
+ function Te(R) {
1115
+ let t = 0, e = 0, s = R;
1116
+ for (; s; )
1117
+ t += s.offsetLeft - s.scrollLeft, e += s.offsetTop - s.scrollTop, s = s.offsetParent;
1085
1118
  return { x: t, y: e };
1086
1119
  }
1087
- class sr {
1120
+ class us {
1088
1121
  constructor(t, e) {
1089
- M(this, "getDropSpec", () => ({
1090
- drop: (t, e, r) => {
1091
- const { schedulerData: n, resourceEvents: i } = t, { cellUnit: o, localeMoment: a } = n, d = e.getItemType(), c = pe(r.eventContainer);
1092
- let h = n.getContentCellWidth(), p = null, f = null;
1093
- if (d === ie.EVENT) {
1094
- const x = e.getInitialClientOffset();
1095
- let v = Math.floor((x.x - c.x) / h);
1096
- p = i.headerItems[v].start, f = i.headerItems[v].end, o !== O.Hour && (f = a(i.headerItems[v].start).hour(23).minute(59).second(59).format(P));
1122
+ P(this, "getDropSpec", () => ({
1123
+ drop: (t, e, s) => {
1124
+ const { schedulerData: r, resourceEvents: n } = t, { cellUnit: i, localeDayjs: o } = r, l = e.getItemType(), u = Te(s.eventContainer);
1125
+ let c = r.getContentCellWidth(), f = null, h = null;
1126
+ if (l === pe.EVENT) {
1127
+ const T = e.getInitialClientOffset();
1128
+ let b = Math.floor((T.x - u.x) / c);
1129
+ f = n.headerItems[b].start, h = n.headerItems[b].end, i !== U.Hour && (h = o(new Date(n.headerItems[b].start)).hour(23).minute(59).second(59).format(V));
1097
1130
  }
1098
- const m = e.getClientOffset();
1099
- let E = Math.floor((m.x - c.x) / h);
1100
- if (!i.headerItems[E])
1101
- return;
1102
- let R = i.headerItems[E].start, C = i.headerItems[E].end;
1103
- return o !== O.Hour && (C = a(i.headerItems[E].start).hour(23).minute(59).second(59).format(P)), {
1104
- slotId: i.slotId,
1105
- slotName: i.slotName,
1106
- start: R,
1107
- end: C,
1108
- initialStart: p,
1109
- initialEnd: f
1131
+ const v = e.getClientOffset();
1132
+ let D = Math.floor((v.x - u.x) / c), g = n.headerItems[D].start, w = n.headerItems[D].end;
1133
+ return i !== U.Hour && (w = o(new Date(n.headerItems[D].start)).hour(23).minute(59).second(59).format(V)), {
1134
+ slotId: n.slotId,
1135
+ slotName: n.slotName,
1136
+ start: g,
1137
+ end: w,
1138
+ initialStart: f,
1139
+ initialEnd: h
1110
1140
  };
1111
1141
  },
1112
- hover: (t, e, r) => {
1113
- const { schedulerData: n, resourceEvents: i, movingEvent: o } = t, { cellUnit: a, config: d, viewType: c, localeMoment: h } = n, p = e.getItem(), f = e.getItemType(), m = pe(r.eventContainer);
1114
- let E = n.getContentCellWidth(), R = null;
1115
- if (f === ie.EVENT) {
1116
- const A = e.getInitialClientOffset();
1117
- let S = Math.floor((A.x - m.x) / E);
1118
- R = i.headerItems[S].start, i.headerItems[S].end, a !== O.Hour && h(i.headerItems[S].start).hour(23).minute(59).second(59).format(P);
1142
+ hover: (t, e, s) => {
1143
+ const { schedulerData: r, resourceEvents: n, movingEvent: i } = t, { cellUnit: o, config: l, viewType: u, localeDayjs: c } = r;
1144
+ this.config = l;
1145
+ const f = e.getItem(), h = e.getItemType(), v = Te(s.eventContainer);
1146
+ let D = r.getContentCellWidth(), g = null;
1147
+ if (h === pe.EVENT) {
1148
+ const z = e.getInitialClientOffset();
1149
+ let W = Math.floor((z.x - v.x) / D);
1150
+ g = n.headerItems[W].start, n.headerItems[W].end, o !== U.Hour && c(new Date(n.headerItems[W].start)).hour(23).minute(59).second(59).format(V);
1119
1151
  }
1120
- const C = e.getClientOffset();
1121
- let x = Math.floor((C.x - m.x) / E);
1122
- if (!i.headerItems[x])
1152
+ const w = e.getClientOffset();
1153
+ let T = Math.floor((w.x - v.x) / D);
1154
+ if (!n.headerItems[T])
1123
1155
  return;
1124
- let v = i.headerItems[x].start, k = i.headerItems[x].end;
1125
- a !== O.Hour && (k = h(i.headerItems[x].start).hour(23).minute(59).second(59).format(P));
1126
- let T = i.slotId, D = i.slotName, j = "New";
1127
- if (f === ie.EVENT) {
1128
- const A = p;
1129
- if (d.relativeMove)
1130
- v = h(A.start).add(h(v).diff(h(R)), "ms").format(P);
1131
- else if (c !== w.Day) {
1132
- let S = h(v);
1133
- v = h(A.start).year(S.year()).month(S.month()).date(S.date()).format(P);
1156
+ let b = n.headerItems[T].start, k = n.headerItems[T].end;
1157
+ o !== U.Hour && (k = c(new Date(n.headerItems[T].start)).hour(23).minute(59).second(59).format(V));
1158
+ let A = n.slotId, $ = n.slotName, H = "New";
1159
+ if (h === pe.EVENT) {
1160
+ const z = f;
1161
+ if (l.relativeMove)
1162
+ b = c(z.start).add(c(b).diff(c(new Date(g))), "ms").format(V);
1163
+ else if (u !== O.Day) {
1164
+ let W = c(b);
1165
+ b = c(z.start).year(W.year()).month(W.month()).date(W.date()).format(V);
1134
1166
  }
1135
- if (k = h(v).add(h(A.end).diff(h(A.start)), "ms").format(P), d.crossResourceMove === !1) {
1136
- T = n._getEventSlotId(p), D = void 0;
1137
- let S = n.getSlotById(T);
1138
- S && (D = S.name);
1167
+ if (k = c(b).add(c(z.end).diff(c(z.start)), "ms").format(V), l.crossResourceMove === !1) {
1168
+ A = r._getEventSlotId(f), $ = void 0;
1169
+ let W = r.getSlotById(A);
1170
+ W && ($ = W.name);
1139
1171
  }
1140
- j = "Move";
1172
+ H = "Move";
1141
1173
  }
1142
- o && o(n, T, D, v, k, j, f, p);
1174
+ i && i(r, A, $, b, k, H, h, f);
1143
1175
  },
1144
1176
  canDrop: (t, e) => {
1145
- const { schedulerData: r, resourceEvents: n } = t, i = e.getItem();
1146
- if (r._isResizing())
1177
+ const { schedulerData: s, resourceEvents: r } = t, n = e.getItem();
1178
+ if (s._isResizing())
1147
1179
  return !1;
1148
- const { config: o } = r;
1149
- return o.movable && !n.groupOnly && (i.movable == null || i.movable !== !1);
1180
+ const { config: i } = s;
1181
+ return i.movable && !r.groupOnly && (n.movable == null || n.movable !== !1);
1150
1182
  }
1151
1183
  }));
1152
- M(this, "getDropCollect", (t, e) => ({
1184
+ P(this, "getDropCollect", (t, e) => ({
1153
1185
  connectDropTarget: t.dropTarget(),
1154
1186
  isOver: e.isOver()
1155
1187
  }));
1156
- M(this, "getDropTarget", () => Kt([...this.sourceMap.keys()], this.getDropSpec(), this.getDropCollect)(this.DecoratedComponent));
1157
- M(this, "getDndSource", (t = ie.EVENT) => this.sourceMap.get(t));
1158
- this.sourceMap = /* @__PURE__ */ new Map(), t.forEach((r) => {
1159
- this.sourceMap.set(r.dndType, r);
1188
+ P(this, "getDropTarget", (t) => t ? es([...this.sourceMap.keys()], this.getDropSpec(), this.getDropCollect)(this.DecoratedComponent) : this.DecoratedComponent);
1189
+ P(this, "getDndSource", (t = pe.EVENT) => this.sourceMap.get(t));
1190
+ this.sourceMap = /* @__PURE__ */ new Map(), t.forEach((s) => {
1191
+ this.sourceMap.set(s.dndType, s);
1160
1192
  }), this.DecoratedComponent = e;
1161
1193
  }
1162
1194
  }
1163
- function at({ schedulerData: b, contentScrollbarHeight: t, slotClickedFunc: e, slotItemTemplateResolver: r, toggleExpandFunc: n }) {
1164
- const { renderData: i } = b, o = b.getResourceTableWidth() - 2, a = t, d = i.filter((m) => m.render), c = (m) => {
1165
- n && n(b, m.slotId);
1166
- }, h = (m) => {
1167
- e && e(b, m);
1168
- }, p = (m) => {
1169
- const E = Array.from({ length: m.indent }, (k, T) => /* @__PURE__ */ l.jsx("span", { className: "expander-space" }, `es${T}`)), R = m.hasChildren ? m.expanded ? /* @__PURE__ */ l.jsx(Bt, { onClick: () => c(m) }, `es${m.indent}`) : /* @__PURE__ */ l.jsx(Vt, { onClick: () => c(m) }, `es${m.indent}`) : /* @__PURE__ */ l.jsx("span", { className: "expander-space" }, `es${m.indent}`);
1170
- E.push(R);
1171
- const C = e ? /* @__PURE__ */ l.jsx("a", { className: "slot-text", onClick: () => h(m), children: m.slotName }) : /* @__PURE__ */ l.jsx("span", { className: "slot-text", children: m.slotName });
1172
- let x = /* @__PURE__ */ l.jsx("div", { title: m.slotName, className: "overflow-text header2-text", style: { textAlign: "left" }, children: /* @__PURE__ */ l.jsxs("span", { className: "slot-cell", children: [
1173
- E,
1174
- C
1175
- ] }) });
1176
- if (r) {
1177
- const k = r(b, m, e, o, "overflow-text header2-text");
1178
- k && (x = k);
1195
+ const ft = ({ schedulerData: R, contentScrollbarHeight: t, slotClickedFunc: e, slotItemTemplateResolver: s, toggleExpandFunc: r }) => {
1196
+ const { renderData: n } = R, i = R.getResourceTableWidth() - 2, o = t, l = n.filter((h) => h.render), u = (h) => {
1197
+ r && r(R, h.slotId);
1198
+ }, c = (h, v) => {
1199
+ let D = /* @__PURE__ */ d.jsx("span", { className: "expander-space" }, `es${h.indent}`);
1200
+ h.hasChildren && (D = h.expanded ? /* @__PURE__ */ d.jsx(ss, { style: {}, className: "", onClick: () => u(h) }, `es${h.indent}`) : /* @__PURE__ */ d.jsx(rs, { style: {}, className: "", onClick: () => u(h) }, `es${h.indent}`)), v.push(D);
1201
+ const g = e ? /* @__PURE__ */ d.jsxs("span", { className: "slot-cell", children: [
1202
+ v,
1203
+ /* @__PURE__ */ d.jsx("a", { style: { cursor: "pointer" }, className: "slot-text", onClick: () => e(R, h), children: h.slotName })
1204
+ ] }) : /* @__PURE__ */ d.jsxs("span", { className: "slot-cell", children: [
1205
+ v,
1206
+ /* @__PURE__ */ d.jsx("span", { className: "slot-text", style: { cursor: e === void 0 ? void 0 : "pointer" }, children: h.slotName })
1207
+ ] });
1208
+ let w = /* @__PURE__ */ d.jsx("div", { title: h.slotName, className: "overflow-text header2-text", style: { textAlign: "left" }, children: g });
1209
+ if (s) {
1210
+ const b = s(R, h, e, i, "overflow-text header2-text");
1211
+ b && (w = b);
1179
1212
  }
1180
- const v = {
1181
- height: m.rowHeight,
1182
- backgroundColor: m.groupOnly ? b.config.groupOnlySlotColor : void 0
1213
+ const T = {
1214
+ height: h.rowHeight,
1215
+ backgroundColor: h.groupOnly ? R.config.groupOnlySlotColor : void 0
1183
1216
  };
1184
- return /* @__PURE__ */ l.jsx("tr", { children: /* @__PURE__ */ l.jsx("td", { "data-resource-id": m.slotId, style: v, children: x }) }, m.slotId);
1185
- }, f = d.map(p);
1186
- return /* @__PURE__ */ l.jsx("div", { style: { paddingBottom: a }, children: /* @__PURE__ */ l.jsx("table", { className: "resource-table", children: /* @__PURE__ */ l.jsx("tbody", { children: f }) }) });
1187
- }
1188
- at.propTypes = {
1189
- schedulerData: u.object.isRequired,
1190
- contentScrollbarHeight: u.number.isRequired,
1191
- slotClickedFunc: u.func,
1192
- slotItemTemplateResolver: u.func,
1193
- toggleExpandFunc: u.func
1194
- };
1195
- function lt({ schedulerData: b, nonAgendaCellHeaderTemplateResolver: t }) {
1196
- const { headers: e, cellUnit: r, config: n, localeMoment: i } = b, o = b.getTableHeaderHeight(), a = b.getContentCellWidth(), d = b.getMinuteStepsInHour(), c = typeof t == "function" ? t : null, h = e.map((p, f) => {
1197
- if (r === O.Hour && f % d !== 0)
1198
- return /* @__PURE__ */ l.jsx(l.Fragment, {});
1199
- const { time: m, nonWorkingTime: E } = p, R = i(m);
1200
- let C = {};
1201
- r === O.Hour ? (C = E ? { width: a * d, color: n.nonWorkingTimeHeadColor, backgroundColor: n.nonWorkingTimeHeadBgColor } : { width: a * d }, f === e.length - d && (C = E ? { color: n.nonWorkingTimeHeadColor, backgroundColor: n.nonWorkingTimeHeadColor } : {})) : (C = E ? { width: a, color: n.nonWorkingTimeHeadColor, backgroundColor: n.nonWorkingTimeHeadBgColor } : { width: a }, f === e.length - 1 && (C = p.nonWorkingTime ? { color: n.nonWorkingTimeHeadColor, backgroundColor: n.nonWorkingTimeHeadBgColor } : {}));
1202
- let x;
1203
- switch (r) {
1204
- case O.Hour:
1205
- x = n.nonAgendaDayCellHeaderFormat;
1206
- break;
1207
- case O.Week:
1208
- x = n.nonAgendaWeekCellHeaderFormat;
1209
- break;
1210
- case O.Month:
1211
- x = n.nonAgendaMonthCellHeaderFormat;
1212
- break;
1213
- case O.Year:
1214
- x = n.nonAgendaYearCellHeaderFormat;
1215
- break;
1216
- default:
1217
- x = n.nonAgendaOtherCellHeaderFormat;
1218
- break;
1219
- }
1220
- const v = x.split("|").map((D) => R.format(D)), k = v.map((D, j) => /* @__PURE__ */ l.jsx("div", { children: D }, j));
1221
- return c ? c(b, p, v, C) : /* @__PURE__ */ l.jsx("th", { className: "header3-text", style: C, children: /* @__PURE__ */ l.jsx("div", { children: k }) }, m);
1217
+ return /* @__PURE__ */ d.jsx("tr", { children: /* @__PURE__ */ d.jsx("td", { "data-resource-id": h.slotId, style: T, children: w }) }, h.slotId);
1218
+ }, f = l.map((h) => {
1219
+ const v = [];
1220
+ for (let D = 0; D < h.indent; D++)
1221
+ v.push(/* @__PURE__ */ d.jsx("span", { className: "expander-space" }, `es${D}`));
1222
+ return c(h, v);
1222
1223
  });
1223
- return /* @__PURE__ */ l.jsx("thead", { children: /* @__PURE__ */ l.jsx("tr", { style: { height: o }, children: h }) });
1224
- }
1225
- lt.propTypes = {
1226
- schedulerData: u.object.isRequired,
1227
- nonAgendaCellHeaderTemplateResolver: u.func
1224
+ return /* @__PURE__ */ d.jsx("div", { style: { paddingBottom: o }, children: /* @__PURE__ */ d.jsx("table", { className: "resource-table", children: /* @__PURE__ */ d.jsx("tbody", { children: f }) }) });
1228
1225
  };
1229
- function dt({ schedulerData: b }) {
1230
- const { renderData: t, headers: e, config: r, behaviors: n } = b;
1231
- let i = b.getContentCellWidth();
1232
- const o = t.filter((a) => a.render).map(({ slotId: a, groupOnly: d, rowHeight: c }) => {
1233
- let h = e.map((p, f) => {
1234
- const m = `${a}_${p.time}`, E = f === e.length - 1 ? {} : { width: i };
1235
- if (p.nonWorkingTime && (E.backgroundColor = r.nonWorkingTimeBodyBgColor), d && (E.backgroundColor = r.groupOnlySlotColor), n.getNonAgendaViewBodyCellBgColorFunc) {
1236
- let R = n.getNonAgendaViewBodyCellBgColorFunc(b, a, p);
1237
- R && (E.backgroundColor = R);
1226
+ ft.propTypes = {
1227
+ schedulerData: p.object.isRequired,
1228
+ contentScrollbarHeight: p.number.isRequired,
1229
+ slotClickedFunc: p.func,
1230
+ slotItemTemplateResolver: p.func,
1231
+ toggleExpandFunc: p.func
1232
+ };
1233
+ class pt extends We {
1234
+ constructor(t) {
1235
+ super(t);
1236
+ }
1237
+ render() {
1238
+ const { schedulerData: t, nonAgendaCellHeaderTemplateResolver: e } = this.props, { headers: s, cellUnit: r, config: n, localeDayjs: i } = t;
1239
+ let o = t.getTableHeaderHeight(), l = t.getContentCellWidth(), u = t.getMinuteStepsInHour(), c = [], f = {};
1240
+ return r === U.Hour ? s.forEach((h, v) => {
1241
+ if (v % u === 0) {
1242
+ let D = i(new Date(h.time));
1243
+ D.isSame(/* @__PURE__ */ new Date(), "hour"), f = h.nonWorkingTime ? {
1244
+ width: l * u,
1245
+ color: n.nonWorkingTimeHeadColor,
1246
+ backgroundColor: n.nonWorkingTimeHeadBgColor
1247
+ } : {
1248
+ width: l * u
1249
+ }, v === s.length - u && (f = h.nonWorkingTime ? { color: n.nonWorkingTimeHeadColor, backgroundColor: n.nonWorkingTimeHeadBgColor } : {});
1250
+ let g = n.nonAgendaDayCellHeaderFormat.split("|").map((T) => D.format(T)), w;
1251
+ if (typeof e == "function")
1252
+ w = e(t, h, g, f);
1253
+ else {
1254
+ const T = g.map((b, k) => /* @__PURE__ */ d.jsx("div", { children: b }, k));
1255
+ w = /* @__PURE__ */ d.jsx("th", { className: "header3-text", style: f, children: /* @__PURE__ */ d.jsx("div", { children: T }) }, h.time);
1256
+ }
1257
+ c.push(w);
1238
1258
  }
1239
- return /* @__PURE__ */ l.jsx("td", { style: E, children: /* @__PURE__ */ l.jsx("div", {}) }, m);
1259
+ }) : c = s.map((h, v) => {
1260
+ let D = i(new Date(h.time));
1261
+ f = h.nonWorkingTime ? {
1262
+ width: l,
1263
+ color: n.nonWorkingTimeHeadColor,
1264
+ backgroundColor: n.nonWorkingTimeHeadBgColor
1265
+ } : { width: l }, v === s.length - 1 && (f = h.nonWorkingTime ? { color: n.nonWorkingTimeHeadColor, backgroundColor: n.nonWorkingTimeHeadBgColor } : {});
1266
+ let w = (r === U.Week ? n.nonAgendaWeekCellHeaderFormat : r === U.Month ? n.nonAgendaMonthCellHeaderFormat : r === U.Year ? n.nonAgendaYearCellHeaderFormat : n.nonAgendaOtherCellHeaderFormat).split("|").map((b) => D.format(b));
1267
+ if (typeof e == "function")
1268
+ return e(t, h, w, f);
1269
+ const T = w.map((b, k) => /* @__PURE__ */ d.jsx("div", { children: b }, k));
1270
+ return /* @__PURE__ */ d.jsx("th", { className: "header3-text", style: f, children: /* @__PURE__ */ d.jsx("div", { children: T }) }, h.time);
1271
+ }), /* @__PURE__ */ d.jsx("thead", { children: /* @__PURE__ */ d.jsx("tr", { style: { height: o }, children: c }) });
1272
+ }
1273
+ }
1274
+ P(pt, "propTypes", {
1275
+ schedulerData: Y.object.isRequired,
1276
+ nonAgendaCellHeaderTemplateResolver: Y.func
1277
+ });
1278
+ function gt({ schedulerData: R }) {
1279
+ const { renderData: t, headers: e, config: s, behaviors: r } = R, n = R.getContentCellWidth(), i = t.filter((o) => o.render).map(({ slotId: o, groupOnly: l, rowHeight: u }) => {
1280
+ const c = e.map((f, h) => {
1281
+ const v = `${o}_${f.time}`, D = h === e.length - 1 ? {} : { width: n };
1282
+ if (f.nonWorkingTime && (D.backgroundColor = s.nonWorkingTimeBodyBgColor), l && (D.backgroundColor = s.groupOnlySlotColor), r.getNonAgendaViewBodyCellBgColorFunc) {
1283
+ const g = r.getNonAgendaViewBodyCellBgColorFunc(R, o, f);
1284
+ g && (D.backgroundColor = g);
1285
+ }
1286
+ return /* @__PURE__ */ d.jsx("td", { style: D, children: /* @__PURE__ */ d.jsx("div", {}) }, v);
1240
1287
  });
1241
- return /* @__PURE__ */ l.jsx("tr", { style: { height: c }, children: h }, a);
1288
+ return /* @__PURE__ */ d.jsx("tr", { style: { height: u }, children: c }, o);
1242
1289
  });
1243
- return /* @__PURE__ */ l.jsx("tbody", { children: o });
1290
+ return /* @__PURE__ */ d.jsx("tbody", { children: i });
1244
1291
  }
1245
- dt.propTypes = {
1246
- schedulerData: u.object.isRequired
1292
+ gt.propTypes = {
1293
+ schedulerData: p.object.isRequired
1247
1294
  };
1248
- function ct({ number: b, left: t, width: e, top: r, clickAction: n, headerItem: i, schedulerData: o }) {
1249
- const { config: a } = o;
1250
- let d = "+" + b + "more";
1251
- return /* @__PURE__ */ l.jsx("a", { className: "timeline-event", style: { left: t, width: e, top: r }, onClick: () => n(i), children: /* @__PURE__ */ l.jsx("div", { style: { height: a.eventItemHeight, color: "#999", textAlign: "center" }, children: d }) });
1252
- }
1253
- ct.propTypes = {
1254
- schedulerData: u.object.isRequired,
1255
- number: u.number.isRequired,
1256
- left: u.number.isRequired,
1257
- width: u.number.isRequired,
1258
- top: u.number.isRequired,
1259
- clickAction: u.func.isRequired,
1260
- headerItem: u.object.isRequired
1295
+ const vt = ({ schedulerData: R, number: t, left: e, width: s, top: r, clickAction: n, headerItem: i }) => {
1296
+ const { config: o } = R, l = `+${t} more`;
1297
+ return /* @__PURE__ */ d.jsx("a", { className: "timeline-event", style: { left: e, width: s, top: r }, onClick: () => n(i), children: /* @__PURE__ */ d.jsx("div", { style: { height: o.eventItemHeight, color: "#999", textAlign: "center" }, children: l }) });
1298
+ };
1299
+ vt.propTypes = {
1300
+ schedulerData: p.object.isRequired,
1301
+ number: p.number.isRequired,
1302
+ left: p.number.isRequired,
1303
+ width: p.number.isRequired,
1304
+ top: p.number.isRequired,
1305
+ clickAction: p.func.isRequired,
1306
+ headerItem: p.object.isRequired
1261
1307
  };
1262
- function ut({ summary: b, left: t, width: e, top: r, schedulerData: n }) {
1263
- const { config: i } = n, o = b.color || i.summaryColor;
1264
- let a = "center";
1265
- i.summaryPos === ae.TopRight || i.summaryPos === ae.BottomRight ? a = "right" : (i.summaryPos === ae.TopLeft || i.summaryPos === ae.BottomLeft) && (a = "left");
1266
- const d = {
1267
- height: i.eventItemHeight,
1268
- color: o,
1269
- textAlign: a,
1270
- margin: "0 6px",
1271
- fontSize: b.fontSize
1308
+ const mt = ({ schedulerData: R, summary: t, left: e, width: s, top: r }) => {
1309
+ const { config: n } = R, i = t.color !== void 0 ? t.color : n.summaryColor;
1310
+ let o = "center";
1311
+ n.summaryPos === me.TopRight || n.summaryPos === me.BottomRight ? o = "right" : (n.summaryPos === me.TopLeft || n.summaryPos === me.BottomLeft) && (o = "left");
1312
+ const l = {
1313
+ height: n.eventItemHeight,
1314
+ color: i,
1315
+ textAlign: o,
1316
+ marginLeft: "6px",
1317
+ marginRight: "6px",
1318
+ ...t.fontSize !== void 0 ? { fontSize: t.fontSize } : {}
1272
1319
  };
1273
- return /* @__PURE__ */ l.jsx("a", { className: "timeline-event header2-text", style: { left: t, width: e, top: r, cursor: "default" }, children: /* @__PURE__ */ l.jsx("div", { style: d, children: b.text }) });
1274
- }
1275
- ut.propTypes = {
1276
- schedulerData: u.object.isRequired,
1277
- summary: u.object.isRequired,
1278
- left: u.number.isRequired,
1279
- width: u.number.isRequired,
1280
- top: u.number.isRequired
1320
+ return /* @__PURE__ */ d.jsx("a", { className: "timeline-event header2-text", style: { left: e, width: s, top: r, cursor: "default" }, children: /* @__PURE__ */ d.jsx("div", { style: l, children: t.text }) });
1321
+ };
1322
+ mt.propTypes = {
1323
+ schedulerData: p.object.isRequired,
1324
+ summary: p.object.isRequired,
1325
+ left: p.number.isRequired,
1326
+ width: p.number.isRequired,
1327
+ top: p.number.isRequired
1281
1328
  };
1282
- function ht({ left: b, width: t, schedulerData: e }) {
1283
- const { config: r } = e, n = {
1284
- left: b,
1329
+ const Dt = ({ left: R, width: t, schedulerData: e }) => {
1330
+ const { config: s } = e, r = {
1331
+ left: R,
1285
1332
  width: t,
1286
1333
  top: 0,
1287
1334
  bottom: 0,
1288
- backgroundColor: r.selectedAreaColor
1335
+ backgroundColor: s.selectedAreaColor
1289
1336
  };
1290
- return /* @__PURE__ */ l.jsx("div", { className: "selected-area", style: n });
1291
- }
1292
- ht.propTypes = {
1293
- schedulerData: u.object.isRequired,
1294
- left: u.number.isRequired,
1295
- width: u.number.isRequired
1337
+ return /* @__PURE__ */ d.jsx("div", { className: "selected-area", style: r });
1338
+ };
1339
+ Dt.propTypes = {
1340
+ schedulerData: p.object.isRequired,
1341
+ left: p.number.isRequired,
1342
+ width: p.number.isRequired
1296
1343
  };
1297
- const le = "ontouchstart" in window;
1298
- class ft extends _e {
1344
+ class yt extends We {
1299
1345
  constructor(e) {
1300
1346
  super(e);
1301
- M(this, "initDrag", (e) => {
1302
- const { isSelecting: r } = this.state;
1303
- if (r || (e.srcElement || e.target) !== this.eventContainer)
1347
+ P(this, "initDrag", (e) => {
1348
+ const { isSelecting: s } = this.state;
1349
+ if (s || (e.srcElement || e.target) !== this.eventContainer)
1304
1350
  return;
1305
1351
  e.stopPropagation();
1306
- const { resourceEvents: n } = this.props;
1307
- if (n.groupOnly)
1352
+ const { resourceEvents: r } = this.props;
1353
+ if (r.groupOnly)
1308
1354
  return;
1309
- let i = 0;
1310
- if (le) {
1355
+ let n = 0;
1356
+ if (this.supportTouch) {
1311
1357
  if (e.changedTouches.length == 0)
1312
1358
  return;
1313
- i = e.changedTouches[0].pageX;
1359
+ n = e.changedTouches[0].pageX;
1314
1360
  } else {
1315
1361
  if (e.buttons !== void 0 && e.buttons !== 1)
1316
1362
  return;
1317
- i = e.clientX;
1363
+ n = e.clientX;
1318
1364
  }
1319
- const { schedulerData: o } = this.props;
1320
- let a = o.getContentCellWidth(), d = pe(this.eventContainer), c = i - d.x, h = Math.floor(c / a), p = h * a, f = Math.ceil(c / a), m = (f - h) * a;
1365
+ const { schedulerData: i } = this.props;
1366
+ let o = i.getContentCellWidth(), l = Te(this.eventContainer), u = n - l.x, c = Math.floor(u / o), f = c * o, h = Math.ceil(u / o), v = (h - c) * o;
1321
1367
  this.setState({
1322
- startX: c,
1323
- left: p,
1324
- leftIndex: h,
1325
- width: m,
1326
- rightIndex: f,
1368
+ startX: u,
1369
+ left: f,
1370
+ leftIndex: c,
1371
+ width: v,
1372
+ rightIndex: h,
1327
1373
  isSelecting: !0
1328
- }), le ? (document.documentElement.addEventListener("touchmove", this.doDrag, !1), document.documentElement.addEventListener("touchend", this.stopDrag, !1), document.documentElement.addEventListener("touchcancel", this.cancelDrag, !1)) : (document.documentElement.addEventListener("mousemove", this.doDrag, !1), document.documentElement.addEventListener("mouseup", this.stopDrag, !1)), document.onselectstart = function() {
1374
+ }), this.supportTouch ? (document.documentElement.addEventListener("touchmove", this.doDrag, !1), document.documentElement.addEventListener("touchend", this.stopDrag, !1), document.documentElement.addEventListener("touchcancel", this.cancelDrag, !1)) : (document.documentElement.addEventListener("mousemove", this.doDrag, !1), document.documentElement.addEventListener("mouseup", this.stopDrag, !1)), document.onselectstart = function() {
1329
1375
  return !1;
1330
1376
  }, document.ondragstart = function() {
1331
1377
  return !1;
1332
1378
  };
1333
1379
  });
1334
- M(this, "doDrag", (e) => {
1380
+ P(this, "doDrag", (e) => {
1335
1381
  e.stopPropagation();
1336
- let r = 0;
1337
- if (le) {
1382
+ let s = 0;
1383
+ if (this.supportTouch) {
1338
1384
  if (e.changedTouches.length == 0)
1339
1385
  return;
1340
- r = e.changedTouches[0].pageX;
1386
+ s = e.changedTouches[0].pageX;
1341
1387
  } else
1342
- r = e.clientX;
1343
- const { startX: n } = this.state, { schedulerData: i } = this.props, { headers: o } = i;
1344
- let a = i.getContentCellWidth(), d = pe(this.eventContainer), c = r - d.x, h = Math.floor(Math.min(n, c) / a);
1345
- h = h < 0 ? 0 : h;
1346
- let p = h * a, f = Math.ceil(Math.max(n, c) / a);
1347
- f = f > o.length ? o.length : f;
1348
- let m = (f - h) * a;
1388
+ s = e.clientX;
1389
+ const { startX: r } = this.state, { schedulerData: n } = this.props, { headers: i } = n;
1390
+ let o = n.getContentCellWidth(), l = Te(this.eventContainer), u = s - l.x, c = Math.floor(Math.min(r, u) / o);
1391
+ c = c < 0 ? 0 : c;
1392
+ let f = c * o, h = Math.ceil(Math.max(r, u) / o);
1393
+ h = h > i.length ? i.length : h;
1394
+ let v = (h - c) * o;
1349
1395
  this.setState({
1350
- leftIndex: h,
1351
- left: p,
1352
- rightIndex: f,
1353
- width: m,
1396
+ leftIndex: c,
1397
+ left: f,
1398
+ rightIndex: h,
1399
+ width: v,
1354
1400
  isSelecting: !0
1355
1401
  });
1356
1402
  });
1357
- M(this, "stopDrag", (e) => {
1403
+ P(this, "stopDrag", (e) => {
1358
1404
  e.stopPropagation();
1359
- const { schedulerData: r, newEvent: n, resourceEvents: i } = this.props, { headers: o, events: a, config: d, cellUnit: c, localeMoment: h } = r, { leftIndex: p, rightIndex: f } = this.state;
1360
- le ? (document.documentElement.removeEventListener("touchmove", this.doDrag, !1), document.documentElement.removeEventListener("touchend", this.stopDrag, !1), document.documentElement.removeEventListener("touchcancel", this.cancelDrag, !1)) : (document.documentElement.removeEventListener("mousemove", this.doDrag, !1), document.documentElement.removeEventListener("mouseup", this.stopDrag, !1)), document.onselectstart = null, document.ondragstart = null;
1361
- let m = o[p].time, E = i.headerItems[f - 1].end;
1362
- c !== O.Hour && (E = h(i.headerItems[f - 1].start).hour(23).minute(59).second(59).format(P));
1363
- let R = i.slotId, C = i.slotName;
1405
+ const { schedulerData: s, newEvent: r, resourceEvents: n } = this.props, { headers: i, events: o, config: l, cellUnit: u, localeDayjs: c } = s, { leftIndex: f, rightIndex: h } = this.state;
1406
+ this.supportTouch ? (document.documentElement.removeEventListener("touchmove", this.doDrag, !1), document.documentElement.removeEventListener("touchend", this.stopDrag, !1), document.documentElement.removeEventListener("touchcancel", this.cancelDrag, !1)) : (document.documentElement.removeEventListener("mousemove", this.doDrag, !1), document.documentElement.removeEventListener("mouseup", this.stopDrag, !1)), document.onselectstart = null, document.ondragstart = null;
1407
+ let v = i[f].time, D = n.headerItems[h - 1].end;
1408
+ u !== U.Hour && (D = c(new Date(n.headerItems[h - 1].start)).hour(23).minute(59).second(59).format(V));
1409
+ let g = n.slotId, w = n.slotName;
1364
1410
  this.setState({
1365
1411
  startX: 0,
1366
1412
  leftIndex: 0,
@@ -1369,42 +1415,42 @@ class ft extends _e {
1369
1415
  width: 0,
1370
1416
  isSelecting: !1
1371
1417
  });
1372
- let x = !1;
1373
- if (d.checkConflict) {
1374
- let v = h(m), k = h(E);
1375
- a.forEach((T) => {
1376
- if (r._getEventSlotId(T) === R) {
1377
- let D = h(T.start), j = h(T.end);
1378
- (v >= D && v < j || k > D && k <= j || D >= v && D < k || j > v && j <= k) && (x = !0);
1418
+ let T = !1;
1419
+ if (l.checkConflict) {
1420
+ let b = c(new Date(v)), k = c(D);
1421
+ o.forEach((A) => {
1422
+ if (s._getEventSlotId(A) === g) {
1423
+ let $ = c(A.start), H = c(A.end);
1424
+ (b >= $ && b < H || k > $ && k <= H || $ >= b && $ < k || H > b && H <= k) && (T = !0);
1379
1425
  }
1380
1426
  });
1381
1427
  }
1382
- if (x) {
1383
- const { conflictOccurred: v } = this.props;
1384
- v != null ? v(
1385
- r,
1428
+ if (T) {
1429
+ const { conflictOccurred: b } = this.props;
1430
+ b != null ? b(
1431
+ s,
1386
1432
  "New",
1387
1433
  {
1388
1434
  id: void 0,
1389
- start: m,
1390
- end: E,
1391
- slotId: R,
1392
- slotName: C,
1435
+ start: v,
1436
+ end: D,
1437
+ slotId: g,
1438
+ slotName: w,
1393
1439
  title: void 0
1394
1440
  },
1395
- ie.EVENT,
1396
- R,
1397
- C,
1398
- m,
1399
- E
1441
+ pe.EVENT,
1442
+ g,
1443
+ w,
1444
+ v,
1445
+ D
1400
1446
  ) : console.log("Conflict occurred, set conflictOccurred func in Scheduler to handle it");
1401
1447
  } else
1402
- n != null && n(r, R, C, m, E);
1448
+ r != null && r(s, g, w, v, D);
1403
1449
  });
1404
- M(this, "cancelDrag", (e) => {
1450
+ P(this, "cancelDrag", (e) => {
1405
1451
  e.stopPropagation();
1406
- const { isSelecting: r } = this.state;
1407
- r && (document.documentElement.removeEventListener("touchmove", this.doDrag, !1), document.documentElement.removeEventListener("touchend", this.stopDrag, !1), document.documentElement.removeEventListener("touchcancel", this.cancelDrag, !1), document.onselectstart = null, document.ondragstart = null, this.setState({
1452
+ const { isSelecting: s } = this.state;
1453
+ s && (document.documentElement.removeEventListener("touchmove", this.doDrag, !1), document.documentElement.removeEventListener("touchend", this.stopDrag, !1), document.documentElement.removeEventListener("touchcancel", this.cancelDrag, !1), document.onselectstart = null, document.ondragstart = null, this.setState({
1408
1454
  startX: 0,
1409
1455
  leftIndex: 0,
1410
1456
  left: 0,
@@ -1413,236 +1459,580 @@ class ft extends _e {
1413
1459
  isSelecting: !1
1414
1460
  }));
1415
1461
  });
1416
- M(this, "onAddMoreClick", (e) => {
1417
- const { onSetAddMoreState: r, resourceEvents: n, schedulerData: i } = this.props;
1418
- if (r) {
1419
- const { config: o } = i;
1420
- let a = i.getContentCellWidth(), d = n.headerItems.indexOf(e);
1421
- if (d !== -1) {
1422
- let c = d * (a - 1), h = pe(this.eventContainer);
1423
- c = c + h.x;
1424
- let p = h.y, f = (e.count + 1) * o.eventItemLineHeight + 20;
1425
- r({
1462
+ P(this, "onAddMoreClick", (e) => {
1463
+ const { onSetAddMoreState: s, resourceEvents: r, schedulerData: n } = this.props;
1464
+ if (s) {
1465
+ const { config: i } = n;
1466
+ let o = n.getContentCellWidth(), l = r.headerItems.indexOf(e);
1467
+ if (l !== -1) {
1468
+ let u = l * (o - 1), c = Te(this.eventContainer);
1469
+ u = u + c.x;
1470
+ let f = c.y, h = (e.count + 1) * i.eventItemLineHeight + 20;
1471
+ s({
1426
1472
  headerItem: e,
1427
- left: c,
1428
- top: p,
1429
- height: f
1473
+ left: u,
1474
+ top: f,
1475
+ height: h
1430
1476
  });
1431
1477
  }
1432
1478
  }
1433
1479
  });
1434
- M(this, "eventContainerRef", (e) => {
1480
+ P(this, "eventContainerRef", (e) => {
1435
1481
  this.eventContainer = e;
1436
1482
  });
1437
1483
  this.state = {
1438
1484
  isSelecting: !1,
1439
1485
  left: 0,
1440
1486
  width: 0
1441
- };
1487
+ }, this.supportTouch = !1;
1442
1488
  }
1443
1489
  componentDidMount() {
1444
- const { schedulerData: e } = this.props, { config: r } = e;
1445
- r.creatable === !0 && (le || this.eventContainer.addEventListener("mousedown", this.initDrag, !1));
1490
+ const { schedulerData: e } = this.props, { config: s } = e;
1491
+ this.supportTouch = "ontouchstart" in window, s.creatable === !0 && (this.supportTouch || this.eventContainer.addEventListener("mousedown", this.initDrag, !1));
1446
1492
  }
1447
- UNSAFE_componentWillReceiveProps(e) {
1448
- le || this.eventContainer.removeEventListener("mousedown", this.initDrag, !1), e.schedulerData.config.creatable && (le || this.eventContainer.addEventListener("mousedown", this.initDrag, !1));
1493
+ componentDidUpdate(e, s) {
1494
+ e !== this.props && (this.supportTouch || this.eventContainer.removeEventListener("mousedown", this.initDrag, !1), this.props.schedulerData.config.creatable && (this.supportTouch || this.eventContainer.addEventListener("mousedown", this.initDrag, !1)));
1449
1495
  }
1450
1496
  render() {
1451
- const { resourceEvents: e, schedulerData: r, connectDropTarget: n, dndSource: i } = this.props, { cellUnit: o, startDate: a, endDate: d, config: c, localeMoment: h } = r, { isSelecting: p, left: f, width: m } = this.state;
1452
- let E = r.getContentCellWidth(), R = r.getCellMaxEvents(), C = r.getContentTableWidth(), x = i.getDragSource(), v = p ? /* @__PURE__ */ l.jsx(ht, { ...this.props, left: f, width: m }) : /* @__PURE__ */ l.jsx("div", {}), k = [];
1453
- return e.headerItems.forEach((T, D) => {
1454
- if (T.count > 0 || T.summary != null) {
1455
- let j = c.summaryPos === ae.TopRight || c.summaryPos === ae.Top || c.summaryPos === ae.TopLeft, N = e.hasSummary && j ? 1 + c.eventItemLineHeight : 1, A = T.addMore === 0 ? R : T.addMoreIndex;
1456
- if (T.events.forEach((S, _) => {
1457
- if (_ < A && S !== void 0 && S.render) {
1458
- let q = h(a), Q = h(d).add(1, "days");
1459
- o === O.Hour && (q = h(a).add(c.dayStartFrom, "hours"), Q = h(d).add(c.dayStopTo + 1, "hours"));
1460
- let G = h(S.eventItem.start), K = h(S.eventItem.end), U = G >= q, z = K <= Q, Y = D * E + (D > 0 ? 2 : 3), $ = S.span * E - (D > 0 ? 5 : 6) > 0 ? S.span * E - (D > 0 ? 5 : 6) : 0, V = N + _ * c.eventItemLineHeight, ne = /* @__PURE__ */ he(
1461
- x,
1497
+ const { resourceEvents: e, schedulerData: s, connectDropTarget: r, dndSource: n } = this.props, { cellUnit: i, startDate: o, endDate: l, config: u, localeDayjs: c } = s, { isSelecting: f, left: h, width: v } = this.state;
1498
+ let D = s.getContentCellWidth(), g = s.getCellMaxEvents(), w = s.getContentTableWidth(), T = n.getDragSource(), b = f ? /* @__PURE__ */ d.jsx(Dt, { ...this.props, left: h, width: v }) : /* @__PURE__ */ d.jsx("div", {}), k = [];
1499
+ e.headerItems.forEach(($, H) => {
1500
+ if ($.count > 0 || $.summary != null) {
1501
+ let N = u.summaryPos === me.TopRight || u.summaryPos === me.Top || u.summaryPos === me.TopLeft, z = e.hasSummary && N ? 1 + u.eventItemLineHeight : 1, W = $.addMore === 0 ? g : $.addMoreIndex;
1502
+ if ($.events.forEach((C, X) => {
1503
+ if (X < W && C !== void 0 && C.render) {
1504
+ let Z = c(new Date(o)), S = c(l).add(1, "days");
1505
+ i === U.Hour && (Z = c(new Date(o)).add(u.dayStartFrom, "hours"), S = c(l).add(u.dayStopTo + 1, "hours"));
1506
+ let x = c(C.eventItem.start), y = c(C.eventItem.end), j = x >= Z, m = y <= S, M = H * D + (H > 0 ? 2 : 3), _ = C.span * D - (H > 0 ? 5 : 6) > 0 ? C.span * D - (H > 0 ? 5 : 6) : 0, F = z + X * u.eventItemLineHeight, Q = /* @__PURE__ */ be(
1507
+ T,
1462
1508
  {
1463
1509
  ...this.props,
1464
- key: S.eventItem.id,
1465
- eventItem: S.eventItem,
1466
- isStart: U,
1467
- isEnd: z,
1510
+ key: C.eventItem.id,
1511
+ eventItem: C.eventItem,
1512
+ isStart: j,
1513
+ isEnd: m,
1468
1514
  isInPopover: !1,
1469
- left: Y,
1470
- width: $,
1471
- top: V,
1472
- leftIndex: D,
1473
- rightIndex: D + S.span
1515
+ left: M,
1516
+ width: _,
1517
+ top: F,
1518
+ leftIndex: H,
1519
+ rightIndex: H + C.span
1474
1520
  }
1475
1521
  );
1476
- k.push(ne);
1522
+ k.push(Q);
1477
1523
  }
1478
- }), T.addMore > 0) {
1479
- let S = D * E + (D > 0 ? 2 : 3), _ = E - (D > 0 ? 5 : 6), q = N + T.addMoreIndex * c.eventItemLineHeight, Q = /* @__PURE__ */ he(ct, { ...this.props, key: T.time, headerItem: T, number: T.addMore, left: S, width: _, top: q, clickAction: this.onAddMoreClick });
1480
- k.push(Q);
1524
+ }), $.addMore > 0) {
1525
+ let C = H * D + (H > 0 ? 2 : 3), X = D - (H > 0 ? 5 : 6), Z = z + $.addMoreIndex * u.eventItemLineHeight, S = /* @__PURE__ */ be(
1526
+ vt,
1527
+ {
1528
+ ...this.props,
1529
+ key: $.time,
1530
+ headerItem: $,
1531
+ number: $.addMore,
1532
+ left: C,
1533
+ width: X,
1534
+ top: Z,
1535
+ clickAction: this.onAddMoreClick
1536
+ }
1537
+ );
1538
+ k.push(S);
1481
1539
  }
1482
- if (T.summary != null) {
1483
- let S = j ? 1 : e.rowHeight - c.eventItemLineHeight + 1, _ = D * E + (D > 0 ? 2 : 3), q = E - (D > 0 ? 5 : 6), Q = `${e.slotId}_${T.time}`, G = /* @__PURE__ */ l.jsx(ut, { schedulerData: r, summary: T.summary, left: _, width: q, top: S }, Q);
1484
- k.push(G);
1540
+ if ($.summary != null) {
1541
+ let C = N ? 1 : e.rowHeight - u.eventItemLineHeight + 1, X = H * D + (H > 0 ? 2 : 3), Z = D - (H > 0 ? 5 : 6), S = `${e.slotId}_${$.time}`, x = /* @__PURE__ */ d.jsx(mt, { schedulerData: s, summary: $.summary, left: X, width: Z, top: C }, S);
1542
+ k.push(x);
1485
1543
  }
1486
1544
  }
1487
- }), /* @__PURE__ */ l.jsx("tr", { children: /* @__PURE__ */ l.jsx("td", { style: { width: C }, children: n(
1488
- /* @__PURE__ */ l.jsxs("div", { ref: this.eventContainerRef, className: "event-container", style: { height: e.rowHeight }, children: [
1489
- v,
1490
- k
1491
- ] })
1492
- ) }) });
1545
+ });
1546
+ const A = /* @__PURE__ */ d.jsxs("div", { ref: this.eventContainerRef, className: "event-container", style: { height: e.rowHeight }, children: [
1547
+ b,
1548
+ k
1549
+ ] });
1550
+ return /* @__PURE__ */ d.jsx("tr", { children: /* @__PURE__ */ d.jsx("td", { style: { width: w }, children: u.dragAndDropEnabled ? r(A) : A }) });
1493
1551
  }
1494
1552
  }
1495
- M(ft, "propTypes", {
1496
- resourceEvents: u.object.isRequired,
1497
- schedulerData: u.object.isRequired,
1498
- dndSource: u.object.isRequired,
1499
- onSetAddMoreState: u.func,
1500
- updateEventStart: u.func,
1501
- updateEventEnd: u.func,
1502
- moveEvent: u.func,
1503
- movingEvent: u.func,
1504
- conflictOccurred: u.func,
1505
- subtitleGetter: u.func,
1506
- eventItemClick: u.func,
1507
- viewEventClick: u.func,
1508
- viewEventText: u.string,
1509
- viewEvent2Click: u.func,
1510
- viewEvent2Text: u.string,
1511
- newEvent: u.func,
1512
- eventItemTemplateResolver: u.func
1553
+ P(yt, "propTypes", {
1554
+ resourceEvents: Y.object.isRequired,
1555
+ schedulerData: Y.object.isRequired,
1556
+ dndSource: Y.object.isRequired,
1557
+ onSetAddMoreState: Y.func,
1558
+ updateEventStart: Y.func,
1559
+ updateEventEnd: Y.func,
1560
+ moveEvent: Y.func,
1561
+ movingEvent: Y.func,
1562
+ conflictOccurred: Y.func,
1563
+ subtitleGetter: Y.func,
1564
+ eventItemClick: Y.func,
1565
+ viewEventClick: Y.func,
1566
+ viewEventText: Y.string,
1567
+ viewEvent2Click: Y.func,
1568
+ viewEvent2Text: Y.string,
1569
+ newEvent: Y.func,
1570
+ eventItemTemplateResolver: Y.func
1513
1571
  });
1514
- function mt(b) {
1515
- const { eventItem: t, isStart: e, isEnd: r, eventItemClick: n, schedulerData: i, eventItemTemplateResolver: o } = b, { config: a, behaviors: d } = i, c = e ? r ? "round-all" : "round-head" : r ? "round-tail" : "round-none", h = t.bgColor || a.defaultEventBgColor, p = d.getEventTextFunc(i, t);
1516
- let f = /* @__PURE__ */ l.jsx("div", { className: `${c} event-item`, style: { height: a.eventItemHeight, maxWidth: a.agendaMaxEventWidth, backgroundColor: h }, children: /* @__PURE__ */ l.jsx("span", { style: { marginLeft: "10px", lineHeight: `${a.eventItemHeight}px` }, children: p }) }, t.id);
1517
- o && (f = o(i, t, h, e, r, "event-item", a.eventItemHeight, a.agendaMaxEventWidth));
1518
- const m = () => {
1519
- n && n(i, t);
1520
- }, E = /* @__PURE__ */ l.jsx("a", { className: "day-event", onClick: m, children: f });
1521
- let R = /* @__PURE__ */ l.jsx(Oe, { ...b, title: t.title, startTime: t.start, endTime: t.end, statusColor: h });
1522
- return a.eventItemPopoverEnabled ? /* @__PURE__ */ l.jsx(He, { placement: "bottomLeft", content: R, trigger: "hover", children: E }) : /* @__PURE__ */ l.jsx("span", { children: E });
1572
+ function Et(R) {
1573
+ const { eventItem: t, isStart: e, isEnd: s, eventItemClick: r, schedulerData: n, eventItemTemplateResolver: i } = R, { config: o, behaviors: l } = n, u = e ? s ? "round-all" : "round-head" : s ? "round-tail" : "round-none", c = t.bgColor || o.defaultEventBgColor, f = l.getEventTextFunc(n, t);
1574
+ let h = /* @__PURE__ */ d.jsx("div", { className: `${u} event-item`, style: { height: o.eventItemHeight, maxWidth: o.agendaMaxEventWidth, backgroundColor: c }, children: /* @__PURE__ */ d.jsx("span", { style: { marginLeft: "10px", lineHeight: `${o.eventItemHeight}px` }, children: f }) }, t.id);
1575
+ i && (h = i(n, t, c, e, s, "event-item", o.eventItemHeight, o.agendaMaxEventWidth));
1576
+ const v = () => r == null ? void 0 : r(n, t), D = /* @__PURE__ */ d.jsx("a", { className: "day-event", onClick: v, children: h });
1577
+ let g = /* @__PURE__ */ d.jsx(qe, { ...R, title: t.title, startTime: t.start, endTime: t.end, statusColor: c });
1578
+ return o.eventItemPopoverEnabled ? /* @__PURE__ */ d.jsx(Fe, { placement: "bottomLeft", content: g, trigger: "hover", children: D }) : /* @__PURE__ */ d.jsx("span", { children: D });
1523
1579
  }
1524
- mt.propTypes = {
1525
- schedulerData: u.object.isRequired,
1526
- eventItem: u.object.isRequired,
1527
- isStart: u.bool.isRequired,
1528
- isEnd: u.bool.isRequired,
1529
- subtitleGetter: u.func,
1530
- eventItemClick: u.func,
1531
- viewEventClick: u.func,
1532
- viewEventText: u.string,
1533
- viewEvent2Click: u.func,
1534
- viewEvent2Text: u.string,
1535
- eventItemTemplateResolver: u.func
1580
+ Et.propTypes = {
1581
+ schedulerData: p.object.isRequired,
1582
+ eventItem: p.object.isRequired,
1583
+ isStart: p.bool.isRequired,
1584
+ isEnd: p.bool.isRequired,
1585
+ subtitleGetter: p.func,
1586
+ eventItemClick: p.func,
1587
+ viewEventClick: p.func,
1588
+ viewEventText: p.string,
1589
+ viewEvent2Click: p.func,
1590
+ viewEvent2Text: p.string,
1591
+ eventItemTemplateResolver: p.func
1536
1592
  };
1537
- function gt(b) {
1538
- const { schedulerData: t, resourceEvents: e, slotClickedFunc: r, slotItemTemplateResolver: n } = b, { startDate: i, endDate: o, config: a, localeMoment: d } = t, { slotId: c, slotName: h, headerItems: p } = e;
1539
- let m = t.getResourceTableWidth() - 2;
1540
- const E = d(i).format(W), R = d(o).add(1, "days").format(W);
1541
- let C = [];
1542
- p.forEach(({ start: k, end: T, events: D }) => {
1543
- E === d(k).format(W) && R === d(T).format(W) && D.forEach(({ eventItem: j }) => {
1544
- const { start: N, end: A, id: S } = j, _ = d(i), q = d(o).add(1, "days"), Q = d(N) >= _, G = d(A) < q, K = /* @__PURE__ */ he(mt, { ...b, key: S, eventItem: j, isStart: Q, isEnd: G });
1545
- D.push(K);
1546
- });
1547
- });
1548
- const x = r && /* @__PURE__ */ l.jsx("a", { onClick: () => r(t, e), children: h });
1549
- let v = /* @__PURE__ */ l.jsx("div", { style: { width: m }, title: h, className: "overflow-text header2-text", children: x || /* @__PURE__ */ l.jsx("span", { children: h }) });
1550
- if (n) {
1551
- const k = n(t, e, r, m, "overflow-text header2-text");
1552
- k && (v = k);
1553
- }
1554
- return /* @__PURE__ */ l.jsxs("tr", { style: { minHeight: a.eventItemLineHeight + 2 }, children: [
1555
- /* @__PURE__ */ l.jsx("td", { "data-resource-id": c, children: v }),
1556
- /* @__PURE__ */ l.jsx("td", { children: /* @__PURE__ */ l.jsx("div", { className: "day-event-container", children: C }) })
1593
+ function wt(R) {
1594
+ const { schedulerData: t, resourceEvents: e, slotClickedFunc: s, slotItemTemplateResolver: r } = R, { startDate: n, endDate: i, config: o, localeDayjs: l } = t, u = t.getResourceTableWidth() - 2, c = [];
1595
+ for (const v of e.headerItems) {
1596
+ const D = l(new Date(n)), g = l(i).add(1, "days"), w = l(new Date(v.start)), T = l(new Date(v.end));
1597
+ if (D === w && g === T)
1598
+ for (const b of v.events) {
1599
+ const k = l(new Date(n)), A = l(i).add(1, "days"), $ = l(b.eventItem.start), H = l(b.eventItem.end), N = $ >= k, z = H < A, W = /* @__PURE__ */ be(Et, { ...R, key: b.eventItem.id, eventItem: b.eventItem, isStart: N, isEnd: z });
1600
+ c.push(W);
1601
+ }
1602
+ }
1603
+ const f = s ? /* @__PURE__ */ d.jsx("a", { onClick: () => s(t, e), children: e.slotName }) : /* @__PURE__ */ d.jsx("span", { children: e.slotName });
1604
+ let h = /* @__PURE__ */ d.jsx("div", { style: { width: u }, title: e.slotName, className: "overflow-text header2-text", children: f });
1605
+ if (r) {
1606
+ const v = r(t, e, s, u, "overflow-text header2-text");
1607
+ v && (h = v);
1608
+ }
1609
+ return /* @__PURE__ */ d.jsxs("tr", { style: { minHeight: o.eventItemLineHeight + 2 }, children: [
1610
+ /* @__PURE__ */ d.jsx("td", { "data-resource-id": e.slotId, children: h }),
1611
+ /* @__PURE__ */ d.jsx("td", { children: /* @__PURE__ */ d.jsx("div", { className: "day-event-container", children: c }) })
1557
1612
  ] });
1558
1613
  }
1559
- gt.propTypes = {
1560
- schedulerData: u.object.isRequired,
1561
- resourceEvents: u.object.isRequired,
1562
- subtitleGetter: u.func,
1563
- eventItemClick: u.func,
1564
- viewEventClick: u.func,
1565
- viewEventText: u.string,
1566
- viewEvent2Click: u.func,
1567
- viewEvent2Text: u.string,
1568
- slotClickedFunc: u.func,
1569
- slotItemTemplateResolver: u.func
1614
+ wt.propTypes = {
1615
+ schedulerData: p.object.isRequired,
1616
+ resourceEvents: p.object.isRequired,
1617
+ subtitleGetter: p.func,
1618
+ eventItemClick: p.func,
1619
+ viewEventClick: p.func,
1620
+ viewEventText: p.string,
1621
+ viewEvent2Click: p.func,
1622
+ viewEvent2Text: p.string,
1623
+ slotClickedFunc: p.func,
1624
+ slotItemTemplateResolver: p.func
1570
1625
  };
1571
- function pt(b) {
1572
- const { schedulerData: t } = b, { config: e, renderData: r, getResourceTableWidth: n, getTableHeaderHeight: i, isEventPerspective: o } = t, a = n(), d = i(), c = r.map((f) => /* @__PURE__ */ he(gt, { ...b, resourceEvents: f, key: f.slotId })), h = o ? e.taskName : e.resourceName, p = e.agendaViewHeader;
1573
- return /* @__PURE__ */ l.jsx("tr", { children: /* @__PURE__ */ l.jsx("td", { children: /* @__PURE__ */ l.jsxs("table", { className: "scheduler-table", children: [
1574
- /* @__PURE__ */ l.jsx("thead", { children: /* @__PURE__ */ l.jsxs("tr", { style: { height: d }, children: [
1575
- /* @__PURE__ */ l.jsx("th", { style: { width: a }, className: "header3-text", children: h }),
1576
- /* @__PURE__ */ l.jsx("th", { className: "header3-text", children: p })
1626
+ function bt(R) {
1627
+ const { schedulerData: t } = R, { config: e, renderData: s } = t, r = t.getResourceTableWidth(), n = t.getTableHeaderHeight(), i = t.isEventPerspective ? e.taskName : e.resourceName, o = e.agendaViewHeader, l = s.map((u) => /* @__PURE__ */ be(wt, { ...R, resourceEvents: u, key: u.slotId }));
1628
+ return /* @__PURE__ */ d.jsx("tr", { children: /* @__PURE__ */ d.jsx("td", { children: /* @__PURE__ */ d.jsxs("table", { className: "scheduler-table", children: [
1629
+ /* @__PURE__ */ d.jsx("thead", { children: /* @__PURE__ */ d.jsxs("tr", { style: { height: n }, children: [
1630
+ /* @__PURE__ */ d.jsx("th", { style: { width: r }, className: "header3-text", children: i }),
1631
+ /* @__PURE__ */ d.jsx("th", { className: "header3-text", children: o })
1577
1632
  ] }) }),
1578
- /* @__PURE__ */ l.jsx("tbody", { children: c })
1633
+ /* @__PURE__ */ d.jsx("tbody", { children: l })
1579
1634
  ] }) }) });
1580
1635
  }
1581
- pt.propTypes = {
1582
- schedulerData: oe.object.isRequired,
1583
- subtitleGetter: oe.func,
1584
- eventItemClick: oe.func,
1585
- viewEventClick: oe.func,
1586
- viewEventText: oe.string,
1587
- viewEvent2Click: oe.func,
1588
- viewEvent2Text: oe.string,
1589
- slotClickedFunc: oe.func
1636
+ bt.propTypes = {
1637
+ schedulerData: p.object.isRequired,
1638
+ subtitleGetter: p.func,
1639
+ eventItemClick: p.func,
1640
+ viewEventClick: p.func,
1641
+ viewEventText: p.string,
1642
+ viewEvent2Click: p.func,
1643
+ viewEvent2Text: p.string,
1644
+ slotClickedFunc: p.func
1590
1645
  };
1591
- function ir(b) {
1592
- const [t] = $t(new ot((T) => T.eventItem, Ne)), { headerItem: e, left: r, top: n, height: i, closeAction: o, schedulerData: a } = b, { config: d, localeMoment: c } = a, { time: h, start: p, end: f, events: m } = e;
1593
- let E = c(h).format(d.addMorePopoverHeaderFormat), R = c(p), C = c(f), x = 0, v = t.getDragSource();
1594
- const k = m.map((T) => {
1595
- if (T !== void 0) {
1596
- x++;
1597
- let D = c(T.eventItem.start), j = c(T.eventItem.end), N = D >= R, A = j < C, S = 10, _ = 138, q = 12 + x * d.eventItemLineHeight;
1598
- return /* @__PURE__ */ he(
1599
- v,
1646
+ function hs(R) {
1647
+ const { schedulerData: t, headerItem: e, left: s, top: r, height: n, closeAction: i } = R, { config: o, localeDayjs: l } = t, { time: u, start: c, end: f, events: h } = e, [v] = ke(new ht((k) => k.eventItem, Be, t.config.dragAndDropEnabled)), D = l(new Date(u)).format(o.addMorePopoverHeaderFormat), g = l(new Date(c)), w = l(f), T = v.getDragSource(), b = h.map((k, A) => {
1648
+ if (k !== void 0) {
1649
+ const $ = l(k.eventItem.start), H = l(k.eventItem.end), N = $ >= g, z = H < w, W = 12 + (A + 1) * o.eventItemLineHeight;
1650
+ return /* @__PURE__ */ be(
1651
+ T,
1600
1652
  {
1601
- ...b,
1602
- key: T.eventItem.id,
1603
- eventItem: T.eventItem,
1653
+ ...R,
1654
+ key: k.eventItem.id,
1655
+ eventItem: k.eventItem,
1604
1656
  leftIndex: 0,
1605
1657
  isInPopover: !0,
1606
1658
  isStart: N,
1607
- isEnd: A,
1659
+ isEnd: z,
1608
1660
  rightIndex: 1,
1609
- left: S,
1610
- width: _,
1611
- top: q
1661
+ left: 10,
1662
+ width: 138,
1663
+ top: W
1612
1664
  }
1613
1665
  );
1614
1666
  }
1615
1667
  return null;
1616
1668
  });
1617
- return /* @__PURE__ */ l.jsxs("div", { className: "add-more-popover-overlay", style: { left: r, top: n, height: i, width: "170px" }, children: [
1618
- /* @__PURE__ */ l.jsxs(ue, { justify: "space-between", align: "middle", children: [
1619
- /* @__PURE__ */ l.jsx(ee, { span: "22", children: /* @__PURE__ */ l.jsx("span", { className: "base-text", children: E }) }),
1620
- /* @__PURE__ */ l.jsx(ee, { span: "2", children: /* @__PURE__ */ l.jsx("span", { onClick: () => o(void 0), children: /* @__PURE__ */ l.jsx(Gt, {}) }) })
1669
+ return /* @__PURE__ */ d.jsxs("div", { className: "add-more-popover-overlay", style: { left: s, top: r, height: n, width: "170px" }, children: [
1670
+ /* @__PURE__ */ d.jsxs(we, { justify: "space-between", align: "middle", children: [
1671
+ /* @__PURE__ */ d.jsx(de, { span: 22, children: /* @__PURE__ */ d.jsx("span", { className: "base-text", children: D }) }),
1672
+ /* @__PURE__ */ d.jsx(de, { span: 2, children: /* @__PURE__ */ d.jsx("span", { onClick: () => i(void 0), children: /* @__PURE__ */ d.jsx(ns, {}) }) })
1621
1673
  ] }),
1622
- k
1674
+ b == null ? void 0 : b.filter(Boolean)
1623
1675
  ] });
1624
1676
  }
1625
- ir.propTypes = {
1626
- schedulerData: u.object.isRequired,
1627
- headerItem: u.object.isRequired,
1628
- left: u.number.isRequired,
1629
- top: u.number.isRequired,
1630
- height: u.number.isRequired,
1631
- closeAction: u.func.isRequired,
1632
- subtitleGetter: u.func,
1633
- moveEvent: u.func,
1634
- eventItemClick: u.func,
1635
- viewEventClick: u.func,
1636
- viewEventText: u.string,
1637
- viewEvent2Click: u.func,
1638
- viewEvent2Text: u.string,
1639
- eventItemTemplateResolver: u.func
1677
+ hs.propTypes = {
1678
+ schedulerData: p.object.isRequired,
1679
+ headerItem: p.object.isRequired,
1680
+ left: p.number.isRequired,
1681
+ top: p.number.isRequired,
1682
+ height: p.number.isRequired,
1683
+ closeAction: p.func.isRequired,
1684
+ subtitleGetter: p.func,
1685
+ moveEvent: p.func,
1686
+ eventItemClick: p.func,
1687
+ viewEventClick: p.func,
1688
+ viewEventText: p.string,
1689
+ viewEvent2Click: p.func,
1690
+ viewEvent2Text: p.string,
1691
+ eventItemTemplateResolver: p.func
1640
1692
  };
1641
- const rt = {
1693
+ var xt = { exports: {} };
1694
+ (function(R, t) {
1695
+ (function(e, s) {
1696
+ R.exports = s();
1697
+ })(_e, function() {
1698
+ var e = 1e3, s = 6e4, r = 36e5, n = "millisecond", i = "second", o = "minute", l = "hour", u = "day", c = "week", f = "month", h = "quarter", v = "year", D = "date", g = "Invalid Date", w = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, T = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, b = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(S) {
1699
+ var x = ["th", "st", "nd", "rd"], y = S % 100;
1700
+ return "[" + S + (x[(y - 20) % 10] || x[y] || x[0]) + "]";
1701
+ } }, k = function(S, x, y) {
1702
+ var j = String(S);
1703
+ return !j || j.length >= x ? S : "" + Array(x + 1 - j.length).join(y) + S;
1704
+ }, A = { s: k, z: function(S) {
1705
+ var x = -S.utcOffset(), y = Math.abs(x), j = Math.floor(y / 60), m = y % 60;
1706
+ return (x <= 0 ? "+" : "-") + k(j, 2, "0") + ":" + k(m, 2, "0");
1707
+ }, m: function S(x, y) {
1708
+ if (x.date() < y.date())
1709
+ return -S(y, x);
1710
+ var j = 12 * (y.year() - x.year()) + (y.month() - x.month()), m = x.clone().add(j, f), M = y - m < 0, _ = x.clone().add(j + (M ? -1 : 1), f);
1711
+ return +(-(j + (y - m) / (M ? m - _ : _ - m)) || 0);
1712
+ }, a: function(S) {
1713
+ return S < 0 ? Math.ceil(S) || 0 : Math.floor(S);
1714
+ }, p: function(S) {
1715
+ return { M: f, y: v, w: c, d: u, D, h: l, m: o, s: i, ms: n, Q: h }[S] || String(S || "").toLowerCase().replace(/s$/, "");
1716
+ }, u: function(S) {
1717
+ return S === void 0;
1718
+ } }, $ = "en", H = {};
1719
+ H[$] = b;
1720
+ var N = function(S) {
1721
+ return S instanceof X;
1722
+ }, z = function S(x, y, j) {
1723
+ var m;
1724
+ if (!x)
1725
+ return $;
1726
+ if (typeof x == "string") {
1727
+ var M = x.toLowerCase();
1728
+ H[M] && (m = M), y && (H[M] = y, m = M);
1729
+ var _ = x.split("-");
1730
+ if (!m && _.length > 1)
1731
+ return S(_[0]);
1732
+ } else {
1733
+ var F = x.name;
1734
+ H[F] = x, m = F;
1735
+ }
1736
+ return !j && m && ($ = m), m || !j && $;
1737
+ }, W = function(S, x) {
1738
+ if (N(S))
1739
+ return S.clone();
1740
+ var y = typeof x == "object" ? x : {};
1741
+ return y.date = S, y.args = arguments, new X(y);
1742
+ }, C = A;
1743
+ C.l = z, C.i = N, C.w = function(S, x) {
1744
+ return W(S, { locale: x.$L, utc: x.$u, x: x.$x, $offset: x.$offset });
1745
+ };
1746
+ var X = function() {
1747
+ function S(y) {
1748
+ this.$L = z(y.locale, null, !0), this.parse(y);
1749
+ }
1750
+ var x = S.prototype;
1751
+ return x.parse = function(y) {
1752
+ this.$d = function(j) {
1753
+ var m = j.date, M = j.utc;
1754
+ if (m === null)
1755
+ return /* @__PURE__ */ new Date(NaN);
1756
+ if (C.u(m))
1757
+ return /* @__PURE__ */ new Date();
1758
+ if (m instanceof Date)
1759
+ return new Date(m);
1760
+ if (typeof m == "string" && !/Z$/i.test(m)) {
1761
+ var _ = m.match(w);
1762
+ if (_) {
1763
+ var F = _[2] - 1 || 0, Q = (_[7] || "0").substring(0, 3);
1764
+ return M ? new Date(Date.UTC(_[1], F, _[3] || 1, _[4] || 0, _[5] || 0, _[6] || 0, Q)) : new Date(_[1], F, _[3] || 1, _[4] || 0, _[5] || 0, _[6] || 0, Q);
1765
+ }
1766
+ }
1767
+ return new Date(m);
1768
+ }(y), this.$x = y.x || {}, this.init();
1769
+ }, x.init = function() {
1770
+ var y = this.$d;
1771
+ this.$y = y.getFullYear(), this.$M = y.getMonth(), this.$D = y.getDate(), this.$W = y.getDay(), this.$H = y.getHours(), this.$m = y.getMinutes(), this.$s = y.getSeconds(), this.$ms = y.getMilliseconds();
1772
+ }, x.$utils = function() {
1773
+ return C;
1774
+ }, x.isValid = function() {
1775
+ return this.$d.toString() !== g;
1776
+ }, x.isSame = function(y, j) {
1777
+ var m = W(y);
1778
+ return this.startOf(j) <= m && m <= this.endOf(j);
1779
+ }, x.isAfter = function(y, j) {
1780
+ return W(y) < this.startOf(j);
1781
+ }, x.isBefore = function(y, j) {
1782
+ return this.endOf(j) < W(y);
1783
+ }, x.$g = function(y, j, m) {
1784
+ return C.u(y) ? this[j] : this.set(m, y);
1785
+ }, x.unix = function() {
1786
+ return Math.floor(this.valueOf() / 1e3);
1787
+ }, x.valueOf = function() {
1788
+ return this.$d.getTime();
1789
+ }, x.startOf = function(y, j) {
1790
+ var m = this, M = !!C.u(j) || j, _ = C.p(y), F = function(ue, re) {
1791
+ var oe = C.w(m.$u ? Date.UTC(m.$y, re, ue) : new Date(m.$y, re, ue), m);
1792
+ return M ? oe : oe.endOf(u);
1793
+ }, Q = function(ue, re) {
1794
+ return C.w(m.toDate()[ue].apply(m.toDate("s"), (M ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(re)), m);
1795
+ }, J = this.$W, ee = this.$M, ae = this.$D, ne = "set" + (this.$u ? "UTC" : "");
1796
+ switch (_) {
1797
+ case v:
1798
+ return M ? F(1, 0) : F(31, 11);
1799
+ case f:
1800
+ return M ? F(1, ee) : F(0, ee + 1);
1801
+ case c:
1802
+ var le = this.$locale().weekStart || 0, he = (J < le ? J + 7 : J) - le;
1803
+ return F(M ? ae - he : ae + (6 - he), ee);
1804
+ case u:
1805
+ case D:
1806
+ return Q(ne + "Hours", 0);
1807
+ case l:
1808
+ return Q(ne + "Minutes", 1);
1809
+ case o:
1810
+ return Q(ne + "Seconds", 2);
1811
+ case i:
1812
+ return Q(ne + "Milliseconds", 3);
1813
+ default:
1814
+ return this.clone();
1815
+ }
1816
+ }, x.endOf = function(y) {
1817
+ return this.startOf(y, !1);
1818
+ }, x.$set = function(y, j) {
1819
+ var m, M = C.p(y), _ = "set" + (this.$u ? "UTC" : ""), F = (m = {}, m[u] = _ + "Date", m[D] = _ + "Date", m[f] = _ + "Month", m[v] = _ + "FullYear", m[l] = _ + "Hours", m[o] = _ + "Minutes", m[i] = _ + "Seconds", m[n] = _ + "Milliseconds", m)[M], Q = M === u ? this.$D + (j - this.$W) : j;
1820
+ if (M === f || M === v) {
1821
+ var J = this.clone().set(D, 1);
1822
+ J.$d[F](Q), J.init(), this.$d = J.set(D, Math.min(this.$D, J.daysInMonth())).$d;
1823
+ } else
1824
+ F && this.$d[F](Q);
1825
+ return this.init(), this;
1826
+ }, x.set = function(y, j) {
1827
+ return this.clone().$set(y, j);
1828
+ }, x.get = function(y) {
1829
+ return this[C.p(y)]();
1830
+ }, x.add = function(y, j) {
1831
+ var m, M = this;
1832
+ y = Number(y);
1833
+ var _ = C.p(j), F = function(ee) {
1834
+ var ae = W(M);
1835
+ return C.w(ae.date(ae.date() + Math.round(ee * y)), M);
1836
+ };
1837
+ if (_ === f)
1838
+ return this.set(f, this.$M + y);
1839
+ if (_ === v)
1840
+ return this.set(v, this.$y + y);
1841
+ if (_ === u)
1842
+ return F(1);
1843
+ if (_ === c)
1844
+ return F(7);
1845
+ var Q = (m = {}, m[o] = s, m[l] = r, m[i] = e, m)[_] || 1, J = this.$d.getTime() + y * Q;
1846
+ return C.w(J, this);
1847
+ }, x.subtract = function(y, j) {
1848
+ return this.add(-1 * y, j);
1849
+ }, x.format = function(y) {
1850
+ var j = this, m = this.$locale();
1851
+ if (!this.isValid())
1852
+ return m.invalidDate || g;
1853
+ var M = y || "YYYY-MM-DDTHH:mm:ssZ", _ = C.z(this), F = this.$H, Q = this.$m, J = this.$M, ee = m.weekdays, ae = m.months, ne = function(re, oe, xe, De) {
1854
+ return re && (re[oe] || re(j, M)) || xe[oe].slice(0, De);
1855
+ }, le = function(re) {
1856
+ return C.s(F % 12 || 12, re, "0");
1857
+ }, he = m.meridiem || function(re, oe, xe) {
1858
+ var De = re < 12 ? "AM" : "PM";
1859
+ return xe ? De.toLowerCase() : De;
1860
+ }, ue = { YY: String(this.$y).slice(-2), YYYY: C.s(this.$y, 4, "0"), M: J + 1, MM: C.s(J + 1, 2, "0"), MMM: ne(m.monthsShort, J, ae, 3), MMMM: ne(ae, J), D: this.$D, DD: C.s(this.$D, 2, "0"), d: String(this.$W), dd: ne(m.weekdaysMin, this.$W, ee, 2), ddd: ne(m.weekdaysShort, this.$W, ee, 3), dddd: ee[this.$W], H: String(F), HH: C.s(F, 2, "0"), h: le(1), hh: le(2), a: he(F, Q, !0), A: he(F, Q, !1), m: String(Q), mm: C.s(Q, 2, "0"), s: String(this.$s), ss: C.s(this.$s, 2, "0"), SSS: C.s(this.$ms, 3, "0"), Z: _ };
1861
+ return M.replace(T, function(re, oe) {
1862
+ return oe || ue[re] || _.replace(":", "");
1863
+ });
1864
+ }, x.utcOffset = function() {
1865
+ return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
1866
+ }, x.diff = function(y, j, m) {
1867
+ var M, _ = C.p(j), F = W(y), Q = (F.utcOffset() - this.utcOffset()) * s, J = this - F, ee = C.m(this, F);
1868
+ return ee = (M = {}, M[v] = ee / 12, M[f] = ee, M[h] = ee / 3, M[c] = (J - Q) / 6048e5, M[u] = (J - Q) / 864e5, M[l] = J / r, M[o] = J / s, M[i] = J / e, M)[_] || J, m ? ee : C.a(ee);
1869
+ }, x.daysInMonth = function() {
1870
+ return this.endOf(f).$D;
1871
+ }, x.$locale = function() {
1872
+ return H[this.$L];
1873
+ }, x.locale = function(y, j) {
1874
+ if (!y)
1875
+ return this.$L;
1876
+ var m = this.clone(), M = z(y, j, !0);
1877
+ return M && (m.$L = M), m;
1878
+ }, x.clone = function() {
1879
+ return C.w(this.$d, this);
1880
+ }, x.toDate = function() {
1881
+ return new Date(this.valueOf());
1882
+ }, x.toJSON = function() {
1883
+ return this.isValid() ? this.toISOString() : null;
1884
+ }, x.toISOString = function() {
1885
+ return this.$d.toISOString();
1886
+ }, x.toString = function() {
1887
+ return this.$d.toUTCString();
1888
+ }, S;
1889
+ }(), Z = X.prototype;
1890
+ return W.prototype = Z, [["$ms", n], ["$s", i], ["$m", o], ["$H", l], ["$W", u], ["$M", f], ["$y", v], ["$D", D]].forEach(function(S) {
1891
+ Z[S[1]] = function(x) {
1892
+ return this.$g(x, S[0], S[1]);
1893
+ };
1894
+ }), W.extend = function(S, x) {
1895
+ return S.$i || (S(x, X, W), S.$i = !0), W;
1896
+ }, W.locale = z, W.isDayjs = N, W.unix = function(S) {
1897
+ return W(1e3 * S);
1898
+ }, W.en = H[$], W.Ls = H, W.p = {}, W;
1899
+ });
1900
+ })(xt);
1901
+ var fs = xt.exports;
1902
+ const ve = /* @__PURE__ */ Oe(fs);
1903
+ var Ct = { exports: {} };
1904
+ (function(R, t) {
1905
+ (function(e, s) {
1906
+ R.exports = s();
1907
+ })(_e, function() {
1908
+ var e = "month", s = "quarter";
1909
+ return function(r, n) {
1910
+ var i = n.prototype;
1911
+ i.quarter = function(u) {
1912
+ return this.$utils().u(u) ? Math.ceil((this.month() + 1) / 3) : this.month(this.month() % 3 + 3 * (u - 1));
1913
+ };
1914
+ var o = i.add;
1915
+ i.add = function(u, c) {
1916
+ return u = Number(u), this.$utils().p(c) === s ? this.add(3 * u, e) : o.bind(this)(u, c);
1917
+ };
1918
+ var l = i.startOf;
1919
+ i.startOf = function(u, c) {
1920
+ var f = this.$utils(), h = !!f.u(c) || c;
1921
+ if (f.p(u) === s) {
1922
+ var v = this.quarter() - 1;
1923
+ return h ? this.month(3 * v).startOf(e).startOf("day") : this.month(3 * v + 2).endOf(e).endOf("day");
1924
+ }
1925
+ return l.bind(this)(u, c);
1926
+ };
1927
+ };
1928
+ });
1929
+ })(Ct);
1930
+ var ps = Ct.exports;
1931
+ const gs = /* @__PURE__ */ Oe(ps);
1932
+ var St = { exports: {} };
1933
+ (function(R, t) {
1934
+ (function(e, s) {
1935
+ R.exports = s();
1936
+ })(_e, function() {
1937
+ var e = "minute", s = /[+-]\d\d(?::?\d\d)?/g, r = /([+-]|\d\d)/g;
1938
+ return function(n, i, o) {
1939
+ var l = i.prototype;
1940
+ o.utc = function(g) {
1941
+ var w = { date: g, utc: !0, args: arguments };
1942
+ return new i(w);
1943
+ }, l.utc = function(g) {
1944
+ var w = o(this.toDate(), { locale: this.$L, utc: !0 });
1945
+ return g ? w.add(this.utcOffset(), e) : w;
1946
+ }, l.local = function() {
1947
+ return o(this.toDate(), { locale: this.$L, utc: !1 });
1948
+ };
1949
+ var u = l.parse;
1950
+ l.parse = function(g) {
1951
+ g.utc && (this.$u = !0), this.$utils().u(g.$offset) || (this.$offset = g.$offset), u.call(this, g);
1952
+ };
1953
+ var c = l.init;
1954
+ l.init = function() {
1955
+ if (this.$u) {
1956
+ var g = this.$d;
1957
+ this.$y = g.getUTCFullYear(), this.$M = g.getUTCMonth(), this.$D = g.getUTCDate(), this.$W = g.getUTCDay(), this.$H = g.getUTCHours(), this.$m = g.getUTCMinutes(), this.$s = g.getUTCSeconds(), this.$ms = g.getUTCMilliseconds();
1958
+ } else
1959
+ c.call(this);
1960
+ };
1961
+ var f = l.utcOffset;
1962
+ l.utcOffset = function(g, w) {
1963
+ var T = this.$utils().u;
1964
+ if (T(g))
1965
+ return this.$u ? 0 : T(this.$offset) ? f.call(this) : this.$offset;
1966
+ if (typeof g == "string" && (g = function($) {
1967
+ $ === void 0 && ($ = "");
1968
+ var H = $.match(s);
1969
+ if (!H)
1970
+ return null;
1971
+ var N = ("" + H[0]).match(r) || ["-", 0, 0], z = N[0], W = 60 * +N[1] + +N[2];
1972
+ return W === 0 ? 0 : z === "+" ? W : -W;
1973
+ }(g), g === null))
1974
+ return this;
1975
+ var b = Math.abs(g) <= 16 ? 60 * g : g, k = this;
1976
+ if (w)
1977
+ return k.$offset = b, k.$u = g === 0, k;
1978
+ if (g !== 0) {
1979
+ var A = this.$u ? this.toDate().getTimezoneOffset() : -1 * this.utcOffset();
1980
+ (k = this.local().add(b + A, e)).$offset = b, k.$x.$localOffset = A;
1981
+ } else
1982
+ k = this.utc();
1983
+ return k;
1984
+ };
1985
+ var h = l.format;
1986
+ l.format = function(g) {
1987
+ var w = g || (this.$u ? "YYYY-MM-DDTHH:mm:ss[Z]" : "");
1988
+ return h.call(this, w);
1989
+ }, l.valueOf = function() {
1990
+ var g = this.$utils().u(this.$offset) ? 0 : this.$offset + (this.$x.$localOffset || this.$d.getTimezoneOffset());
1991
+ return this.$d.valueOf() - 6e4 * g;
1992
+ }, l.isUTC = function() {
1993
+ return !!this.$u;
1994
+ }, l.toISOString = function() {
1995
+ return this.toDate().toISOString();
1996
+ }, l.toString = function() {
1997
+ return this.toDate().toUTCString();
1998
+ };
1999
+ var v = l.toDate;
2000
+ l.toDate = function(g) {
2001
+ return g === "s" && this.$offset ? o(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate() : v.call(this);
2002
+ };
2003
+ var D = l.diff;
2004
+ l.diff = function(g, w, T) {
2005
+ if (g && this.$u === g.$u)
2006
+ return D.call(this, g, w, T);
2007
+ var b = this.local(), k = o(g).local();
2008
+ return D.call(b, k, w, T);
2009
+ };
2010
+ };
2011
+ });
2012
+ })(St);
2013
+ var vs = St.exports;
2014
+ const ms = /* @__PURE__ */ Oe(vs);
2015
+ var Rt = { exports: {} };
2016
+ (function(R, t) {
2017
+ (function(e, s) {
2018
+ R.exports = s();
2019
+ })(_e, function() {
2020
+ return function(e, s) {
2021
+ s.prototype.weekday = function(r) {
2022
+ var n = this.$locale().weekStart || 0, i = this.$W, o = (i < n ? i + 7 : i) - n;
2023
+ return this.$utils().u(r) ? o : this.subtract(o, "day").add(r, "day");
2024
+ };
2025
+ };
2026
+ });
2027
+ })(Rt);
2028
+ var Ds = Rt.exports;
2029
+ const ys = /* @__PURE__ */ Oe(Ds), ct = {
1642
2030
  schedulerWidth: "100%",
1643
2031
  besidesWidth: 20,
1644
2032
  schedulerMaxHeight: 0,
1645
2033
  tableHeaderHeight: 40,
2034
+ schedulerContentHeight: "500px",
2035
+ responsiveByParent: !1,
1646
2036
  agendaResourceTableWidth: 160,
1647
2037
  agendaMaxEventWidth: 100,
1648
2038
  dayResourceTableWidth: 160,
@@ -1663,6 +2053,9 @@ const rt = {
1663
2053
  quarterMaxEvents: 99,
1664
2054
  yearMaxEvents: 99,
1665
2055
  customMaxEvents: 99,
2056
+ eventItemPopoverTrigger: "hover",
2057
+ eventItemPopoverPlacement: "bottomLeft",
2058
+ eventItemPopoverWidth: 300,
1666
2059
  eventItemHeight: 22,
1667
2060
  eventItemLineHeight: 24,
1668
2061
  nonAgendaSlotMinHeight: 0,
@@ -1674,7 +2067,7 @@ const rt = {
1674
2067
  nonWorkingTimeHeadBgColor: "#fff0f6",
1675
2068
  nonWorkingTimeBodyBgColor: "#fff0f6",
1676
2069
  summaryColor: "#666",
1677
- summaryPos: ae.TopRight,
2070
+ summaryPos: me.TopRight,
1678
2071
  groupOnlySlotColor: "#F8F8F8",
1679
2072
  startResizable: !0,
1680
2073
  endResizable: !0,
@@ -1682,15 +2075,20 @@ const rt = {
1682
2075
  creatable: !0,
1683
2076
  crossResourceMove: !0,
1684
2077
  checkConflict: !1,
1685
- scrollToSpecialMomentEnabled: !0,
2078
+ scrollToSpecialDayjsEnabled: !0,
1686
2079
  eventItemPopoverEnabled: !0,
1687
2080
  eventItemPopoverShowColor: !0,
1688
2081
  calendarPopoverEnabled: !0,
1689
2082
  recurringEventsEnabled: !0,
2083
+ viewChangeSpinEnabled: !0,
2084
+ dateChangeSpinEnabled: !0,
1690
2085
  headerEnabled: !0,
2086
+ resourceViewEnabled: !0,
1691
2087
  displayWeekend: !0,
1692
2088
  relativeMove: !0,
1693
2089
  defaultExpanded: !0,
2090
+ dragAndDropEnabled: !0,
2091
+ schedulerHeaderEventsFuncsTimeoutMs: 100,
1694
2092
  resourceName: "Resource Name",
1695
2093
  taskName: "Task Name",
1696
2094
  agendaViewHeader: "Agenda",
@@ -1703,76 +2101,70 @@ const rt = {
1703
2101
  nonAgendaOtherCellHeaderFormat: "ddd M/D",
1704
2102
  minuteStep: 30,
1705
2103
  views: [
1706
- { viewName: "Day", viewType: w.Day, showAgenda: !1, isEventPerspective: !1 },
1707
- { viewName: "Week", viewType: w.Week, showAgenda: !1, isEventPerspective: !1 },
1708
- { viewName: "Month", viewType: w.Month, showAgenda: !1, isEventPerspective: !1 },
1709
- { viewName: "Quarter", viewType: w.Quarter, showAgenda: !1, isEventPerspective: !1 },
1710
- { viewName: "Year", viewType: w.Year, showAgenda: !1, isEventPerspective: !1 }
2104
+ { viewName: "Day", viewType: O.Day, showAgenda: !1, isEventPerspective: !1 },
2105
+ { viewName: "Week", viewType: O.Week, showAgenda: !1, isEventPerspective: !1 },
2106
+ { viewName: "Month", viewType: O.Month, showAgenda: !1, isEventPerspective: !1 },
2107
+ { viewName: "Quarter", viewType: O.Quarter, showAgenda: !1, isEventPerspective: !1 },
2108
+ { viewName: "Year", viewType: O.Year, showAgenda: !1, isEventPerspective: !1 }
1711
2109
  ]
1712
- }, or = (b, t, e, r) => {
1713
- const n = b.localeMoment(e), i = b.localeMoment(r);
1714
- let o;
1715
- switch (t) {
1716
- case w.Week:
1717
- case w.Custom:
1718
- case w.Custom1:
1719
- case w.Custom2:
1720
- n !== i && (o = `${n.format("MMM D")}-${i.format("D, YYYY")}`, n.month() !== i.month() && (o = `${n.format("MMM D")}-${i.format("MMM D, YYYY")}`), n.year() !== i.year() && (o = `${n.format("MMM D, YYYY")}-${i.format("MMM D, YYYY")}`));
1721
- break;
1722
- case w.Month:
1723
- o = n.format("MMMM YYYY");
1724
- break;
1725
- case w.Quarter:
1726
- o = `${n.format("MMM D")}-${i.format("MMM D, YYYY")}`;
1727
- break;
1728
- case w.Year:
1729
- o = n.format("YYYY");
1730
- break;
1731
- default:
1732
- o = n.format("MMM D, YYYY");
1733
- }
1734
- return o;
1735
- }, ar = (b, t) => {
1736
- if (!b.isEventPerspective)
1737
- return t.title;
1738
- const e = b.resources.find((r) => r.id === t.resourceId);
1739
- return e ? e.name : t.title;
1740
- }, lr = (b, t, e) => b.localeMoment(), dr = (b, t) => {
1741
- const { localeMoment: e, cellUnit: r } = b;
1742
- if (r === O.Hour) {
1743
- const i = e(t).hour();
1744
- return i < 9 || i > 18;
1745
- }
1746
- const n = e(t).weekday();
1747
- return n === 0 || n === 6;
1748
- }, nt = {
2110
+ }, Es = (R, t, e, s) => {
2111
+ const { localeDayjs: r } = R, n = r(new Date(e)), i = r(s);
2112
+ let o = "";
2113
+ return t === O.Week || n !== i && (t === O.Custom || t === O.Custom1 || t === O.Custom2) ? (o = `${n.format("MMM D")}-${i.format("D, YYYY")}`, n.month() !== i.month() && (o = `${n.format("MMM D")}-${i.format("MMM D, YYYY")}`), n.year() !== i.year() && (o = `${n.format("MMM D, YYYY")}-${i.format("MMM D, YYYY")}`)) : t === O.Month ? o = n.format("MMMM YYYY") : t === O.Quarter ? o = `${n.format("MMM D")}-${i.format("MMM D, YYYY")}` : t === O.Year ? o = n.format("YYYY") : o = n.format("MMM D, YYYY"), o;
2114
+ }, ws = (R, t) => {
2115
+ var e;
2116
+ return R.isEventPerspective && ((e = R.resources.find((s) => s.id === t.resourceId)) == null ? void 0 : e.name) || t.title;
2117
+ }, bs = (R) => {
2118
+ const { localeDayjs: t } = R;
2119
+ return t(/* @__PURE__ */ new Date());
2120
+ }, xs = (R, t) => {
2121
+ const { localeDayjs: e, cellUnit: s } = R;
2122
+ if (s === U.Hour) {
2123
+ const r = e(new Date(t)).hour();
2124
+ return r < 9 || r > 18;
2125
+ } else {
2126
+ const r = e(new Date(t)).weekday();
2127
+ return r === 0 || r === 6;
2128
+ }
2129
+ }, dt = {
1749
2130
  getSummaryFunc: void 0,
1750
2131
  getCustomDateFunc: void 0,
1751
2132
  getNonAgendaViewBodyCellBgColorFunc: void 0,
1752
- getScrollSpecialMomentFunc: lr,
1753
- getDateLabelFunc: or,
1754
- getEventTextFunc: ar,
1755
- isNonWorkingTimeFunc: dr
1756
- // getNonAgendaViewBodyCellBgColorFunc: getNonAgendaViewBodyCellBgColor,
1757
- //getCustomDateFunc: getCustomDate,
1758
- //getSummaryFunc: getSummary,
2133
+ getScrollSpecialDayjsFunc: bs,
2134
+ getDateLabelFunc: Es,
2135
+ getEventTextFunc: ws,
2136
+ isNonWorkingTimeFunc: xs
1759
2137
  };
1760
- class Cr {
1761
- constructor(t = ke().format(W), e = w.Week, r = !1, n = !1, i = void 0, o = void 0, a = void 0) {
1762
- this.resources = [], this.events = [], this.eventGroups = [], this.eventGroupsAutoGenerated = !0, this.viewType = e, this.cellUnit = e === w.Day ? O.Hour : O.Day, this.showAgenda = r, this.isEventPerspective = n, this.resizing = !1, this.scrollToSpecialMoment = !1, this.documentWidth = 0, this.localeMoment = ke, a && (this.localeMoment = a), this.config = i == null ? rt : { ...rt, ...i }, this._validateMinuteStep(this.config.minuteStep), this.behaviors = o == null ? nt : { ...nt, ...o }, this._resolveDate(0, t), this._createHeaders(), this._createRenderData();
1763
- }
1764
- setLocaleMoment(t) {
1765
- t && (this.localeMoment = t, this._createHeaders(), this._createRenderData());
2138
+ class Hs {
2139
+ constructor(t = ve(), e = O.Week, s = !1, r = !1, n = void 0, i = void 0) {
2140
+ this.resources = [], this.events = [], this.eventGroups = [], this.eventGroupsAutoGenerated = !0, this.viewType = e, this.cellUnit = e === O.Day ? U.Hour : U.Day, this.showAgenda = s, this.isEventPerspective = r, this.resizing = !1, this.scrollToSpecialDayjs = !1, this.documentWidth = 0, this._shouldReloadViewType = !1, this.calendarPopoverLocale = void 0, ve.extend(gs), ve.extend(ys), ve.extend(ms), this.localeDayjs = ve, this.config = n == null ? ct : { ...ct, ...n }, this._validateMinuteStep(this.config.minuteStep), this.behaviors = i == null ? dt : { ...dt, ...i }, this._resolveDate(0, t), this._createHeaders(), this._createRenderData();
2141
+ }
2142
+ setSchedulerLocale(t, e) {
2143
+ if (!t)
2144
+ return;
2145
+ let s = t;
2146
+ typeof t == "string" && import(`dayjs/locale/${t}.js`).then((r) => {
2147
+ s = r.default, e && Object.entries(e).forEach(([n, i]) => s[n] = i);
2148
+ }).catch((r) => {
2149
+ console.error("Error loading locale:", r);
2150
+ }), this.localeDayjs.locale(s), this._shouldReloadViewType = !0, this.setViewType(this.viewType, this.showAgenda, this.isEventPerspective);
2151
+ }
2152
+ setCalendarPopoverLocale(t) {
2153
+ t && typeof t == "string" && import(`antd/locale/${t}.js`).then((e) => {
2154
+ this.calendarPopoverLocale = e.default || Locale;
2155
+ }).catch((e) => {
2156
+ console.error("Error loading locale:", e);
2157
+ });
1766
2158
  }
1767
2159
  setResources(t) {
1768
- this._validateResource(t), this.resources = Array.from(new Set(t)), this._createRenderData(), this.setScrollToSpecialMoment(!0);
2160
+ this._validateResource(t), this.resources = Array.from(new Set(t)), this._createRenderData(), this.setScrollToSpecialDayjs(!0);
1769
2161
  }
1770
2162
  setEventGroupsAutoGenerated(t) {
1771
2163
  this.eventGroupsAutoGenerated = t;
1772
2164
  }
1773
2165
  //optional
1774
2166
  setEventGroups(t) {
1775
- this._validateEventGroups(t), this.eventGroups = Array.from(new Set(t)), this.eventGroupsAutoGenerated = !1, this._createRenderData(), this.setScrollToSpecialMoment(!0);
2167
+ this._validateEventGroups(t), this.eventGroups = Array.from(new Set(t)), this.eventGroupsAutoGenerated = !1, this._createRenderData(), this.setScrollToSpecialDayjs(!0);
1776
2168
  }
1777
2169
  setMinuteStep(t) {
1778
2170
  this.config.minuteStep !== t && (this._validateMinuteStep(t), this.config.minuteStep = t, this._createHeaders(), this._createRenderData());
@@ -1784,28 +2176,28 @@ class Cr {
1784
2176
  return 60 / this.config.minuteStep;
1785
2177
  }
1786
2178
  addResource(t) {
1787
- this.resources.filter((r) => r.id === t.id).length === 0 && (this.resources.push(t), this._createRenderData());
2179
+ this.resources.filter((s) => s.id === t.id).length === 0 && (this.resources.push(t), this._createRenderData());
1788
2180
  }
1789
2181
  addEventGroup(t) {
1790
- this.eventGroups.filter((r) => r.id === t.id).length === 0 && (this.eventGroups.push(t), this._createRenderData());
2182
+ this.eventGroups.filter((s) => s.id === t.id).length === 0 && (this.eventGroups.push(t), this._createRenderData());
1791
2183
  }
1792
2184
  removeEventGroupById(t) {
1793
2185
  let e = -1;
1794
- this.eventGroups.forEach((r, n) => {
1795
- r.id === t && (e = n);
2186
+ this.eventGroups.forEach((s, r) => {
2187
+ s.id === t && (e = r);
1796
2188
  }), e !== -1 && this.eventGroups.splice(e, 1);
1797
2189
  }
1798
2190
  containsEventGroupId(t) {
1799
2191
  let e = -1;
1800
- return this.eventGroups.forEach((r, n) => {
1801
- r.id === t && (e = n);
2192
+ return this.eventGroups.forEach((s, r) => {
2193
+ s.id === t && (e = r);
1802
2194
  }), e !== -1;
1803
2195
  }
1804
2196
  setEvents(t) {
1805
2197
  this._validateEvents(t), this.events = Array.from(t), this.eventGroupsAutoGenerated && this._generateEventGroups(), this.config.recurringEventsEnabled && this._handleRecurringEvents(), this._createRenderData();
1806
2198
  }
1807
- setScrollToSpecialMoment(t) {
1808
- this.config.scrollToSpecialMomentEnabled && (this.scrollToSpecialMoment = t);
2199
+ setScrollToSpecialDayjs(t) {
2200
+ this.config.scrollToSpecialDayjsEnabled && (this.scrollToSpecialDayjs = t);
1809
2201
  }
1810
2202
  prev() {
1811
2203
  this._resolveDate(-1), this.events = [], this._createHeaders(), this._createRenderData();
@@ -1813,29 +2205,29 @@ class Cr {
1813
2205
  next() {
1814
2206
  this._resolveDate(1), this.events = [], this._createHeaders(), this._createRenderData();
1815
2207
  }
1816
- setDate(t = ke().format(W)) {
2208
+ setDate(t = ve(/* @__PURE__ */ new Date())) {
1817
2209
  this._resolveDate(0, t), this.events = [], this._createHeaders(), this._createRenderData();
1818
2210
  }
1819
- setViewType(t = w.Week, e = !1, r = !1) {
1820
- if (this.showAgenda = e, this.isEventPerspective = r, this.cellUnit = O.Day, this.viewType !== t) {
1821
- let n = this.startDate;
1822
- if (t === w.Custom || t === w.Custom1 || t === w.Custom2)
1823
- this.viewType = t, this._resolveDate(0, n);
2211
+ setViewType(t = O.Week, e = !1, s = !1) {
2212
+ if (this.showAgenda = e, this.isEventPerspective = s, this.cellUnit = U.Day, this.viewType !== t || this._shouldReloadViewType) {
2213
+ let r = this.startDate;
2214
+ if (t === O.Custom || t === O.Custom1 || t === O.Custom2)
2215
+ this.viewType = t, this._resolveDate(0, r);
1824
2216
  else {
1825
2217
  if (this.viewType < t)
1826
- t === w.Week ? (this.startDate = this.localeMoment(n).startOf("week").format(W), this.endDate = this.localeMoment(this.startDate).endOf("week").format(W)) : t === w.Month ? (this.startDate = this.localeMoment(n).startOf("month").format(W), this.endDate = this.localeMoment(this.startDate).endOf("month").format(W)) : t === w.Quarter ? (this.startDate = this.localeMoment(n).startOf("quarter").format(W), this.endDate = this.localeMoment(this.startDate).endOf("quarter").format(W)) : t === w.Year && (this.startDate = this.localeMoment(n).startOf("year").format(W), this.endDate = this.localeMoment(this.startDate).endOf("year").format(W));
2218
+ t === O.Week ? (this.startDate = this.localeDayjs(new Date(r)).startOf("week"), this.endDate = this.localeDayjs(new Date(this.startDate)).endOf("week")) : t === O.Month ? (this.startDate = this.localeDayjs(new Date(r)).startOf("month"), this.endDate = this.localeDayjs(new Date(this.startDate)).endOf("month")) : t === O.Quarter ? (this.startDate = this.localeDayjs(new Date(r)).startOf("quarter"), this.endDate = this.localeDayjs(new Date(this.startDate)).endOf("quarter")) : t === O.Year && (this.startDate = this.localeDayjs(new Date(r)).startOf("year"), this.endDate = this.localeDayjs(new Date(this.startDate)).endOf("year"));
1827
2219
  else {
1828
- let i = this.localeMoment(this.startDate), o = this.localeMoment(this.endDate).add(1, "days");
2220
+ let n = this.localeDayjs(new Date(this.startDate)), i = this.localeDayjs(new Date(this.endDate)).add(1, "days");
1829
2221
  if (this.selectDate !== void 0) {
1830
- let d = this.localeMoment(this.selectDate);
1831
- d >= i && d < o && (n = this.selectDate);
2222
+ let l = this.localeDayjs(new Date(this.selectDate));
2223
+ l >= n && l < i && (r = this.selectDate);
1832
2224
  }
1833
- let a = this.localeMoment();
1834
- a >= i && a < o && (n = a.format(W)), t === w.Day ? (this.startDate = n, this.endDate = this.startDate, this.cellUnit = O.Hour) : t === w.Week ? (this.startDate = this.localeMoment(n).startOf("week").format(W), this.endDate = this.localeMoment(this.startDate).endOf("week").format(W)) : t === w.Month ? (this.startDate = this.localeMoment(n).startOf("month").format(W), this.endDate = this.localeMoment(this.startDate).endOf("month").format(W)) : t === w.Quarter && (this.startDate = this.localeMoment(n).startOf("quarter").format(W), this.endDate = this.localeMoment(this.startDate).endOf("quarter").format(W));
2225
+ let o = this.localeDayjs();
2226
+ o >= n && o < i && (r = o.startOf("day")), t === O.Day ? (this.startDate = r, this.endDate = this.startDate, this.cellUnit = U.Hour) : t === O.Week ? (this.startDate = this.localeDayjs(new Date(r)).startOf("week"), this.endDate = this.localeDayjs(new Date(this.startDate)).endOf("week")) : t === O.Month ? (this.startDate = this.localeDayjs(new Date(r)).startOf("month"), this.endDate = this.localeDayjs(new Date(this.startDate)).endOf("month")) : t === O.Quarter && (this.startDate = this.localeDayjs(new Date(r)).startOf("quarter"), this.endDate = this.localeDayjs(new Date(this.startDate)).endOf("quarter"));
1835
2227
  }
1836
2228
  this.viewType = t;
1837
2229
  }
1838
- this.events = [], this._createHeaders(), this._createRenderData(), this.setScrollToSpecialMoment(!0);
2230
+ this._shouldReloadViewType = !1, this.events = [], this._createHeaders(), this._createRenderData(), this.setScrollToSpecialDayjs(!0);
1839
2231
  }
1840
2232
  }
1841
2233
  setSchedulerMaxHeight(t) {
@@ -1845,18 +2237,18 @@ class Cr {
1845
2237
  return !!this.config.schedulerWidth.endsWith && this.config.schedulerWidth.endsWith("%");
1846
2238
  }
1847
2239
  toggleExpandStatus(t) {
1848
- let e = !1, r = -1, n = !1, i = /* @__PURE__ */ new Map();
1849
- this.renderData.forEach((o) => {
2240
+ let e = !1, s = -1, r = !1, n = /* @__PURE__ */ new Map();
2241
+ this.renderData.forEach((i) => {
1850
2242
  if (e === !1)
1851
- o.slotId === t && o.hasChildren && (e = !0, n = !o.expanded, o.expanded = n, r = o.indent, i.set(o.indent, {
1852
- expanded: o.expanded,
1853
- render: o.render
2243
+ i.slotId === t && i.hasChildren && (e = !0, r = !i.expanded, i.expanded = r, s = i.indent, n.set(i.indent, {
2244
+ expanded: i.expanded,
2245
+ render: i.render
1854
2246
  }));
1855
- else if (o.indent > r) {
1856
- let a = i.get(o.indent - 1);
1857
- o.render = a.expanded && a.render, o.hasChildren && i.set(o.indent, {
1858
- expanded: o.expanded,
1859
- render: o.render
2247
+ else if (i.indent > s) {
2248
+ let o = n.get(i.indent - 1);
2249
+ i.render = o.expanded && o.render, i.hasChildren && n.set(i.indent, {
2250
+ expanded: i.expanded,
2251
+ render: i.render
1860
2252
  });
1861
2253
  } else
1862
2254
  e = !1;
@@ -1875,8 +2267,8 @@ class Cr {
1875
2267
  return this.isSchedulerResponsive() ? parseInt(t * Number(this.config.schedulerWidth.slice(0, -1)) / 100) : this.config.schedulerWidth;
1876
2268
  }
1877
2269
  getResourceTableWidth() {
1878
- let t = this.getResourceTableConfigWidth(), e = this.getSchedulerWidth(), r = this.isResourceViewResponsive() ? parseInt(e * Number(t.slice(0, -1)) / 100) : t;
1879
- return this.isSchedulerResponsive() && this.getContentTableWidth() + r < e && (r = e - this.getContentTableWidth()), r;
2270
+ let t = this.getResourceTableConfigWidth(), e = this.getSchedulerWidth(), s = this.isResourceViewResponsive() ? parseInt(e * Number(t.slice(0, -1)) / 100) : t;
2271
+ return this.isSchedulerResponsive() && this.getContentTableWidth() + s < e && (s = e - this.getContentTableWidth()), s;
1880
2272
  }
1881
2273
  getContentCellWidth() {
1882
2274
  let t = this.getContentCellConfigWidth(), e = this.getSchedulerWidth();
@@ -1885,22 +2277,22 @@ class Cr {
1885
2277
  getContentTableWidth() {
1886
2278
  return this.headers.length * this.getContentCellWidth();
1887
2279
  }
1888
- getScrollToSpecialMoment() {
1889
- return this.config.scrollToSpecialMomentEnabled ? this.scrollToSpecialMoment : !1;
2280
+ getScrollToSpecialDayjs() {
2281
+ return this.config.scrollToSpecialDayjsEnabled ? this.scrollToSpecialDayjs : !1;
1890
2282
  }
1891
2283
  getSlots() {
1892
2284
  return this.isEventPerspective ? this.eventGroups : this.resources;
1893
2285
  }
1894
2286
  getSlotById(t) {
1895
- let e = this.getSlots(), r;
1896
- return e.forEach((n) => {
1897
- n.id === t && (r = n);
1898
- }), r;
2287
+ let e = this.getSlots(), s;
2288
+ return e.forEach((r) => {
2289
+ r.id === t && (s = r);
2290
+ }), s;
1899
2291
  }
1900
2292
  getResourceById(t) {
1901
2293
  let e;
1902
- return this.resources.forEach((r) => {
1903
- r.id === t && (e = r);
2294
+ return this.resources.forEach((s) => {
2295
+ s.id === t && (e = s);
1904
2296
  }), e;
1905
2297
  }
1906
2298
  getTableHeaderHeight() {
@@ -1913,11 +2305,29 @@ class Cr {
1913
2305
  }), t;
1914
2306
  }
1915
2307
  getCellMaxEvents() {
1916
- return this.viewType === w.Week ? this.config.weekMaxEvents : this.viewType === w.Day ? this.config.dayMaxEvents : this.viewType === w.Month ? this.config.monthMaxEvents : this.viewType === w.Year ? this.config.yearMaxEvents : this.viewType === w.Quarter ? this.config.quarterMaxEvents : this.config.customMaxEvents;
2308
+ return this.viewType === O.Week ? this.config.weekMaxEvents : this.viewType === O.Day ? this.config.dayMaxEvents : this.viewType === O.Month ? this.config.monthMaxEvents : this.viewType === O.Year ? this.config.yearMaxEvents : this.viewType === O.Quarter ? this.config.quarterMaxEvents : this.config.customMaxEvents;
2309
+ }
2310
+ getCalendarPopoverLocale() {
2311
+ return this.calendarPopoverLocale;
2312
+ }
2313
+ getSelectedDate() {
2314
+ return this.selectDate.format(ge);
2315
+ }
2316
+ getViewStartDate() {
2317
+ return this.startDate;
2318
+ }
2319
+ getViewEndDate() {
2320
+ return this.endDate;
2321
+ }
2322
+ getViewDates() {
2323
+ return {
2324
+ startDate: this.startDate,
2325
+ endDate: this.endDate
2326
+ };
1917
2327
  }
1918
2328
  getDateLabel() {
1919
- let t = this.localeMoment(this.startDate), e = this.localeMoment(this.endDate), r = t.format("LL");
1920
- return t != e && (r = `${t.format("LL")}-${e.format("LL")}`), this.behaviors.getDateLabelFunc && (r = this.behaviors.getDateLabelFunc(this, this.viewType, this.startDate, this.endDate)), r;
2329
+ let t = this.localeDayjs(new Date(this.startDate)), e = this.localeDayjs(new Date(this.endDate)), s = t.format("LL");
2330
+ return t != e && (s = `${t.format("LL")}-${e.format("LL")}`), this.behaviors.getDateLabelFunc && (s = this.behaviors.getDateLabelFunc(this, this.viewType, this.startDate, this.endDate)), s;
1921
2331
  }
1922
2332
  addEvent(t) {
1923
2333
  this._attachEvent(t), this.eventGroupsAutoGenerated && this._generateEventGroups(), this._createRenderData();
@@ -1929,14 +2339,17 @@ class Cr {
1929
2339
  t.end = e, this._createRenderData();
1930
2340
  }
1931
2341
  swapEvent(t, e) {
1932
- var r = Object.assign({}, t), n = Object.assign({}, e);
1933
- this._detachEvent(t), this._detachEvent(e), this.isEventPerspective ? (r.groupId = e.groupId, r.groupName = e.groupName, n.groupId = t.groupId, n.groupName = t.groupName) : (r.resourceId = e.resourceId, n.resourceId = t.resourceId), r.end = e.end, r.start = e.start, n.end = t.end, n.start = t.start, this._attachEvent(r), this._attachEvent(n), this._createRenderData();
2342
+ this.isEventPerspective ? ([t.groupId, e.groupId] = [e.groupId, t.groupId], [t.groupName, e.groupName] = [e.groupName, t.groupName]) : [t.resourceId, e.resourceId] = [e.resourceId, t.resourceId], [t.start, e.start] = [e.start, t.start], [t.end, e.end] = [e.end, t.end], this._detachEvent(t), this._detachEvent(e), this._attachEvent(t), this._attachEvent(e), this._createRenderData();
2343
+ }
2344
+ swapEvent2(t, e) {
2345
+ var s = Object.assign({}, t), r = Object.assign({}, e);
2346
+ this._detachEvent(t), this._detachEvent(e), this.isEventPerspective ? (s.groupId = e.groupId, s.groupName = e.groupName, r.groupId = t.groupId, r.groupName = t.groupName) : (s.resourceId = e.resourceId, r.resourceId = t.resourceId), s.end = e.end, s.start = e.start, r.end = t.end, r.start = t.start, this._attachEvent(s), this._attachEvent(r), this._createRenderData();
1934
2347
  }
1935
- moveEvent(t, e, r, n, i) {
1936
- this._detachEvent(t), this.isEventPerspective ? (t.groupId = e, t.groupName = r) : t.resourceId = e, t.end = i, t.start = n, this._attachEvent(t), this._createRenderData();
2348
+ moveEvent(t, e, s, r, n) {
2349
+ this._detachEvent(t), this.isEventPerspective ? (t.groupId = e, t.groupName = s) : t.resourceId = e, t.end = n, t.start = r, this._attachEvent(t), this._createRenderData();
1937
2350
  }
1938
- isEventInTimeWindow(t, e, r, n) {
1939
- return t < n && e > r;
2351
+ isEventInTimeWindow(t, e, s, r) {
2352
+ return t < r && e > s;
1940
2353
  }
1941
2354
  removeEvent(t) {
1942
2355
  let e = this.events.indexOf(t);
@@ -1944,15 +2357,15 @@ class Cr {
1944
2357
  }
1945
2358
  removeEventById(t) {
1946
2359
  let e = -1;
1947
- this.events.forEach((r, n) => {
1948
- r.id === t && (e = n);
2360
+ this.events.forEach((s, r) => {
2361
+ s.id === t && (e = r);
1949
2362
  }), e !== -1 && (this.events.splice(e, 1), this._createRenderData());
1950
2363
  }
1951
2364
  getResourceTableConfigWidth() {
1952
- return this.showAgenda ? this.config.agendaResourceTableWidth : this.viewType === w.Week ? this.config.weekResourceTableWidth : this.viewType === w.Day ? this.config.dayResourceTableWidth : this.viewType === w.Month ? this.config.monthResourceTableWidth : this.viewType === w.Year ? this.config.yearResourceTableWidth : this.viewType === w.Quarter ? this.config.quarterResourceTableWidth : this.config.customResourceTableWidth;
2365
+ return this.showAgenda ? this.config.agendaResourceTableWidth : this.viewType === O.Week ? this.config.weekResourceTableWidth : this.viewType === O.Day ? this.config.dayResourceTableWidth : this.viewType === O.Month ? this.config.monthResourceTableWidth : this.viewType === O.Year ? this.config.yearResourceTableWidth : this.viewType === O.Quarter ? this.config.quarterResourceTableWidth : this.config.customResourceTableWidth;
1953
2366
  }
1954
2367
  getContentCellConfigWidth() {
1955
- return this.viewType === w.Week ? this.config.weekCellWidth : this.viewType === w.Day ? this.config.dayCellWidth : this.viewType === w.Month ? this.config.monthCellWidth : this.viewType === w.Year ? this.config.yearCellWidth : this.viewType === w.Quarter ? this.config.quarterCellWidth : this.config.customCellWidth;
2368
+ return this.viewType === O.Week ? this.config.weekCellWidth : this.viewType === O.Day ? this.config.dayCellWidth : this.viewType === O.Month ? this.config.monthCellWidth : this.viewType === O.Year ? this.config.yearCellWidth : this.viewType === O.Quarter ? this.config.quarterCellWidth : this.config.customCellWidth;
1956
2369
  }
1957
2370
  _setDocumentWidth(t) {
1958
2371
  t >= 0 && (this.documentWidth = t);
@@ -1962,10 +2375,10 @@ class Cr {
1962
2375
  e !== -1 && this.events.splice(e, 1);
1963
2376
  }
1964
2377
  _attachEvent(t) {
1965
- let e = 0, r = this.localeMoment(t.start);
1966
- this.events.forEach((n, i) => {
1967
- let o = this.localeMoment(n.start);
1968
- r >= o && (e = i + 1);
2378
+ let e = 0, s = this.localeDayjs(new Date(t.start));
2379
+ this.events.forEach((r, n) => {
2380
+ let i = this.localeDayjs(new Date(r.start));
2381
+ s >= i && (e = n + 1);
1969
2382
  }), this.events.splice(e, 0, t);
1970
2383
  }
1971
2384
  _handleRecurringEvents() {
@@ -1973,112 +2386,113 @@ class Cr {
1973
2386
  t.forEach((e) => {
1974
2387
  this._detachEvent(e);
1975
2388
  }), t.forEach((e) => {
1976
- let r = this.localeMoment(this.startDate), n = this.localeMoment(this.endDate).add(1, "days"), i = this.localeMoment(e.start), o = this.localeMoment(e.end), a = je(e.rrule), d, c = a.origOptions.until || n.toDate();
1977
- if (a.origOptions.dtstart && (d = this.localeMoment(a.origOptions.dtstart)), n < c && (a.origOptions.until = n.toDate()), a = je(a.toString()), e.exdates || e.exrule) {
1978
- const f = new er();
1979
- f.rrule(a), e.exrule && f.exrule(je(e.exrule)), e.exdates && e.exdates.forEach((m) => {
1980
- f.exdate(this.localeMoment(m).toDate());
1981
- }), a = f;
2389
+ let s = this.startDate, r = this.endDate.add(1, "days"), n = this.localeDayjs(new Date(e.start)), i = this.localeDayjs(new Date(e.end)), o = Ae(e.rrule), l, u = o.origOptions.until || r.toDate();
2390
+ if (o.origOptions.dtstart && (l = this.localeDayjs(new Date(o.origOptions.dtstart))), r < u && (o.origOptions.until = r.toDate()), o = Ae(o.toString()), e.exdates || e.exrule) {
2391
+ const f = new os();
2392
+ f.rrule(o), e.exrule && f.exrule(Ae(e.exrule)), e.exdates && e.exdates.forEach((h) => {
2393
+ f.exdate(this.localeDayjs(h).toDate());
2394
+ }), o = f;
1982
2395
  }
1983
- a.all().map((f, m) => ({
1984
- ...e,
1985
- recurringEventId: e.id,
1986
- recurringEventStart: e.start,
1987
- recurringEventEnd: e.end,
1988
- id: `${e.id}-${m}`,
1989
- start: a.origOptions.tzid ? this.localeMoment.utc(f).utcOffset(this.localeMoment().utcOffset(), !0).format(P) : this.localeMoment(f).format(P),
1990
- end: a.origOptions.tzid ? this.localeMoment.utc(f).utcOffset(this.localeMoment().utcOffset(), !0).add(o.diff(i), "ms").add(this.localeMoment(c).utcOffset() - this.localeMoment(e.start).utcOffset(), "m").format(P) : this.localeMoment(f).add(o.diff(i), "ms").format(P)
1991
- })).forEach((f) => {
1992
- let m = this.localeMoment(f.start), E = this.localeMoment(f.end);
1993
- this.isEventInTimeWindow(m, E, r, n) && (!d || m >= d) && this._attachEvent(f);
2396
+ o.between(new Date(s), new Date(r)).forEach((f, h) => {
2397
+ const v = {
2398
+ ...e,
2399
+ recurringEventId: e.id,
2400
+ recurringEventStart: e.start,
2401
+ recurringEventEnd: e.end,
2402
+ id: `${e.id}-${h}`,
2403
+ start: o.origOptions.tzid ? this.localeDayjs.utc(f).utcOffset(this.localeDayjs((/* @__PURE__ */ new Date()).utcOffset)(), !0).format(V) : this.localeDayjs(new Date(f)).format(V),
2404
+ end: o.origOptions.tzid ? this.localeDayjs.utc(f).utcOffset(this.localeDayjs((/* @__PURE__ */ new Date()).utcOffset)(), !0).add(i.diff(n), "ms").add(this.localeDayjs(new Date(u)).utcOffset() - this.localeDayjs(new Date(e.start)).utcOffset(), "m").format(V) : this.localeDayjs(new Date(f)).add(i.diff(n), "ms").format(V)
2405
+ };
2406
+ let D = this.localeDayjs(v.start), g = this.localeDayjs(v.end);
2407
+ this.isEventInTimeWindow(D, g, s, r) && (!l || D >= l) && this._attachEvent(v);
1994
2408
  });
1995
2409
  });
1996
2410
  }
1997
2411
  _resolveDate(t, e = void 0) {
1998
- if (e != null && (this.selectDate = this.localeMoment(e).format(W)), this.viewType === w.Week)
1999
- this.startDate = e != null ? this.localeMoment(e).startOf("week").format(W) : this.localeMoment(this.startDate).add(t, "weeks").format(W), this.endDate = this.localeMoment(this.startDate).endOf("week").format(W);
2000
- else if (this.viewType === w.Day)
2001
- this.startDate = e != null ? this.selectDate : this.localeMoment(this.startDate).add(t, "days").format(W), this.endDate = this.startDate;
2002
- else if (this.viewType === w.Month)
2003
- this.startDate = e != null ? this.localeMoment(e).startOf("month").format(W) : this.localeMoment(this.startDate).add(t, "months").format(W), this.endDate = this.localeMoment(this.startDate).endOf("month").format(W);
2004
- else if (this.viewType === w.Quarter)
2005
- this.startDate = e != null ? this.localeMoment(e).startOf("quarter").format(W) : this.localeMoment(this.startDate).add(t, "quarters").format(W), this.endDate = this.localeMoment(this.startDate).endOf("quarter").format(W);
2006
- else if (this.viewType === w.Year)
2007
- this.startDate = e != null ? this.localeMoment(e).startOf("year").format(W) : this.localeMoment(this.startDate).add(t, "years").format(W), this.endDate = this.localeMoment(this.startDate).endOf("year").format(W);
2008
- else if (this.viewType === w.Custom || this.viewType === w.Custom1 || this.viewType === w.Custom2)
2412
+ if (e != null && (this.selectDate = this.localeDayjs(e)), this.viewType === O.Week)
2413
+ this.startDate = e != null ? this.localeDayjs(e).startOf("week") : this.localeDayjs(this.startDate).add(t, "weeks"), this.endDate = this.localeDayjs(this.startDate).endOf("week");
2414
+ else if (this.viewType === O.Day)
2415
+ this.startDate = e != null ? this.selectDate : this.localeDayjs(this.startDate).add(t, "days"), this.endDate = this.startDate;
2416
+ else if (this.viewType === O.Month)
2417
+ this.startDate = e != null ? this.localeDayjs(e).startOf("month") : this.localeDayjs(this.startDate).add(t, "months"), this.endDate = this.localeDayjs(this.startDate).endOf("month");
2418
+ else if (this.viewType === O.Quarter)
2419
+ this.startDate = e != null ? this.localeDayjs(e).startOf("quarter") : this.localeDayjs(this.startDate).add(t, "quarters"), this.endDate = this.localeDayjs(this.startDate).endOf("quarter");
2420
+ else if (this.viewType === O.Year)
2421
+ this.startDate = e != null ? this.localeDayjs(e).startOf("year") : this.localeDayjs(this.startDate).add(t, "years"), this.endDate = this.localeDayjs(this.startDate).endOf("year");
2422
+ else if (this.viewType === O.Custom || this.viewType === O.Custom1 || this.viewType === O.Custom2)
2009
2423
  if (this.behaviors.getCustomDateFunc != null) {
2010
- let r = this.behaviors.getCustomDateFunc(this, t, e);
2011
- this.startDate = r.startDate, this.endDate = r.endDate, r.cellUnit && (this.cellUnit = r.cellUnit);
2424
+ let s = this.behaviors.getCustomDateFunc(this, t, e);
2425
+ this.startDate = this.localeDayjs(s.startDate), this.endDate = this.localeDayjs(s.endDate), s.cellUnit && (this.cellUnit = s.cellUnit);
2012
2426
  } else
2013
2427
  throw new Error("This is custom view type, set behaviors.getCustomDateFunc func to resolve the time window(startDate and endDate) yourself");
2014
2428
  }
2015
2429
  _createHeaders() {
2016
- let t = [], e = this.localeMoment(this.startDate), r = this.localeMoment(this.endDate), n = e;
2430
+ let t = [], e = this.localeDayjs(new Date(this.startDate)), s = this.localeDayjs(new Date(this.endDate)), r = e;
2017
2431
  if (this.showAgenda)
2018
- t.push({ time: n.format(P), nonWorkingTime: !1 });
2019
- else if (this.cellUnit === O.Hour) {
2020
- e = e.add(this.config.dayStartFrom, "hours"), r = r.add(this.config.dayStopTo, "hours"), e.hour() == 0 && (e = e.add(this.config.dayStartFrom, "hours")), r.hour() == 0 && (r = r.add(this.config.dayStopTo, "hours")), n = e;
2021
- let i = -1;
2022
- for (; n >= e && n <= r; ) {
2023
- if (n.hour() == i) {
2024
- n = n.add(1, "hours");
2432
+ t.push({ time: r.format(V), nonWorkingTime: !1 });
2433
+ else if (this.cellUnit === U.Hour) {
2434
+ e.hour() == 0 && (e = e.add(this.config.dayStartFrom, "hours")), s.hour() == 0 && (s = s.add(this.config.dayStopTo, "hours")), r = e;
2435
+ let n = -1;
2436
+ for (; r >= e && r <= s; ) {
2437
+ if (r.hour() == n) {
2438
+ r = r.add(1, "hours");
2025
2439
  continue;
2026
2440
  }
2027
- i = n.hour();
2028
- let o = this.getMinuteStepsInHour();
2029
- for (let a = 0; a < o; a++) {
2030
- let d = n.hour();
2031
- if (d >= this.config.dayStartFrom && d <= this.config.dayStopTo) {
2032
- let c = n.format(P), h = this.behaviors.isNonWorkingTimeFunc(this, c);
2033
- t.push({ time: c, nonWorkingTime: h });
2441
+ n = r.hour();
2442
+ let i = this.getMinuteStepsInHour();
2443
+ for (let o = 0; o < i; o++) {
2444
+ let l = r.hour();
2445
+ if (l >= this.config.dayStartFrom && l <= this.config.dayStopTo) {
2446
+ let u = r.format(V), c = this.behaviors.isNonWorkingTimeFunc(this, u);
2447
+ t.push({ time: u, nonWorkingTime: c });
2034
2448
  }
2035
- n = n.add(this.config.minuteStep, "minutes");
2449
+ r = r.add(this.config.minuteStep, "minutes");
2036
2450
  }
2037
2451
  }
2038
- } else if (this.cellUnit === O.Day)
2039
- for (; n >= e && n <= r; ) {
2040
- let i = n.format(P), o = n.weekday();
2041
- if (this.config.displayWeekend || o !== 0 && o !== 6) {
2042
- let a = this.behaviors.isNonWorkingTimeFunc(this, i);
2043
- t.push({ time: i, nonWorkingTime: a });
2452
+ } else if (this.cellUnit === U.Day)
2453
+ for (; r >= e && r <= s; ) {
2454
+ let n = r.format(V), i = r.weekday();
2455
+ if (this.config.displayWeekend || i !== 0 && i !== 6) {
2456
+ let o = this.behaviors.isNonWorkingTimeFunc(this, n);
2457
+ t.push({ time: n, nonWorkingTime: o });
2044
2458
  }
2045
- n = n.add(1, "days");
2459
+ r = r.add(1, "days");
2046
2460
  }
2047
- else if (this.cellUnit === O.Week)
2048
- for (; n >= e && n <= r; ) {
2049
- let i = n.format(W);
2050
- t.push({ time: i }), n = n.add(1, "weeks").startOf("week");
2461
+ else if (this.cellUnit === U.Week)
2462
+ for (; r >= e && r <= s; ) {
2463
+ let n = r.format(ge);
2464
+ t.push({ time: n }), r = r.add(1, "weeks").startOf("week");
2051
2465
  }
2052
- else if (this.cellUnit === O.Month)
2053
- for (; n >= e && n <= r; ) {
2054
- let i = n.format(W);
2055
- t.push({ time: i }), n = n.add(1, "months").startOf("month");
2466
+ else if (this.cellUnit === U.Month)
2467
+ for (; r >= e && r <= s; ) {
2468
+ let n = r.format(ge);
2469
+ t.push({ time: n }), r = r.add(1, "months").startOf("month");
2056
2470
  }
2057
- else if (this.cellUnit === O.Year)
2058
- for (; n >= e && n <= r; ) {
2059
- let i = n.format(W);
2060
- t.push({ time: i }), n = n.add(1, "years").startOf("year");
2471
+ else if (this.cellUnit === U.Year)
2472
+ for (; r >= e && r <= s; ) {
2473
+ let n = r.format(ge);
2474
+ t.push({ time: n }), r = r.add(1, "years").startOf("year");
2061
2475
  }
2062
2476
  this.headers = t;
2063
2477
  }
2064
2478
  _createInitHeaderEvents(t) {
2065
- let e = this.localeMoment(t.time), r = e.format(P), n = this.showAgenda ? this.viewType === w.Week ? e.add(1, "weeks").format(P) : this.viewType === w.Day ? e.add(1, "days").format(P) : this.viewType === w.Month ? e.add(1, "months").format(P) : this.viewType === w.Year ? e.add(1, "years").format(P) : this.viewType === w.Quarter ? e.add(1, "quarters").format(P) : this.localeMoment(this.endDate).add(1, "days").format(P) : this.cellUnit === O.Hour ? e.add(this.config.minuteStep, "minutes").format(P) : this.cellUnit === O.Year ? e.add(1, "years").format(W) : this.cellUnit === O.Month ? e.add(1, "months").format(W) : this.cellUnit === O.Week ? e.add(1, "weeks").format(W) : e.add(1, "days").format(P);
2479
+ let e = this.localeDayjs(new Date(t.time)), s = e.format(V), r = this.showAgenda ? this.viewType === O.Week ? e.add(1, "weeks").format(V) : this.viewType === O.Day ? e.add(1, "days").format(V) : this.viewType === O.Month ? e.add(1, "months").format(V) : this.viewType === O.Year ? e.add(1, "years").format(V) : this.viewType === O.Quarter ? e.add(1, "quarters").format(V) : this.localeDayjs(new Date(this.endDate)).add(1, "days").format(V) : this.cellUnit === U.Hour ? e.add(this.config.minuteStep, "minutes").format(V) : this.cellUnit === U.Year ? e.add(1, "years").format(ge) : this.cellUnit === U.Month ? e.add(1, "months").format(ge) : this.cellUnit === U.Week ? e.add(1, "weeks").format(ge) : e.add(1, "days").format(V);
2066
2480
  return {
2067
2481
  time: t.time,
2068
2482
  nonWorkingTime: t.nonWorkingTime,
2069
- start: r,
2070
- end: n,
2483
+ start: s,
2484
+ end: r,
2071
2485
  count: 0,
2072
2486
  addMore: 0,
2073
2487
  addMoreIndex: 0,
2074
2488
  events: [, , ,]
2075
2489
  };
2076
2490
  }
2077
- _createHeaderEvent(t, e, r) {
2491
+ _createHeaderEvent(t, e, s) {
2078
2492
  return {
2079
2493
  render: t,
2080
2494
  span: e,
2081
- eventItem: r
2495
+ eventItem: s
2082
2496
  };
2083
2497
  }
2084
2498
  _getEventSlotId(t) {
@@ -2092,94 +2506,127 @@ class Cr {
2092
2506
  }
2093
2507
  _generateEventGroups() {
2094
2508
  let t = [], e = /* @__PURE__ */ new Set();
2095
- this.events.forEach((r) => {
2096
- let n = this._getEventGroupId(r), i = this._getEventGroupName(r);
2097
- e.has(n) || (t.push({
2098
- id: n,
2099
- name: i,
2100
- state: r
2101
- }), e.add(n));
2509
+ this.events.forEach((s) => {
2510
+ let r = this._getEventGroupId(s), n = this._getEventGroupName(s);
2511
+ e.has(r) || (t.push({
2512
+ id: r,
2513
+ name: n,
2514
+ state: s
2515
+ }), e.add(r));
2102
2516
  }), this.eventGroups = t;
2103
2517
  }
2104
- _createInitRenderData(t, e, r, n) {
2105
- let i = t ? e : r, o = [], a = /* @__PURE__ */ new Map();
2106
- i.forEach((f) => {
2107
- let m = n.map((v) => this._createInitHeaderEvents(v)), E = {
2108
- slotId: f.id,
2109
- slotName: f.name,
2110
- parentId: f.parentId,
2111
- groupOnly: f.groupOnly,
2518
+ _createInitRenderData(t, e, s, r) {
2519
+ let n = t ? e : s, i = [], o = /* @__PURE__ */ new Map();
2520
+ n.forEach((h) => {
2521
+ let v = r.map((b) => this._createInitHeaderEvents(b)), D = {
2522
+ slotId: h.id,
2523
+ slotName: h.name,
2524
+ parentId: h.parentId,
2525
+ groupOnly: h.groupOnly,
2112
2526
  hasSummary: !1,
2113
2527
  rowMaxCount: 0,
2114
2528
  rowHeight: this.config.nonAgendaSlotMinHeight !== 0 ? this.config.nonAgendaSlotMinHeight : this.config.eventItemLineHeight + 2,
2115
- headerItems: m,
2529
+ headerItems: v,
2116
2530
  indent: 0,
2117
2531
  hasChildren: !1,
2118
2532
  expanded: !0,
2119
2533
  render: !0
2120
- }, R = f.id, C;
2121
- a.has(R) ? (C = a.get(R), C.data = E) : (C = {
2122
- data: E,
2534
+ }, g = h.id, w;
2535
+ o.has(g) ? (w = o.get(g), w.data = D) : (w = {
2536
+ data: D,
2123
2537
  children: []
2124
- }, a.set(R, C));
2125
- let x = f.parentId;
2126
- if (!x || x === R)
2127
- o.push(C);
2538
+ }, o.set(g, w));
2539
+ let T = h.parentId;
2540
+ if (!T || T === g)
2541
+ i.push(w);
2128
2542
  else {
2129
- let v;
2130
- a.has(x) ? v = a.get(x) : (v = {
2543
+ let b;
2544
+ o.has(T) ? b = o.get(T) : (b = {
2131
2545
  data: void 0,
2132
2546
  children: []
2133
- }, a.set(x, v)), v.children.push(C);
2547
+ }, o.set(T, b)), b.children.push(w);
2134
2548
  }
2135
2549
  });
2136
- let d = [], c;
2137
- for (c = o.length - 1; c >= 0; c--)
2138
- d.push(o[c]);
2139
- let h = [], p;
2140
- for (; d.length > 0; )
2141
- for (p = d.pop(), p.data.indent > 0 && (p.data.render = this.config.defaultExpanded), p.children.length > 0 && (p.data.hasChildren = !0, p.data.expanded = this.config.defaultExpanded), h.push(p.data), c = p.children.length - 1; c >= 0; c--)
2142
- p.children[c].data.indent = p.data.indent + 1, d.push(p.children[c]);
2143
- return h;
2144
- }
2145
- _getSpan(t, e, r) {
2550
+ let l = [], u;
2551
+ for (u = i.length - 1; u >= 0; u--)
2552
+ l.push(i[u]);
2553
+ let c = [], f;
2554
+ for (; l.length > 0; )
2555
+ for (f = l.pop(), f.data.indent > 0 && (f.data.render = this.config.defaultExpanded), f.children.length > 0 && (f.data.hasChildren = !0, f.data.expanded = this.config.defaultExpanded), c.push(f.data), u = f.children.length - 1; u >= 0; u--)
2556
+ f.children[u].data.indent = f.data.indent + 1, l.push(f.children[u]);
2557
+ return c;
2558
+ }
2559
+ _getSpan(t, e, s) {
2146
2560
  if (this.showAgenda)
2147
2561
  return 1;
2148
- let n = this.localeMoment(t), i = this.localeMoment(e), o = 0;
2149
- for (let a of r) {
2150
- let d = this.localeMoment(a.time), c = this.cellUnit === O.Hour ? this.localeMoment(a.time).add(this.config.minuteStep, "minutes") : this.cellUnit === O.Week ? this.localeMoment(a.time).add(1, "weeks") : this.cellUnit === O.Month ? this.localeMoment(a.time).add(1, "months") : this.cellUnit === O.Year ? this.localeMoment(a.time).add(1, "year") : this.localeMoment(a.time).add(1, "days");
2151
- d < i && c > n && o++;
2562
+ const r = (c, f, h) => {
2563
+ if ((h === "days" || h === "day") && c.getDate() === f.getDate() && c.getMonth() === f.getMonth())
2564
+ return 1;
2565
+ let v;
2566
+ switch (h) {
2567
+ case "days":
2568
+ case "day":
2569
+ v = 1e3 * 60 * 60 * 24;
2570
+ break;
2571
+ case "minutes":
2572
+ case "minute":
2573
+ v = 1e3 * 60;
2574
+ break;
2575
+ default:
2576
+ return 0;
2577
+ }
2578
+ const D = c.getTime(), w = (f.getTime() - D) / v;
2579
+ return w < 0 ? 0 : w;
2580
+ };
2581
+ let n = new Date(t), i = new Date(e), o = 0, l = new Date(this.startDate), u = new Date(this.endDate);
2582
+ if (this.viewType === O.Day) {
2583
+ if (s.length > 0) {
2584
+ const c = new Date(s[0].time);
2585
+ c.getDate() > n.getDate() && c.getDate() < i.getDate() ? o = 1440 / this.config.minuteStep : c.getDate() > n.getDate() && c.getDate() === i.getDate() ? o = Math.ceil(r(c, i, "minutes") / this.config.minuteStep) : c.getDate() === n.getDate() && c.getDate() < i.getDate() ? (c.setHours(23, 59, 59), o = Math.ceil(r(n, c, "minutes") / this.config.minuteStep)) : (c.getDate() === n.getDate() && c.getDate() === i.getDate() || i.getDate() === n.getDate()) && (o = Math.ceil(r(n, i, "minutes") / this.config.minuteStep));
2586
+ }
2587
+ } else if (this.viewType === O.Week) {
2588
+ const c = l < n ? n : l;
2589
+ o = Math.ceil(r(c, i, "days"));
2590
+ } else if (this.viewType === O.Month) {
2591
+ const c = n.getMonth() === i.getMonth() ? i : ve(n).endOf("month").toDate();
2592
+ o = Math.ceil(r(n, c, "days"));
2593
+ } else if (this.viewType === O.Quarter || this.viewType === O.Year)
2594
+ o = Math.ceil(r(n, i, "days"));
2595
+ else {
2596
+ l.setHours(0, 0, 0, 0), u.setHours(23, 59, 59), this.cellUnit === U.Day && (i.setHours(23, 59, 59), n.setHours(0, 0, 0, 0));
2597
+ const c = this.cellUnit === U.Day ? "days" : "minutes", f = this.cellUnit === U.Day ? 1 : this.config.minuteStep;
2598
+ l >= n && i <= u ? o = Math.ceil(r(l, i, c) / f) : l > n && i > u ? o = Math.ceil(r(l, u, c) / f) : l <= n && i >= u ? o = Math.ceil(r(n, u, c) / f) : o = Math.ceil(r(n, i, c) / f);
2152
2599
  }
2153
2600
  return o;
2154
2601
  }
2155
2602
  _validateResource(t) {
2156
2603
  if (Object.prototype.toString.call(t) !== "[object Array]")
2157
2604
  throw new Error("Resources should be Array object");
2158
- t.forEach((e, r) => {
2605
+ t.forEach((e, s) => {
2159
2606
  if (e == null)
2160
- throw console.error(`Resource undefined: ${r}`), new Error(`Resource undefined: ${r}`);
2607
+ throw console.error(`Resource undefined: ${s}`), new Error(`Resource undefined: ${s}`);
2161
2608
  if (e.id == null || e.name == null)
2162
- throw console.error("Resource property missed", r, e), new Error(`Resource property undefined: ${r}`);
2609
+ throw console.error("Resource property missed", s, e), new Error(`Resource property undefined: ${s}`);
2163
2610
  });
2164
2611
  }
2165
2612
  _validateEventGroups(t) {
2166
2613
  if (Object.prototype.toString.call(t) !== "[object Array]")
2167
2614
  throw new Error("Event groups should be Array object");
2168
- t.forEach((e, r) => {
2615
+ t.forEach((e, s) => {
2169
2616
  if (e == null)
2170
- throw console.error(`Event group undefined: ${r}`), new Error(`Event group undefined: ${r}`);
2617
+ throw console.error(`Event group undefined: ${s}`), new Error(`Event group undefined: ${s}`);
2171
2618
  if (e.id == null || e.name == null)
2172
- throw console.error("Event group property missed", r, e), new Error(`Event group property undefined: ${r}`);
2619
+ throw console.error("Event group property missed", s, e), new Error(`Event group property undefined: ${s}`);
2173
2620
  });
2174
2621
  }
2175
2622
  _validateEvents(t) {
2176
2623
  if (Object.prototype.toString.call(t) !== "[object Array]")
2177
2624
  throw new Error("Events should be Array object");
2178
- t.forEach((e, r) => {
2625
+ t.forEach((e, s) => {
2179
2626
  if (e == null)
2180
- throw console.error(`Event undefined: ${r}`), new Error(`Event undefined: ${r}`);
2627
+ throw console.error(`Event undefined: ${s}`), new Error(`Event undefined: ${s}`);
2181
2628
  if (e.id == null || e.resourceId == null || e.title == null || e.start == null || e.end == null)
2182
- throw console.error("Event property missed", r, e), new Error(`Event property undefined: ${r}`);
2629
+ throw console.error("Event property missed", s, e), new Error(`Event property undefined: ${s}`);
2183
2630
  });
2184
2631
  }
2185
2632
  _validateMinuteStep(t) {
@@ -2187,60 +2634,60 @@ class Cr {
2187
2634
  throw console.error("Minute step is not set properly - 60 minutes must be divisible without remainder by this number"), new Error("Minute step is not set properly - 60 minutes must be divisible without remainder by this number");
2188
2635
  }
2189
2636
  _compare(t, e) {
2190
- let r = this.localeMoment(t.start), n = this.localeMoment(e.start);
2191
- if (r !== n)
2192
- return r < n ? -1 : 1;
2193
- let i = this.localeMoment(t.end), o = this.localeMoment(e.end);
2194
- return i !== o ? i < o ? -1 : 1 : t.id < e.id ? -1 : 1;
2637
+ let s = this.localeDayjs(t.start), r = this.localeDayjs(e.start);
2638
+ if (s !== r)
2639
+ return s < r ? -1 : 1;
2640
+ let n = this.localeDayjs(t.end), i = this.localeDayjs(e.end);
2641
+ return n !== i ? n < i ? -1 : 1 : t.id < e.id ? -1 : 1;
2195
2642
  }
2196
2643
  _createRenderData() {
2197
2644
  let t = this._createInitRenderData(this.isEventPerspective, this.eventGroups, this.resources, this.headers), e = this.getCellMaxEvents();
2198
- const r = 30;
2199
- this.events.forEach((n) => {
2200
- let i = t.filter((o) => o.slotId === this._getEventSlotId(n));
2201
- if (i.length > 0) {
2202
- let o = i[0], a = this._getSpan(n.start, n.end, this.headers), d = this.localeMoment(n.start), c = this.localeMoment(n.end), h = -1;
2203
- o.headerItems.forEach((p, f) => {
2204
- let m = this.localeMoment(p.start);
2205
- if (this.localeMoment(p.end) > d && m < c) {
2206
- if (p.count = p.count + 1, p.count > o.rowMaxCount) {
2207
- o.rowMaxCount = p.count;
2208
- let x = (e <= r && o.rowMaxCount > e ? e : o.rowMaxCount) * this.config.eventItemLineHeight + (this.config.creatable && this.config.checkConflict === !1 ? 20 : 2);
2209
- x > o.rowHeight && (o.rowHeight = x);
2645
+ const s = 30;
2646
+ this.events.forEach((r) => {
2647
+ let n = t.filter((i) => i.slotId === this._getEventSlotId(r));
2648
+ if (n.length > 0) {
2649
+ let i = n[0], o = this._getSpan(r.start, r.end, this.headers), l = new Date(r.start), u = new Date(r.end), c = -1;
2650
+ i.headerItems.forEach((f, h) => {
2651
+ let v = new Date(f.start);
2652
+ if (new Date(f.end) > l && v < u) {
2653
+ if (f.count = f.count + 1, f.count > i.rowMaxCount) {
2654
+ i.rowMaxCount = f.count;
2655
+ let T = (e <= s && i.rowMaxCount > e ? e : i.rowMaxCount) * this.config.eventItemLineHeight + (this.config.creatable && this.config.checkConflict === !1 ? 20 : 2);
2656
+ T > i.rowHeight && (i.rowHeight = T);
2210
2657
  }
2211
- if (h === -1) {
2212
- let C = 0;
2213
- for (; p.events[C] !== void 0; )
2214
- C++;
2215
- h = C;
2658
+ if (c === -1) {
2659
+ let w = 0;
2660
+ for (; f.events[w] !== void 0; )
2661
+ w++;
2662
+ c = w;
2216
2663
  }
2217
- let R = m <= d || f === 0;
2218
- if (R === !1) {
2219
- let C = o.headerItems[f - 1], x = this.localeMoment(C.start);
2220
- (this.localeMoment(C.end) <= d || x >= c) && (R = !0);
2664
+ let g = v <= l || h === 0;
2665
+ if (g === !1) {
2666
+ let w = i.headerItems[h - 1], T = new Date(w.start);
2667
+ (new Date(w.end) <= l || T >= u) && (g = !0);
2221
2668
  }
2222
- p.events[h] = this._createHeaderEvent(R, a, n);
2669
+ f.events[c] = this._createHeaderEvent(g, o, r);
2223
2670
  }
2224
2671
  });
2225
2672
  }
2226
- }), (e <= r || this.behaviors.getSummaryFunc !== void 0) && t.forEach((n) => {
2227
- let i = !1;
2228
- if (n.headerItems.forEach((o) => {
2229
- if (e <= r) {
2230
- let a = 0, d = 0, c = 0;
2231
- for (; c < e - 1; )
2232
- o.events[c] !== void 0 && (a++, d = c + 1), c++;
2233
- o.events[c] !== void 0 ? a + 1 < o.count && (o.addMore = o.count - a, o.addMoreIndex = d) : a < o.count && (o.addMore = o.count - a, o.addMoreIndex = d);
2673
+ }), (e <= s || this.behaviors.getSummaryFunc !== void 0) && t.forEach((r) => {
2674
+ let n = !1;
2675
+ if (r.headerItems.forEach((i) => {
2676
+ if (e <= s) {
2677
+ let o = 0, l = 0, u = 0;
2678
+ for (; u < e - 1; )
2679
+ i.events[u] !== void 0 && (o++, l = u + 1), u++;
2680
+ i.events[u] !== void 0 ? o + 1 < i.count && (i.addMore = i.count - o, i.addMoreIndex = l) : o < i.count && (i.addMore = i.count - o, i.addMoreIndex = l);
2234
2681
  }
2235
2682
  if (this.behaviors.getSummaryFunc !== void 0) {
2236
- let a = [];
2237
- o.events.forEach((d) => {
2238
- d && d.eventItem && a.push(d.eventItem);
2239
- }), o.summary = this.behaviors.getSummaryFunc(this, a, n.slotId, n.slotName, o.start, o.end), o.summary && o.summary.text != null && (i = !0);
2683
+ let o = [];
2684
+ i.events.forEach((l) => {
2685
+ l && l.eventItem && o.push(l.eventItem);
2686
+ }), i.summary = this.behaviors.getSummaryFunc(this, o, r.slotId, r.slotName, i.start, i.end), i.summary && i.summary.text != null && (n = !0);
2240
2687
  }
2241
- }), n.hasSummary = i, i) {
2242
- let a = ((e <= r && n.rowMaxCount > e ? e : n.rowMaxCount) + 1) * this.config.eventItemLineHeight + (this.config.creatable && this.config.checkConflict === !1 ? 20 : 2);
2243
- a > n.rowHeight && (n.rowHeight = a);
2688
+ }), r.hasSummary = n, n) {
2689
+ let o = ((e <= s && r.rowMaxCount > e ? e : r.rowMaxCount) + 1) * this.config.eventItemLineHeight + (this.config.creatable && this.config.checkConflict === !1 ? 20 : 2);
2690
+ o > r.rowHeight && (r.rowHeight = o);
2244
2691
  }
2245
2692
  }), this.renderData = t;
2246
2693
  }
@@ -2254,7 +2701,7 @@ class Cr {
2254
2701
  return this.resizing;
2255
2702
  }
2256
2703
  }
2257
- const Rr = {
2704
+ const $s = {
2258
2705
  resources: [
2259
2706
  { id: "r0", name: "Resource0", groupOnly: !0 },
2260
2707
  { id: "r1", name: "Resource1", parentId: "r0" },
@@ -2275,7 +2722,7 @@ const Rr = {
2275
2722
  { id: 7, start: "2022-12-19 15:40:00", end: "2022-12-20 23:30:00", resourceId: "r7", title: "I am exceptional", bgColor: "#FA9E95" },
2276
2723
  { id: 8, start: "2022-12-19 15:50:00", end: "2022-12-19 23:30:00", resourceId: "r1", title: "I am locked", movable: !1, resizable: !1, bgColor: "red" },
2277
2724
  { id: 9, start: "2022-12-19 16:30:00", end: "2022-12-27 23:30:00", resourceId: "r1", title: "R1 has many tasks 1" },
2278
- { id: 10, start: "2022-12-19 17:30:00", end: "2022-12-19 23:30:00", resourceId: "r1", title: "R1 has recurring tasks every week on Tuesday, Friday", bgColor: "#f759ab" },
2725
+ { id: 10, start: "2022-12-19 17:30:00", end: "2022-12-19 23:30:00", resourceId: "r1", title: "R1 has recurring tasks every week on Tuesday, Friday", rrule: "FREQ=WEEKLY;DTSTART=20221219T013000Z;BYDAY=TU,FR", bgColor: "#f759ab" },
2279
2726
  { id: 11, start: "2022-12-19 18:30:00", end: "2022-12-20 23:30:00", resourceId: "r1", title: "R1 has many tasks 3" },
2280
2727
  { id: 12, start: "2022-12-20 18:30:00", end: "2022-12-20 23:30:00", resourceId: "r1", title: "R1 has many tasks 4" },
2281
2728
  { id: 13, start: "2022-12-21 18:30:00", end: "2022-12-24 23:30:00", resourceId: "r1", title: "R1 has many tasks 5" },
@@ -2290,9 +2737,20 @@ const Rr = {
2290
2737
  { id: 5, start: "2022-12-21 15:30:00", end: "2022-12-22 23:30:00", resourceId: "r5", title: "I am not end-resizable", endResizable: !1, groupId: 3, groupName: "Task3" },
2291
2738
  { id: 9, start: "2022-12-21 16:30:00", end: "2022-12-21 23:30:00", resourceId: "r1", title: "R1 has many tasks", groupId: 4, groupName: "Task4" },
2292
2739
  { id: 6, start: "2022-12-22 15:35:00", end: "2022-12-23 23:30:00", resourceId: "r6", title: "I am normal", groupId: 1, groupName: "Task1" },
2293
- { id: 8, start: "2022-12-25 15:50:00", end: "2022-12-26 23:30:00", resourceId: "r1", title: "I am locked", movable: !1, resizable: !1, bgColor: "red", groupId: 1, groupName: "Task1" },
2740
+ {
2741
+ id: 8,
2742
+ start: "2022-12-25 15:50:00",
2743
+ end: "2022-12-26 23:30:00",
2744
+ resourceId: "r1",
2745
+ title: "I am locked",
2746
+ movable: !1,
2747
+ resizable: !1,
2748
+ bgColor: "red",
2749
+ groupId: 1,
2750
+ groupName: "Task1"
2751
+ },
2294
2752
  { id: 10, start: "2022-12-26 18:30:00", end: "2022-12-26 23:30:00", resourceId: "r2", title: "R2 has many tasks", groupId: 4, groupName: "Task4" },
2295
- { id: 11, start: "2022-12-27 18:30:00", end: "2022-12-27 23:30:00", resourceId: "r14", title: "R4 has many tasks", groupId: 4, groupName: "Task4" },
2753
+ { id: 11, start: "2022-12-27 18:30:00", end: "2022-12-27 23:30:00", resourceId: "r4", title: "R4 has many tasks", groupId: 4, groupName: "Task4" },
2296
2754
  { id: 12, start: "2022-12-28 18:30:00", end: "2022-12-28 23:30:00", resourceId: "r6", title: "R6 has many tasks", groupId: 3, groupName: "Task3" }
2297
2755
  ],
2298
2756
  eventsForCustomEventStyle: [
@@ -2309,328 +2767,306 @@ const Rr = {
2309
2767
  { id: 11, start: "2022-12-21 18:30:00", end: "2022-12-22 23:30:00", resourceId: "r1", title: "R1 has many tasks 3", type: 2 },
2310
2768
  { id: 12, start: "2022-12-23 18:30:00", end: "2022-12-27 23:30:00", resourceId: "r1", title: "R1 has many tasks 4", type: 3 }
2311
2769
  ]
2770
+ }, Cs = ut.Button, Ss = ut.Group, Tt = ({ onViewChange: R, goNext: t, goBack: e, onSelectDate: s, schedulerData: r, leftCustomHeader: n, rightCustomHeader: i }) => {
2771
+ var z, W;
2772
+ const [o, l] = ke(!1), [u, c] = ke(!1), [f, h] = ke(!1), { viewType: v, showAgenda: D, isEventPerspective: g, config: w } = r, T = r.getDateLabel(), b = r.getSelectedDate(), k = (W = (z = r.getCalendarPopoverLocale()) == null ? void 0 : z.default) == null ? void 0 : W.Calendar, A = `${v}${D ? 1 : 0}${g ? 1 : 0}`, $ = (C, X, Z = void 0) => {
2773
+ const { config: S } = r;
2774
+ X ? S.viewChangeSpinEnabled && l(!0) : S.dateChangeSpinEnabled && c(!0);
2775
+ const x = () => {
2776
+ Z !== void 0 ? C(Z) : C(), X ? S.viewChangeSpinEnabled && l(!1) : S.dateChangeSpinEnabled && c(!1);
2777
+ };
2778
+ S.viewChangeSpinEnabled || S.dateChangeSpinEnabled ? setTimeout(x, S.schedulerHeaderEventsFuncsTimeoutMs) : x();
2779
+ }, H = /* @__PURE__ */ d.jsx("div", { className: "popover-calendar", children: /* @__PURE__ */ d.jsx(
2780
+ Zt,
2781
+ {
2782
+ locale: k,
2783
+ defaultValue: ve(b),
2784
+ fullscreen: !1,
2785
+ onSelect: (C) => {
2786
+ h(!1), $(s, !1, C.format(ge));
2787
+ }
2788
+ }
2789
+ ) }), N = w.views.map((C) => /* @__PURE__ */ d.jsx(
2790
+ Cs,
2791
+ {
2792
+ value: `${C.viewType}${C.showAgenda ? 1 : 0}${C.isEventPerspective ? 1 : 0}`,
2793
+ children: /* @__PURE__ */ d.jsx("span", { style: { margin: "0px 8px" }, children: C.viewName })
2794
+ },
2795
+ `${C.viewType}${C.showAgenda ? 1 : 0}${C.isEventPerspective ? 1 : 0}`
2796
+ ));
2797
+ return /* @__PURE__ */ d.jsxs(we, { gutter: [10, 10], type: "flex", align: "middle", justify: "space-between", style: { marginBottom: "24px" }, children: [
2798
+ n,
2799
+ /* @__PURE__ */ d.jsx(de, { children: /* @__PURE__ */ d.jsx("div", { className: "header2-text", children: /* @__PURE__ */ d.jsxs(it, { children: [
2800
+ /* @__PURE__ */ d.jsxs("div", { children: [
2801
+ /* @__PURE__ */ d.jsx(is, { type: "left", style: { marginRight: "8px" }, className: "icon-nav", onClick: () => $(e, !1) }),
2802
+ w.calendarPopoverEnabled ? /* @__PURE__ */ d.jsx(Fe, { content: H, placement: "bottomLeft", trigger: "click", open: f, onOpenChange: h, children: /* @__PURE__ */ d.jsx("span", { className: "header2-text-label", style: { cursor: "pointer" }, children: T }) }) : /* @__PURE__ */ d.jsx("span", { className: "header2-text-label", children: T }),
2803
+ /* @__PURE__ */ d.jsx(as, { type: "right", style: { marginLeft: "8px" }, className: "icon-nav", onClick: () => $(t, !1) })
2804
+ ] }),
2805
+ /* @__PURE__ */ d.jsx(at, { spinning: u })
2806
+ ] }) }) }),
2807
+ /* @__PURE__ */ d.jsx(de, { children: /* @__PURE__ */ d.jsxs(it, { children: [
2808
+ /* @__PURE__ */ d.jsx(at, { spinning: o }),
2809
+ /* @__PURE__ */ d.jsx(Ss, { buttonStyle: "solid", defaultValue: A, size: "default", onChange: (C) => $(R, !0, C), children: N })
2810
+ ] }) }),
2811
+ i
2812
+ ] });
2312
2813
  };
2313
- function Sr(b) {
2314
- return (t) => /* @__PURE__ */ l.jsx(Zt, { backend: tr, children: /* @__PURE__ */ l.jsx(b, { ...t }) });
2315
- }
2316
- const cr = it.Button, ur = it.Group;
2317
- class hr extends _e {
2814
+ Tt.propTypes = {
2815
+ onViewChange: p.func.isRequired,
2816
+ goNext: p.func.isRequired,
2817
+ goBack: p.func.isRequired,
2818
+ onSelectDate: p.func.isRequired,
2819
+ schedulerData: p.object.isRequired,
2820
+ leftCustomHeader: p.object,
2821
+ rightCustomHeader: p.object
2822
+ };
2823
+ const Ps = (R) => (t) => /* @__PURE__ */ d.jsx(ts, { backend: ls, children: /* @__PURE__ */ d.jsx(R, { ...t }) });
2824
+ class Rs extends We {
2318
2825
  constructor(e) {
2319
2826
  super(e);
2320
- M(this, "onWindowResize", (e) => {
2321
- const { schedulerData: r } = this.props;
2322
- r._setDocumentWidth(document.documentElement.clientWidth), this.setState({
2323
- documentWidth: document.documentElement.clientWidth,
2324
- documentHeight: document.documentElement.clientHeight
2325
- });
2827
+ P(this, "onWindowResize", (e) => {
2828
+ const { schedulerData: s } = this.props;
2829
+ s._setDocumentWidth(document.documentElement.clientWidth), this.setState({ documentWidth: document.documentElement.clientWidth, documentHeight: document.documentElement.clientHeight });
2326
2830
  });
2327
- M(this, "resolveScrollbarSize", () => {
2328
- const { schedulerData: e } = this.props;
2329
- let r = 17, n = 17, i = 17, o = 17, a = e.getSchedulerContentDesiredHeight();
2330
- this.schedulerContent && (r = this.schedulerContent.offsetHeight - this.schedulerContent.clientHeight, n = this.schedulerContent.offsetWidth - this.schedulerContent.clientWidth), this.schedulerResource && (i = this.schedulerResource.offsetHeight - this.schedulerResource.clientHeight, o = this.schedulerResource.offsetWidth - this.schedulerResource.clientWidth), this.schedulerContentBgTable && this.schedulerContentBgTable.offsetHeight && (a = this.schedulerContentBgTable.offsetHeight);
2331
- let d = {}, c = !1;
2332
- r != this.state.contentScrollbarHeight && (d = {
2333
- ...d,
2334
- contentScrollbarHeight: r
2335
- }, c = !0), n != this.state.contentScrollbarWidth && (d = { ...d, contentScrollbarWidth: n }, c = !0), a != this.state.contentHeight && (d = { ...d, contentHeight: a }, c = !0), i != this.state.resourceScrollbarHeight && (d = {
2336
- ...d,
2337
- resourceScrollbarHeight: i
2338
- }, c = !0), o != this.state.resourceScrollbarWidth && (d = {
2339
- ...d,
2340
- resourceScrollbarWidth: o
2341
- }, c = !0), c && this.setState(d);
2831
+ P(this, "resolveScrollbarSize", () => {
2832
+ this.props;
2833
+ let e = 17, s = 17, r = 17, n = 17;
2834
+ this.schedulerContent && (e = this.schedulerContent.offsetHeight - this.schedulerContent.clientHeight, s = this.schedulerContent.offsetWidth - this.schedulerContent.clientWidth), this.schedulerResource && (r = this.schedulerResource.offsetHeight - this.schedulerResource.clientHeight, n = this.schedulerResource.offsetWidth - this.schedulerResource.clientWidth);
2835
+ let i = {}, o = !1;
2836
+ e != this.state.contentScrollbarHeight && (i = { ...i, contentScrollbarHeight: e }, o = !0), s != this.state.contentScrollbarWidth && (i = { ...i, contentScrollbarWidth: s }, o = !0), r != this.state.resourceScrollbarHeight && (i = { ...i, resourceScrollbarHeight: r }, o = !0), n != this.state.resourceScrollbarWidth && (i = { ...i, resourceScrollbarWidth: n }, o = !0), o && this.setState(i);
2342
2837
  });
2343
- M(this, "schedulerHeadRef", (e) => {
2838
+ P(this, "schedulerHeadRef", (e) => {
2344
2839
  this.schedulerHead = e;
2345
2840
  });
2346
- M(this, "onSchedulerHeadMouseOver", () => {
2841
+ P(this, "onSchedulerHeadMouseOver", () => {
2347
2842
  this.currentArea = 2;
2348
2843
  });
2349
- M(this, "onSchedulerHeadMouseOut", () => {
2844
+ P(this, "onSchedulerHeadMouseOut", () => {
2350
2845
  this.currentArea = -1;
2351
2846
  });
2352
- M(this, "onSchedulerHeadScroll", (e, r) => {
2847
+ P(this, "onSchedulerHeadScroll", (e, s) => {
2353
2848
  (this.currentArea === 2 || this.currentArea === -1) && this.schedulerContent.scrollLeft != this.schedulerHead.scrollLeft && (this.schedulerContent.scrollLeft = this.schedulerHead.scrollLeft);
2354
2849
  });
2355
- M(this, "schedulerResourceRef", (e) => {
2850
+ P(this, "schedulerResourceRef", (e) => {
2356
2851
  this.schedulerResource = e;
2357
2852
  });
2358
- M(this, "onSchedulerResourceMouseOver", () => {
2853
+ P(this, "onSchedulerResourceMouseOver", () => {
2359
2854
  this.currentArea = 1;
2360
2855
  });
2361
- M(this, "onSchedulerResourceMouseOut", () => {
2856
+ P(this, "onSchedulerResourceMouseOut", () => {
2362
2857
  this.currentArea = -1;
2363
2858
  });
2364
- M(this, "onSchedulerResourceScroll", (e, r) => {
2365
- (this.currentArea === 1 || this.currentArea === -1) && this.schedulerContent.scrollTop != this.schedulerResource.scrollTop && (this.schedulerContent.scrollTop = this.schedulerResource.scrollTop);
2859
+ P(this, "onSchedulerResourceScroll", (e, s) => {
2860
+ this.schedulerResource && (this.currentArea === 1 || this.currentArea === -1) && this.schedulerContent.scrollTop != this.schedulerResource.scrollTop && (this.schedulerContent.scrollTop = this.schedulerResource.scrollTop);
2366
2861
  });
2367
- M(this, "schedulerContentRef", (e) => {
2862
+ P(this, "schedulerContentRef", (e) => {
2368
2863
  this.schedulerContent = e;
2369
2864
  });
2370
- M(this, "schedulerContentBgTableRef", (e) => {
2865
+ P(this, "schedulerContentBgTableRef", (e) => {
2371
2866
  this.schedulerContentBgTable = e;
2372
2867
  });
2373
- M(this, "onSchedulerContentMouseOver", () => {
2868
+ P(this, "onSchedulerContentMouseOver", () => {
2374
2869
  this.currentArea = 0;
2375
2870
  });
2376
- M(this, "onSchedulerContentMouseOut", () => {
2871
+ P(this, "onSchedulerContentMouseOut", () => {
2377
2872
  this.currentArea = -1;
2378
2873
  });
2379
- M(this, "onSchedulerContentScroll", (e, r) => {
2380
- (this.currentArea === 0 || this.currentArea === -1) && (this.schedulerHead.scrollLeft != this.schedulerContent.scrollLeft && (this.schedulerHead.scrollLeft = this.schedulerContent.scrollLeft), this.schedulerResource.scrollTop != this.schedulerContent.scrollTop && (this.schedulerResource.scrollTop = this.schedulerContent.scrollTop));
2381
- const { schedulerData: n, onScrollLeft: i, onScrollRight: o, onScrollTop: a, onScrollBottom: d } = this.props, { scrollLeft: c, scrollTop: h } = this.state;
2382
- this.schedulerContent.scrollLeft !== c ? (this.schedulerContent.scrollLeft === 0 && i != null && i(n, this.schedulerContent, this.schedulerContent.scrollWidth - this.schedulerContent.clientWidth), this.schedulerContent.scrollLeft === this.schedulerContent.scrollWidth - this.schedulerContent.clientWidth && o != null && o(n, this.schedulerContent, this.schedulerContent.scrollWidth - this.schedulerContent.clientWidth)) : this.schedulerContent.scrollTop !== h && (this.schedulerContent.scrollTop === 0 && a != null && a(n, this.schedulerContent, this.schedulerContent.scrollHeight - this.schedulerContent.clientHeight), this.schedulerContent.scrollTop === this.schedulerContent.scrollHeight - this.schedulerContent.clientHeight && d != null && d(n, this.schedulerContent, this.schedulerContent.scrollHeight - this.schedulerContent.clientHeight)), this.setState({
2383
- scrollLeft: this.schedulerContent.scrollLeft,
2384
- scrollTop: this.schedulerContent.scrollTop
2385
- });
2874
+ P(this, "onSchedulerContentScroll", (e, s) => {
2875
+ this.schedulerResource && (this.currentArea === 0 || this.currentArea === -1) && (this.schedulerHead.scrollLeft != this.schedulerContent.scrollLeft && (this.schedulerHead.scrollLeft = this.schedulerContent.scrollLeft), this.schedulerResource.scrollTop != this.schedulerContent.scrollTop && (this.schedulerResource.scrollTop = this.schedulerContent.scrollTop));
2876
+ const { schedulerData: r, onScrollLeft: n, onScrollRight: i, onScrollTop: o, onScrollBottom: l } = this.props;
2877
+ this.schedulerContent.scrollLeft !== this.scrollLeft ? (this.schedulerContent.scrollLeft === 0 && n != null && n(r, this.schedulerContent, this.schedulerContent.scrollWidth - this.schedulerContent.clientWidth), Math.round(this.schedulerContent.scrollLeft) === this.schedulerContent.scrollWidth - this.schedulerContent.clientWidth && i != null && i(r, this.schedulerContent, this.schedulerContent.scrollWidth - this.schedulerContent.clientWidth)) : this.schedulerContent.scrollTop !== this.scrollTop && (this.schedulerContent.scrollTop === 0 && o != null && o(r, this.schedulerContent, this.schedulerContent.scrollHeight - this.schedulerContent.clientHeight), Math.round(this.schedulerContent.scrollTop) === this.schedulerContent.scrollHeight - this.schedulerContent.clientHeight && l != null && l(r, this.schedulerContent, this.schedulerContent.scrollHeight - this.schedulerContent.clientHeight)), this.scrollLeft = this.schedulerContent.scrollLeft, this.scrollTop = this.schedulerContent.scrollTop;
2386
2878
  });
2387
- M(this, "onViewChange", (e) => {
2388
- const { onViewChange: r, schedulerData: n } = this.props;
2389
- let i = parseInt(e.target.value.charAt(0)), o = e.target.value.charAt(1) === "1", a = e.target.value.charAt(2) === "1";
2390
- r(n, {
2391
- viewType: i,
2392
- showAgenda: o,
2393
- isEventPerspective: a
2394
- });
2879
+ P(this, "onViewChange", (e) => {
2880
+ const { onViewChange: s, schedulerData: r } = this.props;
2881
+ let n = parseInt(e.target.value.charAt(0)), i = e.target.value.charAt(1) === "1", o = e.target.value.charAt(2) === "1";
2882
+ s(r, { viewType: n, showAgenda: i, isEventPerspective: o }), this.setState({ ...this.state, spinning: !1 });
2395
2883
  });
2396
- M(this, "goNext", () => {
2397
- const { nextClick: e, schedulerData: r } = this.props;
2398
- e(r);
2884
+ P(this, "goNext", () => {
2885
+ const { nextClick: e, schedulerData: s } = this.props;
2886
+ e(s);
2399
2887
  });
2400
- M(this, "goBack", () => {
2401
- const { prevClick: e, schedulerData: r } = this.props;
2402
- e(r);
2888
+ P(this, "goBack", () => {
2889
+ const { prevClick: e, schedulerData: s } = this.props;
2890
+ e(s);
2403
2891
  });
2404
- M(this, "handleVisibleChange", (e) => {
2405
- this.setState({ visible: e });
2892
+ P(this, "onSelect", (e) => {
2893
+ const { onSelectDate: s, schedulerData: r } = this.props;
2894
+ s(r, e);
2406
2895
  });
2407
- M(this, "onSelect", (e) => {
2408
- this.setState({
2409
- visible: !1
2410
- });
2411
- const { onSelectDate: r, schedulerData: n } = this.props;
2412
- r(n, e);
2413
- });
2414
- const { schedulerData: r, dndSources: n } = e;
2896
+ const { schedulerData: s, dndSources: r, parentRef: n } = e;
2415
2897
  let i = [];
2416
- i.push(new ot((a) => a.eventItem, Ne)), n != null && n.length > 0 && (i = [...i, ...n]);
2417
- let o = new sr(i, ft);
2418
- this.currentArea = -1, r._setDocumentWidth(document.documentElement.clientWidth), this.state = {
2419
- visible: !1,
2898
+ i.push(new ht((l) => l.eventItem, Be, s.config.dragAndDropEnabled)), r != null && r.length > 0 && (i = [...i, ...r]);
2899
+ let o = new us(i, yt);
2900
+ this.currentArea = -1, this.state = {
2420
2901
  dndContext: o,
2421
- contentHeight: r.getSchedulerContentDesiredHeight(),
2422
2902
  contentScrollbarHeight: 17,
2423
2903
  contentScrollbarWidth: 17,
2424
2904
  resourceScrollbarHeight: 17,
2425
2905
  resourceScrollbarWidth: 17,
2426
- scrollLeft: 0,
2427
- scrollTop: 0,
2428
- documentWidth: document.documentElement.clientWidth,
2429
- documentHeight: document.documentElement.clientHeight
2430
- }, r.isSchedulerResponsive() && (window.onresize = this.onWindowResize);
2431
- }
2432
- componentDidMount(e, r) {
2433
- this.resolveScrollbarSize();
2906
+ documentWidth: 0,
2907
+ documentHeight: 0
2908
+ }, this.scrollLeft = 0, this.scrollTop = 0, (s.isSchedulerResponsive() && !s.config.responsiveByParent || n === void 0) && (s._setDocumentWidth(document.documentElement.clientWidth), window.onresize = this.onWindowResize);
2909
+ }
2910
+ componentDidMount(e, s) {
2911
+ const { schedulerData: r, parentRef: n } = this.props;
2912
+ this.resolveScrollbarSize(), n !== void 0 && r.config.responsiveByParent && n.current && (r._setDocumentWidth(n.current.offsetWidth), this.ulObserver = new ResizeObserver((i, o) => {
2913
+ if (n.current) {
2914
+ const l = n.current.offsetWidth, u = n.current.offsetHeight;
2915
+ r._setDocumentWidth(l), this.setState({
2916
+ documentWidth: l,
2917
+ documentHeight: u
2918
+ });
2919
+ }
2920
+ }), this.ulObserver.observe(n.current));
2434
2921
  }
2435
- componentDidUpdate(e, r) {
2922
+ componentDidUpdate(e, s) {
2436
2923
  this.resolveScrollbarSize();
2437
- const { schedulerData: n } = this.props, { localeMoment: i, behaviors: o } = n;
2438
- if (n.getScrollToSpecialMoment() && o.getScrollSpecialMomentFunc && this.schedulerContent && this.schedulerContent.scrollWidth > this.schedulerContent.clientWidth) {
2439
- let a = i(n.startDate).startOf("day"), d = i(n.endDate).endOf("day"), c = o.getScrollSpecialMomentFunc(n, a, d);
2440
- if (c >= a && c <= d) {
2441
- let h = 0;
2442
- n.headers.forEach((p) => {
2443
- let f = i(p.time);
2444
- c >= f && h++;
2445
- }), this.schedulerContent.scrollLeft = (h - 1) * n.getContentCellWidth(), n.setScrollToSpecialMoment(!1);
2924
+ const { schedulerData: r } = this.props, { localeDayjs: n, behaviors: i } = r;
2925
+ if (r.getScrollToSpecialDayjs() && i.getScrollSpecialDayjsFunc && this.schedulerContent && this.schedulerContent.scrollWidth > this.schedulerContent.clientWidth) {
2926
+ let o = n(new Date(r.startDate)).startOf("day"), l = n(new Date(r.endDate)).endOf("day"), u = i.getScrollSpecialDayjsFunc(r, o, l);
2927
+ if (u >= o && u <= l) {
2928
+ let c = 0;
2929
+ r.headers.forEach((f) => {
2930
+ let h = n(new Date(f.time));
2931
+ u >= h && c++;
2932
+ }), this.schedulerContent.scrollLeft = (c - 1) * r.getContentCellWidth(), r.setScrollToSpecialDayjs(!1);
2446
2933
  }
2447
2934
  }
2448
2935
  }
2449
2936
  render() {
2450
- const { schedulerData: e, leftCustomHeader: r, rightCustomHeader: n } = this.props, { renderData: i, viewType: o, showAgenda: a, isEventPerspective: d, config: c } = e, h = e.getSchedulerWidth(), p = c.calendarPopoverEnabled;
2451
- let f = e.getDateLabel(), m = `${o}${a ? 1 : 0}${d ? 1 : 0}`, E = c.views.map((v) => /* @__PURE__ */ l.jsx(cr, { value: `${v.viewType}${v.showAgenda ? 1 : 0}${v.isEventPerspective ? 1 : 0}`, children: /* @__PURE__ */ l.jsx("span", { style: { margin: "0px 8px" }, children: v.viewName }) }, `${v.viewType}${v.showAgenda ? 1 : 0}${v.isEventPerspective ? 1 : 0}`)), R = /* @__PURE__ */ l.jsx("tr", {});
2452
- if (a)
2453
- R = /* @__PURE__ */ l.jsx(pt, { ...this.props });
2937
+ const { schedulerData: e, leftCustomHeader: s, rightCustomHeader: r } = this.props, { viewType: n, renderData: i, showAgenda: o, config: l } = e, u = e.getSchedulerWidth();
2938
+ let c = /* @__PURE__ */ d.jsx("tr", {});
2939
+ if (o)
2940
+ c = /* @__PURE__ */ d.jsx(bt, { ...this.props });
2454
2941
  else {
2455
- let v = e.getResourceTableWidth(), k = h - v + 1, T = e.getContentTableWidth() - 1, D = this.state.dndContext.getDropTarget(), j = this.state.dndContext.getDndSource(), A = i.filter((V) => V.render).map((V) => /* @__PURE__ */ he(D, { ...this.props, key: V.slotId, resourceEvents: V, dndSource: j })), S = this.state.contentScrollbarHeight, _ = this.state.contentScrollbarWidth, q = this.state.resourceScrollbarHeight, Q = this.state.resourceScrollbarWidth, G = this.state.contentHeight, K = q === 0 ? S : 0, z = {
2456
- overflow: "auto",
2942
+ let h = e.getResourceTableWidth(), v = u - (l.resourceViewEnabled ? h : 0), D = e.getContentTableWidth() - 1, g = this.state.dndContext.getDropTarget(l.dragAndDropEnabled), w = this.state.dndContext.getDndSource(), b = i.filter((S) => S.render).map((S) => /* @__PURE__ */ be(g, { ...this.props, key: S.slotId, resourceEvents: S, dndSource: w })), k = this.state.contentScrollbarHeight, A = this.state.contentScrollbarWidth, $ = this.state.resourceScrollbarHeight, H = this.state.resourceScrollbarWidth, N = l.schedulerContentHeight, z = $ === 0 ? k : 0, W = k === 0 ? $ : 0, C = {
2943
+ overflowX: n === O.Week ? "hidden" : "auto",
2944
+ overflowY: "auto",
2457
2945
  margin: "0px",
2458
2946
  position: "relative",
2459
- paddingBottom: S === 0 ? q : 0
2460
- }, Y = {
2947
+ height: N,
2948
+ paddingBottom: W
2949
+ }, X = {
2950
+ height: N,
2461
2951
  overflowX: "auto",
2462
2952
  overflowY: "auto",
2463
- width: v + Q - 2,
2464
- margin: `0px -${_}px 0px 0px`
2953
+ width: h + H - 2,
2954
+ margin: `0px -${A}px 0px 0px`
2465
2955
  };
2466
- c.schedulerMaxHeight > 0 && (z = {
2467
- ...z,
2468
- maxHeight: c.schedulerMaxHeight - c.tableHeaderHeight
2469
- }, Y = {
2470
- ...Y,
2471
- maxHeight: c.schedulerMaxHeight - c.tableHeaderHeight
2956
+ l.schedulerMaxHeight > 0 && (C = {
2957
+ ...C,
2958
+ maxHeight: l.schedulerMaxHeight - l.tableHeaderHeight
2959
+ }, X = {
2960
+ ...X,
2961
+ maxHeight: l.schedulerMaxHeight - l.tableHeaderHeight
2472
2962
  });
2473
- let $ = e.isEventPerspective ? c.taskName : c.resourceName;
2474
- R = /* @__PURE__ */ l.jsxs("tr", { children: [
2475
- /* @__PURE__ */ l.jsx("td", { style: { width: v, verticalAlign: "top" }, children: /* @__PURE__ */ l.jsxs("div", { className: "resource-view", children: [
2476
- /* @__PURE__ */ l.jsx(
2477
- "div",
2478
- {
2479
- style: {
2480
- overflow: "hidden",
2481
- borderBottom: "1px solid #e9e9e9",
2482
- height: c.tableHeaderHeight
2483
- },
2484
- children: /* @__PURE__ */ l.jsx(
2485
- "div",
2486
- {
2487
- style: {
2488
- overflowX: "scroll",
2489
- overflowY: "hidden",
2490
- margin: `0px 0px -${S}px`
2491
- },
2492
- children: /* @__PURE__ */ l.jsx("table", { className: "resource-table", children: /* @__PURE__ */ l.jsx("thead", { children: /* @__PURE__ */ l.jsx("tr", { style: { height: c.tableHeaderHeight }, children: /* @__PURE__ */ l.jsx("th", { className: "header3-text", children: $ }) }) }) })
2493
- }
2494
- )
2495
- }
2496
- ),
2497
- /* @__PURE__ */ l.jsx(
2963
+ let Z = e.isEventPerspective ? l.taskName : l.resourceName;
2964
+ c = /* @__PURE__ */ d.jsxs("tr", { children: [
2965
+ /* @__PURE__ */ d.jsx("td", { style: { display: l.resourceViewEnabled ? void 0 : "none", width: h, verticalAlign: "top" }, children: /* @__PURE__ */ d.jsxs("div", { className: "resource-view", children: [
2966
+ /* @__PURE__ */ d.jsx("div", { style: { overflow: "hidden", borderBottom: "1px solid #e9e9e9", height: l.tableHeaderHeight }, children: /* @__PURE__ */ d.jsx("div", { style: { overflowX: "scroll", overflowY: "hidden", margin: `0px 0px -${k}px` }, children: /* @__PURE__ */ d.jsx("table", { className: "resource-table", children: /* @__PURE__ */ d.jsx("thead", { children: /* @__PURE__ */ d.jsx("tr", { style: { height: l.tableHeaderHeight }, children: /* @__PURE__ */ d.jsx("th", { className: "header3-text", children: Z }) }) }) }) }) }),
2967
+ /* @__PURE__ */ d.jsx(
2498
2968
  "div",
2499
2969
  {
2500
- style: Y,
2970
+ style: X,
2501
2971
  ref: this.schedulerResourceRef,
2502
2972
  onMouseOver: this.onSchedulerResourceMouseOver,
2503
2973
  onMouseOut: this.onSchedulerResourceMouseOut,
2504
2974
  onScroll: this.onSchedulerResourceScroll,
2505
- children: /* @__PURE__ */ l.jsx(at, { ...this.props, contentScrollbarHeight: K })
2975
+ children: /* @__PURE__ */ d.jsx(ft, { ...this.props, contentScrollbarHeight: z })
2506
2976
  }
2507
2977
  )
2508
2978
  ] }) }),
2509
- /* @__PURE__ */ l.jsx("td", { children: /* @__PURE__ */ l.jsxs("div", { className: "scheduler-view", style: { width: k, verticalAlign: "top" }, children: [
2510
- /* @__PURE__ */ l.jsx(
2979
+ /* @__PURE__ */ d.jsx("td", { children: /* @__PURE__ */ d.jsxs("div", { className: "scheduler-view", style: { width: v, verticalAlign: "top" }, children: [
2980
+ /* @__PURE__ */ d.jsx("div", { style: { overflow: "hidden", borderBottom: "1px solid #e9e9e9", height: l.tableHeaderHeight }, children: /* @__PURE__ */ d.jsx(
2511
2981
  "div",
2512
2982
  {
2513
- style: {
2514
- overflow: "hidden",
2515
- borderBottom: "1px solid #e9e9e9",
2516
- height: c.tableHeaderHeight
2517
- },
2518
- children: /* @__PURE__ */ l.jsx(
2519
- "div",
2520
- {
2521
- style: {
2522
- overflowX: "scroll",
2523
- overflowY: "hidden",
2524
- margin: `0px 0px -${S}px`
2525
- },
2526
- ref: this.schedulerHeadRef,
2527
- onMouseOver: this.onSchedulerHeadMouseOver,
2528
- onMouseOut: this.onSchedulerHeadMouseOut,
2529
- onScroll: this.onSchedulerHeadScroll,
2530
- children: /* @__PURE__ */ l.jsx(
2531
- "div",
2532
- {
2533
- style: {
2534
- paddingRight: `${_}px`,
2535
- width: T + _
2536
- },
2537
- children: /* @__PURE__ */ l.jsx("table", { className: "scheduler-bg-table", children: /* @__PURE__ */ l.jsx(lt, { ...this.props }) })
2538
- }
2539
- )
2540
- }
2541
- )
2983
+ style: { overflowX: "scroll", overflowY: "hidden", margin: `0px 0px -${k}px` },
2984
+ ref: this.schedulerHeadRef,
2985
+ onMouseOver: this.onSchedulerHeadMouseOver,
2986
+ onMouseOut: this.onSchedulerHeadMouseOut,
2987
+ onScroll: this.onSchedulerHeadScroll,
2988
+ children: /* @__PURE__ */ d.jsx("div", { style: { paddingRight: `${A}px`, width: D + A }, children: /* @__PURE__ */ d.jsx("table", { className: "scheduler-bg-table", children: /* @__PURE__ */ d.jsx(pt, { ...this.props }) }) })
2542
2989
  }
2543
- ),
2544
- /* @__PURE__ */ l.jsx(
2990
+ ) }),
2991
+ /* @__PURE__ */ d.jsx(
2545
2992
  "div",
2546
2993
  {
2547
- style: z,
2994
+ style: C,
2548
2995
  ref: this.schedulerContentRef,
2549
2996
  onMouseOver: this.onSchedulerContentMouseOver,
2550
2997
  onMouseOut: this.onSchedulerContentMouseOut,
2551
2998
  onScroll: this.onSchedulerContentScroll,
2552
- children: /* @__PURE__ */ l.jsxs("div", { style: { width: T, height: G }, children: [
2553
- /* @__PURE__ */ l.jsx("div", { className: "scheduler-content", children: /* @__PURE__ */ l.jsx("table", { className: "scheduler-content-table", children: /* @__PURE__ */ l.jsx("tbody", { children: A }) }) }),
2554
- /* @__PURE__ */ l.jsx("div", { className: "scheduler-bg", children: /* @__PURE__ */ l.jsx("table", { className: "scheduler-bg-table", style: { width: T }, ref: this.schedulerContentBgTableRef, children: /* @__PURE__ */ l.jsx(dt, { ...this.props }) }) })
2999
+ children: /* @__PURE__ */ d.jsxs("div", { style: { width: D }, children: [
3000
+ /* @__PURE__ */ d.jsx("div", { className: "scheduler-content", children: /* @__PURE__ */ d.jsx("table", { className: "scheduler-content-table", children: /* @__PURE__ */ d.jsx("tbody", { children: b }) }) }),
3001
+ /* @__PURE__ */ d.jsx("div", { className: "scheduler-bg", children: /* @__PURE__ */ d.jsx("table", { className: "scheduler-bg-table", style: { width: D }, ref: this.schedulerContentBgTableRef, children: /* @__PURE__ */ d.jsx(gt, { ...this.props }) }) })
2555
3002
  ] })
2556
3003
  }
2557
3004
  )
2558
3005
  ] }) })
2559
3006
  ] });
2560
3007
  }
2561
- let C = /* @__PURE__ */ l.jsx("div", { className: "popover-calendar", children: /* @__PURE__ */ l.jsx(Qt, { fullscreen: !1, onSelect: this.onSelect }) }), x = /* @__PURE__ */ l.jsx("div", {});
2562
- return c.headerEnabled && (x = /* @__PURE__ */ l.jsxs(
2563
- "div",
3008
+ let f = /* @__PURE__ */ d.jsx("div", {});
3009
+ return l.headerEnabled && (f = /* @__PURE__ */ d.jsx(
3010
+ Tt,
2564
3011
  {
2565
- style: {
2566
- display: "flex",
2567
- alignItems: "center",
2568
- justifyContent: "space-between",
2569
- marginBottom: "24px"
2570
- },
2571
- children: [
2572
- r,
2573
- /* @__PURE__ */ l.jsx("div", { children: /* @__PURE__ */ l.jsxs("div", { className: "header2-text", children: [
2574
- /* @__PURE__ */ l.jsx(Ut, { style: { marginRight: "8px" }, className: "icon-nav", onClick: this.goBack }),
2575
- p ? /* @__PURE__ */ l.jsx(He, { content: C, placement: "bottom", trigger: "click", open: this.state.visible, onOpenChange: this.handleVisibleChange, children: /* @__PURE__ */ l.jsx("span", { className: "header2-text-label", style: { cursor: "pointer" }, children: f }) }) : /* @__PURE__ */ l.jsx("span", { className: "header2-text-label", children: f }),
2576
- /* @__PURE__ */ l.jsx(Xt, { style: { marginLeft: "8px" }, className: "icon-nav", onClick: this.goNext })
2577
- ] }) }),
2578
- /* @__PURE__ */ l.jsx("div", { children: /* @__PURE__ */ l.jsxs(ur, { defaultValue: m, size: "default", onChange: this.onViewChange, children: [
2579
- E,
2580
- "xx"
2581
- ] }) }),
2582
- n
2583
- ]
3012
+ onViewChange: this.onViewChange,
3013
+ schedulerData: e,
3014
+ onSelectDate: this.onSelect,
3015
+ goNext: this.goNext,
3016
+ goBack: this.goBack,
3017
+ rightCustomHeader: r,
3018
+ leftCustomHeader: s
2584
3019
  }
2585
- )), /* @__PURE__ */ l.jsx("div", { className: "scheduler-component-module", children: /* @__PURE__ */ l.jsxs("table", { id: "RBS-Scheduler-root", className: "scheduler", style: { width: `${h}px` }, children: [
2586
- /* @__PURE__ */ l.jsx("thead", { children: /* @__PURE__ */ l.jsx("tr", { children: /* @__PURE__ */ l.jsx("td", { colSpan: "2", children: x }) }) }),
2587
- /* @__PURE__ */ l.jsx("tbody", { children: R })
2588
- ] }) });
3020
+ )), /* @__PURE__ */ d.jsxs("table", { id: "RBS-Scheduler-root", className: "scheduler", style: { width: `${u}px` }, children: [
3021
+ /* @__PURE__ */ d.jsx("thead", { children: /* @__PURE__ */ d.jsx("tr", { children: /* @__PURE__ */ d.jsx("td", { colSpan: "2", children: f }) }) }),
3022
+ /* @__PURE__ */ d.jsx("tbody", { children: c })
3023
+ ] });
2589
3024
  }
2590
3025
  }
2591
- M(hr, "propTypes", {
2592
- schedulerData: u.object.isRequired,
2593
- prevClick: u.func.isRequired,
2594
- nextClick: u.func.isRequired,
2595
- onViewChange: u.func.isRequired,
2596
- onSelectDate: u.func.isRequired,
2597
- onSetAddMoreState: u.func,
2598
- updateEventStart: u.func,
2599
- updateEventEnd: u.func,
2600
- moveEvent: u.func,
2601
- movingEvent: u.func,
2602
- leftCustomHeader: u.object,
2603
- rightCustomHeader: u.object,
2604
- newEvent: u.func,
2605
- subtitleGetter: u.func,
2606
- eventItemClick: u.func,
2607
- viewEventClick: u.func,
2608
- viewEventText: u.string,
2609
- viewEvent2Click: u.func,
2610
- viewEvent2Text: u.string,
2611
- conflictOccurred: u.func,
2612
- eventItemTemplateResolver: u.func,
2613
- dndSources: u.array,
2614
- slotClickedFunc: u.func,
2615
- toggleExpandFunc: u.func,
2616
- slotItemTemplateResolver: u.func,
2617
- nonAgendaCellHeaderTemplateResolver: u.func,
2618
- onScrollLeft: u.func,
2619
- onScrollRight: u.func,
2620
- onScrollTop: u.func,
2621
- onScrollBottom: u.func
3026
+ P(Rs, "propTypes", {
3027
+ parentRef: p.object,
3028
+ schedulerData: p.object.isRequired,
3029
+ prevClick: p.func.isRequired,
3030
+ nextClick: p.func.isRequired,
3031
+ onViewChange: p.func.isRequired,
3032
+ onSelectDate: p.func.isRequired,
3033
+ onSetAddMoreState: p.func,
3034
+ updateEventStart: p.func,
3035
+ updateEventEnd: p.func,
3036
+ moveEvent: p.func,
3037
+ movingEvent: p.func,
3038
+ leftCustomHeader: p.object,
3039
+ rightCustomHeader: p.object,
3040
+ newEvent: p.func,
3041
+ subtitleGetter: p.func,
3042
+ eventItemClick: p.func,
3043
+ viewEventClick: p.func,
3044
+ viewEventText: p.string,
3045
+ viewEvent2Click: p.func,
3046
+ viewEvent2Text: p.string,
3047
+ conflictOccurred: p.func,
3048
+ eventItemTemplateResolver: p.func,
3049
+ dndSources: p.array,
3050
+ slotClickedFunc: p.func,
3051
+ toggleExpandFunc: p.func,
3052
+ slotItemTemplateResolver: p.func,
3053
+ nonAgendaCellHeaderTemplateResolver: p.func,
3054
+ onScrollLeft: p.func,
3055
+ onScrollRight: p.func,
3056
+ onScrollTop: p.func,
3057
+ onScrollBottom: p.func
2622
3058
  });
2623
3059
  export {
2624
- ir as AddMorePopover,
2625
- O as CellUnits,
2626
- P as DATETIME_FORMAT,
2627
- W as DATE_FORMAT,
2628
- sr as DnDContext,
2629
- ot as DnDSource,
2630
- Rr as SampleData,
2631
- hr as Scheduler,
2632
- Cr as SchedulerData,
2633
- ae as SummaryPos,
2634
- w as ViewTypes,
2635
- Sr as wrapFunction
3060
+ hs as AddMorePopover,
3061
+ U as CellUnit,
3062
+ V as DATETIME_FORMAT,
3063
+ ge as DATE_FORMAT,
3064
+ $s as DemoData,
3065
+ us as DnDContext,
3066
+ ht as DnDSource,
3067
+ Rs as Scheduler,
3068
+ Hs as SchedulerData,
3069
+ me as SummaryPos,
3070
+ O as ViewType,
3071
+ Ps as wrapperFun
2636
3072
  };