lexgui 0.6.2 → 0.6.3
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/build/lexgui.css +6 -5
- package/build/lexgui.js +661 -104
- package/build/lexgui.min.css +1 -1
- package/build/lexgui.min.js +1 -1
- package/build/lexgui.module.js +661 -104
- package/build/lexgui.module.min.js +1 -1
- package/changelog.md +13 -1
- package/demo.js +28 -14
- package/examples/all_widgets.html +1 -1
- package/package.json +1 -1
package/build/lexgui.js
CHANGED
|
@@ -12,7 +12,7 @@ console.warn( 'Script _build/lexgui.js_ is depracated and will be removed soon.
|
|
|
12
12
|
*/
|
|
13
13
|
|
|
14
14
|
var LX = {
|
|
15
|
-
version: "0.6.
|
|
15
|
+
version: "0.6.3",
|
|
16
16
|
ready: false,
|
|
17
17
|
components: [], // Specific pre-build components
|
|
18
18
|
signals: {}, // Events and triggers
|
|
@@ -724,7 +724,7 @@ function makeCodeSnippet( code, size, options = { } )
|
|
|
724
724
|
}
|
|
725
725
|
else if( l.constructor == Array ) // It's a range
|
|
726
726
|
{
|
|
727
|
-
for( let i = ( l[0] - 1 ); i <= ( l[1] - 1 ); i++ )
|
|
727
|
+
for( let i = ( l[ 0 ] - 1 ); i <= ( l[ 1 ] - 1 ); i++ )
|
|
728
728
|
{
|
|
729
729
|
code.childNodes[ i ].classList.add( "added" );
|
|
730
730
|
}
|
|
@@ -743,7 +743,7 @@ function makeCodeSnippet( code, size, options = { } )
|
|
|
743
743
|
}
|
|
744
744
|
else if( l.constructor == Array ) // It's a range
|
|
745
745
|
{
|
|
746
|
-
for( let i = ( l[0] - 1 ); i <= ( l[1] - 1 ); i++ )
|
|
746
|
+
for( let i = ( l[ 0 ] - 1 ); i <= ( l[ 1 ] - 1 ); i++ )
|
|
747
747
|
{
|
|
748
748
|
code.childNodes[ i ].classList.add( "removed" );
|
|
749
749
|
}
|
|
@@ -863,6 +863,7 @@ function makeIcon( iconName, options = { } )
|
|
|
863
863
|
|
|
864
864
|
// Resolve variant
|
|
865
865
|
const requestedVariant = options.variant ?? "regular";
|
|
866
|
+
data = ( ( requestedVariant == "solid" ) ? LX.ICONS[ `${ iconName }@solid` ] : data ) ?? data;
|
|
866
867
|
const variant = data[ 3 ];
|
|
867
868
|
|
|
868
869
|
// Create internal icon if variant is the same as requested, there's no lucide/fallback data or if variant is "regular" (default)
|
|
@@ -1024,6 +1025,9 @@ class vec2 {
|
|
|
1024
1025
|
nrm ( v0 = new vec2() ) { v0.set( this.x, this.y ); return v0.mul( 1.0 / this.len(), v0 ); }
|
|
1025
1026
|
dst ( v ) { return v.sub( this ).len(); }
|
|
1026
1027
|
clp ( min, max, v0 = new vec2() ) { v0.set( clamp( this.x, min, max ), clamp( this.y, min, max ) ); return v0; }
|
|
1028
|
+
|
|
1029
|
+
fromArray ( array ) { this.x = array[ 0 ]; this.y = array[ 1 ]; }
|
|
1030
|
+
toArray () { return this.xy }
|
|
1027
1031
|
};
|
|
1028
1032
|
|
|
1029
1033
|
LX.vec2 = vec2;
|
|
@@ -1507,9 +1511,12 @@ async function init( options = { } )
|
|
|
1507
1511
|
this.main_area = new Area( { id: options.id ?? 'mainarea' } );
|
|
1508
1512
|
}
|
|
1509
1513
|
|
|
1510
|
-
if( ( options.autoTheme ?? true )
|
|
1514
|
+
if( ( options.autoTheme ?? true ) )
|
|
1511
1515
|
{
|
|
1512
|
-
|
|
1516
|
+
if( window.matchMedia && window.matchMedia( "(prefers-color-scheme: light)" ).matches )
|
|
1517
|
+
{
|
|
1518
|
+
LX.setTheme( "light" );
|
|
1519
|
+
}
|
|
1513
1520
|
|
|
1514
1521
|
window.matchMedia( "(prefers-color-scheme: dark)" ).addEventListener( "change", event => {
|
|
1515
1522
|
LX.setTheme( event.matches ? "dark" : "light" );
|
|
@@ -1922,13 +1929,10 @@ function asTooltip( trigger, content, options = {} )
|
|
|
1922
1929
|
} );
|
|
1923
1930
|
|
|
1924
1931
|
trigger.addEventListener( "mouseleave", function(e) {
|
|
1925
|
-
if(
|
|
1926
|
-
|
|
1927
|
-
tooltipDom.dataset[ "closed" ] = true;
|
|
1928
|
-
|
|
1929
|
-
doAsync( () => {
|
|
1932
|
+
if( tooltipDom )
|
|
1933
|
+
{
|
|
1930
1934
|
tooltipDom.remove();
|
|
1931
|
-
}
|
|
1935
|
+
}
|
|
1932
1936
|
} )
|
|
1933
1937
|
}
|
|
1934
1938
|
|
|
@@ -3002,7 +3006,7 @@ class Calendar {
|
|
|
3002
3006
|
|
|
3003
3007
|
constructor( dateString, options = {} ) {
|
|
3004
3008
|
|
|
3005
|
-
this.root = LX.makeContainer( ["256px", "auto"], "
|
|
3009
|
+
this.root = LX.makeContainer( ["256px", "auto"], "p-1 text-md" );
|
|
3006
3010
|
|
|
3007
3011
|
this.onChange = options.onChange;
|
|
3008
3012
|
this.untilToday = options.untilToday;
|
|
@@ -4031,7 +4035,7 @@ class Area {
|
|
|
4031
4035
|
{
|
|
4032
4036
|
for( let i = 0; i < float.length; i++ )
|
|
4033
4037
|
{
|
|
4034
|
-
const t = float[i];
|
|
4038
|
+
const t = float[ i ];
|
|
4035
4039
|
switch( t )
|
|
4036
4040
|
{
|
|
4037
4041
|
case 'h': break;
|
|
@@ -5662,8 +5666,9 @@ class Widget {
|
|
|
5662
5666
|
static TABLE = 34;
|
|
5663
5667
|
static TABS = 35;
|
|
5664
5668
|
static DATE = 36;
|
|
5665
|
-
static
|
|
5666
|
-
static
|
|
5669
|
+
static MAP2D = 37;
|
|
5670
|
+
static LABEL = 38;
|
|
5671
|
+
static BLANK = 39;
|
|
5667
5672
|
|
|
5668
5673
|
static NO_CONTEXT_TYPES = [
|
|
5669
5674
|
Widget.BUTTON,
|
|
@@ -5786,8 +5791,17 @@ class Widget {
|
|
|
5786
5791
|
}
|
|
5787
5792
|
|
|
5788
5793
|
_canPaste() {
|
|
5789
|
-
|
|
5790
|
-
navigator.clipboard.type === this.type;
|
|
5794
|
+
let pasteAllowed = this.type === Widget.CUSTOM ?
|
|
5795
|
+
( navigator.clipboard.customIdx !== undefined && this.customIdx == navigator.clipboard.customIdx ) : navigator.clipboard.type === this.type;
|
|
5796
|
+
|
|
5797
|
+
pasteAllowed &= ( this.disabled !== true );
|
|
5798
|
+
|
|
5799
|
+
if( this.onAllowPaste )
|
|
5800
|
+
{
|
|
5801
|
+
pasteAllowed = this.onAllowPaste( pasteAllowed );
|
|
5802
|
+
}
|
|
5803
|
+
|
|
5804
|
+
return pasteAllowed;
|
|
5791
5805
|
}
|
|
5792
5806
|
|
|
5793
5807
|
_trigger( event, callback, scope = this ) {
|
|
@@ -5824,7 +5838,7 @@ class Widget {
|
|
|
5824
5838
|
if (a == null || b == null) return false;
|
|
5825
5839
|
if (a.length !== b.length) return false;
|
|
5826
5840
|
for (var i = 0; i < a.length; ++i) {
|
|
5827
|
-
if (a[i] !== b[i]) return false;
|
|
5841
|
+
if (a[ i ] !== b[ i ]) return false;
|
|
5828
5842
|
}
|
|
5829
5843
|
return true;
|
|
5830
5844
|
})( value, this._initialValue ) : ( value == this._initialValue );
|
|
@@ -5899,6 +5913,7 @@ class Widget {
|
|
|
5899
5913
|
case Widget.TABLE: return "Table";
|
|
5900
5914
|
case Widget.TABS: return "Tabs";
|
|
5901
5915
|
case Widget.DATE: return "Date";
|
|
5916
|
+
case Widget.MAP2D: return "Map2D";
|
|
5902
5917
|
case Widget.LABEL: return "Label";
|
|
5903
5918
|
case Widget.BLANK: return "Blank";
|
|
5904
5919
|
case Widget.CUSTOM: return this.customName;
|
|
@@ -6104,12 +6119,14 @@ class NodeTree {
|
|
|
6104
6119
|
const nodeFilterInput = this.domEl.querySelector( ".lexnodetreefilter" );
|
|
6105
6120
|
|
|
6106
6121
|
node.children = node.children ?? [];
|
|
6122
|
+
|
|
6107
6123
|
if( nodeFilterInput && nodeFilterInput.value != "" && !node.id.includes( nodeFilterInput.value ) )
|
|
6108
6124
|
{
|
|
6109
6125
|
for( var i = 0; i < node.children.length; ++i )
|
|
6110
6126
|
{
|
|
6111
6127
|
this._createItem( node, node.children[ i ], level + 1, selectedId );
|
|
6112
6128
|
}
|
|
6129
|
+
|
|
6113
6130
|
return;
|
|
6114
6131
|
}
|
|
6115
6132
|
|
|
@@ -6454,7 +6471,7 @@ class NodeTree {
|
|
|
6454
6471
|
|
|
6455
6472
|
const index = dragged.parent.children.findIndex(n => n.id == dragged.id);
|
|
6456
6473
|
const removed = dragged.parent.children.splice(index, 1);
|
|
6457
|
-
target.children.push( removed[0] );
|
|
6474
|
+
target.children.push( removed[ 0 ] );
|
|
6458
6475
|
that.refresh();
|
|
6459
6476
|
delete window.__tree_node_dragged;
|
|
6460
6477
|
});
|
|
@@ -6534,13 +6551,14 @@ class NodeTree {
|
|
|
6534
6551
|
inputContainer.appendChild( visibilityBtn.root );
|
|
6535
6552
|
}
|
|
6536
6553
|
|
|
6537
|
-
const _hasChild = function(
|
|
6538
|
-
if(
|
|
6539
|
-
|
|
6554
|
+
const _hasChild = function( node, id ) {
|
|
6555
|
+
if( node.id == id ) return true;
|
|
6556
|
+
let found = false;
|
|
6557
|
+
for( var c of ( node?.children ?? [] ) )
|
|
6540
6558
|
{
|
|
6541
|
-
|
|
6542
|
-
return _hasChild( c, id );
|
|
6559
|
+
found |= _hasChild( c, id );
|
|
6543
6560
|
}
|
|
6561
|
+
return found;
|
|
6544
6562
|
};
|
|
6545
6563
|
|
|
6546
6564
|
const exists = _hasChild( node, selectedId );
|
|
@@ -6567,6 +6585,7 @@ class NodeTree {
|
|
|
6567
6585
|
|
|
6568
6586
|
this.data = newData ?? this.data;
|
|
6569
6587
|
this.domEl.querySelector( "ul" ).innerHTML = "";
|
|
6588
|
+
|
|
6570
6589
|
if( this.data.constructor === Object )
|
|
6571
6590
|
{
|
|
6572
6591
|
this._createItem( null, this.data, 0, selectedId );
|
|
@@ -6596,15 +6615,14 @@ class NodeTree {
|
|
|
6596
6615
|
this.refresh( null, id );
|
|
6597
6616
|
|
|
6598
6617
|
this.domEl.querySelectorAll( ".selected" ).forEach( i => i.classList.remove( "selected" ) );
|
|
6599
|
-
this.selected.length = 0;
|
|
6600
6618
|
|
|
6601
|
-
|
|
6602
|
-
|
|
6603
|
-
|
|
6604
|
-
|
|
6605
|
-
|
|
6606
|
-
|
|
6607
|
-
|
|
6619
|
+
// Element should exist, since tree was refreshed to show it
|
|
6620
|
+
const el = this.domEl.querySelector( "#" + id );
|
|
6621
|
+
console.assert( el, "NodeTree: Can't select node " + id );
|
|
6622
|
+
|
|
6623
|
+
el.classList.add( "selected" );
|
|
6624
|
+
this.selected = [ el.treeData ];
|
|
6625
|
+
el.focus();
|
|
6608
6626
|
}
|
|
6609
6627
|
}
|
|
6610
6628
|
|
|
@@ -6865,8 +6883,16 @@ class TextArea extends Widget {
|
|
|
6865
6883
|
|
|
6866
6884
|
container.appendChild( wValue );
|
|
6867
6885
|
|
|
6868
|
-
if( options.disabled ?? false )
|
|
6869
|
-
|
|
6886
|
+
if( options.disabled ?? false )
|
|
6887
|
+
{
|
|
6888
|
+
this.disabled = true;
|
|
6889
|
+
wValue.setAttribute( "disabled", true );
|
|
6890
|
+
}
|
|
6891
|
+
|
|
6892
|
+
if( options.placeholder )
|
|
6893
|
+
{
|
|
6894
|
+
wValue.setAttribute( "placeholder", options.placeholder );
|
|
6895
|
+
}
|
|
6870
6896
|
|
|
6871
6897
|
const trigger = options.trigger ?? "default";
|
|
6872
6898
|
|
|
@@ -6984,6 +7010,7 @@ class Button extends Widget {
|
|
|
6984
7010
|
|
|
6985
7011
|
if( options.disabled )
|
|
6986
7012
|
{
|
|
7013
|
+
this.disabled = true;
|
|
6987
7014
|
wValue.setAttribute( "disabled", true );
|
|
6988
7015
|
}
|
|
6989
7016
|
|
|
@@ -8212,7 +8239,7 @@ class Tags extends Widget {
|
|
|
8212
8239
|
|
|
8213
8240
|
for( let i = 0; i < value.length; ++i )
|
|
8214
8241
|
{
|
|
8215
|
-
const tagName = value[i];
|
|
8242
|
+
const tagName = value[ i ];
|
|
8216
8243
|
const tag = document.createElement('span');
|
|
8217
8244
|
tag.className = "lextag";
|
|
8218
8245
|
tag.innerHTML = tagName;
|
|
@@ -8809,7 +8836,7 @@ class NumberInput extends Widget {
|
|
|
8809
8836
|
|
|
8810
8837
|
if( options.disabled )
|
|
8811
8838
|
{
|
|
8812
|
-
vecinput.disabled = true;
|
|
8839
|
+
this.disabled = vecinput.disabled = true;
|
|
8813
8840
|
}
|
|
8814
8841
|
|
|
8815
8842
|
// Add slider below
|
|
@@ -8965,7 +8992,7 @@ class Vector extends Widget {
|
|
|
8965
8992
|
super( Widget.VECTOR, name, [].concat( value ), options );
|
|
8966
8993
|
|
|
8967
8994
|
this.onGetValue = () => {
|
|
8968
|
-
let inputs = this.root.querySelectorAll( "input" );
|
|
8995
|
+
let inputs = this.root.querySelectorAll( "input[type='number']" );
|
|
8969
8996
|
let value = [];
|
|
8970
8997
|
for( var v of inputs )
|
|
8971
8998
|
{
|
|
@@ -9007,6 +9034,7 @@ class Vector extends Widget {
|
|
|
9007
9034
|
container.className = "lexvector";
|
|
9008
9035
|
this.root.appendChild( container );
|
|
9009
9036
|
|
|
9037
|
+
this.disabled = ( options.disabled ?? false );
|
|
9010
9038
|
const that = this;
|
|
9011
9039
|
|
|
9012
9040
|
for( let i = 0; i < numComponents; ++i )
|
|
@@ -9037,7 +9065,7 @@ class Vector extends Widget {
|
|
|
9037
9065
|
const dragIcon = LX.makeIcon( "MoveVertical", { iconClass: "drag-icon hidden-opacity", svgClass: "sm" } );
|
|
9038
9066
|
box.appendChild( dragIcon );
|
|
9039
9067
|
|
|
9040
|
-
if(
|
|
9068
|
+
if( this.disabled )
|
|
9041
9069
|
{
|
|
9042
9070
|
vecinput.disabled = true;
|
|
9043
9071
|
}
|
|
@@ -10122,7 +10150,7 @@ class Table extends Widget {
|
|
|
10122
10150
|
delete this.activeCustomFilters[ key ];
|
|
10123
10151
|
}
|
|
10124
10152
|
const activeFilters = Object.keys( this.activeCustomFilters ).filter( k => this.activeCustomFilters[ k ] == f.name );
|
|
10125
|
-
const filterBadgesHtml = activeFilters.reduce( ( acc, key ) => acc += LX.badge( key, "bg-tertiary text-sm" ), "" );
|
|
10153
|
+
const filterBadgesHtml = activeFilters.reduce( ( acc, key ) => acc += LX.badge( key, "bg-tertiary fg-secondary text-sm border-0" ), "" );
|
|
10126
10154
|
spanName.innerHTML = icon.innerHTML + f.name + ( activeFilters.length ? separatorHtml : "" ) + filterBadgesHtml;
|
|
10127
10155
|
this.refresh();
|
|
10128
10156
|
}
|
|
@@ -10134,7 +10162,7 @@ class Table extends Widget {
|
|
|
10134
10162
|
else if( f.type == "range" )
|
|
10135
10163
|
{
|
|
10136
10164
|
console.assert( f.min != undefined && f.max != undefined, "Range filter needs min and max values!" );
|
|
10137
|
-
const container = LX.makeContainer( ["240px", "auto"], "
|
|
10165
|
+
const container = LX.makeContainer( ["240px", "auto"], "text-md" );
|
|
10138
10166
|
const panel = new Panel();
|
|
10139
10167
|
LX.makeContainer( ["100%", "auto"], "px-3 p-2 pb-0 text-md font-medium", f.name, container );
|
|
10140
10168
|
|
|
@@ -10147,13 +10175,13 @@ class Table extends Widget {
|
|
|
10147
10175
|
panel.addNumber( null, f.start, (v) => {
|
|
10148
10176
|
f.start = v;
|
|
10149
10177
|
const inUse = ( f.start != f.min || f.end != f.max );
|
|
10150
|
-
spanName.innerHTML = icon.innerHTML + f.name + ( inUse ? separatorHtml + LX.badge( `${ f.start } - ${ f.end } ${ f.units ?? "" }`, "bg-tertiary text-sm" ) : "" );
|
|
10178
|
+
spanName.innerHTML = icon.innerHTML + f.name + ( inUse ? separatorHtml + LX.badge( `${ f.start } - ${ f.end } ${ f.units ?? "" }`, "bg-tertiary fg-secondary text-sm border-0" ) : "" );
|
|
10151
10179
|
this.refresh();
|
|
10152
10180
|
}, { skipSlider: true, min: f.min, max: f.max, step: f.step, units: f.units } );
|
|
10153
10181
|
panel.addNumber( null, f.end, (v) => {
|
|
10154
10182
|
f.end = v;
|
|
10155
10183
|
const inUse = ( f.start != f.min || f.end != f.max );
|
|
10156
|
-
spanName.innerHTML = icon.innerHTML + f.name + ( inUse ? separatorHtml + LX.badge( `${ f.start } - ${ f.end } ${ f.units ?? "" }`, "bg-tertiary text-sm" ) : "" );
|
|
10184
|
+
spanName.innerHTML = icon.innerHTML + f.name + ( inUse ? separatorHtml + LX.badge( `${ f.start } - ${ f.end } ${ f.units ?? "" }`, "bg-tertiary fg-secondary text-sm border-0" ) : "" );
|
|
10157
10185
|
this.refresh();
|
|
10158
10186
|
}, { skipSlider: true, min: f.min, max: f.max, step: f.step, units: f.units } );
|
|
10159
10187
|
panel.addButton( null, "Reset", () => {
|
|
@@ -10186,7 +10214,7 @@ class Table extends Widget {
|
|
|
10186
10214
|
}
|
|
10187
10215
|
}
|
|
10188
10216
|
this.refresh();
|
|
10189
|
-
}, { title: "Reset filters", icon: "X" } );
|
|
10217
|
+
}, { title: "Reset filters", tooltip: true, icon: "X" } );
|
|
10190
10218
|
headerContainer.appendChild( this._resetCustomFiltersBtn.root );
|
|
10191
10219
|
this._resetCustomFiltersBtn.root.classList.add( "hidden" );
|
|
10192
10220
|
}
|
|
@@ -10334,7 +10362,7 @@ class Table extends Widget {
|
|
|
10334
10362
|
let movePending = null;
|
|
10335
10363
|
|
|
10336
10364
|
document.addEventListener( 'mouseup', (e) => {
|
|
10337
|
-
if(
|
|
10365
|
+
if( rIdx === null ) return;
|
|
10338
10366
|
document.removeEventListener( "mousemove", onMove );
|
|
10339
10367
|
const fromRow = table.rows[ rIdx ];
|
|
10340
10368
|
fromRow.dY = 0;
|
|
@@ -10348,14 +10376,33 @@ class Table extends Widget {
|
|
|
10348
10376
|
if( movePending )
|
|
10349
10377
|
{
|
|
10350
10378
|
// Modify inner data first
|
|
10379
|
+
// Origin row should go to the target row, and the rest should be moved up/down
|
|
10351
10380
|
const fromIdx = rIdx - 1;
|
|
10352
10381
|
const targetIdx = movePending[ 1 ] - 1;
|
|
10353
|
-
|
|
10354
|
-
|
|
10382
|
+
const b = data.body[ fromIdx ];
|
|
10383
|
+
let targetOffset = 0;
|
|
10384
|
+
|
|
10385
|
+
if( fromIdx == targetIdx ) return;
|
|
10386
|
+
if( fromIdx > targetIdx ) // Move up
|
|
10387
|
+
{
|
|
10388
|
+
for( let i = fromIdx; i > targetIdx; --i )
|
|
10389
|
+
{
|
|
10390
|
+
data.body[ i ] = data.body[ i - 1 ];
|
|
10391
|
+
}
|
|
10392
|
+
}
|
|
10393
|
+
else // Move down
|
|
10394
|
+
{
|
|
10395
|
+
targetOffset = 1;
|
|
10396
|
+
for( let i = fromIdx; i < targetIdx; ++i )
|
|
10397
|
+
{
|
|
10398
|
+
data.body[ i ] = data.body[ i + 1 ];
|
|
10399
|
+
}
|
|
10400
|
+
}
|
|
10401
|
+
|
|
10355
10402
|
data.body[targetIdx] = b;
|
|
10356
10403
|
|
|
10357
10404
|
const parent = movePending[ 0 ].parentNode;
|
|
10358
|
-
parent.insertChildAtIndex( movePending[ 0 ],
|
|
10405
|
+
parent.insertChildAtIndex( movePending[ 0 ], targetIdx + targetOffset );
|
|
10359
10406
|
movePending = null;
|
|
10360
10407
|
}
|
|
10361
10408
|
|
|
@@ -10411,7 +10458,7 @@ class Table extends Widget {
|
|
|
10411
10458
|
}
|
|
10412
10459
|
}
|
|
10413
10460
|
|
|
10414
|
-
const show = Object.values( acfMap ).reduce( ( e, acc ) => acc *= e );
|
|
10461
|
+
const show = Object.values( acfMap ).reduce( ( e, acc ) => acc *= e, true );
|
|
10415
10462
|
if( !show )
|
|
10416
10463
|
{
|
|
10417
10464
|
continue;
|
|
@@ -10446,7 +10493,7 @@ class Table extends Widget {
|
|
|
10446
10493
|
}
|
|
10447
10494
|
}
|
|
10448
10495
|
|
|
10449
|
-
const show = Object.values( acfMap ).reduce( ( e, acc ) => acc *= e );
|
|
10496
|
+
const show = Object.values( acfMap ).reduce( ( e, acc ) => acc *= e, true );
|
|
10450
10497
|
if( !show )
|
|
10451
10498
|
{
|
|
10452
10499
|
continue;
|
|
@@ -10480,7 +10527,7 @@ class Table extends Widget {
|
|
|
10480
10527
|
row.addEventListener("mouseenter", function(e) {
|
|
10481
10528
|
e.preventDefault();
|
|
10482
10529
|
|
|
10483
|
-
if( rIdx && ( this.rowIndex != rIdx ) && ( eventCatched != this.rowIndex ) )
|
|
10530
|
+
if( rIdx != null && ( this.rowIndex != rIdx ) && ( eventCatched != this.rowIndex ) )
|
|
10484
10531
|
{
|
|
10485
10532
|
eventCatched = this.rowIndex;
|
|
10486
10533
|
const fromRow = table.rows[ rIdx ];
|
|
@@ -10489,7 +10536,7 @@ class Table extends Widget {
|
|
|
10489
10536
|
movePending = [ fromRow, undo ? (this.rowIndex-1) : this.rowIndex ];
|
|
10490
10537
|
this.style.transform = undo ? `` : `translateY(-${this.offsetHeight}px)`;
|
|
10491
10538
|
} else {
|
|
10492
|
-
movePending = [ fromRow, undo ? (this.rowIndex) : (this.rowIndex
|
|
10539
|
+
movePending = [ fromRow, undo ? (this.rowIndex+1) : (this.rowIndex) ];
|
|
10493
10540
|
this.style.transform = undo ? `` : `translateY(${this.offsetHeight}px)`;
|
|
10494
10541
|
}
|
|
10495
10542
|
doAsync( () => {
|
|
@@ -10700,6 +10747,53 @@ class DatePicker extends Widget {
|
|
|
10700
10747
|
|
|
10701
10748
|
LX.DatePicker = DatePicker;
|
|
10702
10749
|
|
|
10750
|
+
/**
|
|
10751
|
+
* @class Map2D
|
|
10752
|
+
* @description Map2D Widget
|
|
10753
|
+
*/
|
|
10754
|
+
|
|
10755
|
+
class Map2D extends Widget {
|
|
10756
|
+
|
|
10757
|
+
constructor( name, points, callback, options = {} ) {
|
|
10758
|
+
|
|
10759
|
+
super( Widget.MAP2D, name, null, options );
|
|
10760
|
+
|
|
10761
|
+
this.onGetValue = () => {
|
|
10762
|
+
return this.map2d.weightsObj;
|
|
10763
|
+
};
|
|
10764
|
+
|
|
10765
|
+
this.onSetValue = ( newValue, skipCallback, event ) => {
|
|
10766
|
+
// if( !skipCallback )
|
|
10767
|
+
// {
|
|
10768
|
+
// this._trigger( new IEvent( name, curveInstance.element.value, event ), callback );
|
|
10769
|
+
// }
|
|
10770
|
+
};
|
|
10771
|
+
|
|
10772
|
+
this.onResize = ( rect ) => {
|
|
10773
|
+
const realNameWidth = ( this.root.domName?.style.width ?? "0px" );
|
|
10774
|
+
container.style.width = `calc( 100% - ${ realNameWidth })`;
|
|
10775
|
+
};
|
|
10776
|
+
|
|
10777
|
+
var container = document.createElement( "div" );
|
|
10778
|
+
container.className = "lexmap2d";
|
|
10779
|
+
this.root.appendChild( container );
|
|
10780
|
+
|
|
10781
|
+
this.map2d = new CanvasMap2D( points, callback, options );
|
|
10782
|
+
|
|
10783
|
+
const calendarIcon = LX.makeIcon( "SquareMousePointer" );
|
|
10784
|
+
const calendarButton = new Button( null, "Open Map", () => {
|
|
10785
|
+
this._popover = new Popover( calendarButton.root, [ this.map2d ] );
|
|
10786
|
+
}, { buttonClass: `flex flex-row px-3 fg-secondary justify-between` } );
|
|
10787
|
+
|
|
10788
|
+
calendarButton.root.querySelector( "button" ).appendChild( calendarIcon );
|
|
10789
|
+
container.appendChild( calendarButton.root );
|
|
10790
|
+
|
|
10791
|
+
doAsync( this.onResize.bind( this ) );
|
|
10792
|
+
}
|
|
10793
|
+
}
|
|
10794
|
+
|
|
10795
|
+
LX.Map2D = Map2D;
|
|
10796
|
+
|
|
10703
10797
|
/**
|
|
10704
10798
|
* @class Panel
|
|
10705
10799
|
*/
|
|
@@ -10803,7 +10897,7 @@ class Panel {
|
|
|
10803
10897
|
const signal = this.widgets[ w ].options.signal;
|
|
10804
10898
|
for( let i = 0; i < LX.signals[signal].length; i++ )
|
|
10805
10899
|
{
|
|
10806
|
-
if( LX.signals[signal][i] == this.widgets[ w ] )
|
|
10900
|
+
if( LX.signals[signal][ i ] == this.widgets[ w ] )
|
|
10807
10901
|
{
|
|
10808
10902
|
LX.signals[signal] = [...LX.signals[signal].slice(0, i), ...LX.signals[signal].slice(i+1)];
|
|
10809
10903
|
}
|
|
@@ -10815,11 +10909,11 @@ class Panel {
|
|
|
10815
10909
|
{
|
|
10816
10910
|
for( let w = 0; w < this.signals.length; w++ )
|
|
10817
10911
|
{
|
|
10818
|
-
let widget = Object.values(this.signals[ w ])[0];
|
|
10912
|
+
let widget = Object.values(this.signals[ w ])[ 0 ];
|
|
10819
10913
|
let signal = widget.options.signal;
|
|
10820
10914
|
for( let i = 0; i < LX.signals[signal].length; i++ )
|
|
10821
10915
|
{
|
|
10822
|
-
if( LX.signals[signal][i] == widget )
|
|
10916
|
+
if( LX.signals[signal][ i ] == widget )
|
|
10823
10917
|
{
|
|
10824
10918
|
LX.signals[signal] = [...LX.signals[signal].slice(0, i), ...LX.signals[signal].slice(i+1)];
|
|
10825
10919
|
}
|
|
@@ -11872,6 +11966,19 @@ class Panel {
|
|
|
11872
11966
|
const widget = new DatePicker( name, dateString, callback, options );
|
|
11873
11967
|
return this._attachWidget( widget );
|
|
11874
11968
|
}
|
|
11969
|
+
|
|
11970
|
+
/**
|
|
11971
|
+
* @method addMap2D
|
|
11972
|
+
* @param {String} name Widget name
|
|
11973
|
+
* @param {Array} points
|
|
11974
|
+
* @param {Function} callback
|
|
11975
|
+
* @param {Object} options:
|
|
11976
|
+
*/
|
|
11977
|
+
|
|
11978
|
+
addMap2D( name, points, callback, options = { } ) {
|
|
11979
|
+
const widget = new Map2D( name, points, callback, options );
|
|
11980
|
+
return this._attachWidget( widget );
|
|
11981
|
+
}
|
|
11875
11982
|
}
|
|
11876
11983
|
|
|
11877
11984
|
LX.Panel = Panel;
|
|
@@ -12020,7 +12127,7 @@ class Branch {
|
|
|
12020
12127
|
this.grabber = grabber;
|
|
12021
12128
|
|
|
12022
12129
|
function getBranchHeight() {
|
|
12023
|
-
return that.root.offsetHeight - that.root.children[0].offsetHeight;
|
|
12130
|
+
return that.root.offsetHeight - that.root.children[ 0 ].offsetHeight;
|
|
12024
12131
|
}
|
|
12025
12132
|
|
|
12026
12133
|
let that = this;
|
|
@@ -12480,7 +12587,7 @@ class PocketDialog extends Dialog {
|
|
|
12480
12587
|
if( this.size )
|
|
12481
12588
|
{
|
|
12482
12589
|
if( !this.minimized ) this.root.style.height = "auto";
|
|
12483
|
-
else this.root.style.height = this.size[1];
|
|
12590
|
+
else this.root.style.height = this.size[ 1 ];
|
|
12484
12591
|
}
|
|
12485
12592
|
|
|
12486
12593
|
this.root.classList.toggle("minimized");
|
|
@@ -12499,7 +12606,7 @@ class PocketDialog extends Dialog {
|
|
|
12499
12606
|
{
|
|
12500
12607
|
for( let i = 0; i < float.length; i++ )
|
|
12501
12608
|
{
|
|
12502
|
-
const t = float[i];
|
|
12609
|
+
const t = float[ i ];
|
|
12503
12610
|
switch( t )
|
|
12504
12611
|
{
|
|
12505
12612
|
case 'b':
|
|
@@ -12789,7 +12896,7 @@ class ContextMenu {
|
|
|
12789
12896
|
return;
|
|
12790
12897
|
}
|
|
12791
12898
|
|
|
12792
|
-
if( children.find( c => Object.keys(c)[0] == key ) == null )
|
|
12899
|
+
if( children.find( c => Object.keys(c)[ 0 ] == key ) == null )
|
|
12793
12900
|
{
|
|
12794
12901
|
const parent = {};
|
|
12795
12902
|
parent[ key ] = [];
|
|
@@ -12830,7 +12937,7 @@ class ContextMenu {
|
|
|
12830
12937
|
|
|
12831
12938
|
setColor( token, color ) {
|
|
12832
12939
|
|
|
12833
|
-
if(color[0] !== '#')
|
|
12940
|
+
if(color[ 0 ] !== '#')
|
|
12834
12941
|
color = rgbToHex(color);
|
|
12835
12942
|
|
|
12836
12943
|
this.colors[ token ] = color;
|
|
@@ -12934,8 +13041,8 @@ class CanvasCurve {
|
|
|
12934
13041
|
element.resample = function( samples ) {
|
|
12935
13042
|
|
|
12936
13043
|
let r = [];
|
|
12937
|
-
let dx = (element.xrange[1] - element.xrange[ 0 ]) / samples;
|
|
12938
|
-
for( let i = element.xrange[0]; i <= element.xrange[1]; i += dx )
|
|
13044
|
+
let dx = (element.xrange[ 1 ] - element.xrange[ 0 ]) / samples;
|
|
13045
|
+
for( let i = element.xrange[ 0 ]; i <= element.xrange[ 1 ]; i += dx )
|
|
12939
13046
|
{
|
|
12940
13047
|
r.push( element.getValueAt(i) );
|
|
12941
13048
|
}
|
|
@@ -12946,8 +13053,8 @@ class CanvasCurve {
|
|
|
12946
13053
|
|
|
12947
13054
|
for( let i = 0; i < element.value; i++ )
|
|
12948
13055
|
{
|
|
12949
|
-
let value = element.value[i];
|
|
12950
|
-
if(value[0] < v[0]) continue;
|
|
13056
|
+
let value = element.value[ i ];
|
|
13057
|
+
if(value[ 0 ] < v[ 0 ]) continue;
|
|
12951
13058
|
element.value.splice(i,0,v);
|
|
12952
13059
|
redraw();
|
|
12953
13060
|
return;
|
|
@@ -12959,14 +13066,14 @@ class CanvasCurve {
|
|
|
12959
13066
|
|
|
12960
13067
|
//value to canvas
|
|
12961
13068
|
function convert(v) {
|
|
12962
|
-
return [ canvas.width * ( v[0] - element.xrange[0])/ (element.xrange[1]),
|
|
12963
|
-
canvas.height * (v[1] - element.yrange[0])/ (element.yrange[1])];
|
|
13069
|
+
return [ canvas.width * ( v[ 0 ] - element.xrange[ 0 ])/ (element.xrange[ 1 ]),
|
|
13070
|
+
canvas.height * (v[ 1 ] - element.yrange[ 0 ])/ (element.yrange[ 1 ])];
|
|
12964
13071
|
}
|
|
12965
13072
|
|
|
12966
13073
|
//canvas to value
|
|
12967
13074
|
function unconvert(v) {
|
|
12968
|
-
return [(v[0] * element.xrange[1] / canvas.width + element.xrange[0]),
|
|
12969
|
-
(v[1] * element.yrange[1] / canvas.height + element.yrange[0])];
|
|
13075
|
+
return [(v[ 0 ] * element.xrange[ 1 ] / canvas.width + element.xrange[ 0 ]),
|
|
13076
|
+
(v[ 1 ] * element.yrange[ 1 ] / canvas.height + element.yrange[ 0 ])];
|
|
12970
13077
|
}
|
|
12971
13078
|
|
|
12972
13079
|
let selected = -1;
|
|
@@ -13154,7 +13261,7 @@ class CanvasCurve {
|
|
|
13154
13261
|
options.callback.call( element, element.value, e );
|
|
13155
13262
|
}
|
|
13156
13263
|
|
|
13157
|
-
function distance(a,b) { return Math.sqrt( Math.pow(b[0]-a[0],2) + Math.pow(b[1]-a[1],2) ); };
|
|
13264
|
+
function distance(a,b) { return Math.sqrt( Math.pow(b[ 0 ]-a[ 0 ],2) + Math.pow(b[ 1 ]-a[ 1 ],2) ); };
|
|
13158
13265
|
|
|
13159
13266
|
function computeSelected( x, y ) {
|
|
13160
13267
|
|
|
@@ -13266,8 +13373,8 @@ class CanvasDial {
|
|
|
13266
13373
|
element.resample = function( samples ) {
|
|
13267
13374
|
|
|
13268
13375
|
var r = [];
|
|
13269
|
-
var dx = (element.xrange[1] - element.xrange[ 0 ]) / samples;
|
|
13270
|
-
for( var i = element.xrange[0]; i <= element.xrange[1]; i += dx)
|
|
13376
|
+
var dx = (element.xrange[ 1 ] - element.xrange[ 0 ]) / samples;
|
|
13377
|
+
for( var i = element.xrange[ 0 ]; i <= element.xrange[ 1 ]; i += dx)
|
|
13271
13378
|
{
|
|
13272
13379
|
r.push( element.getValueAt(i) );
|
|
13273
13380
|
}
|
|
@@ -13292,15 +13399,15 @@ class CanvasDial {
|
|
|
13292
13399
|
//value to canvas
|
|
13293
13400
|
function convert(v, r) {
|
|
13294
13401
|
|
|
13295
|
-
Math.pow(v[0],2)
|
|
13296
|
-
return [ canvas.width * ( v[0] - element.xrange[0])/ (element.xrange[1]),
|
|
13297
|
-
canvas.height * (v[1] - element.yrange[0])/ (element.yrange[1])];
|
|
13402
|
+
Math.pow(v[ 0 ],2)
|
|
13403
|
+
return [ canvas.width * ( v[ 0 ] - element.xrange[ 0 ])/ (element.xrange[ 1 ]),
|
|
13404
|
+
canvas.height * (v[ 1 ] - element.yrange[ 0 ])/ (element.yrange[ 1 ])];
|
|
13298
13405
|
}
|
|
13299
13406
|
|
|
13300
13407
|
//canvas to value
|
|
13301
13408
|
function unconvert(v) {
|
|
13302
|
-
return [(v[0] * element.xrange[1] / canvas.width + element.xrange[0]),
|
|
13303
|
-
(v[1] * element.yrange[1] / canvas.height + element.yrange[0])];
|
|
13409
|
+
return [(v[ 0 ] * element.xrange[ 1 ] / canvas.width + element.xrange[ 0 ]),
|
|
13410
|
+
(v[ 1 ] * element.yrange[ 1 ] / canvas.height + element.yrange[ 0 ])];
|
|
13304
13411
|
}
|
|
13305
13412
|
|
|
13306
13413
|
var selected = -1;
|
|
@@ -13482,7 +13589,7 @@ class CanvasDial {
|
|
|
13482
13589
|
options.callback.call( element, element.value, e );
|
|
13483
13590
|
}
|
|
13484
13591
|
|
|
13485
|
-
function distance(a,b) { return Math.sqrt( Math.pow(b[0]-a[0],2) + Math.pow(b[1]-a[1],2) ); };
|
|
13592
|
+
function distance(a,b) { return Math.sqrt( Math.pow(b[ 0 ]-a[ 0 ],2) + Math.pow(b[ 1 ]-a[ 1 ],2) ); };
|
|
13486
13593
|
|
|
13487
13594
|
function computeSelected( x, y ) {
|
|
13488
13595
|
|
|
@@ -13527,6 +13634,439 @@ class CanvasDial {
|
|
|
13527
13634
|
|
|
13528
13635
|
LX.Dial = Dial;
|
|
13529
13636
|
|
|
13637
|
+
// Based on LGraphMap2D from @tamats (jagenjo)
|
|
13638
|
+
// https://github.com/jagenjo/litescene.js
|
|
13639
|
+
class CanvasMap2D {
|
|
13640
|
+
|
|
13641
|
+
static COLORS = [ [255, 0, 0], [0, 255, 0], [0, 0, 255], [0, 128, 128], [128, 0, 128], [128, 128, 0], [255, 128, 0], [255, 0, 128], [0, 128, 255], [128, 0, 255] ];
|
|
13642
|
+
static GRID_SIZE = 64;
|
|
13643
|
+
|
|
13644
|
+
/**
|
|
13645
|
+
* @constructor Map2D
|
|
13646
|
+
* @param {Array} initialPoints
|
|
13647
|
+
* @param {Function} callback
|
|
13648
|
+
* @param {Object} options
|
|
13649
|
+
* circular
|
|
13650
|
+
* showNames
|
|
13651
|
+
* size
|
|
13652
|
+
*/
|
|
13653
|
+
|
|
13654
|
+
constructor( initialPoints, callback, options = {} ) {
|
|
13655
|
+
|
|
13656
|
+
this.circular = options.circular ?? false;
|
|
13657
|
+
this.showNames = options.showNames ?? true;
|
|
13658
|
+
this.size = options.size ?? [ 200, 200 ];
|
|
13659
|
+
|
|
13660
|
+
this.points = initialPoints ?? [];
|
|
13661
|
+
this.callback = callback;
|
|
13662
|
+
this.weights = [];
|
|
13663
|
+
this.weightsObj = {};
|
|
13664
|
+
this.currentPosition = new LX.vec2( 0.5, 0.5 );
|
|
13665
|
+
this.circleCenter = [ 0, 0 ];
|
|
13666
|
+
this.circleRadius = 1;
|
|
13667
|
+
this.margin = 8;
|
|
13668
|
+
this.dragging = false;
|
|
13669
|
+
|
|
13670
|
+
this._valuesChanged = true;
|
|
13671
|
+
this._selectedPoint = null;
|
|
13672
|
+
|
|
13673
|
+
this.root = LX.makeContainer( ["auto", "auto"] );
|
|
13674
|
+
this.root.tabIndex = "1";
|
|
13675
|
+
|
|
13676
|
+
this.root.addEventListener( "mousedown", innerMouseDown );
|
|
13677
|
+
|
|
13678
|
+
const that = this;
|
|
13679
|
+
|
|
13680
|
+
function innerMouseDown( e )
|
|
13681
|
+
{
|
|
13682
|
+
var doc = that.root.ownerDocument;
|
|
13683
|
+
doc.addEventListener("mouseup", innerMouseUp);
|
|
13684
|
+
doc.addEventListener("mousemove", innerMouseMove);
|
|
13685
|
+
e.stopPropagation();
|
|
13686
|
+
e.preventDefault();
|
|
13687
|
+
|
|
13688
|
+
that.dragging = true;
|
|
13689
|
+
return true;
|
|
13690
|
+
}
|
|
13691
|
+
|
|
13692
|
+
function innerMouseMove( e )
|
|
13693
|
+
{
|
|
13694
|
+
if( !that.dragging )
|
|
13695
|
+
{
|
|
13696
|
+
return;
|
|
13697
|
+
}
|
|
13698
|
+
|
|
13699
|
+
const margin = that.margin;
|
|
13700
|
+
const rect = that.root.getBoundingClientRect();
|
|
13701
|
+
|
|
13702
|
+
let pos = new LX.vec2();
|
|
13703
|
+
pos.set( e.x - rect.x - that.size[ 0 ] * 0.5, e.y - rect.y - that.size[ 1 ] * 0.5 );
|
|
13704
|
+
var cpos = that.currentPosition;
|
|
13705
|
+
cpos.set(
|
|
13706
|
+
LX.clamp( pos.x / ( that.size[ 0 ] * 0.5 - margin ), -1, 1 ),
|
|
13707
|
+
LX.clamp( pos.y / ( that.size[ 1 ] * 0.5 - margin ), -1, 1 )
|
|
13708
|
+
);
|
|
13709
|
+
|
|
13710
|
+
if( that.circular )
|
|
13711
|
+
{
|
|
13712
|
+
const center = new LX.vec2( 0, 0 );
|
|
13713
|
+
const dist = cpos.dst( center );
|
|
13714
|
+
if( dist > 1 )
|
|
13715
|
+
{
|
|
13716
|
+
cpos = cpos.nrm();
|
|
13717
|
+
}
|
|
13718
|
+
}
|
|
13719
|
+
|
|
13720
|
+
that.renderToCanvas( that.canvas.getContext( "2d", { willReadFrequently: true } ), that.canvas );
|
|
13721
|
+
|
|
13722
|
+
that.computeWeights( cpos );
|
|
13723
|
+
|
|
13724
|
+
if( that.callback )
|
|
13725
|
+
{
|
|
13726
|
+
that.callback( that.weightsObj, that.weights, cpos );
|
|
13727
|
+
}
|
|
13728
|
+
|
|
13729
|
+
return true;
|
|
13730
|
+
}
|
|
13731
|
+
|
|
13732
|
+
function innerMouseUp( e )
|
|
13733
|
+
{
|
|
13734
|
+
that.dragging = false;
|
|
13735
|
+
|
|
13736
|
+
var doc = that.root.ownerDocument;
|
|
13737
|
+
doc.removeEventListener("mouseup", innerMouseUp);
|
|
13738
|
+
doc.removeEventListener("mousemove", innerMouseMove);
|
|
13739
|
+
}
|
|
13740
|
+
|
|
13741
|
+
this.canvas = document.createElement( "canvas" );
|
|
13742
|
+
this.canvas.width = this.size[ 0 ];
|
|
13743
|
+
this.canvas.height = this.size[ 1 ];
|
|
13744
|
+
this.root.appendChild( this.canvas );
|
|
13745
|
+
|
|
13746
|
+
const ctx = this.canvas.getContext( "2d", { willReadFrequently: true } );
|
|
13747
|
+
this.renderToCanvas( ctx, this.canvas );
|
|
13748
|
+
}
|
|
13749
|
+
|
|
13750
|
+
/**
|
|
13751
|
+
* @method computeWeights
|
|
13752
|
+
* @param {LX.vec2} p
|
|
13753
|
+
* @description Iterate for every cell to see if our point is nearer to the cell than the nearest point of the cell,
|
|
13754
|
+
* If that is the case we increase the weight of the nearest point. At the end we normalize the weights of the points by the number of near points
|
|
13755
|
+
* and that give us the weight for every point
|
|
13756
|
+
*/
|
|
13757
|
+
|
|
13758
|
+
computeWeights( p ) {
|
|
13759
|
+
|
|
13760
|
+
if( !this.points.length )
|
|
13761
|
+
{
|
|
13762
|
+
return;
|
|
13763
|
+
}
|
|
13764
|
+
|
|
13765
|
+
let values = this._precomputedWeights;
|
|
13766
|
+
if( !values || this._valuesChanged )
|
|
13767
|
+
{
|
|
13768
|
+
values = this.precomputeWeights();
|
|
13769
|
+
}
|
|
13770
|
+
|
|
13771
|
+
let weights = this.weights;
|
|
13772
|
+
weights.length = this.points.length;
|
|
13773
|
+
for(var i = 0; i < weights.length; ++i)
|
|
13774
|
+
{
|
|
13775
|
+
weights[ i ] = 0;
|
|
13776
|
+
}
|
|
13777
|
+
|
|
13778
|
+
const gridSize = CanvasMap2D.GRID_SIZE;
|
|
13779
|
+
|
|
13780
|
+
let totalInside = 0;
|
|
13781
|
+
let pos2 = new LX.vec2();
|
|
13782
|
+
|
|
13783
|
+
for( var y = 0; y < gridSize; ++y )
|
|
13784
|
+
{
|
|
13785
|
+
for( var x = 0; x < gridSize; ++x )
|
|
13786
|
+
{
|
|
13787
|
+
pos2.set( ( x / gridSize) * 2 - 1, ( y / gridSize ) * 2 - 1 );
|
|
13788
|
+
|
|
13789
|
+
var dataPos = x * 2 + y * gridSize * 2;
|
|
13790
|
+
var pointIdx = values[ dataPos ];
|
|
13791
|
+
|
|
13792
|
+
var isInside = p.dst( pos2 ) < ( values[ dataPos + 1] + 0.001 ); // epsilon
|
|
13793
|
+
if( isInside )
|
|
13794
|
+
{
|
|
13795
|
+
weights[ pointIdx ] += 1;
|
|
13796
|
+
totalInside++;
|
|
13797
|
+
}
|
|
13798
|
+
}
|
|
13799
|
+
}
|
|
13800
|
+
|
|
13801
|
+
for( var i = 0; i < weights.length; ++i )
|
|
13802
|
+
{
|
|
13803
|
+
weights[ i ] /= totalInside;
|
|
13804
|
+
this.weightsObj[ this.points[ i ].name ] = weights[ i ];
|
|
13805
|
+
}
|
|
13806
|
+
|
|
13807
|
+
return weights;
|
|
13808
|
+
}
|
|
13809
|
+
|
|
13810
|
+
/**
|
|
13811
|
+
* @method precomputeWeights
|
|
13812
|
+
* @description Precompute for every cell, which is the closest point of the points set and how far it is from the center of the cell
|
|
13813
|
+
* We store point index and distance in this._precomputedWeights. This is done only when the points set change
|
|
13814
|
+
*/
|
|
13815
|
+
|
|
13816
|
+
precomputeWeights() {
|
|
13817
|
+
|
|
13818
|
+
this._valuesChanged = false;
|
|
13819
|
+
|
|
13820
|
+
const numPoints = this.points.length;
|
|
13821
|
+
const gridSize = CanvasMap2D.GRID_SIZE;
|
|
13822
|
+
const totalNums = 2 * gridSize * gridSize;
|
|
13823
|
+
|
|
13824
|
+
let position = new LX.vec2();
|
|
13825
|
+
|
|
13826
|
+
if( !this._precomputedWeights || this._precomputedWeights.length != totalNums )
|
|
13827
|
+
{
|
|
13828
|
+
this._precomputedWeights = new Float32Array( totalNums );
|
|
13829
|
+
}
|
|
13830
|
+
|
|
13831
|
+
let values = this._precomputedWeights;
|
|
13832
|
+
this._precomputedWeightsGridSize = gridSize;
|
|
13833
|
+
|
|
13834
|
+
for( let y = 0; y < gridSize; ++y )
|
|
13835
|
+
{
|
|
13836
|
+
for( let x = 0; x < gridSize; ++x )
|
|
13837
|
+
{
|
|
13838
|
+
let nearest = -1;
|
|
13839
|
+
let minDistance = 100000;
|
|
13840
|
+
|
|
13841
|
+
for( let i = 0; i < numPoints; ++i )
|
|
13842
|
+
{
|
|
13843
|
+
position.set( ( x / gridSize ) * 2 - 1, ( y / gridSize ) * 2 - 1 );
|
|
13844
|
+
|
|
13845
|
+
let pointPosition = new LX.vec2();
|
|
13846
|
+
pointPosition.fromArray( this.points[ i ].pos );
|
|
13847
|
+
let dist = position.dst( pointPosition );
|
|
13848
|
+
if( dist > minDistance )
|
|
13849
|
+
{
|
|
13850
|
+
continue;
|
|
13851
|
+
}
|
|
13852
|
+
|
|
13853
|
+
nearest = i;
|
|
13854
|
+
minDistance = dist;
|
|
13855
|
+
}
|
|
13856
|
+
|
|
13857
|
+
values[ x * 2 + y * 2 * gridSize ] = nearest;
|
|
13858
|
+
values[ x * 2 + y * 2 * gridSize + 1 ] = minDistance;
|
|
13859
|
+
}
|
|
13860
|
+
}
|
|
13861
|
+
|
|
13862
|
+
return values;
|
|
13863
|
+
}
|
|
13864
|
+
|
|
13865
|
+
/**
|
|
13866
|
+
* @method precomputeWeightsToImage
|
|
13867
|
+
* @param {LX.vec2} p
|
|
13868
|
+
*/
|
|
13869
|
+
|
|
13870
|
+
precomputeWeightsToImage( p ) {
|
|
13871
|
+
|
|
13872
|
+
if( !this.points.length )
|
|
13873
|
+
{
|
|
13874
|
+
return null;
|
|
13875
|
+
}
|
|
13876
|
+
|
|
13877
|
+
const gridSize = CanvasMap2D.GRID_SIZE;
|
|
13878
|
+
var values = this._precomputedWeights;
|
|
13879
|
+
if( !values || this._valuesChanged || this._precomputedWeightsGridSize != gridSize )
|
|
13880
|
+
{
|
|
13881
|
+
values = this.precomputeWeights();
|
|
13882
|
+
}
|
|
13883
|
+
|
|
13884
|
+
var canvas = this.imageCanvas;
|
|
13885
|
+
if( !canvas )
|
|
13886
|
+
{
|
|
13887
|
+
canvas = this.imageCanvas = document.createElement( "canvas" );
|
|
13888
|
+
}
|
|
13889
|
+
|
|
13890
|
+
canvas.width = canvas.height = gridSize;
|
|
13891
|
+
var ctx = canvas.getContext( "2d", { willReadFrequently: true } );
|
|
13892
|
+
|
|
13893
|
+
var weights = this.weights;
|
|
13894
|
+
weights.length = this.points.length;
|
|
13895
|
+
for (var i = 0; i < weights.length; ++i)
|
|
13896
|
+
{
|
|
13897
|
+
weights[ i ] = 0;
|
|
13898
|
+
}
|
|
13899
|
+
|
|
13900
|
+
let totalInside = 0;
|
|
13901
|
+
let pixels = ctx.getImageData( 0, 0, gridSize, gridSize );
|
|
13902
|
+
let pos2 = new LX.vec2();
|
|
13903
|
+
|
|
13904
|
+
for( var y = 0; y < gridSize; ++y )
|
|
13905
|
+
{
|
|
13906
|
+
for( var x = 0; x < gridSize; ++x )
|
|
13907
|
+
{
|
|
13908
|
+
pos2.set( ( x / gridSize ) * 2 - 1, ( y / gridSize ) * 2 - 1 );
|
|
13909
|
+
|
|
13910
|
+
const pixelPos = x * 4 + y * gridSize * 4;
|
|
13911
|
+
const dataPos = x * 2 + y * gridSize * 2;
|
|
13912
|
+
const pointIdx = values[ dataPos ];
|
|
13913
|
+
const c = CanvasMap2D.COLORS[ pointIdx % CanvasMap2D.COLORS.length ];
|
|
13914
|
+
|
|
13915
|
+
var isInside = p.dst( pos2 ) < ( values[ dataPos + 1 ] + 0.001 );
|
|
13916
|
+
if( isInside )
|
|
13917
|
+
{
|
|
13918
|
+
weights[ pointIdx ] += 1;
|
|
13919
|
+
totalInside++;
|
|
13920
|
+
}
|
|
13921
|
+
|
|
13922
|
+
pixels.data[ pixelPos ] = c[ 0 ] + ( isInside ? 128 : 0 );
|
|
13923
|
+
pixels.data[ pixelPos + 1 ] = c[ 1 ] + ( isInside ? 128 : 0 );
|
|
13924
|
+
pixels.data[ pixelPos + 2 ] = c[ 2 ] + ( isInside ? 128 : 0 );
|
|
13925
|
+
pixels.data[ pixelPos + 3 ] = 255;
|
|
13926
|
+
}
|
|
13927
|
+
}
|
|
13928
|
+
|
|
13929
|
+
for( let i = 0; i < weights.length; ++i )
|
|
13930
|
+
{
|
|
13931
|
+
weights[ i ] /= totalInside;
|
|
13932
|
+
}
|
|
13933
|
+
|
|
13934
|
+
ctx.putImageData( pixels, 0, 0 );
|
|
13935
|
+
return canvas;
|
|
13936
|
+
}
|
|
13937
|
+
|
|
13938
|
+
addPoint( name, pos ) {
|
|
13939
|
+
if( this.findPoint( name ) )
|
|
13940
|
+
{
|
|
13941
|
+
console.warn("CanvasMap2D.addPoint: There is already a point with that name" );
|
|
13942
|
+
return;
|
|
13943
|
+
}
|
|
13944
|
+
|
|
13945
|
+
if( !pos )
|
|
13946
|
+
{
|
|
13947
|
+
pos = [ this.currentPosition[ 0 ], this.currentPosition[ 1 ] ];
|
|
13948
|
+
}
|
|
13949
|
+
|
|
13950
|
+
pos[ 0 ] = LX.clamp( pos[ 0 ], -1, 1 );
|
|
13951
|
+
pos[ 1 ] = LX.clamp( pos[ 1 ], -1, 1 );
|
|
13952
|
+
|
|
13953
|
+
const point = { name, pos };
|
|
13954
|
+
this.points.push( point );
|
|
13955
|
+
this._valuesChanged = true;
|
|
13956
|
+
return point;
|
|
13957
|
+
}
|
|
13958
|
+
|
|
13959
|
+
removePoint( name ) {
|
|
13960
|
+
const removeIdx = this.points.findIndex( (p) => p.name == name );
|
|
13961
|
+
if( removeIdx > -1 )
|
|
13962
|
+
{
|
|
13963
|
+
this.points.splice( removeIdx, 1 );
|
|
13964
|
+
this._valuesChanged = true;
|
|
13965
|
+
}
|
|
13966
|
+
}
|
|
13967
|
+
|
|
13968
|
+
findPoint( name ) {
|
|
13969
|
+
return this.points.find( p => p.name == name );
|
|
13970
|
+
}
|
|
13971
|
+
|
|
13972
|
+
clear() {
|
|
13973
|
+
this.points.length = 0;
|
|
13974
|
+
this._precomputedWeights = null;
|
|
13975
|
+
this._canvas = null;
|
|
13976
|
+
this._selectedPoint = null;
|
|
13977
|
+
}
|
|
13978
|
+
|
|
13979
|
+
renderToCanvas( ctx, canvas ) {
|
|
13980
|
+
|
|
13981
|
+
const margin = this.margin;
|
|
13982
|
+
const w = this.size[ 0 ];
|
|
13983
|
+
const h = this.size[ 1 ];
|
|
13984
|
+
|
|
13985
|
+
ctx.fillStyle = "black";
|
|
13986
|
+
ctx.strokeStyle = "#BBB";
|
|
13987
|
+
|
|
13988
|
+
ctx.clearRect( 0, 0, w, h );
|
|
13989
|
+
|
|
13990
|
+
if( this.circular )
|
|
13991
|
+
{
|
|
13992
|
+
this.circleCenter[ 0 ] = w * 0.5;
|
|
13993
|
+
this.circleCenter[ 1 ] = h * 0.5;
|
|
13994
|
+
this.circleRadius = h * 0.5 - margin;
|
|
13995
|
+
|
|
13996
|
+
ctx.lineWidth = 1;
|
|
13997
|
+
ctx.beginPath();
|
|
13998
|
+
ctx.arc( this.circleCenter[ 0 ], this.circleCenter[ 1 ], this.circleRadius, 0, Math.PI * 2 );
|
|
13999
|
+
ctx.fill();
|
|
14000
|
+
ctx.stroke();
|
|
14001
|
+
ctx.beginPath();
|
|
14002
|
+
ctx.moveTo( this.circleCenter[ 0 ] + 0.5, this.circleCenter[ 1 ] - this.circleRadius );
|
|
14003
|
+
ctx.lineTo( this.circleCenter[ 0 ] + 0.5, this.circleCenter[ 1 ] + this.circleRadius );
|
|
14004
|
+
ctx.moveTo( this.circleCenter[ 0 ] - this.circleRadius, this.circleCenter[ 1 ]);
|
|
14005
|
+
ctx.lineTo( this.circleCenter[ 0 ] + this.circleRadius, this.circleCenter[ 1 ]);
|
|
14006
|
+
ctx.stroke();
|
|
14007
|
+
}
|
|
14008
|
+
else
|
|
14009
|
+
{
|
|
14010
|
+
ctx.fillRect( margin, margin, w - margin * 2, h - margin * 2 );
|
|
14011
|
+
ctx.strokeRect( margin, margin, w - margin * 2, h - margin * 2 );
|
|
14012
|
+
}
|
|
14013
|
+
|
|
14014
|
+
var image = this.precomputeWeightsToImage( this.currentPosition );
|
|
14015
|
+
if( image )
|
|
14016
|
+
{
|
|
14017
|
+
ctx.globalAlpha = 0.5;
|
|
14018
|
+
ctx.imageSmoothingEnabled = false;
|
|
14019
|
+
if( this.circular )
|
|
14020
|
+
{
|
|
14021
|
+
ctx.save();
|
|
14022
|
+
ctx.beginPath();
|
|
14023
|
+
ctx.arc( this.circleCenter[ 0 ], this.circleCenter[ 1 ], this.circleRadius, 0, Math.PI * 2 );
|
|
14024
|
+
ctx.clip();
|
|
14025
|
+
ctx.drawImage( image, this.circleCenter[ 0 ] - this.circleRadius, this.circleCenter[ 1 ] - this.circleRadius, this.circleRadius * 2, this.circleRadius * 2 );
|
|
14026
|
+
ctx.restore();
|
|
14027
|
+
}
|
|
14028
|
+
else
|
|
14029
|
+
{
|
|
14030
|
+
ctx.drawImage( image, margin, margin, w - margin * 2, h - margin * 2 );
|
|
14031
|
+
}
|
|
14032
|
+
ctx.imageSmoothingEnabled = true;
|
|
14033
|
+
ctx.globalAlpha = 1;
|
|
14034
|
+
}
|
|
14035
|
+
|
|
14036
|
+
for( let i = 0; i < this.points.length; ++i )
|
|
14037
|
+
{
|
|
14038
|
+
const point = this.points[ i ];
|
|
14039
|
+
let x = point.pos[ 0 ] * 0.5 + 0.5;
|
|
14040
|
+
let y = point.pos[ 1 ] * 0.5 + 0.5;
|
|
14041
|
+
x = x * ( w - margin * 2 ) + margin;
|
|
14042
|
+
y = y * ( h - margin * 2 ) + margin;
|
|
14043
|
+
x = LX.clamp( x, margin, w - margin );
|
|
14044
|
+
y = LX.clamp( y, margin, h - margin );
|
|
14045
|
+
ctx.fillStyle = ( point == this._selectedPoint ) ? "#CDF" : "#BCD";
|
|
14046
|
+
ctx.beginPath();
|
|
14047
|
+
ctx.arc( x, y, 3, 0, Math.PI * 2 );
|
|
14048
|
+
ctx.fill();
|
|
14049
|
+
if( this.showNames )
|
|
14050
|
+
{
|
|
14051
|
+
ctx.fillText( point.name, x + 5, y + 5 );
|
|
14052
|
+
}
|
|
14053
|
+
}
|
|
14054
|
+
|
|
14055
|
+
ctx.fillStyle = "white";
|
|
14056
|
+
ctx.beginPath();
|
|
14057
|
+
var x = this.currentPosition.x * 0.5 + 0.5;
|
|
14058
|
+
var y = this.currentPosition.y * 0.5 + 0.5;
|
|
14059
|
+
x = x * ( w - margin * 2 ) + margin;
|
|
14060
|
+
y = y * ( h - margin * 2 ) + margin;
|
|
14061
|
+
x = LX.clamp( x, margin, w - margin );
|
|
14062
|
+
y = LX.clamp( y, margin, h - margin );
|
|
14063
|
+
ctx.arc( x, y, 4, 0, Math.PI * 2 );
|
|
14064
|
+
ctx.fill();
|
|
14065
|
+
}
|
|
14066
|
+
}
|
|
14067
|
+
|
|
14068
|
+
LX.CanvasMap2D = CanvasMap2D;
|
|
14069
|
+
|
|
13530
14070
|
class AssetViewEvent {
|
|
13531
14071
|
|
|
13532
14072
|
static NONE = 0;
|
|
@@ -14267,7 +14807,7 @@ class AssetView {
|
|
|
14267
14807
|
|
|
14268
14808
|
for( let i = 0; i < e.dataTransfer.files.length; ++i )
|
|
14269
14809
|
{
|
|
14270
|
-
const file = e.dataTransfer.files[i];
|
|
14810
|
+
const file = e.dataTransfer.files[ i ];
|
|
14271
14811
|
|
|
14272
14812
|
const result = this.currentData.find( e => e.id === file.name );
|
|
14273
14813
|
if(result) continue;
|
|
@@ -14482,7 +15022,7 @@ Object.assign(LX, {
|
|
|
14482
15022
|
if( request.data )
|
|
14483
15023
|
{
|
|
14484
15024
|
for( var i in request.data)
|
|
14485
|
-
data.append(i,request.data[i]);
|
|
15025
|
+
data.append(i,request.data[ i ]);
|
|
14486
15026
|
}
|
|
14487
15027
|
|
|
14488
15028
|
xhr.send( data );
|
|
@@ -14547,8 +15087,8 @@ Object.assign(LX, {
|
|
|
14547
15087
|
var script = document.createElement('script');
|
|
14548
15088
|
script.num = i;
|
|
14549
15089
|
script.type = 'text/javascript';
|
|
14550
|
-
script.src = url[i] + ( version ? "?version=" + version : "" );
|
|
14551
|
-
script.original_src = url[i];
|
|
15090
|
+
script.src = url[ i ] + ( version ? "?version=" + version : "" );
|
|
15091
|
+
script.original_src = url[ i ];
|
|
14552
15092
|
script.async = false;
|
|
14553
15093
|
script.onload = function( e ) {
|
|
14554
15094
|
total--;
|
|
@@ -14567,7 +15107,7 @@ Object.assign(LX, {
|
|
|
14567
15107
|
script.onerror = function(err) {
|
|
14568
15108
|
onError(err, this.original_src, this.num );
|
|
14569
15109
|
}
|
|
14570
|
-
document.getElementsByTagName('head')[0].appendChild(script);
|
|
15110
|
+
document.getElementsByTagName('head')[ 0 ].appendChild(script);
|
|
14571
15111
|
}
|
|
14572
15112
|
},
|
|
14573
15113
|
|
|
@@ -14738,13 +15278,13 @@ LX.UTILS = {
|
|
|
14738
15278
|
// Draw an open curve, not connected at the ends
|
|
14739
15279
|
for( var i = 0; i < (n - 4); i += 2 )
|
|
14740
15280
|
{
|
|
14741
|
-
cp = cp.concat(LX.UTILS.getControlPoints(pts[i],pts[i+1],pts[i+2],pts[i+3],pts[i+4],pts[i+5],t));
|
|
15281
|
+
cp = cp.concat(LX.UTILS.getControlPoints(pts[ i ],pts[i+1],pts[i+2],pts[i+3],pts[i+4],pts[i+5],t));
|
|
14742
15282
|
}
|
|
14743
15283
|
|
|
14744
15284
|
for( var i = 2; i < ( pts.length - 5 ); i += 2 )
|
|
14745
15285
|
{
|
|
14746
15286
|
ctx.beginPath();
|
|
14747
|
-
ctx.moveTo(pts[i], pts[i+1]);
|
|
15287
|
+
ctx.moveTo(pts[ i ], pts[i+1]);
|
|
14748
15288
|
ctx.bezierCurveTo(cp[2*i-2],cp[2*i-1],cp[2*i],cp[2*i+1],pts[i+2],pts[i+3]);
|
|
14749
15289
|
ctx.stroke();
|
|
14750
15290
|
ctx.closePath();
|
|
@@ -14767,7 +15307,7 @@ LX.UTILS = {
|
|
|
14767
15307
|
}
|
|
14768
15308
|
};
|
|
14769
15309
|
|
|
14770
|
-
|
|
15310
|
+
const RAW_ICONS = {
|
|
14771
15311
|
// Internals
|
|
14772
15312
|
"Clone": [512, 512, [], "regular", "M64 464l224 0c8.8 0 16-7.2 16-16l0-64 48 0 0 64c0 35.3-28.7 64-64 64L64 512c-35.3 0-64-28.7-64-64L0 224c0-35.3 28.7-64 64-64l64 0 0 48-64 0c-8.8 0-16 7.2-16 16l0 224c0 8.8 7.2 16 16 16zM224 304l224 0c8.8 0 16-7.2 16-16l0-224c0-8.8-7.2-16-16-16L224 48c-8.8 0-16 7.2-16 16l0 224c0 8.8 7.2 16 16 16zm-64-16l0-224c0-35.3 28.7-64 64-64L448 0c35.3 0 64 28.7 64 64l0 224c0 35.3-28.7 64-64 64l-224 0c-35.3 0-64-28.7-64-64z"],
|
|
14773
15313
|
"IdBadge": [384, 512, [], "regular", "M256 48l0 16c0 17.7-14.3 32-32 32l-64 0c-17.7 0-32-14.3-32-32l0-16L64 48c-8.8 0-16 7.2-16 16l0 384c0 8.8 7.2 16 16 16l256 0c8.8 0 16-7.2 16-16l0-384c0-8.8-7.2-16-16-16l-64 0zM0 64C0 28.7 28.7 0 64 0L320 0c35.3 0 64 28.7 64 64l0 384c0 35.3-28.7 64-64 64L64 512c-35.3 0-64-28.7-64-64L0 64zM160 320l64 0c44.2 0 80 35.8 80 80c0 8.8-7.2 16-16 16L96 416c-8.8 0-16-7.2-16-16c0-44.2 35.8-80 80-80zm-32-96a64 64 0 1 1 128 0 64 64 0 1 1 -128 0z"],
|
|
@@ -14784,8 +15324,7 @@ LX.ICONS = {
|
|
|
14784
15324
|
"ClosedCaptioning": [576, 512, ["CC"], "regular", "M512 80c8.8 0 16 7.2 16 16l0 320c0 8.8-7.2 16-16 16L64 432c-8.8 0-16-7.2-16-16L48 96c0-8.8 7.2-16 16-16l448 0zM64 32C28.7 32 0 60.7 0 96L0 416c0 35.3 28.7 64 64 64l448 0c35.3 0 64-28.7 64-64l0-320c0-35.3-28.7-64-64-64L64 32zM200 208c14.2 0 27 6.1 35.8 16c8.8 9.9 24 10.7 33.9 1.9s10.7-24 1.9-33.9c-17.5-19.6-43.1-32-71.5-32c-53 0-96 43-96 96s43 96 96 96c28.4 0 54-12.4 71.5-32c8.8-9.9 8-25-1.9-33.9s-25-8-33.9 1.9c-8.8 9.9-21.6 16-35.8 16c-26.5 0-48-21.5-48-48s21.5-48 48-48zm144 48c0-26.5 21.5-48 48-48c14.2 0 27 6.1 35.8 16c8.8 9.9 24 10.7 33.9 1.9s10.7-24 1.9-33.9c-17.5-19.6-43.1-32-71.5-32c-53 0-96 43-96 96s43 96 96 96c28.4 0 54-12.4 71.5-32c8.8-9.9 8-25-1.9-33.9s-25-8-33.9 1.9c-8.8 9.9-21.6 16-35.8 16c-26.5 0-48-21.5-48-48z"],
|
|
14785
15325
|
"ChildReaching": [384, 512, [], "solid", "M256 64A64 64 0 1 0 128 64a64 64 0 1 0 128 0zM152.9 169.3c-23.7-8.4-44.5-24.3-58.8-45.8L74.6 94.2C64.8 79.5 45 75.6 30.2 85.4s-18.7 29.7-8.9 44.4L40.9 159c18.1 27.1 42.8 48.4 71.1 62.4L112 480c0 17.7 14.3 32 32 32s32-14.3 32-32l0-96 32 0 0 96c0 17.7 14.3 32 32 32s32-14.3 32-32l0-258.4c29.1-14.2 54.4-36.2 72.7-64.2l18.2-27.9c9.6-14.8 5.4-34.6-9.4-44.3s-34.6-5.5-44.3 9.4L291 122.4c-21.8 33.4-58.9 53.6-98.8 53.6c-12.6 0-24.9-2-36.6-5.8c-.9-.3-1.8-.7-2.7-.9z"],
|
|
14786
15326
|
"HourglassHalf": [384, 512, [], "regular", "M0 24C0 10.7 10.7 0 24 0L360 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-8 0 0 19c0 40.3-16 79-44.5 107.5L225.9 256l81.5 81.5C336 366 352 404.7 352 445l0 19 8 0c13.3 0 24 10.7 24 24s-10.7 24-24 24L24 512c-13.3 0-24-10.7-24-24s10.7-24 24-24l8 0 0-19c0-40.3 16-79 44.5-107.5L158.1 256 76.5 174.5C48 146 32 107.3 32 67l0-19-8 0C10.7 48 0 37.3 0 24zM110.5 371.5c-3.9 3.9-7.5 8.1-10.7 12.5l184.4 0c-3.2-4.4-6.8-8.6-10.7-12.5L192 289.9l-81.5 81.5zM284.2 128C297 110.4 304 89 304 67l0-19L80 48l0 19c0 22.1 7 43.4 19.8 61l184.4 0z"],
|
|
14787
|
-
"PaperPlane": [512, 512, [], "regular", "M16.1 260.2c-22.6 12.9-20.5 47.3 3.6 57.3L160 376l0 103.3c0 18.1 14.6 32.7 32.7 32.7c9.7 0 18.9-4.3 25.1-11.8l62-74.3 123.9 51.6c18.9 7.9 40.8-4.5 43.9-24.7l64-416c1.9-12.1-3.4-24.3-13.5-31.2s-23.3-7.5-34-1.4l-448 256zm52.1 25.5L409.7 90.6 190.1 336l1.2 1L68.2 285.7zM403.3 425.4L236.7 355.9 450.8 116.6 403.3 425.4z"],
|
|
14788
|
-
// "PaperPlane": [512, 512, [], "solid", "M498.1 5.6c10.1 7 15.4 19.1 13.5 31.2l-64 416c-1.5 9.7-7.4 18.2-16 23s-18.9 5.4-28 1.6L284 427.7l-68.5 74.1c-8.9 9.7-22.9 12.9-35.2 8.1S160 493.2 160 480l0-83.6c0-4 1.5-7.8 4.2-10.8L331.8 202.8c5.8-6.3 5.6-16-.4-22s-15.7-6.4-22-.7L106 360.8 17.7 316.6C7.1 311.3 .3 300.7 0 288.9s5.9-22.8 16.1-28.7l448-256c10.7-6.1 23.9-5.5 34 1.4z"],
|
|
15327
|
+
"PaperPlane": [512, 512, [], "regular", "M16.1 260.2c-22.6 12.9-20.5 47.3 3.6 57.3L160 376l0 103.3c0 18.1 14.6 32.7 32.7 32.7c9.7 0 18.9-4.3 25.1-11.8l62-74.3 123.9 51.6c18.9 7.9 40.8-4.5 43.9-24.7l64-416c1.9-12.1-3.4-24.3-13.5-31.2s-23.3-7.5-34-1.4l-448 256zm52.1 25.5L409.7 90.6 190.1 336l1.2 1L68.2 285.7zM403.3 425.4L236.7 355.9 450.8 116.6 403.3 425.4z"],
|
|
14789
15328
|
"Axis3DArrows": [24, 24, [], "solid", "m12 2l4 4h-3v7.85l6.53 3.76L21 15.03l1.5 5.47l-5.5 1.46l1.53-2.61L12 15.58l-6.53 3.77L7 21.96L1.5 20.5L3 15.03l1.47 2.58L11 13.85V6H8z"],
|
|
14790
15329
|
"PersonWalkingDashedLineArrowRight": [640, 512, [], "solid", "M208 96a48 48 0 1 0 0-96 48 48 0 1 0 0 96zM123.7 200.5c1-.4 1.9-.8 2.9-1.2l-16.9 63.5c-5.6 21.1-.1 43.6 14.7 59.7l70.7 77.1 22 88.1c4.3 17.1 21.7 27.6 38.8 23.3s27.6-21.7 23.3-38.8l-23-92.1c-1.9-7.8-5.8-14.9-11.2-20.8l-49.5-54 19.3-65.5 9.6 23c4.4 10.6 12.5 19.3 22.8 24.5l26.7 13.3c15.8 7.9 35 1.5 42.9-14.3s1.5-35-14.3-42.9L281 232.7l-15.3-36.8C248.5 154.8 208.3 128 163.7 128c-22.8 0-45.3 4.8-66.1 14l-8 3.5c-32.9 14.6-58.1 42.4-69.4 76.5l-2.6 7.8c-5.6 16.8 3.5 34.9 20.2 40.5s34.9-3.5 40.5-20.2l2.6-7.8c5.7-17.1 18.3-30.9 34.7-38.2l8-3.5zm-30 135.1L68.7 398 9.4 457.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L116.3 441c4.6-4.6 8.2-10.1 10.6-16.1l14.5-36.2-40.7-44.4c-2.5-2.7-4.8-5.6-7-8.6zM550.6 153.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L530.7 224 384 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l146.7 0-25.4 25.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l80-80c12.5-12.5 12.5-32.8 0-45.3l-80-80zM392 0c-13.3 0-24 10.7-24 24l0 48c0 13.3 10.7 24 24 24s24-10.7 24-24l0-48c0-13.3-10.7-24-24-24zm24 152c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 16c0 13.3 10.7 24 24 24s24-10.7 24-24l0-16zM392 320c-13.3 0-24 10.7-24 24l0 16c0 13.3 10.7 24 24 24s24-10.7 24-24l0-16c0-13.3-10.7-24-24-24zm24 120c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 48c0 13.3 10.7 24 24 24s24-10.7 24-24l0-48z"],
|
|
14791
15330
|
"PersonWalkingArrowLoopLeft": [640, 512, [], "solid", "M208 96a48 48 0 1 0 0-96 48 48 0 1 0 0 96zM123.7 200.5c1-.4 1.9-.8 2.9-1.2l-16.9 63.5c-5.6 21.1-.1 43.6 14.7 59.7l70.7 77.1 22 88.1c4.3 17.1 21.7 27.6 38.8 23.3s27.6-21.7 23.3-38.8l-23-92.1c-1.9-7.8-5.8-14.9-11.2-20.8l-49.5-54 19.3-65.5 9.6 23c4.4 10.6 12.5 19.3 22.8 24.5l26.7 13.3c15.8 7.9 35 1.5 42.9-14.3s1.5-35-14.3-42.9L281 232.7l-15.3-36.8C248.5 154.8 208.3 128 163.7 128c-22.8 0-45.3 4.8-66.1 14l-8 3.5c-32.9 14.6-58.1 42.4-69.4 76.5l-2.6 7.8c-5.6 16.8 3.5 34.9 20.2 40.5s34.9-3.5 40.5-20.2l2.6-7.8c5.7-17.1 18.3-30.9 34.7-38.2l8-3.5zm-30 135.1L68.7 398 9.4 457.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L116.3 441c4.6-4.6 8.2-10.1 10.6-16.1l14.5-36.2-40.7-44.4c-2.5-2.7-4.8-5.6-7-8.6zm347.7 119c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L461.3 384l18.7 0c88.4 0 160-71.6 160-160s-71.6-160-160-160L352 64c-17.7 0-32 14.3-32 32s14.3 32 32 32l128 0c53 0 96 43 96 96s-43 96-96 96l-18.7 0 25.4-25.4c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-80 80c-12.5 12.5-12.5 32.8 0 45.3l80 80z"],
|
|
@@ -14805,10 +15344,10 @@ LX.ICONS = {
|
|
|
14805
15344
|
"HandLizard": [512, 512, [], "regular", "M72 112c-13.3 0-24 10.7-24 24s10.7 24 24 24l168 0c35.3 0 64 28.7 64 64s-28.7 64-64 64l-104 0c-13.3 0-24 10.7-24 24s10.7 24 24 24l152 0c4.5 0 8.9 1.3 12.7 3.6l64 40c7 4.4 11.3 12.1 11.3 20.4l0 24c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-10.7L281.1 384 136 384c-39.8 0-72-32.2-72-72s32.2-72 72-72l104 0c8.8 0 16-7.2 16-16s-7.2-16-16-16L72 208c-39.8 0-72-32.2-72-72S32.2 64 72 64l209.6 0c46.7 0 90.9 21.5 119.7 58.3l78.4 100.1c20.9 26.7 32.3 59.7 32.3 93.7L512 424c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-107.9c0-23.2-7.8-45.8-22.1-64.1L363.5 151.9c-19.7-25.2-49.9-39.9-81.9-39.9L72 112z"],
|
|
14806
15345
|
"HandPeace": [512, 512, [], "regular", "M250.8 1.4c-35.2-3.7-66.6 21.8-70.3 57L174 119 156.7 69.6C145 36.3 108.4 18.8 75.1 30.5S24.2 78.8 35.9 112.1L88.7 262.2C73.5 276.7 64 297.3 64 320c0 0 0 0 0 0l0 24c0 92.8 75.2 168 168 168l48 0c92.8 0 168-75.2 168-168l0-72 0-16 0-32c0-35.3-28.7-64-64-64c-7.9 0-15.4 1.4-22.4 4c-10.4-21.3-32.3-36-57.6-36c-.7 0-1.5 0-2.2 0l5.9-56.3c3.7-35.2-21.8-66.6-57-70.3zm-.2 155.4C243.9 166.9 240 179 240 192l0 48c0 .7 0 1.4 0 2c-5.1-1.3-10.5-2-16-2l-7.4 0-5.4-15.3 17-161.3c.9-8.8 8.8-15.2 17.6-14.2s15.2 8.8 14.2 17.6l-9.5 90.1zM111.4 85.6L165.7 240 144 240c-4 0-8 .3-11.9 .9L81.2 96.2c-2.9-8.3 1.5-17.5 9.8-20.4s17.5 1.5 20.4 9.8zM288 192c0-8.8 7.2-16 16-16s16 7.2 16 16l0 32 0 16c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-48zm38.4 108c10.4 21.3 32.3 36 57.6 36c5.5 0 10.9-.7 16-2l0 10c0 66.3-53.7 120-120 120l-48 0c-66.3 0-120-53.7-120-120l0-24s0 0 0 0c0-17.7 14.3-32 32-32l80 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-40 0c-13.3 0-24 10.7-24 24s10.7 24 24 24l40 0c35.3 0 64-28.7 64-64c0-.7 0-1.4 0-2c5.1 1.3 10.5 2 16 2c7.9 0 15.4-1.4 22.4-4zM400 272c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-32 0-16c0-8.8 7.2-16 16-16s16 7.2 16 16l0 32 0 16z"],
|
|
14807
15346
|
"CircleNodes": [512, 512, [], "solid", "M418.4 157.9c35.3-8.3 61.6-40 61.6-77.9c0-44.2-35.8-80-80-80c-43.4 0-78.7 34.5-80 77.5L136.2 151.1C121.7 136.8 101.9 128 80 128c-44.2 0-80 35.8-80 80s35.8 80 80 80c12.2 0 23.8-2.7 34.1-7.6L259.7 407.8c-2.4 7.6-3.7 15.8-3.7 24.2c0 44.2 35.8 80 80 80s80-35.8 80-80c0-27.7-14-52.1-35.4-66.4l37.8-207.7zM156.3 232.2c2.2-6.9 3.5-14.2 3.7-21.7l183.8-73.5c3.6 3.5 7.4 6.7 11.6 9.5L317.6 354.1c-5.5 1.3-10.8 3.1-15.8 5.5L156.3 232.2z"],
|
|
14808
|
-
"CircleRight": [512, 512, [], "
|
|
14809
|
-
"CircleUp": [512, 512, [], "
|
|
14810
|
-
"CircleLeft": [512, 512, [], "
|
|
14811
|
-
"CircleDown": [512, 512, [], "
|
|
15347
|
+
"CircleRight": [512, 512, [], "regular", "M464 256A208 208 0 1 1 48 256a208 208 0 1 1 416 0zM0 256a256 256 0 1 0 512 0A256 256 0 1 0 0 256zM294.6 151.2c-4.2-4.6-10.1-7.2-16.4-7.2C266 144 256 154 256 166.3l0 41.7-96 0c-17.7 0-32 14.3-32 32l0 32c0 17.7 14.3 32 32 32l96 0 0 41.7c0 12.3 10 22.3 22.3 22.3c6.2 0 12.1-2.6 16.4-7.2l84-91c3.5-3.8 5.4-8.7 5.4-13.9s-1.9-10.1-5.4-13.9l-84-91z"],
|
|
15348
|
+
"CircleUp": [512, 512, [], "regular", "M256 48a208 208 0 1 1 0 416 208 208 0 1 1 0-416zm0 464A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM151.2 217.4c-4.6 4.2-7.2 10.1-7.2 16.4c0 12.3 10 22.3 22.3 22.3l41.7 0 0 96c0 17.7 14.3 32 32 32l32 0c17.7 0 32-14.3 32-32l0-96 41.7 0c12.3 0 22.3-10 22.3-22.3c0-6.2-2.6-12.1-7.2-16.4l-91-84c-3.8-3.5-8.7-5.4-13.9-5.4s-10.1 1.9-13.9 5.4l-91 84z"],
|
|
15349
|
+
"CircleLeft": [512, 512, [], "regular", "M48 256a208 208 0 1 1 416 0A208 208 0 1 1 48 256zm464 0A256 256 0 1 0 0 256a256 256 0 1 0 512 0zM217.4 376.9c4.2 4.5 10.1 7.1 16.3 7.1c12.3 0 22.3-10 22.3-22.3l0-57.7 96 0c17.7 0 32-14.3 32-32l0-32c0-17.7-14.3-32-32-32l-96 0 0-57.7c0-12.3-10-22.3-22.3-22.3c-6.2 0-12.1 2.6-16.3 7.1L117.5 242.2c-3.5 3.8-5.5 8.7-5.5 13.8s2 10.1 5.5 13.8l99.9 107.1z"],
|
|
15350
|
+
"CircleDown": [512, 512, [], "regular", "M256 464a208 208 0 1 1 0-416 208 208 0 1 1 0 416zM256 0a256 256 0 1 0 0 512A256 256 0 1 0 256 0zM376.9 294.6c4.5-4.2 7.1-10.1 7.1-16.3c0-12.3-10-22.3-22.3-22.3L304 256l0-96c0-17.7-14.3-32-32-32l-32 0c-17.7 0-32 14.3-32 32l0 96-57.7 0C138 256 128 266 128 278.3c0 6.2 2.6 12.1 7.1 16.3l107.1 99.9c3.8 3.5 8.7 5.5 13.8 5.5s10.1-2 13.8-5.5l107.1-99.9z"],
|
|
14812
15351
|
"WindowRestore": [512, 512, [], "solid", "M432 48L208 48c-17.7 0-32 14.3-32 32l0 16-48 0 0-16c0-44.2 35.8-80 80-80L432 0c44.2 0 80 35.8 80 80l0 224c0 44.2-35.8 80-80 80l-16 0 0-48 16 0c17.7 0 32-14.3 32-32l0-224c0-17.7-14.3-32-32-32zM48 448c0 8.8 7.2 16 16 16l256 0c8.8 0 16-7.2 16-16l0-192L48 256l0 192zM64 128l256 0c35.3 0 64 28.7 64 64l0 256c0 35.3-28.7 64-64 64L64 512c-35.3 0-64-28.7-64-64L0 192c0-35.3 28.7-64 64-64z"],
|
|
14813
15352
|
"WindowMaximize": [512, 512, [], "solid", "M.3 89.5C.1 91.6 0 93.8 0 96L0 224 0 416c0 35.3 28.7 64 64 64l384 0c35.3 0 64-28.7 64-64l0-192 0-128c0-35.3-28.7-64-64-64L64 32c-2.2 0-4.4 .1-6.5 .3c-9.2 .9-17.8 3.8-25.5 8.2C21.8 46.5 13.4 55.1 7.7 65.5c-3.9 7.3-6.5 15.4-7.4 24zM48 224l416 0 0 192c0 8.8-7.2 16-16 16L64 432c-8.8 0-16-7.2-16-16l0-192z"],
|
|
14814
15353
|
"WindowMinimize": [512, 512, [], "solid", "M24 432c-13.3 0-24 10.7-24 24s10.7 24 24 24l464 0c13.3 0 24-10.7 24-24s-10.7-24-24-24L24 432z"],
|
|
@@ -14879,7 +15418,6 @@ LX.ICONS = {
|
|
|
14879
15418
|
"Shuffle": [512, 512, [], "solid", "M403.8 34.4c12-5 25.7-2.2 34.9 6.9l64 64c6 6 9.4 14.1 9.4 22.6s-3.4 16.6-9.4 22.6l-64 64c-9.2 9.2-22.9 11.9-34.9 6.9s-19.8-16.6-19.8-29.6l0-32-32 0c-10.1 0-19.6 4.7-25.6 12.8L284 229.3 244 176l31.2-41.6C293.3 110.2 321.8 96 352 96l32 0 0-32c0-12.9 7.8-24.6 19.8-29.6zM164 282.7L204 336l-31.2 41.6C154.7 401.8 126.2 416 96 416l-64 0c-17.7 0-32-14.3-32-32s14.3-32 32-32l64 0c10.1 0 19.6-4.7 25.6-12.8L164 282.7zm274.6 188c-9.2 9.2-22.9 11.9-34.9 6.9s-19.8-16.6-19.8-29.6l0-32-32 0c-30.2 0-58.7-14.2-76.8-38.4L121.6 172.8c-6-8.1-15.5-12.8-25.6-12.8l-64 0c-17.7 0-32-14.3-32-32s14.3-32 32-32l64 0c30.2 0 58.7 14.2 76.8 38.4L326.4 339.2c6 8.1 15.5 12.8 25.6 12.8l32 0 0-32c0-12.9 7.8-24.6 19.8-29.6s25.7-2.2 34.9 6.9l64 64c6 6 9.4 14.1 9.4 22.6s-3.4 16.6-9.4 22.6l-64 64z"],
|
|
14880
15419
|
"Play": [384, 512, [], "solid", "M73 39c-14.8-9.1-33.4-9.4-48.5-.9S0 62.6 0 80L0 432c0 17.4 9.4 33.4 24.5 41.9s33.7 8.1 48.5-.9L361 297c14.3-8.7 23-24.2 23-41s-8.7-32.2-23-41L73 39z"],
|
|
14881
15420
|
"Pause": [320, 512, [], "solid", "M48 64C21.5 64 0 85.5 0 112L0 400c0 26.5 21.5 48 48 48l32 0c26.5 0 48-21.5 48-48l0-288c0-26.5-21.5-48-48-48L48 64zm192 0c-26.5 0-48 21.5-48 48l0 288c0 26.5 21.5 48 48 48l32 0c26.5 0 48-21.5 48-48l0-288c0-26.5-21.5-48-48-48l-32 0z"],
|
|
14882
|
-
"PlusCircle": [512, 512, [], "solid", "M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM232 344l0-64-64 0c-13.3 0-24-10.7-24-24s10.7-24 24-24l64 0 0-64c0-13.3 10.7-24 24-24s24 10.7 24 24l0 64 64 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-64 0 0 64c0 13.3-10.7 24-24 24s-24-10.7-24-24z"],
|
|
14883
15421
|
"LogIn": [512, 512, [], "solid", "M352 96l64 0c17.7 0 32 14.3 32 32l0 256c0 17.7-14.3 32-32 32l-64 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l64 0c53 0 96-43 96-96l0-256c0-53-43-96-96-96l-64 0c-17.7 0-32 14.3-32 32s14.3 32 32 32zm-9.4 182.6c12.5-12.5 12.5-32.8 0-45.3l-128-128c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L242.7 224 32 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l210.7 0-73.4 73.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l128-128z"],
|
|
14884
15422
|
"LogOut": [512, 512, [], "solid", "M502.6 278.6c12.5-12.5 12.5-32.8 0-45.3l-128-128c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L402.7 224 192 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l210.7 0-73.4 73.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l128-128zM160 96c17.7 0 32-14.3 32-32s-14.3-32-32-32L96 32C43 32 0 75 0 128L0 384c0 53 43 96 96 96l64 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-64 0c-17.7 0-32-14.3-32-32l0-256c0-17.7 14.3-32 32-32l64 0z"],
|
|
14885
15423
|
"MousePointer": [320, 512, [], "solid", "M0 55.2L0 426c0 12.2 9.9 22 22 22c6.3 0 12.4-2.7 16.6-7.5L121.2 346l58.1 116.3c7.9 15.8 27.1 22.2 42.9 14.3s22.2-27.1 14.3-42.9L179.8 320l118.1 0c12.2 0 22.1-9.9 22.1-22.1c0-6.3-2.7-12.3-7.4-16.5L38.6 37.9C34.3 34.1 28.9 32 23.2 32C10.4 32 0 42.4 0 55.2z"],
|
|
@@ -14889,29 +15427,48 @@ LX.ICONS = {
|
|
|
14889
15427
|
"CircleCheck": [512, 512, ["CheckCircle2"], "solid", "M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM369 209L241 337c-9.4 9.4-24.6 9.4-33.9 0l-64-64c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l47 47L335 175c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9z"],
|
|
14890
15428
|
"CirclePlay": [512, 512, [], "solid", "M0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256zM188.3 147.1c-7.6 4.2-12.3 12.3-12.3 20.9l0 176c0 8.7 4.7 16.7 12.3 20.9s16.8 4.1 24.3-.5l144-88c7.1-4.4 11.5-12.1 11.5-20.5s-4.4-16.1-11.5-20.5l-144-88c-7.4-4.5-16.7-4.7-24.3-.5z"],
|
|
14891
15429
|
"CirclePause": [512, 512, [], "solid", "M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM224 192l0 128c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-128c0-17.7 14.3-32 32-32s32 14.3 32 32zm128 0l0 128c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-128c0-17.7 14.3-32 32-32s32 14.3 32 32z"],
|
|
15430
|
+
"CirclePlus": [512, 512, ["PlusCircle"], "solid", "M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM232 344l0-64-64 0c-13.3 0-24-10.7-24-24s10.7-24 24-24l64 0 0-64c0-13.3 10.7-24 24-24s24 10.7 24 24l0 64 64 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-64 0 0 64c0 13.3-10.7 24-24 24s-24-10.7-24-24z"],
|
|
15431
|
+
"CircleMinus": [512, 512, ["MinusCircle"], "solid", "M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM184 232l144 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-144 0c-13.3 0-24-10.7-24-24s10.7-24 24-24z"],
|
|
14892
15432
|
"CircleStop": [512, 512, [], "solid", "M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM192 160l128 0c17.7 0 32 14.3 32 32l0 128c0 17.7-14.3 32-32 32l-128 0c-17.7 0-32-14.3-32-32l0-128c0-17.7 14.3-32 32-32z"],
|
|
14893
15433
|
"CircleDot": [512, 512, [], "solid", "M464 256A208 208 0 1 0 48 256a208 208 0 1 0 416 0zM0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256zm256-96a96 96 0 1 1 0 192 96 96 0 1 1 0-192z"],
|
|
14894
15434
|
"CircleHelp": [512, 512, ["HelpCircle"], "solid", "M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM169.8 165.3c7.9-22.3 29.1-37.3 52.8-37.3l58.3 0c34.9 0 63.1 28.3 63.1 63.1c0 22.6-12.1 43.5-31.7 54.8L280 264.4c-.2 13-10.9 23.6-24 23.6c-13.3 0-24-10.7-24-24l0-13.5c0-8.6 4.6-16.5 12.1-20.8l44.3-25.4c4.7-2.7 7.6-7.7 7.6-13.1c0-8.4-6.8-15.1-15.1-15.1l-58.3 0c-3.4 0-6.4 2.1-7.5 5.3l-.4 1.2c-4.4 12.5-18.2 19-30.6 14.6s-19-18.2-14.6-30.6l.4-1.2zM224 352a32 32 0 1 1 64 0 32 32 0 1 1 -64 0z"],
|
|
15435
|
+
"CircleArrowUp": [512, 512, ["ArrowUpCircle"], "solid", "M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM385 215c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0l-71-71L280 392c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-214.1-71 71c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9L239 103c9.4-9.4 24.6-9.4 33.9 0L385 215z"],
|
|
15436
|
+
"CircleArrowDown": [512, 512, ["ArrowDownCircle"], "solid", "M256 0a256 256 0 1 0 0 512A256 256 0 1 0 256 0zM127 297c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l71 71L232 120c0-13.3 10.7-24 24-24s24 10.7 24 24l0 214.1 71-71c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9L273 409c-9.4 9.4-24.6 9.4-33.9 0L127 297z"],
|
|
15437
|
+
"CircleArrowLeft": [512, 512, ["ArrowLeftCircle"], "solid", "M512 256A256 256 0 1 0 0 256a256 256 0 1 0 512 0zM215 127c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9l-71 71L392 232c13.3 0 24 10.7 24 24s-10.7 24-24 24l-214.1 0 71 71c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0L103 273c-9.4-9.4-9.4-24.6 0-33.9L215 127z"],
|
|
15438
|
+
"CircleArrowRight": [512, 512, ["ArrowRightCircle"], "solid", "M0 256a256 256 0 1 0 512 0A256 256 0 1 0 0 256zM297 385c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l71-71L120 280c-13.3 0-24-10.7-24-24s10.7-24 24-24l214.1 0-71-71c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0L409 239c9.4 9.4 9.4 24.6 0 33.9L297 385z"],
|
|
15439
|
+
"CircleAlert": [512, 512, ["AlertCircle"], "solid", "M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zm0-384c13.3 0 24 10.7 24 24l0 112c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-112c0-13.3 10.7-24 24-24zM224 352a32 32 0 1 1 64 0 32 32 0 1 1 -64 0z"],
|
|
15440
|
+
"CircleUser": [512, 512, ["UserCircle"], "solid", "M399 384.2C376.9 345.8 335.4 320 288 320l-64 0c-47.4 0-88.9 25.8-111 64.2c35.2 39.2 86.2 63.8 143 63.8s107.8-24.7 143-63.8zM0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256zm256 16a72 72 0 1 0 0-144 72 72 0 1 0 0 144z"],
|
|
15441
|
+
"CircleChevronRight": [512, 512, ["ChevronRightCircle"], "solid", "M0 256a256 256 0 1 0 512 0A256 256 0 1 0 0 256zM241 377c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l87-87-87-87c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0L345 239c9.4 9.4 9.4 24.6 0 33.9L241 377z"],
|
|
15442
|
+
"CircleChevronDown": [512, 512, ["ChevronDownCircle"], "solid", "M256 0a256 256 0 1 0 0 512A256 256 0 1 0 256 0zM135 241c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l87 87 87-87c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9L273 345c-9.4 9.4-24.6 9.4-33.9 0L135 241z"],
|
|
15443
|
+
"CircleChevronUp": [512, 512, ["ChevronUpCircle"], "solid", "M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM377 271c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0l-87-87-87 87c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9L239 167c9.4-9.4 24.6-9.4 33.9 0L377 271z"],
|
|
15444
|
+
"CircleChevronLeft": [512, 512, ["ChevronLeftCircle"], "solid", "M512 256A256 256 0 1 0 0 256a256 256 0 1 0 512 0zM271 135c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9l-87 87 87 87c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0L167 273c-9.4-9.4-9.4-24.6 0-33.9L271 135z"],
|
|
15445
|
+
"CircleX": [512, 512, ["XCircle"], "solid", "M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM175 175c9.4-9.4 24.6-9.4 33.9 0l47 47 47-47c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9l-47 47 47 47c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0l-47-47-47 47c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l47-47-47-47c-9.4-9.4-9.4-24.6 0-33.9z"],
|
|
14895
15446
|
"Apple": [384, 512, [], "solid", "M318.7 268.7c-.2-36.7 16.4-64.4 50-84.8-18.8-26.9-47.2-41.7-84.7-44.6-35.5-2.8-74.3 20.7-88.5 20.7-15 0-49.4-19.7-76.4-19.7C63.3 141.2 4 184.8 4 273.5q0 39.3 14.4 81.2c12.8 36.7 59 126.7 107.2 125.2 25.2-.6 43-17.9 75.8-17.9 31.8 0 48.3 17.9 76.4 17.9 48.6-.7 90.4-82.5 102.6-119.3-65.2-30.7-61.7-90-61.7-91.9zm-56.6-164.2c27.3-32.4 24.8-61.9 24-72.5-24.1 1.4-52 16.4-67.9 34.9-17.5 19.8-27.8 44.3-25.6 71.9 26.1 2 49.9-11.4 69.5-34.3z"],
|
|
14896
15447
|
"Chrome": [512, 512, [], "solid", "M0 256C0 209.4 12.47 165.6 34.27 127.1L144.1 318.3C166 357.5 207.9 384 256 384C270.3 384 283.1 381.7 296.8 377.4L220.5 509.6C95.9 492.3 0 385.3 0 256zM365.1 321.6C377.4 302.4 384 279.1 384 256C384 217.8 367.2 183.5 340.7 160H493.4C505.4 189.6 512 222.1 512 256C512 397.4 397.4 511.1 256 512L365.1 321.6zM477.8 128H256C193.1 128 142.3 172.1 130.5 230.7L54.19 98.47C101 38.53 174 0 256 0C350.8 0 433.5 51.48 477.8 128V128zM168 256C168 207.4 207.4 168 256 168C304.6 168 344 207.4 344 256C344 304.6 304.6 344 256 344C207.4 344 168 304.6 168 256z"],
|
|
14897
15448
|
"Facebook": [512, 512, [], "solid", "M512 256C512 114.6 397.4 0 256 0S0 114.6 0 256C0 376 82.7 476.8 194.2 504.5V334.2H141.4V256h52.8V222.3c0-87.1 39.4-127.5 125-127.5c16.2 0 44.2 3.2 55.7 6.4V172c-6-.6-16.5-1-29.6-1c-42 0-58.2 15.9-58.2 57.2V256h83.6l-14.4 78.2H287V510.1C413.8 494.8 512 386.9 512 256h0z"],
|
|
14898
15449
|
"Github": [496, 512, [], "solid", "M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"],
|
|
14899
15450
|
"Youtube": [576, 512, [], "solid", "M549.655 124.083c-6.281-23.65-24.787-42.276-48.284-48.597C458.781 64 288 64 288 64S117.22 64 74.629 75.486c-23.497 6.322-42.003 24.947-48.284 48.597-11.412 42.867-11.412 132.305-11.412 132.305s0 89.438 11.412 132.305c6.281 23.65 24.787 41.5 48.284 47.821C117.22 448 288 448 288 448s170.78 0 213.371-11.486c23.497-6.321 42.003-24.171 48.284-47.821 11.412-42.867 11.412-132.305 11.412-132.305s0-89.438-11.412-132.305zm-317.51 213.508V175.185l142.739 81.205-142.739 81.201z"],
|
|
14900
|
-
|
|
14901
|
-
"
|
|
14902
|
-
"
|
|
14903
|
-
"
|
|
14904
|
-
"
|
|
14905
|
-
"ASL": "HandsAslInterpreting",
|
|
14906
|
-
"HandRock": "HandBackFist",
|
|
14907
|
-
"Chain": "Link",
|
|
14908
|
-
"ChainBroken": "LinkOff",
|
|
14909
|
-
"ChainOff": "LinkOff",
|
|
14910
|
-
"Unlink": "LinkOff",
|
|
14911
|
-
"HelpCircle": "CircleHelp",
|
|
14912
|
-
"CheckCircle2": "CircleCheck"
|
|
15451
|
+
"CircleRight@solid": [512, 512, [], "solid", "M0 256a256 256 0 1 0 512 0A256 256 0 1 0 0 256zm395.3 11.3l-112 112c-4.6 4.6-11.5 5.9-17.4 3.5s-9.9-8.3-9.9-14.8l0-64-96 0c-17.7 0-32-14.3-32-32l0-32c0-17.7 14.3-32 32-32l96 0 0-64c0-6.5 3.9-12.3 9.9-14.8s12.9-1.1 17.4 3.5l112 112c6.2 6.2 6.2 16.4 0 22.6z"],
|
|
15452
|
+
"CircleUp@solid": [512, 512, [], "solid", "M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zm11.3-395.3l112 112c4.6 4.6 5.9 11.5 3.5 17.4s-8.3 9.9-14.8 9.9l-64 0 0 96c0 17.7-14.3 32-32 32l-32 0c-17.7 0-32-14.3-32-32l0-96-64 0c-6.5 0-12.3-3.9-14.8-9.9s-1.1-12.9 3.5-17.4l112-112c6.2-6.2 16.4-6.2 22.6 0z"],
|
|
15453
|
+
"CircleLeft@solid": [512, 512, [], "solid", "M512 256A256 256 0 1 0 0 256a256 256 0 1 0 512 0zM116.7 244.7l112-112c4.6-4.6 11.5-5.9 17.4-3.5s9.9 8.3 9.9 14.8l0 64 96 0c17.7 0 32 14.3 32 32l0 32c0 17.7-14.3 32-32 32l-96 0 0 64c0 6.5-3.9 12.3-9.9 14.8s-12.9 1.1-17.4-3.5l-112-112c-6.2-6.2-6.2-16.4 0-22.6z"],
|
|
15454
|
+
"CircleDown@solid": [512, 512, [], "solid", "M256 0a256 256 0 1 0 0 512A256 256 0 1 0 256 0zM244.7 395.3l-112-112c-4.6-4.6-5.9-11.5-3.5-17.4s8.3-9.9 14.8-9.9l64 0 0-96c0-17.7 14.3-32 32-32l32 0c17.7 0 32 14.3 32 32l0 96 64 0c6.5 0 12.3 3.9 14.8 9.9s1.1 12.9-3.5 17.4l-112 112c-6.2 6.2-16.4 6.2-22.6 0z"],
|
|
15455
|
+
"PaperPlane@solid": [512, 512, [], "solid", "M498.1 5.6c10.1 7 15.4 19.1 13.5 31.2l-64 416c-1.5 9.7-7.4 18.2-16 23s-18.9 5.4-28 1.6L284 427.7l-68.5 74.1c-8.9 9.7-22.9 12.9-35.2 8.1S160 493.2 160 480l0-83.6c0-4 1.5-7.8 4.2-10.8L331.8 202.8c5.8-6.3 5.6-16-.4-22s-15.7-6.4-22-.7L106 360.8 17.7 316.6C7.1 311.3 .3 300.7 0 288.9s5.9-22.8 16.1-28.7l448-256c10.7-6.1 23.9-5.5 34 1.4z"],
|
|
14913
15456
|
}
|
|
14914
15457
|
|
|
15458
|
+
// Generate Alias icons
|
|
15459
|
+
|
|
15460
|
+
LX.ICONS = (() => {
|
|
15461
|
+
const aliasIcons = {};
|
|
15462
|
+
|
|
15463
|
+
for( let i in RAW_ICONS )
|
|
15464
|
+
{
|
|
15465
|
+
const aliases = RAW_ICONS[ i ][ 2 ];
|
|
15466
|
+
aliases.forEach( a => aliasIcons[ a ] = i );
|
|
15467
|
+
}
|
|
15468
|
+
|
|
15469
|
+
return { ...RAW_ICONS, ...aliasIcons };
|
|
15470
|
+
})();
|
|
15471
|
+
|
|
14915
15472
|
// Alias for Lucide Icons
|
|
14916
15473
|
LX.LucideIconAlias = {
|
|
14917
15474
|
"Stop": "Square",
|