@@ -116539,86 +116539,69 @@
116539
116539
!(function(e) {
116540
116540
function t(e) {
116541
116541
if (e) return n(e);
116542
+ this._callbacks = new Map();
116542
116543
}
116543
116544
function n(e) {
116544
- for (var n in t.prototype) e[n] = t.prototype[n];
116545
- return e;
116545
+ return (
116546
+ Object.assign(e, t.prototype),
116547
+ (e._callbacks = new Map()),
116548
+ e
116549
+ );
116546
116550
}
116547
- (e.exports = t),
116548
- (t.prototype.on = t.prototype.addEventListener = function(
116549
- e,
116550
- t
116551
- ) {
116552
- return (
116553
- (this._callbacks = this._callbacks || {}),
116554
- (this._callbacks['$' + e] =
116555
- this._callbacks['$' + e] || []).push(t),
116556
- this
116557
- );
116558
- }),
116551
+ (t.prototype.on = function(e, t) {
116552
+ const n = this._callbacks.get(e) ?? [];
116553
+ return n.push(t), this._callbacks.set(e, n), this;
116554
+ }),
116559
116555
(t.prototype.once = function(e, t) {
116560
- function n() {
116561
- this.off(e, n), t.apply(this, arguments );
116562
- }
116556
+ const n = (...r) => {
116557
+ this.off(e, n), t.apply(this, r );
116558
+ };
116563
116559
return (n.fn = t), this.on(e, n), this;
116564
116560
}),
116565
- (t.prototype.off = t.prototype.removeListener = t.prototype.removeAllListeners = t.prototype.removeEventListener = function(
116566
- e,
116567
- t
116568
- ) {
116569
- if (
116570
- ((this._callbacks = this._callbacks || {}),
116571
- 0 == arguments.length)
116572
- )
116573
- return (this._callbacks = {}), this;
116574
- var n,
116575
- r = this._callbacks['$' + e];
116576
- if (!r) return this;
116577
- if (1 == arguments.length)
116578
- return (
116579
- delete this._callbacks['$' + e], this
116580
- );
116581
- for (var i = 0; i < r.length; i++)
116582
- if ((n = r[i]) === t || n.fn === t) {
116583
- r.splice(i, 1);
116584
- break;
116585
- }
116586
- return (
116587
- 0 === r.length &&
116588
- delete this._callbacks['$' + e],
116589
- this
116590
- );
116561
+ (t.prototype.off = function(e, t) {
116562
+ if (void 0 === e && void 0 === t)
116563
+ return this._callbacks.clear(), this;
116564
+ if (void 0 === t)
116565
+ return this._callbacks.delete(e), this;
116566
+ const n = this._callbacks.get(e);
116567
+ if (n) {
116568
+ for (const [e, r] of n.entries())
116569
+ if (r === t || r.fn === t) {
116570
+ n.splice(e, 1);
116571
+ break;
116572
+ }
116573
+ 0 === n.length
116574
+ ? this._callbacks.delete(e)
116575
+ : this._callbacks.set(e, n);
116576
+ }
116577
+ return this;
116591
116578
}),
116592
- (t.prototype.emit = function(e) {
116593
- this._callbacks = this._callbacks || {};
116594
- for (
116595
- var t = new Array(arguments.length - 1),
116596
- n = this._callbacks['$' + e],
116597
- r = 1;
116598
- r < arguments.length;
116599
- r++
116600
- )
116601
- t[r - 1] = arguments[r];
116579
+ (t.prototype.emit = function(e, ...t) {
116580
+ const n = this._callbacks.get(e);
116602
116581
if (n) {
116603
- r = 0;
116604
- for (
116605
- var i = (n = n.slice(0)).length;
116606
- r < i;
116607
- ++r
116608
- )
116609
- n[r].apply(this, t);
116582
+ const e = [...n];
116583
+ for (const n of e) n.apply(this, t);
116610
116584
}
116611
116585
return this;
116612
116586
}),
116613
116587
(t.prototype.listeners = function(e) {
116614
- return (
116615
- (this._callbacks = this._callbacks || {}),
116616
- this._callbacks['$' + e] || []
116617
- );
116588
+ return this._callbacks.get(e) ?? [];
116589
+ }),
116590
+ (t.prototype.listenerCount = function(e) {
116591
+ if (e) return this.listeners(e).length;
116592
+ let t = 0;
116593
+ for (const e of this._callbacks.values())
116594
+ t += e.length;
116595
+ return t;
116618
116596
}),
116619
116597
(t.prototype.hasListeners = function(e) {
116620
- return !!this.listeners(e).length;
116621
- });
116598
+ return this.listenerCount(e) > 0;
116599
+ }),
116600
+ (t.prototype.addEventListener = t.prototype.on),
116601
+ (t.prototype.removeListener = t.prototype.off),
116602
+ (t.prototype.removeEventListener = t.prototype.off),
116603
+ (t.prototype.removeAllListeners = t.prototype.off),
116604
+ (e.exports = t);
116622
116605
})(UI);
116623
116606
var OI,
116624
116607
kI = i(UI.exports);
@@ -126933,86 +126916,68 @@
126933
126916
function t(e) {
126934
126917
if (e)
126935
126918
return (function(e) {
126936
- for (var n in t.prototype)
126937
- e[n] = t.prototype[n];
126938
- return e;
126919
+ return (
126920
+ Object.assign(e, t.prototype),
126921
+ (e._callbacks = new Map()),
126922
+ e
126923
+ );
126939
126924
})(e);
126925
+ this._callbacks = new Map();
126940
126926
}
126941
- (e.exports = t),
126942
- (t.prototype.on = t.prototype.addEventListener = function(
126943
- e,
126944
- t
126945
- ) {
126946
- return (
126947
- (this._callbacks = this._callbacks || {}),
126948
- (this._callbacks['$' + e] =
126949
- this._callbacks['$' + e] || []).push(t),
126950
- this
126951
- );
126952
- }),
126927
+ (t.prototype.on = function(e, t) {
126928
+ const n = this._callbacks.get(e) ?? [];
126929
+ return n.push(t), this._callbacks.set(e, n), this;
126930
+ }),
126953
126931
(t.prototype.once = function(e, t) {
126954
- function n() {
126955
- this.off(e, n), t.apply(this, arguments );
126956
- }
126932
+ const n = (...r) => {
126933
+ this.off(e, n), t.apply(this, r );
126934
+ };
126957
126935
return (n.fn = t), this.on(e, n), this;
126958
126936
}),
126959
- (t.prototype.off = t.prototype.removeListener = t.prototype.removeAllListeners = t.prototype.removeEventListener = function(
126960
- e,
126961
- t
126962
- ) {
126963
- if (
126964
- ((this._callbacks = this._callbacks || {}),
126965
- 0 == arguments.length)
126966
- )
126967
- return (this._callbacks = {}), this;
126968
- var n,
126969
- r = this._callbacks['$' + e];
126970
- if (!r) return this;
126971
- if (1 == arguments.length)
126972
- return (
126973
- delete this._callbacks['$' + e], this
126974
- );
126975
- for (var i = 0; i < r.length; i++)
126976
- if ((n = r[i]) === t || n.fn === t) {
126977
- r.splice(i, 1);
126978
- break;
126979
- }
126980
- return (
126981
- 0 === r.length &&
126982
- delete this._callbacks['$' + e],
126983
- this
126984
- );
126937
+ (t.prototype.off = function(e, t) {
126938
+ if (void 0 === e && void 0 === t)
126939
+ return this._callbacks.clear(), this;
126940
+ if (void 0 === t)
126941
+ return this._callbacks.delete(e), this;
126942
+ const n = this._callbacks.get(e);
126943
+ if (n) {
126944
+ for (const [e, r] of n.entries())
126945
+ if (r === t || r.fn === t) {
126946
+ n.splice(e, 1);
126947
+ break;
126948
+ }
126949
+ 0 === n.length
126950
+ ? this._callbacks.delete(e)
126951
+ : this._callbacks.set(e, n);
126952
+ }
126953
+ return this;
126985
126954
}),
126986
- (t.prototype.emit = function(e) {
126987
- this._callbacks = this._callbacks || {};
126988
- for (
126989
- var t = new Array(arguments.length - 1),
126990
- n = this._callbacks['$' + e],
126991
- r = 1;
126992
- r < arguments.length;
126993
- r++
126994
- )
126995
- t[r - 1] = arguments[r];
126955
+ (t.prototype.emit = function(e, ...t) {
126956
+ const n = this._callbacks.get(e);
126996
126957
if (n) {
126997
- r = 0;
126998
- for (
126999
- var i = (n = n.slice(0)).length;
127000
- r < i;
127001
- ++r
127002
- )
127003
- n[r].apply(this, t);
126958
+ const e = [...n];
126959
+ for (const n of e) n.apply(this, t);
127004
126960
}
127005
126961
return this;
127006
126962
}),
127007
126963
(t.prototype.listeners = function(e) {
127008
- return (
127009
- (this._callbacks = this._callbacks || {}),
127010
- this._callbacks['$' + e] || []
127011
- );
126964
+ return this._callbacks.get(e) ?? [];
126965
+ }),
126966
+ (t.prototype.listenerCount = function(e) {
126967
+ if (e) return this.listeners(e).length;
126968
+ let t = 0;
126969
+ for (const e of this._callbacks.values())
126970
+ t += e.length;
126971
+ return t;
127012
126972
}),
127013
126973
(t.prototype.hasListeners = function(e) {
127014
- return !!this.listeners(e).length;
127015
- });
126974
+ return this.listenerCount(e) > 0;
126975
+ }),
126976
+ (t.prototype.addEventListener = t.prototype.on),
126977
+ (t.prototype.removeListener = t.prototype.off),
126978
+ (t.prototype.removeEventListener = t.prototype.off),
126979
+ (t.prototype.removeAllListeners = t.prototype.off),
126980
+ (e.exports = t);
127016
126981
})(DC);
127017
126982
var TC,
127018
126983
YC = i(DC.exports);
@@ -241442,9 +241407,15 @@
241442
241407
order: 1,
241443
241408
dropdownValue: 'Material ID',
241444
241409
},
241410
+ formula: {
241411
+ validate: tz,
241412
+ order: 2,
241413
+ selectionMode: VO.FORMULA,
241414
+ dropdownValue: 'Formula',
241415
+ },
241445
241416
chemical_system: {
241446
241417
validate: e => iz(e, new RegExp(/-/)),
241447
- order: 2 ,
241418
+ order: 3 ,
241448
241419
selectionMode: VO.CHEMICAL_SYSTEM,
241449
241420
dropdownValue: 'Chemical System',
241450
241421
elementsOnlyDropdownValue: 'Only',
@@ -241453,22 +241424,20 @@
241453
241424
validate: e => {
241454
241425
const t = rz(e),
241455
241426
n = t.toString();
241456
- return n === new RegExp(/-/).toString() ||
241457
- n === new RegExp(/\s/).toString()
241458
- ? void 0
241459
- : iz(e, t);
241427
+ if (
241428
+ n !== new RegExp(/-/).toString() &&
241429
+ n !== new RegExp(/\s/).toString()
241430
+ ) {
241431
+ const n = iz(e, t);
241432
+ if (n && n.length > 5) return;
241433
+ return iz(e, t);
241434
+ }
241460
241435
},
241461
- order: 3 ,
241436
+ order: 4 ,
241462
241437
selectionMode: VO.ELEMENTS,
241463
241438
dropdownValue: 'Elements',
241464
241439
elementsOnlyDropdownValue: 'At least',
241465
241440
},
241466
- formula: {
241467
- validate: tz,
241468
- order: 4,
241469
- selectionMode: VO.FORMULA,
241470
- dropdownValue: 'Formula',
241471
- },
241472
241441
molecule_formula: {
241473
241442
validate: (
241474
241443
e,
0 commit comments