@wral/profile-image-editor 0.0.4 → 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/define.standalone.js +1077 -946
- package/dist/index.mjs +725 -594
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
function kn(ce,
|
|
2
|
-
for (var W = 0; W <
|
|
3
|
-
const se =
|
|
1
|
+
function kn(ce, D) {
|
|
2
|
+
for (var W = 0; W < D.length; W++) {
|
|
3
|
+
const se = D[W];
|
|
4
4
|
if (typeof se != "string" && !Array.isArray(se)) {
|
|
5
5
|
for (const me in se)
|
|
6
6
|
if (me !== "default" && !(me in ce)) {
|
|
@@ -16,43 +16,43 @@ function kn(ce, N) {
|
|
|
16
16
|
}
|
|
17
17
|
const St = globalThis, Ut = St.ShadowRoot && (St.ShadyCSS === void 0 || St.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, Bt = /* @__PURE__ */ Symbol(), Zt = /* @__PURE__ */ new WeakMap();
|
|
18
18
|
let gn = class {
|
|
19
|
-
constructor(
|
|
19
|
+
constructor(D, W, se) {
|
|
20
20
|
if (this._$cssResult$ = !0, se !== Bt) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
|
21
|
-
this.cssText =
|
|
21
|
+
this.cssText = D, this.t = W;
|
|
22
22
|
}
|
|
23
23
|
get styleSheet() {
|
|
24
|
-
let
|
|
24
|
+
let D = this.o;
|
|
25
25
|
const W = this.t;
|
|
26
|
-
if (Ut &&
|
|
26
|
+
if (Ut && D === void 0) {
|
|
27
27
|
const se = W !== void 0 && W.length === 1;
|
|
28
|
-
se && (
|
|
28
|
+
se && (D = Zt.get(W)), D === void 0 && ((this.o = D = new CSSStyleSheet()).replaceSync(this.cssText), se && Zt.set(W, D));
|
|
29
29
|
}
|
|
30
|
-
return
|
|
30
|
+
return D;
|
|
31
31
|
}
|
|
32
32
|
toString() {
|
|
33
33
|
return this.cssText;
|
|
34
34
|
}
|
|
35
35
|
};
|
|
36
|
-
const Dn = (ce) => new gn(typeof ce == "string" ? ce : ce + "", void 0, Bt), Nn = (ce, ...
|
|
37
|
-
const W = ce.length === 1 ? ce[0] :
|
|
36
|
+
const Dn = (ce) => new gn(typeof ce == "string" ? ce : ce + "", void 0, Bt), Nn = (ce, ...D) => {
|
|
37
|
+
const W = ce.length === 1 ? ce[0] : D.reduce((se, me, Me) => se + ((Ye) => {
|
|
38
38
|
if (Ye._$cssResult$ === !0) return Ye.cssText;
|
|
39
39
|
if (typeof Ye == "number") return Ye;
|
|
40
40
|
throw Error("Value passed to 'css' function must be a 'css' function result: " + Ye + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
|
|
41
41
|
})(me) + ce[Me + 1], ce[0]);
|
|
42
42
|
return new gn(W, ce, Bt);
|
|
43
|
-
}, Mn = (ce,
|
|
44
|
-
if (Ut) ce.adoptedStyleSheets =
|
|
45
|
-
else for (const W of
|
|
43
|
+
}, Mn = (ce, D) => {
|
|
44
|
+
if (Ut) ce.adoptedStyleSheets = D.map((W) => W instanceof CSSStyleSheet ? W : W.styleSheet);
|
|
45
|
+
else for (const W of D) {
|
|
46
46
|
const se = document.createElement("style"), me = St.litNonce;
|
|
47
47
|
me !== void 0 && se.setAttribute("nonce", me), se.textContent = W.cssText, ce.appendChild(se);
|
|
48
48
|
}
|
|
49
|
-
}, Jt = Ut ? (ce) => ce : (ce) => ce instanceof CSSStyleSheet ? ((
|
|
49
|
+
}, Jt = Ut ? (ce) => ce : (ce) => ce instanceof CSSStyleSheet ? ((D) => {
|
|
50
50
|
let W = "";
|
|
51
|
-
for (const se of
|
|
51
|
+
for (const se of D.cssRules) W += se.cssText;
|
|
52
52
|
return Dn(W);
|
|
53
53
|
})(ce) : ce;
|
|
54
|
-
const { is: Sn, defineProperty: On, getOwnPropertyDescriptor: In, getOwnPropertyNames: Hn, getOwnPropertySymbols: _n, getPrototypeOf: Rn } = Object, Rt = globalThis, Kt = Rt.trustedTypes, $n = Kt ? Kt.emptyScript : "", Pn = Rt.reactiveElementPolyfillSupport, Et = (ce,
|
|
55
|
-
switch (
|
|
54
|
+
const { is: Sn, defineProperty: On, getOwnPropertyDescriptor: In, getOwnPropertyNames: Hn, getOwnPropertySymbols: _n, getPrototypeOf: Rn } = Object, Rt = globalThis, Kt = Rt.trustedTypes, $n = Kt ? Kt.emptyScript : "", Pn = Rt.reactiveElementPolyfillSupport, Et = (ce, D) => ce, Ft = { toAttribute(ce, D) {
|
|
55
|
+
switch (D) {
|
|
56
56
|
case Boolean:
|
|
57
57
|
ce = ce ? $n : null;
|
|
58
58
|
break;
|
|
@@ -61,9 +61,9 @@ const { is: Sn, defineProperty: On, getOwnPropertyDescriptor: In, getOwnProperty
|
|
|
61
61
|
ce = ce == null ? ce : JSON.stringify(ce);
|
|
62
62
|
}
|
|
63
63
|
return ce;
|
|
64
|
-
}, fromAttribute(ce,
|
|
64
|
+
}, fromAttribute(ce, D) {
|
|
65
65
|
let W = ce;
|
|
66
|
-
switch (
|
|
66
|
+
switch (D) {
|
|
67
67
|
case Boolean:
|
|
68
68
|
W = ce !== null;
|
|
69
69
|
break;
|
|
@@ -79,39 +79,39 @@ const { is: Sn, defineProperty: On, getOwnPropertyDescriptor: In, getOwnProperty
|
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
81
|
return W;
|
|
82
|
-
} }, mn = (ce,
|
|
82
|
+
} }, mn = (ce, D) => !Sn(ce, D), Qt = { attribute: !0, type: String, converter: Ft, reflect: !1, useDefault: !1, hasChanged: mn };
|
|
83
83
|
Symbol.metadata ??= /* @__PURE__ */ Symbol("metadata"), Rt.litPropertyMetadata ??= /* @__PURE__ */ new WeakMap();
|
|
84
84
|
let bt = class extends HTMLElement {
|
|
85
|
-
static addInitializer(
|
|
86
|
-
this._$Ei(), (this.l ??= []).push(
|
|
85
|
+
static addInitializer(D) {
|
|
86
|
+
this._$Ei(), (this.l ??= []).push(D);
|
|
87
87
|
}
|
|
88
88
|
static get observedAttributes() {
|
|
89
89
|
return this.finalize(), this._$Eh && [...this._$Eh.keys()];
|
|
90
90
|
}
|
|
91
|
-
static createProperty(
|
|
92
|
-
if (W.state && (W.attribute = !1), this._$Ei(), this.prototype.hasOwnProperty(
|
|
93
|
-
const se = /* @__PURE__ */ Symbol(), me = this.getPropertyDescriptor(
|
|
94
|
-
me !== void 0 && On(this.prototype,
|
|
91
|
+
static createProperty(D, W = Qt) {
|
|
92
|
+
if (W.state && (W.attribute = !1), this._$Ei(), this.prototype.hasOwnProperty(D) && ((W = Object.create(W)).wrapped = !0), this.elementProperties.set(D, W), !W.noAccessor) {
|
|
93
|
+
const se = /* @__PURE__ */ Symbol(), me = this.getPropertyDescriptor(D, se, W);
|
|
94
|
+
me !== void 0 && On(this.prototype, D, me);
|
|
95
95
|
}
|
|
96
96
|
}
|
|
97
|
-
static getPropertyDescriptor(
|
|
98
|
-
const { get: me, set: Me } = In(this.prototype,
|
|
97
|
+
static getPropertyDescriptor(D, W, se) {
|
|
98
|
+
const { get: me, set: Me } = In(this.prototype, D) ?? { get() {
|
|
99
99
|
return this[W];
|
|
100
100
|
}, set(Ye) {
|
|
101
101
|
this[W] = Ye;
|
|
102
102
|
} };
|
|
103
103
|
return { get: me, set(Ye) {
|
|
104
104
|
const $e = me?.call(this);
|
|
105
|
-
Me?.call(this, Ye), this.requestUpdate(
|
|
105
|
+
Me?.call(this, Ye), this.requestUpdate(D, $e, se);
|
|
106
106
|
}, configurable: !0, enumerable: !0 };
|
|
107
107
|
}
|
|
108
|
-
static getPropertyOptions(
|
|
109
|
-
return this.elementProperties.get(
|
|
108
|
+
static getPropertyOptions(D) {
|
|
109
|
+
return this.elementProperties.get(D) ?? Qt;
|
|
110
110
|
}
|
|
111
111
|
static _$Ei() {
|
|
112
112
|
if (this.hasOwnProperty(Et("elementProperties"))) return;
|
|
113
|
-
const
|
|
114
|
-
|
|
113
|
+
const D = Rn(this);
|
|
114
|
+
D.finalize(), D.l !== void 0 && (this.l = [...D.l]), this.elementProperties = new Map(D.elementProperties);
|
|
115
115
|
}
|
|
116
116
|
static finalize() {
|
|
117
117
|
if (this.hasOwnProperty(Et("finalized"))) return;
|
|
@@ -119,9 +119,9 @@ let bt = class extends HTMLElement {
|
|
|
119
119
|
const W = this.properties, se = [...Hn(W), ..._n(W)];
|
|
120
120
|
for (const me of se) this.createProperty(me, W[me]);
|
|
121
121
|
}
|
|
122
|
-
const
|
|
123
|
-
if (
|
|
124
|
-
const W = litPropertyMetadata.get(
|
|
122
|
+
const D = this[Symbol.metadata];
|
|
123
|
+
if (D !== null) {
|
|
124
|
+
const W = litPropertyMetadata.get(D);
|
|
125
125
|
if (W !== void 0) for (const [se, me] of W) this.elementProperties.set(se, me);
|
|
126
126
|
}
|
|
127
127
|
this._$Eh = /* @__PURE__ */ new Map();
|
|
@@ -131,59 +131,59 @@ let bt = class extends HTMLElement {
|
|
|
131
131
|
}
|
|
132
132
|
this.elementStyles = this.finalizeStyles(this.styles);
|
|
133
133
|
}
|
|
134
|
-
static finalizeStyles(
|
|
134
|
+
static finalizeStyles(D) {
|
|
135
135
|
const W = [];
|
|
136
|
-
if (Array.isArray(
|
|
137
|
-
const se = new Set(
|
|
136
|
+
if (Array.isArray(D)) {
|
|
137
|
+
const se = new Set(D.flat(1 / 0).reverse());
|
|
138
138
|
for (const me of se) W.unshift(Jt(me));
|
|
139
|
-
} else
|
|
139
|
+
} else D !== void 0 && W.push(Jt(D));
|
|
140
140
|
return W;
|
|
141
141
|
}
|
|
142
|
-
static _$Eu(
|
|
142
|
+
static _$Eu(D, W) {
|
|
143
143
|
const se = W.attribute;
|
|
144
|
-
return se === !1 ? void 0 : typeof se == "string" ? se : typeof
|
|
144
|
+
return se === !1 ? void 0 : typeof se == "string" ? se : typeof D == "string" ? D.toLowerCase() : void 0;
|
|
145
145
|
}
|
|
146
146
|
constructor() {
|
|
147
147
|
super(), this._$Ep = void 0, this.isUpdatePending = !1, this.hasUpdated = !1, this._$Em = null, this._$Ev();
|
|
148
148
|
}
|
|
149
149
|
_$Ev() {
|
|
150
|
-
this._$ES = new Promise((
|
|
150
|
+
this._$ES = new Promise((D) => this.enableUpdating = D), this._$AL = /* @__PURE__ */ new Map(), this._$E_(), this.requestUpdate(), this.constructor.l?.forEach((D) => D(this));
|
|
151
151
|
}
|
|
152
|
-
addController(
|
|
153
|
-
(this._$EO ??= /* @__PURE__ */ new Set()).add(
|
|
152
|
+
addController(D) {
|
|
153
|
+
(this._$EO ??= /* @__PURE__ */ new Set()).add(D), this.renderRoot !== void 0 && this.isConnected && D.hostConnected?.();
|
|
154
154
|
}
|
|
155
|
-
removeController(
|
|
156
|
-
this._$EO?.delete(
|
|
155
|
+
removeController(D) {
|
|
156
|
+
this._$EO?.delete(D);
|
|
157
157
|
}
|
|
158
158
|
_$E_() {
|
|
159
|
-
const
|
|
160
|
-
for (const se of W.keys()) this.hasOwnProperty(se) && (
|
|
161
|
-
|
|
159
|
+
const D = /* @__PURE__ */ new Map(), W = this.constructor.elementProperties;
|
|
160
|
+
for (const se of W.keys()) this.hasOwnProperty(se) && (D.set(se, this[se]), delete this[se]);
|
|
161
|
+
D.size > 0 && (this._$Ep = D);
|
|
162
162
|
}
|
|
163
163
|
createRenderRoot() {
|
|
164
|
-
const
|
|
165
|
-
return Mn(
|
|
164
|
+
const D = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
|
|
165
|
+
return Mn(D, this.constructor.elementStyles), D;
|
|
166
166
|
}
|
|
167
167
|
connectedCallback() {
|
|
168
|
-
this.renderRoot ??= this.createRenderRoot(), this.enableUpdating(!0), this._$EO?.forEach((
|
|
168
|
+
this.renderRoot ??= this.createRenderRoot(), this.enableUpdating(!0), this._$EO?.forEach((D) => D.hostConnected?.());
|
|
169
169
|
}
|
|
170
|
-
enableUpdating(
|
|
170
|
+
enableUpdating(D) {
|
|
171
171
|
}
|
|
172
172
|
disconnectedCallback() {
|
|
173
|
-
this._$EO?.forEach((
|
|
173
|
+
this._$EO?.forEach((D) => D.hostDisconnected?.());
|
|
174
174
|
}
|
|
175
|
-
attributeChangedCallback(
|
|
176
|
-
this._$AK(
|
|
175
|
+
attributeChangedCallback(D, W, se) {
|
|
176
|
+
this._$AK(D, se);
|
|
177
177
|
}
|
|
178
|
-
_$ET(
|
|
179
|
-
const se = this.constructor.elementProperties.get(
|
|
178
|
+
_$ET(D, W) {
|
|
179
|
+
const se = this.constructor.elementProperties.get(D), me = this.constructor._$Eu(D, se);
|
|
180
180
|
if (me !== void 0 && se.reflect === !0) {
|
|
181
181
|
const Me = (se.converter?.toAttribute !== void 0 ? se.converter : Ft).toAttribute(W, se.type);
|
|
182
|
-
this._$Em =
|
|
182
|
+
this._$Em = D, Me == null ? this.removeAttribute(me) : this.setAttribute(me, Me), this._$Em = null;
|
|
183
183
|
}
|
|
184
184
|
}
|
|
185
|
-
_$AK(
|
|
186
|
-
const se = this.constructor, me = se._$Eh.get(
|
|
185
|
+
_$AK(D, W) {
|
|
186
|
+
const se = this.constructor, me = se._$Eh.get(D);
|
|
187
187
|
if (me !== void 0 && this._$Em !== me) {
|
|
188
188
|
const Me = se.getPropertyOptions(me), Ye = typeof Me.converter == "function" ? { fromAttribute: Me.converter } : Me.converter?.fromAttribute !== void 0 ? Me.converter : Ft;
|
|
189
189
|
this._$Em = me;
|
|
@@ -191,16 +191,16 @@ let bt = class extends HTMLElement {
|
|
|
191
191
|
this[me] = $e ?? this._$Ej?.get(me) ?? $e, this._$Em = null;
|
|
192
192
|
}
|
|
193
193
|
}
|
|
194
|
-
requestUpdate(
|
|
195
|
-
if (
|
|
194
|
+
requestUpdate(D, W, se, me = !1, Me) {
|
|
195
|
+
if (D !== void 0) {
|
|
196
196
|
const Ye = this.constructor;
|
|
197
|
-
if (me === !1 && (Me = this[
|
|
198
|
-
this.C(
|
|
197
|
+
if (me === !1 && (Me = this[D]), se ??= Ye.getPropertyOptions(D), !((se.hasChanged ?? mn)(Me, W) || se.useDefault && se.reflect && Me === this._$Ej?.get(D) && !this.hasAttribute(Ye._$Eu(D, se)))) return;
|
|
198
|
+
this.C(D, W, se);
|
|
199
199
|
}
|
|
200
200
|
this.isUpdatePending === !1 && (this._$ES = this._$EP());
|
|
201
201
|
}
|
|
202
|
-
C(
|
|
203
|
-
se && !(this._$Ej ??= /* @__PURE__ */ new Map()).has(
|
|
202
|
+
C(D, W, { useDefault: se, reflect: me, wrapped: Me }, Ye) {
|
|
203
|
+
se && !(this._$Ej ??= /* @__PURE__ */ new Map()).has(D) && (this._$Ej.set(D, Ye ?? W ?? this[D]), Me !== !0 || Ye !== void 0) || (this._$AL.has(D) || (this.hasUpdated || se || (W = void 0), this._$AL.set(D, W)), me === !0 && this._$Em !== D && (this._$Eq ??= /* @__PURE__ */ new Set()).add(D));
|
|
204
204
|
}
|
|
205
205
|
async _$EP() {
|
|
206
206
|
this.isUpdatePending = !0;
|
|
@@ -209,8 +209,8 @@ let bt = class extends HTMLElement {
|
|
|
209
209
|
} catch (W) {
|
|
210
210
|
Promise.reject(W);
|
|
211
211
|
}
|
|
212
|
-
const
|
|
213
|
-
return
|
|
212
|
+
const D = this.scheduleUpdate();
|
|
213
|
+
return D != null && await D, !this.isUpdatePending;
|
|
214
214
|
}
|
|
215
215
|
scheduleUpdate() {
|
|
216
216
|
return this.performUpdate();
|
|
@@ -228,19 +228,19 @@ let bt = class extends HTMLElement {
|
|
|
228
228
|
Ye !== !0 || this._$AL.has(me) || $e === void 0 || this.C(me, void 0, Me, $e);
|
|
229
229
|
}
|
|
230
230
|
}
|
|
231
|
-
let
|
|
231
|
+
let D = !1;
|
|
232
232
|
const W = this._$AL;
|
|
233
233
|
try {
|
|
234
|
-
|
|
234
|
+
D = this.shouldUpdate(W), D ? (this.willUpdate(W), this._$EO?.forEach((se) => se.hostUpdate?.()), this.update(W)) : this._$EM();
|
|
235
235
|
} catch (se) {
|
|
236
|
-
throw
|
|
236
|
+
throw D = !1, this._$EM(), se;
|
|
237
237
|
}
|
|
238
|
-
|
|
238
|
+
D && this._$AE(W);
|
|
239
239
|
}
|
|
240
|
-
willUpdate(
|
|
240
|
+
willUpdate(D) {
|
|
241
241
|
}
|
|
242
|
-
_$AE(
|
|
243
|
-
this._$EO?.forEach((W) => W.hostUpdated?.()), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(
|
|
242
|
+
_$AE(D) {
|
|
243
|
+
this._$EO?.forEach((W) => W.hostUpdated?.()), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(D)), this.updated(D);
|
|
244
244
|
}
|
|
245
245
|
_$EM() {
|
|
246
246
|
this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = !1;
|
|
@@ -251,28 +251,28 @@ let bt = class extends HTMLElement {
|
|
|
251
251
|
getUpdateComplete() {
|
|
252
252
|
return this._$ES;
|
|
253
253
|
}
|
|
254
|
-
shouldUpdate(
|
|
254
|
+
shouldUpdate(D) {
|
|
255
255
|
return !0;
|
|
256
256
|
}
|
|
257
|
-
update(
|
|
257
|
+
update(D) {
|
|
258
258
|
this._$Eq &&= this._$Eq.forEach((W) => this._$ET(W, this[W])), this._$EM();
|
|
259
259
|
}
|
|
260
|
-
updated(
|
|
260
|
+
updated(D) {
|
|
261
261
|
}
|
|
262
|
-
firstUpdated(
|
|
262
|
+
firstUpdated(D) {
|
|
263
263
|
}
|
|
264
264
|
};
|
|
265
265
|
bt.elementStyles = [], bt.shadowRootOptions = { mode: "open" }, bt[Et("elementProperties")] = /* @__PURE__ */ new Map(), bt[Et("finalized")] = /* @__PURE__ */ new Map(), Pn?.({ ReactiveElement: bt }), (Rt.reactiveElementVersions ??= []).push("2.1.2");
|
|
266
266
|
const Yt = globalThis, en = (ce) => ce, _t = Yt.trustedTypes, tn = _t ? _t.createPolicy("lit-html", { createHTML: (ce) => ce }) : void 0, vn = "$lit$", ht = `lit$${Math.random().toFixed(9).slice(2)}$`, yn = "?" + ht, zn = `<${yn}>`, yt = document, At = () => yt.createComment(""), kt = (ce) => ce === null || typeof ce != "object" && typeof ce != "function", Wt = Array.isArray, Fn = (ce) => Wt(ce) || typeof ce?.[Symbol.iterator] == "function", Pt = `[
|
|
267
267
|
\f\r]`, Lt = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, nn = /-->/g, sn = />/g, gt = RegExp(`>|${Pt}(?:([^\\s"'>=/]+)(${Pt}*=${Pt}*(?:[^
|
|
268
|
-
\f\r"'\`<>=]|("|')|))|$)`, "g"), rn = /'/g, on = /"/g, bn = /^(?:script|style|textarea|title)$/i, Vn = (ce) => (
|
|
269
|
-
function wn(ce,
|
|
268
|
+
\f\r"'\`<>=]|("|')|))|$)`, "g"), rn = /'/g, on = /"/g, bn = /^(?:script|style|textarea|title)$/i, Vn = (ce) => (D, ...W) => ({ _$litType$: ce, strings: D, values: W }), ft = Vn(1), wt = /* @__PURE__ */ Symbol.for("lit-noChange"), dt = /* @__PURE__ */ Symbol.for("lit-nothing"), an = /* @__PURE__ */ new WeakMap(), vt = yt.createTreeWalker(yt, 129);
|
|
269
|
+
function wn(ce, D) {
|
|
270
270
|
if (!Wt(ce) || !ce.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
|
271
|
-
return tn !== void 0 ? tn.createHTML(
|
|
271
|
+
return tn !== void 0 ? tn.createHTML(D) : D;
|
|
272
272
|
}
|
|
273
|
-
const Un = (ce,
|
|
273
|
+
const Un = (ce, D) => {
|
|
274
274
|
const W = ce.length - 1, se = [];
|
|
275
|
-
let me, Me =
|
|
275
|
+
let me, Me = D === 2 ? "<svg>" : D === 3 ? "<math>" : "", Ye = Lt;
|
|
276
276
|
for (let $e = 0; $e < W; $e++) {
|
|
277
277
|
const ge = ce[$e];
|
|
278
278
|
let M, de, ee = -1, Ce = 0;
|
|
@@ -280,14 +280,14 @@ const Un = (ce, N) => {
|
|
|
280
280
|
const X = Ye === gt && ce[$e + 1].startsWith("/>") ? " " : "";
|
|
281
281
|
Me += Ye === Lt ? ge + zn : ee >= 0 ? (se.push(M), ge.slice(0, ee) + vn + ge.slice(ee) + ht + X) : ge + ht + (ee === -2 ? $e : X);
|
|
282
282
|
}
|
|
283
|
-
return [wn(ce, Me + (ce[W] || "<?>") + (
|
|
283
|
+
return [wn(ce, Me + (ce[W] || "<?>") + (D === 2 ? "</svg>" : D === 3 ? "</math>" : "")), se];
|
|
284
284
|
};
|
|
285
285
|
class Dt {
|
|
286
|
-
constructor({ strings:
|
|
286
|
+
constructor({ strings: D, _$litType$: W }, se) {
|
|
287
287
|
let me;
|
|
288
288
|
this.parts = [];
|
|
289
289
|
let Me = 0, Ye = 0;
|
|
290
|
-
const $e =
|
|
290
|
+
const $e = D.length - 1, ge = this.parts, [M, de] = Un(D, W);
|
|
291
291
|
if (this.el = Dt.createElement(M, se), vt.currentNode = this.el.content, W === 2 || W === 3) {
|
|
292
292
|
const ee = this.el.content.firstChild;
|
|
293
293
|
ee.replaceWith(...ee.childNodes);
|
|
@@ -314,20 +314,20 @@ class Dt {
|
|
|
314
314
|
Me++;
|
|
315
315
|
}
|
|
316
316
|
}
|
|
317
|
-
static createElement(
|
|
317
|
+
static createElement(D, W) {
|
|
318
318
|
const se = yt.createElement("template");
|
|
319
|
-
return se.innerHTML =
|
|
319
|
+
return se.innerHTML = D, se;
|
|
320
320
|
}
|
|
321
321
|
}
|
|
322
|
-
function xt(ce,
|
|
323
|
-
if (
|
|
322
|
+
function xt(ce, D, W = ce, se) {
|
|
323
|
+
if (D === wt) return D;
|
|
324
324
|
let me = se !== void 0 ? W._$Co?.[se] : W._$Cl;
|
|
325
|
-
const Me = kt(
|
|
326
|
-
return me?.constructor !== Me && (me?._$AO?.(!1), Me === void 0 ? me = void 0 : (me = new Me(ce), me._$AT(ce, W, se)), se !== void 0 ? (W._$Co ??= [])[se] = me : W._$Cl = me), me !== void 0 && (
|
|
325
|
+
const Me = kt(D) ? void 0 : D._$litDirective$;
|
|
326
|
+
return me?.constructor !== Me && (me?._$AO?.(!1), Me === void 0 ? me = void 0 : (me = new Me(ce), me._$AT(ce, W, se)), se !== void 0 ? (W._$Co ??= [])[se] = me : W._$Cl = me), me !== void 0 && (D = xt(ce, me._$AS(ce, D.values), me, se)), D;
|
|
327
327
|
}
|
|
328
328
|
class Bn {
|
|
329
|
-
constructor(
|
|
330
|
-
this._$AV = [], this._$AN = void 0, this._$AD =
|
|
329
|
+
constructor(D, W) {
|
|
330
|
+
this._$AV = [], this._$AN = void 0, this._$AD = D, this._$AM = W;
|
|
331
331
|
}
|
|
332
332
|
get parentNode() {
|
|
333
333
|
return this._$AM.parentNode;
|
|
@@ -335,35 +335,35 @@ class Bn {
|
|
|
335
335
|
get _$AU() {
|
|
336
336
|
return this._$AM._$AU;
|
|
337
337
|
}
|
|
338
|
-
u(
|
|
339
|
-
const { el: { content: W }, parts: se } = this._$AD, me = (
|
|
338
|
+
u(D) {
|
|
339
|
+
const { el: { content: W }, parts: se } = this._$AD, me = (D?.creationScope ?? yt).importNode(W, !0);
|
|
340
340
|
vt.currentNode = me;
|
|
341
341
|
let Me = vt.nextNode(), Ye = 0, $e = 0, ge = se[0];
|
|
342
342
|
for (; ge !== void 0; ) {
|
|
343
343
|
if (Ye === ge.index) {
|
|
344
344
|
let M;
|
|
345
|
-
ge.type === 2 ? M = new Nt(Me, Me.nextSibling, this,
|
|
345
|
+
ge.type === 2 ? M = new Nt(Me, Me.nextSibling, this, D) : ge.type === 1 ? M = new ge.ctor(Me, ge.name, ge.strings, this, D) : ge.type === 6 && (M = new Xn(Me, this, D)), this._$AV.push(M), ge = se[++$e];
|
|
346
346
|
}
|
|
347
347
|
Ye !== ge?.index && (Me = vt.nextNode(), Ye++);
|
|
348
348
|
}
|
|
349
349
|
return vt.currentNode = yt, me;
|
|
350
350
|
}
|
|
351
|
-
p(
|
|
351
|
+
p(D) {
|
|
352
352
|
let W = 0;
|
|
353
|
-
for (const se of this._$AV) se !== void 0 && (se.strings !== void 0 ? (se._$AI(
|
|
353
|
+
for (const se of this._$AV) se !== void 0 && (se.strings !== void 0 ? (se._$AI(D, se, W), W += se.strings.length - 2) : se._$AI(D[W])), W++;
|
|
354
354
|
}
|
|
355
355
|
}
|
|
356
356
|
class Nt {
|
|
357
357
|
get _$AU() {
|
|
358
358
|
return this._$AM?._$AU ?? this._$Cv;
|
|
359
359
|
}
|
|
360
|
-
constructor(
|
|
361
|
-
this.type = 2, this._$AH = dt, this._$AN = void 0, this._$AA =
|
|
360
|
+
constructor(D, W, se, me) {
|
|
361
|
+
this.type = 2, this._$AH = dt, this._$AN = void 0, this._$AA = D, this._$AB = W, this._$AM = se, this.options = me, this._$Cv = me?.isConnected ?? !0;
|
|
362
362
|
}
|
|
363
363
|
get parentNode() {
|
|
364
|
-
let
|
|
364
|
+
let D = this._$AA.parentNode;
|
|
365
365
|
const W = this._$AM;
|
|
366
|
-
return W !== void 0 &&
|
|
366
|
+
return W !== void 0 && D?.nodeType === 11 && (D = W.parentNode), D;
|
|
367
367
|
}
|
|
368
368
|
get startNode() {
|
|
369
369
|
return this._$AA;
|
|
@@ -371,45 +371,45 @@ class Nt {
|
|
|
371
371
|
get endNode() {
|
|
372
372
|
return this._$AB;
|
|
373
373
|
}
|
|
374
|
-
_$AI(
|
|
375
|
-
|
|
374
|
+
_$AI(D, W = this) {
|
|
375
|
+
D = xt(this, D, W), kt(D) ? D === dt || D == null || D === "" ? (this._$AH !== dt && this._$AR(), this._$AH = dt) : D !== this._$AH && D !== wt && this._(D) : D._$litType$ !== void 0 ? this.$(D) : D.nodeType !== void 0 ? this.T(D) : Fn(D) ? this.k(D) : this._(D);
|
|
376
376
|
}
|
|
377
|
-
O(
|
|
378
|
-
return this._$AA.parentNode.insertBefore(
|
|
377
|
+
O(D) {
|
|
378
|
+
return this._$AA.parentNode.insertBefore(D, this._$AB);
|
|
379
379
|
}
|
|
380
|
-
T(
|
|
381
|
-
this._$AH !==
|
|
380
|
+
T(D) {
|
|
381
|
+
this._$AH !== D && (this._$AR(), this._$AH = this.O(D));
|
|
382
382
|
}
|
|
383
|
-
_(
|
|
384
|
-
this._$AH !== dt && kt(this._$AH) ? this._$AA.nextSibling.data =
|
|
383
|
+
_(D) {
|
|
384
|
+
this._$AH !== dt && kt(this._$AH) ? this._$AA.nextSibling.data = D : this.T(yt.createTextNode(D)), this._$AH = D;
|
|
385
385
|
}
|
|
386
|
-
$(
|
|
387
|
-
const { values: W, _$litType$: se } =
|
|
386
|
+
$(D) {
|
|
387
|
+
const { values: W, _$litType$: se } = D, me = typeof se == "number" ? this._$AC(D) : (se.el === void 0 && (se.el = Dt.createElement(wn(se.h, se.h[0]), this.options)), se);
|
|
388
388
|
if (this._$AH?._$AD === me) this._$AH.p(W);
|
|
389
389
|
else {
|
|
390
390
|
const Me = new Bn(me, this), Ye = Me.u(this.options);
|
|
391
391
|
Me.p(W), this.T(Ye), this._$AH = Me;
|
|
392
392
|
}
|
|
393
393
|
}
|
|
394
|
-
_$AC(
|
|
395
|
-
let W = an.get(
|
|
396
|
-
return W === void 0 && an.set(
|
|
394
|
+
_$AC(D) {
|
|
395
|
+
let W = an.get(D.strings);
|
|
396
|
+
return W === void 0 && an.set(D.strings, W = new Dt(D)), W;
|
|
397
397
|
}
|
|
398
|
-
k(
|
|
398
|
+
k(D) {
|
|
399
399
|
Wt(this._$AH) || (this._$AH = [], this._$AR());
|
|
400
400
|
const W = this._$AH;
|
|
401
401
|
let se, me = 0;
|
|
402
|
-
for (const Me of
|
|
402
|
+
for (const Me of D) me === W.length ? W.push(se = new Nt(this.O(At()), this.O(At()), this, this.options)) : se = W[me], se._$AI(Me), me++;
|
|
403
403
|
me < W.length && (this._$AR(se && se._$AB.nextSibling, me), W.length = me);
|
|
404
404
|
}
|
|
405
|
-
_$AR(
|
|
406
|
-
for (this._$AP?.(!1, !0, W);
|
|
407
|
-
const se = en(
|
|
408
|
-
en(
|
|
405
|
+
_$AR(D = this._$AA.nextSibling, W) {
|
|
406
|
+
for (this._$AP?.(!1, !0, W); D !== this._$AB; ) {
|
|
407
|
+
const se = en(D).nextSibling;
|
|
408
|
+
en(D).remove(), D = se;
|
|
409
409
|
}
|
|
410
410
|
}
|
|
411
|
-
setConnected(
|
|
412
|
-
this._$AM === void 0 && (this._$Cv =
|
|
411
|
+
setConnected(D) {
|
|
412
|
+
this._$AM === void 0 && (this._$Cv = D, this._$AP?.(D));
|
|
413
413
|
}
|
|
414
414
|
}
|
|
415
415
|
class $t {
|
|
@@ -419,72 +419,72 @@ class $t {
|
|
|
419
419
|
get _$AU() {
|
|
420
420
|
return this._$AM._$AU;
|
|
421
421
|
}
|
|
422
|
-
constructor(
|
|
423
|
-
this.type = 1, this._$AH = dt, this._$AN = void 0, this.element =
|
|
422
|
+
constructor(D, W, se, me, Me) {
|
|
423
|
+
this.type = 1, this._$AH = dt, this._$AN = void 0, this.element = D, this.name = W, this._$AM = me, this.options = Me, se.length > 2 || se[0] !== "" || se[1] !== "" ? (this._$AH = Array(se.length - 1).fill(new String()), this.strings = se) : this._$AH = dt;
|
|
424
424
|
}
|
|
425
|
-
_$AI(
|
|
425
|
+
_$AI(D, W = this, se, me) {
|
|
426
426
|
const Me = this.strings;
|
|
427
427
|
let Ye = !1;
|
|
428
|
-
if (Me === void 0)
|
|
428
|
+
if (Me === void 0) D = xt(this, D, W, 0), Ye = !kt(D) || D !== this._$AH && D !== wt, Ye && (this._$AH = D);
|
|
429
429
|
else {
|
|
430
|
-
const $e =
|
|
430
|
+
const $e = D;
|
|
431
431
|
let ge, M;
|
|
432
|
-
for (
|
|
432
|
+
for (D = Me[0], ge = 0; ge < Me.length - 1; ge++) M = xt(this, $e[se + ge], W, ge), M === wt && (M = this._$AH[ge]), Ye ||= !kt(M) || M !== this._$AH[ge], M === dt ? D = dt : D !== dt && (D += (M ?? "") + Me[ge + 1]), this._$AH[ge] = M;
|
|
433
433
|
}
|
|
434
|
-
Ye && !me && this.j(
|
|
434
|
+
Ye && !me && this.j(D);
|
|
435
435
|
}
|
|
436
|
-
j(
|
|
437
|
-
|
|
436
|
+
j(D) {
|
|
437
|
+
D === dt ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, D ?? "");
|
|
438
438
|
}
|
|
439
439
|
}
|
|
440
440
|
class Yn extends $t {
|
|
441
441
|
constructor() {
|
|
442
442
|
super(...arguments), this.type = 3;
|
|
443
443
|
}
|
|
444
|
-
j(
|
|
445
|
-
this.element[this.name] =
|
|
444
|
+
j(D) {
|
|
445
|
+
this.element[this.name] = D === dt ? void 0 : D;
|
|
446
446
|
}
|
|
447
447
|
}
|
|
448
448
|
class Wn extends $t {
|
|
449
449
|
constructor() {
|
|
450
450
|
super(...arguments), this.type = 4;
|
|
451
451
|
}
|
|
452
|
-
j(
|
|
453
|
-
this.element.toggleAttribute(this.name, !!
|
|
452
|
+
j(D) {
|
|
453
|
+
this.element.toggleAttribute(this.name, !!D && D !== dt);
|
|
454
454
|
}
|
|
455
455
|
}
|
|
456
456
|
class qn extends $t {
|
|
457
|
-
constructor(
|
|
458
|
-
super(
|
|
457
|
+
constructor(D, W, se, me, Me) {
|
|
458
|
+
super(D, W, se, me, Me), this.type = 5;
|
|
459
459
|
}
|
|
460
|
-
_$AI(
|
|
461
|
-
if ((
|
|
462
|
-
const se = this._$AH, me =
|
|
463
|
-
me && this.element.removeEventListener(this.name, this, se), Me && this.element.addEventListener(this.name, this,
|
|
460
|
+
_$AI(D, W = this) {
|
|
461
|
+
if ((D = xt(this, D, W, 0) ?? dt) === wt) return;
|
|
462
|
+
const se = this._$AH, me = D === dt && se !== dt || D.capture !== se.capture || D.once !== se.once || D.passive !== se.passive, Me = D !== dt && (se === dt || me);
|
|
463
|
+
me && this.element.removeEventListener(this.name, this, se), Me && this.element.addEventListener(this.name, this, D), this._$AH = D;
|
|
464
464
|
}
|
|
465
|
-
handleEvent(
|
|
466
|
-
typeof this._$AH == "function" ? this._$AH.call(this.options?.host ?? this.element,
|
|
465
|
+
handleEvent(D) {
|
|
466
|
+
typeof this._$AH == "function" ? this._$AH.call(this.options?.host ?? this.element, D) : this._$AH.handleEvent(D);
|
|
467
467
|
}
|
|
468
468
|
}
|
|
469
469
|
class Xn {
|
|
470
|
-
constructor(
|
|
471
|
-
this.element =
|
|
470
|
+
constructor(D, W, se) {
|
|
471
|
+
this.element = D, this.type = 6, this._$AN = void 0, this._$AM = W, this.options = se;
|
|
472
472
|
}
|
|
473
473
|
get _$AU() {
|
|
474
474
|
return this._$AM._$AU;
|
|
475
475
|
}
|
|
476
|
-
_$AI(
|
|
477
|
-
xt(this,
|
|
476
|
+
_$AI(D) {
|
|
477
|
+
xt(this, D);
|
|
478
478
|
}
|
|
479
479
|
}
|
|
480
480
|
const Gn = Yt.litHtmlPolyfillSupport;
|
|
481
481
|
Gn?.(Dt, Nt), (Yt.litHtmlVersions ??= []).push("3.3.2");
|
|
482
|
-
const Zn = (ce,
|
|
483
|
-
const se = W?.renderBefore ??
|
|
482
|
+
const Zn = (ce, D, W) => {
|
|
483
|
+
const se = W?.renderBefore ?? D;
|
|
484
484
|
let me = se._$litPart$;
|
|
485
485
|
if (me === void 0) {
|
|
486
486
|
const Me = W?.renderBefore ?? null;
|
|
487
|
-
se._$litPart$ = me = new Nt(
|
|
487
|
+
se._$litPart$ = me = new Nt(D.insertBefore(At(), Me), Me, void 0, W ?? {});
|
|
488
488
|
}
|
|
489
489
|
return me._$AI(ce), me;
|
|
490
490
|
};
|
|
@@ -494,12 +494,12 @@ class Tt extends bt {
|
|
|
494
494
|
super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
|
|
495
495
|
}
|
|
496
496
|
createRenderRoot() {
|
|
497
|
-
const
|
|
498
|
-
return this.renderOptions.renderBefore ??=
|
|
497
|
+
const D = super.createRenderRoot();
|
|
498
|
+
return this.renderOptions.renderBefore ??= D.firstChild, D;
|
|
499
499
|
}
|
|
500
|
-
update(
|
|
500
|
+
update(D) {
|
|
501
501
|
const W = this.render();
|
|
502
|
-
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(
|
|
502
|
+
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(D), this._$Do = Zn(W, this.renderRoot, this.renderOptions);
|
|
503
503
|
}
|
|
504
504
|
connectedCallback() {
|
|
505
505
|
super.connectedCallback(), this._$Do?.setConnected(!0);
|
|
@@ -642,34 +642,78 @@ const Kn = Nn`
|
|
|
642
642
|
|
|
643
643
|
.controls {
|
|
644
644
|
display: flex;
|
|
645
|
-
|
|
646
|
-
|
|
645
|
+
flex-wrap: wrap;
|
|
646
|
+
justify-content: center;
|
|
647
|
+
gap: 12px;
|
|
647
648
|
align-items: center;
|
|
648
|
-
|
|
649
|
-
|
|
649
|
+
justify-content: space-between;
|
|
650
|
+
|
|
651
|
+
width: 100%;
|
|
652
|
+
margin: 0.5rem 0;
|
|
650
653
|
}
|
|
651
654
|
|
|
652
|
-
.
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
655
|
+
.zoom {
|
|
656
|
+
flex: 1 1 160px;
|
|
657
|
+
min-width: 160px;
|
|
658
|
+
height: 32px;
|
|
659
|
+
width: 100%;
|
|
657
660
|
}
|
|
658
661
|
|
|
659
|
-
|
|
660
|
-
|
|
662
|
+
input[type="range"] {
|
|
663
|
+
-webkit-appearance: none;
|
|
664
|
+
appearance: none;
|
|
665
|
+
|
|
666
|
+
background: transparent;
|
|
667
|
+
margin: 0;
|
|
668
|
+
}
|
|
669
|
+
|
|
670
|
+
.zoom[type="range"]::-moz-range-track,
|
|
671
|
+
.zoom[type="range"]::-webkit-slider-runnable-track {
|
|
661
672
|
height: 15px;
|
|
662
673
|
background: #ccc;
|
|
663
674
|
border-radius: 16px;
|
|
664
675
|
}
|
|
665
676
|
|
|
666
|
-
|
|
667
|
-
|
|
677
|
+
.zoom[type="range"]::-webkit-slider-runnable-track {
|
|
678
|
+
background-color: #ccc;
|
|
679
|
+
border-radius: 16px;
|
|
680
|
+
}
|
|
681
|
+
|
|
682
|
+
input[type="range"]::-webkit-slider-thumb {
|
|
683
|
+
-webkit-appearance: none;
|
|
684
|
+
|
|
685
|
+
width: 32px;
|
|
686
|
+
height: 32px;
|
|
687
|
+
background: #ffffff;
|
|
688
|
+
border-radius: 50%;
|
|
689
|
+
border: none;
|
|
690
|
+
|
|
691
|
+
box-shadow: 0 6px 12px rgba(0,0,0,0.25);
|
|
692
|
+
margin-top: -12px;
|
|
693
|
+
cursor: pointer;
|
|
694
|
+
}
|
|
695
|
+
|
|
696
|
+
input[type="range"]::-moz-range-thumb {
|
|
697
|
+
width: 32px;
|
|
668
698
|
height: 32px;
|
|
669
|
-
|
|
699
|
+
background: #ffffff;
|
|
700
|
+
border-radius: 50%;
|
|
701
|
+
border: none;
|
|
702
|
+
|
|
703
|
+
box-shadow: 0 6px 12px rgba(0,0,0,0.25);
|
|
704
|
+
cursor: pointer;
|
|
705
|
+
}
|
|
706
|
+
|
|
707
|
+
|
|
708
|
+
button {
|
|
709
|
+
display: inline-flex;
|
|
710
|
+
align-items: center;
|
|
670
711
|
justify-content: center;
|
|
671
712
|
gap: 8px;
|
|
672
|
-
|
|
713
|
+
|
|
714
|
+
min-height: 44px;
|
|
715
|
+
padding: 10px 14px;
|
|
716
|
+
|
|
673
717
|
border-radius: var(--Radius---radius-sm, 5px);
|
|
674
718
|
border: 1.5px solid var(--Colors-Primary---color-primary, #001D68);
|
|
675
719
|
background: var(--Colors-Grays---color-white, #FFF);
|
|
@@ -677,12 +721,10 @@ const Kn = Nn`
|
|
|
677
721
|
color: var(--Colors-Primary---color-primary, #001D68);
|
|
678
722
|
text-align: center;
|
|
679
723
|
|
|
680
|
-
|
|
681
|
-
font-
|
|
682
|
-
font-size: 12px;
|
|
683
|
-
font-style: normal;
|
|
724
|
+
font-family: inherit;
|
|
725
|
+
font-size: 14px;
|
|
684
726
|
font-weight: 600;
|
|
685
|
-
line-height: 16px;
|
|
727
|
+
line-height: 16px;
|
|
686
728
|
}
|
|
687
729
|
|
|
688
730
|
button[disabled] {
|
|
@@ -723,7 +765,7 @@ const Kn = Nn`
|
|
|
723
765
|
|
|
724
766
|
.placeholder {
|
|
725
767
|
display: flex;
|
|
726
|
-
height:
|
|
768
|
+
height: 100%;
|
|
727
769
|
flex-direction: column;
|
|
728
770
|
justify-content: center;
|
|
729
771
|
align-items: center;
|
|
@@ -761,12 +803,11 @@ const Kn = Nn`
|
|
|
761
803
|
color: var(--Colors-Grays---color-white, #FFF);
|
|
762
804
|
text-align: center;
|
|
763
805
|
|
|
764
|
-
/* Button Font/Medium */
|
|
765
806
|
font-family: Inter;
|
|
766
807
|
font-size: 14px;
|
|
767
808
|
font-style: normal;
|
|
768
809
|
font-weight: 600;
|
|
769
|
-
line-height: 16px;
|
|
810
|
+
line-height: 16px;
|
|
770
811
|
}
|
|
771
812
|
|
|
772
813
|
.continue:disabled {
|
|
@@ -782,7 +823,6 @@ const Kn = Nn`
|
|
|
782
823
|
color: var(--Colors-Grays---color-gray-7, #424242);
|
|
783
824
|
text-align: center;
|
|
784
825
|
|
|
785
|
-
/* Button Font/Medium */
|
|
786
826
|
font-family: Inter;
|
|
787
827
|
font-size: 14px;
|
|
788
828
|
font-style: normal;
|
|
@@ -792,23 +832,103 @@ const Kn = Nn`
|
|
|
792
832
|
|
|
793
833
|
.confirmation {
|
|
794
834
|
display: flex;
|
|
795
|
-
|
|
796
|
-
gap:
|
|
797
|
-
justify-content:
|
|
798
|
-
align-items:
|
|
835
|
+
flex-wrap: wrap;
|
|
836
|
+
gap: 12px;
|
|
837
|
+
justify-content: center;
|
|
838
|
+
align-items: center;
|
|
839
|
+
|
|
840
|
+
height: auto;
|
|
799
841
|
}
|
|
800
842
|
|
|
801
843
|
.nav {
|
|
802
844
|
display: flex;
|
|
803
|
-
|
|
804
|
-
gap:
|
|
845
|
+
flex-wrap: wrap;
|
|
846
|
+
gap: 12px;
|
|
805
847
|
justify-content: space-between;
|
|
806
|
-
align-items:
|
|
848
|
+
align-items: center;
|
|
807
849
|
align-self: stretch;
|
|
850
|
+
|
|
851
|
+
height: auto;
|
|
852
|
+
min-height: 56px;
|
|
808
853
|
}
|
|
809
854
|
|
|
810
855
|
.nav-spacer {
|
|
811
|
-
flex: 1;
|
|
856
|
+
flex: 1 1 auto;
|
|
857
|
+
}
|
|
858
|
+
|
|
859
|
+
.cropper {
|
|
860
|
+
display: flex;
|
|
861
|
+
justify-content: center;
|
|
862
|
+
width: 100%;
|
|
863
|
+
height: 100%;
|
|
864
|
+
}
|
|
865
|
+
|
|
866
|
+
.rotate-controls,
|
|
867
|
+
.zoom-controls,
|
|
868
|
+
.reset-controls {
|
|
869
|
+
display: flex;
|
|
870
|
+
align-items: center;
|
|
871
|
+
justify-content: space-between;
|
|
872
|
+
gap: 12px;
|
|
873
|
+
}
|
|
874
|
+
|
|
875
|
+
@media (max-width: 640px) {
|
|
876
|
+
.layout {
|
|
877
|
+
flex-direction: column;
|
|
878
|
+
align-items: stretch;
|
|
879
|
+
}
|
|
880
|
+
|
|
881
|
+
.controls {
|
|
882
|
+
flex-direction: column;
|
|
883
|
+
gap: 12px;
|
|
884
|
+
}
|
|
885
|
+
|
|
886
|
+
.rotate-controls,
|
|
887
|
+
.zoom-controls {
|
|
888
|
+
width: 100%;
|
|
889
|
+
gap: 6px;
|
|
890
|
+
}
|
|
891
|
+
|
|
892
|
+
.cropper,
|
|
893
|
+
.preview {
|
|
894
|
+
width: 100%;
|
|
895
|
+
}
|
|
896
|
+
|
|
897
|
+
/* Make action buttons full-width for easy tapping */
|
|
898
|
+
.nav button,
|
|
899
|
+
.confirmation button {
|
|
900
|
+
width: 100%;
|
|
901
|
+
}
|
|
902
|
+
|
|
903
|
+
.nav {
|
|
904
|
+
justify-content: center;
|
|
905
|
+
}
|
|
906
|
+
|
|
907
|
+
.zoom {
|
|
908
|
+
height: 64px;
|
|
909
|
+
}
|
|
910
|
+
|
|
911
|
+
.nav-spacer {
|
|
912
|
+
display: none;
|
|
913
|
+
}
|
|
914
|
+
|
|
915
|
+
.zoom[type="range"]::-moz-range-track,
|
|
916
|
+
.zoom[type="range"]::-webkit-slider-runnable-track {
|
|
917
|
+
height: 30px;
|
|
918
|
+
border-radius: 32px;
|
|
919
|
+
}
|
|
920
|
+
|
|
921
|
+
input[type="range"]::-webkit-slider-thumb {
|
|
922
|
+
width: 48px;
|
|
923
|
+
height: 48px;
|
|
924
|
+
margin-top: -4px; /* centers thumb over 8px track */
|
|
925
|
+
}
|
|
926
|
+
|
|
927
|
+
input[type="range"]::-moz-range-thumb {
|
|
928
|
+
width: 48px;
|
|
929
|
+
height: 48px;
|
|
930
|
+
cursor: pointer;
|
|
931
|
+
}
|
|
812
932
|
}
|
|
813
933
|
`, Qn = ft`
|
|
814
934
|
<svg width="15" height="16"
|
|
@@ -857,7 +977,7 @@ function si(ce) {
|
|
|
857
977
|
}
|
|
858
978
|
var Ot = { exports: {} }, It = { exports: {} }, ri = It.exports, ln;
|
|
859
979
|
function oi() {
|
|
860
|
-
return ln || (ln = 1, (function(ce,
|
|
980
|
+
return ln || (ln = 1, (function(ce, D) {
|
|
861
981
|
(function(W, se) {
|
|
862
982
|
ce.exports = se();
|
|
863
983
|
})(ri, (function() {
|
|
@@ -1888,7 +2008,7 @@ function oi() {
|
|
|
1888
2008
|
if (b)
|
|
1889
2009
|
return { type: T, method: r[T][C] };
|
|
1890
2010
|
}
|
|
1891
|
-
},
|
|
2011
|
+
}, N = function(l) {
|
|
1892
2012
|
for (var g = [], R = 0; R < l.length; R++) {
|
|
1893
2013
|
var T = U.call(this, l[R]);
|
|
1894
2014
|
T ? g.push(T.method) : g.push(null);
|
|
@@ -1971,7 +2091,7 @@ function oi() {
|
|
|
1971
2091
|
else
|
|
1972
2092
|
var I = n.call(C, C.value);
|
|
1973
2093
|
else {
|
|
1974
|
-
for (C.methods =
|
|
2094
|
+
for (C.methods = N.call(C, C.tokens), C.event = l; C.position < C.value.length && typeof C.tokens[C.index] < "u"; )
|
|
1975
2095
|
Z.call(C);
|
|
1976
2096
|
var I = C.values.join("");
|
|
1977
2097
|
if (k(C.type) && I !== "") {
|
|
@@ -2266,7 +2386,7 @@ function oi() {
|
|
|
2266
2386
|
return R && (e.options.value = null, e.setValue(R)), e;
|
|
2267
2387
|
}, e.open = function(L) {
|
|
2268
2388
|
if (!h.classList.contains("jcalendar-focus") && !h.classList.contains("jcalendar-inline")) {
|
|
2269
|
-
if (r.current = e, ee(e, !0), e.getDays(), e.options.type == "year-month-picker" && e.getMonths(), e.options.time && (
|
|
2389
|
+
if (r.current = e, ee(e, !0), e.getDays(), e.options.type == "year-month-picker" && e.getMonths(), e.options.time && (N.value = e.date[3], z.value = e.date[4]), h.classList.add("jcalendar-focus"), X.getWindowWidth() < 800 || e.options.fullscreen)
|
|
2270
2390
|
h.classList.add("jcalendar-fullsize"), J.slideBottom(t, 1);
|
|
2271
2391
|
else {
|
|
2272
2392
|
h.classList.remove("jcalendar-fullsize");
|
|
@@ -2353,7 +2473,7 @@ function oi() {
|
|
|
2353
2473
|
}, e.update = function(L, O) {
|
|
2354
2474
|
if (!L.classList.contains("jcalendar-disabled")) {
|
|
2355
2475
|
var l = h.querySelector(".jcalendar-selected");
|
|
2356
|
-
l && l.classList.remove("jcalendar-selected"), L.classList.add("jcalendar-selected"), L.classList.contains("jcalendar-set-month") ? (e.date[1] = O, e.date[2] = 1) : e.date[2] = L.innerText, e.options.time ? (e.date[3] =
|
|
2476
|
+
l && l.classList.remove("jcalendar-selected"), L.classList.add("jcalendar-selected"), L.classList.contains("jcalendar-set-month") ? (e.date[1] = O, e.date[2] = 1) : e.date[2] = L.innerText, e.options.time ? (e.date[3] = N.value, e.date[4] = z.value) : e.close(null, !0);
|
|
2357
2477
|
}
|
|
2358
2478
|
$();
|
|
2359
2479
|
}, e.reset = function() {
|
|
@@ -2471,8 +2591,8 @@ function oi() {
|
|
|
2471
2591
|
}
|
|
2472
2592
|
}, $ = function() {
|
|
2473
2593
|
var L = h.querySelector(".jcalendar-selected");
|
|
2474
|
-
L && L.classList.contains("jcalendar-disabled") ? (U.setAttribute("disabled", "disabled"),
|
|
2475
|
-
}, h = null, n = null, o = null, i = null, t = null, f = null, A = null, S = null, p = null, u = null, w = null, H = null, U = null,
|
|
2594
|
+
L && L.classList.contains("jcalendar-disabled") ? (U.setAttribute("disabled", "disabled"), N.setAttribute("disabled", "disabled"), z.setAttribute("disabled", "disabled")) : (U.removeAttribute("disabled"), N.removeAttribute("disabled"), z.removeAttribute("disabled")), typeof e.options.onupdate == "function" && e.options.onupdate(a, e.getValue());
|
|
2595
|
+
}, h = null, n = null, o = null, i = null, t = null, f = null, A = null, S = null, p = null, u = null, w = null, H = null, U = null, N = null, z = null, Z = function() {
|
|
2476
2596
|
a.tagName == "INPUT" && a.value && (s.value = a.value), n = document.createElement("div"), n.className = "jcalendar-reset", o = document.createElement("div"), o.className = "jcalendar-confirm", u = document.createElement("div"), u.className = "jcalendar-controls", u.style.borderBottom = "1px solid #ddd", u.appendChild(n), u.appendChild(o), i = document.createElement("div"), i.className = "jcalendar-container", t = document.createElement("div"), t.className = "jcalendar-content", i.appendChild(t), a.tagName == "DIV" ? (h = a, h.classList.add("jcalendar-inline")) : (t.appendChild(u), h = document.createElement("div"), h.className = "jcalendar"), h.classList.add("jcalendar-container"), h.appendChild(i);
|
|
2477
2597
|
var L = document.createElement("div");
|
|
2478
2598
|
L.className = "jcalendar-table", t.appendChild(L);
|
|
@@ -2483,12 +2603,12 @@ function oi() {
|
|
|
2483
2603
|
var g = document.createElement("td");
|
|
2484
2604
|
g.setAttribute("colspan", "2"), g.className = "jcalendar-next";
|
|
2485
2605
|
var R = document.createElement("thead"), T = document.createElement("tr");
|
|
2486
|
-
T.appendChild(O), T.appendChild(l), T.appendChild(g), R.appendChild(T), S = document.createElement("table"), p = document.createElement("tbody"), S.setAttribute("cellpadding", "0"), S.setAttribute("cellspacing", "0"), S.appendChild(R), S.appendChild(p), L.appendChild(S),
|
|
2606
|
+
T.appendChild(O), T.appendChild(l), T.appendChild(g), R.appendChild(T), S = document.createElement("table"), p = document.createElement("tbody"), S.setAttribute("cellpadding", "0"), S.setAttribute("cellspacing", "0"), S.appendChild(R), S.appendChild(p), L.appendChild(S), N = document.createElement("select"), N.className = "jcalendar-select", N.onchange = function() {
|
|
2487
2607
|
e.date[3] = this.value, typeof e.options.onupdate == "function" && e.options.onupdate(a, e.getValue());
|
|
2488
2608
|
};
|
|
2489
2609
|
for (var C = 0; C < 24; C++) {
|
|
2490
2610
|
var Y = document.createElement("option");
|
|
2491
|
-
Y.value = C, Y.innerHTML = X.two(C),
|
|
2611
|
+
Y.value = C, Y.innerHTML = X.two(C), N.appendChild(Y);
|
|
2492
2612
|
}
|
|
2493
2613
|
z = document.createElement("select"), z.className = "jcalendar-select", z.onchange = function() {
|
|
2494
2614
|
e.date[4] = this.value, typeof e.options.onupdate == "function" && e.options.onupdate(a, e.getValue());
|
|
@@ -2498,7 +2618,7 @@ function oi() {
|
|
|
2498
2618
|
Y.value = C, Y.innerHTML = X.two(C), z.appendChild(Y);
|
|
2499
2619
|
}
|
|
2500
2620
|
var b = document.createElement("div");
|
|
2501
|
-
b.className = "jcalendar-controls", w = document.createElement("div"), w.className = "jcalendar-time", w.style.maxWidth = "140px", w.appendChild(
|
|
2621
|
+
b.className = "jcalendar-controls", w = document.createElement("div"), w.className = "jcalendar-time", w.style.maxWidth = "140px", w.appendChild(N), w.appendChild(z), U = document.createElement("button"), U.setAttribute("type", "button"), U.className = "jcalendar-update", H = document.createElement("div"), H.style.flexGrow = "10", H.appendChild(U), b.appendChild(w), a.tagName == "INPUT" && b.appendChild(H), t.appendChild(b);
|
|
2502
2622
|
var v = document.createElement("div");
|
|
2503
2623
|
v.className = "jcalendar-backdrop", h.appendChild(v), a.addEventListener("keyup", k), h.addEventListener("swipeleft", function(m) {
|
|
2504
2624
|
J.slideLeft(S, 0, function() {
|
|
@@ -2508,7 +2628,7 @@ function oi() {
|
|
|
2508
2628
|
J.slideRight(S, 0, function() {
|
|
2509
2629
|
e.prev(), J.slideLeft(S, 1);
|
|
2510
2630
|
}), m.preventDefault(), m.stopPropagation();
|
|
2511
|
-
}), "ontouchend" in document.documentElement ? (h.addEventListener("touchend", d), a.addEventListener("touchend", e.open)) : (h.addEventListener("mouseup", d), a.addEventListener("mouseup", e.open)), r.hasEvents || (r.hasEvents = !0, document.addEventListener("keydown", r.keydown)), e.setOptions(s), a.tagName == "INPUT" ? (a.parentNode.insertBefore(h, a.nextSibling), a.setAttribute("autocomplete", "off"), a.classList.add("jcalendar-input"), a.value = e.setLabel(e.getValue(), e.options)) : (e.getDays(), e.options.time && (
|
|
2631
|
+
}), "ontouchend" in document.documentElement ? (h.addEventListener("touchend", d), a.addEventListener("touchend", e.open)) : (h.addEventListener("mouseup", d), a.addEventListener("mouseup", e.open)), r.hasEvents || (r.hasEvents = !0, document.addEventListener("keydown", r.keydown)), e.setOptions(s), a.tagName == "INPUT" ? (a.parentNode.insertBefore(h, a.nextSibling), a.setAttribute("autocomplete", "off"), a.classList.add("jcalendar-input"), a.value = e.setLabel(e.getValue(), e.options)) : (e.getDays(), e.options.time && (N.value = e.date[3], z.value = e.date[4])), e.options.opened == !0 && e.open(), e.options.controls == !1 && i.classList.add("jcalendar-hide-controls"), a.change = e.setValue, a.val = function(m) {
|
|
2512
2632
|
if (m === void 0)
|
|
2513
2633
|
return e.getValue();
|
|
2514
2634
|
e.setValue(m);
|
|
@@ -2684,11 +2804,11 @@ function oi() {
|
|
|
2684
2804
|
if (!A)
|
|
2685
2805
|
var A = prompt("Title?", "");
|
|
2686
2806
|
if (A) {
|
|
2687
|
-
let U = X.guid(),
|
|
2807
|
+
let U = X.guid(), N = X.guid();
|
|
2688
2808
|
var w = document.createElement("div");
|
|
2689
|
-
w.setAttribute("id",
|
|
2809
|
+
w.setAttribute("id", N), w.setAttribute("role", "tabpanel"), w.setAttribute("aria-labelledby", U);
|
|
2690
2810
|
var H = document.createElement("div");
|
|
2691
|
-
if (H.setAttribute("id", U), H.setAttribute("role", "tab"), H.setAttribute("aria-controls",
|
|
2811
|
+
if (H.setAttribute("id", U), H.setAttribute("role", "tab"), H.setAttribute("aria-controls", N), H.textContent = A, H.content = w, typeof u > "u")
|
|
2692
2812
|
s.content.appendChild(w), s.headers.insertBefore(H, s.headers.lastChild);
|
|
2693
2813
|
else {
|
|
2694
2814
|
let z = s.content.children[u];
|
|
@@ -2745,8 +2865,8 @@ function oi() {
|
|
|
2745
2865
|
U.classList.add("material-icons"), U.textContent = s.options.data[u].icon, H.appendChild(U), w.appendChild(H);
|
|
2746
2866
|
}
|
|
2747
2867
|
if (s.options.data[u].title) {
|
|
2748
|
-
var
|
|
2749
|
-
w.appendChild(
|
|
2868
|
+
var N = document.createTextNode(s.options.data[u].title);
|
|
2869
|
+
w.appendChild(N);
|
|
2750
2870
|
}
|
|
2751
2871
|
if (s.options.data[u].width && (w.style.width = s.options.data[u].width), s.options.data[u].contentElement)
|
|
2752
2872
|
var z = s.options.data[u].contentElement;
|
|
@@ -2837,7 +2957,7 @@ function oi() {
|
|
|
2837
2957
|
}, s.close = function(l) {
|
|
2838
2958
|
return e.classList.contains("jcolor-focus") && (e.classList.remove("jcolor-focus"), d.style.display = "", !l && typeof s.options.onclose == "function" && s.options.onclose(r, s), ee(s, !1)), s.options.value;
|
|
2839
2959
|
}, s.setValue = function(l) {
|
|
2840
|
-
l || (l = ""), l != s.options.value && (s.options.value = l,
|
|
2960
|
+
l || (l = ""), l != s.options.value && (s.options.value = l, N = l, s.select(l), typeof s.options.onchange == "function" && s.options.onchange(r, l, s), r.value != s.options.value && (r.value = s.options.value, r.tagName === "INPUT" && (r.style.color = r.value, r.style.backgroundColor = r.value), typeof r.oninput == "function" && r.oninput({
|
|
2841
2961
|
type: "input",
|
|
2842
2962
|
target: r,
|
|
2843
2963
|
value: r.value
|
|
@@ -2887,7 +3007,7 @@ function oi() {
|
|
|
2887
3007
|
var v = l.getBoundingClientRect(), m = Y - v.left, I = b - v.top;
|
|
2888
3008
|
m < 0 && (m = 0), I < 0 && (I = 0), m > v.width && (m = v.width), I > v.height && (I = v.height), g.style.left = m + "px", g.style.top = I + "px";
|
|
2889
3009
|
var Q = u.getImageData(m, I, 1, 1).data;
|
|
2890
|
-
|
|
3010
|
+
N = t(Q[0], Q[1], Q[2]);
|
|
2891
3011
|
}
|
|
2892
3012
|
};
|
|
2893
3013
|
return l.addEventListener("mousedown", function(C) {
|
|
@@ -2897,10 +3017,10 @@ function oi() {
|
|
|
2897
3017
|
}), l.addEventListener("touchmove", function(C) {
|
|
2898
3018
|
T(1, C.changedTouches[0].clientX, C.changedTouches[0].clientY);
|
|
2899
3019
|
}), l;
|
|
2900
|
-
},
|
|
2901
|
-
if (
|
|
3020
|
+
}, N = "", z = [], Z = function() {
|
|
3021
|
+
if (N !== "")
|
|
2902
3022
|
for (var l = 0; l < z.length; l++) {
|
|
2903
|
-
var g = A(
|
|
3023
|
+
var g = A(N);
|
|
2904
3024
|
g[l] = 0;
|
|
2905
3025
|
var R = "linear-gradient(90deg, rgb(";
|
|
2906
3026
|
R += g.join(", "), R += "), rgb(", g[l] = 255, R += g.join(", "), R += "))", z[l].style.backgroundImage = R;
|
|
@@ -2933,7 +3053,7 @@ function oi() {
|
|
|
2933
3053
|
C.style.visibility = "hidden", C.innerText = "a", T.appendChild(C);
|
|
2934
3054
|
var Y = function() {
|
|
2935
3055
|
var b = t(parseInt(z[0].value), parseInt(z[1].value), parseInt(z[2].value));
|
|
2936
|
-
C.innerText = b, C.style.color = b, C.style.removeProperty("visibility"),
|
|
3056
|
+
C.innerText = b, C.style.color = b, C.style.removeProperty("visibility"), N = b;
|
|
2937
3057
|
};
|
|
2938
3058
|
return z.forEach(function(b) {
|
|
2939
3059
|
b.addEventListener("input", function() {
|
|
@@ -2963,7 +3083,7 @@ function oi() {
|
|
|
2963
3083
|
if (T === 1)
|
|
2964
3084
|
w();
|
|
2965
3085
|
else {
|
|
2966
|
-
var C =
|
|
3086
|
+
var C = N !== "" ? N : s.getValue();
|
|
2967
3087
|
if (T === 2 && C) {
|
|
2968
3088
|
var Y = A(C);
|
|
2969
3089
|
z.forEach(function(b, v) {
|
|
@@ -2977,7 +3097,7 @@ function oi() {
|
|
|
2977
3097
|
if (g.target.tagName == "TD") {
|
|
2978
3098
|
var R = g.target.getAttribute("data-value");
|
|
2979
3099
|
R && s.setValue(R);
|
|
2980
|
-
} else g.target.classList.contains("jcolor-reset") ? (s.setValue(""), s.close()) : g.target.classList.contains("jcolor-close") ? (o.getActive() > 0 && s.setValue(
|
|
3100
|
+
} else g.target.classList.contains("jcolor-reset") ? (s.setValue(""), s.close()) : g.target.classList.contains("jcolor-close") ? (o.getActive() > 0 && s.setValue(N), s.close()) : g.target.classList.contains("jcolor-backdrop") ? s.close() : s.open();
|
|
2981
3101
|
}), r.addEventListener("mouseup", function(g) {
|
|
2982
3102
|
s.open();
|
|
2983
3103
|
}), window.addEventListener("resize", function() {
|
|
@@ -3074,8 +3194,8 @@ function oi() {
|
|
|
3074
3194
|
}
|
|
3075
3195
|
o.appendChild(f), o.addEventListener("mouseenter", function() {
|
|
3076
3196
|
f.style.left = "", f.style.right = "", f.style.minWidth = o.offsetWidth + "px", f.style.display = "block", f.style.opacity = "0", f.style.pointerEvents = "none";
|
|
3077
|
-
var H = o.getBoundingClientRect(), U = f.getBoundingClientRect(),
|
|
3078
|
-
z >
|
|
3197
|
+
var H = o.getBoundingClientRect(), U = f.getBoundingClientRect(), N = window.innerWidth || document.documentElement.clientWidth, z = H.right + U.width, Z = H.left - U.width;
|
|
3198
|
+
z > N && Z >= 0 ? (f.style.left = "auto", f.style.right = "99%") : z > N && Z < 0 ? (f.style.left = "32px", f.style.right = "auto", f.style.top = "100%") : (f.style.left = "99%", f.style.right = "auto"), f.style.opacity = "", f.style.pointerEvents = "", f.style.display = "";
|
|
3079
3199
|
}), o.addEventListener("mouseleave", function() {
|
|
3080
3200
|
f.style.left = "", f.style.right = "", f.style.minWidth = "";
|
|
3081
3201
|
});
|
|
@@ -3230,7 +3350,7 @@ function oi() {
|
|
|
3230
3350
|
var l = "value";
|
|
3231
3351
|
typeof L == "object" ? L[l] = O : e.items[L].data[l] = O;
|
|
3232
3352
|
};
|
|
3233
|
-
const
|
|
3353
|
+
const N = function(L, O) {
|
|
3234
3354
|
if (!L) {
|
|
3235
3355
|
let R = e.options.autocomplete == !0 ? e.header.value : "";
|
|
3236
3356
|
if (L = prompt(M.translate("Add A New Option"), R), !L)
|
|
@@ -3257,7 +3377,7 @@ function oi() {
|
|
|
3257
3377
|
return S.appendChild(g.element), typeof e.options.oninsert == "function" && e.options.oninsert(e, l, g), S.style.display == "none" && (S.style.display = ""), e.results && e.results.push(g), l;
|
|
3258
3378
|
};
|
|
3259
3379
|
e.add = function(L, O) {
|
|
3260
|
-
return typeof e.options.prompt == "function" ? e.options.prompt.call(e,
|
|
3380
|
+
return typeof e.options.prompt == "function" ? e.options.prompt.call(e, N) : N(L, O);
|
|
3261
3381
|
}, e.createItem = function(L, O, l) {
|
|
3262
3382
|
e.options.format ? (!L.id && L.value !== void 0 && (L.id = L.value), !L.name && L.text !== void 0 && (L.name = L.text)) : (!L.value && L.id !== void 0 && (L.value = L.id), !L.text && L.name !== void 0 && (L.text = L.name));
|
|
3263
3383
|
var g = {};
|
|
@@ -4132,7 +4252,7 @@ function oi() {
|
|
|
4132
4252
|
}, !1), m[I].readAsDataURL(v[I])) : alert("The extension is not allowed");
|
|
4133
4253
|
}
|
|
4134
4254
|
}, e.destroy = function() {
|
|
4135
|
-
e.editor.removeEventListener("mouseup", g), e.editor.removeEventListener("mousedown", R), e.editor.removeEventListener("mousemove", T), e.editor.removeEventListener("keyup", O), e.editor.removeEventListener("keydown", l), e.editor.removeEventListener("dragstart", H), e.editor.removeEventListener("dragenter", U), e.editor.removeEventListener("dragover",
|
|
4255
|
+
e.editor.removeEventListener("mouseup", g), e.editor.removeEventListener("mousedown", R), e.editor.removeEventListener("mousemove", T), e.editor.removeEventListener("keyup", O), e.editor.removeEventListener("keydown", l), e.editor.removeEventListener("dragstart", H), e.editor.removeEventListener("dragenter", U), e.editor.removeEventListener("dragover", N), e.editor.removeEventListener("drop", z), e.editor.removeEventListener("paste", w), e.editor.removeEventListener("blur", Z), e.editor.removeEventListener("focus", L), a.editor = null, a.classList.remove("jeditor-container"), i.remove(), o.remove(), e.editor.remove();
|
|
4136
4256
|
}, e.upload = function() {
|
|
4137
4257
|
X.click(e.file);
|
|
4138
4258
|
};
|
|
@@ -4169,7 +4289,7 @@ function oi() {
|
|
|
4169
4289
|
h && h.e && v.preventDefault();
|
|
4170
4290
|
}, U = function(v) {
|
|
4171
4291
|
h || e.options.dropZone == !1 || (a.classList.add("jeditor-dragging"), v.preventDefault());
|
|
4172
|
-
},
|
|
4292
|
+
}, N = function(v) {
|
|
4173
4293
|
h || e.options.dropZone == !1 || ($ && clearTimeout($), $ = setTimeout(function() {
|
|
4174
4294
|
a.classList.remove("jeditor-dragging");
|
|
4175
4295
|
}, 100), v.preventDefault());
|
|
@@ -4254,7 +4374,7 @@ function oi() {
|
|
|
4254
4374
|
e.options.extensions[v[m]] && typeof e.options.extensions[v[m]] == "function" && (e.options.extensions[v[m]] = e.options.extensions[v[m]](a, e));
|
|
4255
4375
|
}
|
|
4256
4376
|
};
|
|
4257
|
-
if (document.addEventListener("mouseup", g), document.addEventListener("mousemove", T), e.editor.addEventListener("mousedown", R), e.editor.addEventListener("keyup", O), e.editor.addEventListener("keydown", l), e.editor.addEventListener("dragstart", H), e.editor.addEventListener("dragenter", U), e.editor.addEventListener("dragover",
|
|
4377
|
+
if (document.addEventListener("mouseup", g), document.addEventListener("mousemove", T), e.editor.addEventListener("mousedown", R), e.editor.addEventListener("keyup", O), e.editor.addEventListener("keydown", l), e.editor.addEventListener("dragstart", H), e.editor.addEventListener("dragenter", U), e.editor.addEventListener("dragover", N), e.editor.addEventListener("drop", z), e.editor.addEventListener("paste", w), e.editor.addEventListener("focus", L), e.editor.addEventListener("blur", Z), a.appendChild(e.editor), e.options.snippet && e.appendSnippet(e.options.snippet), e.options.toolbar) {
|
|
4258
4378
|
if (Array.isArray(e.options.toolbar))
|
|
4259
4379
|
var b = {
|
|
4260
4380
|
container: !0,
|
|
@@ -5341,7 +5461,7 @@ function oi() {
|
|
|
5341
5461
|
var e = function() {
|
|
5342
5462
|
return !!(s.options.limit && r.children.length >= s.options.limit);
|
|
5343
5463
|
}, d = null, k = null;
|
|
5344
|
-
s.setOptions = function(
|
|
5464
|
+
s.setOptions = function(N, z) {
|
|
5345
5465
|
var Z = {
|
|
5346
5466
|
value: "",
|
|
5347
5467
|
limit: null,
|
|
@@ -5358,19 +5478,19 @@ function oi() {
|
|
|
5358
5478
|
onload: null
|
|
5359
5479
|
};
|
|
5360
5480
|
for (var L in Z)
|
|
5361
|
-
|
|
5481
|
+
N && N.hasOwnProperty(L) ? s.options[L] = N[L] : (typeof s.options[L] > "u" || z === !0) && (s.options[L] = Z[L]);
|
|
5362
5482
|
return s.options.placeholder ? r.setAttribute("data-placeholder", s.options.placeholder) : r.removeAttribute("data-placeholder"), r.placeholder = s.options.placeholder, s.setValue(s.options.value), o(), s.options.search ? k || (k = document.createElement("div"), r.parentNode.insertBefore(k, r.nextSibling), d = at(k, {
|
|
5363
5483
|
data: s.options.search,
|
|
5364
5484
|
onselect: function(O, l, g) {
|
|
5365
5485
|
s.selectIndex(l, g);
|
|
5366
5486
|
}
|
|
5367
5487
|
})) : k && (d = null, k.remove(), k = null), s;
|
|
5368
|
-
}, s.add = function(
|
|
5488
|
+
}, s.add = function(N, z) {
|
|
5369
5489
|
if (typeof s.options.onbeforechange == "function") {
|
|
5370
|
-
var Z = s.options.onbeforechange(r, s, s.options.value,
|
|
5490
|
+
var Z = s.options.onbeforechange(r, s, s.options.value, N);
|
|
5371
5491
|
if (Z === !1)
|
|
5372
5492
|
return !1;
|
|
5373
|
-
Z != null && (
|
|
5493
|
+
Z != null && (N = Z);
|
|
5374
5494
|
}
|
|
5375
5495
|
if (d && d.close(), e())
|
|
5376
5496
|
typeof s.options.onlimit == "function" ? s.options.onlimit(s, s.options.limit) : alert(M.translate("You reach the limit number of entries") + " " + s.options.limit);
|
|
@@ -5379,37 +5499,37 @@ function oi() {
|
|
|
5379
5499
|
if (L && L.parentNode && L.parentNode.classList.contains("jtags") && L.nextSibling && !(L.nextSibling.innerText && L.nextSibling.innerText.trim()))
|
|
5380
5500
|
O = L.nextSibling;
|
|
5381
5501
|
else {
|
|
5382
|
-
if (r.lastChild && (r.lastChild.innerText.trim() || r.removeChild(r.lastChild)), !
|
|
5383
|
-
var O = h(
|
|
5502
|
+
if (r.lastChild && (r.lastChild.innerText.trim() || r.removeChild(r.lastChild)), !N || typeof N == "string")
|
|
5503
|
+
var O = h(N, N, L);
|
|
5384
5504
|
else
|
|
5385
|
-
for (var l = 0; l <=
|
|
5505
|
+
for (var l = 0; l <= N.length; l++)
|
|
5386
5506
|
if (!e()) {
|
|
5387
|
-
if (!
|
|
5388
|
-
var g =
|
|
5507
|
+
if (!N[l] || typeof N[l] == "string")
|
|
5508
|
+
var g = N[l] || "", R = null;
|
|
5389
5509
|
else
|
|
5390
|
-
var g =
|
|
5510
|
+
var g = N[l].text, R = N[l].value;
|
|
5391
5511
|
var O = h(g, R);
|
|
5392
5512
|
}
|
|
5393
5513
|
n();
|
|
5394
5514
|
}
|
|
5395
5515
|
z && $(O);
|
|
5396
5516
|
}
|
|
5397
|
-
}, s.setLimit = function(
|
|
5398
|
-
for (s.options.limit =
|
|
5517
|
+
}, s.setLimit = function(N) {
|
|
5518
|
+
for (s.options.limit = N, r.children.length - N; r.children.length > N; )
|
|
5399
5519
|
r.removeChild(r.lastChild);
|
|
5400
|
-
}, s.remove = function(
|
|
5401
|
-
|
|
5520
|
+
}, s.remove = function(N) {
|
|
5521
|
+
N.parentNode.removeChild(N), r.children.length ? n() : s.add("", !0), typeof s.options.onremoveitem == "function" && s.options.onremoveitem(r, s, N);
|
|
5402
5522
|
}, s.getData = function() {
|
|
5403
|
-
for (var
|
|
5523
|
+
for (var N = [], z = 0; z < r.children.length; z++) {
|
|
5404
5524
|
var Z = r.children[z].innerText.replace(`
|
|
5405
5525
|
`, ""), L = r.children[z].getAttribute("data-value");
|
|
5406
|
-
L || (L = Z), (Z || L) &&
|
|
5526
|
+
L || (L = Z), (Z || L) && N.push({ text: Z, value: L });
|
|
5407
5527
|
}
|
|
5408
|
-
return
|
|
5409
|
-
}, s.getValue = function(
|
|
5528
|
+
return N;
|
|
5529
|
+
}, s.getValue = function(N) {
|
|
5410
5530
|
var z = null;
|
|
5411
|
-
if (
|
|
5412
|
-
z = r.children[
|
|
5531
|
+
if (N != null)
|
|
5532
|
+
z = r.children[N].getAttribute("data-value"), z || (z = r.children[N].innerText.replace(`
|
|
5413
5533
|
`, ""));
|
|
5414
5534
|
else {
|
|
5415
5535
|
for (var Z = [], L = 0; L < r.children.length; L++)
|
|
@@ -5418,112 +5538,112 @@ function oi() {
|
|
|
5418
5538
|
z = Z.join(",");
|
|
5419
5539
|
}
|
|
5420
5540
|
return z;
|
|
5421
|
-
}, s.setValue = function(
|
|
5422
|
-
if (!
|
|
5541
|
+
}, s.setValue = function(N) {
|
|
5542
|
+
if (!N)
|
|
5423
5543
|
s.reset();
|
|
5424
|
-
else if (r.value !=
|
|
5425
|
-
if (Array.isArray(
|
|
5426
|
-
s.add(
|
|
5544
|
+
else if (r.value != N)
|
|
5545
|
+
if (Array.isArray(N))
|
|
5546
|
+
s.add(N);
|
|
5427
5547
|
else {
|
|
5428
|
-
var z = ("" +
|
|
5548
|
+
var z = ("" + N).trim(), Z = t(z);
|
|
5429
5549
|
r.innerHTML = "", s.add(Z);
|
|
5430
5550
|
}
|
|
5431
5551
|
}, s.reset = function() {
|
|
5432
5552
|
r.classList.add("jtags-empty"), r.innerHTML = "<div></div>", n();
|
|
5433
5553
|
}, s.isValid = function() {
|
|
5434
|
-
for (var
|
|
5435
|
-
r.children[z].classList.contains("jtags_error") &&
|
|
5436
|
-
return
|
|
5437
|
-
}, s.selectIndex = function(
|
|
5554
|
+
for (var N = 0, z = 0; z < r.children.length; z++)
|
|
5555
|
+
r.children[z].classList.contains("jtags_error") && N++;
|
|
5556
|
+
return N == 0;
|
|
5557
|
+
}, s.selectIndex = function(N, z) {
|
|
5438
5558
|
var Z = X.getNode();
|
|
5439
|
-
Z && (Z.innerText =
|
|
5440
|
-
}, s.search = function(
|
|
5441
|
-
|
|
5559
|
+
Z && (Z.innerText = N, z && Z.setAttribute("data-value", z), Z.classList.remove("jtags_error"), e() || s.add("", !0));
|
|
5560
|
+
}, s.search = function(N) {
|
|
5561
|
+
N.innerText;
|
|
5442
5562
|
}, s.destroy = function() {
|
|
5443
5563
|
r.removeEventListener("mouseup", u), r.removeEventListener("keydown", A), r.removeEventListener("keyup", S), r.removeEventListener("paste", p), r.removeEventListener("focus", w), r.removeEventListener("blur", H), r.parentNode.removeChild(r);
|
|
5444
5564
|
};
|
|
5445
|
-
var $ = function(
|
|
5565
|
+
var $ = function(N) {
|
|
5446
5566
|
if (r.children.length) {
|
|
5447
5567
|
var z = document.createRange(), Z = window.getSelection();
|
|
5448
|
-
if (!
|
|
5449
|
-
var
|
|
5450
|
-
z.setStart(
|
|
5568
|
+
if (!N)
|
|
5569
|
+
var N = r.childNodes[r.childNodes.length - 1];
|
|
5570
|
+
z.setStart(N, N.length), z.collapse(!0), Z.removeAllRanges(), Z.addRange(z), r.scrollLeft = r.scrollWidth;
|
|
5451
5571
|
}
|
|
5452
|
-
}, h = function(
|
|
5572
|
+
}, h = function(N, z, Z) {
|
|
5453
5573
|
var L = document.createElement("div");
|
|
5454
|
-
return L.textContent =
|
|
5574
|
+
return L.textContent = N || "", z && L.setAttribute("data-value", z), Z && Z.parentNode.classList.contains("jtags") ? r.insertBefore(L, Z.nextSibling) : r.appendChild(L), L;
|
|
5455
5575
|
}, n = function() {
|
|
5456
|
-
var
|
|
5457
|
-
|
|
5576
|
+
var N = s.getValue();
|
|
5577
|
+
N != s.options.value && (s.options.value = N, typeof s.options.onchange == "function" && s.options.onchange(r, s, s.options.value), r.value != s.options.value && (r.value = s.options.value, typeof r.oninput == "function" && r.oninput({
|
|
5458
5578
|
type: "input",
|
|
5459
5579
|
target: r,
|
|
5460
5580
|
value: r.value
|
|
5461
5581
|
}))), o();
|
|
5462
5582
|
}, o = function() {
|
|
5463
|
-
for (var
|
|
5464
|
-
r.children[
|
|
5583
|
+
for (var N = 0; N < r.children.length; N++)
|
|
5584
|
+
r.children[N].tagName === "DIV" && (s.getValue(N) ? (r.children[N].classList.add("jtags_label"), typeof s.options.validation == "function" && s.getValue(N) ? s.options.validation(r.children[N], r.children[N].innerText, r.children[N].getAttribute("data-value")) ? r.children[N].classList.remove("jtags_error") : r.children[N].classList.add("jtags_error") : r.children[N].classList.remove("jtags_error")) : r.children[N].classList.remove("jtags_label"));
|
|
5465
5585
|
i();
|
|
5466
5586
|
}, i = function() {
|
|
5467
5587
|
r.innerText.trim() ? r.classList.remove("jtags-empty") : (!r.children.length || r.children[0].tagName === "BR") && (r.innerHTML = "", $(h()));
|
|
5468
|
-
}, t = function(
|
|
5588
|
+
}, t = function(N) {
|
|
5469
5589
|
var z = [], Z = "";
|
|
5470
|
-
if (
|
|
5471
|
-
for (var L = 0; L <
|
|
5472
|
-
|
|
5473
|
-
` ? Z && (z.push(Z.trim()), Z = "") : Z +=
|
|
5590
|
+
if (N = N.trim(), N) {
|
|
5591
|
+
for (var L = 0; L < N.length; L++)
|
|
5592
|
+
N[L] == "," || N[L] == ";" || N[L] == `
|
|
5593
|
+
` ? Z && (z.push(Z.trim()), Z = "") : Z += N[L];
|
|
5474
5594
|
Z && z.push(Z);
|
|
5475
5595
|
}
|
|
5476
5596
|
return z;
|
|
5477
|
-
}, f = 0, A = function(
|
|
5478
|
-
if (f = window.getSelection().anchorOffset, i(),
|
|
5597
|
+
}, f = 0, A = function(N) {
|
|
5598
|
+
if (f = window.getSelection().anchorOffset, i(), N.key === "Tab" || N.key === ";" || N.key === ",") {
|
|
5479
5599
|
var z = window.getSelection().anchorOffset;
|
|
5480
|
-
z > 1 && (e() ? typeof s.options.onlimit == "function" && s.options.onlimit(s, s.options.limit) : s.add("", !0)),
|
|
5481
|
-
} else if (
|
|
5600
|
+
z > 1 && (e() ? typeof s.options.onlimit == "function" && s.options.onlimit(s, s.options.limit) : s.add("", !0)), N.preventDefault();
|
|
5601
|
+
} else if (N.key == "Enter") {
|
|
5482
5602
|
if (!d || !d.isOpened()) {
|
|
5483
5603
|
var z = window.getSelection().anchorOffset;
|
|
5484
|
-
z > 1 && (e() || s.add("", !0)),
|
|
5604
|
+
z > 1 && (e() || s.add("", !0)), N.preventDefault();
|
|
5485
5605
|
}
|
|
5486
|
-
} else
|
|
5487
|
-
d && d.keydown(
|
|
5488
|
-
}, S = function(
|
|
5489
|
-
if (
|
|
5606
|
+
} else N.key == "Backspace" && r.children.length == 1 && window.getSelection().anchorOffset < 1 && N.preventDefault();
|
|
5607
|
+
d && d.keydown(N), i();
|
|
5608
|
+
}, S = function(N) {
|
|
5609
|
+
if (N.which == 39) {
|
|
5490
5610
|
var z = window.getSelection().anchorOffset;
|
|
5491
5611
|
z > 1 && z == f && s.add("", !0);
|
|
5492
|
-
} else
|
|
5612
|
+
} else N.which == 13 || N.which == 38 || N.which == 40 ? N.preventDefault() : d && d.keyup(N);
|
|
5493
5613
|
o();
|
|
5494
|
-
}, p = function(
|
|
5495
|
-
if (
|
|
5496
|
-
var z = (
|
|
5614
|
+
}, p = function(N) {
|
|
5615
|
+
if (N.clipboardData || N.originalEvent.clipboardData)
|
|
5616
|
+
var z = (N.originalEvent || N).clipboardData.getData("text/plain");
|
|
5497
5617
|
else if (window.clipboardData)
|
|
5498
5618
|
var z = window.clipboardData.getData("Text");
|
|
5499
5619
|
var Z = t(z);
|
|
5500
5620
|
if (typeof s.options.onbeforepaste == "function") {
|
|
5501
5621
|
var L = s.options.onbeforepaste(r, s, Z);
|
|
5502
5622
|
if (L === !1)
|
|
5503
|
-
return
|
|
5623
|
+
return N.preventDefault(), !1;
|
|
5504
5624
|
L && (Z = L);
|
|
5505
5625
|
}
|
|
5506
|
-
Z.length > 1 ? (s.add(Z, !0),
|
|
5507
|
-
}, u = function(
|
|
5508
|
-
if (
|
|
5509
|
-
var z =
|
|
5510
|
-
z.width - (
|
|
5626
|
+
Z.length > 1 ? (s.add(Z, !0), N.preventDefault()) : Z[0] && (document.execCommand("insertText", !1, Z[0]), N.preventDefault());
|
|
5627
|
+
}, u = function(N) {
|
|
5628
|
+
if (N.target.parentNode && N.target.parentNode.classList.contains("jtags") && (N.target.classList.contains("jtags_label") || N.target.classList.contains("jtags_error"))) {
|
|
5629
|
+
var z = N.target.getBoundingClientRect();
|
|
5630
|
+
z.width - (N.clientX - z.left) < 16 && s.remove(N.target);
|
|
5511
5631
|
}
|
|
5512
|
-
|
|
5632
|
+
N.target == r && $();
|
|
5513
5633
|
}, w = function() {
|
|
5514
5634
|
r.classList.contains("jtags-focus") || ((!r.children.length || s.getValue(r.children.length - 1)) && (e() || h("")), typeof s.options.onfocus == "function" && s.options.onfocus(r, s, s.getValue()), r.classList.add("jtags-focus"));
|
|
5515
5635
|
}, H = function() {
|
|
5516
5636
|
if (r.classList.contains("jtags-focus")) {
|
|
5517
5637
|
d && d.close();
|
|
5518
|
-
for (var
|
|
5519
|
-
s.getValue(
|
|
5638
|
+
for (var N = 0; N < r.children.length - 1; N++)
|
|
5639
|
+
s.getValue(N) || r.removeChild(r.children[N]);
|
|
5520
5640
|
n(), r.classList.remove("jtags-focus"), typeof s.options.onblur == "function" && s.options.onblur(r, s, s.getValue());
|
|
5521
5641
|
}
|
|
5522
5642
|
}, U = function() {
|
|
5523
|
-
"touchend" in document.documentElement ? r.addEventListener("touchend", u) : r.addEventListener("mouseup", u), r.addEventListener("keydown", A), r.addEventListener("keyup", S), r.addEventListener("paste", p), r.addEventListener("focus", w), r.addEventListener("blur", H), r.setAttribute("contenteditable", !0), r.classList.add("jtags"), s.setOptions(a), typeof s.options.onload == "function" && s.options.onload(r, s), r.change = s.setValue, r.val = function(
|
|
5524
|
-
if (
|
|
5643
|
+
"touchend" in document.documentElement ? r.addEventListener("touchend", u) : r.addEventListener("mouseup", u), r.addEventListener("keydown", A), r.addEventListener("keyup", S), r.addEventListener("paste", p), r.addEventListener("focus", w), r.addEventListener("blur", H), r.setAttribute("contenteditable", !0), r.classList.add("jtags"), s.setOptions(a), typeof s.options.onload == "function" && s.options.onload(r, s), r.change = s.setValue, r.val = function(N) {
|
|
5644
|
+
if (N === void 0)
|
|
5525
5645
|
return s.getValue();
|
|
5526
|
-
s.setValue(
|
|
5646
|
+
s.setValue(N);
|
|
5527
5647
|
}, r.tags = s;
|
|
5528
5648
|
};
|
|
5529
5649
|
return U(), s;
|
|
@@ -5700,30 +5820,30 @@ function oi() {
|
|
|
5700
5820
|
window.jSuitesStateControl = [];
|
|
5701
5821
|
else
|
|
5702
5822
|
return;
|
|
5703
|
-
const r = function(
|
|
5704
|
-
return
|
|
5705
|
-
}, a = function(
|
|
5823
|
+
const r = function(N, z) {
|
|
5824
|
+
return N[z.type] && N[z.type] == z || N.component && N.component == z ? !0 : N.parentNode ? r(N.parentNode, z) : !1;
|
|
5825
|
+
}, a = function(N) {
|
|
5706
5826
|
let z = window.jSuitesStateControl;
|
|
5707
5827
|
if (z && z.length > 0)
|
|
5708
5828
|
for (let Z = 0; Z < z.length; Z++)
|
|
5709
|
-
z[Z] && !r(
|
|
5829
|
+
z[Z] && !r(N, z[Z]) && z[Z].close();
|
|
5710
5830
|
};
|
|
5711
5831
|
let s = 15, e = !1, d = {
|
|
5712
5832
|
x: null,
|
|
5713
5833
|
y: null
|
|
5714
5834
|
}, k = document.createElement("div");
|
|
5715
5835
|
k.classList.add("jtooltip");
|
|
5716
|
-
const $ = function(
|
|
5717
|
-
return
|
|
5718
|
-
}, h = function(
|
|
5719
|
-
let z, Z, L =
|
|
5720
|
-
return L ? (Z = L[0], Z && $(Z) && !Z.shadowRoot &&
|
|
5721
|
-
}, n = function(
|
|
5722
|
-
if (
|
|
5723
|
-
var z =
|
|
5836
|
+
const $ = function(N) {
|
|
5837
|
+
return N && (N.shadowRoot || N.tagName && N.tagName.includes("-"));
|
|
5838
|
+
}, h = function(N) {
|
|
5839
|
+
let z, Z, L = N.path || N.composedPath && N.composedPath();
|
|
5840
|
+
return L ? (Z = L[0], Z && $(Z) && !Z.shadowRoot && N.toElement && (Z = N.toElement)) : (N.target && $(N.target) ? z = N.target.shadowRoot : z = document, Z = z.elementFromPoint(x, y)), Z;
|
|
5841
|
+
}, n = function(N) {
|
|
5842
|
+
if (N.changedTouches && N.changedTouches[0])
|
|
5843
|
+
var z = N.changedTouches[0].clientX, Z = N.changedTouches[0].clientY;
|
|
5724
5844
|
else
|
|
5725
|
-
var z =
|
|
5726
|
-
let L = h(
|
|
5845
|
+
var z = N.clientX, Z = N.clientY;
|
|
5846
|
+
let L = h(N), O = L && L.tagName === "DIV" && L.getAttribute("contentEditable"), l = c.findElement(L, "jpanel");
|
|
5727
5847
|
if (l && !l.classList.contains("readonly") && !O) {
|
|
5728
5848
|
let g = l.getBoundingClientRect(), R = 0;
|
|
5729
5849
|
l.style.rotate && (R = parseFloat(l.style.rotate));
|
|
@@ -5745,19 +5865,19 @@ function oi() {
|
|
|
5745
5865
|
}, l.style.width || (l.style.width = g.width + "px"), l.style.height || (l.style.height = g.height + "px");
|
|
5746
5866
|
} else
|
|
5747
5867
|
e = !1;
|
|
5748
|
-
a(L), S(
|
|
5749
|
-
}, o = function(
|
|
5750
|
-
const g = Z -
|
|
5868
|
+
a(L), S(N);
|
|
5869
|
+
}, o = function(N, z, Z, L, O, l) {
|
|
5870
|
+
const g = Z - N, R = L - z, T = O - N, C = l - z;
|
|
5751
5871
|
let Y = Math.atan2(R, g), v = Math.atan2(C, T) - Y;
|
|
5752
5872
|
return v = v * (180 / Math.PI), v < 0 && (v += 360), v;
|
|
5753
|
-
}, i = function(
|
|
5873
|
+
}, i = function(N) {
|
|
5754
5874
|
e && e.e && (typeof e.e.refresh == "function" && d.actioned && e.e.refresh(), e.e.style.cursor = ""), d = {
|
|
5755
5875
|
x: null,
|
|
5756
5876
|
y: null
|
|
5757
5877
|
}, e = !1;
|
|
5758
|
-
}, t = function(
|
|
5878
|
+
}, t = function(N) {
|
|
5759
5879
|
if (e) {
|
|
5760
|
-
let l =
|
|
5880
|
+
let l = N.clientX || N.pageX, g = N.clientY || N.pageY;
|
|
5761
5881
|
if (d.x == null && d.y == null && (d.x = l, d.y = g), e.action === "move") {
|
|
5762
5882
|
var z = l - d.x, Z = g - d.y, L = e.e.offsetTop + Z, O = e.e.offsetLeft + z;
|
|
5763
5883
|
e.e.style.top = L + "px", e.e.style.left = O + "px", typeof e.e.refresh == "function" && (d.actioned = !0, e.e.refresh("position", L, O));
|
|
@@ -5766,60 +5886,60 @@ function oi() {
|
|
|
5766
5886
|
C = C + e.a % 360, C = Math.round(C / 2) * 2, e.e.style.rotate = `${C}deg`, typeof e.e.refresh == "function" && (d.actioned = !0, e.e.refresh("rotate", C));
|
|
5767
5887
|
} else if (e.action === "resize") {
|
|
5768
5888
|
let R = null, T = null, C = null, Y = null;
|
|
5769
|
-
e.d == "e-resize" || e.d == "ne-resize" || e.d == "se-resize" ? (C = e.e.offsetWidth + (l - d.x),
|
|
5889
|
+
e.d == "e-resize" || e.d == "ne-resize" || e.d == "se-resize" ? (C = e.e.offsetWidth + (l - d.x), N.shiftKey && (Y = e.e.offsetHeight + (l - d.x) * (e.e.offsetHeight / e.e.offsetWidth))) : (e.d === "w-resize" || e.d == "nw-resize" || e.d == "sw-resize") && (T = e.e.offsetLeft + (l - d.x), C = e.e.offsetLeft + e.e.offsetWidth - T, N.shiftKey && (Y = e.e.offsetHeight - (l - d.x) * (e.e.offsetHeight / e.e.offsetWidth))), e.d == "s-resize" || e.d == "se-resize" || e.d == "sw-resize" ? Y || (Y = e.e.offsetHeight + (g - d.y)) : (e.d === "n-resize" || e.d == "ne-resize" || e.d == "nw-resize") && (R = e.e.offsetTop + (g - d.y), Y = e.e.offsetTop + e.e.offsetHeight - R), R && (e.e.style.top = R + "px"), T && (e.e.style.left = T + "px"), C && (e.e.style.width = C + "px"), Y && (e.e.style.height = Y + "px"), typeof e.e.refresh == "function" && (d.actioned = !0, e.e.refresh("dimensions", C, Y));
|
|
5770
5890
|
}
|
|
5771
5891
|
d.x = l, d.y = g;
|
|
5772
5892
|
} else {
|
|
5773
|
-
let l = h(
|
|
5893
|
+
let l = h(N), g = c.findElement(l, "jpanel");
|
|
5774
5894
|
if (g) {
|
|
5775
5895
|
if (g.classList.contains("jpanel-controls")) {
|
|
5776
5896
|
let T = l.getAttribute("data-position");
|
|
5777
5897
|
T ? g.style.cursor = T : g.style.cursor = "";
|
|
5778
5898
|
} else if (g.getAttribute("tabindex")) {
|
|
5779
5899
|
let T = g.getBoundingClientRect();
|
|
5780
|
-
|
|
5900
|
+
N.clientY - T.top < s ? T.width - (N.clientX - T.left) < s ? g.style.cursor = "ne-resize" : N.clientX - T.left < s ? g.style.cursor = "nw-resize" : g.style.cursor = "n-resize" : T.height - (N.clientY - T.top) < s ? T.width - (N.clientX - T.left) < s ? g.style.cursor = "se-resize" : N.clientX - T.left < s ? g.style.cursor = "sw-resize" : g.style.cursor = "s-resize" : T.width - (N.clientX - T.left) < s ? g.style.cursor = "e-resize" : N.clientX - T.left < s ? g.style.cursor = "w-resize" : g.style.cursor = "";
|
|
5781
5901
|
}
|
|
5782
5902
|
}
|
|
5783
5903
|
}
|
|
5784
5904
|
};
|
|
5785
5905
|
let f = ["n", "ne", "e", "se", "s", "sw", "w", "nw", "rotate"];
|
|
5786
|
-
f.forEach(function(
|
|
5787
|
-
f[z] = document.createElement("div"), f[z].classList.add("jpanel-action"),
|
|
5906
|
+
f.forEach(function(N, z) {
|
|
5907
|
+
f[z] = document.createElement("div"), f[z].classList.add("jpanel-action"), N === "rotate" ? f[z].setAttribute("data-action", "rotate") : (f[z].setAttribute("data-action", "resize"), f[z].setAttribute("data-position", N + "-resize"));
|
|
5788
5908
|
});
|
|
5789
5909
|
let A;
|
|
5790
|
-
const S = function(
|
|
5791
|
-
let z = h(
|
|
5910
|
+
const S = function(N) {
|
|
5911
|
+
let z = h(N), Z = c.findElement(z, "jpanel");
|
|
5792
5912
|
Z && !Z.classList.contains("readonly") && Z.classList.contains("jpanel-controls") ? (Z.append(...f), Z.classList.contains("jpanel-rotate") || f[f.length - 1].remove(), A = Z) : p();
|
|
5793
|
-
}, p = function(
|
|
5913
|
+
}, p = function(N) {
|
|
5794
5914
|
A && (f.forEach(function(z) {
|
|
5795
5915
|
z.remove();
|
|
5796
5916
|
}), A = null);
|
|
5797
|
-
}, u = function(
|
|
5798
|
-
var Z = h(
|
|
5917
|
+
}, u = function(N) {
|
|
5918
|
+
var Z = h(N).getAttribute("data-tooltip");
|
|
5799
5919
|
if (Z) {
|
|
5800
|
-
if (k.innerText = Z,
|
|
5801
|
-
var L =
|
|
5920
|
+
if (k.innerText = Z, N.changedTouches && N.changedTouches[0])
|
|
5921
|
+
var L = N.changedTouches[0].clientX, O = N.changedTouches[0].clientY;
|
|
5802
5922
|
else
|
|
5803
|
-
var L =
|
|
5923
|
+
var L = N.clientX, O = N.clientY;
|
|
5804
5924
|
k.style.top = O + "px", k.style.left = L + "px", document.body.appendChild(k);
|
|
5805
5925
|
} else k.innerText && (k.innerText = "", document.body.removeChild(k));
|
|
5806
|
-
}, w = function(
|
|
5926
|
+
}, w = function(N) {
|
|
5807
5927
|
var z = document.activeElement;
|
|
5808
5928
|
if (z && typeof z.contextmenu == "function")
|
|
5809
|
-
z.contextmenu(
|
|
5810
|
-
else if (z = c.findElement(
|
|
5929
|
+
z.contextmenu(N), N.preventDefault(), N.stopImmediatePropagation();
|
|
5930
|
+
else if (z = c.findElement(N.target, function(L) {
|
|
5811
5931
|
return L.tagName && L.getAttribute("aria-contextmenu-id");
|
|
5812
5932
|
}), z) {
|
|
5813
5933
|
var Z = document.querySelector("#" + z);
|
|
5814
|
-
Z ? (Z.contextmenu.open(
|
|
5934
|
+
Z ? (Z.contextmenu.open(N), N.preventDefault(), N.stopImmediatePropagation()) : console.error("JSUITES: contextmenu id not found: " + z);
|
|
5815
5935
|
}
|
|
5816
|
-
}, H = function(
|
|
5936
|
+
}, H = function(N) {
|
|
5817
5937
|
let z = document.activeElement;
|
|
5818
|
-
z &&
|
|
5938
|
+
z && N.key === "Delete" && typeof z.delete == "function" && (z.delete(), N.preventDefault(), N.stopImmediatePropagation());
|
|
5819
5939
|
let Z = window.jSuitesStateControl;
|
|
5820
|
-
Z && Z.length > 0 && (z = Z[Z.length - 1], z &&
|
|
5821
|
-
}, U = function(
|
|
5822
|
-
(
|
|
5940
|
+
Z && Z.length > 0 && (z = Z[Z.length - 1], z && N.key === "Escape" && typeof z.isOpened == "function" && typeof z.close == "function" && z.isOpened() && (z.close(), N.preventDefault(), N.stopImmediatePropagation()));
|
|
5941
|
+
}, U = function(N) {
|
|
5942
|
+
(N.target.getAttribute("data-mask") || N.target.mask) && c.mask(N);
|
|
5823
5943
|
};
|
|
5824
5944
|
document.addEventListener("focusin", S), document.addEventListener("mouseup", i), document.addEventListener("mousedown", n), document.addEventListener("mousemove", t), document.addEventListener("mouseover", u), document.addEventListener("keydown", H), document.addEventListener("contextmenu", w), document.addEventListener("input", U);
|
|
5825
5945
|
}();
|
|
@@ -5831,7 +5951,7 @@ function oi() {
|
|
|
5831
5951
|
}
|
|
5832
5952
|
var ai = Ot.exports, cn;
|
|
5833
5953
|
function li() {
|
|
5834
|
-
return cn || (cn = 1, (function(ce,
|
|
5954
|
+
return cn || (cn = 1, (function(ce, D) {
|
|
5835
5955
|
(function(W, se) {
|
|
5836
5956
|
ce.exports = se();
|
|
5837
5957
|
})(ai, (function() {
|
|
@@ -6278,7 +6398,7 @@ const ci = /* @__PURE__ */ ii(xn), di = /* @__PURE__ */ kn({
|
|
|
6278
6398
|
}, [xn]);
|
|
6279
6399
|
var Ht = { exports: {} }, ui = Ht.exports, dn;
|
|
6280
6400
|
function fi() {
|
|
6281
|
-
return dn || (dn = 1, (function(ce,
|
|
6401
|
+
return dn || (dn = 1, (function(ce, D) {
|
|
6282
6402
|
(function(W, se) {
|
|
6283
6403
|
ce.exports = se();
|
|
6284
6404
|
})(ui, (function() {
|
|
@@ -7657,11 +7777,11 @@ function fi() {
|
|
|
7657
7777
|
t = Math.abs(t);
|
|
7658
7778
|
let S = Math.floor(t), p = t - S;
|
|
7659
7779
|
if (p === 0) return [A * S, 1];
|
|
7660
|
-
let u = 1, w = 0, H = 0, U = 1,
|
|
7780
|
+
let u = 1, w = 0, H = 0, U = 1, N = p;
|
|
7661
7781
|
for (; H <= f; ) {
|
|
7662
|
-
let L = Math.floor(
|
|
7663
|
-
if (l > f || (w = u, u = O, U = H, H = l, Math.abs(
|
|
7664
|
-
|
|
7782
|
+
let L = Math.floor(N), O = L * u + w, l = L * H + U;
|
|
7783
|
+
if (l > f || (w = u, u = O, U = H, H = l, Math.abs(N - L) < 1e-10)) break;
|
|
7784
|
+
N = 1 / (N - L);
|
|
7665
7785
|
}
|
|
7666
7786
|
return [A * (a ? S * H + u : Math.round(t * H)), H];
|
|
7667
7787
|
}
|
|
@@ -7903,7 +8023,7 @@ function fi() {
|
|
|
7903
8023
|
}
|
|
7904
8024
|
const w = parseFloat(u);
|
|
7905
8025
|
if (isNaN(w)) return null;
|
|
7906
|
-
const H = a ? -w : w, U = u.indexOf("."),
|
|
8026
|
+
const H = a ? -w : w, U = u.indexOf("."), N = U !== -1 ? u.length - U - 1 : 0, z = N ? S + "0".repeat(N) : "", Z = "#" + p + "##0", L = e && !e.endsWith(" ") && !e.endsWith(" ") && !s;
|
|
7907
8027
|
let O = e + (L ? " " : "") + Z + z;
|
|
7908
8028
|
return s && (O = `(${O})`), {
|
|
7909
8029
|
mask: O,
|
|
@@ -11205,14 +11325,14 @@ function fi() {
|
|
|
11205
11325
|
return t;
|
|
11206
11326
|
}
|
|
11207
11327
|
if (o.data || (o.data = {}), o.type && (o.method = o.type), o.method || (o.method = "GET"), o.dataType || (o.dataType = "json"), o.data) {
|
|
11208
|
-
var A = function(U,
|
|
11328
|
+
var A = function(U, N) {
|
|
11209
11329
|
var z = [];
|
|
11210
11330
|
if (U) {
|
|
11211
11331
|
var Z = Object.keys(U);
|
|
11212
11332
|
if (Z.length)
|
|
11213
11333
|
for (var L = 0; L < Z.length; L++) {
|
|
11214
|
-
if (
|
|
11215
|
-
var O =
|
|
11334
|
+
if (N)
|
|
11335
|
+
var O = N + "[" + Z[L] + "]";
|
|
11216
11336
|
else
|
|
11217
11337
|
var O = Z[L];
|
|
11218
11338
|
if (U[O] instanceof FileList)
|
|
@@ -11273,10 +11393,10 @@ function fi() {
|
|
|
11273
11393
|
else
|
|
11274
11394
|
o.error && typeof o.error == "function" && o.error(H.responseText, H.status);
|
|
11275
11395
|
if (n.queue && n.queue.length > 0 && n.send(n.queue.shift()), n.requests && n.requests.length) {
|
|
11276
|
-
var
|
|
11277
|
-
if (n.requests.splice(
|
|
11278
|
-
var
|
|
11279
|
-
o.multiple.instance.splice(
|
|
11396
|
+
var N = n.requests.indexOf(H);
|
|
11397
|
+
if (n.requests.splice(N, 1), n.requests.length || o.complete && typeof o.complete == "function" && o.complete(U), o.group && n.oncomplete && typeof n.oncomplete[o.group] == "function" && (n.pending(o.group) || (n.oncomplete[o.group](), n.oncomplete[o.group] = null)), o.multiple && o.multiple.instance) {
|
|
11398
|
+
var N = o.multiple.instance.indexOf(H);
|
|
11399
|
+
o.multiple.instance.splice(N, 1), o.multiple.instance.length || o.multiple.complete && typeof o.multiple.complete == "function" && o.multiple.complete(U);
|
|
11280
11400
|
}
|
|
11281
11401
|
}
|
|
11282
11402
|
}, H.options = o, H.data = u, o.queue === !0 && n.requests.length > 0 ? n.queue.push(H) : n.send(H), H;
|
|
@@ -11510,7 +11630,7 @@ function fi() {
|
|
|
11510
11630
|
}, t.getDays = function() {
|
|
11511
11631
|
t.options.mode = "days";
|
|
11512
11632
|
var Ie = /* @__PURE__ */ new Date(), b = t.date && X.isNumeric(t.date[0]) ? t.date[0] : parseInt(Ie.getFullYear()), v = t.date && X.isNumeric(t.date[1]) ? t.date[1] : parseInt(Ie.getMonth()) + 1, m = t.date && X.isNumeric(t.date[2]) ? t.date[2] : parseInt(Ie.getDate()), I = t.date && X.isNumeric(t.date[3]) ? t.date[3] : parseInt(Ie.getHours()), Q = t.date && X.isNumeric(t.date[4]) ? t.date[4] : parseInt(Ie.getMinutes());
|
|
11513
|
-
t.date = [b, v, m, I, Q, 0],
|
|
11633
|
+
t.date = [b, v, m, I, Q, 0], N.innerHTML = b, z.innerHTML = t.options.months[v - 1];
|
|
11514
11634
|
var Te = Ie.getMonth() == v - 1 && Ie.getFullYear() == b, je = Ie.getDate(), Ie = new Date(b, v, 0, 0, 0), Pe = Ie.getDate(), Ie = new Date(b, v - 1, 0, 0, 0), K = Ie.getDay() + 1, it = t.options.startingDay || 0;
|
|
11515
11635
|
K = K - it, L.innerHTML = "";
|
|
11516
11636
|
var Le = document.createElement("tr");
|
|
@@ -11549,7 +11669,7 @@ function fi() {
|
|
|
11549
11669
|
var b = t.options.months;
|
|
11550
11670
|
t.options.value;
|
|
11551
11671
|
var v = /* @__PURE__ */ new Date(), m = parseInt(v.getFullYear()), I = parseInt(v.getMonth()) + 1, Q = t.date && X.isNumeric(t.date[0]) ? t.date[0] : m, Te = t.date && X.isNumeric(t.date[1]) ? t.date[1] : I;
|
|
11552
|
-
|
|
11672
|
+
N.innerHTML = t.date[0], z.innerHTML = b[Te - 1];
|
|
11553
11673
|
var je = document.createElement("table");
|
|
11554
11674
|
je.setAttribute("width", "100%");
|
|
11555
11675
|
for (var Pe = null, Ie = 0; Ie < 12; Ie++) {
|
|
@@ -11621,14 +11741,14 @@ function fi() {
|
|
|
11621
11741
|
}, S = function() {
|
|
11622
11742
|
var b = p.querySelector(".jcalendar-selected");
|
|
11623
11743
|
b && b.classList.contains("jcalendar-disabled") ? (R.setAttribute("disabled", "disabled"), T.setAttribute("disabled", "disabled"), C.setAttribute("disabled", "disabled")) : (R.removeAttribute("disabled"), T.removeAttribute("disabled"), C.removeAttribute("disabled")), typeof t.options.onupdate == "function" && t.options.onupdate(o, t.getValue());
|
|
11624
|
-
}, p = null, u = null, w = null, H = null, U = null,
|
|
11744
|
+
}, p = null, u = null, w = null, H = null, U = null, N = null, z = null, Z = null, L = null, O = null, l = null, g = null, R = null, T = null, C = null, Y = function() {
|
|
11625
11745
|
o.tagName == "INPUT" && o.value && (i.value = o.value), u = document.createElement("div"), u.className = "jcalendar-reset", w = document.createElement("div"), w.className = "jcalendar-confirm", O = document.createElement("div"), O.className = "jcalendar-controls", O.style.borderBottom = "1px solid #ddd", O.appendChild(u), O.appendChild(w), H = document.createElement("div"), H.className = "jcalendar-container", U = document.createElement("div"), U.className = "jcalendar-content", H.appendChild(U), o.tagName == "DIV" ? (p = o, p.classList.add("jcalendar-inline")) : (U.appendChild(O), p = document.createElement("div"), p.className = "jcalendar"), p.classList.add("jcalendar-container"), p.appendChild(H);
|
|
11626
11746
|
var b = document.createElement("div");
|
|
11627
11747
|
b.className = "jcalendar-table", U.appendChild(b);
|
|
11628
11748
|
var v = document.createElement("td");
|
|
11629
|
-
v.setAttribute("colspan", "2"), v.className = "jcalendar-prev",
|
|
11749
|
+
v.setAttribute("colspan", "2"), v.className = "jcalendar-prev", N = document.createElement("span"), N.className = "jcalendar-year", z = document.createElement("span"), z.className = "jcalendar-month";
|
|
11630
11750
|
var m = document.createElement("td");
|
|
11631
|
-
m.className = "jcalendar-header", m.setAttribute("colspan", "3"), m.appendChild(z), m.appendChild(
|
|
11751
|
+
m.className = "jcalendar-header", m.setAttribute("colspan", "3"), m.appendChild(z), m.appendChild(N);
|
|
11632
11752
|
var I = document.createElement("td");
|
|
11633
11753
|
I.setAttribute("colspan", "2"), I.className = "jcalendar-next";
|
|
11634
11754
|
var Q = document.createElement("thead"), Te = document.createElement("tr");
|
|
@@ -11927,7 +12047,7 @@ function fi() {
|
|
|
11927
12047
|
var U = i.options.data && i.options.data[H] ? i.options.data[H] : {};
|
|
11928
12048
|
n.children[1] && n.children[1].children[H] ? (U.titleElement = n.children[0].children[H], U.contentElement = n.children[1].children[H]) : U.contentElement = n.children[0].children[H], i.options.data[H] = U;
|
|
11929
12049
|
}
|
|
11930
|
-
var
|
|
12050
|
+
var N = !1;
|
|
11931
12051
|
if (i.options.data)
|
|
11932
12052
|
for (var H = 0; H < i.options.data.length; H++)
|
|
11933
12053
|
i.options.data[H].url && (ue({
|
|
@@ -11941,8 +12061,8 @@ function fi() {
|
|
|
11941
12061
|
complete: function() {
|
|
11942
12062
|
i.init();
|
|
11943
12063
|
}
|
|
11944
|
-
}),
|
|
11945
|
-
return
|
|
12064
|
+
}), N = !0);
|
|
12065
|
+
return N || i.init(), n.tabs = i, i;
|
|
11946
12066
|
}
|
|
11947
12067
|
function ze(n, o) {
|
|
11948
12068
|
if (n.color)
|
|
@@ -11999,10 +12119,10 @@ function fi() {
|
|
|
11999
12119
|
return I.length === 1 ? "0" + I : I;
|
|
12000
12120
|
}, U = function(m, I, Q) {
|
|
12001
12121
|
return "#" + H(m) + H(I) + H(Q);
|
|
12002
|
-
},
|
|
12122
|
+
}, N = function(m) {
|
|
12003
12123
|
return parseInt("0x" + m);
|
|
12004
12124
|
}, z = function(m) {
|
|
12005
|
-
return [
|
|
12125
|
+
return [N(m.substr(1, 2)), N(m.substr(3, 2)), N(m.substr(5, 2))];
|
|
12006
12126
|
}, Z = function() {
|
|
12007
12127
|
var m = document.createElement("div");
|
|
12008
12128
|
m.className = "jcolor-grid", i.values = [];
|
|
@@ -12164,13 +12284,13 @@ function fi() {
|
|
|
12164
12284
|
var H = u.clientX, U = u.clientY;
|
|
12165
12285
|
else
|
|
12166
12286
|
var H = u.x, U = u.y;
|
|
12167
|
-
var
|
|
12168
|
-
if (window.innerHeight < U +
|
|
12169
|
-
var z = U -
|
|
12287
|
+
var N = o.getBoundingClientRect();
|
|
12288
|
+
if (window.innerHeight < U + N.height) {
|
|
12289
|
+
var z = U - N.height;
|
|
12170
12290
|
z < 0 && (z = 0), o.style.top = z + "px";
|
|
12171
12291
|
} else
|
|
12172
12292
|
o.style.top = U + "px";
|
|
12173
|
-
window.innerWidth < H +
|
|
12293
|
+
window.innerWidth < H + N.width ? H - N.width > 0 ? o.style.left = H - N.width + "px" : o.style.left = "10px" : o.style.left = H + "px";
|
|
12174
12294
|
}
|
|
12175
12295
|
}, t.isOpened = function() {
|
|
12176
12296
|
return !!o.classList.contains("jcontextmenu-focus");
|
|
@@ -12215,18 +12335,18 @@ function fi() {
|
|
|
12215
12335
|
if (w.appendChild(H), u.submenu) {
|
|
12216
12336
|
var U = document.createElement("span");
|
|
12217
12337
|
U.innerHTML = "►", w.appendChild(U), w.classList.add("jcontexthassubmenu");
|
|
12218
|
-
var
|
|
12219
|
-
|
|
12338
|
+
var N = document.createElement("div");
|
|
12339
|
+
N.classList.add("jcontextmenu"), N.setAttribute("tabindex", "900");
|
|
12220
12340
|
for (var z = u.submenu, Z = 0; Z < z.length; Z++) {
|
|
12221
12341
|
var L = p(z[Z]);
|
|
12222
|
-
|
|
12342
|
+
N.appendChild(L);
|
|
12223
12343
|
}
|
|
12224
|
-
w.appendChild(
|
|
12225
|
-
|
|
12226
|
-
var g = w.getBoundingClientRect(), R =
|
|
12227
|
-
C > T && Y >= 0 ? (
|
|
12344
|
+
w.appendChild(N), w.addEventListener("mouseenter", function() {
|
|
12345
|
+
N.style.left = "", N.style.right = "", N.style.minWidth = w.offsetWidth + "px", N.style.display = "block", N.style.opacity = "0", N.style.pointerEvents = "none";
|
|
12346
|
+
var g = w.getBoundingClientRect(), R = N.getBoundingClientRect(), T = window.innerWidth || document.documentElement.clientWidth, C = g.right + R.width, Y = g.left - R.width;
|
|
12347
|
+
C > T && Y >= 0 ? (N.style.left = "auto", N.style.right = "99%") : C > T && Y < 0 ? (N.style.left = "32px", N.style.right = "auto", N.style.top = "100%") : (N.style.left = "99%", N.style.right = "auto"), N.style.opacity = "", N.style.pointerEvents = "", N.style.display = "";
|
|
12228
12348
|
}), w.addEventListener("mouseleave", function() {
|
|
12229
|
-
|
|
12349
|
+
N.style.left = "", N.style.right = "", N.style.minWidth = "";
|
|
12230
12350
|
});
|
|
12231
12351
|
} else if (u.shortcut) {
|
|
12232
12352
|
var O = document.createElement("span");
|
|
@@ -12326,7 +12446,7 @@ function fi() {
|
|
|
12326
12446
|
};
|
|
12327
12447
|
for (var I in m)
|
|
12328
12448
|
b && b.hasOwnProperty(I) ? t.options[I] = b[I] : (typeof t.options[I] > "u" || v === !0) && (t.options[I] = m[I]);
|
|
12329
|
-
return (t.options.remoteSearch == !0 || t.options.type === "searchbar") && (t.options.autocomplete = !0), t.options.newOptions == !0 ? t.header.classList.add("jdropdown-add") : t.header.classList.remove("jdropdown-add"), t.options.autocomplete == !0 ? t.header.removeAttribute("readonly") : t.header.setAttribute("readonly", "readonly"), t.options.placeholder ? t.header.setAttribute("placeholder", t.options.placeholder) : t.header.removeAttribute("placeholder"), o.classList.remove("jdropdown-searchbar"), o.classList.remove("jdropdown-picker"), o.classList.remove("jdropdown-list"), t.options.type == "searchbar" ? o.classList.add("jdropdown-searchbar") : t.options.type == "list" ? o.classList.add("jdropdown-list") : t.options.type == "picker" ? o.classList.add("jdropdown-picker") : X.getWindowWidth() < 800 ? t.options.autocomplete ? (o.classList.add("jdropdown-searchbar"), t.options.type = "searchbar") : (o.classList.add("jdropdown-picker"), t.options.type = "picker") : (t.options.width ? (o.style.width = t.options.width, o.style.minWidth = t.options.width) : (o.style.removeProperty("width"), o.style.removeProperty("min-width")), o.classList.add("jdropdown-default"), t.options.type = "default"), t.options.type == "searchbar" ?
|
|
12449
|
+
return (t.options.remoteSearch == !0 || t.options.type === "searchbar") && (t.options.autocomplete = !0), t.options.newOptions == !0 ? t.header.classList.add("jdropdown-add") : t.header.classList.remove("jdropdown-add"), t.options.autocomplete == !0 ? t.header.removeAttribute("readonly") : t.header.setAttribute("readonly", "readonly"), t.options.placeholder ? t.header.setAttribute("placeholder", t.options.placeholder) : t.header.removeAttribute("placeholder"), o.classList.remove("jdropdown-searchbar"), o.classList.remove("jdropdown-picker"), o.classList.remove("jdropdown-list"), t.options.type == "searchbar" ? o.classList.add("jdropdown-searchbar") : t.options.type == "list" ? o.classList.add("jdropdown-list") : t.options.type == "picker" ? o.classList.add("jdropdown-picker") : X.getWindowWidth() < 800 ? t.options.autocomplete ? (o.classList.add("jdropdown-searchbar"), t.options.type = "searchbar") : (o.classList.add("jdropdown-picker"), t.options.type = "picker") : (t.options.width ? (o.style.width = t.options.width, o.style.minWidth = t.options.width) : (o.style.removeProperty("width"), o.style.removeProperty("min-width")), o.classList.add("jdropdown-default"), t.options.type = "default"), t.options.type == "searchbar" ? N.appendChild(L) : z.insertBefore(L, z.firstChild), t.options.url && !b.data ? ue({
|
|
12330
12450
|
url: t.options.url,
|
|
12331
12451
|
method: "GET",
|
|
12332
12452
|
dataType: "json",
|
|
@@ -12335,12 +12455,12 @@ function fi() {
|
|
|
12335
12455
|
}
|
|
12336
12456
|
}) : f(t.options.data, t.options.value), t;
|
|
12337
12457
|
};
|
|
12338
|
-
var
|
|
12458
|
+
var N = null, z = null, Z = null, L = null, O = null, l = null, g = null, R = function() {
|
|
12339
12459
|
if (i || (i = {}), o.tagName == "SELECT") {
|
|
12340
12460
|
var b = n.extractFromDom(o, i);
|
|
12341
12461
|
o = b.el, i = b.options;
|
|
12342
12462
|
}
|
|
12343
|
-
!i.placeholder && o.getAttribute("placeholder") && (i.placeholder = o.getAttribute("placeholder")), t.value = {}, t.items = [], t.groups = [], t.search = "", t.results = null, o.classList.add("jdropdown"),
|
|
12463
|
+
!i.placeholder && o.getAttribute("placeholder") && (i.placeholder = o.getAttribute("placeholder")), t.value = {}, t.items = [], t.groups = [], t.search = "", t.results = null, o.classList.add("jdropdown"), N = document.createElement("div"), N.className = "jdropdown-container-header", t.header = document.createElement("input"), t.header.className = "jdropdown-header jss_object", t.header.type = "text", t.header.setAttribute("autocomplete", "off"), t.header.onfocus = function() {
|
|
12344
12464
|
typeof t.options.onfocus == "function" && t.options.onfocus(o);
|
|
12345
12465
|
}, t.header.onblur = function() {
|
|
12346
12466
|
typeof t.options.onblur == "function" && t.options.onblur(o);
|
|
@@ -12350,7 +12470,7 @@ function fi() {
|
|
|
12350
12470
|
}, 400)), o.classList.contains("jdropdown-focus") || t.open()) : t.options.autocomplete || t.next(v.key);
|
|
12351
12471
|
}, n.hasEvents || (n.hasEvents = !0, document.addEventListener("keydown", n.keydown)), z = document.createElement("div"), z.className = "jdropdown-container", Z = document.createElement("div"), Z.className = "jdropdown-content", L = document.createElement("div"), L.className = "jdropdown-close", L.textContent = "Done", O = document.createElement("div"), O.className = "jdropdown-reset", O.textContent = "x", O.onclick = function() {
|
|
12352
12472
|
t.reset(), t.close();
|
|
12353
|
-
}, l = document.createElement("div"), l.className = "jdropdown-backdrop",
|
|
12473
|
+
}, l = document.createElement("div"), l.className = "jdropdown-backdrop", N.appendChild(t.header), z.appendChild(Z), o.appendChild(N), o.appendChild(z), o.appendChild(l), t.setOptions(i), "ontouchsend" in document.documentElement ? o.addEventListener("touchsend", n.mouseup) : o.addEventListener("mouseup", n.mouseup), t.options.lazyLoading == !0 && te(Z, {
|
|
12354
12474
|
loadUp: t.loadUp,
|
|
12355
12475
|
loadDown: t.loadDown
|
|
12356
12476
|
}), Z.onwheel = function(v) {
|
|
@@ -12897,12 +13017,12 @@ function fi() {
|
|
|
12897
13017
|
toolbar.remove(), n.innerHTML = "";
|
|
12898
13018
|
}, i.update = function(w, H) {
|
|
12899
13019
|
for (var U = 0; U < u.children.length; U++) {
|
|
12900
|
-
var
|
|
12901
|
-
typeof
|
|
13020
|
+
var N = u.children[U];
|
|
13021
|
+
typeof N.updateState == "function" && N.updateState(n, i, N, w, H);
|
|
12902
13022
|
}
|
|
12903
13023
|
for (var U = 0; U < p.children.length; U++) {
|
|
12904
|
-
var
|
|
12905
|
-
typeof
|
|
13024
|
+
var N = p.children[U];
|
|
13025
|
+
typeof N.updateState == "function" && N.updateState(n, i, N, w, H);
|
|
12906
13026
|
}
|
|
12907
13027
|
}, i.create = function(w) {
|
|
12908
13028
|
u.innerHTML = "";
|
|
@@ -12915,13 +13035,13 @@ function fi() {
|
|
|
12915
13035
|
else if (w[H].type == "label")
|
|
12916
13036
|
U.classList.add("jtoolbar-label"), U.innerHTML = w[H].content;
|
|
12917
13037
|
else {
|
|
12918
|
-
var
|
|
13038
|
+
var N = document.createElement("i");
|
|
12919
13039
|
if (typeof w[H].class > "u")
|
|
12920
|
-
|
|
13040
|
+
N.classList.add("material-icons");
|
|
12921
13041
|
else
|
|
12922
13042
|
for (var z = w[H].class.split(" "), Z = 0; Z < z.length; Z++)
|
|
12923
|
-
|
|
12924
|
-
if (
|
|
13043
|
+
N.classList.add(z[Z]);
|
|
13044
|
+
if (N.innerHTML = w[H].content ? w[H].content : "", U.setAttribute("role", "button"), U.appendChild(N), i.options.badge == !0) {
|
|
12925
13045
|
var L = document.createElement("div");
|
|
12926
13046
|
L.classList.add("jbadge");
|
|
12927
13047
|
var O = document.createElement("div");
|
|
@@ -13205,7 +13325,7 @@ function fi() {
|
|
|
13205
13325
|
for (var U = 0; U < o.children.length; U++)
|
|
13206
13326
|
t.editor.appendChild(o.children[U]);
|
|
13207
13327
|
o.innerHTML = "";
|
|
13208
|
-
var
|
|
13328
|
+
var N = function(K) {
|
|
13209
13329
|
typeof t.options.onchange == "function" && t.options.onchange(o, t, K), t.options.value = t.getData(), o.value != t.options.value && (o.value = t.options.value, typeof o.oninput == "function" && o.oninput({
|
|
13210
13330
|
type: "input",
|
|
13211
13331
|
target: o,
|
|
@@ -13325,7 +13445,7 @@ function fi() {
|
|
|
13325
13445
|
file: lt.src,
|
|
13326
13446
|
extension: Re,
|
|
13327
13447
|
content: tt.toDataURL()
|
|
13328
|
-
}, t.options.dropAsSnippet || Le ? (L(lt), u[lt.src].snippet = !0) : document.execCommand("insertHtml", !1, lt.outerHTML),
|
|
13448
|
+
}, t.options.dropAsSnippet || Le ? (L(lt), u[lt.src].snippet = !0) : document.execCommand("insertHtml", !1, lt.outerHTML), N();
|
|
13329
13449
|
});
|
|
13330
13450
|
}, Ue.src = K;
|
|
13331
13451
|
}
|
|
@@ -13391,7 +13511,7 @@ function fi() {
|
|
|
13391
13511
|
tt.length ? t.addFile(tt) : it && z(Ue), o.classList.remove("jeditor-dragging"), K.preventDefault();
|
|
13392
13512
|
}
|
|
13393
13513
|
}, Y = function(K) {
|
|
13394
|
-
je("onevent", K),
|
|
13514
|
+
je("onevent", K), N(K), typeof t.options.onblur == "function" && t.options.onblur(o, t, K);
|
|
13395
13515
|
}, b = function(K) {
|
|
13396
13516
|
typeof t.options.onfocus == "function" && t.options.onfocus(o, t, K);
|
|
13397
13517
|
}, v = function(K) {
|
|
@@ -13690,8 +13810,8 @@ function fi() {
|
|
|
13690
13810
|
S = S.split("x");
|
|
13691
13811
|
for (var p = document.createElement("table"), u = document.createElement("tbody"), w = 0; w <= S[1]; w++) {
|
|
13692
13812
|
for (var H = document.createElement("tr"), U = 0; U <= S[0]; U++) {
|
|
13693
|
-
var
|
|
13694
|
-
|
|
13813
|
+
var N = document.createElement("td");
|
|
13814
|
+
N.innerHTML = "", H.appendChild(N);
|
|
13695
13815
|
}
|
|
13696
13816
|
u.appendChild(H);
|
|
13697
13817
|
}
|
|
@@ -13724,10 +13844,10 @@ function fi() {
|
|
|
13724
13844
|
var H = w.target.getBoundingClientRect();
|
|
13725
13845
|
if (w.target.classList.contains("jfloating")) {
|
|
13726
13846
|
if (w.changedTouches && w.changedTouches[0])
|
|
13727
|
-
var U = w.changedTouches[0].clientX,
|
|
13847
|
+
var U = w.changedTouches[0].clientX, N = w.changedTouches[0].clientY;
|
|
13728
13848
|
else
|
|
13729
|
-
var U = w.clientX,
|
|
13730
|
-
H.width - (U - H.left) < 50 &&
|
|
13849
|
+
var U = w.clientX, N = w.clientY;
|
|
13850
|
+
H.width - (U - H.left) < 50 && N - H.top < 50 ? setTimeout(function() {
|
|
13731
13851
|
t.close();
|
|
13732
13852
|
}, 100) : t.setState();
|
|
13733
13853
|
}
|
|
@@ -13871,8 +13991,8 @@ function fi() {
|
|
|
13871
13991
|
if (w !== "string" && w !== "number")
|
|
13872
13992
|
return !1;
|
|
13873
13993
|
let H;
|
|
13874
|
-
return typeof u.value[0] == "string" ? u.source ? H = u.source : H = u.value[0].split(",") : H = u.value[0], Array.isArray(H) ? H.findIndex(function(
|
|
13875
|
-
return
|
|
13994
|
+
return typeof u.value[0] == "string" ? u.source ? H = u.source : H = u.value[0].split(",") : H = u.value[0], Array.isArray(H) ? H.findIndex(function(N) {
|
|
13995
|
+
return N == p;
|
|
13876
13996
|
}) > -1 : !1;
|
|
13877
13997
|
};
|
|
13878
13998
|
const A = function() {
|
|
@@ -14110,10 +14230,10 @@ function fi() {
|
|
|
14110
14230
|
if (w) {
|
|
14111
14231
|
var H = w.getBoundingClientRect();
|
|
14112
14232
|
if (p.changedTouches && p.changedTouches[0])
|
|
14113
|
-
var U = p.changedTouches[0].clientX,
|
|
14233
|
+
var U = p.changedTouches[0].clientX, N = p.changedTouches[0].clientY;
|
|
14114
14234
|
else
|
|
14115
|
-
var U = p.clientX,
|
|
14116
|
-
H.width - (U - H.left) < 50 &&
|
|
14235
|
+
var U = p.clientX, N = p.clientY;
|
|
14236
|
+
H.width - (U - H.left) < 50 && N - H.top < 50 && w.parentNode.modal.close();
|
|
14117
14237
|
}
|
|
14118
14238
|
i && (i.element.style.cursor = "auto", i = null);
|
|
14119
14239
|
}, A = function(p) {
|
|
@@ -14122,10 +14242,10 @@ function fi() {
|
|
|
14122
14242
|
if (w) {
|
|
14123
14243
|
var H = w.getBoundingClientRect();
|
|
14124
14244
|
if (p.changedTouches && p.changedTouches[0])
|
|
14125
|
-
var U = p.changedTouches[0].clientX,
|
|
14245
|
+
var U = p.changedTouches[0].clientX, N = p.changedTouches[0].clientY;
|
|
14126
14246
|
else
|
|
14127
|
-
var U = p.clientX,
|
|
14128
|
-
H.width - (U - H.left) < 50 &&
|
|
14247
|
+
var U = p.clientX, N = p.clientY;
|
|
14248
|
+
H.width - (U - H.left) < 50 && N - H.top < 50 || N - H.top < 50 && (document.selection ? document.selection.empty() : window.getSelection && window.getSelection().removeAllRanges(), i = {
|
|
14129
14249
|
left: H.left,
|
|
14130
14250
|
top: H.top,
|
|
14131
14251
|
x: p.clientX,
|
|
@@ -14238,8 +14358,8 @@ function fi() {
|
|
|
14238
14358
|
i.hide();
|
|
14239
14359
|
}, p.appendChild(U);
|
|
14240
14360
|
}
|
|
14241
|
-
var
|
|
14242
|
-
|
|
14361
|
+
var N = document.createElement("div");
|
|
14362
|
+
N.className = "jnotification-date", p.appendChild(N);
|
|
14243
14363
|
var z = document.createElement("div");
|
|
14244
14364
|
if (z.className = "jnotification-content", S.appendChild(z), i.options.title) {
|
|
14245
14365
|
var Z = document.createElement("div");
|
|
@@ -14377,19 +14497,19 @@ function fi() {
|
|
|
14377
14497
|
n.style.display = "";
|
|
14378
14498
|
else {
|
|
14379
14499
|
n.style.display = "block";
|
|
14380
|
-
for (var U = w.length < 11 ? w.length : 10,
|
|
14381
|
-
if (typeof w[
|
|
14382
|
-
var z = w[
|
|
14500
|
+
for (var U = w.length < 11 ? w.length : 10, N = 0; N < U; N++) {
|
|
14501
|
+
if (typeof w[N] == "string")
|
|
14502
|
+
var z = w[N], Z = w[N];
|
|
14383
14503
|
else {
|
|
14384
|
-
var z = w[
|
|
14385
|
-
!z && w[
|
|
14386
|
-
var Z = w[
|
|
14387
|
-
!Z && w[
|
|
14504
|
+
var z = w[N].text;
|
|
14505
|
+
!z && w[N].name && (z = w[N].name);
|
|
14506
|
+
var Z = w[N].value;
|
|
14507
|
+
!Z && w[N].id && (Z = w[N].id);
|
|
14388
14508
|
}
|
|
14389
14509
|
var L = document.createElement("div");
|
|
14390
|
-
L.setAttribute("data-value", Z), L.setAttribute("data-text", z), L.className = "jsearch_item", w[
|
|
14510
|
+
L.setAttribute("data-value", Z), L.setAttribute("data-text", z), L.className = "jsearch_item", w[N].id && L.setAttribute("id", w[N].id), p.options.forceSelect && N == 0 && L.classList.add("selected");
|
|
14391
14511
|
var O = document.createElement("img");
|
|
14392
|
-
w[
|
|
14512
|
+
w[N].image ? O.src = w[N].image : O.style.display = "none", L.appendChild(O);
|
|
14393
14513
|
var l = document.createElement("div");
|
|
14394
14514
|
l.innerHTML = z, L.appendChild(l), u.appendChild(L);
|
|
14395
14515
|
}
|
|
@@ -14397,19 +14517,19 @@ function fi() {
|
|
|
14397
14517
|
}, A = function(w) {
|
|
14398
14518
|
if (w != p.terms)
|
|
14399
14519
|
if (p.terms = w, p.options.forceSelect ? i = 0 : i = null, Array.isArray(p.options.data)) {
|
|
14400
|
-
var H = function(
|
|
14401
|
-
if (typeof
|
|
14402
|
-
if (("" +
|
|
14520
|
+
var H = function(N) {
|
|
14521
|
+
if (typeof N == "string") {
|
|
14522
|
+
if (("" + N).toLowerCase().search(w.toLowerCase()) >= 0)
|
|
14403
14523
|
return !0;
|
|
14404
14524
|
} else
|
|
14405
|
-
for (var z in
|
|
14406
|
-
var Z =
|
|
14525
|
+
for (var z in N) {
|
|
14526
|
+
var Z = N[z];
|
|
14407
14527
|
if (("" + Z).toLowerCase().search(w.toLowerCase()) >= 0)
|
|
14408
14528
|
return !0;
|
|
14409
14529
|
}
|
|
14410
14530
|
return !1;
|
|
14411
|
-
}, U = p.options.data.filter(function(
|
|
14412
|
-
return H(
|
|
14531
|
+
}, U = p.options.data.filter(function(N) {
|
|
14532
|
+
return H(N);
|
|
14413
14533
|
});
|
|
14414
14534
|
f(U);
|
|
14415
14535
|
} else
|
|
@@ -14417,8 +14537,8 @@ function fi() {
|
|
|
14417
14537
|
url: p.options.data + w,
|
|
14418
14538
|
method: "GET",
|
|
14419
14539
|
dataType: "json",
|
|
14420
|
-
success: function(
|
|
14421
|
-
f(
|
|
14540
|
+
success: function(N) {
|
|
14541
|
+
f(N);
|
|
14422
14542
|
}
|
|
14423
14543
|
});
|
|
14424
14544
|
}, S = null, p = function(w) {
|
|
@@ -14435,8 +14555,8 @@ function fi() {
|
|
|
14435
14555
|
onsearch: o.onsearch || null,
|
|
14436
14556
|
onbeforesearch: o.onbeforesearch || null
|
|
14437
14557
|
}, p.selectIndex = function(w) {
|
|
14438
|
-
var H = w.getAttribute("id"), U = w.getAttribute("data-text"),
|
|
14439
|
-
typeof p.options.onselect == "function" && p.options.onselect(p, U,
|
|
14558
|
+
var H = w.getAttribute("id"), U = w.getAttribute("data-text"), N = w.getAttribute("data-value"), z = w.children[0].src || "";
|
|
14559
|
+
typeof p.options.onselect == "function" && p.options.onselect(p, U, N, H, z), p.close();
|
|
14440
14560
|
}, p.open = function() {
|
|
14441
14561
|
n.style.display = "block";
|
|
14442
14562
|
}, p.close = function() {
|
|
@@ -14457,10 +14577,10 @@ function fi() {
|
|
|
14457
14577
|
var H = U.innerText;
|
|
14458
14578
|
}
|
|
14459
14579
|
if (typeof p.options.onbeforesearch == "function") {
|
|
14460
|
-
var
|
|
14461
|
-
if (
|
|
14462
|
-
H =
|
|
14463
|
-
else if (
|
|
14580
|
+
var N = p.options.onbeforesearch(p, H);
|
|
14581
|
+
if (N)
|
|
14582
|
+
H = N;
|
|
14583
|
+
else if (N === !1)
|
|
14464
14584
|
return;
|
|
14465
14585
|
}
|
|
14466
14586
|
p(H);
|
|
@@ -14496,9 +14616,9 @@ function fi() {
|
|
|
14496
14616
|
}, u.appendChild(p), u.appendChild(w);
|
|
14497
14617
|
}
|
|
14498
14618
|
i.updateCounter = function(U) {
|
|
14499
|
-
for (var
|
|
14500
|
-
if (f.children[
|
|
14501
|
-
f.children[
|
|
14619
|
+
for (var N = 0; N < f.children.length; N++)
|
|
14620
|
+
if (f.children[N].classList.contains("jslider-counter-focus")) {
|
|
14621
|
+
f.children[N].classList.remove("jslider-counter-focus");
|
|
14502
14622
|
break;
|
|
14503
14623
|
}
|
|
14504
14624
|
f.children[U].classList.add("jslider-counter-focus");
|
|
@@ -14506,8 +14626,8 @@ function fi() {
|
|
|
14506
14626
|
if (!U)
|
|
14507
14627
|
var U = n.children[0];
|
|
14508
14628
|
n.classList.add("jslider-focus"), n.classList.remove("jslider-grid"), n.appendChild(u), n.appendChild(f);
|
|
14509
|
-
var
|
|
14510
|
-
i.updateCounter(
|
|
14629
|
+
var N = i.options.items.indexOf(U);
|
|
14630
|
+
i.updateCounter(N);
|
|
14511
14631
|
for (var z = 0; z < n.children.length; z++)
|
|
14512
14632
|
n.children[z].style.display = "";
|
|
14513
14633
|
U.style.display = "block", U.previousElementSibling ? n.classList.add("jslider-left") : n.classList.remove("jslider-left"), U.nextElementSibling && U.nextElementSibling.tagName == "IMG" ? n.classList.add("jslider-right") : n.classList.remove("jslider-right"), i.currentImage = U, i.currentImage.offsetHeight > i.currentImage.offsetWidth && i.currentImage.classList.add("jslider-vertical"), u.children[0].innerText = i.currentImage.getAttribute("title");
|
|
@@ -14530,8 +14650,8 @@ function fi() {
|
|
|
14530
14650
|
if (U.target.tagName == "IMG")
|
|
14531
14651
|
i.show(U.target);
|
|
14532
14652
|
else if (!U.target.classList.contains("jslider-close") && !(U.target.parentNode.classList.contains("jslider-counter") || U.target.classList.contains("jslider-counter"))) {
|
|
14533
|
-
var
|
|
14534
|
-
U.target.clientWidth -
|
|
14653
|
+
var N = U.offsetX || U.changedTouches[0].clientX;
|
|
14654
|
+
U.target.clientWidth - N < 40 ? i.next() : N < 40 && i.prev();
|
|
14535
14655
|
}
|
|
14536
14656
|
};
|
|
14537
14657
|
return "ontouchend" in document.documentElement ? n.addEventListener("touchend", H) : n.addEventListener("mouseup", H), n.addEventListener("swipeleft", function(U) {
|
|
@@ -14683,8 +14803,8 @@ function fi() {
|
|
|
14683
14803
|
Y && C.push(Y);
|
|
14684
14804
|
}
|
|
14685
14805
|
return C;
|
|
14686
|
-
},
|
|
14687
|
-
if (
|
|
14806
|
+
}, N = 0, z = function(T) {
|
|
14807
|
+
if (N = window.getSelection().anchorOffset, H(), T.key === "Tab" || T.key === ";" || T.key === ",") {
|
|
14688
14808
|
var C = window.getSelection().anchorOffset;
|
|
14689
14809
|
C > 1 && (t() ? typeof i.options.onlimit == "function" && i.options.onlimit(i, i.options.limit) : i.add("", !0)), T.preventDefault();
|
|
14690
14810
|
} else if (T.key == "Enter") {
|
|
@@ -14697,7 +14817,7 @@ function fi() {
|
|
|
14697
14817
|
}, Z = function(T) {
|
|
14698
14818
|
if (T.which == 39) {
|
|
14699
14819
|
var C = window.getSelection().anchorOffset;
|
|
14700
|
-
C > 1 && C ==
|
|
14820
|
+
C > 1 && C == N && i.add("", !0);
|
|
14701
14821
|
} else T.which == 13 || T.which == 38 || T.which == 40 ? T.preventDefault() : f && f.keyup(T);
|
|
14702
14822
|
w();
|
|
14703
14823
|
}, L = function(T) {
|
|
@@ -14773,7 +14893,7 @@ function fi() {
|
|
|
14773
14893
|
if (w[0] == i.options.type) {
|
|
14774
14894
|
var H = new FileReader();
|
|
14775
14895
|
H.addEventListener("load", function(U) {
|
|
14776
|
-
var
|
|
14896
|
+
var N = {
|
|
14777
14897
|
file: U.srcElement.result,
|
|
14778
14898
|
extension: u.name.substr(u.name.lastIndexOf(".") + 1),
|
|
14779
14899
|
name: u.name,
|
|
@@ -14781,7 +14901,7 @@ function fi() {
|
|
|
14781
14901
|
lastmodified: u.lastModified,
|
|
14782
14902
|
content: U.srcElement.result
|
|
14783
14903
|
};
|
|
14784
|
-
i.add(
|
|
14904
|
+
i.add(N);
|
|
14785
14905
|
}), H.readAsDataURL(u);
|
|
14786
14906
|
} else
|
|
14787
14907
|
alert(M.translate("This extension is not allowed"));
|
|
@@ -14844,10 +14964,10 @@ function fi() {
|
|
|
14844
14964
|
i.addFromFile(u.dataTransfer.files[U]);
|
|
14845
14965
|
else if (w) {
|
|
14846
14966
|
i.options.multiple == !1 && (n.innerText = "");
|
|
14847
|
-
let
|
|
14848
|
-
if (ke(w,
|
|
14849
|
-
for (var U = 0; U <
|
|
14850
|
-
i.addFromUrl(
|
|
14967
|
+
let N = [];
|
|
14968
|
+
if (ke(w, N), N.length)
|
|
14969
|
+
for (var U = 0; U < N.length; U++)
|
|
14970
|
+
i.addFromUrl(N[U]);
|
|
14851
14971
|
}
|
|
14852
14972
|
return n.style.border = "1px solid #eee", !1;
|
|
14853
14973
|
}), n.val = function(u) {
|
|
@@ -14993,16 +15113,16 @@ function fi() {
|
|
|
14993
15113
|
}
|
|
14994
15114
|
}
|
|
14995
15115
|
};
|
|
14996
|
-
let
|
|
14997
|
-
|
|
14998
|
-
|
|
15116
|
+
let N = ["n", "ne", "e", "se", "s", "sw", "w", "nw", "rotate"];
|
|
15117
|
+
N.forEach(function(T, C) {
|
|
15118
|
+
N[C] = document.createElement("div"), N[C].classList.add("jpanel-action"), T === "rotate" ? N[C].setAttribute("data-action", "rotate") : (N[C].setAttribute("data-action", "resize"), N[C].setAttribute("data-position", T + "-resize"));
|
|
14999
15119
|
});
|
|
15000
15120
|
let z;
|
|
15001
15121
|
const Z = function(T) {
|
|
15002
15122
|
let C = p(T), Y = k.findElement(C, "jpanel");
|
|
15003
|
-
Y && !Y.classList.contains("readonly") && Y.classList.contains("jpanel-controls") ? (Y.append(...
|
|
15123
|
+
Y && !Y.classList.contains("readonly") && Y.classList.contains("jpanel-controls") ? (Y.append(...N), Y.classList.contains("jpanel-rotate") || N[N.length - 1].remove(), z = Y) : L();
|
|
15004
15124
|
}, L = function(T) {
|
|
15005
|
-
z && (
|
|
15125
|
+
z && (N.forEach(function(C) {
|
|
15006
15126
|
C.remove();
|
|
15007
15127
|
}), z = null);
|
|
15008
15128
|
}, O = function(T) {
|
|
@@ -15062,26 +15182,26 @@ const pi = (ce = {}) => ({
|
|
|
15062
15182
|
}, gi = (ce) => new AmazonCognitoIdentity.CognitoUserPool({
|
|
15063
15183
|
UserPoolId: ce.userPoolId,
|
|
15064
15184
|
ClientId: ce.clientId
|
|
15065
|
-
}), mi = (ce,
|
|
15185
|
+
}), mi = (ce, D) => new AmazonCognitoIdentity.CognitoUser({
|
|
15066
15186
|
Username: ce.toLowerCase().trim(),
|
|
15067
|
-
Pool:
|
|
15187
|
+
Pool: D
|
|
15068
15188
|
}), vi = (ce) => ({
|
|
15069
15189
|
idToken: ce.getIdToken().getJwtToken(),
|
|
15070
15190
|
accessToken: ce.getAccessToken().getJwtToken(),
|
|
15071
15191
|
refreshToken: ce.getRefreshToken().getToken()
|
|
15072
15192
|
}), yi = () => ({
|
|
15073
15193
|
get: (ce) => localStorage.getItem(ce),
|
|
15074
|
-
set: (ce,
|
|
15194
|
+
set: (ce, D) => localStorage.setItem(ce, D),
|
|
15075
15195
|
remove: (ce) => localStorage.removeItem(ce),
|
|
15076
15196
|
clear: () => Object.values(pt).forEach((ce) => localStorage.removeItem(ce))
|
|
15077
|
-
}), bi = (ce,
|
|
15078
|
-
ce.set(pt.idToken,
|
|
15079
|
-
const se = W(
|
|
15197
|
+
}), bi = (ce, D, W) => {
|
|
15198
|
+
ce.set(pt.idToken, D.idToken), ce.set(pt.accessToken, D.accessToken), ce.set(pt.refreshToken, D.refreshToken);
|
|
15199
|
+
const se = W(D.idToken), me = se?.exp ? (se.exp * 1e3).toString() : (Date.now() + 3600 * 1e3).toString();
|
|
15080
15200
|
ce.set(pt.idTokenExpiry, me), ce.set(pt.userEmail, se?.email || ""), ce.set(pt.userId, se?.sub || "");
|
|
15081
|
-
}, wi = async (ce,
|
|
15082
|
-
const $e =
|
|
15201
|
+
}, wi = async (ce, D, W, se, me, Me, Ye) => {
|
|
15202
|
+
const $e = D.get(pt.refreshToken);
|
|
15083
15203
|
if (!$e) return null;
|
|
15084
|
-
const ge =
|
|
15204
|
+
const ge = D.get(pt.userEmail);
|
|
15085
15205
|
if (!ge) return null;
|
|
15086
15206
|
const M = W(ce), de = se(ge, M), ee = new AmazonCognitoIdentity.CognitoRefreshToken({
|
|
15087
15207
|
RefreshToken: $e
|
|
@@ -15089,9 +15209,9 @@ const pi = (ce = {}) => ({
|
|
|
15089
15209
|
return new Promise((Ce) => {
|
|
15090
15210
|
de.refreshSession(ee, (X, He) => {
|
|
15091
15211
|
if (X)
|
|
15092
|
-
return
|
|
15212
|
+
return D.clear(), Ce(null);
|
|
15093
15213
|
const we = me(He);
|
|
15094
|
-
Me(
|
|
15214
|
+
Me(D, we, Ye), Ce(we.accessToken);
|
|
15095
15215
|
});
|
|
15096
15216
|
});
|
|
15097
15217
|
};
|
|
@@ -15100,10 +15220,10 @@ function Ln() {
|
|
|
15100
15220
|
return zt || (zt = pi(window.authConfig || {}), un = yi()), { config: zt, storage: un };
|
|
15101
15221
|
}
|
|
15102
15222
|
async function xi() {
|
|
15103
|
-
const { config: ce, storage:
|
|
15223
|
+
const { config: ce, storage: D } = Ln();
|
|
15104
15224
|
return wi(
|
|
15105
15225
|
ce,
|
|
15106
|
-
|
|
15226
|
+
D,
|
|
15107
15227
|
gi,
|
|
15108
15228
|
mi,
|
|
15109
15229
|
vi,
|
|
@@ -15113,29 +15233,29 @@ async function xi() {
|
|
|
15113
15233
|
}
|
|
15114
15234
|
const { crypto: Li } = globalThis, Ci = 14e11, Cn = 4, Xt = 16, Ei = Cn + Xt, Ti = 27, ji = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", fn = 62n;
|
|
15115
15235
|
function Ai(ce) {
|
|
15116
|
-
let
|
|
15117
|
-
for (const se of ce)
|
|
15236
|
+
let D = 0n;
|
|
15237
|
+
for (const se of ce) D = (D << 8n) + BigInt(se);
|
|
15118
15238
|
let W = "";
|
|
15119
|
-
for (;
|
|
15120
|
-
W = ji[
|
|
15239
|
+
for (; D > 0n; )
|
|
15240
|
+
W = ji[D % fn] + W, D /= fn;
|
|
15121
15241
|
return W.padStart(Ti, "0");
|
|
15122
15242
|
}
|
|
15123
15243
|
function ki() {
|
|
15124
15244
|
const ce = new Uint8Array(Xt);
|
|
15125
15245
|
return Li.getRandomValues(ce), ce;
|
|
15126
15246
|
}
|
|
15127
|
-
function Di({ timestamp: ce = Date.now(), payload:
|
|
15247
|
+
function Di({ timestamp: ce = Date.now(), payload: D } = {}) {
|
|
15128
15248
|
const W = ce instanceof Date ? ce.getTime() : Number(ce), se = Math.floor((W - Ci) / 1e3);
|
|
15129
15249
|
if (se < 0 || se > 4294967295)
|
|
15130
15250
|
throw new RangeError("Timestamp out of KSUID 32-bit range");
|
|
15131
15251
|
const me = new Uint8Array(Ei);
|
|
15132
15252
|
me[0] = se >>> 24 & 255, me[1] = se >>> 16 & 255, me[2] = se >>> 8 & 255, me[3] = se & 255;
|
|
15133
|
-
const Me =
|
|
15253
|
+
const Me = D || ki();
|
|
15134
15254
|
if (!(Me instanceof Uint8Array) || Me.length !== Xt)
|
|
15135
15255
|
throw new TypeError("Payload must be a 16-byte Uint8Array");
|
|
15136
15256
|
return me.set(Me, Cn), Ai(me);
|
|
15137
15257
|
}
|
|
15138
|
-
const Ct = (ce, ...
|
|
15258
|
+
const Ct = (ce, ...D) => (...W) => ce(...D, ...W);
|
|
15139
15259
|
function Ni(ce) {
|
|
15140
15260
|
return {
|
|
15141
15261
|
// Underlying mechanism to use the REST URLs directly.
|
|
@@ -15149,21 +15269,21 @@ function Ni(ce) {
|
|
|
15149
15269
|
function Mi(ce) {
|
|
15150
15270
|
return Mt(ce, "/user");
|
|
15151
15271
|
}
|
|
15152
|
-
function Si(ce,
|
|
15153
|
-
return Mt(ce, `/user/${
|
|
15272
|
+
function Si(ce, D) {
|
|
15273
|
+
return Mt(ce, `/user/${D}`);
|
|
15154
15274
|
}
|
|
15155
|
-
function Oi(ce, { factName:
|
|
15275
|
+
function Oi(ce, { factName: D, nonce: W, value: se }) {
|
|
15156
15276
|
return Mt(
|
|
15157
15277
|
ce,
|
|
15158
|
-
`/user/${
|
|
15278
|
+
`/user/${D}/${encodeURIComponent(W || Di())}`,
|
|
15159
15279
|
{
|
|
15160
15280
|
method: "PUT",
|
|
15161
15281
|
body: { value: se }
|
|
15162
15282
|
}
|
|
15163
15283
|
);
|
|
15164
15284
|
}
|
|
15165
|
-
function Ii(ce, { factName:
|
|
15166
|
-
const se = ["user",
|
|
15285
|
+
function Ii(ce, { factName: D, nonce: W }) {
|
|
15286
|
+
const se = ["user", D, W].filter(Boolean).join("/");
|
|
15167
15287
|
return Mt(
|
|
15168
15288
|
ce,
|
|
15169
15289
|
`/${se}`,
|
|
@@ -15172,8 +15292,8 @@ function Ii(ce, { factName: N, nonce: W }) {
|
|
|
15172
15292
|
}
|
|
15173
15293
|
);
|
|
15174
15294
|
}
|
|
15175
|
-
async function Mt(ce,
|
|
15176
|
-
const se = ce.baseUrl.endsWith("/") ? ce.baseUrl : `${ce.baseUrl}/`, me =
|
|
15295
|
+
async function Mt(ce, D, W) {
|
|
15296
|
+
const se = ce.baseUrl.endsWith("/") ? ce.baseUrl : `${ce.baseUrl}/`, me = D.startsWith("/") ? D.substring(1) : D, Me = new URL(me, se), Ye = {
|
|
15177
15297
|
"Content-Type": "application/json"
|
|
15178
15298
|
};
|
|
15179
15299
|
ce.apiKey && (Ye.Authorization = `Bearer ${ce.apiKey}`);
|
|
@@ -15198,35 +15318,35 @@ function Tn() {
|
|
|
15198
15318
|
try {
|
|
15199
15319
|
const ce = localStorage.getItem(Vt);
|
|
15200
15320
|
if (!ce) return null;
|
|
15201
|
-
const
|
|
15202
|
-
return W > En ? (localStorage.removeItem(Vt), null) : (console.log("[user-facts:persist] Loaded from localStorage (age:", Math.round(W / 6e4), "minutes)"),
|
|
15321
|
+
const D = JSON.parse(ce), W = Date.now() - D.timestamp;
|
|
15322
|
+
return W > En ? (localStorage.removeItem(Vt), null) : (console.log("[user-facts:persist] Loaded from localStorage (age:", Math.round(W / 6e4), "minutes)"), D.data);
|
|
15203
15323
|
} catch (ce) {
|
|
15204
15324
|
return console.warn("[user-facts:persist] Failed to load from storage:", ce), null;
|
|
15205
15325
|
}
|
|
15206
15326
|
}
|
|
15207
15327
|
function jn(ce) {
|
|
15208
15328
|
try {
|
|
15209
|
-
const
|
|
15329
|
+
const D = {
|
|
15210
15330
|
timestamp: Date.now(),
|
|
15211
15331
|
data: ce
|
|
15212
15332
|
};
|
|
15213
|
-
localStorage.setItem(Vt, JSON.stringify(
|
|
15214
|
-
} catch (
|
|
15215
|
-
console.warn("[user-facts:persist] Failed to save:",
|
|
15333
|
+
localStorage.setItem(Vt, JSON.stringify(D)), console.log("[user-facts:persist] Saved to localStorage");
|
|
15334
|
+
} catch (D) {
|
|
15335
|
+
console.warn("[user-facts:persist] Failed to save:", D);
|
|
15216
15336
|
}
|
|
15217
15337
|
}
|
|
15218
15338
|
let mt = null, ut = Tn(), jt = ut ? Date.now() : 0;
|
|
15219
15339
|
async function pn() {
|
|
15220
15340
|
const { storage: ce } = Ln();
|
|
15221
|
-
let
|
|
15222
|
-
if (!
|
|
15341
|
+
let D = ce.get("wral_id_token");
|
|
15342
|
+
if (!D && (console.log("[user-facts:auth] No id token → forcing refresh"), await xi(), D = ce.get("wral_id_token"), !D))
|
|
15223
15343
|
throw new Error("Failed to obtain id token");
|
|
15224
|
-
return console.log("[user-facts:auth] Got id token (length:",
|
|
15344
|
+
return console.log("[user-facts:auth] Got id token (length:", D.length, ")"), D;
|
|
15225
15345
|
}
|
|
15226
15346
|
async function An() {
|
|
15227
15347
|
if (mt) {
|
|
15228
|
-
const
|
|
15229
|
-
if (mt._currentToken !==
|
|
15348
|
+
const D = await pn();
|
|
15349
|
+
if (mt._currentToken !== D)
|
|
15230
15350
|
console.log("[user-facts] Token changed → recreating client"), mt = null;
|
|
15231
15351
|
else
|
|
15232
15352
|
return mt;
|
|
@@ -15240,8 +15360,8 @@ async function An() {
|
|
|
15240
15360
|
async function Ri() {
|
|
15241
15361
|
console.group("[user-facts:fetch] Starting fresh fetch");
|
|
15242
15362
|
try {
|
|
15243
|
-
const
|
|
15244
|
-
return console.log("[user-facts:fetch] Success"), ut =
|
|
15363
|
+
const D = await (await An()).listUserFacts();
|
|
15364
|
+
return console.log("[user-facts:fetch] Success"), ut = D, jt = Date.now(), jn(D), ut;
|
|
15245
15365
|
} catch (ce) {
|
|
15246
15366
|
return console.error("[user-facts:fetch] Failed:", ce.message), null;
|
|
15247
15367
|
} finally {
|
|
@@ -15249,10 +15369,10 @@ async function Ri() {
|
|
|
15249
15369
|
}
|
|
15250
15370
|
}
|
|
15251
15371
|
async function $i(ce = !1) {
|
|
15252
|
-
const
|
|
15253
|
-
if (!ce && ut &&
|
|
15372
|
+
const D = Date.now();
|
|
15373
|
+
if (!ce && ut && D - jt < _i)
|
|
15254
15374
|
return console.log("[user-facts] Memory cache hit"), ut;
|
|
15255
|
-
if (!ut &&
|
|
15375
|
+
if (!ut && D - jt < En) {
|
|
15256
15376
|
const W = Tn();
|
|
15257
15377
|
if (W)
|
|
15258
15378
|
return ut = W, jt = Date.now() - 1e4, console.log("[user-facts] Using persisted fallback data"), W;
|
|
@@ -15262,18 +15382,18 @@ async function $i(ce = !1) {
|
|
|
15262
15382
|
async function Pi(ce) {
|
|
15263
15383
|
return (await $i())?.facts?.[ce];
|
|
15264
15384
|
}
|
|
15265
|
-
async function zi(ce,
|
|
15385
|
+
async function zi(ce, D, W) {
|
|
15266
15386
|
const se = await An();
|
|
15267
15387
|
console.log(`[user-facts:update] Updating ${ce}`);
|
|
15268
15388
|
try {
|
|
15269
|
-
if (await se.putUserFact({ factName: ce, nonce: W, value:
|
|
15389
|
+
if (await se.putUserFact({ factName: ce, nonce: W, value: D }), ut?.facts) {
|
|
15270
15390
|
if (Array.isArray(ut.facts[ce].items)) {
|
|
15271
15391
|
const me = ut.facts[ce].items.findIndex((Me) => Me.nonce === W);
|
|
15272
|
-
me !== -1 ? ut.facts[ce].items[me].value =
|
|
15392
|
+
me !== -1 ? ut.facts[ce].items[me].value = D : ut.facts[ce].items.push({ nonce: W, value: D });
|
|
15273
15393
|
} else
|
|
15274
15394
|
ut.facts = {
|
|
15275
15395
|
...ut.facts,
|
|
15276
|
-
[ce]: { item: { value:
|
|
15396
|
+
[ce]: { item: { value: D } }
|
|
15277
15397
|
};
|
|
15278
15398
|
jt = Date.now();
|
|
15279
15399
|
}
|
|
@@ -15318,7 +15438,7 @@ class Ui extends Tt {
|
|
|
15318
15438
|
this._initialized = !1;
|
|
15319
15439
|
}
|
|
15320
15440
|
render() {
|
|
15321
|
-
const [
|
|
15441
|
+
const [D, W] = this.area, se = !!this.exportDataUrl;
|
|
15322
15442
|
return ft`
|
|
15323
15443
|
<input
|
|
15324
15444
|
id="file"
|
|
@@ -15331,8 +15451,8 @@ class Ui extends Tt {
|
|
|
15331
15451
|
<div class="layout">
|
|
15332
15452
|
<div class="cropper" style="${se ? "display: none" : ""}">
|
|
15333
15453
|
<div id="image-cropper"
|
|
15334
|
-
dimensions="${
|
|
15335
|
-
style="--cropper-size:${
|
|
15454
|
+
dimensions="${D}x${W}"
|
|
15455
|
+
style="--cropper-size:${D}px"
|
|
15336
15456
|
>
|
|
15337
15457
|
${this._lastFile ? null : this.renderPlaceholder()}
|
|
15338
15458
|
</div>
|
|
@@ -15357,35 +15477,41 @@ class Ui extends Tt {
|
|
|
15357
15477
|
|
|
15358
15478
|
<div class="controls" style="${se ? "display: none" : ""}">
|
|
15359
15479
|
${this.allowRotate ? ft`
|
|
15360
|
-
|
|
15361
|
-
|
|
15362
|
-
|
|
15363
|
-
|
|
15364
|
-
|
|
15365
|
-
|
|
15366
|
-
|
|
15367
|
-
|
|
15368
|
-
|
|
15369
|
-
|
|
15370
|
-
|
|
15371
|
-
|
|
15480
|
+
<div class="rotate-controls">
|
|
15481
|
+
<button
|
|
15482
|
+
class="rotate"
|
|
15483
|
+
?disabled=${this.busy || !this._lastFile}
|
|
15484
|
+
@click=${() => this._rotate(90)}>
|
|
15485
|
+
${Qn} Rotate
|
|
15486
|
+
</button>
|
|
15487
|
+
<button
|
|
15488
|
+
class="rotate"
|
|
15489
|
+
?disabled=${this.busy || !this._lastFile}
|
|
15490
|
+
@click=${() => this._rotate(-90)}>
|
|
15491
|
+
Rotate ${ei}
|
|
15492
|
+
</button>
|
|
15493
|
+
</div>` : null}
|
|
15372
15494
|
${this.allowZoom ? ft`
|
|
15495
|
+
<div class="zoom-controls">
|
|
15373
15496
|
${ti}
|
|
15374
|
-
<input type="range"
|
|
15497
|
+
<input class="zoom" type="range"
|
|
15375
15498
|
step=".05" min="0.1" max="5" value="1" id="zoom"
|
|
15376
15499
|
.value=${this.zoom}
|
|
15377
15500
|
?disabled=${this.busy || !this._lastFile}
|
|
15378
15501
|
@input=${this._handleZoomChange}
|
|
15379
15502
|
>
|
|
15380
15503
|
</input>
|
|
15381
|
-
${ni}
|
|
15504
|
+
${ni}
|
|
15505
|
+
</div>` : null}
|
|
15382
15506
|
|
|
15383
|
-
|
|
15384
|
-
|
|
15385
|
-
|
|
15386
|
-
|
|
15387
|
-
|
|
15388
|
-
|
|
15507
|
+
<div class="reset-controls">
|
|
15508
|
+
<button
|
|
15509
|
+
?disabled=${this.busy || !this.sourceInfo}
|
|
15510
|
+
@click=${this._resetEditor}
|
|
15511
|
+
>
|
|
15512
|
+
Reset
|
|
15513
|
+
</button>
|
|
15514
|
+
</div>
|
|
15389
15515
|
</div>
|
|
15390
15516
|
|
|
15391
15517
|
<div class="nav">
|
|
@@ -15443,9 +15569,9 @@ class Ui extends Tt {
|
|
|
15443
15569
|
this.step = 0, this.requestUpdate(), this.dispatchEvent(new CustomEvent("close"));
|
|
15444
15570
|
}
|
|
15445
15571
|
async _getCurrentImage() {
|
|
15446
|
-
const
|
|
15447
|
-
console.log(
|
|
15448
|
-
const W =
|
|
15572
|
+
const D = await Pi("profile_picture");
|
|
15573
|
+
console.log(D);
|
|
15574
|
+
const W = D?.item?.value || hn;
|
|
15449
15575
|
console.log(W), this.currentImage = W, this.requestUpdate();
|
|
15450
15576
|
}
|
|
15451
15577
|
_openFilePicker() {
|
|
@@ -15453,36 +15579,41 @@ class Ui extends Tt {
|
|
|
15453
15579
|
}
|
|
15454
15580
|
_initCropper() {
|
|
15455
15581
|
if (this._initialized) return;
|
|
15456
|
-
const
|
|
15457
|
-
|
|
15458
|
-
|
|
15582
|
+
const D = this.renderRoot.querySelector("#image-cropper");
|
|
15583
|
+
if (!D) return;
|
|
15584
|
+
const W = [
|
|
15585
|
+
Math.min(this.area[0], D.parentElement.clientWidth),
|
|
15586
|
+
Math.min(this.area[1], D.parentElement.clientHeight)
|
|
15587
|
+
];
|
|
15588
|
+
console.log("area: ", W), this._cropperFn(D, {
|
|
15589
|
+
area: W,
|
|
15459
15590
|
crop: this.crop,
|
|
15460
15591
|
onchange: () => {
|
|
15461
15592
|
this.exportDataUrl = null, this.errorMessage = "", this._setCropVisibility(!0), this._lockCropToSquare();
|
|
15462
15593
|
}
|
|
15463
|
-
}), this._cropperHost =
|
|
15594
|
+
}), this._cropperHost = D, this._cropperApi = D.crop, this._installCropperGuards(), this._setCropVisibility(!1), this._lockCropToSquare(), this._initialized = !0;
|
|
15464
15595
|
}
|
|
15465
|
-
_handleZoomChange(
|
|
15596
|
+
_handleZoomChange(D) {
|
|
15466
15597
|
if (!this.allowZoom || !this._cropperApi?.zoom || !this.sourceInfo) return;
|
|
15467
|
-
const W = Number.parseFloat(
|
|
15598
|
+
const W = Number.parseFloat(D.target.value);
|
|
15468
15599
|
Number.isFinite(W) && (this.zoom = W, this.exportDataUrl = null, this.errorMessage = "", this._cropperApi.zoom(W));
|
|
15469
15600
|
}
|
|
15470
15601
|
_installCropperGuards() {
|
|
15471
15602
|
if (!this._cropperHost) return;
|
|
15472
15603
|
this._wheelCleanup?.(), this._wheelCleanup = null, this._cropperGuardsCleanup?.(), this._cropperGuardsCleanup = null;
|
|
15473
|
-
const
|
|
15604
|
+
const D = [], W = ($e) => {
|
|
15474
15605
|
$e.preventDefault(), $e.stopPropagation();
|
|
15475
15606
|
};
|
|
15476
15607
|
this._cropperHost.addEventListener("wheel", W, {
|
|
15477
15608
|
capture: !0,
|
|
15478
15609
|
passive: !1
|
|
15479
|
-
}),
|
|
15610
|
+
}), D.push(() => this._cropperHost?.removeEventListener("wheel", W, { capture: !0 }));
|
|
15480
15611
|
const se = ($e) => {
|
|
15481
15612
|
$e.target?.closest?.(".placeholder") || this._lastFile || ($e.preventDefault(), $e.stopPropagation(), $e.stopImmediatePropagation?.());
|
|
15482
15613
|
}, me = ($e) => {
|
|
15483
15614
|
$e.preventDefault(), $e.stopPropagation(), $e.stopImmediatePropagation?.();
|
|
15484
15615
|
};
|
|
15485
|
-
this._cropperHost.addEventListener("click", se, !0), this._cropperHost.addEventListener("dblclick", me, !0),
|
|
15616
|
+
this._cropperHost.addEventListener("click", se, !0), this._cropperHost.addEventListener("dblclick", me, !0), D.push(() => this._cropperHost?.removeEventListener("click", se, !0)), D.push(() => this._cropperHost?.removeEventListener("dblclick", me, !0));
|
|
15486
15617
|
const Me = ($e) => {
|
|
15487
15618
|
$e.preventDefault(), $e.stopPropagation(), $e.stopImmediatePropagation?.();
|
|
15488
15619
|
}, Ye = async ($e) => {
|
|
@@ -15490,53 +15621,53 @@ class Ui extends Tt {
|
|
|
15490
15621
|
const ge = $e.dataTransfer?.files?.[0];
|
|
15491
15622
|
ge && ($e.dataTransfer.dropEffect = "copy", await this._handleIncomingFile(ge));
|
|
15492
15623
|
};
|
|
15493
|
-
this._cropperHost.addEventListener("dragenter", Me, !0), this._cropperHost.addEventListener("dragover", Me, !0), this._cropperHost.addEventListener("drop", Ye, !0),
|
|
15494
|
-
|
|
15624
|
+
this._cropperHost.addEventListener("dragenter", Me, !0), this._cropperHost.addEventListener("dragover", Me, !0), this._cropperHost.addEventListener("drop", Ye, !0), D.push(() => this._cropperHost?.removeEventListener("dragenter", Me, !0)), D.push(() => this._cropperHost?.removeEventListener("dragover", Me, !0)), D.push(() => this._cropperHost?.removeEventListener("drop", Ye, !0)), this._cropperGuardsCleanup = () => {
|
|
15625
|
+
D.forEach(($e) => $e());
|
|
15495
15626
|
};
|
|
15496
15627
|
}
|
|
15497
|
-
_setCropVisibility(
|
|
15628
|
+
_setCropVisibility(D) {
|
|
15498
15629
|
if (!this._cropperHost) return;
|
|
15499
15630
|
const W = this._cropperHost.querySelector(".jcrop-area");
|
|
15500
|
-
W && (W.style.display =
|
|
15631
|
+
W && (W.style.display = D ? "block" : "none");
|
|
15501
15632
|
}
|
|
15502
15633
|
_lockCropToSquare() {
|
|
15503
15634
|
if (!this._cropperHost) return;
|
|
15504
15635
|
this._cropLockCleanup?.(), this._cropLockCleanup = null;
|
|
15505
|
-
const
|
|
15636
|
+
const D = this._cropperHost, W = () => D.querySelector(".jcrop-area") || D.querySelector("[class*='crop' i][style*='width']") || D.querySelector("[class*='select' i][style*='width']");
|
|
15506
15637
|
let se = W();
|
|
15507
15638
|
if (!se) {
|
|
15508
15639
|
const me = new MutationObserver(() => {
|
|
15509
15640
|
se = W(), se && (me.disconnect(), this._applySquareLock(se));
|
|
15510
15641
|
});
|
|
15511
|
-
me.observe(
|
|
15642
|
+
me.observe(D, { childList: !0, subtree: !0 }), this._cropLockCleanup = () => me.disconnect();
|
|
15512
15643
|
return;
|
|
15513
15644
|
}
|
|
15514
15645
|
this._applySquareLock(se);
|
|
15515
15646
|
}
|
|
15516
|
-
_applySquareLock(
|
|
15517
|
-
this._ensureCircleGuide(
|
|
15647
|
+
_applySquareLock(D) {
|
|
15648
|
+
this._ensureCircleGuide(D);
|
|
15518
15649
|
const W = () => {
|
|
15519
|
-
const Me =
|
|
15650
|
+
const Me = D.getBoundingClientRect(), Ye = Math.round(Math.min(Me.width, Me.height));
|
|
15520
15651
|
if (!Ye) return;
|
|
15521
15652
|
const $e = Math.round(Me.width), ge = Math.round(Me.height);
|
|
15522
|
-
$e === Ye && ge === Ye || (
|
|
15653
|
+
$e === Ye && ge === Ye || (D.style.width = `${Ye}px`, D.style.height = `${Ye}px`);
|
|
15523
15654
|
};
|
|
15524
15655
|
W();
|
|
15525
15656
|
const se = new ResizeObserver(() => W());
|
|
15526
|
-
se.observe(
|
|
15657
|
+
se.observe(D);
|
|
15527
15658
|
const me = () => W();
|
|
15528
|
-
|
|
15529
|
-
se.disconnect(),
|
|
15659
|
+
D.addEventListener("pointerup", me), this._cropLockCleanup = () => {
|
|
15660
|
+
se.disconnect(), D.removeEventListener("pointerup", me);
|
|
15530
15661
|
};
|
|
15531
15662
|
}
|
|
15532
|
-
async _handleIncomingFile(
|
|
15533
|
-
if (
|
|
15663
|
+
async _handleIncomingFile(D) {
|
|
15664
|
+
if (D) {
|
|
15534
15665
|
this.exportDataUrl = null, this.errorMessage = "";
|
|
15535
15666
|
try {
|
|
15536
|
-
this.busy = !0, await this._validateInputFile(
|
|
15667
|
+
this.busy = !0, await this._validateInputFile(D), this.rotation = 0, await this._loadFileIntoCropper(D), this._setCropVisibility(!0), this._lastFile = D, this.zoom = 1, this._cropperApi?.zoom?.(1), this.sourceInfo = {
|
|
15537
15668
|
width: this._sourceWidth,
|
|
15538
15669
|
height: this._sourceHeight,
|
|
15539
|
-
mime:
|
|
15670
|
+
mime: D.type
|
|
15540
15671
|
};
|
|
15541
15672
|
} catch (W) {
|
|
15542
15673
|
this._lastFile = null, this.rotation = 0, this.sourceInfo = null, this.exportDataUrl = null, this._setCropVisibility(!1), this.errorMessage = W?.message ?? String(W);
|
|
@@ -15545,45 +15676,45 @@ class Ui extends Tt {
|
|
|
15545
15676
|
}
|
|
15546
15677
|
}
|
|
15547
15678
|
}
|
|
15548
|
-
async _onFileChange(
|
|
15549
|
-
const W =
|
|
15550
|
-
|
|
15679
|
+
async _onFileChange(D) {
|
|
15680
|
+
const W = D.target.files?.[0];
|
|
15681
|
+
D.target.value = "", await this._handleIncomingFile(W);
|
|
15551
15682
|
}
|
|
15552
15683
|
async _resetEditor() {
|
|
15553
15684
|
if (!this.busy && this._cropperApi && this._lastFile)
|
|
15554
15685
|
try {
|
|
15555
15686
|
this.busy = !0, this.exportDataUrl = null, this.errorMessage = "", await this._loadFileIntoCropper(this._lastFile), this.rotation = 0, this._cropperApi.rotate?.(0), this.zoom = 1, this._cropperApi?.zoom?.(1), this._setCropVisibility(!0), this._lockCropToSquare();
|
|
15556
|
-
} catch (
|
|
15557
|
-
this.errorMessage =
|
|
15687
|
+
} catch (D) {
|
|
15688
|
+
this.errorMessage = D?.message ?? String(D);
|
|
15558
15689
|
} finally {
|
|
15559
15690
|
this.busy = !1;
|
|
15560
15691
|
}
|
|
15561
15692
|
}
|
|
15562
|
-
async _validateInputFile(
|
|
15563
|
-
if (!Vi.has(
|
|
15693
|
+
async _validateInputFile(D) {
|
|
15694
|
+
if (!Vi.has(D.type))
|
|
15564
15695
|
throw new Error("Unsupported file type. Please upload JPEG, PNG, or WebP.");
|
|
15565
|
-
if (
|
|
15696
|
+
if (D.size > this.maxUploadBytes)
|
|
15566
15697
|
throw new Error(`File is too large. Max upload is ${Math.round(this.maxUploadBytes / (1024 * 1024))}MB.`);
|
|
15567
|
-
const { width: W, height: se } = await this._decodeProbe(
|
|
15698
|
+
const { width: W, height: se } = await this._decodeProbe(D);
|
|
15568
15699
|
if (W < this.outputSize || se < this.outputSize)
|
|
15569
15700
|
throw new Error(`Image is too small. Minimum is ${this.outputSize}×${this.outputSize}.`);
|
|
15570
15701
|
if (W * se > this.maxPixels)
|
|
15571
15702
|
throw new Error("Image is too large (pixel count). Please use a smaller image.");
|
|
15572
15703
|
this._sourceWidth = W, this._sourceHeight = se;
|
|
15573
15704
|
}
|
|
15574
|
-
_ensureCircleGuide(
|
|
15575
|
-
if (!
|
|
15576
|
-
let W =
|
|
15577
|
-
W || (W = document.createElement("div"), W.className = "circle-guide",
|
|
15705
|
+
_ensureCircleGuide(D) {
|
|
15706
|
+
if (!D) return;
|
|
15707
|
+
let W = D.querySelector(".circle-guide");
|
|
15708
|
+
W || (W = document.createElement("div"), W.className = "circle-guide", D.appendChild(W));
|
|
15578
15709
|
}
|
|
15579
|
-
async _decodeProbe(
|
|
15710
|
+
async _decodeProbe(D) {
|
|
15580
15711
|
if ("createImageBitmap" in window)
|
|
15581
15712
|
try {
|
|
15582
|
-
const se = await createImageBitmap(
|
|
15713
|
+
const se = await createImageBitmap(D), me = se.width, Me = se.height;
|
|
15583
15714
|
return se.close?.(), { width: me, height: Me };
|
|
15584
15715
|
} catch {
|
|
15585
15716
|
}
|
|
15586
|
-
const W = URL.createObjectURL(
|
|
15717
|
+
const W = URL.createObjectURL(D);
|
|
15587
15718
|
try {
|
|
15588
15719
|
const se = await this._loadImage(W);
|
|
15589
15720
|
return { width: se.naturalWidth, height: se.naturalHeight };
|
|
@@ -15591,20 +15722,20 @@ class Ui extends Tt {
|
|
|
15591
15722
|
URL.revokeObjectURL(W);
|
|
15592
15723
|
}
|
|
15593
15724
|
}
|
|
15594
|
-
async _loadFileIntoCropper(
|
|
15725
|
+
async _loadFileIntoCropper(D) {
|
|
15595
15726
|
if (!this._cropperApi) throw new Error("Cropper not ready.");
|
|
15596
15727
|
if (!this._cropperApi.addFromFile)
|
|
15597
15728
|
throw new Error("Cropper API missing addFromFile().");
|
|
15598
15729
|
try {
|
|
15599
|
-
this._cropperApi.addFromFile(
|
|
15730
|
+
this._cropperApi.addFromFile(D);
|
|
15600
15731
|
} catch {
|
|
15601
15732
|
const W = this.renderRoot.querySelector("#file");
|
|
15602
15733
|
this._cropperApi.addFromFile(W);
|
|
15603
15734
|
}
|
|
15604
15735
|
}
|
|
15605
|
-
_rotate(
|
|
15736
|
+
_rotate(D) {
|
|
15606
15737
|
if (!this.allowRotate || !this._cropperApi.rotate) return;
|
|
15607
|
-
const W = (this.rotation +
|
|
15738
|
+
const W = (this.rotation + D + 360) % 360, se = Math.round(W / 90) * 90 % 360;
|
|
15608
15739
|
this.rotation = se, this.exportDataUrl = null, this.errorMessage = "";
|
|
15609
15740
|
const me = se / 180;
|
|
15610
15741
|
this._cropperApi.rotate(me), this._rotationAppliedInEditor = !0;
|
|
@@ -15613,41 +15744,41 @@ class Ui extends Tt {
|
|
|
15613
15744
|
this.errorMessage = "", this.exportDataUrl = null;
|
|
15614
15745
|
try {
|
|
15615
15746
|
this.busy = !0;
|
|
15616
|
-
const
|
|
15617
|
-
this._validateCropState(
|
|
15618
|
-
const { dataUrl: W, mime: se } = await this._renderAndEncode(
|
|
15747
|
+
const D = this._getCropState();
|
|
15748
|
+
this._validateCropState(D);
|
|
15749
|
+
const { dataUrl: W, mime: se } = await this._renderAndEncode(D);
|
|
15619
15750
|
this._validateOutputDataUrl(W, se), await this._validateRedecode(W), this._checkLocalStorageQuotaRisk(W), this.exportDataUrl = W;
|
|
15620
|
-
} catch (
|
|
15621
|
-
this.exportDataUrl = null, this.errorMessage =
|
|
15751
|
+
} catch (D) {
|
|
15752
|
+
this.exportDataUrl = null, this.errorMessage = D?.message ?? String(D);
|
|
15622
15753
|
} finally {
|
|
15623
15754
|
this.busy = !1;
|
|
15624
15755
|
}
|
|
15625
15756
|
}
|
|
15626
15757
|
_getCropState() {
|
|
15627
|
-
const
|
|
15628
|
-
return { api:
|
|
15758
|
+
const D = this._cropperApi, W = D?.getSelectionCoordinates?.() ?? null, se = D?.getCroppedImage?.() ?? null;
|
|
15759
|
+
return { api: D, state: W, cropped: se };
|
|
15629
15760
|
}
|
|
15630
|
-
_validateCropState({ api:
|
|
15631
|
-
if (!
|
|
15761
|
+
_validateCropState({ api: D, state: W }) {
|
|
15762
|
+
if (!D) throw new Error("Cropper not ready.");
|
|
15632
15763
|
if (W?.width && W?.height) {
|
|
15633
15764
|
const me = W.width / W.height;
|
|
15634
15765
|
if (Math.abs(me - 1) > 0.01)
|
|
15635
15766
|
throw new Error("Crop must be a 1:1 square.");
|
|
15636
15767
|
}
|
|
15637
|
-
const se =
|
|
15768
|
+
const se = D.getCroppedContent?.();
|
|
15638
15769
|
if (!(!se || !se.width || !se.height) && (se.width < this.outputSize || se.height < this.outputSize))
|
|
15639
15770
|
throw new Error("Zoom is too far in: export would upscale.");
|
|
15640
15771
|
}
|
|
15641
|
-
async _renderAndEncode({ api:
|
|
15772
|
+
async _renderAndEncode({ api: D, cropped: W }) {
|
|
15642
15773
|
const se = document.createElement("canvas");
|
|
15643
15774
|
se.width = this.outputSize, se.height = this.outputSize;
|
|
15644
15775
|
const me = se.getContext("2d", { alpha: !0 });
|
|
15645
15776
|
if (!me) throw new Error("Canvas context unavailable.");
|
|
15646
|
-
const Me =
|
|
15777
|
+
const Me = D?.getCroppedContent?.();
|
|
15647
15778
|
if (Me && typeof Me.width == "number" && Me.width > 0 && typeof Me.height == "number" && Me.height > 0)
|
|
15648
15779
|
me.drawImage(Me, 0, 0, this.outputSize, this.outputSize);
|
|
15649
15780
|
else {
|
|
15650
|
-
const de = W ??
|
|
15781
|
+
const de = W ?? D?.getCroppedImage?.();
|
|
15651
15782
|
if (!de?.src)
|
|
15652
15783
|
throw new Error("Unable to read cropped image from cropper.");
|
|
15653
15784
|
const ee = await this._loadImage(de.src);
|
|
@@ -15659,34 +15790,34 @@ class Ui extends Tt {
|
|
|
15659
15790
|
_pickOutputMime() {
|
|
15660
15791
|
return document.createElement("canvas").toDataURL("image/webp").startsWith("data:image/webp") ? "image/webp" : "image/jpeg";
|
|
15661
15792
|
}
|
|
15662
|
-
_validateOutputDataUrl(
|
|
15793
|
+
_validateOutputDataUrl(D, W) {
|
|
15663
15794
|
const me = {
|
|
15664
15795
|
"image/webp": "data:image/webp;base64,",
|
|
15665
15796
|
"image/jpeg": "data:image/jpeg;base64,",
|
|
15666
15797
|
"image/png": "data:image/png;base64,"
|
|
15667
15798
|
}[W];
|
|
15668
|
-
if (!me || !
|
|
15799
|
+
if (!me || !D.startsWith(me))
|
|
15669
15800
|
throw new Error("Export format mismatch or invalid base64 data URL.");
|
|
15670
|
-
if (
|
|
15801
|
+
if (D.length > this.maxBase64Bytes)
|
|
15671
15802
|
throw new Error("Export is too large for storage. Try zooming out or use a different image.");
|
|
15672
15803
|
}
|
|
15673
|
-
async _validateRedecode(
|
|
15674
|
-
const W = await this._loadImage(
|
|
15804
|
+
async _validateRedecode(D) {
|
|
15805
|
+
const W = await this._loadImage(D), se = W.naturalWidth, me = W.naturalHeight;
|
|
15675
15806
|
if (se !== this.outputSize || me !== this.outputSize)
|
|
15676
15807
|
throw new Error(`Export decode check failed: expected ${this.outputSize}×${this.outputSize}, got ${se}×${me}.`);
|
|
15677
15808
|
}
|
|
15678
|
-
_checkLocalStorageQuotaRisk(
|
|
15679
|
-
if (
|
|
15809
|
+
_checkLocalStorageQuotaRisk(D) {
|
|
15810
|
+
if (D.length > 4 * 1024 * 1024)
|
|
15680
15811
|
throw new Error("Export is very large and may exceed browser storage limits.");
|
|
15681
15812
|
}
|
|
15682
|
-
async _loadImage(
|
|
15813
|
+
async _loadImage(D) {
|
|
15683
15814
|
return new Promise((W, se) => {
|
|
15684
15815
|
const me = new Image();
|
|
15685
|
-
me.onload = () => W(me), me.onerror = () => se(new Error("Image decode failed.")), me.src =
|
|
15816
|
+
me.onload = () => W(me), me.onerror = () => se(new Error("Image decode failed.")), me.src = D;
|
|
15686
15817
|
});
|
|
15687
15818
|
}
|
|
15688
|
-
_clamp(
|
|
15689
|
-
return Math.min(se, Math.max(W,
|
|
15819
|
+
_clamp(D, W, se) {
|
|
15820
|
+
return Math.min(se, Math.max(W, D));
|
|
15690
15821
|
}
|
|
15691
15822
|
async _useExported() {
|
|
15692
15823
|
console.log("new image URL:", this.exportDataUrl), await zi("profile_picture", this.exportDataUrl), window.dispatchEvent(new CustomEvent("wral:profile-picture-saved", {
|